[
  {
    "path": ".JuliaFormatter.toml",
    "content": "indent = 4\nmargin = 80\nalways_for_in = true\nwhitespace_typedefs = true\nwhitespace_ops_in_indices = true\nremove_extra_newlines = true\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates\nversion: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\" # Location of package manifests\n    schedule:\n      interval: \"monthly\"\n"
  },
  {
    "path": ".github/workflows/CompatHelper.yml",
    "content": "name: CompatHelper\non:\n  schedule:\n    - cron: 0 0 * * *\n  workflow_dispatch:\njobs:\n  CompatHelper:\n    runs-on: ubuntu-latest\n    steps:\n      - name: \"Add the General registry via Git\"\n        run: |\n          import Pkg\n          ENV[\"JULIA_PKG_SERVER\"] = \"\"\n          Pkg.Registry.add(\"General\")\n        shell: julia --color=yes {0}\n      - name: \"Install CompatHelper\"\n        run: |\n          import Pkg\n          name = \"CompatHelper\"\n          uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\"\n          version = \"3\"\n          Pkg.add(; name, uuid, version)\n        shell: julia --color=yes {0}\n      - name: \"Run CompatHelper\"\n        run: |\n          import CompatHelper\n          CompatHelper.main()\n        shell: julia --color=yes {0}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}\n          # COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}\n"
  },
  {
    "path": ".github/workflows/TagBot.yml",
    "content": "name: TagBot\non:\n  issue_comment:\n    types:\n      - created\n  workflow_dispatch:\n    inputs:\n      lookback:\n        default: \"3\"\npermissions:\n  actions: read\n  checks: read\n  contents: write\n  deployments: read\n  issues: read\n  discussions: read\n  packages: read\n  pages: read\n  pull-requests: read\n  repository-projects: read\n  security-events: read\n  statuses: read\njobs:\n  TagBot:\n    if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: JuliaRegistries/TagBot@v1\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          # Edit the following line to reflect the actual name of the GitHub Secret containing your private key\n          ssh: ${{ secrets.DOCUMENTER_KEY }}\n          # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }}\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\non:\n  push:\n    branches:\n      - main\n      - staging\n      - trying\n    tags: '*'\n  pull_request:\n\nconcurrency:\n  # Skip intermediate builds: always.\n  # Cancel intermediate builds: always.\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n  \njobs:\n  test:\n    name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}\n    runs-on: ${{ matrix.os }}\n    timeout-minutes: 45\n    strategy:\n      fail-fast: false\n      matrix:\n        version:\n          - '1'\n        os:\n          - macOS-15-intel        # with intel processors \n          - ubuntu-latest\n          # - windows-latest  # Disabled: Windows PETSc_jll built without MPI, requires WSL for testing\n        arch:\n          - x64 \n        include:\n          - os: macOS-latest\n            arch: aarch64\n            version: 1\n          - os: ubuntu-latest\n            arch: x64\n            version: 'lts'\n            \n    steps:\n      - uses: actions/checkout@v6\n      - uses: julia-actions/setup-julia@v3\n        with:\n          version: ${{ matrix.version }}\n          arch: ${{ matrix.arch }}\n      - run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'\n      - uses: julia-actions/cache@v3\n      - uses: julia-actions/julia-buildpkg@latest\n      - uses: julia-actions/julia-runtest@latest\n        \n"
  },
  {
    "path": ".github/workflows/documentation.yml",
    "content": "name: Documentation\n\non:\n  push:\n    branches:\n      - main\n      - staging\n      - trying\n    tags: '*'\n  pull_request:\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n      - uses: julia-actions/setup-julia@latest\n        with:\n          version: '1'\n      - name: Install dependencies\n        run: julia --project=docs/ -e 'using Pkg; Pkg.build(); Pkg.develop(PackageSpec(path=pwd()));  Pkg.instantiate()'\n      - name: Build and deploy\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token\n          DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key\n        run: julia --project=docs/ docs/make.jl\n"
  },
  {
    "path": ".gitignore",
    "content": "deps/ComplexDouble/\ndeps/RealDouble/\ndeps/RealSingle/\ndeps/deps.jl\ndeps/petsc-*.tar.gz\n*.jl.cov\n*.jl.mem\ndocs/build/\ndocs/site/\nManifest.toml\nwrapping/.CondaPkg\n**/.vscode\n**/run/\n\n"
  },
  {
    "path": ".zenodo.json",
    "content": "{\n  \"title\": \"PETSc.jl: Julia bindings for PETSc\",\n  \"description\": \"PETSc.jl provides an interface to the Portable, Extensible Toolkit for Scientific Computation (PETSc) library, allowing the combination of Julia features (such as automatic differentiation) with PETSc's infrastructure, including linear, nonlinear, and optimization solvers, timesteppers, domain management (DM), and more, in a distributed-memory (MPI) environment.\",\n  \"creators\": [\n    {\n      \"name\": \"Kaus, Boris J.P.\",\n      \"affiliation\": \"Johannes Gutenberg University Mainz, Germany\",\n      \"orcid\": \"https://orcid.org/0000-0002-0247-8660\"\n    },\n    {\n      \"name\": \"Shah, Viral B.\",\n      \"affiliation\": \"Julia Computing, USA\",\n      \"orcid\": \"https://orcid.org/0000-0001-9602-4012\"\n    },\n    {\n      \"name\": \"Kozdon, Jeremy E.\",\n      \"affiliation\": \"NextSilicon, USA\",\n      \"orcid\": \"https://orcid.org/0000-0002-2493-4292\"\n    },\n    {\n      \"name\": \"Churavy, Valentin\",\n      \"affiliation\": \"Johannes Gutenberg University Mainz, Germany\",\n      \"orcid\": \"https://orcid.org/0000-0002-9033-165X\"\n    },\n    {\n      \"name\": \"Schnetter, Erik\",\n      \"affiliation\": \"Perimeter Institute, Canada\",\n      \"orcid\": \"https://orcid.org/0000-0002-4518-9017\"\n    },\n    {\n      \"name\": \"Byrne, Simon\",\n      \"affiliation\": \"NVIDIA, USA\",\n      \"orcid\": \"https://orcid.org/0000-0001-8048-6810\"\n    }\n  ],\n  \"keywords\": [\n    \"Julia\",\n    \"PETSc\",\n    \"scientific computing\",\n    \"linear algebra\",\n    \"nonlinear solvers\",\n    \"optimization\",\n    \"MPI\",\n    \"parallel computing\"\n  ],\n  \"grants\": [\n    {\"id\": \"10.13039/501100000780::771143\"} \n  ],\n  \"license\": {\n    \"id\": \"MIT\"\n  },\n  \"upload_type\": \"software\",\n  \"access_right\": \"open\",\n  \"communities\": [\n    {\n      \"identifier\": \"juliapackage\"\n    }\n  ]\n}\n"
  },
  {
    "path": "CITATION.bib",
    "content": "@software{petsc_jl,\n  author       = {Kaus, Boris and\n                  Shah, Viral B. and\n                  Kozdon, Jeremy E. and\n                  Churavy, Valentin and\n                  Schnetter, Erik and\n                  Byrne, Simon},\n  title        = {PETSc.jl: Julia bindings for PETSc},\n  year         = 2026,\n  publisher    = {Zenodo},\n  doi          = {10.5281/zenodo.18274810},\n  url          = {https://github.com/JuliaParallel/PETSc.jl}\n}"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2026 Boris Kaus, Viral B. Shah, Valentin Churavy, Erik Schnetter, Jeremy E. Kozdon, Simon Byrne \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Project.toml",
    "content": "name = \"PETSc\"\nuuid = \"ace2c81b-2b5f-4b1e-a30d-d662738edfe0\"\nversion = \"0.4.9\"\nauthors = [\"Boris Kaus <kaus@uni-mainz.de>\", \"Viral B. Shah <virals@gmail.com>\", \"Valentin Churavy <v.churavy@gmail.com>\", \"Erik Schnetter <eschnetter@perimeterinstitute.ca>\", \"Jeremy E. Kozdon <jeremy@kozdon.net>\", \"Simon Byrne <simonbyrne@gmail.com>\"]\n\n[deps]\nForwardDiff = \"f6369f11-7733-5829-9624-2563aa707210\"\nLibdl = \"8f399da3-3557-5675-b5ff-fb832c97cbdb\"\nLinearAlgebra = \"37e2e46d-f89d-539d-b4ee-838fcccc9c8e\"\nMPI = \"da04e1cc-30fd-572f-bb4f-1f8673147195\"\nMPIPreferences = \"3da0fdf6-3ccc-4f1b-acd9-58baa6c99267\"\nPreferences = \"21216c6a-2e73-6563-6e65-726566657250\"\nOffsetArrays = \"6fe1bfb0-de20-5000-8ca7-80f57d26f881\"\nPETSc_jll = \"8fa3689e-f0b9-5420-9873-adf6ccf46f2d\"\nPkg = \"44cfe95a-1eb2-52ea-b672-e2afdf69b78f\"\nSparseArrays = \"2f01184e-e22b-5df5-ae63-d93ebab69eaf\"\nStatistics = \"10745b16-79ce-11e8-11f9-7d13ad32a3b2\"\nUnicodePlots = \"b8865327-cd53-5732-bb35-84acbb429228\"\n\n[compat]\nForwardDiff = \"0.10, 1\"\nLibdl = \"^1.10\"\nLinearAlgebra = \"^1.10\"\nMPI = \"0.20\"\nMPIPreferences = \"0.1\"\nPreferences = \"1\"\nOffsetArrays = \"1.0\"\nPETSc_jll = \"3.22\"\nPkg = \"^1.10\"\nSparseArrays = \"1.10\"\nStatistics = \"^1.10\"\nUnicodePlots = \"3.0\"\njulia = \"^1.10\"\n\n[extras]\nCairoMakie = \"13f3f980-e62b-5c42-98c6-ff1f3baf88f0\"\nForwardDiff = \"f6369f11-7733-5829-9624-2563aa707210\"\nPlots = \"91a5bcdd-55d7-5caf-9e0b-520d859cae80\"\nPrintf = \"de0858da-6303-5e67-8744-51eddeeeb8d7\"\nRandom = \"9a3f8284-a2c9-5f02-9a11-845980a1fd5c\"\nSparseDiffTools = \"47a9eef4-7e08-11e9-0b38-333d64bd3804\"\nTest = \"8dfed614-e22c-5e08-85e1-65c5234f0b40\"\nUnicodePlots = \"b8865327-cd53-5732-bb35-84acbb429228\"\n\n[targets]\ntest = [\"ForwardDiff\", \"UnicodePlots\", \"Test\", \"Plots\", \"SparseDiffTools\", \"Printf\", \"Random\", \"CairoMakie\"]\n"
  },
  {
    "path": "README.md",
    "content": "# PETSc.jl\n\n[![Build Status](https://github.com/JuliaParallel/PETSc.jl/workflows/CI/badge.svg)](https://github.com/JuliaParallel/PETSc.jl/actions/workflows/ci.yml)\n[![doc stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaparallel.github.io/PETSc.jl/stable/)\n[![doc dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaparallel.github.io/PETSc.jl/dev/)\n[![DOI](https://zenodo.org/badge/38933145.svg)](https://doi.org/10.5281/zenodo.18274809)\n\n\n`PETSc.jl` provides an interface to the Portable, Extensible Toolkit for Scientific Computation ([PETSc](https://petsc.org)) library, allowing the combination of Julia features (such as automatic differentiation) with the PETSc's infrastructure, including linear, nonlinear, and optimization solvers, timesteppers, domain management (DM), and more, in a distributed-memory (MPI) environment. \n\nThis package comprises two main components:\n\n1. An automatically generated, low-level interface for large parts of the PETSc API (see `PETSc.LibPETSc`).\n2. A curated, high-level, more Julianic interface for selected functionality.\n\nThe low-level interface covers nearly the entire PETSc API, but may be awkward to work with and likely requires previous experience with PETSc to use effectively. The high level interface is designed to be more familiar and convenient for Julia users, and allows, for example, to set matrix entries with `A[1,2] = 3.0`, rather than having to call `LibPETSc.MatSetValue`. It, however, exposes only a small portion of the functionality of the underlying library. \n\n## Installation\nThis package can be added with the julia command:\n```julia\njulia>]add PETSc\n```\nThe installation can be tested with\n```julia\njulia>]test PETSc\n```\n\n## PETSc binaries\n\nBy default, the package uses a pre-built binary of PETSc (see [PETSc_jll](https://github.com/JuliaBinaryWrappers/PETSc_jll.jl)) along with a default installation of `MPI.jl`, so you don't have to install it on your machine.\n\nIf you want to use the package with a custom PETSc build, use `set_library!` to configure it once — the path is stored persistently in `LocalPreferences.toml` and no environment variables are needed:\n\n```julia\nusing PETSc\nPETSc.set_library!(\"/path/to/custom/libpetsc.so\"; PetscScalar=Float64, PetscInt=Int64)\n# Restart Julia — PETSc_jll is not loaded and your library is used automatically.\n```\n\nTo revert to the bundled binaries: `PETSc.unset_library!()`. To check the current configuration: `PETSc.library_info()`.\n\nTo get an overview of available precompiled libraries:\n```julia\njulia>using PETSc\njulia>[PETSc.petsclibs...]\n```\n\n## Windows users \nThe package currently does not work on windows, mainly because `MicrosoftMPI_jll` does not function when used along with the precompiled version used in `PETSc_jll`. Windows users are therefore advised to install the [Windows Subsystem for Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) (WSL) and run PETSc through there. \n\n## Getting started\nHave a look at the [documentation](https://juliaparallel.org/PETSc.jl/stable/), at the [examples](./examples/) directory or at the tests in the [test](./test) directory. We do keep the tests up to date, so that is a good starting point. \n\nNote, that we do not have tests in place for the whole library at this stage. The best supported parts are `DMDA`,`DMStag`, `KSP`,`SNES`,`Vec` and `Mat` interfaces, while other parts such as `DMPlex` do not have a high-level interface or tests yet. Users will thus have to rely on the low-level interface.\n"
  },
  {
    "path": "docs/Project.toml",
    "content": "[deps]\nDocumenter = \"e30172f5-a6a5-5a46-863b-614d45cd2de4\"\nMPI = \"da04e1cc-30fd-572f-bb4f-1f8673147195\"\nPETSc = \"ace2c81b-2b5f-4b1e-a30d-d662738edfe0\"\n"
  },
  {
    "path": "docs/make.jl",
    "content": "using Documenter, PETSc\n\nmakedocs(;\n    modules=[PETSc],\n    sitename=\"PETSc.jl\",\n    checkdocs=:exports,  # Only check exported functions, skip LibPETSc internals\n    warnonly=true,  # Warn but don't error for any documentation issues\n    format=Documenter.HTML(;\n        prettyurls=get(ENV, \"CI\", \"false\") == \"true\",\n        size_threshold_warn = nothing,  # Disable size warnings for large low-level API pages\n        size_threshold = nothing,  # Disable size errors for large low-level API pages\n    ),\n    pages=[\n        \"Home\" => \"index.md\",\n        \"Installation\" => \"man/installation.md\",\n        \"Getting Started\" => \"man/getting_started.md\",\n        \"High-level interface\" => Any[\n            \"Vec\" =>  \"man/vec.md\",\n            \"Mat\" =>  \"man/mat.md\",\n            \"DM\" =>  \"man/dm.md\",\n            \"DMDA\" =>  \"man/dmda.md\",\n            \"DMStag\" =>  \"man/dmstag.md\",\n            \"KSP\" =>  \"man/ksp.md\",\n            \"SNES\" =>  \"man/snes.md\",\n        ],\n        \"Low-level interface (LibPETSc)\" => Any[\n            \"Introduction\" =>  \"man/lowlevel_intro.md\",\n            \"Vec\" =>  \"man/vec_lowlevel.md\",\n            \"Mat\" =>  \"man/mat_lowlevel.md\",\n            \"DM\" => Any[\n                \"DM\" =>  \"man/dm_lowlevel.md\",\n                \"DMDA\" =>  \"man/dmda_lowlevel.md\",\n                \"DMPlex\" =>  \"man/dmplex_lowlevel.md\",\n                \"DMStag\" =>  \"man/dmstag_lowlevel.md\",\n                \"DMSwarm\" =>  \"man/dmswarm_lowlevel.md\",\n                \"DMForest\" =>  \"man/dmforest_lowlevel.md\",\n                \"DMNetwork\" =>  \"man/dmnetwork_lowlevel.md\",\n                \"DMShell and others\" =>  \"man/dmshell_lowlevel.md\",\n            ],\n            \"KSP\" =>  \"man/ksp_lowlevel.md\",\n            \"SNES\" =>  \"man/snes_lowlevel.md\",\n            \"TS (Time Stepping)\" =>  \"man/ts_lowlevel.md\",\n            \"Tao (Optimization)\" =>  \"man/tao_lowlevel.md\",\n            \"IS (Index Sets)\" =>  \"man/is_lowlevel.md\",\n            \"PetscViewer (I/O)\" =>  \"man/petscviewer_lowlevel.md\",\n            \"PetscSection (DOF Layout)\" =>  \"man/petscsection_lowlevel.md\",\n            \"PetscSF (Communication)\" =>  \"man/petscsf_lowlevel.md\",\n            \"AO (Application Ordering)\" =>  \"man/ao_lowlevel.md\",\n        ],\n        \"Utilities\" => \"man/utilities.md\",\n        \"Running on HPC Systems\" => \"man/hpc.md\",\n        \"FAQ\"  => \"man/FAQ.md\",\n        \"Contributing\"  => \"man/contributing.md\",\n        \"Funding\" => \"man/funding.md\",\n    ],\n)\n\ndeploydocs(;\n    repo=\"github.com/JuliaParallel/PETSc.jl.git\",\n    branch = \"gh-pages\",\n    target = \"build\",\n    devbranch = \"main\",\n    devurl = \"dev\",\n    forcepush=true,\n    push_preview = true\n)\n"
  },
  {
    "path": "docs/src/index.md",
    "content": "# PETSc.jl\n\n[PETSc.jl](https://github.com/JuliaParallel/PETSc.jl) is a Julia wrapper for the Portable, Extensible Toolkit for Scientific Computation [PETSc](https://petsc.org/) package, which allows solving ordinary and partial differential equations in parallel on laptops or massively parallel high-performance systems.\n\nThe use of Julia greatly simplifies the code that developers have to write, while allowing them to employ Julia features such as automatic differentiation. The Julia wrapper also comes with a pre-built library, which greatly simplifies the process of getting your first code working in parallel on different operating systems. In many cases, the Julia code is significantly shorter than its C counterpart.\n\nThis wrapper mimics the PETSc functionality as closely as possible, but remains work in progress. We have (semi-automatically) translated most of the functionality of PETSc, along with help docstrings. Yet, the higher-level interface is only available for part of the library. Likewise, the tests currently only cover part of the library, so we can only guarantee that this part works.\n\nSee the official [user guide](https://petsc.org/release/overview/) if you want to learn more about PETSc in general. For Julia-specific examples, have a look at our [examples](https://github.com/JuliaParallel/PETSc.jl/tree/main/examples) or [tests](https://github.com/JuliaParallel/PETSc.jl/tree/main/test).\n\n## The High-Level Interface\n\nThe high-level interface is designed to be familiar and convenient for Julia users, but exposes only a small portion of the functionality of the underlying PETSc library.\n\nFor example, with this interface, PETSc's [KSP](https://petsc.org/release/docs/manual/ksp) linear solvers (including Krylov methods) can be used in a way similar to solvers from other Julia packages. See the example in [Getting started](@ref) and the API in [KSP](@ref).\n\nFor nonlinear problems, [NonlinearSolve.jl](https://github.com/SciML/NonlinearSolve.jl) provides a high-level interface to PETSc's [SNES](https://petsc.org/release/docs/manual/snes) nonlinear solvers. This integration offers automatic sparsity detection, efficient sparse Jacobian computation, and a unified API that works across multiple solver backends.\n\n## The Low-Level Interface\n\nThe low-level interface covers most of the PETSc API, but may be awkward to work with and likely requires previous experience with PETSc to use effectively. It is (mostly) automatically generated by borrowing the Python code that creates Fortran wrappers for PETSc.\n\nThe high-level interface described in [KSP](@ref) creates a [KSP](https://petsc.org/release/docs/manual/ksp) linear solver object via the low-level interface to [`KSPSolve()`](https://petsc.org/release/docs/manualpages/KSP/KSPCreate.html), with the use of constructs which require knowledge of PETSc's nature as a [C library](https://docs.julialang.org/en/v1/manual/calling-c-and-fortran-code/). Expert users are of course free to directly use the low-level interface, as in this simple example which directly calls [`PetscGetVersionNumber()`](https://petsc.org/release/docs/manualpages/PetscGetVersionNumber.html).\n\n```julia\nusing MPI\nMPI.Initialized() || MPI.Init()\nusing PETSc\n\n# Select the appropriate library\npetsclib = PETSc.petsclibs[1]\n\n# Initialize PETSc (with logging turned off; the default)\nPETSc.initialize(petsclib, log_view=false)\n\n# Call the low-level interface (which always starts with petsclib)\nversion = LibPETSc.PetscGetVersionNumber(petsclib)\n\n# Print result\nprintln(\"PETSc $(version[1]).$(version[2]).$(version[3])\")\n\n# Finalize\nPETSc.finalize(petsclib)\n```\n"
  },
  {
    "path": "docs/src/man/FAQ.md",
    "content": "# Frequently Asked Questions\n\n\n## 1. Can I use my own PETSc library?\nYes. You do need to compile PETSc as a dynamic (shared) library, and `MPI.jl` must be configured to be compatible with the MPI used to compile PETSc. If you run this on an HPC system and don't know the configuration options, compile one of the PETSc examples and run it with `-log_view`; the output lists all configuration options used on that machine.\n\nPlease note that the version of PETSc should be compatible with the version used for the wrappers.\n\nThe recommended approach is `set_library!`, which stores the path persistently in `LocalPreferences.toml` — no environment variables needed:\n\n```julia\nusing PETSc\nPETSc.set_library!(\"/path/to/libpetsc.so\"; PetscScalar=Float64, PetscInt=Int64)\n# Restart Julia — the custom library is used automatically from here on.\n```\n\nTo revert to the bundled `PETSc_jll` binaries:\n```julia\nPETSc.unset_library!()\n```\n\nFor a one-off session without changing the persistent preference, use `set_petsclib` directly:\n```julia\npetsclib = PETSc.set_petsclib(\"/path/to/libpetsc.so\"; PetscScalar=Float64, PetscInt=Int64)\n```\n\n## 2. Help, my code crashes?\nThat is very possible. If you provide a *short* minimum working example (MWE), feel free to open an issue on the github repo, so we can check it out.\n\n## 3. What about the garbage collector in Julia?\nUsing the GC in combination with MPI code is a tricky business. The users are therefore responsible to free PETSc objects in the code, as shown in the various examples. We have some help for that:\n1. The julia function `PETSc.audit_petsc_file(\"path/to/your/file.jl\")` which scans your julia file and tries to guess whether objects are destroyed.\n2. You can initialize the PETSc library with `log_view=true`. At the end of the code, it will give an  \n\n## 4. Is it compatible with GPUs?\nThe precompiled `PETSc_jll` binaries are currently not compatible with GPUs. You can, however, use your own PETSc compilation and things should be fine. \n\n## 5. I really like this package!\nThanks a lot, we appreciate if you give us a star on github!\n\n## 6. How do I cite this in publications?\nWe are planning to submit a JOSS paper once the current release is sufficiently stable. Meanwhile, you can cite the [zenodo release](https://doi.org/10.5281/zenodo.18274809)."
  },
  {
    "path": "docs/src/man/ao_lowlevel.md",
    "content": "# AO (Application Ordering) - Low-level Interface\n\nThe AO (Application Ordering) component provides mappings between the natural \"application\" ordering of unknowns and the PETSc parallel ordering, which is optimized for parallel sparse matrix operations.\n\n## Overview\n\nApplication orderings are used when:\n- **Natural ordering differs from parallel ordering**: Your application uses a different numbering scheme\n- **I/O operations**: Reading/writing data in application order\n- **User interaction**: Displaying results in familiar ordering\n- **Legacy code integration**: Interfacing with existing applications\n\nThe AO object maintains bidirectional mappings:\n- **Application → PETSc**: Convert from your numbering to PETSc's\n- **PETSc → Application**: Convert from PETSc's numbering to yours\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Define the mapping\n# application[i] is the application index for PETSc index i\nn = 10\napplication = Int32[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]  # Reverse ordering\npetsc = Int32[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]        # Natural PETSc ordering\n\n# Create AO object\nao = LibPETSc.AOCreateBasic(petsclib, LibPETSc.PETSC_COMM_SELF, n, application, petsc)\n\n# Convert application indices to PETSc indices\napp_indices = Int32[0, 5, 9]\nLibPETSc.AOApplicationToPetsc(petsclib, ao, length(app_indices), app_indices)\n# app_indices now contains corresponding PETSc indices\n\n# Convert PETSc indices to application indices  \npetsc_indices = Int32[0, 1, 2]\nLibPETSc.AOPetscToApplication(petsclib, ao, length(petsc_indices), petsc_indices)\n# petsc_indices now contains corresponding application indices\n\n# Cleanup\nLibPETSc.AODestroy(petsclib, ao)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Creating AO Objects\n\n### Basic AO\n\nMost common: explicit mapping arrays:\n\n```julia\n# Create from application and PETSc index arrays\nao = LibPETSc.AOCreateBasic(petsclib, comm, n, app_indices, petsc_indices)\n```\n\n### Identity Mapping\n\nWhen application and PETSc orderings are the same:\n\n```julia\n# Create identity mapping (no conversion needed)\nao = LibPETSc.AOCreateIdentity(petsclib, comm, n)\n```\n\n### Memory Scalable\n\nFor large problems where storing full mapping is expensive:\n\n```julia\n# Create memory-scalable AO (uses hash table)\nao = LibPETSc.AOCreateMemoryScalable(petsclib, comm, n, app_indices, petsc_indices)\n```\n\n## Conversion Operations\n\n### Forward Conversion (Application → PETSc)\n\n```julia\n# Convert array of application indices to PETSc indices\nindices = Int32[10, 20, 30, 40]\n# Create forward conversion example\nLibPETSc.AOApplicationToPetsc(petsclib, ao, length(indices), indices)\n# indices are now in PETSc ordering (modified in-place)\n```\n\n### Reverse Conversion (PETSc → Application)\n\n```julia\n# Convert array of PETSc indices to application indices\nindices = Int32[0, 5, 10, 15]\n# Reverse conversion example\nLibPETSc.AOPetscToApplication(petsclib, ao, length(indices), indices)\n# indices are now in application ordering (modified in-place)\n```\n\n### Index Set Conversion\n\n```julia\n# Convert IS (index set) from application to PETSc ordering\nis_app = Ref{LibPETSc.IS}()\n# ... create IS with application indices ...\n\nLibPETSc.AOApplicationToPetscIS(petsclib, ao, is_app[])\n# is_app now contains PETSc indices\n```\n\n## Parallel Considerations\n\n- Each processor has its own local application ordering\n- AO objects handle parallel communication automatically\n- Indices not owned locally are mapped via MPI communication\n\n```julia\n# Create parallel AO\nao = LibPETSc.AOCreateBasic(petsclib, MPI.COMM_WORLD, local_n, \n                           local_app_indices, local_petsc_indices)\n```\n\n## Common Use Cases\n\n### 1. Reading Data in Application Order\n\n```julia\n# Read matrix entries in application ordering\n# Then convert to PETSc ordering for assembly\n\n# Application-ordered rows/cols\napp_rows = Int32[...]\napp_cols = Int32[...]\n\n# Convert to PETSc ordering\nLibPETSc.AOApplicationToPetsc(petsclib, ao, length(app_rows), app_rows)\nLibPETSc.AOApplicationToPetsc(petsclib, ao, length(app_cols), app_cols)\n\n# Now use app_rows, app_cols (which are now in PETSc ordering) for MatSetValues\n```\n\n### 2. Displaying Results\n\n```julia\n# After solve, convert solution indices for output\nsolution_indices = Int32[0, 1, 2, 3, 4]  # PETSc ordering\n\n# Convert to application ordering for display\nLibPETSc.AOPetscToApplication(petsclib, ao, length(solution_indices), solution_indices)\n\n# Display in application order\n# for i in solution_indices\n#     println(\"Application DOF $i: value = \", solution[i])\n# end\n```\n\n### 3. Integration with DM\n\n```julia\n# Get AO from DM\ndm_ao = Ref{LibPETSc.AO}()\n# LibPETSc.DMGetAO(petsclib, dm, dm_ao)\n\n# Use for converting between natural and distributed orderings\n```\n\n## Viewing and Debugging\n\n```julia\n# View the mapping (for debugging)\nviewer = LibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib)\nLibPETSc.AOView(petsclib, ao, viewer)\n```\n\n## AO Types\n\nAvailable types (set with `AOSetType`):\n- **AOBASIC**: Hash table based, good for general use\n- **AOMEMSCALABLE**: Memory efficient for large problems\n- **AOMAPPING1TO1**: Optimized for one-to-one mappings\n\n## Performance Tips\n\n- **Reuse AO objects**: Creation can be expensive for large problems\n- **Batch conversions**: Convert arrays rather than individual indices\n- **Use identity when possible**: Skip AO entirely if orderings match\n- **Choose appropriate type**: `AOMEMSCALABLE` for very large problems\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/AO_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/contributing.md",
    "content": "# Contributing\n\nContributions are highly welcome, in particular since only part of the PETSc functionality is currently being tested and has high-level interfaces. \n\nYou can thus help in many ways:\n1) Add more examples\n2) Add new tests\n3) Update documentation\n4) Report bugs\n5) Add a high-level interface for unsupported features\n6) Keep the routines up to date with future PETSc versions\n7) Keep the precompiled binaries in [PETSc_jll](https://github.com/JuliaBinaryWrappers/PETSc_jll.jl) up to date.\n\n\n#### Autowrappers\nWe originally used the function `/wrapping/generatejuliabindings.jl` to wrap the whole PETSc library, which borrows python routines by Barry Smith. The PETSc version for which we generated these original wrappers was 3.23.6.\n\nNote, however, that a range of additional changes were necessary and we thus had manually fix a number of things. It is therefore *not* recommended to rerun these autowrappers for newer versions of PETSc. \nSince there are usually only a limited number of new or updated functions between PETSc releases, it is recommended to run the a wrapper only for these new functions and replace those affected accordingly.   \n\nMake sure that the tests work!\n\n#### Adding new functionality\nPlease open a pull request to add any of the above contributions."
  },
  {
    "path": "docs/src/man/design.md",
    "content": "# Design notes\n\n\n\n- PETSc can only be built for a single `PetscScalar` type. A workaround is to build multiple PETSc libraries for all supported scalar types (`Float32`, `Float64`, `Complex{Float64}`)\n  - Appears that `Complex{Float32}` not supported (https://github.com/JuliaParallel/PETSc.jl/blob/old/deps/build_petscs.jl#L128).\n    * TODO: check if still the case\n      - should be supported.\n  - Need JLL support for this (https://github.com/JuliaPackaging/Yggdrasil/issues/1527)\n  - Define macro to `@eval` all functions which use `ccall` for different scalar types.\n  - All PETSc types and methods which involve `ccall` need a `PetscScalar` parameter.\n  * TODO: GPU support: need separate ones for CUDA as well?\n\n\n- We lazily initialize each library if an object of that parameter is constructed.\n  - Also initialize MPI if not already initialized\n    * What MPI thread level is required?\n      - none.\n  - Add `atexit` hook to finalize PETSc (this should be okay with MPI `atexit`, due to LIFO)\n  - Disable the PETSc signal handler\n\n\n- A Julia object matching each PETSc object (`Vec`, `Mat`, `KSP`, etc.).\n  - These will typically have a `ptr` as the first field, which lets us use the `cconvert`/`unsafe_convert` trick to pass pointer by value/reference.\n  - Most (all?) objects will have a `comm` field, for the MPI communicator\n  - Objects which wrap Julia objects will also need a reference to those objects to prevent GC.\n\n\n- For convenience, attach finalizers to call `destroy` for single-process (\"sequential\") objects (`VecSeq`, `MatSeqXXX`, or any others where `comm = MPI.COMM_SELF`).\n  - We can't attach finalizers for distributed objects (i.e. `VecMPI`), as `destroy` needs to be called collectively on all MPI ranks.\n  - Safe for users to call `destroy` manually if finalizer already defined\n    * TODO: check this with PETSc devs\n      - yes.\n  - Unclear how to handle objects that are contained within others, e.g. `PC` from `KSPGetPC`, `KSP` from `SNESGetKSP`, etc.\n    * There appears to be some sort of reference counting, unclear if this is valid.\n      `PetscObjectReference` / `PetscObjectDereference`\n      - just need to manually increment reference counter for these.\n\n- For PETSc objects which are equivalent to Julia objects (e.g. `VecSeq` : `Vector{PetscScalar}`, `MatSeqDense` : `Matrix{PetscScalar}`), use `XXXCreateSeqWithArray` methods so that they can share same memory.\n    * TODO: check PETSc guarantees on accessing the Julia objects directly.\n  - For other objects (`MatSeqAIJ`), for now we let PETSc manage memory (may want to re-evaluate this later)\n  - Define conversion routines to wrap with `Seq` objects where possible.\n  - Define convenience versions of functions which take/return Julia `Vector`s, e.g. `y = KSP(M) \\ x` where `y` and `x` are `Vector`s.\n\n  - Can annotate PETSc objects with Julia ones via `PetscContainerCreate` & `PetscObjectCompose`\n\n- For specifying object options, there are 2 possible approaches:\n    (a) use `PetscOptions` objects (key-value pairs) to capture keyword args, which can be pushed and popped to the global options, then use `XXXSetFromOption` methods, e.g. `KSP(mat, ksp_atol=1e-8)`\n    (b) use C setter functions (e.g. `KSPSetTolerances`)\n  - for now, we go with (a).\n    - it's easier\n    - not all options are available via C setters, e.g. `mg_coarse_XXX`/`mg_levels_XXX` options\n  - ideally we would create a more \"object-oriented\" interface: e.g. each preconditioner would be a different Julia type, but this doesn't yet seem possible.\n\n- can use `PetscFunctionListGet` to get runtime list of PC etc.\n\n\n- For cases where PETSc needs to call Julia functions (`MatShell`, `SNES`), PETSc provides a mechanism to pass through a context pointer. We can use this to pass through a pointer to the object itself via `pointer_from_objref`.\n  * Can we pass `NULL` to vec/matrix args? What does that do?\n  - What should the callback interface look like?\n  - How to handle errors from within callbacks?\n\n\n- TODO: Error handling:\n  - https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html"
  },
  {
    "path": "docs/src/man/dm.md",
    "content": "# DM\n\nThe `DM` module provides the base functionality for managing distributed data structures in PETSc. It serves as a foundation for various grid managers.\n\n## Overview\n\nA `DM` object encapsulates the topology and data layout of a computational grid, enabling:\n- Parallel data distribution across MPI processes\n- Ghost point management for communication\n- Creation of vectors and matrices with appropriate parallel layouts\n- Multigrid hierarchy management\n\n## DM Types in PETSc\n\nPETSc provides several DM implementations for different mesh types:\n\n### High-Level Interface Available in PETSc.jl\n\n| DM Type | Description | Status |\n|---------|-------------|--------|\n| **DMDA** | Distributed arrays for structured grids (1D/2D/3D) | ✅ Full support |\n| **DMStag** | Staggered grids for finite volume/difference methods | ✅ Full support |\n\n### Low-Level Interface Only (via LibPETSc)\n\nThe following DM types are available through the low-level `LibPETSc` wrapper but do not yet have a convenient high-level Julia interface:\n\n| DM Type | Description | Use Case |\n|---------|-------------|----------|\n| **DMPlex** | Unstructured meshes with arbitrary topology | Finite elements, complex geometries |\n| **DMForest** | Adaptive mesh refinement (AMR) via p4est/p8est | Octree-based adaptivity |\n| **DMNetwork** | Graph/network structures | Power grids, pipe networks |\n| **DMSwarm** | Particle data management | PIC methods, Lagrangian particles |\n| **DMProduct** | Tensor product of DMs | Semi-structured problems |\n| **DMSliced** | Sliced representation | Legacy, specialized uses |\n| **DMShell** | User-defined DM | Custom implementations |\n| **DMComposite** | Composition of multiple DMs | Multi-physics coupling |\n| **DMRedundant** | Redundant storage on all ranks | Small coupled systems |\n\n### Using Low-Level DM Types\n\nFor DM types without high-level wrappers, you can use the `LibPETSc` module directly:\n\n```julia\nusing PETSc\nusing PETSc.LibPETSc\n\n# Example: Create a DMPlex (low-level)\npetsclib = PETSc.petsclibs[1]\ndm = LibPETSc.DMPlexCreate(petsclib, MPI.COMM_WORLD)\n# ... configure using LibPETSc functions ...\nLibPETSc.DMDestroy(petsclib, dm)\n```\n\n!!! note \"Contributing\"\n    Contributions to add high-level interfaces for additional DM types are welcome! \n    See the [Contributing](@ref) page for guidelines.\n\n## Functions\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"dm.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/dm_lowlevel.md",
    "content": "# DM (Domain Management)\n\nThe DM (Domain Management) object encapsulates the relationship between a mesh data structure and the algebraic objects (vectors, matrices). It provides a common interface for structured and unstructured meshes, particles, networks, and other geometric/topological structures.\n\n## Overview\n\nThe DM abstraction in PETSc manages:\n- Topology and geometry of computational domains\n- Mapping between geometric entities and degrees of freedom\n- Distribution of data across MPI processes\n- Multi-level representations for multigrid\n- Field definitions and discretizations\n\n## Basic Usage Pattern\n\n```julia\nusing PETSc, MPI\n\n# Initialize\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\n# Create a DM (specific type created via DMDACreate, DMPlexCreate, etc.)\n# See subtype-specific pages for creation functions\n\n# Setup the DM\nLibPETSc.DMSetFromOptions(petsclib, dm)\nLibPETSc.DMSetUp(petsclib, dm)\n\n# Create global vectors\nx = LibPETSc.DMCreateGlobalVector(petsclib, dm)\n\n# Create matrices\nA = LibPETSc.DMCreateMatrix(petsclib, dm)\n\n# Use the DM...\n\n# Cleanup\nLibPETSc.VecDestroy(petsclib, x)\nLibPETSc.MatDestroy(petsclib, A)\nLibPETSc.DMDestroy(petsclib, dm)\nPETSc.finalize(petsclib)\n```\n\n## DM Subtypes\n\nPETSc provides several DM implementations for different problem types:\n\n- **[DMDA](dmda_lowlevel.md)**: Structured grids (1D, 2D, 3D) with regular topology\n- **[DMPlex](dmplex_lowlevel.md)**: Unstructured meshes using Sieve/DMPlex topology\n- **[DMStag](dmstag_lowlevel.md)**: Staggered grids for staggered finite differences\n- **[DMSwarm](dmswarm_lowlevel.md)**: Particle methods and particle-in-cell\n- **[DMForest](dmforest_lowlevel.md)**: Adaptive mesh refinement with forest-of-octrees\n- **[DMNetwork](dmnetwork_lowlevel.md)**: Network/graph-based problems\n- **[DMShell and others](dmshell_lowlevel.md)**: User-defined and composite DM types\n\n## General DM Functions\n\nThe following functions work across all DM types:\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\", \"DMaddons_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> begin\n    name = string(nameof(t))\n    # Include only general DM functions, exclude subtype-specific ones\n    startswith(name, \"DM\") && \n    !startswith(name, \"DMDA\") &&\n    !startswith(name, \"DMPlex\") &&\n    !startswith(name, \"DMStag\") &&\n    !startswith(name, \"DMSwarm\") &&\n    !startswith(name, \"DMForest\") &&\n    !startswith(name, \"DMNetwork\") &&\n    !startswith(name, \"DMShell\") &&\n    !startswith(name, \"DMProduct\") &&\n    !startswith(name, \"DMRedundant\") &&\n    !startswith(name, \"DMComposite\")\nend\n```\n"
  },
  {
    "path": "docs/src/man/dmda.md",
    "content": "# DMDA\n\nThe `DMDA` (Distributed Array) module provides functionality for creating and managing structured grids in 1D, 2D, or 3D.\n\n## Overview\n\n`DMDA` is ideal for problems on regular structured grids where:\n- The grid is logically rectangular\n- Each grid point has the same number of degrees of freedom\n- Stencil operations follow a regular pattern (star or box stencils)\n\n## Creating a DMDA\n\n```julia\n# 2D grid example\nda = DMDA(\n    petsclib,\n    MPI.COMM_WORLD,\n    (DM_BOUNDARY_NONE, DM_BOUNDARY_NONE),  # boundary types\n    (nx, ny),                               # global dimensions\n    1,                                      # degrees of freedom per node\n    1,                                      # stencil width\n    DMDA_STENCIL_STAR                      # stencil type\n)\n```\n\n## Functions\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"dmda.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/dmda_lowlevel.md",
    "content": "# DMDA (Structured Grids)\n\nDMDA manages structured grids with regular topology in 1D, 2D, and 3D. It's designed for finite difference and finite volume methods on Cartesian grids.\n\n## Overview\n\nDMDA provides:\n- Regular grid topology in 1D, 2D, or 3D\n- Efficient stencil-based communication\n- Natural ordering and ghost point management\n- Support for multiple degrees of freedom per grid point\n- Boundary type specification (periodic, ghosted, none)\n\n## Basic Usage Pattern\n\n```julia\nusing PETSc, MPI\n\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\n# Get PETSc types\nPetscInt = petsclib.PetscInt\n\n# Create a 2D structured grid: 10x10 global size, 1 dof per point\ndm = LibPETSc.DMDACreate2d(\n    petsclib,\n    MPI.COMM_WORLD,\n    LibPETSc.DM_BOUNDARY_NONE,  # x boundary\n    LibPETSc.DM_BOUNDARY_NONE,  # y boundary\n    LibPETSc.DMDA_STENCIL_STAR, # stencil type\n    PetscInt(10), PetscInt(10),  # global dimensions\n    PetscInt(LibPETSc.PETSC_DECIDE), # processes in x\n    PetscInt(LibPETSc.PETSC_DECIDE), # processes in y\n    PetscInt(1),                 # dof per node\n    PetscInt(1),                 # stencil width\n    C_NULL, C_NULL               # nodes per process\n)\n\n# Set up and use\nLibPETSc.DMSetFromOptions(petsclib, dm)\nLibPETSc.DMSetUp(petsclib, dm)\n\n# Get local vector with ghost points\nlocal_vec = LibPETSc.DMCreateLocalVector(petsclib, dm)\n\n# Get global vector\nglobal_vec = LibPETSc.DMCreateGlobalVector(petsclib, dm)\n\n# Cleanup\nLibPETSc.VecDestroy(petsclib, local_vec)\nLibPETSc.VecDestroy(petsclib, global_vec)\nLibPETSc.DMDestroy(petsclib, dm)\n```\n\n## DMDA Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMDA\")\n```\n"
  },
  {
    "path": "docs/src/man/dmforest_lowlevel.md",
    "content": "# DMForest (Adaptive Mesh Refinement)\n\nDMForest manages adaptive mesh refinement (AMR) using forest-of-octrees (2D: quadtrees, 3D: octrees). It provides hierarchical mesh adaptation with efficient parallel implementation.\n\n## Overview\n\nDMForest provides:\n- Adaptive mesh refinement and coarsening\n- Forest-of-octrees topology\n- Integration with p4est library\n- Multi-level mesh hierarchies for multigrid\n- Metric-based adaptation\n- Label-based adaptation\n\n## Basic Usage Pattern\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a DMForest\nforest = LibPETSc.DMCreate(petsclib, MPI.COMM_WORLD)\nLibPETSc.DMSetType(petsclib, forest, \"forest\")  # String convenience wrapper\n# Set^ the geometric/topological dimension (e.g., 2 for a surface)\nLibPETSc.DMSetDimension(petsclib, forest, 2)\n\n# Set forest topology (e.g., unit square/cube)\n# Set topology by name (e.g., \"brick\")\nLibPETSc.DMForestSetTopology(petsclib, forest, \"brick\")\n\n# Set base DM (initial coarse mesh) using a simple DMPlex box mesh\nbase_dm = LibPETSc.DMPlexCreateBoxMesh(\n    petsclib, MPI.COMM_WORLD, 2, LibPETSc.PETSC_FALSE,\n    [2, 2], [0.0, 0.0], [1.0, 1.0], [LibPETSc.DM_BOUNDARY_NONE, LibPETSc.DM_BOUNDARY_NONE], LibPETSc.PETSC_TRUE, 0, LibPETSc.PETSC_FALSE\n)\nLibPETSc.DMForestSetBaseDM(petsclib, forest, base_dm)\n\n# Set initial refinement level\nLibPETSc.DMForestSetInitialRefinement(petsclib, forest, 2)\n\n# Ensure adjacency dimension and partition overlap are non-negative (some builds may leave them unset)\nLibPETSc.DMForestSetAdjacencyDimension(petsclib, forest, 0)\nLibPETSc.DMForestSetPartitionOverlap(petsclib, forest, 0)\n\n# Set up\n# (Skip DMSetFromOptions in this simple example to avoid parsing unexpected runtime options)\nLibPETSc.DMSetUp(petsclib, forest)\n\n# Adapt based on some criterion\n# Create adapted forest (returns via out-parameter)\ntdm = LibPETSc.PetscDM(C_NULL, petsclib)\nLibPETSc.DMForestTemplate(petsclib, forest, MPI.COMM_WORLD, tdm)\nadapted = tdm\n# `adapted` now points to the adapted DM (if any) and should be checked before use.\n\n# Cleanup\nLibPETSc.DMDestroy(petsclib, adapted)\nLibPETSc.DMDestroy(petsclib, forest)\nLibPETSc.DMDestroy(petsclib, base_dm)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## DMForest Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMForest\")\n```\n"
  },
  {
    "path": "docs/src/man/dmnetwork_lowlevel.md",
    "content": "# DMNetwork (Network/Graph Problems)\n\nDMNetwork manages network and graph-based problems, such as power grids, transportation networks, and general graph computations with edge and vertex data.\n\n## Overview\n\nDMNetwork provides:\n- Network topology with edges and vertices\n- Component registration for edges and vertices\n- Coupling of network problems with other DM types\n- Distribution across MPI processes\n- Support for algebraic constraints at vertices\n\n## Basic Usage Pattern\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a DMNetwork (returns a PetscDM)\nnetwork = LibPETSc.DMNetworkCreate(petsclib, MPI.COMM_WORLD)\n\n# Set network sizes\n# For simple examples, provide a name and an explicit edge list vector\nnedges = 2\nnvertices = 3\nLibPETSc.DMNetworkSetNumSubNetworks(petsclib, network, 1, 1)\nedgelist = [1, 2, 2, 3]  # pairs of vertex global indices\nLibPETSc.DMNetworkAddSubnetwork(petsclib, network, \"main\", nedges, edgelist)\n\n# Register components (size in bytes; use appropriate struct size in real examples)\n# Register a component; the function returns a component key (PetscInt)\ncompkey = LibPETSc.DMNetworkRegisterComponent(petsclib, network, \"bus\", Csize_t(0))\n\n# Add components to vertices/edges using DMNetworkAddComponent (omitted here)\n\n# Finalize network and set up\nLibPETSc.DMNetworkLayoutSetUp(petsclib, network)\nLibPETSc.DMSetUp(petsclib, network)\n\n# Create vectors\nx = LibPETSc.DMCreateGlobalVector(petsclib, network)\n\n# Cleanup\nLibPETSc.VecDestroy(petsclib, x)\nLibPETSc.DMDestroy(petsclib, network)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## DMNetwork Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMNetwork\")\n```\n"
  },
  {
    "path": "docs/src/man/dmplex_lowlevel.md",
    "content": "# DMPlex (Unstructured Meshes)\n\nDMPlex manages unstructured meshes using a flexible topology representation. It supports finite element methods, finite volume methods, and general mesh-based computations.\n\n## Overview\n\nDMPlex provides:\n- General unstructured mesh topology (simplices, tensor products, polyhedra)\n- Point-based topological representation (vertices, edges, faces, cells)\n- Mesh partitioning and distribution\n- Overlap and ghost cell management\n- Section-based field layout\n- Support for FEM assembly via PetscDS and PetscFE\n- Mesh refinement and adaptation\n\n## Basic Usage Pattern\n\n```julia\nusing PETSc, MPI\n\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a simple 2D quadrilateral mesh\ndm = LibPETSc.DMPlexCreateBoxMesh(\n    petsclib,\n    MPI.COMM_WORLD,\n    2,                           # dimension\n    LibPETSc.PETSC_FALSE,        # simplex (false = tensor/quad)\n    [5, 5],                      # faces per dimension\n    [0.0, 0.0],                  # lower bounds\n    [1.0, 1.0],                  # upper bounds\n    [LibPETSc.DM_BOUNDARY_NONE, LibPETSc.DM_BOUNDARY_NONE],  # boundary types\n    LibPETSc.PETSC_TRUE,         # interpolate\n    0,                           # localizationHeight\n    LibPETSc.PETSC_FALSE         # sparseLocalize\n)\n\n# Distribute mesh across processes (for serial, this is a no-op)\ndmParallel = LibPETSc.PetscDM(C_NULL, petsclib)\nLibPETSc.DMPlexDistribute(petsclib, dm, 0, C_NULL, dmParallel)\nif dmParallel.ptr != C_NULL\n    LibPETSc.DMDestroy(petsclib, dm)\n    dm = dmParallel\nend\n\n# Set up\nLibPETSc.DMSetFromOptions(petsclib, dm)\nLibPETSc.DMSetUp(petsclib, dm)\n\n# Create section to define field layout\nsection = Ref{LibPETSc.PetscSection}()\nLibPETSc.DMGetLocalSection(petsclib, dm, section)\n\n# Create vectors and matrices\nx = LibPETSc.DMCreateGlobalVector(petsclib, dm)\n\n# Cleanup\nLibPETSc.VecDestroy(petsclib, x)\nLibPETSc.DMDestroy(petsclib, dm)\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## DMPlex Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMPlex\")\n```\n"
  },
  {
    "path": "docs/src/man/dmshell_lowlevel.md",
    "content": "# DMShell and Other DM Types\n\nThis page documents DMShell (user-defined DM), DMProduct (Cartesian product of DMs), DMRedundant (redundantly-stored DM), and DMComposite (deprecated composite DM).\n\n## DMShell\n\nDMShell allows users to define custom DM implementations by providing callback functions for operations like creating vectors, matrices, and managing topology.\n\n### Basic DMShell Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a DMShell (returns a PetscDM) and set callbacks\nshell = LibPETSc.DMShellCreate(petsclib, MPI.COMM_WORLD)\n# Set callbacks on the returned DM, for example:\n# LibPETSc.DMShellSetCreateGlobalVector(petsclib, shell, ...)\n# LibPETSc.DMShellSetCreateLocalVector(petsclib, shell, ...)\n# LibPETSc.DMShellSetCreateMatrix(petsclib, shell, ...)\n\n# Set up\nLibPETSc.DMSetUp(petsclib, shell)\n\n# Cleanup\nLibPETSc.DMDestroy(petsclib, shell)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## DMProduct\n\nDMProduct represents a Cartesian product of multiple DMs, useful for coupled multi-physics problems.\n\n### Basic DMProduct Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create component DMs\ndm1 = Ref{LibPETSc.CDM}()\ndm2 = Ref{LibPETSc.CDM}()\n# ... create dm1 and dm2 ...\n\n# Create DMProduct\n# Create two simple component DMs (here using small box DMPlex meshes)\ndm1 = LibPETSc.DMPlexCreateBoxMesh(\n    petsclib, MPI.COMM_WORLD, 2, LibPETSc.PETSC_FALSE,\n    [1,1], [0.0,0.0], [1.0,1.0], [LibPETSc.DM_BOUNDARY_NONE, LibPETSc.DM_BOUNDARY_NONE], LibPETSc.PETSC_TRUE, 0, LibPETSc.PETSC_FALSE\n)\ndm2 = LibPETSc.DMPlexCreateBoxMesh(\n    petsclib, MPI.COMM_WORLD, 2, LibPETSc.PETSC_FALSE,\n    [1,1], [0.0,0.0], [1.0,1.0], [LibPETSc.DM_BOUNDARY_NONE, LibPETSc.DM_BOUNDARY_NONE], LibPETSc.PETSC_TRUE, 0, LibPETSc.PETSC_FALSE\n)\n\n# Create a DMProduct and attach component DMs\nproduct = LibPETSc.DMCreate(petsclib, MPI.COMM_WORLD)\nLibPETSc.DMSetType(petsclib, product, \"product\")\n# Set the product 'topological' dimension to the number of component DMs\nLibPETSc.DMSetDimension(petsclib, product, 2)\n# Map product slots to sub-DM dimensions (index mapping); then attach sub-DMs\nLibPETSc.DMProductSetDimensionIndex(petsclib, product, 0, 0)\nLibPETSc.DMProductSetDimensionIndex(petsclib, product, 1, 0)\nLibPETSc.DMProductSetDM(petsclib, product, 0, dm1)\nLibPETSc.DMProductSetDM(petsclib, product, 1, dm2)\n\n# Set up\nLibPETSc.DMSetUp(petsclib, product)\n\n# Cleanup\nLibPETSc.DMDestroy(petsclib, product)\nLibPETSc.DMDestroy(petsclib, dm1)\nLibPETSc.DMDestroy(petsclib, dm2)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## DMRedundant\n\nDMRedundant stores data redundantly across all processes, useful for small shared data.\n\n## DMComposite\n\nDMComposite (deprecated, use DMProduct instead) manages multiple DMs as separate fields.\n\n## Functions\n\n### DMShell Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMShell\")\n```\n\n### DMProduct Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMProduct\")\n```\n\n### DMRedundant Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMRedundant\")\n```\n\n### DMComposite Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMComposite\")\n```\n"
  },
  {
    "path": "docs/src/man/dmstag.md",
    "content": "# DMStag\n\nThe DMStag (Staggered Grid DM) module provides data management for staggered grids, commonly used in finite difference/volume methods for fluid dynamics and similar applications.\n\n## Overview\n\nDMStag is designed for problems where:\n- Variables live at different grid locations (vertices, edges, faces, cell centers)\n- Staggered grids provide better stability for incompressible flow\n- Multiple degrees of freedom per grid location are needed\n\n### Staggered Grid Layout\n\nIn a staggered grid, different physical quantities are stored at different locations:\n\n**1D**: \n- Vertices: Scalar quantities (pressure, temperature)\n- Elements: Flux quantities\n\n**2D**:\n- Vertices: Corner values\n- Edges: Face-normal velocities (u on vertical edges, v on horizontal edges)  \n- Elements: Cell-centered values (pressure)\n\n**3D**:\n- Vertices: Corner values\n- Edges: Edge-centered values\n- Faces: Face-normal quantities\n- Elements: Cell-centered values\n\n## Creating a DMStag\n\n```julia\n# 2D staggered grid\ndm = DMStag(\n    petsclib,\n    MPI.COMM_WORLD,\n    (DM_BOUNDARY_NONE, DM_BOUNDARY_NONE),  # boundary types\n    (nx, ny),                               # global dimensions\n    (dof_vertex, dof_edge, dof_element),   # DOF at each location\n    1,                                      # stencil width\n    DMSTAG_STENCIL_BOX                     # stencil type\n)\n\n# 3D staggered grid\ndm = DMStag(\n    petsclib,\n    MPI.COMM_WORLD,\n    (DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE),\n    (nx, ny, nz),\n    (dof_vertex, dof_edge, dof_face, dof_element),\n    1,\n    DMSTAG_STENCIL_BOX\n)\n```\n\n## Accessing Data\n\n### Grid Corners and Sizes\n\n```julia\n# Get local grid extent (without ghost points)\ncorners = getcorners_dmstag(dm)\n# Returns (lower=CartesianIndex, upper=CartesianIndex, size=Tuple)\n\n# Get local grid extent (with ghost points)  \nghost_corners = getghostcorners_dmstag(dm)\n```\n\n### Working with Vectors\n\n```julia\n# Create global and local vectors\nglobal_vec = DMGlobalVec(dm)\nlocal_vec = DMLocalVec(dm)\n\n# Transfer data between global and local\ndm_global_to_local!(dm, global_vec, INSERT_VALUES, local_vec)\ndm_local_to_global!(dm, local_vec, ADD_VALUES, global_vec)\n```\n\n### Getting Location Indices\n\n```julia\n# Get indices for accessing specific DOF locations\nindices = DMStagGetIndices(dm)\n# Use indices to access vertex, edge, face, or element DOFs\n```\n\n## Setting Coordinates\n\n```julia\n# Set uniform coordinates\nsetuniformcoordinates_stag!(dm, xmin, xmax)           # 1D\nsetuniformcoordinates_stag!(dm, xmin, xmax, ymin, ymax)  # 2D\nsetuniformcoordinates_stag!(dm, xmin, xmax, ymin, ymax, zmin, zmax)  # 3D\n\n# Get local coordinate array\ncoords = getlocalcoordinatearray(dm)\n```\n\n## Stencil Types\n\n- `DMSTAG_STENCIL_BOX` - Full box stencil (includes diagonals)\n- `DMSTAG_STENCIL_STAR` - Star stencil (axis-aligned neighbors only)\n\n## Example: 2D Stokes Flow Setup\n\n```julia\n# Create staggered grid for Stokes: velocity on edges, pressure in cells\ndm = DMStag(\n    petsclib,\n    MPI.COMM_WORLD,\n    (DM_BOUNDARY_NONE, DM_BOUNDARY_NONE),\n    (64, 64),      # 64x64 grid\n    (0, 1, 1),     # 0 DOF at vertices, 1 at edges (velocity), 1 in elements (pressure)\n    1,\n    DMSTAG_STENCIL_BOX\n)\n\nsetuniformcoordinates_stag!(dm, 0.0, 1.0, 0.0, 1.0)\n\n# Create vectors and matrix\nx = DMGlobalVec(dm)\nb = DMGlobalVec(dm)\nA = DMCreateMatrix(dm)\n```\n\n## Functions\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"dmstag.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/dmstag_lowlevel.md",
    "content": "# DMStag (Staggered Grids)\n\nDMStag manages staggered grid discretizations, commonly used in computational fluid dynamics and geophysics. It handles variables defined at different locations (vertices, edges, faces, element centers).\n\n## Overview\n\nDMStag provides:\n- Staggered grid support for MAC/marker-and-cell schemes\n- Multiple degrees of freedom at vertices, edges, faces, and element centers\n- Efficient communication for staggered variables\n- 1D, 2D, and 3D support\n- Boundary type specification\n\n## Basic Usage Pattern\n\n```julia\nusing PETSc, MPI\n\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\n# Get PETSc types\nPetscInt = petsclib.PetscInt\n\n# Create a 2D staggered grid\n# Velocity components on edges, pressure at cell centers\ndm = LibPETSc.DMStagCreate2d(\n    petsclib,\n    MPI.COMM_WORLD,\n    LibPETSc.DM_BOUNDARY_NONE,\n    LibPETSc.DM_BOUNDARY_NONE,\n    PetscInt(10), PetscInt(10),  # global dimensions\n    PetscInt(LibPETSc.PETSC_DECIDE),\n    PetscInt(LibPETSc.PETSC_DECIDE),\n    PetscInt(0),                 # dof per vertex\n    PetscInt(1),                 # dof per edge (velocity)\n    PetscInt(1),                 # dof per element (pressure)\n    LibPETSc.DMSTAG_STENCIL_BOX,\n    PetscInt(1),                 # stencil width\n    C_NULL, C_NULL\n)\n\n# Set up\nLibPETSc.DMSetFromOptions(petsclib, dm)\nLibPETSc.DMSetUp(petsclib, dm)\n\n# Create vectors\nx = LibPETSc.DMCreateGlobalVector(petsclib, dm)\n\n# Access staggered components\n# Use DMStagGetLocationSlot to get indices for each component\n\n# Cleanup\nLibPETSc.VecDestroy(petsclib, x)\nLibPETSc.DMDestroy(petsclib, dm)\nPETSc.finalize(petsclib)\n```\n\n## DMStag Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMStag\")\n```\n"
  },
  {
    "path": "docs/src/man/dmswarm_lowlevel.md",
    "content": "# DMSwarm (Particle Methods)\n\nDMSwarm manages particle-based methods including particle-in-cell (PIC), smoothed particle hydrodynamics (SPH), and general particle simulations.\n\n## Overview\n\nDMSwarm provides:\n- Dynamic particle creation and migration\n- Field registration for particle data\n- Particle-mesh coupling\n- Particle migration across MPI processes\n- Support for PIC and general particle methods\n- Cell-based particle management\n\n## Basic Usage Pattern\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a DMSwarm in PIC mode\nswarm = LibPETSc.DMCreate(petsclib, MPI.COMM_WORLD)\nLibPETSc.DMSetType(petsclib, swarm, \"swarm\")  # String convenience wrapper\n# Set the geometric/topological dimension for the swarm (required)\nLibPETSc.DMSetDimension(petsclib, swarm, 1)\n\n# Set swarm type to PIC\nLibPETSc.DMSwarmSetType(petsclib, swarm, LibPETSc.DMSWARM_PIC)\n\n# Create background mesh (here we use a 1D DMDA for simplicity)\nda = LibPETSc.DMDACreate1d(petsclib, MPI.COMM_WORLD, LibPETSc.DM_BOUNDARY_NONE, 10, 1, 1, C_NULL)\n\n# Set the cell DM for PIC\nLibPETSc.DMSwarmSetCellDM(petsclib, swarm, da)\n\n# Register a particle field `velocity` with blocksize 3 (x,y,z components)\nLibPETSc.DMSwarmRegisterPetscDatatypeField(\n    petsclib, swarm,\n    \"velocity\", 3, LibPETSc.PETSC_DOUBLE\n)\n\n# Finalize field registration\nLibPETSc.DMSwarmFinalizeFieldRegister(petsclib, swarm)\n\n# Set number of particles\nnparticles = 100\nLibPETSc.DMSwarmSetLocalSizes(petsclib, swarm, nparticles, 0)\n\n# Access and set particle data using DMSwarmGetField / DMSwarmRestoreField\n# `DMSwarmGetField` returns the blocksize and fills a pointer to the underlying\n# data array. In Julia, pass a `Vector{Ptr{Cvoid}}(undef,1)` and a `Ref{PetscDataType}`\n# to receive the out parameters and then wrap the returned pointer with `unsafe_wrap`.\nptr_store = Vector{Ptr{Cvoid}}(undef, 1)\ntype_store = Ref{LibPETSc.PetscDataType}()\nblocksize = LibPETSc.DMSwarmGetField(petsclib, swarm, \"velocity\", type_store, pointer(ptr_store))\n# `ptr_store[1]` is a pointer to `PetscReal` (Float64 by default) array of length blocksize * nparticles\n@assert type_store[] == LibPETSc.PETSC_DOUBLE\ndata = unsafe_wrap(Array, Ptr{Float64}(ptr_store[1]), (blocksize * nparticles,))\n# Initialize velocity values\nfor i in 1:length(data)\n    data[i] = 0.1 * i\nend\n# Restore the field when done (unlocks internal storage)\nLibPETSc.DMSwarmRestoreField(petsclib, swarm, \"velocity\", type_store, pointer(ptr_store))\n\n# Cleanup\nLibPETSc.DMDestroy(petsclib, swarm)\nLibPETSc.DMDestroy(petsclib, da)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## DMSwarm Functions\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"DM_wrappers.jl\"]\nOrder   = [:function]\nFilter = t -> startswith(string(nameof(t)), \"DMSwarm\")\n```\n"
  },
  {
    "path": "docs/src/man/funding.md",
    "content": "# Funding\n\nThe most recent release of PETSc.jl was developed by Boris Kaus and Jeremy Kozdon, and Boris was funded by:\n\n- The GPU4GEO and dGPU4GEO projects of the Platform of Advanced Scientific Computing (PASC) in Switzerland, with Paul Tackley and Ludovic Räss as PIs and Kaus as co-PI.\n- European Research Council Consolidator Grant MAGMA (Melting and Geodynamic models of Ascent) #771149 awarded to Kaus.\n- A Gutenberg Research Council Fellowship by the Johannes Gutenberg University Mainz.\n- DFG project MOSAIC - A modular, parallel, 3D seismo-thermo-mechanical approach to simulate the feedback between geodynamic & seismic processes.\n- The project DEGREE by the German Ministry of Science, Technology and Space (BMFTR).\n\nFor more information on these projects, please visit the respective websites or contact the investigators.\n"
  },
  {
    "path": "docs/src/man/getting_started.md",
    "content": "# Getting started\n\n- [1. Solving a linear system of equations](#1-solving-a-linear-system-of-equations)\n- [2. Nonlinear example](#2-nonlinear-example)\n- [3. Next steps](#3-next-steps)\n\n### 1. Solving a linear system of equations\n\nLets consider the following elliptic equation:\n```math\n\\begin{aligned}\n{\\partial^2 T \\over \\partial x^2}  = 0, T(0) = 1, T(1) = 11\n\\end{aligned}\n```\n\n```julia\njulia> using PETSc\njulia> petsclib = PETSc.petsclibs[1]\njulia> PETSc.initialize(petsclib, log_view=false)\n```\nNote that if you initialize the PETSc library with the option `log_view=true` you will get a detailed overview of your simulation once you close the library with `PETSc.finalize(petsclib)` (note that it's set to `false` by default). \nNext, lets define the number of gridpoints and the spacing between them with:\n```julia\njulia> n   =  11\njulia> Δx  =  1. / (n - 1)\n```\n\nLet's first define the matrix with coefficients:\n```julia\njulia> nnz =  ones(Int64,n); nnz[2:n-1] .= 3;\njulia> A   =  PETSc.MatSeqAIJ(petsclib,n,n,nnz);\njulia> for i=2:n-1\n            A[i,i-1] =  1/Δx^2\n            A[i,i  ] = -2/Δx^2\n            A[i,i+1] =  1/Δx^2\n       end;\njulia> A[1,1]=1; A[n,n]=1;  # boundary conditions (Dirichlet)\njulia> PETSc.assemble!(A)   # Assemble the matrix\n```\nThis creates a sequential matrix (on one processor):\n```julia\njulia> A\nPETSc seqaij Mat of size (11, 11)\n```\nNow, lets define the right-hand-size vector `rhs` as a julia vector:\n```julia\njulia> rhs = zeros(n); rhs[1]=1; rhs[11]=11;\n```\n\nNext, we define the linear solver for the matrix `A`, which is done by setting a `KSP` solver: \n```julia\njulia> ksp = PETSc.KSP(A; ksp_rtol=1e-8, pc_type=\"jacobi\", ksp_monitor=true)\n```\nNote that you can specify all PETSc command-line options as keywords here.\n\nSolving the system of equations is simple:\n```julia\njulia> sol = ksp\\rhs\n  0 KSP Residual norm 1.104536101719e+01 \n  1 KSP Residual norm 4.939635614091e+00 \n  2 KSP Residual norm 2.410295378065e+00 \n  3 KSP Residual norm 1.462993806273e+00 \n  4 KSP Residual norm 1.004123728835e+00 \n  5 KSP Residual norm 7.700861485629e-01 \n  6 KSP Residual norm 6.165623662013e-01 \n  7 KSP Residual norm 4.972507567923e-01 \n  8 KSP Residual norm 4.074986825669e-01 \n  9 KSP Residual norm 3.398492183940e-01 \n 10 KSP Residual norm 3.283015493450e-15 \n11-element Vector{Float64}:\n  1.0\n  2.000000000000001\n  3.0000000000000013\n  4.000000000000001\n  5.000000000000002\n  6.0\n  7.0000000000000036\n  8.000000000000002\n  9.000000000000004\n 10.000000000000002\n 11.0\n```\nThis solves the system of equations with the default (iterative) solver of PETSc. You can find out what is being used by adding the `ksp_view=true` option to the `ksp` object:\n\n```julia\njulia> ksp = PETSc.KSP(A; ksp_rtol=1e-8, pc_type=\"jacobi\", ksp_monitor=true, ksp_view=true)\n```\nwhich will tell you:\n```julia\nKSP Object: 1 MPI process\n  type: gmres\n    restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement\n    happy breakdown tolerance 1e-30\n  maximum iterations=10000, initial guess is zero\n  tolerances: relative=1e-08, absolute=1e-50, divergence=10000.\n  left preconditioning\n  using PRECONDITIONED norm type for convergence test\nPC Object: 1 MPI process\n  type: jacobi\n    type DIAGONAL\n  linear system matrix = precond matrix:\n  Mat Object: 1 MPI process\n    type: seqaij\n    rows=11, cols=11\n    total: nonzeros=29, allocated nonzeros=29\n    total number of mallocs used during MatSetValues calls=0\n      not using I-node routines\n```      \nSo we are using a `gmres` solver with a `jacobi` preconditioner.\nThe power of PETSc is that you can change the solver on the fly.\nWe can solve the same system with a direct solver, using:\n```julia\njulia> ksp = PETSc.KSP(A; ksp_rtol=1e-8, pc_type=\"lu\", ksp_monitor=true, ksp_view=true, ksp_type=\"preonly\");\njulia> sol = ksp\\rhs;\n  0 KSP Residual norm 1.104536101719e+01\n  1 KSP Residual norm 2.846442092393e-13\nKSP Object: 1 MPI process\n  type: preonly\n  maximum iterations=10000, initial guess is zero\n  tolerances: relative=1e-05, absolute=1e-50, divergence=10000.\n  left preconditioning\n  using NONE norm type for convergence test\nPC Object: 1 MPI process\n  type: lu\n    out-of-place factorization\n    tolerance for zero pivot 2.22045e-14\n    matrix ordering: nd\n    factor fill ratio given 5., needed 1.31034\n      Factored matrix follows:\n        Mat Object: 1 MPI process\n          type: seqaij\n          rows=11, cols=11\n          package used to perform factorization: petsc\n          total: nonzeros=38, allocated nonzeros=38\n            not using I-node routines\n  linear system matrix = precond matrix:\n  Mat Object: 1 MPI process\n    type: seqaij\n    rows=11, cols=11\n    total: nonzeros=29, allocated nonzeros=29\n    total number of mallocs used during MatSetValues calls=0\n      not using I-node routines\n```\nwhich converges, as expected, in 1 iteration.\n\nAnd since we are using julia, plotting the solution can be done with\n```julia\njulia> using Plots\njulia> plot(0:Δx:1,sol, ylabel=\"solution\",xlabel=\"x\")\n```\n\n![linear_solution](../assets/img/linear_KSP_solution.png)\n\n\nNote that in general, one knows more about the equations than just the matrix entries. In this case, for example, we use a finite difference discretization to solve the equation. We could also have used a finite element code to do the same. \nThis is important information that helps PETSc to distribute the problem over several processors, or to setup multigrid preconditioners etc.\nPETSc uses the `DM` infrastructure for such cases. `DMDA` is for (collocated) finite differences, `DMStag` for staggered finite differences, `DMPlex` for finite element/finite volume discretisations and `DMForest` for adaptive mesh refinement problems.\nIf possible, use this infrastructure as it simplifies your life. Have a look at the [examples](https://github.com/JuliaParallel/PETSc.jl/tree/main/examples) or [tests](https://github.com/JuliaParallel/PETSc.jl/tree/main/test) of `PETSc.jl`.\n\n### 2. Nonlinear example\nLet's solve the coupled system of nonlinear equations: \n```math\n\\begin{aligned}\nx^2 + x y  &= 3 \\\\\nx y + y^2  &= 6\n\\end{aligned}\n```\nfor ``x`` and ``y``, which can be written in terms of a residual vector ``r``:\n```math\nr = \\binom{ x^2 + x y  - 3} {x y + y^2  - 6}\n```\n\nWe start by initializing PETSc:\n```julia\njulia> using PETSc, MPI\njulia> petsclib = PETSc.petsclibs[1]\njulia> PETSc.initialize(petsclib, log_view=false)\njulia> PetscScalar = petsclib.PetscScalar\njulia> PetscInt = petsclib.PetscInt\n```\nIn order to solve this, we need to provide a residual function that computes ``r``:\n```julia\njulia> function Residual!(rx, snes, x)\n            rx[1] = x[1]^2 + x[1] * x[2] - 3\n            rx[2] = x[1] * x[2] + x[2]^2 - 6\n            return PetscInt(0)  # petsc success\n        end\n```\n\nIn addition, we need to provide the Jacobian:\n```math\nJ = \n\\begin{pmatrix}\n\\frac{\\partial r_1}{ \\partial x} & \\frac{\\partial r_1}{ \\partial y}  \\\\\n\\frac{\\partial r_2}{ \\partial x} & \\frac{\\partial r_2}{ \\partial y}  \\\\\n\\end{pmatrix}\n= \n\\begin{pmatrix}\n2x + y & x  \\\\\ny & x + 2y  \\\\\n\\end{pmatrix}\n```\nIn Julia, this is:\n```julia\njulia> function updateJ!(J, snes, x)\n            J[1, 1] = 2x[1] + x[2]\n            J[1, 2] = x[1]\n            J[2, 1] = x[2]\n            J[2, 2] = x[1] + 2x[2]\n\n            PETSc.assemble!(J)\n            return PetscInt(0)\n        end\n```\nIn order to solve this using the PETSc nonlinear equation solvers, you first define the `SNES` solver together with the jacobian and residual functions as \n```julia\njulia> snes = PETSc.SNES(petsclib,MPI.COMM_SELF; ksp_rtol=1e-4, pc_type=\"none\")\njulia> r = PETSc.VecSeq(petsclib, zeros(PetscScalar, 2))\njulia> PETSc.setfunction!(snes, Residual!, r)\njulia> J = zeros(2,2)\njulia> PJ = PETSc.MatSeqDense(petsclib,J)\njulia> PETSc.setjacobian!(updateJ!, snes, PJ)\n```\n\nYou can solve this as:\n```julia\njulia> x = PETSc.VecSeq(petsclib, [2.0, 3.0])\njulia> b = PETSc.VecSeq(petsclib, [0.0, 0.0])\njulia> PETSc.solve!(x, snes, b)\njulia> x[:]\n2-element Vector{Float64}:\n 1.000000003259629\n 1.999999998137355\n```\nwhich indeed recovers the analytical solution ``(x=1, y=2)``.\n\nIf we are done, finalize it with:\n```julia\njulia> PETSc.finalize(petsclib)\n```\n\n\n### 3. Next steps \nNow that you have the basics, you can start playing with some more complete examples.\nHere some suggestions:\n1. [laplacian.jl](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/laplacian.jl) - simple (non-parallel) laplacian example using Julia sparse matrixes\n2. [dmda_laplacian.jl](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/dmda_laplacian.jl) - 2D laplacian example with Dirichlet boundary conditions using the `DMDA` framework. Examples are given on how to run it with various (multigrid) solvers.\n3. [ex50.jl](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/ex50.jl) - 2D parallel `DMDA` laplacian example with Neumann boundary conditions, which requires the nullspace to be removed.  \n4. [SNES_ex2.jl](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/SNES_ex2.jl) - 1D laplacian with nonlinear terms where the hand-derived jacobian is hardcoded\n5. [SNES_ex2b.jl](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/SNES_ex2b.jl) - as `SNES_ex2.jl` but using automatic differentiation to derive the jacobian.\n6. [Liouville_Bratu_Gelfand.jl](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/Liouville\\_Bratu\\_Gelfand.jl) - 1D/2D/3D poisson equation with nonlinear terms. Shows how to combine `DMDA` with `SNES` solvers and solve them in parallel, if you have a jacobian.\n7. [porosity_waves.jl](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/porosity_waves.jl) nD MPI-parallel example of 2 coupled nonlinear PDE's using the `DMDA` framework along with automatic differentiation to derive the jacobian.\n\nWorking through those examples should give you a fair idea of how to use PETSc. \n\nIf you have further questions, please have a look at the [test](https://github.com/JuliaParallel/PETSc.jl/tree/main/test) directory; this is run automatically every time we make a new commit, and we do our best to keep it working.\n\nFurthermore, the left menu gives additional instructions on how to use the low-level interface.\n"
  },
  {
    "path": "docs/src/man/hpc.md",
    "content": "# Running on HPC Systems\n\nPETSc.jl can be used on HPC clusters in two main configurations: using precompiled binaries via MPITrampoline, or by pointing to a locally installed PETSc build.\n\n## 1. Use precompiled binaries via MPITrampoline\n\nThe main reason that it is challenging to run applications on HPC systems is that MPI is implemented in a different way by different vendors. This will change in the future as there is now the MPI ABI (application Binary Interface) and our precompiled PETSc binaries are already compatible with that.\n\nYet, until all MPI implementations fully support this, we recommend using [MPITrampoline](https://github.com/eschnett/MPITrampoline) instead, which is a MPI wrapper layer that lets MPI-linked binaries be redirected to any system MPI at runtime. The `PETSc_jll` binaries distributed with PETSc.jl are built against MPITrampoline, which means they can be used on clusters by simply configuring `MPI.jl` to use the system MPI.\nDoing this requires you to compile a small code on the HPC system that is linked versus the local MPI implementation.\n\nHere step-by-step instructions (for Linux, as that is what essentially all HPC systems use):\n\n#### 1.1 Install MPIwrapper \n\n* Download [MPIwrapper](https://github.com/eschnett/MPIwrapper): \n```bash\ngit clone https://github.com/eschnett/MPIwrapper.git \ncd MPIwrapper\n```\n\n* Install it after making sure that `mpiexec` points to the one you want (you may have to load some modules, depending on your system):\n```bash\ncmake -S . -B build -DMPIEXEC_EXECUTABLE=/full/path/to/mpiexec -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/mpiwrapper\ncmake --build build\ncmake --install build\n```\n> [!IMPORTANT]  \n> You need to specify the full path to `mpiexec` (or equivalent, such as `srun` or `mpirun`, depending oin your system) and not just the name. If you don't know that, you can determine this with\n> `which mpiexec`\n \nAt this stage, `MPIwrapper` is installed in `$HOME/mpiwrapper`\n\n#### 1.2 Set the correct wrappers\nNext, you need to specify these environmental variables:\n```\nexport MPITRAMPOLINE_LIB=$HOME/mpiwrapper/lib64/libmpiwrapper.so\nexport MPITRAMPOLINE_MPIEXEC=$HOME/MPIwrapper/mpiwrapper/bin/mpiwrapperexec \n```\nDepending on the system it may be called `lib` instead of `lib64` (check!).\n\n\n#### 1.3 Install the `MPI` and `MPIPreferences` packages:\nInstall packages the usual way:\n```julia\njulia\njulia> ]\npkg>add MPI, MPIPreferences\n```\n\nSet the preference to use `MPItrampoline`:\n```julia\njulia> using MPIPreferences; MPIPreferences.use_jll_binary(\"MPItrampoline_jll\")\n┌ Info: MPIPreferences unchanged\n└   binary = \"MPItrampoline_jll\"\n```\n\nLoad `MPI` and verify it is the correct one:\n```julia\njulia> using MPI\njulia> MPI.Get_library_version()\n\"MPIwrapper 2.10.3, using MPIABI 2.9.0, wrapping:\\nOpen MPI v4.1.4, package: Open MPI boris@Pluton Distribution, ident: 4.1.4, repo rev: v4.1.4, May 26, 2022\"\n```\nAfter this, restart julia (this only needs to be done once, next time all is fine).\n\n#### 1.4 Test `MPI`:\n\nIf you want you can run a test case with:\n```julia\njulia> using MPI\njulia> mpiexec(cmd -> run(`$cmd -n 3 echo hello world`));\nhello world\nhello world\nhello world\n```\n\n#### 1.5 Install and use `PETSc.jl`:\nNow install `PETSc.jl`:\n```julia\njulia> using MPI,PETSc\n```\nAt this stage you can use PETSc.jl as normal — no changes to your script needed:\n```julia\nusing PETSc, MPI\npetsclib = PETSc.getlib(; PetscScalar = Float64, PetscInt = Int64)\nPETSc.initialize(petsclib)\n# ...\n```\n\n1. Launch via the cluster's MPI:\n```bash\nmpiexec -n 128 julia --project myScript.jl\n```\nThis is the easiest path for most clusters and requires no custom PETSc compilation.\n\n## 2. Use a locally installed PETSc build\n\nIf you need a PETSc build with specific options (external packages, GPU support, custom BLAS, etc.), you can point `PETSc.jl` directly to your local installation.\nThe local PETSc must be compiled as a **shared library** (`--with-shared-libraries=1`) and linked against the **same MPI** that `MPI.jl` is configured to use (i.e. the one that you should use on your HPC machine).\n\n#### 2.1 Link `PETSc` to the local library  \n\nUse `set_library!` to configure the path once — it is stored in `LocalPreferences.toml` and no environment variables are needed afterwards:\n\n```julia\nusing PETSc\nPETSc.set_library!(\n    \"/path/to/custom/libpetsc.so\";\n    PetscScalar = Float64,\n    PetscInt    = Int64,\n)\n# Restart Julia — PETSc_jll is not loaded and your library is used automatically.\n```\n\n#### 2.2 Link `MPI.jl` to the local mpi\nYou *must* use the same MPI implementation as the one versus which you compiled PETSc (otherwise you'll get heaps of problems).\n\nCheck with:\n```julia\njulia> using MPI\n\njulia> MPI.Get_library_version()\n```\n\n\n\n### 3. Typical HPC job script\n\nA typical slurm submissions script to run PETSc code using `MPITrampoline` binaries can look like:\n\n```bash\n#!/bin/bash\n#SBATCH --nodes=8\n#SBATCH --ntasks-per-node=128\n\n\nexport MPITRAMPOLINE_LIB=/users/kausbori/mpiwrapper/lib64/libmpiwrapper.so\nexport JULIA_CPU_TARGET=\"generic\"\n\nsrun julia --project ex45.jl \\\n  -N 257 \\\n  -ksp_type cg \\\n  -pc_type mg \\\n  -pc_mg_levels 5 \\\n  -mg_levels_ksp_type chebyshev \\\n  -mg_levels_pc_type sor \\\n  -ksp_rtol 1e-8 \\\n  -ksp_view \\\n  -pc_mg_log \\\n  -log_view\n```\n\n#### Precompile code on compute nodes\nOn some machines, it can be useful to precompile `PETSc.jl` on a single core rather than having many processors trying to do the same thing simultaneously.\n\nThis is an example on how this can be done by getting access on an interactive node using slurm. Note that julia was installed in the home directory using `juliaup`.\n```bash\nsalloc --nodes=1 --ntasks=1 --time=00:30:00 \\\n    --partition=standard --account=your_project_number\n\n# Once on the compute node:\nmodule --force purge\nmodule load CrayEnv\nmodule load craype\nmodule load gcc-native/13.2\nmodule load cray-mpich/8.1.32\n\nexport HOME=/users/kausbori\nexport JULIA_DEPOT_PATH=/users/kausbori/.julia\nexport MPITRAMPOLINE_LIB=/users/kausbori/mpiwrapper/lib64/libmpiwrapper.so\nexport JULIA_CPU_TARGET=\"generic\"\n\nJULIA=/users/kausbori/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/bin/julia\n\n# Clear stale cache\nrm -rf /users/kausbori/.julia/compiled/v1.12/PETSc/\nrm -rf /users/kausbori/.julia/compiled/v1.12/PETSc_jll/\nrm -rf /users/kausbori/.julia/compiled/v1.12/MPI/\n\n# Precompile\n$JULIA --project=/users/kausbori/PETSc_jl_scalability \\\n    -e 'using PETSc; println(\"OK\")'\n```\n\n---\n\n## Performance and Weak Scalability\n\nThis section summarises weak scalability results for a 3D Laplacian benchmark ([`ex45.jl`](https://github.com/JuliaParallel/PETSc.jl/blob/main/examples/ex45.jl)) using a CG solver with geometric multigrid preconditioning (`-pc_type mg`). The problem size is scaled proportionally with the number of MPI ranks so that the work per rank stays constant.\n\nWe have performed these simulations on LUMI-C (Finnland) and provide job submission scripts (`submit_scaling.sh`, `job.sh`), along with a parsing file that collects and summarizes the results (`parse_scaling.jl`). \nAll files are uploaded under [PETSc.jl/examples/scalability_tests](PETSc.jl/examples/scalability_tests), and can be started with\n```bash\n$ ./submit_scaling.sh 512 1025 1025 1025 6 16\n```\nwhich will start a $1025 \\times 1025 \\times 1015$ simulation on 512 cores, with 6 multigrid levels and the coarse grid solver being solved on 16 cores.\n\nWe consider 3 cases:\n- Using `PETSc.jl` with MPITrampoline linked to the local MPI (\"PETSc.jl\"). This is generally the easiest setup\n- Using `PETSc.jl` linked to our locally build PETSc version (\"local lib\")\n- Using a C-compiled version of `ex45_julia.c`  (\"native\")\n\n#### Results\nHere the collected results (all simulations, except the largest ones, where done 3 times; I only show the fastest ones here). \n\n| JobID | Ntasks | MG | NC | Grid | Backend | SolveTime (s) | KSPSolve (s) | TotGFlops | GFlops/s | KSP | L2 error | Max error | Residual | Converged |\n|-------|--------|----|----|------|---------|--------------|-------------|-----------|----------|-----|----------|-----------|----------|-----------|\n| 17684772 | 64 | 5 | 16 | 513³ | PETSc.jl | 50.800 | 27.108 | 335.60 | 6.00 | 9 | 4.4372e-06 | 1.2557e-05 | 3.5610e-05 | ✅ |\n| 17769825 | 64 | 5 | 16 | 513³ | local lib | 51.032 | 27.006 | 335.60 | 6.00 | 9 | 4.4372e-06 | 1.2557e-05 | 3.5610e-05 | ✅ |\n| 17767475 | 64 | 5 | 16 | 513³ | native | 38.770 | 26.917 | 337.90 | 8.50 | 9 | 4.4372e-06 | 1.2557e-05 | 3.5610e-05 | ✅ |\n| 17724458 | 512 | 6 | 16 | 1025³ | PETSc.jl | 61.715 | 32.482 | 2878.00 | 37.52 | 10 | 1.1093e-06 | 3.1236e-06 | 9.6257e-05 | ✅ |\n| 17769827 | 512 | 6 | 16 | 1025³ | local lib | 58.254 | 32.033 | 2878.00 | 40.54 | 10 | 1.1093e-06 | 3.1236e-06 | 9.6257e-05 | ✅ |\n| 17767644 | 512 | 6 | 16 | 1025³ | native | 42.700 | 30.122 | 2896.00 | 65.64 | 10 | 1.1093e-06 | 3.1236e-06 | 9.6257e-05 | ✅ |\n| 17768041 | 512 | 6 | 16 | 1025³ | native | 42.924 | 30.307 | 2896.00 | 65.34 | 10 | 1.1093e-06 | 3.1236e-06 | 9.6257e-05 | ✅ |\n| 17658195 | 4096 | 7 | 16 | 2049³ | PETSc.jl | 72.949 | 34.332 | 21390.00 | 258.00 | 9 | 2.7738e-07 | 7.8741e-07 | 1.9254e-04 | ✅ |\n| 17769830 | 4096 | 7 | 16 | 2049³ | local lib | 68.095 | 34.220 | 21390.00 | 270.00 | 9 | 2.7738e-07 | 7.8741e-07 | 1.9254e-04 | ✅ |\n| 17767610 | 4096 | 7 | 16 | 2049³ | native | 41.345 | 28.214 | 21540.00 | 506.10 | 9 | 2.7738e-07 | 7.8741e-07 | 1.9254e-04 | ✅ |\n| 17726872 | 32768 | 8 | 16 | 4097³ | PETSc.jl | 142.540 | 63.300 | 171000.00 | 746.60 | 9 | 6.9301e-08 | 1.9765e-07 | 6.6391e-04 | ✅ |\n| 17767541 | 32768 | 8 | 16 | 4097³ | native | 69.282 | 50.858 | 172200.00 | 2386.00 | 9 | 6.9301e-08 | 1.9765e-07 | 6.6391e-04 | ✅ |\n17769918  |  32768  |   8 |   16 |  4097³ | local lib |    135.402  |     73.108 |  171000.00   |   263.20 |    9 |   6.9301e-08  |  1.9765e-07 |   6.6391e-04 | ✅ |\n---\nIn this table `KSPSolve` indicates the time spend in the solver (taken from the log) and `SolveTime` the time for the full solution.\n\nBelow, we break this for each of the cases:\n\n#### a) PETSc.jl with precompiled `PETSc_jll` binaries\n\nthe results of using PETSc.jl with precompiled `jll` libraries are:\n\n| Ntasks | Grid | DOFs/core | KSPSolve (s) | SolveTime (s) | Efficiency | Converged |\n|--------|------|-----------|-------------|--------------|------------|-----------|\n| 64 | 513³ | 2,109,464 | 27.916 | 55.843 | 100.0% | ✅ |\n| 64 | 513³ | 2,109,464 | 27.108 | 50.800 | 103.0% | ✅ |\n| 64 | 513³ | 2,109,464 | 28.121 | 56.352 | 99.3% | ✅ |\n| 512 | 1025³ | 2,103,302 | 33.670 | 66.789 | 82.9% | ✅ |\n| 512 | 1025³ | 2,103,302 | 32.482 | 61.715 | 85.9% | ✅ |\n| 512 | 1025³ | 2,103,302 | 34.236 | 65.473 | 81.5% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 34.332 | 72.949 | 81.3% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 44.244 | 79.557 | 63.1% | ✅ |\n| 32768 | 4097³ | 2,098,688 | 63.300 | 142.540 | 44.1% | ✅ |\n\nPlease note that in the way we run this on LUMI-C, the 64 core case is on a single node and does not have inter-node communication. Despite this, weak scalability is pretty good (one could also argue to use the 512 core case as reference as this includes communication, in which case it would even be better).\nThere is some variability in the timing when repeating the same run (a few %).\n\n#### b) PETSc.jl linked against a local PETSc build (system MPI)\n\n| Ntasks | Grid | DOFs/core | KSPSolve (s) | SolveTime (s) | Efficiency | Converged |\n|--------|------|-----------|-------------|--------------|------------|-----------|\n| 64 | 513³ | 2,109,464 | 27.065 | 51.123 | 100.0% | ✅ |\n| 64 | 513³ | 2,109,464 | 27.006 | 51.032 | 100.2% | ✅ |\n| 64 | 513³ | 2,109,464 | 27.551 | 56.452 | 98.2% | ✅ |\n| 512 | 1025³ | 2,103,302 | 34.456 | 61.041 | 78.5% | ✅ |\n| 512 | 1025³ | 2,103,302 | 32.033 | 58.254 | 84.5% | ✅ |\n| 512 | 1025³ | 2,103,302 | 30.708 | 61.971 | 88.1% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 38.414 | 69.384 | 70.5% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 35.292 | 68.905 | 76.7% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 34.220 | 68.095 | 79.1% | ✅ |\n| 32768 | 4097³ | 2,098,688 | 73.108  | 135.402  | 37.0% | ✅ |\n\n\n#### c) Native C build (`ex45_julia.c`)\n\nThe equivalent PETSc C example compiled natively, serving as the baseline.\n\n\n| Ntasks | Grid | DOFs/core | KSPSolve (s) | SolveTime (s) | Efficiency | Converged |\n|--------|------|-----------|-------------|--------------|------------|-----------|\n| 64 | 513³ | 2,109,464 | 26.917 | 38.770 | 100.0% | ✅ |\n| 64 | 513³ | 2,109,464 | 27.155 | 39.011 | 99.1% | ✅ |\n| 64 | 513³ | 2,109,464 | 26.854 | 39.065 | 100.2% | ✅ |\n| 512 | 1025³ | 2,103,302 | 31.492 | 44.062 | 85.5% | ✅ |\n| 512 | 1025³ | 2,103,302 | 30.122 | 42.700 | 89.4% | ✅ |\n| 512 | 1025³ | 2,103,302 | 30.607 | 43.331 | 87.9% | ✅ |\n| 512 | 1025³ | 2,103,302 | 30.307 | 42.924 | 88.8% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 30.694 | 46.659 | 87.7% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 28.214 | 41.345 | 95.4% | ✅ |\n| 4096 | 2049³ | 2,100,226 | 28.498 | 42.759 | 94.5% | ✅ |\n| 32768 | 4097³ | 2,098,688 | 50.858 | 69.282 | 52.9% | ✅ |\n\n\n#### d) Backend Comparison \n\nIf we compare the case on 4096 cores with a 2049³ grid, for 3D Poisson, 64 nodes × 64 tasks/node, MG levels = 7, coarse ranks = 16 we get:\n\n| Metric | native C | PETSc.jl (`_jll`) | local lib |\n|--------|----------|-------------------|-----------|\n| **Runs** | 3 | 2 | 3 |\n| **SolveTime mean (s)** | 43.6 | 76.3 | 68.8 |\n| **SolveTime range (s)** | 41.3–46.7 | 72.9–79.6 | 68.1–69.4 |\n| **KSPSolve mean (s)** | 29.1 | 39.3 | 35.9 |\n| **KSPSolve range (s)** | 28.2–30.7 | 34.3–44.2 | 34.2–38.4 |\n| **KSP iterations** | 9 | 9 | 9 |\n| **L2 error** | 2.7738e-07 | 2.7738e-07 | 2.7738e-07 |\n| **Converged** | ✅ | ✅ | ✅ |\n\nThe relative performance is thus:\n\n| Backend | SolveTime overhead | KSPSolve overhead |\n|---------|--------------------|-------------------|\n| native C | — (reference) | — (reference) |\n| PETSc.jl (best run) | +21.5% | +1.6% |\n| PETSc.jl (worst run) | +32.5% | +30.9% |\n| local lib | +56.9% | +50.8% |\n\nFrom this we can conclude:\n- **Numerical results are identical** across all backends — same iterations, same L2/Max error.\n- **KSPSolve gap vs native** is ~6s for local lib and ~10s for `_jll` — much of this is MG setup overhead inside the solver\n- **SolveTime gap vs native** (~25s for local lib, ~32s for `_jll`) includes Julia setup: mesh construction, matrix assembly, MG hierarchy setup\n- **local lib** is faster than `_jll` at 4096 tasks (35.9s vs 39.3s mean KSPSolve) — likely because it uses the system Cray libsci BLAS directly without MPItrampoline overhead.\n- There is a (significant) drop in performance for high core counts. this is likely related to the multigrid setup and coarse grid solvers and not to PETSc.jl as we see a similar behavior for the native compilation as well.\n\nOverall it shows that there is overhead in using the Julia interface to `PETSc.jl` compared to native C-code. \nOn the other hand, this is done in a higher level language and can thus seemlessly integrate with the full Julia ecosystem. It should also be kept in mind that the residual routines etc. are all written in julia. \n\nAs a start one can configure `PETSc.jl` to use MPITrampoline, which doesn't require any PETSc installation and should thus work on any machine. For the last bit of performance one can configure a native PETSc installation and use that instead.\n\n#### Weak scalability plot\nResults can be summarized in the plot below:\n![weak_scalability_LUMI](../assets/img/weak_scaling_ex45_LUMI.png)"
  },
  {
    "path": "docs/src/man/installation.md",
    "content": "# Installation\n\n## Using pre-built libraries\n\nThe easiest way to install the package is:\n```julia\njulia> ]\n(@v1.12) pkg> add PETSc\n```\nwhich will install a pre-built PETSc library (`PETSc_jll`) as well as `MPI.jl` on your system. This will work both in serial and in parallel on your machine.\n\n!!! warning \"Windows Users\"\n    The prebuild binaries currently do not work on Windows as we had to build `PETSc_jll` without MPI due to compatibility issues with `MicrosoftMPI_jll`.\n\n    **Windows users are therefore advised to install the [Windows Subsystem for Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) (WSL) and run PETSc.jl from within WSL.** This will provide full functionality with both serial and parallel (MPI) support.\n\n## Using a custom PETSc build\n\nSometimes, you may be interested in a PETSc installation that comes with additional external packages, or that you compiled yourself. Ensure the library is compiled as a **dynamic** (not static) library.\n\nUse `set_library!` to configure the path once — it is stored in `LocalPreferences.toml` and no environment variables are needed afterwards:\n\n```julia\nusing PETSc\nPETSc.set_library!(\n    \"/path/to/custom/libpetsc.so\";\n    PetscScalar = Float64,\n    PetscInt    = Int64,\n)\n# Restart Julia — PETSc_jll is not loaded and your library is used automatically.\n```\n\nTo revert to the bundled binaries: `PETSc.unset_library!()`.\n\nTo check what is currently configured: `PETSc.library_info()`.\n\nFor a one-off session without changing persistent settings, use `set_petsclib` directly:\n\n```julia\npetsclib = PETSc.set_petsclib(\"/path/to/custom/libpetsc.so\";\n                              PetscScalar=Float64, PetscInt=Int64)\nPETSc.initialize(petsclib, log_view=true)\n# ... your code ...\nPETSc.finalize(petsclib)\n```\n\n## HPC systems\n\nOn many high-performance clusters, you will need to use the cluster's MPI installation. There are a number of options to do so - see the [Running on HPC Systems](hpc.md) page for details.\n"
  },
  {
    "path": "docs/src/man/is_lowlevel.md",
    "content": "# IS (Index Sets) - Low-level Interface\n\nThe IS (Index Set) component provides data structures and operations for managing sets of indices, which are fundamental for parallel data distribution, matrix/vector assembly, and mapping between different numbering schemes.\n\n## Overview\n\nIndex sets are used throughout PETSc for:\n- **Parallel data distribution**: Specifying which indices are owned by each processor\n- **Submatrix/subvector extraction**: Selecting specific rows/columns\n- **Scatter/gather operations**: Defining communication patterns\n- **Field splitting**: Identifying DOFs belonging to different fields\n- **Reordering**: Specifying permutations for bandwidth reduction\n\nPETSc provides several IS types:\n- **General IS**: Arbitrary list of indices\n- **Stride IS**: Regularly spaced indices (start, step, length)\n- **Block IS**: Block-structured indices\n- **Complement IS**: All indices except specified ones\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Get PETSc types\nPetscInt = petsclib.PetscInt\n\n# Create an index set from an array of indices (0-based)\n# Note: indices should be PetscInt type (typically Int64 or Int32 depending on PETSc configuration)\nindices = PetscInt[0, 2, 4, 6, 8]\nis = LibPETSc.ISCreateGeneral(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(length(indices)), indices, LibPETSc.PETSC_COPY_VALUES)\n\n# Create a stride index set: indices = first:step:(first + step*(n-1))\nis_stride = LibPETSc.ISCreateStride(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(10), PetscInt(0), PetscInt(2))  # 0, 2, 4, ..., 18\n\n# Get the size of an index set (returns value directly)\nn = LibPETSc.ISGetSize(petsclib, is)\n\n# Get local size (returns value directly)\nlocal_n = LibPETSc.ISGetLocalSize(petsclib, is)\n\n# Get indices as an array\nindices = LibPETSc.ISGetIndices(petsclib, is)\n# ... use indices ...\nLibPETSc.ISRestoreIndices(petsclib, is, indices)\n\n# Cleanup\nLibPETSc.ISDestroy(petsclib, is)\nLibPETSc.ISDestroy(petsclib, is_stride)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Common Operations\n\n### Creating Index Sets\n\n```julia\n# General index set from array\nLibPETSc.ISCreateGeneral(petsclib, comm, n, indices, copymode, is)\n\n# Stride index set: first, first+step, first+2*step, ...\nLibPETSc.ISCreateStride(petsclib, comm, n, first, step, is)\n\n# Block index set: block-structured indices\nLibPETSc.ISCreateBlock(petsclib, comm, blocksize, n, indices, copymode, is)\n```\n\n### Set Operations\n\n```julia\n# Union of two index sets\nLibPETSc.ISSum(petsclib, is1, is2, is_union)\n\n# Difference: is1 - is2\nLibPETSc.ISDifference(petsclib, is1, is2, is_diff)\n\n# Intersection\nLibPETSc.ISIntersect(petsclib, is1, is2, is_intersect)\n\n# Complement: all indices in [0, n) not in is\nLibPETSc.ISComplement(petsclib, is, nmin, nmax, is_complement)\n```\n\n### Querying Properties\n\n```julia\n# Check if index set is sorted\nis_sorted = Ref{PetscBool}()\nLibPETSc.ISSorted(petsclib, is, is_sorted)\n\n# Check if identity permutation\nis_identity = Ref{PetscBool}()\nLibPETSc.ISIdentity(petsclib, is, is_identity)\n\n# Check if a permutation\nis_perm = Ref{PetscBool}()\nLibPETSc.ISPermutation(petsclib, is, is_perm)\n```\n\n## Index Set Types\n\nAvailable through `ISSetType`:\n- **ISGENERAL**: General list of indices\n- **ISSTRIDE**: Arithmetic sequence\n- **ISBLOCK**: Block-structured indices\n\n## Scatter Context\n\nIndex sets are used to create scatter contexts for moving data between vectors:\n\n```julia\n# Create scatter context\nscatter = Ref{LibPETSc.VecScatter}()\nLibPETSc.VecScatterCreate(petsclib, vec_from, is_from, vec_to, is_to, scatter)\n\n# Perform scatter operation\nLibPETSc.VecScatterBegin(petsclib, scatter[], vec_from, vec_to, INSERT_VALUES, SCATTER_FORWARD)\nLibPETSc.VecScatterEnd(petsclib, scatter[], vec_from, vec_to, INSERT_VALUES, SCATTER_FORWARD)\n```\n\n## Parallel Considerations\n\n- Index sets use global indexing by default\n- Each processor owns a portion of the index set\n- Use `ISGetLocalSize` to get the local portion\n- Scatter operations handle parallel communication automatically\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/IS_wrappers.jl\"]\nOrder   = [:function]\n```\n\n## IS Add-ons\n\nAdditional IS utilities and helper functions:\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/ISaddons_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/ksp.md",
    "content": "# KSP\n\nThe KSP (Krylov Subspace Methods) module provides iterative linear solvers for systems of the form `Ax = b`. PETSc offers a wide variety of Krylov methods and preconditioners.\n\n## Overview\n\nKSP provides:\n- **Krylov methods**: GMRES, CG, BiCGStab, and many more\n- **Preconditioners**: Jacobi, ILU, multigrid, direct solvers, etc.\n- **Runtime configuration**: Choose methods via command-line options\n- **Convergence monitoring**: Built-in residual tracking\n\n## Creating a KSP Solver\n\n### From a Matrix\n\n```julia\n# Basic creation with default options\nksp = KSP(A)\n\n# With preconditioner matrix P (for different preconditioning)\nksp = KSP(A, P)\n\n# With options\nksp = KSP(A; \n    ksp_type = \"gmres\",\n    pc_type = \"ilu\",\n    ksp_rtol = 1e-8\n)\n```\n\n### From a DM\n\n```julia\n# Create KSP associated with a DM (for multigrid, etc.)\nksp = KSP(dm; \n    ksp_type = \"cg\",\n    pc_type = \"mg\"\n)\n```\n\n### From a Sparse Matrix\n\n```julia\n# Directly from Julia SparseMatrixCSC\nusing SparseArrays\nS = sprand(100, 100, 0.1) + 10I\nksp = KSP(petsclib, MPI.COMM_SELF, S)\n```\n\n## Solving\n\n```julia\n# Solve Ax = b\nsolve!(x, ksp, b)\n\n# Or allocate solution vector\nx = solve(ksp, b)\n```\n\n## Common Solver/Preconditioner Options\n\n### Krylov Methods (`ksp_type`)\n- `cg` - Conjugate Gradient (symmetric positive definite)\n- `gmres` - Generalized Minimum Residual\n- `bicgstab` - BiConjugate Gradient Stabilized\n- `richardson` - Richardson iteration\n- `preonly` - Apply preconditioner only (for direct solvers)\n\n### Preconditioners (`pc_type`)\n- `jacobi` - Diagonal scaling\n- `ilu` - Incomplete LU factorization\n- `lu` - Direct LU factorization\n- `mg` - Geometric multigrid\n- `gamg` - Algebraic multigrid\n- `none` - No preconditioning\n\n### Convergence Options\n- `ksp_rtol` - Relative tolerance (default: 1e-5)\n- `ksp_atol` - Absolute tolerance\n- `ksp_max_it` - Maximum iterations\n- `ksp_monitor` - Print residual each iteration\n\n## Example: Multigrid Solver\n\n```julia\nksp = KSP(dm;\n    ksp_type = \"cg\",\n    pc_type = \"mg\",\n    pc_mg_levels = 4,\n    pc_mg_galerkin = true,\n    mg_levels_ksp_type = \"richardson\",\n    mg_levels_pc_type = \"jacobi\",\n    mg_coarse_pc_type = \"lu\"\n)\n```\n\n## Functions\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"ksp.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/ksp_lowlevel.md",
    "content": "# KSP - Low-level Interface\n\nThis page documents the low-level, automatically wrapped PETSc KSP (Krylov Subspace Methods) functions available through `LibPETSc`. These functions provide direct access to the PETSc C API.\n\nFor the high-level Julia interface, see [KSP](@ref).\n\n## Overview\n\nThe KSP interface includes:\n- **Core KSP operations**: Linear solver creation, configuration, and solution (~244 functions in `KSP_wrappers.jl`)\n- **KSPGuess**: Initial guess generation for iterative solvers (~12 functions in `KSPGuess_wrappers.jl`)\n\n## Usage\n\nAll low-level KSP functions require a `petsclib` parameter as the first argument:\n\n```julia\nusing PETSc\n\n# Get the library instance\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\n# Get PETSc types\nPetscInt = petsclib.PetscInt\n\n# Assume mat, b, x are already created\n\n# Create KSP solver\nksp = LibPETSc.KSPCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.KSPSetOperators(petsclib, ksp, mat, mat)\nLibPETSc.KSPSetFromOptions(petsclib, ksp)\n\n# Solve Ax = b\nLibPETSc.KSPSolve(petsclib, ksp, b, x)\n\n# Get convergence info\nreason = LibPETSc.KSPGetConvergedReason(petsclib, ksp)\n\niterations = LibPETSc.KSPGetIterationNumber(petsclib, ksp)\n\n# Clean up\nLibPETSc.KSPDestroy(petsclib, ksp)\nPETSc.finalize(petsclib)\n```\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/KSP_wrappers.jl\", \"autowrapped/KSPGuess_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/lowlevel_intro.md",
    "content": "# Low-Level Interface (LibPETSc)\n\nPETSc.jl provides two ways to interact with the PETSc library:\n\n1. **High-level interface**: Julia-friendly wrappers that handle memory management, use 1-based indexing, and provide convenient syntax (e.g., `A[1,2] = 3.0`)\n2. **Low-level interface** (`LibPETSc`): Direct access to nearly the entire PETSc C API (~13,000+ functions)\n\nThis guide focuses on the low-level interface.\n\n## When to Use the Low-Level Interface\n\nUse the low-level `LibPETSc` interface when:\n\n- You need PETSc functionality not yet wrapped in the high-level interface\n- You're porting existing PETSc C/Fortran code to Julia\n- You need fine-grained control over PETSc objects\n- You want to access advanced or experimental PETSc features\n- Performance-critical code requires eliminating Julia wrapper overhead\n\nFor most common tasks (creating vectors/matrices, solving linear systems), the high-level interface is recommended.\n\n## Basic Usage Pattern\n\nThe low-level interface follows the PETSc C API closely. All functions require a `petsclib` parameter as the first argument:\n\n```julia\nusing PETSc\n\n# Get a library instance (usually you'll use the first one)\npetsclib = PETSc.petsclibs[1]\n\n# Initialize PETSc\nPETSc.initialize(petsclib)\n\n# Create and use PETSc objects\nvec = LibPETSc.VecCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.VecSetSizes(petsclib, vec, 10, 10)\nLibPETSc.VecSetType(petsclib, vec, \"seq\")  # Set vector type\nLibPETSc.VecSetFromOptions(petsclib, vec)\n\n# Work with the vector\nLibPETSc.VecSet(petsclib, vec, 1.0)\nprintln(\"Vector size: \", LibPETSc.VecGetSize(petsclib, vec))\n\n# Clean up\nLibPETSc.VecDestroy(petsclib, vec)\nPETSc.finalize(petsclib)\n```\n\n## Key Concepts\n\n### 1. The `petsclib` Parameter\n\nEvery low-level function requires a `petsclib` instance. This specifies which PETSc library variant to use (e.g., Float64 vs Float32, Int32 vs Int64):\n\n```julia\n# Default libraries available (uses prebuilt PETSc binaries)\npetsclib = PETSc.petsclibs[1]  # Usually Float64, Int64\n\n# Access the scalar and integer types\nPetscScalar = petsclib.PetscScalar  # The floating-point type (e.g., Float64)\nPetscInt = petsclib.PetscInt        # The integer type (e.g., Int64)\nPetscReal = petsclib.PetscReal      # The real type (real part of PetscScalar)\n```\n\n#### Using a Custom PETSc Build\n\nYou can link to your own custom build of PETSc instead of using the prebuilt binaries. This is useful when you need:\n- Specific configure options not available in the default build\n- Custom optimizations for your hardware\n- Debug builds for troubleshooting\n- Integration with specific external packages\n\nTo persistently configure a custom PETSc installation (recommended):\n\n```julia\nusing PETSc\nPETSc.set_library!(\"/path/to/your/libpetsc.so\"; PetscScalar=Float64, PetscInt=Int64)\n# Restart Julia — PETSc_jll is not loaded and your library is used automatically.\n```\n\nTo revert: `PETSc.unset_library!()`. To inspect the current config: `PETSc.library_info()`.\n\nFor a one-off session without changing persistent settings:\n\n```julia\npetsclib = PETSc.set_petsclib(\"/path/to/your/libpetsc.so\";\n                              PetscScalar=Float64, PetscInt=Int64)\nPETSc.initialize(petsclib)\n# ... your code using petsclib ...\nPETSc.finalize(petsclib)\n```\n\n**Important notes for custom builds:**\n- The library must be compiled as a dynamic/shared library (`libpetsc.so` / `.dylib`)\n- `PetscScalar` and `PetscInt` must match how your PETSc was configured\n- Your PETSc must be linked against the same MPI that `MPI.jl` uses\n- You can check available precompiled libraries with `[PETSc.petsclibs...]`\n\n### 2. Zero-Based Indexing\n\n**Important**: The low-level interface uses 0-based indexing (C convention), while Julia uses 1-based indexing:\n\n```julia\n# Low-level (0-based)\nindices = PetscInt[0, 1, 2]  # First three elements\nLibPETSc.VecSetValues(petsclib, vec, 3, indices, values, INSERT_VALUES)\n\n# High-level (1-based)\nvec[1] = value  # First element\n```\n\n### 3. Error Handling\n\nLow-level functions return `PetscErrorCode`. Use the `@chk` macro to check for errors:\n\n```julia\nusing PETSc.LibPETSc: @chk\n\nerr = LibPETSc.VecCreate(petsclib, MPI.COMM_SELF)\n@chk err  # Throws an error if PETSc returned non-zero\n```\n\n### 4. String Convenience Wrappers\n\nMany PETSc `SetType` functions accept C string pointers. For convenience, PETSc.jl provides Julia `String` overloads:\n\n```julia\n# String convenience wrapper (recommended)\nLibPETSc.MatSetType(petsclib, mat, \"seqaij\")\nLibPETSc.VecSetType(petsclib, vec, \"seq\")\nLibPETSc.KSPSetType(petsclib, ksp, \"gmres\")\nLibPETSc.SNESSetType(petsclib, snes, \"newtonls\")\nLibPETSc.PCSetType(petsclib, pc[], \"ilu\")\nLibPETSc.TSSetType(petsclib, ts, \"bdf\")\nLibPETSc.TaoSetType(petsclib, tao, \"lmvm\")\nLibPETSc.DMSetType(petsclib, dm, \"da\")\nLibPETSc.PetscViewerSetType(petsclib, viewer, \"ascii\")\n\n# Equivalent low-level C pointer syntax (not recommended unless necessary)\nptr = Base.unsafe_convert(Ptr{Int8}, pointer(Vector{UInt8}(\"seqaij\\0\")))\nLibPETSc.MatSetType(petsclib, mat, ptr)\n```\n\nThe string wrappers handle the C string conversion internally, making the code cleaner and more Julia-friendly.\n\nMost wrapper functions already include error checking, but when calling C functions directly, use `@chk`.\n\n### 4. Memory Management\n\nPETSc objects created with `Create` functions must be destroyed with corresponding `Destroy` functions:\n\n```julia\n# Create\nmat = LibPETSc.MatCreate(petsclib, MPI.COMM_WORLD)\nLibPETSc.MatSetSizes(petsclib, mat, m_local, n_local, m_global, n_global)\n\n# ... use mat ...\n\n# Destroy when done\nLibPETSc.MatDestroy(petsclib, mat)\n```\n\nFor serial (single-process) objects, the high-level interface handles this automatically via finalizers.\n\n### 5. Assembly\n\nAfter setting values in vectors or matrices, you must call assembly functions:\n\n```julia\n# Set values\nLibPETSc.VecSetValues(petsclib, vec, n, indices, values, INSERT_VALUES)\n\n# Assemble\nLibPETSc.VecAssemblyBegin(petsclib, vec)\nLibPETSc.VecAssemblyEnd(petsclib, vec)\n```\n\n## Common Patterns\n\n### Creating and Filling a Vector\n\n```julia\npetsclib = PETSc.petsclibs[1]\nPetscInt = petsclib.PetscInt\nPetscScalar = petsclib.PetscScalar\n\n# Create vector\nvec = LibPETSc.VecCreate(petsclib, MPI.COMM_SELF)\nLibPETSc.VecSetSizes(petsclib, vec, 10, 10)\nLibPETSc.VecSetType(petsclib, vec, \"seq\")  # Set vector type\nLibPETSc.VecSetFromOptions(petsclib, vec)\n\n# Set values (0-based indices!)\nindices = PetscInt[0, 1, 2, 3, 4]\nvalues = PetscScalar[1.0, 2.0, 3.0, 4.0, 5.0]\nLibPETSc.VecSetValues(petsclib, vec, 5, indices, values, INSERT_VALUES)\n\n# Assemble\nLibPETSc.VecAssemblyBegin(petsclib, vec)\nLibPETSc.VecAssemblyEnd(petsclib, vec)\n\n# View (print to stdout)\nLibPETSc.VecView(petsclib, vec, C_NULL)\n\n# Clean up\nLibPETSc.VecDestroy(petsclib, vec)\n```\n\n### Creating a Sparse Matrix\n\n```julia\n# Create matrix\nmat = LibPETSc.MatCreate(petsclib, MPI.COMM_SELF)\nLibPETSc.MatSetSizes(petsclib, mat, 5, 5, 5, 5)\nLibPETSc.MatSetType(petsclib, mat, \"seqaij\")  # String convenience wrapper\nLibPETSc.MatSetUp(petsclib, mat)\n\n# Set values (0-based indexing!)\nrow = PetscInt[0]\ncols = PetscInt[0, 1]\nvals = PetscScalar[2.0, -1.0]\nLibPETSc.MatSetValues(petsclib, mat, 1, row, 2, cols, vals, INSERT_VALUES)\n\n# Assemble\nLibPETSc.MatAssemblyBegin(petsclib, mat, LibPETSc.MAT_FINAL_ASSEMBLY)\nLibPETSc.MatAssemblyEnd(petsclib, mat, LibPETSc.MAT_FINAL_ASSEMBLY)\n\n# View\nLibPETSc.MatView(petsclib, mat, C_NULL)\n\n# Clean up\nLibPETSc.MatDestroy(petsclib, mat)\n```\n\n### Solving a Linear System\n\n```julia\n# Create KSP solver\nksp = LibPETSc.KSPCreate(petsclib, MPI.COMM_SELF)\nLibPETSc.KSPSetOperators(petsclib, ksp, mat, mat)\nLibPETSc.KSPSetFromOptions(petsclib, ksp)\n\n# Solve Ax = b\nLibPETSc.KSPSolve(petsclib, ksp, b, x)\n\n# Get convergence info\nreason = LibPETSc.KSPGetConvergedReason(petsclib, ksp)\n\niterations = LibPETSc.KSPGetIterationNumber(petsclib, ksp)\n\nprintln(\"Converged in $(iterations) iterations, reason: $(reason)\")\n\n# Clean up\nLibPETSc.KSPDestroy(petsclib, ksp)\n```\n\n## Mixing High-Level and Low-Level Interfaces\n\nYou can mix both interfaces. High-level objects provide `.ptr` field to access the underlying C pointer:\n\n```julia\n# Create with high-level interface\nvec_high = VecSeq(petsclib, 10)\n\n# Use with low-level interface\nLibPETSc.VecSet(petsclib, vec_high.ptr, 5.0)\n\n# Or use the object directly (if it's a compatible type)\nLibPETSc.VecView(petsclib, vec_high, C_NULL)\n```\n\n## Finding Functions\n\nThe low-level interface provides wrappers for most PETSc functions. To find a function:\n\n1. **Check the PETSc manual**: https://petsc.org/release/docs/\n2. **Use Julia's help system**: Type `?LibPETSc.FunctionName`\n3. **Browse the documentation**: See the reference pages for each PETSc class (Vec, Mat, KSP, etc.)\n4. **Autocomplete**: In the REPL, type `LibPETSc.Vec` and press Tab to see all Vec functions\n\n## Type Conventions\n\nLow-level functions use these type patterns:\n\n```julia\n# PETSc objects (opaque pointers)\nCVec = Ptr{Cvoid}        # Vector\nCMat = Ptr{Cvoid}        # Matrix\nCDM = Ptr{Cvoid}         # DM (domain management)\nCKSP = Ptr{Cvoid}        # KSP (linear solver)\nCSNES = Ptr{Cvoid}       # SNES (nonlinear solver)\n\n# PETSc data types (depend on petsclib)\nPetscInt                 # Integer type (Int32 or Int64)\nPetscScalar              # Scalar type (Float64, Float32, ComplexF64, etc.)\nPetscReal                # Real type (real part of PetscScalar)\n```\n\n## Reference Pages\n\nDetailed documentation for low-level functions by category:\n\n- [Vec (Vectors)](@ref vec_lowlevel.md) - ~293 functions for vector operations\n- [Mat (Matrices)](@ref mat_lowlevel.md) - ~756 functions for matrix operations\n- [KSP (Linear Solvers)](@ref ksp_lowlevel.md) - ~256 functions for iterative linear solvers\n- [SNES (Nonlinear Solvers)](@ref snes_lowlevel.md) - ~333 functions for nonlinear solvers\n\n## Getting Help\n\nIf you encounter issues:\n\n1. Check the [PETSc documentation](https://petsc.org/release/docs/)\n2. Review the [examples](https://github.com/JuliaParallel/PETSc.jl/tree/main/examples)\n3. Ask questions on [Julia Discourse](https://discourse.julialang.org/) with the `petsc` tag\n4. Open an issue on [GitHub](https://github.com/JuliaParallel/PETSc.jl/issues)\n"
  },
  {
    "path": "docs/src/man/mat.md",
    "content": "# Mat\n\nPETSc matrices (`Mat`) provide sparse and dense matrix storage with efficient parallel operations. They are essential for discretizing PDEs and setting up linear/nonlinear systems.\n\n## Overview\n\nPETSc matrices support:\n- **Sparse formats**: AIJ (CSR), BAIJ (block CSR), and more\n- **Dense format**: For small matrices or dense operations\n- **Parallel distribution**: Row-based distribution across MPI processes\n- **Matrix-free operations**: Via MatShell for custom operators\n\n## Creating Matrices\n\n### Sparse Matrices (AIJ/CSR Format)\n\n```julia\n# Create sparse matrix with estimated non-zeros per row\nA = MatSeqAIJ(petsclib, num_rows, num_cols, nnz_per_row)\n\n# From Julia SparseMatrixCSC\nusing SparseArrays\nS = sprand(100, 100, 0.1)\nA = MatCreateSeqAIJ(petsclib, MPI.COMM_SELF, S)\n\n# With varying non-zeros per row\nnnz = PetscInt[5, 3, 4, ...]  # One value per row\nA = MatSeqAIJ(petsclib, num_rows, num_cols, nnz)\n```\n\n### Dense Matrices\n\n```julia\n# Wrap a Julia matrix (no copy)\njulia_mat = rand(10, 10)\nA = MatSeqDense(petsclib, julia_mat)\n```\n\n### From DM Objects\n\n```julia\n# Create matrix with sparsity pattern from DM\nA = DMCreateMatrix(dm)\n```\n\n### Matrix Shell (Matrix-Free)\n\n```julia\n# Create a shell matrix with custom mult operation\nA = MatShell(petsclib, m, n, mult_function, context)\n```\n\n## Setting Values\n\n```julia\n# Set individual element (0-based internally, 1-based in Julia)\nA[i, j] = value\n\n# Use setvalues! for efficient batch insertion\nsetvalues!(A, rows, cols, values, INSERT_VALUES)\n\n# For stencil-based assembly\nsetvalues!(A, stencil_row, stencil_col, value, INSERT_VALUES)\n```\n\n## Assembly\n\nMatrices must be assembled after setting values:\n\n```julia\n# Set all values first\nA[1, 1] = 2.0\nA[1, 2] = -1.0\n# ...\n\n# Then assemble\nassemble!(A)\n```\n\n## Common Operations\n\n```julia\nsize(A)              # Get (rows, cols)\nownershiprange(A)    # Get rows owned by this process\nsetup!(A)            # Complete matrix setup\n```\n\n## Functions\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"mat.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/mat_lowlevel.md",
    "content": "# Mat - Low-level Interface\n\nThis page documents the low-level, automatically wrapped PETSc Mat (matrix) functions available through `LibPETSc`. These functions provide direct access to the PETSc C API.\n\nFor the high-level Julia interface, see [Mat](@ref).\n\n## Overview\n\nThe Mat interface includes:\n- **Core Mat operations**: Creation, manipulation, and mathematical operations on matrices (~632 functions in `Mat_wrappers.jl`)\n- **Mat utilities**: Additional matrix operations and conversions (~124 functions in `Mataddons_wrappers.jl`)\n\n## Usage\n\nAll low-level Mat functions require a `petsclib` parameter as the first argument:\n\n```julia\nusing PETSc\n\n# Get the library instance\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\n# Get PETSc types\nPetscInt = petsclib.PetscInt\nPetscScalar = petsclib.PetscScalar\n\n# Create a sparse matrix\nmat = LibPETSc.MatCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.MatSetSizes(petsclib, mat, PetscInt(10), PetscInt(10), PetscInt(10), PetscInt(10))\nLibPETSc.MatSetType(petsclib, mat, \"seqaij\")\nLibPETSc.MatSetUp(petsclib, mat)\n\n# Set values (0-based indexing!)\nrow = PetscInt[0]\ncols = PetscInt[0, 1]\nvals = PetscScalar[2.0, -1.0]\nLibPETSc.MatSetValues(petsclib, mat, PetscInt(1), row, PetscInt(2), cols, vals, LibPETSc.INSERT_VALUES)\n\n# Assemble\nLibPETSc.MatAssemblyBegin(petsclib, mat, LibPETSc.MAT_FINAL_ASSEMBLY)\nLibPETSc.MatAssemblyEnd(petsclib, mat, LibPETSc.MAT_FINAL_ASSEMBLY)\n\n# Clean up\nLibPETSc.MatDestroy(petsclib, mat)\nPETSc.finalize(petsclib)\n```\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/Mat_wrappers.jl\", \"autowrapped/Mataddons_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/pc_lowlevel.md",
    "content": "# PC (Preconditioners) - Low-level Interface\n\nThe PC (Preconditioner) component provides methods for preconditioning linear systems to accelerate the convergence of iterative solvers. Preconditioners are essential for efficiently solving large sparse linear systems with KSP.\n\n## Overview\n\nPreconditioners transform the linear system $Ax = b$ into an equivalent system that is easier to solve iteratively. PETSc provides a wide variety of preconditioners:\n\n- **Basic methods**: Jacobi, block Jacobi, SOR, ILU, ICC\n- **Multigrid**: Algebraic multigrid (GAMG, HYPRE BoomerAMG), geometric multigrid (MG)\n- **Domain decomposition**: Additive Schwarz (ASM), block Jacobi with local solves\n- **Direct solvers**: LU, Cholesky (using external packages like MUMPS, SuperLU, UMFPACK)\n- **Sparse approximations**: ILU(k), ICC(k), approximate inverses\n- **Physics-based**: Field-split, composite preconditioners for coupled systems\n- **Matrix-free**: Shell preconditioners for matrix-free implementations\n\nThe PC object can be used standalone or automatically by KSP during the solution process.\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a PC object\npc = Ref{LibPETSc.PC}()\nLibPETSc.PCCreate(petsclib, LibPETSc.PETSC_COMM_SELF, pc)\n\n# Set the preconditioner type\nLibPETSc.PCSetType(petsclib, pc[], \"ilu\")  # String convenience wrapper\n\n# Set the operator matrix\n# LibPETSc.PCSetOperators(petsclib, pc[], A, A)\n\n# Configure preconditioner-specific options\n# For ILU: set fill level\n# LibPETSc.PCFactorSetLevels(petsclib, pc[], 2)\n\n# Set options from command line/options database\nLibPETSc.PCSetFromOptions(petsclib, pc[])\n\n# Set up the preconditioner\nLibPETSc.PCSetUp(petsclib, pc[])\n\n# Apply the preconditioner: y = P^{-1} x\n# LibPETSc.PCApply(petsclib, pc[], x_vec, y_vec)\n\n# Cleanup\nLibPETSc.PCDestroy(petsclib, pc)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Integration with KSP\n\nPreconditioners are typically used with KSP solvers:\n\n```julia\n# Create KSP and get its PC\nksp = Ref{LibPETSc.KSP}()\nLibPETSc.KSPCreate(petsclib, LibPETSc.PETSC_COMM_SELF, ksp)\n\npc = Ref{LibPETSc.PC}()\nLibPETSc.KSPGetPC(petsclib, ksp[], pc)\n\n# Configure the preconditioner\nLibPETSc.PCSetType(petsclib, pc[], \"gamg\")  # String convenience wrapper\n\n# For GAMG, set additional options\nLibPETSc.PCGAMGSetType(petsclib, pc[], LibPETSc.PCGAMGAGG)\nLibPETSc.PCGAMGSetNlevels(petsclib, pc[], 10)\n```\n\n## Common Preconditioner Types\n\nAvailable through `PCSetType`:\n\n### Direct Solvers\n- `PCLU`: LU factorization\n- `PCCHOLESKY`: Cholesky factorization (symmetric positive definite)\n- `PCQR`: QR factorization\n\n### Incomplete Factorizations\n- `PCILU`: Incomplete LU factorization\n- `PCICC`: Incomplete Cholesky factorization\n- Configure fill with `PCFactorSetLevels`\n\n### Iterative/Relaxation Methods\n- `PCJACOBI`: Jacobi (diagonal scaling)\n- `PCSOR`: Successive over-relaxation\n- `PCPBJACOBI`: Point-block Jacobi\n- `PCBJACOBI`: Block Jacobi with local solves\n\n### Multigrid Methods\n- `PCMG`: Geometric multigrid\n- `PCGAMG`: Algebraic multigrid (PETSc's built-in)\n- `PCHYPRE`: HYPRE preconditioners (BoomerAMG, ParaSails, etc.)\n- `PCML`: ML algebraic multigrid (Trilinos)\n\n### Domain Decomposition\n- `PCASM`: Additive Schwarz method\n- `PCGASM`: Generalized additive Schwarz\n- `PCBDDC`: Balancing domain decomposition by constraints\n\n### Physics-Based\n- `PCFIELDSPLIT`: Field-split for coupled systems\n- `PCLSC`: Least-squares commutators (for saddle-point problems)\n- `PCCOMPOSITE`: Combine multiple preconditioners\n\n### Special Purpose\n- `PCSHELL`: User-defined shell preconditioner\n- `PCNONE`: No preconditioning (identity)\n- `PCKSP`: Use another KSP as preconditioner\n- `PCREDISTRIBUTE`: Redistribute matrix for better load balancing\n\n## Multigrid Configuration\n\nFor geometric multigrid (PCMG):\n```julia\nLibPETSc.PCSetType(petsclib, pc[], LibPETSc.PCMG)\nLibPETSc.PCMGSetLevels(petsclib, pc[], nlevels, C_NULL)\n# Set up grid hierarchy, smoothers, coarse solver\n```\n\nFor algebraic multigrid (PCGAMG):\n```julia\nLibPETSc.PCSetType(petsclib, pc[], LibPETSc.PCGAMG)\nLibPETSc.PCGAMGSetType(petsclib, pc[], LibPETSc.PCGAMGAGG)  # Aggregation\nLibPETSc.PCGAMGSetNSmooths(petsclib, pc[], 1)\nLibPETSc.PCGAMGSetThreshold(petsclib, pc[], [0.0], 1)\n```\n\n## Field Split for Coupled Systems\n\nFor systems with multiple fields (e.g., velocity-pressure):\n```julia\nLibPETSc.PCSetType(petsclib, pc[], LibPETSc.PCFIELDSPLIT)\nLibPETSc.PCFieldSplitSetType(petsclib, pc[], LibPETSc.PC_COMPOSITE_SCHUR)\n\n# Define fields using index sets\n# LibPETSc.PCFieldSplitSetIS(petsclib, pc[], \"velocity\", velocity_is)\n# LibPETSc.PCFieldSplitSetIS(petsclib, pc[], \"pressure\", pressure_is)\n```\n\n## External Solver Packages\n\nPETSc can use external direct solver packages:\n- **MUMPS**: Parallel direct solver\n- **SuperLU**: Sparse direct solver\n- **UMFPACK**: Unsymmetric multifrontal solver\n- **Pardiso**: Intel MKL parallel direct solver\n- **STRUMPACK**: Structured sparse solver\n\nSet via `PCFactorSetMatSolverType` after choosing `PCLU` or `PCCHOLESKY`.\n\n## Performance Considerations\n\n- **Jacobi/Block Jacobi**: Fast to apply, limited effectiveness\n- **ILU/ICC**: Good for moderately difficult problems, configure fill with `PCFactorSetLevels`\n- **AMG**: Excellent for elliptic PDEs, automatic coarse grid construction\n- **Direct solvers**: Robust but memory-intensive for large 3D problems\n- **Field split**: Essential for coupled multi-physics problems\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/PC_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/petscsection_lowlevel.md",
    "content": "# PetscSection - Low-level Interface\n\nThe PetscSection component provides a flexible mechanism for describing the layout of degrees of freedom (DOFs) in a discretization, particularly for finite element methods and other multi-field problems where different points have different numbers of DOFs.\n\n## Overview\n\nPetscSection is used to:\n- **Define DOF layouts**: Specify how many DOFs exist at each point (vertex, edge, face, cell)\n- **Multi-field problems**: Handle systems with multiple variables per point\n- **Local-to-global mapping**: Convert between local and global numbering\n- **FEM discretizations**: Manage DOF distributions for finite elements\n- **DM integration**: Work with DM objects for mesh-based computations\n\nA section maps from points (mesh entities like vertices, cells) to DOF ranges, answering:\n- How many DOFs are at point `p`?\n- What is the offset of the DOFs for point `p`?\n- Which field do specific DOFs belong to?\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\nPetscInt = petsclib.PetscInt\n\n# Create a section\nsection = Ref{LibPETSc.PetscSection}()\nLibPETSc.PetscSectionCreate(petsclib, LibPETSc.PETSC_COMM_SELF, section)\n\n# Set chart: range of valid point indices [pStart, pEnd)\nLibPETSc.PetscSectionSetChart(petsclib, section[], 0, 10)\n\n# Set DOF count for each point\nfor p in 0:9\n    num_dofs = (p < 4) ? 1 : 2  # Different DOFs per point\n    LibPETSc.PetscSectionSetDof(petsclib, section[], p, num_dofs)\nend\n\n# Setup: compute offsets\nLibPETSc.PetscSectionSetUp(petsclib, section[])\n\n# Query the section\ndof = LibPETSc.PetscSectionGetDof(petsclib, section[], 5)\nprintln(\"DOF count for point 5: \", dof)\n\noffset = LibPETSc.PetscSectionGetOffset(petsclib, section[], 5)\nprintln(\"Offset for point 5: \", offset)\n\n# Get total storage size\nstorage_size = LibPETSc.PetscSectionGetStorageSize(petsclib, section[])\nprintln(\"Total storage size: \", storage_size)\n\n# Cleanup\nLibPETSc.PetscSectionDestroy(petsclib, section)  # pass the Ref directly\n\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Multi-Field Sections\n\nFor problems with multiple fields (e.g., velocity + pressure):\n\n```julia\n# Create section with 2 fields\nsection = Ref{LibPETSc.PetscSection}()\nLibPETSc.PetscSectionCreate(petsclib, LibPETSc.PETSC_COMM_SELF, section)\n@assert section[] != C_NULL\n\nLibPETSc.PetscSectionSetNumFields(petsclib, section[], 2)\n\n# Set field names\nLibPETSc.PetscSectionSetFieldName(petsclib, section[], 0, \"velocity\")\nLibPETSc.PetscSectionSetFieldName(petsclib, section[], 1, \"pressure\")\n\n# Set chart\nLibPETSc.PetscSectionSetChart(petsclib, section[], 0, 10)\n\n# Set field components: velocity has 3 components (vx, vy, vz), pressure has 1\nLibPETSc.PetscSectionSetFieldComponents(petsclib, section[], 0, 3)\nLibPETSc.PetscSectionSetFieldComponents(petsclib, section[], 1, 1)\n\n# Set DOFs per field per point\nfor p in 0:9\n    LibPETSc.PetscSectionSetFieldDof(petsclib, section[], p, 0, 3)  # 3 velocity DOFs\n    LibPETSc.PetscSectionSetFieldDof(petsclib, section[], p, 1, 1)  # 1 pressure DOF\n    LibPETSc.PetscSectionSetDof(petsclib, section[], p, 4)          # Total: 4 DOFs\nend\n\nLibPETSc.PetscSectionSetUp(petsclib, section[])\n```\n\n## Constrained DOFs\n\nMark certain DOFs as constrained (e.g., for boundary conditions):\n\n```julia\n# Set chart and DOFs...\n# Note: Constraint-related functions may have wrapper issues\n\n# Set constraint DOF count\n# LibPETSc.PetscSectionSetConstraintDof(petsclib, section[], point, num_constrained)\n\n# Specify which DOFs are constrained\n# constrained_indices = PetscInt[0, 2]\n# LibPETSc.PetscSectionSetConstraintIndices(petsclib, section[], point, constrained_indices)\n\n# Query constrained storage size\n# LibPETSc.PetscSectionGetConstrainedStorageSize(petsclib, section[])\n```\n\n## Integration with DM\n\nSections are commonly used with DM objects:\n\n```julia\n# Get section from DM\ndm_section = Ref{LibPETSc.PetscSection}()\n# LibPETSc.DMGetSection(petsclib, dm, dm_section)\n\n# Set section on DM\n# LibPETSc.DMSetSection(petsclib, dm, section[])\n\n# Get local section (ghosted)\n# local_section = Ref{LibPETSc.PetscSection}()\n# LibPETSc.DMGetLocalSection(petsclib, dm, local_section)\n```\n\n## Common Workflows\n\n### 1. FEM Discretization\n\n```julia\n# Create section for Q1 finite elements on structured grid\n# - Vertices: 1 DOF each\n# - Cells: 0 DOFs\n\nsection = Ref{LibPETSc.PetscSection}()\nLibPETSc.PetscSectionCreate(petsclib, comm, section)\n@assert section[] != C_NULL\n\nLibPETSc.PetscSectionSetChart(petsclib, section[], vStart, cEnd)\n\n# Set DOFs (vStart to vEnd are vertices, vEnd to cEnd are cells)\nfor v in vStart:vEnd-1\n    LibPETSc.PetscSectionSetDof(petsclib, section[], v, 1)\nend\n\nLibPETSc.PetscSectionSetUp(petsclib, section[])\n```\n\n### 2. Point Closure\n\nGet all DOFs in the closure of a point (point + its boundary):\n\n```julia\n# Get closure DOFs for a cell\nclosure_size = Ref{PetscInt}()\nclosure = Ref{Ptr{PetscInt}}()\n# LibPETSc.DMPlexGetTransitiveClosure(petsclib, dm, cell, PETSC_TRUE, closure_size, closure)\n\n# Map closure points to DOF offsets using section\n# ... use section to get DOF offsets for each point in closure ...\n\n# LibPETSc.DMPlexRestoreTransitiveClosure(petsclib, dm, cell, PETSC_TRUE, closure_size, closure)\n```\n\n## Querying Section Properties\n\n```julia\n# Get total number of fields\nnum_fields = LibPETSc.PetscSectionGetNumFields(petsclib, section[])\n\n# Get field components\ncomponents = LibPETSc.PetscSectionGetFieldComponents(petsclib, section[], field)\n\n# Get field name (returns String directly)\nname = LibPETSc.PetscSectionGetFieldName(petsclib, section[], field)\n\n# Get maximum DOF count across all points\nmax_dof = LibPETSc.PetscSectionGetMaxDof(petsclib, section[])\n```\n\n## Cloning and Permutation\n\n```julia\n# Clone a section (wrapper may have issues, use with caution)\nnew_section = Ref{LibPETSc.PetscSection}()\n# LibPETSc.PetscSectionClone(petsclib, section[], new_section)\n\n# Note: Clone/Permute functions may require direct ccall if wrapper signatures are incorrect\n```\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/PetscSection_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/petscsf_lowlevel.md",
    "content": "# PetscSF (Star Forest) - Low-level Interface\n\nThe PetscSF (Star Forest) component provides efficient parallel communication patterns for distributed data structures. A star forest is a specialized graph structure optimized for scatter/gather operations in parallel computing.\n\n## Overview\n\nPetscSF enables:\n- **Point-to-point communication**: Efficient MPI communication patterns\n- **Scatter/gather operations**: Move data between processors\n- **Halo exchange**: Update ghost/boundary values\n- **Reduction operations**: Parallel sums, max, min across shared data\n- **Irregular communication**: Handle non-uniform data distributions\n\nA star forest consists of:\n- **Roots**: Data owned locally\n- **Leaves**: Data needed from remote processes (or local)\n- **Communication pattern**: Which leaves come from which roots\n\nPetscSF is the underlying communication layer for DM ghost point updates and other parallel operations.\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\nPetscInt = petsclib.PetscInt\n\n# Create a star forest\nsf = LibPETSc.PetscSFCreate(petsclib, MPI.COMM_WORLD)\n\n# Define communication pattern\n# nleaves: number of leaves (data items we need)\n# ilocal: local indices for leaves (can be C_NULL if identity)\n# iremote: (rank, index) pairs specifying which process/index to get from\n\nnleaves = 5\n# number of roots owned locally (for this simple example set equal to nleaves)\nnroots = 5\nilocal = [0, 1, 2, 3, 4]  # Local indices where data will be stored\niremote = [\n    LibPETSc.PetscSFNode(0, 0),\n    LibPETSc.PetscSFNode(0, 1),\n    LibPETSc.PetscSFNode(0, 2),\n    LibPETSc.PetscSFNode(0, 3),\n    LibPETSc.PetscSFNode(0, 4),\n]\n\nLibPETSc.PetscSFSetGraph(petsclib, sf, nroots, nleaves, ilocal, LibPETSc.PETSC_COPY_VALUES,\n                         iremote, LibPETSc.PETSC_COPY_VALUES)\n\n# Setup\nLibPETSc.PetscSFSetUp(petsclib, sf)\n\n# Cleanup\nLibPETSc.PetscSFDestroy(petsclib, sf)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Communication Operations\n\n### Broadcast (Scatter)\n\nSend data from roots to leaves:\n\n```julia\n# Root data: data we own\nroot_data = Float64[1.0, 2.0, 3.0, 4.0, 5.0]\n\n# Leaf data: buffer to receive data\nleaf_data = zeros(Float64, nleaves)\n\n# Broadcast: send root data to leaves\nLibPETSc.PetscSFBcastBegin(petsclib, sf, LibPETSc.MPI_DOUBLE, root_data, leaf_data,\n                           LibPETSc.MPI_REPLACE)\nLibPETSc.PetscSFBcastEnd(petsclib, sf, LibPETSc.MPI_DOUBLE, root_data, leaf_data,\n                         LibPETSc.MPI_REPLACE)\n```\n\n### Reduce\n\nAccumulate data from leaves back to roots:\n\n```julia\n# Leaf contributions\nleaf_data = Float64[0.1, 0.2, 0.3, 0.4, 0.5]\n\n# Root accumulator\nroot_data = zeros(Float64, nroots)\n\n# Reduce: accumulate leaf data to roots\nLibPETSc.PetscSFReduceBegin(petsclib, sf, LibPETSc.MPI_DOUBLE, leaf_data, root_data,\n                            LibPETSc.MPI_SUM)\nLibPETSc.PetscSFReduceEnd(petsclib, sf, LibPETSc.MPI_DOUBLE, leaf_data, root_data,\n                          LibPETSc.MPI_SUM)\n```\n\n### Fetch and Operations\n\nAtomic operations for concurrent updates:\n\n```julia\n# Fetch data and apply operation\nLibPETSc.PetscSFFetchAndOpBegin(petsclib, sf, LibPETSc.MPI_DOUBLE, root_data,\n                                leaf_data, leaf_updates, LibPETSc.MPI_SUM)\nLibPETSc.PetscSFFetchAndOpEnd(petsclib, sf, LibPETSc.MPI_DOUBLE, root_data,\n                              leaf_data, leaf_updates, LibPETSc.MPI_SUM)\n```\n\n## MPI Operations\n\nSupported MPI operations for reduce:\n- `MPI_SUM`: Sum values\n- `MPI_MAX`: Maximum value\n- `MPI_MIN`: Minimum value\n- `MPI_REPLACE`: Replace (last write wins)\n- `MPI_PROD`: Product\n\n## Star Forest Types\n\nAvailable through `PetscSFSetType`:\n- **PETSCSFBASIC**: Basic implementation\n- **PETSCSFNEIGHBOR**: MPI neighborhood collectives (efficient for structured patterns)\n- **PETSCSFALLGATHERV**: All-gather based\n- **PETSCSFALLGATHER**: All-gather for small data\n- **PETSCSFGATHERV**: Gather-based\n- **PETSCSFGATHER**: Simple gather\n- **PETSCSFALLTOALL**: All-to-all based\n\n## Graph Queries\n\n```julia\n# Get number of roots (locally owned data)\nnroots = Ref{PetscInt}()\nLibPETSc.PetscSFGetGraph(petsclib, sf, nroots, C_NULL, C_NULL, C_NULL)\n\n# Get number of leaves\nnleaves = Ref{PetscInt}()\nLibPETSc.PetscSFGetGraph(petsclib, sf, C_NULL, nleaves, C_NULL, C_NULL)\n\n# Get full graph\nilocal_ptr = Ref{Ptr{PetscInt}}()\niremote_ptr = Ref{Ptr{LibPETSc.PetscSFNode}}()\nLibPETSc.PetscSFGetGraph(petsclib, sf, nroots, nleaves, ilocal_ptr, iremote_ptr)\n```\n\n## Multi-Root Support\n\nHandle communication with multiple root data per point:\n\n```julia\n# Create multi-SF for multiple DOFs per point\nnroots_mult = nroots * num_components\nmulti_sf = LibPETSc.PetscSFCreateEmbeddedRootSF(petsclib, sf, nroots_mult, iroot_indices)\n```\n\n## Common Use Cases\n\n### 1. Ghost Point Updates (Halo Exchange)\n\n```julia\n# After modifying owned data, update ghost points\n# 1. Pack local data\n# 2. Broadcast to leaves (ghost points)\nLibPETSc.PetscSFBcastBegin(petsclib, sf, datatype, local_data, ghost_data, op)\nLibPETSc.PetscSFBcastEnd(petsclib, sf, datatype, local_data, ghost_data, op)\n```\n\n### 2. Parallel Assembly\n\n```julia\n# After local assembly, accumulate contributions from other processes\n# 1. Each process computes local contributions\n# 2. Reduce to accumulate at owners\nLibPETSc.PetscSFReduceBegin(petsclib, sf, datatype, local_contrib, global_data, MPI_SUM)\nLibPETSc.PetscSFReduceEnd(petsclib, sf, datatype, local_contrib, global_data, MPI_SUM)\n```\n\n### 3. DM Point Communication\n\n```julia\n# Get natural SF for a DM (describes point distribution)\ndm_sf = Ref{LibPETSc.PetscSF}()\n# LibPETSc.DMGetPointSF(petsclib, dm, dm_sf)\n\n# Use to communicate point-based data\n```\n\n## Performance Considerations\n\n- **Choose appropriate type**: `PETSCSFNEIGHBOR` is often best for structured grids\n- **Reuse SF objects**: Creating the communication pattern is expensive\n- **Batch communications**: Combine multiple small messages when possible\n- **Alignment**: Use properly aligned data types for better performance\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/PetscSF_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/petscviewer_lowlevel.md",
    "content": "# PetscViewer - Low-level Interface\n\nThe PetscViewer component provides flexible I/O capabilities for visualizing and saving PETSc objects, including vectors, matrices, and other data structures. Viewers support multiple output formats for analysis, debugging, and post-processing.\n\n## Overview\n\nPETSc viewers enable:\n- **Text output**: ASCII formatted data for debugging\n- **Binary I/O**: Efficient storage and checkpointing\n- **Visualization**: Integration with visualization tools (VTK, HDF5, MATLAB)\n- **Monitoring**: Runtime inspection of solver progress\n- **Logging**: Recording solver statistics and performance data\n\nAvailable viewer types:\n- **PETSCVIEWERASCII**: Human-readable text output\n- **PETSCVIEWERBINARY**: Platform-independent binary format\n- **PETSCVIEWERVTK**: VTK format for ParaView, VisIt\n- **PETSCVIEWERHDF5**: HDF5 hierarchical data format\n- **PETSCVIEWERDRAW**: X-window graphics (2D plots, contours)\n- **PETSCVIEWERSOCKET**: Network streaming to MATLAB, Python\n- **PETSCVIEWERMATLAB**: MATLAB-compatible output\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a viewer for ASCII output to stdout\nviewer = LibPETSc.PetscViewerCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.PetscViewerSetType(petsclib, viewer, \"ascii\")  # String convenience wrapper\nLibPETSc.PetscViewerFileSetMode(petsclib, viewer, LibPETSc.FILE_MODE_WRITE)\n\n# View a vector\n# LibPETSc.VecView(petsclib, vec, viewer)\n\n# View a matrix  \n# LibPETSc.MatView(petsclib, mat, viewer)\n\n# Cleanup - wrap in Ref since PetscViewerDestroy expects Ptr{PetscViewer}\nviewer_ref = Ref(viewer)\nLibPETSc.PetscViewerDestroy(petsclib, viewer_ref)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Convenience Functions\n\nFor commonly used viewers, PETSc.jl provides convenience functions:\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Get stdout viewer (single process)\nviewer_stdout_self = LibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib)\n\n# Get stdout viewer (all processes)\nviewer_stdout_world = LibPETSc.PETSC_VIEWER_STDOUT_WORLD(petsclib)\n\n# Get stderr viewer (single process)\nviewer_stderr_self = LibPETSc.PETSC_VIEWER_STDERR_SELF(petsclib)\n\n# Get stderr viewer (all processes)\nviewer_stderr_world = LibPETSc.PETSC_VIEWER_STDERR_WORLD(petsclib)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n\n# Use them to view objects\n# LibPETSc.VecView(petsclib, vec, viewer_stdout_self)\n# LibPETSc.MatView(petsclib, mat, viewer_stderr_world)\n```\n\n## Output to Files\n\n### ASCII File Output\n\n```julia\n# Create ASCII file viewer\nviewer = Ref{LibPETSc.PetscViewer}()\nLibPETSc.PetscViewerASCIIOpen(petsclib, LibPETSc.PETSC_COMM_SELF, \"output.txt\", viewer)\n\n# Set format (optional)\nLibPETSc.PetscViewerPushFormat(petsclib, viewer[], LibPETSc.PETSC_VIEWER_ASCII_MATLAB)\n\n# View object\n# LibPETSc.MatView(petsclib, mat, viewer[])\n\nLibPETSc.PetscViewerDestroy(petsclib, viewer)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n### Binary File Output\n\n```julia\n# Create binary viewer for checkpointing\nviewer = Ref{LibPETSc.PetscViewer}()\nLibPETSc.PetscViewerBinaryOpen(petsclib, MPI.COMM_WORLD, \"checkpoint.dat\", \n                               LibPETSc.FILE_MODE_WRITE, viewer)\n\n# Save vector\n# LibPETSc.VecView(petsclib, vec, viewer[])\n\n# Save matrix\n# LibPETSc.MatView(petsclib, mat, viewer[])\n\nLibPETSc.PetscViewerDestroy(petsclib, viewer)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n### Loading from Binary Files\n\n```julia\n# Open for reading\nviewer = Ref{LibPETSc.PetscViewer}()\nLibPETSc.PetscViewerBinaryOpen(petsclib, MPI.COMM_WORLD, \"checkpoint.dat\",\n                               LibPETSc.FILE_MODE_READ, viewer)\n\n# Load vector\nvec = LibPETSc.VecCreate(petsclib, MPI.COMM_WORLD)\nLibPETSc.VecLoad(petsclib, vec, viewer[])\n\nLibPETSc.PetscViewerDestroy(petsclib, viewer)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Visualization Formats\n\n### VTK Output\n\n```julia\n# Create VTK viewer for ParaView/VisIt\nviewer = Ref{LibPETSc.PetscViewer}()\nLibPETSc.PetscViewerVTKOpen(petsclib, MPI.COMM_WORLD, \"solution.vtu\",\n                            LibPETSc.FILE_MODE_WRITE, viewer)\n\n# View DM-based solution\n# LibPETSc.DMView(petsclib, dm, viewer[])\n# LibPETSc.VecView(petsclib, solution, viewer[])\n\nLibPETSc.PetscViewerDestroy(petsclib, viewer)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n### HDF5 Output\n\n```julia\n# Create HDF5 viewer for hierarchical data\nviewer = Ref{LibPETSc.PetscViewer}()\nLibPETSc.PetscViewerHDF5Open(petsclib, MPI.COMM_WORLD, \"data.h5\",\n                             LibPETSc.FILE_MODE_WRITE, viewer)\n\n# Organize data in groups\nLibPETSc.PetscViewerHDF5PushGroup(petsclib, viewer[], \"/timestep_001\")\n# LibPETSc.VecView(petsclib, vec, viewer[])\nLibPETSc.PetscViewerHDF5PopGroup(petsclib, viewer[])\n\nLibPETSc.PetscViewerDestroy(petsclib, viewer)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Standard Viewers\n\nPETSc provides predefined viewers:\n\n```julia\n# Standard output\nLibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib)\nLibPETSc.PETSC_VIEWER_STDOUT_WORLD(petsclib)\n\n# Standard error\nLibPETSc.PETSC_VIEWER_STDERR_SELF(petsclib)\nLibPETSc.PETSC_VIEWER_STDERR_WORLD(petsclib)\n\n# Example: view to stdout\n# LibPETSc.VecView(petsclib, vec, LibPETSc.PETSC_VIEWER_STDOUT_WORLD(petsclib))\n```\n\n## Format Options\n\nControl output detail with `PetscViewerPushFormat`:\n\n- **PETSC_VIEWER_DEFAULT**: Standard format\n- **PETSC_VIEWER_ASCII_MATLAB**: MATLAB-compatible format\n- **PETSC_VIEWER_ASCII_DENSE**: Dense matrix format\n- **PETSC_VIEWER_ASCII_INFO**: Summary information only\n- **PETSC_VIEWER_ASCII_INFO_DETAIL**: Detailed information\n\n## Draw Viewer (Graphics)\n\nFor interactive 2D visualization:\n\n```julia\n# Create draw viewer (X-window)\nviewer = Ref{LibPETSc.PetscViewer}()\nLibPETSc.PetscViewerDrawOpen(petsclib, LibPETSc.PETSC_COMM_SELF, C_NULL, \"Plot\", \n                              0, 0, 600, 600, viewer)\n\n# View vector as bar chart\n# LibPETSc.VecView(petsclib, vec, viewer[])\n\n# View matrix structure\n# LibPETSc.MatView(petsclib, mat, viewer[])\n\nLibPETSc.PetscViewerDestroy(petsclib, viewer)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Socket Viewer (MATLAB/Python)\n\nStream data to external tools:\n\n```julia\n# Create socket viewer\nviewer = Ref{LibPETSc.PetscViewer}()\nLibPETSc.PetscViewerSocketOpen(petsclib, MPI.COMM_WORLD, \"localhost\", 5000, viewer)\n\n# Send data\n# LibPETSc.VecView(petsclib, vec, viewer[])\n\nLibPETSc.PetscViewerDestroy(petsclib, viewer)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Monitoring Convergence\n\nViewers are used with KSP/SNES monitors:\n\n```julia\n# Monitor KSP residuals (automatic viewer to stdout)\n# LibPETSc.KSPMonitorSet(petsclib, ksp, LibPETSc.KSPMonitorDefault, \n#                        LibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib), C_NULL)\n```\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/PetscViewer_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/snes.md",
    "content": "# SNES\n\nThe SNES (Scalable Nonlinear Equations Solvers) module provides methods for solving nonlinear systems of the form `F(x) = 0`. It builds on KSP for the linear solves within Newton-like methods.\n\n## Overview\n\nSNES provides:\n- **Newton methods**: Newton line search, Newton trust region\n- **Quasi-Newton**: L-BFGS, Broyden\n- **Nonlinear Richardson**: With various line search strategies\n- **FAS multigrid**: Full Approximation Scheme for nonlinear problems\n- **Composite solvers**: Combine multiple nonlinear solvers\n\n## Creating a SNES Solver\n\n```julia\n# Basic creation\nsnes = SNES(petsclib, MPI.COMM_WORLD)\n\n# With options\nsnes = SNES(petsclib, MPI.COMM_WORLD;\n    snes_type = \"newtonls\",\n    snes_rtol = 1e-8,\n    snes_max_it = 50\n)\n```\n\n## Setting the Nonlinear Function\n\nDefine the residual function `F(x)`:\n\n```julia\nfunction residual!(fx, snes, x)\n    # Compute F(x) and store in fx\n    fx[1] = x[1]^2 + x[2] - 1\n    fx[2] = x[1] + x[2]^2 - 1\n    return 0\nend\n\nsetfunction!(snes, residual!, f_vec)\n```\n\n## Setting the Jacobian\n\nDefine the Jacobian `J = dF/dx`:\n\n```julia\nfunction jacobian!(J, snes, x)\n    # Fill Jacobian matrix\n    J[1, 1] = 2*x[1]\n    J[1, 2] = 1.0\n    J[2, 1] = 1.0\n    J[2, 2] = 2*x[2]\n    assemble!(J)\n    return 0\nend\n\nsetjacobian!(snes, jacobian!, J, J)  # (J, P) where P is preconditioner matrix\n```\n\n## Using a DM\n\nFor PDE problems, associate the SNES with a DM:\n\n```julia\nsetDM!(snes, dm)\n\n# Get the DM from SNES\ndm = getDM(snes)\n```\n\n## Solving\n\n```julia\n# Solve with initial guess x\nsolve!(x, snes)\n\n# Get solution vector\nsol = get_solution(snes)\n```\n\n## Common Solver Options\n\n### Nonlinear Solver Types (`snes_type`)\n- `newtonls` - Newton with line search (default)\n- `newtontr` - Newton with trust region\n- `nrichardson` - Nonlinear Richardson\n- `qn` - Quasi-Newton (L-BFGS)\n- `fas` - Full Approximation Scheme multigrid\n\n### Convergence Options\n- `snes_rtol` - Relative tolerance\n- `snes_atol` - Absolute tolerance\n- `snes_stol` - Step tolerance\n- `snes_max_it` - Maximum iterations\n- `snes_monitor` - Print residual each iteration\n\n### Line Search Options\n- `snes_linesearch_type` - `bt` (backtracking), `basic`, `l2`, `cp`\n\n## Example: Full Setup\n\n```julia\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\nsnes = SNES(petsclib, MPI.COMM_WORLD;\n    snes_monitor = true,\n    ksp_type = \"gmres\",\n    pc_type = \"ilu\"\n)\n\nsetfunction!(snes, residual!, f)\nsetjacobian!(snes, jacobian!, J, J)\nsetfromoptions!(snes)\n\nsolve!(x, snes)\n```\n\n## Functions\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"snes.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/snes_lowlevel.md",
    "content": "# SNES - Low-level Interface\n\nThis page documents the low-level, automatically wrapped PETSc SNES (Scalable Nonlinear Equations Solvers) functions available through `LibPETSc`. These functions provide direct access to the PETSc C API.\n\nFor the high-level Julia interface, see [SNES](@ref).\n\n## Overview\n\nThe SNES interface includes:\n- **Core SNES operations**: Nonlinear solver creation, configuration, and solution (~283 functions in `SNES_wrappers.jl`)\n- **SNESLineSearch**: Line search methods for nonlinear solvers (~50 functions in `SNESLineSearch_wrappers.jl`)\n\n## Usage\n\nAll low-level SNES functions require a `petsclib` parameter as the first argument:\n\n```julia\nusing PETSc\n\n# Get the library instance\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\n# Get PETSc types\nPetscInt = petsclib.PetscInt\n\n# Create SNES solver\nsnes = LibPETSc.SNESCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\n\n# Set function and Jacobian (callbacks would need to be defined)\n# LibPETSc.SNESSetFunction(petsclib, snes, r, compute_function, ctx)\n# LibPETSc.SNESSetJacobian(petsclib, snes, J, J, compute_jacobian, ctx)\n\n# Configure from command line\nLibPETSc.SNESSetFromOptions(petsclib, snes)\n\n# Solve\n# LibPETSc.SNESSolve(petsclib, snes, C_NULL, x)\n\n# Get convergence info\nreason = LibPETSc.SNESGetConvergedReason(petsclib, snes)\n\niterations = LibPETSc.SNESGetIterationNumber(petsclib, snes)\n\nprintln(\"SNES reason: $(reason), iterations: $(iterations)\")\n\n# Clean up\nLibPETSc.SNESDestroy(petsclib, snes)\nPETSc.finalize(petsclib)\n```\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/SNES_wrappers.jl\", \"autowrapped/SNESLineSearch_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/tao_lowlevel.md",
    "content": "# Tao (Optimization) - Low-level Interface\n\nThe Tao (Toolkit for Advanced Optimization) component provides methods for solving optimization problems, including unconstrained minimization, bound-constrained optimization, and constrained optimization.\n\n## Overview\n\nTao supports various optimization algorithms:\n- **Unconstrained**: Conjugate gradient (CG), limited-memory BFGS (BLMVM), Nelder-Mead\n- **Bound-constrained**: Bound-constrained BFGS (BNCG, BNLS, BNTL), active-set methods\n- **Constrained**: Augmented Lagrangian methods (ALMM), interior point methods\n- **Least-squares**: Gauss-Newton methods, Levenberg-Marquardt\n- **Complementarity**: Semismooth methods for complementarity problems\n- **PDE-constrained**: Methods suitable for PDE-constrained optimization\n\nThe Tao object manages the optimization process, line searches, convergence monitoring, and provides a unified interface across different optimization algorithms.\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a Tao object\ntao = LibPETSc.TaoCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\n\n# Set the optimization algorithm (e.g., LMVM, BLMVM, NLS)\nLibPETSc.TaoSetType(petsclib, tao, \"lmvm\")  # String convenience wrapper\n\n# Set the objective function and gradient\n# LibPETSc.TaoSetObjective(petsclib, tao, objective_function_ptr, C_NULL)\n# LibPETSc.TaoSetGradient(petsclib, tao, C_NULL, gradient_function_ptr, C_NULL)\n\n# For bound-constrained problems, set variable bounds\n# LibPETSc.TaoSetVariableBounds(petsclib, tao, lower_bound_vec, upper_bound_vec)\n\n# Set convergence tolerances\nLibPETSc.TaoSetTolerances(petsclib, tao, 1e-8, 1e-8, 1e-8)\n\n# Set maximum iterations\nLibPETSc.TaoSetMaximumIterations(petsclib, tao, 1000)\n\n# Set options from command line/options database\nLibPETSc.TaoSetFromOptions(petsclib, tao)\n\n# Set initial guess\n# LibPETSc.TaoSetSolution(petsclib, tao, initial_vec)\n\n# Solve the optimization problem\n# LibPETSc.TaoSolve(petsclib, tao)\n\n# Get solution information\nreason = LibPETSc.TaoGetConvergedReason(petsclib, tao)\niter = LibPETSc.TaoGetIterationNumber(petsclib, tao)\n\nprintln(\"Tao reason: $(reason), iterations: $(iter)\")\n\n# Cleanup\nLibPETSc.TaoDestroy(petsclib, tao)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Common Workflow\n\n1. **Create and configure Tao**: Use `TaoCreate`, `TaoSetType`\n2. **Define objective**: `TaoSetObjective`, `TaoSetGradient`, optionally `TaoSetHessian`\n3. **Set constraints** (if any): `TaoSetVariableBounds`, `TaoSetConstraints`\n4. **Configure solver**: `TaoSetTolerances`, `TaoSetMaximumIterations`\n5. **Set initial guess**: `TaoSetSolution`\n6. **Solve**: `TaoSolve`\n7. **Retrieve solution**: `TaoGetSolution`, `TaoGetConvergedReason`\n\n## Optimization Algorithms\n\nAvailable through `TaoSetType`:\n- **Unconstrained**:\n  - `TAOLMVM`: Limited-memory variable metric (quasi-Newton)\n  - `TAOCG`: Conjugate gradient methods\n  - `TAONM`: Nelder-Mead simplex method\n  - `TAONLS`: Newton line search\n  - `TAONTL`: Newton trust-region with line search\n\n- **Bound-constrained**:\n  - `TAOBLMVM`: Bound-constrained limited-memory variable metric\n  - `TAOBNCG`: Bound-constrained conjugate gradient\n  - `TAOBQNLS`: Bound-constrained quasi-Newton line search\n  - `TAOBNTL`: Bound-constrained Newton trust-region\n  - `TAOTRON`: Trust-region Newton method\n\n- **Constrained**:\n  - `TAOALMM`: Augmented Lagrangian multiplier method\n  - `TAOIPM`: Interior point method\n  - `TAOPDIPM`: Primal-dual interior point method\n\n- **Least-squares**:\n  - `TAOPOUNDERS`: POUNDERs model-based method\n  - `TAOBRGN`: Bounded regularized Gauss-Newton\n\n- **Complementarity**:\n  - `TAOSSLS`: Semismooth least squares\n  - `TAOASLS`: Active-set least squares\n\n## Convergence Criteria\n\nTao monitors several convergence criteria:\n- **Gradient tolerance**: `||∇f|| < gatol` or `||∇f||/||f|| < grtol`\n- **Function tolerance**: `|f - f_prev| < fatol` or `|f - f_prev|/|f| < frtol`\n- **Step tolerance**: `||x - x_prev|| < steptol`\n\nSet using `TaoSetTolerances(tao, gatol, grtol, gttol)`.\n\n## Hessian Options\n\nFor second-order methods:\n- **Exact Hessian**: Provide via `TaoSetHessian`\n- **Finite-difference approximation**: Use matrix-free approach\n- **Quasi-Newton approximation**: LMVM methods build approximation automatically\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/Tao_wrappers.jl\"]\nOrder   = [:function]\n```\n\n## Tao Add-ons\n\nAdditional Tao utilities and helper functions:\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/Tao_addons_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/ts_lowlevel.md",
    "content": "# TS (Time Stepping) - Low-level Interface\n\n<a id=\"ch_ts\"></a>\n\nThe TS (Time Stepping) component provides methods for solving time-dependent differential equations, including ordinary differential equations (ODEs), differential-algebraic equations (DAEs), and time-dependent partial differential equations (PDEs).\n\n## Overview\n\nTS supports various time integration methods including:\n- **Explicit methods**: Forward Euler, Runge-Kutta methods (RK2, RK3, RK4, etc.)\n- **Implicit methods**: Backward Euler, Crank-Nicolson, BDF methods\n- **IMEX methods**: Implicit-Explicit combinations for stiff-nonstiff problems\n- **Adaptive methods**: Adaptive time stepping with error control\n- **Specialized methods**: Theta methods, Rosenbrock methods, SSP methods\n\nThe TS object manages the time integration loop, adaptive time stepping, event detection, and provides interfaces to various time stepping schemes.\n\n## Basic Usage\n\n```julia\nusing PETSc, MPI\n\n# Initialize MPI and PETSc\nMPI.Init()\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n\n# Create a TS object\nts = LibPETSc.TSCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\n\n# Set the problem type (ODE or DAE)\nLibPETSc.TSSetProblemType(petsclib, ts, LibPETSc.TS_NONLINEAR)\n\n# Set the time stepping method (e.g., BDF, RK, Theta)\nLibPETSc.TSSetType(petsclib, ts, \"bdf\")  # String convenience wrapper\n\n# Set time span\nLibPETSc.TSSetTime(petsclib, ts, 0.0)  # Initial time\nLibPETSc.TSSetMaxTime(petsclib, ts, 1.0)  # Final time\nLibPETSc.TSSetExactFinalTime(petsclib, ts, LibPETSc.TS_EXACTFINALTIME_STEPOVER)\n\n# Set initial time step\nLibPETSc.TSSetTimeStep(petsclib, ts, 0.01)\n\n# Set the right-hand side function (for ODE: du/dt = f(t,u))\n# LibPETSc.TSSetRHSFunction(petsclib, ts, C_NULL, rhs_function_ptr, C_NULL)\n\n# Set options from command line/options database\nLibPETSc.TSSetFromOptions(petsclib, ts)\n\n# Set initial condition\n# LibPETSc.TSSetSolution(petsclib, ts, initial_vec)\n\n# Solve\n# LibPETSc.TSSolve(petsclib, ts, solution_vec)\n\n# Get solution time (returns value directly)\nfinal_time = LibPETSc.TSGetSolveTime(petsclib, ts)\n\n# Cleanup\nLibPETSc.TSDestroy(petsclib, ts)\n\n# Finalize PETSc and MPI\nPETSc.finalize(petsclib)\nMPI.Finalize()\n```\n\n## Common Workflow\n\n1. **Create and configure TS**: Use `TSCreate`, `TSSetType`, `TSSetProblemType`\n2. **Set time parameters**: `TSSetTime`, `TSSetMaxTime`, `TSSetTimeStep`, `TSSetMaxSteps`\n3. **Define equations**: `TSSetRHSFunction`, `TSSetIFunction`, `TSSetIJacobian`\n4. **Configure adaptivity**: `TSAdaptSetType`, `TSSetTolerances`\n5. **Set initial condition**: `TSSetSolution`\n6. **Solve**: `TSSolve`\n7. **Retrieve solution**: `TSGetSolution`, `TSGetTime`, `TSGetStepNumber`\n\n## Time Integration Schemes\n\nAvailable through `TSSetType`:\n- `TSEULER`: Forward/Backward Euler\n- `TSRK`: Runge-Kutta methods (various orders)\n- `TSBDF`: Backward Differentiation Formulas\n- `TSTHETA`: Theta method (generalizes Euler, Crank-Nicolson)\n- `TSROSW`: Rosenbrock-W methods for stiff problems\n- `TSARKIMEX`: Additive Runge-Kutta IMEX methods\n- `TSGLEE`: Generalized Linear Evolution Equations\n- `TSALPHA`: Alpha methods for second-order systems\n- `TSSSP`: Strong Stability Preserving methods\n\n## Event Detection\n\nTS supports event detection (zero-crossing of event functions) during time integration:\n- `TSSetEventHandler`: Configure events to detect\n- Events can trigger actions like termination, adaptation, or post-event processing\n\n## Adaptive Time Stepping\n\nTS includes sophisticated adaptive time stepping:\n- `TSAdaptChoose`: Select time step based on error estimates\n- Various adapt types: `TSADAPTBASIC`, `TSADAPTNONE`, `TSADAPTDSP`\n- Tolerance control: `TSSetTolerances` for absolute/relative error\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/TS_wrappers.jl\"]\nOrder   = [:function]\n```\n\n## TS Add-ons\n\nAdditional TS utilities and helper functions:\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/TSaddons_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "docs/src/man/utilities.md",
    "content": "# Utilities\n\nThis page documents utility functions for initialization, options handling, system information, and code auditing.\n\n## Initialization\n\nThe initialization functions manage PETSc's lifecycle, including MPI initialization and cleanup.\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"init.jl\"]\n```\n\n## Options\n\nPETSc uses an options database to configure solvers and other objects at runtime. These functions provide access to the options system.\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"options.jl\"]\n```\n\n## System Utilities\n\nGeneral system-level utilities for working with PETSc objects.\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"sys.jl\"]\n```\n\n## Code Auditing\n\nThe audit utilities help identify potential memory leaks by tracking PETSc object creation and destruction.\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"audit.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/vec.md",
    "content": "# Vec\n\nPETSc vectors (`Vec`) are the fundamental building blocks for storing solution data, right-hand sides, and other distributed arrays. PETSc.jl provides a Julia-friendly interface that makes `Vec` objects behave like native Julia arrays.\n\n## Overview\n\nPETSc vectors support:\n- **Distributed parallel storage**: Split across MPI processes\n- **Sequential storage**: For serial computations\n- **Ghost points**: For communication in stencil operations\n- **Julia array interface**: Use familiar indexing and broadcasting syntax\n\n## Creating Vectors\n\n### Sequential Vectors\n\n```julia\n# Create a sequential vector of length n\nv = VecSeq(petsclib, n)\n\n# Wrap an existing Julia array (no copy)\njulia_array = zeros(100)\nv = VecSeq(petsclib, julia_array)\n```\n\n### From DM Objects\n\n```julia\n# Create global and local vectors from a DM\nglobal_vec = DMGlobalVec(dm)\nlocal_vec = DMLocalVec(dm)\n```\n\n## Julia Array Interface\n\nPETSc vectors implement the Julia array interface:\n\n```julia\nv[1] = 1.0           # Set single element\nv[1:10] .= 2.0       # Set range\nx = v[5]             # Get element\nlength(v)            # Get length\nsize(v)              # Get size tuple\n```\n\n## Assembly\n\nAfter setting values, vectors must be assembled:\n\n```julia\nv[1] = 1.0\nv[2] = 2.0\nassemble!(v)  # Finalize vector assembly\n```\n\n## Ghost Point Updates\n\nFor vectors with ghost points (from DMDA/DMStag):\n\n```julia\n# Update ghost values from neighboring processes\nghostupdate!(vec, INSERT_VALUES, SCATTER_FORWARD)\n\n# Or use begin/end for non-blocking:\nghostupdatebegin!(vec, INSERT_VALUES, SCATTER_FORWARD)\n# ... do other work ...\nghostupdateend!(vec, INSERT_VALUES, SCATTER_FORWARD)\n```\n\n## Functions\n\n```@autodocs\nModules = [PETSc]\nPages   = [\"vec.jl\"]\n```\n"
  },
  {
    "path": "docs/src/man/vec_lowlevel.md",
    "content": "# Vec - Low-level Interface\n\nThis page documents the low-level, automatically wrapped PETSc Vec functions available through `LibPETSc`. These functions provide direct access to the PETSc C API.\n\nFor the high-level Julia interface, see [Vec](@ref).\n\n## Overview\n\nThe Vec interface includes:\n- **Core Vec operations**: Creation, manipulation, and mathematical operations on vectors (~186 functions in `Vec_wrappers.jl`)\n- **Vec utilities**: Scatter operations, FFTW integration, and advanced vector operations (~76 functions in `Vecs_wrappers.jl`)\n- **VecTagger**: Tools for tagging/marking vector elements based on criteria (~31 functions in `VecTagger_wrappers.jl`)\n\n## Usage\n\nAll low-level Vec functions require a `petsclib` parameter as the first argument:\n\n```julia\nusing PETSc\n\n# Get the library instance\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\n# Get PETSc types\nPetscInt = petsclib.PetscInt\n\n# Create a vector\nvec = LibPETSc.VecCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.VecSetSizes(petsclib, vec, PetscInt(10), PetscInt(10))\nLibPETSc.VecSetType(petsclib, vec, \"seq\")  # Set vector type\nLibPETSc.VecSetFromOptions(petsclib, vec)\n\n# Set values\nLibPETSc.VecSet(petsclib, vec, 1.0)\n\n# Query the vector\nsize = LibPETSc.VecGetSize(petsclib, vec)\nprintln(\"Vector size: $size\")\n\n# Get values (0-based indexing!)\nidx = PetscInt(0)\nval = LibPETSc.VecGetValues(petsclib, vec, PetscInt(1), [idx])\nprintln(\"Value at index 0: $(val[1])\")\n\n# Clean up\nLibPETSc.VecDestroy(petsclib, vec)\nPETSc.finalize(petsclib)\n```\n\n## Function Reference\n\n```@autodocs\nModules = [PETSc.LibPETSc]\nPages   = [\"autowrapped/Vec_wrappers.jl\", \"autowrapped/Vecs_wrappers.jl\", \"autowrapped/VecTagger_wrappers.jl\"]\nOrder   = [:function]\n```\n"
  },
  {
    "path": "examples/Liouville_Bratu_Gelfand.jl",
    "content": "# INCLUDE IN MPI TEST\n#=\nIn this example we solve the [Liouville–Bratu–Gelfand\nequation](https://en.wikipedia.org/wiki/Liouville%E2%80%93Bratu%E2%80%93Gelfand_equation):\n```math\n∇² ψ + λ exp(ψ)\n```\nwith zero Dirichlet boundary conditions.\n\nTo solve the problem we use the standard central, finite difference\napproximation of the Laplacian in `d`-dimensions\n\nThis example is motivated by the following PETSc examples:\n- [`snes/ex5`](https://petsc.org/release/src/snes/tutorials/ex5.c.html)\n- [`snes/ex14`](https://petsc.org/release/src/snes/tutorials/ex14.c.html)\n=#\n\nusing MPI\nusing PETSc\nusing OffsetArrays: OffsetArray\nusing LinearAlgebra: norm\n\nopts = if !isinteractive()\n    PETSc.parse_options(ARGS)\nelse\n    (ksp_monitor = true, ksp_view = true)\nend\n\n# Set our MPI communicator\ncomm = MPI.COMM_WORLD\n\n# Set our PETSc Scalar Type\nPetscScalar = Float64\n\n# get the PETSc lib with our chosen `PetscScalar` type\npetsclib = PETSc.getlib(; PetscScalar = PetscScalar)\n\n# Initialize PETSc\nPETSc.initialize(petsclib)\n\n# dimensionality of the problem\ndim = haskey(opts, :dim) ? opts.dim : 3\n\n# Set the total number of grid points in each direction\nNq = ntuple(_ -> 10, dim)\n\n# Set the boundary conditions on each side\nbcs = ntuple(_ -> PETSc.DM_BOUNDARY_NONE, dim)\n\n# Set parameter\nλ = PetscScalar(6)\n\n# Create the PETSC dmda object\nda = PETSc.DMDA(\n    petsclib,\n    comm,\n    bcs,                     # boundary conditions\n    Nq,                      # Global grid size\n    1,                       # Number of DOF per node\n    1,                       # Stencil width\n    PETSc.DMDA_STENCIL_STAR; # Stencil type\n    opts...,\n)\n\n# Create the PETSC snes object\nsnes = PETSc.SNES(petsclib, comm; opts...)\n\n# add the da to the snes\nPETSc.setDM!(snes, da)\n\n# Set up the initial guess\nx = PETSc.DMGlobalVec(da)\nxl = PETSc.DMLocalVec(da)\nPETSc.withlocalarray!(xl; read = false) do l_x\n    corners = PETSc.getcorners(da)\n\n    # Get the global grid dimensions\n    Nq = PETSc.getinfo(da).global_size\n\n    # Figure out the interior points \n    int_min = min(CartesianIndex(corners.size), CartesianIndex(2, 2, 2))\n    int_max = max(CartesianIndex(corners.size .- 1), CartesianIndex(1, 1, 1))\n    interior = (int_min):(int_max)\n\n    # Allows us to adress the local array with global indexing\n    ox = @view PETSc.reshapelocalarray(l_x, da)[1, :, :, :]\n\n    # Set up the global coordinates in each direction\n    # -1 to 1 when Nq > 1 and 0 otherwise\n    coords = map(\n        Nq ->\n            Nq == 1 ? range(PetscScalar(0), stop = 0, length = Nq) :\n            range(-PetscScalar(1), stop = 1, length = Nq),\n        Nq,\n    )\n\n    scaling = λ / (λ + 1)\n\n    # Loop over all the points on the processor and set the initial condition to\n    # be a hat function\n    for i in ((corners.lower):(corners.upper))\n        ox[i] =\n            scaling * sqrt(\n                min(\n                    (1 - abs(coords[1][i[1]])),\n                    (1 - abs(coords[2][i[2]])),\n                    (1 - abs(coords[3][i[3]])),\n                ),\n            )\n    end\nend\nPETSc.dm_local_to_global!(xl, x, da, PETSc.INSERT_VALUES)\n\n# Set up the nonlinear function\nr = similar(x)\nPETSc.setfunction!(snes, r) do g_fx, snes, g_x\n    # Get the DMDA associated with the snes\n    da = PETSc.getDM(snes)\n\n    # Get a local vector and transfer the data from the global vector into it\n    l_x = PETSc.DMLocalVec(da)\n    PETSc.dm_global_to_local!(g_x, l_x, da, PETSc.INSERT_VALUES)\n\n    ghostcorners = PETSc.getghostcorners(da)\n    corners = PETSc.getcorners(da)\n\n    # Global grid size\n    Nq = PETSc.getinfo(da).global_size\n\n    # grid spacing in each dimension\n    Δx, Δy, Δz = PetscScalar(1) ./ Nq\n\n    # Get local arrays\n    PETSc.withlocalarray!(\n        (g_fx, l_x);\n        read = (false, true),\n        write = (true, false),\n    ) do fx, x\n\n        # reshape the array and allow for global indexing\n        x = @view PETSc.reshapelocalarray(x, da)[1, :, :, :]\n        fx = @view PETSc.reshapelocalarray(fx, da)[1, :, :, :]\n\n        # Store a tuple of stencils in each direction\n        stencils = (\n            (\n                CartesianIndex(-1, 0, 0),\n                CartesianIndex(0, 0, 0),\n                CartesianIndex(1, 0, 0),\n            ),\n            (\n                CartesianIndex(0, -1, 0),\n                CartesianIndex(0, 0, 0),\n                CartesianIndex(0, 1, 0),\n            ),\n            (\n                CartesianIndex(0, 0, -1),\n                CartesianIndex(0, 0, 0),\n                CartesianIndex(0, 0, 1),\n            ),\n        )\n        # Weights for each direction\n        weights = (Δy * Δz / Δx, Δx * Δz / Δy, Δx * Δy / Δz)\n\n        # loop over indices and set the function value\n        for ind in ((corners.lower):(corners.upper))\n            # If on the boundary just set equal to the incoming data\n            # otherwise apply the finite difference operator\n            if any(ntuple(j -> ind[j] == 1 || ind[j] == Nq[j], dim))\n                fx[ind] = x[ind]\n            else\n                # Apply the source\n                u = -Δx * Δy * Δz * λ * exp(x[ind])\n\n                # Apply the finite diffference stencil\n                for (s, w) in zip(stencils[1:dim], weights[1:dim])\n                    u +=\n                        w * (-x[ind + s[1]] + 2 * x[ind + s[2]] - x[ind + s[3]])\n                end\n                fx[ind] = u\n            end\n        end\n    end\n\n    # Clean up the local vector\n    PETSc.destroy(l_x)\n    return 0\nend\n\nJ = LibPETSc.DMCreateMatrix(petsclib, da)\nPETSc.setjacobian!(snes, J) do J, snes, g_x\n    # Get the DMDA associated with the snes\n    da = PETSc.getDM(snes)\n\n    # Get the corners of the points we own\n    corners = PETSc.getcorners(da)\n\n    # Global grid size\n    Nq = PETSc.getinfo(da).global_size\n\n    # grid spacing in each dimension\n    Δx, Δy, Δz = PetscScalar(1) ./ Nq\n\n    # Store a tuple of stencils in each direction\n    stencils = (\n        (\n            CartesianIndex(-1, 0, 0),\n            CartesianIndex(0, 0, 0),\n            CartesianIndex(1, 0, 0),\n        ),\n        (\n            CartesianIndex(0, -1, 0),\n            CartesianIndex(0, 0, 0),\n            CartesianIndex(0, 1, 0),\n        ),\n        (\n            CartesianIndex(0, 0, -1),\n            CartesianIndex(0, 0, 0),\n            CartesianIndex(0, 0, 1),\n        ),\n    )\n    # Weights for each direction\n    weights = (Δy * Δz / Δx, Δx * Δz / Δy, Δx * Δy / Δz)\n\n    # Get a local array of the solution vector\n    PETSc.withlocalarray!(g_x; write = false) do l_x\n        # reshape so we can use multi-D indexing\n        x = @view PETSc.reshapelocalarray(l_x, da)[1, :, :, :]\n\n        # loop over indices and set the function value\n        for ind in ((corners.lower):(corners.upper))\n            # If on the boundary just set equal to the incoming data\n            # otherwise apply the finite difference operator\n            if any(ntuple(j -> ind[j] == 1 || ind[j] == Nq[j], dim))\n                J[ind, ind] = 1\n            else\n                # We accumulate the diagonal and add it at the end\n                Jii = -Δx * Δy * Δz * λ * exp(x[ind]) # Apply the source\n\n                # Apply the finite diffference stencil\n                for (s, w) in zip(stencils[1:dim], weights[1:dim])\n                    Jii += w * 2\n                    J[ind, ind + s[1]] = -w\n                    J[ind, ind + s[3]] = -w\n                end\n                J[ind, ind] = Jii\n            end\n        end\n    end\n\n    # Assemble the Jacobian matrix\n    PETSc.assemble!(J)\n    return 0\nend\n\nif MPI.Comm_rank(comm) == 0\n    println(@elapsed(PETSc.solve!(x, snes)))\nelse\n    PETSc.solve!(x, snes)\nend\ng = similar(x)\nsnes.f!(g, snes, x)\nnm = norm(g)\nif MPI.Comm_rank(comm) == 0\n    @show nm\nend\n\n# Do some clean up\nPETSc.destroy(J)\nPETSc.destroy(x)\nPETSc.destroy(g)\nPETSc.destroy(r)\nPETSc.destroy(da)\nPETSc.destroy(snes)\n\nPETSc.finalize(petsclib)\n\n"
  },
  {
    "path": "examples/SNES_ex2.jl",
    "content": "# This implements src/snes/examples/tutorials/ex2.c from PETSc using the PETSc.jl package, using SNES\n#\n# This solves the equations sequentially\n# \n# Newton method to solve u'' + u^{2} = f, sequentially.\n\nusing PETSc, MPI, LinearAlgebra, SparseArrays, UnicodePlots\n\nif ~MPI.Initialized()\n    MPI.Init()\nend\n\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\ncomm = MPI.COMM_WORLD\n\"\"\"    \n    FormInitialGuess!(x)\nComputes initial guess \n\"\"\"\nfunction FormInitialGuess!(x)\n    for i in eachindex(x)\n        x[i] = 0.50;\n    end\n    return nothing\nend\n\n\"\"\" \n    F = SetInitialArrays(n)\nComputes rhs forcing function \n\"\"\" \nfunction SetInitialArrays(n)\n    h =  1.0/(n-1.0)\n    F = zeros(n);\n    xp = 0.0;\n    for i=1:n \n        v    = 6.0*xp + (xp+1.e-12)^6.0; \n        F[i] = v;\n        xp   = xp+h;\n    end\n\n    return F\nend\n\n\"\"\"\n    FormResidual!(cf,cx, args...)\nComputes the residual `f`, given solution vector `x`\n\"\"\"\nfunction FormResidual!(f,snes, x)\n    n       =   length(x);\n    xp      =   LinRange(0.0,1.0, n);\n    F       =   6.0.*xp .+ (xp .+1.e-12).^6.0;      # define source term function\n    \n    dx      =   1.0/(n-1.0);\n    f[1]    =   x[1] - 0.0;\n    for i=2:n-1\n        f[i] = (x[i-1] - 2.0*x[i] + x[i+1])/dx^2 + x[i]*x[i] - F[i]\n    end\n    f[n]    =   x[n] - 1.0;\n\n    return 0\nend\n\n\"\"\"\n    Computes the jacobian, given solution vector x\n\"\"\"\nfunction FormJacobian!(J, snes, x)\n    n = length(x)\n    dx  =   1.0/(n-1.0);\n\n    # interior points (hand-coded jacobian)\n    for i=2:n-1\n        J[i,i-1] = 1.0/dx^2;\n        J[i,i  ] = -2.0/dx^2 + 2.0*x[i];\n        J[i,i+1] = 1.0/dx^2;\n    end\n\n    # boundary points\n    J[1,1] = 1.0;\n    J[n,n] = 1.0;\n    if !isnothing(snes)\n        PETSc.assemble!(J)\n    end\n    return 0\nend\n\n\n# ==========================================\n# Main code \n\n\n# Compute initial solution\nn   =   21;\nF   =   SetInitialArrays(n);\nx   =   zeros(n);\n\nFormInitialGuess!(x);\n\n# Compute initial jacobian using a julia structure to obtain the nonzero structure\n# Note that we can also obtain this structure in a different manner\nJstruct  = zeros(n,n);\nFormJacobian!(Jstruct, nothing, x);                                              # jacobian in julia form\nJsp      =   sparse(Float64.(abs.(Jstruct) .> 0))                       # sparse julia, with 1.0 in nonzero spots\nPJ       =   PETSc.MatSeqAIJWithArrays(petsclib, comm, Jsp);  # transfer to PETSc format\n\n# Setup snes\nx_s = LibPETSc.VecCreateSeqWithArray(petsclib,comm, 1, length(x), x)    # solution vector\nres = LibPETSc.VecCreateSeqWithArray(petsclib,comm, 1, length(F), F)    # residual vector\nb   = LibPETSc.VecCreateSeqWithArray(petsclib,comm, 1, length(F), F)    # residual vector\n\nS = PETSc.SNES(petsclib,comm; \n        snes_rtol=1e-12, \n        snes_monitor=true,\n        snes_converged_reason=false);\n\n# Set functions for residual and jacobian computations\nPETSc.setfunction!(S, FormResidual!, res)\nPETSc.setjacobian!(S, FormJacobian!, PJ)\n\n# solve\nPETSc.solve!(x_s, S);\n\n# Extract & plot solution\nx_sol = x_s[:];                  # convert solution to julia format\nFormResidual!(res,S, x_s)\n\n@show norm(res[:])\n\n# cleanup\nPETSc.destroy(x_s)\nPETSc.destroy(res)\nPETSc.destroy(b)\nPETSc.destroy(PJ)\nPETSc.destroy(S)\nPETSc.finalize(petsclib)\n\n# plot solution in REPL\nlineplot(LinRange(0,1,n),x_sol,xlabel=\"width\",ylabel=\"solution\")\n\n"
  },
  {
    "path": "examples/SNES_ex2b.jl",
    "content": "# This implements src/snes/examples/tutorials/ex2.c from PETSc using the PETSc.jl package, using SNES\n#\n# This is the same as SNES_ex2.jl, except that we show how automatic differentiation can be used to\n# compute the jacobian. That implies that the user does not have to provide a hand-coded jacobian.\n# Note that the way we compute the jacobian here is not very efficient as we do not use the sparsity structure of the \n# matrix; see the other examples for faster implementions. \n#\n# Newton method to solve u'' + u^{2} = f, sequentially.\n\nusing PETSc, MPI, LinearAlgebra, SparseArrays, UnicodePlots, ForwardDiff\nusing Test\n\nif ~MPI.Initialized()\n    MPI.Init()\nend\n\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\ncomm = MPI.COMM_WORLD\n\n\n\"\"\"\n    Computes initial guess \n\"\"\"\nfunction FormInitialGuess!(x)\n    for i=1:length(x)\n        x[i] = 0.50;\n    end\nend\n\n\"\"\" \n    F = SetInitialArrays(n)\nComputes rhs forcing function \n\"\"\" \nfunction SetInitialArrays(n)\n    h =  1.0/(n-1.0)\n    F = zeros(n);\n    xp = 0.0;\n    for i=1:n \n        v    = 6.0*xp + (xp+1.e-12)^6.0; \n        F[i] = v;\n        xp   = xp+h;\n    end\n\n    return F\nend\n\n\"\"\"\n    Computes the residual f, given solution vector x\n\"\"\"\nfunction FormResidual1!(f,snes, x)\n    n       =   length(x);\n    xp      =   LinRange(0.0,1.0, n);\n    F       =   6.0.*xp .+ (xp .+1.e-12).^6.0;      # define source term function\n    \n    dx      =   1.0/(n-1.0);\n    f[1]    =   x[1] - 0.0;\n    for i=2:n-1\n        f[i] = (x[i-1] - 2.0*x[i] + x[i+1])/dx^2 + x[i]*x[i] - F[i]\n    end\n    f[n]    =   x[n] - 1.0;\n    \n    return 0\nend\n\n\n\"\"\"\n    Wrapper which makes it easier to compute the jacobian using automatic differntiation\n\"\"\"\nfunction  ForwardDiff_res(x)\n\n    f   = zero(x)               # vector of zeros, of same type as x\n    FormResidual1!(f,nothing, x);\n\n    return f;\nend\n\n\n\"\"\"\n    Computes the jacobian, given solution vector x\n\"\"\"\nfunction FormJacobian1!(J, snes, x)\n   \n    # Use AD to compute jacobian; by transferring x into sparse, the output will be sparse\n    J_julia  =  ForwardDiff.jacobian(ForwardDiff_res,x[:]);\n    copyto!(J, sparse(J_julia))\n\n    if !isnothing(snes)\n        PETSc.assemble!(J)\n    end\n    return 0\nend\n\n# ==========================================\n# Main code \n\n\n# Compute initial solution\nn   =   21;\nF   =   SetInitialArrays(n);\nx   =   zeros(n);\n\nFormInitialGuess!(x);\n\n# Compute initial jacobian using a julia structure to obtain the nonzero structure\n# Note that we can also obtain this structure in a different manner\nJstruct  = zeros(n,n);\nFormJacobian1!(Jstruct, nothing, x);                              # jacobian in julia form\nJsp      =   sparse(Float64.(abs.(Jstruct) .> 0))       # sparse julia, with 1.0 in nonzero spots\nPJ       =   PETSc.MatSeqAIJWithArrays(petsclib, comm, Jsp);  # transfer to PETSc format\n\n# Setup SNES\n#x_s = PETSc.VecSeq(petsclib, comm, x);                  # solution vector\n#b   = PETSc.VecSeq(petsclib, comm, x);                  # solution vector\n#res = PETSc.VecSeq(petsclib, comm, zeros(size(x)));     # residual vector\n\n# Setup snes\nx_s = LibPETSc.VecCreateSeqWithArray(petsclib,comm, 1, length(x), x)    # solution vector\nres = LibPETSc.VecCreateSeqWithArray(petsclib,comm, 1, length(F), F)    # residual vector\nb   = LibPETSc.VecCreateSeqWithArray(petsclib,comm, 1, length(F), F)    # residual vector\n\nsnes = PETSc.SNES(petsclib,comm; \n        snes_rtol=1e-12, \n        snes_monitor=nothing,\n        snes_converged_reason=nothing);\nPETSc.setfunction!(snes, FormResidual1!, res)\nPETSc.setjacobian!(snes, FormJacobian1!, PJ)\n\n# solve\nPETSc.solve!(x_s, snes);\n\n# Extract & plot solution\nx_sol = x_s[:];                  # convert solution to julia format\nFormResidual1!(res,snes, x_s)\n\n@show norm(res[:])\n\n# cleanup\nPETSc.destroy(x_s)\nPETSc.destroy(res)\nPETSc.destroy(b)\nPETSc.destroy(PJ)\nPETSc.destroy(snes)\nPETSc.finalize(petsclib)\n\n# plot solution in REPL\nlineplot(LinRange(0,1,n),x_sol,xlabel=\"width\",ylabel=\"solution\")\n\n"
  },
  {
    "path": "examples/convergence_test.jl",
    "content": "# INCLUDE IN MPI TEST\n#\n#!/usr/bin/env julia\nusing PETSc, MPI, Printf\n\n# Convergence test usage (examples)\n#\n# Run convergence tests for `ex45` (3D) or `ex50` (2D) from the repository root.\n# - Direct (LU) baseline for ex45 (3D):\n#     julia --project=. examples/convergence_test.jl -Ns=\"65,129,257\" -levels=\"1,1,1\" -ksp_type preonly -pc_type lu -example ex45\n# - Geometric multigrid for ex45:\n#     julia --project=. examples/convergence_test.jl -Ns=\"65,129,257,513\" -levels=\"3,4,5,6\" -ksp_type cg -pc_type mg -example ex45\n#\n# - Direct (LU) baseline for ex50 (2D):\n#     julia --project=. examples/convergence_test.jl -Ns=\"65,129,257\" -levels=\"1,1,1\" -ksp_type preonly -pc_type lu -example ex50\n# - Geometric multigrid for ex50:\n#     julia --project=. examples/convergence_test.jl -Ns=\"65,129,257,513\" -levels=\"3,4,5,6\" -ksp_type cg -pc_type mg -example ex50\n#\n# Notes:\n# - `-levels` maps one MG level per entry in `-Ns` (comma-separated).\n# - Use `-ksp_type preonly -pc_type lu` for a direct factor baseline.\n# - Use `-ksp_type cg -pc_type mg` (and tune MG-specific flags) for geometric multigrid.\n# - PETSc CLI flags (e.g. `-ksp_monitor`, `-pc_mg_type`, `-mg_levels_ksp_type`) are forwarded\n#   to the solver; pass them on the command line to tune behavior at runtime.\n\n# This script runs the selected example (`ex50` by default) for a sequence\n# of grid resolutions and prints a convergence table similar to\n# `ex50_run_convergence.jl`. Resolutions are shown as `NxNxN` (or `NxN` for 2D).\n\ninclude(joinpath(@__DIR__, \"ex45.jl\"))\ninclude(joinpath(@__DIR__, \"ex50.jl\"))\n\n# Parse PETSc/CLI options and build a kwargs dict to forward to `solve_ex45`.\nopts = PETSc.parse_options(ARGS)\nns_opt = get(opts, Symbol(\"Ns\"), nothing)\nN_start = parse(Int, get(opts, Symbol(\"N_start\"), \"9\"))\nreverse_order = get(opts, Symbol(\"reverse\"), false)\nexample = get(opts, Symbol(\"example\"), \"ex50\")\ndim = parse(Int, get(opts, Symbol(\"dim\"), example == \"ex50\" ? \"2\" : \"3\"))\nlevels_opt = get(opts, Symbol(\"levels\"), nothing)\n\nif ns_opt !== nothing\n    Ns = [parse(Int, strip(s)) for s in split(string(ns_opt), \",\") if strip(s) != \"\"]\nelse\n    Ns = [N_start * (2^(i-1)) for i in 1:5]\nend\nif reverse_order\n    Ns = reverse(Ns)\nend\n\n# Parse explicit per-resolution MG levels if provided (comma-separated)\nif levels_opt !== nothing\n    Levels = [parse(Int, strip(s)) for s in split(string(levels_opt), \",\") if strip(s) != \"\"]\n    if length(Levels) != length(Ns)\n        error(\"Provided -levels must contain the same number of entries as Ns\")\n    end\nelse\n    Levels = nothing\nend\n\n# Forwardable solver options: everything in opts except the control args above\nforward_keys = Set([:Ns, :N_start, :reverse, :dim, :example])\nsolver_kwargs = Dict{Symbol,Any}()\nfor k in keys(opts)\n    if !(k in forward_keys)\n        solver_kwargs[k] = opts[k]\n    end\nend\n\npetsclib = PETSc.getlib(; PetscScalar = Float64)\nPETSc.initialize(petsclib)\n\nresults = []\nfor (i, N) in enumerate(Ns)\n    if MPI.Comm_rank(MPI.COMM_WORLD) == 0\n        if example == \"ex50\"\n            @printf(\"Running ex50 with N=%d\\n\", N)\n        else\n            @printf(\"Running ex45 with N=%d\\n\", N)\n        end\n    end\n    # Build per-run options dict (copy solver_kwargs)\n    opts_dict = Dict(solver_kwargs)\n    # If user provided explicit per-resolution MG levels, use them\n    if Levels !== nothing\n        opts_dict[:pc_mg_levels] = string(Levels[i])\n    else\n        # keep any provided pc_mg_levels or leave absent\n        if get(opts_dict, :pc_type, \"\") == \"mg\" && !haskey(opts_dict, :pc_mg_levels)\n            # default geometric mapping: increase levels with resolution\n            opts_dict[:pc_mg_levels] = string(1 + (i - 1))\n        end\n    end\n\n    # For the smallest resolution run twice to exclude compilation time\n    if i == 1\n        if example == \"ex50\"\n            solve_ex50(N; opts_dict...)  # warm-up / discard\n        else\n            solve_ex45(N; opts_dict...)  # warm-up / discard\n        end\n    end\n    # call selected solver programmatically, forwarding any solver kwargs\n    if example == \"ex50\"\n        res = solve_ex50(N; opts_dict...)\n    else\n        res = solve_ex45(N; opts_dict...)\n    end\n    # res is a NamedTuple: (norm, final_grid, niter, solve_time, L2, max)\n    final_grid = res.final_grid\n    h = 1.0 / N\n    push!(results, (N, h, res.L2, res.solve_time, res.niter))\nend\n\n# Compute orders and time-scaling (𝒪(Time))\norders = fill(NaN, length(results))\ntime_orders = fill(NaN, length(results))\nfor i in 1:length(results)-1\n    e1 = results[i][3]\n    e2 = results[i+1][3]\n    h1 = results[i][2]\n    h2 = results[i+1][2]\n    if e1 > 0 && e2 > 0\n        orders[i] = log(e1 / e2) / log(h1 / h2)\n    end\n    t1 = results[i][4]\n    t2 = results[i+1][4]\n    N1 = results[i][1]\n    N2 = results[i+1][1]\n    if t1 > 0 && t2 > 0 && N1 > 0 && N2 > 0\n        time_orders[i] = log(t2 / t1) / (dim * log(N2 / N1))\n    end\nend\n\nif MPI.Comm_rank(MPI.COMM_WORLD) == 0\n    # Header matching ex50_convergence.jl but hide MG Lvl unless PC is multigrid\n    pc_type_val = get(solver_kwargs, :pc_type, \"gamg\")\n    show_mg = pc_type_val == \"mg\"\n    @printf(\"\\nConvergence Analysis Results (KSP: %s, PC: %s):\\n\", get(solver_kwargs, :ksp_type, \"cg\"), pc_type_val)\n    if show_mg\n        @printf(\"%-11s %-8s %-10s %-10s %-12s %-8s %-10s %-8s\\n\", \"N\", \"MG Lvl\", \"h\", \"KSP Iters\", \"L2 Error\", \"𝒪(N)\", \"Time (s)\", \"𝒪(Time)\")\n        @printf(\"%-11s %-8s %-10s %-10s %-12s %-8s %-10s %-8s\\n\", repeat(\"-\",11), repeat(\"-\",8), repeat(\"-\",10), repeat(\"-\",10), repeat(\"-\",12), repeat(\"-\",8), repeat(\"-\",10), repeat(\"-\",8))\n    else\n        @printf(\"%-11s %-10s %-10s %-12s %-8s %-10s %-8s\\n\", \"N\", \"h\", \"KSP Iters\", \"L2 Error\", \"𝒪(N)\", \"Time (s)\", \"𝒪(Time)\")\n        @printf(\"%-11s %-10s %-10s %-12s %-8s %-10s %-8s\\n\", repeat(\"-\",11), repeat(\"-\",10), repeat(\"-\",10), repeat(\"-\",12), repeat(\"-\",8), repeat(\"-\",10), repeat(\"-\",8))\n    end\n\n    for i in 1:length(results)\n        Nval, h, e, time, iters = results[i]\n        ord = orders[i]\n        tord = time_orders[i]\n        # Format N as NxN or NxNxN depending on spatial dimension\n        Nstr = dim == 3 ? string(Nval, \"x\", Nval, \"x\", Nval) : string(Nval, \"x\", Nval)\n        if show_mg\n            # display MG level for this row\n            mglvl = get(solver_kwargs, :pc_mg_levels, \"--\")\n            if Levels !== nothing\n                mglvl = string(Levels[i])\n            else\n                if haskey(solver_kwargs, :pc_mg_levels)\n                    mglvl = string(solver_kwargs[:pc_mg_levels])\n                else\n                    if pc_type_val == \"mg\"\n                        mglvl = string(1 + (i - 1))\n                    end\n                end\n            end\n\n            if i == 1\n                @printf(\"%-11s %-8s %-10.6f %-10d %-12.6e %-8s %-10.4f %-8s\\n\", Nstr, mglvl, h, iters, e, \"-\", time, \"-\")\n            else\n                s_ord = isnan(ord) ? \"N/A\" : @sprintf(\"%8.2f\", ord)\n                s_tord = isnan(tord) ? \"N/A\" : @sprintf(\"%8.2f\", tord)\n                if s_ord == \"N/A\" && s_tord == \"N/A\"\n                    @printf(\"%-11s %-8s %-10.6f %-10d %-12.6e %-8s %-10.4f %-8s\\n\", Nstr, mglvl, h, iters, e, \"N/A\", time, \"N/A\")\n                elseif s_ord == \"N/A\"\n                    @printf(\"%-11s %-8s %-10.6f %-10d %-12.6e %-8s %-10.4f %-8.2f\\n\", Nstr, mglvl, h, iters, e, \"N/A\", time, tord)\n                elseif s_tord == \"N/A\"\n                    @printf(\"%-11s %-8s %-10.6f %-10d %-12.6e %-8.2f %-10.4f %-8s\\n\", Nstr, mglvl, h, iters, e, ord, time, \"N/A\")\n                else\n                    @printf(\"%-11s %-8s %-10.6f %-10d %-12.6e %-8.2f %-10.4f %-8.2f\\n\", Nstr, mglvl, h, iters, e, ord, time, tord)\n                end\n            end\n        else\n            if i == 1\n                @printf(\"%-11s %-10.6f %-10d %-12.6e %-8s %-10.4f %-8s\\n\", Nstr, h, iters, e, \"-\", time, \"-\")\n            else\n                s_ord = isnan(ord) ? \"N/A\" : @sprintf(\"%8.2f\", ord)\n                s_tord = isnan(tord) ? \"N/A\" : @sprintf(\"%8.2f\", tord)\n                if s_ord == \"N/A\" && s_tord == \"N/A\"\n                    @printf(\"%-11s %-10.6f %-10d %-12.6e %-8s %-10.4f %-8s\\n\", Nstr, h, iters, e, \"N/A\", time, \"N/A\")\n                elseif s_ord == \"N/A\"\n                    @printf(\"%-11s %-10.6f %-10d %-12.6e %-8s %-10.4f %-8.2f\\n\", Nstr, h, iters, e, \"N/A\", time, tord)\n                elseif s_tord == \"N/A\"\n                    @printf(\"%-11s %-10.6f %-10d %-12.6e %-8.2f %-10.4f %-8s\\n\", Nstr, h, iters, e, ord, time, \"N/A\")\n                else\n                    @printf(\"%-11s %-10.6f %-10d %-12.6e %-8.2f %-10.4f %-8.2f\\n\", Nstr, h, iters, e, ord, time, tord)\n                end\n            end\n        end\n    end\nend\n\nPETSc.finalize(petsclib)\n"
  },
  {
    "path": "examples/dmda_laplacian.jl",
    "content": "\n# # Finite Difference Laplacian\n#\n# This example solves a simple 2-D Laplacian with zero Dirichlet boundary \n# conditions using the PETSc DMDA interface.\n#\n# The approach taken is that the 5-point Laplacian is applied in the interior\n# and boundary points are included in the solve, but the forcing for the\n# boundary data is the Dirichlet boundary condition and the matrix entry for\n# these points is set to the identity.\n#\n# The exact solution is u(x,y) = sin(2πx)sin(2πy) on [0,1]².\n#\n# ## Command Line Options:\n#\n# Grid configuration:\n#   --N <value>          Grid size (default: 65, creates N×N grid)\n#\n# PETSc options (use single dash):\n#   -ksp_type <type>     KSP solver type (preonly, gmres, cg, etc.)\n#   -pc_type <type>      Preconditioner type (lu, mg, sor, ilu, etc.)\n#   -ksp_rtol <value>    Relative convergence tolerance\n#   -ksp_monitor         Monitor convergence\n#\n# ## Usage Examples:\n#\n# 1. Run with default settings (65×65 grid, LU solver):\n#\n#     julia --project=.. dmda_laplacian.jl\n#\n# 2. Solve on a 129×129 grid with direct LU solver:\n#\n#     julia --project=.. dmda_laplacian.jl --N 129 -ksp_type preonly -pc_type lu\n#\n# 3. Large grid with iterative SOR solver:\n#\n#     julia --project=.. dmda_laplacian.jl --N 257 -pc_type sor -ksp_rtol 1e-10 -ksp_monitor\n#\n# 4. Small grid with ILU preconditioner:\n#\n#     julia --project=.. dmda_laplacian.jl --N 33 -pc_type ilu -ksp_rtol 1e-10 -ksp_monitor\n#\n# 5. Geometric multigrid solver on 513×513 grid:\n#\n#     julia --project=.. dmda_laplacian.jl --N 513 -pc_type mg -ksp_rtol 1e-12 -mg_coarse_pc_type lu\n#\n# 6. Run in parallel with MPI (4 processes):\n#\n#     julia> using MPI\n#     julia> mpiexec(cmd -> run(`$cmd -n 4 julia --project dmda_laplacian.jl --N 129 -pc_type mg`))\n#\n# For convergence analysis across multiple grid resolutions, see dmda_laplacian_convergence.jl\n\nusing MPI\nusing PETSc\nusing UnicodePlots: heatmap\nusing ForwardDiff: derivative\nusing Printf\n\n# boundary data and forcing  \nexact(x, y) = sin(2π * x) * sin(2π * y)\n# The discrete operator is -∇², so forcing = -∇²(exact)\n# For exact(x,y) = sin(2πx)sin(2πy), we have ∇²u = -2(2π)²sin(2πx)sin(2πy)\n# So forcing = -∇²u = 8π²sin(2πx)sin(2πy)\nforcing(x, y) = 8 * π^2 * sin(2π * x) * sin(2π * y)\n\n# Parse options\nopts = if !isinteractive()\n    PETSc.parse_options(ARGS)\nelse\n    (ksp_monitor = false, ksp_type = \"preonly\", pc_type = \"lu\", ksp_rtol = 1e-12)\nend\n\n# Parse grid size from command line (default: 65)\nN = parse(Int, get(opts, Symbol(\"-N\"), \"65\"))\n\n# Set our MPI communicator\ncomm = MPI.COMM_WORLD\n\n# Set our PETSc Scalar Type\nPetscScalar = Float64\n\n# get the PETSc lib with our chosen `PetscScalar` type\npetsclib = PETSc.getlib(; PetscScalar = PetscScalar)\n\n# Initialize PETSc\nPETSc.initialize(petsclib)\n\n# Grid size (set via --N option, default: 65)\nNq = (N, N)\n\n# Create the DMDA\nda = PETSc.DMDA(\n    petsclib,\n    comm,\n    (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n    Nq,\n    1,\n    1,\n    PETSc.DMDA_STENCIL_STAR;\n    opts...,\n)\n\n# Setup the Krylov solver\nksp = PETSc.KSP(da; opts...)\n\n# Define the operator assembly function\nfunction assemble_operator!(A, _, ksp)\n    da = PETSc.getDM(ksp)\n    corners = PETSc.getcorners(da)\n    Nq = PETSc.getinfo(da).global_size[1:2]\n    \n    Δx = PetscScalar(1 / (Nq[1] - 1))\n    Δy = PetscScalar(1 / (Nq[2] - 1))\n    \n    interior = (CartesianIndex(2, 2, 1)):(CartesianIndex(Nq[1] - 1, Nq[2] - 1, 1))\n    \n    sten = (\n        CartesianIndex(-1, 0, 0),\n        CartesianIndex(1, 0, 0),\n        CartesianIndex(0, -1, 0),\n        CartesianIndex(0, 1, 0),\n        CartesianIndex(0, 0, 0),\n    )\n    vals = (-1 / Δx^2, -1 / Δx^2, -1 / Δy^2, -1 / Δy^2, 2 / Δx^2 + 2 / Δy^2)\n    \n    for i in ((corners.lower):(corners.upper))\n        if i ∈ interior\n            for (s, v) in zip(sten, vals)\n                A[i, i + s] = v\n            end\n        else\n            A[i, i] = 1\n        end\n    end\n    \n    PETSc.assemble!(A)\n    return 0\nend\n\nPETSc.setcomputeoperators!(ksp, assemble_operator!)\n\n# Set the right-hand side\nPETSc.setcomputerhs!(ksp) do petsc_b, ksp\n    da = PETSc.getDM(ksp)\n    corners = PETSc.getcorners(da)\n    Nq = PETSc.getinfo(da).global_size[1:2]\n    \n    g_x = range(PetscScalar(0), length = Nq[1], stop = 1)\n    g_y = range(PetscScalar(0), length = Nq[2], stop = 1)\n    \n    l_x = g_x[(corners.lower[1]):(corners.upper[1])]\n    l_y = g_y[(corners.lower[2]):(corners.upper[2])]\n    \n    PETSc.withlocalarray!(petsc_b; read = false) do b\n        b = reshape(b, Int64(corners.size[1]), Int64(corners.size[2]))\n        b .= forcing.(l_x, l_y')\n        \n        if corners.lower[1] == 1\n            b[1, :] .= exact.(l_x[1], l_y)\n        end\n        if corners.lower[2] == 1\n            b[:, 1] .= exact.(l_x, l_y[1])\n        end\n        if corners.upper[1] == Nq[1]\n            b[end, :] .= exact.(l_x[end], l_y)\n        end\n        if corners.upper[2] == Nq[2]\n            b[:, end] .= exact.(l_x, l_y[end])\n        end\n    end\n    \n    return 0\nend\n\n# Solve the problem\nPETSc.solve!(ksp)\n\n# Check convergence\nreason = PETSc.LibPETSc.KSPGetConvergedReason(petsclib, ksp)\n\n# Get the solution and compute error\nsol = PETSc.get_solution(ksp)\ncorners = PETSc.getcorners(da)\nNq = PETSc.getinfo(da).global_size[1:2]\n\ng_x = range(PetscScalar(0), length = Nq[1], stop = 1)\ng_y = range(PetscScalar(0), length = Nq[2], stop = 1)\n\nl_x = g_x[(corners.lower[1]):(corners.upper[1])]\nl_y = g_y[(corners.lower[2]):(corners.upper[2])]\n\nΔx = PetscScalar(l_x.step)\n\nx = sol[:]\nu = reshape(x, corners.size[1], corners.size[2])\n\n# Compute error only in interior (excluding boundaries)\nloc_err2_sum = 0.0\nloc_max_err = 0.0\nloc_npts = 0\n\nfor i in 1:length(l_x), j in 1:length(l_y)\n    global loc_err2_sum, loc_max_err, loc_npts\n    gi = corners.lower[1] + i - 1\n    gj = corners.lower[2] + j - 1\n    \n    if gi > 1 && gi < Nq[1] && gj > 1 && gj < Nq[2]\n        err = abs(u[i,j] - exact(l_x[i], l_y[j]))\n        loc_err2_sum += err^2\n        loc_max_err = max(loc_max_err, err)\n        loc_npts += 1\n    end\nend\n\nroot = 0\nerr2_sum = MPI.Reduce(loc_err2_sum, +, root, comm)\nnpts_total = MPI.Reduce(loc_npts, +, root, comm)\nmax_err = MPI.Reduce(loc_max_err, max, root, comm)\n\n# Report results on root processor\nif root == MPI.Comm_rank(comm)\n    L2_error = sqrt(err2_sum / npts_total)\n    \n    # Report convergence status\n    if Integer(reason) > 0\n        println(\"KSP converged with reason: $reason\")\n    elseif Integer(reason) < 0\n        println(\"WARNING: KSP diverged with reason: $reason\")\n    else\n        println(\"KSP still iterating: $reason\")\n    end\n    \n    println(\"L2-error (interior): $(Printf.@sprintf(\"%.6e\", L2_error))\")\n    println(\"Max-error (interior): $(Printf.@sprintf(\"%.6e\", max_err))\")\n    println(\"Mesh spacing h: $(Printf.@sprintf(\"%.6e\", Δx))\")\n    \n    # Compute error field for plotting\n    u_exact = exact.(l_x, l_y')\n    error_field = abs.(u .- u_exact)\n    \n    # Plot solution\n    println(\"\\nSolution heatmap:\")\n    println(heatmap(u'))\n    \n    # Plot error\n    println(\"\\nError heatmap:\")\n    println(heatmap(error_field'))\nend\n\n# Clean up\nPETSc.destroy(ksp)\nPETSc.destroy(da)\n\nPETSc.finalize(petsclib)\n\n"
  },
  {
    "path": "examples/dmda_laplacian_convergence.jl",
    "content": "# EXCLUDE FROM TESTING\n# # Finite Difference Laplacian - Convergence Analysis\n#\n# This example performs convergence analysis for a 2-D Laplacian solver with zero \n# Dirichlet boundary conditions using the PETSc DMDA interface.\n#\n# The approach taken is that the 5-point Laplacian is applied in the interior\n# and boundary points are included in the solve, but the forcing for the\n# boundary data is the Dirichlet boundary condition and the matrix entry for\n# these points is set to the identity.\n#\n# By default, runs convergence tests on grids 17×17, 33×33, 65×65, and 129×129.\n# Use --single_solve flag for a single solve on a 65×65 grid instead.\n#\n# ## Command Line Options:\n#\n# Grid configuration:\n#   --grids <values>         Comma-separated list of grid sizes (e.g., 17,65,257,1025)\n#   --N_min <value>          Minimum grid size for auto-generation (default: 17)\n#   --N_max <value>          Maximum grid size for auto-generation (default: 129)\n#                            Auto-generates: 17, 33, 65, 129, 257, 513, 1025, 2049, ...\n#\n# Multigrid configuration:\n#   --mg_levels_list <vals>  Comma-separated MG levels per grid (e.g., 3,5,7,9)\n#   --mg_levels <value>      Fixed number of MG levels for all grids\n#                            If neither specified: auto-scales with grid (N=17→3, N=33→4, ...)\n#\n# Other options:\n#   -single_solve           Run single solve instead of convergence test\n#\n# PETSc options (use single dash):\n#   -ksp_type <type>         KSP solver type (preonly, gmres, richardson, etc.)\n#   -pc_type <type>          Preconditioner type (lu, mg, sor, ilu, etc.)\n#   -ksp_rtol <value>        Relative convergence tolerance\n#   -mg_coarse_pc_type <type> Coarse grid preconditioner for multigrid\n#   -ksp_monitor             Monitor convergence\n#\n# ## Usage Examples:\n#\n# 1. Default convergence analysis (N=17,33,65,129 with LU solver):\n#\n#     julia --project=.. dmda_laplacian_convergence.jl\n#\n# 2. Custom grid sizes with geometric multigrid:\n#\n#     julia --project=.. dmda_laplacian_convergence.jl --grids 17,65,257,1025 -pc_type mg -mg_coarse_pc_type lu\n#\n# 3. Custom grids with specific MG levels for each:\n#\n#     julia --project=.. dmda_laplacian_convergence.jl --grids 33,129,513 --mg_levels_list 4,6,8 -pc_type mg -mg_coarse_pc_type lu\n#\n# 4. Auto-generate grids with fixed MG levels:\n#\n#     julia --project=.. dmda_laplacian_convergence.jl --N_max 513 --mg_levels 7 -pc_type mg -mg_coarse_pc_type lu\n#\n# 5. Direct solver with preonly KSP:\n#\n#     julia --project=.. dmda_laplacian_convergence.jl --N_max 257 -ksp_type preonly -pc_type lu\n#\n# 6. Iterative SOR solver:\n#\n#     julia --project=.. dmda_laplacian_convergence.jl --grids 17,65,257,1025 -pc_type sor -ksp_rtol 1e-10\n#\n# 7. Single solve with multigrid:\n#\n#     julia --project=.. dmda_laplacian_convergence.jl --single_solve -pc_type mg -ksp_rtol 1e-12 -mg_coarse_pc_type lu\n#\n# 8. Run in parallel with MPI (4 processes):\n#\n#     julia> using MPI\n#     julia> mpiexec(cmd -> run(`$cmd -n 4 julia --project dmda_laplacian_convergence.jl -pc_type mg`))\n#\n# Notes:\n# - Geometric multigrid (MG) uses the DMDA grid hierarchy for automatic coarsening\n# - By default, MG levels automatically scale with grid size (N=17→3, N=33→4, N=65→5, N=129→6)\n# - Use --mg_levels to fix the number of levels for all grids\n# - PETSc options use single dash (-), Julia script options use double dash (--)\n\nusing MPI\nusing PETSc\nusing UnicodePlots: heatmap\nusing ForwardDiff: derivative\nusing Printf\nusing Statistics: mean\n\n# Set up the problem by using an exact solution and then using this to set the\n# boundary data and forcing  \nexact(x, y) = sin(2π * x) * sin(2π * y)\n# The discrete operator is -∇², so forcing = -∇²(exact)\n# For exact(x,y) = sin(2πx)sin(2πy), we have ∇²u = -2(2π)²sin(2πx)sin(2πy)\n# So forcing = -∇²u = 8π²sin(2πx)sin(2πy)\nforcing(x, y) = 8 * π^2 * sin(2π * x) * sin(2π * y)\n\n\"\"\"\n    solve_laplacian(petsclib, comm, N::Int, opts)\n\nSolve the 2D Laplacian problem on an N×N grid and return the L2 and max errors\n(computed on interior points only).\n\"\"\"\nfunction solve_laplacian(petsclib, comm, N::Int, opts; mg_levels=nothing)\n    PetscScalar = petsclib.PetscScalar\n    Nq = (N, N)\n    \n    # Add mg_levels to opts if using multigrid and mg_levels is specified\n    if mg_levels !== nothing && get(opts, :pc_type, nothing) == \"mg\"\n        opts = merge(opts, (var\"-pc_mg_levels\" = mg_levels,))\n    end\n    \n    # Add direct coarse grid solver for multigrid if not already specified\n    if get(opts, :pc_type, nothing) == \"mg\" && !haskey(opts, :mg_coarse_pc_type)\n        opts = merge(opts, (var\"-mg_coarse_pc_type\" = \"lu\",))\n    end\n    \n    # Create the DMDA\n    da = PETSc.DMDA(\n        petsclib,\n        comm,\n        (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n        Nq,\n        1,\n        1,\n        PETSc.DMDA_STENCIL_STAR;\n        opts...,\n    )\n    \n    # Setup the Krylov solver\n    ksp = PETSc.KSP(da; opts...)\n    \n    # Define the operator assembly function\n    function assemble_operator!(A, _, ksp)\n        da = PETSc.getDM(ksp)\n        corners = PETSc.getcorners(da)\n        Nq = PETSc.getinfo(da).global_size[1:2]\n        \n        Δx = PetscScalar(1 / (Nq[1] - 1))\n        Δy = PetscScalar(1 / (Nq[2] - 1))\n        \n        interior = (CartesianIndex(2, 2, 1)):(CartesianIndex(Nq[1] - 1, Nq[2] - 1, 1))\n        \n        sten = (\n            CartesianIndex(-1, 0, 0),\n            CartesianIndex(1, 0, 0),\n            CartesianIndex(0, -1, 0),\n            CartesianIndex(0, 1, 0),\n            CartesianIndex(0, 0, 0),\n        )\n        vals = (-1 / Δx^2, -1 / Δx^2, -1 / Δy^2, -1 / Δy^2, 2 / Δx^2 + 2 / Δy^2)\n        \n        for i in ((corners.lower):(corners.upper))\n            if i ∈ interior\n                for (s, v) in zip(sten, vals)\n                    A[i, i + s] = v\n                end\n            else\n                A[i, i] = 1\n            end\n        end\n        \n        PETSc.assemble!(A)\n        return 0\n    end\n    \n    PETSc.setcomputeoperators!(ksp, assemble_operator!)\n    \n    # Set the right-hand side\n    PETSc.setcomputerhs!(ksp) do petsc_b, ksp\n        da = PETSc.getDM(ksp)\n        corners = PETSc.getcorners(da)\n        Nq = PETSc.getinfo(da).global_size[1:2]\n        \n        g_x = range(PetscScalar(0), length = Nq[1], stop = 1)\n        g_y = range(PetscScalar(0), length = Nq[2], stop = 1)\n        \n        l_x = g_x[(corners.lower[1]):(corners.upper[1])]\n        l_y = g_y[(corners.lower[2]):(corners.upper[2])]\n        \n        PETSc.withlocalarray!(petsc_b; read = false) do b\n            b = reshape(b, Int64(corners.size[1]), Int64(corners.size[2]))\n            b .= forcing.(l_x, l_y')\n            \n            if corners.lower[1] == 1\n                b[1, :] .= exact.(l_x[1], l_y)\n            end\n            if corners.lower[2] == 1\n                b[:, 1] .= exact.(l_x, l_y[1])\n            end\n            if corners.upper[1] == Nq[1]\n                b[end, :] .= exact.(l_x[end], l_y)\n            end\n            if corners.upper[2] == Nq[2]\n                b[:, end] .= exact.(l_x, l_y[end])\n            end\n        end\n        \n        return 0\n    end\n    \n    # Solve the problem and time it\n    t_start = time()\n    PETSc.solve!(ksp)\n    t_solve = time() - t_start\n    \n    # Check convergence and get iteration count\n    reason = PETSc.LibPETSc.KSPGetConvergedReason(petsclib, ksp)\n    niter = PETSc.LibPETSc.KSPGetIterationNumber(petsclib, ksp)\n    if Integer(reason) < 0 && MPI.Comm_rank(comm) == 0\n        @warn \"KSP diverged for N=$N with reason: $reason\"\n    end\n    \n    # Get the solution and compute error\n    sol = PETSc.get_solution(ksp)\n    corners = PETSc.getcorners(da)\n    Nq = PETSc.getinfo(da).global_size[1:2]\n    \n    g_x = range(PetscScalar(0), length = Nq[1], stop = 1)\n    g_y = range(PetscScalar(0), length = Nq[2], stop = 1)\n    \n    l_x = g_x[(corners.lower[1]):(corners.upper[1])]\n    l_y = g_y[(corners.lower[2]):(corners.upper[2])]\n    \n    Δx = PetscScalar(l_x.step)\n    \n    x = sol[:]\n    u = reshape(x, corners.size[1], corners.size[2])\n    \n    # Compute error only in interior (excluding boundaries)\n    loc_err2_sum = 0.0\n    loc_max_err = 0.0\n    loc_npts = 0\n    \n    for i in 1:length(l_x)\n        for j in 1:length(l_y)\n            gi = corners.lower[1] + i - 1\n            gj = corners.lower[2] + j - 1\n            \n            if gi > 1 && gi < Nq[1] && gj > 1 && gj < Nq[2]\n                err = abs(u[i,j] - exact(l_x[i], l_y[j]))\n                loc_err2_sum += err^2\n                loc_max_err = max(loc_max_err, err)\n                loc_npts += 1\n            end\n        end\n    end\n    \n    root = 0\n    err2_sum = MPI.Reduce(loc_err2_sum, +, root, comm)\n    npts_total = MPI.Reduce(loc_npts, +, root, comm)\n    max_err = MPI.Reduce(loc_max_err, max, root, comm)\n    \n    L2_error = nothing\n    if root == MPI.Comm_rank(comm)\n        L2_error = sqrt(err2_sum / npts_total)\n    end\n    \n    # Return u for visualization (only needed for single solve mode)\n    return L2_error, max_err, Δx, reason, niter, t_solve, u, l_x, l_y, ksp, da\nend\n\n\"\"\"\n    run_convergence_analysis(petsclib, comm, grid_sizes, opts; mg_levels_list=nothing, mg_levels_override=nothing)\n\nRun a convergence analysis for the specified grid sizes and return errors and mesh spacings.\nFor multigrid solvers:\n- If mg_levels_list is provided, uses the specified level for each grid\n- If mg_levels_override is provided, uses that fixed level for all grids\n- Otherwise, automatically scales levels with grid size\n\"\"\"\nfunction run_convergence_analysis(petsclib, comm, grid_sizes, opts; mg_levels_list=nothing, mg_levels_override=nothing)\n    L2_errors = Float64[]\n    max_errors = Float64[]\n    h_values = Float64[]\n    iterations = Int[]\n    solve_times = Float64[]\n    mg_levels_used = Union{Int,Nothing}[]\n    \n    # Check if using multigrid\n    using_mg = get(opts, :pc_type, nothing) == \"mg\"\n    \n    for (i, N) in enumerate(grid_sizes)\n        # Determine MG levels for this grid\n        mg_levels = if mg_levels_list !== nothing\n            mg_levels_list[i]\n        elseif mg_levels_override !== nothing\n            mg_levels_override\n        elseif using_mg\n            i + 2  # Auto-scale: N=17→3, N=33→4, N=65→5, etc.\n        else\n            nothing\n        end\n        \n        if using_mg && MPI.Comm_rank(comm) == 0\n            println(\"  Solving N=$N with $mg_levels MG levels...\")\n        end\n        \n        # For the first grid, run twice to exclude compilation time\n        if i == 1\n            # Warmup run (discard results)\n            L2_err_warmup, max_err_warmup, h_warmup, reason_warmup, niter_warmup, t_warmup, u_warmup, l_x_warmup, l_y_warmup, ksp_warmup, da_warmup = solve_laplacian(petsclib, comm, N, opts; mg_levels=mg_levels)\n            PETSc.destroy(ksp_warmup)\n            PETSc.destroy(da_warmup)\n        end\n        \n        # Actual run (record results)\n        L2_err, max_err, h, reason, niter, t_solve, u, l_x, l_y, ksp, da = solve_laplacian(petsclib, comm, N, opts; mg_levels=mg_levels)\n        \n        if MPI.Comm_rank(comm) == 0\n            push!(L2_errors, L2_err)\n            push!(max_errors, max_err)\n            push!(h_values, h)\n            push!(iterations, niter)\n            push!(solve_times, t_solve)\n            push!(mg_levels_used, mg_levels)\n        end\n        \n        # Clean up\n        PETSc.destroy(ksp)\n        PETSc.destroy(da)\n    end\n    \n    return L2_errors, max_errors, h_values, iterations, solve_times, mg_levels_used\nend\n\n\"\"\"\n    report_convergence_results(grid_sizes, L2_errors, max_errors, h_values, iterations, solve_times, mg_levels_used)\n\nPrint a formatted table of convergence results and compute convergence orders.\n\"\"\"\nfunction report_convergence_results(grid_sizes, L2_errors, max_errors, h_values, iterations, solve_times, mg_levels_used)\n    println(\"\\n\" * \"=\"^115)\n    println(\"Convergence Analysis Results\")\n    println(\"=\"^115)\n    @printf(\"%-8s %-8s %-12s %-12s %-10s %-12s %-6s %-8s %-12s\\n\", \n            \"N\", \"MG Lvls\", \"h\", \"L2 Error\", \"L2 Order\", \"Max Error\", \"Iters\", \"Time(s)\", \"Time Order\")\n    println(\"-\"^115)\n    \n    for i in 1:length(grid_sizes)\n        N = grid_sizes[i]\n        h = h_values[i]\n        L2_err = L2_errors[i]\n        max_err = max_errors[i]\n        niter = iterations[i]\n        t_solve = solve_times[i]\n        mg_lvl = mg_levels_used[i]\n        mg_str = isnothing(mg_lvl) ? \"---\" : string(mg_lvl)\n        \n        if i == 1\n            @printf(\"%-8d %-8s %-12.6e %-12.6e %-10s %-12.6e %-6d %-8.4f %-12s\\n\",\n                N, mg_str, h, L2_err, \"---\", max_err, niter, t_solve, \"---\")\n        else\n            L2_order = log(L2_errors[i-1] / L2_errors[i]) / log(h_values[i-1] / h_values[i])\n            # Compute time scaling relative to expected complexity for 2D problems\n            # Total unknowns = N² (2D grid)\n            # Optimal multigrid: O(N²) work, so when N doubles, expect time × 4\n            # Sparse direct solver (2D): O(N³) for optimal ordering, so when N doubles, expect time × 8\n            # time_order = actual_ratio / expected_O(N²)_ratio\n            # For MG: Time Order ≈ 1.0 means optimal O(N²) scaling\n            # For sparse direct: Time Order ≈ 2.0 means optimal O(N³) scaling\n            N_ratio = grid_sizes[i] / grid_sizes[i-1]\n            expected_time_ratio = N_ratio^2  # Always compare to O(N²)\n            actual_time_ratio = solve_times[i] / solve_times[i-1]\n            time_order = actual_time_ratio / expected_time_ratio\n            @printf(\"%-8d %-8s %-12.6e %-12.6e %-10.6f %-12.6e %-6d %-8.4f %-12.6f\\n\",\n                N, mg_str, h, L2_err, L2_order, max_err, niter, t_solve, time_order)\n        end\n    end\n    \n    println(\"-\"^115)\n    \n    if length(L2_errors) > 1\n        # Compute average convergence order\n        avg_L2_order = mean([log(L2_errors[i-1] / L2_errors[i]) / log(h_values[i-1] / h_values[i]) \n                             for i in 2:length(L2_errors)])\n        \n        println(\"\\nSummary:\")\n        println(@sprintf(\"  Average L2 convergence order: %.4f\", avg_L2_order))\n        println(\"  Expected order for 2nd-order FD: 2.0000\")\n        \n        if avg_L2_order > 1.95 && avg_L2_order < 2.05\n            println(\"  ✓ Convergence test PASSED (within 2.5% of expected)\")\n        else\n            println(\"  ✗ Convergence test FAILED (not within 2.5% of expected)\")\n        end\n        \n        println(\"\\nNote:\")\n        println(\"  Time Order shows actual time ratio / expected O(N²) ratio for 2D problem (N×N grid)\")\n        println(\"  Optimal multigrid: Time Order ≈ 1.0 (O(N²) = O(total unknowns))\")\n        println(\"  Optimal sparse direct (2D): Time Order ≈ 2.0 (O(N³) with nested dissection)\")\n    end\n    println(\"=\"^90)\nend\n\n# Parse options\nopts = if !isinteractive()\n    PETSc.parse_options(ARGS)\nelse\n    (ksp_monitor = false, ksp_type = \"preonly\", pc_type = \"lu\", ksp_rtol = 1e-12)\nend\n\n# Check if single solve is requested (default is convergence test)\nrun_single_solve = haskey(opts, :single_solve) || (!isinteractive() && \"single_solve\" in ARGS)\n\n# Parse grid sizes\n# Option 1: -grids 17,33,65,129 (comma-separated list)\n# Option 2: -N_min 17 -N_max 129 (auto-generate sequence)\ngrid_sizes = nothing\nif haskey(opts, :grids)\n    grids_str = opts[:grids]\n    grid_sizes = parse.(Int, split(grids_str, ','))\nelse\n    # Default: N=17 to N=129\n    N_min = parse(Int, get(opts, :N_min, \"17\"))\n    N_max = parse(Int, get(opts, :N_max, \"129\"))\nend\n\n# Parse MG levels\n# Option 1: -mg_levels_list 3,4,5,6 (one per grid, comma-separated)\n# Option 2: -mg_levels 5 (fixed for all grids)\n# Option 3: auto-scale (default if using MG)\nmg_levels_list = nothing\nmg_levels_override = nothing\nif haskey(opts, :mg_levels_list)\n    levels_str = opts[:mg_levels_list]\n    mg_levels_list = parse.(Int, split(levels_str, ','))\nelseif haskey(opts, :mg_levels)\n    mg_levels_override = parse(Int, opts[:mg_levels])\nend\n\n# Set our MPI communicator\ncomm = MPI.COMM_WORLD\n\n# Set our PETSc Scalar Type\nPetscScalar = Float64\n\n# get the PETSc lib with our chosen `PetscScalar` type\npetsclib = PETSc.petsclibs[1]\n#petsclib = PETSc.getlib(; PetscScalar = PetscScalar)\n\n# Initialize PETSc\nPETSc.initialize(petsclib)\n\nif !run_single_solve\n    # Run convergence analysis\n    if MPI.Comm_rank(comm) == 0\n        println(\"\\nRunning convergence analysis...\")\n        solver_type = get(opts, :pc_type, \"lu\")\n        println(\"Using solver: $solver_type\")\n        if solver_type == \"mg\"\n            if mg_levels_list !== nothing\n                println(\"  MG levels: $mg_levels_list (per-grid)\")\n            elseif mg_levels_override !== nothing\n                println(\"  MG levels: $mg_levels_override (fixed)\")\n            else\n                println(\"  MG levels will scale with grid refinement\")\n            end\n        end\n        if haskey(opts, :pc_factor_mat_solver_type)\n            println(\"  Matrix solver: $(opts[:pc_factor_mat_solver_type])\")\n        end\n    end\n    \n    # Generate or use provided grid sizes\n    if grid_sizes === nothing\n        # Auto-generate: 17, 33, 65, 129, 257, 513, ...\n        # Pattern: 2^n + 1 for n = 4, 5, 6, ...\n        grid_sizes = Int[]\n        let N = 17\n            while N <= N_max\n                if N >= N_min\n                    push!(grid_sizes, N)\n                end\n                N = 2*N - 1  # Next value in sequence: 17->33, 33->65, etc.\n            end\n        end\n    end\n    \n    # Validate mg_levels_list length if provided\n    if mg_levels_list !== nothing && length(mg_levels_list) != length(grid_sizes)\n        error(\"Number of MG levels ($(length(mg_levels_list))) must match number of grids ($(length(grid_sizes)))\")\n    end\n    \n    if MPI.Comm_rank(comm) == 0\n        println(\"Grid sizes: $grid_sizes\")\n    end\n    \n    # Pass mg_levels info to the convergence analysis\n    L2_errors, max_errors, h_values, iterations, solve_times, mg_levels_used = run_convergence_analysis(\n        petsclib, comm, grid_sizes, opts; mg_levels_list=mg_levels_list, mg_levels_override=mg_levels_override)\n    \n    if MPI.Comm_rank(comm) == 0\n        report_convergence_results(grid_sizes, L2_errors, max_errors, h_values, iterations, solve_times, mg_levels_used)\n    end\nelse\n    # Run single solve with visualization\n    N = 65\n    L2_err, max_err, h, reason, niter, t_solve, u, l_x, l_y, ksp, da = solve_laplacian(petsclib, comm, N, opts)\n    \n    # Report convergence status\n    if MPI.Comm_rank(comm) == 0\n        if Integer(reason) > 0\n            println(\"KSP converged with reason: $reason\")\n        elseif Integer(reason) < 0\n            println(\"WARNING: KSP diverged with reason: $reason\")\n        else\n            println(\"KSP still iterating: $reason\")\n        end\n        \n        println(@sprintf(\"L2-error (interior): %.6e\", L2_err))\n        println(@sprintf(\"Max-error (interior): %.6e\", max_err))\n        println(@sprintf(\"Mesh spacing h: %.6e\", h))\n    end\n    \n    # If we only have 1 MPI rank we plot the solution and error\n    if isinteractive() && MPI.Comm_size(comm) == 1\n        display(heatmap(u, zlabel = \"sol\"))\n        display(heatmap(u - exact.(l_x, l_y'), zlabel = \"error\"))\n    end\n    \n    # Clean up\n    PETSc.destroy(ksp)\n    PETSc.destroy(da)\nend\n\nPETSc.finalize(petsclib)\n\nnothing\n\n"
  },
  {
    "path": "examples/dmstag_ex8.jl",
    "content": "# INCLUDE IN MPI TEST\n# PETSc DMStag tutorial ex8.c\n# Solves the 1D Poisson equation on a vertex-centered DMStag grid,\n# demonstrating the simplest use of geometric multigrid.\n#\n#   -u''(x) = f(x)  on [0, 1]\n#   u(0) = 0,  u(1) = 0   (Dirichlet BCs)\n#   f(x) = x - 0.5          (source term, scaled by h²)\n#\n# The second-order FD stencil on vertices is:\n#   (u[i-1] - 2*u[i] + u[i+1]) = h² * f(x_i)\n#\n# Usage:\n#   julia --project=. examples/dmstag_ex8.jl\n#   julia --project=. examples/dmstag_ex8.jl -pc_type mg -pc_mg_galerkin -pc_mg_levels 4\n#   mpiexec -n 2 julia --project=. examples/dmstag_ex8.jl -pc_type mg -pc_mg_galerkin -pc_mg_levels 7 -stag_grid_x 512 -ksp_converged_reason\n\nusing PETSc, MPI\n\nif !MPI.Initialized()\n    MPI.Init()\nend\n\npetsclib = first(PETSc.petsclibs)\nPETSc.initialized(petsclib) || PETSc.initialize(petsclib)\n\nPetscScalar = PETSc.scalartype(petsclib)\nPetscInt    = PETSc.inttype(petsclib)\n\n# ── Parse command-line options ──────────────────────────────────────────────\ncli = PETSc.parse_options(ARGS)\nopts = (; [(k => cli[k]) for k in keys(cli)]...)\n\n# ── Create 1D DMStag ────────────────────────────────────────────────────────\n# 1 DOF per vertex (0-cells), 0 DOF per element (1-cells)\ncomm = MPI.COMM_WORLD\n\ndm = PETSc.DMStag(petsclib, comm,\n    (PETSc.DM_BOUNDARY_NONE,),       # boundary type\n    (8,),                              # global element count (overridable via -stag_grid_x)\n    (1, 0),                            # (dof_vertex, dof_element)\n    1,                                 # stencil width\n    PETSc.DMSTAG_STENCIL_BOX;\n    opts...)\n\n# ── Assemble the linear system  Ax = b ──────────────────────────────────────\n\nfunction assemble_system!(dm, petsclib, PetscScalar, PetscInt)\n    A   = LibPETSc.DMCreateMatrix(petsclib, dm)\n    b   = PETSc.DMGlobalVec(dm)\n\n    corners = PETSc.getcorners_dmstag(dm)\n    N       = size(dm)[1]       # global element count  (= number of intervals)\n    n_extra = corners.nextra[1] # 1 on the rightmost rank, 0 elsewhere\n\n    # Loop over owned elements, including the extra partial element on the\n    # rightmost rank (which holds the right-boundary vertex N).\n    for e in (corners.lower[1] - 1) : (corners.upper[1] - 1 + n_extra)\n        # Stencil row for the LEFT vertex of element e  (vertex index = e)\n        row = LibPETSc.DMStagStencil(\n            LibPETSc.DMSTAG_LEFT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0))\n\n        if e == 0\n            # ── Left boundary: Dirichlet u(0) = 0 ──\n            LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A,\n                PetscInt(1), [row],\n                PetscInt(1), [row],\n                PetscScalar[1.0],\n                PETSc.INSERT_VALUES)\n\n        elseif e == N\n            # ── Right boundary: Dirichlet u(1) = 0 ──\n            LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A,\n                PetscInt(1), [row],\n                PetscInt(1), [row],\n                PetscScalar[1.0],\n                PETSc.INSERT_VALUES)\n\n        else\n            # ── Interior: standard 3-point Laplacian stencil ──\n            col = [\n                LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, PetscInt(e - 1), PetscInt(0), PetscInt(0), PetscInt(0)),\n                LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, PetscInt(e),     PetscInt(0), PetscInt(0), PetscInt(0)),\n                LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, PetscInt(e + 1), PetscInt(0), PetscInt(0), PetscInt(0)),\n            ]\n            val = PetscScalar[1.0, -2.0, 1.0]\n\n            LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A,\n                PetscInt(1), [row],\n                PetscInt(3), col,\n                val,\n                PETSc.INSERT_VALUES)\n        end\n\n        # ── Right-hand side (forcing) ──\n        h = PetscScalar(1.0 / N)\n        x = PetscScalar(e) / PetscScalar(N)\n        f = (x - PetscScalar(0.5)) * h * h        # scaled by h²\n\n        LibPETSc.DMStagVecSetValuesStencil(petsclib, dm, b,\n            PetscInt(1), [row],\n            PetscScalar[f],\n            PETSc.INSERT_VALUES)\n    end\n\n    PETSc.assemble!(A)\n    PETSc.assemble!(b)\n\n    return A, b\nend\n\nA, b = assemble_system!(dm, petsclib, PetscScalar, PetscInt)\n\n# ── Solve ────────────────────────────────────────────────────────────────────\n# Create KSP from the DM (enables geometric multigrid via DM hierarchy),\n# then set operators and disable DM-active mode (we supply our own A).\nksp = PETSc.KSP(dm;\n    ksp_type = \"fgmres\",\n    ksp_monitor = true,\n    ksp_converged_reason = true,\n    opts...)\n\nLibPETSc.KSPSetOperators(petsclib, ksp, A, A)\nLibPETSc.KSPSetDMActive(petsclib, ksp, LibPETSc.PETSC_FALSE)\n\n# Re-apply options so that command-line overrides (e.g. -pc_type mg) take effect\n# after KSPSetOperators / KSPSetDMActive\nif !isempty(opts)\n    popts = PETSc.Options(petsclib; opts...)\n    push!(popts)\n    LibPETSc.KSPSetFromOptions(petsclib, ksp)\n    pop!(popts)\nelse\n    LibPETSc.KSPSetFromOptions(petsclib, ksp)\nend\n\nx = similar(b)\nPETSc.solve!(x, ksp, b)\n\n# ── Check convergence ────────────────────────────────────────────────────────\nreason = LibPETSc.KSPGetConvergedReason(petsclib, ksp)\nif Integer(reason) < 0\n    error(\"Linear solve failed with reason $reason\")\nend\n\n# ── Optional: print solution on rank 0 ───────────────────────────────────────\nif MPI.Comm_rank(comm) == 0\n    N = size(dm)[1]\n    println(\"Solved 1D Poisson on $N elements ($(N+1) vertices)\")\nend\n\n# ── Cleanup ──────────────────────────────────────────────────────────────────\nPETSc.destroy(ksp)\nPETSc.destroy(A)\nPETSc.destroy(b)\nPETSc.destroy(x)\nPETSc.destroy(dm)\n"
  },
  {
    "path": "examples/ex1.jl",
    "content": "# 1D staggered FD example\nusing PETSc, MPI, LinearAlgebra, SparseArrays# ForwardDiff\n\nif ~MPI.Initialized()\n    MPI.Init()\nend\n\npetsclib = PETSc.petsclibs[1];\nPETSc.initialize(petsclib)\nPetscScalar = PETSc.scalartype(petsclib)\nPetscInt    = PETSc.inttype(petsclib)\nPetscReal   = real(PetscScalar)\n\n# ==========================================\n# Main code \n\ncomm = MPI.COMM_WORLD\n\n# Compute initial solution\nnx   =   10;\nx0   =   0;\nxend =   1;\n\n# create dmstag for solution and setup\ndm  = PETSc.DMStag(petsclib, comm,\n                            (PETSc.DM_BOUNDARY_NONE,),\n                            (nx,),\n                            (1,1),\n                            1,\n                            PETSc.DMSTAG_STENCIL_BOX)\n\n# create uniform coordinates\nLibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dm, PetscReal(x0), PetscReal(xend), PetscReal(0.0), PetscReal(1.0), PetscReal(0.0), PetscReal(1.0))\n\n#determine boundary type\nbnd =   LibPETSc.DMStagGetBoundaryTypes(petsclib, dm); \n\na = 1.0; b = 2.0; c = 1.0;\nif bnd[1] == PETSc.DM_BOUNDARY_PERIODIC  # bnd is now a tuple, check first element\n    b = a;\n    c = 0.0;\nend\n\n#Compute reference solution on the grid, using direct array access\nxa        = PETSc.DMGlobalVec(dm);\nxa_Local  = PETSc.DMLocalVec(dm);\nxa_array  = LibPETSc.DMStagVecGetArray(petsclib, dm, xa_Local);\ndm_coord  = LibPETSc.DMGetCoordinateDM(petsclib, dm)\nX_coord,_,_ = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, dm)\n\ncorners    =    PETSc.getcorners(dm);\n\n# Get the correct entries for each of our variables in local element-wise storage\niu = LibPETSc.DMStagGetLocationSlot(petsclib, dm, LibPETSc.DMSTAG_LEFT, PetscInt(0));\nip = LibPETSc.DMStagGetLocationSlot(petsclib, dm, LibPETSc.DMSTAG_ELEMENT, PetscInt(0));\n\n# These lines segfault - unclear why\n#ixu = LibPETSc.DMStagGetLocationSlot(petsclib, dm_coord, LibPETSc.DMSTAG_LEFT, PetscInt(0));\n#ixp = LibPETSc.DMStagGetLocationSlot(petsclib, dm_coord, LibPETSc.DMSTAG_ELEMENT, PetscInt(0));\n\n\nixu = iu\nixp = ip\n\n# analytical solution:\nxa_array[1:end  ,iu+1] .= a  .+ (b .- a .- (c./2.0)) .* X_coord[1:end,ixu+1] .+ (c./2.0).*X_coord[1:end,ixu+1].*X_coord[1:end,ixu+1];\nxa_array[1:end-1,ip+1] .= b .- a .- (c./2.0) .+ c .* X_coord[1:end-1,ixp+1];\n\nLibPETSc.DMStagVecRestoreArray(petsclib, dm, xa_Local, xa_array)\nLibPETSc.DMLocalToGlobalBegin(petsclib, dm, xa_Local, LibPETSc.INSERT_VALUES, xa)\nLibPETSc.DMLocalToGlobalEnd(petsclib, dm, xa_Local, LibPETSc.INSERT_VALUES, xa)\n#PETSc.dm_local_to_global!(xa_Local, xa, dm)\n\n\ndmForcing = LibPETSc.DMStagCreateCompatibleDMStag(petsclib, dm, PetscInt(1), PetscInt(0), PetscInt(0), PetscInt(0));\nf         = PETSc.DMGlobalVec(dmForcing);\nfLocal    = PETSc.DMLocalVec(dmForcing);\nf        .= c;\nfLocal   .= c;\n\nA   = LibPETSc.DMCreateMatrix(petsclib, dm);\nrhs = PETSc.DMGlobalVec(dm);\n\n\n# Construct rhs vector\nfor e in corners.lower[1]-1:corners.upper[1]-1\n\n    pos1 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n    val1 = PetscScalar(0.0);\n    LibPETSc.DMStagVecSetValuesStencil(petsclib, dm, rhs, PetscInt(1), [pos1], [val1], PETSc.INSERT_VALUES);\n\n    pos2 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n    if e == corners.lower[1]-1\n        val2 = PetscScalar(a);\n    else\n        val2 = LibPETSc.DMStagVecGetValuesStencil(petsclib, dmForcing, fLocal, PetscInt(1), [pos2])[1];\n    end\n    LibPETSc.DMStagVecSetValuesStencil(petsclib, dm, rhs, PetscInt(1), [pos2], [val2], PETSc.INSERT_VALUES);\n\n    if e == corners.upper[1]-1\n        pos3 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_RIGHT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n        val3 = PetscScalar(b);\n        LibPETSc.DMStagVecSetValuesStencil(petsclib, dm, rhs, PetscInt(1), [pos3], [val3], PETSc.INSERT_VALUES);\n    end\nend\n\nPETSc.assemble!(rhs)\n\n\n# Cinstruct matrix A\nfor e in corners.lower[1]-1:corners.upper[1]-1\n    # Note that PETSc ordering is zero-based \n    row = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n    if e == corners.lower[1]-1\n        val1 = PetscScalar(1.0);\n        LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row], PetscInt(1), [row], [val1], PETSc.INSERT_VALUES);\n    else\n        col1 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n        col2 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, PetscInt(e-1), PetscInt(0), PetscInt(0), PetscInt(0));\n\n        h   =  X_coord[2,1]-X_coord[1,1];\n        \n        val1 = PetscScalar(1.0/h);\n        val2 = PetscScalar(-1.0/h);\n        val3 = PetscScalar(0.0);\n\n        LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row], PetscInt(1), [col1], [val1], PETSc.INSERT_VALUES);\n        LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row], PetscInt(1), [col2], [val2], PETSc.INSERT_VALUES);\n        LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row], PetscInt(1), [row] , [val3], PETSc.INSERT_VALUES);\n    end\n    if e == corners.upper[1]-1\n        row2 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_RIGHT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n        val4 = PetscScalar(1.0)\n        LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row2], PetscInt(1), [row2], [val4], PETSc.INSERT_VALUES);\n    end\n\n    row  = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n    col1 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_RIGHT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n    col2 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, PetscInt(e), PetscInt(0), PetscInt(0), PetscInt(0));\n\n    #xu1 = LibPETSc.DMStagVecGetValuesStencil(petsclib, dm_coord, X_coord, PetscInt(1), [col1])[1];  # FIXME: Need to check if coordinate access is correct\n    #xu2 = LibPETSc.DMStagVecGetValuesStencil(petsclib, dm_coord, X_coord, PetscInt(1), [col2])[1];  # FIXME: Need to check if coordinate access is correct\n    xu1 = X_coord[2,1]\n    xu2 = X_coord[1,1]\n    h   = xu1-xu2;\n\n\n    val1 = PetscScalar(-1.0/h);\n    val2 = PetscScalar(1.0/h);\n    val3 = PetscScalar(1.0);\n\n    LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row], PetscInt(1), [col1], [val1], PETSc.INSERT_VALUES);\n    LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row], PetscInt(1), [col2], [val2], PETSc.INSERT_VALUES);\n    LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, A, PetscInt(1), [row], PetscInt(1), [row] , [val3], PETSc.INSERT_VALUES);\nend\n\nPETSc.assemble!(A)\n\n\n\nx   = PETSc.DMGlobalVec(dm);\nksp = PETSc.KSP(A);\nPETSc.solve!(x,ksp,rhs);\n\nxLocal    = PETSc.DMLocalVec(dm);\nLibPETSc.DMGlobalToLocalBegin(petsclib, dm, x, LibPETSc.INSERT_VALUES, xLocal)\nLibPETSc.DMGlobalToLocalEnd(petsclib, dm, x, LibPETSc.INSERT_VALUES, xLocal)\n#PETSc.dm_global_to_local!(x, xLocal, dm)\n\n\n# get the local solution array:\nxsolution_array  = LibPETSc.DMStagVecGetArray(petsclib, dm, xLocal);\n\n# TODO: DMStagGetGhostArrayLocationSlot needs review - may not be available or may need different signature\n#xu = LibPETSc.DMStagGetGhostArrayLocationSlot(petsclib, dm, xLocal, PETSc.DMSTAG_LEFT, PetscInt(0));\n#xp = LibPETSc.DMStagGetGhostArrayLocationSlot(petsclib, dm, xLocal, PETSc.DMSTAG_ELEMENT, PetscInt(0));\n\niu = LibPETSc.DMStagGetLocationSlot(petsclib, dm, LibPETSc.DMSTAG_LEFT, PetscInt(0))\nip = LibPETSc.DMStagGetLocationSlot(petsclib, dm, LibPETSc.DMSTAG_ELEMENT, PetscInt(0))\n#ip = LibPETSc.DMStagGetGhostArrayLocationSlot(petsclib, dm, xLocal, PETSc.DMSTAG_ELEMENT, PetscInt(0));\n\n#print(\"u_array = \",xu,\"\\np_array = \",xp,\"\\n\");\n\nxa_norm    = LinearAlgebra.norm(xa);\nerror      = xa[:].-x[:]\nerror_norm = LinearAlgebra.norm(error);\nerrRel     = error_norm/xa_norm;\n\nprint(\"Error (abs): \",error_norm,\"\\nError (rel): \",errRel,\"\\n\");\n\nPETSc.destroy(dmForcing);\nPETSc.destroy(dm_coord);\nPETSc.destroy(fLocal);\nPETSc.destroy(f);\nPETSc.destroy(dm);\nPETSc.destroy(xa_Local);\nPETSc.destroy(xa);\nPETSc.destroy(xLocal);\nPETSc.destroy(x);\nPETSc.destroy(rhs);\n#PETSc.destroy(ksp);\nPETSc.destroy(A);\nPETSc.finalize(petsclib)\n\nreturn nothing"
  },
  {
    "path": "examples/ex16.jl",
    "content": "using PETSc, MPI, Printf\n\n# Van der Pol example adapted from PETSc TS tutorial `ex16.c`, see\n# https://petsc.org/main/src/ts/tutorials/ex16.c.html.\n#\n# The second-order ODE\n#\n#     y'' - mu * ((1 - y^2) * y' - y) = 0\n#\n# is rewritten as the first-order system\n#\n#     u1_t = u2\n#     u2_t = mu * ((1 - u1^2) * u2 - u1)\n#\n# and then split into explicit and implicit pieces for IMEX timestepping:\n#\n#     G(u, t) = [u2, 0]\n#     F(u_t, u, t) = [u1_t, u2_t - mu * ((1 - u1^2) * u2 - u1)]\n#\n# with the special case `imex = false` folding `u2` back into the implicit\n# residual, matching the upstream example.\n\nmutable struct Ex16Context{\n    PetscLib <: PETSc.LibPETSc.PetscLibType,\n    PetscReal <: Real,\n}\n    petsclib::PetscLib\n    mu::PetscReal\n    imex::Bool\n    next_output::PetscReal\nend\n\n# In Julia it is common to load this file once and call `solve_ex16(...)`\n# repeatedly from the same interactive session. The custom `myark2` ARKIMEX\n# method therefore needs a small \"register once per PETSc lifetime\" guard so we\n# do not try to re-register it on every solve. The upstream PETSc C example\n# does not need this bookkeeping because it is a one-shot program: it starts,\n# registers the method, runs once, and exits.\nconst EX16_REGISTERED_AGES = IdDict{Any, Int}()\n\n# Split parsed command-line options into:\n# - example-specific options handled directly in this file (`mu`, `imex`,\n#   `monitor`)\n# - all remaining PETSc solver options, which we still want to forward to\n#   `TSSetFromOptions`\nfunction ex16_solver_options(parsed_options::NamedTuple)\n    filtered_pairs = Pair{Symbol, Union{String, Nothing}}[]\n    for (key, value) in pairs(parsed_options)\n        key in (:mu, :imex, :monitor) && continue\n        push!(filtered_pairs, key => value)\n    end\n    return (; filtered_pairs...)\nend\n\n# Read the example-specific runtime options (`mu`, `imex`, `monitor`) using\n# PETSc's own option-query routines so this part stays close to the upstream C\n# example. This complements `ex16_solver_options(...)`: that function filters\n# these keys out before the remaining options are passed on to\n# `TSSetFromOptions`.\nfunction ex16_runtime_options(\n    petsclib,\n    parsed_options::NamedTuple;\n    mu::Real,\n    imex::Bool,\n    monitor::Bool,\n)\n    PetscReal = petsclib.PetscReal\n    query_options = PETSc.Options(petsclib; parsed_options...)\n\n    try\n        mu_value, mu_set =\n            PETSc.LibPETSc.PetscOptionsGetReal(petsclib, query_options, \"\", \"-mu\")\n        imex_value, imex_set =\n            PETSc.LibPETSc.PetscOptionsGetBool(petsclib, query_options, \"\", \"-imex\")\n        monitor_value, monitor_set =\n            PETSc.LibPETSc.PetscOptionsGetBool(petsclib, query_options, \"\", \"-monitor\")\n\n        return (\n            mu = Bool(mu_set) ? PetscReal(mu_value) : PetscReal(mu),\n            imex = Bool(imex_set) ? Bool(imex_value) : imex,\n            monitor = Bool(monitor_set) ? Bool(monitor_value) : monitor,\n        )\n    finally\n        PETSc.destroy(query_options)\n    end\nend\n\nfunction ex16_register_myark2!(petsclib)\n    get(EX16_REGISTERED_AGES, petsclib, -1) == petsclib.age && return nothing\n\n    # For the stage tables `At` and `A`, PETSc expects flat vectors in row-major\n    # order, matching the layout used by C arrays.\n    PetscReal = petsclib.PetscReal\n    A = PetscReal[\n        0.0, 0.0, 0.0,\n        0.41421356237309504880, 0.0, 0.0,\n        0.75, 0.25, 0.0,\n    ]\n    At = PetscReal[\n        0.0, 0.0, 0.0,\n        0.12132034355964257320, 0.29289321881345247560, 0.0,\n        0.20710678118654752440, 0.5, 0.29289321881345247560,\n    ]\n\n    PETSc.LibPETSc.TSARKIMEXRegister(\n        petsclib,\n        \"myark2\",\n        2,\n        3,\n        At,\n        nothing,\n        nothing,\n        A,\n        nothing,\n        nothing,\n        nothing,\n        nothing,\n        0,\n        nothing,\n        nothing,\n    )\n    EX16_REGISTERED_AGES[petsclib] = petsclib.age\n    return nothing\nend\n\n\"\"\"\n    ex16_rhs!\n\nRight-hand side callback for the explicit part of the van der Pol split.\n\"\"\"\nfunction ex16_rhs!(\n    ::PETSc.LibPETSc.CTS,\n    ::PETSc.LibPETSc.PetscReal,\n    x_ptr::PETSc.LibPETSc.CVec,\n    f_ptr::PETSc.LibPETSc.CVec,\n    ctx_ptr::Ptr{Cvoid},\n)::PETSc.LibPETSc.PetscErrorCode\n    ctx = unsafe_pointer_to_objref(ctx_ptr)::Ex16Context\n    petsclib = ctx.petsclib\n    x = PETSc.VecPtr(petsclib, x_ptr, false)\n    f = PETSc.VecPtr(petsclib, f_ptr, false)\n\n    PETSc.withlocalarray!(\n        (x, f);\n        read = (true, false),\n        write = (false, true),\n    ) do x_array, f_array\n        f_array[1] = ctx.imex ? x_array[2] : 0.0\n        f_array[2] = 0.0\n    end\n\n    return PETSc.LibPETSc.PetscErrorCode(0)\nend\n\nconst EX16_RHS_FUNCTION_PTR = @cfunction(\n    ex16_rhs!,\n    PETSc.LibPETSc.PetscErrorCode,\n    (\n        PETSc.LibPETSc.CTS,\n        PETSc.LibPETSc.PetscReal,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        Ptr{Cvoid},\n    ),\n)\n\n\"\"\"\n    ex16_ifunction!\n\nImplicit residual callback for the van der Pol problem.\n\"\"\"\nfunction ex16_ifunction!(\n    ::PETSc.LibPETSc.CTS,\n    ::PETSc.LibPETSc.PetscReal,\n    x_ptr::PETSc.LibPETSc.CVec,\n    xdot_ptr::PETSc.LibPETSc.CVec,\n    f_ptr::PETSc.LibPETSc.CVec,\n    ctx_ptr::Ptr{Cvoid},\n)::PETSc.LibPETSc.PetscErrorCode\n    ctx = unsafe_pointer_to_objref(ctx_ptr)::Ex16Context\n    petsclib = ctx.petsclib\n    x = PETSc.VecPtr(petsclib, x_ptr, false)\n    xdot = PETSc.VecPtr(petsclib, xdot_ptr, false)\n    f = PETSc.VecPtr(petsclib, f_ptr, false)\n\n    PETSc.withlocalarray!(\n        (x, xdot, f);\n        read = (true, true, false),\n        write = (false, false, true),\n    ) do x_array, xdot_array, f_array\n        f_array[1] = xdot_array[1] + (ctx.imex ? 0.0 : x_array[2])\n        f_array[2] =\n            xdot_array[2] - ctx.mu * ((1.0 - x_array[1] * x_array[1]) * x_array[2] - x_array[1])\n    end\n\n    return PETSc.LibPETSc.PetscErrorCode(0)\nend\n\nconst EX16_IFUNCTION_PTR = @cfunction(\n    ex16_ifunction!,\n    PETSc.LibPETSc.PetscErrorCode,\n    (\n        PETSc.LibPETSc.CTS,\n        PETSc.LibPETSc.PetscReal,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        Ptr{Cvoid},\n    ),\n)\n\n# PETSc's IMEX TS interface does not ask for the Jacobian of the full ODE\n# right-hand side `u_t = f(u, t)`. It asks for the shifted Jacobian\n# corresponding to the implicit residual supplied via `TSSetIFunction`, with\n# the time-derivative contribution folded in through the scalar `a` passed to\n# `IJacobian`. In this example\n#   `G(u, t) = [u2, 0]`\n#   `F(u_t, u, t) = [u1_t + (imex ? 0 : u2),\n#                    u2_t - mu * ((1 - u1^2) * u2 - u1)]`\n# so the 2x2 entries assembled below match that residual, not the explicit\n# `RHSFunction` alone.\nfunction ex16_fill_ijacobian!(\n    A::PETSc.LibPETSc.PetscMat,\n    B::PETSc.LibPETSc.PetscMat,\n    a,\n    x1,\n    x2,\n    ctx::Ex16Context,\n)\n    PetscScalar = ctx.petsclib.PetscScalar\n    mu = ctx.mu\n\n    A[1, 1] = PetscScalar(a)\n    A[1, 2] = PetscScalar(ctx.imex ? 0.0 : 1.0)\n    A[2, 1] = PetscScalar(mu * (2.0 * x1 * x2 + 1.0))\n    A[2, 2] = PetscScalar(a - mu * (1.0 - x1 * x1))\n    PETSc.assemble!(A)\n\n    if B.ptr != A.ptr\n        B[1, 1] = PetscScalar(a)\n        B[1, 2] = PetscScalar(ctx.imex ? 0.0 : 1.0)\n        B[2, 1] = PetscScalar(mu * (2.0 * x1 * x2 + 1.0))\n        B[2, 2] = PetscScalar(a - mu * (1.0 - x1 * x1))\n        PETSc.assemble!(B)\n    end\n\n    return nothing\nend\n\n\"\"\"\n    ex16_ijacobian!\n\nImplicit Jacobian callback corresponding to `ex16.c`.\n\"\"\"\nfunction ex16_ijacobian!(\n    ::PETSc.LibPETSc.CTS,\n    ::PETSc.LibPETSc.PetscReal,\n    x_ptr::PETSc.LibPETSc.CVec,\n    ::PETSc.LibPETSc.CVec,\n    a::PETSc.LibPETSc.PetscReal,\n    A_ptr::PETSc.LibPETSc.CMat,\n    B_ptr::PETSc.LibPETSc.CMat,\n    ctx_ptr::Ptr{Cvoid},\n)::PETSc.LibPETSc.PetscErrorCode\n    ctx = unsafe_pointer_to_objref(ctx_ptr)::Ex16Context\n    petsclib = ctx.petsclib\n    x = PETSc.VecPtr(petsclib, x_ptr, false)\n    A = PETSc.LibPETSc.PetscMat(A_ptr, petsclib)\n    B = PETSc.LibPETSc.PetscMat(B_ptr, petsclib)\n\n    x1, x2 = PETSc.withlocalarray!(x; read = true, write = false) do x_array\n        (x_array[1], x_array[2])\n    end\n\n    ex16_fill_ijacobian!(A, B, a, x1, x2, ctx)\n    return PETSc.LibPETSc.PetscErrorCode(0)\nend\n\nconst EX16_IJACOBIAN_PTR = @cfunction(\n    ex16_ijacobian!,\n    PETSc.LibPETSc.PetscErrorCode,\n    (\n        PETSc.LibPETSc.CTS,\n        PETSc.LibPETSc.PetscReal,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.PetscReal,\n        PETSc.LibPETSc.CMat,\n        PETSc.LibPETSc.CMat,\n        Ptr{Cvoid},\n    ),\n)\n\n\"\"\"\n    ex16_monitor!\n\nOptional monitor callback that interpolates the TS solution at multiples of\n`0.1`, mirroring the upstream example.\n\"\"\"\nfunction ex16_monitor!(\n    ts_ptr::PETSc.LibPETSc.CTS,\n    step::PETSc.LibPETSc.PetscInt,\n    t::PETSc.LibPETSc.PetscReal,\n    x_ptr::PETSc.LibPETSc.CVec,\n    ctx_ptr::Ptr{Cvoid},\n)::PETSc.LibPETSc.PetscErrorCode\n    ctx = unsafe_pointer_to_objref(ctx_ptr)::Ex16Context\n    petsclib = ctx.petsclib\n    ts = PETSc.LibPETSc.TS(ts_ptr, petsclib)\n    x = PETSc.VecPtr(petsclib, x_ptr, false)\n    dt = PETSc.LibPETSc.TSGetTimeStep(petsclib, ts)\n    tfinal = PETSc.LibPETSc.TSGetMaxTime(petsclib, ts)\n\n    while ctx.next_output <= t && ctx.next_output <= tfinal\n        # `x` is a borrowed `VecPtr` from PETSc's callback interface, so create\n        # an owning work vector explicitly instead of calling `similar(x)`.\n        interpolated_x = PETSc.VecSeq(petsclib, length(x))\n        try\n            PETSc.LibPETSc.TSInterpolate(\n                petsclib,\n                ts,\n                petsclib.PetscReal(ctx.next_output),\n                interpolated_x,\n            )\n            PETSc.withlocalarray!(interpolated_x; read = true, write = false) do x_array\n                @printf(\n                    \"[%.1f] %d TS %.6f (dt = %.6f) X % 12.6e % 12.6e\\n\",\n                    ctx.next_output,\n                    step,\n                    t,\n                    dt,\n                    x_array[1],\n                    x_array[2],\n                )\n            end\n        finally\n            PETSc.destroy(interpolated_x)\n        end\n\n        ctx.next_output += 0.1\n    end\n\n    return PETSc.LibPETSc.PetscErrorCode(0)\nend\n\nconst EX16_MONITOR_PTR = @cfunction(\n    ex16_monitor!,\n    PETSc.LibPETSc.PetscErrorCode,\n    (\n        PETSc.LibPETSc.CTS,\n        PETSc.LibPETSc.PetscInt,\n        PETSc.LibPETSc.PetscReal,\n        PETSc.LibPETSc.CVec,\n        Ptr{Cvoid},\n    ),\n)\n\nfunction ex16_create_jacobian_template(petsclib)\n    PetscScalar = petsclib.PetscScalar\n    jac = PETSc.MatSeqAIJ(petsclib, 2, 2, petsclib.PetscInt(2))\n    jac[1, [1, 2]] = PetscScalar.([1.0, 1.0])\n    jac[2, [1, 2]] = PetscScalar.([1.0, 1.0])\n    PETSc.assemble!(jac)\n    PETSc.LibPETSc.MatZeroEntries(petsclib, jac)\n    return jac\nend\n\nfunction ex16_initial_condition!(u::PETSc.LibPETSc.PetscVec, mu::Real)\n    PETSc.withlocalarray!(u; read = false, write = true) do u_array\n        u_array[1] = 2.0\n        u_array[2] = -2.0 / 3.0 + 10.0 / (81.0 * mu) - 292.0 / (2187.0 * mu * mu)\n    end\n    return nothing\nend\n\n\"\"\"\n    solve_ex16(; kwargs...)\n\nSolve the van der Pol IMEX example from PETSc TS tutorial `ex16.c`.\n\nKeyword arguments:\n\n- `petsclib`: PETSc library instance. Defaults to `Float64`.\n- `mu`: van der Pol stiffness parameter. Default `1000.0`.\n- `imex`: whether to keep the `u2` term in the explicit split. Default `true`.\n- `monitor`: register the interpolation monitor from the upstream example.\n  Default `false`.\n- `final_time`: final integration time. Default `0.5`.\n- `dt`: initial time step. Default `0.01`.\n- `finalize_petsc`: whether to finalize PETSc at the end when this function had\n  to initialize it. Default `false`.\n- `options`: additional PETSc command-line options for this solve. By default\n  the script uses `ARGS`.\n- `verbose`: print a short run summary after the solve.\n\nReturns a named tuple with the final time, step count, solution, and effective\nproblem parameters.\n\"\"\"\nfunction solve_ex16(;\n    petsclib = PETSc.getlib(PetscScalar = Float64),\n    mu::Real = 1000.0,\n    imex::Bool = true,\n    monitor::Bool = false,\n    final_time::Real = 0.5,\n    dt::Real = 0.01,\n    finalize_petsc::Bool = false,\n    options = nothing,\n    verbose::Bool = true,\n)\n    options === nothing && (options = copy(String.(ARGS)))\n    parsed_options = PETSc.parse_options(options)\n    solver_options = ex16_solver_options(parsed_options)\n\n    comm = MPI.COMM_WORLD\n    PetscScalar = petsclib.PetscScalar\n\n    did_initialize = !PETSc.initialized(petsclib)\n    if did_initialize\n        PETSc.initialize(petsclib)\n    end\n\n    MPI.Comm_size(comm) == 1 || error(\"This example only supports sequential runs.\")\n\n    runtime_options = ex16_runtime_options(\n        petsclib,\n        parsed_options;\n        mu,\n        imex,\n        monitor,\n    )\n\n    ts = PETSc.LibPETSc.TS(petsclib)\n    u = PETSc.LibPETSc.PetscVec(petsclib)\n    jac = PETSc.LibPETSc.PetscMat(petsclib)\n    current_time = petsclib.PetscReal(NaN)\n    steps = petsclib.PetscInt(-1)\n    solution = PetscScalar[]\n    ctx = Ex16Context(\n        petsclib,\n        runtime_options.mu,\n        runtime_options.imex,\n        petsclib.PetscReal(0),\n    )\n    petsc_options = PETSc.Options(petsclib; solver_options...)\n    pushed_options = false\n\n    try\n        ex16_register_myark2!(petsclib)\n\n        ts = PETSc.LibPETSc.TSCreate(petsclib, comm)\n        PETSc.LibPETSc.TSSetType(petsclib, ts, \"beuler\")\n        PETSc.LibPETSc.TSSetProblemType(petsclib, ts, PETSc.LibPETSc.TS_NONLINEAR)\n\n        u = PETSc.VecSeq(petsclib, 2)\n        ex16_initial_condition!(u, runtime_options.mu)\n        PETSc.LibPETSc.TSSetSolution(petsclib, ts, u)\n\n        jac = ex16_create_jacobian_template(petsclib)\n\n        callback_ctx_ptr = pointer_from_objref(ctx)\n        GC.@preserve ctx begin\n            PETSc.LibPETSc.TSSetRHSFunction(\n                petsclib,\n                ts,\n                nothing,\n                EX16_RHS_FUNCTION_PTR,\n                callback_ctx_ptr,\n            )\n            PETSc.LibPETSc.TSSetIFunction(\n                petsclib,\n                ts,\n                nothing,\n                EX16_IFUNCTION_PTR,\n                callback_ctx_ptr,\n            )\n            PETSc.LibPETSc.TSSetIJacobian(\n                petsclib,\n                ts,\n                jac,\n                jac,\n                EX16_IJACOBIAN_PTR,\n                callback_ctx_ptr,\n            )\n            PETSc.LibPETSc.TSSetMaxTime(petsclib, ts, petsclib.PetscReal(final_time))\n            PETSc.LibPETSc.TSSetExactFinalTime(\n                petsclib,\n                ts,\n                PETSc.LibPETSc.TS_EXACTFINALTIME_STEPOVER,\n            )\n            PETSc.LibPETSc.TSSetTimeStep(petsclib, ts, petsclib.PetscReal(dt))\n\n            if runtime_options.monitor\n                PETSc.LibPETSc.TSMonitorSet(\n                    petsclib,\n                    ts,\n                    EX16_MONITOR_PTR,\n                    callback_ctx_ptr,\n                )\n            end\n\n            push!(petsc_options)\n            pushed_options = true\n            PETSc.LibPETSc.TSSetFromOptions(petsclib, ts)\n            pop!(petsc_options)\n            pushed_options = false\n\n            PETSc.LibPETSc.TSSolve(petsclib, ts, u)\n        end\n\n        current_time = PETSc.LibPETSc.TSGetSolveTime(petsclib, ts)\n        steps = PETSc.LibPETSc.TSGetStepNumber(petsclib, ts)\n        solution = copy(u[:])\n\n        if verbose\n            if abs(current_time - final_time) > 100 * eps(petsclib.PetscReal)\n                @printf(\n                    \"Note: prescribed final time %.16g differs from actual final time %.16g\\n\",\n                    final_time,\n                    current_time,\n                )\n            end\n\n            ts_type = PETSc.LibPETSc.TSGetType(petsclib, ts)\n            @printf(\"TS type: %s\\n\", ts_type)\n            if ts_type == \"arkimex\"\n                @printf(\"ARKIMEX type: %s\\n\", PETSc.LibPETSc.TSARKIMEXGetType(petsclib, ts))\n            end\n            @printf(\"mu: %.16g\\n\", runtime_options.mu)\n            @printf(\"IMEX split: %s\\n\", runtime_options.imex ? \"true\" : \"false\")\n            @printf(\"Final time: %.16g\\n\", current_time)\n            @printf(\"Steps: %d\\n\", steps)\n            @printf(\n                \"Final solution: [% .16e, % .16e]\\n\",\n                solution[1],\n                solution[2],\n            )\n        end\n\n        return (\n            final_time = current_time,\n            steps = steps,\n            solution = solution,\n            mu = runtime_options.mu,\n            imex = runtime_options.imex,\n        )\n    finally\n        if pushed_options\n            pop!(petsc_options)\n        end\n        if petsc_options.ptr != C_NULL\n            PETSc.destroy(petsc_options)\n        end\n        if jac.ptr != C_NULL\n            PETSc.destroy(jac)\n        end\n        if u.ptr != C_NULL\n            PETSc.destroy(u)\n        end\n        if ts.ptr != C_NULL\n            PETSc.LibPETSc.TSDestroy(petsclib, ts)\n        end\n        if did_initialize && finalize_petsc\n            PETSc.finalize(petsclib)\n        end\n    end\nend\n\nif !isinteractive() && abspath(PROGRAM_FILE) == @__FILE__\n    solve_ex16(finalize_petsc = true)\nend\n"
  },
  {
    "path": "examples/ex45.jl",
    "content": "# INCLUDE IN MPI TEST\n# Translation of PETSc's ex45.c to PETSc.jl\nusing PETSc, MPI, Printf\n\n# boundary data and forcing  \nexact(x, y, z) = sin(2π * x) * sin(2π * y) * sin(2π * z)\n# The discrete operator is -∇², so forcing = -∇²(exact)\n# For exact(x,y,z) = sin(2πx)sin(2πy)sin(2πz), we have ∇²u = -3(2π)²sin(2πx)sin(2πy)sin(2πz)\n# So forcing = -∇²u = 12π²sin(2πx)sin(2πy)sin(2πz)\nforcing(x, y, z) = 12 * π^2 * sin(2π * x) * sin(2π * y) * sin(2π * z)\n\n# Get the PETSc lib with our chosen `PetscScalar` type\npetsclib = PETSc.getlib(; PetscScalar = Float64)\n\n# If we want to use a custom PETSc library, we can set it with `PETSc.set_library!` before calling `PETSc.getlib`. For example:\n#=\nusing PETSc\nPETSc.set_library!(\n    \"/path/to/custom/libpetsc.so\";\n    PetscScalar = Float64,\n    PetscInt    = Int64,\n)\n# Restart Julia — PETSc_jll is not loaded and your library is used automatically.\n=#\n# This creates a LocalPreferences.toml file. \n#petsclib = PETSc.getlib(; PetscScalar = Float64, PetscInt = Int64)\n\n\n# Initialize PETSc\nPETSc.initialize(petsclib, log_view=true)\n\nfunction solve_ex45(N=7; da_grid_x=7, da_grid_y=7, da_grid_z=7, kwargs...)\n    comm = MPI.COMM_WORLD\n\n    cli_opts = PETSc.parse_options(ARGS)\n    cli = Dict{Symbol,Any}()\n    for (k, v) in pairs(cli_opts)\n        cli[k] = v\n    end\n    for (k, v) in pairs(kwargs)\n        cli[k] = v\n    end\n\n    function _as_int(x, default)\n        if x === nothing\n            return default\n        elseif x isa Integer\n            return Int(x)\n        else\n            return parse(Int, string(x))\n        end\n    end\n\n    N   = _as_int(get(cli, :N,   N),   N)\n    dim = _as_int(get(cli, :dim, 3),   3)\n    Nx  = _as_int(get(cli, :Nx,  N),   N)\n    Ny  = _as_int(get(cli, :Ny,  N),   N)\n    Nz  = _as_int(get(cli, :Nz,  N),   N)\n\n    opts = (; [(k => cli[k]) for k in keys(cli)]...)\n\n    boundary    = Tuple(fill(PETSc.DM_BOUNDARY_NONE, dim))\n    stencil     = PETSc.DMDA_STENCIL_STAR\n    global_size = dim == 3 ? (Nx, Ny, Nz) : (Nx, Ny, 1)\n    da = PETSc.DMDA(petsclib, comm, boundary, global_size, 1, 1, stencil; opts...)\n\n    final_grid = PETSc.getinfo(da).global_size\n    if MPI.Comm_rank(comm) == 0\n        @printf(\"Solving on %d × %d × %d grid\\n\", final_grid[1], final_grid[2], final_grid[3])\n    end\n\n    ksp = PETSc.KSP(da; opts...)\n\n    PETSc.setcomputeoperators!(ksp) do J, jac, ksp\n        dm      = PETSc.getDM(ksp)\n        corners = PETSc.getcorners(dm)\n        info    = PETSc.getinfo(dm)\n        N       = info.global_size\n\n        # Grid spacings (uniform)\n        Hx, Hy, Hz = 1.0 ./ (N .- 1)\n\n        # Scale entire system by Hx*Hy*Hz (= h³ for uniform grid) so that\n        # matrix entries are O(h) ~ O(1/N) rather than O(1/h²) ~ O(N²).\n        # This keeps MG smoothers well-conditioned regardless of resolution.\n        #\n        # Scaled operator: (Hx*Hy*Hz) * (-∇²_h)\n        # For uniform h: scaled diagonal  = 6h³/h² = 6h\n        #                scaled off-diag  = -h³/h² = -h\n        # All entries O(h) → matrix is well-scaled for MG.\n        scale = Hx * Hy * Hz\n\n        # Scaled coefficients\n        cx = scale / (Hx * Hx)   # = Hy*Hz/Hx\n        cy = scale / (Hy * Hy)   # = Hx*Hz/Hy\n        cz = scale / (Hz * Hz)   # = Hx*Hy/Hz\n        diag3d = 2.0 * (cx + cy + cz)\n        diag2d = 2.0 * (cx + cy)\n\n        for k in corners.lower[3]:corners.upper[3]\n            for j in corners.lower[2]:corners.upper[2]\n                for i in corners.lower[1]:corners.upper[1]\n                    idx = CartesianIndex(i, j, k)\n                    is_boundary = (i == 1 || j == 1 || k == 1 ||\n                                   i == N[1] || j == N[2] || k == N[3])\n                    if dim == 3\n                        if is_boundary\n                            jac[idx, idx] = 1.0\n                        else\n                            jac[idx, idx + CartesianIndex(-1,  0,  0)] = -cx\n                            jac[idx, idx + CartesianIndex( 1,  0,  0)] = -cx\n                            jac[idx, idx + CartesianIndex( 0, -1,  0)] = -cy\n                            jac[idx, idx + CartesianIndex( 0,  1,  0)] = -cy\n                            jac[idx, idx + CartesianIndex( 0,  0, -1)] = -cz\n                            jac[idx, idx + CartesianIndex( 0,  0,  1)] = -cz\n                            jac[idx, idx]                               =  diag3d\n                        end\n                    elseif dim == 2\n                        if is_boundary\n                            jac[idx, idx] = 1.0\n                        else\n                            jac[idx, idx + CartesianIndex(-1, 0, 0)] = -cx\n                            jac[idx, idx + CartesianIndex( 1, 0, 0)] = -cx\n                            jac[idx, idx + CartesianIndex( 0,-1, 0)] = -cy\n                            jac[idx, idx + CartesianIndex( 0, 1, 0)] = -cy\n                            jac[idx, idx]                             =  diag2d\n                        end\n                    end\n                end\n            end\n        end\n        PETSc.assemble!(jac)\n        return 0\n    end\n\n    PETSc.setcomputerhs!(ksp) do b_vec, ksp\n        dm      = PETSc.getDM(ksp)\n        corners = PETSc.getcorners(dm)\n        info    = PETSc.getinfo(dm)\n        N       = info.global_size\n\n        Hx, Hy, Hz = 1.0 ./ (N .- 1)\n        scale = Hx * Hy * Hz   # same scaling as matrix\n\n        g_x = range(0, length = N[1], stop = 1)\n        g_y = range(0, length = N[2], stop = 1)\n        g_z = range(0, length = N[3], stop = 1)\n\n        l_x = g_x[(corners.lower[1]):(corners.upper[1])]\n        l_y = g_y[(corners.lower[2]):(corners.upper[2])]\n        l_z = g_z[(corners.lower[3]):(corners.upper[3])]\n\n        PETSc.withlocalarray!(b_vec; read=false) do b\n            sz = corners.size\n\n            if dim == 3\n                b3 = reshape(b, sz...)\n                for kk = 1:sz[3], jj = 1:sz[2], ii = 1:sz[1]\n                    x, y, z = l_x[ii], l_y[jj], l_z[kk]\n                    gi = corners.lower[1] + (ii - 1)\n                    gj = corners.lower[2] + (jj - 1)\n                    gk = corners.lower[3] + (kk - 1)\n                    if gi == 1 || gj == 1 || gk == 1 ||\n                       gi == N[1] || gj == N[2] || gk == N[3]\n                        # Dirichlet BC: identity row in matrix → RHS = exact value\n                        b3[ii, jj, kk] = exact(x, y, z)\n                    else\n                        # Scale forcing by same factor as matrix\n                        b3[ii, jj, kk] = forcing(x, y, z) * scale\n                    end\n                end\n            elseif dim == 2\n                b2 = reshape(b, sz...)\n                for jj = 1:sz[2], ii = 1:sz[1]\n                    x, y = l_x[ii], l_y[jj]\n                    gi = corners.lower[1] + (ii - 1)\n                    gj = corners.lower[2] + (jj - 1)\n                    if gi == 1 || gj == 1 || gi == N[1] || gj == N[2]\n                        b2[ii, jj, 1] = exact(x, y, 0.0)\n                    else\n                        b2[ii, jj, 1] = forcing(x, y, 0.0) * scale\n                    end\n                end\n            end\n        end\n        PETSc.assemble!(b_vec)\n        return 0\n    end\n\n    solve_time = @elapsed PETSc.solve!(ksp)\n    niter      = LibPETSc.KSPGetIterationNumber(petsclib, ksp)\n    final_grid = PETSc.getinfo(da).global_size\n\n    x    = LibPETSc.KSPGetSolution(petsclib, ksp)\n    norm = LibPETSc.KSPGetResidualNorm(petsclib, ksp)\n\n    # Compute L2 and max error against analytic solution\n    info  = PETSc.getinfo(da)\n    Nglob = info.global_size\n    Hx, Hy, Hz = 1.0 ./ (Nglob .- 1)\n    vol = Hx * Hy * Hz\n\n    local_err2 = 0.0\n    local_max  = 0.0\n    PETSc.withlocalarray!(x; read=true) do xu\n        corners = PETSc.getcorners(da)\n        dims    = corners.size\n        uas     = reshape(xu, dims...)\n        for kk = 1:dims[3], jj = 1:dims[2], ii = 1:dims[1]\n            gi = corners.lower[1] + (ii - 1)\n            gj = corners.lower[2] + (jj - 1)\n            gk = corners.lower[3] + (kk - 1)\n            xc = (gi - 1) * Hx\n            yc = (gj - 1) * Hy\n            zc = (gk - 1) * Hz\n            u_num = uas[ii, jj, kk]\n            u_ex  = exact(xc, yc, zc)\n            err   = u_num - u_ex\n            local_err2 += err^2 * vol\n            local_max   = max(local_max, abs(err))\n        end\n    end\n\n    global_err2 = MPI.Allreduce(local_err2, MPI.SUM, comm)\n    global_max  = MPI.Allreduce(local_max,  MPI.MAX, comm)\n    L2 = sqrt(global_err2)\n\n    if MPI.Comm_rank(MPI.COMM_WORLD) == 0\n        @printf(\"L2 error: %.6e\\n\", L2)\n        @printf(\"Max error: %.6e\\n\", global_max)\n        @printf(\"Residual norm %g\\n\", norm)\n        @printf(\"Solve time: %.6f seconds\\n\", solve_time)\n    end\n\n    PETSc.destroy(ksp)\n    return (; norm, final_grid, niter, solve_time, L2, global_max)\nend\n\nif !isinteractive() && abspath(PROGRAM_FILE) == @__FILE__\n    res = solve_ex45()\n    if MPI.Comm_rank(MPI.COMM_WORLD) == 0\n        @printf(\"Final residual norm %g\\n\", res.norm)\n        @printf(\"Fine grid resolution: %d × %d × %d\\n\",\n                res.final_grid[1], res.final_grid[2], res.final_grid[3])\n        @printf(\"Outer KSP iterations: %d\\n\", res.niter)\n        @printf(\"Solve time: %.6f seconds\\n\", res.solve_time)\n        @printf(\"L2 error: %.6e\\n\", res.L2)\n        @printf(\"Max error: %.6e\\n\", res.global_max)\n    end\n    PETSc.finalize(petsclib)\nend"
  },
  {
    "path": "examples/ex50.jl",
    "content": "# INCLUDE IN MPI TEST\n#\n# This example demonstrates solving a 2D Poisson equation with Neumann boundary\n# conditions using a DMDA and KSP solver.\n# \n# Based on PETSc's ex50.c:\n# https://petsc.org/main/src/ksp/ksp/tutorials/ex50.c.html\n#\n# Poisson equation: div(grad p) = f on [0,1]^2\n# with Neumann boundary conditions: dp/dx = 0 at x=0,1 and dp/dy = 0 at y=0,1\n# Forcing function: f = -cos(π*x)*cos(π*y)\n#\n# ## Usage Examples:\n#\n# 1. Run with default settings (100×100 grid, LU direct solver):\n#    julia --project=. examples/ex50.jl\n#\n# 2. Set grid size with -N option (creates N×N grid):\n#    julia --project=. examples/ex50.jl -N 50 -ksp_monitor\n#\n# 3. Monitor convergence with custom grid:\n#    julia --project=. examples/ex50.jl -da_grid_x 50 -da_grid_y 50 -ksp_monitor\n#\n# 4. Use direct LU solver:\n#    julia --project=. examples/ex50.jl -pc_type lu -ksp_monitor -ksp_converged_reason\n#\n# 5. Multigrid with refinement:\n#    julia --project=. examples/ex50.jl -da_grid_x 3 -da_grid_y 3 -da_refine 5 -pc_type mg -ksp_monitor\n#\n# 6. Programmatic usage with custom solver options:\n#    julia -e \"include(\\\"examples/ex50.jl\\\"); solve_poisson(50, 0; pc_mg_levels=3, ksp_monitor=true)\"\n\nusing PETSc, MPI, Printf\n\n# Get the PETSc lib with our chosen `PetscScalar` type\npetsclib = PETSc.getlib(; PetscScalar = Float64)\n\n# Initialize PETSc \nPETSc.initialize(petsclib)\n\n\n\"\"\"\n    analytical_solution(x, y)\n\nCompute the analytical solution for the Poisson equation with forcing function\n \nf = -cos(π*x)*cos(π*y).\n\nThe solution is p(x,y) = (1)/(2*π²) * cos(π*x)*cos(π*y) + C,\nwhere C is an arbitrary constant due to Neumann boundary conditions.\nHere, C=0.\n\"\"\"\nfunction analytical_solution(x, y)\n    K = 1.0 / (2 * π^2)\n    return -K * cos(π * (x - 0.5)) * cos(π * (y - 0.5))\nend\n\n\"\"\"\n    solve_poisson(N=100, da_refine=0; solver_opts...)\n\nSolve the 2D Poisson equation in serial or parallel with Neumann boundary conditions using PETSc.\n\n# Arguments\n- `N::Int`: Grid size (N×N grid). Default is 100.\n- `da_refine::Int`: Refinement level for the DMDA. Default is 0.\n- `solver_opts`: Additional keyword options passed to the PETSc solver (e.g., `pc_mg_levels=3`, `ksp_monitor=true`).\n\n# Returns\n- `solve_time::Float64`: Time taken to solve the system.\n- `niter::Int`: Number of iterations taken by the solver.\n- `final_grid_size::Tuple{Int, Int}`: The final grid size after refinement.\n- `sol2D::Array`: The 2D solution array.\n- `l2_error::Float64`: The L2 norm of the error compared to analytical solution.\n\n# Examples\n```julia\n# Solve with default settings\ntime, iters, grid = solve_poisson()\n\n# Solve with custom grid size and multigrid levels\ntime, iters, grid = solve_poisson(50, 0; pc_mg_levels=3, ksp_monitor=true)\n\n# Command-line usage\n# julia examples/ex50.jl -N 50 -pc_mg_levels 3\n```\n\"\"\"\nfunction solve_poisson(N=100, da_refine=0; solver_opts...)\n\n    # Set our PETSc Scalar Type\n    PetscScalar = Float64\n\n    # Get MPI communicator\n    comm = MPI.COMM_WORLD\n\n\n    # Parse command-line options\n    opts = PETSc.parse_options(ARGS)\n\n    # Use parameter values as defaults, but allow options to override\n    N = parse(Int, get(opts, Symbol(\"N\"), string(N)))\n    da_refine = parse(Int, get(opts, Symbol(\"da_refine\"), string(da_refine)))\n    da_grid_x = parse(Int, get(opts, Symbol(\"da_grid_x\"), string(N)))\n    da_grid_y = parse(Int, get(opts, Symbol(\"da_grid_y\"), string(N)))\n\n    # Use CG solver with AMG preconditioner\n    ksp_type = get(opts, Symbol(\"ksp_type\"), \"cg\")\n    pc_type = get(opts, Symbol(\"pc_type\"), \"gamg\")\n    ksp_rtol = parse(Float64, get(opts, Symbol(\"ksp_rtol\"), \"1e-12\"))\n\n    # Boundary condition type: \"neumann\" (default) or \"dirichlet\"\n    bc_type = get(opts, Symbol(\"bc_type\"), \"neumann\")\n\n    # Set the grid options\n    opts = merge(opts, (da_grid_x = da_grid_x, da_grid_y = da_grid_y, da_refine = da_refine))\n\n    # Set solver options\n    opts = merge(opts, (ksp_type = ksp_type, pc_type = pc_type, ksp_rtol = ksp_rtol))\n\n    # Merge in any additional solver options passed as keyword arguments\n    opts = merge(opts, Dict(solver_opts))\n\n    boundary_type = (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE)\n    stencil_type = PETSc.DMDA_STENCIL_STAR\n    global_size = (da_grid_x, da_grid_y)\n    procs = (PETSc.PETSC_DECIDE, PETSc.PETSC_DECIDE)\n    dof_per_node = 1\n    stencil_width = 1\n\n    da = PETSc.DMDA(\n        petsclib,\n        comm,\n        boundary_type,\n        global_size,\n        dof_per_node,\n        stencil_width,\n        stencil_type;\n        opts...,\n    )\n\n    ksp = PETSc.KSP(da; opts...)\n\n    # Print the final grid size after any refinement (only on rank 0)\n    final_grid_size = PETSc.getinfo(da).global_size[1:2]\n    if MPI.Comm_rank(comm) == 0\n        @printf(\"Solving on %d × %d grid\\n\", final_grid_size[1], final_grid_size[2])\n    end\n\n    # Set the Jacobian/operator\n    PETSc.setcomputeoperators!(ksp) do J, jac, ksp\n        dm = PETSc.getDM(ksp)\n        corners = PETSc.getcorners(dm)\n        global_size = PETSc.getinfo(dm).global_size[1:2]\n\n        # Grid spacing in each direction\n        h = PetscScalar(1) ./ global_size\n        HxdHy = h[1] / h[2]\n        HydHx = h[2] / h[1]\n        \n        for j in corners.lower[2]:corners.upper[2]\n            for i in corners.lower[1]:corners.upper[1]\n                idx = CartesianIndex(i, j, 1)\n                \n                # Check if we're on boundary\n                is_boundary = (i == 1 || j == 1 || i == global_size[1] || j == global_size[2])\n                \n                if bc_type == \"dirichlet\" && is_boundary\n                    # Dirichlet boundary point: enforce u = analytic value -> set row to identity\n                    jac[idx, idx] = 1.0\n                elseif is_boundary\n                    # NOTE: we use a 1th order accurate stencil at boundaries for Neumann BCs\n                        # This mimics the C-example but limits the overall accuracy of the scheme to first order.\n\n                        # Boundary point - variable stencil (only interior neighbors)\n                        diag_val = PetscScalar(0)\n                        numi = 0  # count of i-direction neighbors\n                        numj = 0  # count of j-direction neighbors\n                        \n                        if j > 1  # not on bottom boundary\n                            jac[idx, idx + CartesianIndex(0, -1, 0)] = -HxdHy\n                            numj += 1\n                        end\n                        if i > 1  # not on left boundary\n                            jac[idx, idx + CartesianIndex(-1, 0, 0)] = -HydHx\n                            numi += 1\n                        end\n                        if i < global_size[1]  # not on right boundary\n                            jac[idx, idx + CartesianIndex(1, 0, 0)] = -HydHx\n                            numi += 1\n                        end\n                        if j < global_size[2]  # not on top boundary\n                            jac[idx, idx + CartesianIndex(0, 1, 0)] = -HxdHy\n                            numj += 1\n                        end\n                        \n                        # Diagonal: sum of neighbor coefficients\n                        diag_val = numj * HxdHy + numi * HydHx\n                        jac[idx, idx] = diag_val\n                    else\n                        # Interior point - full 5-point stencil\n                        jac[idx, idx + CartesianIndex(0, -1, 0)] = -HxdHy\n                        jac[idx, idx + CartesianIndex(-1, 0, 0)] = -HydHx\n                        jac[idx, idx] = 2.0 * (HxdHy + HydHx)\n                        jac[idx, idx + CartesianIndex(1, 0, 0)] = -HydHx\n                        jac[idx, idx + CartesianIndex(0, 1, 0)] = -HxdHy\n                    end\n                end\n            end\n\n        PETSc.assemble!(jac)\n        \n        # Set a constant nullspace on the matrix for Neumann BCs\n        nullspace = LibPETSc.MatNullSpaceCreate(petsclib, MPI.COMM_WORLD, LibPETSc.PETSC_TRUE, 0, LibPETSc.PetscVec[])\n        LibPETSc.MatSetNullSpace(petsclib, jac, nullspace)\n        LibPETSc.MatNullSpaceDestroy(petsclib, nullspace)\n        # Don't destroy nullspace here - let the matrix manage it\n        \n        return 0\n    end\n\n    # Set the right-hand side\n    PETSc.setcomputerhs!(ksp) do b_vec, ksp\n        dm = PETSc.getDM(ksp)\n        comm = PETSc.getcomm(ksp)\n        corners = PETSc.getcorners(dm)\n        global_size = PETSc.getinfo(dm).global_size[1:2]\n        \n        # Grid spacing in each direction\n        h = PetscScalar(1) ./ global_size\n\n        # Build the RHS vector with forcing function\n        PETSc.withlocalarray!(b_vec; read = false) do b\n            b = reshape(b, Int64(corners.size[1]), Int64(corners.size[2]))\n            \n            for (iy, y) in enumerate(corners.lower[2]:corners.upper[2])\n                # Cell-centered y-coordinate\n                y_coord = (y - 0.5) * h[2]\n                \n                for (ix, x) in enumerate(corners.lower[1]:corners.upper[1])\n                    # Cell-centered x-coordinate\n                    x_coord = (x - 0.5) * h[1]\n                    is_boundary = (x == 1 || y == 1 || x == global_size[1] || y == global_size[2])\n\n                    if bc_type == \"dirichlet\" && is_boundary\n                        # Dirichlet boundary value evaluated at boundary coordinate\n                        xb = x == 1 ? 0.0 : (x == global_size[1] ? 1.0 : x_coord)\n                        yb = y == 1 ? 0.0 : (y == global_size[2] ? 1.0 : y_coord)\n                        b[ix, iy] = analytical_solution(xb, yb)\n                    else\n                        # Forcing function: -cos(π*x)*cos(π*y) * Hx * Hy\n                        b[ix, iy] = -cos(π * x_coord) * cos(π * y_coord) * h[1] * h[2]\n                    end\n                end\n            end\n\n\n            \n        end\n        \n        # Assemble the vector before modifying it\n        PETSc.assemble!(b_vec)\n        \n        # Remove the nullspace from the RHS only for Neumann BCs (singular matrix)\n        if bc_type == \"neumann\"\n            LibPETSc.VecAssemblyBegin(petsclib, b_vec)\n            LibPETSc.VecAssemblyEnd(petsclib, b_vec)\n            nullspace = LibPETSc.MatNullSpaceCreate(petsclib, MPI.COMM_WORLD, LibPETSc.PETSC_TRUE, 0, LibPETSc.PetscVec[])\n            LibPETSc.MatNullSpaceRemove(petsclib, nullspace, b_vec)\n            LibPETSc.MatNullSpaceDestroy(petsclib, nullspace)\n        end\n\n        return 0\n    end\n\n    # Solve the problem\n    solve_time = @elapsed PETSc.solve!(ksp)\n\n    # Get iteration count and print results (only on rank 0)\n    niter = LibPETSc.KSPGetIterationNumber(petsclib, ksp)\n    if MPI.Comm_rank(comm) == 0\n        @printf(\"KSP converged in %d iterations in %.4f seconds\\n\", niter, solve_time)\n    end\n\n    # Compute L2 norm of the error and extrema\n    dm = PETSc.getDM(ksp)\n    corners = PETSc.getcorners(dm)\n    global_size = PETSc.getinfo(dm).global_size[1:2]\n    h = PetscScalar(1) ./ global_size\n\n    sol = PETSc.get_solution(ksp)\n    \n    # Get local solution array for analysis\n    sol2D = nothing\n    PETSc.withlocalarray!(sol; read=true) do s\n        sol2D = copy(s)\n        sol2D = reshape(sol2D, Int64(corners.size[1]), Int64(corners.size[2]))\n    end\n    \n    # Prepare container for L2 and max error results\n    l2_error = 0.0\n    global_max = 0.0\n    PETSc.withlocalarray!(sol; read=true) do s\n        nx, ny = corners.size[1:2]\n        s2D = reshape(s, Int64(corners.size[1]), Int64(corners.size[2]))\n        \n        x_coords = range(-0.5, 0.5, length=global_size[1])\n        y_coords = range(-0.5, 0.5, length=global_size[2])\n        x_coord = x_coords[corners.lower[1]:corners.upper[1]]\n        y_coord = y_coords[corners.lower[2]:corners.upper[2]]\n        \n        l2_local = 0.0\n        sum_diff_local = 0.0\n        count_local = 0\n        for iy=1:ny, ix=1:nx\n            p_ana = analytical_solution(x_coord[ix], y_coord[iy])\n            p_num = s2D[ix, iy]\n            diff = p_num - p_ana\n            sum_diff_local += diff\n            count_local += 1\n        end\n\n        if bc_type == \"neumann\"\n            # Compute global average difference to remove constant shift\n            sum_diff_global = MPI.Allreduce(sum_diff_local, MPI.SUM, comm)\n            count_global = MPI.Allreduce(count_local, MPI.SUM, comm)\n            avg_diff = sum_diff_global / count_global\n        else\n            avg_diff = 0.0\n        end\n\n        # Now compute L2 error (remove avg only for Neumann)\n        l2_local = 0.0\n        for iy=1:ny, ix=1:nx\n            p_ana = analytical_solution(x_coord[ix], y_coord[iy])\n            p_num = s2D[ix, iy]\n            diff = (p_num - p_ana) - avg_diff\n            l2_local += diff^2 * h[1] * h[2]\n        end\n        l2_global = MPI.Allreduce(l2_local, MPI.SUM, comm)\n        l2_error = sqrt(l2_global)\n\n        # Prepare container for global max error (assigned inside local-array block)\n        global_max = 0.0\n        local_max = 0.0\n        for iy=1:ny, ix=1:nx\n            p_ana = analytical_solution(x_coord[ix], y_coord[iy])\n            p_num = s2D[ix, iy]\n            # remove average for Neumann as above\n            err = abs((p_num - p_ana) - avg_diff)\n            local_max = max(local_max, err)\n        end\n        global_max = MPI.Allreduce(local_max, MPI.MAX, comm)\n\n        if MPI.Comm_rank(comm) == 0\n            @printf(\"L2 norm of error: %.6e\\n\", l2_error)\n        end\n    end\n\n    # Get residual norm before destroying KSP\n    norm = LibPETSc.KSPGetResidualNorm(petsclib, ksp)\n    # Clean up\n    PETSc.destroy(ksp)\n\n    # Return a NamedTuple matching `solve_ex45` fields: (norm, final_grid, niter, solve_time, L2, max)\n    return (; norm = norm, final_grid = final_grid_size, niter = niter, solve_time = solve_time, L2 = l2_error, max = global_max)\nend\n\n\"\"\"\n    solve_ex50(N=100; solver_opts...)\n\nCompatibility wrapper exposing `solve_ex50` with same signature/return shape as `solve_ex45`.\n\"\"\"\nfunction solve_ex50(N=100; solver_opts...)\n    # call solve_poisson which now returns the named tuple\n    return solve_poisson(N, da_refine=0; solver_opts...)\nend\n\n# If run as script, parse options and call the function with those options\nif !isinteractive() && abspath(PROGRAM_FILE) == @__FILE__\n    opts = PETSc.parse_options(ARGS)\n\n    N = parse(Int, get(opts, Symbol(\"N\"), \"100\"))\n    da_refine = parse(Int, get(opts, Symbol(\"da_refine\"), \"0\"))\n\n    # Extract commonly used solver/grid options if provided\n    pc_type = get(opts, Symbol(\"pc_type\"), \"gamg\")\n    ksp_type = get(opts, Symbol(\"ksp_type\"), \"cg\")\n    ksp_rtol = parse(Float64, get(opts, Symbol(\"ksp_rtol\"), \"1e-12\"))\n\n    bc_type = get(opts, Symbol(\"bc_type\"), \"neumann\")\n\n    solve_poisson(N, da_refine; pc_type=pc_type, ksp_type=ksp_type, ksp_rtol=ksp_rtol, bc_type=bc_type)\nend\n\n"
  },
  {
    "path": "examples/ex51.jl",
    "content": "using PETSc, MPI, Printf\n\n# Small ODE to test TS accuracy, see\n# https://petsc.org/main/src/ts/tutorials/ex51.c.html.\n#\n# The ODE\n#                 u1_t = cos(t),\n#                 u2_t = sin(u2)\n# with analytical solution\n#                 u1(t) = sin(t),\n#                 u2(t) = 2 * atan(exp(t) * tan(0.5))\n# is used to test the accuracy of TS schemes.\n\n# PETSc callbacks take a raw `void*` context pointer. We keep the active\n# `petsclib` inside a mutable Julia object so we can pass a stable reference\n# through `pointer_from_objref()` and recover it inside the RHS routine\n# to access the library-specific types, functions, and constants.\nmutable struct Ex51Context{PetscLib <: PETSc.LibPETSc.PetscLibType}\n    petsclib::PetscLib\nend\n\n\"\"\"\n    ex51_rhs!\n\nRight-hand side routine passed to `TSSetRHSFunction`, corresponding to\n`RHSFunction` in PETSc's `ex51.c`.\n\"\"\"\nfunction ex51_rhs!(\n    ::PETSc.LibPETSc.CTS, # optional argument `TS ts` not needed here\n    t::Float64,\n    u_ptr::PETSc.LibPETSc.CVec,\n    f_ptr::PETSc.LibPETSc.CVec,\n    ctx_ptr::Ptr{Cvoid},\n)::PETSc.LibPETSc.PetscErrorCode\n    # This function is called through PETSc's C callback interface, so its argument\n    # types must match the low-level PETSc ABI. In particular, the state and RHS\n    # vectors arrive as raw `CVec` pointers. We immediately wrap them using\n    # PETSc.jl's higher-level `VecPtr(..., own = false)` helper so we can use\n    # Julia-friendly helpers such as `withlocalarray!` without taking ownership\n    # away from PETSc.\n    ctx = unsafe_pointer_to_objref(ctx_ptr)::Ex51Context\n    petsclib = ctx.petsclib\n    # `own = false` since memory is managed by PETSc internally\n    u = PETSc.VecPtr(petsclib, u_ptr, false)\n    f = PETSc.VecPtr(petsclib, f_ptr, false)\n\n    PETSc.withlocalarray!(\n        (u, f);\n        read = (true, false),\n        write = (false, true),\n    ) do u_array, f_array\n        f_array[1] = cos(t)\n        f_array[2] = sin(u_array[2])\n    end\n\n    return PETSc.LibPETSc.PetscErrorCode(0)\nend\n\nconst EX51_RHS_FUNCTION_PTR = @cfunction(\n    ex51_rhs!,\n    PETSc.LibPETSc.PetscErrorCode,\n    (\n        PETSc.LibPETSc.CTS,\n        Float64,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        Ptr{Cvoid},\n    ),\n)\n\nfunction set_initial_condition!(u::PETSc.LibPETSc.PetscVec)\n    PETSc.withlocalarray!(u; read = false, write = true) do u_array\n        u_array[1] = 0.0\n        u_array[2] = 1.0\n    end\n    return nothing\nend\n\nfunction exact_solution!(u::PETSc.LibPETSc.PetscVec, t::Real)\n    PETSc.withlocalarray!(u; read = false, write = true) do u_array\n        u_array[1] = sin(t)\n        u_array[2] = 2 * atan(exp(t) * tan(0.5))\n    end\n    return nothing\nend\n\n\"\"\"\n    solve_ex51(; kwargs...)\n\nSolve the small ODE from PETSc TS tutorial `ex51.c` using PETSc.jl's low-level\nTS wrappers.\n\nKeyword arguments:\n\n- `petsclib`: PETSc library instance. Defaults to `Float64`.\n- `final_time`: final integration time. Default `1.0`.\n- `dt`: initial time step. Default `0.25`.\n- `save_trajectory`: whether to call `TSSetSaveTrajectory`. Default `true`.\n- `finalize_petsc`: whether to finalize PETSc at the end when this function had\n  to initialize it. Default `false` so repeated calls in one Julia session work\n  reliably.\n- `options`: additional PETSc command-line options for this solve. By default\n  the script uses `ARGS`, so invocations like\n  `julia --project=. examples/ex51.jl -ts_type rk -ts_rk_type 5dp` work, and\n  programmatic calls can use values such as\n  `options = [\"-ts_type\", \"rk\", \"-ts_rk_type\", \"3bs\"]`.\n- `verbose`: print a short run summary.\n\nReturns a named tuple with the final time, error norm, and numerical solution.\n\"\"\"\nfunction solve_ex51(;\n    petsclib = PETSc.getlib(PetscScalar = Float64),\n    final_time::Real = 1.0,\n    dt::Real = 0.25,\n    save_trajectory::Bool = true,\n    finalize_petsc::Bool = false,\n    options = nothing,\n    verbose::Bool = true,\n)\n    options === nothing && (options = copy(String.(ARGS)))\n    parsed_options = PETSc.parse_options(options)\n\n    comm = MPI.COMM_WORLD\n    PetscScalar = petsclib.PetscScalar\n\n    # `did_initialize`: whether we initialized the library in this call\n    did_initialize = !PETSc.initialized(petsclib)\n    if did_initialize\n        PETSc.initialize(petsclib)\n    end\n\n    MPI.Comm_size(comm) == 1 || error(\"This example only supports sequential runs.\")\n\n    # Keep these variables concretely typed across the whole function, even\n    # though the actual PETSc objects are created later inside the `try` block.\n    # The null-pointer placeholders are overwritten by `TSCreate`/`VecSeq`,\n    # and the `finally` block checks `ptr != C_NULL` before destroying them.\n    ts = PETSc.LibPETSc.TS(petsclib)\n    u = PETSc.LibPETSc.PetscVec(petsclib)\n    u_exact = PETSc.LibPETSc.PetscVec(petsclib)\n    current_time = petsclib.PetscReal(NaN)\n    error_norm = petsclib.PetscReal(NaN)\n    solution = PetscScalar[]\n    ctx = Ex51Context(petsclib)\n    petsc_options = PETSc.Options(petsclib; parsed_options...)\n    pushed_options = false\n\n    try\n        # Create timestepping solver context.\n        ts = PETSc.LibPETSc.TSCreate(petsclib, comm)\n        PETSc.LibPETSc.TSSetType(petsclib, ts, \"rosw\")\n        PETSc.LibPETSc.TSSetProblemType(petsclib, ts, PETSc.LibPETSc.TS_NONLINEAR)\n\n        # Set initial conditions.\n        u = PETSc.VecSeq(petsclib, 2)\n        set_initial_condition!(u)\n        PETSc.LibPETSc.TSSetSolution(petsclib, ts, u)\n\n        callback_ctx_ptr = pointer_from_objref(ctx)\n        GC.@preserve ctx begin\n            PETSc.LibPETSc.TSSetRHSFunction(\n                petsclib,\n                ts,\n                nothing,\n                EX51_RHS_FUNCTION_PTR,\n                callback_ctx_ptr,\n            )\n\n            # Configure solver options. As in the C example, adaptivity is\n            # forced to take constant time steps.\n            save_trajectory && PETSc.LibPETSc.TSSetSaveTrajectory(petsclib, ts)\n            PETSc.LibPETSc.TSSetMaxTime(petsclib, ts, petsclib.PetscReal(final_time))\n            PETSc.LibPETSc.TSSetExactFinalTime(\n                petsclib,\n                ts,\n                PETSc.LibPETSc.TS_EXACTFINALTIME_STEPOVER,\n            )\n            PETSc.LibPETSc.TSSetTimeStep(petsclib, ts, petsclib.PetscReal(dt))\n\n            adapt = PETSc.LibPETSc.TSGetAdapt(petsclib, ts)\n            PETSc.LibPETSc.TSAdaptSetType(petsclib, adapt, \"none\")\n\n            push!(petsc_options)\n            pushed_options = true\n            PETSc.LibPETSc.TSSetFromOptions(petsclib, ts)\n            pop!(petsc_options)\n            pushed_options = false\n            PETSc.LibPETSc.TSSolve(petsclib, ts, u)\n        end\n\n        # Compute the error against the analytical solution at the achieved\n        # final time, matching the PETSc example's `VecAYPX` + `VecNorm` path.\n        current_time = PETSc.LibPETSc.TSGetTime(petsclib, ts)\n        u_exact = similar(u)\n        exact_solution!(u_exact, current_time)\n\n        PETSc.LibPETSc.VecAYPX(petsclib, u_exact, PetscScalar(-1), u)\n        error_norm = PETSc.LibPETSc.VecNorm(petsclib, u_exact, PETSc.NORM_2)\n        solution = copy(u[:])\n\n        if verbose\n            if abs(current_time - final_time) > 100 * eps(petsclib.PetscReal)\n                @printf(\n                    \"Note: prescribed final time %.16g differs from actual final time %.16g\\n\",\n                    final_time,\n                    current_time,\n                )\n            end\n\n            @printf(\"TS type: %s\\n\", PETSc.LibPETSc.TSGetType(petsclib, ts))\n            @printf(\"Final time: %.16g\\n\", current_time)\n            @printf(\"Error at final time: %.2E\\n\", error_norm)\n        end\n\n        return (final_time = current_time, error = error_norm, solution = solution)\n    finally\n        if pushed_options\n            pop!(petsc_options)\n        end\n        if petsc_options.ptr != C_NULL\n            PETSc.destroy(petsc_options)\n        end\n        if u_exact.ptr != C_NULL\n            PETSc.destroy(u_exact)\n        end\n        if u.ptr != C_NULL\n            PETSc.destroy(u)\n        end\n        if ts.ptr != C_NULL\n            PETSc.LibPETSc.TSDestroy(petsclib, ts)\n        end\n        if did_initialize && finalize_petsc\n            PETSc.finalize(petsclib)\n        end\n    end\nend\n\nif !isinteractive() && abspath(PROGRAM_FILE) == @__FILE__\n    solve_ex51(finalize_petsc = true)\nend\n"
  },
  {
    "path": "examples/ex51_implicit.jl",
    "content": "using PETSc, MPI, Printf\n\n# Small ODE to test implicit TS accuracy with Gauss/IRK schemes; adapted from\n# https://petsc.org/main/src/ts/tutorials/ex51.c.html.\n#\n# The ODE\n#                 u1_t = cos(t),\n#                 u2_t = sin(u2)\n# with analytical solution\n#                 u1(t) = sin(t),\n#                 u2(t) = 2 * atan(exp(t) * tan(0.5))\n# is rewritten in implicit form as\n#                 F(t, u, u_t) = u_t - f(t, u) = 0.\n#\n# PETSc 3.22 can solve this with `TSIRK` and `-ts_irk_type gauss`, but the\n# internal IRK setup currently requires an AIJ-style sparse Jacobian matrix so\n# it can form a `MATKAIJ` stage operator. In practice this means:\n#\n# - `seqdense` Jacobians do not work with Gauss/IRK here\n# - `-snes_mf` / `-snes_mf_operator` do not work here\n# - a sparse AIJ matrix is required even if PETSc computes the Jacobian values\n#   for us via finite differences and coloring\n#\n# This example therefore creates a tiny `seqaij` Jacobian template and, by\n# default, asks PETSc to fill in the values with `-snes_fd_color` so callers do\n# not have to provide Jacobian entries manually.\n#\n# The number of Gauss stages is controlled by PETSc option\n# `-ts_irk_nstages <s>`. For example:\n#\n#     julia --project=. examples/ex51_implicit.jl -ts_irk_nstages 2\n#\n# or programmatically\n#\n#     solve_ex51_implicit(options = [\"-ts_irk_nstages\", \"3\"])\n\nmutable struct Ex51Context{PetscLib <: PETSc.LibPETSc.PetscLibType}\n    petsclib::PetscLib\nend\n\n\"\"\"\n    ex51_rhs_ifunction!\n\nImplicit residual routine passed to `TSSetIFunction`, corresponding to the DAE\nform `F(t, u, u_t) = 0` with `F(t, u, u_t) = u_t - f(t, u)`.\n\"\"\"\nfunction ex51_rhs_ifunction!(\n    ::PETSc.LibPETSc.CTS,\n    t::Float64,\n    u_ptr::PETSc.LibPETSc.CVec,\n    udot_ptr::PETSc.LibPETSc.CVec,\n    f_ptr::PETSc.LibPETSc.CVec,\n    ctx_ptr::Ptr{Cvoid},\n)::PETSc.LibPETSc.PetscErrorCode\n    # This function is called through PETSc's C callback interface, so its\n    # argument types must match the low-level PETSc ABI. The current state,\n    # time derivative, and residual vectors arrive as raw `CVec` pointers. We\n    # wrap them with `VecPtr(..., own = false)` so we can use PETSc.jl's array\n    # helpers without taking ownership away from PETSc.\n    ctx = unsafe_pointer_to_objref(ctx_ptr)::Ex51Context\n    petsclib = ctx.petsclib\n    # `own = false` since memory is managed by PETSc internally\n    u = PETSc.VecPtr(petsclib, u_ptr, false)\n    udot = PETSc.VecPtr(petsclib, udot_ptr, false)\n    f = PETSc.VecPtr(petsclib, f_ptr, false)\n\n    PETSc.withlocalarray!(\n        (u, udot, f);\n        read = (true, true, false),\n        write = (false, false, true),\n    ) do u_array, udot_array, f_array\n        f_array[1] = udot_array[1] - cos(t)\n        f_array[2] = udot_array[2] - sin(u_array[2])\n    end\n\n    return PETSc.LibPETSc.PetscErrorCode(0)\nend\n\nconst EX51_RHS_IFUNCTION_PTR = @cfunction(\n    ex51_rhs_ifunction!,\n    PETSc.LibPETSc.PetscErrorCode,\n    (\n        PETSc.LibPETSc.CTS,\n        Float64,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        Ptr{Cvoid},\n    ),\n)\n\n\"\"\"\n    ex51_fill_ijacobian!\n\nFill the tiny 2x2 implicit Jacobian matrix used by this example.\n\nFor the residual\n\n    F(t, u, u_t) = [u1_t - cos(t), u2_t - sin(u2)],\n\nthe implicit Jacobian is\n\n    dF/du + shift * dF/du_t = [shift   0;\n                               0   shift - cos(u2)].\n\"\"\"\nfunction ex51_fill_ijacobian!(\n    A::PETSc.LibPETSc.PetscMat,\n    B::PETSc.LibPETSc.PetscMat,\n    shift,\n    diag22,\n    petsclib,\n)\n    PetscScalar = petsclib.PetscScalar\n\n    PETSc.LibPETSc.MatZeroEntries(petsclib, A)\n    A[1, [1, 2]] = PetscScalar.([shift, 0])\n    A[2, [1, 2]] = PetscScalar.([0, diag22])\n    PETSc.assemble!(A)\n\n    if B.ptr != A.ptr\n        PETSc.LibPETSc.MatZeroEntries(petsclib, B)\n        B[1, [1, 2]] = PetscScalar.([shift, 0])\n        B[2, [1, 2]] = PetscScalar.([0, diag22])\n        PETSc.assemble!(B)\n    end\n\n    return nothing\nend\n\n\"\"\"\n    ex51_ijacobian!\n\nOptional analytic implicit Jacobian callback for the example.\n\nThe default solve path uses PETSc's finite-difference coloring instead, but\nkeeping this explicit callback available is useful as a reference and a\nregression-tested fallback.\n\"\"\"\nfunction ex51_ijacobian!(\n    ::PETSc.LibPETSc.CTS,\n    ::Float64,\n    u_ptr::PETSc.LibPETSc.CVec,\n    ::PETSc.LibPETSc.CVec,\n    shift::Float64,\n    A_ptr::PETSc.LibPETSc.CMat,\n    B_ptr::PETSc.LibPETSc.CMat,\n    ctx_ptr::Ptr{Cvoid},\n)::PETSc.LibPETSc.PetscErrorCode\n    ctx = unsafe_pointer_to_objref(ctx_ptr)::Ex51Context\n    petsclib = ctx.petsclib\n    # `u` is borrowed from PETSc; do not take ownership.\n    u = PETSc.VecPtr(petsclib, u_ptr, false)\n    A = PETSc.LibPETSc.PetscMat(A_ptr, petsclib)\n    B = PETSc.LibPETSc.PetscMat(B_ptr, petsclib)\n\n    diag22 = PETSc.withlocalarray!(u; read = true, write = false) do u_array\n        shift - cos(u_array[2])\n    end\n\n    ex51_fill_ijacobian!(A, B, shift, diag22, petsclib)\n    return PETSc.LibPETSc.PetscErrorCode(0)\nend\n\nconst EX51_IJACOBIAN_PTR = @cfunction(\n    ex51_ijacobian!,\n    PETSc.LibPETSc.PetscErrorCode,\n    (\n        PETSc.LibPETSc.CTS,\n        Float64,\n        PETSc.LibPETSc.CVec,\n        PETSc.LibPETSc.CVec,\n        Float64,\n        PETSc.LibPETSc.CMat,\n        PETSc.LibPETSc.CMat,\n        Ptr{Cvoid},\n    ),\n)\n\nfunction ex51_initial_condition!(u::PETSc.LibPETSc.PetscVec)\n    PETSc.withlocalarray!(u; read = false, write = true) do u_array\n        u_array[1] = 0.0\n        u_array[2] = 1.0\n    end\n    return nothing\nend\n\nfunction ex51_exact_solution!(u::PETSc.LibPETSc.PetscVec, t::Real)\n    PETSc.withlocalarray!(u; read = false, write = true) do u_array\n        u_array[1] = sin(t)\n        u_array[2] = 2 * atan(exp(t) * tan(0.5))\n    end\n    return nothing\nend\n\nfunction ex51_implicit_default_options(parsed_options::NamedTuple, jacobian_mode::Symbol)\n    # PETSc 3.22 currently rejects matrix-free operators inside the `TSIRK`\n    # Gauss setup path for this problem, so fail early with a clear message\n    # instead of letting PETSc error out later inside `TSSetUp_IRK`.\n    if haskey(parsed_options, :snes_mf) || haskey(parsed_options, :snes_mf_operator)\n        throw(\n            ArgumentError(\n                \"PETSc 3.22 TSIRK/Gauss does not support matrix-free Jacobians here. \" *\n                \"Use the AIJ-backed default path or `jacobian_mode = :analytic` instead.\",\n            ),\n        )\n    end\n\n    jacobian_mode in (:finite_difference_color, :analytic) ||\n        throw(ArgumentError(\"Unsupported jacobian_mode: $(jacobian_mode)\"))\n\n    effective = merge(\n        (\n            ts_type = \"irk\",\n            ts_irk_type = \"gauss\",\n            ksp_type = \"gmres\",\n            pc_type = \"none\",\n        ),\n        parsed_options,\n    )\n\n    if jacobian_mode == :finite_difference_color &&\n       !haskey(effective, :snes_fd) &&\n       !haskey(effective, :snes_fd_color)\n        effective = merge(effective, (snes_fd_color = nothing,))\n    end\n\n    return effective\nend\n\nfunction ex51_implicit_create_jacobian_template(petsclib)\n    PetscScalar = petsclib.PetscScalar\n\n    # `TSIRK/Gauss` needs an AIJ Jacobian matrix. We use a tiny full 2x2 AIJ\n    # pattern so PETSc can later compute the values with finite differences and\n    # coloring, without the caller having to provide sparse Jacobian entries.\n    jac = PETSc.MatSeqAIJ(petsclib, 2, 2, petsclib.PetscInt(2))\n    jac[1, [1, 2]] = PetscScalar.([1, 1])\n    jac[2, [1, 2]] = PetscScalar.([1, 1])\n    PETSc.assemble!(jac)\n    PETSc.LibPETSc.MatZeroEntries(petsclib, jac)\n    return jac\nend\n\n\"\"\"\n    solve_ex51_implicit(; kwargs...)\n\nSolve the small ODE from PETSc TS tutorial `ex51.c`, but in implicit form so\nthat PETSc's Gauss/IRK timesteppers can be used.\n\nKeyword arguments:\n\n- `petsclib`: PETSc library instance. Defaults to `Float64`.\n- `final_time`: final integration time. Default `1.0`.\n- `dt`: initial time step. Default `0.25`.\n- `save_trajectory`: whether to call `TSSetSaveTrajectory`. Default `true`.\n- `finalize_petsc`: whether to finalize PETSc at the end when this function had\n  to initialize it. Default `false`.\n- `options`: additional PETSc command-line options for this solve. By default\n  the script uses `ARGS`. This is also where PETSc time-stepper options such as\n  `-ts_irk_nstages <s>` are passed, for example\n  `options = [\"-ts_irk_nstages\", \"3\"]`.\n- `jacobian_mode`: `:finite_difference_color` (default) asks PETSc to compute\n  Jacobian values automatically on top of an AIJ sparsity template. `:analytic`\n  uses the built-in fallback callback in this file.\n- `verbose`: print a short run summary.\n\nNotes:\n\n- The default path is not matrix-free. PETSc 3.22 `TSIRK/Gauss` requires an\n  AIJ sparse Jacobian matrix and currently rejects `seqdense` and `MATMFFD`\n  operators in this setup.\n- The default `:finite_difference_color` mode avoids requiring callers to\n  provide Jacobian values manually.\n\"\"\"\nfunction solve_ex51_implicit(;\n    petsclib = PETSc.getlib(PetscScalar = Float64),\n    final_time::Real = 1.0,\n    dt::Real = 0.25,\n    save_trajectory::Bool = true,\n    finalize_petsc::Bool = false,\n    options = nothing,\n    jacobian_mode::Symbol = :finite_difference_color,\n    verbose::Bool = true,\n)\n    options === nothing && (options = copy(String.(ARGS)))\n    parsed_options = ex51_implicit_default_options(PETSc.parse_options(options), jacobian_mode)\n\n    comm = MPI.COMM_WORLD\n    PetscScalar = petsclib.PetscScalar\n\n    # `did_initialize`: whether we initialized the library in this call\n    did_initialize = !PETSc.initialized(petsclib)\n    if did_initialize\n        PETSc.initialize(petsclib)\n    end\n\n    MPI.Comm_size(comm) == 1 || error(\"This example only supports sequential runs.\")\n\n    # Keep these variables concretely typed across the whole function, even\n    # though the actual PETSc objects are created later inside the `try` block.\n    # The null-pointer placeholders are overwritten by `TSCreate`/`VecSeq`/\n    # `MatSeqAIJ`, and the `finally` block checks `ptr != C_NULL` before\n    # destroying them.\n    ts = PETSc.LibPETSc.TS(petsclib)\n    u = PETSc.LibPETSc.PetscVec(petsclib)\n    u_exact = PETSc.LibPETSc.PetscVec(petsclib)\n    jac = PETSc.LibPETSc.PetscMat(petsclib)\n    current_time = petsclib.PetscReal(NaN)\n    error_norm = petsclib.PetscReal(NaN)\n    solution = PetscScalar[]\n    ctx = Ex51Context(petsclib)\n    petsc_options = PETSc.Options(petsclib; parsed_options...)\n    pushed_options = false\n\n    try\n        # Create timestepping solver context. We start from PETSc's implicit\n        # Runge-Kutta (`irk`) implementation and let options choose the Gauss\n        # family member and the number of stages. By default the options path\n        # below keeps `-ts_irk_type gauss`.\n        ts = PETSc.LibPETSc.TSCreate(petsclib, comm)\n        PETSc.LibPETSc.TSSetType(petsclib, ts, \"irk\")\n        PETSc.LibPETSc.TSSetProblemType(petsclib, ts, PETSc.LibPETSc.TS_NONLINEAR)\n\n        # Set initial conditions.\n        u = PETSc.VecSeq(petsclib, 2)\n        ex51_initial_condition!(u)\n        PETSc.LibPETSc.TSSetSolution(petsclib, ts, u)\n\n        # Build the sparse AIJ Jacobian template required by PETSc's\n        # `TSIRK/Gauss` implementation.\n        jac = ex51_implicit_create_jacobian_template(petsclib)\n\n        callback_ctx_ptr = pointer_from_objref(ctx)\n        GC.@preserve ctx begin\n            # Register the implicit residual and Jacobian callbacks. When\n            # `jacobian_mode = :finite_difference_color`, PETSc uses the AIJ\n            # sparsity pattern from `jac` and computes Jacobian values\n            # automatically via finite differences and coloring. The analytic\n            # callback remains available as a fallback and documentation aid.\n            PETSc.LibPETSc.TSSetIFunction(\n                petsclib,\n                ts,\n                nothing,\n                EX51_RHS_IFUNCTION_PTR,\n                callback_ctx_ptr,\n            )\n            PETSc.LibPETSc.TSSetIJacobian(\n                petsclib,\n                ts,\n                jac,\n                jac,\n                EX51_IJACOBIAN_PTR,\n                callback_ctx_ptr,\n            )\n\n            # Configure solver options. As in `ex51.jl`, adaptivity is forced\n            # to take constant time steps. Users can change the Gauss stage\n            # count through `-ts_irk_nstages <s>` in `options` or on the\n            # command line.\n            save_trajectory && PETSc.LibPETSc.TSSetSaveTrajectory(petsclib, ts)\n            PETSc.LibPETSc.TSSetMaxTime(petsclib, ts, petsclib.PetscReal(final_time))\n            PETSc.LibPETSc.TSSetExactFinalTime(\n                petsclib,\n                ts,\n                PETSc.LibPETSc.TS_EXACTFINALTIME_STEPOVER,\n            )\n            PETSc.LibPETSc.TSSetTimeStep(petsclib, ts, petsclib.PetscReal(dt))\n\n            adapt = PETSc.LibPETSc.TSGetAdapt(petsclib, ts)\n            PETSc.LibPETSc.TSAdaptSetType(petsclib, adapt, \"none\")\n\n            push!(petsc_options)\n            pushed_options = true\n            PETSc.LibPETSc.TSSetFromOptions(petsclib, ts)\n            pop!(petsc_options)\n            pushed_options = false\n\n            PETSc.LibPETSc.TSSolve(petsclib, ts, u)\n        end\n\n        # Compute the error against the analytical solution at the achieved\n        # final time, matching the `VecAYPX` + `VecNorm` pattern used in\n        # `ex51.jl`.\n        current_time = PETSc.LibPETSc.TSGetTime(petsclib, ts)\n        u_exact = similar(u)\n        ex51_exact_solution!(u_exact, current_time)\n\n        PETSc.LibPETSc.VecAYPX(petsclib, u_exact, PetscScalar(-1), u)\n        error_norm = PETSc.LibPETSc.VecNorm(petsclib, u_exact, PETSc.NORM_2)\n        solution = copy(u[:])\n\n        if verbose\n            if abs(current_time - final_time) > 100 * eps(petsclib.PetscReal)\n                @printf(\n                    \"Note: prescribed final time %.16g differs from actual final time %.16g\\n\",\n                    final_time,\n                    current_time,\n                )\n            end\n\n            ts_type = PETSc.LibPETSc.TSGetType(petsclib, ts)\n            @printf(\"TS type: %s\\n\", ts_type)\n            if ts_type == \"irk\"\n                @printf(\"IRK type: %s\\n\", PETSc.LibPETSc.TSIRKGetType(petsclib, ts))\n                @printf(\"IRK stages: %d\\n\", PETSc.LibPETSc.TSIRKGetNumStages(petsclib, ts))\n            end\n            @printf(\"Jacobian mode: %s\\n\", String(Symbol(jacobian_mode)))\n            @printf(\"Final time: %.16g\\n\", current_time)\n            @printf(\"Error at final time: %.2E\\n\", error_norm)\n        end\n\n        return (final_time = current_time, error = error_norm, solution = solution)\n    finally\n        if pushed_options\n            pop!(petsc_options)\n        end\n        if petsc_options.ptr != C_NULL\n            PETSc.destroy(petsc_options)\n        end\n        if jac.ptr != C_NULL\n            PETSc.destroy(jac)\n        end\n        if u_exact.ptr != C_NULL\n            PETSc.destroy(u_exact)\n        end\n        if u.ptr != C_NULL\n            PETSc.destroy(u)\n        end\n        if ts.ptr != C_NULL\n            PETSc.LibPETSc.TSDestroy(petsclib, ts)\n        end\n        if did_initialize && finalize_petsc\n            PETSc.finalize(petsclib)\n        end\n    end\nend\n\nif !isinteractive() && abspath(PROGRAM_FILE) == @__FILE__\n    solve_ex51_implicit(finalize_petsc = true)\nend\n"
  },
  {
    "path": "examples/laplacian.jl",
    "content": "# Finite Difference Laplacian\n#\n# In this example a simple finite difference, 1-D laplacian with Dirichlet\n# boundary conditions is solved first constructing the operator as Julia sparse\n# matrix then solving using PETsc\n\nusing PETSc, MPI\nusing SparseArrays: spdiagm\nusing UnicodePlots: lineplot, lineplot!\n\n# Set our PETSc Scalar Type\nPetscScalar = Float64\n\n# Get the PETSc lib with our chosen `PetscScalar` type\npetsclib = PETSc.getlib(; PetscScalar = PetscScalar)\n\n# Initialize PETSc \nPETSc.initialize(petsclib)\n\n# Initialize PETSc with logging active and printed to REPL. This is useful to detect memory leaks\n#PETSc.initialize(petsclib; log_view = true)    \n\n# Initialize PETSc with logging active and written to \"logfile.txt\"\n#PETSc.initialize(petsclib; log_view = true,  options=[\":logfile.txt\"])    # write log to a file\n\n\n# Set the total number of grid points\nNq = 200\n\n# number of interior points\nn = Nq - 2\n\n# create the interior grid and get the grid spacing\nx = range(PetscScalar(0), length = Nq, stop = 1)[2:(end - 1)]\nΔx = PetscScalar(x.step)\n\n# Create the finite difference operator with zero Dirichlet boundary conditions\nA =\n    spdiagm(\n        -1 => -ones(PetscScalar, n - 1),\n        0 => 2ones(PetscScalar, n),\n        1 => -ones(PetscScalar, n - 1),\n    ) / Δx^2\n\n# Setup the exact solution and the forcing function\nκ = 2PetscScalar(π)\nu(x) = sin(κ * x)\nfl(x) = κ^2 * sin(κ * x)\n\n# Set up the PETSc solver\nksp = PETSc.KSP(petsclib, MPI.COMM_SELF, A; ksp_monitor = true);\n\n# Solve the problem\nv = ksp \\ fl.(x);\n\n# Compute the L2-error\nϵ = sqrt(sum((v - u.(x)) .^ 2 * Δx))\nprintln(\"L2-error is $ϵ\")\n\n# Plot the solution and error\ndisplay(lineplot(x, v, xlabel = \"x\", ylabel = \"solution\"))\ndisplay(lineplot(x, v - u.(x), xlabel = \"x\", ylabel = \"error\"))\n\nPETSc.destroy(ksp)\nPETSc.finalize(petsclib)"
  },
  {
    "path": "examples/porosity_waves.jl",
    "content": "# INCLUDE IN MPI TEST\n#=\nIn this example we solve the 1D viscoelastic porosity wave equations which\ndescribe how magma ascends in the Earth's mantle.  The equations are discussed\nin [Vasyliev et al. Geophysical Research Letters (25), 17. p.\n3239-3242](https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/98GL52358):\n```math\n        { ∂ϕ/∂t} = -De {∂Pe/∂t} - ϕ^m Pe\n     De {∂Pe/∂t} =  ∇( ϕ^n (∇Pe + e_x) ) - ϕ^m Pe\n```\nwith Dirichlet boundary conditions Pe=0 and ϕ=1 on either side.  n,m are\nparameters and De is the Deborah number which indicates the importance of\nelasticity (De>>1).  e_x is the unit vector in the direction of gravity (here\ntaken to be the x-direction)\n\nTo solve the problem we use a standard central, finite difference approximation\nin 1D, and simultaneously solve for Pe and ϕ on a collocated grid.  We employ a\nDMDA/SNES and compute the Jacobian by automatic differentiation.\n\nNote: the code is working for 1D problems, but 2D and 3D are currently not functional due to an issue with the lateral boundary conditions\n=#\n\nusing MPI\nusing PETSc\nusing OffsetArrays: OffsetArray\nusing LinearAlgebra: norm\nusing ForwardDiff\nusing SparseArrays\nusing SparseDiffTools\n\n# when not run interactive options can be passed via commandline arguments:\n# julia --project=examples examples/porosity_waves.jl -Nq1 101 -snes_monitor\nopts = if !isinteractive()\n    PETSc.parse_options(ARGS)\nelse\n    (\n        ksp_monitor = true,\n        ksp_rtol = 1e-10,\n        ksp_converged_reason = false,\n        snes_monitor = true,\n        snes_converged_reason = true,\n        snes_view = false,\n        snes_max_it = 100,\n        snes_max_funcs = 10000,\n        snes_max_linear_solve_fail = 1000,\n        snes_mf_operator = false,\n        Nq1 = 1001,\n        max_it = 4000,       \n        max_time = 25,\n        dim = 1\n    )\nend\n\n\n# To use plotting\nCreatePlots = isinteractive() && try\n    using CairoMakie\n    true\ncatch\n    false\nend\n\n# Set our MPI communicator\ncomm = MPI.COMM_WORLD\n\n# Set our PETSc Scalar Type\nPetscScalar = Float64\nPetscInt = Int64\n\n# get the PETSc lib with our chosen `PetscScalar` type\npetsclib = PETSc.getlib(; PetscScalar = PetscScalar, PetscInt = PetscInt)\n\n# Initialize PETSc\nPETSc.initialize(petsclib)\n\n# dimensionality of the problem\ndim = PETSc.typedget(opts, :dim, 1)\n\n# Set the total number of grid points in each direction\nNq1 = PETSc.typedget(opts, :Nq1, 101)\n\nNq = (Nq1, 5, 5)\nNq = Nq[1:dim]\n\nmax_it = PETSc.typedget(opts, :max_it, 10)\nmax_time = PETSc.typedget(opts, :max_time, 25)\nif CreatePlots\n    fig = Figure(size = (1200, 600))\n    if dim==1\n        ax1 = Axis3(fig[1, 1], title = \"Pe\", ylabel= \"time\", xlabel = \"depth\", zlabel=\"Pe\", azimuth=-2.191039610705103, elevation=1.0426209566987232)\n        ax2 = Axis3(fig[1, 2], title = \"ϕ\", ylabel= \"time\", xlabel = \"depth\", zlabel=\"ϕ\", azimuth=-2.191039610705103, elevation=1.0426209566987232)\n    end\nend\n\n# Set the boundary conditions on each side (Dirichlet in direction of gravity)\nbcs = (\n    PETSc.DM_BOUNDARY_NONE,\n    PETSc.DM_BOUNDARY_GHOSTED,\n    PETSc.DM_BOUNDARY_GHOSTED,\n   )[1:dim]\n\n# Set parameters\nn = 3\nm = 2\nDe = PetscScalar(1e2)\ndt = PetscScalar(1e-2)\n\n# Create the PETSC dmda object\nda = PETSc.DMDA(\n    petsclib,\n    comm,\n    bcs,                     # boundary conditions\n    Nq,                      # Global grid size\n    2,                       # Number of DOF per node\n    1,                       # Stencil width\n    PETSc.DMDA_STENCIL_STAR; # Stencil type\n    opts...,\n)\n# Set coordinates of the DMDA (2D and 3D ignored for 1D DMDA)\nPETSc.setuniformcoordinates_dmda!(da, (-20, -10, -10), (150, 10, 10))\n\n# Cache local coordinates as a plain Julia array. This avoids repeatedly\n# mapping/restoring PETSc coordinate vectors during AD/Jacobian evaluations.\ncoord_cache = copy(PETSc.getlocalcoordinatearray(da))\n\n# Create the PETSC snes object\nsnes = PETSc.SNES(petsclib, comm; opts...)\n\n# add the da to the snes\nPETSc.setDM!(snes, da)\n\n# Sets the initial profiles\ng_x = PETSc.DMGlobalVec(da)\ng_xold = PETSc.DMGlobalVec(da)\nPETSc.withlocalarray!(g_x; read = false) do l_x\n    corners = PETSc.getcorners(da)\n\n    x = PETSc.reshapelocalarray(l_x, da)\n    Phi = @view x[1, :, :, :]\n    Pe = @view x[2, :, :, :]\n\n    # local coordinates (cached as a plain Julia array)\n    coord = coord_cache\n\n    Phi0 = 1\n    dPhi1 = 8\n    dPhi2 = 1\n    z1 = 0\n    z2 = 40\n    lambda = 1\n    dPe1 = dPhi1 / De\n    dPe2 = dPhi2 / De\n\n    # Loop over all the points on the processor and set the initial condition\n    for i in ((corners.lower):(corners.upper))\n        Phi[i] =\n            Phi0 +\n            dPhi1 * exp(-((coord[1, i] - z1)^2) / lambda^2) +\n            dPhi2 * exp(-((coord[1, i] - z2)^2) / lambda^2)\n        Pe[i] =\n            -dPe1 * exp(-((coord[1, i] - z1)^2) / lambda^2) -\n            dPe2 * exp(-((coord[1, i] - z2)^2) / lambda^2)\n    end\nend\n\n# Initialize x_old on every processor\n#g_xold = deepcopy(g_x); # initialize Pe and Phi of last timestep\nLibPETSc.VecCopy(petsclib,g_x,g_xold)       # initialize Pe and Phi of last timestep\n\nl_xold = PETSc.DMLocalVec(da)\nPETSc.dm_global_to_local!(g_xold, l_xold, da, PETSc.INSERT_VALUES)\n\n# Keep `x_old` as a plain Julia vector (avoid `unsafe_localarray` finalizers\n# interacting with PETSc object lifetimes).\nx_old = zeros(PetscScalar, length(l_xold))\nPETSc.withlocalarray!(l_xold; read = true, write = false) do x_arr\n    copyto!(x_old, x_arr)\nend\n\n# Routine wuth julia-only input/output vectors that computes the local residual\nfunction ComputeLocalResidual!(l_fx, l_x, snes)\n\n    # Compute the local residual.\n    da = PETSc.getDM(snes)\n    # The local vectors of l_x/x_old include ghost points\n    x = PETSc.reshapelocalarray(l_x[:], da)\n    Phi = @view x[1, :, :, :]\n    Pe = @view x[2, :, :, :]\n    x_old_reshaped = PETSc.reshapelocalarray(x_old[:], da)\n    Phi_old = @view x_old_reshaped[1, :, :, :]\n    Pe_old = @view x_old_reshaped[2, :, :, :]\n\n    # The local residual vectors do not include ghost points\n    fx = PETSc.reshapelocalarray(l_fx[:], da)\n    res_Phi = @view fx[1, :, :, :]\n    res_Pe = @view fx[2, :, :, :]\n\n    # Global grid size\n    Nq = PETSc.getinfo(da).global_size\n\n    # Local sizes\n    corners = PETSc.getcorners(da)\n\n    # set ghost boundaries (flux free conditions)\n    if Nq[2] > 1\n        if corners.lower[2] == 1\n            Phi[:, 0, :] = Phi[:, 1, :]\n            Pe[:, 0, :] = Pe[:, 1, :]\n        end\n        if corners.upper[2] == Nq[2]\n            Phi[:, Nq[2] + 1, :] = Phi[:, Nq[2], :]\n            Pe[:, Nq[2] + 1, :] = Pe[:, Nq[2], :]\n        end\n    end\n    if Nq[3] > 1\n        if corners.lower[3] == 1\n            Phi[:, :, 0] = Phi[:, :, 1]\n            Pe[:, :, 0] = Pe[:, :, 1]\n        end\n        if corners.upper[3] == Nq[3]\n            Phi[:, :, Nq[3] + 1] = Phi[:, :, Nq[3]]\n            Pe[:, :, Nq[3] + 1] = Pe[:, :, Nq[3]]\n        end\n    end\n\n    # Stencil\n    ix_p1 = CartesianIndex(1, 0, 0)   # ix + 1\n    ix_m1 = CartesianIndex(-1, 0, 0)  # ix - 1\n    iy_p1 = CartesianIndex(0, 1, 0)   # iy + 1\n    iy_m1 = CartesianIndex(0, -1, 0)  # iy - 1\n    iz_p1 = CartesianIndex(0, 0, 1)   # iz + 1\n    iz_m1 = CartesianIndex(0, 0, -1)  # iz - 1\n\n    # Coordinates and spacing (assumed constant)\n    coord = coord_cache\n    Δx = coord[1, corners.lower + ix_p1] - coord[1, corners.lower]\n    if dim > 1\n        Δy = coord[2, corners.lower + iy_p1] - coord[2, corners.lower]\n    end\n    if dim == 3\n        Δz = coord[1, corners.lower + iz_p1] - coord[1, corners.lower]\n    end\n\n    # corners.lower\n    for i in ((corners.lower):(corners.upper))\n        if (i[1] == 1 || i[1] == Nq[1])   # Dirichlet upper/lower BC's\n            res_Phi[i] = Phi[i] - 1\n            res_Pe[i] = Pe[i] - 0\n\n        else                            # Central points\n            res_Phi[i] =\n                (Phi[i] - Phi_old[i]) / dt +\n                De * (Pe[i] - Pe_old[i]) / dt +\n                (Phi[i]^m) * Pe[i]\n\n            Phi_c_p1 = (Phi[i + ix_p1] + Phi[i]) / 2\n            Phi_c_m1 = (Phi[i + ix_m1] + Phi[i]) / 2\n\n            res_Pe[i] =\n                De * (Pe[i] - Pe_old[i]) / dt -\n                (\n                    (Phi_c_p1^n) * ((Pe[i + ix_p1] - Pe[i]) / Δx + 1) -\n                    (Phi_c_m1^n) * ((Pe[i] - Pe[i + ix_m1]) / Δx + 1)\n                ) / Δx + (Phi[i]^m) * Pe[i]\n            if dim > 1\n                # Derivatives in y-direction (for 2D and 3D)\n                Phi_c_p1 = (Phi[i + iy_p1] + Phi[i]) / 2\n                Phi_c_m1 = (Phi[i + iy_m1] + Phi[i]) / 2\n                res_Pe[i] =\n                    res_Pe[i] +\n                    (\n                        (Phi_c_p1^n) * ((Pe[i + iy_p1] - Pe[i]) / Δy) -\n                        (Phi_c_m1^n) * ((Pe[i] - Pe[i + iy_m1]) / Δy)\n                    ) / Δy\n            end\n            if dim == 3\n                # Derivatives in z-direction (for 3D)\n                Phi_c_p1 = (Phi[i + iz_p1] + Phi[i]) / 2\n                Phi_c_m1 = (Phi[i + iz_m1] + Phi[i]) / 2\n                res_Pe[i] =\n                    res_Pe[i] +\n                    (\n                        (Phi_c_p1^n) * ((Pe[i + iz_p1] - Pe[i]) / Δz) -\n                        (Phi_c_m1^n) * ((Pe[i] - Pe[i + iz_m1]) / Δz)\n                    ) / Δz\n            end\n        end\n    end\n\n    # Copy local residual back to PETSc local vector\n    for i=1:length(fx)  \n        l_fx[i] = fx[i]\n    end\n\n    return 0\nend\n\n# Helper function, for automatic differentiation\nfunction ForwardDiff_res(x, snes)\n    fx = similar(x) # vector of zeros, of same type as x (local vector)\n\n    ComputeLocalResidual!(fx, x, snes)\n   \n    return fx\nend\n\n# Set up the nonlinear function\n\n\n\"\"\"\n    FormResidual!(cf,cx, args...)\nComputes the residual `f`, given solution vector `x`\n\"\"\"\nfunction FormResidual!(f,snes, g_x)\n    \n    # Get the DMDA associated with the snes\n    da = PETSc.getDM(snes)\n\n    # Get a local vector and transfer the data from the global->local vector\n    l_x = PETSc.DMLocalVec(da)\n    PETSc.dm_global_to_local!(g_x, l_x, da, PETSc.INSERT_VALUES)\n\n    # Get local arrays\n    PETSc.withlocalarray!(\n        (f, l_x);\n        read = (false, true),\n        write = (true, false),\n    ) do fx, x\n\n        # Compute the local residual (using local julia vectors)\n        ComputeLocalResidual!(fx, x, snes)\n    end\n\n    # Clean up the local vectors\n    PETSc.destroy(l_x)\n    return 0\nend\n\n\n# Compute the sparsity pattern and coloring of the jacobian @ every processor\n# Ideally this should be done with an automatic sparsity detection algorithm;\n# yet this is currently not working in combination with OffsetArrays (see\n# https://github.com/JuliaDiff/SparseDiffTools.jl/issues/154) Therefore, we use\n# a less efficient approach here.\n\nr = PETSc.DMGlobalVec(da)\nl_x = PETSc.DMLocalVec(da)\n\ninput = rand(length(l_x))\n#create an anonymous function to call ForwardDiff with snes as extra argument\nForwardDiff_res1 = x -> ForwardDiff_res(x, snes)\nsparsity_pattern =\n    sparse(abs.(ForwardDiff.jacobian(ForwardDiff_res1, input)) .> 0);\njac = Float64.(sparsity_pattern)\ncolors = matrix_colors(jac)\n\n# Compute the Jacobian, using automatic differentiation\nPJ = PETSc.MatAIJ(da)        # initialize space for the matrix from the dmda\nfunction FormJacobian!(J, snes, g_x)\n\n    # Get the DMDA associated with the snes\n    da = PETSc.getDM(snes)\n\n    # Get a local vector and transfer the data from the global->local vector\n    l_x = PETSc.DMLocalVec(da)\n    PETSc.dm_global_to_local!(g_x, l_x, da, PETSc.INSERT_VALUES)\n\n    # Get a local array of the solution vector and form a Jacobian for the\n    # interior (non-ghost) unknowns.\n    PETSc.withlocalarray!(l_x; read = true, write = false) do x_julia\n        ForwardDiff_res1 = x -> ForwardDiff_res(x, snes)\n\n        # Using SparseDiffTools is more efficient than forming a dense matrix,\n        # but requires initializing the sparsity pattern & coloring.\n        S = forwarddiff_color_jacobian(\n            ForwardDiff_res1,\n            x_julia,\n            colorvec = colors,\n            sparsity = sparsity_pattern,\n            jac_prototype = jac,\n        )\n\n        ind_local = PETSc.localinteriorlinearindex(da)\n        S = S[ind_local, ind_local]\n\n        # Copy local sparse matrix to parallel PETSc matrix\n        copyto!(J, sparse(S))\n    end\n\n    PETSc.assemble!(J)\n    \n    # Clean up the local vectors\n    PETSc.destroy(l_x)\n    return 0\nend\n\nPETSc.setfunction!(snes, FormResidual!, r)\nPETSc.setjacobian!(snes, FormJacobian!, PJ)\n\n# Timestep loop\ntime, it = PetscScalar(0), 1;\nwhile (it < max_it && time < max_time)\n    global time, it, x_old, g_xold, g_x, ax1, fig\n\n    # Solve nonlinear system of equations\n    PETSc.solve!(g_x, snes)\n\n    # Just for checking: compute norm of nonlinear solution\n    g = similar(g_x)\n    snes.f!(g, snes, g_x)\n    nm = norm(g)\n    if MPI.Comm_rank(comm) == 0\n    #    @info \"Norm of solution\" nm\n    end\n\n    # Update time\n    time += dt\n    it += 1\n\n    # Update the x_old values (Phi_old, Pe_old) on every processor\n    PETSc.dm_global_to_local!(g_x, l_xold, da, PETSc.INSERT_VALUES)\n    PETSc.withlocalarray!(l_xold; read = true, write = false) do x_arr\n        copyto!(x_old, x_arr)\n    end\n\n    # Visualisation\n    if (mod(it, 40) == 0 && CreatePlots == true)\n        coord = PETSc.getlocalcoordinatearray(da)\n        if dim==1\n            x = coord[1, :, :, :]\n            x = x[:,1,1]\n            time_vec = ones(size(x)) * time\n            \n            Pe = g_x[2:2:end]\n            ϕ  = g_x[1:2:end]\n            \n            # Plot Pe\n            lines!(ax1,x,time_vec,Pe, color=:black)\n            ax1.title = \"De=$(De)\"\n            xlims!(ax1,(-20, 150))\n            ylims!(ax1,(0, 25))\n\n            # Plot ϕ   \n            lines!(ax2,x,time_vec,ϕ, color=:black)\n            ax2.title = \"De=$(De)\"\n            xlims!(ax2,(-20, 150))\n            ylims!(ax2,(0, 25))\n            zlims!(ax2,(0, 2))\n        end\n        display(fig)\n\n    end\n    \n    if MPI.Comm_rank(comm) == 0\n    #    println(\"Timestep $it, time=$time\")\n    end\nend\n\n\nif CreatePlots\n    save(\"porositywave.png\",fig)\nend\n\n# Do some clean up\nPETSc.destroy(PJ)\nPETSc.destroy(g_x)\nPETSc.destroy(g_xold)\nPETSc.destroy(l_xold)\nPETSc.destroy(r)\nPETSc.destroy(snes)\nPETSc.destroy(da)\n\nPETSc.finalize(petsclib)\n"
  },
  {
    "path": "examples/scalability_tests/ex45_julia.c",
    "content": "/*\n  Laplacian in 3D with manufactured solution.\n\n  PDE:  -Laplacian u = 12*pi^2 * sin(2*pi*x) * sin(2*pi*y) * sin(2*pi*z)\n  on (0,1)^3 with Dirichlet BCs:\n        u = sin(2*pi*x) * sin(2*pi*y) * sin(2*pi*z)  on all boundaries\n\n  Exact solution: u = sin(2*pi*x) * sin(2*pi*y) * sin(2*pi*z)\n\n  Matrix is scaled by h^3 (= Hx*Hy*Hz) so entries are O(h) rather than O(1/h^2),\n  matching the scaling used in ex45.jl.\n\n  Grid size is controlled by -Nx, -Ny, -Nz (matching ex45.jl convention).\n\n  Output is formatted to match ex45.jl so that parse_scaling.jl works unchanged.\n*/\n\nstatic char help[] = \"Solves 3D Laplacian (manufactured solution) using multigrid.\\n\\n\";\n\n#include <petscksp.h>\n#include <petscdm.h>\n#include <petscdmda.h>\n#include <math.h>\n\n/* Context passed to callbacks */\ntypedef struct {\n  PetscInt Nx, Ny, Nz;\n} AppCtx;\n\nextern PetscErrorCode ComputeMatrix(KSP, Mat, Mat, void *);\nextern PetscErrorCode ComputeRHS(KSP, Vec, void *);\nextern PetscErrorCode ComputeInitialGuess(KSP, Vec, void *);\n\nstatic inline PetscReal exact_sol(PetscReal x, PetscReal y, PetscReal z)\n{\n  return sin(2.0 * PETSC_PI * x) * sin(2.0 * PETSC_PI * y) * sin(2.0 * PETSC_PI * z);\n}\n\nstatic inline PetscReal forcing(PetscReal x, PetscReal y, PetscReal z)\n{\n  return 12.0 * PETSC_PI * PETSC_PI *\n         sin(2.0 * PETSC_PI * x) * sin(2.0 * PETSC_PI * y) * sin(2.0 * PETSC_PI * z);\n}\n\nint main(int argc, char **argv)\n{\n  KSP        ksp;\n  DM         da;\n  Vec        x, b, r;\n  Mat        A;\n  AppCtx     ctx;\n  PetscReal  norm, solve_time, L2, maxerr;\n  PetscInt   niter;\n  PetscLogDouble t0, t1;\n\n  PetscFunctionBeginUser;\n  PetscCall(PetscInitialize(&argc, &argv, (char *)0, help));\n\n  /* Default grid size matches ex45.jl default */\n  ctx.Nx = 7; ctx.Ny = 7; ctx.Nz = 7;\n  PetscCall(PetscOptionsGetInt(NULL, NULL, \"-Nx\", &ctx.Nx, NULL));\n  PetscCall(PetscOptionsGetInt(NULL, NULL, \"-Ny\", &ctx.Ny, NULL));\n  PetscCall(PetscOptionsGetInt(NULL, NULL, \"-Nz\", &ctx.Nz, NULL));\n\n  /* Print grid info matching ex45.jl output */\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Solving on %d × %d × %d grid\\n\",\n                        (int)ctx.Nx, (int)ctx.Ny, (int)ctx.Nz));\n\n  PetscCall(KSPCreate(PETSC_COMM_WORLD, &ksp));\n  PetscCall(DMDACreate3d(PETSC_COMM_WORLD,\n                         DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE,\n                         DMDA_STENCIL_STAR,\n                         ctx.Nx, ctx.Ny, ctx.Nz,\n                         PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE,\n                         1, 1, NULL, NULL, NULL, &da));\n  PetscCall(DMSetFromOptions(da));\n  PetscCall(DMSetUp(da));\n  PetscCall(KSPSetDM(ksp, da));\n  PetscCall(KSPSetComputeInitialGuess(ksp, ComputeInitialGuess, &ctx));\n  PetscCall(KSPSetComputeRHS(ksp, ComputeRHS, &ctx));\n  PetscCall(KSPSetComputeOperators(ksp, ComputeMatrix, &ctx));\n  PetscCall(DMDestroy(&da));\n  PetscCall(KSPSetFromOptions(ksp));\n\n  /* Time the solve */\n  PetscCall(PetscTime(&t0));\n  PetscCall(KSPSolve(ksp, NULL, NULL));\n  PetscCall(PetscTime(&t1));\n  solve_time = (PetscReal)(t1 - t0);\n\n  PetscCall(KSPGetSolution(ksp, &x));\n  PetscCall(KSPGetRhs(ksp, &b));\n  PetscCall(KSPGetIterationNumber(ksp, &niter));\n  PetscCall(KSPGetResidualNorm(ksp, &norm));\n\n  /* Compute explicit residual norm */\n  PetscCall(VecDuplicate(b, &r));\n  PetscCall(KSPGetOperators(ksp, &A, NULL));\n  PetscCall(MatMult(A, x, r));\n  PetscCall(VecAXPY(r, -1.0, b));\n  PetscReal resnorm;\n  PetscCall(VecNorm(r, NORM_2, &resnorm));\n\n  /* Compute L2 and max error against exact solution */\n  {\n    DM          dm;\n    DMDALocalInfo info;\n    Vec         x_local;\n    PetscScalar ***xu;\n    PetscReal   local_err2 = 0.0, local_max = 0.0;\n    PetscReal   Hx, Hy, Hz, vol;\n    PetscInt    i, j, k;\n\n    PetscCall(KSPGetDM(ksp, &dm));\n    PetscCall(DMDAGetLocalInfo(dm, &info));\n    Hx  = 1.0 / (PetscReal)(info.mx - 1);\n    Hy  = 1.0 / (PetscReal)(info.my - 1);\n    Hz  = 1.0 / (PetscReal)(info.mz - 1);\n    vol = Hx * Hy * Hz;\n\n    PetscCall(DMGetLocalVector(dm, &x_local));\n    PetscCall(DMGlobalToLocalBegin(dm, x, INSERT_VALUES, x_local));\n    PetscCall(DMGlobalToLocalEnd(dm, x, INSERT_VALUES, x_local));\n    PetscCall(DMDAVecGetArrayRead(dm, x_local, &xu));\n\n    for (k = info.zs; k < info.zs + info.zm; k++) {\n      for (j = info.ys; j < info.ys + info.ym; j++) {\n        for (i = info.xs; i < info.xs + info.xm; i++) {\n          PetscReal xc   = i * Hx;\n          PetscReal yc   = j * Hy;\n          PetscReal zc   = k * Hz;\n          PetscReal u_ex = exact_sol(xc, yc, zc);\n          PetscReal err  = (PetscReal)xu[k][j][i] - u_ex;\n          local_err2 += err * err * vol;\n          if (PetscAbsReal(err) > local_max) local_max = PetscAbsReal(err);\n        }\n      }\n    }\n\n    PetscCall(DMDAVecRestoreArrayRead(dm, x_local, &xu));\n    PetscCall(DMRestoreLocalVector(dm, &x_local));\n\n    PetscCall(MPI_Allreduce(&local_err2, &L2,     1, MPIU_REAL, MPIU_SUM, PETSC_COMM_WORLD));\n    PetscCall(MPI_Allreduce(&local_max,  &maxerr, 1, MPIU_REAL, MPIU_MAX, PETSC_COMM_WORLD));\n    L2 = PetscSqrtReal(L2);\n  }\n\n  /* Output exactly matching ex45.jl format for parse_scaling.jl */\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"L2 error: %e\\n\",       (double)L2));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Max error: %e\\n\",      (double)maxerr));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Residual norm %g\\n\",   (double)resnorm));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Solve time: %f seconds\\n\", (double)solve_time));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Final residual norm %g\\n\", (double)norm));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Fine grid resolution: %d × %d × %d\\n\",\n                        (int)ctx.Nx, (int)ctx.Ny, (int)ctx.Nz));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Outer KSP iterations: %d\\n\", (int)niter));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Solve time: %f seconds\\n\",   (double)solve_time));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"L2 error: %e\\n\",             (double)L2));\n  PetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Max error: %e\\n\",            (double)maxerr));\n\n  PetscCall(VecDestroy(&r));\n  PetscCall(KSPDestroy(&ksp));\n  PetscCall(PetscFinalize());\n  return 0;\n}\n\nPetscErrorCode ComputeInitialGuess(KSP ksp, Vec b, void *ctx)\n{\n  PetscFunctionBeginUser;\n  PetscCall(VecSet(b, 0));\n  PetscFunctionReturn(PETSC_SUCCESS);\n}\n\nPetscErrorCode ComputeRHS(KSP ksp, Vec b, void *ctx)\n{\n  AppCtx            *user = (AppCtx *)ctx;\n  DM                 dm;\n  DMDALocalInfo      info;\n  PetscScalar      ***barray;\n  PetscInt           i, j, k;\n  PetscReal          Hx, Hy, Hz, scale;\n\n  PetscFunctionBeginUser;\n  PetscCall(KSPGetDM(ksp, &dm));\n  PetscCall(DMDAGetLocalInfo(dm, &info));\n\n  Hx    = 1.0 / (PetscReal)(info.mx - 1);\n  Hy    = 1.0 / (PetscReal)(info.my - 1);\n  Hz    = 1.0 / (PetscReal)(info.mz - 1);\n  scale = Hx * Hy * Hz;   /* same h^3 scaling as ex45.jl */\n\n  PetscCall(DMDAVecGetArray(dm, b, &barray));\n  for (k = info.zs; k < info.zs + info.zm; k++) {\n    for (j = info.ys; j < info.ys + info.ym; j++) {\n      for (i = info.xs; i < info.xs + info.xm; i++) {\n        PetscReal x = i * Hx;\n        PetscReal y = j * Hy;\n        PetscReal z = k * Hz;\n        if (i == 0 || j == 0 || k == 0 ||\n            i == info.mx - 1 || j == info.my - 1 || k == info.mz - 1) {\n          /* Dirichlet BC: identity row -> RHS = exact value */\n          barray[k][j][i] = exact_sol(x, y, z);\n        } else {\n          /* Interior: scale forcing by h^3 */\n          barray[k][j][i] = forcing(x, y, z) * scale;\n        }\n      }\n    }\n  }\n  PetscCall(DMDAVecRestoreArray(dm, b, &barray));\n  PetscFunctionReturn(PETSC_SUCCESS);\n}\n\nPetscErrorCode ComputeMatrix(KSP ksp, Mat jac, Mat B, void *ctx)\n{\n  DM            da;\n  DMDALocalInfo info;\n  PetscInt      i, j, k;\n  PetscReal     Hx, Hy, Hz, scale;\n  PetscReal     cx, cy, cz, diag;\n  PetscScalar   v[7];\n  MatStencil    row, col[7];\n\n  PetscFunctionBeginUser;\n  PetscCall(KSPGetDM(ksp, &da));\n  PetscCall(DMDAGetLocalInfo(da, &info));\n\n  Hx    = 1.0 / (PetscReal)(info.mx - 1);\n  Hy    = 1.0 / (PetscReal)(info.my - 1);\n  Hz    = 1.0 / (PetscReal)(info.mz - 1);\n  scale = Hx * Hy * Hz;   /* h^3 scaling matching ex45.jl */\n\n  /* Scaled FD coefficients: scale * (1/h^2) = h^3/h^2 = h */\n  cx   = scale / (Hx * Hx);   /* = Hy*Hz/Hx */\n  cy   = scale / (Hy * Hy);   /* = Hx*Hz/Hy */\n  cz   = scale / (Hz * Hz);   /* = Hx*Hy/Hz */\n  diag = 2.0 * (cx + cy + cz);\n\n  for (k = info.zs; k < info.zs + info.zm; k++) {\n    for (j = info.ys; j < info.ys + info.ym; j++) {\n      for (i = info.xs; i < info.xs + info.xm; i++) {\n        row.i = i; row.j = j; row.k = k;\n        if (i == 0 || j == 0 || k == 0 ||\n            i == info.mx - 1 || j == info.my - 1 || k == info.mz - 1) {\n          /* Identity row for Dirichlet BC */\n          v[0] = 1.0;\n          PetscCall(MatSetValuesStencil(B, 1, &row, 1, &row, v, INSERT_VALUES));\n        } else {\n          v[0] = -cz; col[0].i = i;   col[0].j = j;   col[0].k = k-1;\n          v[1] = -cy; col[1].i = i;   col[1].j = j-1; col[1].k = k;\n          v[2] = -cx; col[2].i = i-1; col[2].j = j;   col[2].k = k;\n          v[3] =  diag; col[3].i = i; col[3].j = j;   col[3].k = k;\n          v[4] = -cx; col[4].i = i+1; col[4].j = j;   col[4].k = k;\n          v[5] = -cy; col[5].i = i;   col[5].j = j+1; col[5].k = k;\n          v[6] = -cz; col[6].i = i;   col[6].j = j;   col[6].k = k+1;\n          PetscCall(MatSetValuesStencil(B, 1, &row, 7, col, v, INSERT_VALUES));\n        }\n      }\n    }\n  }\n  PetscCall(MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY));\n  PetscCall(MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY));\n  PetscFunctionReturn(PETSC_SUCCESS);\n}"
  },
  {
    "path": "examples/scalability_tests/job.sh",
    "content": "#!/bin/bash -l\n#SBATCH --job-name=scaling\n#SBATCH --partition=standard\n#SBATCH --cpus-per-task=1\n#SBATCH --exclusive\n#SBATCH --mem=200000M\n#SBATCH --time=0-00:10:00\n#SBATCH --account=??? # add your account here\n# --ntasks, --nodes, --ntasks-per-node, --output passed by submit_scaling.sh\n\nmodule --force purge\nmodule load CrayEnv\nmodule load craype\nmodule load gcc-native/13.2\nmodule load cray-mpich/8.1.32\n\nexport HOME=/users/kausbori\nexport JULIA_DEPOT_PATH=/users/kausbori/.julia\nexport MPITRAMPOLINE_LIB=/users/kausbori/mpiwrapper/lib64/libmpiwrapper.so\nexport JULIA_PKG_PRECOMPILE_AUTO=0\nexport JULIA_NUM_THREADS=1\nexport JULIA_CPU_TARGET=\"generic\"\n\nexport MPICH_OFI_STARTUP_CONNECT=1\nexport MPICH_OFI_NIC_POLICY=NUMA\nexport FI_CXI_DEFAULT_CQ_SIZE=131072\nexport MPICH_OFI_STARTUP_CONNECT=0\nexport FI_CXI_DISABLE_CQ_HUGETLB=1\nexport MPICH_MAX_THREAD_SAFETY=single\nexport LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.32/ofi/cray/17.0/lib:$LD_LIBRARY_PATH\n\nJULIA=/users/kausbori/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/bin/julia\n\necho \"=== Scaling run: ntasks=${NTASKS}, Nx=${NX}, Ny=${NY}, Nz=${NZ}, mg_levels=${NMGLEVELS}, ncoarse=${NCOARSE}, reduction_factor=${REDUCTION_FACTOR} ===\"\necho \"=== Running on ${SLURM_NNODES} nodes, ${SLURM_NTASKS} tasks, $(( SLURM_NTASKS / SLURM_NNODES )) tasks/node ===\"\n\necho \"=== MPI diagnostic ===\"\nsrun -n 1 $JULIA --project=/users/kausbori/PETSc_jl_scalability -e '\nusing MPI\nMPI.Init()\nprintln(\"MPI library: \", MPI.libmpi)\nprintln(\"MPI version: \", MPI.MPI_LIBRARY_VERSION_STRING)\nprintln(\"hostname: \", gethostname())\n'\necho \"=== End MPI diagnostic ===\"\n\necho \"MPI run started at $(date)\"\nsrun -n ${NTASKS} $JULIA --heap-size-hint=1G \\\n    --project=/users/kausbori/PETSc_jl_scalability ex45.jl \\\n  -Nx ${NX} \\\n  -Ny ${NY} \\\n  -Nz ${NZ} \\\n  -pc_mg_levels ${NMGLEVELS} \\\n  -ksp_type cg \\\n  -pc_type mg \\\n  -mg_levels_ksp_type chebyshev \\\n  -mg_levels_pc_type sor \\\n  -ksp_rtol 1e-8 \\\n  -mg_coarse_ksp_type preonly \\\n  -mg_coarse_pc_type telescope \\\n  -mg_coarse_telescope_reduction_factor ${REDUCTION_FACTOR} \\\n  -mg_coarse_telescope_pc_type lu \\\n  -mg_coarse_telescope_pc_factor_mat_solver_type superlu_dist \\\n  -pc_mg_log \\\n  -malloc_view \\\n  -memory_view \\\n  -ksp_converged_reason \\\n  -ksp_monitor_true_residual \\\n  -log_view \\\n  2>&1\necho \"MPI run finished at $(date)\"\n\necho \"=== Memory usage ===\"\nsacct -j ${SLURM_JOB_ID} --format=JobID,MaxRSS,AveRSS,NNodes,NCPUs --units=G\n\necho \"exit: $?\"\necho \"Job finished at $(date)\""
  },
  {
    "path": "examples/scalability_tests/makefile",
    "content": "-include ../../../../petscdir.mk\n\nLOCDIR           = src/ksp/ksp/tutorials/\nMANSEC           = KSP\nCLEANFILES       = rhs.vtk solution.vtk bench_pcsetup\nNP               = 1\nDIRS             = network amrex\n\ninclude ${PETSC_DIR}/lib/petsc/conf/variables\ninclude ${PETSC_DIR}/lib/petsc/conf/rules\n\ntestex100: ex100.PETSc\n\t-@OMPI_MCA_mpi_warn_on_fork=0 ${MPIEXEC} -n 1 ./ex100 -test  > ex100_1.tmp 2>&1; \\\n\t if (${DIFF} output/ex100_1.testout ex100_1.tmp > /dev/null 2>&1) then \\\n           echo \"C/C++ Python example src/ksp/ksp/tutorials/ex100 run successfully with 1 MPI process\"; \\\n\t else \\\n           echo \"Possible error running C/C++ Python src/ksp/ksp/tutorials/ex100 with 1 MPI process\"; \\\n           echo \"See https://petsc.org/release/faq/\";\\\n           cat ex100_1.tmp;\\\n           touch ${PETSC_DIR}/check_error;\\\n         fi; \\\n         ${RM} -f ex100_1.tmp\n\ninclude ${PETSC_DIR}/lib/petsc/conf/test\n"
  },
  {
    "path": "examples/scalability_tests/parse_scaling.jl",
    "content": "# EXCLUDE FROM TESTING\n#!/usr/bin/env julia\n# parse_scaling.jl\n# Usage: julia parse_scaling.jl scaling_*.out\n\nusing Printf\n\nstruct ScalingResult\n    jobid            :: String\n    ntasks           :: Int\n    nx               :: Int\n    ny               :: Int\n    nz               :: Int\n    mg_levels        :: Int\n    ncoarse          :: Int\n    solve_time       :: Float64   # application \"Solve time:\" field\n    ksp_solve_time   :: Float64   # PETSc KSPSolve event time (for weak scaling)\n    ksp_iter         :: Int\n    l2_error         :: Float64\n    max_error        :: Float64\n    residual         :: Float64\n    total_gflops     :: Float64\n    gflops_s         :: Float64\n    converged_reason :: String\n    backend          :: String    # \"native\" or \"PETSc.jl\"\nend\n\nfunction parse_file(filename::String)\n    m = match(r\"scaling([a-zA-Z]*)_(\\d+)_n(\\d+)_nx(\\d+)_ny(\\d+)_nz(\\d+)_mg(\\d+)_nc(\\d+)\\.out\", basename(filename))\n    if isnothing(m)\n        @warn \"Filename $filename does not match expected pattern, skipping\"\n        return nothing\n    end\n    variant   = m[1]   # e.g. \"\", \"Galerkin\", \"NATIVE\"\n    jobid     = m[2]\n    ntasks    = parse(Int, m[3])\n    nx        = parse(Int, m[4])\n    ny        = parse(Int, m[5])\n    nz        = parse(Int, m[6])\n    mg_levels = parse(Int, m[7])\n    ncoarse   = parse(Int, m[8])\n    backend = if uppercase(variant) == \"NATIVE\"\n        \"native\"\n    elseif uppercase(variant) == \"LOCALLIB\"\n        \"local lib\"\n    else\n        \"PETSc.jl\"\n    end\n\n    solve_time       = NaN\n    ksp_solve_time   = NaN\n    ksp_iter         = -1\n    l2_error         = NaN\n    max_error        = NaN\n    residual         = NaN\n    total_gflops     = NaN\n    gflops_s         = NaN\n    converged_reason = \"UNKNOWN\"\n\n    in_petsc_summary = false\n    in_ksp_monitor   = false\n\n    for line in eachline(filename)\n\n        # Detect PETSc performance summary block\n        if occursin(\"PETSc Performance Summary\", line)\n            in_petsc_summary = true\n        end\n\n        # Detect KSP monitor lines (leading spaces + digit + \" KSP\")\n        if match(r\"^\\s+\\d+ KSP\", line) !== nothing\n            in_ksp_monitor = true\n        end\n\n        # KSP monitor block ends at the \"Linear solve\" line\n        if occursin(\"Linear solve\", line) && occursin(\"due to\", line)\n            in_ksp_monitor = false\n            m2 = match(r\"Linear solve (\\w+) due to (\\S+)\", line)\n            isnothing(m2) || (converged_reason = string(m2[1] == \"converged\" ? \"OK \" : \"FAIL \") * m2[2])\n            continue\n        end\n\n        # Skip KSP monitor lines entirely\n        in_ksp_monitor && continue\n\n        # ---- application output (before PETSc summary) ----\n        if !in_petsc_summary\n\n            if occursin(\"Outer KSP iterations:\", line)\n                m2 = match(r\"Outer KSP iterations:\\s+(\\d+)\", line)\n                isnothing(m2) || (ksp_iter = parse(Int, m2[1]))\n\n            elseif occursin(\"Final residual norm\", line)\n                m2 = match(r\"Final residual norm\\s+([\\d.e+\\-]+)\", line)\n                isnothing(m2) || (residual = parse(Float64, m2[1]))\n\n            elseif occursin(\"Solve time:\", line)\n                m2 = match(r\"Solve time:\\s+([\\d.e+\\-]+)\", line)\n                isnothing(m2) || isnan(solve_time) && (solve_time = parse(Float64, m2[1]))\n\n            elseif occursin(\"L2 error:\", line)\n                m2 = match(r\"L2 error:\\s+([\\d.e+\\-]+)\", line)\n                isnothing(m2) || isnan(l2_error) && (l2_error = parse(Float64, m2[1]))\n\n            elseif occursin(\"Max error:\", line)\n                m2 = match(r\"Max error:\\s+([\\d.e+\\-]+)\", line)\n                isnothing(m2) || isnan(max_error) && (max_error = parse(Float64, m2[1]))\n            end\n\n        # ---- PETSc performance summary block ----\n        else\n            # KSPSolve event line: extract the Max time (column 3 after the counts)\n            # Format: \"KSPSolve   count ratio  maxtime ratio  ...\"\n            if match(r\"^\\s*KSPSolve\\s\", line) !== nothing && isnan(ksp_solve_time)\n                # fields: Name Count Ratio MaxTime Ratio ...\n                vals = split(strip(line))\n                # vals[1]=KSPSolve, vals[2]=count, vals[3]=ratio, vals[4]=maxtime\n                if length(vals) >= 4\n                    t = tryparse(Float64, vals[4])\n                    isnothing(t) || (ksp_solve_time = t)\n                end\n            end\n\n            if match(r\"^\\s*Flops:\\s\", line) !== nothing\n                vals = split(strip(replace(line, r\"^\\s*Flops:\\s*\" => \"\")))\n                length(vals) >= 4 && (total_gflops = parse(Float64, vals[4]) / 1e9)\n\n            elseif match(r\"^\\s*Flops/sec:\\s\", line) !== nothing\n                vals = split(strip(replace(line, r\"^\\s*Flops/sec:\\s*\" => \"\")))\n                length(vals) >= 4 && (gflops_s = parse(Float64, vals[4]) / 1e9)\n            end\n        end\n    end\n\n    return ScalingResult(jobid, ntasks, nx, ny, nz, mg_levels, ncoarse,\n                         solve_time, ksp_solve_time, ksp_iter,\n                         l2_error, max_error, residual,\n                         total_gflops, gflops_s,\n                         converged_reason, backend)\nend\n\nfunction ndofs(r::ScalingResult)\n    return r.nx * r.ny * r.nz\nend\n\nfunction print_table(results::Vector{ScalingResult})\n    sort!(results, by = r -> (r.ntasks, r.backend))\n\n    println()\n    @printf(\"%-12s  %6s  %4s  %4s  %15s  %9s  %10s  %11s  %10s  %10s  %4s  %12s  %12s  %12s  %s\\n\",\n            \"JobID\", \"Ntasks\", \"MG\", \"NC\", \"Grid\", \"Backend\",\n            \"SolveTime\", \"KSPSolveTime\", \"TotGFlops\",\n            \"GFlops/s\", \"KSP\", \"L2_error\", \"Max_error\", \"Residual\", \"Converged\")\n    println(repeat(\"-\", 190))\n\n    for r in results\n        grid  = @sprintf(\"%dx%dx%d\", r.nx, r.ny, r.nz)\n        ksp_t = isnan(r.ksp_solve_time) ? \"        N/A\" : @sprintf(\"%11.3f\", r.ksp_solve_time)\n        @printf(\"%-12s  %6d  %4d  %4d  %15s  %9s  %10.3f  %s  %10.2f  %10.2f  %4d  %12.4e  %12.4e  %12.4e  %s\\n\",\n                r.jobid, r.ntasks, r.mg_levels, r.ncoarse, grid, r.backend,\n                r.solve_time, ksp_t, r.total_gflops, r.gflops_s,\n                r.ksp_iter, r.l2_error, r.max_error, r.residual,\n                r.converged_reason)\n    end\n    println()\nend\n\nfunction print_convergence(results::Vector{ScalingResult})\n    iso = filter(r -> r.nx == r.ny == r.nz, results)\n    sort!(iso, by = r -> r.nx)\n\n    if length(iso) >= 2\n        println(\"Spatial convergence rate - isotropic runs (should be ~2.0 for second-order FD):\")\n        println(repeat(\"-\", 65))\n        for i in 2:length(iso)\n            r_fine   = iso[i]\n            r_coarse = iso[i-1]\n            h_fine   = 1.0 / (r_fine.nx   - 1)\n            h_coarse = 1.0 / (r_coarse.nx - 1)\n            if !isnan(r_fine.l2_error) && !isnan(r_coarse.l2_error)\n                rate = log(r_coarse.l2_error / r_fine.l2_error) / log(h_coarse / h_fine)\n                @printf(\"  %dx%dx%d -> %dx%dx%d  L2: %.4e->%.4e  rate= %.2f  [%s]\\n\",\n                        r_coarse.nx, r_coarse.ny, r_coarse.nz,\n                        r_fine.nx,   r_fine.ny,   r_fine.nz,\n                        r_coarse.l2_error, r_fine.l2_error, rate, r_fine.backend)\n            end\n        end\n        println()\n    end\nend\n\nfunction print_scaling(results::Vector{ScalingResult})\n    # Print separate weak scaling tables per backend\n    backends = unique(r.backend for r in results)\n    for backend in sort(backends)\n        subset = filter(r -> r.backend == backend, results)\n        sorted = sort(subset, by = r -> r.ntasks)\n        isempty(sorted) && continue\n\n        ref    = sorted[1]\n        t0_ksp   = ref.ksp_solve_time\n        t0_solve = ref.solve_time\n        use_ksp  = !isnan(t0_ksp)\n        t0       = use_ksp ? t0_ksp : t0_solve\n\n        label = use_ksp ? \"KSPSolve time\" : \"Solve time (fallback)\"\n        println(\"Weak scaling efficiency [$backend] based on $label (relative to smallest ntasks):\")\n        println(repeat(\"-\", 85))\n        @printf(\"  %-6s  %-15s  %8s  %11s  %10s  %10s  %s\\n\",\n                \"Ntasks\", \"Grid\", \"DOFs/core\", \"KSPSolve(s)\", \"SolveTime\", \"Efficiency\", \"Converged\")\n        println(repeat(\"-\", 85))\n        for r in sorted\n            t_ksp = isnan(r.ksp_solve_time) ? NaN : r.ksp_solve_time\n            t_use = use_ksp ? t_ksp : r.solve_time\n            eff   = isnan(t_use) ? NaN : t0 / t_use * 100\n            dpc   = ndofs(r) / r.ntasks\n            grid_str = @sprintf(\"%dx%dx%d\", r.nx, r.ny, r.nz)\n            ksp_str  = isnan(t_ksp) ? \"        N/A\" : @sprintf(\"%11.3f\", t_ksp)\n            eff_str  = isnan(eff)   ? \"       N/A\" : @sprintf(\"%9.1f%%\", eff)\n            @printf(\"  %-6d  %-15s  %8.0f  %s  %10.3f  %s  %s\\n\",\n                    r.ntasks, grid_str, dpc, ksp_str, r.solve_time, eff_str, r.converged_reason)\n        end\n        println()\n    end\nend\n\nfunction main()\n    if isempty(ARGS)\n        println(\"Usage: julia parse_scaling.jl scaling_*.out\")\n        exit(1)\n    end\n\n    results = ScalingResult[]\n    for f in ARGS\n        isfile(f) || (@warn \"File not found: $f, skipping\"; continue)\n        r = parse_file(f)\n        isnothing(r) || push!(results, r)\n    end\n\n    isempty(results) && (println(\"No valid files found.\"); exit(1))\n\n    print_table(results)\n    print_convergence(results)\n    print_scaling(results)\nend\n\nmain()"
  },
  {
    "path": "examples/scalability_tests/submit_scaling.sh",
    "content": "#!/bin/bash\n# submit_scaling.sh\n# Usage: ./submit_scaling.sh <ntasks> <Nx> <Ny> <Nz> <mg_levels> [ncoarse]\n#\n# Arguments:\n#   ntasks     - total MPI tasks (default: 8)\n#   Nx/Ny/Nz   - global grid size in each dimension (default: 129)\n#   mg_levels  - number of multigrid levels (default: 4)\n#   ncoarse    - number of ranks for coarse solve (default: 16)\n#\n# Coarse grid size guidance:\n#   mg_levels=4, fine=129^3  -> coarse ~16^3 (~4096 DOF)\n#   mg_levels=5, fine=257^3  -> coarse ~17^3 (~4913 DOF)\n#\n# Examples:\n#   ./submit_scaling.sh 64  257 257 257 5 16\n#   ./submit_scaling.sh 512 1025 1025 1025 6 16\n#   ./submit_scaling.sh 4096 2049 2049 2049 7 16\n\nNTASKS=${1:-8}\nNX=${2:-129}\nNY=${3:-129}\nNZ=${4:-129}\nNMGLEVELS=${5:-4}\nNCOARSE=${6:-16}\n\nif [ ${NCOARSE} -gt ${NTASKS} ]; then\n  ec\n  ho \"ERROR: NCOARSE=${NCOARSE} > NTASKS=${NTASKS}\"\n  exit 1\nfi\n\nREDUCTION_FACTOR=$((NTASKS / NCOARSE))\n\nNTASKS_PER_NODE=64\nNNODES=$(( (NTASKS + NTASKS_PER_NODE - 1) / NTASKS_PER_NODE ))\nACTUAL_NTASKS_PER_NODE=$(( NTASKS < NTASKS_PER_NODE ? NTASKS : NTASKS_PER_NODE ))\n\necho \"Submitting: ntasks=${NTASKS}, nodes=${NNODES}, ntasks-per-node=${ACTUAL_NTASKS_PER_NODE}\"\necho \"            Nx=${NX}, Ny=${NY}, Nz=${NZ}, mg_levels=${NMGLEVELS}\"\necho \"            ncoarse=${NCOARSE}, reduction_factor=${REDUCTION_FACTOR}\"\n\nsbatch \\\n  --ntasks=${NTASKS} \\\n  --nodes=${NNODES} \\\n  --ntasks-per-node=${ACTUAL_NTASKS_PER_NODE} \\\n  --output=\"scaling_%j_n${NTASKS}_nx${NX}_ny${NY}_nz${NZ}_mg${NMGLEVELS}_nc${NCOARSE}.out\" \\\n  --export=ALL,NTASKS=${NTASKS},NX=${NX},NY=${NY},NZ=${NZ},NMGLEVELS=${NMGLEVELS},NCOARSE=${NCOARSE},REDUCTION_FACTOR=${REDUCTION_FACTOR} \\\n  job.sh"
  },
  {
    "path": "examples/scalability_tests/weak_scaling_plot.jl",
    "content": "# EXCLUDE FROM TESTING\nusing GLMakie\nusing Statistics\n\n# All KSPSolve times per (ntasks, backend)\n# Multiple runs where available\n\ndata = Dict(\n    :native => Dict(\n        64   => [26.917, 27.155, 26.854],\n        512  => [31.492, 30.122, 30.607, 30.307],\n        4096 => [30.694, 28.214, 28.498],\n        32768 => [50.858],\n    ),\n    :petscjl => Dict(\n        64   => [27.916, 27.108, 28.121],\n        512  => [33.670, 32.482, 34.236],\n        4096 => [34.332, 44.244],\n        32768 => [63.300],\n    ),\n    :locallib => Dict(\n        64   => [27.065, 27.006, 27.551],\n        512  => [34.456, 32.033, 30.708],\n        4096 => [38.414, 35.292, 34.220],\n        32768 =>[73.108],   \n    ),\n)\n\nntasks = [64, 512, 4096, 32768]\n\nfunction stats(d, backend)\n    means = [isempty(d[backend][n]) ? NaN : mean(d[backend][n]) for n in ntasks]\n    mins  = [isempty(d[backend][n]) ? NaN : minimum(d[backend][n]) for n in ntasks]\n    maxs  = [isempty(d[backend][n]) ? NaN : maximum(d[backend][n]) for n in ntasks]\n    return means, mins, maxs\nend\n\nmean_native,   min_native,   max_native   = stats(data, :native)\nmean_petscjl,  min_petscjl,  max_petscjl  = stats(data, :petscjl)\nmean_locallib, min_locallib, max_locallib = stats(data, :locallib)\n\nfig = Figure(size = (900, 600), fontsize = 14)\n\nax = Axis(fig[1, 1],\n    title  = \"Weak Scaling on LUMI-C | KSPSolve Time (3D Poisson, 64 tasks/node), ex45.jl\",\n    xlabel = \"Number of MPI tasks, [number of nodes], (global grid size)\",\n    ylabel = \"Solution time (KSPSolve) (s)\",\n    xscale = log2,\n    xticks = (ntasks, [\"64\\n[1]\\n(513³)\", \"512\\n[8]\\n(1025³)\", \"4096\\n[64]\\n(2049³)\", \"32768\\n[512]\\n(4097³)\"]),\n    xminorticksvisible = false,\n    yminorticksvisible = false,\n    limits = (nothing, nothing, 0, 75),\n)\n\ncol_native   = :black\ncol_petscjl  = :dodgerblue\ncol_locallib = :tomato\n\n# Shaded min-max bands (only where data exists)\n# native: all 4 points\nband!(ax, ntasks, min_native,   max_native,   color = (col_native,   0.10))\n# petscjl: all 4 points\nband!(ax, ntasks, min_petscjl,  max_petscjl,  color = (col_petscjl,  0.15))\n# locallib: all 4 points\nband!(ax, ntasks[1:4], min_locallib[1:4], max_locallib[1:4], color = (col_locallib, 0.15))\n\n# Mean lines\nlines!(ax, ntasks,       mean_native,              color = col_native,   linewidth = 2.5, label = \"Native C\")\nlines!(ax, ntasks,       mean_petscjl,             color = col_petscjl,  linewidth = 2.5, label = \"PETSc.jl (_jll)\")\nlines!(ax, ntasks,  mean_locallib[1:4],       color = col_locallib, linewidth = 2.5, label = \"Local lib\")\n# Dashed extension hint for local lib pending\nscatter!(ax, [32768], [NaN], color = col_locallib, markersize = 14, marker = :diamond,\n         strokewidth = 1.5, strokecolor = :white)  # placeholder, won't render NaN\n\n# Individual run scatter points\nfor (backend, col, mkr) in [(:native, col_native, :circle), (:petscjl, col_petscjl, :rect), (:locallib, col_locallib, :diamond)]\n    for n in ntasks\n        vals = data[backend][n]\n        isempty(vals) && continue\n        scatter!(ax, fill(n, length(vals)), vals, color = col, markersize = 9, marker = mkr)\n    end\nend\n\n# Mean markers (larger, white outline)\nscatter!(ax, ntasks,      mean_native,        color = col_native,   markersize = 14, marker = :circle,  strokewidth = 1.5, strokecolor = :white)\nscatter!(ax, ntasks,      mean_petscjl,       color = col_petscjl,  markersize = 14, marker = :rect,    strokewidth = 1.5, strokecolor = :white)\nscatter!(ax, ntasks,  mean_locallib,       color = col_locallib, markersize = 14, marker = :diamond, strokewidth = 1.5, strokecolor = :white)\n\n# Ideal flat line based on native baseline\nhlines!(ax, [mean_native[1]], color = :gray, linewidth = 1.5, linestyle = :dash, label = \"Ideal (flat)\")\n\naxislegend(ax, position = :lt, framevisible = true, labelsize = 13)\n\nLabel(fig[2, 1],\n    \"Shaded bands show min–max range across repeated runs. Large markers show mean.\",\n    fontsize = 11, color = :gray50, tellwidth = false)\n\nsave(\"weak_scaling.png\", fig, px_per_unit = 2)\nprintln(\"Saved weak_scaling.png\")\n"
  },
  {
    "path": "examples/stokes2d_linear_dmstag.jl",
    "content": "# INCLUDE IN MPI TEST\n# This shows how to solve the 2D incompressible Stokes equations using SNES solvers,\n# using a staggered grid discretization and a Velocity-Pressure formulation\n#   \n#   Governing equations:\n#              dVx/dx + dVz/dz = αP                             |   Mass balance (with numerical compressibility)\n#   -dP/dx + dTxx/dx + dTxz/dz = 0                              |   Horizontal force balance\n#   -dP/dz + dTxz/dx + dTzz/dz = rho*g                          |   Vertical force balance\n#   \n#   with:\n#       Exx = dVx/dx, Ezz = dVz/dz, Exz = 0.5*(dVx/dz + dVz/dx) |   Strain rate definition\n#\n#      | Txx |   | 2*eta   0     0   |  | Exx |\n#      | Tzz | = |   0   2*eta   0   |  | Ezz |                 |   Linear viscous (isotropic) rheology\n#      | Txz |   |   0     0   2*eta |  | Exz |\n#\n# This example also uses the Automatic differentiation package ForwardDiff\n#\n#=\n Solver options for the 2D variable-viscosity Stokes problem.\n Since the Stokes system is a saddle-point problem, FieldSplit with Schur\n complement is the recommended iterative approach.\n NOTE: do NOT use -pc_fieldsplit_detect_saddle_point; let the DMStag provide\n       the natural field splits (face = velocity, element = pressure).\n NOTE: This is a linear problem. Add -snes_type ksponly for a single linear\n       solve without Newton line search.\n\n Usage examples:\n\n 1) Direct solver (serial, default):\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64\n\n 2) Direct solver with MUMPS (parallel):\n   mpiexec -n 4 julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64 \\\n       -snes_type ksponly \\\n       -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps\n\n 3) FieldSplit Schur + default sub-solvers (serial, ~7 FGMRES iterations):\n       PETSc defaults (GMRES+ILU) on velocity and pressure sub-blocks.\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -ksp_converged_reason -ksp_rtol 1e-10\n\n 4) FieldSplit Schur + LU on velocity block (serial, ~11 FGMRES iterations):\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -fieldsplit_face_ksp_type preonly -fieldsplit_face_pc_type lu \\\n       -fieldsplit_element_ksp_type preonly -fieldsplit_element_pc_type jacobi \\\n       -ksp_converged_reason -ksp_rtol 1e-10\n\n 5) FieldSplit Schur + default sub-solvers (parallel, 4 cores, ~7 FGMRES iterations):\n   mpiexec -n 4 julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -ksp_converged_reason -ksp_rtol 1e-10\n\n 6) FieldSplit Schur + MUMPS on velocity block (parallel, 4 cores, ~11 FGMRES iterations):\n   mpiexec -n 4 julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -fieldsplit_face_ksp_type preonly -fieldsplit_face_pc_type lu \\\n       -fieldsplit_face_pc_factor_mat_solver_type mumps \\\n       -fieldsplit_element_ksp_type preonly -fieldsplit_element_pc_type jacobi \\\n       -ksp_converged_reason -ksp_rtol 1e-10\n\n 7) FieldSplit Schur + Galerkin MG on velocity (serial, ~16 FGMRES iterations):\n       Same approach as PETSc ex4.c. 3-level Galerkin MG with Chebyshev+SOR\n       smoothers on the velocity sub-block. Uses FGMRES because the MG V-cycle\n       makes the preconditioner variable.\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -fieldsplit_face_pc_type mg -fieldsplit_face_pc_mg_levels 3 \\\n       -fieldsplit_face_pc_mg_galerkin \\\n       -fieldsplit_face_mg_levels_ksp_max_it 6 \\\n       -fieldsplit_element_ksp_type preonly -fieldsplit_element_pc_type none \\\n       -ksp_converged_reason -ksp_monitor -ksp_rtol 1e-10\n\n 8) FieldSplit Schur + Galerkin MG on velocity (parallel, 4 cores):\n   mpiexec -n 4 julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 64 -stag_grid_y 64 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -fieldsplit_face_pc_type mg -fieldsplit_face_pc_mg_levels 3 \\\n       -fieldsplit_face_pc_mg_galerkin \\\n       -fieldsplit_face_mg_levels_ksp_max_it 6 \\\n       -fieldsplit_element_ksp_type preonly -fieldsplit_element_pc_type none \\\n       -ksp_converged_reason -ksp_rtol 1e-10\n\n 9) Isoviscous MG benchmark (matches C ex4.c isovisc_nondim_abf_mg test, 3 FGMRES iterations):\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 24 -stag_grid_y 24 -eta2 1 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -fieldsplit_face_pc_type mg -fieldsplit_face_pc_mg_levels 3 \\\n       -fieldsplit_face_pc_mg_galerkin \\\n       -fieldsplit_face_mg_levels_ksp_max_it 6 \\\n       -fieldsplit_element_ksp_type preonly -fieldsplit_element_pc_type none \\\n       -fieldsplit_face_ksp_converged_reason \\\n       -ksp_converged_reason -ksp_monitor\n\n 9b) Isoviscous MG + selfp Schur + Jacobi smoothers (matches C ex4.c isovisc_nondim_abf_mg_2, ~5 FGMRES iters):\n       The C version uses -build_auxiliary_operator (explicit 1/η mass matrix for Schur)\n       and Chebyshev+Jacobi smoothers. We approximate with -pc_fieldsplit_schur_precondition selfp.\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 32 -stag_grid_y 32 -eta2 1 \\\n       -snes_type ksponly \\\n       -ksp_type fgmres -pc_type fieldsplit \\\n       -pc_fieldsplit_type schur -pc_fieldsplit_schur_fact_type upper \\\n       -pc_fieldsplit_schur_precondition selfp \\\n       -fieldsplit_element_ksp_type preonly -fieldsplit_element_pc_type jacobi \\\n       -fieldsplit_face_pc_type mg -fieldsplit_face_pc_mg_levels 3 \\\n       -fieldsplit_face_pc_mg_galerkin \\\n       -fieldsplit_face_mg_levels_ksp_max_it 6 \\\n       -ksp_converged_reason -ksp_monitor\n\n 10) Monolithic MG with FieldSplit Schur smoother (serial, ~2 GMRES iterations):\n       Uses FieldSplit Schur as the MG smoother to handle the saddle-point\n       structure directly, without needing a custom preconditioner matrix.\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 16 -stag_grid_y 16 \\\n       -snes_type ksponly \\\n       -ksp_type gmres \\\n       -pc_type mg -pc_mg_galerkin -pc_mg_levels 2 \\\n       -mg_levels_ksp_type richardson -mg_levels_ksp_richardson_scale 0.5 \\\n       -mg_levels_ksp_max_it 20 \\\n       -mg_levels_pc_type fieldsplit \\\n       -mg_levels_pc_fieldsplit_type schur -mg_levels_pc_fieldsplit_schur_fact_type upper \\\n       -mg_coarse_pc_type lu \\\n       -ksp_converged_reason -ksp_monitor\n\n 11) Monolithic MG with custom Pmat + Jacobi smoother (serial, ~16 GMRES iterations):\n       Matches C ex4.c 3d_nondim_mono_mg_lamemstyle test. Uses -custom_pc_mat to\n       build a separate preconditioner matrix with 1/η on the pressure diagonal,\n       enabling simple Jacobi smoothing on the full saddle-point system.\n   julia +1.12 --project=. examples/stokes2d_linear_dmstag.jl \\\n       -stag_grid_x 16 -stag_grid_y 16 \\\n       -snes_type ksponly \\\n       -custom_pc_mat \\\n       -ksp_type gmres \\\n       -pc_type mg -pc_mg_galerkin -pc_mg_levels 2 \\\n       -mg_levels_ksp_type richardson -mg_levels_pc_type jacobi \\\n       -mg_levels_ksp_richardson_scale 0.5 -mg_levels_ksp_max_it 20 \\\n       -mg_coarse_pc_type lu \\\n       -ksp_converged_reason -ksp_monitor\n=#\n\n\nusing PETSc, MPI\nusing ForwardDiff, LinearAlgebra\nconst HAS_CAIROMAKIE = try using CairoMakie; true catch; false end\n\npetsclib = first(PETSc.petsclibs);\nPETSc.initialized(petsclib) || PETSc.initialize(petsclib)\n\n\n\"\"\"\n    rVx,rVz,rP = local_residuals(Vx_l::Array{_T,2}, Vz_l::Array{_T,2}, P_l::Array{_T,2}, params::NamedTuple) \n\nComputes the local residual for a small patch of Vx,Vz,P\n\"\"\"\nfunction local_residuals(Vx_l::Matrix, Vz_l::Matrix, P_l::Matrix, params::NamedTuple) \n    # strainrates\n    Exx_l = diff(Vx_l,dims=1) ./ params.Δx;            # dVx/dx\n    Ezz_l = diff(Vz_l,dims=2) ./ params.Δz;            # dVz/dz\n    Exz_l = 0.5*(diff(Vz_l[:,2:end],dims=1) ./ params.Δx + diff(Vx_l[2:end,:],dims=2) ./ params.Δz);             # dVz/dz\n\n    # 2nd invariant of strainrate @ center (interpolate xz ->xx)\n    # NOTE: I think this is using the correct Exx/Ezz points, but \n    # better to double check\n    #Eii = sqrt(Exx_l[2,2]^2 + Ezz_l[2,2]^2 + 2*sum(Exz_l.^2)/4);\n            \n    # once we have that we can compute Tii\n    #Tii = 2*params.ηl * Eii\n    #η   = Tii / (2*Eii + 1e-16)   # avoid division by zero\n\n    # stresses, assuming linear viscosity\n    Txx_l = 2*params.η_center[1:2,:] .* Exx_l;        # Txx = 2*eta*Exx\n    Tzz_l = 2*params.η_center[:,1:2] .* Ezz_l;        # Tzz = 2*eta*Ezz\n    Txz_l = 2*params.η_vertex .* Exz_l;        # Txz = 2*eta*Exz\n\n    # compute derivatives\n    dPdx_l   = diff(  P_l[:,2:end  ],dims=1) ./ params.Δx;\n    dTxxdx_l = diff(Txx_l[:,2:end-1],dims=1) ./ params.Δx;\n    dTxzdz_l = diff(Txz_l[1:end-1,:],dims=2) ./ params.Δz;\n            \n    # x-momentum\n    rVx     = -dPdx_l[1] + dTxxdx_l[1] + dTxzdz_l[1];\n\n    # compute derivatives\n    dPdz_l   = diff(P_l[2:end,:],dims=2) ./ params.Δz;\n    dTzzdz_l = diff(Tzz_l[2:end-1,:],dims=2) ./ params.Δz;\n    dTxzdx_l = diff(Txz_l[:,1:end-1],dims=1) ./ params.Δx;\n            \n    # z-momentum\n    rVz = -dPdz_l[1] + dTzzdz_l[1] + dTxzdx_l[1] - params.ρ;\n            \n    # mass conservation\n    rP = Exx_l[2,2] + Ezz_l[2,2] + (1/params.κ) .* P_l[2,2];\n    #rP = Exx_l[2,2] + Ezz_l[2,2] ;\n    \n    return rVx, rVz, rP\nend\n\n\"\"\"\n    res = local_residual_vec(x_in::Vector, params::NamedTuple) \n    # create a DMStag replica compatible with the original coeff DM on rank 0\n    dv, de, dc = LibPETSc.DMStagGetDOF(petsclib, user_ctx.dmCoeff)\n    dm_coeff_rank0 = PETSc.DMStag(petsclib, MPI.COMM_SELF,\n                                 (PETSc.DM_BOUNDARY_GHOSTED, PETSc.DM_BOUNDARY_GHOSTED),\n                                 (Nx, Nz),\n                                 (dv, de, dc),\n                                 1,\n                                 PETSc.DMSTAG_STENCIL_BOX)\n    PETSc.setuniformcoordinates_stag!(dm_coeff_rank0, (user_ctx.xlim[1],user_ctx.zlim[1]), (user_ctx.xlim[2],user_ctx.zlim[2]))\n\n    vrep_coeff = PETSc.DMGlobalVec(dm_coeff_rank0)\n\nResidual function that calls `local_residuals` and can be used with ForwardDiff.\nIt also sets ghost point values if needed. \n\"\"\"\nfunction local_residual_vec(x_in::Vector, params, I, N)\n    nVx  = (3,3)\n    nVz  = (3,3)\n    nP   = (2,2)\n    Vx_l = reshape(x_in[1:9],   nVx)\n    Vz_l = reshape(x_in[10:18], nVz)\n    P_l  = reshape(x_in[19:22], nP )\n\n    # we need to deal with BC's here; there may be better ways to do that (e.g, adjusting )\n    if I[2]==1 \n        if BC.bottom == :free_slip\n            Vx_l[:,1] = Vx_l[:,2]   # free slip\n        end\n    end\n    if I[2]==N[2]\n        if BC.top == :free_slip\n            Vx_l[:,3] = Vx_l[:,2]   # free slip\n        end\n    end\n    if I[1]==1 \n        if BC.left == :free_slip\n            Vz_l[1,:] = Vz_l[:,2]   # free slip\n        end\n    end\n    if I[1]==N[1] \n        if BC.right == :free_slip\n            Vz_l[3,:] = Vz_l[2,:]   # free slip\n        end\n    end\n                \n    rVx,rVz,rP = local_residuals(Vx_l, Vz_l, P_l, params)\n\n    return [rVx,rVz,rP]\nend\n\nfunction FormRes!(r_g, snes, x_g, user_ctx)\n    dm = PETSc.getDM(snes)\n    \n    # Copy global to local vectors\n    LibPETSc.VecSet(petsclib, user_ctx.r_l, 0.0) # set residual to zero before accumulating contributions\n    LibPETSc.VecSet(petsclib, r_g, 0.0) # set residual to zero before accumulating contributions\n    \n    LibPETSc.VecSet(petsclib, user_ctx.x_l, 0.0) # set solution to zero before accumulating contributions\n    PETSc.dm_global_to_local!(x_g, user_ctx.x_l, dm)\n\n    # ghost point values\n    set_ghostpoint_values!(user_ctx.x_l, dm, petsclib, user_ctx.BC )\n    \n    # get coordinates\n    X_coord,Z_coord,_ = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, user_ctx.dm)\n\n    # get the corners and global sizes\n    corners       = PETSc.getcorners_dmstag(dm)\n    Nx, Nz        = size(dm)[1:2]\n\n    LibPETSc.VecSet(petsclib,user_ctx.r_l, 0.0) # set residual to zero before accumulating contributions\n    Xlocal = LibPETSc.DMStagVecGetArray(petsclib, dm, user_ctx.x_l)\n    Rlocal = LibPETSc.DMStagVecGetArray(petsclib, dm, user_ctx.r_l)\n    \n    P  = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_ELEMENT,0)]);\n    Vx = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_LEFT,   0)]);\n    Vz = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_DOWN,   0)]);\n\n    rP  = @view(Rlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_ELEMENT,0)]);\n    rVx = @view(Rlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_LEFT,   0)]);\n    rVz = @view(Rlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_DOWN,   0)]);\n\n    Δx, Δz = user_ctx.dx, user_ctx.dz;\n\n    # Get coefficient array for density and eta (stored in user_ctx.coeff_l)\n    coeff_array = LibPETSc.DMStagVecGetArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l)\n    rho_vz     = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_LEFT, 0)])\n    eta_center = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_ELEMENT,   0)])\n    eta_vertex = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_DOWN_LEFT, 0)])\n\n#=\n    # ----\n    # just checking: do this by hand\n    Exx = diff(Vx[1:end,1:end],dims=1) ./ Δx;             # dVx/dx\n    Ezz = diff(Vz[1:end,1:end],dims=2) ./ Δz;             # dVz/dz\n    Exz = 0.5 .* (diff(Vx[2:end,:],dims=2) ./ Δz .+         # 0.5*(dVx/dz + dVz/dx)\n                  diff(Vz[:,2:end],dims=1) ./ Δx);\n\n    Txx = 2 .* user_ctx.eta1 .* Exx;    # Txx = 2*eta*Exx\n    Tzz = 2 .* user_ctx.eta1 .* Ezz;    # Tzz = 2*eta*Ezz\n\n    # We actually have to do some padding around this to take BC's properly into account\n    Txz = 2 .* user_ctx.eta1 .* Exz;    # Txz = 2*eta*Exz\n\n                ρ = rho_vz[ix, iy];\n    dP_dx = diff(P[2:end-1,2:end-1],dims=1) ./ Δx;\n    dTxx_dx = diff(Txx[2:end,2:end-1],dims=1) ./ Δx;\n    dTxz_dz = diff(Txz[2:end-1,1:end],dims=2) ./ Δz;\n    rM1 = -dP_dx + dTxx_dx + dTxz_dz        \n\n    # 2nd momentum balance\n    dP_dz   = diff(P[2:end-1,2:end-1],dims=2) ./ Δz;\n    dTzz_dz = diff(Tzz[2:end-1,2:end],dims=2) ./ Δz;\n    dTxz_dx = diff(Txz[1:end,2:end-1],dims=1) ./ Δx;\n    \n    ρg = zeros(size(dP_dz))\n    for i=1:size(ρg,1), j=1:size(ρg,2)\n        x,z = X_coord[i+1,1], Z_coord[j,2];         # coordinate of Vz points\n        if GetPhase(user_ctx,x,1)\n            ρg[i,j] = user_ctx.rho1;\n        else\n            ρg[i,j] = user_ctx.rho2;  \n        end\n    end\n\n\n    rM2 = -dP_dz + dTzz_dz + dTxz_dx + ρg    # to be added:  gravity term\n\n    # conservation of mass\n    rMass = Exx[2:end,2:end-1] + Ezz[2:end-1,2:end] + (1/user_ctx.kappa) .* P[2:end-1,2:end-1];\n    =#\n\n    # ----\n\n    #=\n    # Staggered grid layout (3×4 cells): \n\n    Vx   P   Vx   P   Vx   P   Vx   P  \n         \n    o - Vz - o - Vz - o - Vz - o   Vz \n    |        |        |        |       \n    Vx   P   Vx   P   Vx   P   Vx   P  \n    |        |        |        |       \n    o - Vz - o - Vz - o - Vz - o   Vz \n    |        |        |        |       \n    Vx   P   Vx   P   Vx   P   Vx   P \n    |        |        |        |      \n    o - Vz - o - Vz - o - Vz - o   Vz \n    |        |        |        |       \n    Vx   P   Vx   P   Vx   P   Vx   P  \n    |        |        |        |       \n    o - Vz - o - Vz - o - Vz - o   Vz \n    |        |        |        |       \n    Vx   P   Vx   P   Vx   P   Vx   P \n    |        |        |        |       \n    o - Vz - o - Vz - o - Vz - o   Vz \n    \n    Note: (1) the grid points outside the mesh are added by default to make the arrays\n              regular in size and can be used to set ghost point boundary conditions.\n          (2) Adding ghost points adds layers of \"P\" cells around it, so adding one ghostpoints\n              would make the P grid be 4x3 \"real\" points, but \"6x5\" including additional points (at left and bottom).\n    =#\n\n    # collect the residuals\n    for ix=corners.lower[1] : corners.upper[1]\n        for iy=corners.lower[2] : corners.upper[2]\n            Vx_l = [Vx[ix-1, iy-1] Vx[ix-1, iy] Vx[ix-1, iy+1];\n                    Vx[ix  , iy-1] Vx[ix  , iy] Vx[ix  , iy+1];\n                    Vx[ix+1, iy-1] Vx[ix+1, iy] Vx[ix+1, iy+1]];\n            Vz_l = [Vz[ix-1, iy-1] Vz[ix-1, iy] Vz[ix-1, iy+1];\n                    Vz[ix  , iy-1] Vz[ix  , iy] Vz[ix  , iy+1];\n                    Vz[ix+1, iy-1] Vz[ix+1, iy] Vz[ix+1, iy+1]];\n            P_l  = [P[ix-1, iy-1]  P[ix-1, iy];\n                    P[ix  , iy-1]  P[ix,   iy] ];\n            \n            η_center = eta_center[ix-1 : ix+1,  iy-1 : iy+1 ]\n            η_vertex = eta_vertex[ix   : ix+1,  iy   : iy+1 ]\n            #η_vertex = eta_vertex[ix-1 : ix  ,  iy-1 : iy   ]\n            params = (Δx=Δx, Δz=Δz, κ=user_ctx.kappa, ρ=rho_vz[ix, iy], η_center=η_center, η_vertex=η_vertex); \n\n            rVx_l,rVz_l,rP_l = local_residuals(Vx_l, Vz_l, P_l, params)\n\n            # momentum residuals — only apply BCs at PHYSICAL boundaries\n            if iy > 1 && iy < Nz\n                rVz[ix, iy] = rVz_l;\n            else \n                rVz[ix, iy] = 0.0; # Dirichlet BC at physical top/bottom\n            end\n            if ix > 1 && ix < Nx\n                rVx[ix, iy] = rVx_l;\n            else \n                rVx[ix, iy] = 0.0; # Dirichlet BC at physical left/right\n            end\n            # mass conservation\n            rP[ix, iy] = rP_l\n        end\n    end\n\n    # restore arrays\n    LibPETSc.DMStagVecRestoreArray(petsclib, dm, user_ctx.r_l, Rlocal)\n    LibPETSc.DMStagVecRestoreArray(petsclib, dm, user_ctx.x_l, Xlocal)\n\n    # restore coefficient array\n    LibPETSc.DMStagVecRestoreArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l, coeff_array)\n\n    LibPETSc.DMStagRestoreProductCoordinateArrays(petsclib, user_ctx.dm, X_coord,Z_coord,nothing)\n\n    # Copy local into global residual vector\n    PETSc.dm_local_to_global!(user_ctx.r_l, r_g, dm)\n    \n    return 0\nend\n\n\nfunction FormJacobian!(J, snes, x_g, user_ctx)\n    dm = PETSc.getDM(snes)\n\n    # Extract the local vector\n    PETSc.dm_global_to_local!(x_g, user_ctx.x_l, dm, PETSc.INSERT_VALUES)\n\n    # get coordinates\n    X_coord,Z_coord,_ = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, user_ctx.dm)\n\n    # get the corners and global sizes\n    corners = PETSc.getcorners_dmstag(dm)\n    Nx, Nz  = size(dm)[1:2]\n    Xlocal  = LibPETSc.DMStagVecGetArray(petsclib, dm, user_ctx.x_l)\n    \n    P  = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_ELEMENT,0)]);\n    Vx = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_LEFT,   0)]);\n    Vz = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_DOWN,   0)]);\n\n    Δx, Δz = user_ctx.dx, user_ctx.dz;\n\n    # Get coefficient array for density and eta (stored in user_ctx.coeff_l)\n    coeff_array = LibPETSc.DMStagVecGetArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l)\n    rho_vz    = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_LEFT, 0)])\n    iee = PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_ELEMENT,   0)\n    iec = PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_DOWN_LEFT, 0)\n    eta_center = @view(coeff_array[:,:,iee])\n    eta_vertex = @view(coeff_array[:,:,iec])\n\n    # collect the residuals \n    for ix=corners.lower[1] : corners.upper[1] \n        for iy=corners.lower[2] : corners.upper[2]\n            Vx_l = [Vx[ix-1, iy-1] Vx[ix-1, iy] Vx[ix-1, iy+1];\n                    Vx[ix  , iy-1] Vx[ix  , iy] Vx[ix  , iy+1];\n                    Vx[ix+1, iy-1] Vx[ix+1, iy] Vx[ix+1, iy+1]];\n            Vz_l = [Vz[ix-1, iy-1] Vz[ix-1, iy] Vz[ix-1, iy+1];\n                    Vz[ix  , iy-1] Vz[ix  , iy] Vz[ix  , iy+1];\n                    Vz[ix+1, iy-1] Vz[ix+1, iy] Vz[ix+1, iy+1]];\n            P_l  = [P[ix-1, iy-1]  P[ix-1, iy];\n                    P[ix  , iy-1]  P[ix,   iy] ];\n\n\n            # location of all points in stencil format (following the ordering above)\n            iix = ix - 1       \n            iiy = iy - 1\n            i_vec = [# Vx\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix-1,iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix  ,iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix+1,iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix-1,iiy  ,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix  ,iiy  ,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix+1,iiy  ,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix-1,iiy+1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix  ,iiy+1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix+1,iiy+1,0,0),\n                       \n                    # Vz\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix-1,iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix  ,iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix+1,iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix-1,iiy  ,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix  ,iiy  ,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix+1,iiy  ,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix-1,iiy+1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix  ,iiy+1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix+1,iiy+1,0,0),\n\n                    # P\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, iix-1, iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, iix  , iiy-1,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, iix-1, iiy  ,0,0),\n                    LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, iix  , iiy  ,0,0)\n                ]  \n\n            # local parameters needed in the local residual routine\n            η_center = eta_center[ix-1 : ix+1,  iy-1 : iy+1 ]\n            η_vertex = eta_vertex[ix   : ix+1,  iy   : iy+1 ]\n            #η_vertex = eta_vertex[ix-1 : ix  ,  iy-1 : iy   ]\n            params = (Δx=Δx, Δz=Δz, κ=user_ctx.kappa, ρ=rho_vz[ix, iy], η_center=η_center, η_vertex=η_vertex, BC=user_ctx.BC); \n\n            # use AD to compute the coefficients of the local coefficients (note that in this case they are trivial)\n            r_local = (x) -> local_residual_vec(x, params, (ix, iy), (Nx, Nz))\n\n            x_in = vcat(Vx_l[:], Vz_l[:], P_l[:])\n            x_in = rand(Float64,size(x_in))\n            Jder = ForwardDiff.jacobian(r_local, x_in)\n            \n            iP  = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT,iix,iiy,0,0)\n            iVx = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT,   iix,iiy,0,0)\n            iVz = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN,   iix,iiy,0,0)\n            \n            iP_coeff= PETSc.LibPETSc.DMStagStencil[]\n            iVx_coeff = PETSc.LibPETSc.DMStagStencil[]\n            iVz_coeff = PETSc.LibPETSc.DMStagStencil[]\n            iP_val  = Float64[]\n            iVx_val = Float64[]\n            iVz_val = Float64[]\n            for i=1:length(i_vec)\n                #if Jder[3,i] != 0.0\n                    push!(iP_coeff, i_vec[i])\n                    push!(iP_val,   Jder[3,i])\n                #end\n                #if Jder[1,i] != 0.0\n                    push!(iVx_coeff, i_vec[i])\n                    push!(iVx_val,   Jder[1,i])\n                #end\n                #if Jder[2,i] != 0.0\n                    push!(iVz_coeff, i_vec[i])\n                    push!(iVz_val,   Jder[2,i])\n                #end\n            end\n\n            if ix == 1 && corners.lower[1] == 1\n                # Dirichlet BC on left physical boundary for Vx\n                iVx_coeff = [iVx]\n                iVx_val = Float64[1.0]\n            end\n            if iy == 1 && corners.lower[2] == 1\n                # Dirichlet BC on bottom physical boundary for Vz\n                iVz_coeff = [iVz]\n                iVz_val = Float64[1.0]\n            end\n\n            # mass conservation   \n            LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, J, 1, [iP], length(iP_coeff), iP_coeff, iP_val, PETSc.INSERT_VALUES)\n            \n            # x-momentum\n            if ix <=corners.upper[1]  \n                LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, J, 1, [iVx], length(iVx_coeff), iVx_coeff, iVx_val, PETSc.INSERT_VALUES)\n            end\n            if iy <=corners.upper[2]  \n                # z-momentum\n                LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, J, 1, [iVz], length(iVz_coeff), iVz_coeff, iVz_val, PETSc.INSERT_VALUES)\n            end\n            \n        end\n    end\n\n    # dirichlet BC's on right & top PHYSICAL boundaries for Vx,Vz \n    # Right boundary for Vx: extra Vx point at ix = Nx+1 (only on rank owning right edge)\n    if corners.upper[1] == Nx\n        for iy=corners.lower[2] : corners.upper[2] \n            ix = corners.upper[1] + 1\n            iix = ix - 1\n            iiy = iy - 1\n            iVx = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT, iix, iiy, 0, 0)\n            LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, J, 1, [iVx], 1, [iVx], [1.0], PETSc.INSERT_VALUES)\n        end\n    end\n\n    # Left boundary for Vx: handled inside main loop (ix==1 check), but also need the extra row at ix=1\n    # (already handled in main loop with ix==1 && corners.lower[1]==1)\n\n    # Top boundary for Vz: extra Vz point at iy = Nz+1 (only on rank owning top edge)\n    if corners.upper[2] == Nz\n        for ix=corners.lower[1] : corners.upper[1] \n            iy = corners.upper[2] + 1\n            iix = ix - 1\n            iiy = iy - 1\n            iVz = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_DOWN, iix, iiy, 0, 0)\n            LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, J, 1, [iVz], 1, [iVz], [1.0], PETSc.INSERT_VALUES)\n        end\n    end\n\n    # Bottom boundary for Vz: handled inside main loop (iy==1 check)\n\n    PETSc.assemble!(J);\n\n    # restore coefficient array\n    LibPETSc.DMStagVecRestoreArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l, coeff_array)\n\n    LibPETSc.DMStagRestoreProductCoordinateArrays(petsclib, user_ctx.dm, X_coord,Z_coord,nothing)\n    LibPETSc.DMStagVecRestoreArray(petsclib, dm, user_ctx.x_l, Xlocal)\n\n    # Store Julia matrix and coloring\n    user_ctx.jac    =   J;\n    #user_ctx.colors =   colors;\n\n    return 0\nend\n\n\"\"\"\n    FormJacobian!(J, P, snes, x_g, user_ctx)\n\n5-argument form called when Pmat != Amat (i.e., custom_pc_mat is used).\nFills J as usual, then copies J → P and adds 1/η on the pressure diagonal\nof P.\nThis mimics PETSc C ex4's -custom_pc_mat option.\n\"\"\"\nfunction FormJacobian!(J, P, snes, x_g, user_ctx)\n    # Fill J exactly as in the 4-arg method\n    FormJacobian!(J, snes, x_g, user_ctx)\n\n    dm = PETSc.getDM(snes)\n\n    # Copy J → P (same sparsity, both from DMCreateMatrix)\n    LibPETSc.MatCopy(petsclib, J, P, LibPETSc.SAME_NONZERO_PATTERN)\n\n    # Add 1/η_center to the pressure diagonal of P\n    corners = PETSc.getcorners_dmstag(dm)\n    coeff_array = LibPETSc.DMStagVecGetArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l)\n    iee = PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_ELEMENT, 0)\n    eta_center = @view(coeff_array[:,:,iee])\n\n    for ix = corners.lower[1] : corners.upper[1]\n        for iy = corners.lower[2] : corners.upper[2]\n            iix = ix - 1\n            iiy = iy - 1\n            iP = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT, iix, iiy, 0, 0)\n            val = 1.0 / eta_center[ix, iy]\n            LibPETSc.DMStagMatSetValuesStencil(petsclib, dm, P, 1, [iP], 1, [iP], [val], PETSc.ADD_VALUES)\n        end\n    end\n\n    PETSc.assemble!(P)\n\n    LibPETSc.DMStagVecRestoreArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l, coeff_array)\n\n    return 0\nend\n\n# Define a struct that holds data we need in the local SNES routines below   \nmutable struct Data_Stokes2D\n    # DMs and vectors\n    dm\n    dmCoeff\n    coeff_l\n    x_l # local solution vector\n    r_l # local residual vector\n    # physical parameters\n    eta1\n    eta2\n    rho1\n    rho2\n    gz\n    kappa\n    # dimensions\n    dx\n    dz\n    xlim\n    zlim\n    # boundary conditions\n    BC\n    # jacobian and sparsity pattern\n    jac\n    jac_cache\n    colors\nend\nuser_ctx = Data_Stokes2D(nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing);  # holds data we need in the local \n\nfunction PopulateCoefficientData!(user_ctx)\n    ghost_corners = PETSc.getghostcorners_dmstag(user_ctx.dmCoeff)\n    corners = PETSc.getcorners_dmstag(user_ctx.dmCoeff)\n  \n    user_ctx.coeff_l    =   PETSc.DMLocalVec(user_ctx.dmCoeff);\n    coeff_array         =   LibPETSc.DMStagVecGetArray(petsclib,user_ctx.dmCoeff,user_ctx.coeff_l);\n\n    # Get 1D coordinate arrays of the DM that contain the coordinates of the vertex and center points\n    X_coord,Z_coord,_ = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, user_ctx.dmCoeff)\n    \n    # Get the correct entries for each of our variables in local element-wise storage\n    η_center = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_ELEMENT,   0)]);\n    η_vertex = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_DOWN_LEFT, 0)]);\n    rho_vz   = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_LEFT,      0)]);\n\n    # Fill coefficients over the FULL ghost range so inter-rank ghosts also have valid data.\n    # The coordinate arrays from DMStagGetProductCoordinateArrays span the ghost range,\n    # so we index them directly (no clamping!) to get the correct coordinate for each ghost cell.\n    # Center properties (element DOF)\n    for i=ghost_corners.lower[1]:ghost_corners.upper[1], j=ghost_corners.lower[2]:ghost_corners.upper[2]\n        x,z = X_coord[i,2], Z_coord[j,2];\n        if GetPhase(user_ctx,x,z) == 1\n            η_center[i,j] = user_ctx.eta1;\n        else\n            η_center[i,j] = user_ctx.eta2;\n        end\n    end\n\n    # Vertex properties (corner DOF)\n    for i=ghost_corners.lower[1]:ghost_corners.upper[1], j=ghost_corners.lower[2]:ghost_corners.upper[2]\n        x,z = X_coord[i,1], Z_coord[j,1];\n        if GetPhase(user_ctx,x,z) == 1\n            η_vertex[i,j] = user_ctx.eta1;\n        else\n            η_vertex[i,j] = user_ctx.eta2;\n        end\n    end\n\n    # Density at Vz points (left/edge DOF)\n    for i=ghost_corners.lower[1]:ghost_corners.upper[1], j=ghost_corners.lower[2]:ghost_corners.upper[2]\n        x,z = X_coord[i,2], Z_coord[j,1];\n        if GetPhase(user_ctx,x,z) == 1\n            rho_vz[i,j] = user_ctx.rho1;\n        else\n            rho_vz[i,j] = user_ctx.rho2;  \n        end\n    end\n    \n    # restore arrays\n    LibPETSc.DMStagRestoreProductCoordinateArrays(petsclib, user_ctx.dmCoeff, X_coord,Z_coord,nothing)\n    LibPETSc.DMStagVecRestoreArray(petsclib, user_ctx.dmCoeff,user_ctx.coeff_l, coeff_array)\n\n    return nothing\nend\n\nfunction GetPhase(ctx,x,z)\n\n    # Returns phase 1 on left side, phase 2 on right side\n    phase = 1\n    if x < (ctx.xlim[2]-ctx.xlim[1])/2\n    #    phase = 2\n    end\n\n    if (x-0.5)^2 + (z-0.5)^2 < 0.1^2\n        phase = 2\n    end\n\n\n    return phase\nend\n\nfunction set_initial_solution!(x_g, user_ctx, petsclib)\n    \n    # Sets \n    LibPETSc.VecSet(petsclib, x_g, 0.0) # set global solution vector to zero (including ghost points)\n    \n    corners       = PETSc.getcorners_dmstag(user_ctx.dm)\n    X_coord,Z_coord,_ = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, user_ctx.dm)\n\n    LibPETSc.VecSet(petsclib,user_ctx.x_l, 0.0)\n    X_write = LibPETSc.DMStagVecGetArray(petsclib, user_ctx.dm, user_ctx.x_l)\n    \n    # add views (makes the code below more readable)\n    P  = @view(X_write[:,:,PETSc.DMStagDOF_Slot(user_ctx.dm, LibPETSc.DMSTAG_ELEMENT,0)]);\n    Vx = @view(X_write[:,:,PETSc.DMStagDOF_Slot(user_ctx.dm, LibPETSc.DMSTAG_LEFT,   0)]);\n    Vz = @view(X_write[:,:,PETSc.DMStagDOF_Slot(user_ctx.dm, LibPETSc.DMSTAG_DOWN,   0)]);\n\n    # Loop over P points (center)\n    for ix=corners.lower[1] : corners.upper[1] \n        for iy=corners.lower[2] : corners.upper[2] \n            x,z = X_coord[ix,2], Z_coord[iy,2];         # coordinate of center points\n            P[ix, iy] = π^2 * cos(π*x)*cos(π*z);  # Set DOF at element center\n        end\n    end\n\n    # Vx points\n    for ix=corners.lower[1] : corners.upper[1] \n        for iy=corners.lower[2] : corners.upper[2] \n            x,z = X_coord[ix,1], Z_coord[iy,2];         # coordinate of center points\n            Vx[ix, iy] = π*sin(π*x)*cos(π*z);     # Set DOF at Vx points\n        end\n    end\n\n    # Vz points (not including ghost points)\n    for ix=corners.lower[1] : corners.upper[1] \n        for iy=corners.lower[2] : corners.upper[2] \n            x,z = X_coord[ix,2], Z_coord[iy,1];         # coordinate of center points\n            \n            # Set DOF at Vz points\n            Vz[ix, iy] = -π*cos(π*x)*sin(π*z);\n        end\n    end\n\n    LibPETSc.DMStagVecRestoreArray(petsclib, user_ctx.dm, user_ctx.x_l, X_write)\n\n    #Base.finalize(X_write)  # Not needed; PETSc manages the array\n    LibPETSc.DMStagRestoreProductCoordinateArrays(petsclib, user_ctx.dm, X_coord,Z_coord,nothing)\n\n    # set ghost point values\n    set_ghostpoint_values!(user_ctx.x_l, user_ctx.dm, petsclib, user_ctx.BC )\n\n    PETSc.dm_local_to_global!(user_ctx.x_l,x_g, user_ctx.dm)\n\n    return nothing\nend\n\n# sets ghostpoint values for a DMStag vector for free slip BCs\n# Only sets ghost points at PHYSICAL boundaries (not inter-rank boundaries)\nfunction set_ghostpoint_values!(x_l, dm, petsclib, BC )\n    corners       = PETSc.getcorners_dmstag(dm)\n    ghost_corners = PETSc.getghostcorners_dmstag(dm)\n    Nx, Nz        = size(dm)[1:2]   # global sizes\n    \n    X_write = LibPETSc.DMStagVecGetArray(petsclib, dm, x_l)\n    \n    # add views (makes the code below more readable)\n    Vx = @view(X_write[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_LEFT,   0)]);\n    Vz = @view(X_write[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_DOWN,   0)]);\n\n    # set ghost points for Vx on bottom & top PHYSICAL boundary (free slip)\n    for ix=corners.lower[1] : corners.upper[1] \n        if BC.bottom == :free_slip && corners.lower[2] == 1\n            # physical bottom boundary (τxz=0, implies dVx/dz=0)\n            Vx[ix, ghost_corners.lower[2]] = Vx[ix, corners.lower[2]]\n        end\n        if BC.top == :free_slip && corners.upper[2] == Nz\n            # physical top boundary\n            Vx[ix, ghost_corners.upper[2]] = Vx[ix, corners.upper[2]]\n        end\n    end\n\n    # set ghost points for Vz on left & right PHYSICAL boundary (free slip)\n    for iy=corners.lower[2] : corners.upper[2] \n        if BC.left == :free_slip && corners.lower[1] == 1\n            # physical left boundary (τxz=0, implies dVz/dx=0)\n            Vz[ghost_corners.lower[1], iy] = Vz[corners.lower[1], iy]\n        end\n        if BC.right == :free_slip && corners.upper[1] == Nx\n            # physical right boundary\n            Vz[ghost_corners.upper[1], iy] = Vz[corners.upper[1], iy]\n        end\n    end\n    \n    LibPETSc.DMStagVecRestoreArray(petsclib, dm, x_l, X_write)\n    \n    return nothing\nend\n\n\"\"\"\n    Vx,Vy,P,X,Xc, ρ_vz = extract_solution_julia(x_g, user_ctx)\n\nExtracts the solution and returns them as julia arrays (without ghost points). \nEach rank extracts its owned DOF values, then MPI.Reduce collects them on rank 0.\n\"\"\"\nfunction extract_solution_julia(x_g::LibPETSc.PetscVec{PetscsLib}, user_ctx) where PetscsLib\n    petsclib = PETSc.getlib(PetscsLib)\n\n    comm = MPI.COMM_WORLD\n    rank = MPI.Comm_rank(comm)\n\n    dm = user_ctx.dm\n    Nx, Nz = size(dm)[1:2]\n    corners = PETSc.getcorners_dmstag(dm)\n\n    # ----- Solution extraction via global-to-local + owned-cell copy -----\n    PETSc.dm_global_to_local!(x_g, user_ctx.x_l, dm)\n    Xlocal = LibPETSc.DMStagVecGetArray(petsclib, dm, user_ctx.x_l)\n\n    P_view  = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_ELEMENT, 0)])\n    Vx_view = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_LEFT,    0)])\n    Vz_view = @view(Xlocal[:,:,PETSc.DMStagDOF_Slot(dm, LibPETSc.DMSTAG_DOWN,    0)])\n\n    ix_lo, ix_hi = corners.lower[1], corners.upper[1]\n    iy_lo, iy_hi = corners.lower[2], corners.upper[2]\n\n    # Allocate full-grid buffers (zeros); each rank fills its owned block\n    P_buf  = zeros(Nx,   Nz  )\n    Vx_buf = zeros(Nx+1, Nz  )\n    Vz_buf = zeros(Nx,   Nz+1)\n\n    P_buf[ix_lo:ix_hi, iy_lo:iy_hi]  .= P_view[ix_lo:ix_hi, iy_lo:iy_hi]\n    Vx_buf[ix_lo:ix_hi, iy_lo:iy_hi] .= Vx_view[ix_lo:ix_hi, iy_lo:iy_hi]\n    Vz_buf[ix_lo:ix_hi, iy_lo:iy_hi] .= Vz_view[ix_lo:ix_hi, iy_lo:iy_hi]\n\n    # Right boundary Vx: extra column at ix = Nx+1 (only rightmost ranks)\n    if corners.upper[1] == Nx\n        Vx_buf[Nx+1, iy_lo:iy_hi] .= Vx_view[Nx+1, iy_lo:iy_hi]\n    end\n    # Top boundary Vz: extra row at iy = Nz+1 (only topmost ranks)\n    if corners.upper[2] == Nz\n        Vz_buf[ix_lo:ix_hi, Nz+1] .= Vz_view[ix_lo:ix_hi, Nz+1]\n    end\n\n    LibPETSc.DMStagVecRestoreArray(petsclib, dm, user_ctx.x_l, Xlocal)\n\n    # Reduce (sum) all ranks' buffers onto rank 0\n    P_sol   = MPI.Reduce(P_buf,  MPI.SUM, 0, comm)\n    Vx_sol  = MPI.Reduce(Vx_buf, MPI.SUM, 0, comm)\n    Vz_sol  = MPI.Reduce(Vz_buf, MPI.SUM, 0, comm)\n\n    # ----- Coefficient extraction (same approach as solution) -----\n    coeff_array = LibPETSc.DMStagVecGetArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l)\n    ρ_vz_view = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_LEFT,      0)])\n    η_c_view  = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_ELEMENT,   0)])\n    η_v_view  = @view(coeff_array[:,:,PETSc.DMStagDOF_Slot(user_ctx.dmCoeff, LibPETSc.DMSTAG_DOWN_LEFT, 0)])\n\n    ρ_buf = zeros(Nx,   Nz+1)\n    ηc_buf = zeros(Nx,  Nz  )\n    ηv_buf = zeros(Nx+1, Nz+1)\n\n    ρ_buf[ix_lo:ix_hi, iy_lo:iy_hi]  .= ρ_vz_view[ix_lo:ix_hi, iy_lo:iy_hi]\n    ηc_buf[ix_lo:ix_hi, iy_lo:iy_hi] .= η_c_view[ix_lo:ix_hi, iy_lo:iy_hi]\n    ηv_buf[ix_lo:ix_hi, iy_lo:iy_hi] .= η_v_view[ix_lo:ix_hi, iy_lo:iy_hi]\n\n    # Extra boundary coefficients\n    if corners.upper[2] == Nz\n        ρ_buf[ix_lo:ix_hi, Nz+1] .= ρ_vz_view[ix_lo:ix_hi, Nz+1]\n    end\n    if corners.upper[1] == Nx\n        ηv_buf[Nx+1, iy_lo:iy_hi] .= η_v_view[Nx+1, iy_lo:iy_hi]\n    end\n    if corners.upper[2] == Nz\n        ηv_buf[ix_lo:ix_hi, Nz+1] .= η_v_view[ix_lo:ix_hi, Nz+1]\n    end\n    if corners.upper[1] == Nx && corners.upper[2] == Nz\n        ηv_buf[Nx+1, Nz+1] = η_v_view[Nx+1, Nz+1]\n    end\n\n    LibPETSc.DMStagVecRestoreArray(petsclib, user_ctx.dmCoeff, user_ctx.coeff_l, coeff_array)\n\n    ρ_vz_sol = MPI.Reduce(ρ_buf,  MPI.SUM, 0, comm)\n    η_c_sol  = MPI.Reduce(ηc_buf, MPI.SUM, 0, comm)\n    η_v_sol  = MPI.Reduce(ηv_buf, MPI.SUM, 0, comm)\n\n    # ----- Coordinates (rank 0 computes from global grid params) -----\n    if rank != 0\n        return nothing, nothing, nothing, nothing, nothing, nothing\n    end\n\n    dx = (user_ctx.xlim[2] - user_ctx.xlim[1]) / Nx\n    dz = (user_ctx.zlim[2] - user_ctx.zlim[1]) / Nz\n    x  = range(user_ctx.xlim[1], user_ctx.xlim[2], length=Nx+1) |> collect\n    z  = range(user_ctx.zlim[1], user_ctx.zlim[2], length=Nz+1) |> collect\n    xc = [(i - 0.5) * dx + user_ctx.xlim[1] for i in 1:Nx]\n    zc = [(j - 0.5) * dz + user_ctx.zlim[1] for j in 1:Nz]\n\n    material = (; ρ_vz = ρ_vz_sol, η_c = η_c_sol, η_v = η_v_sol)\n\n    return Vx_sol, Vz_sol, P_sol, (x,z), (xc,zc), material\nend \n\n\n# Read command-line options \ncli_opts = PETSc.parse_options(ARGS)           # NamedTuple\ncli = Dict{Symbol,Any}()\nfor (k, v) in pairs(cli_opts)\n    cli[k] = v\nend\n\n# Re-pack merged options into a NamedTuple for keyword splatting\nopts = (; [(k => cli[k]) for k in keys(cli)]...)\n\n\n# Main Solver\n# When running in parallel (MPI) without explicit grid size, use a small grid\n# so the CI test is fast and robust.  Users can always override with -stag_grid_x/-stag_grid_y.\nnprocs = MPI.Comm_size(MPI.COMM_WORLD)\nif nprocs > 1 && !haskey(cli, :stag_grid_x)\n    nx, nz       =   16, 16\nelse\n    nx, nz       =   64, 64;                  # number of nodes in x and z direction\nend\nuser_ctx.xlim    =   [0.0,1.0];                   # x and z dimensions\nuser_ctx.zlim    =   [0.0,1.0];\nxlim             =   user_ctx.xlim;\nzlim             =   user_ctx.zlim;\nuser_ctx.dx      =   (xlim[2]-xlim[1])/nx;   # x-resolution\nuser_ctx.dz      =   (zlim[2]-zlim[1])/nz;   # z-resolution\nuser_ctx.eta1    =   1;                      # viscosity phase 1\nuser_ctx.eta2    =   get(cli, :eta2, \"1e3\") |> s -> parse(Float64, s);  # viscosity phase 2 (default 1e3; use -eta2 1 for isoviscous)\nuser_ctx.rho1    =   1;                      # density phase 1\nuser_ctx.rho2    =   2;                      # density phase 2\nuser_ctx.gz      =   -1;                     # gravity magnitude\nuser_ctx.kappa   =   1e8;                    # incompressible penalty term\nBC               =   (left=:free_slip, right=:free_slip, top = :free_slip, bottom = :free_slip);  # boundary conditions\nuser_ctx.BC      =   BC;                     # boundary conditions\n\n# Create Solution and coefficient DMs\ncomm        = MPI.COMM_WORLD\ndofVertex   = 0\ndofEdge     = 1\ndofCenter   = 1\nuser_ctx.dm = PETSc.DMStag(petsclib, comm,\n                      (PETSc.DM_BOUNDARY_GHOSTED, PETSc.DM_BOUNDARY_GHOSTED),\n                      #(PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n                      (nx, nz),\n                      (dofVertex, dofEdge, dofCenter),\n                      1,\n                      PETSc.DMSTAG_STENCIL_BOX;\n                      opts...)\n\n# set coordinates\nPETSc.setuniformcoordinates_stag!( user_ctx.dm, (xlim[1],zlim[1]), (xlim[2],zlim[2]))\n\n# create coefficient DM (for rho and eta)\nuser_ctx.dmCoeff      =   LibPETSc.DMStagCreateCompatibleDMStag(petsclib, user_ctx.dm,1,1,1,0);   # rho and eta on VERTEX, eta on ELEMENT\nPETSc.setuniformcoordinates_stag!(user_ctx.dmCoeff, (xlim[1],zlim[1]), (xlim[2],zlim[2]))\n\n# Populate phases\nPopulateCoefficientData!(user_ctx);\n\n# Create solution and residual vectors\nx_g             =   PETSc.DMGlobalVec(user_ctx.dm);\nr_g             =   PETSc.DMGlobalVec(user_ctx.dm);\nLibPETSc.VecSet(petsclib,x_g, 0.0)\nLibPETSc.VecSet(petsclib,r_g, 0.0)\nuser_ctx.x_l    =   PETSc.DMLocalVec(user_ctx.dm);\nuser_ctx.r_l    =   PETSc.DMLocalVec(user_ctx.dm);\nLibPETSc.VecSet(petsclib,user_ctx.x_l, 0.0)\nLibPETSc.VecSet(petsclib,user_ctx.r_l, 0.0)\n\n# Create PETSc matrix for Jacobian\nJ               =   LibPETSc.DMCreateMatrix(petsclib,user_ctx.dm);\n\n# Create separate preconditioner matrix if -custom_pc_mat is requested\n# (adds 1/η on the pressure diagonal, enabling Jacobi smoothing in monolithic MG)\nuse_custom_pc_mat = haskey(cli, :custom_pc_mat)\nPmat = use_custom_pc_mat ? LibPETSc.DMCreateMatrix(petsclib, user_ctx.dm) : J\n\n# Setting up SNES\n# When running in parallel without explicit solver options, default to\n# FieldSplit Schur (recipe 3/5) which works on any number of processes.\n# Combined with the smaller default grid (16×16) this is fast and robust. \n# For larger grids / harder problems see recipes 3-9 in the header.\n# Serial LU is fine for 1 process but crashes in parallel without MUMPS.\nif nprocs > 1 && !haskey(cli, :pc_type)\n    defaults = (;\n        snes_rtol=1e-12,\n        snes_monitor=true,\n        snes_max_it = 500,\n        snes_monitor_true_residual=true,\n        snes_linesearch_monitor=false,\n        snes_type = \"ksponly\",\n        ksp_type = \"fgmres\",\n        pc_type = \"fieldsplit\",\n        pc_fieldsplit_type = \"schur\",\n        pc_fieldsplit_schur_fact_type = \"upper\",\n        ksp_rtol = 1e-10,\n        snes_converged_reason=true, help=false,\n    )\nelse\n    defaults = (;\n        snes_rtol=1e-12,\n        snes_monitor=true,\n        snes_max_it = 500,\n        snes_monitor_true_residual=true,\n        snes_linesearch_monitor=false,\n        ksp_type = \"preonly\",\n        pc_type = \"lu\",\n        snes_maxit=10,\n        snes_converged_reason=true, help=false,\n    )\nend\nsnes = PETSc.SNES(petsclib,comm;\n        defaults...,\n        opts...);\n\nsnes.user_ctx  =       user_ctx;       # crashes\n\nPETSc.setDM!(snes, user_ctx.dm)\n\n# Set first guess values for solution vector\nset_initial_solution!(x_g, user_ctx, petsclib)\n\nPETSc.setfunction!(snes, FormRes!, r_g)\nPETSc.setjacobian!(snes, FormJacobian!, J, Pmat)\n\nPETSc.solve!(x_g, snes);\n\n# Extract solution as well as coordinate vectors and copy that to rank 0 for plotting\nVx, Vz, P, X, Xc, material = extract_solution_julia(x_g, user_ctx)\n\nrank = MPI.Comm_rank(MPI.COMM_WORLD)\nif rank == 0\n    @show extrema(Vz)\nend\nif rank == 0 && 1==0\n    # only plot on rank 0\n\n    # Copy velocity to center points for plotting\n    Vx_c = (Vx[2:end,:] + Vx[1:end-1,:])/2;\n    Vz_c = (Vz[:,2:end] + Vz[:,1:end-1])/2;\n\n    # plot\n    fig = Figure()\n    ax = Axis(fig[1,1], title=\"Vz field\", xlabel=\"x\", ylabel=\"z\")\n    hm = heatmap!(ax, X[1], Xc[2], Vz)\n    Colorbar(fig[1,2], hm)\n\n    # Subsample for clearer visualization\n    #step = 2  # plot every 2nd point\n    #arrows2d!(ax, Xc[1][1:step:end], Xc[2][1:step:end], \n    #        Vx_c[1:step:end, 1:step:end], Vz_c[1:step:end, 1:step:end])\n\n    # overlay a single isocontour at value 0.5 (between rho1=0 and rho2=1)\n    contour!(ax, Xc[1], X[2], material.ρ_vz; levels=[1.5], color=:white, linewidth=2)\n    display(fig)\n\nend"
  },
  {
    "path": "src/LibPETSc.jl",
    "content": "module LibPETSc\n\nimport PETSc: _doc_external\n\nusing Libdl\nusing MPI\n\nexport PetscLibType,\n    petsclibs,\n    #PetscBool,\n    PETSC_TRUE,\n    PETSC_FALSE,\n    UnionPetscLibType,\n    getlib,\n    MatAssemblyType,\n    MAT_FLUSH_ASSEMBLY,\n    MAT_FINAL_ASSEMBLY,\n    InsertMode,\n    NOT_SET_VALUES,\n    INSERT_VALUES,\n    ADD_VALUES,\n    MAX_VALUES,\n    MIN_VALUES,\n    INSERT_ALL_VALUES,\n    ADD_ALL_VALUES,\n    INSERT_BC_VALUES,\n    ADD_BC_VALUES,\n    NormType,\n    NORM_1,\n    NORM_2,\n    NORM_FROBENIUS,\n    NORM_INFINITY,\n    NORM_1_AND_2,\n    PETSC_DETERMINE,\n    PETSC_DECIDE,\n    SCATTER_FORWARD,\n    SCATTER_REVERSE,\n    SCATTER_FORWARD_LOCAL,\n    SCATTER_REVERSE_LOCAL,\n    DMBoundaryType,\n    DM_BOUNDARY_NONE,\n    DM_BOUNDARY_GHOSTED,\n    DM_BOUNDARY_MIRROR,\n    DM_BOUNDARY_PERIODIC,\n    DM_BOUNDARY_TWIST,\n    DMDAStencilType,\n    DMDA_STENCIL_STAR,\n    DMDA_STENCIL_BOX,\n    DMStagStencilType,\n    DMSTAG_STENCIL_NONE,\n    DMSTAG_STENCIL_STAR,\n    DMSTAG_STENCIL_BOX,\n    MatStencil,\n    PetscArray\n\ninclude(\"LibPETSc_const.jl\")\ninclude(\"LibPETSc_startup.jl\")\ninclude(\"LibPETSc_lib.jl\")\n\ninclude(petsc_library_file)\n\nend # module\n"
  },
  {
    "path": "src/LibPETSc_const.jl",
    "content": "# define common PETSc constants\n# this excludes configurable constants (e.g. PetscScalar) which are set in lib.jl\n\nconst PetscErrorCode = Cint\n\nstruct PetscError <: Exception\n    code::PetscErrorCode\nend\n\nmacro chk(expr)\n    :((errcode = $(esc(expr))) == 0 || throw(PetscError(errcode)))\nend"
  },
  {
    "path": "src/LibPETSc_lib.jl",
    "content": "\"\"\"\n    PetscLibType{PetscScalar, PetscInt}(petsc_library)\n\nA container for specific PETSc libraries.\n\nAll other containers for PETSc objects should be typed on this to ensure that\ndispatch is correct.\n\"\"\"\nmutable struct PetscLibType{PetscScalar, PetscInt, LibType}\n    petsc_library::LibType\n    age::Int\nend\nfunction PetscLibType{ST, IT}(petsc_library) where {ST, IT}\n    LT = typeof(petsc_library)\n    return PetscLibType{ST, IT, LT}(petsc_library, 0)\nend\nconst UnionPetscLibType = Union{PetscLibType, Type{<:PetscLibType}}\n\n\"\"\"\n    getlib(; PetscScalar = Float64, PetscInt = Int64)\n\nReturn the `PetscLibType` with the associated parameters\n\"\"\"\nfunction getlib(; PetscScalar = Float64, PetscInt = Int64)\n    return PetscLibType{PetscScalar, PetscInt}()\nend\n\nfunction Base.getproperty(petsclib::UnionPetscLibType, name::Symbol)\n    if name == :PetscScalar\n        return scalartype(petsclib)\n    elseif name == :PetscReal\n        return realtype(petsclib)\n    elseif name == :PetscInt\n        return inttype(petsclib)\n    else\n        return getfield(petsclib, name)\n    end\nend\n\n\"\"\"\n    scalartype(petsclib::PetscLibType)\n\nreturn the scalar type for the associated `petsclib`\n\"\"\"\nscalartype(::PetscLibType{ST}) where {ST} = ST\nscalartype(::Type{PetscLib}) where {PetscLib <: PetscLibType{ST}} where {ST} =\n    ST\n\n\"\"\"\n    realtype(petsclib::PetscLibType)\n\nreturn the real type for the associated `petsclib`\n\"\"\"\nrealtype(::PetscLibType{ST}) where {ST} = real(ST)\nrealtype(::Type{PetscLib}) where {PetscLib <: PetscLibType{ST}} where {ST} =\n    real(ST)\n\n\"\"\"\n    inttype(petsclib::PetscLibType)\n\nreturn the int type for the associated `petsclib`\n\"\"\"\ninttype(::PetscLibType{ST, IT}) where {ST, IT} = IT\ninttype(\n    ::Type{PetscLib},\n) where {PetscLib <: PetscLibType{ST, IT}} where {ST, IT} = IT\n\nfunction initialize(libhdl::Ptr{Cvoid})\n    PetscInitializeNoArguments_ptr = dlsym(libhdl, :PetscInitializeNoArguments)\n    @chk ccall(PetscInitializeNoArguments_ptr, PetscErrorCode, ())\nend\n\nconst petsclibs = map(libs) do (lib, PetscScalar, PetscInt)\n    return PetscLibType{PetscScalar, PetscInt}(lib[1])\nend\n\nmacro for_petsc(expr)\n    quote\n        for petsclib in petsclibs\n            # String for the library\n            petsc_library = petsclib.petsc_library\n\n            # types we dispatch on\n            PetscLib = typeof(petsclib)\n            UnionPetscLib = Union{PetscLib, Type{PetscLib}}\n\n            PetscScalar = scalartype(petsclib)\n            PetscReal = realtype(petsclib)\n            PetscInt = inttype(petsclib)\n            PetscComplex = complex(PetscReal)\n\n            @eval esc($expr)\n        end\n    end\nend\n\n@for_petsc begin\n    getlib(::Type{$PetscLib}) = $petsclib\n    PetscLibType{$PetscScalar, $PetscInt}() = $petsclib\nend\n"
  },
  {
    "path": "src/LibPETSc_startup.jl",
    "content": "# Functions needed to find libraries\n#=\nfunction getlibs()\n    libs = ()\n    petsc_libs = ENV[\"JULIA_PETSC_LIBRARY\"]\n\n    flags = Libdl.RTLD_LAZY | Libdl.RTLD_DEEPBIND | Libdl.RTLD_GLOBAL\n\n    for petsc_lib in Base.parse_load_path(petsc_libs)\n        libs = (libs..., (petsc_lib, flags))\n    end\n    return libs\nend\n=#\nusing Preferences\n\n# @load_preference is evaluated at compile time; changing a preference via\n# set_library!() triggers automatic recompilation (standard Preferences.jl behaviour).\nconst libs = @static if @load_preference(\"library_path\", nothing) === nothing\n    using PETSc_jll\n    (\n        ((PETSc_jll.libpetsc_Float64_Real_Int64,), Float64, Int64),\n        ((PETSc_jll.libpetsc_Float32_Real_Int64,), Float32, Int64),\n        ((PETSc_jll.libpetsc_Float64_Complex_Int64,), Complex{Float64}, Int64),\n        ((PETSc_jll.libpetsc_Float32_Complex_Int64,), Complex{Float32}, Int64),\n        ((PETSc_jll.libpetsc_Float64_Real_Int32,), Float64, Int32),\n        ((PETSc_jll.libpetsc_Float32_Real_Int32,), Float32, Int32),\n        ((PETSc_jll.libpetsc_Float64_Complex_Int32,), Complex{Float64}, Int32),\n        ((PETSc_jll.libpetsc_Float32_Complex_Int32,), Complex{Float32}, Int32),\n    )\nelse\n    let _path   = @load_preference(\"library_path\"),\n        _scalar = @load_preference(\"PetscScalar\", \"Float64\"),\n        _int    = @load_preference(\"PetscInt\",    \"Int64\")\n        _st = _scalar == \"Float32\"        ? Float32          :\n              _scalar == \"ComplexFloat64\" ? Complex{Float64} :\n              _scalar == \"ComplexFloat32\" ? Complex{Float32} : Float64\n        _it = _int == \"Int32\" ? Int32 : Int64\n        (((_path,), _st, _it),)\n    end\nend\n\nconst petsc_library_file =\n    #get(ENV, \"JULIA_PETSC_LIBRARY_PATH\", \"../lib/petsc_library.jl\")\n    get(ENV, \"JULIA_PETSC_LIBRARY_PATH\", \"autowrapped/petsc_library.jl\")    # if all is well, we should be able to use this\n\n\n#=    \nfunction DataTypeFromString(libhdl::Ptr{Cvoid}, name::AbstractString)\n    PetscDataTypeFromString_ptr = dlsym(libhdl, :PetscDataTypeFromString)\n    dtype_ref = Ref{PetscDataType}()\n    found_ref = Ref{PetscBool}()\n    @chk ccall(\n        PetscDataTypeFromString_ptr,\n        PetscErrorCode,\n        (Cstring, Ptr{PetscDataType}, Ptr{PetscBool}),\n        name,\n        dtype_ref,\n        found_ref,\n    )\n    @assert found_ref[] == PETSC_TRUE\n    return dtype_ref[]\nend\n\nfunction PetscDataTypeGetSize(libhdl::Ptr{Cvoid}, dtype::PetscDataType)\n    PetscDataTypeGetSize_ptr = dlsym(libhdl, :PetscDataTypeGetSize)\n    datasize_ref = Ref{Csize_t}()\n    @chk ccall(\n        PetscDataTypeGetSize_ptr,\n        PetscErrorCode,\n        (PetscDataType, Ptr{Csize_t}),\n        dtype,\n        datasize_ref,\n    )\n    return datasize_ref[]\nend\n=#"
  },
  {
    "path": "src/PETSc.jl",
    "content": "# __precompile__(false)\n\nmodule PETSc\n\nusing MPI, LinearAlgebra, SparseArrays, OffsetArrays, Preferences\n\nMPI.Initialized() || MPI.Init()\n\nfunction _petsc_link(fname)\n\"\"\"\n[`$fname`](https://petsc.org/release/docs/manualpages/$fname.html)\n\"\"\"\nend\n\nfunction _doc_external(fname)\n\"\"\"\n- PETSc Manual: $(_petsc_link(fname))\n\"\"\"\nend\n\ninclude(\"LibPETSc.jl\")\nusing .LibPETSc\nexport LibPETSc\nexport audit_petsc_file\nexport set_petsclib\nexport set_library!, unset_library!, library_info\n\nusing Libdl\n\ninclude(\"init.jl\")\ninclude(\"vec.jl\")       \ninclude(\"mat.jl\")          \ninclude(\"options.jl\")\ninclude(\"ts.jl\")\ninclude(\"ksp.jl\")\ninclude(\"snes.jl\")          \ninclude(\"dm.jl\")          \ninclude(\"sys.jl\")\ninclude(\"dmda.jl\")          \ninclude(\"dmstag.jl\")\n\n# String convenience wrappers for SetType functions\ninclude(\"string_wrappers.jl\")       \ninclude(\"string_wrappers_extra.jl\")\n\n\ninclude(\"audit.jl\")\n\n\n\n#=\ninclude(\"utils.jl\")\ninclude(\"viewer.jl\")\n\ninclude(\"matshell.jl\")      # not yet wrapped!\ninclude(\"dm.jl\")            # partly wrapped, no tests yet\ninclude(\"dmda.jl\")          # not yet wrapped!\ninclude(\"pc.jl\")            # to be fixed/wrapped\ninclude(\"ksp.jl\")           # part is wrapped\ninclude(\"sys.jl\")\n\n##include(\"startup.jl\")  # can be removed (later)\n##include(\"lib.jl\")      # can be removed (later)\n##include(\"ref.jl\")      # can be removed (later)\n\n=#\n\nend\n"
  },
  {
    "path": "src/audit.jl",
    "content": "\"\"\"\n    audit_petsc_file(path::AbstractString)\n\nScan a PETSc.jl source file and report PETSc object creations and destroys.\n\nThis utility reads `path`, looks for common PETSc object creation patterns\n(`KSP(...)`, `SNES(...)`, `DMDA(...)`, `DMStag(...)`, as well as\n`VecCreate...`, `VecDuplicate...`, `Vec...WithArray(...)` and corresponding\n`Mat...` creators via either `PETSc.` or `LibPETSc.`), plus common DM/Vec/Mat\nallocators like `DMGlobalVec`, `DMLocalVec`, `DMGetCoordinateDM`,\n`DMStagCreateCompatibleDMStag`, and `DMCreateMatrix`; and for explicit\n`destroy(x)` calls (optionally prefixed with `PETSc.`).\n\nIt prints three sections:\n - CREATION statements: line numbers and variables assigned to created objects\n - DESTROY calls: line numbers and variables destroyed\n - POSSIBLY UNDESTROYED objects: variables that appear in creations but have no\n     matching destroy call\n    - FINALIZE calls: presence of `PETSc.finalize(petsclib)`; suggests adding it\n        if missing\n\nNotes:\n - Heuristic only: matches common constructors and `LibPETSc` creation routines;\n     it does not follow control flow or scopes.\n - Creations without assignment cannot be cross-checked against destroys.\n - Objects produced via helpers (e.g., `similar(...)`) are not detected unless\n     they use known creation patterns.\n\nReturns `nothing`.\n\"\"\"\nfunction audit_petsc_file(path::AbstractString)\n    # Read full content and strip block comments (#= ... =#) before line parsing\n    content = read(path, String)\n    content = replace(content, r\"(?s)#=.*?=#\" => \"\")\n    lines = split(content, '\\n')\n\n    # Patterns for creation calls\n    type_creators = r\"^(?:\\s*)(?:([A-Za-z_]\\w*)\\s*=\\s*)?(?:(?:PETSc|LibPETSc)\\.)?(KSP|SNES|DMDA|DMStag)\\s*\\(\"\n    # Match common PETSc Vec/Mat creators, including suffixed forms like\n    # VecCreateSeq, VecCreateMPI, VecDuplicateVecs, MatCreateSeqAIJ, etc.\n    vec_create = r\"^(?:\\s*)(?:([A-Za-z_]\\w*)\\s*=\\s*)?(?:(?:PETSc|LibPETSc)\\.)?Vec(?:Create\\w*|Duplicate\\w*|Load\\w*|\\w*WithArray)\\s*\\(\"\n    mat_create = r\"^(?:\\s*)(?:([A-Za-z_]\\w*)\\s*=\\s*)?(?:(?:PETSc|LibPETSc)\\.)?Mat(?:Create\\w*|Duplicate\\w*|Load\\w*|\\w*With\\w*Arrays)\\s*\\(\"\n    # Additional allocators that should be destroyed\n    dm_vec_alloc = r\"^(?:\\s*)(?:([A-Za-z_]\\w*)\\s*=\\s*)?(?:(?:PETSc|LibPETSc)\\.)?(DMGlobalVec|DMLocalVec)\\s*\\(\"\n    dm_alloc_dm = r\"^(?:\\s*)(?:([A-Za-z_]\\w*)\\s*=\\s*)?(?:(?:PETSc|LibPETSc)\\.)?(DMGetCoordinateDM|DMStagCreateCompatibleDMStag)\\s*\\(\"\n    dm_alloc_mat = r\"^(?:\\s*)(?:([A-Za-z_]\\w*)\\s*=\\s*)?(?:(?:PETSc|LibPETSc)\\.)?(DMCreateMatrix)\\s*\\(\"\n\n    # Some PETSc calls create multiple objects via tuple assignment\n    # e.g. `x,b = LibPETSc.MatCreateVecs(petsclib, A)`\n    mat_create_vecs = r\"^(?:\\s*)(.+?)\\s*=\\s*(?:(?:PETSc|LibPETSc)\\.)?MatCreateVecs\\s*\\(\"\n\n    # Pattern for destroy calls\n    destroy_pat = r\"^(?:\\s*)(?:(?:PETSc)\\.)?destroy\\s*\\(\\s*([A-Za-z_]\\w*)\"\n    # Pattern for finalize calls\n    finalize_pat = r\"^(?:\\s*)(?:(?:PETSc)\\.)?finalize\\s*\\(\\s*([A-Za-z_]\\w*)\"\n\n    created = Vector{Tuple{Int,Union{Nothing,String},String}}()\n    destroyed = Vector{Tuple{Int,String}}()\n    finalized = Vector{Tuple{Int,String}}()\n\n    for (i, ln_raw) in enumerate(lines)\n        # Skip empty and full-line comments\n        s = strip(ln_raw)\n        if isempty(s) || startswith(s, \"#\")\n            continue\n        end\n        ln_proc = ln_raw\n\n        if occursin(type_creators, ln_proc)\n            m = match(type_creators, ln_proc)\n            var = m.captures[1]\n            func = m.captures[2]\n            push!(created, (i, var, func))\n            continue\n        end\n        if occursin(vec_create, ln_proc)\n            m = match(vec_create, ln_proc)\n            var = m.captures[1]\n            push!(created, (i, var, \"Vec\"))\n            continue\n        end\n        if occursin(mat_create, ln_proc)\n            m = match(mat_create, ln_proc)\n            var = m.captures[1]\n            push!(created, (i, var, \"Mat\"))\n            continue\n        end\n        if occursin(dm_vec_alloc, ln_proc)\n            m = match(dm_vec_alloc, ln_proc)\n            var = m.captures[1]\n            push!(created, (i, var, \"Vec\"))\n            continue\n        end\n        if occursin(dm_alloc_dm, ln_proc)\n            m = match(dm_alloc_dm, ln_proc)\n            var = m.captures[1]\n            push!(created, (i, var, \"DM\"))\n            continue\n        end\n        if occursin(dm_alloc_mat, ln_proc)\n            m = match(dm_alloc_mat, ln_proc)\n            var = m.captures[1]\n            push!(created, (i, var, \"Mat\"))\n            continue\n        end\n\n        if occursin(mat_create_vecs, ln_proc)\n            m = match(mat_create_vecs, ln_proc)\n            lhs = m.captures[1]\n            # Strip parentheses and split on commas: \"(x, b)\" or \"x,b\" etc.\n            lhs = replace(lhs, \"(\" => \"\", \")\" => \"\")\n            vars = [strip(v) for v in split(lhs, ',') if !isempty(strip(v))]\n            if isempty(vars)\n                push!(created, (i, nothing, \"Vec\"))\n            else\n                for v in vars\n                    if occursin(r\"^[A-Za-z_]\\w*$\", v)\n                        push!(created, (i, v, \"Vec\"))\n                    end\n                end\n            end\n            continue\n        end\n\n        if occursin(destroy_pat, ln_proc)\n            m = match(destroy_pat, ln_proc)\n            var = m.captures[1]\n            push!(destroyed, (i, var))\n            continue\n        end\n        if occursin(finalize_pat, ln_proc)\n            m = match(finalize_pat, ln_proc)\n            var = m.captures[1]\n            push!(finalized, (i, var))\n            continue\n        end\n    end\n\n    println(\"CREATION statements:\")\n    for (lnum, var, func) in created\n        if isnothing(var)\n            println(\"  line $(lnum): $(func)(...) (no assignment)\")\n        else\n            println(\"  line $(lnum): $(var) = $(func)(...)\")\n        end\n    end\n\n    println(\"DESTROY calls:\")\n    for (lnum, var) in destroyed\n        println(\"  line $(lnum): destroy($(var))\")\n    end\n\n    created_vars = Set{String}()\n    for (_, var, _) in created\n        if !isnothing(var)\n            push!(created_vars, var::String)\n        end\n    end\n    destroyed_vars = Set{String}(map(x -> x[2], destroyed))\n\n    missing = setdiff(created_vars, destroyed_vars)\n    if !isempty(missing)\n        println(\"POSSIBLY UNDESTROYED objects:\")\n        for v in sort(collect(missing))\n            println(\"  $(v)\")\n        end\n    else\n        println(\"No obvious leaks: all assigned creations have a destroy call.\")\n    end\n\n    if isempty(finalized)\n        println(\"FINALIZE calls: none detected\")\n        println(\"Suggestion: add PETSc.finalize(petsclib) at the end of the routine.\")\n    else\n        println(\"FINALIZE calls:\")\n        for (lnum, var) in finalized\n            println(\"  line $(lnum): finalize($(var))\")\n        end\n    end\n\n    return nothing\nend\n"
  },
  {
    "path": "src/autowrapped/AO_wrappers.jl",
    "content": "# autodefined type arguments for class ------\n# -------------------------------------------------------\n\"\"\"\n\tAOFinalizePackage(petsclib::PetscLibType) \nThis function finalizes everything in the `AO` package. It is called\nfrom `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `AOInitializePackage()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Vec/AOFinalizePackage\"))\n\"\"\"\nfunction AOFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function AOFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:AOFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `AO` package. It is called\nfrom `PetscDLLibraryRegister_petscvec()` when using dynamic libraries, and on the first call to `AOCreate()`\nwhen using static or shared libraries.\n\nLevel: developer\n\n-seealso: `AOFinalizePackage()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Vec/AOInitializePackage\"))\n\"\"\"\nfunction AOInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function AOInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:AOInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOSetType(petsclib::PetscLibType,ao::AO, method::AOType) \nBuilds an application ordering for a particular `AOType`\n\nCollective\n\nInput Parameters:\n- `ao`     - The `AO` object\n- `method` - The name of the AO type\n\nOptions Database Key:\n- `-ao_type <type>` - Sets the `AO` type; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `AO`, `AOType`, `AOCreateBasic()`, `AOCreateMemoryScalable()`, `AOGetType()`, `AOCreate()`\n\n# External Links\n$(_doc_external(\"Vec/AOSetType\"))\n\"\"\"\nfunction AOSetType(petsclib::PetscLibType, ao::AO, method::AOType) end\n\n@for_petsc function AOSetType(petsclib::$UnionPetscLib, ao::AO, method::AOType )\n\n    @chk ccall(\n               (:AOSetType, $petsc_library),\n               PetscErrorCode,\n               (CAO, AOType),\n               ao, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::AOType = AOGetType(petsclib::PetscLibType,ao::AO) \nGets the `AO` type name (as a string) from the AO.\n\nNot Collective\n\nInput Parameter:\n- `ao` - The vector\n\nOutput Parameter:\n- `type` - The `AO` type name\n\nLevel: intermediate\n\n-seealso: `AO`, `AOType`, `AOSetType()`, `AOCreate()`\n\n# External Links\n$(_doc_external(\"Vec/AOGetType\"))\n\"\"\"\nfunction AOGetType(petsclib::PetscLibType, ao::AO) end\n\n@for_petsc function AOGetType(petsclib::$UnionPetscLib, ao::AO )\n\ttype_ = Ref{AOType}()\n\n    @chk ccall(\n               (:AOGetType, $petsc_library),\n               PetscErrorCode,\n               (CAO, Ptr{AOType}),\n               ao, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tAORegister(petsclib::PetscLibType,sname::String, fnc::external) \nRegister  an application ordering method\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - the name (`AOType`) of the `AO` scheme\n- `function` - the create routine for the application ordering method\n\nLevel: advanced\n\n-seealso: `AO`, `AOType`, `AOCreate()`, `AORegisterAll()`, `AOBASIC`, `AOADVANCED`, `AOMAPPING`, `AOMEMORYSCALABLE`\n\n# External Links\n$(_doc_external(\"Vec/AORegister\"))\n\"\"\"\nfunction AORegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function AORegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:AORegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAORegisterAll(petsclib::PetscLibType) \nRegisters all of the application ordering components in the `AO` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `AO`, `AOType`, `AORegister()`, `AORegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/AORegisterAll\"))\n\"\"\"\nfunction AORegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function AORegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:AORegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOView(petsclib::PetscLibType,ao::AO, viewer::PetscViewer) \nDisplays an application ordering.\n\nCollective\n\nInput Parameters:\n- `ao`     - the application ordering context\n- `viewer` - viewer used for display\n\nLevel: intermediate\n\nOptions Database Key:\n- `-ao_view` - calls `AOView()` at end of `AOCreate()`\n\n-seealso: [](sec_ao), `AO`, `PetscViewerASCIIOpen()`, `AOViewFromOptions()`\n\n# External Links\n$(_doc_external(\"Vec/AOView\"))\n\"\"\"\nfunction AOView(petsclib::PetscLibType, ao::AO, viewer::PetscViewer) end\n\n@for_petsc function AOView(petsclib::$UnionPetscLib, ao::AO, viewer::PetscViewer )\n\n    @chk ccall(\n               (:AOView, $petsc_library),\n               PetscErrorCode,\n               (CAO, PetscViewer),\n               ao, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOViewFromOptions(petsclib::PetscLibType,ao::AO, obj::PetscObject, name::String) \nView an `AO` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `ao`   - the application ordering context\n- `obj`  - optional object that provides the prefix used to search the options database\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](sec_ao), `AO`, `AOView()`, `PetscObjectViewFromOptions()`, `AOCreate()`\n\n# External Links\n$(_doc_external(\"Vec/AOViewFromOptions\"))\n\"\"\"\nfunction AOViewFromOptions(petsclib::PetscLibType, ao::AO, obj::PetscObject, name::String) end\n\n@for_petsc function AOViewFromOptions(petsclib::$UnionPetscLib, ao::AO, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:AOViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CAO, PetscObject, Ptr{Cchar}),\n               ao, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAODestroy(petsclib::PetscLibType,ao::AO) \nDestroys an application ordering.\n\nCollective\n\nInput Parameter:\n- `ao` - the application ordering context\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreate()`\n\n# External Links\n$(_doc_external(\"Vec/AODestroy\"))\n\"\"\"\nfunction AODestroy(petsclib::PetscLibType, ao::AO) end\n\n@for_petsc function AODestroy(petsclib::$UnionPetscLib, ao::AO )\n\tao_ = Ref(ao.ptr)\n\n    @chk ccall(\n               (:AODestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CAO},),\n               ao_,\n              )\n\n\tao.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOPetscToApplicationIS(petsclib::PetscLibType,ao::AO, is::IS) \nMaps an index set in the PETSc ordering to\nthe application-defined ordering.\n\nCollective\n\nInput Parameters:\n- `ao` - the application ordering context\n- `is` - the index set; this is replaced with its mapped values\n\nOutput Parameter:\n- `is` - the mapped index set\n\nLevel: intermediate\n\n-seealso: [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOApplicationToPetsc()`,\n`AOApplicationToPetscIS()`, `AOPetscToApplication()`, `ISSTRIDE`, `ISBLOCK`\n\n# External Links\n$(_doc_external(\"Vec/AOPetscToApplicationIS\"))\n\"\"\"\nfunction AOPetscToApplicationIS(petsclib::PetscLibType, ao::AO, is::IS) end\n\n@for_petsc function AOPetscToApplicationIS(petsclib::$UnionPetscLib, ao::AO, is::IS )\n\n    @chk ccall(\n               (:AOPetscToApplicationIS, $petsc_library),\n               PetscErrorCode,\n               (CAO, CIS),\n               ao, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOApplicationToPetscIS(petsclib::PetscLibType,ao::AO, is::IS) \nMaps an index set in the application\nordering to the PETSc ordering.\n\nCollective\n\nInput Parameters:\n- `ao` - the application ordering context\n- `is` - the index set; this is replaced with its mapped values\n\nOutput Parameter:\n- `is` - the mapped index set\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOPetscToApplication()`,\n`AOPetscToApplicationIS()`, `AOApplicationToPetsc()`, `ISSTRIDE`, `ISBLOCK`\n\n# External Links\n$(_doc_external(\"Vec/AOApplicationToPetscIS\"))\n\"\"\"\nfunction AOApplicationToPetscIS(petsclib::PetscLibType, ao::AO, is::IS) end\n\n@for_petsc function AOApplicationToPetscIS(petsclib::$UnionPetscLib, ao::AO, is::IS )\n\n    @chk ccall(\n               (:AOApplicationToPetscIS, $petsc_library),\n               PetscErrorCode,\n               (CAO, CIS),\n               ao, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOPetscToApplication(petsclib::PetscLibType,ao::AO, n::PetscInt, ia::Vector{PetscInt}) \nMaps a set of integers in the PETSc ordering to\nthe application-defined ordering.\n\nCollective\n\nInput Parameters:\n- `ao` - the application ordering context\n- `n`  - the number of integers\n- `ia` - the integers; these are replaced with their mapped value\n\nOutput Parameter:\n- `ia` - the mapped integers\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOApplicationToPetsc()`,\n`AOPetscToApplicationIS()`\n\n# External Links\n$(_doc_external(\"Vec/AOPetscToApplication\"))\n\"\"\"\nfunction AOPetscToApplication(petsclib::PetscLibType, ao::AO, n::PetscInt, ia::Vector{PetscInt}) end\n\n@for_petsc function AOPetscToApplication(petsclib::$UnionPetscLib, ao::AO, n::$PetscInt, ia::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:AOPetscToApplication, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{$PetscInt}),\n               ao, n, ia,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOApplicationToPetsc(petsclib::PetscLibType,ao::AO, n::PetscInt, ia::Vector{PetscInt}) \nMaps a set of integers in the application\nordering to the PETSc ordering.\n\nCollective\n\nInput Parameters:\n- `ao` - the application ordering context\n- `n`  - the number of integers\n- `ia` - the integers; these are replaced with their mapped value\n\nOutput Parameter:\n- `ia` - the mapped integers\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AOCreateBasic()`, `AOView()`, `AOPetscToApplication()`,\n`AOPetscToApplicationIS()`\n\n# External Links\n$(_doc_external(\"Vec/AOApplicationToPetsc\"))\n\"\"\"\nfunction AOApplicationToPetsc(petsclib::PetscLibType, ao::AO, n::PetscInt, ia::Vector{PetscInt}) end\n\n@for_petsc function AOApplicationToPetsc(petsclib::$UnionPetscLib, ao::AO, n::$PetscInt, ia::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:AOApplicationToPetsc, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{$PetscInt}),\n               ao, n, ia,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOPetscToApplicationPermuteInt(petsclib::PetscLibType,ao::AO, block::PetscInt, array::Vector{PetscInt}) \nPermutes an array of blocks of integers\nin the PETSc ordering to the application-defined ordering.\n\nCollective\n\nInput Parameters:\n- `ao`    - The application ordering context\n- `block` - The block size\n- `array` - The integer array\n\nOutput Parameter:\n- `array` - The permuted array\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOApplicationToPetsc()`, `AOPetscToApplicationIS()`\n\n# External Links\n$(_doc_external(\"Vec/AOPetscToApplicationPermuteInt\"))\n\"\"\"\nfunction AOPetscToApplicationPermuteInt(petsclib::PetscLibType, ao::AO, block::PetscInt, array::Vector{PetscInt}) end\n\n@for_petsc function AOPetscToApplicationPermuteInt(petsclib::$UnionPetscLib, ao::AO, block::$PetscInt, array::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:AOPetscToApplicationPermuteInt, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{$PetscInt}),\n               ao, block, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOApplicationToPetscPermuteInt(petsclib::PetscLibType,ao::AO, block::PetscInt, array::Vector{PetscInt}) \nPermutes an array of blocks of integers\nin the application-defined ordering to the PETSc ordering.\n\nCollective\n\nInput Parameters:\n- `ao`    - The application ordering context\n- `block` - The block size\n- `array` - The integer array\n\nOutput Parameter:\n- `array` - The permuted array\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOPetscToApplicationIS()`, `AOApplicationToPetsc()`\n\n# External Links\n$(_doc_external(\"Vec/AOApplicationToPetscPermuteInt\"))\n\"\"\"\nfunction AOApplicationToPetscPermuteInt(petsclib::PetscLibType, ao::AO, block::PetscInt, array::Vector{PetscInt}) end\n\n@for_petsc function AOApplicationToPetscPermuteInt(petsclib::$UnionPetscLib, ao::AO, block::$PetscInt, array::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:AOApplicationToPetscPermuteInt, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{$PetscInt}),\n               ao, block, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOPetscToApplicationPermuteReal(petsclib::PetscLibType,ao::AO, block::PetscInt, array::Vector{PetscReal}) \nPermutes an array of blocks of reals\nin the PETSc ordering to the application-defined ordering.\n\nCollective\n\nInput Parameters:\n- `ao`    - The application ordering context\n- `block` - The block size\n- `array` - The integer array\n\nOutput Parameter:\n- `array` - The permuted array\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOApplicationToPetsc()`, `AOPetscToApplicationIS()`\n\n# External Links\n$(_doc_external(\"Vec/AOPetscToApplicationPermuteReal\"))\n\"\"\"\nfunction AOPetscToApplicationPermuteReal(petsclib::PetscLibType, ao::AO, block::PetscInt, array::Vector{PetscReal}) end\n\n@for_petsc function AOPetscToApplicationPermuteReal(petsclib::$UnionPetscLib, ao::AO, block::$PetscInt, array::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:AOPetscToApplicationPermuteReal, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{$PetscReal}),\n               ao, block, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOApplicationToPetscPermuteReal(petsclib::PetscLibType,ao::AO, block::PetscInt, array::Vector{PetscReal}) \nPermutes an array of blocks of reals\nin the application-defined ordering to the PETSc ordering.\n\nCollective\n\nInput Parameters:\n- `ao`    - The application ordering context\n- `block` - The block size\n- `array` - The integer array\n\nOutput Parameter:\n- `array` - The permuted array\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOApplicationToPetsc()`, `AOPetscToApplicationIS()`\n\n# External Links\n$(_doc_external(\"Vec/AOApplicationToPetscPermuteReal\"))\n\"\"\"\nfunction AOApplicationToPetscPermuteReal(petsclib::PetscLibType, ao::AO, block::PetscInt, array::Vector{PetscReal}) end\n\n@for_petsc function AOApplicationToPetscPermuteReal(petsclib::$UnionPetscLib, ao::AO, block::$PetscInt, array::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:AOApplicationToPetscPermuteReal, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{$PetscReal}),\n               ao, block, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOSetFromOptions(petsclib::PetscLibType,ao::AO) \nSets `AO` options from the options database.\n\nCollective\n\nInput Parameter:\n- `ao` - the application ordering\n\nOptions Database Key:\n- `-ao_type <basic, memoryscalable>` - sets the type of the `AO`\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOCreate()`, `AOSetType()`, `AODestroy()`, `AOPetscToApplication()`, `AOApplicationToPetsc()`\n\n# External Links\n$(_doc_external(\"Vec/AOSetFromOptions\"))\n\"\"\"\nfunction AOSetFromOptions(petsclib::PetscLibType, ao::AO) end\n\n@for_petsc function AOSetFromOptions(petsclib::$UnionPetscLib, ao::AO )\n\n    @chk ccall(\n               (:AOSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CAO,),\n               ao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAOSetIS(petsclib::PetscLibType,ao::AO, isapp::IS, ispetsc::IS) \nSets the `IS` associated with the application ordering.\n\nCollective\n\nInput Parameters:\n- `ao`      - the application ordering\n- `isapp`   - index set that defines an ordering\n- `ispetsc` - index set that defines another ordering (may be `NULL` to use the natural ordering)\n\nLevel: beginner\n\n-seealso: [](sec_ao), [](sec_scatter), `AO`, `AOCreate()`, `AODestroy()`, `AOPetscToApplication()`, `AOApplicationToPetsc()`\n\n# External Links\n$(_doc_external(\"Vec/AOSetIS\"))\n\"\"\"\nfunction AOSetIS(petsclib::PetscLibType, ao::AO, isapp::IS, ispetsc::IS) end\n\n@for_petsc function AOSetIS(petsclib::$UnionPetscLib, ao::AO, isapp::IS, ispetsc::IS )\n\n    @chk ccall(\n               (:AOSetIS, $petsc_library),\n               PetscErrorCode,\n               (CAO, CIS, CIS),\n               ao, isapp, ispetsc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tao::AO = AOCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an application ordering. That is an object that maps from an application ordering to a PETSc ordering and vice versa\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator that is to share the `AO`\n\nOutput Parameter:\n- `ao` - the new application ordering\n\nOptions Database Key:\n- `-ao_type <aotype>` - create `AO` with particular format\n- `-ao_view`          - call `AOView()` at the conclusion of `AOCreate()`\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AO`, `AOView()`, `AOSetIS()`, `AODestroy()`, `AOPetscToApplication()`, `AOApplicationToPetsc()`\n\n# External Links\n$(_doc_external(\"Vec/AOCreate\"))\n\"\"\"\nfunction AOCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function AOCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tao_ = Ref{CAO}()\n\n    @chk ccall(\n               (:AOCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CAO}),\n               comm, ao_,\n              )\n\n\tao = AO(ao_[], petsclib)\n\n\treturn ao\nend \n\n\"\"\"\n\thasIndex::PetscBool = AOMappingHasApplicationIndex(petsclib::PetscLibType,ao::AO, idex::PetscInt) \nChecks if an `AO` has a requested application index.\n\nNot Collective\n\nInput Parameters:\n- `ao`   - The `AO`\n- `idex` - The application index\n\nOutput Parameter:\n- `hasIndex` - Flag is `PETSC_TRUE` if the index exists\n\nLevel: intermediate\n\n-seealso: [](sec_ao), `AOMappingHasPetscIndex()`, `AOCreateMapping()`, `AO`\n\n# External Links\n$(_doc_external(\"Vec/AOMappingHasApplicationIndex\"))\n\"\"\"\nfunction AOMappingHasApplicationIndex(petsclib::PetscLibType, ao::AO, idex::PetscInt) end\n\n@for_petsc function AOMappingHasApplicationIndex(petsclib::$UnionPetscLib, ao::AO, idex::$PetscInt )\n\thasIndex_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:AOMappingHasApplicationIndex, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{PetscBool}),\n               ao, idex, hasIndex_,\n              )\n\n\thasIndex = hasIndex_[]\n\n\treturn hasIndex\nend \n\n\"\"\"\n\thasIndex::PetscBool = AOMappingHasPetscIndex(petsclib::PetscLibType,ao::AO, idex::PetscInt) \nchecks if an `AO` has a requested PETSc index.\n\nNot Collective\n\nInput Parameters:\n- `ao`   - The `AO`\n- `idex` - The PETSc index\n\nOutput Parameter:\n- `hasIndex` - Flag is `PETSC_TRUE` if the index exists\n\nLevel: intermediate\n\n-seealso: [](sec_ao), `AOMappingHasApplicationIndex()`, `AOCreateMapping()`\n\n# External Links\n$(_doc_external(\"Vec/AOMappingHasPetscIndex\"))\n\"\"\"\nfunction AOMappingHasPetscIndex(petsclib::PetscLibType, ao::AO, idex::PetscInt) end\n\n@for_petsc function AOMappingHasPetscIndex(petsclib::$UnionPetscLib, ao::AO, idex::$PetscInt )\n\thasIndex_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:AOMappingHasPetscIndex, $petsc_library),\n               PetscErrorCode,\n               (CAO, $PetscInt, Ptr{PetscBool}),\n               ao, idex, hasIndex_,\n              )\n\n\thasIndex = hasIndex_[]\n\n\treturn hasIndex\nend \n\n\"\"\"\n\taoout::AO = AOCreateMapping(petsclib::PetscLibType,comm::MPI_Comm, napp::PetscInt, myapp::Vector{PetscInt}, mypetsc::Vector{PetscInt}) \nCreates an application mapping using two integer arrays.\n\nInput Parameters:\n- `comm`    - MPI communicator that is to share the `AO`\n- `napp`    - size of integer arrays\n- `myapp`   - integer array that defines an ordering\n- `mypetsc` - integer array that defines another ordering (may be `NULL` to indicate the identity ordering)\n\nOutput Parameter:\n- `aoout` - the new application mapping\n\nOptions Database Key:\n- `-ao_view` - call `AOView()` at the conclusion of `AOCreateMapping()`\n\nLevel: beginner\n\n-seealso: [](sec_ao), `AOCreateBasic()`, `AOCreateMappingIS()`, `AODestroy()`\n\n# External Links\n$(_doc_external(\"Vec/AOCreateMapping\"))\n\"\"\"\nfunction AOCreateMapping(petsclib::PetscLibType, comm::MPI_Comm, napp::PetscInt, myapp::Vector{PetscInt}, mypetsc::Vector{PetscInt}) end\n\n@for_petsc function AOCreateMapping(petsclib::$UnionPetscLib, comm::MPI_Comm, napp::$PetscInt, myapp::Vector{$PetscInt}, mypetsc::Vector{$PetscInt} )\n\taoout_ = Ref{CAO}()\n\n    @chk ccall(\n               (:AOCreateMapping, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CAO}),\n               comm, napp, myapp, mypetsc, aoout_,\n              )\n\n\taoout = AO(aoout_[], petsclib)\n\n\treturn aoout\nend \n\n\"\"\"\n\taoout::AO = AOCreateMappingIS(petsclib::PetscLibType,isapp::IS, ispetsc::IS) \nCreates an application mapping using two index sets.\n\nInput Parameters:\n- `isapp`   - index set that defines an ordering\n- `ispetsc` - index set that defines another ordering, maybe `NULL` for identity `IS`\n\nOutput Parameter:\n- `aoout` - the new application ordering\n\nOptions Database Key:\n- `-ao_view` - call `AOView()` at the conclusion of `AOCreateMappingIS()`\n\nLevel: beginner\n\n-seealso: [](sec_ao), [](sec_scatter), `AOCreateBasic()`, `AOCreateMapping()`, `AODestroy()`\n\n# External Links\n$(_doc_external(\"Vec/AOCreateMappingIS\"))\n\"\"\"\nfunction AOCreateMappingIS(petsclib::PetscLibType, isapp::IS, ispetsc::IS) end\n\n@for_petsc function AOCreateMappingIS(petsclib::$UnionPetscLib, isapp::IS, ispetsc::IS )\n\taoout_ = Ref{CAO}()\n\n    @chk ccall(\n               (:AOCreateMappingIS, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CAO}),\n               isapp, ispetsc, aoout_,\n              )\n\n\taoout = AO(aoout_[], petsclib)\n\n\treturn aoout\nend \n\n\"\"\"\n\taoout::AO = AOCreateMemoryScalable(petsclib::PetscLibType,comm::MPI_Comm, napp::PetscInt, myapp::Vector{PetscInt}, mypetsc::Vector{PetscInt}) \nCreates a memory scalable application ordering using two integer arrays.\n\nCollective\n\nInput Parameters:\n- `comm`    - MPI communicator that is to share the `AO`\n- `napp`    - size of `myapp` and `mypetsc`\n- `myapp`   - integer array that defines an ordering\n- `mypetsc` - integer array that defines another ordering (may be `NULL` to indicate the natural ordering, that is 0,1,2,3,...)\n\nOutput Parameter:\n- `aoout` - the new application ordering\n\nLevel: beginner\n\n-seealso: [](sec_ao), [](sec_scatter), `AO`, `AOCreateMemoryScalableIS()`, `AODestroy()`, `AOPetscToApplication()`, `AOApplicationToPetsc()`\n\n# External Links\n$(_doc_external(\"Vec/AOCreateMemoryScalable\"))\n\"\"\"\nfunction AOCreateMemoryScalable(petsclib::PetscLibType, comm::MPI_Comm, napp::PetscInt, myapp::Vector{PetscInt}, mypetsc::Vector{PetscInt}) end\n\n@for_petsc function AOCreateMemoryScalable(petsclib::$UnionPetscLib, comm::MPI_Comm, napp::$PetscInt, myapp::Vector{$PetscInt}, mypetsc::Vector{$PetscInt} )\n\taoout_ = Ref{CAO}()\n\n    @chk ccall(\n               (:AOCreateMemoryScalable, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CAO}),\n               comm, napp, myapp, mypetsc, aoout_,\n              )\n\n\taoout = AO(aoout_[], petsclib)\n\n\treturn aoout\nend \n\n\"\"\"\n\taoout::AO = AOCreateMemoryScalableIS(petsclib::PetscLibType,isapp::IS, ispetsc::IS) \nCreates a memory scalable application ordering using two index sets.\n\nCollective\n\nInput Parameters:\n- `isapp`   - index set that defines an ordering\n- `ispetsc` - index set that defines another ordering (may be `NULL` to use the natural ordering)\n\nOutput Parameter:\n- `aoout` - the new application ordering\n\nLevel: beginner\n\n-seealso: [](sec_ao), [](sec_scatter), `AO`, `AOCreateBasicIS()`, `AOCreateMemoryScalable()`, `AODestroy()`\n\n# External Links\n$(_doc_external(\"Vec/AOCreateMemoryScalableIS\"))\n\"\"\"\nfunction AOCreateMemoryScalableIS(petsclib::PetscLibType, isapp::IS, ispetsc::IS) end\n\n@for_petsc function AOCreateMemoryScalableIS(petsclib::$UnionPetscLib, isapp::IS, ispetsc::IS )\n\taoout_ = Ref{CAO}()\n\n    @chk ccall(\n               (:AOCreateMemoryScalableIS, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CAO}),\n               isapp, ispetsc, aoout_,\n              )\n\n\taoout = AO(aoout_[], petsclib)\n\n\treturn aoout\nend \n\n\"\"\"\n\taoout::AO = AOCreateBasic(petsclib::PetscLibType,comm::MPI_Comm, napp::PetscInt, myapp::Vector{PetscInt}, mypetsc::Vector{PetscInt}) \nCreates a basic application ordering using two integer arrays.\n\nCollective\n\nInput Parameters:\n- `comm`    - MPI communicator that is to share `AO`\n- `napp`    - size of `myapp` and `mypetsc`\n- `myapp`   - integer array that defines an ordering\n- `mypetsc` - integer array that defines another ordering (may be `NULL` to\nindicate the natural ordering, that is 0,1,2,3,...)\n\nOutput Parameter:\n- `aoout` - the new application ordering\n\nLevel: beginner\n\n-seealso: [](sec_ao), [](sec_scatter), `AO`, `AOCreateBasicIS()`, `AODestroy()`, `AOPetscToApplication()`, `AOApplicationToPetsc()`\n\n# External Links\n$(_doc_external(\"Vec/AOCreateBasic\"))\n\"\"\"\nfunction AOCreateBasic(petsclib::PetscLibType, comm::MPI_Comm, napp::PetscInt, myapp::Vector{PetscInt}, mypetsc::Vector{PetscInt}) end\n\n@for_petsc function AOCreateBasic(petsclib::$UnionPetscLib, comm::MPI_Comm, napp::$PetscInt, myapp::Vector{$PetscInt}, mypetsc::Vector{$PetscInt} )\n\taoout_ = Ref{CAO}()\n\n    @chk ccall(\n               (:AOCreateBasic, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CAO}),\n               comm, napp, myapp, mypetsc, aoout_,\n              )\n\n\taoout = AO(aoout_[], petsclib)\n\n\treturn aoout\nend \n\n\"\"\"\n\taoout::AO = AOCreateBasicIS(petsclib::PetscLibType,isapp::IS, ispetsc::IS) \nCreates a basic application ordering using two `IS` index sets.\n\nCollective\n\nInput Parameters:\n- `isapp`   - index set that defines an ordering\n- `ispetsc` - index set that defines another ordering (may be `NULL` to use the natural ordering)\n\nOutput Parameter:\n- `aoout` - the new application ordering\n\nLevel: beginner\n\n-seealso: [](sec_ao), [](sec_scatter), `IS`, `AO`, `AOCreateBasic()`, `AODestroy()`\n\n# External Links\n$(_doc_external(\"Vec/AOCreateBasicIS\"))\n\"\"\"\nfunction AOCreateBasicIS(petsclib::PetscLibType, isapp::IS, ispetsc::IS) end\n\n@for_petsc function AOCreateBasicIS(petsclib::$UnionPetscLib, isapp::IS, ispetsc::IS )\n\taoout_ = Ref{CAO}()\n\n    @chk ccall(\n               (:AOCreateBasicIS, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CAO}),\n               isapp, ispetsc, aoout_,\n              )\n\n\taoout = AO(aoout_[], petsclib)\n\n\treturn aoout\nend \n\n"
  },
  {
    "path": "src/autowrapped/Characteristic_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_Characteristic end\nconst Characteristic = Ptr{_n_Characteristic}\n\n# -------------------------------------------------------\n\"\"\"\n\tCharacteristicFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `Characteristics` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`, `CharacteristicInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicFinalizePackage\"))\n\"\"\"\nfunction CharacteristicFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function CharacteristicFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:CharacteristicFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the Characteristic package. It is called\nfrom PetscDLLibraryRegister() when using dynamic libraries, and on the first call to CharacteristicCreate()\nwhen using static libraries.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`, `CharacteristicFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicInitializePackage\"))\n\"\"\"\nfunction CharacteristicInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function CharacteristicInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:CharacteristicInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicDestroy(petsclib::PetscLibType,c::Characteristic) \nDestroys a `Characteristic` context created with `CharacteristicCreate()`\n\nCollective\n\nInput Parameter:\n- `c` - the `Characteristic` context\n\nLevel: beginner\n\n-seealso: `Characteristic`, `CharacteristicCreate()`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicDestroy\"))\n\"\"\"\nfunction CharacteristicDestroy(petsclib::PetscLibType, c::Characteristic) end\n\n@for_petsc function CharacteristicDestroy(petsclib::$UnionPetscLib, c::Characteristic )\n\n    @chk ccall(\n               (:CharacteristicDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Characteristic},),\n               c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tc::Characteristic = CharacteristicCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `Characteristic` context for use with the Method of Characteristics\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `c` - the `Characteristic` context\n\nLevel: beginner\n\n-seealso: `Characteristic`, `CharacteristicDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicCreate\"))\n\"\"\"\nfunction CharacteristicCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function CharacteristicCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tc_ = Ref{Characteristic}()\n\n    @chk ccall(\n               (:CharacteristicCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Characteristic}),\n               comm, c_,\n              )\n\n\tc = c_[]\n\n\treturn c\nend \n\n\"\"\"\n\tCharacteristicSetType(petsclib::PetscLibType,c::Characteristic, type::CharacteristicType) \nBuilds Characteristic for a particular solver.\n\nLogically Collective\n\nInput Parameters:\n- `c`    - the method of characteristics context\n- `type` - a known method\n\nOptions Database Key:\n- `-characteristic_type <method>` - Sets the method; use -help for a list\nof available methods\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `CharacteristicType`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicSetType\"))\n\"\"\"\nfunction CharacteristicSetType(petsclib::PetscLibType, c::Characteristic, type::CharacteristicType) end\n\n@for_petsc function CharacteristicSetType(petsclib::$UnionPetscLib, c::Characteristic, type::CharacteristicType )\n\n    @chk ccall(\n               (:CharacteristicSetType, $petsc_library),\n               PetscErrorCode,\n               (Characteristic, CharacteristicType),\n               c, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicSetUp(petsclib::PetscLibType,c::Characteristic) \nSets up the internal data structures for the\nlater use of a `Charactoristic` .\n\nCollective\n\nInput Parameter:\n- `c` - context obtained from CharacteristicCreate()\n\nLevel: developer\n\n-seealso: [](ch_ts), `Characteristic`, `CharacteristicCreate()`, `CharacteristicSolve()`, `CharacteristicDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicSetUp\"))\n\"\"\"\nfunction CharacteristicSetUp(petsclib::PetscLibType, c::Characteristic) end\n\n@for_petsc function CharacteristicSetUp(petsclib::$UnionPetscLib, c::Characteristic )\n\n    @chk ccall(\n               (:CharacteristicSetUp, $petsc_library),\n               PetscErrorCode,\n               (Characteristic,),\n               c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds an approarch to the method of characteristics package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new approach\n- `function` - routine to create method context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `CharacteristicRegisterAll()`, `CharacteristicRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicRegister\"))\n\"\"\"\nfunction CharacteristicRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function CharacteristicRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:CharacteristicRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicSetVelocityInterpolation(petsclib::PetscLibType,c::Characteristic, da::PetscDM, v::PetscVec, vOld::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/CharacteristicSetVelocityInterpolation\"))\n\"\"\"\nfunction CharacteristicSetVelocityInterpolation(petsclib::PetscLibType, c::Characteristic, da::PetscDM, v::PetscVec, vOld::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) end\n\n@for_petsc function CharacteristicSetVelocityInterpolation(petsclib::$UnionPetscLib, c::Characteristic, da::PetscDM, v::PetscVec, vOld::PetscVec, numComponents::$PetscInt, components::Vector{$PetscInt}, interp::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:CharacteristicSetVelocityInterpolation, $petsc_library),\n               PetscErrorCode,\n               (Characteristic, CDM, CVec, CVec, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}),\n               c, da, v, vOld, numComponents, components, interp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicSetVelocityInterpolationLocal(petsclib::PetscLibType,c::Characteristic, da::PetscDM, v::PetscVec, vOld::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/CharacteristicSetVelocityInterpolationLocal\"))\n\"\"\"\nfunction CharacteristicSetVelocityInterpolationLocal(petsclib::PetscLibType, c::Characteristic, da::PetscDM, v::PetscVec, vOld::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) end\n\n@for_petsc function CharacteristicSetVelocityInterpolationLocal(petsclib::$UnionPetscLib, c::Characteristic, da::PetscDM, v::PetscVec, vOld::PetscVec, numComponents::$PetscInt, components::Vector{$PetscInt}, interp::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:CharacteristicSetVelocityInterpolationLocal, $petsc_library),\n               PetscErrorCode,\n               (Characteristic, CDM, CVec, CVec, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}),\n               c, da, v, vOld, numComponents, components, interp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicSetFieldInterpolation(petsclib::PetscLibType,c::Characteristic, da::PetscDM, v::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/CharacteristicSetFieldInterpolation\"))\n\"\"\"\nfunction CharacteristicSetFieldInterpolation(petsclib::PetscLibType, c::Characteristic, da::PetscDM, v::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) end\n\n@for_petsc function CharacteristicSetFieldInterpolation(petsclib::$UnionPetscLib, c::Characteristic, da::PetscDM, v::PetscVec, numComponents::$PetscInt, components::Vector{$PetscInt}, interp::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:CharacteristicSetFieldInterpolation, $petsc_library),\n               PetscErrorCode,\n               (Characteristic, CDM, CVec, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}),\n               c, da, v, numComponents, components, interp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicSetFieldInterpolationLocal(petsclib::PetscLibType,c::Characteristic, da::PetscDM, v::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/CharacteristicSetFieldInterpolationLocal\"))\n\"\"\"\nfunction CharacteristicSetFieldInterpolationLocal(petsclib::PetscLibType, c::Characteristic, da::PetscDM, v::PetscVec, numComponents::PetscInt, components::Vector{PetscInt}, interp::external, ctx::Cvoid) end\n\n@for_petsc function CharacteristicSetFieldInterpolationLocal(petsclib::$UnionPetscLib, c::Characteristic, da::PetscDM, v::PetscVec, numComponents::$PetscInt, components::Vector{$PetscInt}, interp::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:CharacteristicSetFieldInterpolationLocal, $petsc_library),\n               PetscErrorCode,\n               (Characteristic, CDM, CVec, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}),\n               c, da, v, numComponents, components, interp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tCharacteristicSolve(petsclib::PetscLibType,c::Characteristic, dt::PetscReal, solution::PetscVec) \nApply the Method of Characteristics solver\n\nCollective\n\nInput Parameters:\n- `c`        - context obtained from `CharacteristicCreate()`\n- `dt`       - the time-step\n- `solution` - vector holding the solution\n\nLevel: developer\n\n-seealso: [](ch_ts), `Characteristic`, `CharacteristicCreate()`, `CharacteristicDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/CharacteristicSolve\"))\n\"\"\"\nfunction CharacteristicSolve(petsclib::PetscLibType, c::Characteristic, dt::PetscReal, solution::PetscVec) end\n\n@for_petsc function CharacteristicSolve(petsclib::$UnionPetscLib, c::Characteristic, dt::$PetscReal, solution::PetscVec )\n\n    @chk ccall(\n               (:CharacteristicSolve, $petsc_library),\n               PetscErrorCode,\n               (Characteristic, $PetscReal, CVec),\n               c, dt, solution,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/DM_wrappers.jl",
    "content": "using OffsetArrays\n# autodefined type arguments for class ------\nmutable struct PetscPoCintFn end\n\nmutable struct _n_DMInterpolationInfo end\nconst DMInterpolationInfo = Ptr{_n_DMInterpolationInfo}\n\nmutable struct _n_PetscDS end\nconst PetscDS = Ptr{_n_PetscDS}\n\nmutable struct _n_PetscFE end\nconst PetscFE = Ptr{_n_PetscFE}\n\nmutable struct _n_DMField end\nconst DMField = Ptr{_n_DMField}\n\nmutable struct _n_DMPoCintLocationType end\nconst DMPoCintLocationType = Ptr{_n_DMPoCintLocationType}\n\nmutable struct PetscSimplePoCintFn end\n\nmutable struct _n_DMSwarmCellDM end\nconst DMSwarmCellDM = Ptr{_n_DMSwarmCellDM}\n\n#mutable struct _n_AO end\n#const AO = Ptr{_n_AO}\n\n#mutable struct _n_PF end\n#const PF = Ptr{_n_PF}\n\nmutable struct _n_moab_Tag end\nconst moab_Tag = Ptr{_n_moab_Tag}\n\nmutable struct _n_moab_Range end\nconst moab_Range = Ptr{_n_moab_Range}\n\nmutable struct _n_moab_EntityHandle end\nconst moab_EntityHandle = Ptr{_n_moab_EntityHandle}\n\nmutable struct _n_moab_Interface end\nconst moab_Interface = Ptr{_n_moab_Interface}\n\nmutable struct _n_moab_ParallelComm end\nconst moab_ParallelComm = Ptr{_n_moab_ParallelComm}\n\nmutable struct _n_moab_EntityType end\nconst moab_EntityType = Ptr{_n_moab_EntityType}\n\nmutable struct _n_DMPlexTransform end\nconst DMPlexTransform = Ptr{_n_DMPlexTransform}\n\nmutable struct _n_PetscPartitioner end\nconst PetscPartitioner = Ptr{_n_PetscPartitioner}\n\nmutable struct _n_PetscFV end\nconst PetscFV = Ptr{_n_PetscFV}\n\nmutable struct _n_PetscWeakForm end\nconst PetscWeakForm = Ptr{_n_PetscWeakForm}\n\nmutable struct _n_PetscGeom end\nconst PetscGeom = Ptr{_n_PetscGeom}\n\nmutable struct _n_PetscHMapI end\nconst PetscHMapI = Ptr{_n_PetscHMapI}\n\nmutable struct TSIFunctionFn end\n\nmutable struct TSI2FunctionFn end\n\nmutable struct TSI2JacobianFn end\n\nmutable struct TSRHSFunctionFn end\n\nmutable struct TSTransientVariableFn end\n\nmutable struct TSSolutionFn end\n\nmutable struct TSForcingFn end\n\nmutable struct TSIJacobianFn end\n\nmutable struct TSRHSJacobianFn end\n\n#mutable struct _n_TS end\n#const TS = Ptr{_n_TS}\n\nmutable struct DMDATSRHSFunctionLocalFn end\n\nmutable struct DMDATSRHSJacobianLocalFn end\n\nmutable struct DMDATSIFunctionLocalFn end\n\nmutable struct DMDATSIJacobianLocalFn end\n\n# -------------------------------------------------------\n\"\"\"\n\tDMCopyDMKSP(petsclib::PetscLibType,dmsrc::PetscDM, dmdest::PetscDM) \ncopies a `DM` `DMKSP` context to a new `DM`\n\nLogically Collective\n\nInput Parameters:\n- `dmsrc`  - `DM` to obtain context from\n- `dmdest` - `DM` to add context to\n\nLevel: developer\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMGetDMKSP()`, `KSPSetDM()`\n\n# External Links\n$(_doc_external(\"Ksp/DMCopyDMKSP\"))\n\"\"\"\nfunction DMCopyDMKSP(petsclib::PetscLibType, dmsrc::PetscDM, dmdest::PetscDM) end\n\n@for_petsc function DMCopyDMKSP(petsclib::$UnionPetscLib, dmsrc::PetscDM, dmdest::PetscDM )\n\n    @chk ccall(\n               (:DMCopyDMKSP, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dmsrc, dmdest,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMKSPSetComputeOperators(petsclib::PetscLibType,dm::PetscDM, func::KSPComputeOperatorsFn, ctx::Cvoid) \nset `KSP` matrix evaluation function\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `KSP`\n- `func` - matrix evaluation function,  for calling sequence see `KSPComputeOperatorsFn`\n- `ctx`  - context for matrix evaluation\n\nLevel: developer\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `DMKSPGetComputeOperators()`, `KSPSetOperators()`, `KSPComputeOperatorsFn`\n\n# External Links\n$(_doc_external(\"Ksp/DMKSPSetComputeOperators\"))\n\"\"\"\nfunction DMKSPSetComputeOperators(petsclib::PetscLibType, dm::PetscDM, func::KSPComputeOperatorsFn, ctx::Cvoid) end\n\n@for_petsc function DMKSPSetComputeOperators(petsclib::$UnionPetscLib, dm::PetscDM, func::KSPComputeOperatorsFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMKSPSetComputeOperators, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{KSPComputeOperatorsFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMKSPGetComputeOperators(petsclib::PetscLibType,dm::PetscDM, func::KSPComputeOperatorsFn, ctx::Cvoid) \nget `KSP` matrix evaluation function\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` used with a `KSP`\n\nOutput Parameters:\n- `func` - matrix evaluation function,  for calling sequence see `KSPComputeOperatorsFn`\n- `ctx`  - context for matrix evaluation\n\nLevel: developer\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `KSPSetComputeOperators()`, `DMKSPSetComputeOperators()`, `KSPComputeOperatorsFn`\n\n# External Links\n$(_doc_external(\"Ksp/DMKSPGetComputeOperators\"))\n\"\"\"\nfunction DMKSPGetComputeOperators(petsclib::PetscLibType, dm::PetscDM, func::KSPComputeOperatorsFn, ctx::Cvoid) end\n\n@for_petsc function DMKSPGetComputeOperators(petsclib::$UnionPetscLib, dm::PetscDM, func::KSPComputeOperatorsFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMKSPGetComputeOperators, $petsc_library),\n               PetscErrorCode,\n               (CDM, KSPComputeOperatorsFn, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMKSPSetComputeRHS(petsclib::PetscLibType,dm::PetscDM, func::KSPComputeRHSFn, ctx::Cvoid) \nset `KSP` right\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` used with a `KSP`\n- `func` - right-hand side evaluation function,  for calling sequence see `KSPComputeRHSFn`\n- `ctx`  - context for right-hand side evaluation\n\nLevel: developer\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `DMKSPGetComputeRHS()`\n\n# External Links\n$(_doc_external(\"Ksp/DMKSPSetComputeRHS\"))\n\"\"\"\nfunction DMKSPSetComputeRHS(petsclib::PetscLibType, dm::PetscDM, func::KSPComputeRHSFn, ctx::Cvoid) end\n\n@for_petsc function DMKSPSetComputeRHS(petsclib::$UnionPetscLib, dm::PetscDM, func::KSPComputeRHSFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMKSPSetComputeRHS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{KSPComputeRHSFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMKSPSetComputeInitialGuess(petsclib::PetscLibType,dm::PetscDM, func::KSPComputeInitialGuessFn, ctx::Cvoid) \nset `KSP` initial guess evaluation function\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `KSP`\n- `func` - initial guess evaluation function, for calling sequence see `KSPComputeInitialGuessFn`\n- `ctx`  - context for initial guess evaluation\n\nLevel: developer\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `DMKSPGetComputeRHS()`, `KSPComputeInitialGuessFn`\n\n# External Links\n$(_doc_external(\"Ksp/DMKSPSetComputeInitialGuess\"))\n\"\"\"\nfunction DMKSPSetComputeInitialGuess(petsclib::PetscLibType, dm::PetscDM, func::KSPComputeInitialGuessFn, ctx::Cvoid) end\n\n@for_petsc function DMKSPSetComputeInitialGuess(petsclib::$UnionPetscLib, dm::PetscDM, func::KSPComputeInitialGuessFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMKSPSetComputeInitialGuess, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{KSPComputeInitialGuessFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMKSPGetComputeRHS(petsclib::PetscLibType,dm::PetscDM, func::KSPComputeRHSFn, ctx::Cvoid) \nget `KSP` right\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `KSP`\n\nOutput Parameters:\n- `func` - right-hand side evaluation function,  for calling sequence see `KSPComputeRHSFn`\n- `ctx`  - context for right-hand side evaluation\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `KSPSetComputeRHS()`, `DMKSPSetComputeRHS()`, `KSPComputeRHSFn`\n\n# External Links\n$(_doc_external(\"Ksp/DMKSPGetComputeRHS\"))\n\"\"\"\nfunction DMKSPGetComputeRHS(petsclib::PetscLibType, dm::PetscDM, func::KSPComputeRHSFn, ctx::Cvoid) end\n\n@for_petsc function DMKSPGetComputeRHS(petsclib::$UnionPetscLib, dm::PetscDM, func::KSPComputeRHSFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMKSPGetComputeRHS, $petsc_library),\n               PetscErrorCode,\n               (CDM, KSPComputeRHSFn, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMKSPGetComputeInitialGuess(petsclib::PetscLibType,dm::PetscDM, func::KSPComputeInitialGuessFn, ctx::Cvoid) \nget `KSP` initial guess evaluation function\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` used with a `KSP`\n\nOutput Parameters:\n- `func` - initial guess evaluation function, for calling sequence see `KSPComputeInitialGuessFn`\n- `ctx`  - context for right-hand side evaluation\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `KSPSetComputeRHS()`, `DMKSPSetComputeRHS()`, `KSPComputeInitialGuessFn`\n\n# External Links\n$(_doc_external(\"Ksp/DMKSPGetComputeInitialGuess\"))\n\"\"\"\nfunction DMKSPGetComputeInitialGuess(petsclib::PetscLibType, dm::PetscDM, func::KSPComputeInitialGuessFn, ctx::Cvoid) end\n\n@for_petsc function DMKSPGetComputeInitialGuess(petsclib::$UnionPetscLib, dm::PetscDM, func::KSPComputeInitialGuessFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMKSPGetComputeInitialGuess, $petsc_library),\n               PetscErrorCode,\n               (CDM, KSPComputeInitialGuessFn, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGlobalToLocalSolve(petsclib::PetscLibType,dm::PetscDM, x::PetscVec, y::PetscVec) \nSolve for the global vector that is mapped to a given local vector by `DMGlobalToLocalBegin()`/`DMGlobalToLocalEnd()` with mode\n`INSERT_VALUES`.\n\nCollective\n\nInput Parameters:\n- `dm` - The `DM` object\n- `x`  - The local vector\n- `y`  - The global vector: the input value of this variable is used as an initial guess\n\nOutput Parameter:\n- `y` - The least-squares solution\n\nLevel: advanced\n\nNote:\nIt is assumed that the sum of all the local vector sizes is greater than or equal to the global vector size, so the solution is\na least-squares solution.  It is also assumed that `DMLocalToGlobalBegin()`/`DMLocalToGlobalEnd()` with mode `ADD_VALUES` is the adjoint of the\nglobal-to-local map, so that the least-squares solution may be found by the normal equations.\n\nIf the `DM` is of type `DMPLEX`, then `y` is the solution of  L^T * D * L * y = L^T * D * x , where D is a diagonal mask that is 1 for every point in\nthe union of the closures of the local cells and 0 otherwise.  This difference is only relevant if there are anchor points that are not in the\nclosure of any local cell (see `DMPlexGetAnchors()`/`DMPlexSetAnchors()`).\n\nWhat is L?\n\nIf this solves for a global vector from a local vector why is not called `DMLocalToGlobalSolve()`?\n\nSee also: \n=== \n`DM`, `DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobalEnd()`, `DMPlexGetAnchors()`, `DMPlexSetAnchors()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalSolve\"))\n\"\"\"\nfunction DMGlobalToLocalSolve(petsclib::PetscLibType, dm::PetscDM, x::PetscVec, y::PetscVec) end\n\n@for_petsc function DMGlobalToLocalSolve(petsclib::$UnionPetscLib, dm::PetscDM, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:DMGlobalToLocalSolve, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMProjectField(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, U::PetscVec, funcs::PetscPoCintFn, mode::InsertMode, X::PetscVec) \nThis projects a given function of the input fields into the function space provided by a `DM`, putting the coefficients in a global vector.\n\nCollective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `time`  - The time\n- `U`     - The input field vector\n- `funcs` - The functions to evaluate, one per field, see `PetscPointFn`\n- `mode`  - The insertion mode for values\n\nOutput Parameter:\n- `X` - The output vector\n\nLevel: advanced\n\nNote:\nThere are three different `DM`s that potentially interact in this function. The output `dm`, specifies the layout of the values calculates by the function.\nThe input `DM`, attached to `U`, may be different. For example, you can input the solution over the full domain, but output over a piece of the boundary, or\na subdomain. You can also output a different number of fields than the input, with different discretizations. Last the auxiliary `DM`, attached to the\nauxiliary field vector, which is attached to `dm`, can also be different. It can have a different topology, number of fields, and discretizations.\n\nSee also: \n=== \n`DM`, `PetscPointFn`, `DMProjectFieldLocal()`, `DMProjectFieldLabelLocal()`, `DMProjectFunction()`, `DMComputeL2Diff()`\n\n# External Links\n$(_doc_external(\"DM/DMProjectField\"))\n\"\"\"\nfunction DMProjectField(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, U::PetscVec, funcs::PetscPoCintFn, mode::InsertMode, X::PetscVec) end\n\n@for_petsc function DMProjectField(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, U::PetscVec, funcs::PetscPoCintFn, mode::InsertMode, X::PetscVec )\n\n    @chk ccall(\n               (:DMProjectField, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, PetscPoCintFn, InsertMode, CVec),\n               dm, time, U, funcs, mode, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptInterpolator(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, In::PetscMat, smoother::PetscKSP, MF::PetscMat, MC::PetscMat, InAdapt::PetscMat, user::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/DMAdaptInterpolator\"))\n\"\"\"\nfunction DMAdaptInterpolator(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM, In::PetscMat, smoother::PetscKSP, MF::PetscMat, MC::PetscMat, InAdapt::PetscMat, user::Cvoid) end\n\n@for_petsc function DMAdaptInterpolator(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM, In::PetscMat, smoother::PetscKSP, MF::PetscMat, MC::PetscMat, InAdapt::PetscMat, user::Cvoid )\n\tInAdapt_ = Ref(InAdapt.ptr)\n\n    @chk ccall(\n               (:DMAdaptInterpolator, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, CMat, CKSP, CMat, CMat, Ptr{CMat}, Ptr{Cvoid}),\n               dmc, dmf, In, smoother, MF, MC, InAdapt_, user,\n              )\n\n\tInAdapt.ptr = InAdapt_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCheckInterpolator(petsclib::PetscLibType,dmf::PetscDM, In::PetscMat, MC::PetscMat, MF::PetscMat, tol::PetscReal) \n\n# External Links\n$(_doc_external(\"DM/DMCheckInterpolator\"))\n\"\"\"\nfunction DMCheckInterpolator(petsclib::PetscLibType, dmf::PetscDM, In::PetscMat, MC::PetscMat, MF::PetscMat, tol::PetscReal) end\n\n@for_petsc function DMCheckInterpolator(petsclib::$UnionPetscLib, dmf::PetscDM, In::PetscMat, MC::PetscMat, MF::PetscMat, tol::$PetscReal )\n\n    @chk ccall(\n               (:DMCheckInterpolator, $petsc_library),\n               PetscErrorCode,\n               (CDM, CMat, CMat, CMat, $PetscReal),\n               dmf, In, MC, MF, tol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmProjectFields(petsclib::PetscLibType,sw::PetscDM, dm::PetscDM, nfields::PetscInt, fieldnames::String, fields::Vector{PetscVec}, mode::ScatterMode) \nProject a set of swarm fields onto another `DM`\n\nCollective\n\nInput Parameters:\n- `sw`         - the `DMSWARM`\n- `dm`         - the `DM`, or `NULL` to use the cell `DM`\n- `nfields`    - the number of swarm fields to project\n- `fieldnames` - the textual names of the swarm fields to project\n- `fields`     - an array of `Vec`'s of length nfields\n- `mode`       - if `SCATTER_FORWARD` then map particles to the continuum, and if `SCATTER_REVERSE` map the continuum to particles\n\nLevel: beginner\n\nSee also: \n=== \n`DMSWARM`, `DMSwarmSetType()`, `DMSwarmSetCellDM()`, `DMSwarmType`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmProjectFields\"))\n\"\"\"\nfunction DMSwarmProjectFields(petsclib::PetscLibType, sw::PetscDM, dm::PetscDM, nfields::PetscInt, fieldnames::String, fields::Vector{PetscVec}, mode::ScatterMode) end\n\n@for_petsc function DMSwarmProjectFields(petsclib::$UnionPetscLib, sw::PetscDM, dm::PetscDM, nfields::$PetscInt, fieldnames::String, fields::Vector{PetscVec}, mode::ScatterMode )\n\tfieldnames_ = Ref(pointer(fieldnames))\n\n    @chk ccall(\n               (:DMSwarmProjectFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{CVec}, ScatterMode),\n               sw, dm, nfields, fieldnames_, fields, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmProjectGradientFields(petsclib::PetscLibType,sw::PetscDM, dm::PetscDM, nfields::PetscInt, fieldnames::String, fields::Vector{PetscVec}, mode::ScatterMode) \n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmProjectGradientFields\"))\n\"\"\"\nfunction DMSwarmProjectGradientFields(petsclib::PetscLibType, sw::PetscDM, dm::PetscDM, nfields::PetscInt, fieldnames::String, fields::Vector{PetscVec}, mode::ScatterMode) end\n\n@for_petsc function DMSwarmProjectGradientFields(petsclib::$UnionPetscLib, sw::PetscDM, dm::PetscDM, nfields::$PetscInt, fieldnames::String, fields::Vector{PetscVec}, mode::ScatterMode )\n\tfieldnames_ = Ref(pointer(fieldnames))\n\n    @chk ccall(\n               (:DMSwarmProjectGradientFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{CVec}, ScatterMode),\n               sw, dm, nfields, fieldnames_, fields, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmRemap(petsclib::PetscLibType,sw::PetscDM) \nProject the swarm fields onto a new set of particles\n\nCollective\n\nInput Parameter:\n- `sw` - The `DMSWARM` object\n\nLevel: beginner\n\nSee also: \n=== \n`DMSWARM`, `DMSwarmMigrate()`, `DMSwarmCrate()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRemap\"))\n\"\"\"\nfunction DMSwarmRemap(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmRemap(petsclib::$UnionPetscLib, sw::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmRemap, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               sw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetVI(petsclib::PetscLibType,dm::PetscDM, inactive::IS) \nMarks a `DM` as associated with a VI problem. This causes the interpolation/restriction operators to\nbe restricted to only those variables NOT associated with active constraints.\n\nLogically Collective\n\nInput Parameters:\n- `dm`       - the `DM` object\n- `inactive` - an `IS` indicating which points are currently not active\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONRSLS`, `SNESVIGetInactiveSet()`\n\n# External Links\n$(_doc_external(\"Snes/DMSetVI\"))\n\"\"\"\nfunction DMSetVI(petsclib::PetscLibType, dm::PetscDM, inactive::IS) end\n\n@for_petsc function DMSetVI(petsclib::$UnionPetscLib, dm::PetscDM, inactive::IS )\n\n    @chk ccall(\n               (:DMSetVI, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS),\n               dm, inactive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDestroyVI(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"Snes/DMDestroyVI\"))\n\"\"\"\nfunction DMDestroyVI(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMDestroyVI(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMDestroyVI, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCopyDMSNES(petsclib::PetscLibType,dmsrc::PetscDM, dmdest::PetscDM) \ncopies a `DMSNES` context to a new `DM`\n\nLogically Collective\n\nInput Parameters:\n- `dmsrc`  - `DM` to obtain context from\n- `dmdest` - `DM` to add context to\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMGetDMSNES()`, `SNESSetDM()`\n\n# External Links\n$(_doc_external(\"Snes/DMCopyDMSNES\"))\n\"\"\"\nfunction DMCopyDMSNES(petsclib::PetscLibType, dmsrc::PetscDM, dmdest::PetscDM) end\n\n@for_petsc function DMCopyDMSNES(petsclib::$UnionPetscLib, dmsrc::PetscDM, dmdest::PetscDM )\n\n    @chk ccall(\n               (:DMCopyDMSNES, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dmsrc, dmdest,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetFunction(petsclib::PetscLibType,dm::PetscDM, f::SNESFunctionFn, ctx::Cvoid) \nset `SNES` residual evaluation function\n\nNot Collective\n\nInput Parameters:\n- `dm`  - DM to be used with `SNES`\n- `f`   - residual evaluation function; see `SNESFunctionFn` for calling sequence\n- `ctx` - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `SNESSetFunction()`, `DMSNESSetJacobian()`, `SNESFunctionFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetFunction\"))\n\"\"\"\nfunction DMSNESSetFunction(petsclib::PetscLibType, dm::PetscDM, f::SNESFunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetFunction(petsclib::$UnionPetscLib, dm::PetscDM, f::SNESFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{SNESFunctionFn}, Ptr{Cvoid}),\n               dm, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetFunctionContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `SNES` residual evaluation context destroy function\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `SNES`\n- `f`  - residual evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetFunction()`, `SNESSetFunction()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetFunctionContextDestroy\"))\n\"\"\"\nfunction DMSNESSetFunctionContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMSNESSetFunctionContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMSNESSetFunctionContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetMFFunction(petsclib::PetscLibType,dm::PetscDM, func::SNESFunctionFn, ctx::Cvoid) \nset `SNES` residual evaluation function used in applying the matrix\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `SNES`\n- `func` - residual evaluation function; see `SNESFunctionFn` for calling sequence\n- `ctx`  - optional function context\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `SNESSetFunction()`, `DMSNESSetJacobian()`, `DMSNESSetFunction()`, `SNESFunctionFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetMFFunction\"))\n\"\"\"\nfunction DMSNESSetMFFunction(petsclib::PetscLibType, dm::PetscDM, func::SNESFunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetMFFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::SNESFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetMFFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{SNESFunctionFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESGetFunction(petsclib::PetscLibType,dm::PetscDM, f::SNESFunctionFn, ctx::Cvoid) \nget `SNES` residual evaluation function from a `DMSNES` object\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `SNES`\n\nOutput Parameters:\n- `f`   - residual evaluation function; see `SNESFunctionFn` for calling sequence\n- `ctx` - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `DMSNESSetFunction()`, `SNESSetFunction()`, `SNESFunctionFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESGetFunction\"))\n\"\"\"\nfunction DMSNESGetFunction(petsclib::PetscLibType, dm::PetscDM, f::SNESFunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESGetFunction(petsclib::$UnionPetscLib, dm::PetscDM, f::SNESFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESGetFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, SNESFunctionFn, Cvoid),\n               dm, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetObjective(petsclib::PetscLibType,dm::PetscDM, obj::SNESObjectiveFn, ctx::Cvoid) \nSets the objective function minimized by some of the `SNES` linesearch methods into a `DMSNES` object, used instead of the 2\n\nNot Collective\n\nInput Parameters:\n- `dm`  - `DM` to be used with `SNES`\n- `obj` - objective evaluation routine; see `SNESObjectiveFn` for the calling sequence\n- `ctx` - [optional] user-defined context for private data for the objective evaluation routine (may be `NULL`)\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `SNESGetObjective()`, `DMSNESSetFunction()`, `SNESObjectiveFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetObjective\"))\n\"\"\"\nfunction DMSNESSetObjective(petsclib::PetscLibType, dm::PetscDM, obj::SNESObjectiveFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetObjective(petsclib::$UnionPetscLib, dm::PetscDM, obj::SNESObjectiveFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetObjective, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{SNESObjectiveFn}, Ptr{Cvoid}),\n               dm, obj, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESGetObjective(petsclib::PetscLibType,dm::PetscDM, obj::SNESObjectiveFn, ctx::Cvoid) \nReturns the objective function set with `DMSNESSetObjective()`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `SNES`\n\nOutput Parameters:\n- `obj` - objective evaluation routine (or `NULL`); see `SNESObjectiveFn` for the calling sequence\n- `ctx` - the function context (or `NULL`)\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `DMSNESSetObjective()`, `SNESSetFunction()`, `SNESObjectiveFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESGetObjective\"))\n\"\"\"\nfunction DMSNESGetObjective(petsclib::PetscLibType, dm::PetscDM, obj::SNESObjectiveFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESGetObjective(petsclib::$UnionPetscLib, dm::PetscDM, obj::SNESObjectiveFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESGetObjective, $petsc_library),\n               PetscErrorCode,\n               (CDM, SNESObjectiveFn, Cvoid),\n               dm, obj, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetNGS(petsclib::PetscLibType,dm::PetscDM, f::external, ctx::Cvoid) \nset `SNES` Gauss\n\nNot Collective\n\nInput Parameters:\n- `dm`  - `DM` to be used with `SNES`\n- `f`   - relaxation function, see `SNESGSFunction`\n- `ctx` - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `SNESSetFunction()`, `DMSNESSetJacobian()`, `DMSNESSetFunction()`, `SNESGSFunction`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetNGS\"))\n\"\"\"\nfunction DMSNESSetNGS(petsclib::PetscLibType, dm::PetscDM, f::external, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetNGS(petsclib::$UnionPetscLib, dm::PetscDM, f::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetNGS, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetJacobian(petsclib::PetscLibType,dm::PetscDM, J::SNESJacobianFn, ctx::Cvoid) \nset `SNES` Jacobian evaluation function into a `DMSNES` object\n\nNot Collective\n\nInput Parameters:\n- `dm`  - `DM` to be used with `SNES`\n- `J`   - Jacobian evaluation function, see `SNESJacobianFn`\n- `ctx` - context for Jacobian evaluation\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `SNESSetFunction()`, `DMSNESGetJacobian()`, `SNESSetJacobian()`, `SNESJacobianFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetJacobian\"))\n\"\"\"\nfunction DMSNESSetJacobian(petsclib::PetscLibType, dm::PetscDM, J::SNESJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetJacobian(petsclib::$UnionPetscLib, dm::PetscDM, J::SNESJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetJacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{SNESJacobianFn}, Ptr{Cvoid}),\n               dm, J, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetJacobianContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `SNES` Jacobian evaluation context destroy function into a `DMSNES` object\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `SNES`\n- `f`  - Jacobian evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetJacobian()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetJacobianContextDestroy\"))\n\"\"\"\nfunction DMSNESSetJacobianContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMSNESSetJacobianContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMSNESSetJacobianContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESGetJacobian(petsclib::PetscLibType,dm::PetscDM, J::SNESJacobianFn, ctx::Cvoid) \nget `SNES` Jacobian evaluation function from a `DMSNES` object\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `SNES`\n\nOutput Parameters:\n- `J`   - Jacobian evaluation function; for all calling sequence see `SNESJacobianFn`\n- `ctx` - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `SNESSetFunction()`, `DMSNESSetJacobian()`, `SNESJacobianFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESGetJacobian\"))\n\"\"\"\nfunction DMSNESGetJacobian(petsclib::PetscLibType, dm::PetscDM, J::SNESJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESGetJacobian(petsclib::$UnionPetscLib, dm::PetscDM, J::SNESJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESGetJacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, SNESJacobianFn, Cvoid),\n               dm, J, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetPicard(petsclib::PetscLibType,dm::PetscDM, b::SNESFunctionFn, J::SNESJacobianFn, ctx::Cvoid) \nset SNES Picard iteration matrix and RHS evaluation functions into a `DMSNES` object\n\nNot Collective\n\nInput Parameters:\n- `dm`  - `DM` to be used with `SNES`\n- `b`   - RHS evaluation function; see `SNESFunctionFn` for calling sequence\n- `J`   - Picard matrix evaluation function; see `SNESJacobianFn` for calling sequence\n- `ctx` - context for residual and matrix evaluation\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `SNESSetPicard()`, `DMSNESSetFunction()`, `DMSNESSetJacobian()`, `SNESFunctionFn`, `SNESJacobianFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetPicard\"))\n\"\"\"\nfunction DMSNESSetPicard(petsclib::PetscLibType, dm::PetscDM, b::SNESFunctionFn, J::SNESJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetPicard(petsclib::$UnionPetscLib, dm::PetscDM, b::SNESFunctionFn, J::SNESJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetPicard, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{SNESFunctionFn}, Ptr{SNESJacobianFn}, Ptr{Cvoid}),\n               dm, b, J, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESGetPicard(petsclib::PetscLibType,dm::PetscDM, b::SNESFunctionFn, J::SNESJacobianFn, ctx::Cvoid) \nget `SNES` Picard iteration evaluation functions from a `DMSNES` object\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `SNES`\n\nOutput Parameters:\n- `b`   - RHS evaluation function; see `SNESFunctionFn` for calling sequence\n- `J`   - Jacobian evaluation function; see `SNESJacobianFn` for calling sequence\n- `ctx` - context for residual and matrix evaluation\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMSNES`, `DMSNESSetContext()`, `SNESSetFunction()`, `DMSNESSetJacobian()`, `SNESFunctionFn`, `SNESJacobianFn`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESGetPicard\"))\n\"\"\"\nfunction DMSNESGetPicard(petsclib::PetscLibType, dm::PetscDM, b::SNESFunctionFn, J::SNESJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMSNESGetPicard(petsclib::$UnionPetscLib, dm::PetscDM, b::SNESFunctionFn, J::SNESJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESGetPicard, $petsc_library),\n               PetscErrorCode,\n               (CDM, SNESFunctionFn, SNESJacobianFn, Cvoid),\n               dm, b, J, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetObjectiveLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local objective evaluation function. This function is called with local vector\ncontaining the local vector information PLUS ghost point information. It should compute a result for all local\nelements and `DMSNES` will automatically accumulate the overlapping values.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local objective evaluation\n- `ctx`  - optional context for local residual evaluation\n\nLevel: advanced\n\n-seealso: `DMSNESSetFunctionLocal()`, `DMSNESSetJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetObjectiveLocal\"))\n\"\"\"\nfunction DMSNESSetObjectiveLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetObjectiveLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetObjectiveLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetFunctionLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local residual evaluation function. This function is called with local vector\ncontaining the local vector information PLUS ghost point information. It should compute a result for all local\nelements and `DMSNES` will automatically accumulate the overlapping values.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local residual evaluation\n- `ctx`  - optional context for local residual evaluation\n\nCalling sequence of `func`:\n- `dm`  - `DM` for the function\n- `x`   - vector to state at which to evaluate residual\n- `f`   - vector to hold the function evaluation\n- `ctx` - optional context passed above\n\nLevel: advanced\n\n-seealso: [](ch_snes), `DMSNESSetFunction()`, `DMSNESSetJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetFunctionLocal\"))\n\"\"\"\nfunction DMSNESSetFunctionLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetFunctionLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetFunctionLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetBoundaryLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a function to insert, for example, essential boundary conditions into a ghosted solution vector\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local boundary value evaluation\n- `ctx`  - optional context for local boundary value evaluation\n\nCalling sequence of `func`:\n- `dm`  - the `DM` context\n- `X`   - ghosted solution vector, appropriate locations (such as essential boundary condition nodes) should be filled\n- `ctx` - option context passed in `DMSNESSetBoundaryLocal()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `DMSNESSetObjectiveLocal()`, `DMSNESSetFunctionLocal()`, `DMSNESSetJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetBoundaryLocal\"))\n\"\"\"\nfunction DMSNESSetBoundaryLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetBoundaryLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetBoundaryLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESSetJacobianLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local Jacobian evaluation function\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local Jacobian evaluation\n- `ctx`  - optional context for local Jacobian evaluation\n\nCalling sequence of `func`:\n- `dm`  - the `DM` context\n- `X`   - current solution vector (ghosted or not?)\n- `J`   - the Jacobian\n- `Jp`  - approximate Jacobian used to compute the preconditioner, often `J`\n- `ctx` - a user provided context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `DMSNESSetObjectiveLocal()`, `DMSNESSetFunctionLocal()`, `DMSNESSetBoundaryLocal()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESSetJacobianLocal\"))\n\"\"\"\nfunction DMSNESSetJacobianLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMSNESSetJacobianLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSNESSetJacobianLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASNESSetFunctionLocal(petsclib::PetscLibType,dm::PetscDM, imode::InsertMode, func::external, ctx::Cvoid) \nset a local residual evaluation function for use with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - `DM` to associate callback with\n- `imode` - `INSERT_VALUES` if local function computes owned part, `ADD_VALUES` if it contributes to ghosted part\n- `func`  - local residual evaluation\n- `ctx`   - optional context for local residual evaluation\n\nCalling sequence of `func`:\n- `info` - `DMDALocalInfo` defining the subdomain to evaluate the residual on\n- `x`    - dimensional pointer to state at which to evaluate residual (e.g. PetscScalar *x or **x or ***x)\n- `f`    - dimensional pointer to residual, write the residual here (e.g. PetscScalar *f or **f or ***f)\n- `ctx`  - optional context passed above\n\nLevel: beginner\n\n-seealso: [](ch_snes), `DMDA`, `DMDASNESSetJacobianLocal()`, `DMSNESSetFunction()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"Snes/DMDASNESSetFunctionLocal\"))\n\"\"\"\nfunction DMDASNESSetFunctionLocal(petsclib::PetscLibType, dm::PetscDM, imode::InsertMode, func::external, ctx::Cvoid) end\n\n@for_petsc function DMDASNESSetFunctionLocal(petsclib::$UnionPetscLib, dm::PetscDM, imode::InsertMode, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDASNESSetFunctionLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, InsertMode, external, Ptr{Cvoid}),\n               dm, imode, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASNESSetFunctionLocalVec(petsclib::PetscLibType,dm::PetscDM, imode::InsertMode, func::external, ctx::Cvoid) \nset a local residual evaluation function that operates on a local vector for `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - `DM` to associate callback with\n- `imode` - `INSERT_VALUES` if local function computes owned part, `ADD_VALUES` if it contributes to ghosted part\n- `func`  - local residual evaluation\n- `ctx`   - optional context for local residual evaluation\n\nCalling sequence of `func`:\n- `info` - `DMDALocalInfo` defining the subdomain to evaluate the residual on\n- `x`    - state vector at which to evaluate residual\n- `f`    - residual vector\n- `ctx`  - optional context passed above\n\nLevel: beginner\n\n-seealso: [](ch_snes), `DMDA`, `DMDASNESSetFunctionLocal()`, `DMDASNESSetJacobianLocalVec()`, `DMSNESSetFunction()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"Snes/DMDASNESSetFunctionLocalVec\"))\n\"\"\"\nfunction DMDASNESSetFunctionLocalVec(petsclib::PetscLibType, dm::PetscDM, imode::InsertMode, func::external, ctx::Cvoid) end\n\n@for_petsc function DMDASNESSetFunctionLocalVec(petsclib::$UnionPetscLib, dm::PetscDM, imode::InsertMode, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDASNESSetFunctionLocalVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, InsertMode, external, Ptr{Cvoid}),\n               dm, imode, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASNESSetJacobianLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local Jacobian evaluation function for use with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local Jacobian evaluation function\n- `ctx`  - optional context for local Jacobian evaluation\n\nCalling sequence of `func`:\n- `info` - `DMDALocalInfo` defining the subdomain to evaluate the Jacobian at\n- `x`    - dimensional pointer to state at which to evaluate Jacobian (e.g. PetscScalar *x or **x or ***x)\n- `J`    - `Mat` object for the Jacobian\n- `M`    - `Mat` object used to compute the preconditioner often `J`\n- `ctx`  - optional context passed above\n\nLevel: beginner\n\n-seealso: [](ch_snes), `DMDA`, `DMDASNESSetFunctionLocal()`, `DMSNESSetJacobian()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"Snes/DMDASNESSetJacobianLocal\"))\n\"\"\"\nfunction DMDASNESSetJacobianLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMDASNESSetJacobianLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDASNESSetJacobianLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASNESSetJacobianLocalVec(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local Jacobian evaluation function that operates on a local vector with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local Jacobian evaluation\n- `ctx`  - optional context for local Jacobian evaluation\n\nCalling sequence of `func`:\n- `info` - `DMDALocalInfo` defining the subdomain to evaluate the Jacobian at\n- `x`    - state vector at which to evaluate Jacobian\n- `J`    - the Jacobian\n- `M`    - approximate Jacobian from which the preconditioner will be computed, often `J`\n- `ctx`  - optional context passed above\n\nLevel: beginner\n\n-seealso: [](ch_snes), `DMDA`, `DMDASNESSetJacobianLocal()`, `DMDASNESSetFunctionLocalVec()`, `DMSNESSetJacobian()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"Snes/DMDASNESSetJacobianLocalVec\"))\n\"\"\"\nfunction DMDASNESSetJacobianLocalVec(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMDASNESSetJacobianLocalVec(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDASNESSetJacobianLocalVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASNESSetObjectiveLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local residual evaluation function to used with a `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local objective evaluation, see `DMDASNESSetObjectiveLocal` for the calling sequence\n- `ctx`  - optional context for local residual evaluation\n\nCalling sequence of `func`:\n- `info` - `DMDALocalInfo` defining the subdomain to evaluate the Jacobian at\n- `x`    - dimensional pointer to state at which to evaluate the objective (e.g. PetscScalar *x or **x or ***x)\n- `obj`  - returned objective value for the local subdomain\n- `ctx`  - optional context passed above\n\nLevel: beginner\n\n-seealso: [](ch_snes), `DMDA`, `DMSNESSetFunction()`, `DMDASNESSetJacobianLocal()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDASNESObjectiveFn`\n\n# External Links\n$(_doc_external(\"Snes/DMDASNESSetObjectiveLocal\"))\n\"\"\"\nfunction DMDASNESSetObjectiveLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMDASNESSetObjectiveLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDASNESSetObjectiveLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASNESSetObjectiveLocalVec(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local residual evaluation function that operates on a local vector with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local objective evaluation, see `DMDASNESSetObjectiveLocalVec` for the calling sequence\n- `ctx`  - optional context for local residual evaluation\n\nCalling sequence of `func`:\n- `info` - `DMDALocalInfo` defining the subdomain to evaluate the Jacobian at\n- `x`    - state vector at which to evaluate the objective\n- `obj`  - returned objective value for the local subdomain\n- `ctx`  - optional context passed above\n\nLevel: beginner\n\n-seealso: [](ch_snes), `DMDA`, `DMDASNESSetObjectiveLocal()`, `DMSNESSetFunction()`, `DMDASNESSetJacobianLocalVec()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDASNESObjectiveVecFn`\n\n# External Links\n$(_doc_external(\"Snes/DMDASNESSetObjectiveLocalVec\"))\n\"\"\"\nfunction DMDASNESSetObjectiveLocalVec(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMDASNESSetObjectiveLocalVec(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDASNESSetObjectiveLocalVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASNESSetPicardLocal(petsclib::PetscLibType,dm::PetscDM, imode::InsertMode, func::external, jac::external, ctx::Cvoid) \nset a local right\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - `DM` to associate callback with\n- `imode` - `INSERT_VALUES` if local function computes owned part, `ADD_VALUES` if it contributes to ghosted part\n- `func`  - local residual evaluation\n- `jac`   - function to compute Jacobian\n- `ctx`   - optional context for local residual evaluation\n\nCalling sequence of `func`:\n- `info` - defines the subdomain to evaluate the residual on\n- `x`    - dimensional pointer to state at which to evaluate residual\n- `f`    - dimensional pointer to residual, write the residual here\n- `ctx`  - optional context passed above\n\nCalling sequence of `jac`:\n- `info` - defines the subdomain to evaluate the residual on\n- `x`    - dimensional pointer to state at which to evaluate residual\n- `jac`  - the Jacobian\n- `Jp`   - approximation to the Jacobian used to compute the preconditioner, often `J`\n- `ctx`  - optional context passed above\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `DMDA`, `DMSNESSetFunction()`, `DMDASNESSetJacobian()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"Snes/DMDASNESSetPicardLocal\"))\n\"\"\"\nfunction DMDASNESSetPicardLocal(petsclib::PetscLibType, dm::PetscDM, imode::InsertMode, func::external, jac::external, ctx::Cvoid) end\n\n@for_petsc function DMDASNESSetPicardLocal(petsclib::$UnionPetscLib, dm::PetscDM, imode::InsertMode, func::external, jac::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDASNESSetPicardLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, InsertMode, external, external, Ptr{Cvoid}),\n               dm, imode, func, jac, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tobj::PetscReal = DMPlexSNESComputeObjectiveFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid) \nSums the local objectives from the local input X using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`   - The mesh\n- `X`    - Local solution\n- `user` - The user context\n\nOutput Parameter:\n- `obj` - Local objective value\n\nLevel: developer\n\n-seealso: `DM`, `DMPlexSNESComputeResidualFEM()`\n\n# External Links\n$(_doc_external(\"Snes/DMPlexSNESComputeObjectiveFEM\"))\n\"\"\"\nfunction DMPlexSNESComputeObjectiveFEM(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexSNESComputeObjectiveFEM(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, user::Cvoid )\n\tobj_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexSNESComputeObjectiveFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{$PetscReal}, Ptr{Cvoid}),\n               dm, X, obj_, user,\n              )\n\n\tobj = obj_[]\n\n\treturn obj\nend \n\n\"\"\"\n\tDMPlexSNESComputeResidualFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid) \nSums the local residual into vector `F` from the local input `X` using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`   - The mesh\n- `X`    - Local solution\n- `user` - The user context\n\nOutput Parameter:\n- `F` - Local output vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `DM`, `DMPLEX`, `DMSNESComputeJacobianAction()`\n\n# External Links\n$(_doc_external(\"Snes/DMPlexSNESComputeResidualFEM\"))\n\"\"\"\nfunction DMPlexSNESComputeResidualFEM(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexSNESComputeResidualFEM(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexSNESComputeResidualFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, Ptr{Cvoid}),\n               dm, X, F, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSNESComputeResidualDS(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid) \nSums the local residual into vector `F` from the local input `X` using all pointwise functions with unique keys in the `PetscDS`\n\nInput Parameters:\n- `dm`   - The mesh\n- `X`    - Local solution\n- `user` - The user context\n\nOutput Parameter:\n- `F` - Local output vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `DM`, `DMPLEX`, `DMPlexComputeJacobianAction()`\n\n# External Links\n$(_doc_external(\"Snes/DMPlexSNESComputeResidualDS\"))\n\"\"\"\nfunction DMPlexSNESComputeResidualDS(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexSNESComputeResidualDS(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexSNESComputeResidualDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, Ptr{Cvoid}),\n               dm, X, F, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSNESComputeBoundaryFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid) \nForm the boundary values for the local input `X`\n\nInput Parameters:\n- `dm`   - The mesh\n- `user` - The user context\n\nOutput Parameter:\n- `X` - Local solution\n\nLevel: developer\n\n-seealso: [](ch_snes), `DM`, `DMPLEX`, `DMPlexComputeJacobianAction()`\n\n# External Links\n$(_doc_external(\"Snes/DMPlexSNESComputeBoundaryFEM\"))\n\"\"\"\nfunction DMPlexSNESComputeBoundaryFEM(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexSNESComputeBoundaryFEM(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexSNESComputeBoundaryFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               dm, X, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSNESComputeJacobianAction(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, Y::PetscVec, F::PetscVec, user::Cvoid) \nCompute the action of the Jacobian J(`X`) on `Y`\n\nInput Parameters:\n- `dm`   - The `DM`\n- `X`    - Local solution vector\n- `Y`    - Local input vector\n- `user` - The user context\n\nOutput Parameter:\n- `F` - local output vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `DM`, `DMSNESCreateJacobianMF()`, `DMPlexSNESComputeResidualFEM()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESComputeJacobianAction\"))\n\"\"\"\nfunction DMSNESComputeJacobianAction(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, Y::PetscVec, F::PetscVec, user::Cvoid) end\n\n@for_petsc function DMSNESComputeJacobianAction(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, Y::PetscVec, F::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMSNESComputeJacobianAction, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, CVec, Ptr{Cvoid}),\n               dm, X, Y, F, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSNESComputeJacobianFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) \nForm the local portion of the Jacobian matrix `Jac` at the local solution `X` using pointwise functions specified by the user.\n\nInput Parameters:\n- `dm`   - The `DM`\n- `X`    - Local input vector\n- `user` - The user context\n\nOutput Parameters:\n- `Jac`  - Jacobian matrix\n- `JacP` - approximate Jacobian from which the preconditioner will be built, often `Jac`\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMPLEX`, `Mat`\n\n# External Links\n$(_doc_external(\"Snes/DMPlexSNESComputeJacobianFEM\"))\n\"\"\"\nfunction DMPlexSNESComputeJacobianFEM(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexSNESComputeJacobianFEM(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexSNESComputeJacobianFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CMat, CMat, Ptr{Cvoid}),\n               dm, X, Jac, JacP, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tJ::PetscMat = DMSNESCreateJacobianMF(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid) \nCreate a `Mat` which computes the action of the Jacobian matrix\n\nCollective\n\nInput Parameters:\n- `dm`   - The `DM`\n- `X`    - The evaluation point for the Jacobian\n- `user` - A user context, or `NULL`\n\nOutput Parameter:\n- `J` - The `Mat`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `DM`, `SNES`, `DMSNESComputeJacobianAction()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESCreateJacobianMF\"))\n\"\"\"\nfunction DMSNESCreateJacobianMF(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, user::Cvoid) end\n\n@for_petsc function DMSNESCreateJacobianMF(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, user::Cvoid )\n\tJ_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMSNESCreateJacobianMF, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}, Ptr{CMat}),\n               dm, X, user, J_,\n              )\n\n\tJ = PetscMat(J_[], petsclib)\n\n\treturn J\nend \n\n\"\"\"\n\tDMPlexSetSNESLocalFEM(petsclib::PetscLibType,dm::PetscDM, use_obj::PetscBool, ctx::Cvoid) \nUse `DMPLEX`'s internal FEM routines to compute `SNES` boundary values, objective, residual, and Jacobian.\n\nInput Parameters:\n- `dm`      - The `DM` object\n- `use_obj` - Use the objective function callback\n- `ctx`     - The user context that will be passed to pointwise evaluation routines\n\nLevel: developer\n\n-seealso: [](ch_snes),`DMPLEX`, `SNES`, `PetscDSAddBoundary()`, `PetscDSSetObjective()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`\n\n# External Links\n$(_doc_external(\"Snes/DMPlexSetSNESLocalFEM\"))\n\"\"\"\nfunction DMPlexSetSNESLocalFEM(petsclib::PetscLibType, dm::PetscDM, use_obj::PetscBool, ctx::Cvoid) end\n\n@for_petsc function DMPlexSetSNESLocalFEM(petsclib::$UnionPetscLib, dm::PetscDM, use_obj::PetscBool, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMPlexSetSNESLocalFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, Ptr{Cvoid}),\n               dm, use_obj, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\terror::Vector{PetscReal} = DMSNESCheckDiscretization(petsclib::PetscLibType,snes::PetscSNES, dm::PetscDM, t::PetscReal, u::PetscVec, tol::PetscReal) \nCheck the discretization error of the exact solution\n\nInput Parameters:\n- `snes` - the `SNES` object\n- `dm`   - the `DM`\n- `t`    - the time\n- `u`    - a `DM` vector\n- `tol`  - A tolerance for the check, or -1 to print the results instead\n\nOutput Parameter:\n- `error` - An array which holds the discretization error in each field, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_snes), `PetscDSSetExactSolution()`, `DNSNESCheckFromOptions()`, `DMSNESCheckResidual()`, `DMSNESCheckJacobian()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESCheckDiscretization\"))\n\"\"\"\nfunction DMSNESCheckDiscretization(petsclib::PetscLibType, snes::PetscSNES, dm::PetscDM, t::PetscReal, u::PetscVec, tol::PetscReal) end\n\n@for_petsc function DMSNESCheckDiscretization(petsclib::$UnionPetscLib, snes::PetscSNES, dm::PetscDM, t::$PetscReal, u::PetscVec, tol::$PetscReal )\n\terror = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMSNESCheckDiscretization, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CDM, $PetscReal, CVec, $PetscReal, Ptr{$PetscReal}),\n               snes, dm, t, u, tol, error,\n              )\n\n\n\treturn error\nend \n\n\"\"\"\n\tresidual::PetscReal = DMSNESCheckResidual(petsclib::PetscLibType,snes::PetscSNES, dm::PetscDM, u::PetscVec, tol::PetscReal) \nCheck the residual of the exact solution\n\nInput Parameters:\n- `snes` - the `SNES` object\n- `dm`   - the `DM`\n- `u`    - a `DM` vector\n- `tol`  - A tolerance for the check, or -1 to print the results instead\n\nOutput Parameter:\n- `residual` - The residual norm of the exact solution, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_snes), `DNSNESCheckFromOptions()`, `DMSNESCheckDiscretization()`, `DMSNESCheckJacobian()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESCheckResidual\"))\n\"\"\"\nfunction DMSNESCheckResidual(petsclib::PetscLibType, snes::PetscSNES, dm::PetscDM, u::PetscVec, tol::PetscReal) end\n\n@for_petsc function DMSNESCheckResidual(petsclib::$UnionPetscLib, snes::PetscSNES, dm::PetscDM, u::PetscVec, tol::$PetscReal )\n\tresidual_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMSNESCheckResidual, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CDM, CVec, $PetscReal, Ptr{$PetscReal}),\n               snes, dm, u, tol, residual_,\n              )\n\n\tresidual = residual_[]\n\n\treturn residual\nend \n\n\"\"\"\n\tisLinear::PetscBool,convRate::PetscReal = DMSNESCheckJacobian(petsclib::PetscLibType,snes::PetscSNES, dm::PetscDM, u::PetscVec, tol::PetscReal) \nCheck the Jacobian of the exact solution against the residual using the Taylor Test\n\nInput Parameters:\n- `snes` - the `SNES` object\n- `dm`   - the `DM`\n- `u`    - a `DM` vector\n- `tol`  - A tolerance for the check, or -1 to print the results instead\n\nOutput Parameters:\n- `isLinear` - Flag indicaing that the function looks linear, or `NULL`\n- `convRate` - The rate of convergence of the linear model, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_snes), `DNSNESCheckFromOptions()`, `DMSNESCheckDiscretization()`, `DMSNESCheckResidual()`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESCheckJacobian\"))\n\"\"\"\nfunction DMSNESCheckJacobian(petsclib::PetscLibType, snes::PetscSNES, dm::PetscDM, u::PetscVec, tol::PetscReal) end\n\n@for_petsc function DMSNESCheckJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, dm::PetscDM, u::PetscVec, tol::$PetscReal )\n\tisLinear_ = Ref{PetscBool}()\n\tconvRate_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMSNESCheckJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CDM, CVec, $PetscReal, Ptr{PetscBool}, Ptr{$PetscReal}),\n               snes, dm, u, tol, isLinear_, convRate_,\n              )\n\n\tisLinear = isLinear_[]\n\tconvRate = convRate_[]\n\n\treturn isLinear,convRate\nend \n\n\"\"\"\n\tDMSNESCheckFromOptions(petsclib::PetscLibType,snes::PetscSNES, u::PetscVec) \nCheck the residual and Jacobian functions using the exact solution by outputting some diagnostic information\n\nInput Parameters:\n- `snes` - the `SNES` object\n- `u`    - representative `SNES` vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `DM`\n\n# External Links\n$(_doc_external(\"Snes/DMSNESCheckFromOptions\"))\n\"\"\"\nfunction DMSNESCheckFromOptions(petsclib::PetscLibType, snes::PetscSNES, u::PetscVec) end\n\n@for_petsc function DMSNESCheckFromOptions(petsclib::$UnionPetscLib, snes::PetscSNES, u::PetscVec )\n\n    @chk ccall(\n               (:DMSNESCheckFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec),\n               snes, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetSNESVariableBounds(petsclib::PetscLibType,dm::PetscDM, snes::PetscSNES) \nCompute upper and lower bounds for the solution using pointsie functions from the `PetscDS`\n\nCollective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `snes` - the `SNES` object\n\nLevel: intermediate\n\n-seealso: `SNESVISetVariableBounds()`, `SNESVI`, [](ch_snes), `DM`\n\n# External Links\n$(_doc_external(\"Snes/DMPlexSetSNESVariableBounds\"))\n\"\"\"\nfunction DMPlexSetSNESVariableBounds(petsclib::PetscLibType, dm::PetscDM, snes::PetscSNES) end\n\n@for_petsc function DMPlexSetSNESVariableBounds(petsclib::$UnionPetscLib, dm::PetscDM, snes::PetscSNES )\n\n    @chk ccall(\n               (:DMPlexSetSNESVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CDM, CSNES),\n               dm, snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSNESComputeResidualCEED(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, locF::PetscVec, user::Cvoid) \n\n# External Links\n$(_doc_external(\"Snes/DMPlexSNESComputeResidualCEED\"))\n\"\"\"\nfunction DMPlexSNESComputeResidualCEED(petsclib::PetscLibType, dm::PetscDM, locX::PetscVec, locF::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexSNESComputeResidualCEED(petsclib::$UnionPetscLib, dm::PetscDM, locX::PetscVec, locF::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexSNESComputeResidualCEED, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, Ptr{Cvoid}),\n               dm, locX, locF, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::DMInterpolationInfo = DMInterpolationCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `DMInterpolationInfo` context\n\nCollective\n\nInput Parameter:\n- `comm` - the communicator\n\nOutput Parameter:\n- `ctx` - the context\n\nLevel: beginner\n\nDeveloper Note:\nThe naming is incorrect, either the object should be named `DMInterpolation` or all the routines should begin with `DMInterpolationInfo`\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`, `DMInterpolationDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationCreate\"))\n\"\"\"\nfunction DMInterpolationCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMInterpolationCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tctx_ = Ref{DMInterpolationInfo}()\n\n    @chk ccall(\n               (:DMInterpolationCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{DMInterpolationInfo}),\n               comm, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tDMInterpolationSetDim(petsclib::PetscLibType,ctx::DMInterpolationInfo, dim::PetscInt) \nSets the spatial dimension for the interpolation context\n\nNot Collective\n\nInput Parameters:\n- `ctx` - the context\n- `dim` - the spatial dimension\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationGetDim()`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationSetDim\"))\n\"\"\"\nfunction DMInterpolationSetDim(petsclib::PetscLibType, ctx::DMInterpolationInfo, dim::PetscInt) end\n\n@for_petsc function DMInterpolationSetDim(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, dim::$PetscInt )\n\n    @chk ccall(\n               (:DMInterpolationSetDim, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, $PetscInt),\n               ctx, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt = DMInterpolationGetDim(petsclib::PetscLibType,ctx::DMInterpolationInfo) \nGets the spatial dimension for the interpolation context\n\nNot Collective\n\nInput Parameter:\n- `ctx` - the context\n\nOutput Parameter:\n- `dim` - the spatial dimension\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationSetDim()`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationGetDim\"))\n\"\"\"\nfunction DMInterpolationGetDim(petsclib::PetscLibType, ctx::DMInterpolationInfo) end\n\n@for_petsc function DMInterpolationGetDim(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMInterpolationGetDim, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, Ptr{$PetscInt}),\n               ctx, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tDMInterpolationSetDof(petsclib::PetscLibType,ctx::DMInterpolationInfo, dof::PetscInt) \nSets the number of fields interpolated at a point for the interpolation context\n\nNot Collective\n\nInput Parameters:\n- `ctx` - the context\n- `dof` - the number of fields\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationGetDof()`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationSetDof\"))\n\"\"\"\nfunction DMInterpolationSetDof(petsclib::PetscLibType, ctx::DMInterpolationInfo, dof::PetscInt) end\n\n@for_petsc function DMInterpolationSetDof(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, dof::$PetscInt )\n\n    @chk ccall(\n               (:DMInterpolationSetDof, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, $PetscInt),\n               ctx, dof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdof::PetscInt = DMInterpolationGetDof(petsclib::PetscLibType,ctx::DMInterpolationInfo) \nGets the number of fields interpolated at a point for the interpolation context\n\nNot Collective\n\nInput Parameter:\n- `ctx` - the context\n\nOutput Parameter:\n- `dof` - the number of fields\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationSetDof()`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationGetDof\"))\n\"\"\"\nfunction DMInterpolationGetDof(petsclib::PetscLibType, ctx::DMInterpolationInfo) end\n\n@for_petsc function DMInterpolationGetDof(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMInterpolationGetDof, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, Ptr{$PetscInt}),\n               ctx, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tDMInterpolationAddPoints(petsclib::PetscLibType,ctx::DMInterpolationInfo, n::PetscInt, points::Vector{PetscReal}) \nAdd points at which we will interpolate the fields\n\nNot Collective\n\nInput Parameters:\n- `ctx`    - the context\n- `n`      - the number of points\n- `points` - the coordinates for each point, an array of size `n` * dim\n\nLevel: intermediate\n\nNote:\nThe input coordinate information is copied into the object.\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationSetDim()`, `DMInterpolationEvaluate()`, `DMInterpolationCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationAddPoints\"))\n\"\"\"\nfunction DMInterpolationAddPoints(petsclib::PetscLibType, ctx::DMInterpolationInfo, n::PetscInt, points::Vector{PetscReal}) end\n\n@for_petsc function DMInterpolationAddPoints(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, n::$PetscInt, points::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMInterpolationAddPoints, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, $PetscInt, Ptr{$PetscReal}),\n               ctx, n, points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolationSetUp(petsclib::PetscLibType,ctx::DMInterpolationInfo, dm::PetscDM, redundantPoints::PetscBool, ignoreOutsideDomain::PetscBool) \nCompute spatial indices for point location during interpolation\n\nCollective\n\nInput Parameters:\n- `ctx`                 - the context\n- `dm`                  - the `DM` for the function space used for interpolation\n- `redundantPoints`     - If `PETSC_TRUE`, all processes are passing in the same array of points. Otherwise, points need to be communicated among processes.\n- `ignoreOutsideDomain` - If `PETSC_TRUE`, ignore points outside the domain, otherwise return an error\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`, `DMInterpolationCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationSetUp\"))\n\"\"\"\nfunction DMInterpolationSetUp(petsclib::PetscLibType, ctx::DMInterpolationInfo, dm::PetscDM, redundantPoints::PetscBool, ignoreOutsideDomain::PetscBool) end\n\n@for_petsc function DMInterpolationSetUp(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, dm::PetscDM, redundantPoints::PetscBool, ignoreOutsideDomain::PetscBool )\n\n    @chk ccall(\n               (:DMInterpolationSetUp, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, CDM, PetscBool, PetscBool),\n               ctx, dm, redundantPoints, ignoreOutsideDomain,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolationGetCoordinates(petsclib::PetscLibType,ctx::DMInterpolationInfo, coordinates::PetscVec) \nGets a `Vec` with the coordinates of each interpolation point\n\nCollective\n\nInput Parameter:\n- `ctx` - the context\n\nOutput Parameter:\n- `coordinates` - the coordinates of interpolation points\n\nLevel: intermediate\n\nNote:\nThe local vector entries correspond to interpolation points lying on this process, according to the associated `DM`.\nThis is a borrowed vector that the user should not destroy.\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`, `DMInterpolationCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationGetCoordinates\"))\n\"\"\"\nfunction DMInterpolationGetCoordinates(petsclib::PetscLibType, ctx::DMInterpolationInfo, coordinates::PetscVec) end\n\n@for_petsc function DMInterpolationGetCoordinates(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, coordinates::PetscVec )\n\tcoordinates_ = Ref(coordinates.ptr)\n\n    @chk ccall(\n               (:DMInterpolationGetCoordinates, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, Ptr{CVec}),\n               ctx, coordinates_,\n              )\n\n\tcoordinates.ptr = coordinates_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolationGetVector(petsclib::PetscLibType,ctx::DMInterpolationInfo, v::PetscVec) \nGets a `Vec` which can hold all the interpolated field values\n\nCollective\n\nInput Parameter:\n- `ctx` - the context\n\nOutput Parameter:\n- `v` - a vector capable of holding the interpolated field values\n\nLevel: intermediate\n\nNote:\nThis vector should be returned using `DMInterpolationRestoreVector()`.\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationRestoreVector()`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`, `DMInterpolationCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationGetVector\"))\n\"\"\"\nfunction DMInterpolationGetVector(petsclib::PetscLibType, ctx::DMInterpolationInfo, v::PetscVec) end\n\n@for_petsc function DMInterpolationGetVector(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:DMInterpolationGetVector, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, Ptr{CVec}),\n               ctx, v_,\n              )\n\n\tv.ptr = v_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolationRestoreVector(petsclib::PetscLibType,ctx::DMInterpolationInfo, v::PetscVec) \nReturns a `Vec` which can hold all the interpolated field values\n\nCollective\n\nInput Parameters:\n- `ctx` - the context\n- `v`   - a vector capable of holding the interpolated field values\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationGetVector()`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`, `DMInterpolationCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationRestoreVector\"))\n\"\"\"\nfunction DMInterpolationRestoreVector(petsclib::PetscLibType, ctx::DMInterpolationInfo, v::PetscVec) end\n\n@for_petsc function DMInterpolationRestoreVector(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:DMInterpolationRestoreVector, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, Ptr{CVec}),\n               ctx, v_,\n              )\n\n\tv.ptr = v_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolationEvaluate(petsclib::PetscLibType,ctx::DMInterpolationInfo, dm::PetscDM, x::PetscVec, v::PetscVec) \nUsing the input from `dm` and `x`, calculates interpolated field values at the interpolation points.\n\nInput Parameters:\n- `ctx` - The `DMInterpolationInfo` context obtained with `DMInterpolationCreate()`\n- `dm`  - The `DM`\n- `x`   - The local vector containing the field to be interpolated, can be created with `DMCreateGlobalVector()`\n\nOutput Parameter:\n- `v` - The vector containing the interpolated values, obtained with `DMInterpolationGetVector()`\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationGetVector()`, `DMInterpolationAddPoints()`, `DMInterpolationCreate()`, `DMInterpolationGetCoordinates()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationEvaluate\"))\n\"\"\"\nfunction DMInterpolationEvaluate(petsclib::PetscLibType, ctx::DMInterpolationInfo, dm::PetscDM, x::PetscVec, v::PetscVec) end\n\n@for_petsc function DMInterpolationEvaluate(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo, dm::PetscDM, x::PetscVec, v::PetscVec )\n\n    @chk ccall(\n               (:DMInterpolationEvaluate, $petsc_library),\n               PetscErrorCode,\n               (DMInterpolationInfo, CDM, CVec, CVec),\n               ctx, dm, x, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolationDestroy(petsclib::PetscLibType,ctx::DMInterpolationInfo) \nDestroys a `DMInterpolationInfo` context\n\nCollective\n\nInput Parameter:\n- `ctx` - the context\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMInterpolationInfo`, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`, `DMInterpolationCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolationDestroy\"))\n\"\"\"\nfunction DMInterpolationDestroy(petsclib::PetscLibType, ctx::DMInterpolationInfo) end\n\n@for_petsc function DMInterpolationDestroy(petsclib::$UnionPetscLib, ctx::DMInterpolationInfo )\n\n    @chk ccall(\n               (:DMInterpolationDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMInterpolationInfo},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tis::IS,subdm::PetscDM = DMCreateSectionSubDM(petsclib::PetscLibType,dm::PetscDM, numFields::PetscInt, fields::Vector{PetscInt}, numComps::Vector{PetscInt}, comps::Vector{PetscInt}) \nReturns an `IS` and `subDM` containing a `PetscSection` that encapsulates a subproblem defined by a subset of the fields in a `PetscSection` in the `DM`.\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DM` object\n- `numFields` - The number of fields to incorporate into `subdm`\n- `fields`    - The field numbers of the selected fields\n- `numComps`  - The number of components from each field to incorporate into `subdm`, or PETSC_DECIDE for all components\n- `comps`     - The component numbers of the selected fields (omitted for PTESC_DECIDE fields)\n\nOutput Parameters:\n- `is`    - The global indices for the subproblem or `NULL`\n- `subdm` - The `DM` for the subproblem, which must already have be cloned from `dm` or `NULL`\n\nLevel: intermediate\n\n-seealso: `DMCreateSubDM()`, `DMGetLocalSection()`, `DMPlexSetMigrationSF()`, `DMView()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSectionSubDM\"))\n\"\"\"\nfunction DMCreateSectionSubDM(petsclib::PetscLibType, dm::PetscDM, numFields::PetscInt, fields::Vector{PetscInt}, numComps::Vector{PetscInt}, comps::Vector{PetscInt}) end\n\n@for_petsc function DMCreateSectionSubDM(petsclib::$UnionPetscLib, dm::PetscDM, numFields::$PetscInt, fields::Vector{$PetscInt}, numComps::Vector{$PetscInt}, comps::Vector{$PetscInt} )\n\tis_ = Ref{IS}()\n\tsubdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMCreateSectionSubDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CIS}, Ptr{CDM}),\n               dm, numFields, fields, numComps, comps, is_, subdm_,\n              )\n\n\tis = is_[]\n\tsubdm = PetscDM(subdm_[], petsclib)\n\n\treturn is,subdm\nend \n\n\"\"\"\n\tis::Vector{IS},superdm::PetscDM = DMCreateSectionSuperDM(petsclib::PetscLibType,dms::Vector{PetscDM}, len::PetscInt) \nReturns an arrays of `IS` and a `DM` containing a `PetscSection` that encapsulates a superproblem defined by the array of `DM` and their `PetscSection`\n\nNot Collective\n\nInput Parameters:\n- `dms` - The `DM` objects, the must all have the same topology; for example obtained with `DMClone()`\n- `len` - The number of `DM` in `dms`\n\nOutput Parameters:\n- `is`      - The global indices for the subproblem, or `NULL`\n- `superdm` - The `DM` for the superproblem, which must already have be cloned and contain the same topology as the `dms`\n\nLevel: intermediate\n\n-seealso: `DMCreateSuperDM()`, `DMGetLocalSection()`, `DMPlexSetMigrationSF()`, `DMView()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSectionSuperDM\"))\n\"\"\"\nfunction DMCreateSectionSuperDM(petsclib::PetscLibType, dms::Vector{PetscDM}, len::PetscInt) end\n\n@for_petsc function DMCreateSectionSuperDM(petsclib::$UnionPetscLib, dms::Vector{PetscDM}, len::$PetscInt )\n\tis_ = Ref{Ptr{CIS}}()\n\tsuperdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMCreateSectionSuperDM, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CDM}, $PetscInt, Ptr{Ptr{CIS}}, Ptr{CDM}),\n               dms, len, is_, superdm_,\n              )\n\n\tis = unsafe_wrap(Array, is_[], VecGetLocalSize(petsclib, x); own = false)\n\tsuperdm = PetscDM(superdm_[], petsclib)\n\n\treturn is,superdm\nend \n\n\"\"\"\n\tdm::PetscDM = DMCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `DM` object. `DM`s are the abstract objects in PETSc that mediate between meshes and discretizations and the\nalgebraic solvers, time integrators, and optimization algorithms in PETSc.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `DM` object\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\nNotes:\nSee `DMType` for a brief summary of available `DM`.\n\nThe type must then be set with `DMSetType()`. If you never call `DMSetType()` it will generate an\nerror when you try to use the `dm`.\n\n`DM` is an orphan initialism or orphan acronym, the letters have no meaning and never did.\n\nSee also: \n=== \n`DM`, `DMSetType()`, `DMType`, `DMDACreate()`, `DMDA`, `DMSLICED`, `DMCOMPOSITE`, `DMPLEX`, `DMMOAB`, `DMNETWORK`\n\n# External Links\n$(_doc_external(\"DM/DMCreate\"))\n\"\"\"\nfunction DMCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\t# Ensure PETSc (and MPI) are initialized before creating a DM to avoid crashes\n\t@assert PetscInitialized(petsclib) \"PETSc is not initialized — call PETSc.initialize(petsclib) (and MPI.Init()) before creating DMs\"\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMClone(petsclib::PetscLibType,dm::PetscDM, newdm::PetscDM) \nCreates a `DM` object with the same topology as the original.\n\nCollective\n\nInput Parameter:\n- `dm` - The original `DM` object\n\nOutput Parameter:\n- `newdm` - The new `DM` object\n\nLevel: beginner\n\nNotes:\nFor some `DM` implementations this is a shallow clone, the result of which may share (reference counted) information with its parent. For example,\n`DMClone()` applied to a `DMPLEX` object will result in a new `DMPLEX` that shares the topology with the original `DMPLEX`. It does not\nshare the `PetscSection` of the original `DM`.\n\nThe clone is considered set up if the original has been set up.\n\nUse `DMConvert()` for a general way to create new `DM` from a given `DM`\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMCreate()`, `DMSetType()`, `DMSetLocalSection()`, `DMSetGlobalSection()`, `DMPLEX`, `DMConvert()`\n\n# External Links\n$(_doc_external(\"DM/DMClone\"))\n\"\"\"\nfunction DMClone(petsclib::PetscLibType, dm::PetscDM, newdm::PetscDM) end\n\n@for_petsc function DMClone(petsclib::$UnionPetscLib, dm::PetscDM, newdm::PetscDM )\n\tnewdm_ = Ref(newdm.ptr)\n\n    @chk ccall(\n               (:DMClone, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, newdm_,\n              )\n\n\tnewdm.ptr = newdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetVecType(petsclib::PetscLibType,dm::PetscDM, ctype::VecType) \nSets the type of vector to be created with `DMCreateLocalVector()` and `DMCreateGlobalVector()`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - initial distributed array\n- `ctype` - the vector type, for example `VECSTANDARD`, `VECCUDA`, or `VECVIENNACL`\n\nOptions Database Key:\n- `-dm_vec_type ctype` - the type of vector to create\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMDestroy()`, `DMDAInterpolationType`, `VecType`, `DMGetVecType()`, `DMSetMatType()`, `DMGetMatType()`,\n`VECSTANDARD`, `VECCUDA`, `VECVIENNACL`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMSetVecType\"))\n\"\"\"\nfunction DMSetVecType(petsclib::PetscLibType, dm::PetscDM, ctype::VecType) end\n\n@for_petsc function DMSetVecType(petsclib::$UnionPetscLib, dm::PetscDM, ctype::VecType )\n\n    @chk ccall(\n               (:DMSetVecType, $petsc_library),\n               PetscErrorCode,\n               (CDM, VecType),\n               dm, ctype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctype::VecType = DMGetVecType(petsclib::PetscLibType,da::PetscDM) \nGets the type of vector created with `DMCreateLocalVector()` and `DMCreateGlobalVector()`\n\nLogically Collective\n\nInput Parameter:\n- `da` - initial distributed array\n\nOutput Parameter:\n- `ctype` - the vector type\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMDestroy()`, `DMDAInterpolationType`, `VecType`, `DMSetMatType()`, `DMGetMatType()`, `DMSetVecType()`\n\n# External Links\n$(_doc_external(\"DM/DMGetVecType\"))\n\"\"\"\nfunction DMGetVecType(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMGetVecType(petsclib::$UnionPetscLib, da::PetscDM )\n\tctype_ = Ref{VecType}()\n\n    @chk ccall(\n               (:DMGetVecType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{VecType}),\n               da, ctype_,\n              )\n\n\tctype = unsafe_string(ctype_[])\n\n\treturn ctype\nend \n\n\"\"\"\n\tDMSetISColoringType(petsclib::PetscLibType,dm::PetscDM, ctype::ISColoringType) \nSets the type of coloring, `IS_COLORING_GLOBAL` or `IS_COLORING_LOCAL` that is created by the `DM`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DM` context\n- `ctype` - the matrix type\n\nOptions Database Key:\n- `-dm_is_coloring_type` - global or local\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `MatType`, `DMGetMatType()`,\n`DMGetISColoringType()`, `ISColoringType`, `IS_COLORING_GLOBAL`, `IS_COLORING_LOCAL`\n\n# External Links\n$(_doc_external(\"DM/DMSetISColoringType\"))\n\"\"\"\nfunction DMSetISColoringType(petsclib::PetscLibType, dm::PetscDM, ctype::ISColoringType) end\n\n@for_petsc function DMSetISColoringType(petsclib::$UnionPetscLib, dm::PetscDM, ctype::ISColoringType )\n\n    @chk ccall(\n               (:DMSetISColoringType, $petsc_library),\n               PetscErrorCode,\n               (CDM, ISColoringType),\n               dm, ctype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctype::ISColoringType = DMGetISColoringType(petsclib::PetscLibType,dm::PetscDM) \nGets the type of coloring, `IS_COLORING_GLOBAL` or `IS_COLORING_LOCAL` that is created by the `DM`\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DM` context\n\nOutput Parameter:\n- `ctype` - the matrix type\n\nOptions Database Key:\n- `-dm_is_coloring_type` - global or local\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `MatType`, `DMGetMatType()`,\n`ISColoringType`, `IS_COLORING_GLOBAL`, `IS_COLORING_LOCAL`\n\n# External Links\n$(_doc_external(\"DM/DMGetISColoringType\"))\n\"\"\"\nfunction DMGetISColoringType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetISColoringType(petsclib::$UnionPetscLib, dm::PetscDM )\n\tctype_ = Ref{ISColoringType}()\n\n    @chk ccall(\n               (:DMGetISColoringType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{ISColoringType}),\n               dm, ctype_,\n              )\n\n\tctype = unsafe_string(ctype_[])\n\n\treturn ctype\nend \n\n\"\"\"\n\tDMSetMatType(petsclib::PetscLibType,dm::PetscDM, ctype::MatType) \nSets the type of matrix created with `DMCreateMatrix()`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DM` context\n- `ctype` - the matrix type, for example `MATMPIAIJ`\n\nOptions Database Key:\n- `-dm_mat_type ctype` - the type of the matrix to create, for example mpiaij\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `MatType`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `DMGetMatType()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatType\"))\n\"\"\"\nfunction DMSetMatType(petsclib::PetscLibType, dm::PetscDM, ctype::MatType) end\n\n@for_petsc function DMSetMatType(petsclib::$UnionPetscLib, dm::PetscDM, ctype::MatType )\n\n    @chk ccall(\n               (:DMSetMatType, $petsc_library),\n               PetscErrorCode,\n               (CDM, MatType),\n               dm, ctype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctype::MatType = DMGetMatType(petsclib::PetscLibType,dm::PetscDM) \nGets the type of matrix that would be created with `DMCreateMatrix()`\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DM` context\n\nOutput Parameter:\n- `ctype` - the matrix type\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `MatType`, `DMSetMatType()`\n\n# External Links\n$(_doc_external(\"DM/DMGetMatType\"))\n\"\"\"\nfunction DMGetMatType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetMatType(petsclib::$UnionPetscLib, dm::PetscDM )\n\tctype_ = Ref{MatType}()\n\n    @chk ccall(\n               (:DMGetMatType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{MatType}),\n               dm, ctype_,\n              )\n\n\tctype = unsafe_string(ctype_[])\n\n\treturn ctype\nend \n\n\"\"\"\n\tDMSetOptionsPrefix(petsclib::PetscLibType,dm::PetscDM, prefix::String) \nSets the prefix prepended to all option names when searching through the options database\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DM` context\n- `prefix` - the prefix to prepend\n\nLevel: advanced\n\nNote:\nA hyphen (-) must NOT be given at the beginning of the prefix name.\nThe first character of all runtime options is AUTOMATICALLY the hyphen.\n\nSee also: \n=== \n`DM`, `PetscObjectSetOptionsPrefix()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMSetOptionsPrefix\"))\n\"\"\"\nfunction DMSetOptionsPrefix(petsclib::PetscLibType, dm::PetscDM, prefix::String) end\n\n@for_petsc function DMSetOptionsPrefix(petsclib::$UnionPetscLib, dm::PetscDM, prefix::String )\n\n    @chk ccall(\n               (:DMSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAppendOptionsPrefix(petsclib::PetscLibType,dm::PetscDM, prefix::String) \nAppends an additional string to an already existing prefix used for searching for\n`DM` options in the options database.\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DM` context\n- `prefix` - the string to append to the current prefix\n\nLevel: advanced\n\nNote:\nIf the `DM` does not currently have an options prefix then this value is used alone as the prefix as if `DMSetOptionsPrefix()` had been called.\nA hyphen (-) must NOT be given at the beginning of the prefix name.\nThe first character of all runtime options is AUTOMATICALLY the hyphen.\n\nSee also: \n=== \n`DM`, `DMSetOptionsPrefix()`, `DMGetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMAppendOptionsPrefix\"))\n\"\"\"\nfunction DMAppendOptionsPrefix(petsclib::PetscLibType, dm::PetscDM, prefix::String) end\n\n@for_petsc function DMAppendOptionsPrefix(petsclib::$UnionPetscLib, dm::PetscDM, prefix::String )\n\n    @chk ccall(\n               (:DMAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetOptionsPrefix(petsclib::PetscLibType,dm::PetscDM, prefix::String) \nGets the prefix used for searching for all\nDM options in the options database.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` context\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used is returned\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMSetOptionsPrefix()`, `DMAppendOptionsPrefix()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMGetOptionsPrefix\"))\n\"\"\"\nfunction DMGetOptionsPrefix(petsclib::PetscLibType, dm::PetscDM, prefix::String) end\n\n@for_petsc function DMGetOptionsPrefix(petsclib::$UnionPetscLib, dm::PetscDM, prefix::String )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:DMGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{Cchar}}),\n               dm, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDestroy(petsclib::PetscLibType,dm::PetscDM) \nDestroys a `DM`.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM` object to destroy\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMType`, `DMSetType()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMDestroy\"))\n\"\"\"\nfunction DMDestroy(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMDestroy(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CDM},),\n               dm_,\n              )\n\n\tdm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetUp(petsclib::PetscLibType,dm::PetscDM) \nsets up the data structures inside a `DM` object\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM` object to setup\n\nLevel: intermediate\n\nNote:\nThis is usually called after various parameter setting operations and `DMSetFromOptions()` are called on the `DM`\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMSetType()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMSetUp\"))\n\"\"\"\nfunction DMSetUp(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSetUp(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSetUp, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetFromOptions(petsclib::PetscLibType,dm::PetscDM) \nsets parameters in a `DM` from the options database\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM` object to set options for\n\nOptions Database Keys:\n- `-dm_preallocate_only`                               - Only preallocate the matrix for `DMCreateMatrix()` and `DMCreateMassMatrix()`, but do not fill it with zeros\n- `-dm_vec_type <type>`                                - type of vector to create inside `DM`\n- `-dm_mat_type <type>`                                - type of matrix to create inside `DM`\n- `-dm_is_coloring_type`                               - <global or local>\n- `-dm_bind_below <n>`                                 - bind (force execution on CPU) for `Vec` and `Mat` objects with local size (number of vector entries or matrix rows) below n; currently only supported for `DMDA`\n- `-dm_plex_option_phases <ph0_, ph1_, ...>`           - List of prefixes for option processing phases\n- `-dm_plex_filename <str>`                            - File containing a mesh\n- `-dm_plex_boundary_filename <str>`                   - File containing a mesh boundary\n- `-dm_plex_name <str>`                                - Name of the mesh in the file\n- `-dm_plex_shape <shape>`                             - The domain shape, such as `BOX`, `SPHERE`, etc.\n- `-dm_plex_cell <ct>`                                 - Cell shape\n- `-dm_plex_reference_cell_domain <bool>`              - Use a reference cell domain\n- `-dm_plex_dim <dim>`                                 - Set the topological dimension\n- `-dm_plex_simplex <bool>`                            - `PETSC_TRUE` for simplex elements, `PETSC_FALSE` for tensor elements\n- `-dm_plex_interpolate <bool>`                        - `PETSC_TRUE` turns on topological interpolation (creating edges and faces)\n- `-dm_plex_orient <bool>`                             - `PETSC_TRUE` turns on topological orientation (flipping edges and faces)\n- `-dm_plex_scale <sc>`                                - Scale factor for mesh coordinates\n- `-dm_coord_remap <bool>`                             - Map coordinates using a function\n- `-dm_plex_coordinate_dim <dim>`                      - Change the coordinate dimension of a mesh (usually given with cdm_ prefix)\n- `-dm_coord_map <mapname>`                            - Select a builtin coordinate map\n- `-dm_coord_map_params <p0,p1,p2,...>`                - Set coordinate mapping parameters\n- `-dm_plex_box_faces <m,n,p>`                         - Number of faces along each dimension\n- `-dm_plex_box_lower <x,y,z>`                         - Specify lower-left-bottom coordinates for the box\n- `-dm_plex_box_upper <x,y,z>`                         - Specify upper-right-top coordinates for the box\n- `-dm_plex_box_bd <bx,by,bz>`                         - Specify the `DMBoundaryType` for each direction\n- `-dm_plex_sphere_radius <r>`                         - The sphere radius\n- `-dm_plex_ball_radius <r>`                           - Radius of the ball\n- `-dm_plex_cylinder_bd <bz>`                          - Boundary type in the z direction\n- `-dm_plex_cylinder_num_wedges <n>`                   - Number of wedges around the cylinder\n- `-dm_plex_reorder <order>`                           - Reorder the mesh using the specified algorithm\n- `-dm_refine_pre <n>`                                 - The number of refinements before distribution\n- `-dm_refine_uniform_pre <bool>`                      - Flag for uniform refinement before distribution\n- `-dm_refine_volume_limit_pre <v>`                    - The maximum cell volume after refinement before distribution\n- `-dm_refine <n>`                                     - The number of refinements after distribution\n- `-dm_extrude <l>`                                    - Activate extrusion and specify the number of layers to extrude\n- `-dm_plex_save_transform <bool>`                     - Save the `DMPlexTransform` that produced this mesh\n- `-dm_plex_transform_extrude_thickness <t>`           - The total thickness of extruded layers\n- `-dm_plex_transform_extrude_use_tensor <bool>`       - Use tensor cells when extruding\n- `-dm_plex_transform_extrude_symmetric <bool>`        - Extrude layers symmetrically about the surface\n- `-dm_plex_transform_extrude_normal <n0,...,nd>`      - Specify the extrusion direction\n- `-dm_plex_transform_extrude_thicknesses <t0,...,tl>` - Specify thickness of each layer\n- `-dm_plex_create_fv_ghost_cells`                     - Flag to create finite volume ghost cells on the boundary\n- `-dm_plex_fv_ghost_cells_label <name>`               - Label name for ghost cells boundary\n- `-dm_distribute <bool>`                              - Flag to redistribute a mesh among processes\n- `-dm_distribute_overlap <n>`                         - The size of the overlap halo\n- `-dm_plex_adj_cone <bool>`                           - Set adjacency direction\n- `-dm_plex_adj_closure <bool>`                        - Set adjacency size\n- `-dm_plex_use_ceed <bool>`                           - Use LibCEED as the FEM backend\n- `-dm_plex_check_symmetry`                            - Check that the adjacency information in the mesh is symmetric - `DMPlexCheckSymmetry()`\n- `-dm_plex_check_skeleton`                            - Check that each cell has the correct number of vertices (only for homogeneous simplex or tensor meshes) - `DMPlexCheckSkeleton()`\n- `-dm_plex_check_faces`                               - Check that the faces of each cell give a vertex order this is consistent with what we expect from the cell type - `DMPlexCheckFaces()`\n- `-dm_plex_check_geometry`                            - Check that cells have positive volume - `DMPlexCheckGeometry()`\n- `-dm_plex_check_pointsf`                             - Check some necessary conditions for `PointSF` - `DMPlexCheckPointSF()`\n- `-dm_plex_check_interface_cones`                     - Check points on inter-partition interfaces have conforming order of cone points - `DMPlexCheckInterfaceCones()`\n- `-dm_plex_check_all`                                 - Perform all the checks above\n\nLevel: intermediate\n\nNote:\nFor some `DMType` such as `DMDA` this cannot be called after `DMSetUp()` has been called.\n\nSee also: \n=== \n`DM`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`,\n`DMPlexCheckSymmetry()`, `DMPlexCheckSkeleton()`, `DMPlexCheckFaces()`, `DMPlexCheckGeometry()`, `DMPlexCheckPointSF()`, `DMPlexCheckInterfaceCones()`,\n`DMSetOptionsPrefix()`, `DMType`, `DMPLEX`, `DMDA`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DM/DMSetFromOptions\"))\n\"\"\"\nfunction DMSetFromOptions(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSetFromOptions(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMViewFromOptions(petsclib::PetscLibType,dm::PetscDM, obj::PetscObject, name::String) \nView a `DM` in a particular way based on a request in the options database\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `obj`  - optional object that provides the prefix for the options database (if `NULL` then the prefix in `obj` is used)\n- `name` - option string that is used to activate viewing\n\nLevel: intermediate\n\nNote:\nSee `PetscObjectViewFromOptions()` for a list of values that can be provided in the options database to determine how the `DM` is viewed\n\nSee also: \n=== \n`DM`, `DMView()`, `PetscObjectViewFromOptions()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMViewFromOptions\"))\n\"\"\"\nfunction DMViewFromOptions(petsclib::PetscLibType, dm::PetscDM, obj::PetscObject, name::String) end\n\n@for_petsc function DMViewFromOptions(petsclib::$UnionPetscLib, dm::PetscDM, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:DMViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscObject, Ptr{Cchar}),\n               dm, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMView(petsclib::PetscLibType,dm::PetscDM, v::PetscViewer) \nViews a `DM`. Depending on the `PetscViewer` and its `PetscViewerFormat` it may print some ASCII information about the `DM` to the screen or a file or\nsave the `DM` in a binary file to be loaded later or create a visualization of the `DM`\n\nCollective\n\nInput Parameters:\n- `dm` - the `DM` object to view\n- `v`  - the viewer\n\nOptions Database Keys:\n- `-view_pyvista_warp <f>`                 - Warps the mesh by the active scalar with factor f\n- `-view_pyvista_clip <xl,xu,yl,yu,zl,zu>` - Defines the clipping box\n- `-dm_view_draw_line_color <int>`         - Specify the X-window color for cell borders\n- `-dm_view_draw_cell_color <int>`         - Specify the X-window color for cells\n- `-dm_view_draw_affine <bool>`            - Flag to ignore high-order edges\n\nLevel: beginner\n\nNotes:\n\n`PetscViewer` = `PETSCVIEWERHDF5` i.e. HDF5 format can be used with `PETSC_VIEWER_HDF5_PETSC` as the `PetscViewerFormat` to save multiple `DMPLEX`\nmeshes in a single HDF5 file. This in turn requires one to name the `DMPLEX` object with `PetscObjectSetName()`\nbefore saving it with `DMView()` and before loading it with `DMLoad()` for identification of the mesh object.\n\n`PetscViewer` = `PETSCVIEWEREXODUSII` i.e. ExodusII format assumes that element blocks (mapped to \"Cell sets\" labels)\nconsists of sequentially numbered cells.\n\nIf `dm` has been distributed, only the part of the `DM` on MPI rank 0 (including \"ghost\" cells and vertices) will be written.\n\nOnly TRI, TET, QUAD, and HEX cells are supported in ExodusII.\n\n`DMPLEX` only represents geometry while most post-processing software expect that a mesh also provides information on the discretization space. This function assumes that the file represents Lagrange finite elements of order 1 or 2.\nThe order of the mesh shall be set using `PetscViewerExodusIISetOrder()`\n\nVariable names can be set and queried using `PetscViewerExodusII[Set/Get][Nodal/Zonal]VariableNames[s]`.\n\nSee also: \n=== \n`DM`, `PetscViewer`, `PetscViewerFormat`, `PetscViewerSetFormat()`, `DMDestroy()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMLoad()`, `PetscObjectSetName()`\n\n# External Links\n$(_doc_external(\"DM/DMView\"))\n\"\"\"\nfunction DMView(petsclib::PetscLibType, dm::PetscDM, v::PetscViewer) end\n\n@for_petsc function DMView(petsclib::$UnionPetscLib, dm::PetscDM, v::PetscViewer )\n\n    @chk ccall(\n               (:DMView, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer),\n               dm, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvec::PetscVec = DMCreateGlobalVector(petsclib::PetscLibType,dm::PetscDM) \nCreates a global vector from a `DM` object. A global vector is a parallel vector that has no duplicate values shared between MPI ranks,\nthat is it has no ghost locations.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `vec` - the global vector\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `Vec`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateGlobalVector\"))\n\"\"\"\nfunction DMCreateGlobalVector(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM )\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMCreateGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tvec::PetscVec = DMCreateLocalVector(petsclib::PetscLibType,dm::PetscDM) \nCreates a local vector from a `DM` object.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `vec` - the local vector\n\nLevel: beginner\n\nNote:\nA local vector usually has ghost locations that contain values that are owned by different MPI ranks. A global vector has no ghost locations.\n\nSee also: \n=== \n`DM`, `Vec`, `DMCreateGlobalVector()`, `DMGetLocalVector()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateLocalVector\"))\n\"\"\"\nfunction DMCreateLocalVector(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateLocalVector(petsclib::$UnionPetscLib, dm::PetscDM )\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMCreateLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tDMGetLocalToGlobalMapping(petsclib::PetscLibType,dm::PetscDM, ltog::ISLocalToGlobalMapping) \nAccesses the local\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM` that provides the mapping\n\nOutput Parameter:\n- `ltog` - the mapping\n\nLevel: advanced\n\nNotes:\nThe global to local mapping allows one to set values into the global vector or matrix using `VecSetValuesLocal()` and `MatSetValuesLocal()`\n\nVectors obtained with  `DMCreateGlobalVector()` and matrices obtained with `DMCreateMatrix()` already contain the global mapping so you do\nneed to use this function with those objects.\n\nThis mapping can then be used by `VecSetLocalToGlobalMapping()` or `MatSetLocalToGlobalMapping()`.\n\nSee also: \n=== \n`DM`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`, `VecSetLocalToGlobalMapping()`, `MatSetLocalToGlobalMapping()`,\n`DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalToGlobalMapping\"))\n\"\"\"\nfunction DMGetLocalToGlobalMapping(petsclib::PetscLibType, dm::PetscDM, ltog::ISLocalToGlobalMapping) end\n\n@for_petsc function DMGetLocalToGlobalMapping(petsclib::$UnionPetscLib, dm::PetscDM, ltog::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:DMGetLocalToGlobalMapping, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{ISLocalToGlobalMapping}),\n               dm, ltog,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = DMGetBlockSize(petsclib::PetscLibType,dm::PetscDM) \nGets the inherent block size associated with a `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` with block structure\n\nOutput Parameter:\n- `bs` - the block size, 1 implies no exploitable block structure\n\nLevel: intermediate\n\nNotes:\nThis might be the number of degrees of freedom at each grid point for a structured grid.\n\nComplex `DM` that represent multiphysics or staggered grids or mixed-methods do not generally have a single inherent block size, but\nrather different locations in the vectors may have a different block size.\n\nSee also: \n=== \n`DM`, `ISCreateBlock()`, `VecSetBlockSize()`, `MatSetBlockSize()`, `DMGetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBlockSize\"))\n\"\"\"\nfunction DMGetBlockSize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetBlockSize(petsclib::$UnionPetscLib, dm::PetscDM )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\tmat::PetscMat,vec::PetscVec = DMCreateInterpolation(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM) \nGets the interpolation matrix between two `DM` objects. The resulting matrix map degrees of freedom in the vector obtained by\n`DMCreateGlobalVector()` on the coarse `DM` to similar vectors on the fine grid `DM`.\n\nCollective\n\nInput Parameters:\n- `dmc` - the `DM` object\n- `dmf` - the second, finer `DM` object\n\nOutput Parameters:\n- `mat` - the interpolation\n- `vec` - the scaling (optional, pass `NULL` if not needed), see `DMCreateInterpolationScale()`\n\nLevel: developer\n\nNotes:\nFor `DMDA` objects this only works for \"uniform refinement\", that is the refined mesh was obtained `DMRefine()` or the coarse mesh was obtained by\nDMCoarsen(). The coordinates set into the `DMDA` are completely ignored in computing the interpolation.\n\nFor `DMDA` objects you can use this interpolation (more precisely the interpolation from the `DMGetCoordinateDM()`) to interpolate the mesh coordinate\nvectors EXCEPT in the periodic case where it does not make sense since the coordinate vectors are not periodic.\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateRestriction()`, `DMCreateInterpolationScale()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateInterpolation\"))\n\"\"\"\nfunction DMCreateInterpolation(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM) end\n\n@for_petsc function DMCreateInterpolation(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM )\n\tmat_ = Ref{CMat}()\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMCreateInterpolation, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{CMat}, Ptr{CVec}),\n               dmc, dmf, mat_, vec_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn mat,vec\nend \n\n\"\"\"\n\tscale::PetscVec = DMCreateInterpolationScale(petsclib::PetscLibType,dac::PetscDM, daf::PetscDM, mat::PetscMat) \nForms L = 1/(R*1) where 1 is the vector of all ones, and R is\nthe transpose of the interpolation between the `DM`.\n\nInput Parameters:\n- `dac` - `DM` that defines a coarse mesh\n- `daf` - `DM` that defines a fine mesh\n- `mat` - the restriction (or interpolation operator) from fine to coarse\n\nOutput Parameter:\n- `scale` - the scaled vector\n\nLevel: advanced\n\nNote:\nxcoarse = diag(L)*R*xfine preserves scale and is thus suitable for state (versus residual)\nrestriction. In other words xcoarse is the coarse representation of xfine.\n\nDeveloper Note:\nIf the fine-scale `DMDA` has the -dm_bind_below option set to true, then `DMCreateInterpolationScale()` calls `MatSetBindingPropagates()`\non the restriction/interpolation operator to set the bindingpropagates flag to true.\n\nSee also: \n=== \n`DM`, `MatRestrict()`, `MatInterpolate()`, `DMCreateInterpolation()`, `DMCreateRestriction()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateInterpolationScale\"))\n\"\"\"\nfunction DMCreateInterpolationScale(petsclib::PetscLibType, dac::PetscDM, daf::PetscDM, mat::PetscMat) end\n\n@for_petsc function DMCreateInterpolationScale(petsclib::$UnionPetscLib, dac::PetscDM, daf::PetscDM, mat::PetscMat )\n\tscale_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMCreateInterpolationScale, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, CMat, Ptr{CVec}),\n               dac, daf, mat, scale_,\n              )\n\n\tscale = PetscVec(scale_[], petsclib)\n\n\treturn scale\nend \n\n\"\"\"\n\tmat::PetscMat = DMCreateRestriction(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM) \nGets restriction matrix between two `DM` objects. The resulting matrix map degrees of freedom in the vector obtained by\n`DMCreateGlobalVector()` on the fine `DM` to similar vectors on the coarse grid `DM`.\n\nCollective\n\nInput Parameters:\n- `dmc` - the `DM` object\n- `dmf` - the second, finer `DM` object\n\nOutput Parameter:\n- `mat` - the restriction\n\nLevel: developer\n\nNote:\nThis only works for `DMSTAG`. For many situations either the transpose of the operator obtained with `DMCreateInterpolation()` or that\nmatrix multiplied by the vector obtained with `DMCreateInterpolationScale()` provides the desired object.\n\nSee also: \n=== \n`DM`, `DMRestrict()`, `DMInterpolate()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateRestriction\"))\n\"\"\"\nfunction DMCreateRestriction(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM) end\n\n@for_petsc function DMCreateRestriction(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMCreateRestriction, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{CMat}),\n               dmc, dmf, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tmat::PetscMat = DMCreateInjection(petsclib::PetscLibType,dac::PetscDM, daf::PetscDM) \nGets injection matrix between two `DM` objects.\n\nCollective\n\nInput Parameters:\n- `dac` - the `DM` object\n- `daf` - the second, finer `DM` object\n\nOutput Parameter:\n- `mat` - the injection\n\nLevel: developer\n\nNotes:\nThis is an operator that applied to a vector obtained with `DMCreateGlobalVector()` on the\nfine grid maps the values to a vector on the vector on the coarse `DM` by simply selecting\nthe values on the coarse grid points. This compares to the operator obtained by\n`DMCreateRestriction()` or the transpose of the operator obtained by\n`DMCreateInterpolation()` that uses a \"local weighted average\" of the values around the\ncoarse grid point as the coarse grid value.\n\nFor `DMDA` objects this only works for \"uniform refinement\", that is the refined mesh was obtained `DMRefine()` or the coarse mesh was obtained by\n`DMCoarsen()`. The coordinates set into the `DMDA` are completely ignored in computing the injection.\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMCreateInterpolation()`,\n`DMCreateRestriction()`, `MatRestrict()`, `MatInterpolate()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateInjection\"))\n\"\"\"\nfunction DMCreateInjection(petsclib::PetscLibType, dac::PetscDM, daf::PetscDM) end\n\n@for_petsc function DMCreateInjection(petsclib::$UnionPetscLib, dac::PetscDM, daf::PetscDM )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMCreateInjection, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{CMat}),\n               dac, daf, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tmat::PetscMat = DMCreateMassMatrix(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM) \nGets the mass matrix between two `DM` objects\nCollective\n\nInput Parameters:\n- `dmc` - the target `DM` object\n- `dmf` - the source `DM` object, can be `NULL`\n\nOutput Parameter:\n- `mat` - the mass matrix\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateMassMatrixLumped()`, `DMCreateMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateRestriction()`, `DMCreateInterpolation()`, `DMCreateInjection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateMassMatrix\"))\n\"\"\"\nfunction DMCreateMassMatrix(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM) end\n\n@for_petsc function DMCreateMassMatrix(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMCreateMassMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{CMat}),\n               dmc, dmf, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tllm::PetscVec,lm::PetscVec = DMCreateMassMatrixLumped(petsclib::PetscLibType,dm::PetscDM) \nGets the lumped mass matrix for a given `DM`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameters:\n- `llm` - the local lumped mass matrix, which is a diagonal matrix, represented as a vector\n- `lm`  - the global lumped mass matrix, which is a diagonal matrix, represented as a vector\n\nLevel: developer\n\nNote:\nSee `DMCreateMassMatrix()` for how to create the non-lumped version of the mass matrix.\n\nSee also: \n=== \n`DM`, `DMCreateMassMatrix()`, `DMCreateMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateRestriction()`, `DMCreateInterpolation()`, `DMCreateInjection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateMassMatrixLumped\"))\n\"\"\"\nfunction DMCreateMassMatrixLumped(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateMassMatrixLumped(petsclib::$UnionPetscLib, dm::PetscDM )\n\tllm_ = Ref{CVec}()\n\tlm_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMCreateMassMatrixLumped, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}, Ptr{CVec}),\n               dm, llm_, lm_,\n              )\n\n\tllm = PetscVec(llm_[], petsclib)\n\tlm = PetscVec(lm_[], petsclib)\n\n\treturn llm,lm\nend \n\n\"\"\"\n\tmat::PetscMat = DMCreateGradientMatrix(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM) \nGets the gradient matrix between two `DM` objects\nCollective\n\nInput Parameters:\n- `dmc` - the target `DM` object\n- `dmf` - the source `DM` object, can be `NULL`\n\nOutput Parameter:\n- `mat` - the gradient matrix\n\nLevel: developer\n\nNotes:\nFor `DMPLEX` the finite element model for the `DM` must have been already provided.\n\nSee also: \n=== \n`DM`, `DMCreateMassMatrix()`, `DMCreateMassMatrixLumped()`, `DMCreateMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateRestriction()`, `DMCreateInterpolation()`, `DMCreateInjection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateGradientMatrix\"))\n\"\"\"\nfunction DMCreateGradientMatrix(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM) end\n\n@for_petsc function DMCreateGradientMatrix(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMCreateGradientMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{CMat}),\n               dmc, dmf, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tcoloring::ISColoring = DMCreateColoring(petsclib::PetscLibType,dm::PetscDM, ctype::ISColoringType) \nGets coloring of a graph associated with the `DM`. Often the graph represents the operator matrix associated with the discretization\nof a PDE on the `DM`.\n\nCollective\n\nInput Parameters:\n- `dm`    - the `DM` object\n- `ctype` - `IS_COLORING_LOCAL` or `IS_COLORING_GLOBAL`\n\nOutput Parameter:\n- `coloring` - the coloring\n\nLevel: developer\n\nNotes:\nColoring of matrices can also be computed directly from the sparse matrix nonzero structure via the `MatColoring` object or from the mesh from which the\nmatrix comes from (what this function provides). In general using the mesh produces a more optimal coloring (fewer colors).\n\nThis produces a coloring with the distance of 2, see `MatSetColoringDistance()` which can be used for efficiently computing Jacobians with `MatFDColoringCreate()`\nFor `DMDA` in three dimensions with periodic boundary conditions the number of grid points in each dimension must be divisible by 2*stencil_width + 1,\notherwise an error will be generated.\n\nSee also: \n=== \n`DM`, `ISColoring`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatType()`, `MatColoring`, `MatFDColoringCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateColoring\"))\n\"\"\"\nfunction DMCreateColoring(petsclib::PetscLibType, dm::PetscDM, ctype::ISColoringType) end\n\n@for_petsc function DMCreateColoring(petsclib::$UnionPetscLib, dm::PetscDM, ctype::ISColoringType )\n\tcoloring_ = Ref{ISColoring}()\n\n    @chk ccall(\n               (:DMCreateColoring, $petsc_library),\n               PetscErrorCode,\n               (CDM, ISColoringType, Ptr{ISColoring}),\n               dm, ctype, coloring_,\n              )\n\n\tcoloring = coloring_[]\n\n\treturn coloring\nend \n\n\"\"\"\n\tmat::PetscMat = DMCreateMatrix(petsclib::PetscLibType,dm::PetscDM) \nGets an empty matrix for a `DM` that is most commonly used to store the Jacobian of a discrete PDE operator.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `mat` - the empty Jacobian\n\nOptions Database Key:\n- `-dm_preallocate_only` - Only preallocate the matrix for `DMCreateMatrix()` and `DMCreateMassMatrix()`, but do not fill it with zeros\n\nLevel: beginner\n\nNotes:\nThis properly preallocates the number of nonzeros in the sparse matrix so you\ndo not need to do it yourself.\n\nBy default it also sets the nonzero structure and puts in the zero entries. To prevent setting\nthe nonzero pattern call `DMSetMatrixPreallocateOnly()`\n\nFor `DMDA`, when you call `MatView()` on this matrix it is displayed using the global natural ordering, NOT in the ordering used\ninternally by PETSc.\n\nFor `DMDA`, in general it is easiest to use `MatSetValuesStencil()` or `MatSetValuesLocal()` to put values into the matrix because\n`MatSetValues()` requires the indices for the global numbering for the `DMDA` which is complic`ated to compute\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMSetMatType()`, `DMCreateMassMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateMatrix\"))\n\"\"\"\nfunction DMCreateMatrix(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateMatrix(petsclib::$UnionPetscLib, dm::PetscDM )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMCreateMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CMat}),\n               dm, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tDMSetMatrixPreallocateSkip(petsclib::PetscLibType,dm::PetscDM, skip::PetscBool) \nWhen `DMCreateMatrix()` is called the matrix sizes and\n`ISLocalToGlobalMapping` will be properly set, but the data structures to store values in the\nmatrices will not be preallocated.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DM`\n- `skip` - `PETSC_TRUE` to skip preallocation\n\nLevel: developer\n\nNote:\nThis is most useful to reduce initialization costs when `MatSetPreallocationCOO()` and\n`MatSetValuesCOO()` will be used.\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `DMSetMatrixStructureOnly()`, `DMSetMatrixPreallocateOnly()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatrixPreallocateSkip\"))\n\"\"\"\nfunction DMSetMatrixPreallocateSkip(petsclib::PetscLibType, dm::PetscDM, skip::PetscBool) end\n\n@for_petsc function DMSetMatrixPreallocateSkip(petsclib::$UnionPetscLib, dm::PetscDM, skip::PetscBool )\n\n    @chk ccall(\n               (:DMSetMatrixPreallocateSkip, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, skip,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetMatrixPreallocateOnly(petsclib::PetscLibType,dm::PetscDM, only::PetscBool) \nWhen `DMCreateMatrix()` is called the matrix will be properly\npreallocated but the nonzero structure and zero values will not be set.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DM`\n- `only` - `PETSC_TRUE` if only want preallocation\n\nOptions Database Key:\n- `-dm_preallocate_only` - Only preallocate the matrix for `DMCreateMatrix()`, `DMCreateMassMatrix()`, but do not fill it with zeros\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixStructureOnly()`, `DMSetMatrixPreallocateSkip()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatrixPreallocateOnly\"))\n\"\"\"\nfunction DMSetMatrixPreallocateOnly(petsclib::PetscLibType, dm::PetscDM, only::PetscBool) end\n\n@for_petsc function DMSetMatrixPreallocateOnly(petsclib::$UnionPetscLib, dm::PetscDM, only::PetscBool )\n\n    @chk ccall(\n               (:DMSetMatrixPreallocateOnly, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, only,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetMatrixStructureOnly(petsclib::PetscLibType,dm::PetscDM, only::PetscBool) \nWhen `DMCreateMatrix()` is called, the matrix nonzero structure will be created\nbut the array for numerical values will not be allocated.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DM`\n- `only` - `PETSC_TRUE` if you only want matrix nonzero structure\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `DMSetMatrixPreallocateOnly()`, `DMSetMatrixPreallocateSkip()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatrixStructureOnly\"))\n\"\"\"\nfunction DMSetMatrixStructureOnly(petsclib::PetscLibType, dm::PetscDM, only::PetscBool) end\n\n@for_petsc function DMSetMatrixStructureOnly(petsclib::$UnionPetscLib, dm::PetscDM, only::PetscBool )\n\n    @chk ccall(\n               (:DMSetMatrixStructureOnly, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, only,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetBlockingType(petsclib::PetscLibType,dm::PetscDM, btype::DMBlockingType) \nset the blocking granularity to be used for variable block size `DMCreateMatrix()` is called\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DM`\n- `btype` - block by topological point or field node\n\nOptions Database Key:\n- `-dm_blocking_type [topological_point, field_node]` - use topological point blocking or field node blocking\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"DM/DMSetBlockingType\"))\n\"\"\"\nfunction DMSetBlockingType(petsclib::PetscLibType, dm::PetscDM, btype::DMBlockingType) end\n\n@for_petsc function DMSetBlockingType(petsclib::$UnionPetscLib, dm::PetscDM, btype::DMBlockingType )\n\n    @chk ccall(\n               (:DMSetBlockingType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMBlockingType),\n               dm, btype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbtype::DMBlockingType = DMGetBlockingType(petsclib::PetscLibType,dm::PetscDM) \nget the blocking granularity to be used for variable block size `DMCreateMatrix()` is called\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `btype` - block by topological point or field node\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBlockingType\"))\n\"\"\"\nfunction DMGetBlockingType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetBlockingType(petsclib::$UnionPetscLib, dm::PetscDM )\n\tbtype_ = Ref{DMBlockingType}()\n\n    @chk ccall(\n               (:DMGetBlockingType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMBlockingType}),\n               dm, btype_,\n              )\n\n\t#btype = unsafe_string(btype_[])\n    btype = btype_[]\n    \n\n\treturn btype\nend \n\n\"\"\"\n\tDMSetNullSpaceConstructor(petsclib::PetscLibType,dm::PetscDM, field::PetscInt, nullsp::external) \nProvide a callback function which constructs the nullspace for a given field, defined with `DMAddField()`, when function spaces\nare joined or split, such as in `DMCreateSubDM()`\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `dm`     - The `DM`\n- `field`  - The field number for the nullspace\n- `nullsp` - A callback to create the nullspace\n\nCalling sequence of `nullsp`:\n- `dm`        - The present `DM`\n- `origField` - The field number given above, in the original `DM`\n- `field`     - The field number in dm\n- `nullSpace` - The nullspace for the given field\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMGetNullSpaceConstructor()`, `DMSetNearNullSpaceConstructor()`, `DMGetNearNullSpaceConstructor()`, `DMCreateSubDM()`, `DMCreateSuperDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetNullSpaceConstructor\"))\n\"\"\"\nfunction DMSetNullSpaceConstructor(petsclib::PetscLibType, dm::PetscDM, field::PetscInt, nullsp::external) end\n\n@for_petsc function DMSetNullSpaceConstructor(petsclib::$UnionPetscLib, dm::PetscDM, field::$PetscInt, nullsp::external )\n\n    @chk ccall(\n               (:DMSetNullSpaceConstructor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, external),\n               dm, field, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetNearNullSpaceConstructor(petsclib::PetscLibType,dm::PetscDM, field::PetscInt, nullsp::external) \nProvide a callback function which constructs the near\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `dm`     - The `DM`\n- `field`  - The field number for the nullspace\n- `nullsp` - A callback to create the near-nullspace\n\nCalling sequence of `nullsp`:\n- `dm`        - The present `DM`\n- `origField` - The field number given above, in the original `DM`\n- `field`     - The field number in dm\n- `nullSpace` - The nullspace for the given field\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMGetNearNullSpaceConstructor()`, `DMSetNullSpaceConstructor()`, `DMGetNullSpaceConstructor()`, `DMCreateSubDM()`, `DMCreateSuperDM()`,\n`MatNullSpace`\n\n# External Links\n$(_doc_external(\"DM/DMSetNearNullSpaceConstructor\"))\n\"\"\"\nfunction DMSetNearNullSpaceConstructor(petsclib::PetscLibType, dm::PetscDM, field::PetscInt, nullsp::external) end\n\n@for_petsc function DMSetNearNullSpaceConstructor(petsclib::$UnionPetscLib, dm::PetscDM, field::$PetscInt, nullsp::external )\n\n    @chk ccall(\n               (:DMSetNearNullSpaceConstructor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, external),\n               dm, field, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumFields::PetscInt,fieldNames::Cchar,fields::Vector{IS} = DMCreateFieldIS(petsclib::PetscLibType,dm::PetscDM) \nCreates a set of `IS` objects with the global indices of dofs for each field defined with `DMAddField()`\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameters:\n- `numFields`  - The number of fields (or `NULL` if not requested)\n- `fieldNames` - The name of each field (or `NULL` if not requested)\n- `fields`     - The global indices for each field (or `NULL` if not requested)\n\nLevel: intermediate\n\nNote:\nThe user is responsible for freeing all requested arrays. In particular, every entry of `fieldNames` should be freed with\n`PetscFree()`, every entry of `fields` should be destroyed with `ISDestroy()`, and both arrays should be freed with\n`PetscFree()`.\n\nDeveloper Note:\nIt is not clear why both this function and `DMCreateFieldDecomposition()` exist. Having two seems redundant and confusing. This function should\nlikely be removed.\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMGetField()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`,\n`DMCreateFieldDecomposition()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateFieldIS\"))\n\"\"\"\nfunction DMCreateFieldIS(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateFieldIS(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumFields_ = Ref{$PetscInt}()\n\tfieldNames_ = Ref{Cchar}()\n\tfields_ = Ref{Ptr{CIS}}()\n\n    @chk ccall(\n               (:DMCreateFieldIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Cchar, Ptr{Ptr{CIS}}),\n               dm, numFields_, fieldNames_, fields_,\n              )\n\n\tnumFields = numFields_[]\n\tfieldNames = fieldNames_[]\n\tfields = unsafe_wrap(Array, fields_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numFields,fieldNames,fields\nend \n\n\"\"\"\n\tlen::PetscInt,namelist::Cchar,islist::Vector{IS},dmlist::Vector{PetscDM} = DMCreateFieldDecomposition(petsclib::PetscLibType,dm::PetscDM) \nReturns a list of `IS` objects defining a decomposition of a problem into subproblems\ncorresponding to different fields.\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameters:\n- `len`      - The number of fields (or `NULL` if not requested)\n- `namelist` - The name for each field (or `NULL` if not requested)\n- `islist`   - The global indices for each field (or `NULL` if not requested)\n- `dmlist`   - The `DM`s for each field subproblem (or `NULL`, if not requested; if `NULL` is returned, no `DM`s are defined)\n\nLevel: intermediate\n\nNotes:\nEach `IS` contains the global indices of the dofs of the corresponding field, defined by\n`DMAddField()`. The optional list of `DM`s define the `DM` for each subproblem.\n\nThe same as `DMCreateFieldIS()` but also returns a `DM` for each field.\n\nThe user is responsible for freeing all requested arrays. In particular, every entry of `namelist` should be freed with\n`PetscFree()`, every entry of `islist` should be destroyed with `ISDestroy()`, every entry of `dmlist` should be destroyed with `DMDestroy()`,\nand all of the arrays should be freed with `PetscFree()`.\n\nFortran Notes:\nUse the declarations\n-vb\ncharacter(80), pointer :: namelist(:)\nIS, pointer :: islist(:)\nDM, pointer :: dmlist(:)\n-ve\n\n`namelist` must be provided, `islist` may be `PETSC_NULL_IS_POINTER` and `dmlist` may be `PETSC_NULL_DM_POINTER`\n\nUse `DMDestroyFieldDecomposition()` to free the returned objects\n\nDeveloper Notes:\nIt is not clear why this function and `DMCreateFieldIS()` exist. Having two seems redundant and confusing.\n\nUnlike  `DMRefine()`, `DMCoarsen()`, and `DMCreateDomainDecomposition()` this provides no mechanism to provide hooks that are called after the\ndecomposition is computed.\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMCreateFieldIS()`, `DMCreateSubDM()`, `DMCreateDomainDecomposition()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMRefine()`, `DMCoarsen()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateFieldDecomposition\"))\n\"\"\"\nfunction DMCreateFieldDecomposition(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateFieldDecomposition(petsclib::$UnionPetscLib, dm::PetscDM )\n\tlen_ = Ref{$PetscInt}()\n\tnamelist_ = Ref{Cchar}()\n\tislist_ = Ref{Ptr{CIS}}()\n\tdmlist_ = Ref{Ptr{PetscDM}}()\n\n    @chk ccall(\n               (:DMCreateFieldDecomposition, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Cchar, Ptr{Ptr{CIS}}, Ptr{Ptr{CDM}}),\n               dm, len_, namelist_, islist_, dmlist_,\n              )\n\n\tlen = len_[]\n\tnamelist = namelist_[]\n\tislist = unsafe_wrap(Array, islist_[], VecGetLocalSize(petsclib, x); own = false)\n\tdmlist = unsafe_wrap(Array, dmlist_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn len,namelist,islist,dmlist\nend \n\n\"\"\"\n\tis::IS,subdm::PetscDM = DMCreateSubDM(petsclib::PetscLibType,dm::PetscDM, numFields::PetscInt, fields::Vector{PetscInt}) \nReturns an `IS` and `DM` encapsulating a subproblem defined by the fields passed in.\nThe fields are defined by `DMCreateFieldIS()`.\n\nNot collective\n\nInput Parameters:\n- `dm`        - The `DM` object\n- `numFields` - The number of fields to select\n- `fields`    - The field numbers of the selected fields\n\nOutput Parameters:\n- `is`    - The global indices for all the degrees of freedom in the new sub `DM`, use `NULL` if not needed\n- `subdm` - The `DM` for the subproblem, use `NULL` if not needed\n\nLevel: intermediate\n\nNote:\nYou need to call `DMPlexSetMigrationSF()` on the original `DM` if you want the Global-To-Natural map to be automatically constructed\n\nSee also: \n=== \n`DM`, `DMCreateFieldIS()`, `DMCreateFieldDecomposition()`, `DMAddField()`, `DMCreateSuperDM()`, `IS`, `VecISCopy()`, `DMPlexSetMigrationSF()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSubDM\"))\n\"\"\"\nfunction DMCreateSubDM(petsclib::PetscLibType, dm::PetscDM, numFields::PetscInt, fields::Vector{PetscInt}) end\n\n@for_petsc function DMCreateSubDM(petsclib::$UnionPetscLib, dm::PetscDM, numFields::$PetscInt, fields::Vector{$PetscInt} )\n\tis_ = Ref{IS}()\n\tsubdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMCreateSubDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{CIS}, Ptr{CDM}),\n               dm, numFields, fields, is_, subdm_,\n              )\n\n\tis = is_[]\n\tsubdm = PetscDM(subdm_[], petsclib)\n\n\treturn is,subdm\nend \n\n\"\"\"\n\tis::Vector{IS},superdm::PetscDM = DMCreateSuperDM(petsclib::PetscLibType,dms::Vector{PetscDM}, n::PetscInt) \nReturns an arrays of `IS` and a single `DM` encapsulating a superproblem defined by multiple `DM`s passed in.\n\nNot collective\n\nInput Parameters:\n- `dms` - The `DM` objects\n- `n`   - The number of `DM`s\n\nOutput Parameters:\n- `is`      - The global indices for each of subproblem within the super `DM`, or `NULL`, its length is `n`\n- `superdm` - The `DM` for the superproblem\n\nLevel: intermediate\n\nNote:\nYou need to call `DMPlexSetMigrationSF()` on the original `DM` if you want the Global-To-Natural map to be automatically constructed\n\nSee also: \n=== \n`DM`, `DMCreateSubDM()`, `DMPlexSetMigrationSF()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMCreateFieldIS()`, `DMCreateDomainDecomposition()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSuperDM\"))\n\"\"\"\nfunction DMCreateSuperDM(petsclib::PetscLibType, dms::Vector{PetscDM}, n::PetscInt) end\n\n@for_petsc function DMCreateSuperDM(petsclib::$UnionPetscLib, dms::Vector{PetscDM}, n::$PetscInt )\n\tis_ = Ref{Ptr{CIS}}()\n\tsuperdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMCreateSuperDM, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CDM}, $PetscInt, Ptr{Ptr{CIS}}, Ptr{CDM}),\n               dms, n, is_, superdm_,\n              )\n\n\tis = unsafe_wrap(Array, is_[], VecGetLocalSize(petsclib, x); own = false)\n\tsuperdm = PetscDM(superdm_[], petsclib)\n\n\treturn is,superdm\nend \n\n\"\"\"\n\tn::PetscInt,namelist::Cchar,innerislist::Vector{IS},outerislist::Vector{IS},dmlist::Vector{PetscDM} = DMCreateDomainDecomposition(petsclib::PetscLibType,dm::PetscDM) \nReturns lists of `IS` objects defining a decomposition of a\nproblem into subproblems corresponding to restrictions to pairs of nested subdomains.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameters:\n- `n`           - The number of subproblems in the domain decomposition (or `NULL` if not requested), also the length of the four arrays below\n- `namelist`    - The name for each subdomain (or `NULL` if not requested)\n- `innerislist` - The global indices for each inner subdomain (or `NULL`, if not requested)\n- `outerislist` - The global indices for each outer subdomain (or `NULL`, if not requested)\n- `dmlist`      - The `DM`s for each subdomain subproblem (or `NULL`, if not requested; if `NULL` is returned, no `DM`s are defined)\n\nLevel: intermediate\n\nNotes:\nEach `IS` contains the global indices of the dofs of the corresponding subdomains with in the\ndofs of the original `DM`. The inner subdomains conceptually define a nonoverlapping\ncovering, while outer subdomains can overlap.\n\nThe optional list of `DM`s define a `DM` for each subproblem.\n\nThe user is responsible for freeing all requested arrays. In particular, every entry of `namelist` should be freed with\n`PetscFree()`, every entry of `innerislist` and `outerislist` should be destroyed with `ISDestroy()`, every entry of `dmlist` should be destroyed with `DMDestroy()`,\nand all of the arrays should be freed with `PetscFree()`.\n\nDeveloper Notes:\nThe `dmlist` is for the inner subdomains or the outer subdomains or all subdomains?\n\nThe names are inconsistent, the hooks use `DMSubDomainHook` which is nothing like `DMCreateDomainDecomposition()` while `DMRefineHook` is used for `DMRefine()`.\n\nSee also: \n=== \n`DM`, `DMCreateFieldDecomposition()`, `DMDestroy()`, `DMCreateDomainDecompositionScatters()`, `DMView()`, `DMCreateInterpolation()`,\n`DMSubDomainHookAdd()`, `DMSubDomainHookRemove()`,`DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMRefine()`, `DMCoarsen()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateDomainDecomposition\"))\n\"\"\"\nfunction DMCreateDomainDecomposition(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateDomainDecomposition(petsclib::$UnionPetscLib, dm::PetscDM )\n\tn_ = Ref{$PetscInt}()\n\tnamelist_ = Ref{Cchar}()\n\tinnerislist_ = Ref{Ptr{CIS}}()\n\touterislist_ = Ref{Ptr{CIS}}()\n\tdmlist_ = Ref{Ptr{PetscDM}}()\n\n    @chk ccall(\n               (:DMCreateDomainDecomposition, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Cchar, Ptr{Ptr{CIS}}, Ptr{Ptr{CIS}}, Ptr{Ptr{CDM}}),\n               dm, n_, namelist_, innerislist_, outerislist_, dmlist_,\n              )\n\n\tn = n_[]\n\tnamelist = namelist_[]\n\tinnerislist = unsafe_wrap(Array, innerislist_[], VecGetLocalSize(petsclib, x); own = false)\n\touterislist = unsafe_wrap(Array, outerislist_[], VecGetLocalSize(petsclib, x); own = false)\n\tdmlist = unsafe_wrap(Array, dmlist_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,namelist,innerislist,outerislist,dmlist\nend \n\n\"\"\"\n\tiscat::Vector{VecScatter},oscat::Vector{VecScatter},gscat::Vector{VecScatter} = DMCreateDomainDecompositionScatters(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, subdms::PetscDM) \nReturns scatters to the subdomain vectors from the global vector for subdomains created with\n`DMCreateDomainDecomposition()`\n\nNot Collective\n\nInput Parameters:\n- `dm`     - the `DM` object\n- `n`      - the number of subdomains\n- `subdms` - the local subdomains\n\nOutput Parameters:\n- `iscat` - scatter from global vector to nonoverlapping global vector entries on subdomain\n- `oscat` - scatter from global vector to overlapping global vector entries on subdomain\n- `gscat` - scatter from global vector to local vector on subdomain (fills in ghosts)\n\nLevel: developer\n\nNote:\nThis is an alternative to the iis and ois arguments in `DMCreateDomainDecomposition()` that allow for the solution\nof general nonlinear problems with overlapping subdomain methods.  While merely having index sets that enable subsets\nof the residual equations to be created is fine for linear problems, nonlinear problems require local assembly of\nsolution and residual data.\n\nDeveloper Note:\nCan the subdms input be anything or are they exactly the `DM` obtained from\n`DMCreateDomainDecomposition()`?\n\nSee also: \n=== \n`DM`, `DMCreateDomainDecomposition()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMCreateFieldIS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateDomainDecompositionScatters\"))\n\"\"\"\nfunction DMCreateDomainDecompositionScatters(petsclib::PetscLibType, dm::PetscDM, n::PetscInt, subdms::PetscDM) end\n\n@for_petsc function DMCreateDomainDecompositionScatters(petsclib::$UnionPetscLib, dm::PetscDM, n::$PetscInt, subdms::PetscDM )\n\tsubdms_ = Ref(subdms.ptr)\n\tiscat_ = Ref{Ptr{VecScatter}}()\n\toscat_ = Ref{Ptr{VecScatter}}()\n\tgscat_ = Ref{Ptr{VecScatter}}()\n\n    @chk ccall(\n               (:DMCreateDomainDecompositionScatters, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CDM}, Ptr{Ptr{VecScatter}}, Ptr{Ptr{VecScatter}}, Ptr{Ptr{VecScatter}}),\n               dm, n, subdms_, iscat_, oscat_, gscat_,\n              )\n\n\tsubdms.ptr = subdms_[]\n\tiscat = unsafe_wrap(Array, iscat_[], VecGetLocalSize(petsclib, x); own = false)\n\toscat = unsafe_wrap(Array, oscat_[], VecGetLocalSize(petsclib, x); own = false)\n\tgscat = unsafe_wrap(Array, gscat_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn iscat,oscat,gscat\nend \n\n\"\"\"\n\tDMRefine(petsclib::PetscLibType,dm::PetscDM, comm::MPI_Comm, dmf::PetscDM) \nRefines a `DM` object using a standard nonadaptive refinement of the underlying mesh\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `comm` - the communicator to contain the new `DM` object (or `MPI_COMM_NULL`)\n\nOutput Parameter:\n- `dmf` - the refined `DM`, or `NULL`\n\nOptions Database Key:\n- `-dm_plex_cell_refiner <strategy>` - chooses the refinement strategy, e.g. regular, tohex\n\nLevel: developer\n\nNote:\nIf no refinement was done, the return value is `NULL`\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateDomainDecomposition()`,\n`DMRefineHookAdd()`, `DMRefineHookRemove()`\n\n# External Links\n$(_doc_external(\"DM/DMRefine\"))\n\"\"\"\nfunction DMRefine(petsclib::PetscLibType, dm::PetscDM, comm::MPI_Comm, dmf::PetscDM) end\n\n@for_petsc function DMRefine(petsclib::$UnionPetscLib, dm::PetscDM, comm::MPI_Comm, dmf::PetscDM )\n\tdmf_ = Ref(dmf.ptr)\n\n    @chk ccall(\n               (:DMRefine, $petsc_library),\n               PetscErrorCode,\n               (CDM, MPI_Comm, Ptr{CDM}),\n               dm, comm, dmf_,\n              )\n\n\tdmf.ptr = dmf_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRefineHookAdd(petsclib::PetscLibType,coarse::PetscDM, refinehook::external, interphook::external, ctx::Cvoid) \nadds a callback to be run when interpolating a nonlinear problem to a finer grid\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `coarse`     - `DM` on which to run a hook when interpolating to a finer level\n- `refinehook` - function to run when setting up the finer level\n- `interphook` - function to run to update data on finer levels (once per `SNESSolve()`)\n- `ctx`        - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nCalling sequence of `refinehook`:\n- `coarse` - coarse level `DM`\n- `fine`   - fine level `DM` to interpolate problem to\n- `ctx`    - optional user-defined function context\n\nCalling sequence of `interphook`:\n- `coarse` - coarse level `DM`\n- `interp` - matrix interpolating a coarse-level solution to the finer grid\n- `fine`   - fine level `DM` to update\n- `ctx`    - optional user-defined function context\n\nLevel: advanced\n\nNotes:\nThis function is only needed if auxiliary data that is attached to the `DM`s via, for example, `PetscObjectCompose()`, needs to be\npassed to fine grids while grid sequencing.\n\nThe actual interpolation is done when `DMInterpolate()` is called.\n\nIf this function is called multiple times, the hooks will be run in the order they are added.\n\nSee also: \n=== \n`DM`, `DMCoarsenHookAdd()`, `DMInterpolate()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMRefineHookAdd\"))\n\"\"\"\nfunction DMRefineHookAdd(petsclib::PetscLibType, coarse::PetscDM, refinehook::external, interphook::external, ctx::Cvoid) end\n\n@for_petsc function DMRefineHookAdd(petsclib::$UnionPetscLib, coarse::PetscDM, refinehook::external, interphook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMRefineHookAdd, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               coarse, refinehook, interphook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRefineHookRemove(petsclib::PetscLibType,coarse::PetscDM, refinehook::external, interphook::external, ctx::Cvoid) \nremove a callback from the list of hooks, that have been set with `DMRefineHookAdd()`, to be run when interpolating\na nonlinear problem to a finer grid\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `coarse`     - the `DM` on which to run a hook when restricting to a coarser level\n- `refinehook` - function to run when setting up a finer level\n- `interphook` - function to run to update data on finer levels\n- `ctx`        - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nLevel: advanced\n\nNote:\nThis function does nothing if the hook is not in the list.\n\nSee also: \n=== \n`DM`, `DMRefineHookAdd()`, `DMCoarsenHookRemove()`, `DMInterpolate()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMRefineHookRemove\"))\n\"\"\"\nfunction DMRefineHookRemove(petsclib::PetscLibType, coarse::PetscDM, refinehook::external, interphook::external, ctx::Cvoid) end\n\n@for_petsc function DMRefineHookRemove(petsclib::$UnionPetscLib, coarse::PetscDM, refinehook::external, interphook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMRefineHookRemove, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               coarse, refinehook, interphook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolate(petsclib::PetscLibType,coarse::PetscDM, interp::PetscMat, fine::PetscDM) \ninterpolates user\n\nCollective if any hooks are\n\nInput Parameters:\n- `coarse` - coarser `DM` to use as a base\n- `interp` - interpolation matrix, apply using `MatInterpolate()`\n- `fine`   - finer `DM` to update\n\nLevel: developer\n\nDeveloper Note:\nThis routine is called `DMInterpolate()` while the hook is called `DMRefineHookAdd()`. It would be better to have an\nan API with consistent terminology.\n\nSee also: \n=== \n`DM`, `DMRefineHookAdd()`, `MatInterpolate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolate\"))\n\"\"\"\nfunction DMInterpolate(petsclib::PetscLibType, coarse::PetscDM, interp::PetscMat, fine::PetscDM) end\n\n@for_petsc function DMInterpolate(petsclib::$UnionPetscLib, coarse::PetscDM, interp::PetscMat, fine::PetscDM )\n\n    @chk ccall(\n               (:DMInterpolate, $petsc_library),\n               PetscErrorCode,\n               (CDM, CMat, CDM),\n               coarse, interp, fine,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInterpolateSolution(petsclib::PetscLibType,coarse::PetscDM, fine::PetscDM, interp::PetscMat, coarseSol::PetscVec, fineSol::PetscVec) \nInterpolates a solution from a coarse mesh to a fine mesh.\n\nCollective\n\nInput Parameters:\n- `coarse`    - coarse `DM`\n- `fine`      - fine `DM`\n- `interp`    - (optional) the matrix computed by `DMCreateInterpolation()`.  Implementations may not need this, but if it\nis available it can avoid some recomputation.  If it is provided, `MatInterpolate()` will be used if\nthe coarse `DM` does not have a specialized implementation.\n- `coarseSol` - solution on the coarse mesh\n\nOutput Parameter:\n- `fineSol` - the interpolation of coarseSol to the fine mesh\n\nLevel: developer\n\nNote:\nThis function exists because the interpolation of a solution vector between meshes is not always a linear\nmap.  For example, if a boundary value problem has an inhomogeneous Dirichlet boundary condition that is compressed\nout of the solution vector.  Or if interpolation is inherently a nonlinear operation, such as a method using\nslope-limiting reconstruction.\n\nDeveloper Note:\nThis doesn't just interpolate \"solutions\" so its API name is questionable.\n\nSee also: \n=== \n`DM`, `DMInterpolate()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolateSolution\"))\n\"\"\"\nfunction DMInterpolateSolution(petsclib::PetscLibType, coarse::PetscDM, fine::PetscDM, interp::PetscMat, coarseSol::PetscVec, fineSol::PetscVec) end\n\n@for_petsc function DMInterpolateSolution(petsclib::$UnionPetscLib, coarse::PetscDM, fine::PetscDM, interp::PetscMat, coarseSol::PetscVec, fineSol::PetscVec )\n\n    @chk ccall(\n               (:DMInterpolateSolution, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, CMat, CVec, CVec),\n               coarse, fine, interp, coarseSol, fineSol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlevel::PetscInt = DMGetRefineLevel(petsclib::PetscLibType,dm::PetscDM) \nGets the number of refinements that have generated this `DM` from some initial `DM`.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `level` - number of refinements\n\nLevel: developer\n\nNote:\nThis can be used, by example, to set the number of coarser levels associated with this `DM` for a multigrid solver.\n\nSee also: \n=== \n`DM`, `DMRefine()`, `DMCoarsen()`, `DMGetCoarsenLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMGetRefineLevel\"))\n\"\"\"\nfunction DMGetRefineLevel(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetRefineLevel(petsclib::$UnionPetscLib, dm::PetscDM )\n\tlevel_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetRefineLevel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, level_,\n              )\n\n\tlevel = level_[]\n\n\treturn level\nend \n\n\"\"\"\n\tDMSetRefineLevel(petsclib::PetscLibType,dm::PetscDM, level::PetscInt) \nSets the number of refinements that have generated this `DM`.\n\nNot Collective\n\nInput Parameters:\n- `dm`    - the `DM` object\n- `level` - number of refinements\n\nLevel: advanced\n\nNotes:\nThis value is used by `PCMG` to determine how many multigrid levels to use\n\nThe values are usually set automatically by the process that is causing the refinements of an initial `DM` by calling this routine.\n\nSee also: \n=== \n`DM`, `DMGetRefineLevel()`, `DMCoarsen()`, `DMGetCoarsenLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMSetRefineLevel\"))\n\"\"\"\nfunction DMSetRefineLevel(petsclib::PetscLibType, dm::PetscDM, level::PetscInt) end\n\n@for_petsc function DMSetRefineLevel(petsclib::$UnionPetscLib, dm::PetscDM, level::$PetscInt )\n\n    @chk ccall(\n               (:DMSetRefineLevel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, level,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMExtrude(petsclib::PetscLibType,dm::PetscDM, layers::PetscInt, dme::PetscDM) \nExtrude a `DM` object from a surface\n\nCollective\n\nInput Parameters:\n- `dm`     - the `DM` object\n- `layers` - the number of extruded cell layers\n\nOutput Parameter:\n- `dme` - the extruded `DM`, or `NULL`\n\nLevel: developer\n\nNote:\nIf no extrusion was done, the return value is `NULL`\n\nSee also: \n=== \n`DM`, `DMRefine()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMExtrude\"))\n\"\"\"\nfunction DMExtrude(petsclib::PetscLibType, dm::PetscDM, layers::PetscInt, dme::PetscDM) end\n\n@for_petsc function DMExtrude(petsclib::$UnionPetscLib, dm::PetscDM, layers::$PetscInt, dme::PetscDM )\n\tdme_ = Ref(dme.ptr)\n\n    @chk ccall(\n               (:DMExtrude, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CDM}),\n               dm, layers, dme_,\n              )\n\n\tdme.ptr = dme_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = DMHasBasisTransform(petsclib::PetscLibType,dm::PetscDM) \nWhether the `DM` employs a basis transformation from functions in global vectors to functions in local vectors\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if a basis transformation should be done\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMPlexGlobalToLocalBasis()`, `DMPlexLocalToGlobalBasis()`, `DMPlexCreateBasisRotation()`\n\n# External Links\n$(_doc_external(\"DM/DMHasBasisTransform\"))\n\"\"\"\nfunction DMHasBasisTransform(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMHasBasisTransform(petsclib::$UnionPetscLib, dm::PetscDM )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasBasisTransform, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tDMCopyTransform(petsclib::PetscLibType,dm::PetscDM, newdm::PetscDM) \n\n# External Links\n$(_doc_external(\"DM/DMCopyTransform\"))\n\"\"\"\nfunction DMCopyTransform(petsclib::PetscLibType, dm::PetscDM, newdm::PetscDM) end\n\n@for_petsc function DMCopyTransform(petsclib::$UnionPetscLib, dm::PetscDM, newdm::PetscDM )\n\n    @chk ccall(\n               (:DMCopyTransform, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, newdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGlobalToLocalHookAdd(petsclib::PetscLibType,dm::PetscDM, beginhook::external, endhook::external, ctx::Cvoid) \nadds a callback to be run when `DMGlobalToLocal()` is called\n\nLogically Collective\n\nInput Parameters:\n- `dm`        - the `DM`\n- `beginhook` - function to run at the beginning of `DMGlobalToLocalBegin()`\n- `endhook`   - function to run after `DMGlobalToLocalEnd()` has completed\n- `ctx`       - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nCalling sequence of `beginhook`:\n- `dm`   - global `DM`\n- `g`    - global vector\n- `mode` - mode\n- `l`    - local vector\n- `ctx`  - optional user-defined function context\n\nCalling sequence of `endhook`:\n- `dm`   - global `DM`\n- `g`    - global vector\n- `mode` - mode\n- `l`    - local vector\n- `ctx`  - optional user-defined function context\n\nLevel: advanced\n\nNote:\nThe hook may be used to provide, for example, values that represent boundary conditions in the local vectors that do not exist on the global vector.\n\nSee also: \n=== \n`DM`, `DMGlobalToLocal()`, `DMRefineHookAdd()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalHookAdd\"))\n\"\"\"\nfunction DMGlobalToLocalHookAdd(petsclib::PetscLibType, dm::PetscDM, beginhook::external, endhook::external, ctx::Cvoid) end\n\n@for_petsc function DMGlobalToLocalHookAdd(petsclib::$UnionPetscLib, dm::PetscDM, beginhook::external, endhook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMGlobalToLocalHookAdd, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               dm, beginhook, endhook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGlobalToLocal(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nupdate local vectors from global vector\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `g`    - the global vector\n- `mode` - `INSERT_VALUES` or `ADD_VALUES`\n- `l`    - the local vector\n\nLevel: beginner\n\nNotes:\nThe communication involved in this update can be overlapped with computation by instead using\n`DMGlobalToLocalBegin()` and `DMGlobalToLocalEnd()`.\n\n`DMGlobalToLocalHookAdd()` may be used to provide additional operations that are performed during the update process.\n\nSee also: \n=== \n`DM`, `DMGlobalToLocalHookAdd()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobal()`, `DMLocalToGlobalEnd()`,\n`DMGlobalToLocalBegin()` `DMGlobalToLocalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocal\"))\n\"\"\"\nfunction DMGlobalToLocal(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMGlobalToLocal(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMGlobalToLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGlobalToLocalBegin(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nBegins updating local vectors from global vector\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `g`    - the global vector\n- `mode` - `INSERT_VALUES` or `ADD_VALUES`\n- `l`    - the local vector\n\nLevel: intermediate\n\nNotes:\nThe operation is completed with `DMGlobalToLocalEnd()`\n\nOne can perform local computations between the `DMGlobalToLocalBegin()` and  `DMGlobalToLocalEnd()` to overlap communication and computation\n\n`DMGlobalToLocal()` is a short form of  `DMGlobalToLocalBegin()` and  `DMGlobalToLocalEnd()`\n\n`DMGlobalToLocalHookAdd()` may be used to provide additional operations that are performed during the update process.\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobal()`, `DMLocalToGlobalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalBegin\"))\n\"\"\"\nfunction DMGlobalToLocalBegin(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMGlobalToLocalBegin(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMGlobalToLocalBegin, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGlobalToLocalEnd(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nEnds updating local vectors from global vector\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `g`    - the global vector\n- `mode` - `INSERT_VALUES` or `ADD_VALUES`\n- `l`    - the local vector\n\nLevel: intermediate\n\nNote:\nSee `DMGlobalToLocalBegin()` for details.\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobal()`, `DMLocalToGlobalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalEnd\"))\n\"\"\"\nfunction DMGlobalToLocalEnd(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMGlobalToLocalEnd(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMGlobalToLocalEnd, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToGlobalHookAdd(petsclib::PetscLibType,dm::PetscDM, beginhook::external, endhook::external, ctx::Cvoid) \nadds a callback to be run when a local to global is called\n\nLogically Collective\n\nInput Parameters:\n- `dm`        - the `DM`\n- `beginhook` - function to run at the beginning of `DMLocalToGlobalBegin()`\n- `endhook`   - function to run after `DMLocalToGlobalEnd()` has completed\n- `ctx`       - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nCalling sequence of `beginhook`:\n- `global` - global `DM`\n- `l`      - local vector\n- `mode`   - mode\n- `g`      - global vector\n- `ctx`    - optional user-defined function context\n\nCalling sequence of `endhook`:\n- `global` - global `DM`\n- `l`      - local vector\n- `mode`   - mode\n- `g`      - global vector\n- `ctx`    - optional user-defined function context\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMLocalToGlobal()`, `DMRefineHookAdd()`, `DMGlobalToLocalHookAdd()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalHookAdd\"))\n\"\"\"\nfunction DMLocalToGlobalHookAdd(petsclib::PetscLibType, dm::PetscDM, beginhook::external, endhook::external, ctx::Cvoid) end\n\n@for_petsc function DMLocalToGlobalHookAdd(petsclib::$UnionPetscLib, dm::PetscDM, beginhook::external, endhook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMLocalToGlobalHookAdd, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               dm, beginhook, endhook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToGlobal(petsclib::PetscLibType,dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) \nupdates global vectors from local vectors\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `l`    - the local vector\n- `mode` - if `INSERT_VALUES` then no parallel communication is used, if `ADD_VALUES` then all ghost points from the same base point accumulate into that base point.\n- `g`    - the global vector\n\nLevel: beginner\n\nNotes:\nThe communication involved in this update can be overlapped with computation by using\n`DMLocalToGlobalBegin()` and `DMLocalToGlobalEnd()`.\n\nIn the `ADD_VALUES` case you normally would zero the receiving vector before beginning this operation.\n\n`INSERT_VALUES` is not supported for `DMDA`; in that case simply compute the values directly into a global vector instead of a local one.\n\nUse `DMLocalToGlobalHookAdd()` to add additional operations that are performed on the data during the update process\n\nSee also: \n=== \n`DM`, `DMLocalToGlobalBegin()`, `DMLocalToGlobalEnd()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMGlobalToLocalEnd()`, `DMGlobalToLocalBegin()`, `DMLocalToGlobalHookAdd()`, `DMGlobaToLocallHookAdd()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobal\"))\n\"\"\"\nfunction DMLocalToGlobal(petsclib::PetscLibType, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) end\n\n@for_petsc function DMLocalToGlobal(petsclib::$UnionPetscLib, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToGlobal, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, l, mode, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToGlobalBegin(petsclib::PetscLibType,dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) \nbegins updating global vectors from local vectors\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `l`    - the local vector\n- `mode` - if `INSERT_VALUES` then no parallel communication is used, if `ADD_VALUES` then all ghost points from the same base point accumulate into that base point.\n- `g`    - the global vector\n\nLevel: intermediate\n\nNotes:\nIn the `ADD_VALUES` case you normally would zero the receiving vector before beginning this operation.\n\n`INSERT_VALUES is` not supported for `DMDA`, in that case simply compute the values directly into a global vector instead of a local one.\n\nUse `DMLocalToGlobalEnd()` to complete the communication process.\n\n`DMLocalToGlobal()` is a short form of  `DMLocalToGlobalBegin()` and  `DMLocalToGlobalEnd()`\n\n`DMLocalToGlobalHookAdd()` may be used to provide additional operations that are performed during the update process.\n\nSee also: \n=== \n`DM`, `DMLocalToGlobal()`, `DMLocalToGlobalEnd()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMGlobalToLocalEnd()`, `DMGlobalToLocalBegin()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalBegin\"))\n\"\"\"\nfunction DMLocalToGlobalBegin(petsclib::PetscLibType, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) end\n\n@for_petsc function DMLocalToGlobalBegin(petsclib::$UnionPetscLib, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToGlobalBegin, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, l, mode, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToGlobalEnd(petsclib::PetscLibType,dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) \nupdates global vectors from local vectors\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `l`    - the local vector\n- `mode` - `INSERT_VALUES` or `ADD_VALUES`\n- `g`    - the global vector\n\nLevel: intermediate\n\nNote:\nSee `DMLocalToGlobalBegin()` for full details\n\nSee also: \n=== \n`DM`, `DMLocalToGlobalBegin()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalEnd\"))\n\"\"\"\nfunction DMLocalToGlobalEnd(petsclib::PetscLibType, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) end\n\n@for_petsc function DMLocalToGlobalEnd(petsclib::$UnionPetscLib, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToGlobalEnd, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, l, mode, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToLocalBegin(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nBegins the process of mapping values from a local vector (that include\nghost points that contain irrelevant values) to another local vector where the ghost points\nin the second are set correctly from values on other MPI ranks.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `g`    - the original local vector\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n- `l` - the local vector with correct ghost values\n\nLevel: intermediate\n\nNote:\nMust be followed by `DMLocalToLocalEnd()`.\n\nSee also: \n=== \n`DM`, `DMLocalToLocalEnd()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToLocalBegin\"))\n\"\"\"\nfunction DMLocalToLocalBegin(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMLocalToLocalBegin(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToLocalBegin, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToLocalEnd(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nMaps from a local vector to another local vector where the ghost\npoints in the second are set correctly. Must be preceded by `DMLocalToLocalBegin()`.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `g`    - the original local vector\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n- `l` - the local vector with correct ghost values\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLocalToLocalBegin()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToLocalEnd\"))\n\"\"\"\nfunction DMLocalToLocalEnd(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMLocalToLocalEnd(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToLocalEnd, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCoarsen(petsclib::PetscLibType,dm::PetscDM, comm::MPI_Comm, dmc::PetscDM) \nCoarsens a `DM` object using a standard, non\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DM` object\n- `comm` - the communicator to contain the new `DM` object (or `MPI_COMM_NULL`)\n\nOutput Parameter:\n- `dmc` - the coarsened `DM`\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMRefine()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateDomainDecomposition()`,\n`DMCoarsenHookAdd()`, `DMCoarsenHookRemove()`\n\n# External Links\n$(_doc_external(\"DM/DMCoarsen\"))\n\"\"\"\nfunction DMCoarsen(petsclib::PetscLibType, dm::PetscDM, comm::MPI_Comm, dmc::PetscDM) end\n\n@for_petsc function DMCoarsen(petsclib::$UnionPetscLib, dm::PetscDM, comm::MPI_Comm, dmc::PetscDM )\n\tdmc_ = Ref(dmc.ptr)\n\n    @chk ccall(\n               (:DMCoarsen, $petsc_library),\n               PetscErrorCode,\n               (CDM, MPI_Comm, Ptr{CDM}),\n               dm, comm, dmc_,\n              )\n\n\tdmc.ptr = dmc_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCoarsenHookAdd(petsclib::PetscLibType,fine::PetscDM, coarsenhook::external, restricthook::external, ctx::Cvoid) \nadds a callback to be run when restricting a nonlinear problem to the coarse grid\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `fine`         - `DM` on which to run a hook when restricting to a coarser level\n- `coarsenhook`  - function to run when setting up a coarser level\n- `restricthook` - function to run to update data on coarser levels (called once per `SNESSolve()`)\n- `ctx`          - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nCalling sequence of `coarsenhook`:\n- `fine`   - fine level `DM`\n- `coarse` - coarse level `DM` to restrict problem to\n- `ctx`    - optional user-defined function context\n\nCalling sequence of `restricthook`:\n- `fine`      - fine level `DM`\n- `mrestrict` - matrix restricting a fine-level solution to the coarse grid, usually the transpose of the interpolation\n- `rscale`    - scaling vector for restriction\n- `inject`    - matrix restricting by injection\n- `coarse`    - coarse level DM to update\n- `ctx`       - optional user-defined function context\n\nLevel: advanced\n\nNotes:\nThis function is only needed if auxiliary data, attached to the `DM` with `PetscObjectCompose()`, needs to be set up or passed from the fine `DM` to the coarse `DM`.\n\nIf this function is called multiple times, the hooks will be run in the order they are added.\n\nIn order to compose with nonlinear preconditioning without duplicating storage, the hook should be implemented to\nextract the finest level information from its context (instead of from the `SNES`).\n\nThe hooks are automatically called by `DMRestrict()`\n\nSee also: \n=== \n`DM`, `DMCoarsenHookRemove()`, `DMRefineHookAdd()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMCoarsenHookAdd\"))\n\"\"\"\nfunction DMCoarsenHookAdd(petsclib::PetscLibType, fine::PetscDM, coarsenhook::external, restricthook::external, ctx::Cvoid) end\n\n@for_petsc function DMCoarsenHookAdd(petsclib::$UnionPetscLib, fine::PetscDM, coarsenhook::external, restricthook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMCoarsenHookAdd, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               fine, coarsenhook, restricthook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCoarsenHookRemove(petsclib::PetscLibType,fine::PetscDM, coarsenhook::external, restricthook::external, ctx::Cvoid) \nremove a callback set with `DMCoarsenHookAdd()`\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `fine`         - `DM` on which to run a hook when restricting to a coarser level\n- `coarsenhook`  - function to run when setting up a coarser level\n- `restricthook` - function to run to update data on coarser levels\n- `ctx`          - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nLevel: advanced\n\nNotes:\nThis function does nothing if the `coarsenhook` is not in the list.\n\nSee `DMCoarsenHookAdd()` for the calling sequence of `coarsenhook` and `restricthook`\n\nSee also: \n=== \n`DM`, `DMCoarsenHookAdd()`, `DMRefineHookAdd()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMCoarsenHookRemove\"))\n\"\"\"\nfunction DMCoarsenHookRemove(petsclib::PetscLibType, fine::PetscDM, coarsenhook::external, restricthook::external, ctx::Cvoid) end\n\n@for_petsc function DMCoarsenHookRemove(petsclib::$UnionPetscLib, fine::PetscDM, coarsenhook::external, restricthook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMCoarsenHookRemove, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               fine, coarsenhook, restricthook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRestrict(petsclib::PetscLibType,fine::PetscDM, restrct::PetscMat, rscale::PetscVec, inject::PetscMat, coarse::PetscDM) \nrestricts user\n\nCollective if any hooks are\n\nInput Parameters:\n- `fine`    - finer `DM` from which the data is obtained\n- `restrct` - restriction matrix, apply using `MatRestrict()`, usually the transpose of the interpolation\n- `rscale`  - scaling vector for restriction\n- `inject`  - injection matrix, also use `MatRestrict()`\n- `coarse`  - coarser `DM` to update\n\nLevel: developer\n\nDeveloper Note:\nThough this routine is called `DMRestrict()` the hooks are added with `DMCoarsenHookAdd()`, a consistent terminology would be better\n\nSee also: \n=== \n`DM`, `DMCoarsenHookAdd()`, `MatRestrict()`, `DMInterpolate()`, `DMRefineHookAdd()`\n\n# External Links\n$(_doc_external(\"DM/DMRestrict\"))\n\"\"\"\nfunction DMRestrict(petsclib::PetscLibType, fine::PetscDM, restrct::PetscMat, rscale::PetscVec, inject::PetscMat, coarse::PetscDM) end\n\n@for_petsc function DMRestrict(petsclib::$UnionPetscLib, fine::PetscDM, restrct::PetscMat, rscale::PetscVec, inject::PetscMat, coarse::PetscDM )\n\n    @chk ccall(\n               (:DMRestrict, $petsc_library),\n               PetscErrorCode,\n               (CDM, CMat, CVec, CMat, CDM),\n               fine, restrct, rscale, inject, coarse,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSubDomainHookAdd(petsclib::PetscLibType,global_::PetscDM, ddhook::external, restricthook::external, ctx::Cvoid) \nadds a callback to be run when restricting a problem to subdomain `DM`s with `DMCreateDomainDecomposition()`\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `global_`       - global `DM`\n- `ddhook`       - function to run to pass data to the decomposition `DM` upon its creation\n- `restricthook` - function to run to update data on block solve (at the beginning of the block solve)\n- `ctx`          - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nCalling sequence of `ddhook`:\n- `global` - global `DM`\n- `block`  - subdomain `DM`\n- `ctx`    - optional user-defined function context\n\nCalling sequence of `restricthook`:\n- `global` - global `DM`\n- `out`    - scatter to the outer (with ghost and overlap points) sub vector\n- `in`     - scatter to sub vector values only owned locally\n- `block`  - subdomain `DM`\n- `ctx`    - optional user-defined function context\n\nLevel: advanced\n\nNotes:\nThis function can be used if auxiliary data needs to be set up on subdomain `DM`s.\n\nIf this function is called multiple times, the hooks will be run in the order they are added.\n\nIn order to compose with nonlinear preconditioning without duplicating storage, the hook should be implemented to\nextract the global information from its context (instead of from the `SNES`).\n\nDeveloper Note:\nIt is unclear what \"block solve\" means within the definition of `restricthook`\n\nSee also: \n=== \n`DM`, `DMSubDomainHookRemove()`, `DMRefineHookAdd()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`, `DMCreateDomainDecomposition()`\n\n# External Links\n$(_doc_external(\"DM/DMSubDomainHookAdd\"))\n\"\"\"\nfunction DMSubDomainHookAdd(petsclib::PetscLibType, global_::PetscDM, ddhook::external, restricthook::external, ctx::Cvoid) end\n\n@for_petsc function DMSubDomainHookAdd(petsclib::$UnionPetscLib, global_::PetscDM, ddhook::external, restricthook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSubDomainHookAdd, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               global_, ddhook, restricthook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSubDomainHookRemove(petsclib::PetscLibType,global_::PetscDM, ddhook::external, restricthook::external, ctx::Cvoid) \nremove a callback from the list to be run when restricting a problem to subdomain `DM`s with `DMCreateDomainDecomposition()`\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `global`       - global `DM`\n- `ddhook`       - function to run to pass data to the decomposition `DM` upon its creation\n- `restricthook` - function to run to update data on block solve (at the beginning of the block solve)\n- `ctx`          - [optional] user-defined context for provide data for the hooks (may be `NULL`)\n\nLevel: advanced\n\nNote:\nSee `DMSubDomainHookAdd()` for the calling sequences of `ddhook` and `restricthook`\n\nSee also: \n=== \n`DM`, `DMSubDomainHookAdd()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`,\n`DMCreateDomainDecomposition()`\n\n# External Links\n$(_doc_external(\"DM/DMSubDomainHookRemove\"))\n\"\"\"\nfunction DMSubDomainHookRemove(petsclib::PetscLibType, global_::PetscDM, ddhook::external, restricthook::external, ctx::Cvoid) end\n\n@for_petsc function DMSubDomainHookRemove(petsclib::$UnionPetscLib, global_::PetscDM, ddhook::external, restricthook::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSubDomainHookRemove, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external, Ptr{Cvoid}),\n               global_, ddhook, restricthook, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSubDomainRestrict(petsclib::PetscLibType,global_::PetscDM, oscatter::VecScatter, gscatter::VecScatter, subdm::PetscDM) \nrestricts user\n\nCollective if any hooks are\n\nInput Parameters:\n- `global`   - The global `DM` to use as a base\n- `oscatter` - The scatter from domain global vector filling subdomain global vector with overlap\n- `gscatter` - The scatter from domain global vector filling subdomain local vector with ghosts\n- `subdm`    - The subdomain `DM` to update\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsenHookAdd()`, `MatRestrict()`, `DMCreateDomainDecomposition()`\n\n# External Links\n$(_doc_external(\"DM/DMSubDomainRestrict\"))\n\"\"\"\nfunction DMSubDomainRestrict(petsclib::PetscLibType, global_::PetscDM, oscatter::VecScatter, gscatter::VecScatter, subdm::PetscDM) end\n\n@for_petsc function DMSubDomainRestrict(petsclib::$UnionPetscLib, global_::PetscDM, oscatter::VecScatter, gscatter::VecScatter, subdm::PetscDM )\n\n    @chk ccall(\n               (:DMSubDomainRestrict, $petsc_library),\n               PetscErrorCode,\n               (CDM, VecScatter, VecScatter, CDM),\n               global_, oscatter, gscatter, subdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlevel::PetscInt = DMGetCoarsenLevel(petsclib::PetscLibType,dm::PetscDM) \nGets the number of coarsenings that have generated this `DM`.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `level` - number of coarsenings\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMSetCoarsenLevel()`, `DMGetRefineLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoarsenLevel\"))\n\"\"\"\nfunction DMGetCoarsenLevel(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetCoarsenLevel(petsclib::$UnionPetscLib, dm::PetscDM )\n\tlevel_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetCoarsenLevel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, level_,\n              )\n\n\tlevel = level_[]\n\n\treturn level\nend \n\n\"\"\"\n\tDMSetCoarsenLevel(petsclib::PetscLibType,dm::PetscDM, level::PetscInt) \nSets the number of coarsenings that have generated this `DM`.\n\nCollective\n\nInput Parameters:\n- `dm`    - the `DM` object\n- `level` - number of coarsenings\n\nLevel: developer\n\nNote:\nThis is rarely used directly, the information is automatically set when a `DM` is created with `DMCoarsen()`\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMGetCoarsenLevel()`, `DMGetRefineLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoarsenLevel\"))\n\"\"\"\nfunction DMSetCoarsenLevel(petsclib::PetscLibType, dm::PetscDM, level::PetscInt) end\n\n@for_petsc function DMSetCoarsenLevel(petsclib::$UnionPetscLib, dm::PetscDM, level::$PetscInt )\n\n    @chk ccall(\n               (:DMSetCoarsenLevel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, level,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRefineHierarchy(petsclib::PetscLibType,dm::PetscDM, nlevels::PetscInt, dmf::Vector{PetscDM}) \nRefines a `DM` object, all levels at once\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DM` object\n- `nlevels` - the number of levels of refinement\n\nOutput Parameter:\n- `dmf` - the refined `DM` hierarchy\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMCoarsenHierarchy()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMRefineHierarchy\"))\n\"\"\"\nfunction DMRefineHierarchy(petsclib::PetscLibType, dm::PetscDM, nlevels::PetscInt, dmf::Vector{PetscDM}) end\n\n@for_petsc function DMRefineHierarchy(petsclib::$UnionPetscLib, dm::PetscDM, nlevels::$PetscInt, dmf::Vector{PetscDM} )\n\n    @chk ccall(\n               (:DMRefineHierarchy, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CDM}),\n               dm, nlevels, dmf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCoarsenHierarchy(petsclib::PetscLibType,dm::PetscDM, nlevels::PetscInt, dmc::Vector{PetscDM}) \nCoarsens a `DM` object, all levels at once\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DM` object\n- `nlevels` - the number of levels of coarsening\n\nOutput Parameter:\n- `dmc` - the coarsened `DM` hierarchy\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMRefineHierarchy()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMCoarsenHierarchy\"))\n\"\"\"\nfunction DMCoarsenHierarchy(petsclib::PetscLibType, dm::PetscDM, nlevels::PetscInt, dmc::Vector{PetscDM}) end\n\n@for_petsc function DMCoarsenHierarchy(petsclib::$UnionPetscLib, dm::PetscDM, nlevels::$PetscInt, dmc::Vector{PetscDM} )\n\n    @chk ccall(\n               (:DMCoarsenHierarchy, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CDM}),\n               dm, nlevels, dmc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetApplicationContextDestroy(petsclib::PetscLibType,dm::PetscDM, destroy::PetscCtxDestroyFn) \nSets a user function that will be called to destroy the application context when the `DM` is destroyed\n\nLogically Collective if the function is collective\n\nInput Parameters:\n- `dm`      - the `DM` object\n- `destroy` - the destroy function, see `PetscCtxDestroyFn` for the calling sequence\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetApplicationContext()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`,\n`DMGetApplicationContext()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"DM/DMSetApplicationContextDestroy\"))\n\"\"\"\nfunction DMSetApplicationContextDestroy(petsclib::PetscLibType, dm::PetscDM, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function DMSetApplicationContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMSetApplicationContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetApplicationContext(petsclib::PetscLibType,dm::PetscDM, ctx::Cvoid) \nSet a user context into a `DM` object\n\nNot Collective\n\nInput Parameters:\n- `dm`  - the `DM` object\n- `ctx` - the user context\n\nLevel: intermediate\n\nNote:\nA user context is a way to pass problem specific information that is accessible whenever the `DM` is available\nIn a multilevel solver, the user context is shared by all the `DM` in the hierarchy; it is thus not advisable\nto store objects that represent discretized quantities inside the context.\n\nFortran Note:\nThis only works when `ctx` is a Fortran derived type (it cannot be a `PetscObject`), we recommend writing a Fortran interface definition for this\nfunction that tells the Fortran compiler the derived data type that is passed in as the `ctx` argument. See `DMGetApplicationContext()` for\nan example.\n\nSee also: \n=== \n`DM`, `DMGetApplicationContext()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMSetApplicationContext\"))\n\"\"\"\nfunction DMSetApplicationContext(petsclib::PetscLibType, dm::PetscDM, ctx::Cvoid) end\n\n@for_petsc function DMSetApplicationContext(petsclib::$UnionPetscLib, dm::PetscDM, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMSetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cvoid}),\n               dm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetApplicationContext(petsclib::PetscLibType,dm::PetscDM, ctx::PeCtx) \nGets a user context from a `DM` object provided with `DMSetApplicationContext()`\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `ctx` - a pointer to the user context\n\nLevel: intermediate\n\nNote:\nA user context is a way to pass problem specific information that is accessible whenever the `DM` is available\n\nFortran Notes:\nThis only works when the context is a Fortran derived type (it cannot be a `PetscObject`) and you **must** write a Fortran interface definition for this\nfunction that tells the Fortran compiler the derived data type that is returned as the `ctx` argument. For example,\n-vb\nInterface DMGetApplicationContext\nSubroutine DMGetApplicationContext(dm,ctx,ierr)\n#include <petsc/finclude/petscdm.h>\nuse petscdm\nDM dm\ntype(tUsertype), pointer :: ctx\nPetscErrorCode ierr\nEnd Subroutine\nEnd Interface DMGetApplicationContext\n-ve\n\nThe prototype for `ctx` must be\n-vb\ntype(tUsertype), pointer :: ctx\n-ve\n\nSee also: \n=== \n`DM`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMGetApplicationContext\"))\n\"\"\"\nfunction DMGetApplicationContext(petsclib::PetscLibType, dm::PetscDM, ctx::PeCtx) end\n\n@for_petsc function DMGetApplicationContext(petsclib::$UnionPetscLib, dm::PetscDM, ctx::PeCtx )\n\n    @chk ccall(\n               (:DMGetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CDM, PeCtx),\n               dm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetVariableBounds(petsclib::PetscLibType,dm::PetscDM, f::external) \nsets a function to compute the lower and upper bound vectors for `SNESVI`.\n\nLogically Collective\n\nInput Parameters:\n- `dm` - the DM object\n- `f`  - the function that computes variable bounds used by `SNESVI` (use `NULL` to cancel a previous function that was set)\n\nLevel: intermediate\n\nDeveloper Note:\nShould be called `DMSetComputeVIBounds()` or something similar\n\nSee also: \n=== \n`DM`, `DMComputeVariableBounds()`, `DMHasVariableBounds()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMGetApplicationContext()`,\n`DMSetJacobian()`\n\n# External Links\n$(_doc_external(\"DM/DMSetVariableBounds\"))\n\"\"\"\nfunction DMSetVariableBounds(petsclib::PetscLibType, dm::PetscDM, f::external) end\n\n@for_petsc function DMSetVariableBounds(petsclib::$UnionPetscLib, dm::PetscDM, f::external )\n\n    @chk ccall(\n               (:DMSetVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = DMHasVariableBounds(petsclib::PetscLibType,dm::PetscDM) \ndoes the `DM` object have a variable bounds function?\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object to destroy\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the variable bounds function exists\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMComputeVariableBounds()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"DM/DMHasVariableBounds\"))\n\"\"\"\nfunction DMHasVariableBounds(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMHasVariableBounds(petsclib::$UnionPetscLib, dm::PetscDM )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tDMComputeVariableBounds(petsclib::PetscLibType,dm::PetscDM, xl::PetscVec, xu::PetscVec) \ncompute variable bounds used by `SNESVI`.\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameters:\n- `xl` - lower bound\n- `xu` - upper bound\n\nLevel: advanced\n\nNote:\nThis is generally not called by users. It calls the function provided by the user with DMSetVariableBounds()\n\nSee also: \n=== \n`DM`, `DMHasVariableBounds()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"DM/DMComputeVariableBounds\"))\n\"\"\"\nfunction DMComputeVariableBounds(petsclib::PetscLibType, dm::PetscDM, xl::PetscVec, xu::PetscVec) end\n\n@for_petsc function DMComputeVariableBounds(petsclib::$UnionPetscLib, dm::PetscDM, xl::PetscVec, xu::PetscVec )\n\n    @chk ccall(\n               (:DMComputeVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, xl, xu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = DMHasColoring(petsclib::PetscLibType,dm::PetscDM) \ndoes the `DM` object have a method of providing a coloring?\n\nNot Collective\n\nInput Parameter:\n- `dm` - the DM object\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the `DM` has facilities for `DMCreateColoring()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateColoring()`\n\n# External Links\n$(_doc_external(\"DM/DMHasColoring\"))\n\"\"\"\nfunction DMHasColoring(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMHasColoring(petsclib::$UnionPetscLib, dm::PetscDM )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasColoring, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = DMHasCreateRestriction(petsclib::PetscLibType,dm::PetscDM) \ndoes the `DM` object have a method of providing a restriction?\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the `DM` has facilities for `DMCreateRestriction()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateRestriction()`, `DMHasCreateInterpolation()`, `DMHasCreateInjection()`\n\n# External Links\n$(_doc_external(\"DM/DMHasCreateRestriction\"))\n\"\"\"\nfunction DMHasCreateRestriction(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMHasCreateRestriction(petsclib::$UnionPetscLib, dm::PetscDM )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasCreateRestriction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = DMHasCreateInjection(petsclib::PetscLibType,dm::PetscDM) \ndoes the `DM` object have a method of providing an injection?\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM` object\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the `DM` has facilities for `DMCreateInjection()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateInjection()`, `DMHasCreateRestriction()`, `DMHasCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMHasCreateInjection\"))\n\"\"\"\nfunction DMHasCreateInjection(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMHasCreateInjection(petsclib::$UnionPetscLib, dm::PetscDM )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasCreateInjection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tDMSetType(petsclib::PetscLibType,dm::PetscDM, method::DMType) \nBuilds a `DM`, for a particular `DM` implementation.\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DM` object\n- `method` - The name of the `DMType`, for example `DMDA`, `DMPLEX`\n\nOptions Database Key:\n- `-dm_type <type>` - Sets the `DM` type; use -help for a list of available types\n\nLevel: intermediate\n\nNote:\nOf the `DM` is constructed by directly calling a function to construct a particular `DM`, for example, `DMDACreate2d()` or `DMPlexCreateBoxMesh()`\n\nSee also: \n=== \n`DM`, `DMType`, `DMDA`, `DMPLEX`, `DMGetType()`, `DMCreate()`, `DMDACreate2d()`\n\n# External Links\n$(_doc_external(\"DM/DMSetType\"))\n\"\"\"\nfunction DMSetType(petsclib::PetscLibType, dm::PetscDM, method::DMType) end\n\n@for_petsc function DMSetType(petsclib::$UnionPetscLib, dm::PetscDM, method::DMType )\n\n    @chk ccall(\n               (:DMSetType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMType),\n               dm, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::DMType = DMGetType(petsclib::PetscLibType,dm::PetscDM) \nGets the `DM` type name (as a string) from the `DM`.\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `type` - The `DMType` name\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMType`, `DMDA`, `DMPLEX`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMGetType\"))\n\"\"\"\nfunction DMGetType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetType(petsclib::$UnionPetscLib, dm::PetscDM )\n\ttype_ = Ref{DMType}()\n\n    @chk ccall(\n               (:DMGetType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMType}),\n               dm, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tDMConvert(petsclib::PetscLibType,dm::PetscDM, newtype::DMType, M::PetscDM) \nConverts a `DM` to another `DM`, either of the same or different type.\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DM`\n- `newtype` - new `DM` type (use \"same\" for the same type)\n\nOutput Parameter:\n- `M` - pointer to new `DM`\n\nLevel: intermediate\n\nNote:\nCannot be used to convert a sequential `DM` to a parallel or a parallel to sequential,\nthe MPI communicator of the generated `DM` is always the same as the communicator\nof the input `DM`.\n\nSee also: \n=== \n`DM`, `DMSetType()`, `DMCreate()`, `DMClone()`\n\n# External Links\n$(_doc_external(\"DM/DMConvert\"))\n\"\"\"\nfunction DMConvert(petsclib::PetscLibType, dm::PetscDM, newtype::DMType, M::PetscDM) end\n\n@for_petsc function DMConvert(petsclib::$UnionPetscLib, dm::PetscDM, newtype::DMType, M::PetscDM )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:DMConvert, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMType, Ptr{CDM}),\n               dm, newtype, M_,\n              )\n\n\tM.ptr = M_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `DM` type implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine itself\n\nLevel: advanced\n\nNote:\n`DMRegister()` may be called multiple times to add several user-defined `DM`s\n\nExample Usage:\n-vb\nDMRegister(\"my_da\", MyDMCreate);\n-ve\n\nThen, your `DM` type can be chosen with the procedural interface via\n-vb\nDMCreate(MPI_Comm, DM *);\nDMSetType(DM,\"my_da\");\n-ve\nor at runtime via the option\n-vb\n-da_type my_da\n-ve\n\nSee also: \n=== \n`DM`, `DMType`, `DMSetType()`, `DMRegisterAll()`, `DMRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMRegister\"))\n\"\"\"\nfunction DMRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function DMRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:DMRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLoad(petsclib::PetscLibType,newdm::PetscDM, viewer::PetscViewer) \nLoads a DM that has been stored in binary  with `DMView()`.\n\nCollective\n\nInput Parameters:\n- `newdm`  - the newly loaded `DM`, this needs to have been created with `DMCreate()` or\nsome related function before a call to `DMLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()` or\n`PETSCVIEWERHDF5` file viewer, obtained from `PetscViewerHDF5Open()`\n\nLevel: intermediate\n\nNotes:\nThe type is determined by the data in the file, any type set into the DM before this call is ignored.\n\nUsing `PETSCVIEWERHDF5` type with `PETSC_VIEWER_HDF5_PETSC` format, one can save multiple `DMPLEX`\nmeshes in a single HDF5 file. This in turn requires one to name the `DMPLEX` object with `PetscObjectSetName()`\nbefore saving it with `DMView()` and before loading it with `DMLoad()` for identification of the mesh object.\n\nSee also: \n=== \n`DM`, `PetscViewerBinaryOpen()`, `DMView()`, `MatLoad()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"DM/DMLoad\"))\n\"\"\"\nfunction DMLoad(petsclib::PetscLibType, newdm::PetscDM, viewer::PetscViewer) end\n\n@for_petsc function DMLoad(petsclib::$UnionPetscLib, newdm::PetscDM, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer),\n               newdm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPrintCellIndices(petsclib::PetscLibType,c::PetscInt, name::String, len::PetscInt, x::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"DM/DMPrintCellIndices\"))\n\"\"\"\nfunction DMPrintCellIndices(petsclib::PetscLibType, c::PetscInt, name::String, len::PetscInt, x::Vector{PetscInt}) end\n\n@for_petsc function DMPrintCellIndices(petsclib::$UnionPetscLib, c::$PetscInt, name::String, len::$PetscInt, x::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPrintCellIndices, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}),\n               c, name, len, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPrintCellVector(petsclib::PetscLibType,c::PetscInt, name::String, len::PetscInt, x::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"DM/DMPrintCellVector\"))\n\"\"\"\nfunction DMPrintCellVector(petsclib::PetscLibType, c::PetscInt, name::String, len::PetscInt, x::Vector{PetscScalar}) end\n\n@for_petsc function DMPrintCellVector(petsclib::$UnionPetscLib, c::$PetscInt, name::String, len::$PetscInt, x::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:DMPrintCellVector, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Cchar}, $PetscInt, Ptr{$PetscScalar}),\n               c, name, len, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPrintCellVectorReal(petsclib::PetscLibType,c::PetscInt, name::String, len::PetscInt, x::Vector{PetscReal}) \n\n# External Links\n$(_doc_external(\"DM/DMPrintCellVectorReal\"))\n\"\"\"\nfunction DMPrintCellVectorReal(petsclib::PetscLibType, c::PetscInt, name::String, len::PetscInt, x::Vector{PetscReal}) end\n\n@for_petsc function DMPrintCellVectorReal(petsclib::$UnionPetscLib, c::$PetscInt, name::String, len::$PetscInt, x::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMPrintCellVectorReal, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Cchar}, $PetscInt, Ptr{$PetscReal}),\n               c, name, len, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPrintCellMatrix(petsclib::PetscLibType,c::PetscInt, name::String, rows::PetscInt, cols::PetscInt, A::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"DM/DMPrintCellMatrix\"))\n\"\"\"\nfunction DMPrintCellMatrix(petsclib::PetscLibType, c::PetscInt, name::String, rows::PetscInt, cols::PetscInt, A::Vector{PetscScalar}) end\n\n@for_petsc function DMPrintCellMatrix(petsclib::$UnionPetscLib, c::$PetscInt, name::String, rows::$PetscInt, cols::$PetscInt, A::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:DMPrintCellMatrix, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Cchar}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               c, name, rows, cols, A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPrintLocalVec(petsclib::PetscLibType,dm::PetscDM, name::String, tol::PetscReal, X::PetscVec) \n\n# External Links\n$(_doc_external(\"DM/DMPrintLocalVec\"))\n\"\"\"\nfunction DMPrintLocalVec(petsclib::PetscLibType, dm::PetscDM, name::String, tol::PetscReal, X::PetscVec) end\n\n@for_petsc function DMPrintLocalVec(petsclib::$UnionPetscLib, dm::PetscDM, name::String, tol::$PetscReal, X::PetscVec )\n\n    @chk ccall(\n               (:DMPrintLocalVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscReal, CVec),\n               dm, name, tol, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetLocalSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nGet the `PetscSection` encoding the local data layout for the `DM`.\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `section` - The `PetscSection`\n\nOptions Database Key:\n- `-dm_petscsection_view` - View the section created by the `DM`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSection`.\n\nSee also: \n=== \n`DM`, `DMSetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalSection\"))\n\"\"\"\nfunction DMGetLocalSection(petsclib::PetscLibType, dm::PetscDM, section::Union{PetscSection, Ref{PetscSection}}) end\n\n@for_petsc function DMGetLocalSection(petsclib::$UnionPetscLib, dm::PetscDM, section::Union{PetscSection, Ref{PetscSection}} )\n\n\t# Accept either a Ptr (PetscSection) or a Ref{PetscSection} and pass a Ptr to ccall\n\tsection_ = section isa Ref ? section : Ref{PetscSection}(section)\n\n    @chk ccall(\n               (:DMGetLocalSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}),\n               dm, section_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetLocalSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nSet the `PetscSection` encoding the local data layout for the `DM`.\n\nInput Parameters:\n- `dm`      - The `DM`\n- `section` - The `PetscSection`\n\nLevel: intermediate\n\nNote:\nAny existing Section will be destroyed\n\nSee also: \n=== \n`DM`, `PetscSection`, `DMGetLocalSection()`, `DMSetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLocalSection\"))\n\"\"\"\nfunction DMSetLocalSection(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMSetLocalSection(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMSetLocalSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tperm::IS,blockStarts::PetscBT = DMCreateSectionPermutation(petsclib::PetscLibType,dm::PetscDM) \nCreate a permutation of the `PetscSection` chart and optionally a block structure.\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `perm`        - A permutation of the mesh points in the chart\n- `blockStarts` - A high bit is set for the point that begins every block, or `NULL` for default blocking\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `PetscSection`, `DMGetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSectionPermutation\"))\n\"\"\"\nfunction DMCreateSectionPermutation(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateSectionPermutation(petsclib::$UnionPetscLib, dm::PetscDM )\n\tperm_ = Ref{IS}()\n\tblockStarts_ = Ref{PetscBT}()\n\n    @chk ccall(\n               (:DMCreateSectionPermutation, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}, Ptr{PetscBT}),\n               dm, perm_, blockStarts_,\n              )\n\n\tperm = perm_[]\n\tblockStarts = blockStarts_[]\n\n\treturn perm,blockStarts\nend \n\n\"\"\"\n\tDMGetDefaultConstraints(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, mat::PetscMat, bias::PetscVec) \nGet the `PetscSection` and `Mat` that specify the local constraint interpolation. See `DMSetDefaultConstraints()` for a description of the purpose of constraint interpolation.\n\nnot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `section` - The `PetscSection` describing the range of the constraint matrix: relates rows of the constraint matrix to dofs of the default section.  Returns `NULL` if there are no local constraints.\n- `mat`     - The `Mat` that interpolates local constraints: its width should be the layout size of the default section.  Returns `NULL` if there are no local constraints.\n- `bias`    - Vector containing bias to be added to constrained dofs\n\nLevel: advanced\n\nNote:\nThis gets borrowed references, so the user should not destroy the `PetscSection`, `Mat`, or `Vec`.\n\nSee also: \n=== \n`DM`, `DMSetDefaultConstraints()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDefaultConstraints\"))\n\"\"\"\nfunction DMGetDefaultConstraints(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, mat::PetscMat, bias::PetscVec) end\n\n@for_petsc function DMGetDefaultConstraints(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, mat::PetscMat, bias::PetscVec )\n\tmat_ = Ref(mat.ptr)\n\tbias_ = Ref(bias.ptr)\n\n    @chk ccall(\n               (:DMGetDefaultConstraints, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}, Ptr{CMat}, Ptr{CVec}),\n               dm, section, mat_, bias_,\n              )\n\n\tmat.ptr = mat_[]\n\tbias.ptr = bias_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetDefaultConstraints(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, mat::PetscMat, bias::PetscVec) \nSet the `PetscSection` and `Mat` that specify the local constraint interpolation.\n\nCollective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `section` - The `PetscSection` describing the range of the constraint matrix: relates rows of the constraint matrix to dofs of the default section.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).\n- `mat`     - The `Mat` that interpolates local constraints: its width should be the layout size of the default section:  `NULL` indicates no constraints.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).\n- `bias`    - A bias vector to be added to constrained values in the local vector.  `NULL` indicates no bias.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).\n\nLevel: advanced\n\nNotes:\nIf a constraint matrix is specified, then it is applied during `DMGlobalToLocalEnd()` when mode is `INSERT_VALUES`, `INSERT_BC_VALUES`, or `INSERT_ALL_VALUES`.  Without a constraint matrix, the local vector l returned by `DMGlobalToLocalEnd()` contains values that have been scattered from a global vector without modification; with a constraint matrix A, l is modified by computing c = A * l + bias, l[s[i]] = c[i], where the scatter s is defined by the `PetscSection` returned by `DMGetDefaultConstraints()`.\n\nIf a constraint matrix is specified, then its adjoint is applied during `DMLocalToGlobalBegin()` when mode is `ADD_VALUES`, `ADD_BC_VALUES`, or `ADD_ALL_VALUES`.  Without a constraint matrix, the local vector l is accumulated into a global vector without modification; with a constraint matrix A, l is first modified by computing c[i] = l[s[i]], l[s[i]] = 0, l = l + A'*c, which is the adjoint of the operation described above.  Any bias, if specified, is ignored when accumulating.\n\nThis increments the references of the `PetscSection`, `Mat`, and `Vec`, so they user can destroy them.\n\nSee also: \n=== \n`DM`, `DMGetDefaultConstraints()`\n\n# External Links\n$(_doc_external(\"DM/DMSetDefaultConstraints\"))\n\"\"\"\nfunction DMSetDefaultConstraints(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, mat::PetscMat, bias::PetscVec) end\n\n@for_petsc function DMSetDefaultConstraints(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, mat::PetscMat, bias::PetscVec )\n\n    @chk ccall(\n               (:DMSetDefaultConstraints, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, CMat, CVec),\n               dm, section, mat, bias,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetGlobalSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nGet the `PetscSection` encoding the global data layout for the `DM`.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `section` - The `PetscSection`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSection`.\n\nSee also: \n=== \n`DM`, `DMSetLocalSection()`, `DMGetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetGlobalSection\"))\n\"\"\"\nfunction DMGetGlobalSection(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMGetGlobalSection(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMGetGlobalSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetGlobalSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nSet the `PetscSection` encoding the global data layout for the `DM`.\n\nInput Parameters:\n- `dm`      - The `DM`\n- `section` - The PetscSection, or `NULL`\n\nLevel: intermediate\n\nNote:\nAny existing `PetscSection` will be destroyed\n\nSee also: \n=== \n`DM`, `DMGetGlobalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetGlobalSection\"))\n\"\"\"\nfunction DMSetGlobalSection(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMSetGlobalSection(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMSetGlobalSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetSectionSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \nGet the `PetscSF` encoding the parallel dof overlap for the `DM`. If it has not been set,\nit is created from the default `PetscSection` layouts in the `DM`.\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSF`.\n\nSee also: \n=== \n`DM`, `DMSetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMGetSectionSF\"))\n\"\"\"\nfunction DMGetSectionSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMGetSectionSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMGetSectionSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetSectionSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \nSet the `PetscSF` encoding the parallel dof overlap for the `DM`\n\nInput Parameters:\n- `dm` - The `DM`\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nAny previous `PetscSF` is destroyed\n\nSee also: \n=== \n`DM`, `DMGetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMSetSectionSF\"))\n\"\"\"\nfunction DMSetSectionSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMSetSectionSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMSetSectionSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCreateSectionSF(petsclib::PetscLibType,dm::PetscDM, locSection::PetscSection, globalSection::PetscSection) \nCreate the `PetscSF` encoding the parallel dof overlap for the `DM` based upon the `PetscSection`s\ndescribing the data layout.\n\nInput Parameters:\n- `dm`            - The `DM`\n- `localSection`  - `PetscSection` describing the local data layout\n- `globalSection` - `PetscSection` describing the global data layout\n\nLevel: developer\n\nNote:\nOne usually uses `DMGetSectionSF()` to obtain the `PetscSF`\n\nDeveloper Note:\nSince this routine has for arguments the two sections from the `DM` and puts the resulting `PetscSF`\ndirectly into the `DM`, perhaps this function should not take the local and global sections as\ninput and should just obtain them from the `DM`? Plus PETSc creation functions return the thing\nthey create, this returns nothing\n\nSee also: \n=== \n`DM`, `DMGetSectionSF()`, `DMSetSectionSF()`, `DMGetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSectionSF\"))\n\"\"\"\nfunction DMCreateSectionSF(petsclib::PetscLibType, dm::PetscDM, locSection::PetscSection, globalSection::PetscSection) end\n\n@for_petsc function DMCreateSectionSF(petsclib::$UnionPetscLib, dm::PetscDM, locSection::PetscSection, globalSection::PetscSection )\n\n    @chk ccall(\n               (:DMCreateSectionSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSection),\n               dm, locSection, globalSection,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetPointSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \nGet the `PetscSF` encoding the parallel section point overlap for the `DM`.\n\nNot collective but the resulting `PetscSF` is collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSF`.\n\nSee also: \n=== \n`DM`, `DMSetPointSF()`, `DMGetSectionSF()`, `DMSetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMGetPointSF\"))\n\"\"\"\nfunction DMGetPointSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMGetPointSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMGetPointSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetPointSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \nSet the `PetscSF` encoding the parallel section point overlap for the `DM`.\n\nCollective\n\nInput Parameters:\n- `dm` - The `DM`\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetPointSF()`, `DMGetSectionSF()`, `DMSetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMSetPointSF\"))\n\"\"\"\nfunction DMSetPointSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMSetPointSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMSetPointSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetNaturalSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \nGet the `PetscSF` encoding the map back to the original mesh ordering\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSF`.\n\nSee also: \n=== \n`DM`, `DMSetNaturalSF()`, `DMSetUseNatural()`, `DMGetUseNatural()`, `DMPlexCreateGlobalToNaturalSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNaturalSF\"))\n\"\"\"\nfunction DMGetNaturalSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMGetNaturalSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMGetNaturalSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetNaturalSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \nSet the PetscSF encoding the map back to the original mesh ordering\n\nInput Parameters:\n- `dm` - The DM\n- `sf` - The PetscSF\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNaturalSF()`, `DMSetUseNatural()`, `DMGetUseNatural()`, `DMPlexCreateGlobalToNaturalSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DM/DMSetNaturalSF\"))\n\"\"\"\nfunction DMSetNaturalSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMSetNaturalSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMSetNaturalSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMClearFields(petsclib::PetscLibType,dm::PetscDM) \nRemove all fields from the `DM`\n\nLogically Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNumFields()`, `DMSetNumFields()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMClearFields\"))\n\"\"\"\nfunction DMClearFields(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMClearFields(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMClearFields, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumFields::PetscInt = DMGetNumFields(petsclib::PetscLibType,dm::PetscDM) \nGet the number of fields in the `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `numFields` - The number of fields\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetNumFields()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumFields\"))\n\"\"\"\nfunction DMGetNumFields(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetNumFields(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumFields_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetNumFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, numFields_,\n              )\n\n\tnumFields = numFields_[]\n\n\treturn numFields\nend \n\n\"\"\"\n\tDMSetNumFields(petsclib::PetscLibType,dm::PetscDM, numFields::PetscInt) \nSet the number of fields in the `DM`\n\nLogically Collective\n\nInput Parameters:\n- `dm`        - The `DM`\n- `numFields` - The number of fields\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNumFields()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetNumFields\"))\n\"\"\"\nfunction DMSetNumFields(petsclib::PetscLibType, dm::PetscDM, numFields::PetscInt) end\n\n@for_petsc function DMSetNumFields(petsclib::$UnionPetscLib, dm::PetscDM, numFields::$PetscInt )\n\n    @chk ccall(\n               (:DMSetNumFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, numFields,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetField(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, label::DMLabel, disc::PetscObject) \nReturn the `DMLabel` and discretization object for a given `DM` field\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DM`\n- `f`  - The field number\n\nOutput Parameters:\n- `label` - The label indicating the support of the field, or `NULL` for the entire mesh (pass in `NULL` if not needed)\n- `disc`  - The discretization object (pass in `NULL` if not needed)\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetField\"))\n\"\"\"\nfunction DMGetField(petsclib::PetscLibType, dm::PetscDM, f::PetscInt, label::DMLabel, disc::PetscObject) end\n\n@for_petsc function DMGetField(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt, label::DMLabel, disc::PetscObject )\n\n    @chk ccall(\n               (:DMGetField, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{DMLabel}, Ptr{PetscObject}),\n               dm, f, label, disc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetField(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, label::DMLabel, disc::PetscObject) \nSet the discretization object for a given `DM` field. Usually one would call `DMAddField()` which automatically handles\nthe field numbering.\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `f`     - The field number\n- `label` - The label indicating the support of the field, or `NULL` for the entire mesh\n- `disc`  - The discretization object\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMGetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetField\"))\n\"\"\"\nfunction DMSetField(petsclib::PetscLibType, dm::PetscDM, f::PetscInt, label::DMLabel, disc::PetscObject) end\n\n@for_petsc function DMSetField(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt, label::DMLabel, disc::PetscObject )\n\n    @chk ccall(\n               (:DMSetField, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, DMLabel, PetscObject),\n               dm, f, label, disc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAddField(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, disc::PetscObject) \nAdd a field to a `DM` object. A field is a function space defined by of a set of discretization points (geometric entities)\nand a discretization object that defines the function space associated with those points.\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - The label indicating the support of the field, or `NULL` for the entire mesh\n- `disc`  - The discretization object\n\nLevel: intermediate\n\nNotes:\nThe label already exists or will be added to the `DM` with `DMSetLabel()`.\n\nFor example, a piecewise continuous pressure field can be defined by coefficients at the cell centers of a mesh and piecewise constant functions\nwithin each cell. Thus a specific function in the space is defined by the combination of a `Vec` containing the coefficients, a `DM` defining the\ngeometry entities, a `DMLabel` indicating a subset of those geometric entities, and a discretization object, such as a `PetscFE`.\n\nFortran Note:\nUse the argument `PetscObjectCast(disc)` as the second argument\n\nSee also: \n=== \n`DM`, `DMSetLabel()`, `DMSetField()`, `DMGetField()`, `PetscFE`\n\n# External Links\n$(_doc_external(\"DM/DMAddField\"))\n\"\"\"\nfunction DMAddField(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, disc::PetscObject) end\n\n@for_petsc function DMAddField(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, disc::PetscObject )\n\n    @chk ccall(\n               (:DMAddField, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, PetscObject),\n               dm, label, disc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetFieldAvoidTensor(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, avoidTensor::PetscBool) \nSet flag to avoid defining the field on tensor cells\n\nLogically Collective\n\nInput Parameters:\n- `dm`          - The `DM`\n- `f`           - The field index\n- `avoidTensor` - `PETSC_TRUE` to skip defining the field on tensor cells\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetFieldAvoidTensor()`, `DMSetField()`, `DMGetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetFieldAvoidTensor\"))\n\"\"\"\nfunction DMSetFieldAvoidTensor(petsclib::PetscLibType, dm::PetscDM, f::PetscInt, avoidTensor::PetscBool) end\n\n@for_petsc function DMSetFieldAvoidTensor(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt, avoidTensor::PetscBool )\n\n    @chk ccall(\n               (:DMSetFieldAvoidTensor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscBool),\n               dm, f, avoidTensor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tavoidTensor::PetscBool = DMGetFieldAvoidTensor(petsclib::PetscLibType,dm::PetscDM, f::PetscInt) \nGet flag to avoid defining the field on tensor cells\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DM`\n- `f`  - The field index\n\nOutput Parameter:\n- `avoidTensor` - The flag to avoid defining the field on tensor cells\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMSetField()`, `DMGetField()`, `DMSetFieldAvoidTensor()`\n\n# External Links\n$(_doc_external(\"DM/DMGetFieldAvoidTensor\"))\n\"\"\"\nfunction DMGetFieldAvoidTensor(petsclib::PetscLibType, dm::PetscDM, f::PetscInt) end\n\n@for_petsc function DMGetFieldAvoidTensor(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt )\n\tavoidTensor_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetFieldAvoidTensor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscBool}),\n               dm, f, avoidTensor_,\n              )\n\n\tavoidTensor = avoidTensor_[]\n\n\treturn avoidTensor\nend \n\n\"\"\"\n\tDMCopyFields(petsclib::PetscLibType,dm::PetscDM, minDegree::PetscInt, maxDegree::PetscInt, newdm::PetscDM) \nCopy the discretizations for the `DM` into another `DM`\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM`\n- `minDegree` - Minimum degree for a discretization, or `PETSC_DETERMINE` for no limit\n- `maxDegree` - Maximum degree for a discretization, or `PETSC_DETERMINE` for no limit\n\nOutput Parameter:\n- `newdm` - The `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetField()`, `DMSetField()`, `DMAddField()`, `DMCopyDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyFields\"))\n\"\"\"\nfunction DMCopyFields(petsclib::PetscLibType, dm::PetscDM, minDegree::PetscInt, maxDegree::PetscInt, newdm::PetscDM) end\n\n@for_petsc function DMCopyFields(petsclib::$UnionPetscLib, dm::PetscDM, minDegree::$PetscInt, maxDegree::$PetscInt, newdm::PetscDM )\n\n    @chk ccall(\n               (:DMCopyFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, CDM),\n               dm, minDegree, maxDegree, newdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuseCone::PetscBool,useClosure::PetscBool = DMGetAdjacency(petsclib::PetscLibType,dm::PetscDM, f::PetscInt) \nReturns the flags for determining variable influence\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DM` object\n- `f`  - The field number, or `PETSC_DEFAULT` for the default adjacency\n\nOutput Parameters:\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nNotes:\n-v\nFEM:   Two points p and q are adjacent if q in closure(star(p)),   useCone = PETSC_FALSE, useClosure = PETSC_TRUE\nFVM:   Two points p and q are adjacent if q in support(p+cone(p)), useCone = PETSC_TRUE,  useClosure = PETSC_FALSE\nFVM++: Two points p and q are adjacent if q in star(closure(p)),   useCone = PETSC_TRUE,  useClosure = PETSC_TRUE\n-ve\nFurther explanation can be found in the User's Manual Section on the Influence of Variables on One Another.\n\nSee also: \n=== \n`DM`, `DMSetAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetAdjacency\"))\n\"\"\"\nfunction DMGetAdjacency(petsclib::PetscLibType, dm::PetscDM, f::PetscInt) end\n\n@for_petsc function DMGetAdjacency(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt )\n\tuseCone_ = Ref{PetscBool}()\n\tuseClosure_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetAdjacency, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscBool}, Ptr{PetscBool}),\n               dm, f, useCone_, useClosure_,\n              )\n\n\tuseCone = useCone_[]\n\tuseClosure = useClosure_[]\n\n\treturn useCone,useClosure\nend \n\n\"\"\"\n\tDMSetAdjacency(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, useCone::PetscBool, useClosure::PetscBool) \nSet the flags for determining variable influence\n\nNot Collective\n\nInput Parameters:\n- `dm`         - The `DM` object\n- `f`          - The field number\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMGetAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetAdjacency\"))\n\"\"\"\nfunction DMSetAdjacency(petsclib::PetscLibType, dm::PetscDM, f::PetscInt, useCone::PetscBool, useClosure::PetscBool) end\n\n@for_petsc function DMSetAdjacency(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt, useCone::PetscBool, useClosure::PetscBool )\n\n    @chk ccall(\n               (:DMSetAdjacency, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscBool, PetscBool),\n               dm, f, useCone, useClosure,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuseCone::PetscBool,useClosure::PetscBool = DMGetBasicAdjacency(petsclib::PetscLibType,dm::PetscDM) \nReturns the flags for determining variable influence, using either the default or field 0 if it is defined\n\nNot collective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameters:\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nNotes:\n-vb\nFEM:   Two points p and q are adjacent if q in closure(star(p)),   useCone = PETSC_FALSE, useClosure = PETSC_TRUE\nFVM:   Two points p and q are adjacent if q in support(p+cone(p)), useCone = PETSC_TRUE,  useClosure = PETSC_FALSE\nFVM++: Two points p and q are adjacent if q in star(closure(p)),   useCone = PETSC_TRUE,  useClosure = PETSC_TRUE\n-ve\n\nSee also: \n=== \n`DM`, `DMSetBasicAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBasicAdjacency\"))\n\"\"\"\nfunction DMGetBasicAdjacency(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetBasicAdjacency(petsclib::$UnionPetscLib, dm::PetscDM )\n\tuseCone_ = Ref{PetscBool}()\n\tuseClosure_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetBasicAdjacency, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}, Ptr{PetscBool}),\n               dm, useCone_, useClosure_,\n              )\n\n\tuseCone = useCone_[]\n\tuseClosure = useClosure_[]\n\n\treturn useCone,useClosure\nend \n\n\"\"\"\n\tDMSetBasicAdjacency(petsclib::PetscLibType,dm::PetscDM, useCone::PetscBool, useClosure::PetscBool) \nSet the flags for determining variable influence, using either the default or field 0 if it is defined\n\nNot Collective\n\nInput Parameters:\n- `dm`         - The `DM` object\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nNotes:\n-vb\nFEM:   Two points p and q are adjacent if q in closure(star(p)),   useCone = PETSC_FALSE, useClosure = PETSC_TRUE\nFVM:   Two points p and q are adjacent if q in support(p+cone(p)), useCone = PETSC_TRUE,  useClosure = PETSC_FALSE\nFVM++: Two points p and q are adjacent if q in star(closure(p)),   useCone = PETSC_TRUE,  useClosure = PETSC_TRUE\n-ve\n\nSee also: \n=== \n`DM`, `DMGetBasicAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetBasicAdjacency\"))\n\"\"\"\nfunction DMSetBasicAdjacency(petsclib::PetscLibType, dm::PetscDM, useCone::PetscBool, useClosure::PetscBool) end\n\n@for_petsc function DMSetBasicAdjacency(petsclib::$UnionPetscLib, dm::PetscDM, useCone::PetscBool, useClosure::PetscBool )\n\n    @chk ccall(\n               (:DMSetBasicAdjacency, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, PetscBool),\n               dm, useCone, useClosure,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNds::PetscInt = DMGetNumDS(petsclib::PetscLibType,dm::PetscDM) \nGet the number of discrete systems in the `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `Nds` - The number of `PetscDS` objects\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumDS\"))\n\"\"\"\nfunction DMGetNumDS(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetNumDS(petsclib::$UnionPetscLib, dm::PetscDM )\n\tNds_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetNumDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, Nds_,\n              )\n\n\tNds = Nds_[]\n\n\treturn Nds\nend \n\n\"\"\"\n\tDMClearDS(petsclib::PetscLibType,dm::PetscDM) \nRemove all discrete systems from the `DM`\n\nLogically Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNumDS()`, `DMGetDS()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMClearDS\"))\n\"\"\"\nfunction DMClearDS(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMClearDS(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMClearDS, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetDS(petsclib::PetscLibType,dm::PetscDM, ds::PetscDS) \nGet the default `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `ds` - The default `PetscDS`\n\nLevel: intermediate\n\nNote:\nThe `ds` is owned by the `dm` and should not be destroyed directly.\n\nSee also: \n=== \n`DM`, `DMGetCellDS()`, `DMGetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDS\"))\n\"\"\"\nfunction DMGetDS(petsclib::PetscLibType, dm::PetscDM, ds::PetscDS) end\n\n@for_petsc function DMGetDS(petsclib::$UnionPetscLib, dm::PetscDM, ds::PetscDS )\n\n    @chk ccall(\n               (:DMGetDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscDS}),\n               dm, ds,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCellDS(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, ds::PetscDS, dsIn::PetscDS) \nGet the `PetscDS` defined on a given cell\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `point` - Cell for the `PetscDS`\n\nOutput Parameters:\n- `ds`   - The `PetscDS` defined on the given cell\n- `dsIn` - The `PetscDS` for input on the given cell, or `NULL` if the same ds\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMGetDS()`, `DMSetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellDS\"))\n\"\"\"\nfunction DMGetCellDS(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, ds::PetscDS, dsIn::PetscDS) end\n\n@for_petsc function DMGetCellDS(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, ds::PetscDS, dsIn::PetscDS )\n\n    @chk ccall(\n               (:DMGetCellDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscDS}, Ptr{PetscDS}),\n               dm, point, ds, dsIn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetRegionDS(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) \nGet the `PetscDS` for a given mesh region, defined by a `DMLabel`\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - The `DMLabel` defining the mesh region, or `NULL` for the entire mesh\n\nOutput Parameters:\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL`\n- `ds`     - The `PetscDS` defined on the given region, or `NULL`\n- `dsIn`   - The `PetscDS` for input in the given region, or `NULL`\n\nLevel: advanced\n\nNote:\nIf a non-`NULL` label is given, but there is no `PetscDS` on that specific label,\nthe `PetscDS` for the full domain (if present) is returned. Returns with\nfields = `NULL` and ds = `NULL` if there is no `PetscDS` for the full domain.\n\nSee also: \n=== \n`DM`, `DMGetRegionNumDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetRegionDS\"))\n\"\"\"\nfunction DMGetRegionDS(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) end\n\n@for_petsc function DMGetRegionDS(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS )\n\n    @chk ccall(\n               (:DMGetRegionDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, Ptr{CIS}, Ptr{PetscDS}, Ptr{PetscDS}),\n               dm, label, fields, ds, dsIn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetRegionDS(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) \nSet the `PetscDS` for a given mesh region, defined by a `DMLabel`\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `label`  - The `DMLabel` defining the mesh region, or `NULL` for the entire mesh\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL` for all fields\n- `ds`     - The `PetscDS` defined on the given region\n- `dsIn`   - The `PetscDS` for input on the given cell, or `NULL` if it is the same `PetscDS`\n\nLevel: advanced\n\nNote:\nIf the label has a `PetscDS` defined, it will be replaced. Otherwise, it will be added to the `DM`. If the `PetscDS` is replaced,\nthe fields argument is ignored.\n\nSee also: \n=== \n`DM`, `DMGetRegionDS()`, `DMSetRegionNumDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMSetRegionDS\"))\n\"\"\"\nfunction DMSetRegionDS(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) end\n\n@for_petsc function DMSetRegionDS(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS )\n\n    @chk ccall(\n               (:DMSetRegionDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, CIS, PetscDS, PetscDS),\n               dm, label, fields, ds, dsIn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetRegionNumDS(petsclib::PetscLibType,dm::PetscDM, num::PetscInt, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) \nGet the `PetscDS` for a given mesh region, defined by the region number\n\nNot Collective\n\nInput Parameters:\n- `dm`  - The `DM`\n- `num` - The region number, in [0, Nds)\n\nOutput Parameters:\n- `label`  - The region label, or `NULL`\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL`\n- `ds`     - The `PetscDS` defined on the given region, or `NULL`\n- `dsIn`   - The `PetscDS` for input in the given region, or `NULL`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetRegionDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetRegionNumDS\"))\n\"\"\"\nfunction DMGetRegionNumDS(petsclib::PetscLibType, dm::PetscDM, num::PetscInt, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) end\n\n@for_petsc function DMGetRegionNumDS(petsclib::$UnionPetscLib, dm::PetscDM, num::$PetscInt, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS )\n\n    @chk ccall(\n               (:DMGetRegionNumDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{DMLabel}, Ptr{CIS}, Ptr{PetscDS}, Ptr{PetscDS}),\n               dm, num, label, fields, ds, dsIn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetRegionNumDS(petsclib::PetscLibType,dm::PetscDM, num::PetscInt, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) \nSet the `PetscDS` for a given mesh region, defined by the region number\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `num`    - The region number, in [0, Nds)\n- `label`  - The region label, or `NULL`\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL` to prevent setting\n- `ds`     - The `PetscDS` defined on the given region, or `NULL` to prevent setting\n- `dsIn`   - The `PetscDS` for input on the given cell, or `NULL` if it is the same `PetscDS`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetRegionDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMSetRegionNumDS\"))\n\"\"\"\nfunction DMSetRegionNumDS(petsclib::PetscLibType, dm::PetscDM, num::PetscInt, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS) end\n\n@for_petsc function DMSetRegionNumDS(petsclib::$UnionPetscLib, dm::PetscDM, num::$PetscInt, label::DMLabel, fields::IS, ds::PetscDS, dsIn::PetscDS )\n\n    @chk ccall(\n               (:DMSetRegionNumDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, DMLabel, CIS, PetscDS, PetscDS),\n               dm, num, label, fields, ds, dsIn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum::PetscInt = DMFindRegionNum(petsclib::PetscLibType,dm::PetscDM, ds::PetscDS) \nFind the region number for a given `PetscDS`, or\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DM`\n- `ds` - The `PetscDS` defined on the given region\n\nOutput Parameter:\n- `num` - The region number, in [0, Nds), or -1 if not found\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetRegionNumDS()`, `DMGetRegionDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMFindRegionNum\"))\n\"\"\"\nfunction DMFindRegionNum(petsclib::PetscLibType, dm::PetscDM, ds::PetscDS) end\n\n@for_petsc function DMFindRegionNum(petsclib::$UnionPetscLib, dm::PetscDM, ds::PetscDS )\n\tnum_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMFindRegionNum, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscDS, Ptr{$PetscInt}),\n               dm, ds, num_,\n              )\n\n\tnum = num_[]\n\n\treturn num\nend \n\n\"\"\"\n\tfem::PetscFE = DMCreateFEDefault(petsclib::PetscLibType,dm::PetscDM, Nc::PetscInt, prefix::String, qorder::PetscInt) \nCreate a `PetscFE` based on the celltype for the mesh\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `Nc`     - The number of components for the field\n- `prefix` - The options prefix for the output `PetscFE`, or `NULL`\n- `qorder` - The quadrature order or `PETSC_DETERMINE` to use `PetscSpace` polynomial degree\n\nOutput Parameter:\n- `fem` - The `PetscFE`\n\nLevel: intermediate\n\nNote:\nThis is a convenience method that just calls `PetscFECreateByCell()` underneath.\n\nSee also: \n=== \n`DM`, `PetscFECreateByCell()`, `DMAddField()`, `DMCreateDS()`, `DMGetCellDS()`, `DMGetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateFEDefault\"))\n\"\"\"\nfunction DMCreateFEDefault(petsclib::PetscLibType, dm::PetscDM, Nc::PetscInt, prefix::String, qorder::PetscInt) end\n\n@for_petsc function DMCreateFEDefault(petsclib::$UnionPetscLib, dm::PetscDM, Nc::$PetscInt, prefix::String, qorder::$PetscInt )\n\tfem_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:DMCreateFEDefault, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Cchar}, $PetscInt, Ptr{PetscFE}),\n               dm, Nc, prefix, qorder, fem_,\n              )\n\n\tfem = fem_[]\n\n\treturn fem\nend \n\n\"\"\"\n\tDMCreateDS(petsclib::PetscLibType,dm::PetscDM) \nCreate the discrete systems for the `DM` based upon the fields added to the `DM`\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOptions Database Key:\n- `-dm_petscds_view` - View all the `PetscDS` objects in this `DM`\n\nLevel: intermediate\n\nDeveloper Note:\nThe name of this function is wrong. Create functions always return the created object as one of the arguments.\n\nSee also: \n=== \n`DM`, `DMSetField`, `DMAddField()`, `DMGetDS()`, `DMGetCellDS()`, `DMGetRegionDS()`, `DMSetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateDS\"))\n\"\"\"\nfunction DMCreateDS(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCreateDS(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMCreateDS, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMUseTensorOrder(petsclib::PetscLibType,dm::PetscDM, tensor::PetscBool) \nUse a tensor product closure ordering for the default section\n\nInput Parameters:\n- `dm`     - The DM\n- `tensor` - Flag for tensor order\n\nLevel: developer\n\n-seealso: `DMPlexSetClosurePermutationTensor()`, `PetscSectionResetClosurePermutation()`\n\n# External Links\n$(_doc_external(\"DM/DMUseTensorOrder\"))\n\"\"\"\nfunction DMUseTensorOrder(petsclib::PetscLibType, dm::PetscDM, tensor::PetscBool) end\n\n@for_petsc function DMUseTensorOrder(petsclib::$UnionPetscLib, dm::PetscDM, tensor::PetscBool )\n\n    @chk ccall(\n               (:DMUseTensorOrder, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, tensor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMComputeExactSolution(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, u::PetscVec, u_t::PetscVec) \nCompute the exact solution for a given `DM`, using the `PetscDS` information.\n\nCollective\n\nInput Parameters:\n- `dm`   - The `DM`\n- `time` - The time\n\nOutput Parameters:\n- `u`   - The vector will be filled with exact solution values, or `NULL`\n- `u_t` - The vector will be filled with the time derivative of exact solution values, or `NULL`\n\nLevel: developer\n\nNote:\nThe user must call `PetscDSSetExactSolution()` before using this routine\n\nSee also: \n=== \n`DM`, `PetscDSSetExactSolution()`\n\n# External Links\n$(_doc_external(\"DM/DMComputeExactSolution\"))\n\"\"\"\nfunction DMComputeExactSolution(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, u::PetscVec, u_t::PetscVec) end\n\n@for_petsc function DMComputeExactSolution(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, u::PetscVec, u_t::PetscVec )\n\n    @chk ccall(\n               (:DMComputeExactSolution, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec),\n               dm, time, u, u_t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCopyDS(petsclib::PetscLibType,dm::PetscDM, minDegree::PetscInt, maxDegree::PetscInt, newdm::PetscDM) \nCopy the discrete systems for the `DM` into another `DM`\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM`\n- `minDegree` - Minimum degree for a discretization, or `PETSC_DETERMINE` for no limit\n- `maxDegree` - Maximum degree for a discretization, or `PETSC_DETERMINE` for no limit\n\nOutput Parameter:\n- `newdm` - The `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCopyFields()`, `DMAddField()`, `DMGetDS()`, `DMGetCellDS()`, `DMGetRegionDS()`, `DMSetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyDS\"))\n\"\"\"\nfunction DMCopyDS(petsclib::PetscLibType, dm::PetscDM, minDegree::PetscInt, maxDegree::PetscInt, newdm::PetscDM) end\n\n@for_petsc function DMCopyDS(petsclib::$UnionPetscLib, dm::PetscDM, minDegree::$PetscInt, maxDegree::$PetscInt, newdm::PetscDM )\n\n    @chk ccall(\n               (:DMCopyDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, CDM),\n               dm, minDegree, maxDegree, newdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCopyDisc(petsclib::PetscLibType,dm::PetscDM, newdm::PetscDM) \nCopy the fields and discrete systems for the `DM` into another `DM`\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `newdm` - The `DM`\n\nLevel: advanced\n\nDeveloper Note:\nReally ugly name, nothing in PETSc is called a `Disc` plus it is an ugly abbreviation\n\nSee also: \n=== \n`DM`, `DMCopyFields()`, `DMCopyDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyDisc\"))\n\"\"\"\nfunction DMCopyDisc(petsclib::PetscLibType, dm::PetscDM, newdm::PetscDM) end\n\n@for_petsc function DMCopyDisc(petsclib::$UnionPetscLib, dm::PetscDM, newdm::PetscDM )\n\n    @chk ccall(\n               (:DMCopyDisc, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, newdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt = DMGetDimension(petsclib::PetscLibType,dm::PetscDM) \nReturn the topological dimension of the `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `dim` - The topological dimension\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMSetDimension()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDimension\"))\n\"\"\"\nfunction DMGetDimension(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetDimension(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetDimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tDMSetDimension(petsclib::PetscLibType,dm::PetscDM, dim::PetscInt) \nSet the topological dimension of the `DM`\n\nCollective\n\nInput Parameters:\n- `dm`  - The `DM`\n- `dim` - The topological dimension\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMGetDimension()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMSetDimension\"))\n\"\"\"\nfunction DMSetDimension(petsclib::PetscLibType, dm::PetscDM, dim::PetscInt) end\n\n@for_petsc function DMSetDimension(petsclib::$UnionPetscLib, dm::PetscDM, dim::$PetscInt )\n\n    @chk ccall(\n               (:DMSetDimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt = DMGetDimPoints(petsclib::PetscLibType,dm::PetscDM, dim::PetscInt) \nGet the half\n\nCollective\n\nInput Parameters:\n- `dm`  - the `DM`\n- `dim` - the dimension\n\nOutput Parameters:\n- `pStart` - The first point of the given dimension\n- `pEnd`   - The first point following points of the given dimension\n\nLevel: intermediate\n\nNote:\nThe points are vertices in the Hasse diagram encoding the topology. This is explained in\nhttps://arxiv.org/abs/0908.4427. If no points exist of this dimension in the storage scheme,\nthen the interval is empty.\n\nSee also: \n=== \n`DM`, `DMPLEX`, `DMPlexGetDepthStratum()`, `DMPlexGetHeightStratum()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDimPoints\"))\n\"\"\"\nfunction DMGetDimPoints(petsclib::PetscLibType, dm::PetscDM, dim::PetscInt) end\n\n@for_petsc function DMGetDimPoints(petsclib::$UnionPetscLib, dm::PetscDM, dim::$PetscInt )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetDimPoints, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, dim, pStart_, pEnd_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\n\treturn pStart,pEnd\nend \n\n\"\"\"\n\tDMGetOutputDM(petsclib::PetscLibType,dm::PetscDM, odm::PetscDM) \nRetrieve the `DM` associated with the layout for output\n\nCollective\n\nInput Parameter:\n- `dm` - The original `DM`\n\nOutput Parameter:\n- `odm` - The `DM` which provides the layout for output\n\nLevel: intermediate\n\nNote:\nIn some situations the vector obtained with `DMCreateGlobalVector()` excludes points for degrees of freedom that are associated with fixed (Dirichelet) boundary\nconditions since the algebraic solver does not solve for those variables. The output `DM` includes these excluded points and its global vector contains the\nlocations for those dof so that they can be output to a file or other viewer along with the unconstrained dof.\n\nSee also: \n=== \n`DM`, `VecView()`, `DMGetGlobalSection()`, `DMCreateGlobalVector()`, `PetscSectionHasConstraints()`, `DMSetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetOutputDM\"))\n\"\"\"\nfunction DMGetOutputDM(petsclib::PetscLibType, dm::PetscDM, odm::PetscDM) end\n\n@for_petsc function DMGetOutputDM(petsclib::$UnionPetscLib, dm::PetscDM, odm::PetscDM )\n\todm_ = Ref(odm.ptr)\n\n    @chk ccall(\n               (:DMGetOutputDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, odm_,\n              )\n\n\todm.ptr = odm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum::PetscInt,val::PetscReal = DMGetOutputSequenceNumber(petsclib::PetscLibType,dm::PetscDM) \nRetrieve the sequence number/value for output\n\nInput Parameter:\n- `dm` - The original `DM`\n\nOutput Parameters:\n- `num` - The output sequence number\n- `val` - The output sequence value\n\nLevel: intermediate\n\nNote:\nThis is intended for output that should appear in sequence, for instance\na set of timesteps in an `PETSCVIEWERHDF5` file, or a set of realizations of a stochastic system.\n\nDeveloper Note:\nThe `DM` serves as a convenient place to store the current iteration value. The iteration is not\nnot directly related to the `DM`.\n\nSee also: \n=== \n`DM`, `VecView()`\n\n# External Links\n$(_doc_external(\"DM/DMGetOutputSequenceNumber\"))\n\"\"\"\nfunction DMGetOutputSequenceNumber(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetOutputSequenceNumber(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnum_ = Ref{$PetscInt}()\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMGetOutputSequenceNumber, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               dm, num_, val_,\n              )\n\n\tnum = num_[]\n\tval = val_[]\n\n\treturn num,val\nend \n\n\"\"\"\n\tDMSetOutputSequenceNumber(petsclib::PetscLibType,dm::PetscDM, num::PetscInt, val::PetscReal) \nSet the sequence number/value for output\n\nInput Parameters:\n- `dm`  - The original `DM`\n- `num` - The output sequence number\n- `val` - The output sequence value\n\nLevel: intermediate\n\nNote:\nThis is intended for output that should appear in sequence, for instance\na set of timesteps in an `PETSCVIEWERHDF5` file, or a set of realizations of a stochastic system.\n\nSee also: \n=== \n`DM`, `VecView()`\n\n# External Links\n$(_doc_external(\"DM/DMSetOutputSequenceNumber\"))\n\"\"\"\nfunction DMSetOutputSequenceNumber(petsclib::PetscLibType, dm::PetscDM, num::PetscInt, val::PetscReal) end\n\n@for_petsc function DMSetOutputSequenceNumber(petsclib::$UnionPetscLib, dm::PetscDM, num::$PetscInt, val::$PetscReal )\n\n    @chk ccall(\n               (:DMSetOutputSequenceNumber, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscReal),\n               dm, num, val,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tval::PetscReal = DMOutputSequenceLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, name::String, num::PetscInt) \nRetrieve the sequence value from a `PetscViewer`\n\nInput Parameters:\n- `dm`     - The original `DM`\n- `viewer` - The `PetscViewer` to get it from\n- `name`   - The sequence name\n- `num`    - The output sequence number\n\nOutput Parameter:\n- `val` - The output sequence value\n\nLevel: intermediate\n\nNote:\nThis is intended for output that should appear in sequence, for instance\na set of timesteps in an `PETSCVIEWERHDF5` file, or a set of realizations of a stochastic system.\n\nDeveloper Note:\nIt is unclear at the user API level why a `DM` is needed as input\n\nSee also: \n=== \n`DM`, `DMGetOutputSequenceNumber()`, `DMSetOutputSequenceNumber()`, `VecView()`\n\n# External Links\n$(_doc_external(\"DM/DMOutputSequenceLoad\"))\n\"\"\"\nfunction DMOutputSequenceLoad(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, name::String, num::PetscInt) end\n\n@for_petsc function DMOutputSequenceLoad(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, name::String, num::$PetscInt )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMOutputSequenceLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, Ptr{Cchar}, $PetscInt, Ptr{$PetscReal}),\n               dm, viewer, name, num, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tlen::PetscInt = DMGetOutputSequenceLength(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, name::String) \nRetrieve the number of sequence values from a `PetscViewer`\n\nInput Parameters:\n- `dm`     - The original `DM`\n- `viewer` - The `PetscViewer` to get it from\n- `name`   - The sequence name\n\nOutput Parameter:\n- `len` - The length of the output sequence\n\nLevel: intermediate\n\nNote:\nThis is intended for output that should appear in sequence, for instance\na set of timesteps in an `PETSCVIEWERHDF5` file, or a set of realizations of a stochastic system.\n\nDeveloper Note:\nIt is unclear at the user API level why a `DM` is needed as input\n\nSee also: \n=== \n`DM`, `DMGetOutputSequenceNumber()`, `DMSetOutputSequenceNumber()`, `VecView()`\n\n# External Links\n$(_doc_external(\"DM/DMGetOutputSequenceLength\"))\n\"\"\"\nfunction DMGetOutputSequenceLength(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, name::String) end\n\n@for_petsc function DMGetOutputSequenceLength(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, name::String )\n\tlen_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetOutputSequenceLength, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, Ptr{Cchar}, Ptr{$PetscInt}),\n               dm, viewer, name, len_,\n              )\n\n\tlen = len_[]\n\n\treturn len\nend \n\n\"\"\"\n\tuseNatural::PetscBool = DMGetUseNatural(petsclib::PetscLibType,dm::PetscDM) \nGet the flag for creating a mapping to the natural order when a `DM` is (re)distributed in parallel\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `useNatural` - `PETSC_TRUE` to build the mapping to a natural order during distribution\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMSetUseNatural()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMGetUseNatural\"))\n\"\"\"\nfunction DMGetUseNatural(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetUseNatural(petsclib::$UnionPetscLib, dm::PetscDM )\n\tuseNatural_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetUseNatural, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, useNatural_,\n              )\n\n\tuseNatural = useNatural_[]\n\n\treturn useNatural\nend \n\n\"\"\"\n\tDMSetUseNatural(petsclib::PetscLibType,dm::PetscDM, useNatural::PetscBool) \nSet the flag for creating a mapping to the natural order when a `DM` is (re)distributed in parallel\n\nCollective\n\nInput Parameters:\n- `dm`         - The `DM`\n- `useNatural` - `PETSC_TRUE` to build the mapping to a natural order during distribution\n\nLevel: beginner\n\nNote:\nThis also causes the map to be build after `DMCreateSubDM()` and `DMCreateSuperDM()`\n\nSee also: \n=== \n`DM`, `DMGetUseNatural()`, `DMCreate()`, `DMPlexDistribute()`, `DMCreateSubDM()`, `DMCreateSuperDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetUseNatural\"))\n\"\"\"\nfunction DMSetUseNatural(petsclib::PetscLibType, dm::PetscDM, useNatural::PetscBool) end\n\n@for_petsc function DMSetUseNatural(petsclib::$UnionPetscLib, dm::PetscDM, useNatural::PetscBool )\n\n    @chk ccall(\n               (:DMSetUseNatural, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, useNatural,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCreateLabel(petsclib::PetscLibType,dm::PetscDM, name::String) \nCreate a label of the given name if it does not already exist in the `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - The label name\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabelCreate()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateLabel\"))\n\"\"\"\nfunction DMCreateLabel(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMCreateLabel(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\n    @chk ccall(\n               (:DMCreateLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCreateLabelAtIndex(petsclib::PetscLibType,dm::PetscDM, l::PetscInt, name::String) \nCreate a label of the given name at the given index. If it already exists in the `DM`, move it to this index.\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `l`    - The index for the label\n- `name` - The label name\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMCreateLabel()`, `DMLabelCreate()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateLabelAtIndex\"))\n\"\"\"\nfunction DMCreateLabelAtIndex(petsclib::PetscLibType, dm::PetscDM, l::PetscInt, name::String) end\n\n@for_petsc function DMCreateLabelAtIndex(petsclib::$UnionPetscLib, dm::PetscDM, l::$PetscInt, name::String )\n\n    @chk ccall(\n               (:DMCreateLabelAtIndex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Cchar}),\n               dm, l, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalue::PetscInt = DMGetLabelValue(petsclib::PetscLibType,dm::PetscDM, name::String, point::PetscInt) \nGet the value in a `DMLabel` for the given point, with\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `point` - The mesh point\n\nOutput Parameter:\n- `value` - The label value for this point, or -1 if the point is not in the label\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelValue\"))\n\"\"\"\nfunction DMGetLabelValue(petsclib::PetscLibType, dm::PetscDM, name::String, point::PetscInt) end\n\n@for_petsc function DMGetLabelValue(petsclib::$UnionPetscLib, dm::PetscDM, name::String, point::$PetscInt )\n\tvalue_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetLabelValue, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}),\n               dm, name, point, value_,\n              )\n\n\tvalue = value_[]\n\n\treturn value\nend \n\n\"\"\"\n\tDMSetLabelValue(petsclib::PetscLibType,dm::PetscDM, name::String, point::PetscInt, value::PetscInt) \nAdd a point to a `DMLabel` with given value\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `point` - The mesh point\n- `value` - The label value for this point\n\nOutput Parameter:\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelSetValue()`, `DMGetStratumIS()`, `DMClearLabelValue()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLabelValue\"))\n\"\"\"\nfunction DMSetLabelValue(petsclib::PetscLibType, dm::PetscDM, name::String, point::PetscInt, value::PetscInt) end\n\n@for_petsc function DMSetLabelValue(petsclib::$UnionPetscLib, dm::PetscDM, name::String, point::$PetscInt, value::$PetscInt )\n\n    @chk ccall(\n               (:DMSetLabelValue, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, $PetscInt),\n               dm, name, point, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMClearLabelValue(petsclib::PetscLibType,dm::PetscDM, name::String, point::PetscInt, value::PetscInt) \nRemove a point from a `DMLabel` with given value\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `point` - The mesh point\n- `value` - The label value for this point\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelClearValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMClearLabelValue\"))\n\"\"\"\nfunction DMClearLabelValue(petsclib::PetscLibType, dm::PetscDM, name::String, point::PetscInt, value::PetscInt) end\n\n@for_petsc function DMClearLabelValue(petsclib::$UnionPetscLib, dm::PetscDM, name::String, point::$PetscInt, value::$PetscInt )\n\n    @chk ccall(\n               (:DMClearLabelValue, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, $PetscInt),\n               dm, name, point, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt = DMGetLabelSize(petsclib::PetscLibType,dm::PetscDM, name::String) \nGet the value of `DMLabelGetNumValues()` of a `DMLabel` in the `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n- `size` - The number of different integer ids, or 0 if the label does not exist\n\nLevel: beginner\n\nDeveloper Note:\nThis should be renamed to something like `DMGetLabelNumValues()` or removed.\n\nSee also: \n=== \n`DM`, `DMLabelGetNumValues()`, `DMSetLabelValue()`, `DMGetLabel()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelSize\"))\n\"\"\"\nfunction DMGetLabelSize(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMGetLabelSize(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetLabelSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{$PetscInt}),\n               dm, name, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tDMGetLabelIdIS(petsclib::PetscLibType,dm::PetscDM, name::String, ids::IS) \nGet the `DMLabelGetValueIS()` from a `DMLabel` in the `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n- `ids` - The integer ids, or `NULL` if the label does not exist\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetValueIS()`, `DMGetLabelSize()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelIdIS\"))\n\"\"\"\nfunction DMGetLabelIdIS(petsclib::PetscLibType, dm::PetscDM, name::String, ids::IS) end\n\n@for_petsc function DMGetLabelIdIS(petsclib::$UnionPetscLib, dm::PetscDM, name::String, ids::IS )\n\n    @chk ccall(\n               (:DMGetLabelIdIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CIS}),\n               dm, name, ids,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt = DMGetStratumSize(petsclib::PetscLibType,dm::PetscDM, name::String, value::PetscInt) \nGet the number of points in a label stratum\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `name`  - The label name of the stratum\n- `value` - The stratum value\n\nOutput Parameter:\n- `size` - The number of points, also called the stratum size\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetStratumSize()`, `DMGetLabelSize()`, `DMGetLabelIds()`\n\n# External Links\n$(_doc_external(\"DM/DMGetStratumSize\"))\n\"\"\"\nfunction DMGetStratumSize(petsclib::PetscLibType, dm::PetscDM, name::String, value::PetscInt) end\n\n@for_petsc function DMGetStratumSize(petsclib::$UnionPetscLib, dm::PetscDM, name::String, value::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetStratumSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}),\n               dm, name, value, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tDMGetStratumIS(petsclib::PetscLibType,dm::PetscDM, name::String, value::PetscInt, points::IS) \nGet the points in a label stratum\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `value` - The stratum value\n\nOutput Parameter:\n- `points` - The stratum points, or `NULL` if the label does not exist or does not have that value\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetStratumIS()`, `DMGetStratumSize()`\n\n# External Links\n$(_doc_external(\"DM/DMGetStratumIS\"))\n\"\"\"\nfunction DMGetStratumIS(petsclib::PetscLibType, dm::PetscDM, name::String, value::PetscInt, points::IS) end\n\n@for_petsc function DMGetStratumIS(petsclib::$UnionPetscLib, dm::PetscDM, name::String, value::$PetscInt, points::IS )\n\n    @chk ccall(\n               (:DMGetStratumIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, Ptr{CIS}),\n               dm, name, value, points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetStratumIS(petsclib::PetscLibType,dm::PetscDM, name::String, value::PetscInt, points::IS) \nSet the points in a label stratum\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM` object\n- `name`   - The label name\n- `value`  - The stratum value\n- `points` - The stratum points\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMClearLabelStratum()`, `DMLabelClearStratum()`, `DMLabelSetStratumIS()`, `DMGetStratumSize()`\n\n# External Links\n$(_doc_external(\"DM/DMSetStratumIS\"))\n\"\"\"\nfunction DMSetStratumIS(petsclib::PetscLibType, dm::PetscDM, name::String, value::PetscInt, points::CIS) end\n\n@for_petsc function DMSetStratumIS(petsclib::$UnionPetscLib, dm::PetscDM, name::String, value::$PetscInt, points::IS )\n\n    @chk ccall(\n               (:DMSetStratumIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, CIS),\n               dm, name, value, points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMClearLabelStratum(petsclib::PetscLibType,dm::PetscDM, name::String, value::PetscInt) \nRemove all points from a stratum from a `DMLabel`\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `value` - The label value for this point\n\nOutput Parameter:\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMLabelClearStratum()`, `DMSetLabelValue()`, `DMGetStratumIS()`, `DMClearLabelValue()`\n\n# External Links\n$(_doc_external(\"DM/DMClearLabelStratum\"))\n\"\"\"\nfunction DMClearLabelStratum(petsclib::PetscLibType, dm::PetscDM, name::String, value::PetscInt) end\n\n@for_petsc function DMClearLabelStratum(petsclib::$UnionPetscLib, dm::PetscDM, name::String, value::$PetscInt )\n\n    @chk ccall(\n               (:DMClearLabelStratum, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt),\n               dm, name, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumLabels::PetscInt = DMGetNumLabels(petsclib::PetscLibType,dm::PetscDM) \nReturn the number of labels defined by on the `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `numLabels` - the number of Labels\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetLabelByNum()`, `DMGetLabelName()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumLabels\"))\n\"\"\"\nfunction DMGetNumLabels(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetNumLabels(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumLabels_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetNumLabels, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, numLabels_,\n              )\n\n\tnumLabels = numLabels_[]\n\n\treturn numLabels\nend \n\n\"\"\"\n\tDMGetLabelName(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, name::String) \nReturn the name of nth label\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DM` object\n- `n`  - the label number\n\nOutput Parameter:\n- `name` - the label name\n\nLevel: intermediate\n\nDeveloper Note:\nSome of the functions that appropriate on labels using their number have the suffix ByNum, others do not.\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetLabelByNum()`, `DMGetLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelName\"))\n\"\"\"\nfunction DMGetLabelName(petsclib::PetscLibType, dm::PetscDM, n::PetscInt, name::String) end\n\n@for_petsc function DMGetLabelName(petsclib::$UnionPetscLib, dm::PetscDM, n::$PetscInt, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:DMGetLabelName, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}),\n               dm, n, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasLabel::PetscBool = DMHasLabel(petsclib::PetscLibType,dm::PetscDM, name::String) \nDetermine whether the `DM` has a label of a given name\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n- `hasLabel` - `PETSC_TRUE` if the label is present\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetLabel()`, `DMGetLabelByNum()`, `DMCreateLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMHasLabel\"))\n\"\"\"\nfunction DMHasLabel(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMHasLabel(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\thasLabel_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{PetscBool}),\n               dm, name, hasLabel_,\n              )\n\n\thasLabel = hasLabel_[]\n\n\treturn hasLabel\nend \n\n\"\"\"\n\tDMGetLabel(petsclib::PetscLibType,dm::PetscDM, name::String, label::DMLabel) \nReturn the label of a given name, or `NULL`, from a `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n- `label` - The `DMLabel`, or `NULL` if the label is absent\n\nDefault labels in a `DMPLEX`:\n- `\"depth\"`       - Holds the depth (co-dimension) of each mesh point\n- `\"celltype\"`    - Holds the topological type of each cell\n- `\"ghost\"`       - If the DM is distributed with overlap, this marks the cells and faces in the overlap\n- `\"Cell Sets\"`   - Mirrors the cell sets defined by GMsh and ExodusII\n- `\"Face Sets\"`   - Mirrors the face sets defined by GMsh and ExodusII\n- `\"Vertex Sets\"` - Mirrors the vertex sets defined by GMsh\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMHasLabel()`, `DMGetLabelByNum()`, `DMAddLabel()`, `DMCreateLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetCellType()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabel\"))\n\"\"\"\nfunction DMGetLabel(petsclib::PetscLibType, dm::PetscDM, name::String, label::DMLabel) end\n\n@for_petsc function DMGetLabel(petsclib::$UnionPetscLib, dm::PetscDM, name::String, label::DMLabel )\n\n    @chk ccall(\n               (:DMGetLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{DMLabel}),\n               dm, name, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetLabelByNum(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, label::DMLabel) \nReturn the nth label on a `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DM` object\n- `n`  - the label number\n\nOutput Parameter:\n- `label` - the label\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMAddLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelByNum\"))\n\"\"\"\nfunction DMGetLabelByNum(petsclib::PetscLibType, dm::PetscDM, n::PetscInt, label::DMLabel) end\n\n@for_petsc function DMGetLabelByNum(petsclib::$UnionPetscLib, dm::PetscDM, n::$PetscInt, label::DMLabel )\n\n    @chk ccall(\n               (:DMGetLabelByNum, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{DMLabel}),\n               dm, n, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAddLabel(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nAdd the label to this `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `label` - The `DMLabel`\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMAddLabel\"))\n\"\"\"\nfunction DMAddLabel(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMAddLabel(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMAddLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetLabel(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nReplaces the label of a given name, or ignores it if the name is not present\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM` object\n- `label` - The `DMLabel`, having the same name, to substitute\n\nDefault labels in a `DMPLEX`:\n- `\"depth\"`       - Holds the depth (co-dimension) of each mesh point\n- `\"celltype\"`    - Holds the topological type of each cell\n- `\"ghost\"`       - If the DM is distributed with overlap, this marks the cells and faces in the overlap\n- `\"Cell Sets\"`   - Mirrors the cell sets defined by GMsh and ExodusII\n- `\"Face Sets\"`   - Mirrors the face sets defined by GMsh and ExodusII\n- `\"Vertex Sets\"` - Mirrors the vertex sets defined by GMsh\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetCellType()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLabel\"))\n\"\"\"\nfunction DMSetLabel(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMSetLabel(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMSetLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRemoveLabel(petsclib::PetscLibType,dm::PetscDM, name::String, label::DMLabel) \nRemove the label given by name from this `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n- `label` - The `DMLabel`, or `NULL` if the label is absent. Pass in `NULL` to call `DMLabelDestroy()` on the label, otherwise the\ncaller is responsible for calling `DMLabelDestroy()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMLabelDestroy()`, `DMRemoveLabelBySelf()`\n\n# External Links\n$(_doc_external(\"DM/DMRemoveLabel\"))\n\"\"\"\nfunction DMRemoveLabel(petsclib::PetscLibType, dm::PetscDM, name::String, label::DMLabel) end\n\n@for_petsc function DMRemoveLabel(petsclib::$UnionPetscLib, dm::PetscDM, name::String, label::DMLabel )\n\n    @chk ccall(\n               (:DMRemoveLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{DMLabel}),\n               dm, name, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRemoveLabelBySelf(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, failNotFound::PetscBool) \nRemove the label from this `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`           - The `DM` object\n- `label`        - The `DMLabel` to be removed from the `DM`\n- `failNotFound` - Should it fail if the label is not found in the `DM`?\n\nLevel: developer\n\nNote:\nOnly exactly the same instance is removed if found, name match is ignored.\nIf the `DM` has an exclusive reference to the label, the label gets destroyed and\n*label nullified.\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabel()` `DMGetLabelValue()`, `DMSetLabelValue()`, `DMLabelDestroy()`, `DMRemoveLabel()`\n\n# External Links\n$(_doc_external(\"DM/DMRemoveLabelBySelf\"))\n\"\"\"\nfunction DMRemoveLabelBySelf(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, failNotFound::PetscBool) end\n\n@for_petsc function DMRemoveLabelBySelf(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, failNotFound::PetscBool )\n\n    @chk ccall(\n               (:DMRemoveLabelBySelf, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMLabel}, PetscBool),\n               dm, label, failNotFound,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toutput::PetscBool = DMGetLabelOutput(petsclib::PetscLibType,dm::PetscDM, name::String) \nGet the output flag for a given label\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n- `output` - The flag for output\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMSetLabelOutput()`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelOutput\"))\n\"\"\"\nfunction DMGetLabelOutput(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMGetLabelOutput(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\toutput_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetLabelOutput, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{PetscBool}),\n               dm, name, output_,\n              )\n\n\toutput = output_[]\n\n\treturn output\nend \n\n\"\"\"\n\tDMSetLabelOutput(petsclib::PetscLibType,dm::PetscDM, name::String, output::PetscBool) \nSet if a given label should be saved to a `PetscViewer` in calls to `DMView()`\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM` object\n- `name`   - The label name\n- `output` - `PETSC_TRUE` to save the label to the viewer\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetOutputFlag()`, `DMGetLabelOutput()`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLabelOutput\"))\n\"\"\"\nfunction DMSetLabelOutput(petsclib::PetscLibType, dm::PetscDM, name::String, output::PetscBool) end\n\n@for_petsc function DMSetLabelOutput(petsclib::$UnionPetscLib, dm::PetscDM, name::String, output::PetscBool )\n\n    @chk ccall(\n               (:DMSetLabelOutput, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, PetscBool),\n               dm, name, output,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCopyLabels(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM, mode::PetscCopyMode, all::PetscBool, emode::DMCopyLabelsMode) \nCopy labels from one `DM` mesh to another `DM` with a superset of the points\n\nCollective\n\nInput Parameters:\n- `dmA`   - The `DM` object with initial labels\n- `dmB`   - The `DM` object to which labels are copied\n- `mode`  - Copy labels by pointers (`PETSC_OWN_POINTER`) or duplicate them (`PETSC_COPY_VALUES`)\n- `all`   - Copy all labels including \"depth\", \"dim\", and \"celltype\" (`PETSC_TRUE`) which are otherwise ignored (`PETSC_FALSE`)\n- `emode` - How to behave when a `DMLabel` in the source and destination `DM`s with the same name is encountered (see `DMCopyLabelsMode`)\n\nLevel: intermediate\n\nNote:\nThis is typically used when interpolating or otherwise adding to a mesh, or testing.\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMAddLabel()`, `DMCopyLabelsMode`\n\n# External Links\n$(_doc_external(\"DM/DMCopyLabels\"))\n\"\"\"\nfunction DMCopyLabels(petsclib::PetscLibType, dmA::PetscDM, dmB::PetscDM, mode::PetscCopyMode, all::PetscBool, emode::DMCopyLabelsMode) end\n\n@for_petsc function DMCopyLabels(petsclib::$UnionPetscLib, dmA::PetscDM, dmB::PetscDM, mode::PetscCopyMode, all::PetscBool, emode::DMCopyLabelsMode )\n\n    @chk ccall(\n               (:DMCopyLabels, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, PetscCopyMode, PetscBool, DMCopyLabelsMode),\n               dmA, dmB, mode, all, emode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tequal::PetscBool = DMCompareLabels(petsclib::PetscLibType,dm0::PetscDM, dm1::PetscDM, message::String) \nCompare labels between two `DM` objects\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `dm0` - First `DM` object\n- `dm1` - Second `DM` object\n\nOutput Parameters:\n- `equal`   - (Optional) Flag whether labels of `dm0` and `dm1` are the same\n- `message` - (Optional) Message describing the difference, or `NULL` if there is no difference\n\nLevel: intermediate\n\nNotes:\nThe output flag equal will be the same on all processes.\n\nIf equal is passed as `NULL` and difference is found, an error is thrown on all processes.\n\nMake sure to pass equal is `NULL` on all processes or none of them.\n\nThe output message is set independently on each rank.\n\nmessage must be freed with `PetscFree()`\n\nIf message is passed as `NULL` and a difference is found, the difference description is printed to `stderr` in synchronized manner.\n\nMake sure to pass message as `NULL` on all processes or no processes.\n\nLabels are matched by name. If the number of labels and their names are equal,\n`DMLabelCompare()` is used to compare each pair of labels with the same name.\n\nDeveloper Note:\nCannot automatically generate the Fortran stub because `message` must be freed with `PetscFree()`\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMAddLabel()`, `DMCopyLabelsMode`, `DMLabelCompare()`\n\n# External Links\n$(_doc_external(\"DM/DMCompareLabels\"))\n\"\"\"\nfunction DMCompareLabels(petsclib::PetscLibType, dm0::PetscDM, dm1::PetscDM, message::String) end\n\n@for_petsc function DMCompareLabels(petsclib::$UnionPetscLib, dm0::PetscDM, dm1::PetscDM, message::String )\n\tequal_ = Ref{PetscBool}()\n\tmessage_ = Ref(pointer(message))\n\n    @chk ccall(\n               (:DMCompareLabels, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{PetscBool}, Ptr{Ptr{Cchar}}),\n               dm0, dm1, equal_, message_,\n              )\n\n\tequal = equal_[]\n\n\treturn equal\nend \n\n\"\"\"\n\tDMGetCoarseDM(petsclib::PetscLibType,dm::PetscDM, cdm::PetscDM) \nGet the coarse `DM`from which this `DM` was obtained by refinement\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `cdm` - The coarse `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetCoarseDM()`, `DMCoarsen()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoarseDM\"))\n\"\"\"\nfunction DMGetCoarseDM(petsclib::PetscLibType, dm::PetscDM, cdm::PetscDM) end\n\n@for_petsc function DMGetCoarseDM(petsclib::$UnionPetscLib, dm::PetscDM, cdm::PetscDM )\n\tcdm_ = Ref(cdm.ptr)\n\n    @chk ccall(\n               (:DMGetCoarseDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, cdm_,\n              )\n\n\tcdm.ptr = cdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCoarseDM(petsclib::PetscLibType,dm::PetscDM, cdm::PetscDM) \nSet the coarse `DM` from which this `DM` was obtained by refinement\n\nInput Parameters:\n- `dm`  - The `DM` object\n- `cdm` - The coarse `DM`\n\nLevel: intermediate\n\nNote:\nNormally this is set automatically by `DMRefine()`\n\nSee also: \n=== \n`DM`, `DMGetCoarseDM()`, `DMCoarsen()`, `DMSetRefine()`, `DMSetFineDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoarseDM\"))\n\"\"\"\nfunction DMSetCoarseDM(petsclib::PetscLibType, dm::PetscDM, cdm::PetscDM) end\n\n@for_petsc function DMSetCoarseDM(petsclib::$UnionPetscLib, dm::PetscDM, cdm::PetscDM )\n\n    @chk ccall(\n               (:DMSetCoarseDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, cdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetFineDM(petsclib::PetscLibType,dm::PetscDM, fdm::PetscDM) \nGet the fine mesh from which this `DM` was obtained by coarsening\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `fdm` - The fine `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetFineDM()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMGetFineDM\"))\n\"\"\"\nfunction DMGetFineDM(petsclib::PetscLibType, dm::PetscDM, fdm::PetscDM) end\n\n@for_petsc function DMGetFineDM(petsclib::$UnionPetscLib, dm::PetscDM, fdm::PetscDM )\n\tfdm_ = Ref(fdm.ptr)\n\n    @chk ccall(\n               (:DMGetFineDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, fdm_,\n              )\n\n\tfdm.ptr = fdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetFineDM(petsclib::PetscLibType,dm::PetscDM, fdm::PetscDM) \nSet the fine mesh from which this was obtained by coarsening\n\nInput Parameters:\n- `dm`  - The `DM` object\n- `fdm` - The fine `DM`\n\nLevel: developer\n\nNote:\nNormally this is set automatically by `DMCoarsen()`\n\nSee also: \n=== \n`DM`, `DMGetFineDM()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMSetFineDM\"))\n\"\"\"\nfunction DMSetFineDM(petsclib::PetscLibType, dm::PetscDM, fdm::PetscDM) end\n\n@for_petsc function DMSetFineDM(petsclib::$UnionPetscLib, dm::PetscDM, fdm::PetscDM )\n\n    @chk ccall(\n               (:DMSetFineDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, fdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbd::PetscInt = DMAddBoundary(petsclib::PetscLibType,dm::PetscDM, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) \nAdd a boundary condition, for a single field, to a model represented by a `DM`\n\nCollective\n\nInput Parameters:\n- `dm`       - The `DM`, with a `PetscDS` that matches the problem being constrained\n- `type`     - The type of condition, e.g. `DM_BC_ESSENTIAL_ANALYTIC`, `DM_BC_ESSENTIAL_FIELD` (Dirichlet), or `DM_BC_NATURAL` (Neumann)\n- `name`     - The BC name\n- `label`    - The label defining constrained points\n- `Nv`       - The number of `DMLabel` values for constrained points\n- `values`   - An array of values for constrained points\n- `field`    - The field to constrain\n- `Nc`       - The number of constrained field components (0 will constrain all components)\n- `comps`    - An array of constrained component numbers\n- `bcFunc`   - A pointwise function giving boundary values\n- `bcFunc_t` - A pointwise function giving the time derivative of the boundary values, or `NULL`\n- `ctx`      - An optional user context for bcFunc\n\nOutput Parameter:\n- `bd` - (Optional) Boundary number\n\nOptions Database Keys:\n- `-bc_<boundary name> <num>`      - Overrides the boundary ids\n- `-bc_<boundary name>_comp <num>` - Overrides the boundary components\n\nLevel: intermediate\n\nNotes:\nIf the `DM` is of type `DMPLEX` and the field is of type `PetscFE`, then this function completes the label using `DMPlexLabelComplete()`.\n\nBoth bcFunc and bcFunc_t will depend on the boundary condition type. If the type if `DM_BC_ESSENTIAL`, then the calling sequence is:\n-vb\nvoid bcFunc(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, PetscScalar bcval[])\n-ve\n\nIf the type is `DM_BC_ESSENTIAL_FIELD` or other _FIELD value, then the calling sequence is:\n\n-vb\nvoid bcFunc(PetscInt dim, PetscInt Nf, PetscInt NfAux,\nconst PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],\nconst PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],\nPetscReal time, const PetscReal x[], PetscScalar bcval[])\n-ve\n- `dim` - the spatial dimension\n- `Nf` - the number of fields\n- `uOff` - the offset into u[] and u_t[] for each field\n- `uOff_x` - the offset into u_x[] for each field\n- `u` - each field evaluated at the current point\n- `u_t` - the time derivative of each field evaluated at the current point\n- `u_x` - the gradient of each field evaluated at the current point\n- `aOff` - the offset into a[] and a_t[] for each auxiliary field\n- `aOff_x` - the offset into a_x[] for each auxiliary field\n- `a` - each auxiliary field evaluated at the current point\n- `a_t` - the time derivative of each auxiliary field evaluated at the current point\n- `a_x` - the gradient of auxiliary each field evaluated at the current point\n- `t` - current time\n- `x` - coordinates of the current point\n- `numConstants` - number of constant parameters\n- `constants` - constant parameters\n- `bcval` - output values at the current point\n\nSee also: \n=== \n`DM`, `DSGetBoundary()`, `PetscDSAddBoundary()`\n\n# External Links\n$(_doc_external(\"DM/DMAddBoundary\"))\n\"\"\"\nfunction DMAddBoundary(petsclib::PetscLibType, dm::PetscDM, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) end\n\n@for_petsc function DMAddBoundary(petsclib::$UnionPetscLib, dm::PetscDM, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::$PetscInt, values::Vector{$PetscInt}, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid )\n\tbd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMAddBoundary, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMBoundaryConditionType, Ptr{Cchar}, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscVoidFn}, Ptr{PetscVoidFn}, Ptr{Cvoid}, Ptr{$PetscInt}),\n               dm, type, name, label, Nv, values, field, Nc, comps, bcFunc, bcFunc_t, ctx, bd_,\n              )\n\n\tbd = bd_[]\n\n\treturn bd\nend \n\n\"\"\"\n\tisBd::PetscBool = DMIsBoundaryPoint(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMIsBoundaryPoint\"))\n\"\"\"\nfunction DMIsBoundaryPoint(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMIsBoundaryPoint(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\tisBd_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMIsBoundaryPoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscBool}),\n               dm, point, isBd_,\n              )\n\n\tisBd = isBd_[]\n\n\treturn isBd\nend \n\n\"\"\"\n\thasBound::PetscBool = DMHasBound(petsclib::PetscLibType,dm::PetscDM) \nDetermine whether a bound condition was specified\n\nLogically collective\n\nInput Parameter:\n- `dm` - The `DM`, with a `PetscDS` that matches the problem being constrained\n\nOutput Parameter:\n- `hasBound` - Flag indicating if a bound condition was specified\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DSAddBoundary()`, `PetscDSAddBoundary()`\n\n# External Links\n$(_doc_external(\"DM/DMHasBound\"))\n\"\"\"\nfunction DMHasBound(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMHasBound(petsclib::$UnionPetscLib, dm::PetscDM )\n\thasBound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasBound, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, hasBound_,\n              )\n\n\thasBound = hasBound_[]\n\n\treturn hasBound\nend \n\n#=\n\"\"\"\n\tDMProjectFieldLocal(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locU::PetscVec, ::Cvoid(funcs) \nThis projects the given function of the input fields into the function space provided by the `DM`, putting the coefficients in a local vector.\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `time`   - The time\n- `localU` - The input field vector; may be `NULL` if projection is defined purely by coordinates\n- `funcs`  - The functions to evaluate, one per field\n- `mode`   - The insertion mode for values\n\nOutput Parameter:\n- `localX` - The output vector\n\nCalling sequence of `funcs`:\n- `dim`          - The spatial dimension\n- `Nf`           - The number of input fields\n- `NfAux`        - The number of input auxiliary fields\n- `uOff`         - The offset of each field in u[]\n- `uOff_x`       - The offset of each field in u_x[]\n- `u`            - The field values at this point in space\n- `u_t`          - The field time derivative at this point in space (or `NULL`)\n- `u_x`          - The field derivatives at this point in space\n- `aOff`         - The offset of each auxiliary field in u[]\n- `aOff_x`       - The offset of each auxiliary field in u_x[]\n- `a`            - The auxiliary field values at this point in space\n- `a_t`          - The auxiliary field time derivative at this point in space (or `NULL`)\n- `a_x`          - The auxiliary field derivatives at this point in space\n- `t`            - The current time\n- `x`            - The coordinates of this point\n- `numConstants` - The number of constants\n- `constants`    - The value of each constant\n- `f`            - The value of the function at this point in space\n\nLevel: intermediate\n\nNote:\nThere are three different `DM`s that potentially interact in this function. The output `DM`, dm, specifies the layout of the values calculates by funcs.\nThe input `DM`, attached to U, may be different. For example, you can input the solution over the full domain, but output over a piece of the boundary, or\na subdomain. You can also output a different number of fields than the input, with different discretizations. Last the auxiliary `DM`, attached to the\nauxiliary field vector, which is attached to dm, can also be different. It can have a different topology, number of fields, and discretizations.\n\nDeveloper Notes:\nThis API is specific to only particular usage of `DM`\n\nThe notes need to provide some information about what has to be provided to the `DM` to be able to perform the computation.\n\nSee also: \n=== \n`DM`, `DMProjectField()`, `DMProjectFieldLabelLocal()`,\n`DMProjectFunction()`, `DMComputeL2Diff()`\n\n# External Links\n$(_doc_external(\"DM/DMProjectFieldLocal\"))\n\"\"\"\nfunction DMProjectFieldLocal(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locU::PetscVec, ::Cvoid(funcs) end\n\n@for_petsc function DMProjectFieldLocal(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locU::PetscVec, ::Cvoid(funcs )\n\n    @chk ccall(\n               (:DMProjectFieldLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, Cvoid(funcs),\n               dm, time, locU, ,\n              )\n\n\n\treturn nothing\nend \n\n\n\"\"\"\n\tDMProjectFieldLabelLocal(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, locU::PetscVec, ::Cvoid(funcs) \nThis projects the given function of the input fields into the function space provided, putting the coefficients in a local vector, calculating only over the portion of the domain specified by the label.\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `time`   - The time\n- `label`  - The `DMLabel` marking the portion of the domain to output\n- `numIds` - The number of label ids to use\n- `ids`    - The label ids to use for marking\n- `Nc`     - The number of components to set in the output, or `PETSC_DETERMINE` for all components\n- `comps`  - The components to set in the output, or `NULL` for all components\n- `localU` - The input field vector\n- `funcs`  - The functions to evaluate, one per field\n- `mode`   - The insertion mode for values\n\nOutput Parameter:\n- `localX` - The output vector\n\nCalling sequence of `funcs`:\n- `dim`          - The spatial dimension\n- `Nf`           - The number of input fields\n- `NfAux`        - The number of input auxiliary fields\n- `uOff`         - The offset of each field in u[]\n- `uOff_x`       - The offset of each field in u_x[]\n- `u`            - The field values at this point in space\n- `u_t`          - The field time derivative at this point in space (or `NULL`)\n- `u_x`          - The field derivatives at this point in space\n- `aOff`         - The offset of each auxiliary field in u[]\n- `aOff_x`       - The offset of each auxiliary field in u_x[]\n- `a`            - The auxiliary field values at this point in space\n- `a_t`          - The auxiliary field time derivative at this point in space (or `NULL`)\n- `a_x`          - The auxiliary field derivatives at this point in space\n- `t`            - The current time\n- `x`            - The coordinates of this point\n- `numConstants` - The number of constants\n- `constants`    - The value of each constant\n- `f`            - The value of the function at this point in space\n\nLevel: intermediate\n\nNote:\nThere are three different `DM`s that potentially interact in this function. The output `DM`, dm, specifies the layout of the values calculates by funcs.\nThe input `DM`, attached to localU, may be different. For example, you can input the solution over the full domain, but output over a piece of the boundary, or\na subdomain. You can also output a different number of fields than the input, with different discretizations. Last the auxiliary `DM`, attached to the\nauxiliary field vector, which is attached to dm, can also be different. It can have a different topology, number of fields, and discretizations.\n\nDeveloper Notes:\nThis API is specific to only particular usage of `DM`\n\nThe notes need to provide some information about what has to be provided to the `DM` to be able to perform the computation.\n\nSee also: \n=== \n`DM`, `DMProjectField()`, `DMProjectFieldLabel()`, `DMProjectFunction()`, `DMComputeL2Diff()`\n\n# External Links\n$(_doc_external(\"DM/DMProjectFieldLabelLocal\"))\n\"\"\"\nfunction DMProjectFieldLabelLocal(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, locU::PetscVec, ::Cvoid(funcs) end\n\n@for_petsc function DMProjectFieldLabelLocal(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, label::DMLabel, numIds::$PetscInt, ids::Vector{$PetscInt}, Nc::$PetscInt, comps::Vector{$PetscInt}, locU::PetscVec, ::Cvoid(funcs )\n\n    @chk ccall(\n               (:DMProjectFieldLabelLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, CVec, Cvoid(funcs),\n               dm, time, label, numIds, ids, Nc, comps, locU, ,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMProjectFieldLabel(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, U::PetscVec, ::Cvoid(funcs) \nThis projects the given function of the input fields into the function space provided, putting the coefficients in a global vector, calculating only over the portion of the domain specified by the label.\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `time`   - The time\n- `label`  - The `DMLabel` marking the portion of the domain to output\n- `numIds` - The number of label ids to use\n- `ids`    - The label ids to use for marking\n- `Nc`     - The number of components to set in the output, or `PETSC_DETERMINE` for all components\n- `comps`  - The components to set in the output, or `NULL` for all components\n- `U`      - The input field vector\n- `funcs`  - The functions to evaluate, one per field\n- `mode`   - The insertion mode for values\n\nOutput Parameter:\n- `X` - The output vector\n\nCalling sequence of `funcs`:\n- `dim`          - The spatial dimension\n- `Nf`           - The number of input fields\n- `NfAux`        - The number of input auxiliary fields\n- `uOff`         - The offset of each field in u[]\n- `uOff_x`       - The offset of each field in u_x[]\n- `u`            - The field values at this point in space\n- `u_t`          - The field time derivative at this point in space (or `NULL`)\n- `u_x`          - The field derivatives at this point in space\n- `aOff`         - The offset of each auxiliary field in u[]\n- `aOff_x`       - The offset of each auxiliary field in u_x[]\n- `a`            - The auxiliary field values at this point in space\n- `a_t`          - The auxiliary field time derivative at this point in space (or `NULL`)\n- `a_x`          - The auxiliary field derivatives at this point in space\n- `t`            - The current time\n- `x`            - The coordinates of this point\n- `numConstants` - The number of constants\n- `constants`    - The value of each constant\n- `f`            - The value of the function at this point in space\n\nLevel: intermediate\n\nNote:\nThere are three different `DM`s that potentially interact in this function. The output `DM`, dm, specifies the layout of the values calculates by funcs.\nThe input `DM`, attached to U, may be different. For example, you can input the solution over the full domain, but output over a piece of the boundary, or\na subdomain. You can also output a different number of fields than the input, with different discretizations. Last the auxiliary `DM`, attached to the\nauxiliary field vector, which is attached to dm, can also be different. It can have a different topology, number of fields, and discretizations.\n\nDeveloper Notes:\nThis API is specific to only particular usage of `DM`\n\nThe notes need to provide some information about what has to be provided to the `DM` to be able to perform the computation.\n\nSee also: \n=== \n`DM`, `DMProjectField()`, `DMProjectFieldLabelLocal()`, `DMProjectFunction()`, `DMComputeL2Diff()`\n\n# External Links\n$(_doc_external(\"DM/DMProjectFieldLabel\"))\n\"\"\"\nfunction DMProjectFieldLabel(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, U::PetscVec, ::Cvoid(funcs) end\n\n@for_petsc function DMProjectFieldLabel(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, label::DMLabel, numIds::$PetscInt, ids::Vector{$PetscInt}, Nc::$PetscInt, comps::Vector{$PetscInt}, U::PetscVec, ::Cvoid(funcs )\n\n    @chk ccall(\n               (:DMProjectFieldLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, CVec, Cvoid(funcs),\n               dm, time, label, numIds, ids, Nc, comps, U, ,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMProjectBdFieldLabelLocal(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, locU::PetscVec, ::Cvoid(funcs) \nThis projects the given function of the input fields into the function space provided, putting the coefficients in a local vector, calculating only over the portion of the domain boundary specified by the label.\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `time`   - The time\n- `label`  - The `DMLabel` marking the portion of the domain boundary to output\n- `numIds` - The number of label ids to use\n- `ids`    - The label ids to use for marking\n- `Nc`     - The number of components to set in the output, or `PETSC_DETERMINE` for all components\n- `comps`  - The components to set in the output, or `NULL` for all components\n- `localU` - The input field vector\n- `funcs`  - The functions to evaluate, one per field\n- `mode`   - The insertion mode for values\n\nOutput Parameter:\n- `localX` - The output vector\n\nCalling sequence of `funcs`:\n- `dim`          - The spatial dimension\n- `Nf`           - The number of input fields\n- `NfAux`        - The number of input auxiliary fields\n- `uOff`         - The offset of each field in u[]\n- `uOff_x`       - The offset of each field in u_x[]\n- `u`            - The field values at this point in space\n- `u_t`          - The field time derivative at this point in space (or `NULL`)\n- `u_x`          - The field derivatives at this point in space\n- `aOff`         - The offset of each auxiliary field in u[]\n- `aOff_x`       - The offset of each auxiliary field in u_x[]\n- `a`            - The auxiliary field values at this point in space\n- `a_t`          - The auxiliary field time derivative at this point in space (or `NULL`)\n- `a_x`          - The auxiliary field derivatives at this point in space\n- `t`            - The current time\n- `x`            - The coordinates of this point\n- `n`            - The face normal\n- `numConstants` - The number of constants\n- `constants`    - The value of each constant\n- `f`            - The value of the function at this point in space\n\nLevel: intermediate\n\nNote:\nThere are three different `DM`s that potentially interact in this function. The output `DM`, dm, specifies the layout of the values calculates by funcs.\nThe input `DM`, attached to U, may be different. For example, you can input the solution over the full domain, but output over a piece of the boundary, or\na subdomain. You can also output a different number of fields than the input, with different discretizations. Last the auxiliary `DM`, attached to the\nauxiliary field vector, which is attached to dm, can also be different. It can have a different topology, number of fields, and discretizations.\n\nDeveloper Notes:\nThis API is specific to only particular usage of `DM`\n\nThe notes need to provide some information about what has to be provided to the `DM` to be able to perform the computation.\n\nSee also: \n=== \n`DM`, `DMProjectField()`, `DMProjectFieldLabelLocal()`, `DMProjectFunction()`, `DMComputeL2Diff()`\n\n# External Links\n$(_doc_external(\"DM/DMProjectBdFieldLabelLocal\"))\n\"\"\"\nfunction DMProjectBdFieldLabelLocal(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, locU::PetscVec, ::Cvoid(funcs) end\n\n@for_petsc function DMProjectBdFieldLabelLocal(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, label::DMLabel, numIds::$PetscInt, ids::Vector{$PetscInt}, Nc::$PetscInt, comps::Vector{$PetscInt}, locU::PetscVec, ::Cvoid(funcs )\n\n    @chk ccall(\n               (:DMProjectBdFieldLabelLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, CVec, Cvoid(funcs),\n               dm, time, label, numIds, ids, Nc, comps, locU, ,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\tnranks::PetscInt = DMGetNeighbors(petsclib::PetscLibType,dm::PetscDM, ranks::Vector{PetscMPIInt}) \nGets an array containing the MPI ranks of all the processes neighbors\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `nranks` - the number of neighbours\n- `ranks`  - the neighbors ranks\n\nLevel: beginner\n\nNote:\nDo not free the array, it is freed when the `DM` is destroyed.\n\nSee also: \n=== \n`DM`, `DMDAGetNeighbors()`, `PetscSFGetRootRanks()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNeighbors\"))\n\"\"\"\nfunction DMGetNeighbors(petsclib::PetscLibType, dm::PetscDM, ranks::Vector{PetscMPIInt}) end\n\n@for_petsc function DMGetNeighbors(petsclib::$UnionPetscLib, dm::PetscDM, ranks::Vector{PetscMPIInt} )\n\tnranks_ = Ref{$PetscInt}()\n\tranks_ = Ref(pointer(ranks))\n\n    @chk ccall(\n               (:DMGetNeighbors, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{Ptr{PetscMPIInt}}),\n               dm, nranks_, ranks_,\n              )\n\n\tnranks = nranks_[]\n\n\treturn nranks\nend \n\n\"\"\"\n\tcompatible::PetscBool,set::PetscBool = DMGetCompatibility(petsclib::PetscLibType,dm1::PetscDM, dm2::PetscDM) \ndetermine if two `DM`s are compatible\n\nCollective\n\nInput Parameters:\n- `dm1` - the first `DM`\n- `dm2` - the second `DM`\n\nOutput Parameters:\n- `compatible` - whether or not the two `DM`s are compatible\n- `set`        - whether or not the compatible value was actually determined and set\n\nLevel: advanced\n\nNotes:\nTwo `DM`s are deemed compatible if they represent the same parallel decomposition\nof the same topology. This implies that the section (field data) on one\n\"makes sense\" with respect to the topology and parallel decomposition of the other.\nLoosely speaking, compatible `DM`s represent the same domain and parallel\ndecomposition, but hold different data.\n\nTypically, one would confirm compatibility if intending to simultaneously iterate\nover a pair of vectors obtained from different `DM`s.\n\nFor example, two `DMDA` objects are compatible if they have the same local\nand global sizes and the same stencil width. They can have different numbers\nof degrees of freedom per node. Thus, one could use the node numbering from\neither `DM` in bounds for a loop over vectors derived from either `DM`.\n\nConsider the operation of summing data living on a 2-dof `DMDA` to data living\non a 1-dof `DMDA`, which should be compatible, as in the following snippet.\n-vb\n-..\nPetscCall(DMGetCompatibility(da1,da2,&compatible,&set));\nif (set && compatible)  {\nPetscCall(DMDAVecGetArrayDOF(da1,vec1,&arr1));\nPetscCall(DMDAVecGetArrayDOF(da2,vec2,&arr2));\nPetscCall(DMDAGetCorners(da1,&x,&y,NULL,&m,&n,NULL));\nfor (j=y; j<y+n; ++j) {\nfor (i=x; i<x+m, ++i) {\narr1[j][i][0] = arr2[j][i][0] + arr2[j][i][1];\n}\n}\nPetscCall(DMDAVecRestoreArrayDOF(da1,vec1,&arr1));\nPetscCall(DMDAVecRestoreArrayDOF(da2,vec2,&arr2));\n} else {\nSETERRQ(PetscObjectComm((PetscObject)da1,PETSC_ERR_ARG_INCOMP,\"DMDA objects incompatible\");\n}\n-..\n-ve\n\nChecking compatibility might be expensive for a given implementation of `DM`,\nor might be impossible to unambiguously confirm or deny. For this reason,\nthis function may decline to determine compatibility, and hence users should\nalways check the \"set\" output parameter.\n\nA `DM` is always compatible with itself.\n\nIn the current implementation, `DM`s which live on \"unequal\" communicators\n(MPI_UNEQUAL in the terminology of MPI_Comm_compare()) are always deemed\nincompatible.\n\nThis function is labeled \"Collective,\" as information about all subdomains\nis required on each rank. However, in `DM` implementations which store all this\ninformation locally, this function may be merely \"Logically Collective\".\n\nDeveloper Note:\nCompatibility is assumed to be a symmetric concept; `DM` A is compatible with `DM` B\niff B is compatible with A. Thus, this function checks the implementations\nof both dm and dmc (if they are of different types), attempting to determine\ncompatibility. It is left to `DM` implementers to ensure that symmetry is\npreserved. The simplest way to do this is, when implementing type-specific\nlogic for this function, is to check for existing logic in the implementation\nof other `DM` types and let *set = PETSC_FALSE if found.\n\nSee also: \n=== \n`DM`, `DMDACreateCompatibleDMDA()`, `DMStagCreateCompatibleDMStag()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCompatibility\"))\n\"\"\"\nfunction DMGetCompatibility(petsclib::PetscLibType, dm1::PetscDM, dm2::PetscDM) end\n\n@for_petsc function DMGetCompatibility(petsclib::$UnionPetscLib, dm1::PetscDM, dm2::PetscDM )\n\tcompatible_ = Ref{PetscBool}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetCompatibility, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{PetscBool}, Ptr{PetscBool}),\n               dm1, dm2, compatible_, set_,\n              )\n\n\tcompatible = compatible_[]\n\tset = set_[]\n\n\treturn compatible,set\nend \n\n\"\"\"\n\tDMMonitorSet(petsclib::PetscLibType,dm::PetscDM, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) \nSets an additional monitor function that is to be used after a solve to monitor discretization performance.\n\nLogically Collective\n\nInput Parameters:\n- `dm`             - the `DM`\n- `f`              - the monitor function\n- `mctx`           - [optional] user-defined context for private data for the monitor routine (use `NULL` if no context is desired)\n- `monitordestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence\n\nOptions Database Key:\n- `-dm_monitor_cancel` - cancels all monitors that have been hardwired into a code by calls to `DMMonitorSet()`, but\ndoes not cancel those set via the options database.\n\nLevel: intermediate\n\nNote:\nSeveral different monitoring routines may be set by calling\n`DMMonitorSet()` multiple times or with `DMMonitorSetFromOptions()`; all will be called in the\norder in which they were set.\n\nFortran Note:\nOnly a single monitor function can be set for each `DM` object\n\nDeveloper Note:\nThis API has a generic name but seems specific to a very particular aspect of the use of `DM`\n\nSee also: \n=== \n`DM`, `DMMonitorCancel()`, `DMMonitorSetFromOptions()`, `DMMonitor()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"DM/DMMonitorSet\"))\n\"\"\"\nfunction DMMonitorSet(petsclib::PetscLibType, dm::PetscDM, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) end\n\n@for_petsc function DMMonitorSet(petsclib::$UnionPetscLib, dm::PetscDM, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               dm, f, mctx, monitordestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMonitorCancel(petsclib::PetscLibType,dm::PetscDM) \nClears all the monitor functions for a `DM` object.\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the DM\n\nOptions Database Key:\n- `-dm_monitor_cancel` - cancels all monitors that have been hardwired\ninto a code by calls to `DMonitorSet()`, but does not cancel those\nset via the options database\n\nLevel: intermediate\n\nNote:\nThere is no way to clear one specific monitor from a `DM` object.\n\nSee also: \n=== \n`DM`, `DMMonitorSet()`, `DMMonitorSetFromOptions()`, `DMMonitor()`\n\n# External Links\n$(_doc_external(\"DM/DMMonitorCancel\"))\n\"\"\"\nfunction DMMonitorCancel(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMonitorCancel(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = DMMonitorSetFromOptions(petsclib::PetscLibType,dm::PetscDM, name::String, help::String, manual::String, monitor::external, monitorsetup::external) \nSets a monitor function and viewer appropriate for the type indicated by the user\n\nCollective\n\nInput Parameters:\n- `dm`           - `DM` object you wish to monitor\n- `name`         - the monitor type one is seeking\n- `help`         - message indicating what monitoring is done\n- `manual`       - manual page for the monitor\n- `monitor`      - the monitor function, this must use a `PetscViewerFormat` as its context\n- `monitorsetup` - a function that is called once ONLY if the user selected this monitor that may set additional features of the `DM` or `PetscViewer` objects\n\nOutput Parameter:\n- `flg` - Flag set if the monitor was created\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `PetscOptionsCreateViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `DMMonitor()`, `DMMonitorSet()`\n\n# External Links\n$(_doc_external(\"DM/DMMonitorSetFromOptions\"))\n\"\"\"\nfunction DMMonitorSetFromOptions(petsclib::PetscLibType, dm::PetscDM, name::String, help::String, manual::String, monitor::external, monitorsetup::external) end\n\n@for_petsc function DMMonitorSetFromOptions(petsclib::$UnionPetscLib, dm::PetscDM, name::String, help::String, manual::String, monitor::external, monitorsetup::external )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMMonitorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, external, external, Ptr{PetscBool}),\n               dm, name, help, manual, monitor, monitorsetup, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tDMMonitor(petsclib::PetscLibType,dm::PetscDM) \nruns the user provided monitor routines, if they exist\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nLevel: developer\n\nDeveloper Note:\nNote should indicate when during the life of the `DM` the monitor is run. It appears to be\nrelated to the discretization process seems rather specialized since some `DM` have no\nconcept of discretization.\n\nSee also: \n=== \n`DM`, `DMMonitorSet()`, `DMMonitorSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMMonitor\"))\n\"\"\"\nfunction DMMonitor(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMonitor(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMMonitor, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMComputeError(petsclib::PetscLibType,dm::PetscDM, sol::PetscVec, errors::Vector{PetscReal}, errorVec::PetscVec) \nComputes the error assuming the user has provided the exact solution functions\n\nCollective\n\nInput Parameters:\n- `dm`  - The `DM`\n- `sol` - The solution vector\n\nInput/Output Parameter:\n- `errors` - An array of length Nf, the number of fields, or `NULL` for no output; on output\ncontains the error in each field\n\nOutput Parameter:\n- `errorVec` - A vector to hold the cellwise error (may be `NULL`)\n\nLevel: developer\n\nNote:\nThe exact solutions come from the `PetscDS` object, and the time comes from `DMGetOutputSequenceNumber()`.\n\nSee also: \n=== \n`DM`, `DMMonitorSet()`, `DMGetRegionNumDS()`, `PetscDSGetExactSolution()`, `DMGetOutputSequenceNumber()`\n\n# External Links\n$(_doc_external(\"DM/DMComputeError\"))\n\"\"\"\nfunction DMComputeError(petsclib::PetscLibType, dm::PetscDM, sol::PetscVec, errors::Vector{PetscReal}, errorVec::PetscVec) end\n\n@for_petsc function DMComputeError(petsclib::$UnionPetscLib, dm::PetscDM, sol::PetscVec, errors::Vector{$PetscReal}, errorVec::PetscVec )\n\terrorVec_ = Ref(errorVec.ptr)\n\n    @chk ccall(\n               (:DMComputeError, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{$PetscReal}, Ptr{CVec}),\n               dm, sol, errors, errorVec_,\n              )\n\n\terrorVec.ptr = errorVec_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumAux::PetscInt = DMGetNumAuxiliaryVec(petsclib::PetscLibType,dm::PetscDM) \nGet the number of auxiliary vectors associated with this `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `numAux` - The number of auxiliary data vectors\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMSetAuxiliaryVec()`, `DMGetAuxiliaryLabels()`, `DMGetAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumAuxiliaryVec\"))\n\"\"\"\nfunction DMGetNumAuxiliaryVec(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetNumAuxiliaryVec(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumAux_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetNumAuxiliaryVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, numAux_,\n              )\n\n\tnumAux = numAux_[]\n\n\treturn numAux\nend \n\n\"\"\"\n\tDMGetAuxiliaryVec(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, value::PetscInt, part::PetscInt, aux::PetscVec) \nGet the auxiliary vector for region specified by the given label and value, and equation part\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - The `DMLabel`\n- `value` - The label value indicating the region\n- `part`  - The equation part, or 0 if unused\n\nOutput Parameter:\n- `aux` - The `Vec` holding auxiliary field data\n\nLevel: advanced\n\nNote:\nIf no auxiliary vector is found for this (label, value), (`NULL`, 0, 0) is checked as well.\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMSetAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryLabels()`\n\n# External Links\n$(_doc_external(\"DM/DMGetAuxiliaryVec\"))\n\"\"\"\nfunction DMGetAuxiliaryVec(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, value::PetscInt, part::PetscInt, aux::PetscVec) end\n\n@for_petsc function DMGetAuxiliaryVec(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, value::$PetscInt, part::$PetscInt, aux::PetscVec )\n\taux_ = Ref(aux.ptr)\n\n    @chk ccall(\n               (:DMGetAuxiliaryVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, $PetscInt, $PetscInt, Ptr{CVec}),\n               dm, label, value, part, aux_,\n              )\n\n\taux.ptr = aux_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetAuxiliaryVec(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, value::PetscInt, part::PetscInt, aux::PetscVec) \nSet an auxiliary vector for region specified by the given label and value, and equation part\n\nNot Collective because auxiliary vectors are not parallel\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - The `DMLabel`\n- `value` - The label value indicating the region\n- `part`  - The equation part, or 0 if unused\n- `aux`   - The `Vec` holding auxiliary field data\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMGetAuxiliaryLabels()`, `DMCopyAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMSetAuxiliaryVec\"))\n\"\"\"\nfunction DMSetAuxiliaryVec(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, value::PetscInt, part::PetscInt, aux::PetscVec) end\n\n@for_petsc function DMSetAuxiliaryVec(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, value::$PetscInt, part::$PetscInt, aux::PetscVec )\n\n    @chk ccall(\n               (:DMSetAuxiliaryVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, $PetscInt, $PetscInt, CVec),\n               dm, label, value, part, aux,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalues::Vector{PetscInt},parts::Vector{PetscInt} = DMGetAuxiliaryLabels(petsclib::PetscLibType,dm::PetscDM, labels::Vector{DMLabel}) \nGet the labels, values, and parts for all auxiliary vectors in this `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `labels` - The `DMLabel`s for each `Vec`\n- `values` - The label values for each `Vec`\n- `parts`  - The equation parts for each `Vec`\n\nLevel: advanced\n\nNote:\nThe arrays passed in must be at least as large as `DMGetNumAuxiliaryVec()`.\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMSetAuxiliaryVec()`, `DMCopyAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMGetAuxiliaryLabels\"))\n\"\"\"\nfunction DMGetAuxiliaryLabels(petsclib::PetscLibType, dm::PetscDM, labels::Vector{DMLabel}) end\n\n@for_petsc function DMGetAuxiliaryLabels(petsclib::$UnionPetscLib, dm::PetscDM, labels::Vector{DMLabel} )\n\tvalues = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tparts = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMGetAuxiliaryLabels, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMLabel}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, labels, values, parts,\n              )\n\n\n\treturn values,parts\nend \n\n\"\"\"\n\tDMCopyAuxiliaryVec(petsclib::PetscLibType,dm::PetscDM, dmNew::PetscDM) \nCopy the auxiliary vector data on a `DM` to a new `DM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `dmNew` - The new `DM`, now with the same auxiliary data\n\nLevel: advanced\n\nNote:\nThis is a shallow copy of the auxiliary vectors\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMSetAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyAuxiliaryVec\"))\n\"\"\"\nfunction DMCopyAuxiliaryVec(petsclib::PetscLibType, dm::PetscDM, dmNew::PetscDM) end\n\n@for_petsc function DMCopyAuxiliaryVec(petsclib::$UnionPetscLib, dm::PetscDM, dmNew::PetscDM )\n\n    @chk ccall(\n               (:DMCopyAuxiliaryVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, dmNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMClearAuxiliaryVec(petsclib::PetscLibType,dm::PetscDM) \nDestroys the auxiliary vector information and creates a new empty one\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCopyAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMSetAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMClearAuxiliaryVec\"))\n\"\"\"\nfunction DMClearAuxiliaryVec(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMClearAuxiliaryVec(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMClearAuxiliaryVec, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tornt::PetscInt,found::PetscBool = DMPolytopeMatchOrientation(petsclib::PetscLibType,ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt}) \nDetermine an orientation (transformation) that takes the source face arrangement to the target face arrangement\n\nNot Collective\n\nInput Parameters:\n- `ct`         - The `DMPolytopeType`\n- `sourceCone` - The source arrangement of faces\n- `targetCone` - The target arrangement of faces\n\nOutput Parameters:\n- `ornt`  - The orientation (transformation) which will take the source arrangement to the target arrangement\n- `found` - Flag indicating that a suitable orientation was found\n\nLevel: advanced\n\nNote:\nAn arrangement is a face order combined with an orientation for each face\n\nEach orientation (transformation) is labeled with an integer from negative `DMPolytopeTypeGetNumArrangements(ct)`/2 to `DMPolytopeTypeGetNumArrangements(ct)`/2\nthat labels each arrangement (face ordering plus orientation for each face).\n\nSee `DMPolytopeMatchVertexOrientation()` to find a new vertex orientation that takes the source vertex arrangement to the target vertex arrangement\n\nSee also: \n=== \n`DM`, `DMPolytopeGetOrientation()`, `DMPolytopeMatchVertexOrientation()`, `DMPolytopeGetVertexOrientation()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeMatchOrientation\"))\n\"\"\"\nfunction DMPolytopeMatchOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt}) end\n\n@for_petsc function DMPolytopeMatchOrientation(petsclib::$UnionPetscLib, ct::DMPolytopeType, sourceCone::Vector{$PetscInt}, targetCone::Vector{$PetscInt} )\n\tornt_ = Ref{$PetscInt}()\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPolytopeMatchOrientation, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               ct, sourceCone, targetCone, ornt_, found_,\n              )\n\n\tornt = ornt_[]\n\tfound = found_[]\n\n\treturn ornt,found\nend \n\n\"\"\"\n\tornt::PetscInt = DMPolytopeGetOrientation(petsclib::PetscLibType,ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt}) \nDetermine an orientation (transformation) that takes the source face arrangement to the target face arrangement\n\nNot Collective\n\nInput Parameters:\n- `ct`         - The `DMPolytopeType`\n- `sourceCone` - The source arrangement of faces\n- `targetCone` - The target arrangement of faces\n\nOutput Parameter:\n- `ornt` - The orientation (transformation) which will take the source arrangement to the target arrangement\n\nLevel: advanced\n\nNote:\nThis function is the same as `DMPolytopeMatchOrientation()` except it will generate an error if no suitable orientation can be found.\n\nDeveloper Note:\nIt is unclear why this function needs to exist since one can simply call `DMPolytopeMatchOrientation()` and error if none is found\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMPolytopeMatchOrientation()`, `DMPolytopeGetVertexOrientation()`, `DMPolytopeMatchVertexOrientation()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeGetOrientation\"))\n\"\"\"\nfunction DMPolytopeGetOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt}) end\n\n@for_petsc function DMPolytopeGetOrientation(petsclib::$UnionPetscLib, ct::DMPolytopeType, sourceCone::Vector{$PetscInt}, targetCone::Vector{$PetscInt} )\n\tornt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPolytopeGetOrientation, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               ct, sourceCone, targetCone, ornt_,\n              )\n\n\tornt = ornt_[]\n\n\treturn ornt\nend \n\n\"\"\"\n\tornt::PetscInt,found::PetscBool = DMPolytopeMatchVertexOrientation(petsclib::PetscLibType,ct::DMPolytopeType, sourceVert::Vector{PetscInt}, targetVert::Vector{PetscInt}) \nDetermine an orientation (transformation) that takes the source vertex arrangement to the target vertex arrangement\n\nNot Collective\n\nInput Parameters:\n- `ct`         - The `DMPolytopeType`\n- `sourceVert` - The source arrangement of vertices\n- `targetVert` - The target arrangement of vertices\n\nOutput Parameters:\n- `ornt`  - The orientation (transformation) which will take the source arrangement to the target arrangement\n- `found` - Flag indicating that a suitable orientation was found\n\nLevel: advanced\n\nNotes:\nAn arrangement is a vertex order\n\nEach orientation (transformation) is labeled with an integer from negative `DMPolytopeTypeGetNumArrangements(ct)`/2 to `DMPolytopeTypeGetNumArrangements(ct)`/2\nthat labels each arrangement (vertex ordering).\n\nSee `DMPolytopeMatchOrientation()` to find a new face orientation that takes the source face arrangement to the target face arrangement\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMPolytopeGetOrientation()`, `DMPolytopeMatchOrientation()`, `DMPolytopeTypeGetNumVertices()`, `DMPolytopeTypeGetVertexArrangement()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeMatchVertexOrientation\"))\n\"\"\"\nfunction DMPolytopeMatchVertexOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceVert::Vector{PetscInt}, targetVert::Vector{PetscInt}) end\n\n@for_petsc function DMPolytopeMatchVertexOrientation(petsclib::$UnionPetscLib, ct::DMPolytopeType, sourceVert::Vector{$PetscInt}, targetVert::Vector{$PetscInt} )\n\tornt_ = Ref{$PetscInt}()\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPolytopeMatchVertexOrientation, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               ct, sourceVert, targetVert, ornt_, found_,\n              )\n\n\tornt = ornt_[]\n\tfound = found_[]\n\n\treturn ornt,found\nend \n\n\"\"\"\n\tornt::PetscInt = DMPolytopeGetVertexOrientation(petsclib::PetscLibType,ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt}) \nDetermine an orientation (transformation) that takes the source vertex arrangement to the target vertex arrangement\n\nNot Collective\n\nInput Parameters:\n- `ct`         - The `DMPolytopeType`\n- `sourceCone` - The source arrangement of vertices\n- `targetCone` - The target arrangement of vertices\n\nOutput Parameter:\n- `ornt` - The orientation (transformation) which will take the source arrangement to the target arrangement\n\nLevel: advanced\n\nNote:\nThis function is the same as `DMPolytopeMatchVertexOrientation()` except it errors if not orientation is possible.\n\nDeveloper Note:\nIt is unclear why this function needs to exist since one can simply call `DMPolytopeMatchVertexOrientation()` and error if none is found\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMPolytopeMatchVertexOrientation()`, `DMPolytopeGetOrientation()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeGetVertexOrientation\"))\n\"\"\"\nfunction DMPolytopeGetVertexOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt}) end\n\n@for_petsc function DMPolytopeGetVertexOrientation(petsclib::$UnionPetscLib, ct::DMPolytopeType, sourceCone::Vector{$PetscInt}, targetCone::Vector{$PetscInt} )\n\tornt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPolytopeGetVertexOrientation, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               ct, sourceCone, targetCone, ornt_,\n              )\n\n\tornt = ornt_[]\n\n\treturn ornt\nend \n\n\"\"\"\n\tinside::PetscBool = DMPolytopeInCellTest(petsclib::PetscLibType,ct::DMPolytopeType, point::Vector{PetscReal}) \nCheck whether a point lies inside the reference cell of given type\n\nNot Collective\n\nInput Parameters:\n- `ct`    - The `DMPolytopeType`\n- `point` - Coordinates of the point\n\nOutput Parameter:\n- `inside` - Flag indicating whether the point is inside the reference cell of given type\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMLocatePoints()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeInCellTest\"))\n\"\"\"\nfunction DMPolytopeInCellTest(petsclib::PetscLibType, ct::DMPolytopeType, point::Vector{PetscReal}) end\n\n@for_petsc function DMPolytopeInCellTest(petsclib::$UnionPetscLib, ct::DMPolytopeType, point::Vector{$PetscReal} )\n\tinside_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPolytopeInCellTest, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, Ptr{$PetscReal}, Ptr{PetscBool}),\n               ct, point, inside_,\n              )\n\n\tinside = inside_[]\n\n\treturn inside\nend \n\n\"\"\"\n\tDMReorderSectionSetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag) \nSet flag indicating whether the local section should be reordered by default\n\nLogically collective\n\nInput Parameters:\n- `dm`      - The DM\n- `reorder` - Flag for reordering\n\nLevel: intermediate\n\n-seealso: `DMReorderSectionGetDefault()`\n\n# External Links\n$(_doc_external(\"DM/DMReorderSectionSetDefault\"))\n\"\"\"\nfunction DMReorderSectionSetDefault(petsclib::PetscLibType, dm::PetscDM, reorder::DMReorderDefaultFlag) end\n\n@for_petsc function DMReorderSectionSetDefault(petsclib::$UnionPetscLib, dm::PetscDM, reorder::DMReorderDefaultFlag )\n\n    @chk ccall(\n               (:DMReorderSectionSetDefault, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMReorderDefaultFlag),\n               dm, reorder,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMReorderSectionGetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag) \nGet flag indicating whether the local section should be reordered by default\n\nNot collective\n\nInput Parameter:\n- `dm` - The DM\n\nOutput Parameter:\n- `reorder` - Flag for reordering\n\nLevel: intermediate\n\n-seealso: `DMReorderSetDefault()`\n\n# External Links\n$(_doc_external(\"DM/DMReorderSectionGetDefault\"))\n\"\"\"\nfunction DMReorderSectionGetDefault(petsclib::PetscLibType, dm::PetscDM, reorder::DMReorderDefaultFlag) end\n\n@for_petsc function DMReorderSectionGetDefault(petsclib::$UnionPetscLib, dm::PetscDM, reorder::DMReorderDefaultFlag )\n\n    @chk ccall(\n               (:DMReorderSectionGetDefault, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMReorderDefaultFlag}),\n               dm, reorder,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMReorderSectionSetType(petsclib::PetscLibType,dm::PetscDM, reorder::MatOrderingType) \nSet the type of local section reordering\n\nLogically collective\n\nInput Parameters:\n- `dm`      - The DM\n- `reorder` - The reordering method\n\nLevel: intermediate\n\n-seealso: `DMReorderSectionGetType()`, `DMReorderSectionSetDefault()`\n\n# External Links\n$(_doc_external(\"DM/DMReorderSectionSetType\"))\n\"\"\"\nfunction DMReorderSectionSetType(petsclib::PetscLibType, dm::PetscDM, reorder::MatOrderingType) end\n\n@for_petsc function DMReorderSectionSetType(petsclib::$UnionPetscLib, dm::PetscDM, reorder::MatOrderingType )\n\n    @chk ccall(\n               (:DMReorderSectionSetType, $petsc_library),\n               PetscErrorCode,\n               (CDM, MatOrderingType),\n               dm, reorder,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\treorder::MatOrderingType = DMReorderSectionGetType(petsclib::PetscLibType,dm::PetscDM) \nGet the reordering type for the local section\n\nNot collective\n\nInput Parameter:\n- `dm` - The DM\n\nOutput Parameter:\n- `reorder` - The reordering method\n\nLevel: intermediate\n\n-seealso: `DMReorderSetDefault()`, `DMReorderSectionGetDefault()`\n\n# External Links\n$(_doc_external(\"DM/DMReorderSectionGetType\"))\n\"\"\"\nfunction DMReorderSectionGetType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMReorderSectionGetType(petsclib::$UnionPetscLib, dm::PetscDM )\n\treorder_ = Ref{MatOrderingType}()\n\n    @chk ccall(\n               (:DMReorderSectionGetType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{MatOrderingType}),\n               dm, reorder_,\n              )\n\n\treorder = unsafe_string(reorder_[])\n\n\treturn reorder\nend \n\n\"\"\"\n\t g::PetscVec = DMGetLocalVector(petsclib::PetscLibType,dm::PetscDM) \nGets a PETSc vector that may be used with the `DM` local routines. This vector has spaces for the ghost values.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `g` - the local vector\n\nNote:\nThe vector values are NOT initialized and may have garbage in them, so you may need to zero them.\n\nThe output parameter, `g`, is a regular PETSc vector that should be returned with DMRestoreLocalVector() DO NOT call VecDestroy() on it.\n\nThis is intended to be used for vectors you need for a short time, like within a single function call. For vectors that you intend to keep around (for example in a C struct) or pass around large parts of your code you should use DMCreateLocalVector().\n\nVecStride*() operations can be useful when using DM with dof > 1\n\n\nLevel: beginner\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMRestoreLocalVector()`,\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearLocalVectors()`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalVector\"))\n\"\"\"\nfunction DMGetLocalVector(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetLocalVector(petsclib::$UnionPetscLib, dm::PetscDM)\n\tg_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMGetLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, g_,\n              )\n\n\tg = PetscVec(g_[],petsclib)\n\n\treturn g\nend \n\n\"\"\"\n\tDMRestoreLocalVector(petsclib::PetscLibType,dm::PetscDM, g::PetscVec) \nReturns a PETSc vector that was\nobtained from `DMGetLocalVector()`. Do not use with vector obtained via\n`DMCreateLocalVector()`.\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DM`\n- `g`  - the local vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMGetLocalVector()`, `DMClearLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreLocalVector\"))\n\"\"\"\nfunction DMRestoreLocalVector(petsclib::PetscLibType, dm::PetscDM, g::PetscVec) end\n\n@for_petsc function DMRestoreLocalVector(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec )\n\tg_ = Ref(g.ptr)\n\n    @chk ccall(\n               (:DMRestoreLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, g_,\n              )\n\n\tg.ptr = g_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetGlobalVector(petsclib::PetscLibType,dm::PetscDM, g::PetscVec) \nGets a PETSc vector that may be used with the `DM` global routines.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `g` - the global vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMRestoreLocalVector()`\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearGlobalVectors()`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetGlobalVector\"))\n\"\"\"\nfunction DMGetGlobalVector(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM)\n\tg_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMGetGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, g_,\n              )\n\n\tg = PetscVec(g_[],petsclib)\n\treturn g\nend \n\n\"\"\"\n\tDMClearGlobalVectors(petsclib::PetscLibType,dm::PetscDM) \nDestroys all the global vectors that have been created for `DMGetGlobalVector()` calls in this `DM`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMRestoreLocalVector()`\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearGlobalVectors\"))\n\"\"\"\nfunction DMClearGlobalVectors(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMClearGlobalVectors(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMClearGlobalVectors, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMClearLocalVectors(petsclib::PetscLibType,dm::PetscDM) \nDestroys all the local vectors that have been created for `DMGetLocalVector()` calls in this `DM`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMCreateLocalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMLocalToLocalBegin()`,\n`DMLocalToLocalEnd()`, `DMRestoreLocalVector()`\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearLocalVectors\"))\n\"\"\"\nfunction DMClearLocalVectors(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMClearLocalVectors(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMClearLocalVectors, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRestoreGlobalVector(petsclib::PetscLibType,dm::PetscDM, g::PetscVec) \nReturns a PETSc vector that\nobtained from `DMGetGlobalVector()`. Do not use with vector obtained via\n`DMCreateGlobalVector()`.\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DM`\n- `g`  - the global vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToGlobalBegin()`,\n`DMGlobalToGlobalEnd()`, `DMGlobalToGlobal()`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMClearGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreGlobalVector\"))\n\"\"\"\nfunction DMRestoreGlobalVector(petsclib::PetscLibType, dm::PetscDM, g::PetscVec) end\n\n@for_petsc function DMRestoreGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec )\n\tg_ = Ref(g.ptr)\n\n    @chk ccall(\n               (:DMRestoreGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, g_,\n              )\n\n\tg.ptr = g_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMClearNamedGlobalVectors(petsclib::PetscLibType,dm::PetscDM) \nDestroys all the named global vectors that have been created with `DMGetNamedGlobalVector()` in this `DM`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`, `DMClearNamedLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearNamedGlobalVectors\"))\n\"\"\"\nfunction DMClearNamedGlobalVectors(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMClearNamedGlobalVectors(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMClearNamedGlobalVectors, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMClearNamedLocalVectors(petsclib::PetscLibType,dm::PetscDM) \nDestroys all the named local vectors that have been created with `DMGetNamedLocalVector()` in this `DM`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`, `DMClearNamedGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearNamedLocalVectors\"))\n\"\"\"\nfunction DMClearNamedLocalVectors(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMClearNamedLocalVectors(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMClearNamedLocalVectors, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\texists::PetscBool = DMHasNamedGlobalVector(petsclib::PetscLibType,dm::PetscDM, name::String) \ncheck for a named, persistent global vector created with `DMGetNamedGlobalVector()`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `Vec`\n\nOutput Parameter:\n- `exists` - true if the vector was previously created\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`, `DMClearNamedGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMHasNamedGlobalVector\"))\n\"\"\"\nfunction DMHasNamedGlobalVector(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMHasNamedGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\texists_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasNamedGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{PetscBool}),\n               dm, name, exists_,\n              )\n\n\texists = exists_[]\n\n\treturn exists\nend \n\n\"\"\"\n\tDMGetNamedGlobalVector(petsclib::PetscLibType,dm::PetscDM, name::String, X::PetscVec) \nget access to a named, persistent global vector\n\nCollective\n\nInput Parameters:\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `X`\n\nOutput Parameter:\n- `X` - named `Vec`\n\nLevel: developer\n\n-seealso: `DM`, `DMRestoreNamedGlobalVector()`, `DMHasNamedGlobalVector()`, `DMClearNamedGlobalVectors()`, `DMGetGlobalVector()`, `DMGetLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNamedGlobalVector\"))\n\"\"\"\nfunction DMGetNamedGlobalVector(petsclib::PetscLibType, dm::PetscDM, name::String, X::PetscVec) end\n\n@for_petsc function DMGetNamedGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM, name::String, X::PetscVec )\n\tX_ = Ref(X.ptr)\n\n    @chk ccall(\n               (:DMGetNamedGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, name, X_,\n              )\n\n\tX.ptr = X_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRestoreNamedGlobalVector(petsclib::PetscLibType,dm::PetscDM, name::String, X::PetscVec) \nrestore access to a named, persistent global vector\n\nCollective\n\nInput Parameters:\n- `dm`   - `DM` on which `X` was gotten\n- `name` - name under which `X` was gotten\n- `X`    - `Vec` to restore\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMClearNamedGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreNamedGlobalVector\"))\n\"\"\"\nfunction DMRestoreNamedGlobalVector(petsclib::PetscLibType, dm::PetscDM, name::String, X::PetscVec) end\n\n@for_petsc function DMRestoreNamedGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM, name::String, X::PetscVec )\n\tX_ = Ref(X.ptr)\n\n    @chk ccall(\n               (:DMRestoreNamedGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, name, X_,\n              )\n\n\tX.ptr = X_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\texists::PetscBool = DMHasNamedLocalVector(petsclib::PetscLibType,dm::PetscDM, name::String) \ncheck for a named, persistent local vector created with `DMGetNamedLocalVector()`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `Vec`\n\nOutput Parameter:\n- `exists` - true if the vector was previously created\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`, `DMClearNamedLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMHasNamedLocalVector\"))\n\"\"\"\nfunction DMHasNamedLocalVector(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMHasNamedLocalVector(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\texists_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMHasNamedLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{PetscBool}),\n               dm, name, exists_,\n              )\n\n\texists = exists_[]\n\n\treturn exists\nend \n\n\"\"\"\n\tDMGetNamedLocalVector(petsclib::PetscLibType,dm::PetscDM, name::String, X::PetscVec) \nget access to a named, persistent local vector\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `X`\n\nOutput Parameter:\n- `X` - named `Vec`\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`, `DMHasNamedLocalVector()`, `DMClearNamedLocalVectors()`, `DMGetGlobalVector()`, `DMGetLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNamedLocalVector\"))\n\"\"\"\nfunction DMGetNamedLocalVector(petsclib::PetscLibType, dm::PetscDM, name::String, X::PetscVec) end\n\n@for_petsc function DMGetNamedLocalVector(petsclib::$UnionPetscLib, dm::PetscDM, name::String, X::PetscVec )\n\tX_ = Ref(X.ptr)\n\n    @chk ccall(\n               (:DMGetNamedLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, name, X_,\n              )\n\n\tX.ptr = X_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMRestoreNamedLocalVector(petsclib::PetscLibType,dm::PetscDM, name::String, X::PetscVec) \nrestore access to a named, persistent local vector obtained with `DMGetNamedLocalVector()`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` on which `X` was gotten\n- `name` - name under which `X` was gotten\n- `X`    - `Vec` to restore\n\nLevel: developer\n\n-seealso: `DM`, `DMRestoreNamedGlobalVector()`, `DMGetNamedLocalVector()`, `DMClearNamedLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreNamedLocalVector\"))\n\"\"\"\nfunction DMRestoreNamedLocalVector(petsclib::PetscLibType, dm::PetscDM, name::String, X::PetscVec) end\n\n@for_petsc function DMRestoreNamedLocalVector(petsclib::$UnionPetscLib, dm::PetscDM, name::String, X::PetscVec )\n\tX_ = Ref(X.ptr)\n\n    @chk ccall(\n               (:DMRestoreNamedLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, name, X_,\n              )\n\n\tX.ptr = X_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFinalizePackage(petsclib::PetscLibType) \nThis function finalizes everything in the `DM` package. It is called\nfrom `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/DMFinalizePackage\"))\n\"\"\"\nfunction DMFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function DMFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `DM` package. It is called\nfrom `PetscDLLibraryRegister_petscdm()` when using dynamic libraries, and on the first call to `DMCreate()`\nor similar routines when using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/DMInitializePackage\"))\n\"\"\"\nfunction DMInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function DMInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcdm::PetscDM = DMGetCoordinateDM(petsclib::PetscLibType,dm::PetscDM) \nGets the `DM` that prescribes coordinate layout and scatters between global and local coordinates\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `cdm` - coordinate `DM`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCoordinateDM()`, `DMSetCoordinates()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGSetCellCoordinateDM()`,\n\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateDM\"))\n\"\"\"\nfunction DMGetCoordinateDM(petsclib::PetscLibType, dm::PetscDM, cdm::PetscDM) end\n\n@for_petsc function DMGetCoordinateDM(petsclib::$UnionPetscLib, dm::PetscDM{PetscLib} ) where PetscLib\n\tcdm  = PetscDM{PetscLib}(C_NULL, dm.age)\n    cdm_ = Ref(cdm.ptr)\n    \n    @chk ccall(\n               (:DMGetCoordinateDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, cdm_,\n              )\n\n\tcdm.ptr = cdm_[]\n\n\treturn cdm\nend \n\n\"\"\"\n\tDMSetCoordinateDM(petsclib::PetscLibType,dm::PetscDM, cdm::PetscDM) \nSets the `DM` that prescribes coordinate layout and scatters between global and local coordinates\n\nLogically Collective\n\nInput Parameters:\n- `dm`  - the `DM`\n- `cdm` - coordinate `DM`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDM()`, `DMSetCoordinates()`, `DMGetCellCoordinateDM()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`,\n`DMGSetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateDM\"))\n\"\"\"\nfunction DMSetCoordinateDM(petsclib::PetscLibType, dm::PetscDM, cdm::PetscDM) end\n\n@for_petsc function DMSetCoordinateDM(petsclib::$UnionPetscLib, dm::PetscDM, cdm::PetscDM )\n\n    @chk ccall(\n               (:DMSetCoordinateDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, cdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCellCoordinateDM(petsclib::PetscLibType,dm::PetscDM, cdm::PetscDM) \nGets the `DM` that prescribes cellwise coordinate layout and scatters between global and local cellwise coordinates\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `cdm` - cellwise coordinate `DM`, or `NULL` if they are not defined\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCellCoordinateDM()`, `DMSetCellCoordinates()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMGetCellCoordinatesLocal()`,\n`DMLocalizeCoordinates()`, `DMSetCoordinateDM()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinateDM\"))\n\"\"\"\nfunction DMGetCellCoordinateDM(petsclib::PetscLibType, dm::PetscDM, cdm::PetscDM) end\n\n@for_petsc function DMGetCellCoordinateDM(petsclib::$UnionPetscLib, dm::PetscDM, cdm::PetscDM )\n\tcdm_ = Ref(cdm.ptr)\n\n    @chk ccall(\n               (:DMGetCellCoordinateDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, cdm_,\n              )\n\n\tcdm.ptr = cdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCellCoordinateDM(petsclib::PetscLibType,dm::PetscDM, cdm::PetscDM) \nSets the `DM` that prescribes cellwise coordinate layout and scatters between global and local cellwise coordinates\n\nLogically Collective\n\nInput Parameters:\n- `dm`  - the `DM`\n- `cdm` - cellwise coordinate `DM`\n\nLevel: intermediate\n\n-seealso: `DMGetCellCoordinateDM()`, `DMSetCellCoordinates()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMGetCellCoordinatesLocal()`,\n`DMSetCoordinateDM()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinateDM\"))\n\"\"\"\nfunction DMSetCellCoordinateDM(petsclib::PetscLibType, dm::PetscDM, cdm::PetscDM) end\n\n@for_petsc function DMSetCellCoordinateDM(petsclib::$UnionPetscLib, dm::PetscDM, cdm::PetscDM )\n\n    @chk ccall(\n               (:DMSetCellCoordinateDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, cdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt = DMGetCoordinateDim(petsclib::PetscLibType,dm::PetscDM) \nRetrieve the dimension of the embedding space for coordinate values. For example a mesh on the surface of a sphere would have a 3 dimensional embedding space\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `dim` - The embedding dimension\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCoordinateDim()`, `DMGetCoordinateSection()`, `DMGetCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateDim\"))\n\"\"\"\nfunction DMGetCoordinateDim(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetCoordinateDim(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetCoordinateDim, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tDMSetCoordinateDim(petsclib::PetscLibType,dm::PetscDM, dim::PetscInt) \nSet the dimension of the embedding space for coordinate values.\n\nNot Collective\n\nInput Parameters:\n- `dm`  - The `DM` object\n- `dim` - The embedding dimension\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDim()`, `DMSetCoordinateSection()`, `DMGetCoordinateSection()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateDim\"))\n\"\"\"\nfunction DMSetCoordinateDim(petsclib::PetscLibType, dm::PetscDM, dim::PetscInt) end\n\n@for_petsc function DMSetCoordinateDim(petsclib::$UnionPetscLib, dm::PetscDM, dim::$PetscInt )\n\n    @chk ccall(\n               (:DMSetCoordinateDim, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCoordinateSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nRetrieve the `PetscSection` of coordinate values over the mesh.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `section` - The `PetscSection` object\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateSection\"))\n\"\"\"\nfunction DMGetCoordinateSection(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMGetCoordinateSection(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMGetCoordinateSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCoordinateSection(petsclib::PetscLibType,dm::PetscDM, dim::PetscInt, section::PetscSection) \nSet the `PetscSection` of coordinate values over the mesh.\n\nNot Collective\n\nInput Parameters:\n- `dm`      - The `DM` object\n- `dim`     - The embedding dimension, or `PETSC_DETERMINE`\n- `section` - The `PetscSection` object\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDim()`, `DMGetCoordinateSection()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateSection\"))\n\"\"\"\nfunction DMSetCoordinateSection(petsclib::PetscLibType, dm::PetscDM, dim::PetscInt, section::PetscSection) end\n\n@for_petsc function DMSetCoordinateSection(petsclib::$UnionPetscLib, dm::PetscDM, dim::$PetscInt, section::PetscSection )\n\n    @chk ccall(\n               (:DMSetCoordinateSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscSection),\n               dm, dim, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCellCoordinateSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nRetrieve the `PetscSection` of cellwise coordinate values over the mesh.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `section` - The `PetscSection` object, or `NULL` if no cellwise coordinates are defined\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateSection()`, `DMSetCellCoordinateSection()`, `DMGetCellCoordinateDM()`, `DMGetCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinateSection\"))\n\"\"\"\nfunction DMGetCellCoordinateSection(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMGetCellCoordinateSection(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMGetCellCoordinateSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCellCoordinateSection(petsclib::PetscLibType,dm::PetscDM, dim::PetscInt, section::PetscSection) \nSet the `PetscSection` of cellwise coordinate values over the mesh.\n\nNot Collective\n\nInput Parameters:\n- `dm`      - The `DM` object\n- `dim`     - The embedding dimension, or `PETSC_DETERMINE`\n- `section` - The `PetscSection` object for a cellwise layout\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDim()`, `DMSetCoordinateSection()`, `DMGetCellCoordinateSection()`, `DMGetCoordinateSection()`, `DMGetCellCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinateSection\"))\n\"\"\"\nfunction DMSetCellCoordinateSection(petsclib::PetscLibType, dm::PetscDM, dim::PetscInt, section::PetscSection) end\n\n@for_petsc function DMSetCellCoordinateSection(petsclib::$UnionPetscLib, dm::PetscDM, dim::$PetscInt, section::PetscSection )\n\n    @chk ccall(\n               (:DMSetCellCoordinateSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscSection),\n               dm, dim, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCoordinates(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nGets a global vector with the coordinates associated with the `DM`.\n\nCollective if the global vector with coordinates has not been set yet but the local vector with coordinates has been set\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `c` - global coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMDA`, `DMSetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCoordinateDM()`, `DMDASetUniformCoordinates()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinates\"))\n\"\"\"\nfunction DMGetCoordinates(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMGetCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\tc_ = Ref(c.ptr)\n\n    @chk ccall(\n               (:DMGetCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, c_,\n              )\n\n\tc.ptr = c_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCoordinates(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nSets into the `DM` a global vector that holds the coordinates\n\nLogically Collective\n\nInput Parameters:\n- `dm` - the `DM`\n- `c`  - coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCoordinateDM()`, `DMDASetUniformCoordinates()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinates\"))\n\"\"\"\nfunction DMSetCoordinates(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMSetCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\n    @chk ccall(\n               (:DMSetCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCellCoordinates(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nGets a global vector with the cellwise coordinates associated with the `DM`.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `c` - global coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinates()`, `DMSetCellCoordinates()`, `DMGetCellCoordinatesLocal()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinates\"))\n\"\"\"\nfunction DMGetCellCoordinates(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMGetCellCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\tc_ = Ref(c.ptr)\n\n    @chk ccall(\n               (:DMGetCellCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, c_,\n              )\n\n\tc.ptr = c_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCellCoordinates(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nSets into the `DM` a global vector that holds the cellwise coordinates\n\nCollective\n\nInput Parameters:\n- `dm` - the `DM`\n- `c`  - cellwise coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinates()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMGetCellCoordinatesLocal()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinates\"))\n\"\"\"\nfunction DMSetCellCoordinates(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMSetCellCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\n    @chk ccall(\n               (:DMSetCellCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCoordinatesLocalSetUp(petsclib::PetscLibType,dm::PetscDM) \nPrepares a local vector of coordinates, so that `DMGetCoordinatesLocalNoncollective()` can be used as non\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nLevel: advanced\n\n-seealso: `DM`, `DMSetCoordinates()`, `DMGetCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalSetUp\"))\n\"\"\"\nfunction DMGetCoordinatesLocalSetUp(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetCoordinatesLocalSetUp(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMGetCoordinatesLocalSetUp, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCoordinatesLocal(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nGets a local vector with the coordinates associated with the `DM`.\n\nCollective the first time it is called\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `c` - coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMSetCoordinates()`, `DMGetCoordinateDM()`, `DMGetCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocal\"))\n\"\"\"\nfunction DMGetCoordinatesLocal(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMGetCoordinatesLocal(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\tc_ = Ref(c.ptr)\n\n    @chk ccall(\n               (:DMGetCoordinatesLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, c_,\n              )\n\n\tc.ptr = c_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCoordinatesLocalNoncollective(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nNon\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `c` - coordinate vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMGetCoordinatesLocalSetUp()`, `DMGetCoordinatesLocal()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMSetCoordinates()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalNoncollective\"))\n\"\"\"\nfunction DMGetCoordinatesLocalNoncollective(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMGetCoordinatesLocalNoncollective(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\tc_ = Ref(c.ptr)\n\n    @chk ccall(\n               (:DMGetCoordinatesLocalNoncollective, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, c_,\n              )\n\n\tc.ptr = c_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCoordinatesLocalTuple(petsclib::PetscLibType,dm::PetscDM, p::IS, pCoordSection::PetscSection, pCoord::PetscVec) \nGets a local vector with the coordinates of specified points and the section describing its layout.\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DM`\n- `p`  - the `IS` of points whose coordinates will be returned\n\nOutput Parameters:\n- `pCoordSection` - the `PetscSection` describing the layout of pCoord, i.e. each point corresponds to one point in `p`, and DOFs correspond to coordinates\n- `pCoord`        - the `Vec` with coordinates of points in `p`\n\nLevel: advanced\n\n-seealso: `DM`, `DMDA`, `DMSetCoordinatesLocal()`, `DMGetCoordinatesLocal()`, `DMGetCoordinatesLocalNoncollective()`, `DMGetCoordinatesLocalSetUp()`, `DMGetCoordinates()`, `DMSetCoordinates()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalTuple\"))\n\"\"\"\nfunction DMGetCoordinatesLocalTuple(petsclib::PetscLibType, dm::PetscDM, p::IS, pCoordSection::PetscSection, pCoord::PetscVec) end\n\n@for_petsc function DMGetCoordinatesLocalTuple(petsclib::$UnionPetscLib, dm::PetscDM, p::IS, pCoordSection::PetscSection, pCoord::PetscVec )\n\tpCoord_ = Ref(pCoord.ptr)\n\n    @chk ccall(\n               (:DMGetCoordinatesLocalTuple, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, Ptr{PetscSection}, Ptr{CVec}),\n               dm, p, pCoordSection, pCoord_,\n              )\n\n\tpCoord.ptr = pCoord_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCoordinatesLocal(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nSets into the `DM` a local vector, including ghost points, that holds the coordinates\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DM`\n- `c`  - coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinatesLocal()`, `DMSetCoordinates()`, `DMGetCoordinates()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinatesLocal\"))\n\"\"\"\nfunction DMSetCoordinatesLocal(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMSetCoordinatesLocal(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\n    @chk ccall(\n               (:DMSetCoordinatesLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCellCoordinatesLocalSetUp(petsclib::PetscLibType,dm::PetscDM) \nPrepares a local vector of cellwise coordinates, so that `DMGetCellCoordinatesLocalNoncollective()` can be used as non\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nLevel: advanced\n\n-seealso: `DM`, `DMGetCellCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinatesLocalSetUp\"))\n\"\"\"\nfunction DMGetCellCoordinatesLocalSetUp(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetCellCoordinatesLocalSetUp(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMGetCellCoordinatesLocalSetUp, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCellCoordinatesLocal(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nGets a local vector with the cellwise coordinates associated with the `DM`.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `c` - coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMSetCellCoordinates()`, `DMGetCellCoordinateDM()`, `DMGetCellCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinatesLocal\"))\n\"\"\"\nfunction DMGetCellCoordinatesLocal(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMGetCellCoordinatesLocal(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\tc_ = Ref(c.ptr)\n\n    @chk ccall(\n               (:DMGetCellCoordinatesLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, c_,\n              )\n\n\tc.ptr = c_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCellCoordinatesLocalNoncollective(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nNon\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `c` - cellwise coordinate vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMGetCellCoordinatesLocalSetUp()`, `DMGetCellCoordinatesLocal()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMSetCellCoordinates()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinatesLocalNoncollective\"))\n\"\"\"\nfunction DMGetCellCoordinatesLocalNoncollective(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMGetCellCoordinatesLocalNoncollective(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\tc_ = Ref(c.ptr)\n\n    @chk ccall(\n               (:DMGetCellCoordinatesLocalNoncollective, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, c_,\n              )\n\n\tc.ptr = c_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCellCoordinatesLocal(petsclib::PetscLibType,dm::PetscDM, c::PetscVec) \nSets into the `DM` a local vector including ghost points that holds the cellwise coordinates\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DM`\n- `c`  - cellwise coordinate vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCellCoordinatesLocal()`, `DMSetCellCoordinates()`, `DMGetCellCoordinates()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinatesLocal\"))\n\"\"\"\nfunction DMSetCellCoordinatesLocal(petsclib::PetscLibType, dm::PetscDM, c::PetscVec) end\n\n@for_petsc function DMSetCellCoordinatesLocal(petsclib::$UnionPetscLib, dm::PetscDM, c::PetscVec )\n\n    @chk ccall(\n               (:DMSetCellCoordinatesLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetCoordinateField(petsclib::PetscLibType,dm::PetscDM, field::DMField) \n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateField\"))\n\"\"\"\nfunction DMGetCoordinateField(petsclib::PetscLibType, dm::PetscDM, field::DMField) end\n\n@for_petsc function DMGetCoordinateField(petsclib::$UnionPetscLib, dm::PetscDM, field::DMField )\n\n    @chk ccall(\n               (:DMGetCoordinateField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMField}),\n               dm, field,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCoordinateField(petsclib::PetscLibType,dm::PetscDM, field::DMField) \n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateField\"))\n\"\"\"\nfunction DMSetCoordinateField(petsclib::PetscLibType, dm::PetscDM, field::DMField) end\n\n@for_petsc function DMSetCoordinateField(petsclib::$UnionPetscLib, dm::PetscDM, field::DMField )\n\n    @chk ccall(\n               (:DMSetCoordinateField, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMField),\n               dm, field,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetCellCoordinateField(petsclib::PetscLibType,dm::PetscDM, field::DMField) \n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinateField\"))\n\"\"\"\nfunction DMSetCellCoordinateField(petsclib::PetscLibType, dm::PetscDM, field::DMField) end\n\n@for_petsc function DMSetCellCoordinateField(petsclib::$UnionPetscLib, dm::PetscDM, field::DMField )\n\n    @chk ccall(\n               (:DMSetCellCoordinateField, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMField),\n               dm, field,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlmin::Vector{PetscReal},lmax::Vector{PetscReal} = DMGetLocalBoundingBox(petsclib::PetscLibType,dm::PetscDM) \nReturns the bounding box for the piece of the `DM` on this process.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameters:\n- `lmin` - local minimum coordinates (length coord dim, optional)\n- `lmax` - local maximum coordinates (length coord dim, optional)\n\nLevel: beginner\n\n-seealso: `DM`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetBoundingBox()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalBoundingBox\"))\n\"\"\"\nfunction DMGetLocalBoundingBox(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetLocalBoundingBox(petsclib::$UnionPetscLib, dm::PetscDM )\n\tlmin = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tlmax = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMGetLocalBoundingBox, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, lmin, lmax,\n              )\n\n\n\treturn lmin,lmax\nend \n\n\"\"\"\n\tgmin::Vector{PetscReal},gmax::Vector{PetscReal} = DMGetBoundingBox(petsclib::PetscLibType,dm::PetscDM) \nReturns the global bounding box for the `DM`.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameters:\n- `gmin` - global minimum coordinates (length coord dim, optional)\n- `gmax` - global maximum coordinates (length coord dim, optional)\n\nLevel: beginner\n\n-seealso: `DM`, `DMGetLocalBoundingBox()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBoundingBox\"))\n\"\"\"\nfunction DMGetBoundingBox(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetBoundingBox(petsclib::$UnionPetscLib, dm::PetscDM )\n\tgmin = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tgmax = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMGetBoundingBox, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, gmin, gmax,\n              )\n\n\n\treturn gmin,gmax\nend \n\n\"\"\"\n\tDMSetCoordinateDisc(petsclib::PetscLibType,dm::PetscDM, disc::PetscFE, locized::PetscBool, project::PetscBool) \nSet a coordinate space\n\nInput Parameters:\n- `dm`        - The `DM` object\n- `disc`      - The new coordinate discretization or `NULL` to ensure a coordinate discretization exists\n- `localized` - Set a localized (DG) coordinate space\n- `project`   - Project coordinates to new discretization\n\nLevel: intermediate\n\n-seealso: `DM`, `PetscFE`, `DMGetCoordinateField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateDisc\"))\n\"\"\"\nfunction DMSetCoordinateDisc(petsclib::PetscLibType, dm::PetscDM, disc::PetscFE, locized::PetscBool, project::PetscBool) end\n\n@for_petsc function DMSetCoordinateDisc(petsclib::$UnionPetscLib, dm::PetscDM, disc::PetscFE, locized::PetscBool, project::PetscBool )\n\n    @chk ccall(\n               (:DMSetCoordinateDisc, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFE, PetscBool, PetscBool),\n               dm, disc, locized, project,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocatePoints(petsclib::PetscLibType,dm::PetscDM, v::PetscVec, ltype::DMPoCintLocationType, cellSF::PetscSF) \nLocate the points in `v` in the mesh and return a `PetscSF` of the containing cells\n\nCollective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `ltype` - The type of point location, e.g. `DM_POINTLOCATION_NONE` or `DM_POINTLOCATION_NEAREST`\n\nInput/Output Parameters:\n- `v`      - The `Vec` of points, on output contains the nearest mesh points to the given points if `DM_POINTLOCATION_NEAREST` is used\n- `cellSF` - Points to either `NULL`, or a `PetscSF` with guesses for which cells contain each point;\non output, the `PetscSF` containing the MPI ranks and local indices of the containing points\n\nLevel: developer\n\n-seealso: `DM`, `DMSetCoordinates()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMPointLocationType`\n\n# External Links\n$(_doc_external(\"DM/DMLocatePoints\"))\n\"\"\"\nfunction DMLocatePoints(petsclib::PetscLibType, dm::PetscDM, v::PetscVec, ltype::DMPoCintLocationType, cellSF::PetscSF) end\n\n@for_petsc function DMLocatePoints(petsclib::$UnionPetscLib, dm::PetscDM, v::PetscVec, ltype::DMPoCintLocationType, cellSF::PetscSF )\n\n    @chk ccall(\n               (:DMLocatePoints, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, DMPoCintLocationType, Ptr{PetscSF}),\n               dm, v, ltype, cellSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGeomModelRegisterAll(petsclib::PetscLibType) \nRegisters all of the geometry model methods in the `DM` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `DM`, `DMGeomModelRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMGeomModelRegisterAll\"))\n\"\"\"\nfunction DMGeomModelRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function DMGeomModelRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMGeomModelRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGeomModelRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a geometry model to `DM`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname` - name of a new user-defined geometry model\n- `fnc`   - geometry model function\n\n-seealso: `DM`, `DMGeomModelRegisterAll()`, `DMPlexGeomModel()`, `DMGeomModelRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMGeomModelRegister\"))\n\"\"\"\nfunction DMGeomModelRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function DMGeomModelRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:DMGeomModelRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGeomModelRegisterDestroy(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"DM/DMGeomModelRegisterDestroy\"))\n\"\"\"\nfunction DMGeomModelRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function DMGeomModelRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMGeomModelRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSetSnapToGeomModel(petsclib::PetscLibType,dm::PetscDM, name::String) \nChoose a geometry model for this `DM`.\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM` object\n- `name` - A geometry model name, or `NULL` for the default\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRefine()`, `DMPlexCreate()`, `DMSnapToGeomModel()`\n\n# External Links\n$(_doc_external(\"DM/DMSetSnapToGeomModel\"))\n\"\"\"\nfunction DMSetSnapToGeomModel(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMSetSnapToGeomModel(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\n    @chk ccall(\n               (:DMSetSnapToGeomModel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgcoords::Vector{PetscScalar} = DMSnapToGeomModel(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, dE::PetscInt, mcoords::Vector{PetscScalar}) \nGiven a coordinate point 'mcoords' on the mesh point 'p', return the closest coordinate point 'gcoords' on the geometry model associated with that point.\n\nNot Collective\n\nInput Parameters:\n- `dm`      - The `DMPLEX` object\n- `p`       - The mesh point\n- `dE`      - The coordinate dimension\n- `mcoords` - A coordinate point lying on the mesh point\n\nOutput Parameter:\n- `gcoords` - The closest coordinate point on the geometry model associated with 'p' to the given point\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRefine()`, `DMPlexCreate()`, `DMPlexSetRefinementUniform()`\n\n# External Links\n$(_doc_external(\"DM/DMSnapToGeomModel\"))\n\"\"\"\nfunction DMSnapToGeomModel(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, dE::PetscInt, mcoords::Vector{PetscScalar}) end\n\n@for_petsc function DMSnapToGeomModel(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, dE::$PetscInt, mcoords::Vector{$PetscScalar} )\n\tgcoords = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMSnapToGeomModel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               dm, p, dE, mcoords, gcoords,\n              )\n\n\n\treturn gcoords\nend \n\n\"\"\"\n\tDMGenerateRegisterAll(petsclib::PetscLibType) \nRegisters all of the mesh generation methods in the `DM` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `DM`, `DMGenerateRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMGenerateRegisterAll\"))\n\"\"\"\nfunction DMGenerateRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function DMGenerateRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMGenerateRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGenerateRegister(petsclib::PetscLibType,sname::String, fnc::external, rfnc::external, alfnc::external, dim::PetscInt) \nAdds a grid generator to `DM`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname` - name of a new user-defined grid generator\n- `fnc`   - generator function\n- `rfnc`  - refinement function\n- `alfnc` - adapt by label function\n- `dim`   - dimension of boundary of domain\n\n-seealso: `DM`, `DMGenerateRegisterAll()`, `DMPlexGenerate()`, `DMGenerateRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMGenerateRegister\"))\n\"\"\"\nfunction DMGenerateRegister(petsclib::PetscLibType, sname::String, fnc::external, rfnc::external, alfnc::external, dim::PetscInt) end\n\n@for_petsc function DMGenerateRegister(petsclib::$UnionPetscLib, sname::String, fnc::external, rfnc::external, alfnc::external, dim::$PetscInt )\n\n    @chk ccall(\n               (:DMGenerateRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external, external, external, $PetscInt),\n               sname, fnc, rfnc, alfnc, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGenerateRegisterDestroy(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"DM/DMGenerateRegisterDestroy\"))\n\"\"\"\nfunction DMGenerateRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function DMGenerateRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMGenerateRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptLabel(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, dmAdapt::PetscDM) \nAdapt a `DM` based on a `DMLabel` with values interpreted as coarsening and refining flags.  Specific implementations of `DM` maybe have\nspecialized flags, but all implementations should accept flag values `DM_ADAPT_DETERMINE`, `DM_ADAPT_KEEP`, `DM_ADAPT_REFINE`, and,\n`DM_ADAPT_COARSEN`.\n\nCollective\n\nInput Parameters:\n- `dm`    - the pre-adaptation `DM` object\n- `label` - label with the flags\n\nOutput Parameters:\n- `dmAdapt` - the adapted `DM` object: may be `NULL` if an adapted `DM` could not be produced.\n\nLevel: intermediate\n\n-seealso: `DM`, `DMAdaptMetric()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptLabel\"))\n\"\"\"\nfunction DMAdaptLabel(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, dmAdapt::PetscDM) end\n\n@for_petsc function DMAdaptLabel(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, dmAdapt::PetscDM )\n\tdmAdapt_ = Ref(dmAdapt.ptr)\n\n    @chk ccall(\n               (:DMAdaptLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, Ptr{CDM}),\n               dm, label, dmAdapt_,\n              )\n\n\tdmAdapt.ptr = dmAdapt_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptMetric(petsclib::PetscLibType,dm::PetscDM, metric::PetscVec, bdLabel::DMLabel, rgLabel::DMLabel, dmAdapt::PetscDM) \nGenerates a mesh adapted to the specified metric field.\n\nInput Parameters:\n- `dm`      - The DM object\n- `metric`  - The metric to which the mesh is adapted, defined vertex-wise.\n- `bdLabel` - Label for boundary tags, which will be preserved in the output mesh. `bdLabel` should be `NULL` if there is no such label, and should be different from \"_boundary_\".\n- `rgLabel` - Label for cell tags, which will be preserved in the output mesh. `rgLabel` should be `NULL` if there is no such label, and should be different from \"_regions_\".\n\nOutput Parameter:\n- `dmAdapt` - Pointer to the `DM` object containing the adapted mesh\n\n-seealso: `DMAdaptLabel()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptMetric\"))\n\"\"\"\nfunction DMAdaptMetric(petsclib::PetscLibType, dm::PetscDM, metric::PetscVec, bdLabel::DMLabel, rgLabel::DMLabel, dmAdapt::PetscDM) end\n\n@for_petsc function DMAdaptMetric(petsclib::$UnionPetscLib, dm::PetscDM, metric::PetscVec, bdLabel::DMLabel, rgLabel::DMLabel, dmAdapt::PetscDM )\n\tdmAdapt_ = Ref(dmAdapt.ptr)\n\n    @chk ccall(\n               (:DMAdaptMetric, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, DMLabel, DMLabel, Ptr{CDM}),\n               dm, metric, bdLabel, rgLabel, dmAdapt_,\n              )\n\n\tdmAdapt.ptr = dmAdapt_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxCell::Vector{PetscReal},Lstart::Vector{PetscReal},L::Vector{PetscReal} = DMGetPeriodicity(petsclib::PetscLibType,dm::PetscDM) \nGet the description of mesh periodicity\n\nNot collective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameters:\n- `maxCell` - Over distances greater than this, we can assume a point has crossed over to another sheet, when trying to localize cell coordinates\n- `Lstart`  - If we assume the mesh is a torus, this is the start of each coordinate, or `NULL` for 0.0\n- `L`       - If we assume the mesh is a torus, this is the length of each coordinate, otherwise it is < 0.0\n\nLevel: developer\n\n-seealso: `DM`\n\n# External Links\n$(_doc_external(\"DM/DMGetPeriodicity\"))\n\"\"\"\nfunction DMGetPeriodicity(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetPeriodicity(petsclib::$UnionPetscLib, dm::PetscDM )\n\tmaxCell_ = Ref{Ptr{$PetscReal}}()\n\tLstart_ = Ref{Ptr{$PetscReal}}()\n\tL_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:DMGetPeriodicity, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               dm, maxCell_, Lstart_, L_,\n              )\n\n\tmaxCell = unsafe_wrap(Array, maxCell_[], VecGetLocalSize(petsclib, x); own = false)\n\tLstart = unsafe_wrap(Array, Lstart_[], VecGetLocalSize(petsclib, x); own = false)\n\tL = unsafe_wrap(Array, L_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn maxCell,Lstart,L\nend \n\n\"\"\"\n\tDMSetPeriodicity(petsclib::PetscLibType,dm::PetscDM, maxCell::Vector{PetscReal}, Lstart::Vector{PetscReal}, L::Vector{PetscReal}) \nSet the description of mesh periodicity\n\nLogically Collective\n\nInput Parameters:\n- `dm`      - The `DM` object\n- `maxCell` - Over distances greater than this, we can assume a point has crossed over to another sheet, when trying to localize cell coordinates. Pass `NULL` to remove such information.\n- `Lstart`  - If we assume the mesh is a torus, this is the start of each coordinate, or `NULL` for 0.0\n- `L`       - If we assume the mesh is a torus, this is the length of each coordinate, otherwise it is < 0.0\n\nLevel: developer\n\n-seealso: `DM`, `DMGetPeriodicity()`\n\n# External Links\n$(_doc_external(\"DM/DMSetPeriodicity\"))\n\"\"\"\nfunction DMSetPeriodicity(petsclib::PetscLibType, dm::PetscDM, maxCell::Vector{PetscReal}, Lstart::Vector{PetscReal}, L::Vector{PetscReal}) end\n\n@for_petsc function DMSetPeriodicity(petsclib::$UnionPetscLib, dm::PetscDM, maxCell::Vector{$PetscReal}, Lstart::Vector{$PetscReal}, L::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMSetPeriodicity, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, maxCell, Lstart, L,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tout::Vector{PetscScalar} = DMLocalizeCoordinate(petsclib::PetscLibType,dm::PetscDM, in::Vector{PetscScalar}, endpoint::PetscBool) \nIf a mesh is periodic (a torus with lengths L_i, some of which can be infinite), project the coordinate onto [0, L_i) in each dimension.\n\nInput Parameters:\n- `dm`       - The `DM`\n- `in`       - The input coordinate point (dim numbers)\n- `endpoint` - Include the endpoint L_i\n\nOutput Parameter:\n- `out` - The localized coordinate point (dim numbers)\n\nLevel: developer\n\n-seealso: `DM`, `DMLocalizeCoordinates()`, `DMLocalizeAddCoordinate()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalizeCoordinate\"))\n\"\"\"\nfunction DMLocalizeCoordinate(petsclib::PetscLibType, dm::PetscDM, in::Vector{PetscScalar}, endpoint::PetscBool) end\n\n@for_petsc function DMLocalizeCoordinate(petsclib::$UnionPetscLib, dm::PetscDM, in::Vector{$PetscScalar}, endpoint::PetscBool )\n\tout = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMLocalizeCoordinate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscScalar}, PetscBool, Ptr{$PetscScalar}),\n               dm, in, endpoint, out,\n              )\n\n\n\treturn out\nend \n\n\"\"\"\n\tareLocalized::PetscBool = DMGetCoordinatesLocalizedLocal(petsclib::PetscLibType,dm::PetscDM) \nCheck if the `DM` coordinates have been localized for cells on this process\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `areLocalized` - `PETSC_TRUE` if localized\n\nLevel: developer\n\n-seealso: `DM`, `DMLocalizeCoordinates()`, `DMGetCoordinatesLocalized()`, `DMSetPeriodicity()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalizedLocal\"))\n\"\"\"\nfunction DMGetCoordinatesLocalizedLocal(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetCoordinatesLocalizedLocal(petsclib::$UnionPetscLib, dm::PetscDM )\n\tareLocalized_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetCoordinatesLocalizedLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, areLocalized_,\n              )\n\n\tareLocalized = areLocalized_[]\n\n\treturn areLocalized\nend \n\n\"\"\"\n\tareLocalized::PetscBool = DMGetCoordinatesLocalized(petsclib::PetscLibType,dm::PetscDM) \nCheck if the `DM` coordinates have been localized for cells\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `areLocalized` - `PETSC_TRUE` if localized\n\nLevel: developer\n\n-seealso: `DM`, `DMLocalizeCoordinates()`, `DMSetPeriodicity()`, `DMGetCoordinatesLocalizedLocal()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalized\"))\n\"\"\"\nfunction DMGetCoordinatesLocalized(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetCoordinatesLocalized(petsclib::$UnionPetscLib, dm::PetscDM )\n\tareLocalized_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetCoordinatesLocalized, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, areLocalized_,\n              )\n\n\tareLocalized = areLocalized_[]\n\n\treturn areLocalized\nend \n\n\"\"\"\n\tsparse::PetscBool = DMGetSparseLocalize(petsclib::PetscLibType,dm::PetscDM) \nCheck if the `DM` coordinates should be localized only for cells near the periodic boundary.\n\nNot collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `sparse` - `PETSC_TRUE` if only cells near the periodic boundary are localized\n\nLevel: intermediate\n\n-seealso: `DMSetSparseLocalize()`, `DMLocalizeCoordinates()`, `DMSetPeriodicity()`\n\n# External Links\n$(_doc_external(\"DM/DMGetSparseLocalize\"))\n\"\"\"\nfunction DMGetSparseLocalize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMGetSparseLocalize(petsclib::$UnionPetscLib, dm::PetscDM )\n\tsparse_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMGetSparseLocalize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, sparse_,\n              )\n\n\tsparse = sparse_[]\n\n\treturn sparse\nend \n\n\"\"\"\n\tDMSetSparseLocalize(petsclib::PetscLibType,dm::PetscDM, sparse::PetscBool) \nSet the flag indicating that `DM` coordinates should be localized only for cells near the periodic boundary.\n\nLogically collective\n\nInput Parameters:\n- `dm`     - The `DM`\n- `sparse` - `PETSC_TRUE` if only cells near the periodic boundary are localized\n\nLevel: intermediate\n\n-seealso: `DMGetSparseLocalize()`, `DMLocalizeCoordinates()`, `DMSetPeriodicity()`\n\n# External Links\n$(_doc_external(\"DM/DMSetSparseLocalize\"))\n\"\"\"\nfunction DMSetSparseLocalize(petsclib::PetscLibType, dm::PetscDM, sparse::PetscBool) end\n\n@for_petsc function DMSetSparseLocalize(petsclib::$UnionPetscLib, dm::PetscDM, sparse::PetscBool )\n\n    @chk ccall(\n               (:DMSetSparseLocalize, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, sparse,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalizeCoordinates(petsclib::PetscLibType,dm::PetscDM) \nIf a mesh is periodic, create local coordinates for cells having periodic faces\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMSetPeriodicity()`, `DMLocalizeCoordinate()`, `DMLocalizeAddCoordinate()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalizeCoordinates\"))\n\"\"\"\nfunction DMLocalizeCoordinates(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMLocalizeCoordinates(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMLocalizeCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestRegisterType(petsclib::PetscLibType,name::DMType) \nRegisters a `DMType` as a subtype of `DMFOREST` (so that `DMIsForest()` will be correct)\n\nNot Collective\n\nInput Parameter:\n- `name` - the name of the type\n\nLevel: advanced\n\n-seealso: `DMFOREST`, `DMIsForest()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestRegisterType\"))\n\"\"\"\nfunction DMForestRegisterType(petsclib::PetscLibType, name::DMType) end\n\n@for_petsc function DMForestRegisterType(petsclib::$UnionPetscLib, name::DMType )\n\n    @chk ccall(\n               (:DMForestRegisterType, $petsc_library),\n               PetscErrorCode,\n               (DMType,),\n               name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisForest::PetscBool = DMIsForest(petsclib::PetscLibType,dm::PetscDM) \nCheck whether a DM uses the DMFOREST interface for hierarchically\n\nNot Collective\n\nInput Parameter:\n- `dm` - the DM object\n\nOutput Parameter:\n- `isForest` - whether dm is a subtype of DMFOREST\n\nLevel: intermediate\n\n-seealso: `DMFOREST`, `DMForestRegisterType()`\n\n# External Links\n$(_doc_external(\"DM/DMIsForest\"))\n\"\"\"\nfunction DMIsForest(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMIsForest(petsclib::$UnionPetscLib, dm::PetscDM )\n\tisForest_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMIsForest, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, isForest_,\n              )\n\n\tisForest = isForest_[]\n\n\treturn isForest\nend \n\n\"\"\"\n\tDMForestTemplate(petsclib::PetscLibType,dm::PetscDM, comm::MPI_Comm, tdm::PetscDM) \nCreate a new `DM` that will be adapted from a source `DM`.\n\nCollective\n\nInput Parameters:\n- `dm`   - the source `DM` object\n- `comm` - the communicator for the new `DM` (this communicator is currently ignored, but is present so that `DMForestTemplate()` can be used within `DMCoarsen()`)\n\nOutput Parameter:\n- `tdm` - the new `DM` object\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetAdaptivityForest()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestTemplate\"))\n\"\"\"\nfunction DMForestTemplate(petsclib::PetscLibType, dm::PetscDM, comm::MPI_Comm, tdm::PetscDM) end\n\n@for_petsc function DMForestTemplate(petsclib::$UnionPetscLib, dm::PetscDM, comm::MPI_Comm, tdm::PetscDM )\n\ttdm_ = Ref(tdm.ptr)\n\n    @chk ccall(\n               (:DMForestTemplate, $petsc_library),\n               PetscErrorCode,\n               (CDM, MPI_Comm, Ptr{CDM}),\n               dm, comm, tdm_,\n              )\n\n\ttdm.ptr = tdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetTopology(petsclib::PetscLibType,dm::PetscDM, topology::DMForestTopology) \nSet the topology of a `DMFOREST` during the pre\n\"cube\", \"shell\") and can be interpreted by subtypes of `DMFOREST`) to construct the base DM of a forest during\n`DMSetUp()`.\n\nLogically collectiv\n\nInput Parameters:\n- `dm`       - the forest\n- `topology` - the topology of the forest\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetTopology()`, `DMForestSetBaseDM()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetTopology\"))\n\"\"\"\nfunction DMForestSetTopology(petsclib::PetscLibType, dm::PetscDM, topology::Union{DMForestTopology, String}) end\n\n@for_petsc function DMForestSetTopology(petsclib::$UnionPetscLib, dm::PetscDM, topology::Union{DMForestTopology, String} )\n\n    topo_arg = topology\n\n    @chk ccall(\n               (:DMForestSetTopology, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMForestTopology),\n               dm, topo_arg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestGetTopology(petsclib::PetscLibType,dm::PetscDM, topology::DMForestTopology) \nGet a string describing the topology of a `DMFOREST`.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `topology` - the topology of the forest (e.g., 'cube', 'shell')\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetTopology()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetTopology\"))\n\"\"\"\nfunction DMForestGetTopology(petsclib::PetscLibType, dm::PetscDM, topology::DMForestTopology) end\n\n@for_petsc function DMForestGetTopology(petsclib::$UnionPetscLib, dm::PetscDM, topology::DMForestTopology )\n\n    @chk ccall(\n               (:DMForestGetTopology, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMForestTopology}),\n               dm, topology,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetBaseDM(petsclib::PetscLibType,dm::PetscDM, base::PetscDM) \nDuring the pre\n`DMFOREST` forest.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the forest\n- `base` - the base `DM` of the forest\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetBaseDM()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetBaseDM\"))\n\"\"\"\nfunction DMForestSetBaseDM(petsclib::PetscLibType, dm::PetscDM, base::PetscDM) end\n\n@for_petsc function DMForestSetBaseDM(petsclib::$UnionPetscLib, dm::PetscDM, base::PetscDM )\n\n    @chk ccall(\n               (:DMForestSetBaseDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, base,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestGetBaseDM(petsclib::PetscLibType,dm::PetscDM, base::PetscDM) \nGet the base `DM` of a `DMFOREST`\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `base` - the base `DM` of the forest\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetBaseDM()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetBaseDM\"))\n\"\"\"\nfunction DMForestGetBaseDM(petsclib::PetscLibType, dm::PetscDM, base::PetscDM) end\n\n@for_petsc function DMForestGetBaseDM(petsclib::$UnionPetscLib, dm::PetscDM, base::PetscDM )\n\tbase_ = Ref(base.ptr)\n\n    @chk ccall(\n               (:DMForestGetBaseDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, base_,\n              )\n\n\tbase.ptr = base_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetBaseCoordinateMapping(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetBaseCoordinateMapping\"))\n\"\"\"\nfunction DMForestSetBaseCoordinateMapping(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMForestSetBaseCoordinateMapping(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMForestSetBaseCoordinateMapping, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetAdaptivityForest(petsclib::PetscLibType,dm::PetscDM, adapt::PetscDM) \nDuring the pre\ncurrent forest will be adapted (e.g., the current forest will be\nrefined/coarsened/repartitioned from it) in `DMSetUp()`.\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the new forest, which will be constructed from adapt\n- `adapt` - the old forest\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetAdaptivityForest()`, `DMForestSetAdaptivityPurpose()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetAdaptivityForest\"))\n\"\"\"\nfunction DMForestSetAdaptivityForest(petsclib::PetscLibType, dm::PetscDM, adapt::PetscDM) end\n\n@for_petsc function DMForestSetAdaptivityForest(petsclib::$UnionPetscLib, dm::PetscDM, adapt::PetscDM )\n\n    @chk ccall(\n               (:DMForestSetAdaptivityForest, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestGetAdaptivityForest(petsclib::PetscLibType,dm::PetscDM, adapt::PetscDM) \nGet the forest from which the current forest is adapted.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `adapt` - the forest from which `dm` is/was adapted\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetAdaptivityForest()`, `DMForestSetAdaptivityPurpose()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdaptivityForest\"))\n\"\"\"\nfunction DMForestGetAdaptivityForest(petsclib::PetscLibType, dm::PetscDM, adapt::PetscDM) end\n\n@for_petsc function DMForestGetAdaptivityForest(petsclib::$UnionPetscLib, dm::PetscDM, adapt::PetscDM )\n\tadapt_ = Ref(adapt.ptr)\n\n    @chk ccall(\n               (:DMForestGetAdaptivityForest, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, adapt_,\n              )\n\n\tadapt.ptr = adapt_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetAdaptivityPurpose(petsclib::PetscLibType,dm::PetscDM, purpose::DMAdaptFlag) \nDuring the pre\nsource (set with `DMForestSetAdaptivityForest()`) for the purpose of refinement (`DM_ADAPT_REFINE`), coarsening\n(`DM_ADAPT_COARSEN`), or undefined (`DM_ADAPT_DETERMINE`).\n\nLogically Collective\n\nInput Parameters:\n- `dm`      - the forest\n- `purpose` - the adaptivity purpose\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestTemplate()`, `DMForestSetAdaptivityForest()`, `DMForestGetAdaptivityForest()`, `DMAdaptFlag`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetAdaptivityPurpose\"))\n\"\"\"\nfunction DMForestSetAdaptivityPurpose(petsclib::PetscLibType, dm::PetscDM, purpose::DMAdaptFlag) end\n\n@for_petsc function DMForestSetAdaptivityPurpose(petsclib::$UnionPetscLib, dm::PetscDM, purpose::DMAdaptFlag )\n\n    @chk ccall(\n               (:DMForestSetAdaptivityPurpose, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMAdaptFlag),\n               dm, purpose,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestGetAdaptivityPurpose(petsclib::PetscLibType,dm::PetscDM, purpose::DMAdaptFlag) \nGet whether the current `DM` is being adapted from its source (set with\n`DMForestSetAdaptivityForest()`) for the purpose of refinement (`DM_ADAPT_REFINE`), coarsening (`DM_ADAPT_COARSEN`),\ncoarsening only the last level (`DM_ADAPT_COARSEN_LAST`) or undefined (`DM_ADAPT_DETERMINE`).\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `purpose` - the adaptivity purpose\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestTemplate()`, `DMForestSetAdaptivityForest()`, `DMForestGetAdaptivityForest()`, `DMAdaptFlag`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdaptivityPurpose\"))\n\"\"\"\nfunction DMForestGetAdaptivityPurpose(petsclib::PetscLibType, dm::PetscDM, purpose::DMAdaptFlag) end\n\n@for_petsc function DMForestGetAdaptivityPurpose(petsclib::$UnionPetscLib, dm::PetscDM, purpose::DMAdaptFlag )\n\n    @chk ccall(\n               (:DMForestGetAdaptivityPurpose, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMAdaptFlag}),\n               dm, purpose,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetAdjacencyDimension(petsclib::PetscLibType,dm::PetscDM, adjDim::PetscInt) \nDuring the pre\ncell adjacency (for the purposes of partitioning and overlap).\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the forest\n- `adjDim` - default 0 (i.e., vertices determine adjacency)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetAdjacencyDimension()`, `DMForestSetAdjacencyCodimension()`, `DMForestSetPartitionOverlap()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetAdjacencyDimension\"))\n\"\"\"\nfunction DMForestSetAdjacencyDimension(petsclib::PetscLibType, dm::PetscDM, adjDim::PetscInt) end\n\n@for_petsc function DMForestSetAdjacencyDimension(petsclib::$UnionPetscLib, dm::PetscDM, adjDim::$PetscInt )\n\n    @chk ccall(\n               (:DMForestSetAdjacencyDimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, adjDim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetAdjacencyCodimension(petsclib::PetscLibType,dm::PetscDM, adjCodim::PetscInt) \nLike `DMForestSetAdjacencyDimension()`, but specified as a co\ne.g., adjacency based on facets can be specified by codimension 1 in all cases)\n\nLogically Collective\n\nInput Parameters:\n- `dm`       - the forest\n- `adjCodim` - default is the dimension of the forest (see `DMGetDimension()`), since this is the codimension of vertices\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetAdjacencyCodimension()`, `DMForestSetAdjacencyDimension()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetAdjacencyCodimension\"))\n\"\"\"\nfunction DMForestSetAdjacencyCodimension(petsclib::PetscLibType, dm::PetscDM, adjCodim::PetscInt) end\n\n@for_petsc function DMForestSetAdjacencyCodimension(petsclib::$UnionPetscLib, dm::PetscDM, adjCodim::$PetscInt )\n\n    @chk ccall(\n               (:DMForestSetAdjacencyCodimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, adjCodim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tadjDim::PetscInt = DMForestGetAdjacencyDimension(petsclib::PetscLibType,dm::PetscDM) \nGet the dimension of interface points that determine cell adjacency (for the\npurposes of partitioning and overlap).\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `adjDim` - default 0 (i.e., vertices determine adjacency)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetAdjacencyDimension()`, `DMForestGetAdjacencyCodimension()`, `DMForestSetPartitionOverlap()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdjacencyDimension\"))\n\"\"\"\nfunction DMForestGetAdjacencyDimension(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetAdjacencyDimension(petsclib::$UnionPetscLib, dm::PetscDM )\n\tadjDim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetAdjacencyDimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, adjDim_,\n              )\n\n\tadjDim = adjDim_[]\n\n\treturn adjDim\nend \n\n\"\"\"\n\tadjCodim::PetscInt = DMForestGetAdjacencyCodimension(petsclib::PetscLibType,dm::PetscDM) \nLike `DMForestGetAdjacencyDimension()`, but specified as a co\ne.g., adjacency based on facets can be specified by codimension 1 in all cases)\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `adjCodim` - default isthe dimension of the forest (see `DMGetDimension()`), since this is the codimension of vertices\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetAdjacencyCodimension()`, `DMForestGetAdjacencyDimension()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdjacencyCodimension\"))\n\"\"\"\nfunction DMForestGetAdjacencyCodimension(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetAdjacencyCodimension(petsclib::$UnionPetscLib, dm::PetscDM )\n\tadjCodim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetAdjacencyCodimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, adjCodim_,\n              )\n\n\tadjCodim = adjCodim_[]\n\n\treturn adjCodim\nend \n\n\"\"\"\n\tDMForestSetPartitionOverlap(petsclib::PetscLibType,dm::PetscDM, overlap::PetscInt) \nDuring the pre\npartitions of a forest, with values > 0 indicating subdomains that are expanded by that many iterations of adding\nadjacent cells\n\nLogically Collective\n\nInput Parameters:\n- `dm`      - the forest\n- `overlap` - default 0\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetPartitionOverlap()`, `DMForestSetAdjacencyDimension()`, `DMForestSetAdjacencyCodimension()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetPartitionOverlap\"))\n\"\"\"\nfunction DMForestSetPartitionOverlap(petsclib::PetscLibType, dm::PetscDM, overlap::PetscInt) end\n\n@for_petsc function DMForestSetPartitionOverlap(petsclib::$UnionPetscLib, dm::PetscDM, overlap::$PetscInt )\n\n    @chk ccall(\n               (:DMForestSetPartitionOverlap, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, overlap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toverlap::PetscInt = DMForestGetPartitionOverlap(petsclib::PetscLibType,dm::PetscDM) \nGet the amount of cell\n> 0 indicating subdomains that are expanded by that many iterations of adding adjacent cells\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `overlap` - default 0\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetAdjacencyDimension()`, `DMForestSetAdjacencyCodimension()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetPartitionOverlap\"))\n\"\"\"\nfunction DMForestGetPartitionOverlap(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetPartitionOverlap(petsclib::$UnionPetscLib, dm::PetscDM )\n\toverlap_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetPartitionOverlap, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, overlap_,\n              )\n\n\toverlap = overlap_[]\n\n\treturn overlap\nend \n\n\"\"\"\n\tDMForestSetMinimumRefinement(petsclib::PetscLibType,dm::PetscDM, minRefinement::PetscInt) \nDuring the pre\n`DM`, see `DMForestGetBaseDM()`) allowed in the forest.  If the forest is being created by coarsening a previous forest\n(see `DMForestGetAdaptivityForest()`) this limits the amount of coarsening.\n\nLogically Collective\n\nInput Parameters:\n- `dm`            - the forest\n- `minRefinement` - default `PETSC_DEFAULT` (interpreted by the subtype of `DMFOREST`)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetMinimumRefinement()`, `DMForestSetMaximumRefinement()`, `DMForestSetInitialRefinement()`, `DMForestGetBaseDM()`, `DMForestGetAdaptivityForest()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetMinimumRefinement\"))\n\"\"\"\nfunction DMForestSetMinimumRefinement(petsclib::PetscLibType, dm::PetscDM, minRefinement::PetscInt) end\n\n@for_petsc function DMForestSetMinimumRefinement(petsclib::$UnionPetscLib, dm::PetscDM, minRefinement::$PetscInt )\n\n    @chk ccall(\n               (:DMForestSetMinimumRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, minRefinement,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tminRefinement::PetscInt = DMForestGetMinimumRefinement(petsclib::PetscLibType,dm::PetscDM) \nGet the minimum level of refinement (relative to the base `DM`, see\n`DMForestGetBaseDM()`) allowed in the forest.  If the forest is being created by coarsening a previous forest (see\n`DMForestGetAdaptivityForest()`), this limits the amount of coarsening.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `minRefinement` - default `PETSC_DEFAULT` (interpreted by the subtype of `DMFOREST`)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetMinimumRefinement()`, `DMForestGetMaximumRefinement()`, `DMForestGetInitialRefinement()`, `DMForestGetBaseDM()`, `DMForestGetAdaptivityForest()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetMinimumRefinement\"))\n\"\"\"\nfunction DMForestGetMinimumRefinement(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetMinimumRefinement(petsclib::$UnionPetscLib, dm::PetscDM )\n\tminRefinement_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetMinimumRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, minRefinement_,\n              )\n\n\tminRefinement = minRefinement_[]\n\n\treturn minRefinement\nend \n\n\"\"\"\n\tDMForestSetInitialRefinement(petsclib::PetscLibType,dm::PetscDM, initRefinement::PetscInt) \nDuring the pre\n`DM`, see `DMForestGetBaseDM()`) allowed in the forest.\n\nLogically Collective\n\nInput Parameters:\n- `dm`             - the forest\n- `initRefinement` - default `PETSC_DEFAULT` (interpreted by the subtype of `DMFOREST`)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetMinimumRefinement()`, `DMForestSetMaximumRefinement()`, `DMForestGetBaseDM()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetInitialRefinement\"))\n\"\"\"\nfunction DMForestSetInitialRefinement(petsclib::PetscLibType, dm::PetscDM, initRefinement::PetscInt) end\n\n@for_petsc function DMForestSetInitialRefinement(petsclib::$UnionPetscLib, dm::PetscDM, initRefinement::$PetscInt )\n\n    @chk ccall(\n               (:DMForestSetInitialRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, initRefinement,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tinitRefinement::PetscInt = DMForestGetInitialRefinement(petsclib::PetscLibType,dm::PetscDM) \nGet the initial level of refinement (relative to the base `DM`, see\n`DMForestGetBaseDM()`) allowed in the forest.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `initRefinement` - default `PETSC_DEFAULT` (interpreted by the subtype of `DMFOREST`)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetMinimumRefinement()`, `DMForestSetMaximumRefinement()`, `DMForestGetBaseDM()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetInitialRefinement\"))\n\"\"\"\nfunction DMForestGetInitialRefinement(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetInitialRefinement(petsclib::$UnionPetscLib, dm::PetscDM )\n\tinitRefinement_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetInitialRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, initRefinement_,\n              )\n\n\tinitRefinement = initRefinement_[]\n\n\treturn initRefinement\nend \n\n\"\"\"\n\tDMForestSetMaximumRefinement(petsclib::PetscLibType,dm::PetscDM, maxRefinement::PetscInt) \nDuring the pre\n`DM`, see `DMForestGetBaseDM()`) allowed in the forest.  If the forest is being created by refining a previous forest\n(see `DMForestGetAdaptivityForest()`), this limits the amount of refinement.\n\nLogically Collective\n\nInput Parameters:\n- `dm`            - the forest\n- `maxRefinement` - default `PETSC_DEFAULT` (interpreted by the subtype of `DMFOREST`)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetMinimumRefinement()`, `DMForestSetInitialRefinement()`, `DMForestGetBaseDM()`, `DMForestGetAdaptivityDM()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetMaximumRefinement\"))\n\"\"\"\nfunction DMForestSetMaximumRefinement(petsclib::PetscLibType, dm::PetscDM, maxRefinement::PetscInt) end\n\n@for_petsc function DMForestSetMaximumRefinement(petsclib::$UnionPetscLib, dm::PetscDM, maxRefinement::$PetscInt )\n\n    @chk ccall(\n               (:DMForestSetMaximumRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, maxRefinement,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxRefinement::PetscInt = DMForestGetMaximumRefinement(petsclib::PetscLibType,dm::PetscDM) \nGet the maximum level of refinement (relative to the base `DM`, see\n`DMForestGetBaseDM()`) allowed in the forest.  If the forest is being created by refining a previous forest (see\n`DMForestGetAdaptivityForest()`), this limits the amount of refinement.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `maxRefinement` - default `PETSC_DEFAULT` (interpreted by the subtype of `DMFOREST`)\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetMaximumRefinement()`, `DMForestGetMinimumRefinement()`, `DMForestGetInitialRefinement()`, `DMForestGetBaseDM()`, `DMForestGetAdaptivityForest()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetMaximumRefinement\"))\n\"\"\"\nfunction DMForestGetMaximumRefinement(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetMaximumRefinement(petsclib::$UnionPetscLib, dm::PetscDM )\n\tmaxRefinement_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetMaximumRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, maxRefinement_,\n              )\n\n\tmaxRefinement = maxRefinement_[]\n\n\treturn maxRefinement\nend \n\n\"\"\"\n\tDMForestSetAdaptivityStrategy(petsclib::PetscLibType,dm::PetscDM, adaptStrategy::DMForestAdaptivityStrategy) \nDuring the pre\n\nLogically Collective\n\nInput Parameters:\n- `dm`            - the forest\n- `adaptStrategy` - default `DMFORESTADAPTALL`\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetAdaptivityStrategy()`, `DMFORESTADAPTALL`, `DMFORESTADAPTANY`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetAdaptivityStrategy\"))\n\"\"\"\nfunction DMForestSetAdaptivityStrategy(petsclib::PetscLibType, dm::PetscDM, adaptStrategy::DMForestAdaptivityStrategy) end\n\n@for_petsc function DMForestSetAdaptivityStrategy(petsclib::$UnionPetscLib, dm::PetscDM, adaptStrategy::DMForestAdaptivityStrategy )\n\n    @chk ccall(\n               (:DMForestSetAdaptivityStrategy, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMForestAdaptivityStrategy),\n               dm, adaptStrategy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestGetAdaptivityStrategy(petsclib::PetscLibType,dm::PetscDM, adaptStrategy::DMForestAdaptivityStrategy) \nGet the strategy for combining adaptivity labels from multiple processes.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `adaptStrategy` - the adaptivity strategy (default `DMFORESTADAPTALL`)\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMFORESTADAPTALL`, `DMFORESTADAPTANY`, `DMForestSetAdaptivityStrategy()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdaptivityStrategy\"))\n\"\"\"\nfunction DMForestGetAdaptivityStrategy(petsclib::PetscLibType, dm::PetscDM, adaptStrategy::DMForestAdaptivityStrategy) end\n\n@for_petsc function DMForestGetAdaptivityStrategy(petsclib::$UnionPetscLib, dm::PetscDM, adaptStrategy::DMForestAdaptivityStrategy )\n\n    @chk ccall(\n               (:DMForestGetAdaptivityStrategy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMForestAdaptivityStrategy}),\n               dm, adaptStrategy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsuccess::PetscBool = DMForestGetAdaptivitySuccess(petsclib::PetscLibType,dm::PetscDM) \nReturn whether the requested adaptation (refinement, coarsening, repartitioning,\netc.) was successful.\n\nCollective\n\nInput Parameter:\n- `dm` - the post-adaptation forest\n\nOutput Parameter:\n- `success` - `PETSC_TRUE` if the post-adaptation forest is different from the pre-adaptation forest.\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdaptivitySuccess\"))\n\"\"\"\nfunction DMForestGetAdaptivitySuccess(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetAdaptivitySuccess(petsclib::$UnionPetscLib, dm::PetscDM )\n\tsuccess_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMForestGetAdaptivitySuccess, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, success_,\n              )\n\n\tsuccess = success_[]\n\n\treturn success\nend \n\n\"\"\"\n\tDMForestSetComputeAdaptivitySF(petsclib::PetscLibType,dm::PetscDM, computeSF::PetscBool) \nDuring the pre\nrelating the cells of the pre-adaptation forest to the post-adaptiation forest.\n\nLogically Collective\n\nInput Parameters:\n- `dm`        - the post-adaptation forest\n- `computeSF` - default `PETSC_TRUE`\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetComputeAdaptivitySF()`, `DMForestGetAdaptivitySF()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetComputeAdaptivitySF\"))\n\"\"\"\nfunction DMForestSetComputeAdaptivitySF(petsclib::PetscLibType, dm::PetscDM, computeSF::PetscBool) end\n\n@for_petsc function DMForestSetComputeAdaptivitySF(petsclib::$UnionPetscLib, dm::PetscDM, computeSF::PetscBool )\n\n    @chk ccall(\n               (:DMForestSetComputeAdaptivitySF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, computeSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestTransferVec(petsclib::PetscLibType,dmIn::PetscDM, vecIn::PetscVec, dmOut::PetscDM, vecOut::PetscVec, useBCs::PetscBool, time::PetscReal) \n\n# External Links\n$(_doc_external(\"DMForest/DMForestTransferVec\"))\n\"\"\"\nfunction DMForestTransferVec(petsclib::PetscLibType, dmIn::PetscDM, vecIn::PetscVec, dmOut::PetscDM, vecOut::PetscVec, useBCs::PetscBool, time::PetscReal) end\n\n@for_petsc function DMForestTransferVec(petsclib::$UnionPetscLib, dmIn::PetscDM, vecIn::PetscVec, dmOut::PetscDM, vecOut::PetscVec, useBCs::PetscBool, time::$PetscReal )\n\n    @chk ccall(\n               (:DMForestTransferVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CDM, CVec, PetscBool, $PetscReal),\n               dmIn, vecIn, dmOut, vecOut, useBCs, time,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestTransferVecFromBase(petsclib::PetscLibType,dm::PetscDM, vecIn::PetscVec, vecOut::PetscVec) \n\n# External Links\n$(_doc_external(\"DMForest/DMForestTransferVecFromBase\"))\n\"\"\"\nfunction DMForestTransferVecFromBase(petsclib::PetscLibType, dm::PetscDM, vecIn::PetscVec, vecOut::PetscVec) end\n\n@for_petsc function DMForestTransferVecFromBase(petsclib::$UnionPetscLib, dm::PetscDM, vecIn::PetscVec, vecOut::PetscVec )\n\n    @chk ccall(\n               (:DMForestTransferVecFromBase, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, vecIn, vecOut,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcomputeSF::PetscBool = DMForestGetComputeAdaptivitySF(petsclib::PetscLibType,dm::PetscDM) \nGet whether transfer `PetscSF`s should be computed relating the cells of the\npre-adaptation forest to the post-adaptiation forest.  After `DMSetUp()` is called, these transfer PetscSFs can be\naccessed with `DMForestGetAdaptivitySF()`.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the post-adaptation forest\n\nOutput Parameter:\n- `computeSF` - default `PETSC_TRUE`\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetComputeAdaptivitySF()`, `DMForestGetAdaptivitySF()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetComputeAdaptivitySF\"))\n\"\"\"\nfunction DMForestGetComputeAdaptivitySF(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetComputeAdaptivitySF(petsclib::$UnionPetscLib, dm::PetscDM )\n\tcomputeSF_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMForestGetComputeAdaptivitySF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, computeSF_,\n              )\n\n\tcomputeSF = computeSF_[]\n\n\treturn computeSF\nend \n\n\"\"\"\n\tDMForestGetAdaptivitySF(petsclib::PetscLibType,dm::PetscDM, preCoarseToFine::PetscSF, coarseToPreFine::PetscSF) \nGet `PetscSF`s that relate the pre\npost-adaptation forest.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the post-adaptation forest\n\nOutput Parameters:\n- `preCoarseToFine` - pre-adaptation coarse cells to post-adaptation fine cells: BCast goes from pre- to post-\n- `coarseToPreFine` - post-adaptation coarse cells to pre-adaptation fine cells: BCast goes from post- to pre-\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetComputeAdaptivitySF()`, `DMForestSetComputeAdaptivitySF()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdaptivitySF\"))\n\"\"\"\nfunction DMForestGetAdaptivitySF(petsclib::PetscLibType, dm::PetscDM, preCoarseToFine::PetscSF, coarseToPreFine::PetscSF) end\n\n@for_petsc function DMForestGetAdaptivitySF(petsclib::$UnionPetscLib, dm::PetscDM, preCoarseToFine::PetscSF, coarseToPreFine::PetscSF )\n\n    @chk ccall(\n               (:DMForestGetAdaptivitySF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}, Ptr{PetscSF}),\n               dm, preCoarseToFine, coarseToPreFine,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetGradeFactor(petsclib::PetscLibType,dm::PetscDM, grade::PetscInt) \nDuring the pre\nmesh, e.g. give 2 to indicate that the diameter of neighboring cells should differ by at most\na factor of 2.\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the forest\n- `grade` - the grading factor\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetGradeFactor()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetGradeFactor\"))\n\"\"\"\nfunction DMForestSetGradeFactor(petsclib::PetscLibType, dm::PetscDM, grade::PetscInt) end\n\n@for_petsc function DMForestSetGradeFactor(petsclib::$UnionPetscLib, dm::PetscDM, grade::$PetscInt )\n\n    @chk ccall(\n               (:DMForestSetGradeFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, grade,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgrade::PetscInt = DMForestGetGradeFactor(petsclib::PetscLibType,dm::PetscDM) \nGet the desired amount of grading in the mesh, e.g. give 2 to indicate that the diameter of\nneighboring cells should differ by at most a factor of 2.  Subtypes of `DMFOREST` may only support one particular\nchoice of grading factor.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `grade` - the grading factor\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetGradeFactor()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetGradeFactor\"))\n\"\"\"\nfunction DMForestGetGradeFactor(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetGradeFactor(petsclib::$UnionPetscLib, dm::PetscDM )\n\tgrade_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetGradeFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, grade_,\n              )\n\n\tgrade = grade_[]\n\n\treturn grade\nend \n\n\"\"\"\n\tDMForestSetCellWeightFactor(petsclib::PetscLibType,dm::PetscDM, weightsFactor::PetscReal) \nDuring the pre\nthe cell weight (see `DMForestSetCellWeights()`) when calculating partitions.\n\nLogically Collective\n\nInput Parameters:\n- `dm`            - the forest\n- `weightsFactor` - default 1.\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetCellWeightFactor()`, `DMForestSetCellWeights()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetCellWeightFactor\"))\n\"\"\"\nfunction DMForestSetCellWeightFactor(petsclib::PetscLibType, dm::PetscDM, weightsFactor::PetscReal) end\n\n@for_petsc function DMForestSetCellWeightFactor(petsclib::$UnionPetscLib, dm::PetscDM, weightsFactor::$PetscReal )\n\n    @chk ccall(\n               (:DMForestSetCellWeightFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, weightsFactor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tweightsFactor::PetscReal = DMForestGetCellWeightFactor(petsclib::PetscLibType,dm::PetscDM) \nGet the factor by which the level of refinement changes the cell weight (see\n`DMForestSetCellWeights()`) when calculating partitions.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `weightsFactor` - default 1.\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetCellWeightFactor()`, `DMForestSetCellWeights()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetCellWeightFactor\"))\n\"\"\"\nfunction DMForestGetCellWeightFactor(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetCellWeightFactor(petsclib::$UnionPetscLib, dm::PetscDM )\n\tweightsFactor_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMForestGetCellWeightFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, weightsFactor_,\n              )\n\n\tweightsFactor = weightsFactor_[]\n\n\treturn weightsFactor\nend \n\n\"\"\"\n\tcStart::PetscInt,cEnd::PetscInt = DMForestGetCellChart(petsclib::PetscLibType,dm::PetscDM) \nAfter the setup phase, get the local half\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameters:\n- `cStart` - the first cell on this process\n- `cEnd`   - one after the final cell on this process\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetCellSF()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetCellChart\"))\n\"\"\"\nfunction DMForestGetCellChart(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetCellChart(petsclib::$UnionPetscLib, dm::PetscDM )\n\tcStart_ = Ref{$PetscInt}()\n\tcEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMForestGetCellChart, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, cStart_, cEnd_,\n              )\n\n\tcStart = cStart_[]\n\tcEnd = cEnd_[]\n\n\treturn cStart,cEnd\nend \n\n\"\"\"\n\tDMForestGetCellSF(petsclib::PetscLibType,dm::PetscDM, cellSF::PetscSF) \nAfter the setup phase, get the `PetscSF` for overlapping cells between processes\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `cellSF` - the `PetscSF`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetCellChart()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetCellSF\"))\n\"\"\"\nfunction DMForestGetCellSF(petsclib::PetscLibType, dm::PetscDM, cellSF::PetscSF) end\n\n@for_petsc function DMForestGetCellSF(petsclib::$UnionPetscLib, dm::PetscDM, cellSF::PetscSF )\n\n    @chk ccall(\n               (:DMForestGetCellSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}),\n               dm, cellSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetAdaptivityLabel(petsclib::PetscLibType,dm::PetscDM, adaptLabel::DMLabel) \nDuring the pre\n`DMForestGetAdaptivityForest()`) that holds the adaptation flags (refinement, coarsening, or some combination).\n\nLogically Collective\n\nInput Parameters:\n- `dm`         - the forest\n- `adaptLabel` - the label in the pre-adaptation forest\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetAdaptivityLabel()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetAdaptivityLabel\"))\n\"\"\"\nfunction DMForestSetAdaptivityLabel(petsclib::PetscLibType, dm::PetscDM, adaptLabel::DMLabel) end\n\n@for_petsc function DMForestSetAdaptivityLabel(petsclib::$UnionPetscLib, dm::PetscDM, adaptLabel::DMLabel )\n\n    @chk ccall(\n               (:DMForestSetAdaptivityLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, adaptLabel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestGetAdaptivityLabel(petsclib::PetscLibType,dm::PetscDM, adaptLabel::DMLabel) \nGet the label of the pre\nholds the adaptation flags (refinement, coarsening, or some combination).\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `adaptLabel` - the name of the label in the pre-adaptation forest\n\nLevel: intermediate\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetAdaptivityLabel()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetAdaptivityLabel\"))\n\"\"\"\nfunction DMForestGetAdaptivityLabel(petsclib::PetscLibType, dm::PetscDM, adaptLabel::DMLabel) end\n\n@for_petsc function DMForestGetAdaptivityLabel(petsclib::$UnionPetscLib, dm::PetscDM, adaptLabel::DMLabel )\n\n    @chk ccall(\n               (:DMForestGetAdaptivityLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMLabel}),\n               dm, adaptLabel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMForestSetCellWeights(petsclib::PetscLibType,dm::PetscDM, weights::Vector{PetscReal}, copyMode::PetscCopyMode) \nSet the weights assigned to each of the cells (see `DMForestGetCellChart()`) of the current\nprocess: weights are used to determine parallel partitioning.\n\nLogically Collective\n\nInput Parameters:\n- `dm`       - the forest\n- `weights`  - the array of weights (see `DMForestSetWeightCapacity()`) for all cells, or `NULL` to indicate each cell has weight 1.\n- `copyMode` - how weights should reference weights\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetCellWeights()`, `DMForestSetWeightCapacity()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetCellWeights\"))\n\"\"\"\nfunction DMForestSetCellWeights(petsclib::PetscLibType, dm::PetscDM, weights::Vector{PetscReal}, copyMode::PetscCopyMode) end\n\n@for_petsc function DMForestSetCellWeights(petsclib::$UnionPetscLib, dm::PetscDM, weights::Vector{$PetscReal}, copyMode::PetscCopyMode )\n\n    @chk ccall(\n               (:DMForestSetCellWeights, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}, PetscCopyMode),\n               dm, weights, copyMode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tweights::PetscReal = DMForestGetCellWeights(petsclib::PetscLibType,dm::PetscDM) \nGet the weights assigned to each of the cells (see `DMForestGetCellChart()`) of the current\nprocess: weights are used to determine parallel partitioning.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `weights` - the array of weights for all cells, or `NULL` to indicate each cell has weight 1.\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetCellWeights()`, `DMForestSetWeightCapacity()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetCellWeights\"))\n\"\"\"\nfunction DMForestGetCellWeights(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetCellWeights(petsclib::$UnionPetscLib, dm::PetscDM )\n\tweights_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMForestGetCellWeights, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, weights_,\n              )\n\n\tweights = weights_[]\n\n\treturn weights\nend \n\n\"\"\"\n\tDMForestSetWeightCapacity(petsclib::PetscLibType,dm::PetscDM, capacity::PetscReal) \nDuring the pre\na pre-adaptation forest (see `DMForestGetAdaptivityForest()`).\n\nLogically Collective\n\nInput Parameters:\n- `dm`       - the forest\n- `capacity` - this process's capacity\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestGetWeightCapacity()`, `DMForestSetCellWeights()`, `DMForestSetCellWeightFactor()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestSetWeightCapacity\"))\n\"\"\"\nfunction DMForestSetWeightCapacity(petsclib::PetscLibType, dm::PetscDM, capacity::PetscReal) end\n\n@for_petsc function DMForestSetWeightCapacity(petsclib::$UnionPetscLib, dm::PetscDM, capacity::$PetscReal )\n\n    @chk ccall(\n               (:DMForestSetWeightCapacity, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, capacity,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcapacity::PetscReal = DMForestGetWeightCapacity(petsclib::PetscLibType,dm::PetscDM) \nSet the capacity of the current process when repartitioning a pre\n`DMForestGetAdaptivityForest()`).\n\nNot Collective\n\nInput Parameter:\n- `dm` - the forest\n\nOutput Parameter:\n- `capacity` - this process's capacity\n\nLevel: advanced\n\n-seealso: `DM`, `DMFOREST`, `DMForestSetWeightCapacity()`, `DMForestSetCellWeights()`, `DMForestSetCellWeightFactor()`\n\n# External Links\n$(_doc_external(\"DMForest/DMForestGetWeightCapacity\"))\n\"\"\"\nfunction DMForestGetWeightCapacity(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMForestGetWeightCapacity(petsclib::$UnionPetscLib, dm::PetscDM )\n\tcapacity_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMForestGetWeightCapacity, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, capacity_,\n              )\n\n\tcapacity = capacity_[]\n\n\treturn capacity\nend \n\n\"\"\"\n\tDMSwarmSetPointsUniformCoordinates(petsclib::PetscLibType,sw::PetscDM, min::Vector{PetscReal}, max::Vector{PetscReal}, npoints::Vector{PetscInt}, mode::InsertMode) \nSet point coordinates in a `DMSWARM` on a regular (ijk) grid\n\nCollective\n\nInput Parameters:\n- `sw`      - the `DMSWARM`\n- `min`     - minimum coordinate values in the x, y, z directions (array of length dim)\n- `max`     - maximum coordinate values in the x, y, z directions (array of length dim)\n- `npoints` - number of points in each spatial direction (array of length dim)\n- `mode`    - indicates whether to append points to the swarm (`ADD_VALUES`), or over-ride existing points (`INSERT_VALUES`)\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSetCellDM()`, `DMSwarmType`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetPointsUniformCoordinates\"))\n\"\"\"\nfunction DMSwarmSetPointsUniformCoordinates(petsclib::PetscLibType, sw::PetscDM, min::Vector{PetscReal}, max::Vector{PetscReal}, npoints::Vector{PetscInt}, mode::InsertMode) end\n\n@for_petsc function DMSwarmSetPointsUniformCoordinates(petsclib::$UnionPetscLib, sw::PetscDM, min::Vector{$PetscReal}, max::Vector{$PetscReal}, npoints::Vector{$PetscInt}, mode::InsertMode )\n\n    @chk ccall(\n               (:DMSwarmSetPointsUniformCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}, InsertMode),\n               sw, min, max, npoints, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSetPointCoordinates(petsclib::PetscLibType,sw::PetscDM, npoints::PetscInt, coor::Vector{PetscReal}, redundant::PetscBool, mode::InsertMode) \nSet point coordinates in a `DMSWARM` from a user defined list\n\nCollective\n\nInput Parameters:\n- `sw`        - the `DMSWARM`\n- `npoints`   - the number of points to insert\n- `coor`      - the coordinate values\n- `redundant` - if set to `PETSC_TRUE`, it is assumed that `npoints` and `coor` are only valid on rank 0 and should be broadcast to other ranks\n- `mode`      - indicates whether to append points to the swarm (`ADD_VALUES`), or over-ride existing points (`INSERT_VALUES`)\n\nLevel: beginner\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSetCellDM()`, `DMSwarmType`, `DMSwarmSetPointsUniformCoordinates()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetPointCoordinates\"))\n\"\"\"\nfunction DMSwarmSetPointCoordinates(petsclib::PetscLibType, sw::PetscDM, npoints::PetscInt, coor::Vector{PetscReal}, redundant::PetscBool, mode::InsertMode) end\n\n@for_petsc function DMSwarmSetPointCoordinates(petsclib::$UnionPetscLib, sw::PetscDM, npoints::$PetscInt, coor::Vector{$PetscReal}, redundant::PetscBool, mode::InsertMode )\n\n    @chk ccall(\n               (:DMSwarmSetPointCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscReal}, PetscBool, InsertMode),\n               sw, npoints, coor, redundant, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmInsertPointsUsingCellDM(petsclib::PetscLibType,dm::PetscDM, layout_type::DMSwarmPICLayoutType, fill_param::PetscInt) \nInsert point coordinates within each cell\n\nNot Collective\n\nInput Parameters:\n- `dm`          - the `DMSWARM`\n- `layout_type` - method used to fill each cell with the cell `DM`\n- `fill_param`  - parameter controlling how many points per cell are added (the meaning of this parameter is dependent on the layout type)\n\nLevel: beginner\n\n-seealso: `DMSWARM`, `DMSwarmPICLayoutType`, `DMSwarmSetType()`, `DMSwarmSetCellDM()`, `DMSwarmType`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmInsertPointsUsingCellDM\"))\n\"\"\"\nfunction DMSwarmInsertPointsUsingCellDM(petsclib::PetscLibType, dm::PetscDM, layout_type::DMSwarmPICLayoutType, fill_param::PetscInt) end\n\n@for_petsc function DMSwarmInsertPointsUsingCellDM(petsclib::$UnionPetscLib, dm::PetscDM, layout_type::DMSwarmPICLayoutType, fill_param::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmInsertPointsUsingCellDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMSwarmPICLayoutType, $PetscInt),\n               dm, layout_type, fill_param,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSetPointCoordinatesCellwise(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt, xi::Vector{PetscReal}) \nInsert point coordinates (defined over the reference cell) within each cell\n\nNot Collective\n\nInput Parameters:\n- `dm`      - the `DMSWARM`\n- `npoints` - the number of points to insert in each cell\n- `xi`      - the coordinates (defined in the local coordinate system for each cell) to insert\n\nLevel: beginner\n\n-seealso: `DMSWARM`, `DMSwarmSetCellDM()`, `DMSwarmInsertPointsUsingCellDM()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetPointCoordinatesCellwise\"))\n\"\"\"\nfunction DMSwarmSetPointCoordinatesCellwise(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt, xi::Vector{PetscReal}) end\n\n@for_petsc function DMSwarmSetPointCoordinatesCellwise(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt, xi::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMSwarmSetPointCoordinatesCellwise, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscReal}),\n               dm, npoints, xi,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tncells::PetscInt,count::PetscInt = DMSwarmCreatePointPerCellCount(petsclib::PetscLibType,sw::PetscDM) \nCount the number of points within all cells in the cell DM\n\nNot Collective\n\nInput Parameter:\n- `sw` - the `DMSWARM`\n\nOutput Parameters:\n- `ncells` - the number of cells in the cell `DM` (optional argument, pass `NULL` to ignore)\n- `count`  - array of length ncells containing the number of points per cell\n\nLevel: beginner\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSetCellDM()`, `DMSwarmType`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCreatePointPerCellCount\"))\n\"\"\"\nfunction DMSwarmCreatePointPerCellCount(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmCreatePointPerCellCount(petsclib::$UnionPetscLib, sw::PetscDM )\n\tncells_ = Ref{$PetscInt}()\n\tcount_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmCreatePointPerCellCount, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, $PetscInt),\n               sw, ncells_, count_,\n              )\n\n\tncells = ncells_[]\n\tcount = count_[]\n\n\treturn ncells,count\nend \n\n\"\"\"\n\tNs::PetscInt = DMSwarmGetNumSpecies(petsclib::PetscLibType,sw::PetscDM) \nGet the number of particle species\n\nNot Collective\n\nInput Parameter:\n- `sw` - the `DMSWARM`\n\nOutput Parameters:\n- `Ns` - the number of species\n\nLevel: intermediate\n\n-seealso: `DMSWARM`, `DMSwarmSetNumSpecies()`, `DMSwarmSetType()`, `DMSwarmType`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetNumSpecies\"))\n\"\"\"\nfunction DMSwarmGetNumSpecies(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmGetNumSpecies(petsclib::$UnionPetscLib, sw::PetscDM )\n\tNs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmGetNumSpecies, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               sw, Ns_,\n              )\n\n\tNs = Ns_[]\n\n\treturn Ns\nend \n\n\"\"\"\n\tDMSwarmSetNumSpecies(petsclib::PetscLibType,sw::PetscDM, Ns::PetscInt) \nSet the number of particle species\n\nNot Collective\n\nInput Parameters:\n- `sw` - the `DMSWARM`\n- `Ns` - the number of species\n\nLevel: intermediate\n\n-seealso: `DMSWARM`, `DMSwarmGetNumSpecies()`, `DMSwarmSetType()`, `DMSwarmType`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetNumSpecies\"))\n\"\"\"\nfunction DMSwarmSetNumSpecies(petsclib::PetscLibType, sw::PetscDM, Ns::PetscInt) end\n\n@for_petsc function DMSwarmSetNumSpecies(petsclib::$UnionPetscLib, sw::PetscDM, Ns::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmSetNumSpecies, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               sw, Ns,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmGetCoordinateFunction(petsclib::PetscLibType,sw::PetscDM, coordFunc::PetscSimplePoCintFn) \nGet the function setting initial particle positions, if it exists\n\nNot Collective\n\nInput Parameter:\n- `sw` - the `DMSWARM`\n\nOutput Parameter:\n- `coordFunc` - the function setting initial particle positions, or `NULL`, see `PetscSimplePointFn` for the calling sequence\n\nLevel: intermediate\n\n-seealso: `DMSWARM`, `DMSwarmSetCoordinateFunction()`, `DMSwarmGetVelocityFunction()`, `DMSwarmInitializeCoordinates()`, `PetscSimplePointFn`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetCoordinateFunction\"))\n\"\"\"\nfunction DMSwarmGetCoordinateFunction(petsclib::PetscLibType, sw::PetscDM, coordFunc::PetscSimplePoCintFn) end\n\n@for_petsc function DMSwarmGetCoordinateFunction(petsclib::$UnionPetscLib, sw::PetscDM, coordFunc::PetscSimplePoCintFn )\n\n    @chk ccall(\n               (:DMSwarmGetCoordinateFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSimplePoCintFn),\n               sw, coordFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSetCoordinateFunction(petsclib::PetscLibType,sw::PetscDM, coordFunc::PetscSimplePoCintFn) \nSet the function setting initial particle positions\n\nNot Collective\n\nInput Parameters:\n- `sw`        - the `DMSWARM`\n- `coordFunc` - the function setting initial particle positions, see `PetscSimplePointFn` for the calling sequence\n\nLevel: intermediate\n\n-seealso: `DMSWARM`, `DMSwarmGetCoordinateFunction()`, `DMSwarmSetVelocityFunction()`, `DMSwarmInitializeCoordinates()`, `PetscSimplePointFn`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetCoordinateFunction\"))\n\"\"\"\nfunction DMSwarmSetCoordinateFunction(petsclib::PetscLibType, sw::PetscDM, coordFunc::PetscSimplePoCintFn) end\n\n@for_petsc function DMSwarmSetCoordinateFunction(petsclib::$UnionPetscLib, sw::PetscDM, coordFunc::PetscSimplePoCintFn )\n\n    @chk ccall(\n               (:DMSwarmSetCoordinateFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSimplePoCintFn}),\n               sw, coordFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmGetVelocityFunction(petsclib::PetscLibType,sw::PetscDM, velFunc::PetscSimplePoCintFn) \nGet the function setting initial particle velocities, if it exists\n\nNot Collective\n\nInput Parameter:\n- `sw` - the `DMSWARM`\n\nOutput Parameter:\n- `velFunc` - the function setting initial particle velocities, or `NULL`, see `PetscSimplePointFn` for the calling sequence\n\nLevel: intermediate\n\n-seealso: `DMSWARM`, `DMSwarmSetVelocityFunction()`, `DMSwarmGetCoordinateFunction()`, `DMSwarmInitializeVelocities()`, `PetscSimplePointFn`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetVelocityFunction\"))\n\"\"\"\nfunction DMSwarmGetVelocityFunction(petsclib::PetscLibType, sw::PetscDM, velFunc::PetscSimplePoCintFn) end\n\n@for_petsc function DMSwarmGetVelocityFunction(petsclib::$UnionPetscLib, sw::PetscDM, velFunc::PetscSimplePoCintFn )\n\n    @chk ccall(\n               (:DMSwarmGetVelocityFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSimplePoCintFn),\n               sw, velFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSetVelocityFunction(petsclib::PetscLibType,sw::PetscDM, velFunc::PetscSimplePoCintFn) \nSet the function setting initial particle velocities\n\nNot Collective\n\nInput Parameters:\n- `sw`      - the `DMSWARM`\n- `velFunc` - the function setting initial particle velocities, see `PetscSimplePointFn` for the calling sequence\n\nLevel: intermediate\n\n-seealso: `DMSWARM`, `DMSwarmGetVelocityFunction()`, `DMSwarmSetCoordinateFunction()`, `DMSwarmInitializeVelocities()`, `PetscSimplePointFn`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetVelocityFunction\"))\n\"\"\"\nfunction DMSwarmSetVelocityFunction(petsclib::PetscLibType, sw::PetscDM, velFunc::PetscSimplePoCintFn) end\n\n@for_petsc function DMSwarmSetVelocityFunction(petsclib::$UnionPetscLib, sw::PetscDM, velFunc::PetscSimplePoCintFn )\n\n    @chk ccall(\n               (:DMSwarmSetVelocityFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSimplePoCintFn}),\n               sw, velFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmComputeLocalSize(petsclib::PetscLibType,sw::PetscDM, N::PetscInt, density::PetscProbFn) \nCompute the local number and distribution of particles based upon a density function\n\nNot Collective\n\nInput Parameters:\n- `sw`      - The `DMSWARM`\n- `N`       - The target number of particles\n- `density` - The density field for the particle layout, normalized to unity\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmComputeLocalSizeFromOptions()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmComputeLocalSize\"))\n\"\"\"\nfunction DMSwarmComputeLocalSize(petsclib::PetscLibType, sw::PetscDM, N::PetscInt, density::PetscProbFn) end\n\n@for_petsc function DMSwarmComputeLocalSize(petsclib::$UnionPetscLib, sw::PetscDM, N::$PetscInt, density::PetscProbFn )\n\n    @chk ccall(\n               (:DMSwarmComputeLocalSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscProbFn}),\n               sw, N, density,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmComputeLocalSizeFromOptions(petsclib::PetscLibType,sw::PetscDM) \nCompute the local number and distribution of particles based upon a density function determined by options\n\nNot Collective\n\nInput Parameter:\n- `sw` - The `DMSWARM`\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmComputeLocalSize()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmComputeLocalSizeFromOptions\"))\n\"\"\"\nfunction DMSwarmComputeLocalSizeFromOptions(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmComputeLocalSizeFromOptions(petsclib::$UnionPetscLib, sw::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmComputeLocalSizeFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               sw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmInitializeCoordinates(petsclib::PetscLibType,sw::PetscDM) \nDetermine the initial coordinates of particles for a PIC method\n\nNot Collective\n\nInput Parameter:\n- `sw` - The `DMSWARM`\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmComputeLocalSize()`, `DMSwarmInitializeVelocities()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmInitializeCoordinates\"))\n\"\"\"\nfunction DMSwarmInitializeCoordinates(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmInitializeCoordinates(petsclib::$UnionPetscLib, sw::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmInitializeCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               sw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmInitializeVelocities(petsclib::PetscLibType,sw::PetscDM, sampler::PetscProbFn, v0::Vector{PetscReal}) \nSet the initial velocities of particles using a distribution.\n\nCollective\n\nInput Parameters:\n- `sw`      - The `DMSWARM` object\n- `sampler` - A function which uniformly samples the velocity PDF\n- `v0`      - The velocity scale for nondimensionalization for each species\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmComputeLocalSize()`, `DMSwarmInitializeCoordinates()`, `DMSwarmInitializeVelocitiesFromOptions()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmInitializeVelocities\"))\n\"\"\"\nfunction DMSwarmInitializeVelocities(petsclib::PetscLibType, sw::PetscDM, sampler::PetscProbFn, v0::Vector{PetscReal}) end\n\n@for_petsc function DMSwarmInitializeVelocities(petsclib::$UnionPetscLib, sw::PetscDM, sampler::PetscProbFn, v0::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMSwarmInitializeVelocities, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscProbFn}, Ptr{$PetscReal}),\n               sw, sampler, v0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmInitializeVelocitiesFromOptions(petsclib::PetscLibType,sw::PetscDM, v0::Vector{PetscReal}) \nSet the initial velocities of particles using a distribution determined from options.\n\nCollective\n\nInput Parameters:\n- `sw` - The `DMSWARM` object\n- `v0` - The velocity scale for nondimensionalization for each species\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmComputeLocalSize()`, `DMSwarmInitializeCoordinates()`, `DMSwarmInitializeVelocities()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmInitializeVelocitiesFromOptions\"))\n\"\"\"\nfunction DMSwarmInitializeVelocitiesFromOptions(petsclib::PetscLibType, sw::PetscDM, v0::Vector{PetscReal}) end\n\n@for_petsc function DMSwarmInitializeVelocitiesFromOptions(petsclib::$UnionPetscLib, sw::PetscDM, v0::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMSwarmInitializeVelocitiesFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               sw, v0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmtype::DMSwarmMigrateType = DMSwarmGetMigrateType(petsclib::PetscLibType,dm::PetscDM) \nGet the style of point migration\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMSWARM`\n\nOutput Parameter:\n- `mtype` - The migration type, see `DMSwarmMigrateType`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmMigrateType`, `DMSwarmMigrate()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetMigrateType\"))\n\"\"\"\nfunction DMSwarmGetMigrateType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmGetMigrateType(petsclib::$UnionPetscLib, dm::PetscDM )\n\tmtype_ = Ref{DMSwarmMigrateType}()\n\n    @chk ccall(\n               (:DMSwarmGetMigrateType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMSwarmMigrateType}),\n               dm, mtype_,\n              )\n\n\tmtype = mtype_[]\n\n\treturn mtype\nend \n\n\"\"\"\n\tDMSwarmSetMigrateType(petsclib::PetscLibType,dm::PetscDM, mtype::DMSwarmMigrateType) \nSet the style of point migration\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DMSWARM`\n- `mtype` - The migration type, see `DMSwarmMigrateType`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmMigrateType`, `DMSwarmGetMigrateType()`, `DMSwarmMigrate()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetMigrateType\"))\n\"\"\"\nfunction DMSwarmSetMigrateType(petsclib::PetscLibType, dm::PetscDM, mtype::DMSwarmMigrateType) end\n\n@for_petsc function DMSwarmSetMigrateType(petsclib::$UnionPetscLib, dm::PetscDM, mtype::DMSwarmMigrateType )\n\n    @chk ccall(\n               (:DMSwarmSetMigrateType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMSwarmMigrateType),\n               dm, mtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmViewFieldsXDMF(petsclib::PetscLibType,dm::PetscDM, filename::String, nfields::PetscInt, field_name_list::String) \nWrite a selection of DMSwarm fields to an XDMF3 file\n\nCollective\n\nInput Parameters:\n- `dm`              - the `DMSWARM`\n- `filename`        - the file name of the XDMF file (must have the extension .xmf)\n- `nfields`         - the number of fields to write into the XDMF file\n- `field_name_list` - array of length nfields containing the textual name of fields to write\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmViewXDMF()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmViewFieldsXDMF\"))\n\"\"\"\nfunction DMSwarmViewFieldsXDMF(petsclib::PetscLibType, dm::PetscDM, filename::String, nfields::PetscInt, field_name_list::String) end\n\n@for_petsc function DMSwarmViewFieldsXDMF(petsclib::$UnionPetscLib, dm::PetscDM, filename::String, nfields::$PetscInt, field_name_list::String )\n\tfield_name_list_ = Ref(pointer(field_name_list))\n\n    @chk ccall(\n               (:DMSwarmViewFieldsXDMF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, Ptr{Ptr{Cchar}}),\n               dm, filename, nfields, field_name_list_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmViewXDMF(petsclib::PetscLibType,dm::PetscDM, filename::String) \nWrite `DMSWARM` fields to an XDMF3 file\n\nCollective\n\nInput Parameters:\n- `dm`       - the `DMSWARM`\n- `filename` - the file name of the XDMF file (must have the extension .xmf)\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmViewFieldsXDMF()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmViewXDMF\"))\n\"\"\"\nfunction DMSwarmViewXDMF(petsclib::PetscLibType, dm::PetscDM, filename::String) end\n\n@for_petsc function DMSwarmViewXDMF(petsclib::$UnionPetscLib, dm::PetscDM, filename::String )\n\n    @chk ccall(\n               (:DMSwarmViewXDMF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, filename,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNf::PetscInt = DMSwarmVectorGetField(petsclib::PetscLibType,sw::PetscDM, fieldnames::String) \nGets the fields from which to define a `Vec` object\nwhen `DMCreateLocalVector()`, or `DMCreateGlobalVector()` is called\n\nNot collective\n\nInput Parameter:\n- `sw` - a `DMSWARM`\n\nOutput Parameters:\n- `Nf`         - the number of fields\n- `fieldnames` - the textual name given to each registered field, or NULL if it has not been set\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmVectorDefineField()`, `DMSwarmRegisterPetscDatatypeField()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmVectorGetField\"))\n\"\"\"\nfunction DMSwarmVectorGetField(petsclib::PetscLibType, sw::PetscDM, fieldnames::String) end\n\n@for_petsc function DMSwarmVectorGetField(petsclib::$UnionPetscLib, sw::PetscDM, fieldnames::String )\n\tNf_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmVectorGetField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{Cchar}),\n               sw, Nf_, fieldnames,\n              )\n\n\tNf = Nf_[]\n\n\treturn Nf\nend \n\n\"\"\"\n\tDMSwarmVectorDefineField(petsclib::PetscLibType,dm::PetscDM, fieldname::String) \nSets the field from which to define a `Vec` object\nwhen `DMCreateLocalVector()`, or `DMCreateGlobalVector()` is called\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name given to each registered field\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmVectorDefineFields()`, `DMSwarmVectorGetField()`, `DMSwarmRegisterPetscDatatypeField()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmVectorDefineField\"))\n\"\"\"\nfunction DMSwarmVectorDefineField(petsclib::PetscLibType, dm::PetscDM, fieldname::String) end\n\n@for_petsc function DMSwarmVectorDefineField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String )\n\n    @chk ccall(\n               (:DMSwarmVectorDefineField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, fieldname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmVectorDefineFields(petsclib::PetscLibType,sw::PetscDM, Nf::PetscInt, fieldnames::String) \nSets the fields from which to define a `Vec` object\nwhen `DMCreateLocalVector()`, or `DMCreateGlobalVector()` is called\n\nCollective, No Fortran support\n\nInput Parameters:\n- `sw`         - a `DMSWARM`\n- `Nf`         - the number of fields\n- `fieldnames` - the textual name given to each registered field\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmVectorDefineField()`, `DMSwarmVectorGetField()`, `DMSwarmRegisterPetscDatatypeField()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmVectorDefineFields\"))\n\"\"\"\nfunction DMSwarmVectorDefineFields(petsclib::PetscLibType, sw::PetscDM, Nf::PetscInt, fieldnames::String) end\n\n@for_petsc function DMSwarmVectorDefineFields(petsclib::$UnionPetscLib, sw::PetscDM, Nf::$PetscInt, fieldnames::String )\n\tfieldnames_ = Ref(pointer(fieldnames))\n\n    @chk ccall(\n               (:DMSwarmVectorDefineFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}),\n               sw, Nf, fieldnames_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmass::PetscMat = DMSwarmCreateMassMatrixSquare(petsclib::PetscLibType,dmCoarse::PetscDM, dmFine::PetscDM) \nCreates the block\n\nCollective\n\nInput Parameters:\n- `dmCoarse` - a `DMSWARM`\n- `dmFine`   - a `DMPLEX`\n\nOutput Parameter:\n- `mass` - the square of the particle mass matrix\n\nLevel: advanced\n\n-seealso: `DM`, `DMSWARM`, `DMCreateMassMatrix()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCreateMassMatrixSquare\"))\n\"\"\"\nfunction DMSwarmCreateMassMatrixSquare(petsclib::PetscLibType, dmCoarse::PetscDM, dmFine::PetscDM) end\n\n@for_petsc function DMSwarmCreateMassMatrixSquare(petsclib::$UnionPetscLib, dmCoarse::PetscDM, dmFine::PetscDM )\n\tmass_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMSwarmCreateMassMatrixSquare, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{CMat}),\n               dmCoarse, dmFine, mass_,\n              )\n\n\tmass = PetscMat(mass_[], petsclib)\n\n\treturn mass\nend \n\n\"\"\"\n\tvec::PetscVec = DMSwarmCreateGlobalVectorFromField(petsclib::PetscLibType,dm::PetscDM, fieldname::String) \nCreates a `Vec` object sharing the array associated with a given field\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name given to a registered field\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmDestroyGlobalVectorFromField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCreateGlobalVectorFromField\"))\n\"\"\"\nfunction DMSwarmCreateGlobalVectorFromField(petsclib::PetscLibType, dm::PetscDM, fieldname::String) end\n\n@for_petsc function DMSwarmCreateGlobalVectorFromField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String )\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMSwarmCreateGlobalVectorFromField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, fieldname, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tDMSwarmDestroyGlobalVectorFromField(petsclib::PetscLibType,dm::PetscDM, fieldname::String, vec::PetscVec) \nDestroys the `Vec` object which share the array associated with a given field\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name given to a registered field\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmCreateGlobalVectorFromField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmDestroyGlobalVectorFromField\"))\n\"\"\"\nfunction DMSwarmDestroyGlobalVectorFromField(petsclib::PetscLibType, dm::PetscDM, fieldname::String, vec::PetscVec) end\n\n@for_petsc function DMSwarmDestroyGlobalVectorFromField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, vec::PetscVec )\n\tvec_ = Ref(vec.ptr)\n\n    @chk ccall(\n               (:DMSwarmDestroyGlobalVectorFromField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, fieldname, vec_,\n              )\n\n\tvec.ptr = vec_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tvec::PetscVec = DMSwarmCreateLocalVectorFromField(petsclib::PetscLibType,dm::PetscDM, fieldname::String) \nCreates a `Vec` object sharing the array associated with a given field\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name given to a registered field\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmDestroyLocalVectorFromField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCreateLocalVectorFromField\"))\n\"\"\"\nfunction DMSwarmCreateLocalVectorFromField(petsclib::PetscLibType, dm::PetscDM, fieldname::String) end\n\n@for_petsc function DMSwarmCreateLocalVectorFromField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String )\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMSwarmCreateLocalVectorFromField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, fieldname, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tDMSwarmDestroyLocalVectorFromField(petsclib::PetscLibType,dm::PetscDM, fieldname::String, vec::PetscVec) \nDestroys the `Vec` object which share the array associated with a given field\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name given to a registered field\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmCreateLocalVectorFromField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmDestroyLocalVectorFromField\"))\n\"\"\"\nfunction DMSwarmDestroyLocalVectorFromField(petsclib::PetscLibType, dm::PetscDM, fieldname::String, vec::PetscVec) end\n\n@for_petsc function DMSwarmDestroyLocalVectorFromField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, vec::PetscVec )\n\tvec_ = Ref(vec.ptr)\n\n    @chk ccall(\n               (:DMSwarmDestroyLocalVectorFromField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{CVec}),\n               dm, fieldname, vec_,\n              )\n\n\tvec.ptr = vec_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tvec::PetscVec = DMSwarmCreateGlobalVectorFromFields(petsclib::PetscLibType,dm::PetscDM, Nf::PetscInt, fieldnames::String) \nCreates a `Vec` object sharing the array associated with a given field set\n\nCollective\n\nInput Parameters:\n- `dm`         - a `DMSWARM`\n- `Nf`         - the number of fields\n- `fieldnames` - the textual names given to the registered fields\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmDestroyGlobalVectorFromFields()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCreateGlobalVectorFromFields\"))\n\"\"\"\nfunction DMSwarmCreateGlobalVectorFromFields(petsclib::PetscLibType, dm::PetscDM, Nf::PetscInt, fieldnames::String) end\n\n@for_petsc function DMSwarmCreateGlobalVectorFromFields(petsclib::$UnionPetscLib, dm::PetscDM, Nf::$PetscInt, fieldnames::String )\n\tfieldnames_ = Ref(pointer(fieldnames))\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMSwarmCreateGlobalVectorFromFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{CVec}),\n               dm, Nf, fieldnames_, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tDMSwarmDestroyGlobalVectorFromFields(petsclib::PetscLibType,dm::PetscDM, Nf::PetscInt, fieldnames::String, vec::PetscVec) \nDestroys the `Vec` object which share the array associated with a given field set\n\nCollective\n\nInput Parameters:\n- `dm`         - a `DMSWARM`\n- `Nf`         - the number of fields\n- `fieldnames` - the textual names given to the registered fields\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmCreateGlobalVectorFromField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmDestroyGlobalVectorFromFields\"))\n\"\"\"\nfunction DMSwarmDestroyGlobalVectorFromFields(petsclib::PetscLibType, dm::PetscDM, Nf::PetscInt, fieldnames::String, vec::PetscVec) end\n\n@for_petsc function DMSwarmDestroyGlobalVectorFromFields(petsclib::$UnionPetscLib, dm::PetscDM, Nf::$PetscInt, fieldnames::String, vec::PetscVec )\n\tfieldnames_ = Ref(pointer(fieldnames))\n\tvec_ = Ref(vec.ptr)\n\n    @chk ccall(\n               (:DMSwarmDestroyGlobalVectorFromFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{CVec}),\n               dm, Nf, fieldnames_, vec_,\n              )\n\n\tvec.ptr = vec_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tvec::PetscVec = DMSwarmCreateLocalVectorFromFields(petsclib::PetscLibType,dm::PetscDM, Nf::PetscInt, fieldnames::String) \nCreates a `Vec` object sharing the array associated with a given field set\n\nCollective\n\nInput Parameters:\n- `dm`         - a `DMSWARM`\n- `Nf`         - the number of fields\n- `fieldnames` - the textual names given to the registered fields\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmDestroyLocalVectorFromField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCreateLocalVectorFromFields\"))\n\"\"\"\nfunction DMSwarmCreateLocalVectorFromFields(petsclib::PetscLibType, dm::PetscDM, Nf::PetscInt, fieldnames::String) end\n\n@for_petsc function DMSwarmCreateLocalVectorFromFields(petsclib::$UnionPetscLib, dm::PetscDM, Nf::$PetscInt, fieldnames::String )\n\tfieldnames_ = Ref(pointer(fieldnames))\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMSwarmCreateLocalVectorFromFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{CVec}),\n               dm, Nf, fieldnames_, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tDMSwarmDestroyLocalVectorFromFields(petsclib::PetscLibType,dm::PetscDM, Nf::PetscInt, fieldnames::String, vec::PetscVec) \nDestroys the `Vec` object which share the array associated with a given field set\n\nCollective\n\nInput Parameters:\n- `dm`         - a `DMSWARM`\n- `Nf`         - the number of fields\n- `fieldnames` - the textual names given to the registered fields\n\nOutput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmCreateLocalVectorFromFields()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmDestroyLocalVectorFromFields\"))\n\"\"\"\nfunction DMSwarmDestroyLocalVectorFromFields(petsclib::PetscLibType, dm::PetscDM, Nf::PetscInt, fieldnames::String, vec::PetscVec) end\n\n@for_petsc function DMSwarmDestroyLocalVectorFromFields(petsclib::$UnionPetscLib, dm::PetscDM, Nf::$PetscInt, fieldnames::String, vec::PetscVec )\n\tfieldnames_ = Ref(pointer(fieldnames))\n\tvec_ = Ref(vec.ptr)\n\n    @chk ccall(\n               (:DMSwarmDestroyLocalVectorFromFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{CVec}),\n               dm, Nf, fieldnames_, vec_,\n              )\n\n\tvec.ptr = vec_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmInitializeFieldRegister(petsclib::PetscLibType,dm::PetscDM) \nInitiates the registration of fields to a `DMSWARM`\n\nCollective\n\nInput Parameter:\n- `dm` - a `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmFinalizeFieldRegister()`, `DMSwarmRegisterPetscDatatypeField()`,\n`DMSwarmRegisterUserStructField()`, `DMSwarmRegisterUserDatatypeField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmInitializeFieldRegister\"))\n\"\"\"\nfunction DMSwarmInitializeFieldRegister(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmInitializeFieldRegister(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmInitializeFieldRegister, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmFinalizeFieldRegister(petsclib::PetscLibType,dm::PetscDM) \nFinalizes the registration of fields to a `DMSWARM`\n\nCollective\n\nInput Parameter:\n- `dm` - a `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmInitializeFieldRegister()`, `DMSwarmRegisterPetscDatatypeField()`,\n`DMSwarmRegisterUserStructField()`, `DMSwarmRegisterUserDatatypeField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmFinalizeFieldRegister\"))\n\"\"\"\nfunction DMSwarmFinalizeFieldRegister(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmFinalizeFieldRegister(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmFinalizeFieldRegister, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSetLocalSizes(petsclib::PetscLibType,sw::PetscDM, nloc::PetscInt, buffer::PetscInt) \nSets the length of all registered fields on the `DMSWARM`\n\nNot Collective\n\nInput Parameters:\n- `sw`     - a `DMSWARM`\n- `nlocal` - the length of each registered field\n- `buffer` - the length of the buffer used to efficient dynamic re-sizing\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmGetLocalSize()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetLocalSizes\"))\n\"\"\"\nfunction DMSwarmSetLocalSizes(petsclib::PetscLibType, sw::PetscDM, nloc::PetscInt, buffer::PetscInt) end\n\n@for_petsc function DMSwarmSetLocalSizes(petsclib::$UnionPetscLib, sw::PetscDM, nloc::$PetscInt, buffer::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmSetLocalSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               sw, nloc, buffer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSetCellDM(petsclib::PetscLibType,sw::PetscDM, dm::PetscDM) \nAttaches a `DM` to a `DMSWARM`\n\nCollective\n\nInput Parameters:\n- `sw` - a `DMSWARM`\n- `dm` - the `DM` to attach to the `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetType()`, `DMSwarmGetCellDM()`, `DMSwarmMigrate()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetCellDM\"))\n\"\"\"\nfunction DMSwarmSetCellDM(petsclib::PetscLibType, sw::PetscDM, dm::PetscDM) end\n\n@for_petsc function DMSwarmSetCellDM(petsclib::$UnionPetscLib, sw::PetscDM, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmSetCellDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               sw, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmGetCellDM(petsclib::PetscLibType,sw::PetscDM, dm::PetscDM) \nFetches the active cell `DM`\n\nCollective\n\nInput Parameter:\n- `sw` - a `DMSWARM`\n\nOutput Parameter:\n- `dm` - the active `DM` for the `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetCellDM\"))\n\"\"\"\nfunction DMSwarmGetCellDM(petsclib::PetscLibType, sw::PetscDM, dm::PetscDM) end\n\n@for_petsc function DMSwarmGetCellDM(petsclib::$UnionPetscLib, sw::PetscDM, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMSwarmGetCellDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               sw, dm_,\n              )\n\n\tdm.ptr = dm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tNdm::PetscInt = DMSwarmGetCellDMNames(petsclib::PetscLibType,sw::PetscDM, celldms::String) \nGet the list of cell `DM` names\n\nNot collective\n\nInput Parameter:\n- `sw` - a `DMSWARM`\n\nOutput Parameters:\n- `Ndm`     - the number of `DMSwarmCellDM` in the `DMSWARM`\n- `celldms` - the name of each `DMSwarmCellDM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetCellDM()`, `DMSwarmGetCellDMByName()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetCellDMNames\"))\n\"\"\"\nfunction DMSwarmGetCellDMNames(petsclib::PetscLibType, sw::PetscDM, celldms::String) end\n\n@for_petsc function DMSwarmGetCellDMNames(petsclib::$UnionPetscLib, sw::PetscDM, celldms::String )\n\tNdm_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmGetCellDMNames, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{Cchar}),\n               sw, Ndm_, celldms,\n              )\n\n\tNdm = Ndm_[]\n\n\treturn Ndm\nend \n\n\"\"\"\n\tDMSwarmSetCellDMActive(petsclib::PetscLibType,sw::PetscDM, name::String) \nActivates a cell `DM` for a `DMSWARM`\n\nCollective\n\nInput Parameters:\n- `sw`   - a `DMSWARM`\n- `name` - name of the cell `DM` to active for the `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmCellDM`, `DMSwarmSetType()`, `DMSwarmAddCellDM()`, `DMSwarmSetCellDM()`, `DMSwarmMigrate()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetCellDMActive\"))\n\"\"\"\nfunction DMSwarmSetCellDMActive(petsclib::PetscLibType, sw::PetscDM, name::String) end\n\n@for_petsc function DMSwarmSetCellDMActive(petsclib::$UnionPetscLib, sw::PetscDM, name::String )\n\n    @chk ccall(\n               (:DMSwarmSetCellDMActive, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               sw, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmGetCellDMActive(petsclib::PetscLibType,sw::PetscDM, celldm::DMSwarmCellDM) \nReturns the active cell `DM` for a `DMSWARM`\n\nCollective\n\nInput Parameter:\n- `sw` - a `DMSWARM`\n\nOutput Parameter:\n- `celldm` - the active `DMSwarmCellDM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmCellDM`, `DMSwarmSetType()`, `DMSwarmAddCellDM()`, `DMSwarmSetCellDM()`, `DMSwarmMigrate()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetCellDMActive\"))\n\"\"\"\nfunction DMSwarmGetCellDMActive(petsclib::PetscLibType, sw::PetscDM, celldm::DMSwarmCellDM) end\n\n@for_petsc function DMSwarmGetCellDMActive(petsclib::$UnionPetscLib, sw::PetscDM, celldm::DMSwarmCellDM )\n\n    @chk ccall(\n               (:DMSwarmGetCellDMActive, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMSwarmCellDM}),\n               sw, celldm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmGetCellDMByName(petsclib::PetscLibType,sw::PetscDM, name::String, celldm::DMSwarmCellDM) \nGet a `DMSwarmCellDM` from its name\n\nNot collective\n\nInput Parameters:\n- `sw`   - a `DMSWARM`\n- `name` - the name\n\nOutput Parameter:\n- `celldm` - the `DMSwarmCellDM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetCellDM()`, `DMSwarmGetCellDMNames()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetCellDMByName\"))\n\"\"\"\nfunction DMSwarmGetCellDMByName(petsclib::PetscLibType, sw::PetscDM, name::String, celldm::DMSwarmCellDM) end\n\n@for_petsc function DMSwarmGetCellDMByName(petsclib::$UnionPetscLib, sw::PetscDM, name::String, celldm::DMSwarmCellDM )\n\n    @chk ccall(\n               (:DMSwarmGetCellDMByName, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{DMSwarmCellDM}),\n               sw, name, celldm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmAddCellDM(petsclib::PetscLibType,sw::PetscDM, celldm::DMSwarmCellDM) \nAdds a cell `DM` to the `DMSWARM`\n\nCollective\n\nInput Parameters:\n- `sw`     - a `DMSWARM`\n- `celldm` - the `DMSwarmCellDM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetType()`, `DMSwarmPushCellDM()`, `DMSwarmSetCellDM()`, `DMSwarmMigrate()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmAddCellDM\"))\n\"\"\"\nfunction DMSwarmAddCellDM(petsclib::PetscLibType, sw::PetscDM, celldm::DMSwarmCellDM) end\n\n@for_petsc function DMSwarmAddCellDM(petsclib::$UnionPetscLib, sw::PetscDM, celldm::DMSwarmCellDM )\n\n    @chk ccall(\n               (:DMSwarmAddCellDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMSwarmCellDM),\n               sw, celldm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnloc::PetscInt = DMSwarmGetLocalSize(petsclib::PetscLibType,dm::PetscDM) \nRetrieves the local length of fields registered\n\nNot Collective\n\nInput Parameter:\n- `dm` - a `DMSWARM`\n\nOutput Parameter:\n- `nlocal` - the length of each registered field\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmGetSize()`, `DMSwarmSetLocalSizes()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetLocalSize\"))\n\"\"\"\nfunction DMSwarmGetLocalSize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmGetLocalSize(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmGetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, nloc_,\n              )\n\n\tnloc = nloc_[]\n\n\treturn nloc\nend \n\n\"\"\"\n\tn::PetscInt = DMSwarmGetSize(petsclib::PetscLibType,dm::PetscDM) \nRetrieves the total length of fields registered\n\nCollective\n\nInput Parameter:\n- `dm` - a `DMSWARM`\n\nOutput Parameter:\n- `n` - the total length of each registered field\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmGetLocalSize()`, `DMSwarmSetLocalSizes()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetSize\"))\n\"\"\"\nfunction DMSwarmGetSize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmGetSize(petsclib::$UnionPetscLib, dm::PetscDM )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmGetSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tDMSwarmRegisterPetscDatatypeField(petsclib::PetscLibType,dm::PetscDM, fieldname::String, blocksize::PetscInt, type::PetscDataType) \nRegister a field to a `DMSWARM` with a native PETSc data type\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name to identify this field\n- `blocksize` - the number of each data type\n- `type`      - a valid PETSc data type (`PETSC_CHAR`, `PETSC_SHORT`, `PETSC_INT`, `PETSC_FLOAT`, `PETSC_REAL`, `PETSC_LONG`)\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterUserStructField()`, `DMSwarmRegisterUserDatatypeField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRegisterPetscDatatypeField\"))\n\"\"\"\nfunction DMSwarmRegisterPetscDatatypeField(petsclib::PetscLibType, dm::PetscDM, fieldname::String, blocksize::PetscInt, type::PetscDataType) end\n\n@for_petsc function DMSwarmRegisterPetscDatatypeField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, blocksize::$PetscInt, type::PetscDataType )\n\n    @chk ccall(\n               (:DMSwarmRegisterPetscDatatypeField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, PetscDataType),\n               dm, fieldname, blocksize, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmRegisterUserStructField(petsclib::PetscLibType,dm::PetscDM, fieldname::String, size::Csize_t) \nRegister a user defined struct to a `DMSWARM`\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name to identify this field\n- `size`      - the size in bytes of the user struct of each data type\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmRegisterUserDatatypeField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRegisterUserStructField\"))\n\"\"\"\nfunction DMSwarmRegisterUserStructField(petsclib::PetscLibType, dm::PetscDM, fieldname::String, size::Csize_t) end\n\n@for_petsc function DMSwarmRegisterUserStructField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, size::Csize_t )\n\n    @chk ccall(\n               (:DMSwarmRegisterUserStructField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Csize_t),\n               dm, fieldname, size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmRegisterUserDatatypeField(petsclib::PetscLibType,dm::PetscDM, fieldname::String, size::Csize_t, blocksize::PetscInt) \nRegister a user defined data type to a `DMSWARM`\n\nCollective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name to identify this field\n- `size`      - the size in bytes of the user data type\n- `blocksize` - the number of each data type\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRegisterPetscDatatypeField()`, `DMSwarmRegisterUserStructField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRegisterUserDatatypeField\"))\n\"\"\"\nfunction DMSwarmRegisterUserDatatypeField(petsclib::PetscLibType, dm::PetscDM, fieldname::String, size::Csize_t, blocksize::PetscInt) end\n\n@for_petsc function DMSwarmRegisterUserDatatypeField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, size::Csize_t, blocksize::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmRegisterUserDatatypeField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Csize_t, $PetscInt),\n               dm, fieldname, size, blocksize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tblocksize::PetscInt = DMSwarmGetField(petsclib::PetscLibType,dm::PetscDM, fieldname::String, type::PetscDataType, data::Cvoid) \nGet access to the underlying array storing all entries associated with a registered field\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name to identify this field\n\nOutput Parameters:\n- `blocksize` - the number of each data type\n- `type`      - the data type\n- `data`      - pointer to raw array\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRestoreField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetField\"))\n\"\"\"\nfunction DMSwarmGetField(petsclib::PetscLibType, dm::PetscDM, fieldname::String, type::Ref{PetscDataType}, data::Ptr{Ptr{Cvoid}}) end\n\n@for_petsc function DMSwarmGetField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, type::Ref{PetscDataType}, data::Ptr{Ptr{Cvoid}} )\n\tblocksize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmGetField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{PetscDataType}, Ptr{Ptr{Cvoid}}),\n               dm, fieldname, blocksize_, type, data,\n              )\n\n\tblocksize = blocksize_[]\n\n\treturn blocksize\nend \n\n\"\"\"\n\tblocksize::PetscInt = DMSwarmRestoreField(petsclib::PetscLibType,dm::PetscDM, fieldname::String, type::PetscDataType, data::Cvoid) \nRestore access to the underlying array storing all entries associated with a registered field\n\nNot Collective\n\nInput Parameters:\n- `dm`        - a `DMSWARM`\n- `fieldname` - the textual name to identify this field\n\nOutput Parameters:\n- `blocksize` - the number of each data type\n- `type`      - the data type\n- `data`      - pointer to raw array\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmGetField()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRestoreField\"))\n\"\"\"\nfunction DMSwarmRestoreField(petsclib::PetscLibType, dm::PetscDM, fieldname::String, type::Ref{PetscDataType}, data::Ptr{Ptr{Cvoid}}) end\n\n@for_petsc function DMSwarmRestoreField(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, type::Ref{PetscDataType}, data::Ptr{Ptr{Cvoid}} )\n\tblocksize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmRestoreField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{PetscDataType}, Ptr{Ptr{Cvoid}}),\n               dm, fieldname, blocksize_, type, data,\n              )\n\n\tblocksize = blocksize_[]\n\n\treturn blocksize\nend \n\n\"\"\"\n\tblocksize::PetscInt = DMSwarmGetFieldInfo(petsclib::PetscLibType,dm::PetscDM, fieldname::String, type::PetscDataType) \n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetFieldInfo\"))\n\"\"\"\nfunction DMSwarmGetFieldInfo(petsclib::PetscLibType, dm::PetscDM, fieldname::String, type::PetscDataType) end\n\n@for_petsc function DMSwarmGetFieldInfo(petsclib::$UnionPetscLib, dm::PetscDM, fieldname::String, type::PetscDataType )\n\tblocksize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmGetFieldInfo, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{PetscDataType}),\n               dm, fieldname, blocksize_, type,\n              )\n\n\tblocksize = blocksize_[]\n\n\treturn blocksize\nend \n\n\"\"\"\n\tDMSwarmAddPoint(petsclib::PetscLibType,dm::PetscDM) \nAdd space for one new point in the `DMSWARM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - a `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmAddNPoints()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmAddPoint\"))\n\"\"\"\nfunction DMSwarmAddPoint(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmAddPoint(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmAddPoint, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmAddNPoints(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt) \nAdd space for a number of new points in the `DMSWARM`\n\nNot Collective\n\nInput Parameters:\n- `dm`      - a `DMSWARM`\n- `npoints` - the number of new points to add\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmAddPoint()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmAddNPoints\"))\n\"\"\"\nfunction DMSwarmAddNPoints(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt) end\n\n@for_petsc function DMSwarmAddNPoints(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmAddNPoints, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, npoints,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmRemovePoint(petsclib::PetscLibType,dm::PetscDM) \nRemove the last point from the `DMSWARM`\n\nNot Collective\n\nInput Parameter:\n- `dm` - a `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRemovePointAtIndex()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRemovePoint\"))\n\"\"\"\nfunction DMSwarmRemovePoint(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmRemovePoint(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmRemovePoint, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmRemovePointAtIndex(petsclib::PetscLibType,dm::PetscDM, idx::PetscInt) \nRemoves a specific point from the `DMSWARM`\n\nNot Collective\n\nInput Parameters:\n- `dm`  - a `DMSWARM`\n- `idx` - index of point to remove\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRemovePoint()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRemovePointAtIndex\"))\n\"\"\"\nfunction DMSwarmRemovePointAtIndex(petsclib::PetscLibType, dm::PetscDM, idx::PetscInt) end\n\n@for_petsc function DMSwarmRemovePointAtIndex(petsclib::$UnionPetscLib, dm::PetscDM, idx::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmRemovePointAtIndex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmCopyPoint(petsclib::PetscLibType,dm::PetscDM, pi::PetscInt, pj::PetscInt) \nCopy point pj to point pi in the `DMSWARM`\n\nNot Collective\n\nInput Parameters:\n- `dm` - a `DMSWARM`\n- `pi` - the index of the point to copy\n- `pj` - the point index where the copy should be located\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRemovePoint()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCopyPoint\"))\n\"\"\"\nfunction DMSwarmCopyPoint(petsclib::PetscLibType, dm::PetscDM, pi::PetscInt, pj::PetscInt) end\n\n@for_petsc function DMSwarmCopyPoint(petsclib::$UnionPetscLib, dm::PetscDM, pi::$PetscInt, pj::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmCopyPoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               dm, pi, pj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmMigrate(petsclib::PetscLibType,dm::PetscDM, remove_sent_points::PetscBool) \nRelocates points defined in the `DMSWARM` to other MPI\n\nCollective\n\nInput Parameters:\n- `dm`                 - the `DMSWARM`\n- `remove_sent_points` - flag indicating if sent points should be removed from the current MPI-rank\n\nLevel: advanced\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetMigrateType()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmMigrate\"))\n\"\"\"\nfunction DMSwarmMigrate(petsclib::PetscLibType, dm::PetscDM, remove_sent_points::PetscBool) end\n\n@for_petsc function DMSwarmMigrate(petsclib::$UnionPetscLib, dm::PetscDM, remove_sent_points::PetscBool )\n\n    @chk ccall(\n               (:DMSwarmMigrate, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, remove_sent_points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmCollectViewCreate(petsclib::PetscLibType,dm::PetscDM) \nApplies a collection method and gathers points\nin neighbour ranks into the `DMSWARM`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DMSWARM`\n\nLevel: advanced\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmCollectViewDestroy()`, `DMSwarmSetCollectType()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCollectViewCreate\"))\n\"\"\"\nfunction DMSwarmCollectViewCreate(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmCollectViewCreate(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmCollectViewCreate, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmCollectViewDestroy(petsclib::PetscLibType,dm::PetscDM) \nResets the `DMSWARM` to the size prior to calling `DMSwarmCollectViewCreate()`\n\nCollective\n\nInput Parameters:\n- `dm` - the `DMSWARM`\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmCollectViewCreate()`, `DMSwarmSetCollectType()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmCollectViewDestroy\"))\n\"\"\"\nfunction DMSwarmCollectViewDestroy(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMSwarmCollectViewDestroy(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmCollectViewDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSetPointCoordinatesRandom(petsclib::PetscLibType,dm::PetscDM, Npc::PetscInt) \nSets initial coordinates for particles in each cell\n\nCollective\n\nInput Parameters:\n- `dm`  - the `DMSWARM`\n- `Npc` - The number of particles per cell in the cell `DM`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetPointCoordinatesRandom\"))\n\"\"\"\nfunction DMSwarmSetPointCoordinatesRandom(petsclib::PetscLibType, dm::PetscDM, Npc::PetscInt) end\n\n@for_petsc function DMSwarmSetPointCoordinatesRandom(petsclib::$UnionPetscLib, dm::PetscDM, Npc::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmSetPointCoordinatesRandom, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, Npc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstype::DMSwarmType = DMSwarmGetType(petsclib::PetscLibType,sw::PetscDM) \nGet particular flavor of `DMSWARM`\n\nCollective\n\nInput Parameter:\n- `sw` - the `DMSWARM`\n\nOutput Parameter:\n- `stype` - the `DMSWARM` type (e.g. `DMSWARM_PIC`)\n\nLevel: advanced\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetMigrateType()`, `DMSwarmSetCollectType()`, `DMSwarmType`, `DMSWARM_PIC`, `DMSWARM_BASIC`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetType\"))\n\"\"\"\nfunction DMSwarmGetType(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmGetType(petsclib::$UnionPetscLib, sw::PetscDM )\n\tstype_ = Ref{DMSwarmType}()\n\n    @chk ccall(\n               (:DMSwarmGetType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMSwarmType}),\n               sw, stype_,\n              )\n\n\tstype = stype_[]\n\n\treturn stype\nend \n\n\"\"\"\n\tDMSwarmSetType(petsclib::PetscLibType,sw::PetscDM, stype::DMSwarmType) \nSet particular flavor of `DMSWARM`\n\nCollective\n\nInput Parameters:\n- `sw`    - the `DMSWARM`\n- `stype` - the `DMSWARM` type (e.g. `DMSWARM_PIC`)\n\nLevel: advanced\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmSetMigrateType()`, `DMSwarmSetCollectType()`, `DMSwarmType`, `DMSWARM_PIC`, `DMSWARM_BASIC`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmSetType\"))\n\"\"\"\nfunction DMSwarmSetType(petsclib::PetscLibType, sw::PetscDM, stype::DMSwarmType) end\n\n@for_petsc function DMSwarmSetType(petsclib::$UnionPetscLib, sw::PetscDM, stype::DMSwarmType )\n\n    @chk ccall(\n               (:DMSwarmSetType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMSwarmType),\n               sw, stype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmGetCellSwarm(petsclib::PetscLibType,sw::PetscDM, cellID::PetscInt, cellswarm::PetscDM) \nExtracts a single cell from the `DMSWARM` object, returns it as a single cell `DMSWARM`.\nThe cell `DM` is filtered for fields of that cell, and the filtered `DM` is used as the cell `DM` of the new swarm object.\n\nNoncollective\n\nInput Parameters:\n- `sw`        - the `DMSWARM`\n- `cellID`    - the integer id of the cell to be extracted and filtered\n- `cellswarm` - The `DMSWARM` to receive the cell\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmRestoreCellSwarm()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmGetCellSwarm\"))\n\"\"\"\nfunction DMSwarmGetCellSwarm(petsclib::PetscLibType, sw::PetscDM, cellID::PetscInt, cellswarm::PetscDM) end\n\n@for_petsc function DMSwarmGetCellSwarm(petsclib::$UnionPetscLib, sw::PetscDM, cellID::$PetscInt, cellswarm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmGetCellSwarm, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, CDM),\n               sw, cellID, cellswarm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmRestoreCellSwarm(petsclib::PetscLibType,sw::PetscDM, cellID::PetscInt, cellswarm::PetscDM) \nRestores a `DMSWARM` object obtained with `DMSwarmGetCellSwarm()`. All fields are copied back into the parent swarm.\n\nNoncollective\n\nInput Parameters:\n- `sw`        - the parent `DMSWARM`\n- `cellID`    - the integer id of the cell to be copied back into the parent swarm\n- `cellswarm` - the cell swarm object\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmGetCellSwarm()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmRestoreCellSwarm\"))\n\"\"\"\nfunction DMSwarmRestoreCellSwarm(petsclib::PetscLibType, sw::PetscDM, cellID::PetscInt, cellswarm::PetscDM) end\n\n@for_petsc function DMSwarmRestoreCellSwarm(petsclib::$UnionPetscLib, sw::PetscDM, cellID::$PetscInt, cellswarm::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmRestoreCellSwarm, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, CDM),\n               sw, cellID, cellswarm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmoments::Vector{PetscReal} = DMSwarmComputeMoments(petsclib::PetscLibType,sw::PetscDM, coordinate::String, weight::String) \nCompute the first three particle moments for a given field\n\nNoncollective\n\nInput Parameters:\n- `sw`         - the `DMSWARM`\n- `coordinate` - the coordinate field name\n- `weight`     - the weight field name\n\nOutput Parameter:\n- `moments` - the field moments\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSWARM`, `DMPlexComputeMoments()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmComputeMoments\"))\n\"\"\"\nfunction DMSwarmComputeMoments(petsclib::PetscLibType, sw::PetscDM, coordinate::String, weight::String) end\n\n@for_petsc function DMSwarmComputeMoments(petsclib::$UnionPetscLib, sw::PetscDM, coordinate::String, weight::String )\n\tmoments = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMSwarmComputeMoments, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscReal}),\n               sw, coordinate, weight, moments,\n              )\n\n\n\treturn moments\nend \n\n\"\"\"\n\tDMSwarmReplace(petsclib::PetscLibType,dm::PetscDM, ndm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmReplace\"))\n\"\"\"\nfunction DMSwarmReplace(petsclib::PetscLibType, dm::PetscDM, ndm::PetscDM) end\n\n@for_petsc function DMSwarmReplace(petsclib::$UnionPetscLib, dm::PetscDM, ndm::PetscDM )\n\tndm_ = Ref(ndm.ptr)\n\n    @chk ccall(\n               (:DMSwarmReplace, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, ndm_,\n              )\n\n\tndm.ptr = ndm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tnsw::PetscDM = DMSwarmDuplicate(petsclib::PetscLibType,sw::PetscDM) \nCreates a new `DMSWARM` with the same fields and cell `DM`s but no particles\n\nCollective\n\nInput Parameter:\n- `sw` - the `DMSWARM`\n\nOutput Parameter:\n- `nsw` - the new `DMSWARM`\n\nLevel: beginner\n\n-seealso: `DM`, `DMSWARM`, `DMSwarmCreate()`, `DMClone()`\n\n# External Links\n$(_doc_external(\"DMSwarm/DMSwarmDuplicate\"))\n\"\"\"\nfunction DMSwarmDuplicate(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmDuplicate(petsclib::$UnionPetscLib, sw::PetscDM )\n\tnsw_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMSwarmDuplicate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               sw, nsw_,\n              )\n\n\tnsw = PetscDM(nsw_[], petsclib)\n\n\treturn nsw\nend \n\n\"\"\"\n\tgx::PetscInt,gy::PetscInt,gz::PetscInt = DMDAGetElementsCorners(petsclib::PetscLibType,da::PetscDM) \nReturns the global (i,j,k) indices of the lower left\ncorner of the non-overlapping decomposition of elements identified by `DMDAGetElements()`\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameters:\n- `gx` - the i index\n- `gy` - the j index\n- `gz` - the k index\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `DMDAGetElements()`, `DMDAGetCorners()`, `DMDAGetGhostCorners()`, `DMDAGetElementsSizes()`,\n`DMDAGetElementsCornersIS()`, `DMDARestoreElementsCornersIS()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetElementsCorners\"))\n\"\"\"\nfunction DMDAGetElementsCorners(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetElementsCorners(petsclib::$UnionPetscLib, da::PetscDM )\n\tgx_ = Ref{$PetscInt}()\n\tgy_ = Ref{$PetscInt}()\n\tgz_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetElementsCorners, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, gx_, gy_, gz_,\n              )\n\n\tgx = gx_[]\n\tgy = gy_[]\n\tgz = gz_[]\n\n\treturn gx,gy,gz\nend \n\n\"\"\"\n\tmx::PetscInt,my::PetscInt,mz::PetscInt = DMDAGetElementsSizes(petsclib::PetscLibType,da::PetscDM) \nGets the local number of elements per coordinate direction for the non\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameters:\n- `mx` - number of local elements in x-direction\n- `my` - number of local elements in y-direction\n- `mz` - number of local elements in z-direction\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `DMDAGetElements()`, `DMDAGetElementsCorners()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetElementsSizes\"))\n\"\"\"\nfunction DMDAGetElementsSizes(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetElementsSizes(petsclib::$UnionPetscLib, da::PetscDM )\n\tmx_ = Ref{$PetscInt}()\n\tmy_ = Ref{$PetscInt}()\n\tmz_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetElementsSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, mx_, my_, mz_,\n              )\n\n\tmx = mx_[]\n\tmy = my_[]\n\tmz = mz_[]\n\n\treturn mx,my,mz\nend \n\n\"\"\"\n\tetype::DMDAElementType = DMDASetElementType(petsclib::PetscLibType,da::PetscDM) \nSets the element type to be returned by `DMDAGetElements()`\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameter:\n- `etype` - the element type, currently either `DMDA_ELEMENT_P1` or `DMDA_ELEMENT_Q1`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDAGetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`,\n`DMDA_ELEMENT_P1`, `DMDA_ELEMENT_Q1`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetElementType\"))\n\"\"\"\nfunction DMDASetElementType(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDASetElementType(petsclib::$UnionPetscLib, da::PetscDM )\n\tetype_ = Ref{DMDAElementType}()\n\n    @chk ccall(\n               (:DMDASetElementType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMDAElementType),\n               da, etype_,\n              )\n\n\tetype = etype_[]\n\n\treturn etype\nend \n\n\"\"\"\n\tetype::DMDAElementType = DMDAGetElementType(petsclib::PetscLibType,da::PetscDM) \nGets the element type to be returned by `DMDAGetElements()`\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameter:\n- `etype` - the element type, currently either `DMDA_ELEMENT_P1` or `DMDA_ELEMENT_Q1`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`,\n`DMDA_ELEMENT_P1`, `DMDA_ELEMENT_Q1`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetElementType\"))\n\"\"\"\nfunction DMDAGetElementType(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetElementType(petsclib::$UnionPetscLib, da::PetscDM )\n\tetype_ = Ref{DMDAElementType}()\n\n    @chk ccall(\n               (:DMDAGetElementType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMDAElementType}),\n               da, etype_,\n              )\n\n\tetype = etype_[]\n\n\treturn etype\nend \n\n\"\"\"\n\tnel::PetscInt,nen::PetscInt,e::Vector{PetscInt} = DMDAGetElements(petsclib::PetscLibType,dm::PetscDM) \nGets an array containing the indices (in local indexing)\nof all the local elements\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMDA` object\n\nOutput Parameters:\n- `nel` - number of local elements\n- `nen` - number of nodes in each element (for example in one dimension it is 2, in two dimensions it is 3 (for `DMDA_ELEMENT_P1`) and 4\n(for `DMDA_ELEMENT_Q1`)\n- `e`   - the local indices of the elements' vertices, of length `nel` * `nen`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `VecSetValuesLocal()`, `MatSetValuesLocal()`,\n`DMGlobalToLocalBegin()`, `DMLocalToGlobalBegin()`, `DMDARestoreElements()`, `DMDA_ELEMENT_P1`, `DMDA_ELEMENT_Q1`, `DMDAGetElementsSizes()`,\n`DMDAGetElementsCorners()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetElements\"))\n\"\"\"\nfunction DMDAGetElements(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMDAGetElements(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnel_ = Ref{$PetscInt}()\n\tnen_ = Ref{$PetscInt}()\n\te_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMDAGetElements, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, nel_, nen_, e_,\n              )\n\n\tnel = nel_[]\n\tnen = nen_[]\n\te = unsafe_wrap(Array, e_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nel,nen,e\nend \n\n\"\"\"\n\tDMDAGetSubdomainCornersIS(petsclib::PetscLibType,dm::PetscDM, is::IS) \nGets an index set containing the corner indices (in local indexing)\nof the non-overlapping decomposition identified by `DMDAGetElements()`\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMDA` object\n\nOutput Parameter:\n- `is` - the index set\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `DMDAGetElements()`, `DMDARestoreElementsCornersIS()`,\n`DMDAGetElementsSizes()`, `DMDAGetElementsCorners()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetSubdomainCornersIS\"))\n\"\"\"\nfunction DMDAGetSubdomainCornersIS(petsclib::PetscLibType, dm::PetscDM, is::IS) end\n\n@for_petsc function DMDAGetSubdomainCornersIS(petsclib::$UnionPetscLib, dm::PetscDM, is::IS )\n\n    @chk ccall(\n               (:DMDAGetSubdomainCornersIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDARestoreElements(petsclib::PetscLibType,dm::PetscDM, nel::PetscInt, nen::PetscInt, e::Vector{PetscInt}) \nRestores the array obtained with `DMDAGetElements()`\n\nNot Collective\n\nInput Parameters:\n- `dm`  - the `DM` object\n- `nel` - number of local elements\n- `nen` - number of nodes in each element\n- `e`   - the local indices of the elements' vertices\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `DMDAGetElements()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDARestoreElements\"))\n\"\"\"\nfunction DMDARestoreElements(petsclib::PetscLibType, dm::PetscDM, nel::PetscInt, nen::PetscInt, e::Vector{PetscInt}) end\n\n@for_petsc function DMDARestoreElements(petsclib::$UnionPetscLib, dm::PetscDM, nel::$PetscInt, nen::$PetscInt, e::Vector{$PetscInt} )\n\te_ = Ref(pointer(e))\n\n    @chk ccall(\n               (:DMDARestoreElements, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, nel, nen, e_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDARestoreSubdomainCornersIS(petsclib::PetscLibType,dm::PetscDM, is::IS) \nRestores the `IS` obtained with `DMDAGetSubdomainCornersIS()`\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DM` object\n- `is` - the index set\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `DMDAGetSubdomainCornersIS()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDARestoreSubdomainCornersIS\"))\n\"\"\"\nfunction DMDARestoreSubdomainCornersIS(petsclib::PetscLibType, dm::PetscDM, is::IS) end\n\n@for_petsc function DMDARestoreSubdomainCornersIS(petsclib::$UnionPetscLib, dm::PetscDM, is::IS )\n\n    @chk ccall(\n               (:DMDARestoreSubdomainCornersIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecGetArray(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nReturns a multiple dimension array that shares data with\nthe underlying vector and is indexed using the global or local dimensions of a `DMDA`.\n\nLogically Collective\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `vec` - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n\nOutput Parameter:\n- `array` - the array\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecRestoreArray()`, `DMDAVecRestoreArrayDOF()`\n`DMDAVecGetArrayDOF()`, `DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`,\n`DMStagVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecGetArray\"))\n\"\"\"\nfunction DMDAVecGetArray(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecGetArray(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecGetArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecRestoreArray(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nRestores a multiple dimension array obtained with `DMDAVecGetArray()`\n\nLogically Collective\n\nInput Parameters:\n- `da`    - the `DMDA`\n- `vec`   - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n- `array` - the `array` pointer\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArray()`,\n`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`,\n`DMStagVecRestoreArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecRestoreArray\"))\n\"\"\"\nfunction DMDAVecRestoreArray(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecRestoreArray(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecGetArrayWrite(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nReturns a multiple dimension array that shares data with\nthe underlying vector and is indexed using the global or local dimensions of a `DMDA`.\n\nLogically Collective\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `vec` - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n\nOutput Parameter:\n- `array` - the array\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecRestoreArrayDOF()`\n`DMDAVecGetArrayDOF()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecGetArrayWrite\"))\n\"\"\"\nfunction DMDAVecGetArrayWrite(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecGetArrayWrite(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecGetArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecRestoreArrayWrite(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nRestores a multiple dimension array obtained with `DMDAVecGetArrayWrite()`\n\nLogically Collective\n\nInput Parameters:\n- `da`    - the `DMDA`\n- `vec`   - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n- `array` - the `array` pointer\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArrayWrite()`,\n`DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecRestoreArrayWrite\"))\n\"\"\"\nfunction DMDAVecRestoreArrayWrite(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecRestoreArrayWrite(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecRestoreArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecGetArrayDOF(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nReturns a multiple dimension array that shares data with\nthe underlying vector and is indexed using the global or local dimensions of a `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `vec` - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n\nOutput Parameter:\n- `array` - the `array` pointer\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecRestoreArray()`, `DMDAVecGetArray()`, `DMDAVecRestoreArrayDOF()`,\n`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`, `DMDAVecGetArrayDOFRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecGetArrayDOF\"))\n\"\"\"\nfunction DMDAVecGetArrayDOF(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecGetArrayDOF(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecGetArrayDOF, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecRestoreArrayDOF(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nRestores a multiple dimension array obtained with `DMDAVecGetArrayDOF()`\n\nLogically Collective\n\nInput Parameters:\n- `da`    - the `DMDA`\n- `vec`   - vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n- `array` - the `array` point\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`,\n`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecRestoreArrayDOF\"))\n\"\"\"\nfunction DMDAVecRestoreArrayDOF(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecRestoreArrayDOF(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecRestoreArrayDOF, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecGetArrayRead(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nReturns a multiple dimension array that shares data with\nthe underlying vector and is indexed using the global or local dimensions of a `DMDA`.\n\nNot Collective\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `vec` - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n\nOutput Parameter:\n- `array` - the array\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`,\n`DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecRestoreArrayRead()`,\n`DMDAVecRestoreArrayDOF()`, `DMDAVecGetArrayDOF()`, `DMDAVecGetArray()`,\n`DMDAVecRestoreArray()`, `DMStagVecGetArrayRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecGetArrayRead\"))\n\"\"\"\nfunction DMDAVecGetArrayRead(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecGetArrayRead(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecGetArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecRestoreArrayRead(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nRestores a multiple dimension array obtained with `DMDAVecGetArrayRead()`\n\nNot Collective\n\nInput Parameters:\n- `da`    - the `DMDA`\n- `vec`   - vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n- `array` - the `array` pointer\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArrayRead()`,\n`DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`,\n`DMStagVecRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecRestoreArrayRead\"))\n\"\"\"\nfunction DMDAVecRestoreArrayRead(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecRestoreArrayRead(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecRestoreArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecGetArrayDOFRead(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nReturns a multiple dimension array that shares data with\nthe underlying vector and is indexed using the global or local dimensions of a `DMDA`\n\nNot Collective\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `vec` - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n\nOutput Parameter:\n- `array` - the array\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecRestoreArray()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`,\n`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecGetArrayDOFRead\"))\n\"\"\"\nfunction DMDAVecGetArrayDOFRead(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecGetArrayDOFRead(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecGetArrayDOFRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecRestoreArrayDOFRead(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nRestores a multiple dimension array obtained with `DMDAVecGetArrayDOFRead()`\n\nNot Collective\n\nInput Parameters:\n- `da`    - the `DMDA`\n- `vec`   - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n- `array` - the `array` pointer\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`, `DMDAVecRestoreArrayDOF()`,\n`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecRestoreArrayDOFRead\"))\n\"\"\"\nfunction DMDAVecRestoreArrayDOFRead(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecRestoreArrayDOFRead(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecRestoreArrayDOFRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecGetArrayDOFWrite(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nReturns a multiple dimension array that shares data with\nthe underlying vector and is indexed using the global or local dimensions of a `DMDA`\n\nNot Collective\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `vec` - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n\nOutput Parameter:\n- `array` - the array\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecRestoreArray()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`,\n`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecGetArrayDOFWrite\"))\n\"\"\"\nfunction DMDAVecGetArrayDOFWrite(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecGetArrayDOFWrite(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecGetArrayDOFWrite, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAVecRestoreArrayDOFWrite(petsclib::PetscLibType,da::PetscDM, vec::PetscVec, array::Cvoid) \nRestores a multiple dimension array obtained with `DMDAVecGetArrayDOFWrite()`\n\nNot Collective\n\nInput Parameters:\n- `da`    - the `DMDA`\n- `vec`   - a vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()`\n- `array` - the `array` pointer\n\nLevel: intermediate\n\n-seealso: [](sec_struct), [](sec_struct_set), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`, `DMDAVecRestoreArrayDOF()`,\n`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVecRestoreArrayDOFWrite\"))\n\"\"\"\nfunction DMDAVecRestoreArrayDOFWrite(petsclib::PetscLibType, da::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMDAVecRestoreArrayDOFWrite(petsclib::$UnionPetscLib, da::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMDAVecRestoreArrayDOFWrite, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               da, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGlobalToNaturalBegin(petsclib::PetscLibType,da::PetscDM, g::PetscVec, mode::InsertMode, n::PetscVec) \nMaps values from the global vector obtained with `DMCreateGlobalVector()` to a global vector\nin the \"natural\" grid ordering. Must be followed by\n`DMDAGlobalToNaturalEnd()` to complete the exchange.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `da`   - the `DMDA` context\n- `g`    - the global vector, see `DMCreateGlobalVector()`\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n- `n` - the natural ordering values, see `DMDACreateNaturalVector()`\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGlobalToNaturalEnd()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMDACreateNaturalVector()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGlobalToNaturalBegin\"))\n\"\"\"\nfunction DMDAGlobalToNaturalBegin(petsclib::PetscLibType, da::PetscDM, g::PetscVec, mode::InsertMode, n::PetscVec) end\n\n@for_petsc function DMDAGlobalToNaturalBegin(petsclib::$UnionPetscLib, da::PetscDM, g::PetscVec, mode::InsertMode, n::PetscVec )\n\n    @chk ccall(\n               (:DMDAGlobalToNaturalBegin, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               da, g, mode, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGlobalToNaturalEnd(petsclib::PetscLibType,da::PetscDM, g::PetscVec, mode::InsertMode, n::PetscVec) \nMaps values from the global vector obtained with `DMCreateGlobalVector()` to a global vector\nin the natural ordering. Must be preceded by `DMDAGlobalToNaturalBegin()`.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `da`   - the `DMDA` context\n- `g`    - the global vector, see `DMCreateGlobalVector()`\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n- `n` - the global values in the natural ordering, see `DMDACreateNaturalVector()`\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGlobalToNaturalBegin()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMDACreateNaturalVector()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGlobalToNaturalEnd\"))\n\"\"\"\nfunction DMDAGlobalToNaturalEnd(petsclib::PetscLibType, da::PetscDM, g::PetscVec, mode::InsertMode, n::PetscVec) end\n\n@for_petsc function DMDAGlobalToNaturalEnd(petsclib::$UnionPetscLib, da::PetscDM, g::PetscVec, mode::InsertMode, n::PetscVec )\n\n    @chk ccall(\n               (:DMDAGlobalToNaturalEnd, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               da, g, mode, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDANaturalToGlobalBegin(petsclib::PetscLibType,da::PetscDM, n::PetscVec, mode::InsertMode, g::PetscVec) \nMaps values from a global vector in the \"natural\" ordering\nto a global vector in the PETSc `DMDA` grid ordering. Must be followed by\n`DMDANaturalToGlobalEnd()` to complete the exchange.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `da`   - the `DMDA` context\n- `g`    - the global vector in a natural ordering, see `DMDACreateNaturalVector()`\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n- `n` - the values in the `DMDA` ordering\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGlobalToNaturalEnd()`, `DMDAGlobalToNaturalBegin()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMDACreateNaturalVector()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDANaturalToGlobalBegin\"))\n\"\"\"\nfunction DMDANaturalToGlobalBegin(petsclib::PetscLibType, da::PetscDM, n::PetscVec, mode::InsertMode, g::PetscVec) end\n\n@for_petsc function DMDANaturalToGlobalBegin(petsclib::$UnionPetscLib, da::PetscDM, n::PetscVec, mode::InsertMode, g::PetscVec )\n\n    @chk ccall(\n               (:DMDANaturalToGlobalBegin, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               da, n, mode, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDANaturalToGlobalEnd(petsclib::PetscLibType,da::PetscDM, n::PetscVec, mode::InsertMode, g::PetscVec) \nMaps values from the natural ordering global vector\nto a global vector in the PETSc `DMDA` ordering. Must be preceded by `DMDANaturalToGlobalBegin()`.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `da`   - the `DMDA` context\n- `g`    - the global vector in a natural ordering\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n- `n` - the global values in the PETSc `DMDA` ordering\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGlobalToNaturalBegin()`, `DMDAGlobalToNaturalEnd()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMDACreateNaturalVector()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDANaturalToGlobalEnd\"))\n\"\"\"\nfunction DMDANaturalToGlobalEnd(petsclib::PetscLibType, da::PetscDM, n::PetscVec, mode::InsertMode, g::PetscVec) end\n\n@for_petsc function DMDANaturalToGlobalEnd(petsclib::$UnionPetscLib, da::PetscDM, n::PetscVec, mode::InsertMode, g::PetscVec )\n\n    @chk ccall(\n               (:DMDANaturalToGlobalEnd, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               da, n, mode, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tscatter::VecScatter = DMDAGlobalToNaturalAllCreate(petsclib::PetscLibType,da::PetscDM) \nCreates a scatter context that maps from a\nglobal vector, obtained with `DMCreateGlobalVector()`, to the entire vector to each processor in natural numbering\n\nCollective\n\nInput Parameter:\n- `da` - the `DMDA` context\n\nOutput Parameter:\n- `scatter` - the scatter context\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDANaturalAllToGlobalCreate()`, `DMDAGlobalToNaturalEnd()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMDACreateNaturalVector()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGlobalToNaturalAllCreate\"))\n\"\"\"\nfunction DMDAGlobalToNaturalAllCreate(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGlobalToNaturalAllCreate(petsclib::$UnionPetscLib, da::PetscDM )\n\tscatter_ = Ref{VecScatter}()\n\n    @chk ccall(\n               (:DMDAGlobalToNaturalAllCreate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{VecScatter}),\n               da, scatter_,\n              )\n\n\tscatter = scatter_[]\n\n\treturn scatter\nend \n\n\"\"\"\n\tscatter::VecScatter = DMDANaturalAllToGlobalCreate(petsclib::PetscLibType,da::PetscDM) \nCreates a scatter context that maps from a copy\nof the entire vector on each processor (in the natural ordering) to its local part in the global vector, obtained with `DMCreateGlobalVector()`.\n\nCollective\n\nInput Parameter:\n- `da` - the `DMDA` context\n\nOutput Parameter:\n- `scatter` - the scatter context\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGlobalToNaturalAllCreate()`, `DMDAGlobalToNaturalEnd()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMDACreateNaturalVector()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDANaturalAllToGlobalCreate\"))\n\"\"\"\nfunction DMDANaturalAllToGlobalCreate(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDANaturalAllToGlobalCreate(petsclib::$UnionPetscLib, da::PetscDM )\n\tscatter_ = Ref{VecScatter}()\n\n    @chk ccall(\n               (:DMDANaturalAllToGlobalCreate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{VecScatter}),\n               da, scatter_,\n              )\n\n\tscatter = scatter_[]\n\n\treturn scatter\nend \n\n\"\"\"\n\tg::PetscVec = DMDACreateNaturalVector(petsclib::PetscLibType,da::PetscDM) \nCreates a parallel PETSc vector that\nwill hold vector values in the natural numbering, rather than in\nthe PETSc parallel numbering associated with the `DMDA`.\n\nCollective\n\nInput Parameter:\n- `da` - the `DMDA`\n\nOutput Parameter:\n- `g` - the distributed global vector\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGlobalToNaturalBegin()`, `DMDAGlobalToNaturalEnd()`, `DMDANaturalToGlobalBegin()`, `DMDANaturalToGlobalEnd()`,\n`DMCreateLocalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreateNaturalVector\"))\n\"\"\"\nfunction DMDACreateNaturalVector(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDACreateNaturalVector(petsclib::$UnionPetscLib, da::PetscDM )\n\tg_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMDACreateNaturalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               da, g_,\n              )\n\n\tg = PetscVec(g_[], petsclib)\n\n\treturn g\nend \n\n\"\"\"\n\tda::PetscDM = DMDACreate1d(petsclib::PetscLibType,comm::MPI_Comm, bx::DMBoundaryType, M::PetscInt, dof::PetscInt, s::PetscInt, lx::Vector{PetscInt}) \nCreates an object that will manage the communication of one regular array data that is distributed across one or more MPI processes.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `bx`   - type of ghost cells at the boundary the array should have, if any. Use `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, or `DM_BOUNDARY_PERIODIC`.\n- `M`    - global dimension of the array (that is the number of grid points)\n- `dof`  - number of degrees of freedom per node\n- `s`    - stencil width\n- `lx`   - array containing number of nodes in the X direction on each processor, or `NULL`. If non-null, must be of length as the number of processes in the MPI_Comm. The sum of these entries must equal `M`.\n\nOutput Parameter:\n- `da` - the resulting distributed array object\n\nOptions Database Keys:\n- `-dm_view`          - Calls `DMView()` at the conclusion of `DMDACreate1d()`\n- `-da_grid_x <nx>`   - number of grid points in x direction\n- `-da_refine_x <rx>` - refinement factor\n- `-da_refine <n>`    - refine the `DMDA` n times before creating it\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DMDA`, `DM`, `DMDestroy()`, `DMView()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`, `DMDASetRefinementFactor()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMLocalToLocalBegin()`, `DMLocalToLocalEnd()`, `DMDAGetRefinementFactor()`,\n`DMDAGetInfo()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMDACreateNaturalVector()`, `DMLoad()`, `DMDAGetOwnershipRanges()`,\n`DMStagCreate1d()`, `DMBoundaryType`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreate1d\"))\n\"\"\"\nfunction DMDACreate1d(petsclib::PetscLibType, comm::MPI_Comm, bx::DMBoundaryType, M::PetscInt, dof::PetscInt, s::PetscInt, lx::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function DMDACreate1d(petsclib::$UnionPetscLib, comm::MPI_Comm, bx::DMBoundaryType, M::$PetscInt, dof::$PetscInt, s::$PetscInt, lx::Union{Ptr,Vector{$PetscInt}} )\n\tda_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMDACreate1d, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMBoundaryType, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CDM}),\n               comm, bx, M, dof, s, lx, da_,\n              )\n\n\tda = PetscDM(da_[], petsclib)\n\n\treturn da\nend \n\n\"\"\"\n\tDMDASetAOType(petsclib::PetscLibType,da::PetscDM, aotype::AOType) \nSets the type of application ordering to create with `DMDAGetAO()`, for a distributed array.\n\nCollective\n\nInput Parameters:\n- `da`     - the `DMDA`\n- `aotype` - type of `AO`. `AOType` which can be `AOBASIC`, `AOADVANCED`, `AOMAPPING`, or `AOMEMORYSCALABLE`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate2d()`, `DMDAGetAO()`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `DMLocalToGlobal()`\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMLocalToLocalBegin()`, `DMLocalToLocalEnd()`, `DMDAGetGlobalIndices()`, `DMDAGetOwnershipRanges()`,\n`AO`, `AOPetscToApplication()`, `AOApplicationToPetsc()`, `AOType`, `AOBASIC`, `AOADVANCED`, `AOMAPPING`, `AOMEMORYSCALABLE`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetAOType\"))\n\"\"\"\nfunction DMDASetAOType(petsclib::PetscLibType, da::PetscDM, aotype::AOType) end\n\n@for_petsc function DMDASetAOType(petsclib::$UnionPetscLib, da::PetscDM, aotype::AOType )\n\n    @chk ccall(\n               (:DMDASetAOType, $petsc_library),\n               PetscErrorCode,\n               (CDM, AOType),\n               da, aotype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGetAO(petsclib::PetscLibType,da::PetscDM, ao::AO) \nGets the application ordering context for a distributed array.\n\nCollective\n\nInput Parameter:\n- `da` - the `DMDA`\n\nOutput Parameter:\n- `ao` - the application ordering context for `DMDA`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate2d()`, `DMDASetAOType()`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `DMLocalToGlobal()`\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMLocalToLocalBegin()`, `DMLocalToLocalEnd()`, `DMDAGetOwnershipRanges()`,\n`AO`, `AOPetscToApplication()`, `AOApplicationToPetsc()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetAO\"))\n\"\"\"\nfunction DMDAGetAO(petsclib::PetscLibType, da::PetscDM, ao::AO) end\n\n@for_petsc function DMDAGetAO(petsclib::$UnionPetscLib, da::PetscDM, ao::AO )\n\n    @chk ccall(\n               (:DMDAGetAO, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CAO}),\n               da, ao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetUniformCoordinates(petsclib::PetscLibType,da::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) \nSets a `DMDA` coordinates to be a uniform grid\n\nCollective\n\nInput Parameters:\n- `da`   - the `DMDA` object\n- `xmin` - min extreme in the x direction\n- `xmax` - max extreme in the x direction\n- `ymin` - min extreme in the y direction (value ignored for 1 dimensional problems)\n- `ymax` - max extreme in the y direction (value ignored for 1 dimensional problems)\n- `zmin` - min extreme in the z direction (value ignored for 1 or 2 dimensional problems)\n- `zmax` - max extreme in the z direction (value ignored for 1 or 2 dimensional problems)\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMSetCoordinates()`, `DMGetCoordinates()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMStagSetUniformCoordinates()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetUniformCoordinates\"))\n\"\"\"\nfunction DMDASetUniformCoordinates(petsclib::PetscLibType, da::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) end\n\n@for_petsc function DMDASetUniformCoordinates(petsclib::$UnionPetscLib, da::PetscDM, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal, zmin::$PetscReal, zmax::$PetscReal )\n\n    @chk ccall(\n               (:DMDASetUniformCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               da, xmin, xmax, ymin, ymax, zmin, zmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt,M::PetscInt,N::PetscInt,P::PetscInt,m::PetscInt,n::PetscInt,p::PetscInt,dof::PetscInt,s::PetscInt, bx::DMBoundaryType, by::DMBoundaryType, bz::DMBoundaryType, st::DMDAStencilType = DMDAGetInfo(petsclib::PetscLibType,da::PetscDM) \nGets information about a given distributed array.\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA`\n\nOutput Parameters:\n- `dim` - dimension of the `DMDA` (1, 2, or 3)\n- `M`   - global dimension in first direction of the array\n- `N`   - global dimension in second direction of the array\n- `P`   - global dimension in third direction of the array\n- `m`   - corresponding number of MPI processes in first dimension\n- `n`   - corresponding number of MPI processes in second dimension\n- `p`   - corresponding number of MPI processes in third dimension\n- `dof` - number of degrees of freedom per node\n- `s`   - stencil width\n- `bx`  - type of ghost nodes at boundary in first dimension\n- `by`  - type of ghost nodes at boundary in second dimension\n- `bz`  - type of ghost nodes at boundary in third dimension\n- `st`  - stencil type, either `DMDA_STENCIL_STAR` or `DMDA_STENCIL_BOX`\n\nNote:\nin julia, we return a named\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMView()`, `DMDAGetCorners()`, `DMDAGetLocalInfo()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetInfo\"))\n\"\"\"\nfunction DMDAGetInfo(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetInfo(petsclib::$UnionPetscLib, da::PetscDM )\n\tdim_ = Ref{$PetscInt}()\n\tM_ = Ref{$PetscInt}()\n\tN_ = Ref{$PetscInt}()\n\tP_ = Ref{$PetscInt}()\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tp_ = Ref{$PetscInt}()\n\tdof_ = Ref{$PetscInt}()\n\ts_ = Ref{$PetscInt}()\n    bx_ = Ref{$DMBoundaryType}()\n    by_ = Ref{$DMBoundaryType}()\n    bz_ = Ref{$DMBoundaryType}()\n    st_ = Ref{$DMDAStencilType}()\n\n    @chk ccall(\n               (:DMDAGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{DMBoundaryType}, Ptr{DMBoundaryType}, Ptr{DMBoundaryType}, Ptr{DMDAStencilType}),\n               da, dim_, M_, N_, P_, m_, n_, p_, dof_, s_, bx_, by_, bz_, st_,\n              )\n\n\tdim = dim_[]\n\tM = M_[]\n\tN = N_[]\n\tP = P_[]\n\tm = m_[]\n\tn = n_[]\n\tp = p_[]\n\tdof = dof_[]\n\ts = s_[]\n    bx  = bx_[] \n    by = by_[]\n    bz = bz_[]\n    st = st_[]\n\n\n   return dim, M, N, P, m, n, p, dof, s, bx, by, bz, st\nend \n\n\"\"\"\n\tDMDAGetLocalInfo(petsclib::PetscLibType,da::PetscDM, info::DMDALocalInfo) \nGets information about a given `DMDA` and this MPI process's location in it\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA`\n\nOutput Parameter:\n- `info` - structure containing the information\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetInfo()`, `DMDAGetCorners()`, `DMDALocalInfo`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetLocalInfo\"))\n\"\"\"\nfunction DMDAGetLocalInfo(petsclib::PetscLibType, da::PetscDM, info::DMDALocalInfo) end\n\n@for_petsc function DMDAGetLocalInfo(petsclib::$UnionPetscLib, da::PetscDM, info::DMDALocalInfo )\n\n    @chk ccall(\n               (:DMDAGetLocalInfo, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMDALocalInfo}),\n               da, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tda::PetscDM =petsclib::PetscLibType,comm::MPI_Comm, bx::DMBoundaryType, by::DMBoundaryType, stencil_type::DMDAStencilType, M::PetscInt, N::PetscInt, m::PetscInt, n::PetscInt, dof::PetscInt, s::PetscInt, lx::Vector{PetscInt}, ly::Vector{PetscInt}) \nCreates an object that will manage the communication of two\nregular array data that is distributed across one or more MPI processes.\n\nCollective\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `bx`           - type of ghost nodes the x array have. Use one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`.\n- `by`           - type of ghost nodes the y array have. Use one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`.\n- `stencil_type` - stencil type.  Use either `DMDA_STENCIL_BOX` or `DMDA_STENCIL_STAR`.\n- `M`            - global dimension in x direction of the array\n- `N`            - global dimension in y direction of the array\n- `m`            - corresponding number of processors in x dimension (or `PETSC_DECIDE` to have calculated)\n- `n`            - corresponding number of processors in y dimension (or `PETSC_DECIDE` to have calculated)\n- `dof`          - number of degrees of freedom per node\n- `s`            - stencil width\n- `lx`           - arrays containing the number of nodes in each cell along the x coordinates, or `NULL`.\n- `ly`           - arrays containing the number of nodes in each cell along the y coordinates, or `NULL`.\n\nOutput Parameter:\n- `da` - the resulting distributed array object\n\nOptions Database Keys:\n- `-dm_view`              - Calls `DMView()` at the conclusion of `DMDACreate2d()`\n- `-da_grid_x <nx>`       - number of grid points in x direction\n- `-da_grid_y <ny>`       - number of grid points in y direction\n- `-da_processors_x <nx>` - number of processors in x direction\n- `-da_processors_y <ny>` - number of processors in y direction\n- `-da_bd_x <bx>`         - boundary type in x direction\n- `-da_bd_y <by>`         - boundary type in y direction\n- `-da_bd_all <bt>`       - boundary type in all directions\n- `-da_refine_x <rx>`     - refinement ratio in x direction\n- `-da_refine_y <ry>`     - refinement ratio in y direction\n- `-da_refine <n>`        - refine the `DMDA` n times before creating\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDestroy()`, `DMView()`, `DMDACreate1d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`, `DMDAGetRefinementFactor()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMLocalToLocalBegin()`, `DMLocalToLocalEnd()`, `DMDASetRefinementFactor()`,\n`DMDAGetInfo()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMDACreateNaturalVector()`, `DMLoad()`, `DMDAGetOwnershipRanges()`,\n`DMStagCreate2d()`, `DMBoundaryType`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreate2d\"))\n\"\"\"\nfunction DMDACreate2d(petsclib::PetscLibType, comm::MPI_Comm, bx::DMBoundaryType, by::DMBoundaryType, stencil_type::DMDAStencilType, M::PetscInt, N::PetscInt, m::PetscInt, n::PetscInt, dof::PetscInt, s::PetscInt, lx::Union{Ptr, Vector{PetscInt}}, ly::Union{Ptr, Vector{PetscInt}}) end\n\n@for_petsc function DMDACreate2d(petsclib::$UnionPetscLib, comm::MPI_Comm, bx::DMBoundaryType, by::DMBoundaryType, stencil_type::DMDAStencilType, M::$PetscInt, N::$PetscInt, m::$PetscInt, n::$PetscInt, dof::$PetscInt, s::$PetscInt, lx::Union{Ptr, Vector{$PetscInt}}, ly::Union{Ptr, Vector{$PetscInt}} )\n\tda_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMDACreate2d, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMBoundaryType, DMBoundaryType, DMDAStencilType, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CDM}),\n               comm, bx, by, stencil_type, M, N, m, n, dof, s, lx, ly, da_,\n              )\n\n\tda = PetscDM(da_[], petsclib)\n\n\treturn da\nend \n\n\"\"\"\n\tDMDAGetScatter(petsclib::PetscLibType,da::PetscDM, gtol::VecScatter, ltol::VecScatter) \nGets the global\nlocal-to-local vector scatter contexts for a `DMDA` distributed array.\n\nCollective\n\nInput Parameter:\n- `da` - the `DMDA`\n\nOutput Parameters:\n- `gtol` - global-to-local scatter context (may be `NULL`)\n- `ltol` - local-to-local scatter context (may be `NULL`)\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetScatter\"))\n\"\"\"\nfunction DMDAGetScatter(petsclib::PetscLibType, da::PetscDM, gtol::VecScatter, ltol::VecScatter) end\n\n@for_petsc function DMDAGetScatter(petsclib::$UnionPetscLib, da::PetscDM, gtol::VecScatter, ltol::VecScatter )\n\n    @chk ccall(\n               (:DMDAGetScatter, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{VecScatter}, Ptr{VecScatter}),\n               da, gtol, ltol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumCellsX::PetscInt,numCellsY::PetscInt,numCellsZ::PetscInt,numCells::PetscInt = DMDAGetNumCells(petsclib::PetscLibType,dm::PetscDM) \nGet the number of cells (or vertices) in the local piece of the `DMDA`. This includes ghost cells.\n\nInput Parameter:\n- `dm` - The `DMDA` object\n\nOutput Parameters:\n- `numCellsX` - The number of local cells in the x-direction\n- `numCellsY` - The number of local cells in the y-direction\n- `numCellsZ` - The number of local cells in the z-direction\n- `numCells`  - The number of local cells\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetCellPoint()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetNumCells\"))\n\"\"\"\nfunction DMDAGetNumCells(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMDAGetNumCells(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumCellsX_ = Ref{$PetscInt}()\n\tnumCellsY_ = Ref{$PetscInt}()\n\tnumCellsZ_ = Ref{$PetscInt}()\n\tnumCells_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetNumCells, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, numCellsX_, numCellsY_, numCellsZ_, numCells_,\n              )\n\n\tnumCellsX = numCellsX_[]\n\tnumCellsY = numCellsY_[]\n\tnumCellsZ = numCellsZ_[]\n\tnumCells = numCells_[]\n\n\treturn numCellsX,numCellsY,numCellsZ,numCells\nend \n\n\"\"\"\n\tpoint::PetscInt = DMDAGetCellPoint(petsclib::PetscLibType,dm::PetscDM, i::PetscInt, j::PetscInt, k::PetscInt) \nGet the `DM` point corresponding to the tuple (i, j, k) in the `DMDA`\n\nInput Parameters:\n- `dm` - The `DMDA` object\n- `i`  - The global x index for the cell\n- `j`  - The global y index for the cell\n- `k`  - The global z index for the cell\n\nOutput Parameter:\n- `point` - The local `DM` point\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetNumCells()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetCellPoint\"))\n\"\"\"\nfunction DMDAGetCellPoint(petsclib::PetscLibType, dm::PetscDM, i::PetscInt, j::PetscInt, k::PetscInt) end\n\n@for_petsc function DMDAGetCellPoint(petsclib::$UnionPetscLib, dm::PetscDM, i::$PetscInt, j::$PetscInt, k::$PetscInt )\n\tpoint_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetCellPoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               dm, i, j, k, point_,\n              )\n\n\tpoint = point_[]\n\n\treturn point\nend \n\n\"\"\"\n\tnumVerticesX::PetscInt,numVerticesY::PetscInt,numVerticesZ::PetscInt,numVertices::PetscInt = DMDAGetNumVertices(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetNumVertices\"))\n\"\"\"\nfunction DMDAGetNumVertices(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMDAGetNumVertices(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumVerticesX_ = Ref{$PetscInt}()\n\tnumVerticesY_ = Ref{$PetscInt}()\n\tnumVerticesZ_ = Ref{$PetscInt}()\n\tnumVertices_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetNumVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, numVerticesX_, numVerticesY_, numVerticesZ_, numVertices_,\n              )\n\n\tnumVerticesX = numVerticesX_[]\n\tnumVerticesY = numVerticesY_[]\n\tnumVerticesZ = numVerticesZ_[]\n\tnumVertices = numVertices_[]\n\n\treturn numVerticesX,numVerticesY,numVerticesZ,numVertices\nend \n\n\"\"\"\n\tnumXFacesX::PetscInt,numXFaces::PetscInt,numYFacesY::PetscInt,numYFaces::PetscInt,numZFacesZ::PetscInt,numZFaces::PetscInt = DMDAGetNumFaces(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetNumFaces\"))\n\"\"\"\nfunction DMDAGetNumFaces(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMDAGetNumFaces(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumXFacesX_ = Ref{$PetscInt}()\n\tnumXFaces_ = Ref{$PetscInt}()\n\tnumYFacesY_ = Ref{$PetscInt}()\n\tnumYFaces_ = Ref{$PetscInt}()\n\tnumZFacesZ_ = Ref{$PetscInt}()\n\tnumZFaces_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetNumFaces, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, numXFacesX_, numXFaces_, numYFacesY_, numYFaces_, numZFacesZ_, numZFaces_,\n              )\n\n\tnumXFacesX = numXFacesX_[]\n\tnumXFaces = numXFaces_[]\n\tnumYFacesY = numYFacesY_[]\n\tnumYFaces = numYFaces_[]\n\tnumZFacesZ = numZFacesZ_[]\n\tnumZFaces = numZFaces_[]\n\n\treturn numXFacesX,numXFaces,numYFacesY,numYFaces,numZFacesZ,numZFaces\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt = DMDAGetHeightStratum(petsclib::PetscLibType,dm::PetscDM, height::PetscInt) \nGet the bounds [`start`, `end`) for all points at a certain height.\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DMDA` object\n- `height` - The requested height\n\nOutput Parameters:\n- `pStart` - The first point at this `height`\n- `pEnd`   - One beyond the last point at this `height`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMDA`,  `DMPlexGetDepthStratum()`, `DMPlexGetHeightStratum()`, `DMPlexGetCellTypeStratum()`, `DMPlexGetDepth()`,\n`DMPlexGetDepthLabel()`, `DMPlexGetPointDepth()`, `DMPlexSymmetrize()`, `DMPlexInterpolate()`, `DMDAGetDepthStratum()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetHeightStratum\"))\n\"\"\"\nfunction DMDAGetHeightStratum(petsclib::PetscLibType, dm::PetscDM, height::PetscInt) end\n\n@for_petsc function DMDAGetHeightStratum(petsclib::$UnionPetscLib, dm::PetscDM, height::$PetscInt )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetHeightStratum, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, height, pStart_, pEnd_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\n\treturn pStart,pEnd\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt = DMDAGetDepthStratum(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt) \nGet the bounds [`start`, `end`) for all points at a certain depth.\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DMDA` object\n- `depth` - The requested depth\n\nOutput Parameters:\n- `pStart` - The first point at this `depth`\n- `pEnd`   - One beyond the last point at this `depth`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMDA`,  `DMPlexGetDepthStratum()`, `DMPlexGetHeightStratum()`, `DMPlexGetCellTypeStratum()`, `DMPlexGetDepth()`,\n`DMPlexGetDepthLabel()`, `DMPlexGetPointDepth()`, `DMPlexSymmetrize()`, `DMPlexInterpolate()`, `DMDAGetHeightStratum()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetDepthStratum\"))\n\"\"\"\nfunction DMDAGetDepthStratum(petsclib::PetscLibType, dm::PetscDM, depth::PetscInt) end\n\n@for_petsc function DMDAGetDepthStratum(petsclib::$UnionPetscLib, dm::PetscDM, depth::$PetscInt )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetDepthStratum, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, depth, pStart_, pEnd_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\n\treturn pStart,pEnd\nend \n\n\"\"\"\n\tDMDASetVertexCoordinates(petsclib::PetscLibType,dm::PetscDM, xl::PetscReal, xu::PetscReal, yl::PetscReal, yu::PetscReal, zl::PetscReal, zu::PetscReal) \nSets the lower and upper coordinates for a `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm` - The `DMDA` object\n- `xl` - the lower x coordinate\n- `xu` - the upper x coordinate\n- `yl` - the lower y coordinate\n- `yu` - the upper y coordinate\n- `zl` - the lower z coordinate\n- `zu` - the upper z coordinate\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMDA`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetVertexCoordinates\"))\n\"\"\"\nfunction DMDASetVertexCoordinates(petsclib::PetscLibType, dm::PetscDM, xl::PetscReal, xu::PetscReal, yl::PetscReal, yu::PetscReal, zl::PetscReal, zu::PetscReal) end\n\n@for_petsc function DMDASetVertexCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, xl::$PetscReal, xu::$PetscReal, yl::$PetscReal, yu::$PetscReal, zl::$PetscReal, zu::$PetscReal )\n\n    @chk ccall(\n               (:DMDASetVertexCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               dm, xl, xu, yl, yu, zl, zu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGetArray(petsclib::PetscLibType,da::PetscDM, ghosted::PetscBool, vptr::Cvoid) \nGets a work array for a `DMDA`\n\nInput Parameters:\n- `da`      - a `DMDA`\n- `ghosted` - do you want arrays for the ghosted or nonghosted patch\n\nOutput Parameter:\n- `vptr` - array data structured\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDARestoreArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetArray\"))\n\"\"\"\nfunction DMDAGetArray(petsclib::PetscLibType, da::PetscDM, ghosted::PetscBool, vptr::Cvoid) end\n\n@for_petsc function DMDAGetArray(petsclib::$UnionPetscLib, da::PetscDM, ghosted::PetscBool, vptr::Cvoid )\n\n    @chk ccall(\n               (:DMDAGetArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, Ptr{Cvoid}),\n               da, ghosted, vptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDARestoreArray(petsclib::PetscLibType,da::PetscDM, ghosted::PetscBool, vptr::Cvoid) \nRestores an array for a `DMDA` obtained with  `DMDAGetArray()`\n\nInput Parameters:\n- `da`      - information about my local patch\n- `ghosted` - do you want arrays for the ghosted or nonghosted patch\n- `vptr`    - array data structured\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDARestoreArray\"))\n\"\"\"\nfunction DMDARestoreArray(petsclib::PetscLibType, da::PetscDM, ghosted::PetscBool, vptr::Cvoid) end\n\n@for_petsc function DMDARestoreArray(petsclib::$UnionPetscLib, da::PetscDM, ghosted::PetscBool, vptr::Cvoid )\n\n    @chk ccall(\n               (:DMDARestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, Ptr{Cvoid}),\n               da, ghosted, vptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetSizes(petsclib::PetscLibType,da::PetscDM, M::PetscInt, N::PetscInt, P::PetscInt) \nSets the number of grid points in the three dimensional directions\n\nLogically Collective\n\nInput Parameters:\n- `da` - the `DMDA`\n- `M`  - the global X size\n- `N`  - the global Y size\n- `P`  - the global Z size\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `PetscSplitOwnership()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetSizes\"))\n\"\"\"\nfunction DMDASetSizes(petsclib::PetscLibType, da::PetscDM, M::PetscInt, N::PetscInt, P::PetscInt) end\n\n@for_petsc function DMDASetSizes(petsclib::$UnionPetscLib, da::PetscDM, M::$PetscInt, N::$PetscInt, P::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               da, M, N, P,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetNumProcs(petsclib::PetscLibType,da::PetscDM, m::PetscInt, n::PetscInt, p::PetscInt) \nSets the number of processes in each dimension\n\nLogically Collective\n\nInput Parameters:\n- `da` - the `DMDA`\n- `m`  - the number of X processes (or `PETSC_DECIDE`)\n- `n`  - the number of Y processes (or `PETSC_DECIDE`)\n- `p`  - the number of Z processes (or `PETSC_DECIDE`)\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetSizes()`, `PetscSplitOwnership()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetNumProcs\"))\n\"\"\"\nfunction DMDASetNumProcs(petsclib::PetscLibType, da::PetscDM, m::PetscInt, n::PetscInt, p::PetscInt) end\n\n@for_petsc function DMDASetNumProcs(petsclib::$UnionPetscLib, da::PetscDM, m::$PetscInt, n::$PetscInt, p::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetNumProcs, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               da, m, n, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbx::DMBoundaryType,by::DMBoundaryType,bz::DMBoundaryType = DMDAGetBoundaryType(petsclib::PetscLibType,da::PetscDM) \nGets the type of ghost nodes on domain boundaries.\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameters:\n- `bx` - x boundary type, one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n- `by` - y boundary type, one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n- `bz` - z boundary type, one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DMDASetBoundaryType()`, `DM`, `DMDA`, `DMDACreate()`, `DMDestroy()`, `DMBoundaryType`, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetBoundaryType\"))\n\"\"\"\nfunction DMDAGetBoundaryType(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetBoundaryType(petsclib::$UnionPetscLib, da::PetscDM )\n\tbx_ = Ref{DMBoundaryType}()\n\tby_ = Ref{DMBoundaryType}()\n\tbz_ = Ref{DMBoundaryType}()\n\n    @chk ccall(\n               (:DMDAGetBoundaryType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMBoundaryType}, Ptr{DMBoundaryType}, Ptr{DMBoundaryType}),\n               da, bx_, by_, bz_,\n              )\n\n\tbx = bx_[]\n\tby = by_[]\n\tbz = bz_[]\n\n\treturn bx,by,bz\nend \n\n\"\"\"\n\tDMDASetBoundaryType(petsclib::PetscLibType,da::PetscDM, bx::DMBoundaryType, by::DMBoundaryType, bz::DMBoundaryType) \nSets the type of ghost nodes on domain boundaries for a `DMDA` object.\n\nNot Collective\n\nInput Parameters:\n- `da` - The `DMDA`\n- `bx` - x boundary type, one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n- `by` - y boundary type, one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n- `bz` - z boundary type, one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DMDAGetBoundaryType()`, `DM`, `DMDA`, `DMDACreate()`, `DMDestroy()`, `DMBoundaryType`, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetBoundaryType\"))\n\"\"\"\nfunction DMDASetBoundaryType(petsclib::PetscLibType, da::PetscDM, bx::DMBoundaryType, by::DMBoundaryType, bz::DMBoundaryType) end\n\n@for_petsc function DMDASetBoundaryType(petsclib::$UnionPetscLib, da::PetscDM, bx::DMBoundaryType, by::DMBoundaryType, bz::DMBoundaryType )\n\n    @chk ccall(\n               (:DMDASetBoundaryType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMBoundaryType, DMBoundaryType, DMBoundaryType),\n               da, bx, by, bz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetDof(petsclib::PetscLibType,da::PetscDM, dof::PetscInt) \nSets the number of degrees of freedom per vertex\n\nNot Collective\n\nInput Parameters:\n- `da`  - The `DMDA`\n- `dof` - Number of degrees of freedom per vertex\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetDof()`, `DMDACreate()`, `DMDestroy()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetDof\"))\n\"\"\"\nfunction DMDASetDof(petsclib::PetscLibType, da::PetscDM, dof::PetscInt) end\n\n@for_petsc function DMDASetDof(petsclib::$UnionPetscLib, da::PetscDM, dof::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetDof, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               da, dof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdof::PetscInt = DMDAGetDof(petsclib::PetscLibType,da::PetscDM) \nGets the number of degrees of freedom per vertex\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameter:\n- `dof` - Number of degrees of freedom per vertex\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetDof()`, `DMDACreate()`, `DMDestroy()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetDof\"))\n\"\"\"\nfunction DMDAGetDof(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetDof(petsclib::$UnionPetscLib, da::PetscDM )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetDof, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               da, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tx::PetscInt,y::PetscInt,z::PetscInt = DMDAGetOverlap(petsclib::PetscLibType,da::PetscDM) \nGets the size of the per\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameters:\n- `x` - Overlap in the x direction\n- `y` - Overlap in the y direction\n- `z` - Overlap in the z direction\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateDomainDecomposition()`, `DMDASetOverlap()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetOverlap\"))\n\"\"\"\nfunction DMDAGetOverlap(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetOverlap(petsclib::$UnionPetscLib, da::PetscDM )\n\tx_ = Ref{$PetscInt}()\n\ty_ = Ref{$PetscInt}()\n\tz_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetOverlap, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, x_, y_, z_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\tz = z_[]\n\n\treturn x,y,z\nend \n\n\"\"\"\n\tDMDASetOverlap(petsclib::PetscLibType,da::PetscDM, x::PetscInt, y::PetscInt, z::PetscInt) \nSets the size of the per\n\nNot Collective\n\nInput Parameters:\n- `da` - The `DMDA`\n- `x`  - Overlap in the x direction\n- `y`  - Overlap in the y direction\n- `z`  - Overlap in the z direction\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateDomainDecomposition()`, `DMDAGetOverlap()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetOverlap\"))\n\"\"\"\nfunction DMDASetOverlap(petsclib::PetscLibType, da::PetscDM, x::PetscInt, y::PetscInt, z::PetscInt) end\n\n@for_petsc function DMDASetOverlap(petsclib::$UnionPetscLib, da::PetscDM, x::$PetscInt, y::$PetscInt, z::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetOverlap, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               da, x, y, z,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNsub::PetscInt = DMDAGetNumLocalSubDomains(petsclib::PetscLibType,da::PetscDM) \nGets the number of local subdomains that would be created upon decomposition.\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameter:\n- `Nsub` - Number of local subdomains created upon decomposition\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateDomainDecomposition()`, `DMDASetNumLocalSubDomains()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetNumLocalSubDomains\"))\n\"\"\"\nfunction DMDAGetNumLocalSubDomains(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetNumLocalSubDomains(petsclib::$UnionPetscLib, da::PetscDM )\n\tNsub_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetNumLocalSubDomains, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               da, Nsub_,\n              )\n\n\tNsub = Nsub_[]\n\n\treturn Nsub\nend \n\n\"\"\"\n\tDMDASetNumLocalSubDomains(petsclib::PetscLibType,da::PetscDM, Nsub::PetscInt) \nSets the number of local subdomains to create when decomposing with `DMCreateDomainDecomposition()`\n\nNot Collective\n\nInput Parameters:\n- `da`   - The `DMDA`\n- `Nsub` - The number of local subdomains requested\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateDomainDecomposition()`, `DMDAGetNumLocalSubDomains()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetNumLocalSubDomains\"))\n\"\"\"\nfunction DMDASetNumLocalSubDomains(petsclib::PetscLibType, da::PetscDM, Nsub::PetscInt) end\n\n@for_petsc function DMDASetNumLocalSubDomains(petsclib::$UnionPetscLib, da::PetscDM, Nsub::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetNumLocalSubDomains, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               da, Nsub,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetOffset(petsclib::PetscLibType,da::PetscDM, xo::PetscInt, yo::PetscInt, zo::PetscInt, Mo::PetscInt, No::PetscInt, Po::PetscInt) \nSets the index offset of the `DMDA`.\n\nCollective\n\nInput Parameters:\n- `da` - The `DMDA`\n- `xo` - The offset in the x direction\n- `yo` - The offset in the y direction\n- `zo` - The offset in the z direction\n- `Mo` - The problem offset in the x direction\n- `No` - The problem offset in the y direction\n- `Po` - The problem offset in the z direction\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetOffset()`, `DMDAVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetOffset\"))\n\"\"\"\nfunction DMDASetOffset(petsclib::PetscLibType, da::PetscDM, xo::PetscInt, yo::PetscInt, zo::PetscInt, Mo::PetscInt, No::PetscInt, Po::PetscInt) end\n\n@for_petsc function DMDASetOffset(petsclib::$UnionPetscLib, da::PetscDM, xo::$PetscInt, yo::$PetscInt, zo::$PetscInt, Mo::$PetscInt, No::$PetscInt, Po::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetOffset, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt),\n               da, xo, yo, zo, Mo, No, Po,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\txo::PetscInt,yo::PetscInt,zo::PetscInt,Mo::PetscInt,No::PetscInt,Po::PetscInt = DMDAGetOffset(petsclib::PetscLibType,da::PetscDM) \nGets the index offset of the `DMDA`.\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameters:\n- `xo` - The offset in the x direction\n- `yo` - The offset in the y direction\n- `zo` - The offset in the z direction\n- `Mo` - The global size in the x direction\n- `No` - The global size in the y direction\n- `Po` - The global size in the z direction\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetOffset()`, `DMDAVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetOffset\"))\n\"\"\"\nfunction DMDAGetOffset(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetOffset(petsclib::$UnionPetscLib, da::PetscDM )\n\txo_ = Ref{$PetscInt}()\n\tyo_ = Ref{$PetscInt}()\n\tzo_ = Ref{$PetscInt}()\n\tMo_ = Ref{$PetscInt}()\n\tNo_ = Ref{$PetscInt}()\n\tPo_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetOffset, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, xo_, yo_, zo_, Mo_, No_, Po_,\n              )\n\n\txo = xo_[]\n\tyo = yo_[]\n\tzo = zo_[]\n\tMo = Mo_[]\n\tNo = No_[]\n\tPo = Po_[]\n\n\treturn xo,yo,zo,Mo,No,Po\nend \n\n\"\"\"\n\txs::PetscInt,ys::PetscInt,zs::PetscInt,xm::PetscInt,ym::PetscInt,zm::PetscInt = DMDAGetNonOverlappingRegion(petsclib::PetscLibType,da::PetscDM) \nGets the indices of the nonoverlapping region of a subdomain `DMDA`.\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameters:\n- `xs` - The start of the region in x\n- `ys` - The start of the region in y\n- `zs` - The start of the region in z\n- `xm` - The size of the region in x\n- `ym` - The size of the region in y\n- `zm` - The size of the region in z\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetOffset()`, `DMDAVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetNonOverlappingRegion\"))\n\"\"\"\nfunction DMDAGetNonOverlappingRegion(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetNonOverlappingRegion(petsclib::$UnionPetscLib, da::PetscDM )\n\txs_ = Ref{$PetscInt}()\n\tys_ = Ref{$PetscInt}()\n\tzs_ = Ref{$PetscInt}()\n\txm_ = Ref{$PetscInt}()\n\tym_ = Ref{$PetscInt}()\n\tzm_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetNonOverlappingRegion, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, xs_, ys_, zs_, xm_, ym_, zm_,\n              )\n\n\txs = xs_[]\n\tys = ys_[]\n\tzs = zs_[]\n\txm = xm_[]\n\tym = ym_[]\n\tzm = zm_[]\n\n\treturn xs,ys,zs,xm,ym,zm\nend \n\n\"\"\"\n\tDMDASetNonOverlappingRegion(petsclib::PetscLibType,da::PetscDM, xs::PetscInt, ys::PetscInt, zs::PetscInt, xm::PetscInt, ym::PetscInt, zm::PetscInt) \nSets the indices of the nonoverlapping region of a subdomain `DMDA`.\n\nCollective\n\nInput Parameters:\n- `da` - The `DMDA`\n- `xs` - The start of the region in x\n- `ys` - The start of the region in y\n- `zs` - The start of the region in z\n- `xm` - The size of the region in x\n- `ym` - The size of the region in y\n- `zm` - The size of the region in z\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetOffset()`, `DMDAVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetNonOverlappingRegion\"))\n\"\"\"\nfunction DMDASetNonOverlappingRegion(petsclib::PetscLibType, da::PetscDM, xs::PetscInt, ys::PetscInt, zs::PetscInt, xm::PetscInt, ym::PetscInt, zm::PetscInt) end\n\n@for_petsc function DMDASetNonOverlappingRegion(petsclib::$UnionPetscLib, da::PetscDM, xs::$PetscInt, ys::$PetscInt, zs::$PetscInt, xm::$PetscInt, ym::$PetscInt, zm::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetNonOverlappingRegion, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt),\n               da, xs, ys, zs, xm, ym, zm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetStencilType(petsclib::PetscLibType,da::PetscDM, stype::DMDAStencilType) \nSets the type of the communication stencil\n\nLogically Collective\n\nInput Parameters:\n- `da`    - The `DMDA`\n- `stype` - The stencil type, use either `DMDA_STENCIL_BOX` or `DMDA_STENCIL_STAR`.\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate()`, `DMDestroy()`, `DMDAStencilType`, `DMDA_STENCIL_BOX`, `DMDA_STENCIL_STAR.`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetStencilType\"))\n\"\"\"\nfunction DMDASetStencilType(petsclib::PetscLibType, da::PetscDM, stype::DMDAStencilType) end\n\n@for_petsc function DMDASetStencilType(petsclib::$UnionPetscLib, da::PetscDM, stype::DMDAStencilType )\n\n    @chk ccall(\n               (:DMDASetStencilType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMDAStencilType),\n               da, stype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstype::DMDAStencilType = DMDAGetStencilType(petsclib::PetscLibType,da::PetscDM) \nGets the type of the communication stencil\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameter:\n- `stype` - The stencil type, use either `DMDA_STENCIL_BOX` or `DMDA_STENCIL_STAR`.\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate()`, `DMDestroy()`, `DMDAStencilType`, `DMDA_STENCIL_BOX`, `DMDA_STENCIL_STAR.`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetStencilType\"))\n\"\"\"\nfunction DMDAGetStencilType(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetStencilType(petsclib::$UnionPetscLib, da::PetscDM )\n\tstype_ = Ref{DMDAStencilType}()\n\n    @chk ccall(\n               (:DMDAGetStencilType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMDAStencilType}),\n               da, stype_,\n              )\n\n\tstype = stype_[]\n\n\treturn stype\nend \n\n\"\"\"\n\tDMDASetStencilWidth(petsclib::PetscLibType,da::PetscDM, width::PetscInt) \nSets the width of the communication stencil\n\nLogically Collective\n\nInput Parameters:\n- `da`    - The `DMDA`\n- `width` - The stencil width\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate()`, `DMDestroy()`, `DMDAStencilType`, `DMDA_STENCIL_BOX`, `DMDA_STENCIL_STAR.`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetStencilWidth\"))\n\"\"\"\nfunction DMDASetStencilWidth(petsclib::PetscLibType, da::PetscDM, width::PetscInt) end\n\n@for_petsc function DMDASetStencilWidth(petsclib::$UnionPetscLib, da::PetscDM, width::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetStencilWidth, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               da, width,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\twidth::PetscInt = DMDAGetStencilWidth(petsclib::PetscLibType,da::PetscDM) \nGets the width of the communication stencil\n\nNot Collective\n\nInput Parameter:\n- `da` - The `DMDA`\n\nOutput Parameter:\n- `width` - The stencil width\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate()`, `DMDestroy()`, `DMDAStencilType`, `DMDA_STENCIL_BOX`, `DMDA_STENCIL_STAR.`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetStencilWidth\"))\n\"\"\"\nfunction DMDAGetStencilWidth(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetStencilWidth(petsclib::$UnionPetscLib, da::PetscDM )\n\twidth_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetStencilWidth, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               da, width_,\n              )\n\n\twidth = width_[]\n\n\treturn width\nend \n\n\"\"\"\n\tDMDASetOwnershipRanges(petsclib::PetscLibType,da::PetscDM, lx::Vector{PetscInt}, ly::Vector{PetscInt}, lz::Vector{PetscInt}) \nSets the number of nodes in each direction on each process\n\nLogically Collective\n\nInput Parameters:\n- `da` - The `DMDA`\n- `lx` - array containing number of nodes in the X direction on each process, or `NULL`. If non-null, must be of length da->m\n- `ly` - array containing number of nodes in the Y direction on each process, or `NULL`. If non-null, must be of length da->n\n- `lz` - array containing number of nodes in the Z direction on each process, or `NULL`. If non-null, must be of length da->p.\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate()`, `DMDestroy()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetOwnershipRanges\"))\n\"\"\"\nfunction DMDASetOwnershipRanges(petsclib::PetscLibType, da::PetscDM, lx::Vector{PetscInt}, ly::Vector{PetscInt}, lz::Vector{PetscInt}) end\n\n@for_petsc function DMDASetOwnershipRanges(petsclib::$UnionPetscLib, da::PetscDM, lx::Vector{$PetscInt}, ly::Vector{$PetscInt}, lz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMDASetOwnershipRanges, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, lx, ly, lz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetInterpolationType(petsclib::PetscLibType,da::PetscDM, ctype::DMDAInterpolationType) \nSets the type of interpolation that will be\nreturned by `DMCreateInterpolation()`\n\nLogically Collective\n\nInput Parameters:\n- `da`    - initial distributed array\n- `ctype` - `DMDA_Q1` and `DMDA_Q0` are currently the only supported forms\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DMDAInterpolationType`,\n`DMDA_Q1`, `DMDA_Q0`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetInterpolationType\"))\n\"\"\"\nfunction DMDASetInterpolationType(petsclib::PetscLibType, da::PetscDM, ctype::DMDAInterpolationType) end\n\n@for_petsc function DMDASetInterpolationType(petsclib::$UnionPetscLib, da::PetscDM, ctype::DMDAInterpolationType )\n\n    @chk ccall(\n               (:DMDASetInterpolationType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMDAInterpolationType),\n               da, ctype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctype::DMDAInterpolationType = DMDAGetInterpolationType(petsclib::PetscLibType,da::PetscDM) \nGets the type of interpolation that will be\nused by `DMCreateInterpolation()`\n\nNot Collective\n\nInput Parameter:\n- `da` - distributed array\n\nOutput Parameter:\n- `ctype` - interpolation type (`DMDA_Q1` and `DMDA_Q0` are currently the only supported forms)\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAInterpolationType`, `DMDASetInterpolationType()`, `DMCreateInterpolation()`,\n`DMDA_Q1`, `DMDA_Q0`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetInterpolationType\"))\n\"\"\"\nfunction DMDAGetInterpolationType(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetInterpolationType(petsclib::$UnionPetscLib, da::PetscDM )\n\tctype_ = Ref{DMDAInterpolationType}()\n\n    @chk ccall(\n               (:DMDAGetInterpolationType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMDAInterpolationType}),\n               da, ctype_,\n              )\n\n\tctype = ctype_[]\n\n\treturn ctype\nend \n\n\"\"\"\n\tDMDAGetNeighbors(petsclib::PetscLibType,da::PetscDM, ranks::Vector{PetscMPIInt}) \nGets an array containing the MPI rank of all the current\nprocesses neighbors.\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameter:\n- `ranks` - the neighbors ranks, stored with the x index increasing most rapidly. The process itself is in the list\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DMDA`, `DM`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetNeighbors\"))\n\"\"\"\nfunction DMDAGetNeighbors(petsclib::PetscLibType, da::PetscDM, ranks::Vector{PetscMPIInt}) end\n\n@for_petsc function DMDAGetNeighbors(petsclib::$UnionPetscLib, da::PetscDM, ranks::Vector{PetscMPIInt} )\n\tranks_ = Ref(pointer(ranks))\n\n    @chk ccall(\n               (:DMDAGetNeighbors, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{PetscMPIInt}}),\n               da, ranks_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlx::Vector{PetscInt},ly::Vector{PetscInt},lz::Vector{PetscInt} = DMDAGetOwnershipRanges(petsclib::PetscLibType,da::PetscDM) \nGets the number of indices in the x, y and z direction that are owned by each process in that direction\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameters:\n- `lx` - ownership along x direction (optional), its length is `m` the number of processes in the x-direction\n- `ly` - ownership along y direction (optional), its length is `n` the number of processes in the y-direction\n- `lz` - ownership along z direction (optional), its length is `p` the number of processes in the z-direction\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetCorners()`, `DMDAGetGhostCorners()`, `DMDACreate()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `VecGetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetOwnershipRanges\"))\n\"\"\"\nfunction DMDAGetOwnershipRanges(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetOwnershipRanges(petsclib::$UnionPetscLib, da::PetscDM )\n\tlx_ = Ref{Ptr{$PetscInt}}()\n\tly_ = Ref{Ptr{$PetscInt}}()\n\tlz_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMDAGetOwnershipRanges, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               da, lx_, ly_, lz_,\n              )\n\n\tlx = unsafe_wrap(Array, lx_[], VecGetLocalSize(petsclib, x); own = false)\n\tly = unsafe_wrap(Array, ly_[], VecGetLocalSize(petsclib, x); own = false)\n\tlz = unsafe_wrap(Array, lz_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn lx,ly,lz\nend \n\n\"\"\"\n\tDMDASetRefinementFactor(petsclib::PetscLibType,da::PetscDM, refine_x::PetscInt, refine_y::PetscInt, refine_z::PetscInt) \nSet the ratios that the `DMDA` grid is refined\n\nLogically Collective\n\nInput Parameters:\n- `da`       - the `DMDA` object\n- `refine_x` - ratio of fine grid to coarse in x direction (2 by default)\n- `refine_y` - ratio of fine grid to coarse in y direction (2 by default)\n- `refine_z` - ratio of fine grid to coarse in z direction (2 by default)\n\nOptions Database Keys:\n- `-da_refine_x refine_x` - refinement ratio in x direction\n- `-da_refine_y rafine_y` - refinement ratio in y direction\n- `-da_refine_z refine_z` - refinement ratio in z direction\n- `-da_refine <n>`        - refine the `DMDA` object n times when it is created.\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMRefine()`, `DMDAGetRefinementFactor()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetRefinementFactor\"))\n\"\"\"\nfunction DMDASetRefinementFactor(petsclib::PetscLibType, da::PetscDM, refine_x::PetscInt, refine_y::PetscInt, refine_z::PetscInt) end\n\n@for_petsc function DMDASetRefinementFactor(petsclib::$UnionPetscLib, da::PetscDM, refine_x::$PetscInt, refine_y::$PetscInt, refine_z::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetRefinementFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               da, refine_x, refine_y, refine_z,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trefine_x::PetscInt,refine_y::PetscInt,refine_z::PetscInt = DMDAGetRefinementFactor(petsclib::PetscLibType,da::PetscDM) \nGets the ratios that the `DMDA` grid is refined\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameters:\n- `refine_x` - ratio of fine grid to coarse in x direction (2 by default)\n- `refine_y` - ratio of fine grid to coarse in y direction (2 by default)\n- `refine_z` - ratio of fine grid to coarse in z direction (2 by default)\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMRefine()`, `DMDASetRefinementFactor()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetRefinementFactor\"))\n\"\"\"\nfunction DMDAGetRefinementFactor(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetRefinementFactor(petsclib::$UnionPetscLib, da::PetscDM )\n\trefine_x_ = Ref{$PetscInt}()\n\trefine_y_ = Ref{$PetscInt}()\n\trefine_z_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetRefinementFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, refine_x_, refine_y_, refine_z_,\n              )\n\n\trefine_x = refine_x_[]\n\trefine_y = refine_y_[]\n\trefine_z = refine_z_[]\n\n\treturn refine_x,refine_y,refine_z\nend \n\n\"\"\"\n\tDMDASetGetMatrix(petsclib::PetscLibType,da::PetscDM, f::external) \nSets the routine used by the `DMDA` to allocate a matrix.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `da` - the `DMDA` object\n- `f`  - the function that allocates the matrix for that specific `DMDA`\n\nCalling sequence of `f`:\n- `da` - the `DMDA` object\n- `A`  - the created matrix\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateMatrix()`, `DMDASetBlockFills()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetGetMatrix\"))\n\"\"\"\nfunction DMDASetGetMatrix(petsclib::PetscLibType, da::PetscDM, f::external) end\n\n@for_petsc function DMDASetGetMatrix(petsclib::$UnionPetscLib, da::PetscDM, f::external )\n\n    @chk ccall(\n               (:DMDASetGetMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               da, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgidxm::Vector{PetscInt} = DMDAMapMatStencilToGlobal(petsclib::PetscLibType,da::PetscDM, m::PetscInt, idxm::Vector{MatStencil}) \nMap a list of `MatStencil` on a grid to global indices.\n\nNot Collective\n\nInput Parameters:\n- `da`   - the `DMDA` object\n- `m`    - number of `MatStencil` to map\n- `idxm` - grid points (and component number when dof > 1)\n\nOutput Parameter:\n- `gidxm` - global row indices\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `MatStencil`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAMapMatStencilToGlobal\"))\n\"\"\"\nfunction DMDAMapMatStencilToGlobal(petsclib::PetscLibType, da::PetscDM, m::PetscInt, idxm::Vector{MatStencil}) end\n\n@for_petsc function DMDAMapMatStencilToGlobal(petsclib::$UnionPetscLib, da::PetscDM, m::$PetscInt, idxm::Vector{MatStencil} )\n\tgidxm = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMDAMapMatStencilToGlobal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{MatStencil}, Ptr{$PetscInt}),\n               da, m, idxm, gidxm,\n              )\n\n\n\treturn gidxm\nend \n\n\"\"\"\n\tnodes::PetscReal = DMDASetGLLCoordinates(petsclib::PetscLibType,da::PetscDM, n::PetscInt) \n\n# External Links\n$(_doc_external(\"DMDA/DMDASetGLLCoordinates\"))\n\"\"\"\nfunction DMDASetGLLCoordinates(petsclib::PetscLibType, da::PetscDM, n::PetscInt) end\n\n@for_petsc function DMDASetGLLCoordinates(petsclib::$UnionPetscLib, da::PetscDM, n::$PetscInt )\n\tnodes_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMDASetGLLCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscReal}),\n               da, n, nodes_,\n              )\n\n\tnodes = nodes_[]\n\n\treturn nodes\nend \n\n\"\"\"\n\tis::IS = DMDACreatePatchIS(petsclib::PetscLibType,da::PetscDM, lower::MatStencil, upper::MatStencil, offproc::PetscBool) \nCreates an index set corresponding to a logically rectangular patch of the `DMDA`.\n\nCollective\n\nInput Parameters:\n- `da`      - the `DMDA`\n- `lower`   - a `MatStencil` with i, j and k entries corresponding to the lower corner of the patch\n- `upper`   - a `MatStencil` with i, j and k entries corresponding to the upper corner of the patch\n- `offproc` - indicate whether the returned `IS` will contain off process indices\n\nOutput Parameter:\n- `is` - the `IS` corresponding to the patch\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateDomainDecomposition()`, `DMCreateDomainDecompositionScatters()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreatePatchIS\"))\n\"\"\"\nfunction DMDACreatePatchIS(petsclib::PetscLibType, da::PetscDM, lower::MatStencil, upper::MatStencil, offproc::PetscBool) end\n\n@for_petsc function DMDACreatePatchIS(petsclib::$UnionPetscLib, da::PetscDM, lower::MatStencil, upper::MatStencil, offproc::PetscBool )\n\tis_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMDACreatePatchIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{MatStencil}, Ptr{MatStencil}, Ptr{CIS}, PetscBool),\n               da, lower, upper, is_, offproc,\n              )\n\n\tis = is_[]\n\n\treturn is\nend \n\n\"\"\"\n\tpf::PF = DMDACreatePF(petsclib::PetscLibType,da::PetscDM) \nCreates an appropriately dimensioned `PF` mathematical function object\nfrom a `DMDA`.\n\nCollective; No Fortran Support\n\nInput Parameter:\n- `da` - initial distributed array\n\nOutput Parameter:\n- `pf` - the mathematical function object\n\nLevel: advanced\n\n-seealso: `DM`, `PF`, `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreatePF\"))\n\"\"\"\nfunction DMDACreatePF(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDACreatePF(petsclib::$UnionPetscLib, da::PetscDM )\n\tpf_ = Ref{CPF}()\n\n    @chk ccall(\n               (:DMDACreatePF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CPF}),\n               da, pf_,\n              )\n\n\tpf = pf_[]\n\n\treturn pf\nend \n\n\"\"\"\n\tDMDAVTKWriteAll(petsclib::PetscLibType,odm::PetscObject, viewer::PetscViewer) \nWrite a file containing all the fields that have been provided to the viewer\n\nCollective\n\nInput Parameters:\n- `odm`    - `DMDA` specifying the grid layout, passed as a `PetscObject`\n- `viewer` - viewer of type `PETSCVIEWERVTK`\n\nLevel: developer\n\n-seealso: [](sec_struct), `DMDA`, `DM`, `PETSCVIEWERVTK`, `DMDASetFieldName()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAVTKWriteAll\"))\n\"\"\"\nfunction DMDAVTKWriteAll(petsclib::PetscLibType, odm::PetscObject, viewer::PetscViewer) end\n\n@for_petsc function DMDAVTKWriteAll(petsclib::$UnionPetscLib, odm::PetscObject, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMDAVTKWriteAll, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscViewer),\n               odm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tda::PetscDM = DMDACreate3d(petsclib::PetscLibType,comm::MPI_Comm, bx::DMBoundaryType, by::DMBoundaryType, bz::DMBoundaryType, stencil_type::DMDAStencilType, M::PetscInt, N::PetscInt, P::PetscInt, m::PetscInt, n::PetscInt, p::PetscInt, dof::PetscInt, s::PetscInt, lx::Vector{PetscInt}, ly::Vector{PetscInt}, lz::Vector{PetscInt}) \nCreates an object that will manage the communication of three\nregular array data that is distributed across one or more MPI processes.\n\nCollective\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `bx`           - type of x ghost nodes the array have. Use one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`.\n- `by`           - type of y ghost nodes the array have. Use one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`.\n- `bz`           - type of z ghost nodes the array have. Use one of `DM_BOUNDARY_NONE`, `DM_BOUNDARY_GHOSTED`, `DM_BOUNDARY_PERIODIC`.\n- `stencil_type` - Type of stencil (`DMDA_STENCIL_STAR` or `DMDA_STENCIL_BOX`)\n- `M`            - global dimension in x direction of the array\n- `N`            - global dimension in y direction of the array\n- `P`            - global dimension in z direction of the array\n- `m`            - corresponding number of processors in x dimension (or `PETSC_DECIDE` to have calculated)\n- `n`            - corresponding number of processors in y dimension (or `PETSC_DECIDE` to have calculated)\n- `p`            - corresponding number of processors in z dimension (or `PETSC_DECIDE` to have calculated)\n- `dof`          - number of degrees of freedom per node\n- `s`            - stencil width\n- `lx`           - arrays containing the number of nodes in each cell along the x  coordinates, or `NULL`.\n- `ly`           - arrays containing the number of nodes in each cell along the y coordinates, or `NULL`.\n- `lz`           - arrays containing the number of nodes in each cell along the z coordinates, or `NULL`.\n\nOutput Parameter:\n- `da` - the resulting distributed array object\n\nOptions Database Keys:\n- `-dm_view`              - Calls `DMView()` at the conclusion of `DMDACreate3d()`\n- `-da_grid_x <nx>`       - number of grid points in x direction\n- `-da_grid_y <ny>`       - number of grid points in y direction\n- `-da_grid_z <nz>`       - number of grid points in z direction\n- `-da_processors_x <MX>` - number of processors in x direction\n- `-da_processors_y <MY>` - number of processors in y direction\n- `-da_processors_z <MZ>` - number of processors in z direction\n- `-da_bd_x <bx>`         - boundary type in x direction\n- `-da_bd_y <by>`         - boundary type in y direction\n- `-da_bd_z <bz>`         - boundary type in x direction\n- `-da_bd_all <bt>`       - boundary type in all directions\n- `-da_refine_x <rx>`     - refinement ratio in x direction\n- `-da_refine_y <ry>`     - refinement ratio in y direction\n- `-da_refine_z <rz>`     - refinement ratio in z directio\n- `-da_refine <n>`        - refine the `DMDA` n times before creating it\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDestroy()`, `DMView()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMGlobalToLocalBegin()`, `DMDAGetRefinementFactor()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMLocalToLocalBegin()`, `DMLocalToLocalEnd()`, `DMDASetRefinementFactor()`,\n`DMDAGetInfo()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMDACreateNaturalVector()`, `DMLoad()`, `DMDAGetOwnershipRanges()`,\n`DMStagCreate3d()`, `DMBoundaryType`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreate3d\"))\n\"\"\"\nfunction DMDACreate3d(petsclib::PetscLibType, comm::MPI_Comm, bx::DMBoundaryType, by::DMBoundaryType, bz::DMBoundaryType, stencil_type::DMDAStencilType, M::PetscInt, N::PetscInt, P::PetscInt, m::PetscInt, n::PetscInt, p::PetscInt, dof::PetscInt, s::PetscInt, lx::Union{Ptr, Vector{PetscInt}}, ly::Union{Ptr, Vector{PetscInt}}, lz::Union{Ptr, Vector{PetscInt}}) end\n\n@for_petsc function DMDACreate3d(petsclib::$UnionPetscLib, comm::MPI_Comm, bx::DMBoundaryType, by::DMBoundaryType, bz::DMBoundaryType, stencil_type::DMDAStencilType, M::$PetscInt, N::$PetscInt, P::$PetscInt, m::$PetscInt, n::$PetscInt, p::$PetscInt, dof::$PetscInt, s::$PetscInt, lx::Union{Ptr, Vector{$PetscInt}}, ly::Union{Ptr, Vector{$PetscInt}}, lz::Union{Ptr, Vector{$PetscInt}} )\n\tda_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMDACreate3d, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMBoundaryType, DMBoundaryType, DMBoundaryType, DMDAStencilType, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CDM}),\n               comm, bx, by, bz, stencil_type, M, N, P, m, n, p, dof, s, lx, ly, lz, da_,\n              )\n\n\tda = PetscDM(da_[], petsclib)\n\n\treturn da\nend \n\n\"\"\"\n\tDMDASetBlockFills(petsclib::PetscLibType,da::PetscDM, dfill::PetscInt, ofill::PetscInt) \nSets the fill pattern in each block for a multi\nof the matrix returned by `DMCreateMatrix()`.\n\nLogically Collective\n\nInput Parameters:\n- `da`    - the `DMDA`\n- `dfill` - the fill pattern in the diagonal block (may be `NULL`, means use dense block)\n- `ofill` - the fill pattern in the off-diagonal blocks\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateMatrix()`, `DMDASetGetMatrix()`, `DMSetMatrixPreallocateOnly()`, `DMDASetBlockFillsSparse()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetBlockFills\"))\n\"\"\"\nfunction DMDASetBlockFills(petsclib::PetscLibType, da::PetscDM, dfill::PetscInt, ofill::PetscInt) end\n\n@for_petsc function DMDASetBlockFills(petsclib::$UnionPetscLib, da::PetscDM, dfill::$PetscInt, ofill::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetBlockFills, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, dfill, ofill,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetBlockFillsSparse(petsclib::PetscLibType,da::PetscDM, dfillsparse::PetscInt, ofillsparse::PetscInt) \nSets the fill pattern in each block for a multi\nof the matrix returned by `DMCreateMatrix()`, using sparse representations\nof fill patterns.\n\nLogically Collective\n\nInput Parameters:\n- `da`          - the `DMDA`\n- `dfillsparse` - the sparse fill pattern in the diagonal block (may be `NULL`, means use dense block)\n- `ofillsparse` - the sparse fill pattern in the off-diagonal blocks\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetBlockFills()`, `DMCreateMatrix()`, `DMDASetGetMatrix()`, `DMSetMatrixPreallocateOnly()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetBlockFillsSparse\"))\n\"\"\"\nfunction DMDASetBlockFillsSparse(petsclib::PetscLibType, da::PetscDM, dfillsparse::PetscInt, ofillsparse::PetscInt) end\n\n@for_petsc function DMDASetBlockFillsSparse(petsclib::$UnionPetscLib, da::PetscDM, dfillsparse::$PetscInt, ofillsparse::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetBlockFillsSparse, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, dfillsparse, ofillsparse,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetFieldName(petsclib::PetscLibType,da::PetscDM, nf::PetscInt, name::String) \nSets the names of individual field components in multicomponent\nvectors associated with a `DMDA`.\n\nLogically Collective; name must contain a common value\n\nInput Parameters:\n- `da`   - the `DMDA`\n- `nf`   - field number for the `DMDA` (0, 1, ... dof-1), where dof indicates the\nnumber of degrees of freedom per node within the `DMDA`\n- `name` - the name of the field (component)\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetFieldName()`, `DMDASetCoordinateName()`, `DMDAGetCoordinateName()`, `DMDASetFieldNames()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetFieldName\"))\n\"\"\"\nfunction DMDASetFieldName(petsclib::PetscLibType, da::PetscDM, nf::PetscInt, name::String) end\n\n@for_petsc function DMDASetFieldName(petsclib::$UnionPetscLib, da::PetscDM, nf::$PetscInt, name::String )\n\n    @chk ccall(\n               (:DMDASetFieldName, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Cchar}),\n               da, nf, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGetFieldNames(petsclib::PetscLibType,da::PetscDM, names::Cchar) \nGets the name of all the components in the vector associated with the `DMDA`\n\nNot Collective; names will contain a common value; No Fortran Support\n\nInput Parameter:\n- `da` - the `DMDA` object\n\nOutput Parameter:\n- `names` - the names of the components, final string is `NULL`, will have the same number of entries as the dof used in creating the `DMDA`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetFieldName()`, `DMDASetCoordinateName()`, `DMDAGetCoordinateName()`, `DMDASetFieldName()`, `DMDASetFieldNames()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetFieldNames\"))\n\"\"\"\nfunction DMDAGetFieldNames(petsclib::PetscLibType, da::PetscDM, names::Cchar) end\n\n@for_petsc function DMDAGetFieldNames(petsclib::$UnionPetscLib, da::PetscDM, names::Cchar )\n\n    @chk ccall(\n               (:DMDAGetFieldNames, $petsc_library),\n               PetscErrorCode,\n               (CDM, Cchar),\n               da, names,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetFieldNames(petsclib::PetscLibType,da::PetscDM, names::String) \nSets the name of each component in the vector associated with the `DMDA`\n\nLogically Collective; names must contain a common value; No Fortran Support\n\nInput Parameters:\n- `da`    - the `DMDA` object\n- `names` - the names of the components, final string must be `NULL`, must have the same number of entries as the dof used in creating the `DMDA`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetFieldName()`, `DMDASetCoordinateName()`, `DMDAGetCoordinateName()`, `DMDASetFieldName()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetFieldNames\"))\n\"\"\"\nfunction DMDASetFieldNames(petsclib::PetscLibType, da::PetscDM, names::String) end\n\n@for_petsc function DMDASetFieldNames(petsclib::$UnionPetscLib, da::PetscDM, names::String )\n\tnames_ = Ref(pointer(names))\n\n    @chk ccall(\n               (:DMDASetFieldNames, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{Cchar}}),\n               da, names_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGetFieldName(petsclib::PetscLibType,da::PetscDM, nf::PetscInt, name::String) \nGets the names of individual field components in multicomponent\nvectors associated with a `DMDA`.\n\nNot Collective; name will contain a common value\n\nInput Parameters:\n- `da` - the `DMDA`\n- `nf` - field number for the `DMDA` (0, 1, ... dof-1), where dof indicates the\nnumber of degrees of freedom per node within the `DMDA`\n\nOutput Parameter:\n- `name` - the name of the field (component)\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetFieldName()`, `DMDASetCoordinateName()`, `DMDAGetCoordinateName()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetFieldName\"))\n\"\"\"\nfunction DMDAGetFieldName(petsclib::PetscLibType, da::PetscDM, nf::PetscInt, name::String) end\n\n@for_petsc function DMDAGetFieldName(petsclib::$UnionPetscLib, da::PetscDM, nf::$PetscInt, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:DMDAGetFieldName, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}),\n               da, nf, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDASetCoordinateName(petsclib::PetscLibType,dm::PetscDM, nf::PetscInt, name::String) \nSets the name of the coordinate directions associated with a `DMDA`, for example \"x\" or \"y\"\n\nLogically Collective; name must contain a common value; No Fortran Support\n\nInput Parameters:\n- `dm`   - the `DMDA`\n- `nf`   - coordinate number for the `DMDA` (0, 1, ... dim-1),\n- `name` - the name of the coordinate\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetCoordinateName()`, `DMDASetFieldName()`, `DMDAGetFieldName()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetCoordinateName\"))\n\"\"\"\nfunction DMDASetCoordinateName(petsclib::PetscLibType, dm::PetscDM, nf::PetscInt, name::String) end\n\n@for_petsc function DMDASetCoordinateName(petsclib::$UnionPetscLib, dm::PetscDM, nf::$PetscInt, name::String )\n\n    @chk ccall(\n               (:DMDASetCoordinateName, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Cchar}),\n               dm, nf, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGetCoordinateName(petsclib::PetscLibType,dm::PetscDM, nf::PetscInt, name::String) \nGets the name of a coordinate direction associated with a `DMDA`.\n\nNot Collective; name will contain a common value; No Fortran Support\n\nInput Parameters:\n- `dm` - the `DMDA`\n- `nf` - number for the `DMDA` (0, 1, ... dim-1)\n\nOutput Parameter:\n- `name` - the name of the coordinate direction\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetCoordinateName()`, `DMDASetFieldName()`, `DMDAGetFieldName()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetCoordinateName\"))\n\"\"\"\nfunction DMDAGetCoordinateName(petsclib::PetscLibType, dm::PetscDM, nf::PetscInt, name::String) end\n\n@for_petsc function DMDAGetCoordinateName(petsclib::$UnionPetscLib, dm::PetscDM, nf::$PetscInt, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:DMDAGetCoordinateName, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}),\n               dm, nf, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tx::PetscInt,y::PetscInt,z::PetscInt,m::PetscInt,n::PetscInt,p::PetscInt = DMDAGetCorners(petsclib::PetscLibType,da::PetscDM) \nReturns the global (`x`,`y`,`z`) indices of the lower left\ncorner and size of the local region, excluding ghost points.\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA`\n\nOutput Parameters:\n- `x` - the corner index for the first dimension\n- `y` - the corner index for the second dimension (only used in 2D and 3D problems)\n- `z` - the corner index for the third dimension (only used in 3D problems)\n- `m` - the width in the first dimension\n- `n` - the width in the second dimension (only used in 2D and 3D problems)\n- `p` - the width in the third dimension (only used in 3D problems)\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetOwnershipRanges()`, `DMStagGetCorners()`, `DMSTAG`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetCorners\"))\n\"\"\"\nfunction DMDAGetCorners(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetCorners(petsclib::$UnionPetscLib, da::PetscDM )\n\tx_ = Ref{$PetscInt}()\n\ty_ = Ref{$PetscInt}()\n\tz_ = Ref{$PetscInt}()\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetCorners, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, x_, y_, z_, m_, n_, p_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\tz = z_[]\n\tm = m_[]\n\tn = n_[]\n\tp = p_[]\n\n\treturn x,y,z,m,n,p\nend \n\n\"\"\"\n\tnda::PetscDM = DMDACreateCompatibleDMDA(petsclib::PetscLibType,da::PetscDM, nfields::PetscInt) \nCreates a `DMDA` with the same layout as given `DMDA` but with fewer or more fields\n\nCollective\n\nInput Parameters:\n- `da`      - the `DMDA`\n- `nfields` - number of fields in new `DMDA`\n\nOutput Parameter:\n- `nda` - the new `DMDA`\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMSetCoordinates()`, `DMDASetUniformCoordinates()`, `DMGetCoordinates()`, `DMDAGetGhostedCoordinates()`,\n`DMStagCreateCompatibleDMStag()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreateCompatibleDMDA\"))\n\"\"\"\nfunction DMDACreateCompatibleDMDA(petsclib::PetscLibType, da::PetscDM, nfields::PetscInt) end\n\n@for_petsc function DMDACreateCompatibleDMDA(petsclib::$UnionPetscLib, da::PetscDM, nfields::$PetscInt )\n\tnda_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMDACreateCompatibleDMDA, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CDM}),\n               da, nfields, nda_,\n              )\n\n\tnda = PetscDM(nda_[], petsclib)\n\n\treturn nda\nend \n\n\"\"\"\n\tDMDAGetCoordinateArray(petsclib::PetscLibType,dm::PetscDM, xc::Cvoid) \nGets an array containing the coordinates of the `DMDA`\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `dm` - the `DMDA`\n\nOutput Parameter:\n- `xc` - the coordinates\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetCoordinateName()`, `DMDASetFieldName()`, `DMDAGetFieldName()`, `DMDARestoreCoordinateArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetCoordinateArray\"))\n\"\"\"\nfunction DMDAGetCoordinateArray(petsclib::PetscLibType, dm::PetscDM, xc::Cvoid) end\n\n@for_petsc function DMDAGetCoordinateArray(petsclib::$UnionPetscLib, dm::PetscDM, xc::Cvoid )\n\n    @chk ccall(\n               (:DMDAGetCoordinateArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cvoid}),\n               dm, xc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDARestoreCoordinateArray(petsclib::PetscLibType,dm::PetscDM, xc::Cvoid) \nReturns an array containing the coordinates of the `DMDA` obtained with `DMDAGetCoordinateArray()`\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `dm` - the `DMDA`\n- `xc` - the coordinates\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDASetCoordinateName()`, `DMDASetFieldName()`, `DMDAGetFieldName()`, `DMDAGetCoordinateArray()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDARestoreCoordinateArray\"))\n\"\"\"\nfunction DMDARestoreCoordinateArray(petsclib::PetscLibType, dm::PetscDM, xc::Cvoid) end\n\n@for_petsc function DMDARestoreCoordinateArray(petsclib::$UnionPetscLib, dm::PetscDM, xc::Cvoid )\n\n    @chk ccall(\n               (:DMDARestoreCoordinateArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cvoid}),\n               dm, xc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tda::PetscDM = DMDACreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `DMDA` object for managing structured grids.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `DMDA` object\n\nOutput Parameter:\n- `da` - the `DMDA` object\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMSetUp()`, `DMDASetSizes()`, `DMClone()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreate\"))\n\"\"\"\nfunction DMDACreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMDACreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tda_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMDACreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, da_,\n              )\n\n\tda = PetscDM(da_[], petsclib)\n\n\treturn da\nend \n\n\"\"\"\n\tcell::PetscInt = DMDAConvertToCell(petsclib::PetscLibType,dm::PetscDM, s::MatStencil) \nConvert a (i,j,k) location in a `DMDA` to its local cell or vertex number\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DMDA`\n- `s`  - a `MatStencil` that provides (i,j,k)\n\nOutput Parameter:\n- `cell` - the local cell or vertext number\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetGhostCorners()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAConvertToCell\"))\n\"\"\"\nfunction DMDAConvertToCell(petsclib::PetscLibType, dm::PetscDM, s::MatStencil) end\n\n@for_petsc function DMDAConvertToCell(petsclib::$UnionPetscLib, dm::PetscDM, s::MatStencil )\n\tcell_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAConvertToCell, $petsc_library),\n               PetscErrorCode,\n               (CDM, MatStencil, Ptr{$PetscInt}),\n               dm, s, cell_,\n              )\n\n\tcell = cell_[]\n\n\treturn cell\nend \n\n\"\"\"\n\tII::PetscInt,JJ::PetscInt,KK::PetscInt,X::PetscScalar,Y::PetscScalar,Z::PetscScalar = DMDAGetLogicalCoordinate(petsclib::PetscLibType,da::PetscDM, x::PetscScalar, y::PetscScalar, z::PetscScalar) \nReturns a the i,j,k logical coordinate for the closest mesh point to a `x`, `y`, `z` point in the coordinates of the `DMDA`\n\nCollective\n\nInput Parameters:\n- `da` - the `DMDA`\n- `x`  - the first physical coordinate\n- `y`  - the second physical coordinate\n- `z`  - the third physical coordinate\n\nOutput Parameters:\n- `II` - the first logical coordinate (-1 on processes that do not contain that point)\n- `JJ` - the second logical coordinate (-1 on processes that do not contain that point)\n- `KK` - the third logical coordinate (-1 on processes that do not contain that point)\n- `X`  - (optional) the first coordinate of the located grid point\n- `Y`  - (optional) the second coordinate of the located grid point\n- `Z`  - (optional) the third coordinate of the located grid point\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetLogicalCoordinate\"))\n\"\"\"\nfunction DMDAGetLogicalCoordinate(petsclib::PetscLibType, da::PetscDM, x::PetscScalar, y::PetscScalar, z::PetscScalar) end\n\n@for_petsc function DMDAGetLogicalCoordinate(petsclib::$UnionPetscLib, da::PetscDM, x::$PetscScalar, y::$PetscScalar, z::$PetscScalar )\n\tII_ = Ref{$PetscInt}()\n\tJJ_ = Ref{$PetscInt}()\n\tKK_ = Ref{$PetscInt}()\n\tX_ = Ref{$PetscScalar}()\n\tY_ = Ref{$PetscScalar}()\n\tZ_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:DMDAGetLogicalCoordinate, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscScalar, $PetscScalar, $PetscScalar, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               da, x, y, z, II_, JJ_, KK_, X_, Y_, Z_,\n              )\n\n\tII = II_[]\n\tJJ = JJ_[]\n\tKK = KK_[]\n\tX = X_[]\n\tY = Y_[]\n\tZ = Z_[]\n\n\treturn II,JJ,KK,X,Y,Z\nend \n\n\"\"\"\n\tDMDAGetRay(petsclib::PetscLibType,da::PetscDM, dir::DMDirection, gp::PetscInt, newvec::PetscVec, scatter::VecScatter) \nReturns a vector on process zero that contains a row or column of the values in a `DMDA` vector\n\nCollective\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `dir` - Cartesian direction, either `DM_X`, `DM_Y`, or `DM_Z`\n- `gp`  - global grid point number in this direction\n\nOutput Parameters:\n- `newvec`  - the new vector that can hold the values (size zero on all processes except MPI rank 0)\n- `scatter` - the `VecScatter` that will map from the original vector to the ray\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDirection`, `Vec`, `VecScatter`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetRay\"))\n\"\"\"\nfunction DMDAGetRay(petsclib::PetscLibType, da::PetscDM, dir::DMDirection, gp::PetscInt, newvec::PetscVec, scatter::VecScatter) end\n\n@for_petsc function DMDAGetRay(petsclib::$UnionPetscLib, da::PetscDM, dir::DMDirection, gp::$PetscInt, newvec::PetscVec, scatter::VecScatter )\n\tnewvec_ = Ref(newvec.ptr)\n\n    @chk ccall(\n               (:DMDAGetRay, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMDirection, $PetscInt, Ptr{CVec}, Ptr{VecScatter}),\n               da, dir, gp, newvec_, scatter,\n              )\n\n\tnewvec.ptr = newvec_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGetProcessorSubset(petsclib::PetscLibType,da::PetscDM, dir::DMDirection, gp::PetscInt, comm::MPI_Comm) \nReturns a communicator consisting only of the\nprocessors in a `DMDA` that own a particular global x, y, or z grid point\n(corresponding to a logical plane in a 3D grid or a line in a 2D grid).\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `dir` - Cartesian direction, either `DM_X`, `DM_Y`, or `DM_Z`\n- `gp`  - global grid point number in this direction\n\nOutput Parameter:\n- `comm` - new communicator\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDirection`, `DM_X`, `DM_Y`, `DM_Z`, `DMDAGetProcessorSubsets()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetProcessorSubset\"))\n\"\"\"\nfunction DMDAGetProcessorSubset(petsclib::PetscLibType, da::PetscDM, dir::DMDirection, gp::PetscInt, comm::MPI_Comm) end\n\n@for_petsc function DMDAGetProcessorSubset(petsclib::$UnionPetscLib, da::PetscDM, dir::DMDirection, gp::$PetscInt, comm::MPI_Comm )\n\n    @chk ccall(\n               (:DMDAGetProcessorSubset, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMDirection, $PetscInt, Ptr{MPI_Comm}),\n               da, dir, gp, comm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDAGetProcessorSubsets(petsclib::PetscLibType,da::PetscDM, dir::DMDirection, subcomm::MPI_Comm) \nReturns communicators consisting only of the\nprocessors in a `DMDA` adjacent in a particular dimension,\ncorresponding to a logical plane in a 3D grid or a line in a 2D grid.\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `da`  - the `DMDA`\n- `dir` - Cartesian direction, either `DM_X`, `DM_Y`, or `DM_Z`\n\nOutput Parameter:\n- `subcomm` - new communicator\n\nLevel: advanced\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDirection`, `DMDAGetProcessorSubset()`, `DM_X`, `DM_Y`, `DM_Z`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetProcessorSubsets\"))\n\"\"\"\nfunction DMDAGetProcessorSubsets(petsclib::PetscLibType, da::PetscDM, dir::DMDirection, subcomm::MPI_Comm) end\n\n@for_petsc function DMDAGetProcessorSubsets(petsclib::$UnionPetscLib, da::PetscDM, dir::DMDirection, subcomm::MPI_Comm )\n\n    @chk ccall(\n               (:DMDAGetProcessorSubsets, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMDirection, Ptr{MPI_Comm}),\n               da, dir, subcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tx::PetscInt,y::PetscInt,z::PetscInt,m::PetscInt,n::PetscInt,p::PetscInt = DMDAGetGhostCorners(petsclib::PetscLibType,da::PetscDM) \nReturns the global (`i`,`j`,`k`) indices of the lower left\ncorner and size of the local region, including ghost points.\n\nNot Collective\n\nInput Parameter:\n- `da` - the `DMDA`\n\nOutput Parameters:\n- `x` - the corner index for the first dimension\n- `y` - the corner index for the second dimension (only used in 2D and 3D problems)\n- `z` - the corner index for the third dimension (only used in 3D problems)\n- `m` - the width in the first dimension\n- `n` - the width in the second dimension (only used in 2D and 3D problems)\n- `p` - the width in the third dimension (only used in 3D problems)\n\nLevel: beginner\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMDAGetCorners()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDAGetOwnershipRanges()`, `DMStagGetGhostCorners()`, `DMSTAG`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetGhostCorners\"))\n\"\"\"\nfunction DMDAGetGhostCorners(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAGetGhostCorners(petsclib::$UnionPetscLib, da::PetscDM )\n\tx_ = Ref{$PetscInt}()\n\ty_ = Ref{$PetscInt}()\n\tz_ = Ref{$PetscInt}()\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetGhostCorners, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               da, x_, y_, z_, m_, n_, p_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\tz = z_[]\n\tm = m_[]\n\tn = n_[]\n\tp = p_[]\n\n\treturn x,y,z,m,n,p\nend \n\n\"\"\"\n\tDMDASetPreallocationCenterDimension(petsclib::PetscLibType,dm::PetscDM, preallocCenterDim::PetscInt) \nDetermine the topology used to determine adjacency\n\nInput Parameters:\n- `dm`                - The `DMDA` object\n- `preallocCenterDim` - The dimension of points which connect adjacent entries\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateMatrix()`, `DMDAPreallocateOperator()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetPreallocationCenterDimension\"))\n\"\"\"\nfunction DMDASetPreallocationCenterDimension(petsclib::PetscLibType, dm::PetscDM, preallocCenterDim::PetscInt) end\n\n@for_petsc function DMDASetPreallocationCenterDimension(petsclib::$UnionPetscLib, dm::PetscDM, preallocCenterDim::$PetscInt )\n\n    @chk ccall(\n               (:DMDASetPreallocationCenterDimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, preallocCenterDim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpreallocCenterDim::PetscInt = DMDAGetPreallocationCenterDimension(petsclib::PetscLibType,dm::PetscDM) \nReturn the topology used to determine adjacency\n\nInput Parameter:\n- `dm` - The `DMDA` object\n\nOutput Parameter:\n- `preallocCenterDim` - The dimension of points which connect adjacent entries\n\nLevel: developer\n\n-seealso: [](sec_struct), `DM`, `DMDA`, `DMCreateMatrix()`, `DMDAPreallocateOperator()`, `DMDASetPreallocationCenterDimension()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetPreallocationCenterDimension\"))\n\"\"\"\nfunction DMDAGetPreallocationCenterDimension(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMDAGetPreallocationCenterDimension(petsclib::$UnionPetscLib, dm::PetscDM )\n\tpreallocCenterDim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMDAGetPreallocationCenterDimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, preallocCenterDim_,\n              )\n\n\tpreallocCenterDim = preallocCenterDim_[]\n\n\treturn preallocCenterDim\nend \n\n\"\"\"\n\trest::PetscMat = DMDACreateAggregates(petsclib::PetscLibType,dac::PetscDM, daf::PetscDM) \nGets the aggregates that map between\ngrids associated with two `DMDA`\n\nCollective\n\nInput Parameters:\n- `dac` - the coarse grid `DMDA`\n- `daf` - the fine grid `DMDA`\n\nOutput Parameter:\n- `rest` - the restriction matrix (transpose of the projection matrix)\n\nLevel: intermediate\n\n-seealso: [](sec_struct), `DMRefine()`, `DMCreateInjection()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreateAggregates\"))\n\"\"\"\nfunction DMDACreateAggregates(petsclib::PetscLibType, dac::PetscDM, daf::PetscDM) end\n\n@for_petsc function DMDACreateAggregates(petsclib::$UnionPetscLib, dac::PetscDM, daf::PetscDM )\n\trest_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMDACreateAggregates, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{CMat}),\n               dac, daf, rest_,\n              )\n\n\trest = PetscMat(rest_[], petsclib)\n\n\treturn rest\nend \n\n\"\"\"\n\tDMGlobalToLocalBeginDefaultShell(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nUses the GlobalToLocal `VecScatter` context set by the user to begin a global to local scatter\n\nCollective\n\nInput Parameters:\n- `dm`   - `DMSHELL`\n- `g`    - global vector\n- `mode` - `InsertMode`\n- `l`    - local vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMGlobalToLocalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalBeginDefaultShell\"))\n\"\"\"\nfunction DMGlobalToLocalBeginDefaultShell(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMGlobalToLocalBeginDefaultShell(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMGlobalToLocalBeginDefaultShell, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGlobalToLocalEndDefaultShell(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nUses the GlobalToLocal `VecScatter` context set by the user to end a global to local scatter\nCollective\n\nInput Parameters:\n- `dm`   - `DMSHELL`\n- `g`    - global vector\n- `mode` - `InsertMode`\n- `l`    - local vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMGlobalToLocalBeginDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalEndDefaultShell\"))\n\"\"\"\nfunction DMGlobalToLocalEndDefaultShell(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMGlobalToLocalEndDefaultShell(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMGlobalToLocalEndDefaultShell, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToGlobalBeginDefaultShell(petsclib::PetscLibType,dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) \nUses the LocalToGlobal `VecScatter` context set by the user to begin a local to global scatter\nCollective\n\nInput Parameters:\n- `dm`   - `DMSHELL`\n- `l`    - local vector\n- `mode` - `InsertMode`\n- `g`    - global vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMLocalToGlobalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalBeginDefaultShell\"))\n\"\"\"\nfunction DMLocalToGlobalBeginDefaultShell(petsclib::PetscLibType, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) end\n\n@for_petsc function DMLocalToGlobalBeginDefaultShell(petsclib::$UnionPetscLib, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToGlobalBeginDefaultShell, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, l, mode, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToGlobalEndDefaultShell(petsclib::PetscLibType,dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) \nUses the LocalToGlobal `VecScatter` context set by the user to end a local to global scatter\nCollective\n\nInput Parameters:\n- `dm`   - `DMSHELL`\n- `l`    - local vector\n- `mode` - `InsertMode`\n- `g`    - global vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMLocalToGlobalBeginDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalEndDefaultShell\"))\n\"\"\"\nfunction DMLocalToGlobalEndDefaultShell(petsclib::PetscLibType, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec) end\n\n@for_petsc function DMLocalToGlobalEndDefaultShell(petsclib::$UnionPetscLib, dm::PetscDM, l::PetscVec, mode::InsertMode, g::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToGlobalEndDefaultShell, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, l, mode, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToLocalBeginDefaultShell(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nUses the LocalToLocal `VecScatter` context set by the user to begin a local to local scatter\nCollective\n\nInput Parameters:\n- `dm`   - `DMSHELL`\n- `g`    - the original local vector\n- `mode` - `InsertMode`\n\nOutput Parameter:\n- `l` - the local vector with correct ghost values\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMLocalToLocalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToLocalBeginDefaultShell\"))\n\"\"\"\nfunction DMLocalToLocalBeginDefaultShell(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMLocalToLocalBeginDefaultShell(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToLocalBeginDefaultShell, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLocalToLocalEndDefaultShell(petsclib::PetscLibType,dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) \nUses the LocalToLocal `VecScatter` context set by the user to end a local to local scatter\nCollective\n\nInput Parameters:\n- `dm`   - `DMSHELL`\n- `g`    - the original local vector\n- `mode` - `InsertMode`\n\nOutput Parameter:\n- `l` - the local vector with correct ghost values\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMLocalToLocalBeginDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToLocalEndDefaultShell\"))\n\"\"\"\nfunction DMLocalToLocalEndDefaultShell(petsclib::PetscLibType, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec) end\n\n@for_petsc function DMLocalToLocalEndDefaultShell(petsclib::$UnionPetscLib, dm::PetscDM, g::PetscVec, mode::InsertMode, l::PetscVec )\n\n    @chk ccall(\n               (:DMLocalToLocalEndDefaultShell, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, InsertMode, CVec),\n               dm, g, mode, l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetDestroyContext(petsclib::PetscLibType,dm::PetscDM, destroyctx::external) \nset a function that destroys the context provided with `DMShellSetContext()`\n\nCollective\n\nInput Parameters:\n- `dm`         - the `DM` to attach the `destroyctx()` function to\n- `destroyctx` - the function that destroys the context\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetDestroyContext\"))\n\"\"\"\nfunction DMShellSetDestroyContext(petsclib::PetscLibType, dm::PetscDM, destroyctx::external) end\n\n@for_petsc function DMShellSetDestroyContext(petsclib::$UnionPetscLib, dm::PetscDM, destroyctx::external )\n\n    @chk ccall(\n               (:DMShellSetDestroyContext, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, destroyctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetContext(petsclib::PetscLibType,dm::PetscDM, ctx::Cvoid) \nset some data to be usable by this `DMSHELL`\n\nCollective\n\nInput Parameters:\n- `dm`  - `DMSHELL`\n- `ctx` - the context\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateMatrix()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetContext\"))\n\"\"\"\nfunction DMShellSetContext(petsclib::PetscLibType, dm::PetscDM, ctx::Cvoid) end\n\n@for_petsc function DMShellSetContext(petsclib::$UnionPetscLib, dm::PetscDM, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMShellSetContext, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cvoid}),\n               dm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellGetContext(petsclib::PetscLibType,dm::PetscDM, ctx::Cvoid) \nReturns the user\n\nCollective\n\nInput Parameter:\n- `dm` - `DMSHELL`\n\nOutput Parameter:\n- `ctx` - the context\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateMatrix()`, `DMShellSetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellGetContext\"))\n\"\"\"\nfunction DMShellGetContext(petsclib::PetscLibType, dm::PetscDM, ctx::Cvoid) end\n\n@for_petsc function DMShellGetContext(petsclib::$UnionPetscLib, dm::PetscDM, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMShellGetContext, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cvoid}),\n               dm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetMatrix(petsclib::PetscLibType,dm::PetscDM, J::PetscMat) \nsets a template matrix associated with the `DMSHELL`\n\nCollective\n\nInput Parameters:\n- `dm` - `DMSHELL`\n- `J`  - template matrix\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateMatrix()`, `DMShellSetCreateMatrix()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetMatrix\"))\n\"\"\"\nfunction DMShellSetMatrix(petsclib::PetscLibType, dm::PetscDM, J::PetscMat) end\n\n@for_petsc function DMShellSetMatrix(petsclib::$UnionPetscLib, dm::PetscDM, J::PetscMat )\n\n    @chk ccall(\n               (:DMShellSetMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, CMat),\n               dm, J,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateMatrix(petsclib::PetscLibType,dm::PetscDM, func::external) \nsets the routine to create a matrix associated with the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMSHELL`\n- `func` - the function to create a matrix\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateMatrix()`, `DMShellSetMatrix()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateMatrix\"))\n\"\"\"\nfunction DMShellSetCreateMatrix(petsclib::PetscLibType, dm::PetscDM, func::external) end\n\n@for_petsc function DMShellSetCreateMatrix(petsclib::$UnionPetscLib, dm::PetscDM, func::external )\n\n    @chk ccall(\n               (:DMShellSetCreateMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetGlobalVector(petsclib::PetscLibType,dm::PetscDM, X::PetscVec) \nsets a template global vector associated with the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm` - `DMSHELL`\n- `X`  - template vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateGlobalVector()`, `DMShellSetMatrix()`, `DMShellSetCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetGlobalVector\"))\n\"\"\"\nfunction DMShellSetGlobalVector(petsclib::PetscLibType, dm::PetscDM, X::PetscVec) end\n\n@for_petsc function DMShellSetGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec )\n\n    @chk ccall(\n               (:DMShellSetGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellGetGlobalVector(petsclib::PetscLibType,dm::PetscDM, X::PetscVec) \nReturns the template global vector associated with the `DMSHELL`, or `NULL` if it was not set\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DMSHELL`\n- `X`  - template vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetGlobalVector()`, `DMShellSetCreateGlobalVector()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMShellGetGlobalVector\"))\n\"\"\"\nfunction DMShellGetGlobalVector(petsclib::PetscLibType, dm::PetscDM, X::PetscVec) end\n\n@for_petsc function DMShellGetGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec )\n\tX_ = Ref(X.ptr)\n\n    @chk ccall(\n               (:DMShellGetGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, X_,\n              )\n\n\tX.ptr = X_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateGlobalVector(petsclib::PetscLibType,dm::PetscDM, func::external) \nsets the routine to create a global vector associated with the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMSHELL`\n- `func` - the creation routine\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetGlobalVector()`, `DMShellSetCreateMatrix()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateGlobalVector\"))\n\"\"\"\nfunction DMShellSetCreateGlobalVector(petsclib::PetscLibType, dm::PetscDM, func::external) end\n\n@for_petsc function DMShellSetCreateGlobalVector(petsclib::$UnionPetscLib, dm::PetscDM, func::external )\n\n    @chk ccall(\n               (:DMShellSetCreateGlobalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetLocalVector(petsclib::PetscLibType,dm::PetscDM, X::PetscVec) \nsets a template local vector associated with the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm` - `DMSHELL`\n- `X`  - template vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateLocalVector()`, `DMShellSetMatrix()`, `DMShellSetCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetLocalVector\"))\n\"\"\"\nfunction DMShellSetLocalVector(petsclib::PetscLibType, dm::PetscDM, X::PetscVec) end\n\n@for_petsc function DMShellSetLocalVector(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec )\n\n    @chk ccall(\n               (:DMShellSetLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateLocalVector(petsclib::PetscLibType,dm::PetscDM, func::external) \nsets the routine to create a local vector associated with the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMSHELL`\n- `func` - the creation routine\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetLocalVector()`, `DMShellSetCreateMatrix()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateLocalVector\"))\n\"\"\"\nfunction DMShellSetCreateLocalVector(petsclib::PetscLibType, dm::PetscDM, func::external) end\n\n@for_petsc function DMShellSetCreateLocalVector(petsclib::$UnionPetscLib, dm::PetscDM, func::external )\n\n    @chk ccall(\n               (:DMShellSetCreateLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetGlobalToLocal(petsclib::PetscLibType,dm::PetscDM, begin_::external, end_::external) \nSets the routines used to perform a global to local scatter\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DMSHELL`\n- `begin_` - the routine that begins the global to local scatter\n- `end_`   - the routine that ends the global to local scatter\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetLocalToGlobal()`, `DMGlobalToLocalBeginDefaultShell()`, `DMGlobalToLocalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetGlobalToLocal\"))\n\"\"\"\nfunction DMShellSetGlobalToLocal(petsclib::PetscLibType, dm::PetscDM, begin_::external, end_::external) end\n\n@for_petsc function DMShellSetGlobalToLocal(petsclib::$UnionPetscLib, dm::PetscDM, begin_::external, end_::external )\n\n    @chk ccall(\n               (:DMShellSetGlobalToLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external),\n               dm, begin_, end_,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n               PetscErrorCode,\n               (CDM, external, external),\n               dm, begin_, end_,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\tDMShellSetLocalToGlobal(petsclib::PetscLibType,dm::PetscDM, begin_::external, end_::external) \nSets the routines used to perform a local to global scatter\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DMSHELL`\n- `begin` - the routine that begins the local to global scatter\n- `end`   - the routine that ends the local to global scatter\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetGlobalToLocal()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetLocalToGlobal\"))\n\"\"\"\nfunction DMShellSetLocalToGlobal(petsclib::PetscLibType, dm::PetscDM, begin_::external, end_::external) end\n\n@for_petsc function DMShellSetLocalToGlobal(petsclib::$UnionPetscLib, dm::PetscDM, begin_::external, end_::external )\n\n    @chk ccall(\n               (:DMShellSetLocalToGlobal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external),\n               dm, begin_, end_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetLocalToLocal(petsclib::PetscLibType,dm::PetscDM, begin_::external, end_::external) \nSets the routines used to perform a local to local scatter\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DMSHELL`\n- `begin` - the routine that begins the local to local scatter\n- `end`   - the routine that ends the local to local scatter\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetGlobalToLocal()`, `DMLocalToLocalBeginDefaultShell()`, `DMLocalToLocalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetLocalToLocal\"))\n\"\"\"\nfunction DMShellSetLocalToLocal(petsclib::PetscLibType, dm::PetscDM, begin_::external, end_::external) end\n\n@for_petsc function DMShellSetLocalToLocal(petsclib::$UnionPetscLib, dm::PetscDM, begin_::external, end_::external )\n\n    @chk ccall(\n               (:DMShellSetLocalToLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external),\n               dm, begin_, end_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetGlobalToLocalVecScatter(petsclib::PetscLibType,dm::PetscDM, gtol::VecScatter) \nSets a `VecScatter` context for global to local communication\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMSHELL`\n- `gtol` - the global to local `VecScatter` context\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetGlobalToLocal()`, `DMGlobalToLocalBeginDefaultShell()`, `DMGlobalToLocalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetGlobalToLocalVecScatter\"))\n\"\"\"\nfunction DMShellSetGlobalToLocalVecScatter(petsclib::PetscLibType, dm::PetscDM, gtol::VecScatter) end\n\n@for_petsc function DMShellSetGlobalToLocalVecScatter(petsclib::$UnionPetscLib, dm::PetscDM, gtol::VecScatter )\n\n    @chk ccall(\n               (:DMShellSetGlobalToLocalVecScatter, $petsc_library),\n               PetscErrorCode,\n               (CDM, VecScatter),\n               dm, gtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetLocalToGlobalVecScatter(petsclib::PetscLibType,dm::PetscDM, ltog::VecScatter) \nSets a` VecScatter` context for local to global communication\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMSHELL`\n- `ltog` - the local to global `VecScatter` context\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetLocalToGlobal()`, `DMLocalToGlobalBeginDefaultShell()`, `DMLocalToGlobalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetLocalToGlobalVecScatter\"))\n\"\"\"\nfunction DMShellSetLocalToGlobalVecScatter(petsclib::PetscLibType, dm::PetscDM, ltog::VecScatter) end\n\n@for_petsc function DMShellSetLocalToGlobalVecScatter(petsclib::$UnionPetscLib, dm::PetscDM, ltog::VecScatter )\n\n    @chk ccall(\n               (:DMShellSetLocalToGlobalVecScatter, $petsc_library),\n               PetscErrorCode,\n               (CDM, VecScatter),\n               dm, ltog,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetLocalToLocalVecScatter(petsclib::PetscLibType,dm::PetscDM, ltol::VecScatter) \nSets a `VecScatter` context for local to local communication\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMSHELL`\n- `ltol` - the local to local `VecScatter` context\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetLocalToLocal()`, `DMLocalToLocalBeginDefaultShell()`, `DMLocalToLocalEndDefaultShell()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetLocalToLocalVecScatter\"))\n\"\"\"\nfunction DMShellSetLocalToLocalVecScatter(petsclib::PetscLibType, dm::PetscDM, ltol::VecScatter) end\n\n@for_petsc function DMShellSetLocalToLocalVecScatter(petsclib::$UnionPetscLib, dm::PetscDM, ltol::VecScatter )\n\n    @chk ccall(\n               (:DMShellSetLocalToLocalVecScatter, $petsc_library),\n               PetscErrorCode,\n               (CDM, VecScatter),\n               dm, ltol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCoarsen(petsclib::PetscLibType,dm::PetscDM, coarsen::external) \nSet the routine used to coarsen the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`      - the `DMSHELL`\n- `coarsen` - the routine that coarsens the `DM`\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetRefine()`, `DMCoarsen()`, `DMShellGetCoarsen()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCoarsen\"))\n\"\"\"\nfunction DMShellSetCoarsen(petsclib::PetscLibType, dm::PetscDM, coarsen::external) end\n\n@for_petsc function DMShellSetCoarsen(petsclib::$UnionPetscLib, dm::PetscDM, coarsen::external )\n\n    @chk ccall(\n               (:DMShellSetCoarsen, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, coarsen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetRefine(petsclib::PetscLibType,dm::PetscDM, refine::external) \nSet the routine used to refine the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DMSHELL`\n- `refine` - the routine that refines the `DM`\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetCoarsen()`, `DMRefine()`, `DMShellGetRefine()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetRefine\"))\n\"\"\"\nfunction DMShellSetRefine(petsclib::PetscLibType, dm::PetscDM, refine::external) end\n\n@for_petsc function DMShellSetRefine(petsclib::$UnionPetscLib, dm::PetscDM, refine::external )\n\n    @chk ccall(\n               (:DMShellSetRefine, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, refine,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateInterpolation(petsclib::PetscLibType,dm::PetscDM, interp::external) \nSet the routine used to create the interpolation operator\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DMSHELL`\n- `interp` - the routine to create the interpolation\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetCreateInjection()`, `DMCreateInterpolation()`, `DMShellGetCreateInterpolation()`, `DMShellSetCreateRestriction()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateInterpolation\"))\n\"\"\"\nfunction DMShellSetCreateInterpolation(petsclib::PetscLibType, dm::PetscDM, interp::external) end\n\n@for_petsc function DMShellSetCreateInterpolation(petsclib::$UnionPetscLib, dm::PetscDM, interp::external )\n\n    @chk ccall(\n               (:DMShellSetCreateInterpolation, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, interp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateRestriction(petsclib::PetscLibType,dm::PetscDM, restriction::external) \nSet the routine used to create the restriction operator\n\nLogically Collective\n\nInput Parameters:\n- `dm`          - the `DMSHELL`\n- `restriction` - the routine to create the restriction\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetCreateInjection()`, `DMCreateInterpolation()`, `DMShellGetCreateRestriction()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateRestriction\"))\n\"\"\"\nfunction DMShellSetCreateRestriction(petsclib::PetscLibType, dm::PetscDM, restriction::external) end\n\n@for_petsc function DMShellSetCreateRestriction(petsclib::$UnionPetscLib, dm::PetscDM, restriction::external )\n\n    @chk ccall(\n               (:DMShellSetCreateRestriction, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, restriction,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateInjection(petsclib::PetscLibType,dm::PetscDM, inject::external) \nSet the routine used to create the injection operator\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DMSHELL`\n- `inject` - the routine to create the injection\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMShellSetCreateInterpolation()`, `DMCreateInjection()`, `DMShellGetCreateInjection()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateInjection\"))\n\"\"\"\nfunction DMShellSetCreateInjection(petsclib::PetscLibType, dm::PetscDM, inject::external) end\n\n@for_petsc function DMShellSetCreateInjection(petsclib::$UnionPetscLib, dm::PetscDM, inject::external )\n\n    @chk ccall(\n               (:DMShellSetCreateInjection, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, inject,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateFieldDecomposition(petsclib::PetscLibType,dm::PetscDM, decomp::external) \nSet the routine used to create a decomposition of fields for the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DMSHELL`\n- `decomp` - the routine to create the decomposition\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateFieldDecomposition()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateFieldDecomposition\"))\n\"\"\"\nfunction DMShellSetCreateFieldDecomposition(petsclib::PetscLibType, dm::PetscDM, decomp::external) end\n\n@for_petsc function DMShellSetCreateFieldDecomposition(petsclib::$UnionPetscLib, dm::PetscDM, decomp::external )\n\n    @chk ccall(\n               (:DMShellSetCreateFieldDecomposition, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, decomp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateDomainDecomposition(petsclib::PetscLibType,dm::PetscDM, decomp::external) \nSet the routine used to create a domain decomposition for the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DMSHELL`\n- `decomp` - the routine to create the decomposition\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateDomainDecomposition()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateDomainDecomposition\"))\n\"\"\"\nfunction DMShellSetCreateDomainDecomposition(petsclib::PetscLibType, dm::PetscDM, decomp::external) end\n\n@for_petsc function DMShellSetCreateDomainDecomposition(petsclib::$UnionPetscLib, dm::PetscDM, decomp::external )\n\n    @chk ccall(\n               (:DMShellSetCreateDomainDecomposition, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, decomp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateDomainDecompositionScatters(petsclib::PetscLibType,dm::PetscDM, scatter::external) \nSet the routine used to create the scatter contexts for domain decomposition with a `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`      - the `DMSHELL`\n- `scatter` - the routine to create the scatters\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateDomainDecompositionScatters()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateDomainDecompositionScatters\"))\n\"\"\"\nfunction DMShellSetCreateDomainDecompositionScatters(petsclib::PetscLibType, dm::PetscDM, scatter::external) end\n\n@for_petsc function DMShellSetCreateDomainDecompositionScatters(petsclib::$UnionPetscLib, dm::PetscDM, scatter::external )\n\n    @chk ccall(\n               (:DMShellSetCreateDomainDecompositionScatters, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, scatter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMShellSetCreateSubDM(petsclib::PetscLibType,dm::PetscDM, subdm::external) \nSet the routine used to create a sub `DM` from the `DMSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DMSHELL`\n- `subdm` - the routine to create the decomposition\n\nLevel: advanced\n\n-seealso: `DM`, `DMSHELL`, `DMCreateSubDM()`, `DMShellGetCreateSubDM()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellSetCreateSubDM\"))\n\"\"\"\nfunction DMShellSetCreateSubDM(petsclib::PetscLibType, dm::PetscDM, subdm::external) end\n\n@for_petsc function DMShellSetCreateSubDM(petsclib::$UnionPetscLib, dm::PetscDM, subdm::external )\n\n    @chk ccall(\n               (:DMShellSetCreateSubDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, subdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMShellCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `DMSHELL` object, used to manage user\n\nCollective\n\nInput Parameter:\n- `comm` - the processors that will share the global vector\n\nOutput Parameter:\n- `dm` - the `DMSHELL`\n\nLevel: advanced\n\n-seealso: `DMDestroy()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMShellSetContext()`, `DMShellGetContext()`\n\n# External Links\n$(_doc_external(\"DM/DMShellCreate\"))\n\"\"\"\nfunction DMShellCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMShellCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMShellCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMNetworkGetPlex(petsclib::PetscLibType,dm::PetscDM, plexdm::PetscDM) \nGets the `DMPLEX` associated with this `DMNETWORK`\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameter:\n- `plexdm` - the `DMPLEX` object\n\nLevel: advanced\n\n-seealso: `DM`, `DMNETWORK`, `DMPLEX`, `DMNetworkCreate()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetPlex\"))\n\"\"\"\nfunction DMNetworkGetPlex(petsclib::PetscLibType, dm::PetscDM, plexdm::PetscDM) end\n\n@for_petsc function DMNetworkGetPlex(petsclib::$UnionPetscLib, dm::PetscDM, plexdm::PetscDM )\n\tplexdm_ = Ref(plexdm.ptr)\n\n    @chk ccall(\n               (:DMNetworkGetPlex, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, plexdm_,\n              )\n\n\tplexdm.ptr = plexdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tnsubnet::PetscInt,Nsubnet::PetscInt = DMNetworkGetNumSubNetworks(petsclib::PetscLibType,dm::PetscDM) \nGets the number of subnetworks\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameters:\n- `nsubnet` - local number of subnetworks, pass `NULL` if not needed\n- `Nsubnet` - global number of subnetworks, pass `NULL` if not needed\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkSetNumSubNetworks()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetNumSubNetworks\"))\n\"\"\"\nfunction DMNetworkGetNumSubNetworks(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkGetNumSubNetworks(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnsubnet_ = Ref{$PetscInt}()\n\tNsubnet_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetNumSubNetworks, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, nsubnet_, Nsubnet_,\n              )\n\n\tnsubnet = nsubnet_[]\n\tNsubnet = Nsubnet_[]\n\n\treturn nsubnet,Nsubnet\nend \n\n\"\"\"\n\tDMNetworkSetNumSubNetworks(petsclib::PetscLibType,dm::PetscDM, nsubnet::PetscInt, Nsubnet::PetscInt) \nSets the number of subnetworks\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DMNETWORK` object\n- `nsubnet` - local number of subnetworks\n- `Nsubnet` - global number of subnetworks\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkGetNumSubNetworks()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkSetNumSubNetworks\"))\n\"\"\"\nfunction DMNetworkSetNumSubNetworks(petsclib::PetscLibType, dm::PetscDM, nsubnet::PetscInt, Nsubnet::PetscInt) end\n\n@for_petsc function DMNetworkSetNumSubNetworks(petsclib::$UnionPetscLib, dm::PetscDM, nsubnet::$PetscInt, Nsubnet::$PetscInt )\n\n    @chk ccall(\n               (:DMNetworkSetNumSubNetworks, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               dm, nsubnet, Nsubnet,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnetnum::PetscInt = DMNetworkAddSubnetwork(petsclib::PetscLibType,dm::PetscDM, name::String, ne::PetscInt, edgelist::Vector{PetscInt}) \nAdd a subnetwork\n\nCollective\n\nInput Parameters:\n- `dm`       - the `DMNETWORK`  object\n- `name`     - name of the subnetwork\n- `ne`       - number of local edges of this subnetwork\n- `edgelist` - list of edges for this subnetwork, this is a one dimensional array with pairs of entries being the two vertices (in global numbering\nof the vertices) of each edge: [first vertex of first edge, second vertex of first edge, first vertex of second edge, second vertex of second edge, etc.]\n\nOutput Parameter:\n- `netnum` - global index of the subnetwork\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkSetNumSubnetworks()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkAddSubnetwork\"))\n\"\"\"\nfunction DMNetworkAddSubnetwork(petsclib::PetscLibType, dm::PetscDM, name::String, ne::PetscInt, edgelist::Vector{PetscInt}) end\n\n@for_petsc function DMNetworkAddSubnetwork(petsclib::$UnionPetscLib, dm::PetscDM, name::String, ne::$PetscInt, edgelist::Vector{$PetscInt} )\n\tnetnum_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkAddSubnetwork, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, name, ne, edgelist, netnum_,\n              )\n\n\tnetnum = netnum_[]\n\n\treturn netnum\nend \n\n\"\"\"\n\tgidx::PetscInt,n::PetscInt,sv::Vector{PetscInt} = DMNetworkSharedVertexGetInfo(petsclib::PetscLibType,dm::PetscDM, v::PetscInt) \nGet info of a shared vertex struct, see petsc/private/dmnetworkimpl.h\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DM` object\n- `v`  - vertex point\n\nOutput Parameters:\n- `gidx` - global number of this shared vertex in the internal dmplex, pass `NULL` if not needed\n- `n`    - number of subnetworks that share this vertex, pass `NULL` if not needed\n- `sv`   - array of size `n`: sv[2*i,2*i+1]=(net[i], idx[i]), i=0,...,n-1, pass `NULL` if not needed\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetSharedVertices()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkSharedVertexGetInfo\"))\n\"\"\"\nfunction DMNetworkSharedVertexGetInfo(petsclib::PetscLibType, dm::PetscDM, v::PetscInt) end\n\n@for_petsc function DMNetworkSharedVertexGetInfo(petsclib::$UnionPetscLib, dm::PetscDM, v::$PetscInt )\n\tgidx_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tsv_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMNetworkSharedVertexGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, v, gidx_, n_, sv_,\n              )\n\n\tgidx = gidx_[]\n\tn = n_[]\n\tsv = unsafe_wrap(Array, sv_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn gidx,n,sv\nend \n\n\"\"\"\n\tDMNetworkLayoutSetUp(petsclib::PetscLibType,dm::PetscDM) \nSets up the bare layout (graph) for the network\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkSetNumSubNetworks()`, `DMNetworkAddSubnetwork()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkLayoutSetUp\"))\n\"\"\"\nfunction DMNetworkLayoutSetUp(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkLayoutSetUp(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMNetworkLayoutSetUp, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnv::PetscInt,ne::PetscInt,vtx::Vector{PetscInt},edge::Vector{PetscInt} = DMNetworkGetSubnetwork(petsclib::PetscLibType,dm::PetscDM, netnum::PetscInt) \nReturns the information about a requested subnetwork\n\nNot Collective\n\nInput Parameters:\n- `dm`     - the `DMNETWORK` object\n- `netnum` - the global index of the subnetwork\n\nOutput Parameters:\n- `nv`   - number of vertices (local)\n- `ne`   - number of edges (local)\n- `vtx`  - local vertices of the subnetwork\n- `edge` - local edges of the subnetwork\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkAddSubnetwork()`, `DMNetworkLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetSubnetwork\"))\n\"\"\"\nfunction DMNetworkGetSubnetwork(petsclib::PetscLibType, dm::PetscDM, netnum::PetscInt) end\n\n@for_petsc function DMNetworkGetSubnetwork(petsclib::$UnionPetscLib, dm::PetscDM, netnum::$PetscInt )\n\tnv_ = Ref{$PetscInt}()\n\tne_ = Ref{$PetscInt}()\n\tvtx_ = Ref{Ptr{$PetscInt}}()\n\tedge_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMNetworkGetSubnetwork, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               dm, netnum, nv_, ne_, vtx_, edge_,\n              )\n\n\tnv = nv_[]\n\tne = ne_[]\n\tvtx = unsafe_wrap(Array, vtx_[], VecGetLocalSize(petsclib, x); own = false)\n\tedge = unsafe_wrap(Array, edge_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nv,ne,vtx,edge\nend \n\n\"\"\"\n\tDMNetworkAddSharedVertices(petsclib::PetscLibType,dm::PetscDM, anetnum::PetscInt, bnetnum::PetscInt, nsvtx::PetscInt, asvtx::Vector{PetscInt}, bsvtx::Vector{PetscInt}) \nAdd shared vertices that connect two given subnetworks\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DMNETWORK` object\n- `anetnum` - first subnetwork global numbering returned by `DMNetworkAddSubnetwork()`\n- `bnetnum` - second subnetwork global numbering returned by `DMNetworkAddSubnetwork()`\n- `nsvtx`   - number of vertices that are shared by the two subnetworks\n- `asvtx`   - vertex index in the first subnetwork\n- `bsvtx`   - vertex index in the second subnetwork\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkAddSubnetwork()`, `DMNetworkGetSharedVertices()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkAddSharedVertices\"))\n\"\"\"\nfunction DMNetworkAddSharedVertices(petsclib::PetscLibType, dm::PetscDM, anetnum::PetscInt, bnetnum::PetscInt, nsvtx::PetscInt, asvtx::Vector{PetscInt}, bsvtx::Vector{PetscInt}) end\n\n@for_petsc function DMNetworkAddSharedVertices(petsclib::$UnionPetscLib, dm::PetscDM, anetnum::$PetscInt, bnetnum::$PetscInt, nsvtx::$PetscInt, asvtx::Vector{$PetscInt}, bsvtx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMNetworkAddSharedVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, anetnum, bnetnum, nsvtx, asvtx, bsvtx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnsv::PetscInt,svtx::Vector{PetscInt} = DMNetworkGetSharedVertices(petsclib::PetscLibType,dm::PetscDM) \nReturns the info for the shared vertices\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameters:\n- `nsv`  - number of local shared vertices, pass `NULL` if not needed\n- `svtx` - local shared vertices, pass `NULL` if not needed\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetSubnetwork()`, `DMNetworkLayoutSetUp()`, `DMNetworkAddSharedVertices()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetSharedVertices\"))\n\"\"\"\nfunction DMNetworkGetSharedVertices(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkGetSharedVertices(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnsv_ = Ref{$PetscInt}()\n\tsvtx_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMNetworkGetSharedVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, nsv_, svtx_,\n              )\n\n\tnsv = nsv_[]\n\tsvtx = unsafe_wrap(Array, svtx_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nsv,svtx\nend \n\n\"\"\"\n\tkey::PetscInt = DMNetworkRegisterComponent(petsclib::PetscLibType,dm::PetscDM, name::String, size::Csize_t) \nRegisters the network component\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMNETWORK` object\n- `name` - the component name\n- `size` - the storage size in bytes for this component data\n\nOutput Parameter:\n- `key` - an integer key that defines the component\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkRegisterComponent\"))\n\"\"\"\nfunction DMNetworkRegisterComponent(petsclib::PetscLibType, dm::PetscDM, name::String, size::Csize_t) end\n\n@for_petsc function DMNetworkRegisterComponent(petsclib::$UnionPetscLib, dm::PetscDM, name::String, size::Csize_t )\n\tkey_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkRegisterComponent, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Csize_t, Ptr{$PetscInt}),\n               dm, name, size, key_,\n              )\n\n\tkey = key_[]\n\n\treturn key\nend \n\n\"\"\"\n\tnVertices::PetscInt,NVertices::PetscInt = DMNetworkGetNumVertices(petsclib::PetscLibType,dm::PetscDM) \nGet the local and global number of vertices for the entire network.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameters:\n- `nVertices` - the local number of vertices, pass `NULL` if not needed\n- `NVertices` - the global number of vertices, pass `NULL` if not needed\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetNumEdges()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetNumVertices\"))\n\"\"\"\nfunction DMNetworkGetNumVertices(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkGetNumVertices(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnVertices_ = Ref{$PetscInt}()\n\tNVertices_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetNumVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, nVertices_, NVertices_,\n              )\n\n\tnVertices = nVertices_[]\n\tNVertices = NVertices_[]\n\n\treturn nVertices,NVertices\nend \n\n\"\"\"\n\tnEdges::PetscInt,NEdges::PetscInt = DMNetworkGetNumEdges(petsclib::PetscLibType,dm::PetscDM) \nGet the local and global number of edges for the entire network.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameters:\n- `nEdges` - the local number of edges, pass `NULL` if not needed\n- `NEdges` - the global number of edges, pass `NULL` if not needed\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetNumVertices()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetNumEdges\"))\n\"\"\"\nfunction DMNetworkGetNumEdges(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkGetNumEdges(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnEdges_ = Ref{$PetscInt}()\n\tNEdges_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetNumEdges, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, nEdges_, NEdges_,\n              )\n\n\tnEdges = nEdges_[]\n\tNEdges = NEdges_[]\n\n\treturn nEdges,NEdges\nend \n\n\"\"\"\n\tvStart::PetscInt,vEnd::PetscInt = DMNetworkGetVertexRange(petsclib::PetscLibType,dm::PetscDM) \nGet the bounds [start, end) for the local vertices\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameters:\n- `vStart` - the first vertex point, pass `NULL` if not needed\n- `vEnd`   - one beyond the last vertex point, pass `NULL` if not needed\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetEdgeRange()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetVertexRange\"))\n\"\"\"\nfunction DMNetworkGetVertexRange(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkGetVertexRange(petsclib::$UnionPetscLib, dm::PetscDM )\n\tvStart_ = Ref{$PetscInt}()\n\tvEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetVertexRange, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, vStart_, vEnd_,\n              )\n\n\tvStart = vStart_[]\n\tvEnd = vEnd_[]\n\n\treturn vStart,vEnd\nend \n\n\"\"\"\n\teStart::PetscInt,eEnd::PetscInt = DMNetworkGetEdgeRange(petsclib::PetscLibType,dm::PetscDM) \nGet the bounds [start, end) for the local edges\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameters:\n- `eStart` - The first edge point, pass `NULL` if not needed\n- `eEnd`   - One beyond the last edge point, pass `NULL` if not needed\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetVertexRange()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetEdgeRange\"))\n\"\"\"\nfunction DMNetworkGetEdgeRange(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkGetEdgeRange(petsclib::$UnionPetscLib, dm::PetscDM )\n\teStart_ = Ref{$PetscInt}()\n\teEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetEdgeRange, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, eStart_, eEnd_,\n              )\n\n\teStart = eStart_[]\n\teEnd = eEnd_[]\n\n\treturn eStart,eEnd\nend \n\n\"\"\"\n\tindex::PetscInt = DMNetworkGetGlobalEdgeIndex(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nGet the global numbering for the edge on the network\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DMNETWORK` object\n- `p`  - edge point\n\nOutput Parameter:\n- `index` - the global numbering for the edge\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetGlobalVertexIndex()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetGlobalEdgeIndex\"))\n\"\"\"\nfunction DMNetworkGetGlobalEdgeIndex(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMNetworkGetGlobalEdgeIndex(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tindex_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetGlobalEdgeIndex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, index_,\n              )\n\n\tindex = index_[]\n\n\treturn index\nend \n\n\"\"\"\n\tindex::PetscInt = DMNetworkGetGlobalVertexIndex(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nGet the global numbering for the vertex on the network\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DMNETWORK` object\n- `p`  - vertex point\n\nOutput Parameter:\n- `index` - the global numbering for the vertex\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetGlobalEdgeIndex()`, `DMNetworkGetLocalVertexIndex()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetGlobalVertexIndex\"))\n\"\"\"\nfunction DMNetworkGetGlobalVertexIndex(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMNetworkGetGlobalVertexIndex(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tindex_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetGlobalVertexIndex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, index_,\n              )\n\n\tindex = index_[]\n\n\treturn index\nend \n\n\"\"\"\n\tnumcomponents::PetscInt = DMNetworkGetNumComponents(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nGet the number of components at a vertex/edge\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DMNETWORK` object\n- `p`  - vertex/edge point\n\nOutput Parameter:\n- `numcomponents` - Number of components at the vertex/edge\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkRegisterComponent()`, `DMNetworkAddComponent()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetNumComponents\"))\n\"\"\"\nfunction DMNetworkGetNumComponents(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMNetworkGetNumComponents(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tnumcomponents_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, numcomponents_,\n              )\n\n\tnumcomponents = numcomponents_[]\n\n\treturn numcomponents\nend \n\n\"\"\"\n\toffset::PetscInt = DMNetworkGetLocalVecOffset(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, compnum::PetscInt) \nGet the offset for accessing the variables associated with a component at the given vertex/edge from the local vector\n\nNot Collective\n\nInput Parameters:\n- `dm`      - the `DMNETWORK` object\n- `p`       - the edge or vertex point\n- `compnum` - component number; use ALL_COMPONENTS if no specific component is requested\n\nOutput Parameter:\n- `offset` - the local offset\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMGetLocalVector()`, `DMNetworkGetComponent()`, `DMNetworkGetGlobalVecOffset()`, `DMCreateGlobalVector()`, `VecGetArray()`, `VecSetValuesLocal()`, `MatSetValuesLocal()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetLocalVecOffset\"))\n\"\"\"\nfunction DMNetworkGetLocalVecOffset(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, compnum::PetscInt) end\n\n@for_petsc function DMNetworkGetLocalVecOffset(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, compnum::$PetscInt )\n\toffset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetLocalVecOffset, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               dm, p, compnum, offset_,\n              )\n\n\toffset = offset_[]\n\n\treturn offset\nend \n\n\"\"\"\n\toffsetg::PetscInt = DMNetworkGetGlobalVecOffset(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, compnum::PetscInt) \nGet the global offset for accessing the variables associated with a component for the given vertex/edge from the global vector\n\nNot Collective\n\nInput Parameters:\n- `dm`      - the `DMNETWORK` object\n- `p`       - the edge or vertex point\n- `compnum` - component number; use ALL_COMPONENTS if no specific component is requested\n\nOutput Parameter:\n- `offsetg` - the global offset\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetLocalVecOffset()`, `DMGetGlobalVector()`, `DMNetworkGetComponent()`, `DMCreateGlobalVector()`, `VecGetArray()`, `VecSetValues()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetGlobalVecOffset\"))\n\"\"\"\nfunction DMNetworkGetGlobalVecOffset(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, compnum::PetscInt) end\n\n@for_petsc function DMNetworkGetGlobalVecOffset(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, compnum::$PetscInt )\n\toffsetg_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetGlobalVecOffset, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               dm, p, compnum, offsetg_,\n              )\n\n\toffsetg = offsetg_[]\n\n\treturn offsetg\nend \n\n\"\"\"\n\toffset::PetscInt = DMNetworkGetEdgeOffset(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nGet the offset for accessing the variables associated with the given edge from the local subvector\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DMNETWORK` object\n- `p`  - the edge point\n\nOutput Parameter:\n- `offset` - the offset\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetLocalVecOffset()`, `DMGetLocalVector()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetEdgeOffset\"))\n\"\"\"\nfunction DMNetworkGetEdgeOffset(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMNetworkGetEdgeOffset(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\toffset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetEdgeOffset, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, offset_,\n              )\n\n\toffset = offset_[]\n\n\treturn offset\nend \n\n\"\"\"\n\toffset::PetscInt = DMNetworkGetVertexOffset(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nGet the offset for accessing the variables associated with the given vertex from the local subvector\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DMNETWORK` object\n- `p`  - the vertex point\n\nOutput Parameter:\n- `offset` - the offset\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetEdgeOffset()`, `DMGetLocalVector()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetVertexOffset\"))\n\"\"\"\nfunction DMNetworkGetVertexOffset(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMNetworkGetVertexOffset(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\toffset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetVertexOffset, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, offset_,\n              )\n\n\toffset = offset_[]\n\n\treturn offset\nend \n\n\"\"\"\n\tDMNetworkAddComponent(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, componentkey::PetscInt, compvalue::Cvoid, nvar::PetscInt) \nAdds a network component and number of variables at the given point (vertex/edge)\n\nCollective\n\nInput Parameters:\n- `dm`           - the DMNetwork\n- `p`            - the vertex/edge point. These points are local indices provided by `DMNetworkGetSubnetwork()`\n- `componentkey` - component key returned while registering the component with `DMNetworkRegisterComponent()`\n- `compvalue`    - pointer to the data structure for the component, or `NULL` if the component does not require data, this data is not copied so you cannot\nfree this space until after `DMSetUp()` is called.\n- `nvar`         - number of variables for the component at the vertex/edge point, zero if the component does not introduce any degrees of freedom at the point\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetComponent()`, `DMNetworkGetSubnetwork()`, `DMNetworkIsGhostVertex()`, `DMNetworkLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkAddComponent\"))\n\"\"\"\nfunction DMNetworkAddComponent(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, componentkey::PetscInt, compvalue::Cvoid, nvar::PetscInt) end\n\n@for_petsc function DMNetworkAddComponent(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, componentkey::$PetscInt, compvalue::Cvoid, nvar::$PetscInt )\n\n    @chk ccall(\n               (:DMNetworkAddComponent, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{Cvoid}, $PetscInt),\n               dm, p, componentkey, compvalue, nvar,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcompkey::PetscInt,nvar::PetscInt = DMNetworkGetComponent(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, compnum::PetscInt, component::PeCtx) \nGets the component key, the component data, and the number of variables at a given network point\n\nNot Collective\n\nInput Parameters:\n- `dm`      - the `DMNETWORK` object\n- `p`       - vertex/edge point\n- `compnum` - component number; use ALL_COMPONENTS if sum up all the components\n\nOutput Parameters:\n- `compkey`   - the key obtained when registering the component (use `NULL` if not required)\n- `component` - the component data (use `NULL` if not required)\n- `nvar`      - number of variables (use `NULL` if not required)\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkAddComponent()`, `DMNetworkGetNumComponents()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetComponent\"))\n\"\"\"\nfunction DMNetworkGetComponent(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, compnum::PetscInt, component::PeCtx) end\n\n@for_petsc function DMNetworkGetComponent(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, compnum::$PetscInt, component::PeCtx )\n\tcompkey_ = Ref{$PetscInt}()\n\tnvar_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetComponent, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscInt}, PeCtx, Ptr{$PetscInt}),\n               dm, p, compnum, compkey_, component, nvar_,\n              )\n\n\tcompkey = compkey_[]\n\tnvar = nvar_[]\n\n\treturn compkey,nvar\nend \n\n\"\"\"\n\tDMNetworkAssembleGraphStructures(petsclib::PetscLibType,dm::PetscDM) \nAssembles vertex and edge data structures. Must be called after `DMNetworkDistribute()`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` Object\n\nLevel: intermediate\n\n-seealso: `DMNetworkDistribute()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkAssembleGraphStructures\"))\n\"\"\"\nfunction DMNetworkAssembleGraphStructures(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkAssembleGraphStructures(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMNetworkAssembleGraphStructures, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMNetworkDistribute(petsclib::PetscLibType,dm::PetscDM, overlap::PetscInt) \nDistributes the network and moves associated component data\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DMNETWORK` object\n- `overlap` - the overlap of partitions, 0 is the default\n\nOptions Database Keys:\n- `-dmnetwork_view`              - Calls `DMView()` at the conclusion of `DMSetUp()`\n- `-dmnetwork_view_distributed`  - Calls `DMView()` at the conclusion of `DMNetworkDistribute()`\n- `-dmnetwork_view_tmpdir`       - Sets the temporary directory to use when viewing with the `draw` option\n- `-dmnetwork_view_all_ranks`    - Displays all of the subnetworks for each MPI rank\n- `-dmnetwork_view_rank_range`   - Displays the subnetworks for the ranks in a comma-separated list\n- `-dmnetwork_view_no_vertices`  - Disables displaying the vertices in the network visualization\n- `-dmnetwork_view_no_numbering` - Disables displaying the numbering of edges and vertices in the network visualization\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkDistribute\"))\n\"\"\"\nfunction DMNetworkDistribute(petsclib::PetscLibType, dm::PetscDM, overlap::PetscInt) end\n\n@for_petsc function DMNetworkDistribute(petsclib::$UnionPetscLib, dm::PetscDM, overlap::$PetscInt )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMNetworkDistribute, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CDM}, $PetscInt),\n               dm_, overlap,\n              )\n\n\tdm.ptr = dm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tnedges::PetscInt,edges::Vector{PetscInt} = DMNetworkGetSupportingEdges(petsclib::PetscLibType,dm::PetscDM, vertex::PetscInt) \nReturn the supporting edges for this vertex point\n\nNot Collective\n\nInput Parameters:\n- `dm`     - the `DMNETWORK` object\n- `vertex` - the vertex point\n\nOutput Parameters:\n- `nedges` - number of edges connected to this vertex point\n- `edges`  - list of edge points, pass `NULL` if not needed\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkGetConnectedVertices()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetSupportingEdges\"))\n\"\"\"\nfunction DMNetworkGetSupportingEdges(petsclib::PetscLibType, dm::PetscDM, vertex::PetscInt) end\n\n@for_petsc function DMNetworkGetSupportingEdges(petsclib::$UnionPetscLib, dm::PetscDM, vertex::$PetscInt )\n\tnedges_ = Ref{$PetscInt}()\n\tedges_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMNetworkGetSupportingEdges, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, vertex, nedges_, edges_,\n              )\n\n\tnedges = nedges_[]\n\tedges = unsafe_wrap(Array, edges_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nedges,edges\nend \n\n\"\"\"\n\tvertices::Vector{PetscInt} = DMNetworkGetConnectedVertices(petsclib::PetscLibType,dm::PetscDM, edge::PetscInt) \nReturn the connected vertices for this edge point\n\nNot Collective\n\nInput Parameters:\n- `dm`   - the `DMNETWORK` object\n- `edge` - the edge point\n\nOutput Parameter:\n- `vertices` - vertices connected to this edge\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkGetSupportingEdges()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetConnectedVertices\"))\n\"\"\"\nfunction DMNetworkGetConnectedVertices(petsclib::PetscLibType, dm::PetscDM, edge::PetscInt) end\n\n@for_petsc function DMNetworkGetConnectedVertices(petsclib::$UnionPetscLib, dm::PetscDM, edge::$PetscInt )\n\tvertices_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMNetworkGetConnectedVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               dm, edge, vertices_,\n              )\n\n\tvertices = unsafe_wrap(Array, vertices_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn vertices\nend \n\n\"\"\"\n\tflag::PetscBool = DMNetworkIsSharedVertex(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturns `PETSC_TRUE` if the vertex is shared by subnetworks\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DMNETWORK` object\n- `p`  - the vertex point\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` if the vertex is shared by subnetworks\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkAddSharedVertices()`, `DMNetworkIsGhostVertex()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkIsSharedVertex\"))\n\"\"\"\nfunction DMNetworkIsSharedVertex(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMNetworkIsSharedVertex(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMNetworkIsSharedVertex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscBool}),\n               dm, p, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tisghost::PetscBool = DMNetworkIsGhostVertex(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturns `PETSC_TRUE` if the vertex is a ghost vertex\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DMNETWORK` object\n- `p`  - the vertex point\n\nOutput Parameter:\n- `isghost` - `PETSC_TRUE` if the vertex is a ghost point\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetConnectedVertices()`, `DMNetworkGetVertexRange()`, `DMNetworkIsSharedVertex()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkIsGhostVertex\"))\n\"\"\"\nfunction DMNetworkIsGhostVertex(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMNetworkIsGhostVertex(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tisghost_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMNetworkIsGhostVertex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscBool}),\n               dm, p, isghost_,\n              )\n\n\tisghost = isghost_[]\n\n\treturn isghost\nend \n\n\"\"\"\n\tDMNetworkHasJacobian(petsclib::PetscLibType,dm::PetscDM, eflg::PetscBool, vflg::PetscBool) \nSets global flag for using user's sub Jacobian matrices\n-- `replaced by DMNetworkSetOption(network,userjacobian,PETSC_TRUE)?`\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMNETWORK` object\n- `eflg` - turn the option on (`PETSC_TRUE`) or off (`PETSC_FALSE`) if user provides Jacobian for edges\n- `vflg` - turn the option on (`PETSC_TRUE`) or off (`PETSC_FALSE`) if user provides Jacobian for vertices\n\nLevel: intermediate\n\n-seealso: `DMNetworkSetOption()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkHasJacobian\"))\n\"\"\"\nfunction DMNetworkHasJacobian(petsclib::PetscLibType, dm::PetscDM, eflg::PetscBool, vflg::PetscBool) end\n\n@for_petsc function DMNetworkHasJacobian(petsclib::$UnionPetscLib, dm::PetscDM, eflg::PetscBool, vflg::PetscBool )\n\n    @chk ccall(\n               (:DMNetworkHasJacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, PetscBool),\n               dm, eflg, vflg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMNetworkEdgeSetMatrix(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, J::Vector{PetscMat}) \nSets user\n\nNot Collective\n\nInput Parameters:\n- `dm` - the `DMNETWORK` object\n- `p`  - the edge point\n- `J`  - array (size = 3) of Jacobian submatrices for this edge point:\nJ[0]: this edge\nJ[1] and J[2]: connected vertices, obtained by calling `DMNetworkGetConnectedVertices()`\n\nLevel: advanced\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkVertexSetMatrix()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkEdgeSetMatrix\"))\n\"\"\"\nfunction DMNetworkEdgeSetMatrix(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, J::Vector{PetscMat}) end\n\n@for_petsc function DMNetworkEdgeSetMatrix(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, J::Vector{PetscMat} )\n\n    @chk ccall(\n               (:DMNetworkEdgeSetMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CMat}),\n               dm, p, J,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMNetworkVertexSetMatrix(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, J::Vector{PetscMat}) \nSets user\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DMNETWORK` object\n- `p`  - the vertex point\n- `J`  - array of Jacobian (size = 2*(num of supporting edges) + 1) submatrices for this vertex point:\nJ[0]:       this vertex\nJ[1+2*i]:   i-th supporting edge\nJ[1+2*i+1]: i-th connected vertex\n\nLevel: advanced\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkEdgeSetMatrix()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkVertexSetMatrix\"))\n\"\"\"\nfunction DMNetworkVertexSetMatrix(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, J::Vector{PetscMat}) end\n\n@for_petsc function DMNetworkVertexSetMatrix(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, J::Vector{PetscMat} )\n\n    @chk ccall(\n               (:DMNetworkVertexSetMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CMat}),\n               dm, p, J,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvg::PetscInt = DMNetworkGetVertexLocalToGlobalOrdering(petsclib::PetscLibType,dm::PetscDM, vloc::PetscInt) \nGet vertex global index\n\nNot Collective\n\nInput Parameters:\n- `dm`   - the `DMNETWORK` object\n- `vloc` - local vertex ordering, start from 0\n\nOutput Parameter:\n- `vg` - global vertex ordering, start from 0\n\nLevel: advanced\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkSetVertexLocalToGlobalOrdering()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkGetVertexLocalToGlobalOrdering\"))\n\"\"\"\nfunction DMNetworkGetVertexLocalToGlobalOrdering(petsclib::PetscLibType, dm::PetscDM, vloc::PetscInt) end\n\n@for_petsc function DMNetworkGetVertexLocalToGlobalOrdering(petsclib::$UnionPetscLib, dm::PetscDM, vloc::$PetscInt )\n\tvg_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMNetworkGetVertexLocalToGlobalOrdering, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, vloc, vg_,\n              )\n\n\tvg = vg_[]\n\n\treturn vg\nend \n\n\"\"\"\n\tDMNetworkSetVertexLocalToGlobalOrdering(petsclib::PetscLibType,dm::PetscDM) \nCreate and setup vertex local to global map\n\nCollective\n\nInput Parameters:\n- `dm` - the `DMNETWORK` object\n\nLevel: advanced\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkGetGlobalVertexIndex()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkSetVertexLocalToGlobalOrdering\"))\n\"\"\"\nfunction DMNetworkSetVertexLocalToGlobalOrdering(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkSetVertexLocalToGlobalOrdering(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMNetworkSetVertexLocalToGlobalOrdering, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tis::IS = DMNetworkCreateIS(petsclib::PetscLibType,dm::PetscDM, numkeys::PetscInt, keys::Vector{PetscInt}, blocksize::Vector{PetscInt}, nselectedvar::Vector{PetscInt}, selectedvar::Vector{PetscInt}) \nCreate an index set object from the global vector of the network\n\nCollective\n\nInput Parameters:\n- `dm`           - `DMNETWORK` object\n- `numkeys`      - number of keys\n- `keys`         - array of keys that define the components of the variables you wish to extract\n- `blocksize`    - block size of the variables associated to the component\n- `nselectedvar` - number of variables in each block to select\n- `selectedvar`  - the offset into the block of each variable in each block to select\n\nOutput Parameter:\n- `is` - the index set\n\nLevel: advanced\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `ISCreateGeneral()`, `DMNetworkCreateLocalIS()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkCreateIS\"))\n\"\"\"\nfunction DMNetworkCreateIS(petsclib::PetscLibType, dm::PetscDM, numkeys::PetscInt, keys::Vector{PetscInt}, blocksize::Vector{PetscInt}, nselectedvar::Vector{PetscInt}, selectedvar::Vector{PetscInt}) end\n\n@for_petsc function DMNetworkCreateIS(petsclib::$UnionPetscLib, dm::PetscDM, numkeys::$PetscInt, keys::Vector{$PetscInt}, blocksize::Vector{$PetscInt}, nselectedvar::Vector{$PetscInt}, selectedvar::Vector{$PetscInt} )\n\tselectedvar_ = Ref(pointer(selectedvar))\n\tis_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMNetworkCreateIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{CIS}),\n               dm, numkeys, keys, blocksize, nselectedvar, selectedvar_, is_,\n              )\n\n\tis = is_[]\n\n\treturn is\nend \n\n\"\"\"\n\tis::IS = DMNetworkCreateLocalIS(petsclib::PetscLibType,dm::PetscDM, numkeys::PetscInt, keys::Vector{PetscInt}, blocksize::Vector{PetscInt}, nselectedvar::Vector{PetscInt}, selectedvar::Vector{PetscInt}) \nCreate an index set object from the local vector of the network\n\nNot Collective\n\nInput Parameters:\n- `dm`           - `DMNETWORK` object\n- `numkeys`      - number of keys\n- `keys`         - array of keys that define the components of the variables you wish to extract\n- `blocksize`    - block size of the variables associated to the component\n- `nselectedvar` - number of variables in each block to select\n- `selectedvar`  - the offset into the block of each variable in each block to select\n\nOutput Parameter:\n- `is` - the index set\n\nLevel: advanced\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkCreate()`, `DMNetworkCreateIS()`, `ISCreateGeneral()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkCreateLocalIS\"))\n\"\"\"\nfunction DMNetworkCreateLocalIS(petsclib::PetscLibType, dm::PetscDM, numkeys::PetscInt, keys::Vector{PetscInt}, blocksize::Vector{PetscInt}, nselectedvar::Vector{PetscInt}, selectedvar::Vector{PetscInt}) end\n\n@for_petsc function DMNetworkCreateLocalIS(petsclib::$UnionPetscLib, dm::PetscDM, numkeys::$PetscInt, keys::Vector{$PetscInt}, blocksize::Vector{$PetscInt}, nselectedvar::Vector{$PetscInt}, selectedvar::Vector{$PetscInt} )\n\tselectedvar_ = Ref(pointer(selectedvar))\n\tis_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMNetworkCreateLocalIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{CIS}),\n               dm, numkeys, keys, blocksize, nselectedvar, selectedvar_, is_,\n              )\n\n\tis = is_[]\n\n\treturn is\nend \n\n\"\"\"\n\tDMNetworkFinalizeComponents(petsclib::PetscLibType,dm::PetscDM) \nSets up internal data structures for the sections and components. It is called after registering new components and adding all components\nto the cloned network. After calling this subroutine, no new components can be added to the network.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkAddComponent()`, `DMNetworkRegisterComponent()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkFinalizeComponents\"))\n\"\"\"\nfunction DMNetworkFinalizeComponents(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkFinalizeComponents(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMNetworkFinalizeComponents, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnetwork::PetscDM = DMNetworkCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a DMNetwork object, which encapsulates an unstructured network.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the DMNetwork object\n\nOutput Parameter:\n- `network` - The DMNetwork object\n\nLevel: beginner\n\n-seealso: `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkCreate\"))\n\"\"\"\nfunction DMNetworkCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMNetworkCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tnetwork_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMNetworkCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, network_,\n              )\n\n\tnetwork = PetscDM(network_[], petsclib)\n\n\treturn network\nend \n\n\"\"\"\n\tshowranks::PetscBool = DMNetworkViewSetShowRanks(petsclib::PetscLibType,dm::PetscDM) \nSets viewing the `DMETNWORK` on each rank individually.\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameter:\n- `showranks` - `PETSC_TRUE` if viewing each rank's sub network individually\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkViewSetShowGlobal()`, `DMNetworkViewSetShowVertices()`, `DMNetworkViewSetShowNumbering()`, `DMNetworkViewSetViewRanks()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkViewSetShowRanks\"))\n\"\"\"\nfunction DMNetworkViewSetShowRanks(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkViewSetShowRanks(petsclib::$UnionPetscLib, dm::PetscDM )\n\tshowranks_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMNetworkViewSetShowRanks, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, showranks_,\n              )\n\n\tshowranks = showranks_[]\n\n\treturn showranks\nend \n\n\"\"\"\n\tshowglobal::PetscBool = DMNetworkViewSetShowGlobal(petsclib::PetscLibType,dm::PetscDM) \nSet viewing the global network.\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameter:\n- `showglobal` - `PETSC_TRUE` if viewing the global network\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkViewSetShowRanks()`, `DMNetworkViewSetShowVertices()`, `DMNetworkViewSetShowNumbering()`, `DMNetworkViewSetViewRanks()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkViewSetShowGlobal\"))\n\"\"\"\nfunction DMNetworkViewSetShowGlobal(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkViewSetShowGlobal(petsclib::$UnionPetscLib, dm::PetscDM )\n\tshowglobal_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMNetworkViewSetShowGlobal, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, showglobal_,\n              )\n\n\tshowglobal = showglobal_[]\n\n\treturn showglobal\nend \n\n\"\"\"\n\tshowvertices::PetscBool = DMNetworkViewSetShowVertices(petsclib::PetscLibType,dm::PetscDM) \nSets whether to display the vertices in viewing routines.\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameter:\n- `showvertices` - `PETSC_TRUE` if visualizing the vertices\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkViewSetShowRanks()`, `DMNetworkViewSetShowGlobal()`, `DMNetworkViewSetShowNumbering()`, `DMNetworkViewSetViewRanks()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkViewSetShowVertices\"))\n\"\"\"\nfunction DMNetworkViewSetShowVertices(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkViewSetShowVertices(petsclib::$UnionPetscLib, dm::PetscDM )\n\tshowvertices_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMNetworkViewSetShowVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, showvertices_,\n              )\n\n\tshowvertices = showvertices_[]\n\n\treturn showvertices\nend \n\n\"\"\"\n\tshownumbering::PetscBool = DMNetworkViewSetShowNumbering(petsclib::PetscLibType,dm::PetscDM) \nSet displaying the numbering of edges and vertices in viewing routines.\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameter:\n- `shownumbering` - `PETSC_TRUE` if displaying the numbering of edges and vertices\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkViewSetShowRanks()`, `DMNetworkViewSetShowGlobal()`, `DMNetworkViewSetShowVertices()`, `DMNetworkViewSetViewRanks()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkViewSetShowNumbering\"))\n\"\"\"\nfunction DMNetworkViewSetShowNumbering(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMNetworkViewSetShowNumbering(petsclib::$UnionPetscLib, dm::PetscDM )\n\tshownumbering_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMNetworkViewSetShowNumbering, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, shownumbering_,\n              )\n\n\tshownumbering = shownumbering_[]\n\n\treturn shownumbering\nend \n\n\"\"\"\n\tDMNetworkViewSetViewRanks(petsclib::PetscLibType,dm::PetscDM, viewranks::IS) \nView the `DMNETWORK` on each of the specified ranks individually.\n\nCollective\n\nInput Parameter:\n- `dm` - the `DMNETWORK` object\n\nOutput Parameter:\n- `viewranks` - set of ranks to view the `DMNETWORK` on individually\n\nLevel: beginner\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkViewSetShowRanks()`, `DMNetworkViewSetShowGlobal()`, `DMNetworkViewSetShowVertices()`, `DMNetworkViewSetShowNumbering()`\n\n# External Links\n$(_doc_external(\"DMNetwork/DMNetworkViewSetViewRanks\"))\n\"\"\"\nfunction DMNetworkViewSetViewRanks(petsclib::PetscLibType, dm::PetscDM, viewranks::IS) end\n\n@for_petsc function DMNetworkViewSetViewRanks(petsclib::$UnionPetscLib, dm::PetscDM, viewranks::IS )\n\n    @chk ccall(\n               (:DMNetworkViewSetViewRanks, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS),\n               dm, viewranks,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMProductGetDM(petsclib::PetscLibType,dm::PetscDM, slot::PetscInt, subdm::PetscDM) \nGet sub\n\nNot Collective\n\nInput Parameters:\n- `dm`   - the` DMPRODUCT`\n- `slot` - which dimension within `DMPRODUCT` whose coordinates is being provided, in the range 0 to dim-1\n\nOutput Parameter:\n- `subdm` - the sub-`DM`\n\nLevel: advanced\n\n-seealso: `DMPRODUCT`, `DMProductSetDM()`, `DMProductGetDimensionIndex()`, `DMProductSetDimensionIndex()`\n\n# External Links\n$(_doc_external(\"DMPRODUCT/DMProductGetDM\"))\n\"\"\"\nfunction DMProductGetDM(petsclib::PetscLibType, dm::PetscDM, slot::PetscInt, subdm::PetscDM) end\n\n@for_petsc function DMProductGetDM(petsclib::$UnionPetscLib, dm::PetscDM, slot::$PetscInt, subdm::PetscDM )\n\tsubdm_ = Ref(subdm.ptr)\n\n    @chk ccall(\n               (:DMProductGetDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CDM}),\n               dm, slot, subdm_,\n              )\n\n\tsubdm.ptr = subdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMProductSetDM(petsclib::PetscLibType,dm::PetscDM, slot::PetscInt, subdm::PetscDM) \nSet sub\n\nNot Collective\n\nInput Parameters:\n- `dm`    - the `DMPRODUCT`\n- `slot`  - which dimension within `DMPRODUCT` whose coordinates is being provided, in the range 0 to dim-1\n- `subdm` - the sub-`DM`\n\nLevel: advanced\n\n-seealso: `DMPRODUCT`, `DMProductGetDM()`, `DMProductSetDimensionIndex()`, `DMProductGetDimensionIndex()`\n\n# External Links\n$(_doc_external(\"DMPRODUCT/DMProductSetDM\"))\n\"\"\"\nfunction DMProductSetDM(petsclib::PetscLibType, dm::PetscDM, slot::PetscInt, subdm::PetscDM) end\n\n@for_petsc function DMProductSetDM(petsclib::$UnionPetscLib, dm::PetscDM, slot::$PetscInt, subdm::PetscDM )\n\n    @chk ccall(\n               (:DMProductSetDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, CDM),\n               dm, slot, subdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMProductSetDimensionIndex(petsclib::PetscLibType,dm::PetscDM, slot::PetscInt, idx::PetscInt) \nSet which dimension `idx` of the sub\n\nNot Collective\n\nInput Parameters:\n- `dm`   - the `DMPRODUCT`\n- `slot` - which dimension, in the range 0 to dim-1 you are providing to the `dm`\n- `idx`  - the dimension of the sub-`DM` to use\n\nLevel: advanced\n\n-seealso: `DMPRODUCT`, `DMProductGetDM()`, `DMProductGetDimensionIndex()`\n\n# External Links\n$(_doc_external(\"DMPRODUCT/DMProductSetDimensionIndex\"))\n\"\"\"\nfunction DMProductSetDimensionIndex(petsclib::PetscLibType, dm::PetscDM, slot::PetscInt, idx::PetscInt) end\n\n@for_petsc function DMProductSetDimensionIndex(petsclib::$UnionPetscLib, dm::PetscDM, slot::$PetscInt, idx::$PetscInt )\n\n    @chk ccall(\n               (:DMProductSetDimensionIndex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               dm, slot, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tidx::PetscInt = DMProductGetDimensionIndex(petsclib::PetscLibType,dm::PetscDM, slot::PetscInt) \nGet which dimension `idx` of the sub\n\nNot Collective\n\nInput Parameters:\n- `dm`   - the `DMPRODUCT`\n- `slot` - which dimension, in the range 0 to dim-1 of `dm`\n\nOutput Parameter:\n- `idx` - the dimension of the sub-`DM`\n\nLevel: advanced\n\n-seealso: `DMPRODUCT`, `DMProductGetDM()`, `DMProductSetDimensionIndex()`\n\n# External Links\n$(_doc_external(\"DMPRODUCT/DMProductGetDimensionIndex\"))\n\"\"\"\nfunction DMProductGetDimensionIndex(petsclib::PetscLibType, dm::PetscDM, slot::PetscInt) end\n\n@for_petsc function DMProductGetDimensionIndex(petsclib::$UnionPetscLib, dm::PetscDM, slot::$PetscInt )\n\tidx_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMProductGetDimensionIndex, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, slot, idx_,\n              )\n\n\tidx = idx_[]\n\n\treturn idx\nend \n\n\"\"\"\n\tDMCompositeSetCoupling(petsclib::PetscLibType,dm::PetscDM, FormCoupleLocations::external) \nSets user provided routines that compute the coupling between the\nseparate components `DM` in a `DMCOMPOSITE` to build the correct matrix nonzero structure.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `dm`                  - the composite object\n- `FormCoupleLocations` - routine to set the nonzero locations in the matrix\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeSetCoupling\"))\n\"\"\"\nfunction DMCompositeSetCoupling(petsclib::PetscLibType, dm::PetscDM, FormCoupleLocations::external) end\n\n@for_petsc function DMCompositeSetCoupling(petsclib::$UnionPetscLib, dm::PetscDM, FormCoupleLocations::external )\n\n    @chk ccall(\n               (:DMCompositeSetCoupling, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, FormCoupleLocations,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnDM::PetscInt = DMCompositeGetNumberDM(petsclib::PetscLibType,dm::PetscDM) \nGets the number of `DM` objects in the `DMCOMPOSITE`\nrepresentation.\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMCOMPOSITE` object\n\nOutput Parameter:\n- `nDM` - the number of `DM`\n\nLevel: beginner\n\n-seealso: `DMCOMPOSITE`, `DM`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGetNumberDM\"))\n\"\"\"\nfunction DMCompositeGetNumberDM(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMCompositeGetNumberDM(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnDM_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMCompositeGetNumberDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, nDM_,\n              )\n\n\tnDM = nDM_[]\n\n\treturn nDM\nend \n\n\"\"\"\n\tDMCompositeGetAccessArray(petsclib::PetscLibType,dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::Vector{PetscVec}) \nAllows one to access the individual packed vectors in their global\nrepresentation.\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DMCOMPOSITE`\n- `pvec`    - packed vector\n- `nwanted` - number of vectors wanted\n- `wanted`  - sorted array of integers indicating thde vectors wanted, or `NULL` to get all vectors, length `nwanted`\n\nOutput Parameter:\n- `vecs` - array of requested global vectors (must be previously allocated and of length `nwanted`)\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMCompositeGetAccess()`, `DMCompositeGetEntries()`, `DMCompositeScatter()`, `DMCompositeGather()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGetAccessArray\"))\n\"\"\"\nfunction DMCompositeGetAccessArray(petsclib::PetscLibType, dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::Vector{PetscVec}) end\n\n@for_petsc function DMCompositeGetAccessArray(petsclib::$UnionPetscLib, dm::PetscDM, pvec::PetscVec, nwanted::$PetscInt, wanted::Vector{$PetscInt}, vecs::Vector{PetscVec} )\n\n    @chk ccall(\n               (:DMCompositeGetAccessArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, $PetscInt, Ptr{$PetscInt}, Ptr{CVec}),\n               dm, pvec, nwanted, wanted, vecs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeGetLocalAccessArray(petsclib::PetscLibType,dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::Vector{PetscVec}) \nAllows one to access the individual\npacked vectors in their local representation.\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DMCOMPOSITE`\n- `pvec`    - packed vector\n- `nwanted` - number of vectors wanted\n- `wanted`  - sorted array of vectors wanted, or `NULL` to get all vectors, length `nwanted`\n\nOutput Parameter:\n- `vecs` - array of requested local vectors (must be allocated and of length `nwanted`)\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMCompositeRestoreLocalAccessArray()`, `DMCompositeGetAccess()`,\n`DMCompositeGetEntries()`, `DMCompositeScatter()`, `DMCompositeGather()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGetLocalAccessArray\"))\n\"\"\"\nfunction DMCompositeGetLocalAccessArray(petsclib::PetscLibType, dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::Vector{PetscVec}) end\n\n@for_petsc function DMCompositeGetLocalAccessArray(petsclib::$UnionPetscLib, dm::PetscDM, pvec::PetscVec, nwanted::$PetscInt, wanted::Vector{$PetscInt}, vecs::Vector{PetscVec} )\n\n    @chk ccall(\n               (:DMCompositeGetLocalAccessArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, $PetscInt, Ptr{$PetscInt}, Ptr{CVec}),\n               dm, pvec, nwanted, wanted, vecs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeRestoreAccessArray(petsclib::PetscLibType,dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::Vector{PetscVec}) \nReturns the vectors obtained with `DMCompositeGetAccessArray()`\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DMCOMPOSITE` object\n- `pvec`    - packed vector\n- `nwanted` - number of vectors wanted\n- `wanted`  - sorted array of vectors wanted, or `NULL` to restore all vectors\n- `vecs`    - array of global vectors\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMCompositeRestoreAccess()`, `DMCompositeRestoreEntries()`, `DMCompositeScatter()`, `DMCompositeGather()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeRestoreAccessArray\"))\n\"\"\"\nfunction DMCompositeRestoreAccessArray(petsclib::PetscLibType, dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::Vector{PetscVec}) end\n\n@for_petsc function DMCompositeRestoreAccessArray(petsclib::$UnionPetscLib, dm::PetscDM, pvec::PetscVec, nwanted::$PetscInt, wanted::Vector{$PetscInt}, vecs::Vector{PetscVec} )\n\n    @chk ccall(\n               (:DMCompositeRestoreAccessArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, $PetscInt, Ptr{$PetscInt}, Ptr{CVec}),\n               dm, pvec, nwanted, wanted, vecs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeRestoreLocalAccessArray(petsclib::PetscLibType,dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::PetscVec) \nReturns the vectors obtained with `DMCompositeGetLocalAccessArray()`.\n\nCollective\n\nInput Parameters:\n- `dm`      - the `DMCOMPOSITE` object\n- `pvec`    - packed vector\n- `nwanted` - number of vectors wanted\n- `wanted`  - sorted array of vectors wanted, or `NULL` to restore all vectors\n- `vecs`    - array of local vectors\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMCompositeGetLocalAccessArray()`, `DMCompositeRestoreAccessArray()`,\n`DMCompositeRestoreAccess()`, `DMCompositeRestoreEntries()`,\n`DMCompositeScatter()`, `DMCompositeGather()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeRestoreLocalAccessArray\"))\n\"\"\"\nfunction DMCompositeRestoreLocalAccessArray(petsclib::PetscLibType, dm::PetscDM, pvec::PetscVec, nwanted::PetscInt, wanted::Vector{PetscInt}, vecs::PetscVec) end\n\n@for_petsc function DMCompositeRestoreLocalAccessArray(petsclib::$UnionPetscLib, dm::PetscDM, pvec::PetscVec, nwanted::$PetscInt, wanted::Vector{$PetscInt}, vecs::PetscVec )\n\tvecs_ = Ref(vecs.ptr)\n\n    @chk ccall(\n               (:DMCompositeRestoreLocalAccessArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, $PetscInt, Ptr{$PetscInt}, Ptr{CVec}),\n               dm, pvec, nwanted, wanted, vecs_,\n              )\n\n\tvecs.ptr = vecs_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeScatterArray(petsclib::PetscLibType,dm::PetscDM, gvec::PetscVec, lvecs::PetscVec) \nScatters from a global packed vector into its individual local vectors\n\nCollective\n\nInput Parameters:\n- `dm`    - the `DMCOMPOSITE` object\n- `gvec`  - the global vector\n- `lvecs` - array of local vectors, NULL for any that are not needed\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMDestroy()`, `DMCompositeAddDM()`, `DMCreateGlobalVector()`\n`DMCompositeGather()`, `DMCompositeCreate()`, `DMCompositeGetISLocalToGlobalMappings()`, `DMCompositeGetAccess()`,\n`DMCompositeGetLocalVectors()`, `DMCompositeRestoreLocalVectors()`, `DMCompositeGetEntries()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeScatterArray\"))\n\"\"\"\nfunction DMCompositeScatterArray(petsclib::PetscLibType, dm::PetscDM, gvec::PetscVec, lvecs::PetscVec) end\n\n@for_petsc function DMCompositeScatterArray(petsclib::$UnionPetscLib, dm::PetscDM, gvec::PetscVec, lvecs::PetscVec )\n\tlvecs_ = Ref(lvecs.ptr)\n\n    @chk ccall(\n               (:DMCompositeScatterArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{CVec}),\n               dm, gvec, lvecs_,\n              )\n\n\tlvecs.ptr = lvecs_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeGatherArray(petsclib::PetscLibType,dm::PetscDM, imode::InsertMode, gvec::PetscVec, lvecs::PetscVec) \nGathers into a global packed vector from its individual local vectors\n\nCollective\n\nInput Parameters:\n- `dm`    - the `DMCOMPOSITE` object\n- `gvec`  - the global vector\n- `imode` - `INSERT_VALUES` or `ADD_VALUES`\n- `lvecs` - the individual sequential vectors, NULL for any that are not needed\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMDestroy()`, `DMCompositeAddDM()`, `DMCreateGlobalVector()`,\n`DMCompositeScatter()`, `DMCompositeCreate()`, `DMCompositeGetISLocalToGlobalMappings()`, `DMCompositeGetAccess()`,\n`DMCompositeGetLocalVectors()`, `DMCompositeRestoreLocalVectors()`, `DMCompositeGetEntries()`,\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGatherArray\"))\n\"\"\"\nfunction DMCompositeGatherArray(petsclib::PetscLibType, dm::PetscDM, imode::InsertMode, gvec::PetscVec, lvecs::PetscVec) end\n\n@for_petsc function DMCompositeGatherArray(petsclib::$UnionPetscLib, dm::PetscDM, imode::InsertMode, gvec::PetscVec, lvecs::PetscVec )\n\tlvecs_ = Ref(lvecs.ptr)\n\n    @chk ccall(\n               (:DMCompositeGatherArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, InsertMode, CVec, Ptr{CVec}),\n               dm, imode, gvec, lvecs_,\n              )\n\n\tlvecs.ptr = lvecs_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeAddDM(petsclib::PetscLibType,dmc::PetscDM, dm::PetscDM) \nadds a `DM` vector to a `DMCOMPOSITE`\n\nCollective\n\nInput Parameters:\n- `dmc` - the  `DMCOMPOSITE` object\n- `dm`  - the `DM` object\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMDestroy()`, `DMCompositeGather()`, `DMCreateGlobalVector()`,\n`DMCompositeScatter()`, `DMCompositeCreate()`, `DMCompositeGetISLocalToGlobalMappings()`, `DMCompositeGetAccess()`,\n`DMCompositeGetLocalVectors()`, `DMCompositeRestoreLocalVectors()`, `DMCompositeGetEntries()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeAddDM\"))\n\"\"\"\nfunction DMCompositeAddDM(petsclib::PetscLibType, dmc::PetscDM, dm::PetscDM) end\n\n@for_petsc function DMCompositeAddDM(petsclib::$UnionPetscLib, dmc::PetscDM, dm::PetscDM )\n\n    @chk ccall(\n               (:DMCompositeAddDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dmc, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeGetISLocalToGlobalMappings(petsclib::PetscLibType,dm::PetscDM, ltogs::Vector{ISLocalToGlobalMapping}) \ngets an `ISLocalToGlobalMapping` for each `DM` in the `DMCOMPOSITE`, maps to the composite global space\n\nCollective; No Fortran Support\n\nInput Parameter:\n- `dm` - the `DMCOMPOSITE` object\n\nOutput Parameter:\n- `ltogs` - the individual mappings for each packed vector. Note that this includes\nall the ghost points that individual ghosted `DMDA` may have.\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMDestroy()`, `DMCompositeAddDM()`, `DMCreateGlobalVector()`,\n`DMCompositeGather()`, `DMCompositeCreate()`, `DMCompositeGetAccess()`, `DMCompositeScatter()`,\n`DMCompositeGetLocalVectors()`, `DMCompositeRestoreLocalVectors()`, `DMCompositeGetEntries()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGetISLocalToGlobalMappings\"))\n\"\"\"\nfunction DMCompositeGetISLocalToGlobalMappings(petsclib::PetscLibType, dm::PetscDM, ltogs::Vector{ISLocalToGlobalMapping}) end\n\n@for_petsc function DMCompositeGetISLocalToGlobalMappings(petsclib::$UnionPetscLib, dm::PetscDM, ltogs::Vector{ISLocalToGlobalMapping} )\n\tltogs_ = Ref(pointer(ltogs))\n\n    @chk ccall(\n               (:DMCompositeGetISLocalToGlobalMappings, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{ISLocalToGlobalMapping}}),\n               dm, ltogs_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeGetLocalISs(petsclib::PetscLibType,dm::PetscDM, is::Vector{IS}) \nGets index sets for each component of a composite local vector\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `dm` - the `DMCOMPOSITE`\n\nOutput Parameter:\n- `is` - array of serial index sets for each component of the `DMCOMPOSITE`\n\nLevel: intermediate\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMCompositeGetGlobalISs()`, `DMCompositeGetISLocalToGlobalMappings()`, `MatGetLocalSubMatrix()`,\n`MatCreateLocalRef()`, `DMCompositeGetNumberDM()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGetLocalISs\"))\n\"\"\"\nfunction DMCompositeGetLocalISs(petsclib::PetscLibType, dm::PetscDM, is::Vector{IS}) end\n\n@for_petsc function DMCompositeGetLocalISs(petsclib::$UnionPetscLib, dm::PetscDM, is::Vector{IS} )\n\tis_ = Ref(pointer(is))\n\n    @chk ccall(\n               (:DMCompositeGetLocalISs, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{CIS}}),\n               dm, is_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeGetGlobalISs(petsclib::PetscLibType,dm::PetscDM, is::Vector{IS}) \nGets the index sets for each composed object in a `DMCOMPOSITE`\n\nCollective\n\nInput Parameter:\n- `dm` - the `DMCOMPOSITE` object\n\nOutput Parameter:\n- `is` - the array of index sets\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMDestroy()`, `DMCompositeAddDM()`, `DMCreateGlobalVector()`,\n`DMCompositeGather()`, `DMCompositeCreate()`, `DMCompositeGetAccess()`, `DMCompositeScatter()`,\n`DMCompositeGetLocalVectors()`, `DMCompositeRestoreLocalVectors()`, `DMCompositeGetEntries()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGetGlobalISs\"))\n\"\"\"\nfunction DMCompositeGetGlobalISs(petsclib::PetscLibType, dm::PetscDM, is::Vector{IS}) end\n\n@for_petsc function DMCompositeGetGlobalISs(petsclib::$UnionPetscLib, dm::PetscDM, is::Vector{IS} )\n\tis_ = Ref(pointer(is))\n\n    @chk ccall(\n               (:DMCompositeGetGlobalISs, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{CIS}}),\n               dm, is_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMCompositeGetEntriesArray(petsclib::PetscLibType,dm::PetscDM, dms::Vector{PetscDM}) \nGets the DM for each entry in a `DMCOMPOSITE`\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMCOMPOSITE` object\n\nOutput Parameter:\n- `dms` - array of sufficient length (see `DMCompositeGetNumberDM()`) to hold the individual `DM`\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMDestroy()`, `DMCompositeAddDM()`, `DMCreateGlobalVector()`, `DMCompositeGetEntries()`\n`DMCompositeGather()`, `DMCompositeCreate()`, `DMCompositeGetISLocalToGlobalMappings()`, `DMCompositeGetAccess()`,\n`DMCompositeRestoreLocalVectors()`, `DMCompositeGetLocalVectors()`, `DMCompositeScatter()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeGetEntriesArray\"))\n\"\"\"\nfunction DMCompositeGetEntriesArray(petsclib::PetscLibType, dm::PetscDM, dms::Vector{PetscDM}) end\n\n@for_petsc function DMCompositeGetEntriesArray(petsclib::$UnionPetscLib, dm::PetscDM, dms::Vector{PetscDM} )\n\n    @chk ccall(\n               (:DMCompositeGetEntriesArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, dms,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpacker::PetscDM = DMCompositeCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `DMCOMPOSITE`, used to generate \"composite\"\nvectors made up of several subvectors.\n\nCollective\n\nInput Parameter:\n- `comm` - the processors that will share the global vector\n\nOutput Parameter:\n- `packer` - the `DMCOMPOSITE` object\n\nLevel: advanced\n\n-seealso: `DMCOMPOSITE`, `DM`, `DMDestroy()`, `DMCompositeAddDM()`, `DMCompositeScatter()`, `DMCreate()`\n`DMCompositeGather()`, `DMCreateGlobalVector()`, `DMCompositeGetISLocalToGlobalMappings()`, `DMCompositeGetAccess()`\n`DMCompositeGetLocalVectors()`, `DMCompositeRestoreLocalVectors()`, `DMCompositeGetEntries()`\n\n# External Links\n$(_doc_external(\"DM/DMCompositeCreate\"))\n\"\"\"\nfunction DMCompositeCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMCompositeCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tpacker_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMCompositeCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, packer_,\n              )\n\n\tpacker = PetscDM(packer_[], petsclib)\n\n\treturn packer\nend \n\n\"\"\"\n\tdm::PetscDM = DMStagCreate1d(petsclib::PetscLibType,comm::MPI_Comm, bndx::DMBoundaryType, M::PetscInt, dof0::PetscInt, dof1::PetscInt, stencilType::DMStagStencilType, stencilWidth::PetscInt, lx::Vector{PetscInt}) \nCreate an object to manage data living on the elements and vertices of a parallelized regular 1D grid.\n\nCollective\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `bndx`         - boundary type: `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `M`            - global number of elements\n- `dof0`         - number of degrees of freedom per vertex/0-cell\n- `dof1`         - number of degrees of freedom per element/1-cell\n- `stencilType`  - ghost/halo region type: `DMSTAG_STENCIL_BOX` or `DMSTAG_STENCIL_NONE`\n- `stencilWidth` - width, in elements, of halo/ghost region\n- `lx`           - array of local sizes, of length equal to the comm size, summing to `M` or `NULL`\n\nOutput Parameter:\n- `dm` - the new `DMSTAG` object\n\nOptions Database Keys:\n- `-dm_view`                                      - calls `DMViewFromOptions()` at the conclusion of `DMSetUp()`\n- `-stag_grid_x <nx>`                             - number of elements in the x direction\n- `-stag_ghost_stencil_width`                     - width of ghost region, in elements\n- `-stag_boundary_type_x <none,ghosted,periodic>` - `DMBoundaryType` value\n\nLevel: beginner\n\nNotes:\nYou must call `DMSetUp()` after this call before using the `DM`.\nIf you wish to use the options database (see the keys above) to change values in the `DMSTAG`, you must call\n`DMSetFromOptions()` after this function but before `DMSetUp()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMLocalToGlobalBegin()`, `DMDACreate1d()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate1d\"))\n\"\"\"\nfunction DMStagCreate1d(petsclib::PetscLibType, comm::MPI_Comm, bndx::DMBoundaryType, M::PetscInt, dof0::PetscInt, dof1::PetscInt, stencilType::DMStagStencilType, stencilWidth::PetscInt, lx::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function DMStagCreate1d(petsclib::$UnionPetscLib, comm::MPI_Comm, bndx::DMBoundaryType, M::$PetscInt, dof0::$PetscInt, dof1::$PetscInt, stencilType::DMStagStencilType, stencilWidth::$PetscInt, lx::Union{Ptr,Vector{$PetscInt}} )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMStagCreate1d, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMBoundaryType, $PetscInt, $PetscInt, $PetscInt, DMStagStencilType, $PetscInt, Ptr{$PetscInt}, Ptr{CDM}),\n               comm, bndx, M, dof0, dof1, stencilType, stencilWidth, lx, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMStagVecSplitToDMDA(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, loc::DMStagStencilLocation, c::PetscInt, pda::PetscDM, pdavec::PetscVec) \ncreate a `DMDA` and `Vec` from a subgrid of a `DMSTAG` and its `Vec`\n\nCollective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `vec` - `Vec` object associated with `dm`\n- `loc` - which subgrid to extract (see `DMStagStencilLocation`)\n- `c`   - which component to extract (see note below)\n\nOutput Parameters:\n- `pda`    - the `DMDA`\n- `pdavec` - the new `Vec`\n\nLevel: advanced\n\nNotes:\nIf a `c` value of `-k` is provided, the first `k` DOF for that position are extracted,\npadding with zero values if needed. If a non-negative value is provided, a single\nDOF is extracted.\n\nThe caller is responsible for destroying the created `DMDA` and `Vec`.\n\nSee also: \n=== \n`DMSTAG`, `DMDA`, `DMStagStencilLocation`, `DM`, `Vec`, `DMStagMigrateVec()`, `DMStagCreateCompatibleDMStag()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecSplitToDMDA\"))\n\"\"\"\nfunction DMStagVecSplitToDMDA(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, loc::DMStagStencilLocation, c::PetscInt, pda::PetscDM, pdavec::PetscVec) end\n\n@for_petsc function DMStagVecSplitToDMDA(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, loc::DMStagStencilLocation, c::$PetscInt, pda::PetscDM, pdavec::PetscVec )\n\tpda_ = Ref(pda.ptr)\n\tpdavec_ = Ref(pdavec.ptr)\n\n    @chk ccall(\n               (:DMStagVecSplitToDMDA, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, DMStagStencilLocation, $PetscInt, Ptr{CDM}, Ptr{CVec}),\n               dm, vec, loc, c, pda_, pdavec_,\n              )\n\n\tpda.ptr = pda_[]\n\tpdavec.ptr = pdavec_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tis::IS = DMStagCreateISFromStencils(petsclib::PetscLibType,dm::PetscDM, n_stencil::PetscInt, stencils::Vector{DMStagStencil}) \nCreate an `IS`, using global numberings, for a subset of DOF in a `DMSTAG` object\n\nCollective\n\nInput Parameters:\n- `dm`        - the `DMSTAG` object\n- `n_stencil` - the number of stencils provided\n- `stencils`  - an array of `DMStagStencil` objects (`i`, `j`, and `k` are ignored)\n\nOutput Parameter:\n- `is` - the global `IS`\n\nNote:\nRedundant entries in the stencils argument are ignored\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `IS`, `DMStagStencil`, `DMCreateGlobalVector`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreateISFromStencils\"))\n\"\"\"\nfunction DMStagCreateISFromStencils(petsclib::PetscLibType, dm::PetscDM, n_stencil::PetscInt, stencils::Vector{DMStagStencil}) end\n\n@for_petsc function DMStagCreateISFromStencils(petsclib::$UnionPetscLib, dm::PetscDM, n_stencil::$PetscInt, stencils::Vector{DMStagStencil} )\n\tis_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMStagCreateISFromStencils, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{DMStagStencil}, Ptr{CIS}),\n               dm, n_stencil, stencils, is_,\n              )\n\n\tis = is_[]\n\n\treturn is\nend \n\n\"\"\"\n\tdof::PetscInt = DMStagGetLocationDOF(petsclib::PetscLibType,dm::PetscDM, loc::DMStagStencilLocation) \nGet number of DOF associated with a given point in a `DMSTAG` grid\n\nNot Collective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `loc` - grid point (see `DMStagStencilLocation`)\n\nOutput Parameter:\n- `dof` - the number of DOF (components) living at `loc` in `dm`\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencilLocation`, `DMStagStencil`, `DMDAGetDof()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetLocationDOF\"))\n\"\"\"\nfunction DMStagGetLocationDOF(petsclib::PetscLibType, dm::PetscDM, loc::DMStagStencilLocation) end\n\n@for_petsc function DMStagGetLocationDOF(petsclib::$UnionPetscLib, dm::PetscDM, loc::DMStagStencilLocation )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetLocationDOF, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMStagStencilLocation, Ptr{$PetscInt}),\n               dm, loc, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tval::PetscScalar = DMStagMatGetValuesStencil(petsclib::PetscLibType,dm::PetscDM, mat::PetscMat, nRow::PetscInt, posRow::DMStagStencil, nCol::PetscInt, posCol::DMStagStencil) \nretrieve local matrix entries using grid indexing\n\nNot Collective\n\nInput Parameters:\n- `dm`     - the `DMSTAG` object\n- `mat`    - the matrix\n- `nRow`   - number of rows\n- `posRow` - grid locations (including components) of rows\n- `nCol`   - number of columns\n- `posCol` - grid locations (including components) of columns\n\nOutput Parameter:\n- `val` - logically two-dimensional array of values\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecGetValuesStencil()`, `DMStagVecSetValuesStencil()`, `DMStagMatSetValuesStencil()`, `MatSetValuesStencil()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagMatGetValuesStencil\"))\n\"\"\"\nfunction DMStagMatGetValuesStencil(petsclib::PetscLibType, dm::PetscDM, mat::PetscMat, nRow::PetscInt, posRow::Vector{DMStagStencil}, nCol::PetscInt, posCol::Vector{DMStagStencil}) end\n\n@for_petsc function DMStagMatGetValuesStencil(petsclib::$UnionPetscLib, dm::PetscDM, mat::PetscMat, nRow::$PetscInt, posRow::Vector{DMStagStencil}, nCol::$PetscInt, posCol::Vector{DMStagStencil} )\n    # Prepare output buffer (flat) and pass pointer to PETSc\n    vals = Vector{$PetscScalar}(undef, nRow * nCol)\n\n    @chk ccall(\n            (:DMStagMatGetValuesStencil, $petsc_library),\n            PetscErrorCode,\n            (CDM, CMat, $PetscInt, Ptr{DMStagStencil}, $PetscInt, Ptr{DMStagStencil}, Ptr{$PetscScalar}),\n            dm, mat, nRow, posRow, nCol, posCol, vals,\n            )\n\n    # reshape into 2D Julia array (rows x cols)\n    return reshape(vals, nRow, nCol)\nend \n\n\"\"\"\n\tDMStagMatSetValuesStencil(petsclib::PetscLibType,dm::PetscDM, mat::PetscMat, nRow::PetscInt, posRow::DMStagStencil, nCol::PetscInt, posCol::DMStagStencil, val::PetscScalar, insertMode::InsertMode) \ninsert or add matrix entries using grid indexing\n\nNot Collective\n\nInput Parameters:\n- `dm`         - the `DMSTAG` object\n- `mat`        - the matrix\n- `nRow`       - number of rows\n- `posRow`     - grid locations (including components) of rows\n- `nCol`       - number of columns\n- `posCol`     - grid locations (including components) of columns\n- `val`        - logically two-dimensional array of values\n- `insertMode` - `INSERT_VALUES` or `ADD_VALUES`\n\nNotes:\nSee notes for `MatSetValuesStencil()`\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecGetValuesStencil()`, `DMStagVecSetValuesStencil()`, `DMStagMatGetValuesStencil()`, `MatSetValuesStencil()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagMatSetValuesStencil\"))\n\"\"\"\nfunction DMStagMatSetValuesStencil(petsclib::PetscLibType, dm::PetscDM, mat::PetscMat, nRow::PetscInt, posRow::DMStagStencil, nCol::PetscInt, posCol::DMStagStencil, val::PetscScalar, insertMode::InsertMode) end\n\n@for_petsc function DMStagMatSetValuesStencil(petsclib::$UnionPetscLib, dm::PetscDM, mat::PetscMat, nRow::$PetscInt, posRow::Vector{DMStagStencil}, nCol::$PetscInt, posCol::Vector{DMStagStencil}, val::Vector{$PetscScalar}, insertMode::InsertMode )\n\n    @chk ccall(\n               (:DMStagMatSetValuesStencil, $petsc_library),\n               PetscErrorCode,\n               (CDM, CMat, $PetscInt, Ptr{DMStagStencil}, $PetscInt, Ptr{DMStagStencil}, Ptr{$PetscScalar}, InsertMode),\n               dm, mat, nRow, posRow, nCol, posCol, val, insertMode,\n              )\n\n\treturn nothing\nend \n\n\"\"\"\n\tix::PetscInt = DMStagStencilToIndexLocal(petsclib::PetscLibType,dm::PetscDM, dim::PetscInt, n::PetscInt, pos::DMStagStencil) \nConvert an array of `DMStagStenci`l objects to an array of indices into a local vector.\n\nNot Collective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `dim` - the dimension of the `DMSTAG` object\n- `n`   - the number of `DMStagStencil` objects\n- `pos` - an array of `n` `DMStagStencil` objects\n\nOutput Parameter:\n- `ix` - output array of `n` indices\n\nNotes:\nThe `DMStagStencil` objects in `pos` use global element indices.\n\nThe `.c` fields in `pos` must always be set (even if to `0`).\n\nDeveloper Notes:\nThis is a \"hot\" function, and accepts the dimension redundantly to avoid having to perform any error checking inside the function.\n\nLevel: developer\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencilLocation`, `DMStagStencil`, `DMGetLocalVector`, `DMCreateLocalVector`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagStencilToIndexLocal\"))\n\"\"\"\nfunction DMStagStencilToIndexLocal(petsclib::PetscLibType, dm::PetscDM, dim::PetscInt, n::PetscInt, pos::DMStagStencil) end\n\n@for_petsc function DMStagStencilToIndexLocal(petsclib::$UnionPetscLib, dm::PetscDM, dim::$PetscInt, n::$PetscInt, pos::Vector{DMStagStencil} )\n\t#ix_ = Ref{$PetscInt}()\n\n    ix = Vector{$PetscInt}(undef, n)\n    @chk ccall(\n               (:DMStagStencilToIndexLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{DMStagStencil}, Ptr{$PetscInt}),\n               dm, dim, n, pos, ix,\n              )\n\n\t#ix = ix_[]\n\n\treturn ix\nend \n\n\"\"\"\n\tval::PetscScalar = DMStagVecGetValuesStencil(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, n::PetscInt, pos::DMStagStencil) \nget vector values using grid indexing\n\nNot Collective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `vec` - the vector object\n- `n`   - the number of values to obtain\n- `pos` - locations to obtain values from (as an array of `DMStagStencil` values)\n\nOutput Parameter:\n- `val` - value at the point\n\nNotes:\nAccepts stencils which refer to global element numbers, but\nonly allows access to entries in the local representation (including ghosts).\n\nThis approach is not as efficient as getting values directly with `DMStagVecGetArray()`,\nwhich is recommended for matrix-free operators.\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecSetValuesStencil()`, `DMStagMatSetValuesStencil()`, `DMStagVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecGetValuesStencil\"))\n\"\"\"\nfunction DMStagVecGetValuesStencil(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, n::PetscInt, pos::Vector{DMStagStencil}) end\n\n@for_petsc function DMStagVecGetValuesStencil(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, n::$PetscInt, pos::Vector{DMStagStencil})\n    # Allocate the output array (PETSc writes into this buffer)\n    @assert n>0\n\n    vals = Vector{$PetscScalar}(undef, n)\n\n    @chk ccall(\n        (:DMStagVecGetValuesStencil, $petsc_library),\n        PetscErrorCode,\n        (CDM, CVec, $PetscInt, Ptr{DMStagStencil}, Ptr{$PetscScalar}),\n        dm, vec, n, pos, vals,\n    )\n\n    return vals\nend \n\n\"\"\"\n\tDMStagVecSetValuesStencil(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, n::PetscInt, pos::DMStagStencil, val::PetscScalar, insertMode::InsertMode) \nSet `Vec` values using global grid indexing\n\nNot Collective\n\nInput Parameters:\n- `dm`         - the `DMSTAG` object\n- `vec`        - the `Vec`\n- `n`          - the number of values to set\n- `pos`        - the locations to set values, as an array of `DMStagStencil` structs\n- `val`        - the values to set\n- `insertMode` - `INSERT_VALUES` or `ADD_VALUES`\n\nNotes:\nThe vector is expected to be a global vector compatible with the DM (usually obtained by `DMGetGlobalVector()` or `DMCreateGlobalVector()`).\n\nThis approach is not as efficient as setting values directly with `DMStagVecGetArray()`, which is recommended for matrix-free operators.\nFor assembling systems, where overhead may be less important than convenience, this routine could be helpful in assembling a righthand side and a matrix (using `DMStagMatSetValuesStencil()`).\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `Vec`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecGetValuesStencil()`, `DMStagMatSetValuesStencil()`, `DMCreateGlobalVector()`, `DMGetLocalVector()`, `DMStagVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecSetValuesStencil\"))\n\"\"\"\nfunction DMStagVecSetValuesStencil(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, n::PetscInt, pos::DMStagStencil, val::PetscScalar, insertMode::InsertMode) end\n\n@for_petsc function DMStagVecSetValuesStencil(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, n::$PetscInt, pos::Vector{DMStagStencil}, val::Vector{$PetscScalar}, insertMode::InsertMode )\n\n    @chk ccall(\n               (:DMStagVecSetValuesStencil, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, $PetscInt, Ptr{DMStagStencil}, Ptr{$PetscScalar}, InsertMode),\n               dm, vec, n, pos, val, insertMode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagRestrictSimple(petsclib::PetscLibType,dmf::PetscDM, xf::PetscVec, dmc::PetscDM, xc::PetscVec) \nrestricts data from a fine to a coarse `DMSTAG`, in the simplest way\n\nValues on coarse cells are averages of all fine cells that they cover.\nThus, values on vertices are injected, values on edges are averages\nof the underlying two fine edges, and values on elements in\nd dimensions are averages of 2^d underlying elements.\n\nInput Parameters:\n- `dmf` - fine `DM`\n- `xf`  - data on fine `DM`\n- `dmc` - coarse `DM`\n\nOutput Parameter:\n- `xc` - data on coarse `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DM`, `DMRestrict()`, `DMCoarsen()`, `DMCreateInjection()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagRestrictSimple\"))\n\"\"\"\nfunction DMStagRestrictSimple(petsclib::PetscLibType, dmf::PetscDM, xf::PetscVec, dmc::PetscDM, xc::PetscVec) end\n\n@for_petsc function DMStagRestrictSimple(petsclib::$UnionPetscLib, dmf::PetscDM, xf::PetscVec, dmc::PetscDM, xc::PetscVec )\n\n    @chk ccall(\n               (:DMStagRestrictSimple, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CDM, CVec),\n               dmf, xf, dmc, xc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMStagCreate3d(petsclib::PetscLibType,comm::MPI_Comm, bndx::DMBoundaryType, bndy::DMBoundaryType, bndz::DMBoundaryType, M::PetscInt, N::PetscInt, P::PetscInt, m::PetscInt, n::PetscInt, p::PetscInt, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, dof3::PetscInt, stencilType::DMStagStencilType, stencilWidth::PetscInt, lx::Vector{PetscInt}, ly::Vector{PetscInt}, lz::Vector{PetscInt}) \nCreate an object to manage data living on the elements, faces, edges, and vertices of a parallelized regular 3D grid.\n\nCollective\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `bndx`         - x boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `bndy`         - y boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `bndz`         - z boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `M`            - global number of elements in x direction\n- `N`            - global number of elements in y direction\n- `P`            - global number of elements in z direction\n- `m`            - number of ranks in the x direction (may be `PETSC_DECIDE`)\n- `n`            - number of ranks in the y direction (may be `PETSC_DECIDE`)\n- `p`            - number of ranks in the z direction (may be `PETSC_DECIDE`)\n- `dof0`         - number of degrees of freedom per vertex/0-cell\n- `dof1`         - number of degrees of freedom per edge/1-cell\n- `dof2`         - number of degrees of freedom per face/2-cell\n- `dof3`         - number of degrees of freedom per element/3-cell\n- `stencilType`  - ghost/halo region type: `DMSTAG_STENCIL_NONE`, `DMSTAG_STENCIL_BOX`, or `DMSTAG_STENCIL_STAR`\n- `stencilWidth` - width, in elements, of halo/ghost region\n- `lx`           - array of local x  element counts, of length equal to `m`, summing to `M`, or `NULL`\n- `ly`           - arrays of local y element counts, of length equal to `n`, summing to `N`, or `NULL`\n- `lz`           - arrays of local z element counts, of length equal to `p`, summing to `P`, or `NULL`\n\nOutput Parameter:\n- `dm` - the new `DMSTAG` object\n\nOptions Database Keys:\n- `-dm_view`                                      - calls `DMViewFromOptions()` at the conclusion of `DMSetUp()`\n- `-stag_grid_x <nx>`                             - number of elements in the x direction\n- `-stag_grid_y <ny>`                             - number of elements in the y direction\n- `-stag_grid_z <nz>`                             - number of elements in the z direction\n- `-stag_ranks_x <rx>`                            - number of ranks in the x direction\n- `-stag_ranks_y <ry>`                            - number of ranks in the y direction\n- `-stag_ranks_z <rz>`                            - number of ranks in the z direction\n- `-stag_ghost_stencil_width`                     - width of ghost region, in elements\n- `-stag_boundary_type x <none,ghosted,periodic>` - `DMBoundaryType` value\n- `-stag_boundary_type y <none,ghosted,periodic>` - `DMBoundaryType` value\n- `-stag_boundary_type z <none,ghosted,periodic>` - `DMBoundaryType` value\n\nLevel: beginner\n\nNotes:\nYou must call `DMSetUp()` after this call before using the `DM`.\nIf you wish to use the options database (see the keys above) to change values in the `DMSTAG`, you must call\n`DMSetFromOptions()` after this function but before `DMSetUp()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMLocalToGlobalBegin()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate3d\"))\n\"\"\"\nfunction DMStagCreate3d(petsclib::PetscLibType, comm::MPI_Comm, bndx::DMBoundaryType, bndy::DMBoundaryType, bndz::DMBoundaryType, M::PetscInt, N::PetscInt, P::PetscInt, m::PetscInt, n::PetscInt, p::PetscInt, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, dof3::PetscInt, stencilType::DMStagStencilType, stencilWidth::PetscInt, lx::Union{Ptr,Vector{PetscInt}}, ly::Union{Ptr,Vector{PetscInt}}, lz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function DMStagCreate3d(petsclib::$UnionPetscLib, comm::MPI_Comm, bndx::DMBoundaryType, bndy::DMBoundaryType, bndz::DMBoundaryType, M::$PetscInt, N::$PetscInt, P::$PetscInt, m::$PetscInt, n::$PetscInt, p::$PetscInt, dof0::$PetscInt, dof1::$PetscInt, dof2::$PetscInt, dof3::$PetscInt, stencilType::DMStagStencilType, stencilWidth::$PetscInt, lx::Union{Ptr,Vector{$PetscInt}}, ly::Union{Ptr,Vector{$PetscInt}}, lz::Union{Ptr,Vector{$PetscInt}} )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMStagCreate3d, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMBoundaryType, DMBoundaryType, DMBoundaryType, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, DMStagStencilType, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CDM}),\n               comm, bndx, bndy, bndz, M, N, P, m, n, p, dof0, dof1, dof2, dof3, stencilType, stencilWidth, lx, ly, lz, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tboundaryTypeX::DMBoundaryType,boundaryTypeY::DMBoundaryType,boundaryTypeZ::DMBoundaryType = DMStagGetBoundaryTypes(petsclib::PetscLibType,dm::PetscDM) \nget boundary types\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `boundaryTypeX` - boundary type for x direction\n- `boundaryTypeY` - boundary type for y direction, not set for one dimensional problems\n- `boundaryTypeZ` - boundary type for z direction, not set for one and two dimensional problems\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMBoundaryType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetBoundaryTypes\"))\n\"\"\"\nfunction DMStagGetBoundaryTypes(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetBoundaryTypes(petsclib::$UnionPetscLib, dm::PetscDM )\n\tboundaryTypeX_ = Ref{DMBoundaryType}()\n\tboundaryTypeY_ = Ref{DMBoundaryType}()\n\tboundaryTypeZ_ = Ref{DMBoundaryType}()\n\n    @chk ccall(\n               (:DMStagGetBoundaryTypes, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMBoundaryType}, Ptr{DMBoundaryType}, Ptr{DMBoundaryType}),\n               dm, boundaryTypeX_, boundaryTypeY_, boundaryTypeZ_,\n              )\n\n    boundaryTypeX = boundaryTypeX_[]\n\tboundaryTypeY = boundaryTypeY_[]\n\tboundaryTypeZ = boundaryTypeZ_[]\n\n\treturn boundaryTypeX,boundaryTypeY,boundaryTypeZ\nend \n\n\"\"\"\n\tarrX,arrY,arrZ = DMStagGetProductCoordinateArrays(petsclib::PetscLibType,dm::PetscDM) \nextract local product coordinate arrays, one per dimension\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `arrX` - local 1D coordinate arrays for x direction\n- `arrY` - local 1D coordinate arrays for y direction, not set for one dimensional problems\n- `arrZ` - local 1D coordinate arrays for z direction, not set for one and two dimensional problems\n\nLevel: intermediate\n\nNotes:\nA high-level helper function to quickly extract local coordinate arrays.\n\nNote that 2-dimensional arrays are returned. See\n`DMStagVecGetArray()`, which is called internally to produce these arrays\nrepresenting coordinates on elements and vertices (element boundaries)\nfor a 1-dimensional `DMSTAG` in each coordinate direction.\n\nOne should use `DMStagGetProductCoordinateLocationSlot()` to determine appropriate\nindices for the second dimension in these returned arrays. This function\nchecks that the coordinate array is a suitable product of 1-dimensional\n`DMSTAG` objects.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagGetProductCoordinateArraysRead()`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagGetProductCoordinateLocationSlot()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetProductCoordinateArrays\"))\n\"\"\"\nfunction DMStagGetProductCoordinateArrays(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetProductCoordinateArrays(petsclib::$UnionPetscLib, dm::PetscDM)\n    arrX_ = Ref{Ptr{Ptr{$PetscScalar}}}()\n    arrY_ = Ref{Ptr{Ptr{$PetscScalar}}}()\n    arrZ_ = Ref{Ptr{Ptr{$PetscScalar}}}()\n\n    xs,ys,zs,nx,ny,nz = DMStagGetGhostCorners(petsclib, dm)\n\n    @chk ccall(\n               (:DMStagGetProductCoordinateArrays, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ref{Ptr{Ptr{$PetscScalar}}}, Ref{Ptr{Ptr{$PetscScalar}}}, Ref{Ptr{Ptr{$PetscScalar}}}),\n               dm, arrX_, arrY_, arrZ_,\n              )\n\n    mat = unsafe_wrap(Array, unsafe_load(arrX_[], xs+1), (2,nx))\n    mat = OffsetArray(PermutedDimsArray(mat, (2,1)), xs, 0)\n    arrX = PetscArray(mat,arrX_[]) \n\n    if ny>0\n        mat = unsafe_wrap(Array, unsafe_load(arrY_[], ys+1), (2,ny))\n        mat = OffsetArray(PermutedDimsArray(mat, (2,1)), ys, 0)\n        arrY = PetscArray(mat,arrY_[]) \n    else\n        arrY = nothing\n    end\n    if nz>0\n        mat = unsafe_wrap(Array, unsafe_load(arrZ_[], zs+1), (2,nz))\n        mat = OffsetArray(PermutedDimsArray(mat, (2,1)), zs, 0)\n        arrZ = PetscArray(mat,arrZ_[]) \n    else\n        arrZ = nothing\n    end\n\n\treturn arrX,arrY,arrZ\nend \n\n\"\"\"\n\tarrX::PetscArray, arrY::PetscArray, arrZ::PetscArray = DMStagGetProductCoordinateArraysRead(petsclib::PetscLibType,dm::PetscDM) \nextract product coordinate arrays, read\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `arrX` - local 1D coordinate arrays for `x` direction\n- `arrY` - local 1D coordinate arrays for `y` direction, not set for one dimensional problems\n- `arrZ` - local 1D coordinate arrays for `z` direction, not set for one and two dimensional problems\n\nLevel: intermediate\n\nNote:\nSee `DMStagGetProductCoordinateArrays()` for more information.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagGetProductCoordinateArrays()`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagGetProductCoordinateLocationSlot()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetProductCoordinateArraysRead\"))\n\"\"\"\nfunction DMStagGetProductCoordinateArraysRead(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetProductCoordinateArraysRead(petsclib::$UnionPetscLib, dm::PetscDM)\n    arrX_ = Ref{Ptr{Ptr{$PetscScalar}}}()\n    arrY_ = Ref{Ptr{Ptr{$PetscScalar}}}()\n    arrZ_ = Ref{Ptr{Ptr{$PetscScalar}}}()\n\n    xs,ys,zs,nx,ny,nz = DMStagGetGhostCorners(petsclib, dm)\n\n    @chk ccall(\n               (:DMStagGetProductCoordinateArraysRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ref{Ptr{Ptr{$PetscScalar}}}, Ref{Ptr{Ptr{$PetscScalar}}}, Ref{Ptr{Ptr{$PetscScalar}}}),\n               dm, arrX_, arrY_, arrZ_,\n              )\n\n    mat = unsafe_wrap(Array, unsafe_load(arrX_[], xs+1), (2,nx))\n    mat = OffsetArray(PermutedDimsArray(mat, (2,1)), xs, 0)\n    arrX = PetscArray(mat,arrX_[]) \n\n    if ny>0\n        mat = unsafe_wrap(Array, unsafe_load(arrY_[], ys+1), (2,ny))\n        mat = OffsetArray(PermutedDimsArray(mat, (2,1)), ys, 0)\n        arrY = PetscArray(mat,arrY_[]) \n    else\n        arrY = nothing\n    end\n    if nz>0\n        mat = unsafe_wrap(Array, unsafe_load(arrZ_[], zs+1), (2,nz))\n        mat = OffsetArray(PermutedDimsArray(mat, (2,1)), zs, 0)\n        arrZ = PetscArray(mat,arrZ_[]) \n    else\n        arrZ = nothing\n    end\n\n\treturn arrX,arrY,arrZ\nend \n\n\"\"\"\n\tx::PetscInt,y::PetscInt,z::PetscInt,m::PetscInt,n::PetscInt,p::PetscInt,nExtrax::PetscInt,nExtray::PetscInt,nExtraz::PetscInt = DMStagGetCorners(petsclib::PetscLibType,dm::PetscDM) \nreturn global element indices of the local region (excluding ghost points)\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `x`       - starting element index in first direction\n- `y`       - starting element index in second direction\n- `z`       - starting element index in third direction\n- `m`       - element width in first direction\n- `n`       - element width in second direction\n- `p`       - element width in third direction\n- `nExtrax` - number of extra partial elements in first direction\n- `nExtray` - number of extra partial elements in second direction\n- `nExtraz` - number of extra partial elements in third direction\n\nLevel: beginner\n\nNotes:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nThe number of extra partial elements is either 1 or 0.\nThe value is 1 on right, top, and front non-periodic domain (\"physical\") boundaries,\nin the x, y, and z directions respectively, and otherwise 0.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGhostCorners()`, `DMDAGetCorners()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetCorners\"))\n\"\"\"\nfunction DMStagGetCorners(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetCorners(petsclib::$UnionPetscLib, dm::PetscDM )\n\tx_ = Ref{$PetscInt}()\n\ty_ = Ref{$PetscInt}()\n\tz_ = Ref{$PetscInt}()\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tp_ = Ref{$PetscInt}()\n\tnExtrax_ = Ref{$PetscInt}()\n\tnExtray_ = Ref{$PetscInt}()\n\tnExtraz_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetCorners, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, x_, y_, z_, m_, n_, p_, nExtrax_, nExtray_, nExtraz_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\tz = z_[]\n\tm = m_[]\n\tn = n_[]\n\tp = p_[]\n\tnExtrax = nExtrax_[]\n\tnExtray = nExtray_[]\n\tnExtraz = nExtraz_[]\n\n\treturn x,y,z,m,n,p,nExtrax,nExtray,nExtraz\nend \n\n\"\"\"\n\tdof0::PetscInt,dof1::PetscInt,dof2::PetscInt,dof3::PetscInt = DMStagGetDOF(petsclib::PetscLibType,dm::PetscDM) \nget number of DOF associated with each stratum of the grid\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `dof0` - the number of points per 0-cell (vertex/node)\n- `dof1` - the number of points per 1-cell (element in 1D, edge in 2D and 3D)\n- `dof2` - the number of points per 2-cell (element in 2D, face in 3D)\n- `dof3` - the number of points per 3-cell (element in 3D)\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetCorners()`, `DMStagGetGhostCorners()`, `DMStagGetGlobalSizes()`, `DMStagGetStencilWidth()`, `DMStagGetBoundaryTypes()`, `DMStagGetLocationDOF()`, `DMDAGetDof()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetDOF\"))\n\"\"\"\nfunction DMStagGetDOF(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetDOF(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdof0_ = Ref{$PetscInt}()\n\tdof1_ = Ref{$PetscInt}()\n\tdof2_ = Ref{$PetscInt}()\n\tdof3_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetDOF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, dof0_, dof1_, dof2_, dof3_,\n              )\n\n\tdof0 = dof0_[]\n\tdof1 = dof1_[]\n\tdof2 = dof2_[]\n\tdof3 = dof3_[]\n\n\treturn dof0,dof1,dof2,dof3\nend \n\n\"\"\"\n\tx::PetscInt,y::PetscInt,z::PetscInt,m::PetscInt,n::PetscInt,p::PetscInt = DMStagGetGhostCorners(petsclib::PetscLibType,dm::PetscDM) \nreturn global element indices of the local region, including ghost points\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `x` - the starting element index in the first direction\n- `y` - the starting element index in the second direction\n- `z` - the starting element index in the third direction\n- `m` - the element width in the first direction\n- `n` - the element width in the second direction\n- `p` - the element width in the third direction\n\nLevel: beginner\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetCorners()`, `DMDAGetGhostCorners()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetGhostCorners\"))\n\"\"\"\nfunction DMStagGetGhostCorners(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetGhostCorners(petsclib::$UnionPetscLib, dm::PetscDM )\n\tx_ = Ref{$PetscInt}()\n\ty_ = Ref{$PetscInt}()\n\tz_ = Ref{$PetscInt}()\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetGhostCorners, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, x_, y_, z_, m_, n_, p_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\tz = z_[]\n\tm = m_[]\n\tn = n_[]\n\tp = p_[]\n\n\treturn x,y,z,m,n,p\nend \n\n\"\"\"\n\tM::PetscInt,N::PetscInt,P::PetscInt = DMStagGetGlobalSizes(petsclib::PetscLibType,dm::PetscDM) \nget global element counts\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `M` - global element counts in the x direction\n- `N` - global element counts in the y direction\n- `P` - global element counts in the z direction\n\nLevel: beginner\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetLocalSizes()`, `DMDAGetInfo()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetGlobalSizes\"))\n\"\"\"\nfunction DMStagGetGlobalSizes(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetGlobalSizes(petsclib::$UnionPetscLib, dm::PetscDM )\n\tM_ = Ref{$PetscInt}()\n\tN_ = Ref{$PetscInt}()\n\tP_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetGlobalSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, M_, N_, P_,\n              )\n\n\tM = M_[]\n\tN = N_[]\n\tP = P_[]\n\n\treturn M,N,P\nend \n\n\"\"\"\n\tisFirstRank0::PetscBool,isFirstRank1::PetscBool,isFirstRank2::PetscBool = DMStagGetIsFirstRank(petsclib::PetscLibType,dm::PetscDM) \nget boolean value for whether this rank is first in each direction in the rank grid\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `isFirstRank0` - whether this rank is first in the x direction\n- `isFirstRank1` - whether this rank is first in the y direction\n- `isFirstRank2` - whether this rank is first in the z direction\n\nLevel: intermediate\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetIsLastRank()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetIsFirstRank\"))\n\"\"\"\nfunction DMStagGetIsFirstRank(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetIsFirstRank(petsclib::$UnionPetscLib, dm::PetscDM )\n\tisFirstRank0_ = Ref{PetscBool}()\n\tisFirstRank1_ = Ref{PetscBool}()\n\tisFirstRank2_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMStagGetIsFirstRank, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}, Ptr{PetscBool}, Ptr{PetscBool}),\n               dm, isFirstRank0_, isFirstRank1_, isFirstRank2_,\n              )\n\n\tisFirstRank0 = isFirstRank0_[]\n\tisFirstRank1 = isFirstRank1_[]\n\tisFirstRank2 = isFirstRank2_[]\n\n\treturn isFirstRank0,isFirstRank1,isFirstRank2\nend \n\n\"\"\"\n\tisLastRank0::PetscBool,isLastRank1::PetscBool,isLastRank2::PetscBool = DMStagGetIsLastRank(petsclib::PetscLibType,dm::PetscDM) \nget boolean value for whether this rank is last in each direction in the rank grid\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `isLastRank0` - whether this rank is last in the x direction\n- `isLastRank1` - whether this rank is last in the y direction\n- `isLastRank2` - whether this rank is last in the z direction\n\nLevel: intermediate\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetIsFirstRank()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetIsLastRank\"))\n\"\"\"\nfunction DMStagGetIsLastRank(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetIsLastRank(petsclib::$UnionPetscLib, dm::PetscDM )\n\tisLastRank0_ = Ref{PetscBool}()\n\tisLastRank1_ = Ref{PetscBool}()\n\tisLastRank2_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMStagGetIsLastRank, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}, Ptr{PetscBool}, Ptr{PetscBool}),\n               dm, isLastRank0_, isLastRank1_, isLastRank2_,\n              )\n\n\tisLastRank0 = isLastRank0_[]\n\tisLastRank1 = isLastRank1_[]\n\tisLastRank2 = isLastRank2_[]\n\n\treturn isLastRank0,isLastRank1,isLastRank2\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt,p::PetscInt = DMStagGetLocalSizes(petsclib::PetscLibType,dm::PetscDM) \nget local elementwise sizes\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `m` - local element counts (excluding ghosts) in the x direction\n- `n` - local element counts (excluding ghosts) in the y direction\n- `p` - local element counts (excluding ghosts) in the z direction\n\nLevel: beginner\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGlobalSizes()`, `DMStagGetDOF()`, `DMStagGetNumRanks()`, `DMDAGetLocalInfo()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetLocalSizes\"))\n\"\"\"\nfunction DMStagGetLocalSizes(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetLocalSizes(petsclib::$UnionPetscLib, dm::PetscDM )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetLocalSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, m_, n_, p_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\tp = p_[]\n\n\treturn m,n,p\nend \n\n\"\"\"\n\tnRanks0::PetscInt,nRanks1::PetscInt,nRanks2::PetscInt = DMStagGetNumRanks(petsclib::PetscLibType,dm::PetscDM) \nget number of ranks in each direction in the global grid decomposition\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `nRanks0` - number of ranks in the x direction in the grid decomposition\n- `nRanks1` - number of ranks in the y direction in the grid decomposition\n- `nRanks2` - number of ranks in the z direction in the grid decomposition\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGlobalSizes()`, `DMStagGetLocalSize()`, `DMStagSetNumRanks()`, `DMDAGetInfo()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetNumRanks\"))\n\"\"\"\nfunction DMStagGetNumRanks(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetNumRanks(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnRanks0_ = Ref{$PetscInt}()\n\tnRanks1_ = Ref{$PetscInt}()\n\tnRanks2_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetNumRanks, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, nRanks0_, nRanks1_, nRanks2_,\n              )\n\n\tnRanks0 = nRanks0_[]\n\tnRanks1 = nRanks1_[]\n\tnRanks2 = nRanks2_[]\n\n\treturn nRanks0,nRanks1,nRanks2\nend \n\n\"\"\"\n\tentries::PetscInt = DMStagGetEntries(petsclib::PetscLibType,dm::PetscDM) \nget number of native entries in the global representation\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n- `entries` - number of rank-native entries in the global representation\n\nLevel: developer\n\nNote:\nThis is the number of entries on this rank for a global vector associated with `dm`.\nThat is, it is value of `size` returned by `VecGetLocalSize(vec,&size)` when\n`DMCreateGlobalVector(dm,&vec) is used to create a `Vec`. Users would typically\nuse these functions.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetDOF()`, `DMStagGetEntriesLocal()`, `DMStagGetEntriesPerElement()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetEntries\"))\n\"\"\"\nfunction DMStagGetEntries(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetEntries(petsclib::$UnionPetscLib, dm::PetscDM )\n\tentries_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetEntries, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, entries_,\n              )\n\n\tentries = entries_[]\n\n\treturn entries\nend \n\n\"\"\"\n\tentries::PetscInt = DMStagGetEntriesLocal(petsclib::PetscLibType,dm::PetscDM) \nget number of entries in the local representation\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n- `entries` - number of entries in the local representation\n\nLevel: developer\n\nNote:\nThis is the number of entries on this rank in the local representation.\nThat is, it is value of `size` returned by `VecGetSize(vec,&size)` or\n`VecGetLocalSize(vec,&size)` when `DMCreateLocalVector(dm,&vec)` is used to\ncreate a `Vec`. Users would typically use these functions.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetDOF()`, `DMStagGetEntries()`, `DMStagGetEntriesPerElement()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetEntriesLocal\"))\n\"\"\"\nfunction DMStagGetEntriesLocal(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetEntriesLocal(petsclib::$UnionPetscLib, dm::PetscDM )\n\tentries_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetEntriesLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, entries_,\n              )\n\n\tentries = entries_[]\n\n\treturn entries\nend \n\n\"\"\"\n\tentriesPerElement::PetscInt = DMStagGetEntriesPerElement(petsclib::PetscLibType,dm::PetscDM) \nget number of entries per element in the local representation\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n- `entriesPerElement` - number of entries associated with each element in the local representation\n\nLevel: developer\n\nNotes:\nThis is the natural block size for most local operations. In 1D it is equal to `dof0` + `dof1`,\nin 2D it is equal to `dof0` + 2`dof1` + `dof2`, and in 3D it is equal to `dof0` + 3`dof1` + 3`dof2` + `dof3`\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetDOF()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetEntriesPerElement\"))\n\"\"\"\nfunction DMStagGetEntriesPerElement(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetEntriesPerElement(petsclib::$UnionPetscLib, dm::PetscDM )\n\tentriesPerElement_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetEntriesPerElement, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, entriesPerElement_,\n              )\n\n\tentriesPerElement = entriesPerElement_[]\n\n\treturn entriesPerElement\nend \n\n\"\"\"\n\tstencilType::DMStagStencilType = DMStagGetStencilType(petsclib::PetscLibType,dm::PetscDM) \nget elementwise ghost/halo stencil type\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n- `stencilType` - the elementwise ghost stencil type: `DMSTAG_STENCIL_BOX`, `DMSTAG_STENCIL_STAR`, or `DMSTAG_STENCIL_NONE`\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetStencilType()`, `DMStagGetStencilWidth`, `DMStagStencilType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetStencilType\"))\n\"\"\"\nfunction DMStagGetStencilType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetStencilType(petsclib::$UnionPetscLib, dm::PetscDM )\n\tstencilType_ = Ref{DMStagStencilType}()\n\n    @chk ccall(\n               (:DMStagGetStencilType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMStagStencilType}),\n               dm, stencilType_,\n              )\n\n\tstencilType = stencilType_[]\n\n\treturn stencilType\nend \n\n\"\"\"\n\tstencilWidth::PetscInt = DMStagGetStencilWidth(petsclib::PetscLibType,dm::PetscDM) \nget elementwise stencil width\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n- `stencilWidth` - stencil/halo/ghost width in elements\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetStencilWidth()`, `DMStagGetStencilType()`, `DMDAGetStencilType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetStencilWidth\"))\n\"\"\"\nfunction DMStagGetStencilWidth(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetStencilWidth(petsclib::$UnionPetscLib, dm::PetscDM )\n\tstencilWidth_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetStencilWidth, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, stencilWidth_,\n              )\n\n\tstencilWidth = stencilWidth_[]\n\n\treturn stencilWidth\nend \n\n\"\"\"\n\tlx::Vector{PetscInt},ly::Vector{PetscInt},lz::Vector{PetscInt} = DMStagGetOwnershipRanges(petsclib::PetscLibType,dm::PetscDM) \nget elements per rank in each direction\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `lx` - ownership along x direction (optional)\n- `ly` - ownership along y direction (optional)\n- `lz` - ownership along z direction (optional)\n\nLevel: intermediate\n\nNotes:\nThese correspond to the optional final arguments passed to `DMStagCreate1d()`, `DMStagCreate2d()`, and `DMStagCreate3d()`.\n\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nIn C you should not free these arrays, nor change the values in them.\nThey will only have valid values while the `DMSTAG` they came from still exists (has not been destroyed).\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetGlobalSizes()`, `DMStagSetOwnershipRanges()`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDAGetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetOwnershipRanges\"))\n\"\"\"\nfunction DMStagGetOwnershipRanges(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetOwnershipRanges(petsclib::$UnionPetscLib, dm::PetscDM )\n\tlx_ = Ref{Ptr{$PetscInt}}()\n\tly_ = Ref{Ptr{$PetscInt}}()\n\tlz_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMStagGetOwnershipRanges, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               dm, lx_, ly_, lz_,\n              )\n    # todo: determine the sizes of these arrays to wrap them properly\n\t#lx = unsafe_wrap(Array, lx_[], VecGetLocalSize(petsclib, x); own = false)\n\t#ly = unsafe_wrap(Array, ly_[], VecGetLocalSize(petsclib, x); own = false)\n\t#lz = unsafe_wrap(Array, lz_[], VecGetLocalSize(petsclib, x); own = false)\n    lx = lx_[]\n    ly = ly_[]\n    lz = lz_[]\n\treturn lx,ly,lz\nend \n\n\"\"\"\n\tnewdm::PetscDM = DMStagCreateCompatibleDMStag(petsclib::PetscLibType,dm::PetscDM, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, dof3::PetscInt) \ncreate a compatible `DMSTAG` with different dof/stratum\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMSTAG` object\n- `dof0` - number of dof on the first stratum in the new `DMSTAG`\n- `dof1` - number of dof on the second stratum in the new `DMSTAG`\n- `dof2` - number of dof on the third stratum in the new `DMSTAG`\n- `dof3` - number of dof on the fourth stratum in the new `DMSTAG`\n\nOutput Parameter:\n- `newdm` - the new, compatible `DMSTAG`\n\nLevel: intermediate\n\nNotes:\nDOF supplied for strata too big for the dimension are ignored; these may be set to `0`.\nFor example, for a 2-dimensional `DMSTAG`, `dof2` sets the number of dof per element,\nand `dof3` is unused. For a 3-dimensional `DMSTAG`, `dof3` sets the number of DOF per element.\n\nIn contrast to `DMDACreateCompatibleDMDA()`, coordinates are not reused.\n\nSee also: \n=== \n`DMSTAG`, `DMDACreateCompatibleDMDA()`, `DMGetCompatibility()`, `DMStagMigrateVec()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreateCompatibleDMStag\"))\n\"\"\"\nfunction DMStagCreateCompatibleDMStag(petsclib::PetscLibType, dm::PetscDM, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, dof3::PetscInt) end\n\n@for_petsc function DMStagCreateCompatibleDMStag(petsclib::$UnionPetscLib, dm::PetscDM{PetscLib}, dof0::$PetscInt, dof1::$PetscInt, dof2::$PetscInt, dof3::$PetscInt ) where {PetscLib}\n\tnewdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMStagCreateCompatibleDMStag, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{CDM}),\n               dm, dof0, dof1, dof2, dof3, newdm_,\n              )\n\n\tnewdm = PetscDM{PetscLib}(newdm_[], 0)\n\n\treturn newdm\nend \n\n\"\"\"\n\tslot::PetscInt = DMStagGetLocationSlot(petsclib::PetscLibType,dm::PetscDM, loc::DMStagStencilLocation, c::PetscInt) \nget index to use in accessing raw local arrays\n\nNot Collective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `loc` - location relative to an element\n- `c`   - component\n\nOutput Parameter:\n- `slot` - index to use\n\nLevel: beginner\n\nNotes:\nProvides an appropriate index to use with `DMStagVecGetArray()` and friends.\nThis is required so that the user doesn't need to know about the ordering of\ndof associated with each local element.\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArray()`, `DMStagVecGetArrayRead()`, `DMStagGetDOF()`, `DMStagGetEntriesPerElement()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetLocationSlot\"))\n\"\"\"\nfunction DMStagGetLocationSlot(petsclib::PetscLibType, dm::PetscDM, loc::DMStagStencilLocation, c::PetscInt) end\n\n@for_petsc function DMStagGetLocationSlot(petsclib::$UnionPetscLib, dm::PetscDM, loc::DMStagStencilLocation, c::$PetscInt )\n\tslot_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetLocationSlot, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMStagStencilLocation, $PetscInt, Ptr{$PetscInt}),\n               dm, loc, c, slot_,\n              )\n\n\tslot = slot_[]\n\n\treturn slot\nend \n\n\"\"\"\n\trefine_x::PetscInt,refine_y::PetscInt,refine_z::PetscInt = DMStagGetRefinementFactor(petsclib::PetscLibType,dm::PetscDM) \nget refinement ratios in each direction\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n- `refine_x` - ratio of fine grid to coarse in x-direction (2 by default)\n- `refine_y` - ratio of fine grid to coarse in y-direction (2 by default)\n- `refine_z` - ratio of fine grid to coarse in z-direction (2 by default)\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMRefine()`, `DMCoarsen()`, `DMStagSetRefinementFactor()`, `DMDASetRefinementFactor()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetRefinementFactor\"))\n\"\"\"\nfunction DMStagGetRefinementFactor(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagGetRefinementFactor(petsclib::$UnionPetscLib, dm::PetscDM )\n\trefine_x_ = Ref{$PetscInt}()\n\trefine_y_ = Ref{$PetscInt}()\n\trefine_z_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMStagGetRefinementFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, refine_x_, refine_y_, refine_z_,\n              )\n\n\trefine_x = refine_x_[]\n\trefine_y = refine_y_[]\n\trefine_z = refine_z_[]\n\n\treturn refine_x,refine_y,refine_z\nend \n\n\"\"\"\n\tDMStagMigrateVec(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, dmTo::PetscDM, vecTo::PetscVec) \ntransfer a vector associated with a `DMSTAG` to a vector associated with a compatible `DMSTAG`\n\nCollective\n\nInput Parameters:\n- `dm`    - the source `DMSTAG` object\n- `vec`   - the source vector, compatible with `dm`\n- `dmTo`  - the compatible destination `DMSTAG` object\n- `vecTo` - the destination vector, compatible with `dmTo`\n\nLevel: advanced\n\nNotes:\nExtra dof are ignored, and unfilled dof are zeroed.\nCurrently only implemented to migrate global vectors to global vectors.\nFor the definition of compatibility of `DM`s, see `DMGetCompatibility()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreateCompatibleDMStag()`, `DMGetCompatibility()`, `DMStagVecSplitToDMDA()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagMigrateVec\"))\n\"\"\"\nfunction DMStagMigrateVec(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, dmTo::PetscDM, vecTo::PetscVec) end\n\n@for_petsc function DMStagMigrateVec(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, dmTo::PetscDM, vecTo::PetscVec )\n\n    @chk ccall(\n               (:DMStagMigrateVec, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CDM, CVec),\n               dm, vec, dmTo, vecTo,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagPopulateLocalToGlobalInjective(petsclib::PetscLibType,dm::PetscDM) \npopulate an internal 1\n\nCollective\n\nCreates an internal object which explicitly maps a single local degree of\nfreedom to each global degree of freedom. This is used, if populated,\ninstead of SCATTER_REVERSE_LOCAL with the (1-to-many, in general)\nglobal-to-local map, when DMLocalToGlobal() is called with INSERT_VALUES.\nThis allows usage, for example, even in the periodic, 1-rank case, where\nthe inverse of the global-to-local map, even when restricted to on-rank\ncommunication, is non-injective. This is at the cost of storing an additional\nVecScatter object inside each `DMSTAG` object.\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n\nLevel: developer\n\nNotes:\nIn normal usage, library users shouldn't be concerned with this function,\nas it is called during `DMSetUp()`, when required.\n\nReturns immediately if the internal map is already populated.\n\nDeveloper Notes:\nThis could, if desired, be moved up to a general `DM` routine. It would allow,\nfor example, `DMDA` to support `DMLocalToGlobal()` with `INSERT_VALUES`,\neven in the single-rank periodic case.\n\nSee also: \n=== \n`DMSTAG`, `DMLocalToGlobal()`, `VecScatter`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagPopulateLocalToGlobalInjective\"))\n\"\"\"\nfunction DMStagPopulateLocalToGlobalInjective(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMStagPopulateLocalToGlobalInjective(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMStagPopulateLocalToGlobalInjective, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagRestoreProductCoordinateArrays(petsclib::PetscLibType,dm::PetscDM, arrX::PetscArray, arrY::PetscArray, arrZ::PetscArray) \nrestore local array access\n\nLogically Collective\n\nInput Parameter:\n- `dm` - the `DMSTAG` object\n- `arrX` - local 1D coordinate arrays for x direction\n- `arrY` - local 1D coordinate arrays for y direction\n- `arrZ` - local 1D coordinate arrays for z direction\n\nLevel: intermediate\n\nNotes:\nThis function does not automatically perform a local->global scatter to populate global coordinates from the local coordinates.\nThus, it may be required to explicitly perform these operations in some situations, as in the following partial example:\n-vb\nPetscCall(DMGetCoordinateDM(dm, &cdm));\nfor (PetscInt d = 0; d < 3; ++d) {\nDM  subdm;\nVec coor, coor_local;\n\nPetscCall(DMProductGetDM(cdm, d, &subdm));\nPetscCall(DMGetCoordinates(subdm, &coor));\nPetscCall(DMGetCoordinatesLocal(subdm, &coor_local));\nPetscCall(DMLocalToGlobal(subdm, coor_local, INSERT_VALUES, coor));\nPetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Coordinates dim %\" PetscInt_FMT \":\\n\", d));\nPetscCall(VecView(coor, PETSC_VIEWER_STDOUT_WORLD));\n}\n-ve\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetProductCoordinateArrays()`, `DMStagGetProductCoordinateArraysRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagRestoreProductCoordinateArrays\"))\n\"\"\"\nfunction DMStagRestoreProductCoordinateArrays(petsclib::PetscLibType, dm::PetscDM, arrX::Union{PetscArray, Nothing}, arrY::Union{PetscArray, Nothing}, arrZ::Union{PetscArray, Nothing}) end\n\n@for_petsc function DMStagRestoreProductCoordinateArrays(petsclib::$UnionPetscLib, dm::PetscDM, arrX::Union{PetscArray, Nothing}, arrY::Union{PetscArray, Nothing}, arrZ::Union{PetscArray, Nothing})\n\n    refX = arrX === nothing ? C_NULL : Ref(arrX.ptr)\n    refY = arrY === nothing ? C_NULL : Ref(arrY.ptr)\n    refZ = arrZ === nothing ? C_NULL : Ref(arrZ.ptr)\n\n    @chk ccall(\n               (:DMStagRestoreProductCoordinateArrays, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{Ptr{$PetscScalar}}}, Ptr{Ptr{Ptr{$PetscScalar}}}, Ptr{Ptr{Ptr{$PetscScalar}}}),\n               dm, refX, refY, refZ\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagRestoreProductCoordinateArraysRead(petsclib::PetscLibType,dm::PetscDM, arrX::PetscArray, arrY::PetscArray, arrZ::PetscArray) \nrestore local product array access, read\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - the `DMSTAG` object\n- `arrX` - local 1D coordinate arrays for x direction\n- `arrY` - local 1D coordinate arrays for y direction\n- `arrZ` - local 1D coordinate arrays for z direction\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetProductCoordinateArrays()`, `DMStagGetProductCoordinateArraysRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagRestoreProductCoordinateArraysRead\"))\n\"\"\"\nfunction DMStagRestoreProductCoordinateArraysRead(petsclib::PetscLibType, dm::PetscDM, arrX::Union{PetscArray, Nothing}, arrY::Union{PetscArray, Nothing}, arrZ::Union{PetscArray, Nothing}) end\n\n@for_petsc function DMStagRestoreProductCoordinateArraysRead(petsclib::$UnionPetscLib, dm::PetscDM, arrX::Union{PetscArray, Nothing}, arrY::Union{PetscArray, Nothing}, arrZ::Union{PetscArray, Nothing} )\n\n    refX = arrX === nothing ? C_NULL : Ref(arrX.ptr)\n    refY = arrY === nothing ? C_NULL : Ref(arrY.ptr)\n    refZ = arrZ === nothing ? C_NULL : Ref(arrZ.ptr)\n\n    @chk ccall(\n               (:DMStagRestoreProductCoordinateArrays, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{Ptr{$PetscScalar}}}, Ptr{Ptr{Ptr{$PetscScalar}}}, Ptr{Ptr{Ptr{$PetscScalar}}}),\n               dm, refX, refY, refZ,\n              )\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetBoundaryTypes(petsclib::PetscLibType,dm::PetscDM, boundaryType0::DMBoundaryType, boundaryType1::DMBoundaryType, boundaryType2::DMBoundaryType) \nset `DMSTAG` boundary types\n\nLogically Collective; boundaryType0, boundaryType1, and boundaryType2 must contain common values\n\nInput Parameters:\n- `dm`            - the `DMSTAG` object\n- `boundaryType2` - boundary type for x direction\n- `boundaryType1` - boundary type for y direction, not set for one dimensional problems\n- `boundaryType0` - boundary type for z direction, not set for one and two dimensional problems\n\nLevel: advanced\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMBoundaryType`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDASetBoundaryType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetBoundaryTypes\"))\n\"\"\"\nfunction DMStagSetBoundaryTypes(petsclib::PetscLibType, dm::PetscDM, boundaryType0::DMBoundaryType, boundaryType1::DMBoundaryType, boundaryType2::DMBoundaryType) end\n\n@for_petsc function DMStagSetBoundaryTypes(petsclib::$UnionPetscLib, dm::PetscDM, boundaryType0::DMBoundaryType, boundaryType1::DMBoundaryType, boundaryType2::DMBoundaryType )\n\n    @chk ccall(\n               (:DMStagSetBoundaryTypes, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMBoundaryType, DMBoundaryType, DMBoundaryType),\n               dm, boundaryType0, boundaryType1, boundaryType2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetCoordinateDMType(petsclib::PetscLibType,dm::PetscDM, dmtype::DMType) \nset DM type to store coordinates\n\nLogically Collective; `dmtype` must contain common value\n\nInput Parameters:\n- `dm`     - the `DMSTAG` object\n- `dmtype` - `DMtype` for coordinates, either `DMSTAG` or `DMPRODUCT`\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMGetCoordinateDM()`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesExplicit()`, `DMStagSetUniformCoordinatesProduct()`, `DMType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetCoordinateDMType\"))\n\"\"\"\nfunction DMStagSetCoordinateDMType(petsclib::PetscLibType, dm::PetscDM, dmtype::DMType) end\n\n@for_petsc function DMStagSetCoordinateDMType(petsclib::$UnionPetscLib, dm::PetscDM, dmtype::DMType )\n\n    @chk ccall(\n               (:DMStagSetCoordinateDMType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMType),\n               dm, dmtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetDOF(petsclib::PetscLibType,dm::PetscDM, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, dof3::PetscInt) \nset dof/stratum\n\nLogically Collective; `dof0`, `dof1`, `dof2`, and `dof3` must contain common values\n\nInput Parameters:\n- `dm`   - the `DMSTAG` object\n- `dof0` - the number of points per 0-cell (vertex/node)\n- `dof1` - the number of points per 1-cell (element in 1D, edge in 2D and 3D)\n- `dof2` - the number of points per 2-cell (element in 2D, face in 3D)\n- `dof3` - the number of points per 3-cell (element in 3D)\n\nLevel: advanced\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMDASetDof()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetDOF\"))\n\"\"\"\nfunction DMStagSetDOF(petsclib::PetscLibType, dm::PetscDM, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, dof3::PetscInt) end\n\n@for_petsc function DMStagSetDOF(petsclib::$UnionPetscLib, dm::PetscDM, dof0::$PetscInt, dof1::$PetscInt, dof2::$PetscInt, dof3::$PetscInt )\n\n    @chk ccall(\n               (:DMStagSetDOF, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, $PetscInt),\n               dm, dof0, dof1, dof2, dof3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetNumRanks(petsclib::PetscLibType,dm::PetscDM, nRanks0::PetscInt, nRanks1::PetscInt, nRanks2::PetscInt) \nset ranks in each direction in the global rank grid\n\nLogically Collective; `nRanks0`, `nRanks1`, and `nRanks2` must contain common values\n\nInput Parameters:\n- `dm`      - the `DMSTAG` object\n- `nRanks0` - number of ranks in the x direction\n- `nRanks1` - number of ranks in the y direction\n- `nRanks2` - number of ranks in the z direction\n\nLevel: developer\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMDASetNumProcs()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetNumRanks\"))\n\"\"\"\nfunction DMStagSetNumRanks(petsclib::PetscLibType, dm::PetscDM, nRanks0::PetscInt, nRanks1::PetscInt, nRanks2::PetscInt) end\n\n@for_petsc function DMStagSetNumRanks(petsclib::$UnionPetscLib, dm::PetscDM, nRanks0::$PetscInt, nRanks1::$PetscInt, nRanks2::$PetscInt )\n\n    @chk ccall(\n               (:DMStagSetNumRanks, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               dm, nRanks0, nRanks1, nRanks2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetStencilType(petsclib::PetscLibType,dm::PetscDM, stencilType::DMStagStencilType) \nset elementwise ghost/halo stencil type\n\nLogically Collective; `stencilType` must contain common value\n\nInput Parameters:\n- `dm`          - the `DMSTAG` object\n- `stencilType` - the elementwise ghost stencil type: `DMSTAG_STENCIL_BOX`, `DMSTAG_STENCIL_STAR`, or `DMSTAG_STENCIL_NONE`\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetStencilType()`, `DMStagSetStencilWidth()`, `DMStagStencilType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetStencilType\"))\n\"\"\"\nfunction DMStagSetStencilType(petsclib::PetscLibType, dm::PetscDM, stencilType::DMStagStencilType) end\n\n@for_petsc function DMStagSetStencilType(petsclib::$UnionPetscLib, dm::PetscDM, stencilType::DMStagStencilType )\n\n    @chk ccall(\n               (:DMStagSetStencilType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMStagStencilType),\n               dm, stencilType,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetStencilWidth(petsclib::PetscLibType,dm::PetscDM, stencilWidth::PetscInt) \nset elementwise stencil width\n\nLogically Collective; `stencilWidth` must contain common value\n\nInput Parameters:\n- `dm`           - the `DMSTAG` object\n- `stencilWidth` - stencil/halo/ghost width in elements\n\nLevel: beginner\n\nNote:\nThe width value is not used when `DMSTAG_STENCIL_NONE` is specified.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetStencilWidth()`, `DMStagGetStencilType()`, `DMStagStencilType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetStencilWidth\"))\n\"\"\"\nfunction DMStagSetStencilWidth(petsclib::PetscLibType, dm::PetscDM, stencilWidth::PetscInt) end\n\n@for_petsc function DMStagSetStencilWidth(petsclib::$UnionPetscLib, dm::PetscDM, stencilWidth::$PetscInt )\n\n    @chk ccall(\n               (:DMStagSetStencilWidth, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, stencilWidth,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetGlobalSizes(petsclib::PetscLibType,dm::PetscDM, N0::PetscInt, N1::PetscInt, N2::PetscInt) \nset global element counts in each direction\n\nLogically Collective; `N0`, `N1`, and `N2` must contain common values\n\nInput Parameters:\n- `dm` - the `DMSTAG` object\n- `N0` - global elementwise size in the x direction\n- `N1` - global elementwise size in the y direction\n- `N2` - global elementwise size in the z direction\n\nLevel: advanced\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGlobalSizes()`, `DMDASetSizes()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetGlobalSizes\"))\n\"\"\"\nfunction DMStagSetGlobalSizes(petsclib::PetscLibType, dm::PetscDM, N0::PetscInt, N1::PetscInt, N2::PetscInt) end\n\n@for_petsc function DMStagSetGlobalSizes(petsclib::$UnionPetscLib, dm::PetscDM, N0::$PetscInt, N1::$PetscInt, N2::$PetscInt )\n\n    @chk ccall(\n               (:DMStagSetGlobalSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               dm, N0, N1, N2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetOwnershipRanges(petsclib::PetscLibType,dm::PetscDM, lx::Vector{PetscInt}, ly::Vector{PetscInt}, lz::Vector{PetscInt}) \nset elements per rank in each direction\n\nLogically Collective; `lx`, `ly`, and `lz` must contain common values\n\nInput Parameters:\n- `dm` - the `DMSTAG` object\n- `lx` - element counts for each rank in the x direction, may be `NULL`\n- `ly` - element counts for each rank in the y direction, may be `NULL`\n- `lz` - element counts for each rank in the z direction, may be `NULL`\n\nLevel: developer\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetGlobalSizes()`, `DMStagGetOwnershipRanges()`, `DMDASetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetOwnershipRanges\"))\n\"\"\"\nfunction DMStagSetOwnershipRanges(petsclib::PetscLibType, dm::PetscDM, lx::Vector{PetscInt}, ly::Vector{PetscInt}, lz::Vector{PetscInt}) end\n\n@for_petsc function DMStagSetOwnershipRanges(petsclib::$UnionPetscLib, dm::PetscDM, lx::Vector{$PetscInt}, ly::Vector{$PetscInt}, lz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMStagSetOwnershipRanges, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, lx, ly, lz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetRefinementFactor(petsclib::PetscLibType,dm::PetscDM, refine_x::PetscInt, refine_y::PetscInt, refine_z::PetscInt) \nset refinement ratios in each direction\n\nLogically Collective\n\nInput Parameters:\n- `dm`       - the `DMSTAG` object\n- `refine_x` - ratio of fine grid to coarse in x-direction (2 by default)\n- `refine_y` - ratio of fine grid to coarse in y-direction (2 by default)\n- `refine_z` - ratio of fine grid to coarse in z-direction (2 by default)\n\nLevel: intermediate\n\nNote:\nPass `PETSC_IGNORE` to leave a value unchanged\n\nSee also: \n=== \n`DMSTAG`, `DMRefine()`, `DMCoarsen()`, `DMStagGetRefinementFactor()`, `DMDAGetRefinementFactor()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetRefinementFactor\"))\n\"\"\"\nfunction DMStagSetRefinementFactor(petsclib::PetscLibType, dm::PetscDM, refine_x::PetscInt, refine_y::PetscInt, refine_z::PetscInt) end\n\n@for_petsc function DMStagSetRefinementFactor(petsclib::$UnionPetscLib, dm::PetscDM, refine_x::$PetscInt, refine_y::$PetscInt, refine_z::$PetscInt )\n\n    @chk ccall(\n               (:DMStagSetRefinementFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               dm, refine_x, refine_y, refine_z,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetUniformCoordinates(petsclib::PetscLibType,dm::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) \nset `DMSTAG` coordinates to be a uniform grid\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMSTAG` object\n- `xmin` - minimum global coordinate value in the `x` direction\n- `xmax` - maximum global coordinate values in the `x` direction\n- `ymin` - minimum global coordinate value in the `y` direction\n- `ymax` - maximum global coordinate value in the `y` direction\n- `zmin` - minimum global coordinate value in the `z` direction\n- `zmax` - maximum global coordinate value in the `z` direction\n\nLevel: advanced\n\nNotes:\n`DMSTAG` supports 2 different types of coordinate `DM`: `DMSTAG` and `DMPRODUCT`.\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nLocal coordinates are populated (using `DMSetCoordinatesLocal()`), linearly\nextrapolated to ghost cells, including those outside the physical domain.\nThis is also done in case of periodic boundaries, meaning that the same\nglobal point may have different coordinates in different local representations,\nwhich are equivalent assuming a periodicity implied by the arguments to this function,\ni.e. two points are equivalent if their difference is a multiple of (`xmax` - `xmin` )\nin the x direction, ( `ymax` - `ymin` ) in the y direction, and ( `zmax` - `zmin` ) in the z direction.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagSetUniformCoordinatesExplicit()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagSetCoordinateDMType()`, `DMGetCoordinateDM()`, `DMGetCoordinates()`, `DMDASetUniformCoordinates()`, `DMBoundaryType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetUniformCoordinates\"))\n\"\"\"\nfunction DMStagSetUniformCoordinates(petsclib::PetscLibType, dm::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) end\n\n@for_petsc function DMStagSetUniformCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal, zmin::$PetscReal, zmax::$PetscReal )\n\n    @chk ccall(\n               (:DMStagSetUniformCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               dm, xmin, xmax, ymin, ymax, zmin, zmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetUniformCoordinatesExplicit(petsclib::PetscLibType,dm::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) \nset `DMSTAG` coordinates to be a uniform grid, storing all values\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMSTAG` object\n- `xmin` - minimum global coordinate value in the `x` direction\n- `xmax` - maximum global coordinate value in the `x` direction\n- `ymin` - minimum global coordinate value in the `y` direction\n- `ymax` - maximum global coordinate value in the `y` direction\n- `zmin` - minimum global coordinate value in the `z` direction\n- `zmax` - maximum global coordinate value in the `z` direction\n\nLevel: beginner\n\nNotes:\n`DMSTAG` supports 2 different types of coordinate `DM`: either another `DMSTAG`, or a `DMPRODUCT`.\nIf the grid is orthogonal, using `DMPRODUCT` should be more efficient.\n\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee the manual page for `DMStagSetUniformCoordinates()` for information on how\ncoordinates for dummy cells outside the physical domain boundary are populated.\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagSetCoordinateDMType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetUniformCoordinatesExplicit\"))\n\"\"\"\nfunction DMStagSetUniformCoordinatesExplicit(petsclib::PetscLibType, dm::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) end\n\n@for_petsc function DMStagSetUniformCoordinatesExplicit(petsclib::$UnionPetscLib, dm::PetscDM, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal, zmin::$PetscReal, zmax::$PetscReal )\n\n    @chk ccall(\n               (:DMStagSetUniformCoordinatesExplicit, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               dm, xmin, xmax, ymin, ymax, zmin, zmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMStagSetUniformCoordinatesProduct(petsclib::PetscLibType,dm::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) \ncreate uniform coordinates, as a product of 1D arrays\n\nSet the coordinate `DM` to be a `DMPRODUCT` of 1D `DMSTAG` objects, each of which have a coordinate `DM` (also a 1d `DMSTAG`) holding uniform coordinates.\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMSTAG` object\n- `xmin` - minimum global coordinate value in the `x` direction\n- `xmax` - maximum global coordinate value in the `x` direction\n- `ymin` - minimum global coordinate value in the `y` direction\n- `ymax` - maximum global coordinate value in the `y` direction\n- `zmin` - minimum global coordinate value in the `z` direction\n- `zmax` - maximum global coordinate value in the `z` direction\n\nLevel: intermediate\n\nNotes:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nThe per-dimension 1-dimensional `DMSTAG` objects that comprise the product\nalways have active 0-cells (vertices, element boundaries) and 1-cells\n(element centers).\n\nSee the manual page for `DMStagSetUniformCoordinates()` for information on how\ncoordinates for dummy cells outside the physical domain boundary are populated.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesExplicit()`, `DMStagSetCoordinateDMType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetUniformCoordinatesProduct\"))\n\"\"\"\nfunction DMStagSetUniformCoordinatesProduct(petsclib::PetscLibType, dm::PetscDM, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, zmin::PetscReal, zmax::PetscReal) end\n\n@for_petsc function DMStagSetUniformCoordinatesProduct(petsclib::$UnionPetscLib, dm::PetscDM, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal, zmin::$PetscReal, zmax::$PetscReal )\n\n    @chk ccall(\n               (:DMStagSetUniformCoordinatesProduct, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               dm, xmin, xmax, ymin, ymax, zmin, zmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tarray::PetscArray = DMStagVecGetArray(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec) \nget access to local array\n\nLogically Collective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `vec` - the `Vec` object\n\nOutput Parameter:\n- `array` - the array\n\nLevel: beginner\n\nNote:\nThis function returns a (dim+1)-dimensional array for a dim-dimensional `DMSTAG`.\n\nAlso: in Julia we use OffsetArrays, such that index 1 (e.g. `array[1]` always refers to the true first point in the domain, \nand `array[0]` would be the ghost point (if available) . \n\nThe first 1-3 dimensions indicate an element in the global\nnumbering, using the standard C ordering.\n\nThe final dimension in this array corresponds to a degree\nof freedom with respect to this element, for example corresponding to\nthe element or one of its neighboring faces, edges, or vertices.\n\nFor example, for a 3D `DMSTAG`, indexing is `array[k][j][i][idx]`, where `k` is the\nindex in the z-direction, `j` is the index in the y-direction, and `i` is the\nindex in the x-direction.\n\n`idx` is obtained with `DMStagGetLocationSlot()`, since the correct offset\ninto the (d+1)-dimensional C array for a d-dimensional `DMSTAG` depends on the grid size and the number\nof DOF stored at each location.\n\n`DMStagVecRestoreArray()` must be called, once finished with the array\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArrayRead()`, `DMStagGetLocationSlot()`, `DMGetLocalVector()`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMCreateGlobalVector()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecGetArray\"))\n\"\"\"\nfunction DMStagVecGetArray(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec) end\n\n@for_petsc function DMStagVecGetArray(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec)\n    # DMStagVecGetArray in PETSc's C API returns a multi-dimensional pointer structure\n    # that does not map directly to the Vec's contiguous storage. Instead, we use\n    # the Vec's data directly and reshape it according to DMStag's layout.\n    \n    xs,ys,zs,m,n,p = DMStagGetGhostCorners(petsclib, dm)\n    dim         = DMGetDimension(petsclib, dm)\n    q           = DMStagGetEntriesPerElement(petsclib, dm)\n\n    # Get the underlying Vec data - this needs to be restored later\n    vec_array = VecGetArray(petsclib, vec)\n    \n    # Reshape to (m, n[, p], q) layout where spatial dimensions come first,\n    # then DOF index last for convenient slicing.\n    # Use PermutedDimsArray to create a VIEW (not a copy) so modifications\n    # to the array directly affect the underlying Vec data.\n    if dim==1\n        mat = reshape(vec_array, (m, q))\n        mat_oa = OffsetArray(mat, xs+1:xs+m, 1:q)\n    elseif dim==2\n        mat = PermutedDimsArray(reshape(vec_array, (q, m, n)), (2, 3, 1))\n        mat_oa = OffsetArray(mat, xs+1:xs+m, ys+1:ys+n, 1:q)\n    elseif dim==3\n        mat = PermutedDimsArray(reshape(vec_array, (q, m, n, p)), (2, 3, 4, 1))\n        mat_oa = OffsetArray(mat, xs+1:xs+m, ys+1:ys+n, zs+1:zs+p, 1:q)\n    else\n        error(\"Unsupported dimension: $dim\")\n    end\n\n    # Create a PetscArray wrapper\n    # Store the original vec_array in ptr field (as Ref{Any}) so we can restore it later\n    arr = PetscArray(mat_oa, Ref{Any}(vec_array))\n\n    return arr\nend \n\n\"\"\"\n\tarray::PetscArray = DMStagVecGetArrayRead(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec) \nget read\n\nLogically Collective\n\nSee the man page for `DMStagVecGetArray()` for more information.\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `vec` - the `Vec` object\n\nOutput Parameter:\n- `array` - the read-only array\n\nLevel: beginner\n\nNote:\n`DMStagVecRestoreArrayRead()` must be called, once finished with the array\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetLocationSlot()`, `DMGetLocalVector()`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMCreateGlobalVector()`, `DMDAVecGetArrayRead()`, `DMDAVecGetArrayDOFRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecGetArrayRead\"))\n\"\"\"\nfunction DMStagVecGetArrayRead(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec) end\n\n@for_petsc function DMStagVecGetArrayRead(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec)\n    # DMStagVecGetArrayRead in PETSc's C API returns a multi-dimensional pointer structure\n    # that does not map directly to the Vec's contiguous storage. Instead, we use\n    # the Vec's data directly (read-only) and reshape it according to DMStag's layout.\n    \n    xs,ys,zs,m,n,p = DMStagGetGhostCorners(petsclib, dm)\n    dim         = DMGetDimension(petsclib, dm)\n    q           = DMStagGetEntriesPerElement(petsclib, dm)\n\n    # Get the underlying Vec data (read-only) - this needs to be restored later\n    vec_array = VecGetArrayRead(petsclib, vec)\n    \n    # Reshape to (m, n[, p], q) layout where spatial dimensions come first,\n    # then DOF index last for convenient slicing.\n    # Use PermutedDimsArray to create a VIEW (not a copy) for read-only access.\n    if dim==1\n        mat = reshape(vec_array, (m, q))\n        mat_oa = OffsetArray(mat, xs+1:xs+m, 1:q)\n    elseif dim==2\n        mat = PermutedDimsArray(reshape(vec_array, (q, m, n)), (2, 3, 1))\n        mat_oa = OffsetArray(mat, xs+1:xs+m, ys+1:ys+n, 1:q)\n    elseif dim==3\n        mat = PermutedDimsArray(reshape(vec_array, (q, m, n, p)), (2, 3, 4, 1))\n        mat_oa = OffsetArray(mat, xs+1:xs+m, ys+1:ys+n, zs+1:zs+p, 1:q)\n    else\n        error(\"Unsupported dimension: $dim\")\n    end\n\n    # Create a PetscArray wrapper\n    # Store the original vec_array in ptr field (as Ref{Any}) so we can restore it later\n    arr = PetscArray(mat_oa, Ref{Any}(vec_array))\n\n    return arr\nend \n\n\"\"\"\n\tDMStagVecRestoreArray(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, array::PetscArray) \nrestore access to a raw array\n\nLogically Collective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `vec` - the `Vec` object\n\nOutput Parameter:\n- `array` - the array\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArray()`, `DMDAVecRestoreArray()`, `DMDAVecRestoreArrayDOF()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecRestoreArray\"))\n\"\"\"\nfunction DMStagVecRestoreArray(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, array::PetscArray) end\n\n@for_petsc function DMStagVecRestoreArray(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, array::PetscArray{$PetscScalar, N} ) where N\n    # Since we're using PermutedDimsArray (a view), modifications to the array\n    # automatically affect the underlying vec_array. We just need to restore it.\n    if !isnothing(array.ptr) && array.ptr[] !== nothing\n        vec_array = array.ptr[]\n        VecRestoreArray(petsclib, vec, vec_array)\n        # Null out the reference to prevent double-restore\n        array.ptr[] = nothing\n    end\n    \n    return nothing\nend \n\n\"\"\"\n\tDMStagVecRestoreArrayRead(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, array::PetscArray) \nrestore read\n\nLogically Collective\n\nInput Parameters:\n- `dm`  - the `DMSTAG` object\n- `vec` - the Vec object\n\nOutput Parameter:\n- `array` - the read-only array\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`, `DMDAVecRestoreArrayDOFRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecRestoreArrayRead\"))\n\"\"\"\nfunction DMStagVecRestoreArrayRead(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, array::PetscArray) end\n\n@for_petsc function DMStagVecRestoreArrayRead(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, array::PetscArray{$PetscScalar, N} ) where N\n    # Restore the read-only Vec array that was obtained from VecGetArrayRead\n    if array.ptr[] !== nothing\n        vec_array = array.ptr[]::Vector{$PetscScalar}\n        VecRestoreArrayRead(petsclib, vec, vec_array)\n        array.ptr[] = nothing\n    end\n\n    return nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMStagCreate2d(petsclib::PetscLibType,comm::MPI_Comm, bndx::DMBoundaryType, bndy::DMBoundaryType, M::PetscInt, N::PetscInt, m::PetscInt, n::PetscInt, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, stencilType::DMStagStencilType, stencilWidth::PetscInt, lx::Vector{PetscInt}, ly::Vector{PetscInt}) \nCreate an object to manage data living on the elements, faces, and vertices of a parallelized regular 2D grid.\n\nCollective\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `bndx`         - x boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `bndy`         - y boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `M`            - global number of elements in x direction\n- `N`            - global number of elements in y direction\n- `m`            - number of ranks in the x direction (may be `PETSC_DECIDE`)\n- `n`            - number of ranks in the y direction (may be `PETSC_DECIDE`)\n- `dof0`         - number of degrees of freedom per vertex/0-cell\n- `dof1`         - number of degrees of freedom per face/1-cell\n- `dof2`         - number of degrees of freedom per element/2-cell\n- `stencilType`  - ghost/halo region type: `DMSTAG_STENCIL_NONE`, `DMSTAG_STENCIL_BOX`, or `DMSTAG_STENCIL_STAR`\n- `stencilWidth` - width, in elements, of halo/ghost region\n- `lx`           - array of local x element counts, of length equal to `m`, summing to `M`, or `NULL`\n- `ly`           - array of local y element counts, of length equal to `n`, summing to `N`, or `NULL`\n\nOutput Parameter:\n- `dm` - the new `DMSTAG` object\n\nOptions Database Keys:\n- `-dm_view`                                      - calls `DMViewFromOptions()` at the conclusion of `DMSetUp()`\n- `-stag_grid_x <nx>`                             - number of elements in the x direction\n- `-stag_grid_y <ny>`                             - number of elements in the y direction\n- `-stag_ranks_x <rx>`                            - number of ranks in the x direction\n- `-stag_ranks_y <ry>`                            - number of ranks in the y direction\n- `-stag_ghost_stencil_width`                     - width of ghost region, in elements\n- `-stag_boundary_type_x <none,ghosted,periodic>` - `DMBoundaryType` value\n- `-stag_boundary_type_y <none,ghosted,periodic>` - `DMBoundaryType` value\n\nLevel: beginner\n\nNotes:\nYou must call `DMSetUp()` after this call, before using the `DM`.\nIf you wish to use the options database (see the keys above) to change values in the `DMSTAG`, you must call\n`DMSetFromOptions()` after this function but before `DMSetUp()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreate1d()`, `DMStagCreate3d()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate2d\"))\n\"\"\"\nfunction DMStagCreate2d(petsclib::PetscLibType, comm::MPI_Comm, bndx::DMBoundaryType, bndy::DMBoundaryType, M::PetscInt, N::PetscInt, m::PetscInt, n::PetscInt, dof0::PetscInt, dof1::PetscInt, dof2::PetscInt, stencilType::DMStagStencilType, stencilWidth::PetscInt, lx::Union{Ptr,Vector{PetscInt}}, ly::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function DMStagCreate2d(petsclib::$UnionPetscLib, comm::MPI_Comm, bndx::DMBoundaryType, bndy::DMBoundaryType, M::$PetscInt, N::$PetscInt, m::$PetscInt, n::$PetscInt, dof0::$PetscInt, dof1::$PetscInt, dof2::$PetscInt, stencilType::DMStagStencilType, stencilWidth::$PetscInt, lx::Union{Ptr,Vector{$PetscInt}}, ly::Union{Ptr,Vector{$PetscInt}} )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMStagCreate2d, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMBoundaryType, DMBoundaryType, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, DMStagStencilType, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CDM}),\n               comm, bndx, bndy, M, N, m, n, dof0, dof1, dof2, stencilType, stencilWidth, lx, ly, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPatchZoom(petsclib::PetscLibType,dm::PetscDM, lower::MatStencil, upper::MatStencil, commz::MPI_Comm, dmz::PetscDM, sfz::PetscSF, sfzr::PetscSF) \nCreate patches of a `DMDA` on subsets of processes, indicated by `commz`\n\nCollective\n\nInput Parameters:\n- `dm`    - the `DM`\n- `lower` - the lower left corner of the requested patch\n- `upper` - the upper right corner of the requested patch\n- `commz` - the new communicator for the patch, `MPI_COMM_NULL` indicates that the given rank will not own a patch\n\nOutput Parameters:\n- `dmz`  - the patch `DM`\n- `sfz`  - the `PetscSF` mapping the patch+halo to the zoomed version (optional)\n- `sfzr` - the `PetscSF` mapping the patch to the restricted zoomed version\n\nLevel: intermediate\n\n-seealso: `DMPatchSolve()`, `DMDACreatePatchIS()`\n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchZoom\"))\n\"\"\"\nfunction DMPatchZoom(petsclib::PetscLibType, dm::PetscDM, lower::MatStencil, upper::MatStencil, commz::MPI_Comm, dmz::PetscDM, sfz::PetscSF, sfzr::PetscSF) end\n\n@for_petsc function DMPatchZoom(petsclib::$UnionPetscLib, dm::PetscDM, lower::MatStencil, upper::MatStencil, commz::MPI_Comm, dmz::PetscDM, sfz::PetscSF, sfzr::PetscSF )\n\tdmz_ = Ref(dmz.ptr)\n\n    @chk ccall(\n               (:DMPatchZoom, $petsc_library),\n               PetscErrorCode,\n               (CDM, MatStencil, MatStencil, MPI_Comm, Ptr{CDM}, Ptr{PetscSF}, Ptr{PetscSF}),\n               dm, lower, upper, commz, dmz_, sfz, sfzr,\n              )\n\n\tdmz.ptr = dmz_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPatchSolve(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchSolve\"))\n\"\"\"\nfunction DMPatchSolve(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPatchSolve(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPatchSolve, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPatchGetCoarse(petsclib::PetscLibType,dm::PetscDM, dmCoarse::PetscDM) \n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchGetCoarse\"))\n\"\"\"\nfunction DMPatchGetCoarse(petsclib::PetscLibType, dm::PetscDM, dmCoarse::PetscDM) end\n\n@for_petsc function DMPatchGetCoarse(petsclib::$UnionPetscLib, dm::PetscDM, dmCoarse::PetscDM )\n\tdmCoarse_ = Ref(dmCoarse.ptr)\n\n    @chk ccall(\n               (:DMPatchGetCoarse, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, dmCoarse_,\n              )\n\n\tdmCoarse.ptr = dmCoarse_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPatchGetPatchSize(petsclib::PetscLibType,dm::PetscDM, patchSize::MatStencil) \n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchGetPatchSize\"))\n\"\"\"\nfunction DMPatchGetPatchSize(petsclib::PetscLibType, dm::PetscDM, patchSize::MatStencil) end\n\n@for_petsc function DMPatchGetPatchSize(petsclib::$UnionPetscLib, dm::PetscDM, patchSize::MatStencil )\n\n    @chk ccall(\n               (:DMPatchGetPatchSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{MatStencil}),\n               dm, patchSize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPatchSetPatchSize(petsclib::PetscLibType,dm::PetscDM, patchSize::MatStencil) \n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchSetPatchSize\"))\n\"\"\"\nfunction DMPatchSetPatchSize(petsclib::PetscLibType, dm::PetscDM, patchSize::MatStencil) end\n\n@for_petsc function DMPatchSetPatchSize(petsclib::$UnionPetscLib, dm::PetscDM, patchSize::MatStencil )\n\n    @chk ccall(\n               (:DMPatchSetPatchSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, MatStencil),\n               dm, patchSize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPatchGetCommSize(petsclib::PetscLibType,dm::PetscDM, commSize::MatStencil) \n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchGetCommSize\"))\n\"\"\"\nfunction DMPatchGetCommSize(petsclib::PetscLibType, dm::PetscDM, commSize::MatStencil) end\n\n@for_petsc function DMPatchGetCommSize(petsclib::$UnionPetscLib, dm::PetscDM, commSize::MatStencil )\n\n    @chk ccall(\n               (:DMPatchGetCommSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{MatStencil}),\n               dm, commSize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPatchSetCommSize(petsclib::PetscLibType,dm::PetscDM, commSize::MatStencil) \n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchSetCommSize\"))\n\"\"\"\nfunction DMPatchSetCommSize(petsclib::PetscLibType, dm::PetscDM, commSize::MatStencil) end\n\n@for_petsc function DMPatchSetCommSize(petsclib::$UnionPetscLib, dm::PetscDM, commSize::MatStencil )\n\n    @chk ccall(\n               (:DMPatchSetCommSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, MatStencil),\n               dm, commSize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmesh::PetscDM = DMPatchCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a DMPatch object, which is a collections of DMs called patches.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the DMPatch object\n\nOutput Parameter:\n- `mesh` - The DMPatch object\n\n-seealso: `DMPatchZoom()`\n\n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchCreate\"))\n\"\"\"\nfunction DMPatchCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMPatchCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tmesh_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPatchCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, mesh_,\n              )\n\n\tmesh = PetscDM(mesh_[], petsclib)\n\n\treturn mesh\nend \n\n\"\"\"\n\tdm::PetscDM = DMPatchCreateGrid(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, patchSize::MatStencil, commSize::MatStencil, gridSize::MatStencil) \n\n# External Links\n$(_doc_external(\"DMPatch/DMPatchCreateGrid\"))\n\"\"\"\nfunction DMPatchCreateGrid(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, patchSize::MatStencil, commSize::MatStencil, gridSize::MatStencil) end\n\n@for_petsc function DMPatchCreateGrid(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, patchSize::MatStencil, commSize::MatStencil, gridSize::MatStencil )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPatchCreateGrid, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, MatStencil, MatStencil, MatStencil, Ptr{CDM}),\n               comm, dim, patchSize, commSize, gridSize, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMRedundantSetSize(petsclib::PetscLibType,dm::PetscDM, rank::PetscMPIInt, N::PetscInt) \nSets the size of a densely coupled redundant object\n\nCollective\n\nInput Parameters:\n- `dm`   - `DM` object of type `DMREDUNDANT`\n- `rank` - rank of process to own the redundant degrees of freedom\n- `N`    - total number of redundant degrees of freedom\n\nLevel: advanced\n\n-seealso: `DM`, `DMREDUNDANT`, `DMDestroy()`, `DMCreateGlobalVector()`, `DMRedundantCreate()`, `DMRedundantGetSize()`\n\n# External Links\n$(_doc_external(\"DM/DMRedundantSetSize\"))\n\"\"\"\nfunction DMRedundantSetSize(petsclib::PetscLibType, dm::PetscDM, rank::PetscMPIInt, N::PetscInt) end\n\n@for_petsc function DMRedundantSetSize(petsclib::$UnionPetscLib, dm::PetscDM, rank::PetscMPIInt, N::$PetscInt )\n\n    @chk ccall(\n               (:DMRedundantSetSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscMPIInt, $PetscInt),\n               dm, rank, N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscInt = DMRedundantGetSize(petsclib::PetscLibType,dm::PetscDM, rank::PetscMPIInt) \nGets the size of a densely coupled redundant object\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` object of type `DMREDUNDANT`\n\nOutput Parameters:\n- `rank` - rank of process to own the redundant degrees of freedom (or `NULL`)\n- `N`    - total number of redundant degrees of freedom (or `NULL`)\n\nLevel: advanced\n\n-seealso: `DM`, `DMREDUNDANT`, `DMDestroy()`, `DMCreateGlobalVector()`, `DMRedundantCreate()`, `DMRedundantSetSize()`\n\n# External Links\n$(_doc_external(\"DM/DMRedundantGetSize\"))\n\"\"\"\nfunction DMRedundantGetSize(petsclib::PetscLibType, dm::PetscDM, rank::PetscMPIInt) end\n\n@for_petsc function DMRedundantGetSize(petsclib::$UnionPetscLib, dm::PetscDM, rank::PetscMPIInt )\n\tN_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMRedundantGetSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscMPIInt}, Ptr{$PetscInt}),\n               dm, rank, N_,\n              )\n\n\tN = N_[]\n\n\treturn N\nend \n\n\"\"\"\n\tdm::PetscDM = DMRedundantCreate(petsclib::PetscLibType,comm::MPI_Comm, rank::PetscMPIInt, N::PetscInt) \nCreates a `DM` object, used to manage data for dense globally coupled variables\n\nCollective\n\nInput Parameters:\n- `comm` - the processors that will share the global vector\n- `rank` - the MPI rank to own the redundant values\n- `N`    - total number of degrees of freedom\n\nOutput Parameter:\n- `dm` - the `DM` object of type `DMREDUNDANT`\n\nLevel: advanced\n\n-seealso: `DM`, `DMREDUNDANT`, `DMDestroy()`, `DMCreateGlobalVector()`, `DMCreateMatrix()`, `DMCompositeAddDM()`, `DMSetType()`, `DMRedundantSetSize()`, `DMRedundantGetSize()`\n\n# External Links\n$(_doc_external(\"DM/DMRedundantCreate\"))\n\"\"\"\nfunction DMRedundantCreate(petsclib::PetscLibType, comm::MPI_Comm, rank::PetscMPIInt, N::PetscInt) end\n\n@for_petsc function DMRedundantCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, rank::PetscMPIInt, N::$PetscInt )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMRedundantCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscMPIInt, $PetscInt, Ptr{CDM}),\n               comm, rank, N, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMMoabOutput(petsclib::PetscLibType,dm::PetscDM, filename::String, usrwriteopts::String) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabOutput\"))\n\"\"\"\nfunction DMMoabOutput(petsclib::PetscLibType, dm::PetscDM, filename::String, usrwriteopts::String) end\n\n@for_petsc function DMMoabOutput(petsclib::$UnionPetscLib, dm::PetscDM, filename::String, usrwriteopts::String )\n\n    @chk ccall(\n               (:DMMoabOutput, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{Cchar}),\n               dm, filename, usrwriteopts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcoordinates::PetscReal,phypts::PetscReal,jacobian_quadrature_weight_product::PetscReal,fe_basis::PetscReal = DMMoabFEMComputeBasis(petsclib::PetscLibType,dim::PetscInt, nverts::PetscInt, quadrature::PetscQuadrature, fe_basis_derivatives::PetscReal) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabFEMComputeBasis\"))\n\"\"\"\nfunction DMMoabFEMComputeBasis(petsclib::PetscLibType, dim::PetscInt, nverts::PetscInt, quadrature::PetscQuadrature, fe_basis_derivatives::PetscReal) end\n\n@for_petsc function DMMoabFEMComputeBasis(petsclib::$UnionPetscLib, dim::$PetscInt, nverts::$PetscInt, quadrature::PetscQuadrature, fe_basis_derivatives::$PetscReal )\n\tcoordinates_ = Ref{$PetscReal}()\n\tphypts_ = Ref{$PetscReal}()\n\tjacobian_quadrature_weight_product_ = Ref{$PetscReal}()\n\tfe_basis_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMMoabFEMComputeBasis, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, PetscQuadrature, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal),\n               dim, nverts, coordinates_, quadrature, phypts_, jacobian_quadrature_weight_product_, fe_basis_, fe_basis_derivatives,\n              )\n\n\tcoordinates = coordinates_[]\n\tphypts = phypts_[]\n\tjacobian_quadrature_weight_product = jacobian_quadrature_weight_product_[]\n\tfe_basis = fe_basis_[]\n\n\treturn coordinates,phypts,jacobian_quadrature_weight_product,fe_basis\nend \n\n\"\"\"\n\tquadrature::PetscQuadrature = DMMoabFEMCreateQuadratureDefault(petsclib::PetscLibType,dim::PetscInt, nverts::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabFEMCreateQuadratureDefault\"))\n\"\"\"\nfunction DMMoabFEMCreateQuadratureDefault(petsclib::PetscLibType, dim::PetscInt, nverts::PetscInt) end\n\n@for_petsc function DMMoabFEMCreateQuadratureDefault(petsclib::$UnionPetscLib, dim::$PetscInt, nverts::$PetscInt )\n\tquadrature_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:DMMoabFEMCreateQuadratureDefault, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{PetscQuadrature}),\n               dim, nverts, quadrature_,\n              )\n\n\tquadrature = quadrature_[]\n\n\treturn quadrature\nend \n\n\"\"\"\n\tcoordinates::PetscReal,xphy::PetscReal,natparam::PetscReal,phi::PetscReal = DMMoabPToRMapping(petsclib::PetscLibType,dim::PetscInt, nverts::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabPToRMapping\"))\n\"\"\"\nfunction DMMoabPToRMapping(petsclib::PetscLibType, dim::PetscInt, nverts::PetscInt) end\n\n@for_petsc function DMMoabPToRMapping(petsclib::$UnionPetscLib, dim::$PetscInt, nverts::$PetscInt )\n\tcoordinates_ = Ref{$PetscReal}()\n\txphy_ = Ref{$PetscReal}()\n\tnatparam_ = Ref{$PetscReal}()\n\tphi_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMMoabPToRMapping, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dim, nverts, coordinates_, xphy_, natparam_, phi_,\n              )\n\n\tcoordinates = coordinates_[]\n\txphy = xphy_[]\n\tnatparam = natparam_[]\n\tphi = phi_[]\n\n\treturn coordinates,xphy,natparam,phi\nend \n\n\"\"\"\n\trange::moab_Range,vec::PetscVec = DMMoabCreateVector(petsclib::PetscLibType,dm::PetscDM, tag::moab_Tag, is_global_vec::PetscBool, destroy_tag::PetscBool) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCreateVector\"))\n\"\"\"\nfunction DMMoabCreateVector(petsclib::PetscLibType, dm::PetscDM, tag::moab_Tag, is_global_vec::PetscBool, destroy_tag::PetscBool) end\n\n@for_petsc function DMMoabCreateVector(petsclib::$UnionPetscLib, dm::PetscDM, tag::moab_Tag, is_global_vec::PetscBool, destroy_tag::PetscBool )\n\trange_ = Ref{moab_Range}()\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMMoabCreateVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_Tag, Ptr{moab_Range}, PetscBool, PetscBool, Ptr{CVec}),\n               dm, tag, range_, is_global_vec, destroy_tag, vec_,\n              )\n\n\trange = range_[]\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn range,vec\nend \n\n\"\"\"\n\tDMMoabGetVecTag(petsclib::PetscLibType,vec::PetscVec, tag::moab_Tag) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetVecTag\"))\n\"\"\"\nfunction DMMoabGetVecTag(petsclib::PetscLibType, vec::PetscVec, tag::moab_Tag) end\n\n@for_petsc function DMMoabGetVecTag(petsclib::$UnionPetscLib, vec::PetscVec, tag::moab_Tag )\n\n    @chk ccall(\n               (:DMMoabGetVecTag, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{moab_Tag}),\n               vec, tag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetVecRange(petsclib::PetscLibType,vec::PetscVec, range::moab_Range) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetVecRange\"))\n\"\"\"\nfunction DMMoabGetVecRange(petsclib::PetscLibType, vec::PetscVec, range::moab_Range) end\n\n@for_petsc function DMMoabGetVecRange(petsclib::$UnionPetscLib, vec::PetscVec, range::moab_Range )\n\n    @chk ccall(\n               (:DMMoabGetVecRange, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{moab_Range}),\n               vec, range,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabVecGetArray(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, array::Cvoid) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabVecGetArray\"))\n\"\"\"\nfunction DMMoabVecGetArray(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMMoabVecGetArray(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMMoabVecGetArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               dm, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabVecRestoreArray(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, array::Cvoid) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabVecRestoreArray\"))\n\"\"\"\nfunction DMMoabVecRestoreArray(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMMoabVecRestoreArray(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMMoabVecRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               dm, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabVecGetArrayRead(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, array::Cvoid) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabVecGetArrayRead\"))\n\"\"\"\nfunction DMMoabVecGetArrayRead(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMMoabVecGetArrayRead(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMMoabVecGetArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               dm, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabVecRestoreArrayRead(petsclib::PetscLibType,dm::PetscDM, vec::PetscVec, array::Cvoid) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabVecRestoreArrayRead\"))\n\"\"\"\nfunction DMMoabVecRestoreArrayRead(petsclib::PetscLibType, dm::PetscDM, vec::PetscVec, array::Cvoid) end\n\n@for_petsc function DMMoabVecRestoreArrayRead(petsclib::$UnionPetscLib, dm::PetscDM, vec::PetscVec, array::Cvoid )\n\n    @chk ccall(\n               (:DMMoabVecRestoreArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{Cvoid}),\n               dm, vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tldegrees::PetscInt = DMMoabGenerateHierarchy(petsclib::PetscLibType,dm::PetscDM, nlevels::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGenerateHierarchy\"))\n\"\"\"\nfunction DMMoabGenerateHierarchy(petsclib::PetscLibType, dm::PetscDM, nlevels::PetscInt) end\n\n@for_petsc function DMMoabGenerateHierarchy(petsclib::$UnionPetscLib, dm::PetscDM, nlevels::$PetscInt )\n\tldegrees_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGenerateHierarchy, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, nlevels, ldegrees_,\n              )\n\n\tldegrees = ldegrees_[]\n\n\treturn ldegrees\nend \n\n\"\"\"\n\tbounds::PetscReal,dm::PetscDM = DMMoabCreateBoxMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, useSimplex::PetscBool, nele::PetscInt, nghost::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCreateBoxMesh\"))\n\"\"\"\nfunction DMMoabCreateBoxMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, useSimplex::PetscBool, nele::PetscInt, nghost::PetscInt) end\n\n@for_petsc function DMMoabCreateBoxMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, useSimplex::PetscBool, nele::$PetscInt, nghost::$PetscInt )\n\tbounds_ = Ref{$PetscReal}()\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMMoabCreateBoxMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, PetscBool, Ptr{$PetscReal}, $PetscInt, $PetscInt, Ptr{CDM}),\n               comm, dim, useSimplex, bounds_, nele, nghost, dm_,\n              )\n\n\tbounds = bounds_[]\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn bounds,dm\nend \n\n\"\"\"\n\tDMMoabLoadFromFile(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, nghost::PetscInt, filename::String, usrreadopts::String, dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabLoadFromFile\"))\n\"\"\"\nfunction DMMoabLoadFromFile(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, nghost::PetscInt, filename::String, usrreadopts::String, dm::PetscDM) end\n\n@for_petsc function DMMoabLoadFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, nghost::$PetscInt, filename::String, usrreadopts::String, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMMoabLoadFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{Cchar}, Ptr{Cchar}, Ptr{CDM}),\n               comm, dim, nghost, filename, usrreadopts, dm_,\n              )\n\n\tdm.ptr = dm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabRenumberMeshEntities(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabRenumberMeshEntities\"))\n\"\"\"\nfunction DMMoabRenumberMeshEntities(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabRenumberMeshEntities(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMMoabRenumberMeshEntities, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetFieldVector(petsclib::PetscLibType,dm::PetscDM, ifield::PetscInt, fvec::PetscVec) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetFieldVector\"))\n\"\"\"\nfunction DMMoabSetFieldVector(petsclib::PetscLibType, dm::PetscDM, ifield::PetscInt, fvec::PetscVec) end\n\n@for_petsc function DMMoabSetFieldVector(petsclib::$UnionPetscLib, dm::PetscDM, ifield::$PetscInt, fvec::PetscVec )\n\n    @chk ccall(\n               (:DMMoabSetFieldVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, CVec),\n               dm, ifield, fvec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetGlobalFieldVector(petsclib::PetscLibType,dm::PetscDM, fvec::PetscVec) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetGlobalFieldVector\"))\n\"\"\"\nfunction DMMoabSetGlobalFieldVector(petsclib::PetscLibType, dm::PetscDM, fvec::PetscVec) end\n\n@for_petsc function DMMoabSetGlobalFieldVector(petsclib::$UnionPetscLib, dm::PetscDM, fvec::PetscVec )\n\n    @chk ccall(\n               (:DMMoabSetGlobalFieldVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, fvec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetFieldNames(petsclib::PetscLibType,dm::PetscDM, numFields::PetscInt, fields::String) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetFieldNames\"))\n\"\"\"\nfunction DMMoabSetFieldNames(petsclib::PetscLibType, dm::PetscDM, numFields::PetscInt, fields::String) end\n\n@for_petsc function DMMoabSetFieldNames(petsclib::$UnionPetscLib, dm::PetscDM, numFields::$PetscInt, fields::String )\n\tfields_ = Ref(pointer(fields))\n\n    @chk ccall(\n               (:DMMoabSetFieldNames, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}),\n               dm, numFields, fields_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetFieldName(petsclib::PetscLibType,dm::PetscDM, field::PetscInt, fieldName::String) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetFieldName\"))\n\"\"\"\nfunction DMMoabGetFieldName(petsclib::PetscLibType, dm::PetscDM, field::PetscInt, fieldName::String) end\n\n@for_petsc function DMMoabGetFieldName(petsclib::$UnionPetscLib, dm::PetscDM, field::$PetscInt, fieldName::String )\n\tfieldName_ = Ref(pointer(fieldName))\n\n    @chk ccall(\n               (:DMMoabGetFieldName, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}),\n               dm, field, fieldName_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetFieldName(petsclib::PetscLibType,dm::PetscDM, field::PetscInt, fieldName::String) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetFieldName\"))\n\"\"\"\nfunction DMMoabSetFieldName(petsclib::PetscLibType, dm::PetscDM, field::PetscInt, fieldName::String) end\n\n@for_petsc function DMMoabSetFieldName(petsclib::$UnionPetscLib, dm::PetscDM, field::$PetscInt, fieldName::String )\n\n    @chk ccall(\n               (:DMMoabSetFieldName, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Cchar}),\n               dm, field, fieldName,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdof::PetscInt = DMMoabGetFieldDof(petsclib::PetscLibType,dm::PetscDM, point::moab_EntityHandle, field::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetFieldDof\"))\n\"\"\"\nfunction DMMoabGetFieldDof(petsclib::PetscLibType, dm::PetscDM, point::moab_EntityHandle, field::PetscInt) end\n\n@for_petsc function DMMoabGetFieldDof(petsclib::$UnionPetscLib, dm::PetscDM, point::moab_EntityHandle, field::$PetscInt )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetFieldDof, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_EntityHandle, $PetscInt, Ptr{$PetscInt}),\n               dm, point, field, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tdof::PetscInt = DMMoabGetFieldDofs(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle, field::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetFieldDofs\"))\n\"\"\"\nfunction DMMoabGetFieldDofs(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle, field::PetscInt) end\n\n@for_petsc function DMMoabGetFieldDofs(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt, points::moab_EntityHandle, field::$PetscInt )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetFieldDofs, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, $PetscInt, Ptr{$PetscInt}),\n               dm, npoints, points, field, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tdof::PetscInt = DMMoabGetFieldDofsLocal(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle, field::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetFieldDofsLocal\"))\n\"\"\"\nfunction DMMoabGetFieldDofsLocal(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle, field::PetscInt) end\n\n@for_petsc function DMMoabGetFieldDofsLocal(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt, points::moab_EntityHandle, field::$PetscInt )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetFieldDofsLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, $PetscInt, Ptr{$PetscInt}),\n               dm, npoints, points, field, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tdof::PetscInt = DMMoabGetDofs(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetDofs\"))\n\"\"\"\nfunction DMMoabGetDofs(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetDofs(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt, points::moab_EntityHandle )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetDofs, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, Ptr{$PetscInt}),\n               dm, npoints, points, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tdof::PetscInt = DMMoabGetDofsLocal(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetDofsLocal\"))\n\"\"\"\nfunction DMMoabGetDofsLocal(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetDofsLocal(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt, points::moab_EntityHandle )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetDofsLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, Ptr{$PetscInt}),\n               dm, npoints, points, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tdof::PetscInt = DMMoabGetDofsBlocked(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetDofsBlocked\"))\n\"\"\"\nfunction DMMoabGetDofsBlocked(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetDofsBlocked(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt, points::moab_EntityHandle )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetDofsBlocked, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, Ptr{$PetscInt}),\n               dm, npoints, points, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tdof::PetscInt = DMMoabGetDofsBlockedLocal(petsclib::PetscLibType,dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetDofsBlockedLocal\"))\n\"\"\"\nfunction DMMoabGetDofsBlockedLocal(petsclib::PetscLibType, dm::PetscDM, npoints::PetscInt, points::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetDofsBlockedLocal(petsclib::$UnionPetscLib, dm::PetscDM, npoints::$PetscInt, points::moab_EntityHandle )\n\tdof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetDofsBlockedLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, Ptr{$PetscInt}),\n               dm, npoints, points, dof_,\n              )\n\n\tdof = dof_[]\n\n\treturn dof\nend \n\n\"\"\"\n\tDMMoabGetVertexDofsBlocked(petsclib::PetscLibType,dm::PetscDM, dof::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetVertexDofsBlocked\"))\n\"\"\"\nfunction DMMoabGetVertexDofsBlocked(petsclib::PetscLibType, dm::PetscDM, dof::PetscInt) end\n\n@for_petsc function DMMoabGetVertexDofsBlocked(petsclib::$UnionPetscLib, dm::PetscDM, dof::$PetscInt )\n\n    @chk ccall(\n               (:DMMoabGetVertexDofsBlocked, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, dof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetVertexDofsBlockedLocal(petsclib::PetscLibType,dm::PetscDM, dof::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetVertexDofsBlockedLocal\"))\n\"\"\"\nfunction DMMoabGetVertexDofsBlockedLocal(petsclib::PetscLibType, dm::PetscDM, dof::PetscInt) end\n\n@for_petsc function DMMoabGetVertexDofsBlockedLocal(petsclib::$UnionPetscLib, dm::PetscDM, dof::$PetscInt )\n\n    @chk ccall(\n               (:DMMoabGetVertexDofsBlockedLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, dof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdmb::PetscDM = DMMoabCreate(petsclib::PetscLibType,comm::MPI_Comm) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCreate\"))\n\"\"\"\nfunction DMMoabCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMMoabCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tdmb_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMMoabCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, dmb_,\n              )\n\n\tdmb = PetscDM(dmb_[], petsclib)\n\n\treturn dmb\nend \n\n\"\"\"\n\tmbiface::moab_Interface,ltog_tag::moab_Tag,range::moab_Range,dmb::PetscDM = DMMoabCreateMoab(petsclib::PetscLibType,comm::MPI_Comm) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCreateMoab\"))\n\"\"\"\nfunction DMMoabCreateMoab(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMMoabCreateMoab(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tmbiface_ = Ref{moab_Interface}()\n\tltog_tag_ = Ref{moab_Tag}()\n\trange_ = Ref{moab_Range}()\n\tdmb_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMMoabCreateMoab, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{moab_Interface}, Ptr{moab_Tag}, Ptr{moab_Range}, Ptr{CDM}),\n               comm, mbiface_, ltog_tag_, range_, dmb_,\n              )\n\n\tmbiface = mbiface_[]\n\tltog_tag = ltog_tag_[]\n\trange = range_[]\n\tdmb = PetscDM(dmb_[], petsclib)\n\n\treturn mbiface,ltog_tag,range,dmb\nend \n\n\"\"\"\n\tDMMoabGetParallelComm(petsclib::PetscLibType,dm::PetscDM, pcomm::moab_ParallelComm) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetParallelComm\"))\n\"\"\"\nfunction DMMoabGetParallelComm(petsclib::PetscLibType, dm::PetscDM, pcomm::moab_ParallelComm) end\n\n@for_petsc function DMMoabGetParallelComm(petsclib::$UnionPetscLib, dm::PetscDM, pcomm::moab_ParallelComm )\n\n    @chk ccall(\n               (:DMMoabGetParallelComm, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_ParallelComm),\n               dm, pcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetInterface(petsclib::PetscLibType,dm::PetscDM, mbiface::moab_Interface) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetInterface\"))\n\"\"\"\nfunction DMMoabSetInterface(petsclib::PetscLibType, dm::PetscDM, mbiface::moab_Interface) end\n\n@for_petsc function DMMoabSetInterface(petsclib::$UnionPetscLib, dm::PetscDM, mbiface::moab_Interface )\n\n    @chk ccall(\n               (:DMMoabSetInterface, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{moab_Interface}),\n               dm, mbiface,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetInterface(petsclib::PetscLibType,dm::PetscDM, mbiface::moab_Interface) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetInterface\"))\n\"\"\"\nfunction DMMoabGetInterface(petsclib::PetscLibType, dm::PetscDM, mbiface::moab_Interface) end\n\n@for_petsc function DMMoabGetInterface(petsclib::$UnionPetscLib, dm::PetscDM, mbiface::moab_Interface )\n\n    @chk ccall(\n               (:DMMoabGetInterface, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_Interface),\n               dm, mbiface,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetLocalVertices(petsclib::PetscLibType,dm::PetscDM, range::moab_Range) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetLocalVertices\"))\n\"\"\"\nfunction DMMoabSetLocalVertices(petsclib::PetscLibType, dm::PetscDM, range::moab_Range) end\n\n@for_petsc function DMMoabSetLocalVertices(petsclib::$UnionPetscLib, dm::PetscDM, range::moab_Range )\n\n    @chk ccall(\n               (:DMMoabSetLocalVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{moab_Range}),\n               dm, range,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetAllVertices(petsclib::PetscLibType,dm::PetscDM, loc::moab_Range) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetAllVertices\"))\n\"\"\"\nfunction DMMoabGetAllVertices(petsclib::PetscLibType, dm::PetscDM, loc::moab_Range) end\n\n@for_petsc function DMMoabGetAllVertices(petsclib::$UnionPetscLib, dm::PetscDM, loc::moab_Range )\n\n    @chk ccall(\n               (:DMMoabGetAllVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{moab_Range}),\n               dm, loc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetLocalVertices(petsclib::PetscLibType,dm::PetscDM, owned::moab_Range, ghost::moab_Range) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetLocalVertices\"))\n\"\"\"\nfunction DMMoabGetLocalVertices(petsclib::PetscLibType, dm::PetscDM, owned::moab_Range, ghost::moab_Range) end\n\n@for_petsc function DMMoabGetLocalVertices(petsclib::$UnionPetscLib, dm::PetscDM, owned::moab_Range, ghost::moab_Range )\n\n    @chk ccall(\n               (:DMMoabGetLocalVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_Range, moab_Range),\n               dm, owned, ghost,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetLocalElements(petsclib::PetscLibType,dm::PetscDM, range::moab_Range) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetLocalElements\"))\n\"\"\"\nfunction DMMoabGetLocalElements(petsclib::PetscLibType, dm::PetscDM, range::moab_Range) end\n\n@for_petsc function DMMoabGetLocalElements(petsclib::$UnionPetscLib, dm::PetscDM, range::moab_Range )\n\n    @chk ccall(\n               (:DMMoabGetLocalElements, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_Range),\n               dm, range,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetLocalElements(petsclib::PetscLibType,dm::PetscDM, range::moab_Range) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetLocalElements\"))\n\"\"\"\nfunction DMMoabSetLocalElements(petsclib::PetscLibType, dm::PetscDM, range::moab_Range) end\n\n@for_petsc function DMMoabSetLocalElements(petsclib::$UnionPetscLib, dm::PetscDM, range::moab_Range )\n\n    @chk ccall(\n               (:DMMoabSetLocalElements, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{moab_Range}),\n               dm, range,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetLocalToGlobalTag(petsclib::PetscLibType,dm::PetscDM, ltogtag::moab_Tag) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetLocalToGlobalTag\"))\n\"\"\"\nfunction DMMoabSetLocalToGlobalTag(petsclib::PetscLibType, dm::PetscDM, ltogtag::moab_Tag) end\n\n@for_petsc function DMMoabSetLocalToGlobalTag(petsclib::$UnionPetscLib, dm::PetscDM, ltogtag::moab_Tag )\n\n    @chk ccall(\n               (:DMMoabSetLocalToGlobalTag, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_Tag),\n               dm, ltogtag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabGetLocalToGlobalTag(petsclib::PetscLibType,dm::PetscDM, ltog_tag::moab_Tag) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetLocalToGlobalTag\"))\n\"\"\"\nfunction DMMoabGetLocalToGlobalTag(petsclib::PetscLibType, dm::PetscDM, ltog_tag::moab_Tag) end\n\n@for_petsc function DMMoabGetLocalToGlobalTag(petsclib::$UnionPetscLib, dm::PetscDM, ltog_tag::moab_Tag )\n\n    @chk ccall(\n               (:DMMoabGetLocalToGlobalTag, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{moab_Tag}),\n               dm, ltog_tag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMMoabSetBlockSize(petsclib::PetscLibType,dm::PetscDM, bs::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetBlockSize\"))\n\"\"\"\nfunction DMMoabSetBlockSize(petsclib::PetscLibType, dm::PetscDM, bs::PetscInt) end\n\n@for_petsc function DMMoabSetBlockSize(petsclib::$UnionPetscLib, dm::PetscDM, bs::$PetscInt )\n\n    @chk ccall(\n               (:DMMoabSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = DMMoabGetBlockSize(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetBlockSize\"))\n\"\"\"\nfunction DMMoabGetBlockSize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabGetBlockSize(petsclib::$UnionPetscLib, dm::PetscDM )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\tneg::PetscInt,nvg::PetscInt = DMMoabGetSize(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetSize\"))\n\"\"\"\nfunction DMMoabGetSize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabGetSize(petsclib::$UnionPetscLib, dm::PetscDM )\n\tneg_ = Ref{$PetscInt}()\n\tnvg_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, neg_, nvg_,\n              )\n\n\tneg = neg_[]\n\tnvg = nvg_[]\n\n\treturn neg,nvg\nend \n\n\"\"\"\n\tnel::PetscInt,neg::PetscInt,nvl::PetscInt,nvg::PetscInt = DMMoabGetLocalSize(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetLocalSize\"))\n\"\"\"\nfunction DMMoabGetLocalSize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabGetLocalSize(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnel_ = Ref{$PetscInt}()\n\tneg_ = Ref{$PetscInt}()\n\tnvl_ = Ref{$PetscInt}()\n\tnvg_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, nel_, neg_, nvl_, nvg_,\n              )\n\n\tnel = nel_[]\n\tneg = neg_[]\n\tnvl = nvl_[]\n\tnvg = nvg_[]\n\n\treturn nel,neg,nvl,nvg\nend \n\n\"\"\"\n\toffset::PetscInt = DMMoabGetOffset(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetOffset\"))\n\"\"\"\nfunction DMMoabGetOffset(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabGetOffset(petsclib::$UnionPetscLib, dm::PetscDM )\n\toffset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetOffset, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, offset_,\n              )\n\n\toffset = offset_[]\n\n\treturn offset\nend \n\n\"\"\"\n\tdim::PetscInt = DMMoabGetDimension(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetDimension\"))\n\"\"\"\nfunction DMMoabGetDimension(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabGetDimension(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetDimension, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tnlevel::PetscInt = DMMoabGetHierarchyLevel(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetHierarchyLevel\"))\n\"\"\"\nfunction DMMoabGetHierarchyLevel(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabGetHierarchyLevel(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnlevel_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetHierarchyLevel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, nlevel_,\n              )\n\n\tnlevel = nlevel_[]\n\n\treturn nlevel\nend \n\n\"\"\"\n\tmat::PetscInt = DMMoabGetMaterialBlock(petsclib::PetscLibType,dm::PetscDM, ehandle::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetMaterialBlock\"))\n\"\"\"\nfunction DMMoabGetMaterialBlock(petsclib::PetscLibType, dm::PetscDM, ehandle::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetMaterialBlock(petsclib::$UnionPetscLib, dm::PetscDM, ehandle::moab_EntityHandle )\n\tmat_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetMaterialBlock, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_EntityHandle, Ptr{$PetscInt}),\n               dm, ehandle, mat_,\n              )\n\n\tmat = mat_[]\n\n\treturn mat\nend \n\n\"\"\"\n\tvpos::PetscReal = DMMoabGetVertexCoordinates(petsclib::PetscLibType,dm::PetscDM, nconn::PetscInt, conn::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetVertexCoordinates\"))\n\"\"\"\nfunction DMMoabGetVertexCoordinates(petsclib::PetscLibType, dm::PetscDM, nconn::PetscInt, conn::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetVertexCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, nconn::$PetscInt, conn::moab_EntityHandle )\n\tvpos_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMMoabGetVertexCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, Ptr{$PetscReal}),\n               dm, nconn, conn, vpos_,\n              )\n\n\tvpos = vpos_[]\n\n\treturn vpos\nend \n\n\"\"\"\n\tnconn::PetscInt = DMMoabGetVertexConnectivity(petsclib::PetscLibType,dm::PetscDM, vhandle::moab_EntityHandle, conn::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetVertexConnectivity\"))\n\"\"\"\nfunction DMMoabGetVertexConnectivity(petsclib::PetscLibType, dm::PetscDM, vhandle::moab_EntityHandle, conn::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetVertexConnectivity(petsclib::$UnionPetscLib, dm::PetscDM, vhandle::moab_EntityHandle, conn::moab_EntityHandle )\n\tnconn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetVertexConnectivity, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_EntityHandle, Ptr{$PetscInt}, moab_EntityHandle),\n               dm, vhandle, nconn_, conn,\n              )\n\n\tnconn = nconn_[]\n\n\treturn nconn\nend \n\n\"\"\"\n\tnconn::PetscInt = DMMoabRestoreVertexConnectivity(petsclib::PetscLibType,dm::PetscDM, ehandle::moab_EntityHandle, conn::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabRestoreVertexConnectivity\"))\n\"\"\"\nfunction DMMoabRestoreVertexConnectivity(petsclib::PetscLibType, dm::PetscDM, ehandle::moab_EntityHandle, conn::moab_EntityHandle) end\n\n@for_petsc function DMMoabRestoreVertexConnectivity(petsclib::$UnionPetscLib, dm::PetscDM, ehandle::moab_EntityHandle, conn::moab_EntityHandle )\n\tnconn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabRestoreVertexConnectivity, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_EntityHandle, Ptr{$PetscInt}, moab_EntityHandle),\n               dm, ehandle, nconn_, conn,\n              )\n\n\tnconn = nconn_[]\n\n\treturn nconn\nend \n\n\"\"\"\n\tnconn::PetscInt = DMMoabGetElementConnectivity(petsclib::PetscLibType,dm::PetscDM, ehandle::moab_EntityHandle, conn::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetElementConnectivity\"))\n\"\"\"\nfunction DMMoabGetElementConnectivity(petsclib::PetscLibType, dm::PetscDM, ehandle::moab_EntityHandle, conn::moab_EntityHandle) end\n\n@for_petsc function DMMoabGetElementConnectivity(petsclib::$UnionPetscLib, dm::PetscDM, ehandle::moab_EntityHandle, conn::moab_EntityHandle )\n\tnconn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabGetElementConnectivity, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_EntityHandle, Ptr{$PetscInt}, moab_EntityHandle),\n               dm, ehandle, nconn_, conn,\n              )\n\n\tnconn = nconn_[]\n\n\treturn nconn\nend \n\n\"\"\"\n\tent_on_boundary::PetscBool = DMMoabIsEntityOnBoundary(petsclib::PetscLibType,dm::PetscDM, ent::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabIsEntityOnBoundary\"))\n\"\"\"\nfunction DMMoabIsEntityOnBoundary(petsclib::PetscLibType, dm::PetscDM, ent::moab_EntityHandle) end\n\n@for_petsc function DMMoabIsEntityOnBoundary(petsclib::$UnionPetscLib, dm::PetscDM, ent::moab_EntityHandle )\n\tent_on_boundary_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMMoabIsEntityOnBoundary, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_EntityHandle, Ptr{PetscBool}),\n               dm, ent, ent_on_boundary_,\n              )\n\n\tent_on_boundary = ent_on_boundary_[]\n\n\treturn ent_on_boundary\nend \n\n\"\"\"\n\tisbdvtx::PetscBool = DMMoabCheckBoundaryVertices(petsclib::PetscLibType,dm::PetscDM, nconn::PetscInt, cnt::moab_EntityHandle) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCheckBoundaryVertices\"))\n\"\"\"\nfunction DMMoabCheckBoundaryVertices(petsclib::PetscLibType, dm::PetscDM, nconn::PetscInt, cnt::moab_EntityHandle) end\n\n@for_petsc function DMMoabCheckBoundaryVertices(petsclib::$UnionPetscLib, dm::PetscDM, nconn::$PetscInt, cnt::moab_EntityHandle )\n\tisbdvtx_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMMoabCheckBoundaryVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{moab_EntityHandle}, Ptr{PetscBool}),\n               dm, nconn, cnt, isbdvtx_,\n              )\n\n\tisbdvtx = isbdvtx_[]\n\n\treturn isbdvtx\nend \n\n\"\"\"\n\tDMMoabGetBoundaryMarkers(petsclib::PetscLibType,dm::PetscDM, bdvtx::moab_Range, bdelems::moab_Range, bdfaces::moab_Range) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabGetBoundaryMarkers\"))\n\"\"\"\nfunction DMMoabGetBoundaryMarkers(petsclib::PetscLibType, dm::PetscDM, bdvtx::moab_Range, bdelems::moab_Range, bdfaces::moab_Range) end\n\n@for_petsc function DMMoabGetBoundaryMarkers(petsclib::$UnionPetscLib, dm::PetscDM, bdvtx::moab_Range, bdelems::moab_Range, bdfaces::moab_Range )\n\n    @chk ccall(\n               (:DMMoabGetBoundaryMarkers, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_Range, moab_Range, moab_Range),\n               dm, bdvtx, bdelems, bdfaces,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcoords::PetscReal,overts::moab_Range = DMMoabCreateVertices(petsclib::PetscLibType,dm::PetscDM, nverts::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCreateVertices\"))\n\"\"\"\nfunction DMMoabCreateVertices(petsclib::PetscLibType, dm::PetscDM, nverts::PetscInt) end\n\n@for_petsc function DMMoabCreateVertices(petsclib::$UnionPetscLib, dm::PetscDM, nverts::$PetscInt )\n\tcoords_ = Ref{$PetscReal}()\n\toverts_ = Ref{moab_Range}()\n\n    @chk ccall(\n               (:DMMoabCreateVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}, $PetscInt, Ptr{moab_Range}),\n               dm, coords_, nverts, overts_,\n              )\n\n\tcoords = coords_[]\n\toverts = overts_[]\n\n\treturn coords,overts\nend \n\n\"\"\"\n\tconn::moab_EntityHandle,oelem::moab_EntityHandle = DMMoabCreateElement(petsclib::PetscLibType,dm::PetscDM, type::moab_EntityType, nverts::PetscInt) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCreateElement\"))\n\"\"\"\nfunction DMMoabCreateElement(petsclib::PetscLibType, dm::PetscDM, type::moab_EntityType, nverts::PetscInt) end\n\n@for_petsc function DMMoabCreateElement(petsclib::$UnionPetscLib, dm::PetscDM, type::moab_EntityType, nverts::$PetscInt )\n\tconn_ = Ref{moab_EntityHandle}()\n\toelem_ = Ref{moab_EntityHandle}()\n\n    @chk ccall(\n               (:DMMoabCreateElement, $petsc_library),\n               PetscErrorCode,\n               (CDM, moab_EntityType, Ptr{moab_EntityHandle}, $PetscInt, Ptr{moab_EntityHandle}),\n               dm, type, conn_, nverts, oelem_,\n              )\n\n\tconn = conn_[]\n\toelem = oelem_[]\n\n\treturn conn,oelem\nend \n\n\"\"\"\n\tnewdm::PetscDM = DMMoabCreateSubmesh(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabCreateSubmesh\"))\n\"\"\"\nfunction DMMoabCreateSubmesh(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabCreateSubmesh(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnewdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMMoabCreateSubmesh, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, newdm_,\n              )\n\n\tnewdm = PetscDM(newdm_[], petsclib)\n\n\treturn newdm\nend \n\n\"\"\"\n\tdfill::PetscInt,ofill::PetscInt = DMMoabSetBlockFills(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMMoab/DMMoabSetBlockFills\"))\n\"\"\"\nfunction DMMoabSetBlockFills(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMMoabSetBlockFills(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdfill_ = Ref{$PetscInt}()\n\tofill_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMMoabSetBlockFills, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, dfill_, ofill_,\n              )\n\n\tdfill = dfill_[]\n\tofill = ofill_[]\n\n\treturn dfill,ofill\nend \n\n\"\"\"\n\tpoint::PetscInt = DMPlexGetActivePoint(petsclib::PetscLibType,dm::PetscDM) \nGet the point on which projection is currently working\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DM`\n\nOutput Parameter:\n- `point` - The mesh point involved in the current projection\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetActivePoint()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetActivePoint\"))\n\"\"\"\nfunction DMPlexGetActivePoint(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetActivePoint(petsclib::$UnionPetscLib, dm::PetscDM )\n\tpoint_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetActivePoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, point_,\n              )\n\n\tpoint = point_[]\n\n\treturn point\nend \n\n\"\"\"\n\tDMPlexSetActivePoint(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \nSet the point on which projection is currently working\n\nNot Collective\n\nInput Parameters:\n- `dm`    - the `DM`\n- `point` - The mesh point involved in the current projection\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetActivePoint()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetActivePoint\"))\n\"\"\"\nfunction DMPlexSetActivePoint(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMPlexSetActivePoint(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexSetActivePoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, point,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpoint::PetscInt = DMGetFirstLabeledPoint(petsclib::PetscLibType,dm::PetscDM, odm::PetscDM, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, height::PetscInt, ds::PetscDS) \nFind first labeled `point` in `odm` such that the corresponding point in `dm` has the specified `height`. Return `point` and the corresponding `ds`.\n\nInput Parameters:\n- `dm`     - the `DM`\n- `odm`    - the enclosing `DM`\n- `label`  - label for `DM` domain, or `NULL` for whole domain\n- `numIds` - the number of `ids`\n- `ids`    - An array of the label ids in sequence for the domain\n- `height` - Height of target cells in `DMPLEX` topology\n\nOutput Parameters:\n- `point` - the first labeled point\n- `ds`    - the `PetscDS` corresponding to the first labeled point\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetActivePoint()`, `DMLabel`, `PetscDS`\n\n# External Links\n$(_doc_external(\"DM/DMGetFirstLabeledPoint\"))\n\"\"\"\nfunction DMGetFirstLabeledPoint(petsclib::PetscLibType, dm::PetscDM, odm::PetscDM, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, height::PetscInt, ds::PetscDS) end\n\n@for_petsc function DMGetFirstLabeledPoint(petsclib::$UnionPetscLib, dm::PetscDM, odm::PetscDM, label::DMLabel, numIds::$PetscInt, ids::Vector{$PetscInt}, height::$PetscInt, ds::PetscDS )\n\tpoint_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetFirstLabeledPoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{PetscDS}),\n               dm, odm, label, numIds, ids, height, point_, ds,\n              )\n\n\tpoint = point_[]\n\n\treturn point\nend \n\n\"\"\"\n\tDMPlexSetMigrationSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF) \nSets the `PetscSF` for migrating from a parent `DM` into this `DM`\n\nLogically Collective\n\nInput Parameters:\n- `dm`          - The `DM`\n- `migrationSF` - The `PetscSF`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSF`, `DMPlexDistribute()`, `DMPlexDistributeField()`, `DMPlexCreateMigrationSF()`, `DMPlexGetMigrationSF()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetMigrationSF\"))\n\"\"\"\nfunction DMPlexSetMigrationSF(petsclib::PetscLibType, dm::PetscDM, migrationSF::PetscSF) end\n\n@for_petsc function DMPlexSetMigrationSF(petsclib::$UnionPetscLib, dm::PetscDM, migrationSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexSetMigrationSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF),\n               dm, migrationSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetMigrationSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF) \nGets the `PetscSF` for migrating from a parent `DM` into this `DM`\n\nNote Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `migrationSF` - The `PetscSF`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSF`, `DMPlexDistribute()`, `DMPlexDistributeField()`, `DMPlexCreateMigrationSF()`, `DMPlexSetMigrationSF`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetMigrationSF\"))\n\"\"\"\nfunction DMPlexGetMigrationSF(petsclib::PetscLibType, dm::PetscDM, migrationSF::PetscSF) end\n\n@for_petsc function DMPlexGetMigrationSF(petsclib::$UnionPetscLib, dm::PetscDM, migrationSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexGetMigrationSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}),\n               dm, migrationSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsfNatural::PetscSF = DMPlexCreateGlobalToNaturalSF(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, sfMigration::PetscSF) \nCreates the `PetscSF` for mapping Global `Vec` to the Natural `Vec`\n\nInput Parameters:\n- `dm`          - The redistributed `DM`\n- `section`     - The local `PetscSection` describing the `Vec` before the mesh was distributed, or `NULL` if not available\n- `sfMigration` - The `PetscSF` used to distribute the mesh, or `NULL` if it cannot be computed\n\nOutput Parameter:\n- `sfNatural` - `PetscSF` for mapping the `Vec` in PETSc ordering to the canonical ordering\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSF`, `PetscSection`, `DMPlexDistribute()`, `DMPlexDistributeField()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateGlobalToNaturalSF\"))\n\"\"\"\nfunction DMPlexCreateGlobalToNaturalSF(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, sfMigration::PetscSF) end\n\n@for_petsc function DMPlexCreateGlobalToNaturalSF(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, sfMigration::PetscSF )\n\tsfNatural_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:DMPlexCreateGlobalToNaturalSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSF, Ptr{PetscSF}),\n               dm, section, sfMigration, sfNatural_,\n              )\n\n\tsfNatural = sfNatural_[]\n\n\treturn sfNatural\nend \n\n\"\"\"\n\tDMPlexMigrateGlobalToNaturalSF(petsclib::PetscLibType,dmOld::PetscDM, dmNew::PetscDM, sfNaturalOld::PetscSF, sfMigration::PetscSF, sfNaturalNew::PetscSF) \nMigrates the input `sfNatural` based on sfMigration\n\nInput Parameters:\n- `dmOld`        - The original `DM`\n- `dmNew`        - The `DM` to be migrated to\n- `sfNaturalOld` - The sfNatural for the `dmOld`\n- `sfMigration`  - The `PetscSF` used to distribute the mesh, or `NULL` if it cannot be computed\n\nOutput Parameter:\n- `sfNaturalNew` - `PetscSF` for mapping the `Vec` in PETSc ordering to the canonical ordering\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSF`, `PetscSection`, `DMPlexDistribute()`, `DMPlexDistributeField()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMigrateGlobalToNaturalSF\"))\n\"\"\"\nfunction DMPlexMigrateGlobalToNaturalSF(petsclib::PetscLibType, dmOld::PetscDM, dmNew::PetscDM, sfNaturalOld::PetscSF, sfMigration::PetscSF, sfNaturalNew::PetscSF) end\n\n@for_petsc function DMPlexMigrateGlobalToNaturalSF(petsclib::$UnionPetscLib, dmOld::PetscDM, dmNew::PetscDM, sfNaturalOld::PetscSF, sfMigration::PetscSF, sfNaturalNew::PetscSF )\n\n    @chk ccall(\n               (:DMPlexMigrateGlobalToNaturalSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, PetscSF, PetscSF, Ptr{PetscSF}),\n               dmOld, dmNew, sfNaturalOld, sfMigration, sfNaturalNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGlobalToNaturalBegin(petsclib::PetscLibType,dm::PetscDM, gv::PetscVec, nv::PetscVec) \nRearranges a global `Vec` in the natural order.\n\nCollective\n\nInput Parameters:\n- `dm` - The distributed `DMPLEX`\n- `gv` - The global `Vec`\n\nOutput Parameter:\n- `nv` - `Vec` in the canonical ordering distributed over all processors associated with `gv`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `Vec`, `DMPlexDistribute()`, `DMPlexDistributeField()`, `DMPlexNaturalToGlobalBegin()`, `DMPlexGlobalToNaturalEnd()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGlobalToNaturalBegin\"))\n\"\"\"\nfunction DMPlexGlobalToNaturalBegin(petsclib::PetscLibType, dm::PetscDM, gv::PetscVec, nv::PetscVec) end\n\n@for_petsc function DMPlexGlobalToNaturalBegin(petsclib::$UnionPetscLib, dm::PetscDM, gv::PetscVec, nv::PetscVec )\n\n    @chk ccall(\n               (:DMPlexGlobalToNaturalBegin, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, gv, nv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGlobalToNaturalEnd(petsclib::PetscLibType,dm::PetscDM, gv::PetscVec, nv::PetscVec) \nRearranges a global `Vec` in the natural order.\n\nCollective\n\nInput Parameters:\n- `dm` - The distributed `DMPLEX`\n- `gv` - The global `Vec`\n\nOutput Parameter:\n- `nv` - The natural `Vec`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `Vec`, `DMPlexDistribute()`, `DMPlexDistributeField()`, `DMPlexNaturalToGlobalBegin()`, `DMPlexGlobalToNaturalBegin()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGlobalToNaturalEnd\"))\n\"\"\"\nfunction DMPlexGlobalToNaturalEnd(petsclib::PetscLibType, dm::PetscDM, gv::PetscVec, nv::PetscVec) end\n\n@for_petsc function DMPlexGlobalToNaturalEnd(petsclib::$UnionPetscLib, dm::PetscDM, gv::PetscVec, nv::PetscVec )\n\n    @chk ccall(\n               (:DMPlexGlobalToNaturalEnd, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, gv, nv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexNaturalToGlobalBegin(petsclib::PetscLibType,dm::PetscDM, nv::PetscVec, gv::PetscVec) \nRearranges a `Vec` in the natural order to the Global order.\n\nCollective\n\nInput Parameters:\n- `dm` - The distributed `DMPLEX`\n- `nv` - The natural `Vec`\n\nOutput Parameter:\n- `gv` - The global `Vec`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `Vec`, `DMPlexDistribute()`, `DMPlexDistributeField()`, `DMPlexGlobalToNaturalEnd()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexNaturalToGlobalBegin\"))\n\"\"\"\nfunction DMPlexNaturalToGlobalBegin(petsclib::PetscLibType, dm::PetscDM, nv::PetscVec, gv::PetscVec) end\n\n@for_petsc function DMPlexNaturalToGlobalBegin(petsclib::$UnionPetscLib, dm::PetscDM, nv::PetscVec, gv::PetscVec )\n\n    @chk ccall(\n               (:DMPlexNaturalToGlobalBegin, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, nv, gv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexNaturalToGlobalEnd(petsclib::PetscLibType,dm::PetscDM, nv::PetscVec, gv::PetscVec) \nRearranges a `Vec` in the natural order to the Global order.\n\nCollective\n\nInput Parameters:\n- `dm` - The distributed `DMPLEX`\n- `nv` - The natural `Vec`\n\nOutput Parameter:\n- `gv` - The global `Vec`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `Vec`, `DMPlexDistribute()`, `DMPlexDistributeField()`, `DMPlexNaturalToGlobalBegin()`, `DMPlexGlobalToNaturalBegin()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexNaturalToGlobalEnd\"))\n\"\"\"\nfunction DMPlexNaturalToGlobalEnd(petsclib::PetscLibType, dm::PetscDM, nv::PetscVec, gv::PetscVec) end\n\n@for_petsc function DMPlexNaturalToGlobalEnd(petsclib::$UnionPetscLib, dm::PetscDM, nv::PetscVec, gv::PetscVec )\n\n    @chk ccall(\n               (:DMPlexNaturalToGlobalEnd, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, nv, gv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnv::PetscVec = DMPlexCreateNaturalVector(petsclib::PetscLibType,dm::PetscDM) \nProvide a `Vec` capable of holding the natural ordering and distribution.\n\nCollective\n\nInput Parameter:\n- `dm` - The distributed `DMPLEX`\n\nOutput Parameter:\n- `nv` - The natural `Vec`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `Vec`, `DMPlexDistribute()`, `DMPlexNaturalToGlobalBegin()`, `DMPlexGlobalToNaturalBegin()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateNaturalVector\"))\n\"\"\"\nfunction DMPlexCreateNaturalVector(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCreateNaturalVector(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMPlexCreateNaturalVector, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, nv_,\n              )\n\n\tnv = PetscVec(nv_[], petsclib)\n\n\treturn nv\nend \n\n\"\"\"\n\tprocessRanks::IS,sfProcess::PetscSF = DMPlexCreateProcessSF(petsclib::PetscLibType,dm::PetscDM, sfPoint::PetscSF) \nCreate an `PetscSF` which just has process connectivity\n\nCollective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `sfPoint` - The `PetscSF` which encodes point connectivity\n\nOutput Parameters:\n- `processRanks` - A list of process neighbors, or `NULL`\n- `sfProcess`    - An `PetscSF` encoding the process connectivity, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSF`, `PetscSFCreate()`, `DMPlexCreateTwoSidedProcessSF()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateProcessSF\"))\n\"\"\"\nfunction DMPlexCreateProcessSF(petsclib::PetscLibType, dm::PetscDM, sfPoint::PetscSF) end\n\n@for_petsc function DMPlexCreateProcessSF(petsclib::$UnionPetscLib, dm::PetscDM, sfPoint::PetscSF )\n\tprocessRanks_ = Ref{IS}()\n\tsfProcess_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:DMPlexCreateProcessSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, Ptr{CIS}, Ptr{PetscSF}),\n               dm, sfPoint, processRanks_, sfProcess_,\n              )\n\n\tprocessRanks = processRanks_[]\n\tsfProcess = sfProcess_[]\n\n\treturn processRanks,sfProcess\nend \n\n\"\"\"\n\tfpointIS::IS = DMPlexCreateCoarsePointIS(petsclib::PetscLibType,dm::PetscDM) \nCreates an `IS` covering the coarse `DM` chart with the fine points as data\n\nCollective\n\nInput Parameter:\n- `dm` - The coarse `DM`\n\nOutput Parameter:\n- `fpointIS` - The `IS` of all the fine points which exist in the original coarse mesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `IS`, `DMRefine()`, `DMPlexSetRefinementUniform()`, `DMPlexGetSubpointIS()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateCoarsePointIS\"))\n\"\"\"\nfunction DMPlexCreateCoarsePointIS(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCreateCoarsePointIS(petsclib::$UnionPetscLib, dm::PetscDM )\n\tfpointIS_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMPlexCreateCoarsePointIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, fpointIS_,\n              )\n\n\tfpointIS = fpointIS_[]\n\n\treturn fpointIS\nend \n\n\"\"\"\n\tDMPlexSetTransformType(petsclib::PetscLibType,dm::PetscDM, type::DMPlexTransformType) \nSet the transform type for uniform refinement\n\nInput Parameters:\n- `dm`   - The `DM`\n- `type` - The transform type for uniform refinement\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransformType`, `DMRefine()`, `DMPlexGetTransformType()`, `DMPlexSetRefinementUniform()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetTransformType\"))\n\"\"\"\nfunction DMPlexSetTransformType(petsclib::PetscLibType, dm::PetscDM, type::DMPlexTransformType) end\n\n@for_petsc function DMPlexSetTransformType(petsclib::$UnionPetscLib, dm::PetscDM, type::DMPlexTransformType )\n\n    @chk ccall(\n               (:DMPlexSetTransformType, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMPlexTransformType),\n               dm, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::DMPlexTransformType = DMPlexGetTransformType(petsclib::PetscLibType,dm::PetscDM) \nRetrieve the transform type for uniform refinement\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `type` - The transform type for uniform refinement\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransformType`, `DMRefine()`, `DMPlexSetTransformType()`, `DMPlexGetRefinementUniform()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetTransformType\"))\n\"\"\"\nfunction DMPlexGetTransformType(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetTransformType(petsclib::$UnionPetscLib, dm::PetscDM )\n\ttype_ = Ref{DMPlexTransformType}()\n\n    @chk ccall(\n               (:DMPlexGetTransformType, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMPlexTransformType}),\n               dm, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tDMPlexSetTransform(petsclib::PetscLibType,dm::PetscDM, tr::DMPlexTransform) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetTransform\"))\n\"\"\"\nfunction DMPlexSetTransform(petsclib::PetscLibType, dm::PetscDM, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexSetTransform(petsclib::$UnionPetscLib, dm::PetscDM, tr::DMPlexTransform )\n\n    @chk ccall(\n               (:DMPlexSetTransform, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMPlexTransform),\n               dm, tr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetTransform(petsclib::PetscLibType,dm::PetscDM, tr::DMPlexTransform) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetTransform\"))\n\"\"\"\nfunction DMPlexGetTransform(petsclib::PetscLibType, dm::PetscDM, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexGetTransform(petsclib::$UnionPetscLib, dm::PetscDM, tr::DMPlexTransform )\n\n    @chk ccall(\n               (:DMPlexGetTransform, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMPlexTransform}),\n               dm, tr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetSaveTransform(petsclib::PetscLibType,dm::PetscDM, save::PetscBool) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetSaveTransform\"))\n\"\"\"\nfunction DMPlexSetSaveTransform(petsclib::PetscLibType, dm::PetscDM, save::PetscBool) end\n\n@for_petsc function DMPlexSetSaveTransform(petsclib::$UnionPetscLib, dm::PetscDM, save::PetscBool )\n\n    @chk ccall(\n               (:DMPlexSetSaveTransform, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, save,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsave::PetscBool = DMPlexGetSaveTransform(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSaveTransform\"))\n\"\"\"\nfunction DMPlexGetSaveTransform(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetSaveTransform(petsclib::$UnionPetscLib, dm::PetscDM )\n\tsave_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetSaveTransform, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, save_,\n              )\n\n\tsave = save_[]\n\n\treturn save\nend \n\n\"\"\"\n\tDMPlexSetRefinementUniform(petsclib::PetscLibType,dm::PetscDM, refinementUniform::PetscBool) \nSet the flag for uniform refinement\n\nInput Parameters:\n- `dm`                - The `DM`\n- `refinementUniform` - The flag for uniform refinement\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRefine()`, `DMPlexGetRefinementUniform()`, `DMPlexGetRefinementLimit()`, `DMPlexSetRefinementLimit()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetRefinementUniform\"))\n\"\"\"\nfunction DMPlexSetRefinementUniform(petsclib::PetscLibType, dm::PetscDM, refinementUniform::PetscBool) end\n\n@for_petsc function DMPlexSetRefinementUniform(petsclib::$UnionPetscLib, dm::PetscDM, refinementUniform::PetscBool )\n\n    @chk ccall(\n               (:DMPlexSetRefinementUniform, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, refinementUniform,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trefinementUniform::PetscBool = DMPlexGetRefinementUniform(petsclib::PetscLibType,dm::PetscDM) \nRetrieve the flag for uniform refinement\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `refinementUniform` - The flag for uniform refinement\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRefine()`, `DMPlexSetRefinementUniform()`, `DMPlexGetRefinementLimit()`, `DMPlexSetRefinementLimit()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetRefinementUniform\"))\n\"\"\"\nfunction DMPlexGetRefinementUniform(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetRefinementUniform(petsclib::$UnionPetscLib, dm::PetscDM )\n\trefinementUniform_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetRefinementUniform, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, refinementUniform_,\n              )\n\n\trefinementUniform = refinementUniform_[]\n\n\treturn refinementUniform\nend \n\n\"\"\"\n\tDMPlexSetRefinementLimit(petsclib::PetscLibType,dm::PetscDM, refinementLimit::PetscReal) \nSet the maximum cell volume for refinement\n\nInput Parameters:\n- `dm`              - The `DM`\n- `refinementLimit` - The maximum cell volume in the refined mesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRefine()`, `DMPlexGetRefinementLimit()`, `DMPlexGetRefinementUniform()`, `DMPlexSetRefinementUniform()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetRefinementLimit\"))\n\"\"\"\nfunction DMPlexSetRefinementLimit(petsclib::PetscLibType, dm::PetscDM, refinementLimit::PetscReal) end\n\n@for_petsc function DMPlexSetRefinementLimit(petsclib::$UnionPetscLib, dm::PetscDM, refinementLimit::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexSetRefinementLimit, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, refinementLimit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trefinementLimit::PetscReal = DMPlexGetRefinementLimit(petsclib::PetscLibType,dm::PetscDM) \nRetrieve the maximum cell volume for refinement\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `refinementLimit` - The maximum cell volume in the refined mesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRefine()`, `DMPlexSetRefinementLimit()`, `DMPlexGetRefinementUniform()`, `DMPlexSetRefinementUniform()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetRefinementLimit\"))\n\"\"\"\nfunction DMPlexGetRefinementLimit(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetRefinementLimit(petsclib::$UnionPetscLib, dm::PetscDM )\n\trefinementLimit_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexGetRefinementLimit, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, refinementLimit_,\n              )\n\n\trefinementLimit = refinementLimit_[]\n\n\treturn refinementLimit\nend \n\n\"\"\"\n\tDMPlexSetRefinementFunction(petsclib::PetscLibType,dm::PetscDM, refinementFunc::external) \nSet the function giving the maximum cell volume for refinement\n\nInput Parameters:\n- `dm`             - The `DM`\n- `refinementFunc` - Function giving the maximum cell volume in the refined mesh\n\nCalling Sequence of `refinementFunc`:\n- `coords` - Coordinates of the current point, usually a cell centroid\n- `limit`  - The maximum cell volume for a cell containing this point\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRefine()`, `DMPlexGetRefinementFunction()`, `DMPlexGetRefinementUniform()`, `DMPlexSetRefinementUniform()`, `DMPlexGetRefinementLimit()`, `DMPlexSetRefinementLimit()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetRefinementFunction\"))\n\"\"\"\nfunction DMPlexSetRefinementFunction(petsclib::PetscLibType, dm::PetscDM, refinementFunc::external) end\n\n@for_petsc function DMPlexSetRefinementFunction(petsclib::$UnionPetscLib, dm::PetscDM, refinementFunc::external )\n\n    @chk ccall(\n               (:DMPlexSetRefinementFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, external),\n               dm, refinementFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumVertices::PetscInt,offsets::PetscInt,adjacency::PetscInt,globalNumbering::IS = DMPlexCreatePartitionerGraph(petsclib::PetscLibType,dm::PetscDM, height::PetscInt) \nCreate a CSR graph of point connections for the partitioner\n\nCollective\n\nInput Parameters:\n- `dm`     - The mesh `DM`\n- `height` - Height of the strata from which to construct the graph\n\nOutput Parameters:\n- `numVertices`     - Number of vertices in the graph\n- `offsets`         - Point offsets in the graph\n- `adjacency`       - Point connectivity in the graph\n- `globalNumbering` - A map from the local cell numbering to the global numbering used in \"adjacency\".  Negative indicates that the cell is a duplicate from another process.\n\nOptions Database Key:\n- `-dm_plex_csr_alg <mat,graph,overlap>` - Choose the algorithm for computing the CSR graph\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscPartitionerGetType()`, `PetscPartitionerCreate()`, `DMSetAdjacency()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreatePartitionerGraph\"))\n\"\"\"\nfunction DMPlexCreatePartitionerGraph(petsclib::PetscLibType, dm::PetscDM, height::PetscInt) end\n\n@for_petsc function DMPlexCreatePartitionerGraph(petsclib::$UnionPetscLib, dm::PetscDM, height::$PetscInt )\n\tnumVertices_ = Ref{$PetscInt}()\n\toffsets_ = Ref{$PetscInt}()\n\tadjacency_ = Ref{$PetscInt}()\n\tglobalNumbering_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMPlexCreatePartitionerGraph, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscInt, Ptr{CIS}),\n               dm, height, numVertices_, offsets_, adjacency_, globalNumbering_,\n              )\n\n\tnumVertices = numVertices_[]\n\toffsets = offsets_[]\n\tadjacency = adjacency_[]\n\tglobalNumbering = globalNumbering_[]\n\n\treturn numVertices,offsets,adjacency,globalNumbering\nend \n\n\"\"\"\n\tnumVertices::PetscInt,offsets::PetscInt,adjacency::PetscInt = DMPlexCreateNeighborCSR(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt) \nCreate a mesh graph (cell\n\nCollective\n\nInput Parameters:\n- `dm`         - The `DMPLEX`\n- `cellHeight` - The height of mesh points to treat as cells (default should be 0)\n\nOutput Parameters:\n- `numVertices` - The number of local vertices in the graph, or cells in the mesh.\n- `offsets`     - The offset to the adjacency list for each cell\n- `adjacency`   - The adjacency list for all cells\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateNeighborCSR\"))\n\"\"\"\nfunction DMPlexCreateNeighborCSR(petsclib::PetscLibType, dm::PetscDM, cellHeight::PetscInt) end\n\n@for_petsc function DMPlexCreateNeighborCSR(petsclib::$UnionPetscLib, dm::PetscDM, cellHeight::$PetscInt )\n\tnumVertices_ = Ref{$PetscInt}()\n\toffsets_ = Ref{$PetscInt}()\n\tadjacency_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexCreateNeighborCSR, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscInt),\n               dm, cellHeight, numVertices_, offsets_, adjacency_,\n              )\n\n\tnumVertices = numVertices_[]\n\toffsets = offsets_[]\n\tadjacency = adjacency_[]\n\n\treturn numVertices,offsets,adjacency\nend \n\n\"\"\"\n\tDMPlexGetPartitioner(petsclib::PetscLibType,dm::PetscDM, part::PetscPartitioner) \nGet the mesh partitioner\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `part` - The `PetscPartitioner`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscPartitioner`, `PetscSection`, `DMPlexDistribute()`, `DMPlexSetPartitioner()`, `PetscPartitionerDMPlexPartition()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPartitioner\"))\n\"\"\"\nfunction DMPlexGetPartitioner(petsclib::PetscLibType, dm::PetscDM, part::PetscPartitioner) end\n\n@for_petsc function DMPlexGetPartitioner(petsclib::$UnionPetscLib, dm::PetscDM, part::PetscPartitioner )\n\n    @chk ccall(\n               (:DMPlexGetPartitioner, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscPartitioner}),\n               dm, part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetPartitioner(petsclib::PetscLibType,dm::PetscDM, part::PetscPartitioner) \nSet the mesh partitioner\n\nlogically Collective\n\nInput Parameters:\n- `dm`   - The `DM`\n- `part` - The partitioner\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscPartitioner`,`DMPlexDistribute()`, `DMPlexGetPartitioner()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetPartitioner\"))\n\"\"\"\nfunction DMPlexSetPartitioner(petsclib::PetscLibType, dm::PetscDM, part::PetscPartitioner) end\n\n@for_petsc function DMPlexSetPartitioner(petsclib::$UnionPetscLib, dm::PetscDM, part::PetscPartitioner )\n\n    @chk ccall(\n               (:DMPlexSetPartitioner, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscPartitioner),\n               dm, part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPartitionLabelClosure(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nAdd the closure of all points to the partition label\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - `DMLabel` assigning ranks to remote roots\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLabel`, `DMPlexPartitionLabelCreateSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPartitionLabelClosure\"))\n\"\"\"\nfunction DMPlexPartitionLabelClosure(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexPartitionLabelClosure(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexPartitionLabelClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPartitionLabelAdjacency(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nAdd one level of adjacent points to the partition label\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - `DMLabel` assigning ranks to remote roots\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLabel`, `DMPlexPartitionLabelCreateSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPartitionLabelAdjacency\"))\n\"\"\"\nfunction DMPlexPartitionLabelAdjacency(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexPartitionLabelAdjacency(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexPartitionLabelAdjacency, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPartitionLabelPropagate(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nPropagate points in a partition label over the point `PetscSF`\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - `DMLabel` assigning ranks to remote roots\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLabel`, `DMPlexPartitionLabelCreateSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPartitionLabelPropagate\"))\n\"\"\"\nfunction DMPlexPartitionLabelPropagate(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexPartitionLabelPropagate(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexPartitionLabelPropagate, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPartitionLabelInvert(petsclib::PetscLibType,dm::PetscDM, rootLabel::DMLabel, processSF::PetscSF, leafLabel::DMLabel) \nCreate a partition label of remote roots from a local root label\n\nInput Parameters:\n- `dm`        - The `DM`\n- `rootLabel` - `DMLabel` assigning ranks to local roots\n- `processSF` - A star forest mapping into the local index on each remote rank\n\nOutput Parameter:\n- `leafLabel` - `DMLabel` assigning ranks to remote roots\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexPartitionLabelCreateSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPartitionLabelInvert\"))\n\"\"\"\nfunction DMPlexPartitionLabelInvert(petsclib::PetscLibType, dm::PetscDM, rootLabel::DMLabel, processSF::PetscSF, leafLabel::DMLabel) end\n\n@for_petsc function DMPlexPartitionLabelInvert(petsclib::$UnionPetscLib, dm::PetscDM, rootLabel::DMLabel, processSF::PetscSF, leafLabel::DMLabel )\n\n    @chk ccall(\n               (:DMPlexPartitionLabelInvert, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, PetscSF, DMLabel),\n               dm, rootLabel, processSF, leafLabel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsf::PetscSF = DMPlexPartitionLabelCreateSF(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, sortRanks::PetscBool) \nCreate a star forest from a label that assigns ranks to points\n\nInput Parameters:\n- `dm`        - The `DM`\n- `label`     - `DMLabel` assigning ranks to remote roots\n- `sortRanks` - Whether or not to sort the `PetscSF` leaves by rank\n\nOutput Parameter:\n- `sf` - The star forest communication context encapsulating the defined mapping\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLabel`, `PetscSF`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPartitionLabelCreateSF\"))\n\"\"\"\nfunction DMPlexPartitionLabelCreateSF(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, sortRanks::PetscBool) end\n\n@for_petsc function DMPlexPartitionLabelCreateSF(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, sortRanks::PetscBool )\n\tsf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:DMPlexPartitionLabelCreateSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, PetscBool, Ptr{PetscSF}),\n               dm, label, sortRanks, sf_,\n              )\n\n\tsf = sf_[]\n\n\treturn sf\nend \n\n\"\"\"\n\tsuccess::PetscBool = DMPlexRebalanceSharedPoints(petsclib::PetscLibType,dm::PetscDM, entityDepth::PetscInt, useInitialGuess::PetscBool, parallel::PetscBool) \nRedistribute points in the plex that are shared in order to achieve better balancing. This routine updates the `PointSF` of the `DM` inplace.\n\nInput Parameters:\n- `dm`              - The `DMPLEX` object.\n- `entityDepth`     - depth of the entity to balance (0 -> balance vertices).\n- `useInitialGuess` - whether to use the current distribution as initial guess (only used by ParMETIS).\n- `parallel`        - whether to use ParMETIS and do the partition in parallel or whether to gather the graph onto a single process and use METIS.\n\nOutput Parameter:\n- `success` - whether the graph partitioning was successful or not, optional. Unsuccessful simply means no change to the partitioning\n\nOptions Database Keys:\n- `-dm_plex_rebalance_shared_points_parmetis`             - Use ParMetis instead of Metis for the partitioner\n- `-dm_plex_rebalance_shared_points_use_initial_guess`    - Use current partition to bootstrap ParMetis partition\n- `-dm_plex_rebalance_shared_points_use_mat_partitioning` - Use the MatPartitioning object to perform the partition, the prefix for those operations is -dm_plex_rebalance_shared_points_\n- `-dm_plex_rebalance_shared_points_monitor`              - Monitor the shared points rebalance process\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRebalanceSharedPoints\"))\n\"\"\"\nfunction DMPlexRebalanceSharedPoints(petsclib::PetscLibType, dm::PetscDM, entityDepth::PetscInt, useInitialGuess::PetscBool, parallel::PetscBool) end\n\n@for_petsc function DMPlexRebalanceSharedPoints(petsclib::$UnionPetscLib, dm::PetscDM, entityDepth::$PetscInt, useInitialGuess::PetscBool, parallel::PetscBool )\n\tsuccess_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexRebalanceSharedPoints, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscBool, PetscBool, Ptr{PetscBool}),\n               dm, entityDepth, useInitialGuess, parallel, success_,\n              )\n\n\tsuccess = success_[]\n\n\treturn success\nend \n\n\"\"\"\n\tDMPlexInterpolatePointSF(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF) \nInsert interpolated points in the overlap into the `PointSF` in parallel, following local interpolation\n\nCollective\n\nInput Parameters:\n- `dm`      - The interpolated `DMPLEX`\n- `pointSF` - The initial `PetscSF` without interpolated points\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexInterpolate()`, `DMPlexUninterpolate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInterpolatePointSF\"))\n\"\"\"\nfunction DMPlexInterpolatePointSF(petsclib::PetscLibType, dm::PetscDM, pointSF::PetscSF) end\n\n@for_petsc function DMPlexInterpolatePointSF(petsclib::$UnionPetscLib, dm::PetscDM, pointSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexInterpolatePointSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF),\n               dm, pointSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInterpolate(petsclib::PetscLibType,dm::PetscDM, dmInt::PetscDM) \nTake in a cell\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object with only cells and vertices\n\nOutput Parameter:\n- `dmInt` - The complete `DMPLEX` object\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexUninterpolate()`, `DMPlexCreateFromCellListPetsc()`, `DMPlexCopyCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInterpolate\"))\n\"\"\"\nfunction DMPlexInterpolate(petsclib::PetscLibType, dm::PetscDM, dmInt::PetscDM) end\n\n@for_petsc function DMPlexInterpolate(petsclib::$UnionPetscLib, dm::PetscDM, dmInt::PetscDM )\n\tdmInt_ = Ref(dmInt.ptr)\n\n    @chk ccall(\n               (:DMPlexInterpolate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, dmInt_,\n              )\n\n\tdmInt.ptr = dmInt_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCopyCoordinates(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM) \nCopy coordinates from one mesh to another with the same vertices\n\nCollective\n\nInput Parameter:\n- `dmA` - The `DMPLEX` object with initial coordinates\n\nOutput Parameter:\n- `dmB` - The `DMPLEX` object with copied coordinates\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMCopyLabels()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCoordinateDM()`, `DMGetCoordinateSection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCopyCoordinates\"))\n\"\"\"\nfunction DMPlexCopyCoordinates(petsclib::PetscLibType, dmA::PetscDM, dmB::PetscDM) end\n\n@for_petsc function DMPlexCopyCoordinates(petsclib::$UnionPetscLib, dmA::PetscDM, dmB::PetscDM )\n\n    @chk ccall(\n               (:DMPlexCopyCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dmA, dmB,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexUninterpolate(petsclib::PetscLibType,dm::PetscDM, dmUnint::PetscDM) \nTake in a mesh with all intermediate faces, edges, etc. and return a cell\n\nCollective\n\nInput Parameter:\n- `dm` - The complete `DMPLEX` object\n\nOutput Parameter:\n- `dmUnint` - The `DMPLEX` object with only cells and vertices\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexInterpolate()`, `DMPlexCreateFromCellListPetsc()`, `DMPlexCopyCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexUninterpolate\"))\n\"\"\"\nfunction DMPlexUninterpolate(petsclib::PetscLibType, dm::PetscDM, dmUnint::PetscDM) end\n\n@for_petsc function DMPlexUninterpolate(petsclib::$UnionPetscLib, dm::PetscDM, dmUnint::PetscDM )\n\tdmUnint_ = Ref(dmUnint.ptr)\n\n    @chk ccall(\n               (:DMPlexUninterpolate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, dmUnint_,\n              )\n\n\tdmUnint.ptr = dmUnint_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexIsInterpolated(petsclib::PetscLibType,dm::PetscDM, interpolated::DMPlexInterpolatedFlag) \nFind out to what extent the `DMPLEX` is topologically interpolated.\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `interpolated` - Flag whether the `DM` is interpolated\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexInterpolate()`, `DMPlexIsInterpolatedCollective()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexIsInterpolated\"))\n\"\"\"\nfunction DMPlexIsInterpolated(petsclib::PetscLibType, dm::PetscDM, interpolated::DMPlexInterpolatedFlag) end\n\n@for_petsc function DMPlexIsInterpolated(petsclib::$UnionPetscLib, dm::PetscDM, interpolated::DMPlexInterpolatedFlag )\n\n    @chk ccall(\n               (:DMPlexIsInterpolated, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMPlexInterpolatedFlag}),\n               dm, interpolated,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexIsInterpolatedCollective(petsclib::PetscLibType,dm::PetscDM, interpolated::DMPlexInterpolatedFlag) \nFind out to what extent the `DMPLEX` is topologically interpolated (in collective manner).\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `interpolated` - Flag whether the `DM` is interpolated\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexInterpolate()`, `DMPlexIsInterpolated()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexIsInterpolatedCollective\"))\n\"\"\"\nfunction DMPlexIsInterpolatedCollective(petsclib::PetscLibType, dm::PetscDM, interpolated::DMPlexInterpolatedFlag) end\n\n@for_petsc function DMPlexIsInterpolatedCollective(petsclib::$UnionPetscLib, dm::PetscDM, interpolated::DMPlexInterpolatedFlag )\n\n    @chk ccall(\n               (:DMPlexIsInterpolatedCollective, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMPlexInterpolatedFlag}),\n               dm, interpolated,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpreferTensor::PetscBool = DMPlexGetInterpolatePreferTensor(petsclib::PetscLibType,dm::PetscDM) \nGet the flag to prefer tensor order when interpolating a cell\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `preferTensor` - Flag to prefer tensor order\n\nLevel: intermediate\n\n-seealso: `DMPlexSetInterpolatePreferTensor()`, `DMPLEX`, `DMPlexInterpolate()`, `DMPlexIsInterpolatedCollective()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetInterpolatePreferTensor\"))\n\"\"\"\nfunction DMPlexGetInterpolatePreferTensor(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetInterpolatePreferTensor(petsclib::$UnionPetscLib, dm::PetscDM )\n\tpreferTensor_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetInterpolatePreferTensor, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, preferTensor_,\n              )\n\n\tpreferTensor = preferTensor_[]\n\n\treturn preferTensor\nend \n\n\"\"\"\n\tDMPlexSetInterpolatePreferTensor(petsclib::PetscLibType,dm::PetscDM, preferTensor::PetscBool) \nSet the flag to prefer tensor order when interpolating a cell\n\nLogically Collective\n\nInput Parameters:\n- `dm`           - The `DMPLEX` object\n- `preferTensor` - Flag to prefer tensor order\n\nLevel: intermediate\n\n-seealso: `DMPlexGetInterpolatePreferTensor()`, `DMPLEX`, `DMPlexInterpolate()`, `DMPlexIsInterpolatedCollective()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetInterpolatePreferTensor\"))\n\"\"\"\nfunction DMPlexSetInterpolatePreferTensor(petsclib::PetscLibType, dm::PetscDM, preferTensor::PetscBool) end\n\n@for_petsc function DMPlexSetInterpolatePreferTensor(petsclib::$UnionPetscLib, dm::PetscDM, preferTensor::PetscBool )\n\n    @chk ccall(\n               (:DMPlexSetInterpolatePreferTensor, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, preferTensor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricSetFromOptions(petsclib::PetscLibType,dm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetFromOptions\"))\n\"\"\"\nfunction DMPlexMetricSetFromOptions(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricSetFromOptions(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexMetricSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricSetIsotropic(petsclib::PetscLibType,dm::PetscDM, isotropic::PetscBool) \nRecord whether a metric is isotropic\n\nInput Parameters:\n- `dm`        - The `DM`\n- `isotropic` - Is the metric isotropic?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricIsIsotropic()`, `DMPlexMetricSetUniform()`, `DMPlexMetricSetRestrictAnisotropyFirst()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetIsotropic\"))\n\"\"\"\nfunction DMPlexMetricSetIsotropic(petsclib::PetscLibType, dm::PetscDM, isotropic::PetscBool) end\n\n@for_petsc function DMPlexMetricSetIsotropic(petsclib::$UnionPetscLib, dm::PetscDM, isotropic::PetscBool )\n\n    @chk ccall(\n               (:DMPlexMetricSetIsotropic, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, isotropic,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisotropic::PetscBool = DMPlexMetricIsIsotropic(petsclib::PetscLibType,dm::PetscDM) \nIs a metric isotropic?\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `isotropic` - Is the metric isotropic?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetIsotropic()`, `DMPlexMetricIsUniform()`, `DMPlexMetricRestrictAnisotropyFirst()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricIsIsotropic\"))\n\"\"\"\nfunction DMPlexMetricIsIsotropic(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricIsIsotropic(petsclib::$UnionPetscLib, dm::PetscDM )\n\tisotropic_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexMetricIsIsotropic, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, isotropic_,\n              )\n\n\tisotropic = isotropic_[]\n\n\treturn isotropic\nend \n\n\"\"\"\n\tDMPlexMetricSetUniform(petsclib::PetscLibType,dm::PetscDM, uniform::PetscBool) \nRecord whether a metric is uniform\n\nInput Parameters:\n- `dm`      - The `DM`\n- `uniform` - Is the metric uniform?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricIsUniform()`, `DMPlexMetricSetIsotropic()`, `DMPlexMetricSetRestrictAnisotropyFirst()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetUniform\"))\n\"\"\"\nfunction DMPlexMetricSetUniform(petsclib::PetscLibType, dm::PetscDM, uniform::PetscBool) end\n\n@for_petsc function DMPlexMetricSetUniform(petsclib::$UnionPetscLib, dm::PetscDM, uniform::PetscBool )\n\n    @chk ccall(\n               (:DMPlexMetricSetUniform, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, uniform,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuniform::PetscBool = DMPlexMetricIsUniform(petsclib::PetscLibType,dm::PetscDM) \nIs a metric uniform?\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `uniform` - Is the metric uniform?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetUniform()`, `DMPlexMetricIsIsotropic()`, `DMPlexMetricRestrictAnisotropyFirst()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricIsUniform\"))\n\"\"\"\nfunction DMPlexMetricIsUniform(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricIsUniform(petsclib::$UnionPetscLib, dm::PetscDM )\n\tuniform_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexMetricIsUniform, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, uniform_,\n              )\n\n\tuniform = uniform_[]\n\n\treturn uniform\nend \n\n\"\"\"\n\tDMPlexMetricSetRestrictAnisotropyFirst(petsclib::PetscLibType,dm::PetscDM, restrictAnisotropyFirst::PetscBool) \nRecord whether anisotropy should be restricted before normalization\n\nInput Parameters:\n- `dm`                      - The `DM`\n- `restrictAnisotropyFirst` - Should anisotropy be normalized first?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetIsotropic()`, `DMPlexMetricRestrictAnisotropyFirst()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetRestrictAnisotropyFirst\"))\n\"\"\"\nfunction DMPlexMetricSetRestrictAnisotropyFirst(petsclib::PetscLibType, dm::PetscDM, restrictAnisotropyFirst::PetscBool) end\n\n@for_petsc function DMPlexMetricSetRestrictAnisotropyFirst(petsclib::$UnionPetscLib, dm::PetscDM, restrictAnisotropyFirst::PetscBool )\n\n    @chk ccall(\n               (:DMPlexMetricSetRestrictAnisotropyFirst, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, restrictAnisotropyFirst,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trestrictAnisotropyFirst::PetscBool = DMPlexMetricRestrictAnisotropyFirst(petsclib::PetscLibType,dm::PetscDM) \nIs anisotropy restricted before normalization or after?\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `restrictAnisotropyFirst` - Is anisotropy be normalized first?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricIsIsotropic()`, `DMPlexMetricSetRestrictAnisotropyFirst()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricRestrictAnisotropyFirst\"))\n\"\"\"\nfunction DMPlexMetricRestrictAnisotropyFirst(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricRestrictAnisotropyFirst(petsclib::$UnionPetscLib, dm::PetscDM )\n\trestrictAnisotropyFirst_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexMetricRestrictAnisotropyFirst, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, restrictAnisotropyFirst_,\n              )\n\n\trestrictAnisotropyFirst = restrictAnisotropyFirst_[]\n\n\treturn restrictAnisotropyFirst\nend \n\n\"\"\"\n\tDMPlexMetricSetNoInsertion(petsclib::PetscLibType,dm::PetscDM, noInsert::PetscBool) \nShould node insertion and deletion be turned off?\n\nInput Parameters:\n- `dm`       - The `DM`\n- `noInsert` - Should node insertion and deletion be turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricNoInsertion()`, `DMPlexMetricSetNoSwapping()`, `DMPlexMetricSetNoMovement()`, `DMPlexMetricSetNoSurf()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetNoInsertion\"))\n\"\"\"\nfunction DMPlexMetricSetNoInsertion(petsclib::PetscLibType, dm::PetscDM, noInsert::PetscBool) end\n\n@for_petsc function DMPlexMetricSetNoInsertion(petsclib::$UnionPetscLib, dm::PetscDM, noInsert::PetscBool )\n\n    @chk ccall(\n               (:DMPlexMetricSetNoInsertion, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, noInsert,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnoInsert::PetscBool = DMPlexMetricNoInsertion(petsclib::PetscLibType,dm::PetscDM) \nAre node insertion and deletion turned off?\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `noInsert` - Are node insertion and deletion turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetNoInsertion()`, `DMPlexMetricNoSwapping()`, `DMPlexMetricNoMovement()`, `DMPlexMetricNoSurf()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricNoInsertion\"))\n\"\"\"\nfunction DMPlexMetricNoInsertion(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricNoInsertion(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnoInsert_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexMetricNoInsertion, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, noInsert_,\n              )\n\n\tnoInsert = noInsert_[]\n\n\treturn noInsert\nend \n\n\"\"\"\n\tDMPlexMetricSetNoSwapping(petsclib::PetscLibType,dm::PetscDM, noSwap::PetscBool) \nShould facet swapping be turned off?\n\nInput Parameters:\n- `dm`     - The `DM`\n- `noSwap` - Should facet swapping be turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricNoSwapping()`, `DMPlexMetricSetNoInsertion()`, `DMPlexMetricSetNoMovement()`, `DMPlexMetricSetNoSurf()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetNoSwapping\"))\n\"\"\"\nfunction DMPlexMetricSetNoSwapping(petsclib::PetscLibType, dm::PetscDM, noSwap::PetscBool) end\n\n@for_petsc function DMPlexMetricSetNoSwapping(petsclib::$UnionPetscLib, dm::PetscDM, noSwap::PetscBool )\n\n    @chk ccall(\n               (:DMPlexMetricSetNoSwapping, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, noSwap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnoSwap::PetscBool = DMPlexMetricNoSwapping(petsclib::PetscLibType,dm::PetscDM) \nIs facet swapping turned off?\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `noSwap` - Is facet swapping turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetNoSwapping()`, `DMPlexMetricNoInsertion()`, `DMPlexMetricNoMovement()`, `DMPlexMetricNoSurf()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricNoSwapping\"))\n\"\"\"\nfunction DMPlexMetricNoSwapping(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricNoSwapping(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnoSwap_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexMetricNoSwapping, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, noSwap_,\n              )\n\n\tnoSwap = noSwap_[]\n\n\treturn noSwap\nend \n\n\"\"\"\n\tDMPlexMetricSetNoMovement(petsclib::PetscLibType,dm::PetscDM, noMove::PetscBool) \nShould node movement be turned off?\n\nInput Parameters:\n- `dm`     - The `DM`\n- `noMove` - Should node movement be turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricNoMovement()`, `DMPlexMetricSetNoInsertion()`, `DMPlexMetricSetNoSwapping()`, `DMPlexMetricSetNoSurf()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetNoMovement\"))\n\"\"\"\nfunction DMPlexMetricSetNoMovement(petsclib::PetscLibType, dm::PetscDM, noMove::PetscBool) end\n\n@for_petsc function DMPlexMetricSetNoMovement(petsclib::$UnionPetscLib, dm::PetscDM, noMove::PetscBool )\n\n    @chk ccall(\n               (:DMPlexMetricSetNoMovement, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, noMove,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnoMove::PetscBool = DMPlexMetricNoMovement(petsclib::PetscLibType,dm::PetscDM) \nIs node movement turned off?\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `noMove` - Is node movement turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetNoMovement()`, `DMPlexMetricNoInsertion()`, `DMPlexMetricNoSwapping()`, `DMPlexMetricNoSurf()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricNoMovement\"))\n\"\"\"\nfunction DMPlexMetricNoMovement(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricNoMovement(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnoMove_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexMetricNoMovement, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, noMove_,\n              )\n\n\tnoMove = noMove_[]\n\n\treturn noMove\nend \n\n\"\"\"\n\tDMPlexMetricSetNoSurf(petsclib::PetscLibType,dm::PetscDM, noSurf::PetscBool) \nShould surface modification be turned off?\n\nInput Parameters:\n- `dm`     - The `DM`\n- `noSurf` - Should surface modification be turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricNoSurf()`, `DMPlexMetricSetNoMovement()`, `DMPlexMetricSetNoInsertion()`, `DMPlexMetricSetNoSwapping()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetNoSurf\"))\n\"\"\"\nfunction DMPlexMetricSetNoSurf(petsclib::PetscLibType, dm::PetscDM, noSurf::PetscBool) end\n\n@for_petsc function DMPlexMetricSetNoSurf(petsclib::$UnionPetscLib, dm::PetscDM, noSurf::PetscBool )\n\n    @chk ccall(\n               (:DMPlexMetricSetNoSurf, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, noSurf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnoSurf::PetscBool = DMPlexMetricNoSurf(petsclib::PetscLibType,dm::PetscDM) \nIs surface modification turned off?\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `noSurf` - Is surface modification turned off?\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetNoSurf()`, `DMPlexMetricNoMovement()`, `DMPlexMetricNoInsertion()`, `DMPlexMetricNoSwapping()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricNoSurf\"))\n\"\"\"\nfunction DMPlexMetricNoSurf(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricNoSurf(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnoSurf_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexMetricNoSurf, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, noSurf_,\n              )\n\n\tnoSurf = noSurf_[]\n\n\treturn noSurf\nend \n\n\"\"\"\n\tDMPlexMetricSetMinimumMagnitude(petsclib::PetscLibType,dm::PetscDM, h_min::PetscReal) \nSet the minimum tolerated metric magnitude\n\nInput Parameters:\n- `dm`    - The `DM`\n- `h_min` - The minimum tolerated metric magnitude\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetMinimumMagnitude()`, `DMPlexMetricSetMaximumMagnitude()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetMinimumMagnitude\"))\n\"\"\"\nfunction DMPlexMetricSetMinimumMagnitude(petsclib::PetscLibType, dm::PetscDM, h_min::PetscReal) end\n\n@for_petsc function DMPlexMetricSetMinimumMagnitude(petsclib::$UnionPetscLib, dm::PetscDM, h_min::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexMetricSetMinimumMagnitude, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, h_min,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\th_min::PetscReal = DMPlexMetricGetMinimumMagnitude(petsclib::PetscLibType,dm::PetscDM) \nGet the minimum tolerated metric magnitude\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `h_min` - The minimum tolerated metric magnitude\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetMinimumMagnitude()`, `DMPlexMetricGetMaximumMagnitude()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetMinimumMagnitude\"))\n\"\"\"\nfunction DMPlexMetricGetMinimumMagnitude(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetMinimumMagnitude(petsclib::$UnionPetscLib, dm::PetscDM )\n\th_min_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexMetricGetMinimumMagnitude, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, h_min_,\n              )\n\n\th_min = h_min_[]\n\n\treturn h_min\nend \n\n\"\"\"\n\tDMPlexMetricSetMaximumMagnitude(petsclib::PetscLibType,dm::PetscDM, h_max::PetscReal) \nSet the maximum tolerated metric magnitude\n\nInput Parameters:\n- `dm`    - The `DM`\n- `h_max` - The maximum tolerated metric magnitude\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetMaximumMagnitude()`, `DMPlexMetricSetMinimumMagnitude()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetMaximumMagnitude\"))\n\"\"\"\nfunction DMPlexMetricSetMaximumMagnitude(petsclib::PetscLibType, dm::PetscDM, h_max::PetscReal) end\n\n@for_petsc function DMPlexMetricSetMaximumMagnitude(petsclib::$UnionPetscLib, dm::PetscDM, h_max::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexMetricSetMaximumMagnitude, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, h_max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\th_max::PetscReal = DMPlexMetricGetMaximumMagnitude(petsclib::PetscLibType,dm::PetscDM) \nGet the maximum tolerated metric magnitude\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `h_max` - The maximum tolerated metric magnitude\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetMaximumMagnitude()`, `DMPlexMetricGetMinimumMagnitude()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetMaximumMagnitude\"))\n\"\"\"\nfunction DMPlexMetricGetMaximumMagnitude(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetMaximumMagnitude(petsclib::$UnionPetscLib, dm::PetscDM )\n\th_max_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexMetricGetMaximumMagnitude, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, h_max_,\n              )\n\n\th_max = h_max_[]\n\n\treturn h_max\nend \n\n\"\"\"\n\tDMPlexMetricSetMaximumAnisotropy(petsclib::PetscLibType,dm::PetscDM, a_max::PetscReal) \nSet the maximum tolerated metric anisotropy\n\nInput Parameters:\n- `dm`    - The `DM`\n- `a_max` - The maximum tolerated metric anisotropy\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetMaximumAnisotropy()`, `DMPlexMetricSetMaximumMagnitude()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetMaximumAnisotropy\"))\n\"\"\"\nfunction DMPlexMetricSetMaximumAnisotropy(petsclib::PetscLibType, dm::PetscDM, a_max::PetscReal) end\n\n@for_petsc function DMPlexMetricSetMaximumAnisotropy(petsclib::$UnionPetscLib, dm::PetscDM, a_max::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexMetricSetMaximumAnisotropy, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, a_max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta_max::PetscReal = DMPlexMetricGetMaximumAnisotropy(petsclib::PetscLibType,dm::PetscDM) \nGet the maximum tolerated metric anisotropy\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `a_max` - The maximum tolerated metric anisotropy\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetMaximumAnisotropy()`, `DMPlexMetricGetMaximumMagnitude()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetMaximumAnisotropy\"))\n\"\"\"\nfunction DMPlexMetricGetMaximumAnisotropy(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetMaximumAnisotropy(petsclib::$UnionPetscLib, dm::PetscDM )\n\ta_max_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexMetricGetMaximumAnisotropy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, a_max_,\n              )\n\n\ta_max = a_max_[]\n\n\treturn a_max\nend \n\n\"\"\"\n\tDMPlexMetricSetTargetComplexity(petsclib::PetscLibType,dm::PetscDM, targetComplexity::PetscReal) \nSet the target metric complexity\n\nInput Parameters:\n- `dm`               - The `DM`\n- `targetComplexity` - The target metric complexity\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetTargetComplexity()`, `DMPlexMetricSetNormalizationOrder()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetTargetComplexity\"))\n\"\"\"\nfunction DMPlexMetricSetTargetComplexity(petsclib::PetscLibType, dm::PetscDM, targetComplexity::PetscReal) end\n\n@for_petsc function DMPlexMetricSetTargetComplexity(petsclib::$UnionPetscLib, dm::PetscDM, targetComplexity::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexMetricSetTargetComplexity, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, targetComplexity,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttargetComplexity::PetscReal = DMPlexMetricGetTargetComplexity(petsclib::PetscLibType,dm::PetscDM) \nGet the target metric complexity\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `targetComplexity` - The target metric complexity\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetTargetComplexity()`, `DMPlexMetricGetNormalizationOrder()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetTargetComplexity\"))\n\"\"\"\nfunction DMPlexMetricGetTargetComplexity(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetTargetComplexity(petsclib::$UnionPetscLib, dm::PetscDM )\n\ttargetComplexity_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexMetricGetTargetComplexity, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, targetComplexity_,\n              )\n\n\ttargetComplexity = targetComplexity_[]\n\n\treturn targetComplexity\nend \n\n\"\"\"\n\tDMPlexMetricSetNormalizationOrder(petsclib::PetscLibType,dm::PetscDM, p::PetscReal) \nSet the order p for L\n\nInput Parameters:\n- `dm` - The `DM`\n- `p`  - The normalization order\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetNormalizationOrder()`, `DMPlexMetricSetTargetComplexity()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetNormalizationOrder\"))\n\"\"\"\nfunction DMPlexMetricSetNormalizationOrder(petsclib::PetscLibType, dm::PetscDM, p::PetscReal) end\n\n@for_petsc function DMPlexMetricSetNormalizationOrder(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexMetricSetNormalizationOrder, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tp::PetscReal = DMPlexMetricGetNormalizationOrder(petsclib::PetscLibType,dm::PetscDM) \nGet the order p for L\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `p` - The normalization order\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetNormalizationOrder()`, `DMPlexMetricGetTargetComplexity()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetNormalizationOrder\"))\n\"\"\"\nfunction DMPlexMetricGetNormalizationOrder(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetNormalizationOrder(petsclib::$UnionPetscLib, dm::PetscDM )\n\tp_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexMetricGetNormalizationOrder, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, p_,\n              )\n\n\tp = p_[]\n\n\treturn p\nend \n\n\"\"\"\n\tDMPlexMetricSetGradationFactor(petsclib::PetscLibType,dm::PetscDM, beta::PetscReal) \nSet the metric gradation factor\n\nInput Parameters:\n- `dm`   - The `DM`\n- `beta` - The metric gradation factor\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetGradationFactor()`, `DMPlexMetricSetHausdorffNumber()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetGradationFactor\"))\n\"\"\"\nfunction DMPlexMetricSetGradationFactor(petsclib::PetscLibType, dm::PetscDM, beta::PetscReal) end\n\n@for_petsc function DMPlexMetricSetGradationFactor(petsclib::$UnionPetscLib, dm::PetscDM, beta::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexMetricSetGradationFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, beta,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbeta::PetscReal = DMPlexMetricGetGradationFactor(petsclib::PetscLibType,dm::PetscDM) \nGet the metric gradation factor\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `beta` - The metric gradation factor\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetGradationFactor()`, `DMPlexMetricGetHausdorffNumber()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetGradationFactor\"))\n\"\"\"\nfunction DMPlexMetricGetGradationFactor(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetGradationFactor(petsclib::$UnionPetscLib, dm::PetscDM )\n\tbeta_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexMetricGetGradationFactor, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, beta_,\n              )\n\n\tbeta = beta_[]\n\n\treturn beta\nend \n\n\"\"\"\n\tDMPlexMetricSetHausdorffNumber(petsclib::PetscLibType,dm::PetscDM, hausd::PetscReal) \nSet the metric Hausdorff number\n\nInput Parameters:\n- `dm`    - The `DM`\n- `hausd` - The metric Hausdorff number\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetGradationFactor()`, `DMPlexMetricGetHausdorffNumber()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetHausdorffNumber\"))\n\"\"\"\nfunction DMPlexMetricSetHausdorffNumber(petsclib::PetscLibType, dm::PetscDM, hausd::PetscReal) end\n\n@for_petsc function DMPlexMetricSetHausdorffNumber(petsclib::$UnionPetscLib, dm::PetscDM, hausd::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexMetricSetHausdorffNumber, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, hausd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thausd::PetscReal = DMPlexMetricGetHausdorffNumber(petsclib::PetscLibType,dm::PetscDM) \nGet the metric Hausdorff number\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `hausd` - The metric Hausdorff number\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetGradationFactor()`, `DMPlexMetricSetHausdorffNumber()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetHausdorffNumber\"))\n\"\"\"\nfunction DMPlexMetricGetHausdorffNumber(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetHausdorffNumber(petsclib::$UnionPetscLib, dm::PetscDM )\n\thausd_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexMetricGetHausdorffNumber, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, hausd_,\n              )\n\n\thausd = hausd_[]\n\n\treturn hausd\nend \n\n\"\"\"\n\tDMPlexMetricSetVerbosity(petsclib::PetscLibType,dm::PetscDM, verbosity::PetscInt) \nSet the verbosity of the mesh adaptation package\n\nInput Parameters:\n- `dm`        - The `DM`\n- `verbosity` - The verbosity, where -1 is silent and 10 is maximum\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricGetVerbosity()`, `DMPlexMetricSetNumIterations()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetVerbosity\"))\n\"\"\"\nfunction DMPlexMetricSetVerbosity(petsclib::PetscLibType, dm::PetscDM, verbosity::PetscInt) end\n\n@for_petsc function DMPlexMetricSetVerbosity(petsclib::$UnionPetscLib, dm::PetscDM, verbosity::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexMetricSetVerbosity, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, verbosity,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tverbosity::PetscInt = DMPlexMetricGetVerbosity(petsclib::PetscLibType,dm::PetscDM) \nGet the verbosity of the mesh adaptation package\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `verbosity` - The verbosity, where -1 is silent and 10 is maximum\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetVerbosity()`, `DMPlexMetricGetNumIterations()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetVerbosity\"))\n\"\"\"\nfunction DMPlexMetricGetVerbosity(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetVerbosity(petsclib::$UnionPetscLib, dm::PetscDM )\n\tverbosity_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexMetricGetVerbosity, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, verbosity_,\n              )\n\n\tverbosity = verbosity_[]\n\n\treturn verbosity\nend \n\n\"\"\"\n\tDMPlexMetricSetNumIterations(petsclib::PetscLibType,dm::PetscDM, numIter::PetscInt) \nSet the number of parallel adaptation iterations\n\nInput Parameters:\n- `dm`      - The `DM`\n- `numIter` - the number of parallel adaptation iterations\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetVerbosity()`, `DMPlexMetricGetNumIterations()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricSetNumIterations\"))\n\"\"\"\nfunction DMPlexMetricSetNumIterations(petsclib::PetscLibType, dm::PetscDM, numIter::PetscInt) end\n\n@for_petsc function DMPlexMetricSetNumIterations(petsclib::$UnionPetscLib, dm::PetscDM, numIter::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexMetricSetNumIterations, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, numIter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumIter::PetscInt = DMPlexMetricGetNumIterations(petsclib::PetscLibType,dm::PetscDM) \nGet the number of parallel adaptation iterations\n\nInput Parameters:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `numIter` - the number of parallel adaptation iterations\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricSetNumIterations()`, `DMPlexMetricGetVerbosity()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricGetNumIterations\"))\n\"\"\"\nfunction DMPlexMetricGetNumIterations(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexMetricGetNumIterations(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumIter_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexMetricGetNumIterations, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, numIter_,\n              )\n\n\tnumIter = numIter_[]\n\n\treturn numIter\nend \n\n\"\"\"\n\tmetric::PetscVec = DMPlexMetricCreate(petsclib::PetscLibType,dm::PetscDM, f::PetscInt) \nCreate a Riemannian metric field\n\nInput Parameters:\n- `dm` - The `DM`\n- `f`  - The field number to use\n\nOutput Parameter:\n- `metric` - The metric\n\nOptions Database Key:\n- `-dm_adaptor <pragmatic/mmg/parmmg>` - specify dm adaptor to use\n\nOptions Database Keys for Mmg and ParMmg:\n- `-dm_plex_metric_gradation_factor` - Maximum ratio by which edge lengths may grow during gradation\n- `-dm_plex_metric_num_iterations`   - Number of parallel mesh adaptation iterations for ParMmg\n- `-dm_plex_metric_no_insert`        - Should node insertion/deletion be turned off?\n- `-dm_plex_metric_no_swap`          - Should facet swapping be turned off?\n- `-dm_plex_metric_no_move`          - Should node movement be turned off?\n- `-dm_plex_metric_verbosity`        - Choose a verbosity level from -1 (silent) to 10 (maximum).\n\nOptions Database Keys for Riemannian metrics:\n- `-dm_plex_metric_isotropic`                 - Is the metric isotropic?\n- `-dm_plex_metric_uniform`                   - Is the metric uniform?\n- `-dm_plex_metric_restrict_anisotropy_first` - Should anisotropy be restricted before normalization?\n- `-dm_plex_metric_h_min`                     - Minimum tolerated metric magnitude\n- `-dm_plex_metric_h_max`                     - Maximum tolerated metric magnitude\n- `-dm_plex_metric_a_max`                     - Maximum tolerated anisotropy\n- `-dm_plex_metric_p`                         - L-p normalization order\n- `-dm_plex_metric_target_complexity`         - Target metric complexity\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricCreateUniform()`, `DMPlexMetricCreateIsotropic()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricCreate\"))\n\"\"\"\nfunction DMPlexMetricCreate(petsclib::PetscLibType, dm::PetscDM, f::PetscInt) end\n\n@for_petsc function DMPlexMetricCreate(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt )\n\tmetric_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMPlexMetricCreate, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CVec}),\n               dm, f, metric_,\n              )\n\n\tmetric = PetscVec(metric_[], petsclib)\n\n\treturn metric\nend \n\n\"\"\"\n\tmetric::PetscVec = DMPlexMetricCreateUniform(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, alpha::PetscReal) \nConstruct a uniform isotropic metric\n\nInput Parameters:\n- `dm`    - The `DM`\n- `f`     - The field number to use\n- `alpha` - Scaling parameter for the diagonal\n\nOutput Parameter:\n- `metric` - The uniform metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricCreate()`, `DMPlexMetricCreateIsotropic()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricCreateUniform\"))\n\"\"\"\nfunction DMPlexMetricCreateUniform(petsclib::PetscLibType, dm::PetscDM, f::PetscInt, alpha::PetscReal) end\n\n@for_petsc function DMPlexMetricCreateUniform(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt, alpha::$PetscReal )\n\tmetric_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMPlexMetricCreateUniform, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscReal, Ptr{CVec}),\n               dm, f, alpha, metric_,\n              )\n\n\tmetric = PetscVec(metric_[], petsclib)\n\n\treturn metric\nend \n\n\"\"\"\n\tmetric::PetscVec = DMPlexMetricCreateIsotropic(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, indicator::PetscVec) \nConstruct an isotropic metric from an error indicator\n\nInput Parameters:\n- `dm`        - The `DM`\n- `f`         - The field number to use\n- `indicator` - The error indicator\n\nOutput Parameter:\n- `metric` - The isotropic metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricCreate()`, `DMPlexMetricCreateUniform()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricCreateIsotropic\"))\n\"\"\"\nfunction DMPlexMetricCreateIsotropic(petsclib::PetscLibType, dm::PetscDM, f::PetscInt, indicator::PetscVec) end\n\n@for_petsc function DMPlexMetricCreateIsotropic(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt, indicator::PetscVec )\n\tmetric_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMPlexMetricCreateIsotropic, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, CVec, Ptr{CVec}),\n               dm, f, indicator, metric_,\n              )\n\n\tmetric = PetscVec(metric_[], petsclib)\n\n\treturn metric\nend \n\n\"\"\"\n\tdeterminant::PetscVec,dmDet::PetscDM = DMPlexMetricDeterminantCreate(petsclib::PetscLibType,dm::PetscDM, f::PetscInt) \nCreate the determinant field for a Riemannian metric\n\nInput Parameters:\n- `dm` - The `DM` of the metric field\n- `f`  - The field number to use\n\nOutput Parameters:\n- `determinant` - The determinant field\n- `dmDet`       - The corresponding `DM`\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricCreateUniform()`, `DMPlexMetricCreateIsotropic()`, `DMPlexMetricCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricDeterminantCreate\"))\n\"\"\"\nfunction DMPlexMetricDeterminantCreate(petsclib::PetscLibType, dm::PetscDM, f::PetscInt) end\n\n@for_petsc function DMPlexMetricDeterminantCreate(petsclib::$UnionPetscLib, dm::PetscDM, f::$PetscInt )\n\tdeterminant_ = Ref{CVec}()\n\tdmDet_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexMetricDeterminantCreate, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CVec}, Ptr{CDM}),\n               dm, f, determinant_, dmDet_,\n              )\n\n\tdeterminant = PetscVec(determinant_[], petsclib)\n\tdmDet = PetscDM(dmDet_[], petsclib)\n\n\treturn determinant,dmDet\nend \n\n\"\"\"\n\tDMPlexMetricEnforceSPD(petsclib::PetscLibType,dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec) \nEnforce symmetric positive\n\nInput Parameters:\n- `dm`                 - The `DM`\n- `metricIn`           - The metric\n- `restrictSizes`      - Should maximum/minimum metric magnitudes be enforced?\n- `restrictAnisotropy` - Should maximum anisotropy be enforced?\n\nOutput Parameters:\n- `metricOut`   - The metric\n- `determinant` - Its determinant\n\nOptions Database Keys:\n- `-dm_plex_metric_isotropic` - Is the metric isotropic?\n- `-dm_plex_metric_uniform`   - Is the metric uniform?\n- `-dm_plex_metric_h_min`     - Minimum tolerated metric magnitude\n- `-dm_plex_metric_h_max`     - Maximum tolerated metric magnitude\n- `-dm_plex_metric_a_max`     - Maximum tolerated anisotropy\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricNormalize()`, `DMPlexMetricIntersection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricEnforceSPD\"))\n\"\"\"\nfunction DMPlexMetricEnforceSPD(petsclib::PetscLibType, dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec) end\n\n@for_petsc function DMPlexMetricEnforceSPD(petsclib::$UnionPetscLib, dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricEnforceSPD, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, PetscBool, PetscBool, CVec, CVec),\n               dm, metricIn, restrictSizes, restrictAnisotropy, metricOut, determinant,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricNormalize(petsclib::PetscLibType,dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec) \nApply L\n\nInput Parameters:\n- `dm`                 - The `DM`\n- `metricIn`           - The unnormalized metric\n- `restrictSizes`      - Should maximum/minimum metric magnitudes be enforced?\n- `restrictAnisotropy` - Should maximum metric anisotropy be enforced?\n\nOutput Parameters:\n- `metricOut`   - The normalized metric\n- `determinant` - computed determinant\n\nOptions Database Keys:\n- `-dm_plex_metric_isotropic`                 - Is the metric isotropic?\n- `-dm_plex_metric_uniform`                   - Is the metric uniform?\n- `-dm_plex_metric_restrict_anisotropy_first` - Should anisotropy be restricted before normalization?\n- `-dm_plex_metric_h_min`                     - Minimum tolerated metric magnitude\n- `-dm_plex_metric_h_max`                     - Maximum tolerated metric magnitude\n- `-dm_plex_metric_a_max`                     - Maximum tolerated anisotropy\n- `-dm_plex_metric_p`                         - L-p normalization order\n- `-dm_plex_metric_target_complexity`         - Target metric complexity\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricEnforceSPD()`, `DMPlexMetricIntersection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricNormalize\"))\n\"\"\"\nfunction DMPlexMetricNormalize(petsclib::PetscLibType, dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec) end\n\n@for_petsc function DMPlexMetricNormalize(petsclib::$UnionPetscLib, dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricNormalize, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, PetscBool, PetscBool, CVec, CVec),\n               dm, metricIn, restrictSizes, restrictAnisotropy, metricOut, determinant,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricAverage(petsclib::PetscLibType,dm::PetscDM, numMetrics::PetscInt, weights::Vector{PetscReal}, metrics::Vector{PetscVec}, metricAvg::PetscVec) \nCompute the average of a list of metrics\n\nInput Parameters:\n- `dm`         - The `DM`\n- `numMetrics` - The number of metrics to be averaged\n- `weights`    - Weights for the average\n- `metrics`    - The metrics to be averaged\n\nOutput Parameter:\n- `metricAvg` - The averaged metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricAverage2()`, `DMPlexMetricAverage3()`, `DMPlexMetricIntersection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricAverage\"))\n\"\"\"\nfunction DMPlexMetricAverage(petsclib::PetscLibType, dm::PetscDM, numMetrics::PetscInt, weights::Vector{PetscReal}, metrics::Vector{PetscVec}, metricAvg::PetscVec) end\n\n@for_petsc function DMPlexMetricAverage(petsclib::$UnionPetscLib, dm::PetscDM, numMetrics::$PetscInt, weights::Vector{$PetscReal}, metrics::Vector{PetscVec}, metricAvg::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricAverage, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscReal}, Ptr{CVec}, CVec),\n               dm, numMetrics, weights, metrics, metricAvg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricAverage2(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricAvg::PetscVec) \nCompute the unweighted average of two metrics\n\nInput Parameters:\n- `dm`      - The `DM`\n- `metric1` - The first metric to be averaged\n- `metric2` - The second metric to be averaged\n\nOutput Parameter:\n- `metricAvg` - The averaged metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricAverage()`, `DMPlexMetricAverage3()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricAverage2\"))\n\"\"\"\nfunction DMPlexMetricAverage2(petsclib::PetscLibType, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricAvg::PetscVec) end\n\n@for_petsc function DMPlexMetricAverage2(petsclib::$UnionPetscLib, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricAvg::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricAverage2, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, CVec),\n               dm, metric1, metric2, metricAvg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricAverage3(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricAvg::PetscVec) \nCompute the unweighted average of three metrics\n\nInput Parameters:\n- `dm`      - The `DM`\n- `metric1` - The first metric to be averaged\n- `metric2` - The second metric to be averaged\n- `metric3` - The third metric to be averaged\n\nOutput Parameter:\n- `metricAvg` - The averaged metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricAverage()`, `DMPlexMetricAverage2()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricAverage3\"))\n\"\"\"\nfunction DMPlexMetricAverage3(petsclib::PetscLibType, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricAvg::PetscVec) end\n\n@for_petsc function DMPlexMetricAverage3(petsclib::$UnionPetscLib, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricAvg::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricAverage3, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, CVec, CVec),\n               dm, metric1, metric2, metric3, metricAvg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricIntersection(petsclib::PetscLibType,dm::PetscDM, numMetrics::PetscInt, metrics::Vector{PetscVec}, metricInt::PetscVec) \nCompute the intersection of a list of metrics\n\nInput Parameters:\n- `dm`         - The `DM`\n- `numMetrics` - The number of metrics to be intersected\n- `metrics`    - The metrics to be intersected\n\nOutput Parameter:\n- `metricInt` - The intersected metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricIntersection2()`, `DMPlexMetricIntersection3()`, `DMPlexMetricAverage()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricIntersection\"))\n\"\"\"\nfunction DMPlexMetricIntersection(petsclib::PetscLibType, dm::PetscDM, numMetrics::PetscInt, metrics::Vector{PetscVec}, metricInt::PetscVec) end\n\n@for_petsc function DMPlexMetricIntersection(petsclib::$UnionPetscLib, dm::PetscDM, numMetrics::$PetscInt, metrics::Vector{PetscVec}, metricInt::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricIntersection, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CVec}, CVec),\n               dm, numMetrics, metrics, metricInt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricIntersection2(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricInt::PetscVec) \nCompute the intersection of two metrics\n\nInput Parameters:\n- `dm`      - The `DM`\n- `metric1` - The first metric to be intersected\n- `metric2` - The second metric to be intersected\n\nOutput Parameter:\n- `metricInt` - The intersected metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricIntersection()`, `DMPlexMetricIntersection3()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricIntersection2\"))\n\"\"\"\nfunction DMPlexMetricIntersection2(petsclib::PetscLibType, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricInt::PetscVec) end\n\n@for_petsc function DMPlexMetricIntersection2(petsclib::$UnionPetscLib, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricInt::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricIntersection2, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, CVec),\n               dm, metric1, metric2, metricInt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMetricIntersection3(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricInt::PetscVec) \nCompute the intersection of three metrics\n\nInput Parameters:\n- `dm`      - The `DM`\n- `metric1` - The first metric to be intersected\n- `metric2` - The second metric to be intersected\n- `metric3` - The third metric to be intersected\n\nOutput Parameter:\n- `metricInt` - The intersected metric\n\nLevel: beginner\n\n-seealso: `DMPLEX`, `DMPlexMetricIntersection()`, `DMPlexMetricIntersection2()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMetricIntersection3\"))\n\"\"\"\nfunction DMPlexMetricIntersection3(petsclib::PetscLibType, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricInt::PetscVec) end\n\n@for_petsc function DMPlexMetricIntersection3(petsclib::$UnionPetscLib, dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricInt::PetscVec )\n\n    @chk ccall(\n               (:DMPlexMetricIntersection3, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, CVec, CVec),\n               dm, metric1, metric2, metric3, metricInt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateGmshFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from a Gmsh file\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `filename`    - Name of the Gmsh file\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromFile()`, `DMPlexCreateGmsh()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateGmshFromFile\"))\n\"\"\"\nfunction DMPlexCreateGmshFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateGmshFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateGmshFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscBool, Ptr{CDM}),\n               comm, filename, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateGmsh(petsclib::PetscLibType,comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from a Gmsh file viewer\n\nCollective\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `viewer`      - The `PetscViewer` associated with a Gmsh file\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nOptions Database Keys:\n- `-dm_plex_gmsh_hybrid`               - Force triangular prisms to use tensor order\n- `-dm_plex_gmsh_periodic`             - Read Gmsh periodic section and construct a periodic Plex\n- `-dm_plex_gmsh_highorder`            - Generate high-order coordinates\n- `-dm_plex_gmsh_project`              - Project high-order coordinates to a different space, use the prefix dm_plex_gmsh_project_ to define the space\n- `-dm_plex_gmsh_use_generic`          - Generate generic labels, i.e. Cell Sets, Face Sets, etc.\n- `-dm_plex_gmsh_use_regions`          - Generate labels with region names\n- `-dm_plex_gmsh_mark_vertices`        - Add vertices to generated labels\n- `-dm_plex_gmsh_mark_vertices_strict` - Add vertices included in a region to generated labels\n- `-dm_plex_gmsh_multiple_tags`        - Allow multiple tags for default labels\n- `-dm_plex_gmsh_spacedim <d>`         - Embedding space dimension, if different from topological dimension\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateGmsh\"))\n\"\"\"\nfunction DMPlexCreateGmsh(petsclib::PetscLibType, comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateGmsh(petsclib::$UnionPetscLib, comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateGmsh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscViewer, PetscBool, Ptr{CDM}),\n               comm, viewer, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateCGNSFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from a CGNS file.\n\nCollective\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `filename`    - The name of the CGNS file\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexCreateCGNS()`, `DMPlexCreateExodus()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateCGNSFromFile\"))\n\"\"\"\nfunction DMPlexCreateCGNSFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateCGNSFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateCGNSFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscBool, Ptr{CDM}),\n               comm, filename, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateCGNS(petsclib::PetscLibType,comm::MPI_Comm, cgid::PetscInt, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from a CGNS file ID.\n\nCollective\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `cgid`        - The CG id associated with a file and obtained using cg_open\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexCreateExodus()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateCGNS\"))\n\"\"\"\nfunction DMPlexCreateCGNS(petsclib::PetscLibType, comm::MPI_Comm, cgid::PetscInt, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateCGNS(petsclib::$UnionPetscLib, comm::MPI_Comm, cgid::$PetscInt, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateCGNS, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, PetscBool, Ptr{CDM}),\n               comm, cgid, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPlexCreateClosureIndex(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nCalculate an index for the given `PetscSection` for the closure operation on the `DM`\n\nNot Collective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `section` - The section describing the layout in the local vector, or NULL to use the default section\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSection`, `DMPlexVecGetClosure()`, `DMPlexVecRestoreClosure()`, `DMPlexVecSetClosure()`, `DMPlexMatSetClosure()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateClosureIndex\"))\n\"\"\"\nfunction DMPlexCreateClosureIndex(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMPlexCreateClosureIndex(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMPlexCreateClosureIndex, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateFluentFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from a Fluent mesh file\n\nCollective\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `filename`    - Name of the Fluent mesh file\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromFile()`, `DMPlexCreateFluent()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateFluentFromFile\"))\n\"\"\"\nfunction DMPlexCreateFluentFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateFluentFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateFluentFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscBool, Ptr{CDM}),\n               comm, filename, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateFluent(petsclib::PetscLibType,comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from a Fluent mesh file <http://aerojet.engr.ucdavis.edu/fluenthelp/html/ug/node1490.htm>.\n\nCollective\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `viewer`      - The `PetscViewer` associated with a Fluent mesh file\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateFluent\"))\n\"\"\"\nfunction DMPlexCreateFluent(petsclib::PetscLibType, comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateFluent(petsclib::$UnionPetscLib, comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateFluent, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscViewer, PetscBool, Ptr{CDM}),\n               comm, viewer, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tsimplex::PetscBool = DMPlexIsSimplex(petsclib::PetscLibType,dm::PetscDM) \nIs the first cell in this mesh a simplex?\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `simplex` - Flag checking for a simplex\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetSimplexOrBoxCells()`, `DMPlexGetCellType()`, `DMPlexGetHeightStratum()`, `DMPolytopeTypeGetNumVertices()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexIsSimplex\"))\n\"\"\"\nfunction DMPlexIsSimplex(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexIsSimplex(petsclib::$UnionPetscLib, dm::PetscDM )\n\tsimplex_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexIsSimplex, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, simplex_,\n              )\n\n\tsimplex = simplex_[]\n\n\treturn simplex\nend \n\n\"\"\"\n\tcStart::PetscInt,cEnd::PetscInt = DMPlexGetSimplexOrBoxCells(petsclib::PetscLibType,dm::PetscDM, height::PetscInt) \nGet the range of cells which are neither prisms nor ghost FV cells\n\nInput Parameters:\n- `dm`     - The `DMPLEX` object\n- `height` - The cell height in the Plex, 0 is the default\n\nOutput Parameters:\n- `cStart` - The first \"normal\" cell, pass `NULL` if not needed\n- `cEnd`   - The upper bound on \"normal\" cells, pass `NULL` if not needed\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexConstructGhostCells()`, `DMPlexGetCellTypeStratum()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSimplexOrBoxCells\"))\n\"\"\"\nfunction DMPlexGetSimplexOrBoxCells(petsclib::PetscLibType, dm::PetscDM, height::PetscInt) end\n\n@for_petsc function DMPlexGetSimplexOrBoxCells(petsclib::$UnionPetscLib, dm::PetscDM, height::$PetscInt )\n\tcStart_ = Ref{$PetscInt}()\n\tcEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetSimplexOrBoxCells, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, height, cStart_, cEnd_,\n              )\n\n\tcStart = cStart_[]\n\tcEnd = cEnd_[]\n\n\treturn cStart,cEnd\nend \n\n\"\"\"\n\tDMPlexVecView1D(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, u::Vector{PetscVec}, viewer::PetscViewer) \nPlot many 1D solutions on the same line graph\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DMPLEX` object\n- `n`      - The number of vectors\n- `u`      - The array of local vectors\n- `viewer` - The `PetscViewer`\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `VecViewFromOptions()`, `VecView()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexVecView1D\"))\n\"\"\"\nfunction DMPlexVecView1D(petsclib::PetscLibType, dm::PetscDM, n::PetscInt, u::Vector{PetscVec}, viewer::PetscViewer) end\n\n@for_petsc function DMPlexVecView1D(petsclib::$UnionPetscLib, dm::PetscDM, n::$PetscInt, u::Vector{PetscVec}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMPlexVecView1D, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CVec}, PetscViewer),\n               dm, n, u, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTopologyView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer) \nSaves a `DMPLEX` topology into a file\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DM` whose topology is to be saved\n- `viewer` - The `PetscViewer` to save it in\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMView()`, `DMPlexCoordinatesView()`, `DMPlexLabelsView()`, `DMPlexTopologyLoad()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexTopologyView\"))\n\"\"\"\nfunction DMPlexTopologyView(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer) end\n\n@for_petsc function DMPlexTopologyView(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMPlexTopologyView, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer),\n               dm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCoordinatesView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer) \nSaves `DMPLEX` coordinates into a file\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DM` whose coordinates are to be saved\n- `viewer` - The `PetscViewer` for saving\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMView()`, `DMPlexTopologyView()`, `DMPlexLabelsView()`, `DMPlexCoordinatesLoad()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCoordinatesView\"))\n\"\"\"\nfunction DMPlexCoordinatesView(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer) end\n\n@for_petsc function DMPlexCoordinatesView(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMPlexCoordinatesView, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer),\n               dm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLabelsView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer) \nSaves `DMPLEX` labels into a file\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DM` whose labels are to be saved\n- `viewer` - The `PetscViewer` for saving\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMView()`, `DMPlexTopologyView()`, `DMPlexCoordinatesView()`, `DMPlexLabelsLoad()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLabelsView\"))\n\"\"\"\nfunction DMPlexLabelsView(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer) end\n\n@for_petsc function DMPlexLabelsView(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMPlexLabelsView, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer),\n               dm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSectionView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM) \nSaves a section associated with a `DMPLEX`\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM` that contains the topology on which the section to be saved is defined\n- `viewer`    - The `PetscViewer` for saving\n- `sectiondm` - The `DM` that contains the section to be saved, can be `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMView()`, `DMPlexTopologyView()`, `DMPlexCoordinatesView()`, `DMPlexLabelsView()`, `DMPlexGlobalVectorView()`, `DMPlexLocalVectorView()`, `PetscSectionView()`, `DMPlexSectionLoad()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSectionView\"))\n\"\"\"\nfunction DMPlexSectionView(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM) end\n\n@for_petsc function DMPlexSectionView(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexSectionView, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, CDM),\n               dm, viewer, sectiondm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGlobalVectorView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec) \nSaves a global vector\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM` that represents the topology\n- `viewer`    - The `PetscViewer` to save data with\n- `sectiondm` - The `DM` that contains the global section on which vec is defined, can be `NULL`\n- `vec`       - The global vector to be saved\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTopologyView()`, `DMPlexSectionView()`, `DMPlexLocalVectorView()`, `DMPlexGlobalVectorLoad()`, `DMPlexLocalVectorLoad()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGlobalVectorView\"))\n\"\"\"\nfunction DMPlexGlobalVectorView(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec) end\n\n@for_petsc function DMPlexGlobalVectorView(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec )\n\n    @chk ccall(\n               (:DMPlexGlobalVectorView, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, CDM, CVec),\n               dm, viewer, sectiondm, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLocalVectorView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec) \nSaves a local vector\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM` that represents the topology\n- `viewer`    - The `PetscViewer` to save data with\n- `sectiondm` - The `DM` that contains the local section on which `vec` is defined, can be `NULL`\n- `vec`       - The local vector to be saved\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTopologyView()`, `DMPlexSectionView()`, `DMPlexGlobalVectorView()`, `DMPlexGlobalVectorLoad()`, `DMPlexLocalVectorLoad()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLocalVectorView\"))\n\"\"\"\nfunction DMPlexLocalVectorView(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec) end\n\n@for_petsc function DMPlexLocalVectorView(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec )\n\n    @chk ccall(\n               (:DMPlexLocalVectorView, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, CDM, CVec),\n               dm, viewer, sectiondm, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTopologyLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF) \nLoads a topology into a `DMPLEX`\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DM` into which the topology is loaded\n- `viewer` - The `PetscViewer` for the saved topology\n\nOutput Parameter:\n- `globalToLocalPointSF` - The `PetscSF` that pushes points in [0, N) to the associated points in the loaded `DMPLEX`, where N is the global number of points;\n`NULL` if unneeded\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLoad()`, `DMPlexCoordinatesLoad()`, `DMPlexLabelsLoad()`, `DMView()`, `PetscViewerHDF5Open()`, `PetscViewerPushFormat()`,\n`PetscViewer`, `PetscSF`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexTopologyLoad\"))\n\"\"\"\nfunction DMPlexTopologyLoad(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF) end\n\n@for_petsc function DMPlexTopologyLoad(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexTopologyLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, Ptr{PetscSF}),\n               dm, viewer, globalToLocalPointSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCoordinatesLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF) \nLoads coordinates into a `DMPLEX`\n\nCollective\n\nInput Parameters:\n- `dm`                   - The `DM` into which the coordinates are loaded\n- `viewer`               - The `PetscViewer` for the saved coordinates\n- `globalToLocalPointSF` - The `PetscSF` returned by `DMPlexTopologyLoad()` when loading dm from viewer\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLoad()`, `DMPlexTopologyLoad()`, `DMPlexLabelsLoad()`, `DMView()`, `PetscViewerHDF5Open()`, `PetscViewerPushFormat()`,\n`PetscSF`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCoordinatesLoad\"))\n\"\"\"\nfunction DMPlexCoordinatesLoad(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF) end\n\n@for_petsc function DMPlexCoordinatesLoad(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexCoordinatesLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, PetscSF),\n               dm, viewer, globalToLocalPointSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLabelsLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF) \nLoads labels into a `DMPLEX`\n\nCollective\n\nInput Parameters:\n- `dm`                   - The `DM` into which the labels are loaded\n- `viewer`               - The `PetscViewer` for the saved labels\n- `globalToLocalPointSF` - The `PetscSF` returned by `DMPlexTopologyLoad()` when loading `dm` from viewer\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLoad()`, `DMPlexTopologyLoad()`, `DMPlexCoordinatesLoad()`, `DMView()`, `PetscViewerHDF5Open()`, `PetscViewerPushFormat()`,\n`PetscSF`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLabelsLoad\"))\n\"\"\"\nfunction DMPlexLabelsLoad(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF) end\n\n@for_petsc function DMPlexLabelsLoad(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexLabelsLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, PetscSF),\n               dm, viewer, globalToLocalPointSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSectionLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, globalToLocalPointSF::PetscSF, globalDofSF::PetscSF, locDofSF::PetscSF) \nLoads section into a `DMPLEX`\n\nCollective\n\nInput Parameters:\n- `dm`                   - The `DM` that represents the topology\n- `viewer`               - The `PetscViewer` that represents the on-disk section (sectionA)\n- `sectiondm`            - The `DM` into which the on-disk section (sectionA) is migrated, can be `NULL`\n- `globalToLocalPointSF` - The `PetscSF` returned by `DMPlexTopologyLoad(`) when loading dm from viewer\n\nOutput Parameters:\n- `globalDofSF` - The `PetscSF` that migrates any on-disk `Vec` data associated with sectionA into a global `Vec` associated with the `sectiondm`'s global section (`NULL` if not needed)\n- `localDofSF`  - The `PetscSF` that migrates any on-disk `Vec` data associated with sectionA into a local `Vec` associated with the `sectiondm`'s local section (`NULL` if not needed)\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLoad()`, `DMPlexTopologyLoad()`, `DMPlexCoordinatesLoad()`, `DMPlexLabelsLoad()`, `DMPlexGlobalVectorLoad()`, `DMPlexLocalVectorLoad()`, `PetscSectionLoad()`, `DMPlexSectionView()`, `PetscSF`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSectionLoad\"))\n\"\"\"\nfunction DMPlexSectionLoad(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, globalToLocalPointSF::PetscSF, globalDofSF::PetscSF, locDofSF::PetscSF) end\n\n@for_petsc function DMPlexSectionLoad(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, globalToLocalPointSF::PetscSF, globalDofSF::PetscSF, locDofSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexSectionLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, CDM, PetscSF, Ptr{PetscSF}, Ptr{PetscSF}),\n               dm, viewer, sectiondm, globalToLocalPointSF, globalDofSF, locDofSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGlobalVectorLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec) \nLoads on\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM` that represents the topology\n- `viewer`    - The `PetscViewer` that represents the on-disk vector data\n- `sectiondm` - The `DM` that contains the global section on which vec is defined, can be `NULL`\n- `sf`        - The `PetscSF` that migrates the on-disk vector data into vec\n- `vec`       - The global vector to set values of\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTopologyLoad()`, `DMPlexSectionLoad()`, `DMPlexLocalVectorLoad()`, `DMPlexGlobalVectorView()`, `DMPlexLocalVectorView()`,\n`PetscSF`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGlobalVectorLoad\"))\n\"\"\"\nfunction DMPlexGlobalVectorLoad(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec) end\n\n@for_petsc function DMPlexGlobalVectorLoad(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec )\n\n    @chk ccall(\n               (:DMPlexGlobalVectorLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, CDM, PetscSF, CVec),\n               dm, viewer, sectiondm, sf, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLocalVectorLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec) \nLoads on\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM` that represents the topology\n- `viewer`    - The `PetscViewer` that represents the on-disk vector data\n- `sectiondm` - The `DM` that contains the local section on which vec is defined, can be `NULL`\n- `sf`        - The `PetscSF` that migrates the on-disk vector data into vec\n- `vec`       - The local vector to set values of\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTopologyLoad()`, `DMPlexSectionLoad()`, `DMPlexGlobalVectorLoad()`, `DMPlexGlobalVectorView()`, `DMPlexLocalVectorView()`,\n`PetscSF`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLocalVectorLoad\"))\n\"\"\"\nfunction DMPlexLocalVectorLoad(petsclib::PetscLibType, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec) end\n\n@for_petsc function DMPlexLocalVectorLoad(petsclib::$UnionPetscLib, dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec )\n\n    @chk ccall(\n               (:DMPlexLocalVectorLoad, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscViewer, CDM, PetscSF, CVec),\n               dm, viewer, sectiondm, sf, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetSubdomainSection(petsclib::PetscLibType,dm::PetscDM, subsection::PetscSection) \nReturns the section associated with the subdomain\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX`\n\nOutput Parameter:\n- `subsection` - The subdomain section\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSection`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSubdomainSection\"))\n\"\"\"\nfunction DMPlexGetSubdomainSection(petsclib::PetscLibType, dm::PetscDM, subsection::PetscSection) end\n\n@for_petsc function DMPlexGetSubdomainSection(petsclib::$UnionPetscLib, dm::PetscDM, subsection::PetscSection )\n\n    @chk ccall(\n               (:DMPlexGetSubdomainSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}),\n               dm, subsection,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt = DMPlexGetChart(petsclib::PetscLibType,dm::PetscDM) \nReturn the interval for all mesh points [`pStart`, `pEnd`)\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX`\n\nOutput Parameters:\n- `pStart` - The first mesh point\n- `pEnd`   - The upper bound for mesh points\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetChart\"))\n\"\"\"\nfunction DMPlexGetChart(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetChart(petsclib::$UnionPetscLib, dm::PetscDM )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetChart, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, pStart_, pEnd_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\n\treturn pStart,pEnd\nend \n\n\"\"\"\n\tDMPlexSetChart(petsclib::PetscLibType,dm::PetscDM, pStart::PetscInt, pEnd::PetscInt) \nSet the interval for all mesh points [`pStart`, `pEnd`)\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DMPLEX`\n- `pStart` - The first mesh point\n- `pEnd`   - The upper bound for mesh points\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetChart\"))\n\"\"\"\nfunction DMPlexSetChart(petsclib::PetscLibType, dm::PetscDM, pStart::PetscInt, pEnd::PetscInt) end\n\n@for_petsc function DMPlexSetChart(petsclib::$UnionPetscLib, dm::PetscDM, pStart::$PetscInt, pEnd::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexSetChart, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               dm, pStart, pEnd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt = DMPlexGetConeSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturn the number of in\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DMPLEX`\n- `p`  - The point, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameter:\n- `size` - The cone size for point `p`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSetConeSize()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetConeSize\"))\n\"\"\"\nfunction DMPlexGetConeSize(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMPlexGetConeSize(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetConeSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tDMPlexSetConeSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, size::PetscInt) \nSet the number of in\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX`\n- `p`    - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `size` - The cone size for point `p`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetCone()`, `DMPlexCreate()`, `DMPlexGetConeSize()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetConeSize\"))\n\"\"\"\nfunction DMPlexSetConeSize(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, size::PetscInt) end\n\n@for_petsc function DMPlexSetConeSize(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, size::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexSetConeSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               dm, p, size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcone::Vector{PetscInt} = DMPlexGetCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturn the points on the in\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DMPLEX`\n- `p`  - The point, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameter:\n- `cone` - An array of points which are on the in-edges for point `p`, the length of `cone` is the result of `DMPlexGetConeSize()`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetConeSize()`, `DMPlexSetCone()`, `DMPlexGetConeTuple()`, `DMPlexSetChart()`, `DMPlexRestoreCone()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCone\"))\n\"\"\"\nfunction DMPlexGetCone(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMPlexGetCone(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tcone_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetCone, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               dm, p, cone_,\n              )\n\n\tcone = unsafe_wrap(Array, cone_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn cone\nend \n\n\"\"\"\n\tDMPlexGetConeTuple(petsclib::PetscLibType,dm::PetscDM, p::IS, pConesSection::PetscSection, pCones::IS) \nReturn the points on the in\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DMPLEX`\n- `p`  - The `IS` of points, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameters:\n- `pConesSection` - `PetscSection` describing the layout of `pCones`\n- `pCones`        - An `IS` containing the points which are on the in-edges for the point set `p`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexGetConeRecursive()`, `DMPlexSetChart()`, `PetscSection`, `IS`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetConeTuple\"))\n\"\"\"\nfunction DMPlexGetConeTuple(petsclib::PetscLibType, dm::PetscDM, p::IS, pConesSection::PetscSection, pCones::IS) end\n\n@for_petsc function DMPlexGetConeTuple(petsclib::$UnionPetscLib, dm::PetscDM, p::IS, pConesSection::PetscSection, pCones::IS )\n\n    @chk ccall(\n               (:DMPlexGetConeTuple, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, Ptr{PetscSection}, Ptr{CIS}),\n               dm, p, pConesSection, pCones,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetConeRecursiveVertices(petsclib::PetscLibType,dm::PetscDM, points::IS, expandedPoints::IS) \nExpand each given point into its cone points and do that recursively until we end up just with vertices.\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DMPLEX`\n- `points` - The `IS` of points, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameter:\n- `expandedPoints` - An `IS` containing the of vertices recursively expanded from input points\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexGetConeTuple()`, `DMPlexGetConeRecursive()`, `DMPlexRestoreConeRecursive()`,\n`DMPlexGetDepth()`, `IS`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetConeRecursiveVertices\"))\n\"\"\"\nfunction DMPlexGetConeRecursiveVertices(petsclib::PetscLibType, dm::PetscDM, points::IS, expandedPoints::IS) end\n\n@for_petsc function DMPlexGetConeRecursiveVertices(petsclib::$UnionPetscLib, dm::PetscDM, points::IS, expandedPoints::IS )\n\n    @chk ccall(\n               (:DMPlexGetConeRecursiveVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, Ptr{CIS}),\n               dm, points, expandedPoints,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdepth::PetscInt = DMPlexGetConeRecursive(petsclib::PetscLibType,dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection}) \nExpand each given point into its cone points and do that recursively until we end up just with vertices\n(DAG points of depth 0, i.e., without cones).\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DMPLEX`\n- `points` - The `IS` of points, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameters:\n- `depth`          - (optional) Size of the output arrays, equal to `DMPLEX` depth, returned by `DMPlexGetDepth()`\n- `expandedPoints` - (optional) An array of index sets with recursively expanded cones\n- `sections`       - (optional) An array of sections which describe mappings from points to their cone points\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexGetConeTuple()`, `DMPlexRestoreConeRecursive()`, `DMPlexGetConeRecursiveVertices()`,\n`DMPlexGetDepth()`, `PetscSection`, `IS`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetConeRecursive\"))\n\"\"\"\nfunction DMPlexGetConeRecursive(petsclib::PetscLibType, dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection}) end\n\n@for_petsc function DMPlexGetConeRecursive(petsclib::$UnionPetscLib, dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection} )\n\tdepth_ = Ref{$PetscInt}()\n\texpandedPoints_ = Ref(pointer(expandedPoints))\n\tsections_ = Ref(pointer(sections))\n\n    @chk ccall(\n               (:DMPlexGetConeRecursive, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, Ptr{$PetscInt}, Ptr{Ptr{CIS}}, Ptr{Ptr{PetscSection}}),\n               dm, points, depth_, expandedPoints_, sections_,\n              )\n\n\tdepth = depth_[]\n\n\treturn depth\nend \n\n\"\"\"\n\tdepth::PetscInt = DMPlexRestoreConeRecursive(petsclib::PetscLibType,dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection}) \nDeallocates arrays created by `DMPlexGetConeRecursive()`\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DMPLEX`\n- `points` - The `IS` of points, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameters:\n- `depth`          - (optional) Size of the output arrays, equal to `DMPLEX` depth, returned by `DMPlexGetDepth()`\n- `expandedPoints` - (optional) An array of recursively expanded cones\n- `sections`       - (optional) An array of sections which describe mappings from points to their cone points\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexGetConeTuple()`, `DMPlexGetConeRecursive()`, `DMPlexGetConeRecursiveVertices()`,\n`DMPlexGetDepth()`, `IS`, `PetscSection`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreConeRecursive\"))\n\"\"\"\nfunction DMPlexRestoreConeRecursive(petsclib::PetscLibType, dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection}) end\n\n@for_petsc function DMPlexRestoreConeRecursive(petsclib::$UnionPetscLib, dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection} )\n\tdepth_ = Ref{$PetscInt}()\n\texpandedPoints_ = Ref(pointer(expandedPoints))\n\tsections_ = Ref(pointer(sections))\n\n    @chk ccall(\n               (:DMPlexRestoreConeRecursive, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, Ptr{$PetscInt}, Ptr{Ptr{CIS}}, Ptr{Ptr{PetscSection}}),\n               dm, points, depth_, expandedPoints_, sections_,\n              )\n\n\tdepth = depth_[]\n\n\treturn depth\nend \n\n\"\"\"\n\tDMPlexSetCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, cone::Vector{PetscInt}) \nSet the points on the in\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX`\n- `p`    - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `cone` - An array of points which are on the in-edges for point `p`, its length must have been previously provided with `DMPlexSetConeSize()`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexSetChart()`, `DMPlexSetConeSize()`, `DMSetUp()`, `DMPlexSetSupport()`, `DMPlexSetSupportSize()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetCone\"))\n\"\"\"\nfunction DMPlexSetCone(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, cone::Vector{PetscInt}) end\n\n@for_petsc function DMPlexSetCone(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, cone::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexSetCone, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, cone,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tconeOrientation::Vector{PetscInt} = DMPlexGetConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturn the orientations on the in\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DMPLEX`\n- `p`  - The point, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameter:\n- `coneOrientation` - An array of orientations which are on the in-edges for point `p`. An orientation is an\ninteger giving the prescription for cone traversal. Its length is given by the result of `DMPlexSetConeSize()`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetConeSize()`, `DMPolytopeTypeComposeOrientation()`, `DMPolytopeTypeComposeOrientationInv()`,\n`DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexSetCone()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetConeOrientation\"))\n\"\"\"\nfunction DMPlexGetConeOrientation(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMPlexGetConeOrientation(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tconeOrientation_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetConeOrientation, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               dm, p, coneOrientation_,\n              )\n\n\tconeOrientation = unsafe_wrap(Array, coneOrientation_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn coneOrientation\nend \n\n\"\"\"\n\tDMPlexSetConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, coneOrientation::Vector{PetscInt}) \nSet the orientations on the in\n\nNot Collective\n\nInput Parameters:\n- `dm`              - The `DMPLEX`\n- `p`               - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `coneOrientation` - An array of orientations. Its length is given by the result of `DMPlexSetConeSize()`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetConeOrientation()`, `DMPlexSetCone()`, `DMPlexSetChart()`, `DMPlexSetConeSize()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetConeOrientation\"))\n\"\"\"\nfunction DMPlexSetConeOrientation(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, coneOrientation::Vector{PetscInt}) end\n\n@for_petsc function DMPlexSetConeOrientation(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, coneOrientation::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexSetConeOrientation, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, coneOrientation,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, conePos::PetscInt, conePoint::PetscInt) \nInsert a point into the in\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX`\n- `p`         - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `conePos`   - The local index in the cone where the point should be put\n- `conePoint` - The mesh point to insert\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexSetChart()`, `DMPlexSetConeSize()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertCone\"))\n\"\"\"\nfunction DMPlexInsertCone(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, conePos::PetscInt, conePoint::PetscInt) end\n\n@for_petsc function DMPlexInsertCone(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, conePos::$PetscInt, conePoint::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexInsertCone, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               dm, p, conePos, conePoint,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, conePos::PetscInt, coneOrientation::PetscInt) \nInsert a point orientation for the in\n\nNot Collective\n\nInput Parameters:\n- `dm`              - The `DMPLEX`\n- `p`               - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `conePos`         - The local index in the cone where the point should be put\n- `coneOrientation` - The point orientation to insert\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexSetChart()`, `DMPlexSetConeSize()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertConeOrientation\"))\n\"\"\"\nfunction DMPlexInsertConeOrientation(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, conePos::PetscInt, coneOrientation::PetscInt) end\n\n@for_petsc function DMPlexInsertConeOrientation(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, conePos::$PetscInt, coneOrientation::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexInsertConeOrientation, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               dm, p, conePos, coneOrientation,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexGetOrientedCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturn the points and orientations on the in\n\nNot collective\n\nInput Parameters:\n- `dm` - The DMPlex\n- `p`  - The point, which must lie in the chart set with DMPlexSetChart()\n\nOutput Parameters:\n- `cone` - An array of points which are on the in-edges for point `p`\n- `ornt` - An array of orientations which are on the in-edges for point `p`. An orientation is an\ninteger giving the prescription for cone traversal.\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexRestoreOrientedCone()`, `DMPlexGetConeSize()`, `DMPlexGetCone()`, `DMPlexGetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetOrientedCone\"))\n\"\"\"\nfunction DMPlexGetOrientedCone(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMPlexGetOrientedCone(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tcone_ = Ref{Ptr{$PetscInt}}()\n\tornt_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetOrientedCone, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               dm, p, cone_, ornt_,\n              )\n\n\tcone = unsafe_wrap(Array, cone_[], VecGetLocalSize(petsclib, x); own = false)\n\tornt = unsafe_wrap(Array, ornt_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn cone,ornt\nend \n\n\"\"\"\n\tDMPlexRestoreOrientedCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, cone::Vector{PetscInt}, ornt::Vector{PetscInt}) \nRestore the points and orientations on the in\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The DMPlex\n- `p`    - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `cone` - An array of points which are on the in-edges for point p\n- `ornt` - An array of orientations which are on the in-edges for point `p`. An orientation is an\ninteger giving the prescription for cone traversal.\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetOrientedCone()`, `DMPlexGetConeSize()`, `DMPlexGetCone()`, `DMPlexGetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreOrientedCone\"))\n\"\"\"\nfunction DMPlexRestoreOrientedCone(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, cone::Vector{PetscInt}, ornt::Vector{PetscInt}) end\n\n@for_petsc function DMPlexRestoreOrientedCone(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, cone::Vector{$PetscInt}, ornt::Vector{$PetscInt} )\n\tcone_ = Ref(pointer(cone))\n\tornt_ = Ref(pointer(ornt))\n\n    @chk ccall(\n               (:DMPlexRestoreOrientedCone, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               dm, p, cone_, ornt_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt = DMPlexGetSupportSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturn the number of out\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DMPLEX`\n- `p`  - The point, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameter:\n- `size` - The support size for point `p`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSetConeSize()`, `DMPlexSetChart()`, `DMPlexGetConeSize()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSupportSize\"))\n\"\"\"\nfunction DMPlexGetSupportSize(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMPlexGetSupportSize(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetSupportSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tDMPlexSetSupportSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, size::PetscInt) \nSet the number of out\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX`\n- `p`    - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `size` - The support size for point `p`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetSupportSize()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetSupportSize\"))\n\"\"\"\nfunction DMPlexSetSupportSize(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, size::PetscInt) end\n\n@for_petsc function DMPlexSetSupportSize(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, size::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexSetSupportSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               dm, p, size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsupport::Vector{PetscInt} = DMPlexGetSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturn the points on the out\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DMPLEX`\n- `p`  - The point, which must lie in the chart set with `DMPlexSetChart()`\n\nOutput Parameter:\n- `support` - An array of points which are on the out-edges for point `p`, its length is that obtained from `DMPlexGetSupportSize()`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetSupportSize()`, `DMPlexSetSupport()`, `DMPlexGetCone()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSupport\"))\n\"\"\"\nfunction DMPlexGetSupport(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMPlexGetSupport(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tsupport_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetSupport, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               dm, p, support_,\n              )\n\n\tsupport = unsafe_wrap(Array, support_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn support\nend \n\n\"\"\"\n\tDMPlexSetSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, support::Vector{PetscInt}) \nSet the points on the out\n\nNot Collective\n\nInput Parameters:\n- `dm`      - The `DMPLEX`\n- `p`       - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `support` - An array of points which are on the out-edges for point `p`, its length is that obtained from `DMPlexGetSupportSize()`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetCone()`, `DMPlexSetConeSize()`, `DMPlexCreate()`, `DMPlexGetSupport()`, `DMPlexSetChart()`, `DMPlexSetSupportSize()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetSupport\"))\n\"\"\"\nfunction DMPlexSetSupport(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, support::Vector{PetscInt}) end\n\n@for_petsc function DMPlexSetSupport(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, support::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexSetSupport, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, p, support,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, supportPos::PetscInt, supportPoint::PetscInt) \nInsert a point into the out\n\nNot Collective\n\nInput Parameters:\n- `dm`           - The `DMPLEX`\n- `p`            - The point, which must lie in the chart set with `DMPlexSetChart()`\n- `supportPos`   - The local index in the cone where the point should be put\n- `supportPoint` - The mesh point to insert\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexGetCone()`, `DMPlexSetChart()`, `DMPlexSetConeSize()`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertSupport\"))\n\"\"\"\nfunction DMPlexInsertSupport(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, supportPos::PetscInt, supportPoint::PetscInt) end\n\n@for_petsc function DMPlexInsertSupport(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, supportPos::$PetscInt, supportPoint::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexInsertSupport, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt),\n               dm, p, supportPos, supportPoint,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumPoints::PetscInt,points::Vector{PetscInt} = DMPlexGetTransitiveClosure(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, useCone::PetscBool) \nReturn the points on the transitive closure of the in\n\nNot Collective\n\nInput Parameters:\n- `dm`      - The `DMPLEX`\n- `p`       - The mesh point\n- `useCone` - `PETSC_TRUE` for the closure, otherwise return the star\n\nInput/Output Parameter:\n- `points` - The points and point orientations, interleaved as pairs [p0, o0, p1, o1, ...];\nif *points is `NULL` on input, internal storage will be returned, use `DMPlexRestoreTransitiveClosure()`,\notherwise the provided array is used to hold the values\n\nOutput Parameter:\n- `numPoints` - The number of points in the closure, so `points` is of size 2*`numPoints`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexRestoreTransitiveClosure()`, `DMPlexCreate()`, `DMPlexSetCone()`, `DMPlexSetChart()`, `DMPlexGetCone()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetTransitiveClosure\"))\n\"\"\"\nfunction DMPlexGetTransitiveClosure(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, useCone::PetscBool) end\n\n@for_petsc function DMPlexGetTransitiveClosure(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, useCone::PetscBool )\n\tnumPoints_ = Ref{$PetscInt}()\n\tpoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetTransitiveClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, p, useCone, numPoints_, points_,\n              )\n\n\tnumPoints = numPoints_[]\n\tpoints = unsafe_wrap(Array, points_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numPoints,points\nend \n\n\"\"\"\n\tDMPlexRestoreTransitiveClosure(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, useCone::PetscBool, numPoints::PetscInt, points::Vector{PetscInt}) \nRestore the array of points on the transitive closure of the in\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX`\n- `p`         - The mesh point\n- `useCone`   - `PETSC_TRUE` for the closure, otherwise return the star\n- `numPoints` - The number of points in the closure, so points[] is of size 2*`numPoints`\n- `points`    - The points and point orientations, interleaved as pairs [p0, o0, p1, o1, ...]\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetTransitiveClosure()`, `DMPlexCreate()`, `DMPlexSetCone()`, `DMPlexSetChart()`, `DMPlexGetCone()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreTransitiveClosure\"))\n\"\"\"\nfunction DMPlexRestoreTransitiveClosure(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, useCone::PetscBool, numPoints::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function DMPlexRestoreTransitiveClosure(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, useCone::PetscBool, numPoints::$PetscInt, points::Vector{$PetscInt} )\n\tpoints_ = Ref(pointer(points))\n\n    @chk ccall(\n               (:DMPlexRestoreTransitiveClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, p, useCone, numPoints, points_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxConeSize::PetscInt,maxSupportSize::PetscInt = DMPlexGetMaxSizes(petsclib::PetscLibType,dm::PetscDM) \nReturn the maximum number of in\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX`\n\nOutput Parameters:\n- `maxConeSize`    - The maximum number of in-edges\n- `maxSupportSize` - The maximum number of out-edges\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSetConeSize()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetMaxSizes\"))\n\"\"\"\nfunction DMPlexGetMaxSizes(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetMaxSizes(petsclib::$UnionPetscLib, dm::PetscDM )\n\tmaxConeSize_ = Ref{$PetscInt}()\n\tmaxSupportSize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetMaxSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, maxConeSize_, maxSupportSize_,\n              )\n\n\tmaxConeSize = maxConeSize_[]\n\tmaxSupportSize = maxSupportSize_[]\n\n\treturn maxConeSize,maxSupportSize\nend \n\n\"\"\"\n\tDMPlexSymmetrize(petsclib::PetscLibType,dm::PetscDM) \nCreate support (out\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSetChart()`, `DMPlexSetConeSize()`, `DMPlexSetCone()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSymmetrize\"))\n\"\"\"\nfunction DMPlexSymmetrize(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexSymmetrize(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexSymmetrize, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexStratify(petsclib::PetscLibType,dm::PetscDM) \nComputes the strata for all points in the `DMPLEX`\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSymmetrize()`, `DMPlexComputeCellTypes()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexStratify\"))\n\"\"\"\nfunction DMPlexStratify(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexStratify(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexStratify, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeCellTypes(petsclib::PetscLibType,dm::PetscDM) \nInfer the polytope type of every cell using its dimension and cone size.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSymmetrize()`, `DMPlexStratify()`, `DMGetLabel()`, `DMCreateLabel()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeCellTypes\"))\n\"\"\"\nfunction DMPlexComputeCellTypes(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexComputeCellTypes(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexComputeCellTypes, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetJoin(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) \nGet an array for the join of the set of points\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX` object\n- `numPoints` - The number of input points for the join\n- `points`    - The input points\n\nOutput Parameters:\n- `numCoveredPoints` - The number of points in the join\n- `coveredPoints`    - The points in the join\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexRestoreJoin()`, `DMPlexGetMeet()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetJoin\"))\n\"\"\"\nfunction DMPlexGetJoin(petsclib::PetscLibType, dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function DMPlexGetJoin(petsclib::$UnionPetscLib, dm::PetscDM, numPoints::$PetscInt, points::Vector{$PetscInt} )\n\tnumCoveredPoints_ = Ref{$PetscInt}()\n\tcoveredPoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetJoin, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, numPoints, points, numCoveredPoints_, coveredPoints_,\n              )\n\n\tnumCoveredPoints = numCoveredPoints_[]\n\tcoveredPoints = unsafe_wrap(Array, coveredPoints_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numCoveredPoints,coveredPoints\nend \n\n\"\"\"\n\tnumCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexRestoreJoin(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) \nRestore an array for the join of the set of points obtained with `DMPlexGetJoin()`\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX` object\n- `numPoints` - The number of input points for the join\n- `points`    - The input points\n\nOutput Parameters:\n- `numCoveredPoints` - The number of points in the join\n- `coveredPoints`    - The points in the join\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetJoin()`, `DMPlexGetFullJoin()`, `DMPlexGetMeet()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreJoin\"))\n\"\"\"\nfunction DMPlexRestoreJoin(petsclib::PetscLibType, dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function DMPlexRestoreJoin(petsclib::$UnionPetscLib, dm::PetscDM, numPoints::$PetscInt, points::Vector{$PetscInt} )\n\tnumCoveredPoints_ = Ref{$PetscInt}()\n\tcoveredPoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexRestoreJoin, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, numPoints, points, numCoveredPoints_, coveredPoints_,\n              )\n\n\tnumCoveredPoints = numCoveredPoints_[]\n\tcoveredPoints = unsafe_wrap(Array, coveredPoints_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numCoveredPoints,coveredPoints\nend \n\n\"\"\"\n\tnumCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetFullJoin(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) \nGet an array for the join of the set of points\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX` object\n- `numPoints` - The number of input points for the join\n- `points`    - The input points, its length is `numPoints`\n\nOutput Parameters:\n- `numCoveredPoints` - The number of points in the join\n- `coveredPoints`    - The points in the join, its length is `numCoveredPoints`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetJoin()`, `DMPlexRestoreJoin()`, `DMPlexGetMeet()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetFullJoin\"))\n\"\"\"\nfunction DMPlexGetFullJoin(petsclib::PetscLibType, dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function DMPlexGetFullJoin(petsclib::$UnionPetscLib, dm::PetscDM, numPoints::$PetscInt, points::Vector{$PetscInt} )\n\tnumCoveredPoints_ = Ref{$PetscInt}()\n\tcoveredPoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetFullJoin, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, numPoints, points, numCoveredPoints_, coveredPoints_,\n              )\n\n\tnumCoveredPoints = numCoveredPoints_[]\n\tcoveredPoints = unsafe_wrap(Array, coveredPoints_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numCoveredPoints,coveredPoints\nend \n\n\"\"\"\n\tnumCoveringPoints::PetscInt,coveringPoints::Vector{PetscInt} = DMPlexGetMeet(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) \nGet an array for the meet of the set of points\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX` object\n- `numPoints` - The number of input points for the meet\n- `points`    - The input points, of length `numPoints`\n\nOutput Parameters:\n- `numCoveringPoints` - The number of points in the meet\n- `coveringPoints`    - The points in the meet, of length `numCoveringPoints`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexRestoreMeet()`, `DMPlexGetJoin()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetMeet\"))\n\"\"\"\nfunction DMPlexGetMeet(petsclib::PetscLibType, dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function DMPlexGetMeet(petsclib::$UnionPetscLib, dm::PetscDM, numPoints::$PetscInt, points::Vector{$PetscInt} )\n\tnumCoveringPoints_ = Ref{$PetscInt}()\n\tcoveringPoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetMeet, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, numPoints, points, numCoveringPoints_, coveringPoints_,\n              )\n\n\tnumCoveringPoints = numCoveringPoints_[]\n\tcoveringPoints = unsafe_wrap(Array, coveringPoints_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numCoveringPoints,coveringPoints\nend \n\n\"\"\"\n\tnumCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexRestoreMeet(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) \nRestore an array for the meet of the set of points obtained with `DMPlexGetMeet()`\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX` object\n- `numPoints` - The number of input points for the meet\n- `points`    - The input points\n\nOutput Parameters:\n- `numCoveredPoints` - The number of points in the meet\n- `coveredPoints`    - The points in the meet\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetMeet()`, `DMPlexGetFullMeet()`, `DMPlexGetJoin()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreMeet\"))\n\"\"\"\nfunction DMPlexRestoreMeet(petsclib::PetscLibType, dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function DMPlexRestoreMeet(petsclib::$UnionPetscLib, dm::PetscDM, numPoints::$PetscInt, points::Vector{$PetscInt} )\n\tnumCoveredPoints_ = Ref{$PetscInt}()\n\tcoveredPoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexRestoreMeet, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, numPoints, points, numCoveredPoints_, coveredPoints_,\n              )\n\n\tnumCoveredPoints = numCoveredPoints_[]\n\tcoveredPoints = unsafe_wrap(Array, coveredPoints_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numCoveredPoints,coveredPoints\nend \n\n\"\"\"\n\tnumCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetFullMeet(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) \nGet an array for the meet of the set of points\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The `DMPLEX` object\n- `numPoints` - The number of input points for the meet\n- `points`    - The input points, of length  `numPoints`\n\nOutput Parameters:\n- `numCoveredPoints` - The number of points in the meet\n- `coveredPoints`    - The points in the meet, of length  `numCoveredPoints`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetMeet()`, `DMPlexRestoreMeet()`, `DMPlexGetJoin()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetFullMeet\"))\n\"\"\"\nfunction DMPlexGetFullMeet(petsclib::PetscLibType, dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function DMPlexGetFullMeet(petsclib::$UnionPetscLib, dm::PetscDM, numPoints::$PetscInt, points::Vector{$PetscInt} )\n\tnumCoveredPoints_ = Ref{$PetscInt}()\n\tcoveredPoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetFullMeet, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, numPoints, points, numCoveredPoints_, coveredPoints_,\n              )\n\n\tnumCoveredPoints = numCoveredPoints_[]\n\tcoveredPoints = unsafe_wrap(Array, coveredPoints_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numCoveredPoints,coveredPoints\nend \n\n\"\"\"\n\tequal::PetscBool = DMPlexEqual(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM) \nDetermine if two `DM` have the same topology\n\nNot Collective\n\nInput Parameters:\n- `dmA` - A `DMPLEX` object\n- `dmB` - A `DMPLEX` object\n\nOutput Parameter:\n- `equal` - `PETSC_TRUE` if the topologies are identical\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCone()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexEqual\"))\n\"\"\"\nfunction DMPlexEqual(petsclib::PetscLibType, dmA::PetscDM, dmB::PetscDM) end\n\n@for_petsc function DMPlexEqual(petsclib::$UnionPetscLib, dmA::PetscDM, dmB::PetscDM )\n\tequal_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexEqual, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{PetscBool}),\n               dmA, dmB, equal_,\n              )\n\n\tequal = equal_[]\n\n\treturn equal\nend \n\n\"\"\"\n\tnumFaceVertices::PetscInt = DMPlexGetNumFaceVertices(petsclib::PetscLibType,dm::PetscDM, cellDim::PetscInt, numCorners::PetscInt) \nReturns the number of vertices on a face\n\nNot Collective\n\nInput Parameters:\n- `dm`         - The `DMPLEX`\n- `cellDim`    - The cell dimension\n- `numCorners` - The number of vertices on a cell\n\nOutput Parameter:\n- `numFaceVertices` - The number of vertices on a face\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCone()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetNumFaceVertices\"))\n\"\"\"\nfunction DMPlexGetNumFaceVertices(petsclib::PetscLibType, dm::PetscDM, cellDim::PetscInt, numCorners::PetscInt) end\n\n@for_petsc function DMPlexGetNumFaceVertices(petsclib::$UnionPetscLib, dm::PetscDM, cellDim::$PetscInt, numCorners::$PetscInt )\n\tnumFaceVertices_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetNumFaceVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               dm, cellDim, numCorners, numFaceVertices_,\n              )\n\n\tnumFaceVertices = numFaceVertices_[]\n\n\treturn numFaceVertices\nend \n\n\"\"\"\n\tDMPlexGetDepthLabel(petsclib::PetscLibType,dm::PetscDM, depthLabel::DMLabel) \nGet the `DMLabel` recording the depth of each point\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `depthLabel` - The `DMLabel` recording point depth\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetDepth()`, `DMPlexGetHeightStratum()`, `DMPlexGetDepthStratum()`, `DMPlexGetPointDepth()`,\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetDepthLabel\"))\n\"\"\"\nfunction DMPlexGetDepthLabel(petsclib::PetscLibType, dm::PetscDM, depthLabel::DMLabel) end\n\n@for_petsc function DMPlexGetDepthLabel(petsclib::$UnionPetscLib, dm::PetscDM, depthLabel::DMLabel )\n\n    @chk ccall(\n               (:DMPlexGetDepthLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMLabel}),\n               dm, depthLabel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdepth::PetscInt = DMPlexGetDepth(petsclib::PetscLibType,dm::PetscDM) \nGet the depth of the DAG representing this mesh\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `depth` - The number of strata (breadth first levels) in the DAG\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetDepthLabel()`, `DMPlexGetDepthStratum()`, `DMPlexGetPointDepth()`, `DMPlexSymmetrize()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetDepth\"))\n\"\"\"\nfunction DMPlexGetDepth(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetDepth(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdepth_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetDepth, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, depth_,\n              )\n\n\tdepth = depth_[]\n\n\treturn depth\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexGetDepthStratum(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt) \nGet the bounds [`start`, `end`) for all points at a certain depth.\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DMPLEX` object\n- `depth` - The requested depth\n\nOutput Parameters:\n- `start` - The first point at this `depth`\n- `end`   - One beyond the last point at this `depth`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetHeightStratum()`, `DMPlexGetCellTypeStratum()`, `DMPlexGetDepth()`, `DMPlexGetDepthLabel()`, `DMPlexGetPointDepth()`, `DMPlexSymmetrize()`, `DMPlexInterpolate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetDepthStratum\"))\n\"\"\"\nfunction DMPlexGetDepthStratum(petsclib::PetscLibType, dm::PetscDM, depth::PetscInt) end\n\n@for_petsc function DMPlexGetDepthStratum(petsclib::$UnionPetscLib, dm::PetscDM, depth::$PetscInt )\n\tstart__ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetDepthStratum, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, depth, start__, end__,\n              )\n\n\tstart_ = start__[]\n\tend_ = end__[]\n\n\treturn start_,end_\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexGetHeightStratum(petsclib::PetscLibType,dm::PetscDM, height::PetscInt) \nGet the bounds [`start`, `end`) for all points at a certain height.\n\nNot Collective\n\nInput Parameters:\n- `dm`     - The `DMPLEX` object\n- `height` - The requested height\n\nOutput Parameters:\n- `start` - The first point at this `height`\n- `end`   - One beyond the last point at this `height`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetDepthStratum()`, `DMPlexGetCellTypeStratum()`, `DMPlexGetDepth()`, `DMPlexGetPointHeight()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetHeightStratum\"))\n\"\"\"\nfunction DMPlexGetHeightStratum(petsclib::PetscLibType, dm::PetscDM, height::PetscInt) end\n\n@for_petsc function DMPlexGetHeightStratum(petsclib::$UnionPetscLib, dm::PetscDM, height::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetHeightStratum, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, height, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tdepth::PetscInt = DMPlexGetPointDepth(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \nGet the `depth` of a given point\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DMPLEX` object\n- `point` - The point\n\nOutput Parameter:\n- `depth` - The depth of the `point`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellType()`, `DMPlexGetDepthLabel()`, `DMPlexGetDepth()`, `DMPlexGetPointHeight()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPointDepth\"))\n\"\"\"\nfunction DMPlexGetPointDepth(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMPlexGetPointDepth(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\tdepth_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetPointDepth, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, point, depth_,\n              )\n\n\tdepth = depth_[]\n\n\treturn depth\nend \n\n\"\"\"\n\theight::PetscInt = DMPlexGetPointHeight(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \nGet the `height` of a given point\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DMPLEX` object\n- `point` - The point\n\nOutput Parameter:\n- `height` - The height of the `point`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellType()`, `DMPlexGetDepthLabel()`, `DMPlexGetDepth()`, `DMPlexGetPointDepth()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPointHeight\"))\n\"\"\"\nfunction DMPlexGetPointHeight(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMPlexGetPointHeight(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\theight_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetPointHeight, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, point, height_,\n              )\n\n\theight = height_[]\n\n\treturn height\nend \n\n\"\"\"\n\tcelltypeLabel::DMLabel = DMPlexGetCellTypeLabel(petsclib::PetscLibType,dm::PetscDM) \nGet the `DMLabel` recording the polytope type of each cell\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `celltypeLabel` - The `DMLabel` recording cell polytope type\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellType()`, `DMPlexGetDepthLabel()`, `DMCreateLabel()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCellTypeLabel\"))\n\"\"\"\nfunction DMPlexGetCellTypeLabel(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetCellTypeLabel(petsclib::$UnionPetscLib, dm::PetscDM )\n\tcelltypeLabel_ = Ref{DMLabel}()\n\n    @chk ccall(\n               (:DMPlexGetCellTypeLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMLabel}),\n               dm, celltypeLabel_,\n              )\n\n\tcelltypeLabel = celltypeLabel_[]\n\n\treturn celltypeLabel\nend \n\n\"\"\"\n\tcelltype::DMPolytopeType = DMPlexGetCellType(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt) \nGet the polytope type of a given cell\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX` object\n- `cell` - The cell\n\nOutput Parameter:\n- `celltype` - The polytope type of the cell\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPolytopeType`, `DMPlexGetCellTypeLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetDepth()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCellType\"))\n\"\"\"\nfunction DMPlexGetCellType(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt) end\n\n@for_petsc function DMPlexGetCellType(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt )\n\tcelltype_ = Ref{DMPolytopeType}()\n\n    @chk ccall(\n               (:DMPlexGetCellType, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{DMPolytopeType}),\n               dm, cell, celltype_,\n              )\n\n\tcelltype = celltype_[]\n\n\treturn celltype\nend \n\n\"\"\"\n\tDMPlexSetCellType(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, celltype::DMPolytopeType) \nSet the polytope type of a given cell\n\nNot Collective\n\nInput Parameters:\n- `dm`       - The `DMPLEX` object\n- `cell`     - The cell\n- `celltype` - The polytope type of the cell\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellTypeLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetDepth()`, `DMPlexComputeCellTypes()`, `DMCreateLabel()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetCellType\"))\n\"\"\"\nfunction DMPlexSetCellType(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt, celltype::DMPolytopeType) end\n\n@for_petsc function DMPlexSetCellType(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt, celltype::DMPolytopeType )\n\n    @chk ccall(\n               (:DMPlexSetCellType, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, DMPolytopeType),\n               dm, cell, celltype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetConeSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nReturn a section which describes the layout of cone data\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `section` - The `PetscSection` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetSupportSection()`, `DMPlexGetCones()`, `DMPlexGetConeOrientations()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetConeSection\"))\n\"\"\"\nfunction DMPlexGetConeSection(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMPlexGetConeSection(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMPlexGetConeSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetSupportSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection) \nReturn a section which describes the layout of support data\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `section` - The `PetscSection` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetConeSection()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSupportSection\"))\n\"\"\"\nfunction DMPlexGetSupportSection(petsclib::PetscLibType, dm::PetscDM, section::PetscSection) end\n\n@for_petsc function DMPlexGetSupportSection(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection )\n\n    @chk ccall(\n               (:DMPlexGetSupportSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}),\n               dm, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcones::Vector{PetscInt} = DMPlexGetCones(petsclib::PetscLibType,dm::PetscDM) \nReturn cone data\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `cones` - The cone for each point\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetConeSection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCones\"))\n\"\"\"\nfunction DMPlexGetCones(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetCones(petsclib::$UnionPetscLib, dm::PetscDM )\n\tcones_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetCones, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{$PetscInt}}),\n               dm, cones_,\n              )\n\n\tcones = unsafe_wrap(Array, cones_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn cones\nend \n\n\"\"\"\n\tconeOrientations::Vector{PetscInt} = DMPlexGetConeOrientations(petsclib::PetscLibType,dm::PetscDM) \nReturn cone orientation data\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `coneOrientations` - The array of cone orientations for all points\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetConeSection()`, `DMPlexGetConeOrientation()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetConeOrientations\"))\n\"\"\"\nfunction DMPlexGetConeOrientations(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetConeOrientations(petsclib::$UnionPetscLib, dm::PetscDM )\n\tconeOrientations_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetConeOrientations, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{$PetscInt}}),\n               dm, coneOrientations_,\n              )\n\n\tconeOrientations = unsafe_wrap(Array, coneOrientations_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn coneOrientations\nend \n\n\"\"\"\n\tDMPlexSetClosurePermutationTensor(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, section::PetscSection) \nCreate a permutation from the default (BFS) point ordering in the closure, to a\nlexicographic ordering over the tensor product cell (i.e., line, quad, hex, etc.), and set this permutation in the\nsection provided (or the section of the `DM`).\n\nInput Parameters:\n- `dm`      - The `DM`\n- `point`   - Either a cell (highest dim point) or an edge (dim 1 point), or `PETSC_DETERMINE`\n- `section` - The `PetscSection` to reorder, or `NULL` for the default section\n\nExample:\nA typical interpolated single-quad mesh might order points as\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionSetClosurePermutation()`, `DMSetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetClosurePermutationTensor\"))\n\"\"\"\nfunction DMPlexSetClosurePermutationTensor(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, section::PetscSection) end\n\n@for_petsc function DMPlexSetClosurePermutationTensor(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, section::PetscSection )\n\n    @chk ccall(\n               (:DMPlexSetClosurePermutationTensor, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscSection),\n               dm, point, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumPoints::PetscInt = DMPlexGetCompressedClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, point::PetscInt, ornt::PetscInt, points::PetscInt, clSec::PetscSection, clPoints::IS, clp::PetscInt) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCompressedClosure\"))\n\"\"\"\nfunction DMPlexGetCompressedClosure(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, point::PetscInt, ornt::PetscInt, points::PetscInt, clSec::PetscSection, clPoints::IS, clp::PetscInt) end\n\n@for_petsc function DMPlexGetCompressedClosure(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, point::$PetscInt, ornt::$PetscInt, points::$PetscInt, clSec::PetscSection, clPoints::IS, clp::$PetscInt )\n\tnumPoints_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetCompressedClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{PetscSection}, Ptr{CIS}, $PetscInt),\n               dm, section, point, ornt, numPoints_, points, clSec, clPoints, clp,\n              )\n\n\tnumPoints = numPoints_[]\n\n\treturn numPoints\nend \n\n\"\"\"\n\tnumPoints::PetscInt = DMPlexRestoreCompressedClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, point::PetscInt, points::PetscInt, clSec::PetscSection, clPoints::IS, clp::PetscInt) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreCompressedClosure\"))\n\"\"\"\nfunction DMPlexRestoreCompressedClosure(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, point::PetscInt, points::PetscInt, clSec::PetscSection, clPoints::IS, clp::PetscInt) end\n\n@for_petsc function DMPlexRestoreCompressedClosure(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, point::$PetscInt, points::$PetscInt, clSec::PetscSection, clPoints::IS, clp::$PetscInt )\n\tnumPoints_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexRestoreCompressedClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{PetscSection}, Ptr{CIS}, $PetscInt),\n               dm, section, point, numPoints_, points, clSec, clPoints, clp,\n              )\n\n\tnumPoints = numPoints_[]\n\n\treturn numPoints\nend \n\n\"\"\"\n\tcsize::PetscInt,values::Vector{PetscScalar} = DMPlexVecGetOrientedClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, useClPerm::PetscBool, v::PetscVec, point::PetscInt, ornt::PetscInt) \nGet an array of the values on the closure of 'point' with a given orientation, optionally applying the closure permutation.\n\nNot collective\n\nInput Parameters:\n- `dm`        - The `DM`\n- `section`   - The section describing the layout in `v`, or `NULL` to use the default section\n- `useClPerm` - Flag for whether the provided closure permutation should be applied to the values\n- `v`         - The local vector\n- `point`     - The point in the `DM`\n- `ornt`      - The orientation of the cell, an integer giving the prescription for cone traversal. Typically, this will be 0.\n\nInput/Output Parameters:\n- `csize`  - The size of the input values array, or `NULL`; on output the number of values in the closure\n- `values` - An array to use for the values, or *values = `NULL` to have it allocated automatically;\nif the user provided `NULL`, it is a borrowed array and should not be freed, use  `DMPlexVecRestoreClosure()` to return it\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexVecGetClosure()`, `DMPlexGetCellCoordinates()`, `DMPlexVecRestoreClosure()`, `DMPlexVecSetClosure()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexVecGetOrientedClosure\"))\n\"\"\"\nfunction DMPlexVecGetOrientedClosure(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, useClPerm::PetscBool, v::PetscVec, point::PetscInt, ornt::PetscInt) end\n\n@for_petsc function DMPlexVecGetOrientedClosure(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, useClPerm::PetscBool, v::PetscVec, point::$PetscInt, ornt::$PetscInt )\n\tcsize_ = Ref{$PetscInt}()\n\tvalues_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexVecGetOrientedClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscBool, CVec, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               dm, section, useClPerm, v, point, ornt, csize_, values_,\n              )\n\n\tcsize = csize_[]\n\tvalues = unsafe_wrap(Array, values_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn csize,values\nend \n\n\"\"\"\n\tcsize::PetscInt,values::Vector{PetscScalar} = DMPlexVecGetClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt) \nGet an array of the values on the closure of 'point'\n\nNot collective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `section` - The section describing the layout in `v`, or `NULL` to use the default section\n- `v`       - The local vector\n- `point`   - The point in the `DM`\n\nInput/Output Parameters:\n- `csize`  - The size of the input values array, or `NULL`; on output the number of values in the closure\n- `values` - An array to use for the values, or *values = `NULL` to have it allocated automatically;\nif the user provided `NULL`, it is a borrowed array and should not be freed, use  `DMPlexVecRestoreClosure()` to return it\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexVecRestoreClosure()`, `DMPlexVecSetClosure()`, `DMPlexMatSetClosure()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexVecGetClosure\"))\n\"\"\"\nfunction DMPlexVecGetClosure(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt) end\n\n@for_petsc function DMPlexVecGetClosure(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, v::PetscVec, point::$PetscInt )\n\tcsize_ = Ref{$PetscInt}()\n\tvalues_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexVecGetClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, CVec, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               dm, section, v, point, csize_, values_,\n              )\n\n\tcsize = csize_[]\n\tvalues = unsafe_wrap(Array, values_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn csize,values\nend \n\n\"\"\"\n\tDMPlexVecRestoreClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt, csize::PetscInt, values::Vector{PetscScalar}) \nRestore the array of the values on the closure of 'point' obtained with `DMPlexVecGetClosure()`\n\nNot collective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `section` - The section describing the layout in `v`, or `NULL` to use the default section\n- `v`       - The local vector\n- `point`   - The point in the `DM`\n- `csize`   - The number of values in the closure, or `NULL`\n- `values`  - The array of values\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexVecGetClosure()`, `DMPlexVecSetClosure()`, `DMPlexMatSetClosure()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexVecRestoreClosure\"))\n\"\"\"\nfunction DMPlexVecRestoreClosure(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt, csize::PetscInt, values::Vector{PetscScalar}) end\n\n@for_petsc function DMPlexVecRestoreClosure(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, v::PetscVec, point::$PetscInt, csize::$PetscInt, values::Vector{$PetscScalar} )\n\tvalues_ = Ref(pointer(values))\n\n    @chk ccall(\n               (:DMPlexVecRestoreClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, CVec, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               dm, section, v, point, csize, values_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexVecSetClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) \nSet an array of the values on the closure of `point`\n\nNot collective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `section` - The section describing the layout in `v`, or `NULL` to use the default section\n- `v`       - The local vector\n- `point`   - The point in the `DM`\n- `values`  - The array of values\n- `mode`    - The insert mode. One of `INSERT_ALL_VALUES`, `ADD_ALL_VALUES`, `INSERT_VALUES`, `ADD_VALUES`, `INSERT_BC_VALUES`, and `ADD_BC_VALUES`,\nwhere `INSERT_ALL_VALUES` and `ADD_ALL_VALUES` also overwrite boundary conditions.\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexVecGetClosure()`, `DMPlexMatSetClosure()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexVecSetClosure\"))\n\"\"\"\nfunction DMPlexVecSetClosure(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) end\n\n@for_petsc function DMPlexVecSetClosure(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, v::PetscVec, point::$PetscInt, values::Vector{$PetscScalar}, mode::InsertMode )\n\n    @chk ccall(\n               (:DMPlexVecSetClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, CVec, $PetscInt, Ptr{$PetscScalar}, InsertMode),\n               dm, section, v, point, values, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumIndices::PetscInt,indices::Vector{PetscInt},outOffsets::Vector{PetscInt},values::Vector{PetscScalar} = DMPlexGetClosureIndices(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool) \nGets the global dof indices associated with the closure of the given point within the provided sections.\n\nNot collective\n\nInput Parameters:\n- `dm`         - The `DM`\n- `section`    - The `PetscSection` describing the points (a local section)\n- `idxSection` - The `PetscSection` from which to obtain indices (may be local or global)\n- `point`      - The point defining the closure\n- `useClPerm`  - Use the closure point permutation if available\n\nOutput Parameters:\n- `numIndices` - The number of dof indices in the closure of point with the input sections\n- `indices`    - The dof indices\n- `outOffsets` - Array, of length the number of fields plus 1, to write the field offsets into, or `NULL`\n- `values`     - The input values, which may be modified if sign flips are induced by the point symmetries, or `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexRestoreClosureIndices()`, `DMPlexVecGetClosure()`, `DMPlexMatSetClosure()`, `DMGetLocalSection()`,\n`PetscSection`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetClosureIndices\"))\n\"\"\"\nfunction DMPlexGetClosureIndices(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool) end\n\n@for_petsc function DMPlexGetClosureIndices(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::$PetscInt, useClPerm::PetscBool )\n\tnumIndices_ = Ref{$PetscInt}()\n\tindices_ = Ref{Ptr{$PetscInt}}()\n\toutOffsets = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tvalues_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexGetClosureIndices, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSection, $PetscInt, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               dm, section, idxSection, point, useClPerm, numIndices_, indices_, outOffsets, values_,\n              )\n\n\tnumIndices = numIndices_[]\n\tindices = unsafe_wrap(Array, indices_[], VecGetLocalSize(petsclib, x); own = false)\n\tvalues = unsafe_wrap(Array, values_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numIndices,indices,outOffsets,values\nend \n\n\"\"\"\n\tnumIndices::PetscInt,indices::Vector{PetscInt},outOffsets::Vector{PetscInt},values::Vector{PetscScalar} = DMPlexRestoreClosureIndices(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool) \nRestores the global dof indices associated with the closure of the given point within the provided sections.\n\nNot collective\n\nInput Parameters:\n- `dm`         - The `DM`\n- `section`    - The `PetscSection` describing the points (a local section)\n- `idxSection` - The `PetscSection` from which to obtain indices (may be local or global)\n- `point`      - The point defining the closure\n- `useClPerm`  - Use the closure point permutation if available\n\nOutput Parameters:\n- `numIndices` - The number of dof indices in the closure of point with the input sections\n- `indices`    - The dof indices\n- `outOffsets` - Array to write the field offsets into, or `NULL`\n- `values`     - The input values, which may be modified if sign flips are induced by the point symmetries, or `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetClosureIndices()`, `DMPlexVecGetClosure()`, `DMPlexMatSetClosure()`, `DMGetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreClosureIndices\"))\n\"\"\"\nfunction DMPlexRestoreClosureIndices(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool) end\n\n@for_petsc function DMPlexRestoreClosureIndices(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::$PetscInt, useClPerm::PetscBool )\n\tnumIndices_ = Ref{$PetscInt}()\n\tindices_ = Ref{Ptr{$PetscInt}}()\n\toutOffsets = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tvalues_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexRestoreClosureIndices, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSection, $PetscInt, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               dm, section, idxSection, point, useClPerm, numIndices_, indices_, outOffsets, values_,\n              )\n\n\tnumIndices = numIndices_[]\n\tindices = unsafe_wrap(Array, indices_[], VecGetLocalSize(petsclib, x); own = false)\n\tvalues = unsafe_wrap(Array, values_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numIndices,indices,outOffsets,values\nend \n\n\"\"\"\n\tDMPlexMatSetClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, globalSection::PetscSection, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) \nSet an array of the values on the closure of 'point'\n\nNot collective\n\nInput Parameters:\n- `dm`            - The `DM`\n- `section`       - The section describing the layout in `v`, or `NULL` to use the default section\n- `globalSection` - The section describing the layout in `v`, or `NULL` to use the default global section\n- `A`             - The matrix\n- `point`         - The point in the `DM`\n- `values`        - The array of values\n- `mode`          - The insert mode, where `INSERT_ALL_VALUES` and `ADD_ALL_VALUES` also overwrite boundary conditions\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexMatSetClosureGeneral()`, `DMPlexVecGetClosure()`, `DMPlexVecSetClosure()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMatSetClosure\"))\n\"\"\"\nfunction DMPlexMatSetClosure(petsclib::PetscLibType, dm::PetscDM, section::PetscSection, globalSection::PetscSection, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) end\n\n@for_petsc function DMPlexMatSetClosure(petsclib::$UnionPetscLib, dm::PetscDM, section::PetscSection, globalSection::PetscSection, A::PetscMat, point::$PetscInt, values::Vector{$PetscScalar}, mode::InsertMode )\n\n    @chk ccall(\n               (:DMPlexMatSetClosure, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSection, CMat, $PetscInt, Ptr{$PetscScalar}, InsertMode),\n               dm, section, globalSection, A, point, values, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMatSetClosureGeneral(petsclib::PetscLibType,dmRow::PetscDM, sectionRow::PetscSection, globalSectionRow::PetscSection, useRowPerm::PetscBool, dmCol::PetscDM, sectionCol::PetscSection, globalSectionCol::PetscSection, useColPerm::PetscBool, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) \nSet an array of the values on the closure of 'point' using a different row and column section\n\nNot collective\n\nInput Parameters:\n- `dmRow`            - The `DM` for the row fields\n- `sectionRow`       - The section describing the layout, or `NULL` to use the default section in `dmRow`\n- `useRowPerm`       - The flag to use the closure permutation of the `dmRow` if available\n- `globalSectionRow` - The section describing the layout, or `NULL` to use the default global section in `dmRow`\n- `dmCol`            - The `DM` for the column fields\n- `sectionCol`       - The section describing the layout, or `NULL` to use the default section in `dmCol`\n- `useColPerm`       - The flag to use the closure permutation of the `dmCol` if available\n- `globalSectionCol` - The section describing the layout, or `NULL` to use the default global section in `dmCol`\n- `A`                - The matrix\n- `point`            - The point in the `DM`\n- `values`           - The array of values\n- `mode`             - The insert mode, where `INSERT_ALL_VALUES` and `ADD_ALL_VALUES` also overwrite boundary conditions\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexMatSetClosure()`, `DMPlexVecGetClosure()`, `DMPlexVecSetClosure()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMatSetClosureGeneral\"))\n\"\"\"\nfunction DMPlexMatSetClosureGeneral(petsclib::PetscLibType, dmRow::PetscDM, sectionRow::PetscSection, globalSectionRow::PetscSection, useRowPerm::PetscBool, dmCol::PetscDM, sectionCol::PetscSection, globalSectionCol::PetscSection, useColPerm::PetscBool, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) end\n\n@for_petsc function DMPlexMatSetClosureGeneral(petsclib::$UnionPetscLib, dmRow::PetscDM, sectionRow::PetscSection, globalSectionRow::PetscSection, useRowPerm::PetscBool, dmCol::PetscDM, sectionCol::PetscSection, globalSectionCol::PetscSection, useColPerm::PetscBool, A::PetscMat, point::$PetscInt, values::Vector{$PetscScalar}, mode::InsertMode )\n\n    @chk ccall(\n               (:DMPlexMatSetClosureGeneral, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSection, PetscBool, CDM, PetscSection, PetscSection, PetscBool, CMat, $PetscInt, Ptr{$PetscScalar}, InsertMode),\n               dmRow, sectionRow, globalSectionRow, useRowPerm, dmCol, sectionCol, globalSectionCol, useColPerm, A, point, values, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMatSetClosureRefined(petsclib::PetscLibType,dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMatSetClosureRefined\"))\n\"\"\"\nfunction DMPlexMatSetClosureRefined(petsclib::PetscLibType, dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) end\n\n@for_petsc function DMPlexMatSetClosureRefined(petsclib::$UnionPetscLib, dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, A::PetscMat, point::$PetscInt, values::Vector{$PetscScalar}, mode::InsertMode )\n\n    @chk ccall(\n               (:DMPlexMatSetClosureRefined, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSection, CDM, PetscSection, PetscSection, CMat, $PetscInt, Ptr{$PetscScalar}, InsertMode),\n               dmf, fsection, globalFSection, dmc, csection, globalCSection, A, point, values, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMatGetClosureIndicesRefined(petsclib::PetscLibType,dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, point::PetscInt, cindices::Vector{PetscInt}, findices::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMatGetClosureIndicesRefined\"))\n\"\"\"\nfunction DMPlexMatGetClosureIndicesRefined(petsclib::PetscLibType, dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, point::PetscInt, cindices::Vector{PetscInt}, findices::Vector{PetscInt}) end\n\n@for_petsc function DMPlexMatGetClosureIndicesRefined(petsclib::$UnionPetscLib, dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, point::$PetscInt, cindices::Vector{$PetscInt}, findices::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexMatGetClosureIndicesRefined, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, PetscSection, CDM, PetscSection, PetscSection, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dmf, fsection, globalFSection, dmc, csection, globalCSection, point, cindices, findices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcellHeight::PetscInt = DMPlexGetVTKCellHeight(petsclib::PetscLibType,dm::PetscDM) \nReturns the height in the DAG used to determine which points are cells (normally 0)\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `cellHeight` - The height of a cell\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetVTKCellHeight()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetVTKCellHeight\"))\n\"\"\"\nfunction DMPlexGetVTKCellHeight(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetVTKCellHeight(petsclib::$UnionPetscLib, dm::PetscDM )\n\tcellHeight_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetVTKCellHeight, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, cellHeight_,\n              )\n\n\tcellHeight = cellHeight_[]\n\n\treturn cellHeight\nend \n\n\"\"\"\n\tDMPlexSetVTKCellHeight(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt) \nSets the height in the DAG used to determine which points are cells (normally 0)\n\nInput Parameters:\n- `dm`         - The `DMPLEX` object\n- `cellHeight` - The height of a cell\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetVTKCellHeight()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetVTKCellHeight\"))\n\"\"\"\nfunction DMPlexSetVTKCellHeight(petsclib::PetscLibType, dm::PetscDM, cellHeight::PetscInt) end\n\n@for_petsc function DMPlexSetVTKCellHeight(petsclib::$UnionPetscLib, dm::PetscDM, cellHeight::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexSetVTKCellHeight, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, cellHeight,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexGetCellTypeStratum(petsclib::PetscLibType,dm::PetscDM, ct::DMPolytopeType) \nGet the range of cells of a given celltype\n\nInput Parameters:\n- `dm` - The `DMPLEX` object\n- `ct` - The `DMPolytopeType` of the cell\n\nOutput Parameters:\n- `start` - The first cell of this type, or `NULL`\n- `end`   - The upper bound on this celltype, or `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexConstructGhostCells()`, `DMPlexGetDepthStratum()`, `DMPlexGetHeightStratum()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCellTypeStratum\"))\n\"\"\"\nfunction DMPlexGetCellTypeStratum(petsclib::PetscLibType, dm::PetscDM, ct::DMPolytopeType) end\n\n@for_petsc function DMPlexGetCellTypeStratum(petsclib::$UnionPetscLib, dm::PetscDM, ct::DMPolytopeType )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetCellTypeStratum, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMPolytopeType, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, ct, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tgsize::PetscInt = DMPlexGetDepthStratumGlobalSize(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt) \nGet the global size for a given depth stratum\n\nInput Parameters:\n- `dm`    - The `DMPLEX` object\n- `depth` - The depth for the given point stratum\n\nOutput Parameter:\n- `gsize` - The global number of points in the stratum\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellNumbering()`, `DMPlexGetVertexNumbering()`, `DMPlexGetDepthStratum()`, `DMPlexGetHeightStratum()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetDepthStratumGlobalSize\"))\n\"\"\"\nfunction DMPlexGetDepthStratumGlobalSize(petsclib::PetscLibType, dm::PetscDM, depth::PetscInt) end\n\n@for_petsc function DMPlexGetDepthStratumGlobalSize(petsclib::$UnionPetscLib, dm::PetscDM, depth::$PetscInt )\n\tgsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetDepthStratumGlobalSize, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, depth, gsize_,\n              )\n\n\tgsize = gsize_[]\n\n\treturn gsize\nend \n\n\"\"\"\n\tglobalCellNumbers::IS = DMPlexCreateCellNumbering(petsclib::PetscLibType,dm::PetscDM, includeAll::PetscBool) \nGet a global cell numbering for all cells on this process\n\nInput Parameters:\n- `dm`         - The `DMPLEX` object\n- `includeAll` - Whether to include all cells, or just the simplex and box cells\n\nOutput Parameter:\n- `globalCellNumbers` - Global cell numbers for all cells on this process\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellNumbering()`, `DMPlexGetVertexNumbering()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateCellNumbering\"))\n\"\"\"\nfunction DMPlexCreateCellNumbering(petsclib::PetscLibType, dm::PetscDM, includeAll::PetscBool) end\n\n@for_petsc function DMPlexCreateCellNumbering(petsclib::$UnionPetscLib, dm::PetscDM, includeAll::PetscBool )\n\tglobalCellNumbers_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMPlexCreateCellNumbering, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, Ptr{CIS}),\n               dm, includeAll, globalCellNumbers_,\n              )\n\n\tglobalCellNumbers = globalCellNumbers_[]\n\n\treturn globalCellNumbers\nend \n\n\"\"\"\n\tDMPlexGetCellNumbering(petsclib::PetscLibType,dm::PetscDM, globalCellNumbers::IS) \nGet a global cell numbering for all cells on this process\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `globalCellNumbers` - Global cell numbers for all cells on this process\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateCellNumbering()`, `DMPlexGetVertexNumbering()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCellNumbering\"))\n\"\"\"\nfunction DMPlexGetCellNumbering(petsclib::PetscLibType, dm::PetscDM, globalCellNumbers::IS) end\n\n@for_petsc function DMPlexGetCellNumbering(petsclib::$UnionPetscLib, dm::PetscDM, globalCellNumbers::IS )\n\n    @chk ccall(\n               (:DMPlexGetCellNumbering, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, globalCellNumbers,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetVertexNumbering(petsclib::PetscLibType,dm::PetscDM, globalVertexNumbers::IS) \nGet a global vertex numbering for all vertices on this process\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `globalVertexNumbers` - Global vertex numbers for all vertices on this process\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellNumbering()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetVertexNumbering\"))\n\"\"\"\nfunction DMPlexGetVertexNumbering(petsclib::PetscLibType, dm::PetscDM, globalVertexNumbers::IS) end\n\n@for_petsc function DMPlexGetVertexNumbering(petsclib::$UnionPetscLib, dm::PetscDM, globalVertexNumbers::IS )\n\n    @chk ccall(\n               (:DMPlexGetVertexNumbering, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, globalVertexNumbers,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tglobalPointNumbers::IS = DMPlexCreatePointNumbering(petsclib::PetscLibType,dm::PetscDM) \nCreate a global numbering for all points.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `globalPointNumbers` - Global numbers for all points on this process\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellNumbering()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreatePointNumbering\"))\n\"\"\"\nfunction DMPlexCreatePointNumbering(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCreatePointNumbering(petsclib::$UnionPetscLib, dm::PetscDM )\n\tglobalPointNumbers_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMPlexCreatePointNumbering, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, globalPointNumbers_,\n              )\n\n\tglobalPointNumbers = globalPointNumbers_[]\n\n\treturn globalPointNumbers\nend \n\n\"\"\"\n\tglobalEdgeNumbers::IS = DMPlexCreateEdgeNumbering(petsclib::PetscLibType,dm::PetscDM) \nCreate a global numbering for edges.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `globalEdgeNumbers` - Global numbers for all edges on this process\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellNumbering()`, `DMPlexGetVertexNumbering()`, `DMPlexCreatePointNumbering()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateEdgeNumbering\"))\n\"\"\"\nfunction DMPlexCreateEdgeNumbering(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCreateEdgeNumbering(petsclib::$UnionPetscLib, dm::PetscDM )\n\tglobalEdgeNumbers_ = Ref{IS}()\n\n    @chk ccall(\n               (:DMPlexCreateEdgeNumbering, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, globalEdgeNumbers_,\n              )\n\n\tglobalEdgeNumbers = globalEdgeNumbers_[]\n\n\treturn globalEdgeNumbers\nend \n\n\"\"\"\n\tranks::PetscVec = DMPlexCreateRankField(petsclib::PetscLibType,dm::PetscDM) \nCreate a cell field whose value is the rank of the owner\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `ranks` - The rank field\n\nOptions Database Key:\n- `-dm_partition_view` - Adds the rank field into the `DM` output from `-dm_view` using the same viewer\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMView()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateRankField\"))\n\"\"\"\nfunction DMPlexCreateRankField(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCreateRankField(petsclib::$UnionPetscLib, dm::PetscDM )\n\tranks_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMPlexCreateRankField, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}),\n               dm, ranks_,\n              )\n\n\tranks = PetscVec(ranks_[], petsclib)\n\n\treturn ranks\nend \n\n\"\"\"\n\tval::PetscVec = DMPlexCreateLabelField(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nCreate a field whose value is the label value for that point\n\nInput Parameters:\n- `dm`    - The `DMPLEX`\n- `label` - The `DMLabel`\n\nOutput Parameter:\n- `val` - The label value field\n\nOptions Database Key:\n- `-dm_label_view` - Adds the label value field into the `DM` output from `-dm_view` using the same viewer\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMView()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateLabelField\"))\n\"\"\"\nfunction DMPlexCreateLabelField(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexCreateLabelField(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\tval_ = Ref{CVec}()\n\n    @chk ccall(\n               (:DMPlexCreateLabelField, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, Ptr{CVec}),\n               dm, label, val_,\n              )\n\n\tval = PetscVec(val_[], petsclib)\n\n\treturn val\nend \n\n\"\"\"\n\tDMPlexCheckSymmetry(petsclib::PetscLibType,dm::PetscDM) \nCheck that the adjacency information in the mesh is symmetric.\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckSymmetry\"))\n\"\"\"\nfunction DMPlexCheckSymmetry(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCheckSymmetry(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexCheckSymmetry, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCheckSkeleton(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt) \nCheck that each cell has the correct number of vertices\n\nInput Parameters:\n- `dm`         - The `DMPLEX` object\n- `cellHeight` - Normally 0\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckSkeleton\"))\n\"\"\"\nfunction DMPlexCheckSkeleton(petsclib::PetscLibType, dm::PetscDM, cellHeight::PetscInt) end\n\n@for_petsc function DMPlexCheckSkeleton(petsclib::$UnionPetscLib, dm::PetscDM, cellHeight::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexCheckSkeleton, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, cellHeight,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCheckFaces(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt) \nCheck that the faces of each cell give a vertex order this is consistent with what we expect from the cell type\n\nCollective\n\nInput Parameters:\n- `dm`         - The `DMPLEX` object\n- `cellHeight` - Normally 0\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMPlexGetVTKCellHeight()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckFaces\"))\n\"\"\"\nfunction DMPlexCheckFaces(petsclib::PetscLibType, dm::PetscDM, cellHeight::PetscInt) end\n\n@for_petsc function DMPlexCheckFaces(petsclib::$UnionPetscLib, dm::PetscDM, cellHeight::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexCheckFaces, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, cellHeight,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCheckGeometry(petsclib::PetscLibType,dm::PetscDM) \nCheck the geometry of mesh cells\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckGeometry\"))\n\"\"\"\nfunction DMPlexCheckGeometry(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCheckGeometry(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexCheckGeometry, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCheckPointSF(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF, allowExtraRoots::PetscBool) \nCheck that several necessary conditions are met for the point `PetscSF` of this plex.\n\nCollective\n\nInput Parameters:\n- `dm`              - The `DMPLEX` object\n- `pointSF`         - The `PetscSF`, or `NULL` for `PointSF` attached to `DM`\n- `allowExtraRoots` - Flag to allow extra points not present in the `DM`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetPointSF()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckPointSF\"))\n\"\"\"\nfunction DMPlexCheckPointSF(petsclib::PetscLibType, dm::PetscDM, pointSF::PetscSF, allowExtraRoots::PetscBool) end\n\n@for_petsc function DMPlexCheckPointSF(petsclib::$UnionPetscLib, dm::PetscDM, pointSF::PetscSF, allowExtraRoots::PetscBool )\n\n    @chk ccall(\n               (:DMPlexCheckPointSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, PetscBool),\n               dm, pointSF, allowExtraRoots,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCheckOrphanVertices(petsclib::PetscLibType,dm::PetscDM) \nCheck that no vertices are disconnected from the mesh, unless the mesh only consists of disconnected vertices.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCheck()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckOrphanVertices\"))\n\"\"\"\nfunction DMPlexCheckOrphanVertices(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCheckOrphanVertices(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexCheckOrphanVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCheck(petsclib::PetscLibType,dm::PetscDM) \nPerform various checks of `DMPLEX` sanity\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheck\"))\n\"\"\"\nfunction DMPlexCheck(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCheck(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexCheck, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCheckCellShape(petsclib::PetscLibType,dm::PetscDM, output::PetscBool, condLimit::PetscReal) \nChecks the Jacobian of the mapping from reference to real cells and computes some minimal statistics.\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DMPLEX` object\n- `output`    - If true, statistics will be displayed on `stdout`\n- `condLimit` - Display all cells above this condition number, or `PETSC_DETERMINE` for no cell output\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMSetFromOptions()`, `DMPlexComputeOrthogonalQuality()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckCellShape\"))\n\"\"\"\nfunction DMPlexCheckCellShape(petsclib::PetscLibType, dm::PetscDM, output::PetscBool, condLimit::PetscReal) end\n\n@for_petsc function DMPlexCheckCellShape(petsclib::$UnionPetscLib, dm::PetscDM, output::PetscBool, condLimit::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexCheckCellShape, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, $PetscReal),\n               dm, output, condLimit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeOrthogonalQuality(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, atol::PetscReal, OrthQual::PetscVec, OrthQualLabel::DMLabel) \nCompute cell\northogonal quality below given tolerance.\n\nCollective\n\nInput Parameters:\n- `dm`   - The `DMPLEX` object\n- `fv`   - Optional `PetscFV` object for pre-computed cell/face centroid information\n- `atol` - [0, 1] Absolute tolerance for tagging cells.\n\nOutput Parameters:\n- `OrthQual`      - `Vec` containing orthogonal quality per cell\n- `OrthQualLabel` - `DMLabel` tagging cells below atol with `DM_ADAPT_REFINE`\n\nOptions Database Keys:\n- `-dm_plex_orthogonal_quality_label_view` - view OrthQualLabel if label is requested. Currently only `PETSCVIEWERASCII` is supported.\n- `-dm_plex_orthogonal_quality_vec_view`   - view OrthQual vector.\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCheckCellShape()`, `DMCreateLabel()`, `PetscFV`, `DMLabel`, `Vec`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeOrthogonalQuality\"))\n\"\"\"\nfunction DMPlexComputeOrthogonalQuality(petsclib::PetscLibType, dm::PetscDM, fv::PetscFV, atol::PetscReal, OrthQual::PetscVec, OrthQualLabel::DMLabel) end\n\n@for_petsc function DMPlexComputeOrthogonalQuality(petsclib::$UnionPetscLib, dm::PetscDM, fv::PetscFV, atol::$PetscReal, OrthQual::PetscVec, OrthQualLabel::DMLabel )\n\tOrthQual_ = Ref(OrthQual.ptr)\n\n    @chk ccall(\n               (:DMPlexComputeOrthogonalQuality, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFV, $PetscReal, Ptr{CVec}, Ptr{DMLabel}),\n               dm, fv, atol, OrthQual_, OrthQualLabel,\n              )\n\n\tOrthQual.ptr = OrthQual_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tregular::PetscBool = DMPlexGetRegularRefinement(petsclib::PetscLibType,dm::PetscDM) \nGet the flag indicating that this mesh was obtained by regular refinement from its coarse mesh\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `regular` - The flag\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetRegularRefinement()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetRegularRefinement\"))\n\"\"\"\nfunction DMPlexGetRegularRefinement(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetRegularRefinement(petsclib::$UnionPetscLib, dm::PetscDM )\n\tregular_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetRegularRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, regular_,\n              )\n\n\tregular = regular_[]\n\n\treturn regular\nend \n\n\"\"\"\n\tDMPlexSetRegularRefinement(petsclib::PetscLibType,dm::PetscDM, regular::PetscBool) \nSet the flag indicating that this mesh was obtained by regular refinement from its coarse mesh\n\nInput Parameters:\n- `dm`      - The `DMPLEX` object\n- `regular` - The flag\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetRegularRefinement()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetRegularRefinement\"))\n\"\"\"\nfunction DMPlexSetRegularRefinement(petsclib::PetscLibType, dm::PetscDM, regular::PetscBool) end\n\n@for_petsc function DMPlexSetRegularRefinement(petsclib::$UnionPetscLib, dm::PetscDM, regular::PetscBool )\n\n    @chk ccall(\n               (:DMPlexSetRegularRefinement, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, regular,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetAnchors(petsclib::PetscLibType,dm::PetscDM, anchorSection::PetscSection, anchorIS::IS) \nGet the layout of the anchor (point\ncall DMPlexGetAnchors() directly: if there are anchors, then `DMPlexGetAnchors()` is called during `DMGetDefaultConstraints()`.\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameters:\n- `anchorSection` - If not `NULL`, set to the section describing which points anchor the constrained points.\n- `anchorIS`      - If not `NULL`, set to the list of anchors indexed by `anchorSection`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetAnchors()`, `DMGetDefaultConstraints()`, `DMSetDefaultConstraints()`, `IS`, `PetscSection`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetAnchors\"))\n\"\"\"\nfunction DMPlexGetAnchors(petsclib::PetscLibType, dm::PetscDM, anchorSection::PetscSection, anchorIS::IS) end\n\n@for_petsc function DMPlexGetAnchors(petsclib::$UnionPetscLib, dm::PetscDM, anchorSection::PetscSection, anchorIS::IS )\n\n    @chk ccall(\n               (:DMPlexGetAnchors, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}, Ptr{CIS}),\n               dm, anchorSection, anchorIS,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetAnchors(petsclib::PetscLibType,dm::PetscDM, anchorSection::PetscSection, anchorIS::IS) \nSet the layout of the local anchor (point\n\nCollective\n\nInput Parameters:\n- `dm`            - The `DMPLEX` object\n- `anchorSection` - The section that describes the mapping from constrained points to the anchor points listed in anchorIS.\nMust have a local communicator (`PETSC_COMM_SELF` or derivative).\n- `anchorIS`      - The list of all anchor points.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetAnchors()`, `DMGetDefaultConstraints()`, `DMSetDefaultConstraints()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetAnchors\"))\n\"\"\"\nfunction DMPlexSetAnchors(petsclib::PetscLibType, dm::PetscDM, anchorSection::PetscSection, anchorIS::CIS) end\n\n@for_petsc function DMPlexSetAnchors(petsclib::$UnionPetscLib, dm::PetscDM, anchorSection::PetscSection, anchorIS::IS )\n\n    @chk ccall(\n               (:DMPlexSetAnchors, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, CIS),\n               dm, anchorSection, anchorIS,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexMonitorThroughput(petsclib::PetscLibType,dm::PetscDM, dummy::Cvoid) \nReport the cell throughput of FE integration\n\nInput Parameters:\n- `dm`    - The `DM`\n- `dummy` - unused argument\n\nOptions Database Key:\n- `-dm_plex_monitor_throughput` - Activate the monitor\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMSetFromOptions()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMonitorThroughput\"))\n\"\"\"\nfunction DMPlexMonitorThroughput(petsclib::PetscLibType, dm::PetscDM, dummy::Cvoid) end\n\n@for_petsc function DMPlexMonitorThroughput(petsclib::$UnionPetscLib, dm::PetscDM, dummy::Cvoid )\n\n    @chk ccall(\n               (:DMPlexMonitorThroughput, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cvoid}),\n               dm, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetAdjacencyUser(petsclib::PetscLibType,dm::PetscDM, user::external, ctx::Cvoid) \nDefine adjacency in the mesh using a user\n\nInput Parameters:\n- `dm`   - The DM object\n- `user` - The user callback, may be `NULL` (to clear the callback)\n- `ctx`  - context for callback evaluation, may be `NULL`\n\nLevel: advanced\n\n-seealso: `DMPLEX`, `DMSetAdjacency()`, `DMPlexDistribute()`, `DMPlexPreallocateOperator()`, `DMPlexGetAdjacency()`, `DMPlexGetAdjacencyUser()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetAdjacencyUser\"))\n\"\"\"\nfunction DMPlexSetAdjacencyUser(petsclib::PetscLibType, dm::PetscDM, user::external, ctx::Cvoid) end\n\n@for_petsc function DMPlexSetAdjacencyUser(petsclib::$UnionPetscLib, dm::PetscDM, user::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMPlexSetAdjacencyUser, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, user, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetAdjacencyUseAnchors(petsclib::PetscLibType,dm::PetscDM, useAnchors::PetscBool) \nDefine adjacency in the mesh using the point\n\nInput Parameters:\n- `dm`         - The `DM` object\n- `useAnchors` - Flag to use the constraints.  If PETSC_TRUE, then constrained points are omitted from DMPlexGetAdjacency(), and their anchor points appear in their place.\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMGetAdjacency()`, `DMSetAdjacency()`, `DMPlexDistribute()`, `DMPlexPreallocateOperator()`, `DMPlexSetAnchors()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetAdjacencyUseAnchors\"))\n\"\"\"\nfunction DMPlexSetAdjacencyUseAnchors(petsclib::PetscLibType, dm::PetscDM, useAnchors::PetscBool) end\n\n@for_petsc function DMPlexSetAdjacencyUseAnchors(petsclib::$UnionPetscLib, dm::PetscDM, useAnchors::PetscBool )\n\n    @chk ccall(\n               (:DMPlexSetAdjacencyUseAnchors, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, useAnchors,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuseAnchors::PetscBool = DMPlexGetAdjacencyUseAnchors(petsclib::PetscLibType,dm::PetscDM) \nQuery whether adjacency in the mesh uses the point\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `useAnchors` - Flag to use the closure.  If PETSC_TRUE, then constrained points are omitted from DMPlexGetAdjacency(), and their anchor points appear in their place.\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexSetAdjacencyUseAnchors()`, `DMSetAdjacency()`, `DMGetAdjacency()`, `DMPlexDistribute()`, `DMPlexPreallocateOperator()`, `DMPlexSetAnchors()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetAdjacencyUseAnchors\"))\n\"\"\"\nfunction DMPlexGetAdjacencyUseAnchors(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetAdjacencyUseAnchors(petsclib::$UnionPetscLib, dm::PetscDM )\n\tuseAnchors_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetAdjacencyUseAnchors, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, useAnchors_,\n              )\n\n\tuseAnchors = useAnchors_[]\n\n\treturn useAnchors\nend \n\n\"\"\"\n\tadjSize::PetscInt,adj::Vector{PetscInt} = DMPlexGetAdjacency(petsclib::PetscLibType,dm::PetscDM, p::PetscInt) \nReturn all points adjacent to the given point\n\nInput Parameters:\n- `dm` - The `DM` object\n- `p`  - The point\n\nInput/Output Parameters:\n- `adjSize` - The maximum size of `adj` if it is non-`NULL`, or `PETSC_DETERMINE`;\non output the number of adjacent points\n- `adj`     - Either `NULL` so that the array is allocated, or an existing array with size `adjSize`;\non output contains the adjacent points\n\nLevel: advanced\n\n-seealso: `DMPLEX`, `DMSetAdjacency()`, `DMPlexDistribute()`, `DMCreateMatrix()`, `DMPlexPreallocateOperator()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetAdjacency\"))\n\"\"\"\nfunction DMPlexGetAdjacency(petsclib::PetscLibType, dm::PetscDM, p::PetscInt) end\n\n@for_petsc function DMPlexGetAdjacency(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt )\n\tadjSize_ = Ref{$PetscInt}()\n\tadj_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetAdjacency, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, p, adjSize_, adj_,\n              )\n\n\tadjSize = adjSize_[]\n\tadj = unsafe_wrap(Array, adj_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn adjSize,adj\nend \n\n\"\"\"\n\tprocessRanks::IS,sfProcess::PetscSF = DMPlexCreateTwoSidedProcessSF(petsclib::PetscLibType,dm::PetscDM, sfPoint::PetscSF, rootRankSection::PetscSection, rootRanks::IS, leafRankSection::PetscSection, leafRanks::IS) \nCreate an `PetscSF` which just has process connectivity\n\nCollective\n\nInput Parameters:\n- `dm`              - The `DM`\n- `sfPoint`         - The `PetscSF` which encodes point connectivity\n- `rootRankSection` - to be documented\n- `rootRanks`       - to be documented\n- `leafRankSection` - to be documented\n- `leafRanks`       - to be documented\n\nOutput Parameters:\n- `processRanks` - A list of process neighbors, or `NULL`\n- `sfProcess`    - An `PetscSF` encoding the two-sided process connectivity, or `NULL`\n\nLevel: developer\n\n-seealso: `DMPLEX`, `PetscSFCreate()`, `DMPlexCreateProcessSF()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateTwoSidedProcessSF\"))\n\"\"\"\nfunction DMPlexCreateTwoSidedProcessSF(petsclib::PetscLibType, dm::PetscDM, sfPoint::PetscSF, rootRankSection::PetscSection, rootRanks::IS, leafRankSection::PetscSection, leafRanks::IS) end\n\n@for_petsc function DMPlexCreateTwoSidedProcessSF(petsclib::$UnionPetscLib, dm::PetscDM, sfPoint::PetscSF, rootRankSection::PetscSection, rootRanks::IS, leafRankSection::PetscSection, leafRanks::IS )\n\tprocessRanks_ = Ref{IS}()\n\tsfProcess_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:DMPlexCreateTwoSidedProcessSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, PetscSection, CIS, PetscSection, CIS, Ptr{CIS}, Ptr{PetscSF}),\n               dm, sfPoint, rootRankSection, rootRanks, leafRankSection, leafRanks, processRanks_, sfProcess_,\n              )\n\n\tprocessRanks = processRanks_[]\n\tsfProcess = sfProcess_[]\n\n\treturn processRanks,sfProcess\nend \n\n\"\"\"\n\tDMPlexDistributeOwnership(petsclib::PetscLibType,dm::PetscDM, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS) \nCompute owner information for shared points. This basically gets two\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `rootSection` - The number of leaves for a given root point\n- `rootrank`    - The rank of each edge into the root point\n- `leafSection` - The number of processes sharing a given leaf point\n- `leafrank`    - The rank of each process sharing a leaf point\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexCreateOverlapLabel()`, `DMPlexDistribute()`, `DMPlexDistributeOverlap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributeOwnership\"))\n\"\"\"\nfunction DMPlexDistributeOwnership(petsclib::PetscLibType, dm::PetscDM, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS) end\n\n@for_petsc function DMPlexDistributeOwnership(petsclib::$UnionPetscLib, dm::PetscDM, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS )\n\n    @chk ccall(\n               (:DMPlexDistributeOwnership, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, Ptr{CIS}, PetscSection, Ptr{CIS}),\n               dm, rootSection, rootrank, leafSection, leafrank,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tovLabel::DMLabel = DMPlexCreateOverlapLabel(petsclib::PetscLibType,dm::PetscDM, levels::PetscInt, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS) \nCompute a label indicating what overlap points should be sent to new processes\n\nCollective\n\nInput Parameters:\n- `dm`          - The `DM`\n- `levels`      - Number of overlap levels\n- `rootSection` - The number of leaves for a given root point\n- `rootrank`    - The rank of each edge into the root point\n- `leafSection` - The number of processes sharing a given leaf point\n- `leafrank`    - The rank of each process sharing a leaf point\n\nOutput Parameter:\n- `ovLabel` - `DMLabel` containing remote overlap contributions as point/rank pairings\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexCreateOverlapLabelFromLabels()`, `DMPlexGetAdjacency()`, `DMPlexDistributeOwnership()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateOverlapLabel\"))\n\"\"\"\nfunction DMPlexCreateOverlapLabel(petsclib::PetscLibType, dm::PetscDM, levels::PetscInt, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS) end\n\n@for_petsc function DMPlexCreateOverlapLabel(petsclib::$UnionPetscLib, dm::PetscDM, levels::$PetscInt, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS )\n\tovLabel_ = Ref{DMLabel}()\n\n    @chk ccall(\n               (:DMPlexCreateOverlapLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscSection, CIS, PetscSection, CIS, Ptr{DMLabel}),\n               dm, levels, rootSection, rootrank, leafSection, leafrank, ovLabel_,\n              )\n\n\tovLabel = ovLabel_[]\n\n\treturn ovLabel\nend \n\n\"\"\"\n\tovLabel::DMLabel = DMPlexCreateOverlapLabelFromLabels(petsclib::PetscLibType,dm::PetscDM, numLabels::PetscInt, label::Vector{DMLabel}, value::Vector{PetscInt}, numExLabels::PetscInt, exLabel::Vector{DMLabel}, exValue::Vector{PetscInt}, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS) \nCompute a label indicating what overlap points should be sent to new processes\n\nCollective\n\nInput Parameters:\n- `dm`          - The `DM`\n- `numLabels`   - The number of labels to draw candidate points from\n- `label`       - An array of labels containing candidate points\n- `value`       - An array of label values marking the candidate points\n- `numExLabels` - The number of labels to use for exclusion\n- `exLabel`     - An array of labels indicating points to be excluded, or `NULL`\n- `exValue`     - An array of label values to be excluded, or `NULL`\n- `rootSection` - The number of leaves for a given root point\n- `rootrank`    - The rank of each edge into the root point\n- `leafSection` - The number of processes sharing a given leaf point\n- `leafrank`    - The rank of each process sharing a leaf point\n\nOutput Parameter:\n- `ovLabel` - `DMLabel` containing remote overlap contributions as point/rank pairings\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexCreateOverlapLabel()`, `DMPlexGetAdjacency()`, `DMPlexDistributeOwnership()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateOverlapLabelFromLabels\"))\n\"\"\"\nfunction DMPlexCreateOverlapLabelFromLabels(petsclib::PetscLibType, dm::PetscDM, numLabels::PetscInt, label::Vector{DMLabel}, value::Vector{PetscInt}, numExLabels::PetscInt, exLabel::Vector{DMLabel}, exValue::Vector{PetscInt}, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS) end\n\n@for_petsc function DMPlexCreateOverlapLabelFromLabels(petsclib::$UnionPetscLib, dm::PetscDM, numLabels::$PetscInt, label::Vector{DMLabel}, value::Vector{$PetscInt}, numExLabels::$PetscInt, exLabel::Vector{DMLabel}, exValue::Vector{$PetscInt}, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS )\n\tovLabel_ = Ref{DMLabel}()\n\n    @chk ccall(\n               (:DMPlexCreateOverlapLabelFromLabels, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{DMLabel}, Ptr{$PetscInt}, $PetscInt, Ptr{DMLabel}, Ptr{$PetscInt}, PetscSection, CIS, PetscSection, CIS, Ptr{DMLabel}),\n               dm, numLabels, label, value, numExLabels, exLabel, exValue, rootSection, rootrank, leafSection, leafrank, ovLabel_,\n              )\n\n\tovLabel = ovLabel_[]\n\n\treturn ovLabel\nend \n\n\"\"\"\n\tmigrationSF::PetscSF = DMPlexCreateOverlapMigrationSF(petsclib::PetscLibType,dm::PetscDM, overlapSF::PetscSF) \nCreate a `PetscSF` describing the new mesh distribution to make the overlap described by the input `PetscSF`\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DM`\n- `overlapSF` - The `PetscSF` mapping ghost points in overlap to owner points on other processes\n\nOutput Parameter:\n- `migrationSF` - A `PetscSF` that maps original points in old locations to points in new locations\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexCreateOverlapLabel()`, `DMPlexDistributeOverlap()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateOverlapMigrationSF\"))\n\"\"\"\nfunction DMPlexCreateOverlapMigrationSF(petsclib::PetscLibType, dm::PetscDM, overlapSF::PetscSF) end\n\n@for_petsc function DMPlexCreateOverlapMigrationSF(petsclib::$UnionPetscLib, dm::PetscDM, overlapSF::PetscSF )\n\tmigrationSF_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:DMPlexCreateOverlapMigrationSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, Ptr{PetscSF}),\n               dm, overlapSF, migrationSF_,\n              )\n\n\tmigrationSF = migrationSF_[]\n\n\treturn migrationSF\nend \n\n\"\"\"\n\tDMPlexStratifyMigrationSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, migrationSF::PetscSF) \nRearrange the leaves of a migration sf for stratification.\n\nInput Parameters:\n- `dm` - The DM\n- `sf` - A star forest with non-ordered leaves, usually defining a DM point migration\n\nOutput Parameter:\n- `migrationSF` - A star forest with added leaf indirection that ensures the resulting DM is stratified\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexPartitionLabelCreateSF()`, `DMPlexDistribute()`, `DMPlexDistributeOverlap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexStratifyMigrationSF\"))\n\"\"\"\nfunction DMPlexStratifyMigrationSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF, migrationSF::PetscSF) end\n\n@for_petsc function DMPlexStratifyMigrationSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF, migrationSF::PetscSF )\n\n    @chk ccall(\n               (:DMPlexStratifyMigrationSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, Ptr{PetscSF}),\n               dm, sf, migrationSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexDistributeField(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalVec::PetscVec, newSection::PetscSection, newVec::PetscVec) \nDistribute field data to match a given `PetscSF`, usually the `PetscSF` from mesh distribution\n\nCollective\n\nInput Parameters:\n- `dm`              - The `DMPLEX` object\n- `pointSF`         - The `PetscSF` describing the communication pattern\n- `originalSection` - The `PetscSection` for existing data layout\n- `originalVec`     - The existing data in a local vector\n\nOutput Parameters:\n- `newSection` - The `PetscSF` describing the new data layout\n- `newVec`     - The new data in a local vector\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexDistribute()`, `DMPlexDistributeFieldIS()`, `DMPlexDistributeData()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributeField\"))\n\"\"\"\nfunction DMPlexDistributeField(petsclib::PetscLibType, dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalVec::PetscVec, newSection::PetscSection, newVec::PetscVec) end\n\n@for_petsc function DMPlexDistributeField(petsclib::$UnionPetscLib, dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalVec::PetscVec, newSection::PetscSection, newVec::PetscVec )\n\n    @chk ccall(\n               (:DMPlexDistributeField, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, PetscSection, CVec, PetscSection, CVec),\n               dm, pointSF, originalSection, originalVec, newSection, newVec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexDistributeFieldIS(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalIS::IS, newSection::PetscSection, newIS::IS) \nDistribute field data to match a given `PetscSF`, usually the `PetscSF` from mesh distribution\n\nCollective\n\nInput Parameters:\n- `dm`              - The `DMPLEX` object\n- `pointSF`         - The `PetscSF` describing the communication pattern\n- `originalSection` - The `PetscSection` for existing data layout\n- `originalIS`      - The existing data\n\nOutput Parameters:\n- `newSection` - The `PetscSF` describing the new data layout\n- `newIS`      - The new data\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexDistribute()`, `DMPlexDistributeField()`, `DMPlexDistributeData()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributeFieldIS\"))\n\"\"\"\nfunction DMPlexDistributeFieldIS(petsclib::PetscLibType, dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalIS::IS, newSection::PetscSection, newIS::IS) end\n\n@for_petsc function DMPlexDistributeFieldIS(petsclib::$UnionPetscLib, dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalIS::IS, newSection::PetscSection, newIS::IS )\n\n    @chk ccall(\n               (:DMPlexDistributeFieldIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, PetscSection, CIS, PetscSection, Ptr{CIS}),\n               dm, pointSF, originalSection, originalIS, newSection, newIS,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetPartitionBalance(petsclib::PetscLibType,dm::PetscDM, flg::PetscBool) \nShould distribution of the `DM` attempt to balance the shared point partition?\n\nInput Parameters:\n- `dm`  - The `DMPLEX` object\n- `flg` - Balance the partition?\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexDistribute()`, `DMPlexGetPartitionBalance()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetPartitionBalance\"))\n\"\"\"\nfunction DMPlexSetPartitionBalance(petsclib::PetscLibType, dm::PetscDM, flg::PetscBool) end\n\n@for_petsc function DMPlexSetPartitionBalance(petsclib::$UnionPetscLib, dm::PetscDM, flg::PetscBool )\n\n    @chk ccall(\n               (:DMPlexSetPartitionBalance, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = DMPlexGetPartitionBalance(petsclib::PetscLibType,dm::PetscDM) \nDoes distribution of the `DM` attempt to balance the shared point partition?\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `flg` - Balance the partition?\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexDistribute()`, `DMPlexSetPartitionBalance()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPartitionBalance\"))\n\"\"\"\nfunction DMPlexGetPartitionBalance(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetPartitionBalance(petsclib::$UnionPetscLib, dm::PetscDM )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetPartitionBalance, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tpointSF::PetscSF = DMPlexCreatePointSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF, ownership::PetscBool) \nBuild a point `PetscSF` from an `PetscSF` describing a point migration\n\nInput Parameters:\n- `dm`          - The source `DMPLEX` object\n- `migrationSF` - The star forest that describes the parallel point remapping\n- `ownership`   - Flag causing a vote to determine point ownership\n\nOutput Parameter:\n- `pointSF` - The star forest describing the point overlap in the remapped `DM`\n\nLevel: developer\n\n-seealso: `DMPLEX`, `PetscSF`, `DM`, `DMPlexDistribute()`, `DMPlexDistributeOverlap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreatePointSF\"))\n\"\"\"\nfunction DMPlexCreatePointSF(petsclib::PetscLibType, dm::PetscDM, migrationSF::PetscSF, ownership::PetscBool) end\n\n@for_petsc function DMPlexCreatePointSF(petsclib::$UnionPetscLib, dm::PetscDM, migrationSF::PetscSF, ownership::PetscBool )\n\tpointSF_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:DMPlexCreatePointSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, PetscBool, Ptr{PetscSF}),\n               dm, migrationSF, ownership, pointSF_,\n              )\n\n\tpointSF = pointSF_[]\n\n\treturn pointSF\nend \n\n\"\"\"\n\tDMPlexMigrate(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, targetDM::PetscDM) \nMigrates internal `DM` data over the supplied star forest\n\nCollective\n\nInput Parameters:\n- `dm` - The source `DMPLEX` object\n- `sf` - The star forest communication context describing the migration pattern\n\nOutput Parameter:\n- `targetDM` - The target `DMPLEX` object\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `PetscSF`, `DM`, `DMPlexDistribute()`, `DMPlexDistributeOverlap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMigrate\"))\n\"\"\"\nfunction DMPlexMigrate(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF, targetDM::PetscDM) end\n\n@for_petsc function DMPlexMigrate(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF, targetDM::PetscDM )\n\n    @chk ccall(\n               (:DMPlexMigrate, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF, CDM),\n               dm, sf, targetDM,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexRemapMigrationSF(petsclib::PetscLibType,sfOverlap::PetscSF, sfMigration::PetscSF, sfMigrationNew::PetscSF) \nRewrite the distribution SF to account for overlap\n\nCollective\n\nInput Parameters:\n- `sfOverlap`   - The `PetscSF` object just for the overlap\n- `sfMigration` - The original distribution `PetscSF` object\n\nOutput Parameters:\n- `sfMigrationNew` - A rewritten `PetscSF` object that incorporates the overlap\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DM`, `DMPlexDistribute()`, `DMPlexDistributeOverlap()`, `DMPlexGetOverlap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRemapMigrationSF\"))\n\"\"\"\nfunction DMPlexRemapMigrationSF(petsclib::PetscLibType, sfOverlap::PetscSF, sfMigration::PetscSF, sfMigrationNew::PetscSF) end\n\n@for_petsc function DMPlexRemapMigrationSF(petsclib::$UnionPetscLib, sfOverlap::PetscSF, sfMigration::PetscSF, sfMigrationNew::PetscSF )\n\n    @chk ccall(\n               (:DMPlexRemapMigrationSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSF, Ptr{PetscSF}),\n               sfOverlap, sfMigration, sfMigrationNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexDistribute(petsclib::PetscLibType,dm::PetscDM, overlap::PetscInt, sf::PetscSF, dmParallel::PetscDM) \nDistributes the mesh and any associated sections.\n\nCollective\n\nInput Parameters:\n- `dm`      - The original `DMPLEX` object\n- `overlap` - The overlap of partitions, 0 is the default\n\nOutput Parameters:\n- `sf`         - The `PetscSF` used for point distribution, or `NULL` if not needed\n- `dmParallel` - The distributed `DMPLEX` object\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DM`, `DMPlexCreate()`, `DMSetAdjacency()`, `DMPlexGetOverlap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistribute\"))\n\"\"\"\nfunction DMPlexDistribute(petsclib::PetscLibType, dm::PetscDM, overlap::PetscInt, sf::Union{Ptr{PetscSF}, Ptr{Nothing}}, dmParallel::PetscDM) end\n\n@for_petsc function DMPlexDistribute(petsclib::$UnionPetscLib, dm::PetscDM, overlap::$PetscInt, sf::Union{Ptr{PetscSF}, Ptr{Nothing}}, dmParallel::PetscDM )\n\tdmParallel_ = Ref(dmParallel.ptr)\n\tsf_ = sf isa Ptr{Nothing} ? Ptr{PetscSF}(0) : sf\n\n    @chk ccall(\n               (:DMPlexDistribute, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscSF}, Ptr{CDM}),\n               dm, overlap, sf_, dmParallel_,\n              )\n\n\tdmParallel.ptr = dmParallel_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexDistributeOverlap(petsclib::PetscLibType,dm::PetscDM, overlap::PetscInt, sf::PetscSF, dmOverlap::PetscDM) \nAdd partition overlap to a distributed non\n\nCollective\n\nInput Parameters:\n- `dm`      - The non-overlapping distributed `DMPLEX` object\n- `overlap` - The overlap of partitions (the same on all ranks)\n\nOutput Parameters:\n- `sf`        - The `PetscSF` used for point distribution, or pass `NULL` if not needed\n- `dmOverlap` - The overlapping distributed `DMPLEX` object\n\nOptions Database Keys:\n- `-dm_plex_overlap_labels <name1,name2,...>` - List of overlap label names\n- `-dm_plex_overlap_values <int1,int2,...>`   - List of overlap label values\n- `-dm_plex_overlap_exclude_label <name>`     - Label used to exclude points from overlap\n- `-dm_plex_overlap_exclude_value <int>`      - Label value used to exclude points from overlap\n\nLevel: advanced\n\n-seealso: `DMPLEX`, `PetscSF`, `DM`, `DMPlexCreate()`, `DMSetAdjacency()`, `DMPlexDistribute()`, `DMPlexCreateOverlapLabel()`, `DMPlexGetOverlap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributeOverlap\"))\n\"\"\"\nfunction DMPlexDistributeOverlap(petsclib::PetscLibType, dm::PetscDM, overlap::PetscInt, sf::PetscSF, dmOverlap::PetscDM) end\n\n@for_petsc function DMPlexDistributeOverlap(petsclib::$UnionPetscLib, dm::PetscDM, overlap::$PetscInt, sf::PetscSF, dmOverlap::PetscDM )\n\tdmOverlap_ = Ref(dmOverlap.ptr)\n\n    @chk ccall(\n               (:DMPlexDistributeOverlap, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscSF}, Ptr{CDM}),\n               dm, overlap, sf, dmOverlap_,\n              )\n\n\tdmOverlap.ptr = dmOverlap_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\toverlap::PetscInt = DMPlexGetOverlap(petsclib::PetscLibType,dm::PetscDM) \nGet the width of the cell overlap\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `overlap` - the width of the cell overlap\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexSetOverlap()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetOverlap\"))\n\"\"\"\nfunction DMPlexGetOverlap(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetOverlap(petsclib::$UnionPetscLib, dm::PetscDM )\n\toverlap_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetOverlap, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, overlap_,\n              )\n\n\toverlap = overlap_[]\n\n\treturn overlap\nend \n\n\"\"\"\n\tDMPlexSetOverlap(petsclib::PetscLibType,dm::PetscDM, dmSrc::PetscDM, overlap::PetscInt) \nSet the width of the cell overlap\n\nLogically Collective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `dmSrc`   - The `DM` that produced this one, or `NULL`\n- `overlap` - the width of the cell overlap\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexGetOverlap()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetOverlap\"))\n\"\"\"\nfunction DMPlexSetOverlap(petsclib::PetscLibType, dm::PetscDM, dmSrc::PetscDM, overlap::PetscInt) end\n\n@for_petsc function DMPlexSetOverlap(petsclib::$UnionPetscLib, dm::PetscDM, dmSrc::PetscDM, overlap::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexSetOverlap, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, $PetscInt),\n               dm, dmSrc, overlap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexDistributeSetDefault(petsclib::PetscLibType,dm::PetscDM, dist::PetscBool) \nSet flag indicating whether the `DM` should be distributed by default\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - The `DM`\n- `dist` - Flag for distribution\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexDistributeGetDefault()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributeSetDefault\"))\n\"\"\"\nfunction DMPlexDistributeSetDefault(petsclib::PetscLibType, dm::PetscDM, dist::PetscBool) end\n\n@for_petsc function DMPlexDistributeSetDefault(petsclib::$UnionPetscLib, dm::PetscDM, dist::PetscBool )\n\n    @chk ccall(\n               (:DMPlexDistributeSetDefault, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, dist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdist::PetscBool = DMPlexDistributeGetDefault(petsclib::PetscLibType,dm::PetscDM) \nGet flag indicating whether the `DM` should be distributed by default\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `dist` - Flag for distribution\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DM`, `DMPlexDistributeSetDefault()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributeGetDefault\"))\n\"\"\"\nfunction DMPlexDistributeGetDefault(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexDistributeGetDefault(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdist_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexDistributeGetDefault, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, dist_,\n              )\n\n\tdist = dist_[]\n\n\treturn dist\nend \n\n\"\"\"\n\tDMPlexGetGatherDM(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, gatherMesh::PetscDM) \nGet a copy of the `DMPLEX` that gathers all points on the\nroot process of the original's communicator.\n\nCollective\n\nInput Parameter:\n- `dm` - the original `DMPLEX` object\n\nOutput Parameters:\n- `sf`         - the `PetscSF` used for point distribution (optional)\n- `gatherMesh` - the gathered `DM` object, or `NULL`\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DM`, `PetscSF`, `DMPlexDistribute()`, `DMPlexGetRedundantDM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGatherDM\"))\n\"\"\"\nfunction DMPlexGetGatherDM(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF, gatherMesh::PetscDM) end\n\n@for_petsc function DMPlexGetGatherDM(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF, gatherMesh::PetscDM )\n\tgatherMesh_ = Ref(gatherMesh.ptr)\n\n    @chk ccall(\n               (:DMPlexGetGatherDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}, Ptr{CDM}),\n               dm, sf, gatherMesh_,\n              )\n\n\tgatherMesh.ptr = gatherMesh_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetRedundantDM(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, redundantMesh::PetscDM) \nGet a copy of the `DMPLEX` that is completely copied on each process.\n\nCollective\n\nInput Parameter:\n- `dm` - the original `DMPLEX` object\n\nOutput Parameters:\n- `sf`            - the `PetscSF` used for point distribution (optional)\n- `redundantMesh` - the redundant `DM` object, or `NULL`\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexDistribute()`, `DMPlexGetGatherDM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetRedundantDM\"))\n\"\"\"\nfunction DMPlexGetRedundantDM(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF, redundantMesh::PetscDM) end\n\n@for_petsc function DMPlexGetRedundantDM(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF, redundantMesh::PetscDM )\n\tredundantMesh_ = Ref(redundantMesh.ptr)\n\n    @chk ccall(\n               (:DMPlexGetRedundantDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}, Ptr{CDM}),\n               dm, sf, redundantMesh_,\n              )\n\n\tredundantMesh.ptr = redundantMesh_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tdistributed::PetscBool = DMPlexIsDistributed(petsclib::PetscLibType,dm::PetscDM) \nFind out whether this `DM` is distributed, i.e. more than one rank owns some points.\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM` object\n\nOutput Parameter:\n- `distributed` - Flag whether the `DM` is distributed\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexDistribute()`, `DMPlexGetOverlap()`, `DMPlexIsInterpolated()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexIsDistributed\"))\n\"\"\"\nfunction DMPlexIsDistributed(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexIsDistributed(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdistributed_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexIsDistributed, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, distributed_,\n              )\n\n\tdistributed = distributed_[]\n\n\treturn distributed\nend \n\n\"\"\"\n\tDMPlexDistributionSetName(petsclib::PetscLibType,dm::PetscDM, name::String) \nSet the name of the specific parallel distribution\n\nInput Parameters:\n- `dm`   - The `DM`\n- `name` - The name of the specific parallel distribution\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexDistributionGetName()`, `DMPlexTopologyView()`, `DMPlexTopologyLoad()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributionSetName\"))\n\"\"\"\nfunction DMPlexDistributionSetName(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMPlexDistributionSetName(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\n    @chk ccall(\n               (:DMPlexDistributionSetName, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexDistributionGetName(petsclib::PetscLibType,dm::PetscDM, name::String) \nRetrieve the name of the specific parallel distribution\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `name` - The name of the specific parallel distribution\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexDistributionSetName()`, `DMPlexTopologyView()`, `DMPlexTopologyLoad()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexDistributionGetName\"))\n\"\"\"\nfunction DMPlexDistributionGetName(petsclib::PetscLibType, dm::PetscDM, name::String) end\n\n@for_petsc function DMPlexDistributionGetName(petsclib::$UnionPetscLib, dm::PetscDM, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:DMPlexDistributionGetName, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Ptr{Cchar}}),\n               dm, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexOrientPoint(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, o::PetscInt) \nAct with the given orientation on the cone points of this mesh point, and update its use in the mesh.\n\nNot Collective\n\nInput Parameters:\n- `dm` - The `DM`\n- `p`  - The mesh point\n- `o`  - The orientation\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexOrient()`, `DMPlexGetCone()`, `DMPlexGetConeOrientation()`, `DMPlexInterpolate()`, `DMPlexGetChart()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexOrientPoint\"))\n\"\"\"\nfunction DMPlexOrientPoint(petsclib::PetscLibType, dm::PetscDM, p::PetscInt, o::PetscInt) end\n\n@for_petsc function DMPlexOrientPoint(petsclib::$UnionPetscLib, dm::PetscDM, p::$PetscInt, o::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexOrientPoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt),\n               dm, p, o,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexOrient(petsclib::PetscLibType,dm::PetscDM) \nGive a consistent orientation to the input mesh\n\nInput Parameter:\n- `dm` - The `DM`\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexOrient\"))\n\"\"\"\nfunction DMPlexOrient(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexOrient(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexOrient, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexOrientLabel(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexOrientLabel\"))\n\"\"\"\nfunction DMPlexOrientLabel(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexOrientLabel(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexOrientLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetIsoperiodicFaceSF(petsclib::PetscLibType,dm::PetscDM, num_face_sfs::PetscInt, face_sfs::PetscSF) \nExpress periodicity from an existing mesh\n\nLogically Collective\n\nInput Parameters:\n- `dm`           - The `DMPLEX` on which to set periodicity\n- `num_face_sfs` - Number of `PetscSF`s in `face_sfs`\n- `face_sfs`     - Array of `PetscSF` in which roots are (owned) donor faces and leaves are faces that must be matched to a (possibly remote) donor face.\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DMPLEX`, `DMGetGlobalSection()`, `DMPlexGetIsoperiodicFaceSF()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetIsoperiodicFaceSF\"))\n\"\"\"\nfunction DMPlexSetIsoperiodicFaceSF(petsclib::PetscLibType, dm::PetscDM, num_face_sfs::PetscInt, face_sfs::PetscSF) end\n\n@for_petsc function DMPlexSetIsoperiodicFaceSF(petsclib::$UnionPetscLib, dm::PetscDM, num_face_sfs::$PetscInt, face_sfs::PetscSF )\n\n    @chk ccall(\n               (:DMPlexSetIsoperiodicFaceSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscSF}),\n               dm, num_face_sfs, face_sfs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum_face_sfs::PetscInt = DMPlexGetIsoperiodicFaceSF(petsclib::PetscLibType,dm::PetscDM, face_sfs::PetscSF) \nObtain periodicity for a mesh\n\nLogically Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` for which to obtain periodic relation\n\nOutput Parameters:\n- `num_face_sfs` - Number of `PetscSF`s in the array\n- `face_sfs`     - Array of `PetscSF` in which roots are (owned) donor faces and leaves are faces that must be matched to a (possibly remote) donor face.\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DMPLEX`, `DMGetGlobalSection()`, `DMPlexSetIsoperiodicFaceSF()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetIsoperiodicFaceSF\"))\n\"\"\"\nfunction DMPlexGetIsoperiodicFaceSF(petsclib::PetscLibType, dm::PetscDM, face_sfs::PetscSF) end\n\n@for_petsc function DMPlexGetIsoperiodicFaceSF(petsclib::$UnionPetscLib, dm::PetscDM, face_sfs::PetscSF )\n\tnum_face_sfs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetIsoperiodicFaceSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, PetscSF),\n               dm, num_face_sfs_, face_sfs,\n              )\n\n\tnum_face_sfs = num_face_sfs_[]\n\n\treturn num_face_sfs\nend \n\n\"\"\"\n\tDMPlexSetIsoperiodicFaceTransform(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, t::Vector{PetscScalar}) \nset geometric transform from donor to periodic points\n\nLogically Collective\n\nInput Parameters:\n- `dm` - `DMPLEX` that has been configured with `DMPlexSetIsoperiodicFaceSF()`\n- `n`  - Number of transforms in array\n- `t`  - Array of 4x4 affine transformation basis.\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DMPLEX`, `DMGetGlobalSection()`, `DMPlexSetIsoperiodicFaceSF()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetIsoperiodicFaceTransform\"))\n\"\"\"\nfunction DMPlexSetIsoperiodicFaceTransform(petsclib::PetscLibType, dm::PetscDM, n::PetscInt, t::Vector{PetscScalar}) end\n\n@for_petsc function DMPlexSetIsoperiodicFaceTransform(petsclib::$UnionPetscLib, dm::PetscDM, n::$PetscInt, t::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:DMPlexSetIsoperiodicFaceTransform, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscScalar}),\n               dm, n, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexGetPointLocal(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \nget location of point data in local `Vec`\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining the topological space\n- `point` - topological point\n\nOutput Parameters:\n- `start` - start of point data\n- `end`   - end of point data\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetPointLocalField()`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexPointLocalRead()`, `DMPlexPointLocalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPointLocal\"))\n\"\"\"\nfunction DMPlexGetPointLocal(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMPlexGetPointLocal(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetPointLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, point, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tDMPlexPointLocalRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read access to a point in local array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of read reference to point data, type generic so user can place in structure\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointLocal()`, `DMPlexPointGlobalRead()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointLocalRead\"))\n\"\"\"\nfunction DMPlexPointLocalRead(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointLocalRead(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointLocalRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPointLocalRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read/write access to a point in local array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of reference to point data, type generic so user can place in structure\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointLocal()`, `DMPlexPointGlobalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointLocalRef\"))\n\"\"\"\nfunction DMPlexPointLocalRef(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointLocalRef(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointLocalRef, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexGetPointLocalField(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt) \nget location of point field data in local Vec\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining the topological space\n- `point` - topological point\n- `field` - the field number\n\nOutput Parameters:\n- `start` - start of point data\n- `end`   - end of point data\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetPointLocal()`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexPointLocalRead()`, `DMPlexPointLocalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPointLocalField\"))\n\"\"\"\nfunction DMPlexGetPointLocalField(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, field::PetscInt) end\n\n@for_petsc function DMPlexGetPointLocalField(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, field::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetPointLocalField, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, point, field, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tDMPlexPointLocalFieldRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read access to a field on a point in local array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `field` - field number\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of read reference to point data, type generic so user can place in structure\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointLocal()`, `DMPlexPointGlobalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointLocalFieldRead\"))\n\"\"\"\nfunction DMPlexPointLocalFieldRead(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointLocalFieldRead(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, field::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointLocalFieldRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, field, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPointLocalFieldRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read/write access to a field on a point in local array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `field` - field number\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of reference to point data, type generic so user can place in structure\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointLocal()`, `DMPlexPointGlobalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointLocalFieldRef\"))\n\"\"\"\nfunction DMPlexPointLocalFieldRef(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointLocalFieldRef(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, field::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointLocalFieldRef, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, field, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexGetPointGlobal(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \nget location of point data in global Vec\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining the topological space\n- `point` - topological point\n\nOutput Parameters:\n- `start` - start of point data; returns -(globalStart+1) if point is not owned\n- `end`   - end of point data; returns -(globalEnd+1) if point is not owned\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetPointGlobalField()`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexPointGlobalRead()`, `DMPlexGetPointLocal()`, `DMPlexPointGlobalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPointGlobal\"))\n\"\"\"\nfunction DMPlexGetPointGlobal(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMPlexGetPointGlobal(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tend_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetPointGlobal, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, point, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tDMPlexPointGlobalRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read access to a point in global array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of read reference to point data, type generic so user can place in structure; returns NULL if global point is not owned\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointGlobal()`, `DMPlexPointLocalRead()`, `DMPlexPointGlobalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointGlobalRead\"))\n\"\"\"\nfunction DMPlexPointGlobalRead(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointGlobalRead(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointGlobalRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPointGlobalRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read/write access to a point in global array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of reference to point data, type generic so user can place in structure; returns NULL if global point is not owned\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointGlobal()`, `DMPlexPointLocalRef()`, `DMPlexPointGlobalRead()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointGlobalRef\"))\n\"\"\"\nfunction DMPlexPointGlobalRef(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointGlobalRef(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointGlobalRef, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexGetPointGlobalField(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt) \nget location of point field data in global `Vec`\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining the topological space\n- `point` - topological point\n- `field` - the field number\n\nOutput Parameters:\n- `start` - start of point data; returns -(globalStart+1) if point is not owned\n- `end`   - end of point data; returns -(globalEnd+1) if point is not owned\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetPointGlobal()`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexPointGlobalRead()`, `DMPlexGetPointLocal()`, `DMPlexPointGlobalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetPointGlobalField\"))\n\"\"\"\nfunction DMPlexGetPointGlobalField(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, field::PetscInt) end\n\n@for_petsc function DMPlexGetPointGlobalField(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, field::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetPointGlobalField, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, point, field, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tDMPlexPointGlobalFieldRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read access to a field on a point in global array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `field` - field number\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of read reference to point data, type generic so user can place in structure; returns NULL if global point is not owned\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointGlobal()`, `DMPlexPointLocalRead()`, `DMPlexPointGlobalRef()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointGlobalFieldRead\"))\n\"\"\"\nfunction DMPlexPointGlobalFieldRead(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointGlobalFieldRead(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, field::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointGlobalFieldRead, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, field, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPointGlobalFieldRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) \nreturn read/write access to a field on a point in global array\n\nNot Collective\n\nInput Parameters:\n- `dm`    - `DM` defining topological space\n- `point` - topological point\n- `field` - field number\n- `array` - array to index into\n\nOutput Parameter:\n- `ptr` - address of reference to point data, type generic so user can place in structure; returns NULL if global point is not owned\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetLocalSection()`, `PetscSectionGetOffset()`, `PetscSectionGetDof()`, `DMPlexGetPointGlobal()`, `DMPlexPointLocalRef()`, `DMPlexPointGlobalRead()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPointGlobalFieldRef\"))\n\"\"\"\nfunction DMPlexPointGlobalFieldRef(petsclib::PetscLibType, dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid) end\n\n@for_petsc function DMPlexPointGlobalFieldRef(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt, field::$PetscInt, array::$PetscScalar, ptr::Cvoid )\n\n    @chk ccall(\n               (:DMPlexPointGlobalFieldRef, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, point, field, array, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateExodusFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from an ExodusII file.\n\nCollective\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `filename`    - The name of the ExodusII file\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `PETSCVIEWEREXODUSII`, `DMPLEX`, `DMCreate()`, `DMPlexCreateExodus()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateExodusFromFile\"))\n\"\"\"\nfunction DMPlexCreateExodusFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateExodusFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateExodusFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscBool, Ptr{CDM}),\n               comm, filename, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPlexCheckInterfaceCones(petsclib::PetscLibType,dm::PetscDM) \nCheck that points on inter\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCone()`, `DMPlexGetConeSize()`, `DMGetPointSF()`, `DMGetCoordinates()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCheckInterfaceCones\"))\n\"\"\"\nfunction DMPlexCheckInterfaceCones(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexCheckInterfaceCones(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexCheckInterfaceCones, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tscale::PetscReal = DMPlexGetScale(petsclib::PetscLibType,dm::PetscDM, unit::PetscUnit) \nGet the scale for the specified fundamental unit\n\nNot Collective\n\nInput Parameters:\n- `dm`   - the `DM`\n- `unit` - The SI unit\n\nOutput Parameter:\n- `scale` - The value used to scale all quantities with this unit\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetScale()`, `PetscUnit`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetScale\"))\n\"\"\"\nfunction DMPlexGetScale(petsclib::PetscLibType, dm::PetscDM, unit::PetscUnit) end\n\n@for_petsc function DMPlexGetScale(petsclib::$UnionPetscLib, dm::PetscDM, unit::PetscUnit )\n\tscale_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexGetScale, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscUnit, Ptr{$PetscReal}),\n               dm, unit, scale_,\n              )\n\n\tscale = scale_[]\n\n\treturn scale\nend \n\n\"\"\"\n\tDMPlexSetScale(petsclib::PetscLibType,dm::PetscDM, unit::PetscUnit, scale::PetscReal) \nSet the scale for the specified fundamental unit\n\nNot Collective\n\nInput Parameters:\n- `dm`    - the `DM`\n- `unit`  - The SI unit\n- `scale` - The value used to scale all quantities with this unit\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetScale()`, `PetscUnit`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetScale\"))\n\"\"\"\nfunction DMPlexSetScale(petsclib::PetscLibType, dm::PetscDM, unit::PetscUnit, scale::PetscReal) end\n\n@for_petsc function DMPlexSetScale(petsclib::$UnionPetscLib, dm::PetscDM, unit::PetscUnit, scale::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexSetScale, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscUnit, $PetscReal),\n               dm, unit, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuseClPerm::PetscBool = DMPlexGetUseMatClosurePermutation(petsclib::PetscLibType,dm::PetscDM) \nGet flag for using a closure permutation for matrix insertion\n\nNot collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `useClPerm` - The flag\n\nLevel: intermediate\n\n-seealso: `DMPlexSetUseMatClosurePermutation()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetUseMatClosurePermutation\"))\n\"\"\"\nfunction DMPlexGetUseMatClosurePermutation(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetUseMatClosurePermutation(petsclib::$UnionPetscLib, dm::PetscDM )\n\tuseClPerm_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetUseMatClosurePermutation, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               dm, useClPerm_,\n              )\n\n\tuseClPerm = useClPerm_[]\n\n\treturn useClPerm\nend \n\n\"\"\"\n\tDMPlexSetUseMatClosurePermutation(petsclib::PetscLibType,dm::PetscDM, useClPerm::PetscBool) \nSet flag for using a closure permutation for matrix insertion\n\nNot collective\n\nInput Parameters:\n- `dm`        - The `DM`\n- `useClPerm` - The flag\n\nLevel: intermediate\n\n-seealso: `DMPlexGetUseMatClosurePermutation()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetUseMatClosurePermutation\"))\n\"\"\"\nfunction DMPlexSetUseMatClosurePermutation(petsclib::PetscLibType, dm::PetscDM, useClPerm::PetscBool) end\n\n@for_petsc function DMPlexSetUseMatClosurePermutation(petsclib::$UnionPetscLib, dm::PetscDM, useClPerm::PetscBool )\n\n    @chk ccall(\n               (:DMPlexSetUseMatClosurePermutation, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, useClPerm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsp::MatNullSpace = DMPlexCreateRigidBody(petsclib::PetscLibType,dm::PetscDM, field::PetscInt) \nFor the default global section, create rigid body modes by function space interpolation\n\nCollective\n\nInput Parameters:\n- `dm`    - the `DM`\n- `field` - The field number for the rigid body space, or 0 for the default\n\nOutput Parameter:\n- `sp` - the null space\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `MatNullSpaceCreate()`, `PCGAMG`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateRigidBody\"))\n\"\"\"\nfunction DMPlexCreateRigidBody(petsclib::PetscLibType, dm::PetscDM, field::PetscInt) end\n\n@for_petsc function DMPlexCreateRigidBody(petsclib::$UnionPetscLib, dm::PetscDM, field::$PetscInt )\n\tsp_ = Ref{MatNullSpace}()\n\n    @chk ccall(\n               (:DMPlexCreateRigidBody, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{MatNullSpace}),\n               dm, field, sp_,\n              )\n\n\tsp = sp_[]\n\n\treturn sp\nend \n\n\"\"\"\n\tsp::MatNullSpace = DMPlexCreateRigidBodies(petsclib::PetscLibType,dm::PetscDM, nb::PetscInt, label::DMLabel, nids::Vector{PetscInt}, ids::Vector{PetscInt}) \nFor the default global section, create rigid body modes by function space interpolation\n\nCollective\n\nInput Parameters:\n- `dm`    - the `DM`\n- `nb`    - The number of bodies\n- `label` - The `DMLabel` marking each domain\n- `nids`  - The number of ids per body\n- `ids`   - An array of the label ids in sequence for each domain\n\nOutput Parameter:\n- `sp` - the null space\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `MatNullSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateRigidBodies\"))\n\"\"\"\nfunction DMPlexCreateRigidBodies(petsclib::PetscLibType, dm::PetscDM, nb::PetscInt, label::DMLabel, nids::Vector{PetscInt}, ids::Vector{PetscInt}) end\n\n@for_petsc function DMPlexCreateRigidBodies(petsclib::$UnionPetscLib, dm::PetscDM, nb::$PetscInt, label::DMLabel, nids::Vector{$PetscInt}, ids::Vector{$PetscInt} )\n\tsp_ = Ref{MatNullSpace}()\n\n    @chk ccall(\n               (:DMPlexCreateRigidBodies, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, DMLabel, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{MatNullSpace}),\n               dm, nb, label, nids, ids, sp_,\n              )\n\n\tsp = sp_[]\n\n\treturn sp\nend \n\n\"\"\"\n\tDMPlexSetMaxProjectionHeight(petsclib::PetscLibType,dm::PetscDM, height::PetscInt) \nIn DMPlexProjectXXXLocal() functions, the projected values of a basis function's dofs\nare computed by associating the basis function with one of the mesh points in its transitively-closed support, and\nevaluating the dual space basis of that point.\n\nInput Parameters:\n- `dm`     - the `DMPLEX` object\n- `height` - the maximum projection height >= 0\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetMaxProjectionHeight()`, `DMProjectFunctionLocal()`, `DMProjectFunctionLabelLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetMaxProjectionHeight\"))\n\"\"\"\nfunction DMPlexSetMaxProjectionHeight(petsclib::PetscLibType, dm::PetscDM, height::PetscInt) end\n\n@for_petsc function DMPlexSetMaxProjectionHeight(petsclib::$UnionPetscLib, dm::PetscDM, height::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexSetMaxProjectionHeight, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt),\n               dm, height,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\theight::PetscInt = DMPlexGetMaxProjectionHeight(petsclib::PetscLibType,dm::PetscDM) \nGet the maximum height (w.r.t. DAG) of mesh points used to evaluate dual bases in\nDMPlexProjectXXXLocal() functions.\n\nInput Parameter:\n- `dm` - the `DMPLEX` object\n\nOutput Parameter:\n- `height` - the maximum projection height\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetMaxProjectionHeight()`, `DMProjectFunctionLocal()`, `DMProjectFunctionLabelLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetMaxProjectionHeight\"))\n\"\"\"\nfunction DMPlexGetMaxProjectionHeight(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetMaxProjectionHeight(petsclib::$UnionPetscLib, dm::PetscDM )\n\theight_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetMaxProjectionHeight, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}),\n               dm, height_,\n              )\n\n\theight = height_[]\n\n\treturn height\nend \n\n\"\"\"\n\tDMPlexGlobalToLocalBasis(petsclib::PetscLibType,dm::PetscDM, lv::PetscVec) \nTransform the values in the given local vector from the global basis to the local basis\n\nInput Parameters:\n- `dm` - The `DM`\n- `lv` - A local vector with values in the global basis\n\nOutput Parameter:\n- `lv` - A local vector with values in the local basis\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexLocalToGlobalBasis()`, `DMGetLocalSection()`, `DMPlexCreateBasisRotation()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGlobalToLocalBasis\"))\n\"\"\"\nfunction DMPlexGlobalToLocalBasis(petsclib::PetscLibType, dm::PetscDM, lv::PetscVec) end\n\n@for_petsc function DMPlexGlobalToLocalBasis(petsclib::$UnionPetscLib, dm::PetscDM, lv::PetscVec )\n\n    @chk ccall(\n               (:DMPlexGlobalToLocalBasis, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, lv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLocalToGlobalBasis(petsclib::PetscLibType,dm::PetscDM, lv::PetscVec) \nTransform the values in the given local vector from the local basis to the global basis\n\nInput Parameters:\n- `dm` - The `DM`\n- `lv` - A local vector with values in the local basis\n\nOutput Parameter:\n- `lv` - A local vector with values in the global basis\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGlobalToLocalBasis()`, `DMGetLocalSection()`, `DMPlexCreateBasisRotation()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLocalToGlobalBasis\"))\n\"\"\"\nfunction DMPlexLocalToGlobalBasis(petsclib::PetscLibType, dm::PetscDM, lv::PetscVec) end\n\n@for_petsc function DMPlexLocalToGlobalBasis(petsclib::$UnionPetscLib, dm::PetscDM, lv::PetscVec )\n\n    @chk ccall(\n               (:DMPlexLocalToGlobalBasis, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec),\n               dm, lv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCreateBasisRotation(petsclib::PetscLibType,dm::PetscDM, alpha::PetscReal, beta::PetscReal, gamma::PetscReal) \nCreate an internal transformation from the global basis, used to specify boundary conditions\nand global solutions, to a local basis, appropriate for discretization integrals and assembly.\n\nInput Parameters:\n- `dm`    - The `DM`\n- `alpha` - The first Euler angle, and in 2D the only one\n- `beta`  - The second Euler angle\n- `gamma` - The third Euler angle\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGlobalToLocalBasis()`, `DMPlexLocalToGlobalBasis()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateBasisRotation\"))\n\"\"\"\nfunction DMPlexCreateBasisRotation(petsclib::PetscLibType, dm::PetscDM, alpha::PetscReal, beta::PetscReal, gamma::PetscReal) end\n\n@for_petsc function DMPlexCreateBasisRotation(petsclib::$UnionPetscLib, dm::PetscDM, alpha::$PetscReal, beta::$PetscReal, gamma::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexCreateBasisRotation, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, $PetscReal, $PetscReal),\n               dm, alpha, beta, gamma,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertBoundaryValuesEssential(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) \nInsert boundary values into a local vector using a function of the coordinates\n\nInput Parameters:\n- `dm`     - The `DM`, with a `PetscDS` that matches the problem being constrained\n- `time`   - The time\n- `field`  - The field to constrain\n- `Nc`     - The number of constrained field components, or 0 for all components\n- `comps`  - An array of constrained component numbers, or `NULL` for all components\n- `label`  - The `DMLabel` defining constrained points\n- `numids` - The number of `DMLabel` ids for constrained points\n- `ids`    - An array of ids for constrained points\n- `func`   - A pointwise function giving boundary values\n- `ctx`    - An optional user context for bcFunc\n\nOutput Parameter:\n- `locX` - A local vector to receives the boundary values\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLabel`, `DMPlexInsertBoundaryValuesEssentialField()`, `DMPlexInsertBoundaryValuesEssentialBdField()`, `DMAddBoundary()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertBoundaryValuesEssential\"))\n\"\"\"\nfunction DMPlexInsertBoundaryValuesEssential(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) end\n\n@for_petsc function DMPlexInsertBoundaryValuesEssential(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, label::DMLabel, numids::$PetscInt, ids::Vector{$PetscInt}, func::external, ctx::Cvoid, locX::PetscVec )\n\n    @chk ccall(\n               (:DMPlexInsertBoundaryValuesEssential, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, $PetscInt, $PetscInt, Ptr{$PetscInt}, DMLabel, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}, CVec),\n               dm, time, field, Nc, comps, label, numids, ids, func, ctx, locX,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertBoundaryValuesEssentialField(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locU::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) \nInsert boundary values into a local vector using a function of the coordinates and field data\n\nInput Parameters:\n- `dm`     - The `DM`, with a `PetscDS` that matches the problem being constrained\n- `time`   - The time\n- `locU`   - A local vector with the input solution values\n- `field`  - The field to constrain\n- `Nc`     - The number of constrained field components, or 0 for all components\n- `comps`  - An array of constrained component numbers, or `NULL` for all components\n- `label`  - The `DMLabel` defining constrained points\n- `numids` - The number of `DMLabel` ids for constrained points\n- `ids`    - An array of ids for constrained points\n- `func`   - A pointwise function giving boundary values\n- `ctx`    - An optional user context for bcFunc\n\nOutput Parameter:\n- `locX` - A local vector to receives the boundary values\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexInsertBoundaryValuesEssential()`, `DMPlexInsertBoundaryValuesEssentialBdField()`, `DMAddBoundary()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertBoundaryValuesEssentialField\"))\n\"\"\"\nfunction DMPlexInsertBoundaryValuesEssentialField(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locU::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) end\n\n@for_petsc function DMPlexInsertBoundaryValuesEssentialField(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locU::PetscVec, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, label::DMLabel, numids::$PetscInt, ids::Vector{$PetscInt}, func::external, ctx::Cvoid, locX::PetscVec )\n\n    @chk ccall(\n               (:DMPlexInsertBoundaryValuesEssentialField, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, $PetscInt, $PetscInt, Ptr{$PetscInt}, DMLabel, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}, CVec),\n               dm, time, locU, field, Nc, comps, label, numids, ids, func, ctx, locX,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertBoundaryValuesEssentialBdField(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locU::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) \nInsert boundary values into a local vector using a function of the coordinates and boundary field data\n\nCollective\n\nInput Parameters:\n- `dm`     - The `DM`, with a `PetscDS` that matches the problem being constrained\n- `time`   - The time\n- `locU`   - A local vector with the input solution values\n- `field`  - The field to constrain\n- `Nc`     - The number of constrained field components, or 0 for all components\n- `comps`  - An array of constrained component numbers, or `NULL` for all components\n- `label`  - The `DMLabel` defining constrained points\n- `numids` - The number of `DMLabel` ids for constrained points\n- `ids`    - An array of ids for constrained points\n- `func`   - A pointwise function giving boundary values, the calling sequence is given in `DMProjectBdFieldLabelLocal()`\n- `ctx`    - An optional user context for `func`\n\nOutput Parameter:\n- `locX` - A local vector to receive the boundary values\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMProjectBdFieldLabelLocal()`, `DMPlexInsertBoundaryValuesEssential()`, `DMPlexInsertBoundaryValuesEssentialField()`, `DMAddBoundary()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertBoundaryValuesEssentialBdField\"))\n\"\"\"\nfunction DMPlexInsertBoundaryValuesEssentialBdField(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locU::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) end\n\n@for_petsc function DMPlexInsertBoundaryValuesEssentialBdField(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locU::PetscVec, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, label::DMLabel, numids::$PetscInt, ids::Vector{$PetscInt}, func::external, ctx::Cvoid, locX::PetscVec )\n\n    @chk ccall(\n               (:DMPlexInsertBoundaryValuesEssentialBdField, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, $PetscInt, $PetscInt, Ptr{$PetscInt}, DMLabel, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}, CVec),\n               dm, time, locU, field, Nc, comps, label, numids, ids, func, ctx, locX,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertBoundaryValuesRiemann(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, faceGeometry::PetscVec, cellGeometry::PetscVec, Grad::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) \nInsert boundary values into a local vector\n\nInput Parameters:\n- `dm`           - The `DM`, with a `PetscDS` that matches the problem being constrained\n- `time`         - The time\n- `faceGeometry` - A vector with the FVM face geometry information\n- `cellGeometry` - A vector with the FVM cell geometry information\n- `Grad`         - A vector with the FVM cell gradient information\n- `field`        - The field to constrain\n- `Nc`           - The number of constrained field components, or 0 for all components\n- `comps`        - An array of constrained component numbers, or `NULL` for all components\n- `label`        - The `DMLabel` defining constrained points\n- `numids`       - The number of `DMLabel` ids for constrained points\n- `ids`          - An array of ids for constrained points\n- `func`         - A pointwise function giving boundary values\n- `ctx`          - An optional user context for bcFunc\n\nOutput Parameter:\n- `locX` - A local vector to receives the boundary values\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexInsertBoundaryValuesEssential()`, `DMPlexInsertBoundaryValuesEssentialField()`, `DMAddBoundary()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertBoundaryValuesRiemann\"))\n\"\"\"\nfunction DMPlexInsertBoundaryValuesRiemann(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, faceGeometry::PetscVec, cellGeometry::PetscVec, Grad::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec) end\n\n@for_petsc function DMPlexInsertBoundaryValuesRiemann(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, faceGeometry::PetscVec, cellGeometry::PetscVec, Grad::PetscVec, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, label::DMLabel, numids::$PetscInt, ids::Vector{$PetscInt}, func::external, ctx::Cvoid, locX::PetscVec )\n\n    @chk ccall(\n               (:DMPlexInsertBoundaryValuesRiemann, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec, CVec, $PetscInt, $PetscInt, Ptr{$PetscInt}, DMLabel, $PetscInt, Ptr{$PetscInt}, external, Ptr{Cvoid}, CVec),\n               dm, time, faceGeometry, cellGeometry, Grad, field, Nc, comps, label, numids, ids, func, ctx, locX,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertBoundaryValues(petsclib::PetscLibType,dm::PetscDM, insertEssential::PetscBool, locX::PetscVec, time::PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec) \nPuts coefficients which represent boundary values into the local solution vector\n\nNot Collective\n\nInput Parameters:\n- `dm`              - The `DM`\n- `insertEssential` - Should I insert essential (e.g. Dirichlet) or inessential (e.g. Neumann) boundary conditions\n- `time`            - The time\n- `faceGeomFVM`     - Face geometry data for FV discretizations\n- `cellGeomFVM`     - Cell geometry data for FV discretizations\n- `gradFVM`         - Gradient reconstruction data for FV discretizations\n\nOutput Parameter:\n- `locX` - Solution updated with boundary values\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMProjectFunctionLabelLocal()`, `DMAddBoundary()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertBoundaryValues\"))\n\"\"\"\nfunction DMPlexInsertBoundaryValues(petsclib::PetscLibType, dm::PetscDM, insertEssential::PetscBool, locX::PetscVec, time::PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec) end\n\n@for_petsc function DMPlexInsertBoundaryValues(petsclib::$UnionPetscLib, dm::PetscDM, insertEssential::PetscBool, locX::PetscVec, time::$PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec )\n\n    @chk ccall(\n               (:DMPlexInsertBoundaryValues, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, CVec, $PetscReal, CVec, CVec, CVec),\n               dm, insertEssential, locX, time, faceGeomFVM, cellGeomFVM, gradFVM,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertTimeDerivativeBoundaryValues(petsclib::PetscLibType,dm::PetscDM, insertEssential::PetscBool, locX_t::PetscVec, time::PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec) \nPuts coefficients which represent boundary values of the time derivative into the local solution vector\n\nInput Parameters:\n- `dm`              - The `DM`\n- `insertEssential` - Should I insert essential (e.g. Dirichlet) or inessential (e.g. Neumann) boundary conditions\n- `time`            - The time\n- `faceGeomFVM`     - Face geometry data for FV discretizations\n- `cellGeomFVM`     - Cell geometry data for FV discretizations\n- `gradFVM`         - Gradient reconstruction data for FV discretizations\n\nOutput Parameter:\n- `locX_t` - Solution updated with boundary values\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMProjectFunctionLabelLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertTimeDerivativeBoundaryValues\"))\n\"\"\"\nfunction DMPlexInsertTimeDerivativeBoundaryValues(petsclib::PetscLibType, dm::PetscDM, insertEssential::PetscBool, locX_t::PetscVec, time::PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec) end\n\n@for_petsc function DMPlexInsertTimeDerivativeBoundaryValues(petsclib::$UnionPetscLib, dm::PetscDM, insertEssential::PetscBool, locX_t::PetscVec, time::$PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec )\n\n    @chk ccall(\n               (:DMPlexInsertTimeDerivativeBoundaryValues, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, CVec, $PetscReal, CVec, CVec, CVec),\n               dm, insertEssential, locX_t, time, faceGeomFVM, cellGeomFVM, gradFVM,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertBounds(petsclib::PetscLibType,dm::PetscDM, lower::PetscBool, time::PetscReal, locB::PetscVec) \nPuts coefficients which represent solution bounds into the local bounds vector\n\nNot Collective\n\nInput Parameters:\n- `dm`    - The `DM`\n- `lower` - If `PETSC_TRUE` use `DM_BC_LOWER_BOUND` conditions, otherwise use `DM_BC_UPPER_BOUND`\n- `time`  - The time\n\nOutput Parameter:\n- `locB` - Bounds vector updated with new bounds\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMProjectFunctionLabelLocal()`, `PetscDSAddBoundary()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertBounds\"))\n\"\"\"\nfunction DMPlexInsertBounds(petsclib::PetscLibType, dm::PetscDM, lower::PetscBool, time::PetscReal, locB::PetscVec) end\n\n@for_petsc function DMPlexInsertBounds(petsclib::$UnionPetscLib, dm::PetscDM, lower::PetscBool, time::$PetscReal, locB::PetscVec )\n\n    @chk ccall(\n               (:DMPlexInsertBounds, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, $PetscReal, CVec),\n               dm, lower, time, locB,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInsertBoundaryValuesFVM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, locX::PetscVec, time::PetscReal, locGradient::PetscVec) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInsertBoundaryValuesFVM\"))\n\"\"\"\nfunction DMPlexInsertBoundaryValuesFVM(petsclib::PetscLibType, dm::PetscDM, fv::PetscFV, locX::PetscVec, time::PetscReal, locGradient::PetscVec) end\n\n@for_petsc function DMPlexInsertBoundaryValuesFVM(petsclib::$UnionPetscLib, dm::PetscDM, fv::PetscFV, locX::PetscVec, time::$PetscReal, locGradient::PetscVec )\n\tlocGradient_ = Ref(locGradient.ptr)\n\n    @chk ccall(\n               (:DMPlexInsertBoundaryValuesFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFV, CVec, $PetscReal, Ptr{CVec}),\n               dm, fv, locX, time, locGradient_,\n              )\n\n\tlocGradient.ptr = locGradient_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeL2FluxDiffVecLocal(petsclib::PetscLibType,lu::PetscVec, f::PetscInt, lmu::PetscVec, mf::PetscInt, eFlux::PetscVec) \nThis function computes the integral of the difference between the gradient of field `f`in `u` and field `mf` in `mu`\n\nCollective\n\nInput Parameters:\n- `lu`  - The local `Vec` containing the primal solution\n- `f`   - The field number for the potential\n- `lmu` - The local `Vec` containing the mixed solution\n- `mf`  - The field number for the flux\n\nOutput Parameter:\n- `eFlux` - A global `Vec` which holds\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexComputeL2FluxDiffVec()`, `DMProjectFunction()`, `DMComputeL2Diff()`, `DMPlexComputeL2FieldDiff()`, `DMComputeL2GradientDiff()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeL2FluxDiffVecLocal\"))\n\"\"\"\nfunction DMPlexComputeL2FluxDiffVecLocal(petsclib::PetscLibType, lu::PetscVec, f::PetscInt, lmu::PetscVec, mf::PetscInt, eFlux::PetscVec) end\n\n@for_petsc function DMPlexComputeL2FluxDiffVecLocal(petsclib::$UnionPetscLib, lu::PetscVec, f::$PetscInt, lmu::PetscVec, mf::$PetscInt, eFlux::PetscVec )\n\n    @chk ccall(\n               (:DMPlexComputeL2FluxDiffVecLocal, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, CVec, $PetscInt, CVec),\n               lu, f, lmu, mf, eFlux,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeL2FluxDiffVec(petsclib::PetscLibType,u::PetscVec, f::PetscInt, mu::PetscVec, mf::PetscInt, eFlux::PetscVec) \nThis function computes the integral of the difference between the gradient of field `f`in `u` and field `mf` in `mu`\n\nCollective\n\nInput Parameters:\n- `u`  - The global `Vec` containing the primal solution\n- `f`  - The field number for the potential\n- `mu` - The global `Vec` containing the mixed solution\n- `mf` - The field number for the flux\n\nOutput Parameter:\n- `eFlux` - A global `Vec` which holds\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexComputeL2FluxDiffVecLocal()`, `DMProjectFunction()`, `DMComputeL2Diff()`, `DMPlexComputeL2FieldDiff()`, `DMComputeL2GradientDiff()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeL2FluxDiffVec\"))\n\"\"\"\nfunction DMPlexComputeL2FluxDiffVec(petsclib::PetscLibType, u::PetscVec, f::PetscInt, mu::PetscVec, mf::PetscInt, eFlux::PetscVec) end\n\n@for_petsc function DMPlexComputeL2FluxDiffVec(petsclib::$UnionPetscLib, u::PetscVec, f::$PetscInt, mu::PetscVec, mf::$PetscInt, eFlux::PetscVec )\n\n    @chk ccall(\n               (:DMPlexComputeL2FluxDiffVec, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, CVec, $PetscInt, CVec),\n               u, f, mu, mf, eFlux,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeClementInterpolant(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, locC::PetscVec) \nThis function computes the L2 projection of the cellwise values of a function u onto P1\n\nCollective\n\nInput Parameters:\n- `dm`   - The `DM`\n- `locX` - The coefficient vector u_h\n\nOutput Parameter:\n- `locC` - A `Vec` which holds the Clement interpolant of the function\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMProjectFunction()`, `DMComputeL2Diff()`, `DMPlexComputeL2FieldDiff()`, `DMComputeL2GradientDiff()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeClementInterpolant\"))\n\"\"\"\nfunction DMPlexComputeClementInterpolant(petsclib::PetscLibType, dm::PetscDM, locX::PetscVec, locC::PetscVec) end\n\n@for_petsc function DMPlexComputeClementInterpolant(petsclib::$UnionPetscLib, dm::PetscDM, locX::PetscVec, locC::PetscVec )\n\n    @chk ccall(\n               (:DMPlexComputeClementInterpolant, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, locX, locC,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeGradientClementInterpolant(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, locC::PetscVec) \nThis function computes the L2 projection of the cellwise gradient of a function u onto P1\n\nCollective\n\nInput Parameters:\n- `dm`   - The `DM`\n- `locX` - The coefficient vector u_h\n\nOutput Parameter:\n- `locC` - A `Vec` which holds the Clement interpolant of the gradient\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMProjectFunction()`, `DMComputeL2Diff()`, `DMPlexComputeL2FieldDiff()`, `DMComputeL2GradientDiff()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeGradientClementInterpolant\"))\n\"\"\"\nfunction DMPlexComputeGradientClementInterpolant(petsclib::PetscLibType, dm::PetscDM, locX::PetscVec, locC::PetscVec) end\n\n@for_petsc function DMPlexComputeGradientClementInterpolant(petsclib::$UnionPetscLib, dm::PetscDM, locX::PetscVec, locC::PetscVec )\n\n    @chk ccall(\n               (:DMPlexComputeGradientClementInterpolant, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, locX, locC,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tintegral::PetscScalar = DMPlexComputeIntegralFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid) \nForm the integral over the domain from the global input X using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`   - The mesh\n- `X`    - Global input vector\n- `user` - The user context\n\nOutput Parameter:\n- `integral` - Integral for each field\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSNESComputeResidualFEM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeIntegralFEM\"))\n\"\"\"\nfunction DMPlexComputeIntegralFEM(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexComputeIntegralFEM(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, user::Cvoid )\n\tintegral_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:DMPlexComputeIntegralFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{$PetscScalar}, Ptr{Cvoid}),\n               dm, X, integral_, user,\n              )\n\n\tintegral = integral_[]\n\n\treturn integral\nend \n\n\"\"\"\n\tDMPlexComputeCellwiseIntegralFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid) \nForm the vector of cellwise integrals F from the global input X using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`   - The mesh\n- `X`    - Global input vector\n- `user` - The user context\n\nOutput Parameter:\n- `F` - Cellwise integrals for each field\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSNESComputeResidualFEM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeCellwiseIntegralFEM\"))\n\"\"\"\nfunction DMPlexComputeCellwiseIntegralFEM(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexComputeCellwiseIntegralFEM(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeCellwiseIntegralFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec, Ptr{Cvoid}),\n               dm, X, F, user,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tDMPlexComputeBdIntegral(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, label::DMLabel, numVals::PetscInt, vals::Vector{PetscInt}, ::Cvoid(funcs) \nForm the integral over the specified boundary from the global input X using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`      - The mesh\n- `X`       - Global input vector\n- `label`   - The boundary `DMLabel`\n- `numVals` - The number of label values to use, or `PETSC_DETERMINE` for all values\n- `vals`    - The label values to use, or NULL for all values\n- `funcs`   - The functions to integrate along the boundary for each field\n- `user`    - The user context\n\nOutput Parameter:\n- `integral` - Integral for each field\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexComputeIntegralFEM()`, `DMPlexComputeBdResidualFEM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeBdIntegral\"))\n\"\"\"\nfunction DMPlexComputeBdIntegral(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, label::DMLabel, numVals::PetscInt, vals::Vector{PetscInt}, ::Cvoid(funcs) end\n\n@for_petsc function DMPlexComputeBdIntegral(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, label::DMLabel, numVals::$PetscInt, vals::Vector{$PetscInt}, ::Cvoid(funcs )\n\n    @chk ccall(\n               (:DMPlexComputeBdIntegral, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, DMLabel, $PetscInt, Ptr{$PetscInt}, Cvoid(funcs),\n               dm, X, label, numVals, vals, ,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\tDMPlexComputeInterpolatorNested(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, isRefined::PetscBool, In::PetscMat, user::Cvoid) \nForm the local portion of the interpolation matrix from the coarse `DM` to a uniformly refined `DM`.\n\nInput Parameters:\n- `dmc`       - The coarse mesh\n- `dmf`       - The fine mesh\n- `isRefined` - Flag indicating regular refinement, rather than the same topology\n- `user`      - The user context\n\nOutput Parameter:\n- `In` - The interpolation matrix\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexComputeInterpolatorGeneral()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeInterpolatorNested\"))\n\"\"\"\nfunction DMPlexComputeInterpolatorNested(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM, isRefined::PetscBool, In::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexComputeInterpolatorNested(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM, isRefined::PetscBool, In::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeInterpolatorNested, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, PetscBool, CMat, Ptr{Cvoid}),\n               dmc, dmf, isRefined, In, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeMassMatrixNested(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeMassMatrixNested\"))\n\"\"\"\nfunction DMPlexComputeMassMatrixNested(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexComputeMassMatrixNested(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeMassMatrixNested, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, CMat, Ptr{Cvoid}),\n               dmc, dmf, mass, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeInterpolatorGeneral(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, In::PetscMat, user::Cvoid) \nForm the local portion of the interpolation matrix from the coarse `DM` to a non\n\nInput Parameters:\n- `dmf`  - The fine mesh\n- `dmc`  - The coarse mesh\n- `user` - The user context\n\nOutput Parameter:\n- `In` - The interpolation matrix\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexComputeInterpolatorNested()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeInterpolatorGeneral\"))\n\"\"\"\nfunction DMPlexComputeInterpolatorGeneral(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM, In::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexComputeInterpolatorGeneral(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM, In::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeInterpolatorGeneral, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, CMat, Ptr{Cvoid}),\n               dmc, dmf, In, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeMassMatrixGeneral(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid) \nForm the local portion of the mass matrix from the coarse `DM` to a non\n\nInput Parameters:\n- `dmf`  - The fine mesh\n- `dmc`  - The coarse mesh\n- `user` - The user context\n\nOutput Parameter:\n- `mass` - The mass matrix\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexComputeMassMatrixNested()`, `DMPlexComputeInterpolatorNested()`, `DMPlexComputeInterpolatorGeneral()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeMassMatrixGeneral\"))\n\"\"\"\nfunction DMPlexComputeMassMatrixGeneral(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexComputeMassMatrixGeneral(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeMassMatrixGeneral, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, CMat, Ptr{Cvoid}),\n               dmc, dmf, mass, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeInjectorFEM(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, sc::VecScatter, user::Cvoid) \nCompute a mapping from coarse unknowns to fine unknowns\n\nInput Parameters:\n- `dmc`  - The coarse mesh\n- `dmf`  - The fine mesh\n- `user` - The user context\n\nOutput Parameter:\n- `sc` - The mapping\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexComputeInterpolatorNested()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeInjectorFEM\"))\n\"\"\"\nfunction DMPlexComputeInjectorFEM(petsclib::PetscLibType, dmc::PetscDM, dmf::PetscDM, sc::VecScatter, user::Cvoid) end\n\n@for_petsc function DMPlexComputeInjectorFEM(petsclib::$UnionPetscLib, dmc::PetscDM, dmf::PetscDM, sc::VecScatter, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeInjectorFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{VecScatter}, Ptr{Cvoid}),\n               dmc, dmf, sc, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tu::Vector{PetscScalar},u_t::Vector{PetscScalar},a::Vector{PetscScalar} = DMPlexGetCellFields(petsclib::PetscLibType,dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec) \nRetrieve the field values values for a chunk of cells\n\nInput Parameters:\n- `dm`     - The `DM`\n- `cellIS` - The cells to include\n- `locX`   - A local vector with the solution fields\n- `locX_t` - A local vector with solution field time derivatives, or `NULL`\n- `locA`   - A local vector with auxiliary fields, or `NULL`\n\nOutput Parameters:\n- `u`   - The field coefficients\n- `u_t` - The fields derivative coefficients\n- `a`   - The auxiliary field coefficients\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetFaceFields()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCellFields\"))\n\"\"\"\nfunction DMPlexGetCellFields(petsclib::PetscLibType, dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec) end\n\n@for_petsc function DMPlexGetCellFields(petsclib::$UnionPetscLib, dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec )\n\tu_ = Ref{Ptr{$PetscScalar}}()\n\tu_t_ = Ref{Ptr{$PetscScalar}}()\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexGetCellFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, CVec, CVec, CVec, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               dm, cellIS, locX, locX_t, locA, u_, u_t_, a_,\n              )\n\n\tu = unsafe_wrap(Array, u_[], VecGetLocalSize(petsclib, x); own = false)\n\tu_t = unsafe_wrap(Array, u_t_[], VecGetLocalSize(petsclib, x); own = false)\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn u,u_t,a\nend \n\n\"\"\"\n\tu::Vector{PetscScalar},u_t::Vector{PetscScalar},a::Vector{PetscScalar} = DMPlexRestoreCellFields(petsclib::PetscLibType,dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec) \nRestore the field values values for a chunk of cells\n\nInput Parameters:\n- `dm`     - The `DM`\n- `cellIS` - The cells to include\n- `locX`   - A local vector with the solution fields\n- `locX_t` - A local vector with solution field time derivatives, or `NULL`\n- `locA`   - A local vector with auxiliary fields, or `NULL`\n\nOutput Parameters:\n- `u`   - The field coefficients\n- `u_t` - The fields derivative coefficients\n- `a`   - The auxiliary field coefficients\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetFaceFields()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreCellFields\"))\n\"\"\"\nfunction DMPlexRestoreCellFields(petsclib::PetscLibType, dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec) end\n\n@for_petsc function DMPlexRestoreCellFields(petsclib::$UnionPetscLib, dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec )\n\tu_ = Ref{Ptr{$PetscScalar}}()\n\tu_t_ = Ref{Ptr{$PetscScalar}}()\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexRestoreCellFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, CVec, CVec, CVec, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               dm, cellIS, locX, locX_t, locA, u_, u_t_, a_,\n              )\n\n\tu = unsafe_wrap(Array, u_[], VecGetLocalSize(petsclib, x); own = false)\n\tu_t = unsafe_wrap(Array, u_t_[], VecGetLocalSize(petsclib, x); own = false)\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn u,u_t,a\nend \n\n\"\"\"\n\tNface::PetscInt,uL::Vector{PetscScalar},uR::Vector{PetscScalar} = DMPlexGetFaceFields(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec) \nRetrieve the field values values for a chunk of faces\n\nInput Parameters:\n- `dm`           - The `DM`\n- `fStart`       - The first face to include\n- `fEnd`         - The first face to exclude\n- `locX`         - A local vector with the solution fields\n- `locX_t`       - A local vector with solution field time derivatives, or `NULL`\n- `faceGeometry` - A local vector with face geometry\n- `cellGeometry` - A local vector with cell geometry\n- `locGrad`      - A local vector with field gradients, or `NULL`\n\nOutput Parameters:\n- `Nface` - The number of faces with field values\n- `uL`    - The field values at the left side of the face\n- `uR`    - The field values at the right side of the face\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellFields()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetFaceFields\"))\n\"\"\"\nfunction DMPlexGetFaceFields(petsclib::PetscLibType, dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec) end\n\n@for_petsc function DMPlexGetFaceFields(petsclib::$UnionPetscLib, dm::PetscDM, fStart::$PetscInt, fEnd::$PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec )\n\tNface_ = Ref{$PetscInt}()\n\tuL_ = Ref{Ptr{$PetscScalar}}()\n\tuR_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexGetFaceFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, CVec, CVec, CVec, CVec, CVec, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               dm, fStart, fEnd, locX, locX_t, faceGeometry, cellGeometry, locGrad, Nface_, uL_, uR_,\n              )\n\n\tNface = Nface_[]\n\tuL = unsafe_wrap(Array, uL_[], VecGetLocalSize(petsclib, x); own = false)\n\tuR = unsafe_wrap(Array, uR_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nface,uL,uR\nend \n\n\"\"\"\n\tNface::PetscInt,uL::Vector{PetscScalar},uR::Vector{PetscScalar} = DMPlexRestoreFaceFields(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec) \nRestore the field values values for a chunk of faces\n\nInput Parameters:\n- `dm`           - The `DM`\n- `fStart`       - The first face to include\n- `fEnd`         - The first face to exclude\n- `locX`         - A local vector with the solution fields\n- `locX_t`       - A local vector with solution field time derivatives, or `NULL`\n- `faceGeometry` - A local vector with face geometry\n- `cellGeometry` - A local vector with cell geometry\n- `locGrad`      - A local vector with field gradients, or `NULL`\n\nOutput Parameters:\n- `Nface` - The number of faces with field values\n- `uL`    - The field values at the left side of the face\n- `uR`    - The field values at the right side of the face\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetFaceFields()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreFaceFields\"))\n\"\"\"\nfunction DMPlexRestoreFaceFields(petsclib::PetscLibType, dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec) end\n\n@for_petsc function DMPlexRestoreFaceFields(petsclib::$UnionPetscLib, dm::PetscDM, fStart::$PetscInt, fEnd::$PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec )\n\tNface_ = Ref{$PetscInt}()\n\tuL_ = Ref{Ptr{$PetscScalar}}()\n\tuR_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexRestoreFaceFields, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, CVec, CVec, CVec, CVec, CVec, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               dm, fStart, fEnd, locX, locX_t, faceGeometry, cellGeometry, locGrad, Nface_, uL_, uR_,\n              )\n\n\tNface = Nface_[]\n\tuL = unsafe_wrap(Array, uL_[], VecGetLocalSize(petsclib, x); own = false)\n\tuR = unsafe_wrap(Array, uR_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nface,uL,uR\nend \n\n\"\"\"\n\tNface::PetscInt,vol::Vector{PetscReal} = DMPlexGetFaceGeometry(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom}) \nRetrieve the geometric values for a chunk of faces\n\nInput Parameters:\n- `dm`           - The `DM`\n- `fStart`       - The first face to include\n- `fEnd`         - The first face to exclude\n- `faceGeometry` - A local vector with face geometry\n- `cellGeometry` - A local vector with cell geometry\n\nOutput Parameters:\n- `Nface` - The number of faces with field values\n- `fgeom` - The face centroid and normals\n- `vol`   - The cell volumes\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCellFields()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetFaceGeometry\"))\n\"\"\"\nfunction DMPlexGetFaceGeometry(petsclib::PetscLibType, dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom}) end\n\n@for_petsc function DMPlexGetFaceGeometry(petsclib::$UnionPetscLib, dm::PetscDM, fStart::$PetscInt, fEnd::$PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom} )\n\tNface_ = Ref{$PetscInt}()\n\tfgeom_ = Ref(pointer(fgeom))\n\tvol_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:DMPlexGetFaceGeometry, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, CVec, CVec, Ptr{$PetscInt}, Ptr{Ptr{PetscFVFaceGeom}}, Ptr{Ptr{$PetscReal}}),\n               dm, fStart, fEnd, faceGeometry, cellGeometry, Nface_, fgeom_, vol_,\n              )\n\n\tNface = Nface_[]\n\tvol = unsafe_wrap(Array, vol_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nface,vol\nend \n\n\"\"\"\n\tNface::PetscInt,vol::Vector{PetscReal} = DMPlexRestoreFaceGeometry(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom}) \nRestore the field values values for a chunk of faces\n\nInput Parameters:\n- `dm`           - The `DM`\n- `fStart`       - The first face to include\n- `fEnd`         - The first face to exclude\n- `faceGeometry` - A local vector with face geometry\n- `cellGeometry` - A local vector with cell geometry\n\nOutput Parameters:\n- `Nface` - The number of faces with field values\n- `fgeom` - The face centroid and normals\n- `vol`   - The cell volumes\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetFaceFields()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreFaceGeometry\"))\n\"\"\"\nfunction DMPlexRestoreFaceGeometry(petsclib::PetscLibType, dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom}) end\n\n@for_petsc function DMPlexRestoreFaceGeometry(petsclib::$UnionPetscLib, dm::PetscDM, fStart::$PetscInt, fEnd::$PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom} )\n\tNface_ = Ref{$PetscInt}()\n\tfgeom_ = Ref(pointer(fgeom))\n\tvol_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:DMPlexRestoreFaceGeometry, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, CVec, CVec, Ptr{$PetscInt}, Ptr{Ptr{PetscFVFaceGeom}}, Ptr{Ptr{$PetscReal}}),\n               dm, fStart, fEnd, faceGeometry, cellGeometry, Nface_, fgeom_, vol_,\n              )\n\n\tNface = Nface_[]\n\tvol = unsafe_wrap(Array, vol_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nface,vol\nend \n\n\"\"\"\n\tminRadius::PetscReal = DMPlexGetGeometryFVM(petsclib::PetscLibType,dm::PetscDM, facegeom::PetscVec, cellgeom::PetscVec) \nReturn precomputed geometric data\n\nCollective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameters:\n- `facegeom`  - The values precomputed from face geometry\n- `cellgeom`  - The values precomputed from cell geometry\n- `minRadius` - The minimum radius over the mesh of an inscribed sphere in a cell, or `NULL` if not needed\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMTSSetRHSFunctionLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeometryFVM\"))\n\"\"\"\nfunction DMPlexGetGeometryFVM(petsclib::PetscLibType, dm::PetscDM, facegeom::PetscVec, cellgeom::PetscVec) end\n\n@for_petsc function DMPlexGetGeometryFVM(petsclib::$UnionPetscLib, dm::PetscDM, facegeom::PetscVec, cellgeom::PetscVec )\n\tfacegeom_ = Ref(facegeom.ptr)\n\tcellgeom_ = Ref(cellgeom.ptr)\n\tminRadius_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexGetGeometryFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}, Ptr{CVec}, Ptr{$PetscReal}),\n               dm, facegeom_, cellgeom_, minRadius_,\n              )\n\n\tfacegeom.ptr = facegeom_[]\n\tcellgeom.ptr = cellgeom_[]\n\tminRadius = minRadius_[]\n\n\treturn minRadius\nend \n\n\"\"\"\n\tDMPlexGetGradientDM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, dmGrad::PetscDM) \nReturn gradient data layout\n\nCollective\n\nInput Parameters:\n- `dm` - The `DM`\n- `fv` - The `PetscFV`\n\nOutput Parameter:\n- `dmGrad` - The layout for gradient values\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetGeometryFVM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGradientDM\"))\n\"\"\"\nfunction DMPlexGetGradientDM(petsclib::PetscLibType, dm::PetscDM, fv::PetscFV, dmGrad::PetscDM) end\n\n@for_petsc function DMPlexGetGradientDM(petsclib::$UnionPetscLib, dm::PetscDM, fv::PetscFV, dmGrad::PetscDM )\n\tdmGrad_ = Ref(dmGrad.ptr)\n\n    @chk ccall(\n               (:DMPlexGetGradientDM, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFV, Ptr{CDM}),\n               dm, fv, dmGrad_,\n              )\n\n\tdmGrad.ptr = dmGrad_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeBdResidualSingleByKey(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::PetscReal, coordField::DMField, locF::PetscVec) \nCompute the local boundary residual for terms matching the input key\n\nNot collective\n\nInput Parameters:\n- `dm`         - The output `DM`\n- `wf`         - The `PetscWeakForm` holding forms on this boundary\n- `key`        - The `PetscFormKey` indicating what should be integrated\n- `facetIS`    - The `IS` giving a set of faces to integrate over\n- `locX`       - The local solution\n- `locX_t`     - The time derivative of the local solution, or `NULL` for time-independent problems\n- `t`          - The time\n- `coordField` - The `DMField` object with coordinates for these faces\n\nOutput Parameter:\n- `locF` - The local residual\n\nLevel: developer\n\n-seealso: `DMPlexComputeBdResidualSingle()`, `DMPlexComputeJacobianByKey()`, `DMPlexComputeResidualHybridByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeBdResidualSingleByKey\"))\n\"\"\"\nfunction DMPlexComputeBdResidualSingleByKey(petsclib::PetscLibType, dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::PetscReal, coordField::DMField, locF::PetscVec) end\n\n@for_petsc function DMPlexComputeBdResidualSingleByKey(petsclib::$UnionPetscLib, dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::$PetscReal, coordField::DMField, locF::PetscVec )\n\n    @chk ccall(\n               (:DMPlexComputeBdResidualSingleByKey, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscWeakForm, PetscFormKey, CIS, CVec, CVec, $PetscReal, DMField, CVec),\n               dm, wf, key, facetIS, locX, locX_t, t, coordField, locF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeBdResidualSingle(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec) \nCompute the local boundary residual\n\nNot collective\n\nInput Parameters:\n- `dm`     - The output `DM`\n- `wf`     - The `PetscWeakForm` holding forms on this boundary\n- `key`    - The `PetscFormKey` indicating what should be integrated\n- `locX`   - The local solution\n- `locX_t` - The time derivative of the local solution, or `NULL` for time-independent problems\n- `t`      - The time\n\nOutput Parameter:\n- `locF` - The local residual\n\nLevel: developer\n\n-seealso: `DMPlexComputeBdResidualSingleByKey()`, `DMPlexComputeJacobianByKey()`, `DMPlexComputeResidualHybridByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeBdResidualSingle\"))\n\"\"\"\nfunction DMPlexComputeBdResidualSingle(petsclib::PetscLibType, dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec) end\n\n@for_petsc function DMPlexComputeBdResidualSingle(petsclib::$UnionPetscLib, dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, locX::PetscVec, locX_t::PetscVec, t::$PetscReal, locF::PetscVec )\n\n    @chk ccall(\n               (:DMPlexComputeBdResidualSingle, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscWeakForm, PetscFormKey, CVec, CVec, $PetscReal, CVec),\n               dm, wf, key, locX, locX_t, t, locF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeResidualByKey(petsclib::PetscLibType,dm::PetscDM, key::PetscFormKey, cellIS::IS, time::PetscReal, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec, user::Cvoid) \nCompute the local residual for terms matching the input key\n\nCollective\n\nInput Parameters:\n- `dm`     - The output `DM`\n- `key`    - The `PetscFormKey` indicating what should be integrated\n- `cellIS` - The `IS` giving a set of cells to integrate over\n- `time`   - The time, or `PETSC_MIN_REAL` to include implicit terms in a time-independent problems\n- `locX`   - The local solution\n- `locX_t` - The time derivative of the local solution, or `NULL` for time-independent problems\n- `t`      - The time\n- `user`   - An optional user context, passed to the pointwise functions\n\nOutput Parameter:\n- `locF` - The local residual\n\nLevel: developer\n\n-seealso: `DMPlexComputeJacobianByKey()`, `DMPlexComputeResidualHybridByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeResidualByKey\"))\n\"\"\"\nfunction DMPlexComputeResidualByKey(petsclib::PetscLibType, dm::PetscDM, key::PetscFormKey, cellIS::IS, time::PetscReal, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexComputeResidualByKey(petsclib::$UnionPetscLib, dm::PetscDM, key::PetscFormKey, cellIS::IS, time::$PetscReal, locX::PetscVec, locX_t::PetscVec, t::$PetscReal, locF::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeResidualByKey, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFormKey, CIS, $PetscReal, CVec, CVec, $PetscReal, CVec, Ptr{Cvoid}),\n               dm, key, cellIS, time, locX, locX_t, t, locF, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeResidualHybridByKey(petsclib::PetscLibType,dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, time::PetscReal, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec, user::Cvoid) \nCompute the local residual over hybrid cells for terms matching the input key\n\nCollective\n\nInput Parameters:\n- `dm`     - The output `DM`\n- `key`    - The `PetscFormKey` array (left cell, right cell, cohesive cell) indicating what should be integrated\n- `cellIS` - The `IS` give a set of cells to integrate over\n- `time`   - The time, or `PETSC_MIN_REAL` to include implicit terms in a time-independent problems\n- `locX`   - The local solution\n- `locX_t` - The time derivative of the local solution, or `NULL` for time-independent problems\n- `t`      - The time\n- `user`   - An optional user context, passed to the pointwise functions\n\nOutput Parameter:\n- `locF` - The local residual\n\nLevel: developer\n\n-seealso: `DMPlexComputeResidualByKey()`, `DMPlexComputeJacobianByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeResidualHybridByKey\"))\n\"\"\"\nfunction DMPlexComputeResidualHybridByKey(petsclib::PetscLibType, dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, time::PetscReal, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexComputeResidualHybridByKey(petsclib::$UnionPetscLib, dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, time::$PetscReal, locX::PetscVec, locX_t::PetscVec, t::$PetscReal, locF::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeResidualHybridByKey, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscFormKey}, CIS, $PetscReal, CVec, CVec, $PetscReal, CVec, Ptr{Cvoid}),\n               dm, key, cellIS, time, locX, locX_t, t, locF, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeBdJacobianSingleByLabel(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::PetscReal, coordField::DMField, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat) \nCompute the local boundary Jacobian for terms matching the input label\n\nNot collective\n\nInput Parameters:\n- `dm`         - The output `DM`\n- `wf`         - The `PetscWeakForm` holding forms on this boundary\n- `label`      - The `DMLabel` indicating what faces should be integrated over\n- `numValues`  - The number of label values\n- `values`     - The array of label values\n- `fieldI`     - The test field for these integrals\n- `facetIS`    - The `IS` giving the set of possible faces to integrate over (intersected with the label)\n- `locX`       - The local solution\n- `locX_t`     - The time derivative of the local solution, or `NULL` for time-independent problems\n- `t`          - The time\n- `coordField` - The `DMField` object with coordinates for these faces\n- `X_tShift`   - The multiplier for dF/dxdot\n\nOutput Parameters:\n- `Jac`  - The local Jacobian\n- `JacP` - The local Jacobian preconditioner\n\nLevel: developer\n\n-seealso: `DMPlexComputeBdJacobianSingle()`, `DMPlexComputeJacobianByKey()`, `DMPlexComputeResidualHybridByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeBdJacobianSingleByLabel\"))\n\"\"\"\nfunction DMPlexComputeBdJacobianSingleByLabel(petsclib::PetscLibType, dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::PetscReal, coordField::DMField, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat) end\n\n@for_petsc function DMPlexComputeBdJacobianSingleByLabel(petsclib::$UnionPetscLib, dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::$PetscInt, values::Vector{$PetscInt}, fieldI::$PetscInt, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::$PetscReal, coordField::DMField, X_tShift::$PetscReal, Jac::PetscMat, JacP::PetscMat )\n\n    @chk ccall(\n               (:DMPlexComputeBdJacobianSingleByLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscWeakForm, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, CIS, CVec, CVec, $PetscReal, DMField, $PetscReal, CMat, CMat),\n               dm, wf, label, numValues, values, fieldI, facetIS, locX, locX_t, t, coordField, X_tShift, Jac, JacP,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeBdJacobianSingle(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, locX::PetscVec, locX_t::PetscVec, t::PetscReal, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat) \nCompute the local boundary Jacobian\n\nNot collective\n\nInput Parameters:\n- `dm`        - The output `DM`\n- `wf`        - The `PetscWeakForm` holding forms on this boundary\n- `label`     - The `DMLabel` indicating what faces should be integrated over\n- `numValues` - The number of label values\n- `values`    - The array of label values\n- `fieldI`    - The test field for these integrals\n- `locX`      - The local solution\n- `locX_t`    - The time derivative of the local solution, or `NULL` for time-independent problems\n- `t`         - The time\n- `X_tShift`  - The multiplier for dF/dxdot\n\nOutput Parameters:\n- `Jac`  - The local Jacobian\n- `JacP` - The local Jacobian preconditioner\n\nLevel: developer\n\n-seealso: `DMPlexComputeBdJacobianSingleByLabel()`, `DMPlexComputeJacobianByKey()`, `DMPlexComputeResidualHybridByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeBdJacobianSingle\"))\n\"\"\"\nfunction DMPlexComputeBdJacobianSingle(petsclib::PetscLibType, dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, locX::PetscVec, locX_t::PetscVec, t::PetscReal, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat) end\n\n@for_petsc function DMPlexComputeBdJacobianSingle(petsclib::$UnionPetscLib, dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::$PetscInt, values::Vector{$PetscInt}, fieldI::$PetscInt, locX::PetscVec, locX_t::PetscVec, t::$PetscReal, X_tShift::$PetscReal, Jac::PetscMat, JacP::PetscMat )\n\n    @chk ccall(\n               (:DMPlexComputeBdJacobianSingle, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscWeakForm, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, CVec, CVec, $PetscReal, $PetscReal, CMat, CMat),\n               dm, wf, label, numValues, values, fieldI, locX, locX_t, t, X_tShift, Jac, JacP,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeJacobianByKey(petsclib::PetscLibType,dm::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) \nCompute the local Jacobian for terms matching the input key\n\nCollective\n\nInput Parameters:\n- `dm`       - The output `DM`\n- `key`      - The `PetscFormKey` indicating what should be integrated\n- `cellIS`   - The `IS` give a set of cells to integrate over\n- `t`        - The time\n- `X_tShift` - The multiplier for the Jacobian with respect to X_t\n- `locX`     - The local solution\n- `locX_t`   - The time derivative of the local solution, or `NULL` for time-independent problems\n- `user`     - An optional user context, passed to the pointwise functions\n\nOutput Parameters:\n- `Jac`  - The local Jacobian\n- `JacP` - The local Jacobian preconditioner\n\nLevel: developer\n\n-seealso: `DMPlexComputeResidualByKey()`, `DMPlexComputeResidualHybridByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeJacobianByKey\"))\n\"\"\"\nfunction DMPlexComputeJacobianByKey(petsclib::PetscLibType, dm::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexComputeJacobianByKey(petsclib::$UnionPetscLib, dm::PetscDM, key::PetscFormKey, cellIS::IS, t::$PetscReal, X_tShift::$PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeJacobianByKey, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFormKey, CIS, $PetscReal, $PetscReal, CVec, CVec, CMat, CMat, Ptr{Cvoid}),\n               dm, key, cellIS, t, X_tShift, locX, locX_t, Jac, JacP, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeJacobianByKeyGeneral(petsclib::PetscLibType,dmr::PetscDM, dmc::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeJacobianByKeyGeneral\"))\n\"\"\"\nfunction DMPlexComputeJacobianByKeyGeneral(petsclib::PetscLibType, dmr::PetscDM, dmc::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexComputeJacobianByKeyGeneral(petsclib::$UnionPetscLib, dmr::PetscDM, dmc::PetscDM, key::PetscFormKey, cellIS::IS, t::$PetscReal, X_tShift::$PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeJacobianByKeyGeneral, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, PetscFormKey, CIS, $PetscReal, $PetscReal, CVec, CVec, CMat, CMat, Ptr{Cvoid}),\n               dmr, dmc, key, cellIS, t, X_tShift, locX, locX_t, Jac, JacP, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeJacobianHybridByKey(petsclib::PetscLibType,dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) \nCompute the local Jacobian over hybrid cells for terms matching the input key\n\nCollective\n\nInput Parameters:\n- `dm`       - The output `DM`\n- `key`      - The `PetscFormKey` array (left cell, right cell, cohesive cell) indicating what should be integrated\n- `cellIS`   - The `IS` give a set of cells to integrate over\n- `t`        - The time\n- `X_tShift` - The multiplier for the Jacobian with respect to X_t\n- `locX`     - The local solution\n- `locX_t`   - The time derivative of the local solution, or `NULL` for time-independent problems\n- `user`     - An optional user context, passed to the pointwise functions\n\nOutput Parameters:\n- `Jac`  - The local Jacobian\n- `JacP` - The local Jacobian preconditioner\n\nLevel: developer\n\n-seealso: `DMPlexComputeResidualByKey()`, `DMPlexComputeJacobianByKey()`, `DMPlexComputeResidualHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeJacobianHybridByKey\"))\n\"\"\"\nfunction DMPlexComputeJacobianHybridByKey(petsclib::PetscLibType, dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexComputeJacobianHybridByKey(petsclib::$UnionPetscLib, dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, t::$PetscReal, X_tShift::$PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeJacobianHybridByKey, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscFormKey}, CIS, $PetscReal, $PetscReal, CVec, CVec, CMat, CMat, Ptr{Cvoid}),\n               dm, key, cellIS, t, X_tShift, locX, locX_t, Jac, JacP, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeJacobianActionByKey(petsclib::PetscLibType,dm::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, locY::PetscVec, locF::PetscVec, user::Cvoid) \nCompute the local Jacobian for terms matching the input key\n\nCollective\n\nInput Parameters:\n- `dm`       - The output `DM`\n- `key`      - The `PetscFormKey` indicating what should be integrated\n- `cellIS`   - The `IS` give a set of cells to integrate over\n- `t`        - The time\n- `X_tShift` - The multiplier for the Jacobian with respect to X_t\n- `locX`     - The local solution\n- `locX_t`   - The time derivative of the local solution, or `NULL` for time-independent problems\n- `locY`     - The local vector acted on by J\n- `user`     - An optional user context, passed to the pointwise functions\n\nOutput Parameter:\n- `locF` - The local residual F = J(X) Y\n\nLevel: developer\n\n-seealso: `DMPlexComputeResidualByKey()`, `DMPlexComputeJacobianByKey()`, `DMPlexComputeResidualHybridByKey()`, `DMPlexComputeJacobianHybridByKey()`, `PetscFormKey`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeJacobianActionByKey\"))\n\"\"\"\nfunction DMPlexComputeJacobianActionByKey(petsclib::PetscLibType, dm::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, locY::PetscVec, locF::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexComputeJacobianActionByKey(petsclib::$UnionPetscLib, dm::PetscDM, key::PetscFormKey, cellIS::IS, t::$PetscReal, X_tShift::$PetscReal, locX::PetscVec, locX_t::PetscVec, locY::PetscVec, locF::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexComputeJacobianActionByKey, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFormKey, CIS, $PetscReal, $PetscReal, CVec, CVec, CVec, CVec, Ptr{Cvoid}),\n               dm, key, cellIS, t, X_tShift, locX, locX_t, locY, locF, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmoments::Vector{PetscReal} = DMPlexComputeMoments(petsclib::PetscLibType,dm::PetscDM, u::PetscVec) \nCompute the first three moments for a field\n\nNoncollective\n\nInput Parameters:\n- `dm` - the `DMPLEX`\n- `u`  - the field\n\nOutput Parameter:\n- `moments` - the field moments\n\nLevel: intermediate\n\n-seealso: `DM`, `DMPLEX`, `DMSwarmComputeMoments()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeMoments\"))\n\"\"\"\nfunction DMPlexComputeMoments(petsclib::PetscLibType, dm::PetscDM, u::PetscVec) end\n\n@for_petsc function DMPlexComputeMoments(petsclib::$UnionPetscLib, dm::PetscDM, u::PetscVec )\n\tmoments = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexComputeMoments, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, Ptr{$PetscReal}),\n               dm, u, moments,\n              )\n\n\n\treturn moments\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreatePLYFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from a PLY <https://en.wikipedia.org/wiki/PLY_(file_format)> file.\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `filename`    - Name of the .ply file\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DMPLEX` object representing the mesh\n\nLevel: beginner\n\n-seealso: `DMPlexCreateFromFile()`, `DMPlexCreateGmsh()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreatePLYFromFile\"))\n\"\"\"\nfunction DMPlexCreatePLYFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreatePLYFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreatePLYFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscBool, Ptr{CDM}),\n               comm, filename, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPlexVTKWriteAll(petsclib::PetscLibType,odm::PetscObject, viewer::PetscViewer) \nWrite a file containing all the fields that have been provided to the viewer\n\nCollective\n\nInput Parameters:\n- `odm`    - The `DMPLEX` specifying the mesh, passed as a `PetscObject`\n- `viewer` - viewer of type `PETSCVIEWERVTK`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `PETSCVIEWEREXODUSII`, `DMPLEX`, `PETSCVIEWERVTK`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexVTKWriteAll\"))\n\"\"\"\nfunction DMPlexVTKWriteAll(petsclib::PetscLibType, odm::PetscObject, viewer::PetscViewer) end\n\n@for_petsc function DMPlexVTKWriteAll(petsclib::$UnionPetscLib, odm::PetscObject, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMPlexVTKWriteAll, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscViewer),\n               odm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPreallocateOperator(petsclib::PetscLibType,dm::PetscDM, bs::PetscInt, dnz::Vector{PetscInt}, onz::Vector{PetscInt}, dnzu::Vector{PetscInt}, onzu::Vector{PetscInt}, A::PetscMat, fillMatrix::PetscBool) \nCalculate the matrix nonzero pattern based upon the information in the `DM`,\nthe `PetscDS` it contains, and the default `PetscSection`.\n\nCollective\n\nInput Parameters:\n- `dm`         - The `DMPLEX`\n- `bs`         - The matrix blocksize\n- `dnz`        - An array to hold the number of nonzeros in the diagonal block\n- `onz`        - An array to hold the number of nonzeros in the off-diagonal block\n- `dnzu`       - An array to hold the number of nonzeros in the upper triangle of the diagonal block\n- `onzu`       - An array to hold the number of nonzeros in the upper triangle of the off-diagonal block\n- `fillMatrix` - If `PETSC_TRUE`, fill the matrix with zeros\n\nOutput Parameter:\n- `A` - The preallocated matrix\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPreallocateOperator\"))\n\"\"\"\nfunction DMPlexPreallocateOperator(petsclib::PetscLibType, dm::PetscDM, bs::PetscInt, dnz::Vector{PetscInt}, onz::Vector{PetscInt}, dnzu::Vector{PetscInt}, onzu::Vector{PetscInt}, A::PetscMat, fillMatrix::PetscBool) end\n\n@for_petsc function DMPlexPreallocateOperator(petsclib::$UnionPetscLib, dm::PetscDM, bs::$PetscInt, dnz::Vector{$PetscInt}, onz::Vector{$PetscInt}, dnzu::Vector{$PetscInt}, onzu::Vector{$PetscInt}, A::PetscMat, fillMatrix::PetscBool )\n\n    @chk ccall(\n               (:DMPlexPreallocateOperator, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, CMat, PetscBool),\n               dm, bs, dnz, onz, dnzu, onzu, A, fillMatrix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsection::PetscSection = DMPlexCreateSection(petsclib::PetscLibType,dm::PetscDM, label::Vector{DMLabel}, numComp::Vector{PetscInt}, numDof::Vector{PetscInt}, numBC::PetscInt, bcField::Vector{PetscInt}, bcComps::Vector{IS}, bcPoints::Vector{IS}, perm::IS) \nCreate a `PetscSection` based upon the dof layout specification provided.\n\nNot Collective\n\nInput Parameters:\n- `dm`       - The `DMPLEX` object\n- `label`    - An array of `DMLabel` of length `numFields` indicating the mesh support of each field, or `NULL` for the whole mesh\n- `numComp`  - An array of size `numFields` that holds the number of components for each field\n- `numDof`   - An array of size  numFields \\time (dim+1) which holds the number of dof for each field on a mesh piece of dimension d\n- `numBC`    - The number of boundary conditions\n- `bcField`  - An array of size `numBC` giving the field number for each boundary condition\n- `bcComps`  - [Optional] An array of size `numBC` of `IS` holding the field components to which each boundary condition applies\n- `bcPoints` - An array of size `numBC` of `IS` holding the `DMPLEX` points to which each boundary condition applies\n- `perm`     - Optional permutation of the chart, or `NULL`\n\nOutput Parameter:\n- `section` - The `PetscSection` object\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `PetscSectionCreate()`, `PetscSectionSetPermutation()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateSection\"))\n\"\"\"\nfunction DMPlexCreateSection(petsclib::PetscLibType, dm::PetscDM, label::Vector{DMLabel}, numComp::Vector{PetscInt}, numDof::Vector{PetscInt}, numBC::PetscInt, bcField::Vector{PetscInt}, bcComps::Vector{IS}, bcPoints::Vector{IS}, perm::IS) end\n\n@for_petsc function DMPlexCreateSection(petsclib::$UnionPetscLib, dm::PetscDM, label::Vector{DMLabel}, numComp::Vector{$PetscInt}, numDof::Vector{$PetscInt}, numBC::$PetscInt, bcField::Vector{$PetscInt}, bcComps::Vector{IS}, bcPoints::Vector{IS}, perm::IS )\n\tsection_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:DMPlexCreateSection, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMLabel}, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CIS}, Ptr{CIS}, CIS, Ptr{PetscSection}),\n               dm, label, numComp, numDof, numBC, bcField, bcComps, bcPoints, perm, section_,\n              )\n\n\tsection = section_[]\n\n\treturn section\nend \n\n\"\"\"\n\tDMPlexSetReferenceTree(petsclib::PetscLibType,dm::PetscDM, ref::PetscDM) \nset the reference tree for hierarchically non\n\nNot Collective\n\nInput Parameters:\n- `dm`  - The `DMPLEX` object\n- `ref` - The reference tree `DMPLEX` object\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`,`DMPlexGetReferenceTree()`, `DMPlexCreateDefaultReferenceTree()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetReferenceTree\"))\n\"\"\"\nfunction DMPlexSetReferenceTree(petsclib::PetscLibType, dm::PetscDM, ref::PetscDM) end\n\n@for_petsc function DMPlexSetReferenceTree(petsclib::$UnionPetscLib, dm::PetscDM, ref::PetscDM )\n\n    @chk ccall(\n               (:DMPlexSetReferenceTree, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM),\n               dm, ref,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetReferenceTree(petsclib::PetscLibType,dm::PetscDM, ref::PetscDM) \nget the reference tree for hierarchically non\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `ref` - The reference tree `DMPLEX` object\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetReferenceTree()`, `DMPlexCreateDefaultReferenceTree()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetReferenceTree\"))\n\"\"\"\nfunction DMPlexGetReferenceTree(petsclib::PetscLibType, dm::PetscDM, ref::PetscDM) end\n\n@for_petsc function DMPlexGetReferenceTree(petsclib::$UnionPetscLib, dm::PetscDM, ref::PetscDM )\n\tref_ = Ref(ref.ptr)\n\n    @chk ccall(\n               (:DMPlexGetReferenceTree, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CDM}),\n               dm, ref_,\n              )\n\n\tref.ptr = ref_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tchildOrientB::PetscInt,childB::PetscInt = DMPlexReferenceTreeGetChildSymmetry(petsclib::PetscLibType,dm::PetscDM, parent::PetscInt, parentOrientA::PetscInt, childOrientA::PetscInt, childA::PetscInt, parentOrientB::PetscInt) \nGiven a reference tree, transform a childid and orientation from one parent frame to another\n\nInput Parameters:\n- `dm`            - the reference tree `DMPLEX` object\n- `parent`        - the parent point\n- `parentOrientA` - the reference orientation for describing the parent\n- `childOrientA`  - the reference orientation for describing the child\n- `childA`        - the reference childID for describing the child\n- `parentOrientB` - the new orientation for describing the parent\n\nOutput Parameters:\n- `childOrientB` - if not `NULL`, set to the new orientation for describing the child\n- `childB`       - if not `NULL`, the new childID for describing the child\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetReferenceTree()`, `DMPlexSetReferenceTree()`, `DMPlexSetTree()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexReferenceTreeGetChildSymmetry\"))\n\"\"\"\nfunction DMPlexReferenceTreeGetChildSymmetry(petsclib::PetscLibType, dm::PetscDM, parent::PetscInt, parentOrientA::PetscInt, childOrientA::PetscInt, childA::PetscInt, parentOrientB::PetscInt) end\n\n@for_petsc function DMPlexReferenceTreeGetChildSymmetry(petsclib::$UnionPetscLib, dm::PetscDM, parent::$PetscInt, parentOrientA::$PetscInt, childOrientA::$PetscInt, childA::$PetscInt, parentOrientB::$PetscInt )\n\tchildOrientB_ = Ref{$PetscInt}()\n\tchildB_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexReferenceTreeGetChildSymmetry, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, parent, parentOrientA, childOrientA, childA, parentOrientB, childOrientB_, childB_,\n              )\n\n\tchildOrientB = childOrientB_[]\n\tchildB = childB_[]\n\n\treturn childOrientB,childB\nend \n\n\"\"\"\n\tref::PetscDM = DMPlexCreateDefaultReferenceTree(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool) \ncreate a reference tree for isotropic hierarchical mesh refinement.\n\nCollective\n\nInput Parameters:\n- `comm`    - the MPI communicator\n- `dim`     - the spatial dimension\n- `simplex` - Flag for simplex, otherwise use a tensor-product cell\n\nOutput Parameter:\n- `ref` - the reference tree `DMPLEX` object\n\nLevel: intermediate\n\n-seealso: `DMPlexSetReferenceTree()`, `DMPlexGetReferenceTree()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateDefaultReferenceTree\"))\n\"\"\"\nfunction DMPlexCreateDefaultReferenceTree(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool) end\n\n@for_petsc function DMPlexCreateDefaultReferenceTree(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, simplex::PetscBool )\n\tref_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateDefaultReferenceTree, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, PetscBool, Ptr{CDM}),\n               comm, dim, simplex, ref_,\n              )\n\n\tref = PetscDM(ref_[], petsclib)\n\n\treturn ref\nend \n\n\"\"\"\n\tDMPlexSetTree(petsclib::PetscLibType,dm::PetscDM, parentSection::PetscSection, parents::Vector{PetscInt}, childIDs::Vector{PetscInt}) \nset the tree that describes the hierarchy of non\nthe point-to-point constraints determined by the tree: a point is constrained to the points in the closure of its\ntree root.\n\nCollective\n\nInput Parameters:\n- `dm`            - the `DMPLEX` object\n- `parentSection` - a section describing the tree: a point has a parent if it has 1 dof in the section; the section\noffset indexes the parent and childID list; the reference count of parentSection is incremented\n- `parents`       - a list of the point parents; copied, can be destroyed\n- `childIDs`      - identifies the relationship of the child point to the parent point; if there is a reference tree, then\nthe child corresponds to the point in the reference tree with index childIDs; copied, can be destroyed\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetTree()`, `DMPlexSetReferenceTree()`, `DMPlexSetAnchors()`, `DMPlexGetTreeParent()`, `DMPlexGetTreeChildren()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetTree\"))\n\"\"\"\nfunction DMPlexSetTree(petsclib::PetscLibType, dm::PetscDM, parentSection::PetscSection, parents::Vector{PetscInt}, childIDs::Vector{PetscInt}) end\n\n@for_petsc function DMPlexSetTree(petsclib::$UnionPetscLib, dm::PetscDM, parentSection::PetscSection, parents::Vector{$PetscInt}, childIDs::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexSetTree, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSection, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, parentSection, parents, childIDs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tparents::Vector{PetscInt},childIDs::Vector{PetscInt},children::Vector{PetscInt} = DMPlexGetTree(petsclib::PetscLibType,dm::PetscDM, parentSection::PetscSection, childSection::PetscSection) \nget the tree that describes the hierarchy of non\nCollective\n\nInput Parameter:\n- `dm` - the `DMPLEX` object\n\nOutput Parameters:\n- `parentSection` - a section describing the tree: a point has a parent if it has 1 dof in the section; the section\noffset indexes the parent and childID list\n- `parents`       - a list of the point parents\n- `childIDs`      - identifies the relationship of the child point to the parent point; if there is a reference tree, then\nthe child corresponds to the point in the reference tree with index childID\n- `childSection`  - the inverse of the parent section\n- `children`      - a list of the point children\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`,`DMPlexSetTree()`, `DMPlexSetReferenceTree()`, `DMPlexSetAnchors()`, `DMPlexGetTreeParent()`, `DMPlexGetTreeChildren()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetTree\"))\n\"\"\"\nfunction DMPlexGetTree(petsclib::PetscLibType, dm::PetscDM, parentSection::PetscSection, childSection::PetscSection) end\n\n@for_petsc function DMPlexGetTree(petsclib::$UnionPetscLib, dm::PetscDM, parentSection::PetscSection, childSection::PetscSection )\n\tparents_ = Ref{Ptr{$PetscInt}}()\n\tchildIDs_ = Ref{Ptr{$PetscInt}}()\n\tchildren_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetTree, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSection}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{PetscSection}, Ptr{Ptr{$PetscInt}}),\n               dm, parentSection, parents_, childIDs_, childSection, children_,\n              )\n\n\tparents = unsafe_wrap(Array, parents_[], VecGetLocalSize(petsclib, x); own = false)\n\tchildIDs = unsafe_wrap(Array, childIDs_[], VecGetLocalSize(petsclib, x); own = false)\n\tchildren = unsafe_wrap(Array, children_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn parents,childIDs,children\nend \n\n\"\"\"\n\tparent::PetscInt,childID::PetscInt = DMPlexGetTreeParent(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \nget the parent of a point in the tree describing the point hierarchy (not the DAG)\n\nInput Parameters:\n- `dm`    - the `DMPLEX` object\n- `point` - the query point\n\nOutput Parameters:\n- `parent`  - if not `NULL`, set to the parent of the point, or the point itself if the point does not have a parent\n- `childID` - if not `NULL`, set to the child ID of the point with respect to its parent, or 0 if the point\ndoes not have a parent\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetTree()`, `DMPlexGetTree()`, `DMPlexGetTreeChildren()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetTreeParent\"))\n\"\"\"\nfunction DMPlexGetTreeParent(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMPlexGetTreeParent(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\tparent_ = Ref{$PetscInt}()\n\tchildID_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetTreeParent, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, point, parent_, childID_,\n              )\n\n\tparent = parent_[]\n\tchildID = childID_[]\n\n\treturn parent,childID\nend \n\n\"\"\"\n\tnumChildren::PetscInt,children::Vector{PetscInt} = DMPlexGetTreeChildren(petsclib::PetscLibType,dm::PetscDM, point::PetscInt) \nget the children of a point in the tree describing the point hierarchy (not the DAG)\n\nInput Parameters:\n- `dm`    - the `DMPLEX` object\n- `point` - the query point\n\nOutput Parameters:\n- `numChildren` - if not `NULL`, set to the number of children\n- `children`    - if not `NULL`, set to a list children, or set to `NULL` if the point has no children\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexSetTree()`, `DMPlexGetTree()`, `DMPlexGetTreeParent()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetTreeChildren\"))\n\"\"\"\nfunction DMPlexGetTreeChildren(petsclib::PetscLibType, dm::PetscDM, point::PetscInt) end\n\n@for_petsc function DMPlexGetTreeChildren(petsclib::$UnionPetscLib, dm::PetscDM, point::$PetscInt )\n\tnumChildren_ = Ref{$PetscInt}()\n\tchildren_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetTreeChildren, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, point, numChildren_, children_,\n              )\n\n\tnumChildren = numChildren_[]\n\tchildren = unsafe_wrap(Array, children_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numChildren,children\nend \n\n\"\"\"\n\tDMPlexTreeRefineCell(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, ncdm::PetscDM) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexTreeRefineCell\"))\n\"\"\"\nfunction DMPlexTreeRefineCell(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt, ncdm::PetscDM) end\n\n@for_petsc function DMPlexTreeRefineCell(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt, ncdm::PetscDM )\n\tncdm_ = Ref(ncdm.ptr)\n\n    @chk ccall(\n               (:DMPlexTreeRefineCell, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{CDM}),\n               dm, cell, ncdm_,\n              )\n\n\tncdm.ptr = ncdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeInjectorReferenceTree(petsclib::PetscLibType,refTree::PetscDM, inj::PetscMat) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeInjectorReferenceTree\"))\n\"\"\"\nfunction DMPlexComputeInjectorReferenceTree(petsclib::PetscLibType, refTree::PetscDM, inj::PetscMat) end\n\n@for_petsc function DMPlexComputeInjectorReferenceTree(petsclib::$UnionPetscLib, refTree::PetscDM, inj::PetscMat )\n\tinj_ = Ref(inj.ptr)\n\n    @chk ccall(\n               (:DMPlexComputeInjectorReferenceTree, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CMat}),\n               refTree, inj_,\n              )\n\n\tinj.ptr = inj_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransferVecTree(petsclib::PetscLibType,dmIn::PetscDM, vecIn::PetscVec, dmOut::PetscDM, vecOut::PetscVec, sfRefine::PetscSF, sfCoarsen::PetscSF, cidsRefine::PetscInt, cidsCoarsen::PetscInt, useBCs::PetscBool, time::PetscReal) \ntransfer a vector between two meshes that differ from each other by refinement/coarsening\nthat can be represented by a common reference tree used by both.  This routine can be used for a combination of\ncoarsening and refinement at the same time.\n\nCollective\n\nInput Parameters:\n- `dmIn`        - The `DMPLEX` mesh for the input vector\n- `dmOut`       - The second `DMPLEX` mesh\n- `vecIn`       - The input vector\n- `sfRefine`    - A star forest indicating points in the mesh `dmIn` (roots in the star forest) that are parents to points in\nthe mesh `dmOut` (leaves in the star forest), i.e. where `dmOut` is more refined than `dmIn`\n- `sfCoarsen`   - A star forest indicating points in the mesh `dmOut` (roots in the star forest) that are parents to points in\nthe mesh `dmIn` (leaves in the star forest), i.e. where `dmOut` is more coarsened than `dmIn`\n- `cidsRefine`  - The childIds of the points in `dmOut`.  These childIds relate back to the reference tree: childid[j] = k implies\nthat mesh point j of `dmOut` was refined from a point in `dmIn` just as the mesh point k in the reference\ntree was refined from its parent.  childid[j] = -1 indicates that the point j in `dmOut` is exactly\nequivalent to its root in `dmIn`, so no interpolation is necessary.  childid[j] = -2 indicates that this\npoint j in `dmOut` is not a leaf of `sfRefine`.\n- `cidsCoarsen` - The childIds of the points in `dmIn`.  These childIds relate back to the reference tree: childid[j] = k implies\nthat mesh point j of dmIn coarsens to a point in `dmOut` just as the mesh point k in the reference\ntree coarsens to its parent.  childid[j] = -2 indicates that point j in `dmOut` is not a leaf in `sfCoarsen`.\n- `useBCs`      - `PETSC_TRUE` indicates that boundary values should be inserted into `vecIn` before transfer.\n- `time`        - Used if boundary values are time dependent.\n\nOutput Parameter:\n- `vecOut` - Using interpolation and injection operators calculated on the reference tree, the transferred\nprojection of `vecIn` from `dmIn` to `dmOut`.  Note that any field discretized with a `PetscFV` finite volume\nmethod that uses gradient reconstruction will use reconstructed gradients when interpolating from\ncoarse points to fine points.\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscSF`, `Vec`, `PetscFV`, `DMPlexSetReferenceTree()`, `DMPlexGetReferenceTree()`, `PetscFVGetComputeGradients()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexTransferVecTree\"))\n\"\"\"\nfunction DMPlexTransferVecTree(petsclib::PetscLibType, dmIn::PetscDM, vecIn::PetscVec, dmOut::PetscDM, vecOut::PetscVec, sfRefine::PetscSF, sfCoarsen::PetscSF, cidsRefine::PetscInt, cidsCoarsen::PetscInt, useBCs::PetscBool, time::PetscReal) end\n\n@for_petsc function DMPlexTransferVecTree(petsclib::$UnionPetscLib, dmIn::PetscDM, vecIn::PetscVec, dmOut::PetscDM, vecOut::PetscVec, sfRefine::PetscSF, sfCoarsen::PetscSF, cidsRefine::$PetscInt, cidsCoarsen::$PetscInt, useBCs::PetscBool, time::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexTransferVecTree, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CDM, CVec, PetscSF, PetscSF, Ptr{$PetscInt}, Ptr{$PetscInt}, PetscBool, $PetscReal),\n               dmIn, vecIn, dmOut, vecOut, sfRefine, sfCoarsen, cidsRefine, cidsCoarsen, useBCs, time,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexFindVertices(petsclib::PetscLibType,dm::PetscDM, coordinates::PetscVec, eps::PetscReal, points::IS) \nTry to find DAG points based on their coordinates.\n\nNot Collective (provided `DMGetCoordinatesLocalSetUp()` has been already called)\n\nInput Parameters:\n- `dm`          - The `DMPLEX` object\n- `coordinates` - The `Vec` of coordinates of the sought points\n- `eps`         - The tolerance or `PETSC_DEFAULT`\n\nOutput Parameter:\n- `points` - The `IS` of found DAG points or -1\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexCreate()`, `DMGetCoordinatesLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexFindVertices\"))\n\"\"\"\nfunction DMPlexFindVertices(petsclib::PetscLibType, dm::PetscDM, coordinates::PetscVec, eps::PetscReal, points::IS) end\n\n@for_petsc function DMPlexFindVertices(petsclib::$UnionPetscLib, dm::PetscDM, coordinates::PetscVec, eps::$PetscReal, points::IS )\n\n    @chk ccall(\n               (:DMPlexFindVertices, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, $PetscReal, Ptr{CIS}),\n               dm, coordinates, eps, points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tR::Vector{PetscReal} = DMPlexComputeProjection2Dto1D(petsclib::PetscLibType,coords::Vector{PetscScalar}) \nRewrite coordinates to be the 1D projection of the 2D coordinates\n\nNot Collective\n\nInput/Output Parameter:\n- `coords` - The coordinates of a segment, on output the new y-coordinate, and 0 for x, an array of size 4, last two entries are unchanged\n\nOutput Parameter:\n- `R` - The rotation which accomplishes the projection, array of size 4\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexComputeProjection3Dto1D()`, `DMPlexComputeProjection3Dto2D()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeProjection2Dto1D\"))\n\"\"\"\nfunction DMPlexComputeProjection2Dto1D(petsclib::PetscLibType, coords::Vector{PetscScalar}) end\n\n@for_petsc function DMPlexComputeProjection2Dto1D(petsclib::$UnionPetscLib, coords::Vector{$PetscScalar} )\n\tR = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexComputeProjection2Dto1D, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscScalar}, Ptr{$PetscReal}),\n               coords, R,\n              )\n\n\n\treturn R\nend \n\n\"\"\"\n\tR::Vector{PetscReal} = DMPlexComputeProjection3Dto1D(petsclib::PetscLibType,coords::Vector{PetscScalar}) \nRewrite coordinates to be the 1D projection of the 3D coordinates\n\nNot Collective\n\nInput/Output Parameter:\n- `coords` - The coordinates of a segment; on output, the new y-coordinate, and 0 for x and z, an array of size 6, the other entries are unchanged\n\nOutput Parameter:\n- `R` - The rotation which accomplishes the projection, an array of size 9\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexComputeProjection2Dto1D()`, `DMPlexComputeProjection3Dto2D()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeProjection3Dto1D\"))\n\"\"\"\nfunction DMPlexComputeProjection3Dto1D(petsclib::PetscLibType, coords::Vector{PetscScalar}) end\n\n@for_petsc function DMPlexComputeProjection3Dto1D(petsclib::$UnionPetscLib, coords::Vector{$PetscScalar} )\n\tR = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexComputeProjection3Dto1D, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscScalar}, Ptr{$PetscReal}),\n               coords, R,\n              )\n\n\n\treturn R\nend \n\n\"\"\"\n\tR::Vector{PetscReal} = DMPlexComputeProjection3Dto2D(petsclib::PetscLibType,coordSize::PetscInt, coords::Vector{PetscScalar}) \nRewrite coordinates of 3 or more coplanar 3D points to a common 2D basis for the\nplane.  The normal is defined by positive orientation of the first 3 points.\n\nNot Collective\n\nInput Parameter:\n- `coordSize` - Length of coordinate array (3x number of points); must be at least 9 (3 points)\n\nInput/Output Parameter:\n- `coords` - The interlaced coordinates of each coplanar 3D point; on output the first\n2*coordSize/3 entries contain interlaced 2D points, with the rest undefined\n\nOutput Parameter:\n- `R` - 3x3 row-major rotation matrix whose columns are the tangent basis [t1, t2, n].  Multiplying by R^T transforms from original frame to tangent frame.\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexComputeProjection2Dto1D()`, `DMPlexComputeProjection3Dto1D()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeProjection3Dto2D\"))\n\"\"\"\nfunction DMPlexComputeProjection3Dto2D(petsclib::PetscLibType, coordSize::PetscInt, coords::Vector{PetscScalar}) end\n\n@for_petsc function DMPlexComputeProjection3Dto2D(petsclib::$UnionPetscLib, coordSize::$PetscInt, coords::Vector{$PetscScalar} )\n\tR = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexComputeProjection3Dto2D, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscScalar}, Ptr{$PetscReal}),\n               coordSize, coords, R,\n              )\n\n\n\treturn R\nend \n\n\"\"\"\n\tisDG::PetscBool,Nc::PetscInt,array::Vector{PetscScalar},coords::Vector{PetscScalar} = DMPlexGetCellCoordinates(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt) \nGet coordinates for a cell, taking into account periodicity\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX`\n- `cell` - The cell number\n\nOutput Parameters:\n- `isDG`   - Using cellwise coordinates\n- `Nc`     - The number of coordinates\n- `array`  - The coordinate array\n- `coords` - The cell coordinates\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexRestoreCellCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCellCoordinatesLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCellCoordinates\"))\n\"\"\"\nfunction DMPlexGetCellCoordinates(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt) end\n\n@for_petsc function DMPlexGetCellCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt )\n\tisDG_ = Ref{PetscBool}()\n\tNc_ = Ref{$PetscInt}()\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\tcoords_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexGetCellCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscBool}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               dm, cell, isDG_, Nc_, array_, coords_,\n              )\n\n\tisDG = isDG_[]\n\tNc = Nc_[]\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\tcoords = unsafe_wrap(Array, coords_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn isDG,Nc,array,coords\nend \n\n\"\"\"\n\tisDG::PetscBool,Nc::PetscInt,array::Vector{PetscScalar},coords::Vector{PetscScalar} = DMPlexRestoreCellCoordinates(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt) \nGet coordinates for a cell, taking into account periodicity\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX`\n- `cell` - The cell number\n\nOutput Parameters:\n- `isDG`   - Using cellwise coordinates\n- `Nc`     - The number of coordinates\n- `array`  - The coordinate array\n- `coords` - The cell coordinates\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexGetCellCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCellCoordinatesLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreCellCoordinates\"))\n\"\"\"\nfunction DMPlexRestoreCellCoordinates(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt) end\n\n@for_petsc function DMPlexRestoreCellCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt )\n\tisDG_ = Ref{PetscBool}()\n\tNc_ = Ref{$PetscInt}()\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\tcoords_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexRestoreCellCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{PetscBool}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               dm, cell, isDG_, Nc_, array_, coords_,\n              )\n\n\tisDG = isDG_[]\n\tNc = Nc_[]\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\tcoords = unsafe_wrap(Array, coords_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn isDG,Nc,array,coords\nend \n\n\"\"\"\n\tv0::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal},detJ::PetscReal = DMPlexComputeCellGeometryAffineFEM(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt) \nAssuming an affine map, compute the Jacobian, inverse Jacobian, and Jacobian determinant for a given cell\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMPLEX`\n- `cell` - the cell\n\nOutput Parameters:\n- `v0`   - the translation part of this affine transform, meaning the translation to the origin (not the first vertex of the reference cell)\n- `J`    - the Jacobian of the transform from the reference element\n- `invJ` - the inverse of the Jacobian\n- `detJ` - the Jacobian determinant\n\nLevel: advanced\n\n-seealso: `DMPLEX`, `DMPlexComputeCellGeometryFEM()`, `DMGetCoordinateSection()`, `DMGetCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeCellGeometryAffineFEM\"))\n\"\"\"\nfunction DMPlexComputeCellGeometryAffineFEM(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt) end\n\n@for_petsc function DMPlexComputeCellGeometryAffineFEM(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt )\n\tv0 = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tJ = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tinvJ = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tdetJ_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexComputeCellGeometryAffineFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, cell, v0, J, invJ, detJ_,\n              )\n\n\tdetJ = detJ_[]\n\n\treturn v0,J,invJ,detJ\nend \n\n\"\"\"\n\tv::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal},detJ::Vector{PetscReal} = DMPlexComputeCellGeometryFEM(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, quad::PetscQuadrature) \nCompute the Jacobian, inverse Jacobian, and Jacobian determinant at each quadrature point in the given cell\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMPLEX`\n- `cell` - the cell\n- `quad` - the quadrature containing the points in the reference element where the geometry will be evaluated.  If `quad` is `NULL`, geometry will be\nevaluated at the first vertex of the reference element\n\nOutput Parameters:\n- `v`    - the image of the transformed quadrature points, otherwise the image of the first vertex in the closure of the reference element. This is a\none-dimensional array of size cdim * Nq where cdim is the dimension of the `DM` coordinate space and Nq is the number of quadrature points\n- `J`    - the Jacobian of the transform from the reference element at each quadrature point. This is a one-dimensional array of size Nq * cdim * cdim containing\neach Jacobian in column-major order.\n- `invJ` - the inverse of the Jacobian at each quadrature point. This is a one-dimensional array of size Nq * cdim * cdim containing\neach inverse Jacobian in column-major order.\n- `detJ` - the Jacobian determinant at each quadrature point. This is a one-dimensional array of size Nq.\n\nLevel: advanced\n\n-seealso: `DMPLEX`, `DMGetCoordinateSection()`, `DMGetCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeCellGeometryFEM\"))\n\"\"\"\nfunction DMPlexComputeCellGeometryFEM(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt, quad::PetscQuadrature) end\n\n@for_petsc function DMPlexComputeCellGeometryFEM(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt, quad::PetscQuadrature )\n\tv = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tJ = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tinvJ = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tdetJ = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexComputeCellGeometryFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscQuadrature, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, cell, quad, v, J, invJ, detJ,\n              )\n\n\n\treturn v,J,invJ,detJ\nend \n\n\"\"\"\n\tvol::PetscReal,centroid::Vector{PetscReal},normal::Vector{PetscReal} = DMPlexComputeCellGeometryFVM(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt) \nCompute the volume for a given cell\n\nCollective\n\nInput Parameters:\n- `dm`   - the `DMPLEX`\n- `cell` - the cell\n\nOutput Parameters:\n- `vol`      - the cell volume\n- `centroid` - the cell centroid\n- `normal`   - the cell normal, if appropriate\n\nLevel: advanced\n\n-seealso: `DMPLEX`, `DMGetCoordinateSection()`, `DMGetCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeCellGeometryFVM\"))\n\"\"\"\nfunction DMPlexComputeCellGeometryFVM(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt) end\n\n@for_petsc function DMPlexComputeCellGeometryFVM(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt )\n\tvol_ = Ref{$PetscReal}()\n\tcentroid = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tnormal = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexComputeCellGeometryFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, cell, vol_, centroid, normal,\n              )\n\n\tvol = vol_[]\n\n\treturn vol,centroid,normal\nend \n\n\"\"\"\n\tDMPlexComputeGeometryFVM(petsclib::PetscLibType,dm::PetscDM, cellgeom::PetscVec, facegeom::PetscVec) \nComputes the cell and face geometry for a finite volume method\n\nInput Parameter:\n- `dm` - The `DMPLEX`\n\nOutput Parameters:\n- `cellgeom` - A `Vec` of `PetscFVCellGeom` data\n- `facegeom` - A `Vec` of `PetscFVFaceGeom` data\n\nLevel: developer\n\n-seealso: `DMPLEX`, `PetscFVFaceGeom`, `PetscFVCellGeom`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeGeometryFVM\"))\n\"\"\"\nfunction DMPlexComputeGeometryFVM(petsclib::PetscLibType, dm::PetscDM, cellgeom::PetscVec, facegeom::PetscVec) end\n\n@for_petsc function DMPlexComputeGeometryFVM(petsclib::$UnionPetscLib, dm::PetscDM, cellgeom::PetscVec, facegeom::PetscVec )\n\tcellgeom_ = Ref(cellgeom.ptr)\n\tfacegeom_ = Ref(facegeom.ptr)\n\n    @chk ccall(\n               (:DMPlexComputeGeometryFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CVec}, Ptr{CVec}),\n               dm, cellgeom_, facegeom_,\n              )\n\n\tcellgeom.ptr = cellgeom_[]\n\tfacegeom.ptr = facegeom_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tminradius::PetscReal = DMPlexGetMinRadius(petsclib::PetscLibType,dm::PetscDM) \nReturns the minimum distance from any cell centroid to a face\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMPLEX`\n\nOutput Parameter:\n- `minradius` - the minimum cell radius\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMGetCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetMinRadius\"))\n\"\"\"\nfunction DMPlexGetMinRadius(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetMinRadius(petsclib::$UnionPetscLib, dm::PetscDM )\n\tminradius_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexGetMinRadius, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscReal}),\n               dm, minradius_,\n              )\n\n\tminradius = minradius_[]\n\n\treturn minradius\nend \n\n\"\"\"\n\tDMPlexSetMinRadius(petsclib::PetscLibType,dm::PetscDM, minradius::PetscReal) \nSets the minimum distance from the cell centroid to a face\n\nLogically Collective\n\nInput Parameters:\n- `dm`        - the `DMPLEX`\n- `minradius` - the minimum cell radius\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMSetCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetMinRadius\"))\n\"\"\"\nfunction DMPlexSetMinRadius(petsclib::PetscLibType, dm::PetscDM, minradius::PetscReal) end\n\n@for_petsc function DMPlexSetMinRadius(petsclib::$UnionPetscLib, dm::PetscDM, minradius::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexSetMinRadius, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal),\n               dm, minradius,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetCoordinateMap(petsclib::PetscLibType,dm::PetscDM, coordFunc::PetscPoCintFn) \nReturns the function used to map coordinates of newly generated mesh points\n\nNot Collective\n\nInput Parameter:\n- `dm` - the `DMPLEX`\n\nOutput Parameter:\n- `coordFunc` - the mapping function\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMGetCoordinates()`, `DMPlexSetCoordinateMap()`, `PetscPointFn`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetCoordinateMap\"))\n\"\"\"\nfunction DMPlexGetCoordinateMap(petsclib::PetscLibType, dm::PetscDM, coordFunc::PetscPoCintFn) end\n\n@for_petsc function DMPlexGetCoordinateMap(petsclib::$UnionPetscLib, dm::PetscDM, coordFunc::PetscPoCintFn )\n\n    @chk ccall(\n               (:DMPlexGetCoordinateMap, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscPoCintFn),\n               dm, coordFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetCoordinateMap(petsclib::PetscLibType,dm::PetscDM, coordFunc::PetscPoCintFn) \nSets the function used to map coordinates of newly generated mesh points\n\nLogically Collective\n\nInput Parameters:\n- `dm`        - the `DMPLEX`\n- `coordFunc` - the mapping function\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMSetCoordinates()`, `DMPlexGetCoordinateMap()`, `PetscPointFn`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetCoordinateMap\"))\n\"\"\"\nfunction DMPlexSetCoordinateMap(petsclib::PetscLibType, dm::PetscDM, coordFunc::PetscPoCintFn) end\n\n@for_petsc function DMPlexSetCoordinateMap(petsclib::$UnionPetscLib, dm::PetscDM, coordFunc::PetscPoCintFn )\n\n    @chk ccall(\n               (:DMPlexSetCoordinateMap, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscPoCintFn}),\n               dm, coordFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexComputeGradientFVM(petsclib::PetscLibType,dm::PetscDM, fvm::PetscFV, faceGeometry::PetscVec, cellGeometry::PetscVec, dmGrad::PetscDM) \nCompute geometric factors for gradient reconstruction, which are stored in the geometry data, and compute layout for gradient data\n\nCollective\n\nInput Parameters:\n- `dm`           - The `DMPLEX`\n- `fvm`          - The `PetscFV`\n- `cellGeometry` - The face geometry from `DMPlexComputeCellGeometryFVM()`\n\nInput/Output Parameter:\n- `faceGeometry` - The face geometry from `DMPlexComputeFaceGeometryFVM()`; on output\nthe geometric factors for gradient calculation are inserted\n\nOutput Parameter:\n- `dmGrad` - The `DM` describing the layout of gradient data\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexGetFaceGeometryFVM()`, `DMPlexGetCellGeometryFVM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexComputeGradientFVM\"))\n\"\"\"\nfunction DMPlexComputeGradientFVM(petsclib::PetscLibType, dm::PetscDM, fvm::PetscFV, faceGeometry::PetscVec, cellGeometry::PetscVec, dmGrad::PetscDM) end\n\n@for_petsc function DMPlexComputeGradientFVM(petsclib::$UnionPetscLib, dm::PetscDM, fvm::PetscFV, faceGeometry::PetscVec, cellGeometry::PetscVec, dmGrad::PetscDM )\n\tdmGrad_ = Ref(dmGrad.ptr)\n\n    @chk ccall(\n               (:DMPlexComputeGradientFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFV, CVec, CVec, Ptr{CDM}),\n               dm, fvm, faceGeometry, cellGeometry, dmGrad_,\n              )\n\n\tdmGrad.ptr = dmGrad_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetDataFVM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, cellgeom::PetscVec, facegeom::PetscVec, gradDM::PetscDM) \nRetrieve precomputed cell geometry\n\nCollective\n\nInput Parameters:\n- `dm` - The `DM`\n- `fv` - The `PetscFV`\n\nOutput Parameters:\n- `cellgeom` - The cell geometry\n- `facegeom` - The face geometry\n- `gradDM`   - The gradient matrices\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexComputeGeometryFVM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetDataFVM\"))\n\"\"\"\nfunction DMPlexGetDataFVM(petsclib::PetscLibType, dm::PetscDM, fv::PetscFV, cellgeom::PetscVec, facegeom::PetscVec, gradDM::PetscDM) end\n\n@for_petsc function DMPlexGetDataFVM(petsclib::$UnionPetscLib, dm::PetscDM, fv::PetscFV, cellgeom::PetscVec, facegeom::PetscVec, gradDM::PetscDM )\n\tcellgeom_ = Ref(cellgeom.ptr)\n\tfacegeom_ = Ref(facegeom.ptr)\n\tgradDM_ = Ref(gradDM.ptr)\n\n    @chk ccall(\n               (:DMPlexGetDataFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscFV, Ptr{CVec}, Ptr{CVec}, Ptr{CDM}),\n               dm, fv, cellgeom_, facegeom_, gradDM_,\n              )\n\n\tcellgeom.ptr = cellgeom_[]\n\tfacegeom.ptr = facegeom_[]\n\tgradDM.ptr = gradDM_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\trefCoords::Vector{PetscReal} = DMPlexCoordinatesToReference(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, numPoints::PetscInt, realCoords::Vector{PetscReal}) \nPull coordinates back from the mesh to the reference element\nusing a single element map.\n\nNot Collective\n\nInput Parameters:\n- `dm`         - The mesh, with coordinate maps defined either by a `PetscDS` for the coordinate `DM` (see `DMGetCoordinateDM()`) or\nimplicitly by the coordinates of the corner vertices of the cell: as an affine map for simplicial elements, or\nas a multilinear map for tensor-product elements\n- `cell`       - the cell whose map is used.\n- `numPoints`  - the number of points to locate\n- `realCoords` - (numPoints x coordinate dimension) array of coordinates (see `DMGetCoordinateDim()`)\n\nOutput Parameter:\n- `refCoords` - (`numPoints` x `dimension`) array of reference coordinates (see `DMGetDimension()`)\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexReferenceToCoordinates()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCoordinatesToReference\"))\n\"\"\"\nfunction DMPlexCoordinatesToReference(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt, numPoints::PetscInt, realCoords::Vector{PetscReal}) end\n\n@for_petsc function DMPlexCoordinatesToReference(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt, numPoints::$PetscInt, realCoords::Vector{$PetscReal} )\n\trefCoords = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexCoordinatesToReference, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, cell, numPoints, realCoords, refCoords,\n              )\n\n\n\treturn refCoords\nend \n\n\"\"\"\n\trealCoords::Vector{PetscReal} = DMPlexReferenceToCoordinates(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, numPoints::PetscInt, refCoords::Vector{PetscReal}) \nMap references coordinates to coordinates in the mesh for a single element map.\n\nNot Collective\n\nInput Parameters:\n- `dm`        - The mesh, with coordinate maps defined either by a PetscDS for the coordinate `DM` (see `DMGetCoordinateDM()`) or\nimplicitly by the coordinates of the corner vertices of the cell: as an affine map for simplicial elements, or\nas a multilinear map for tensor-product elements\n- `cell`      - the cell whose map is used.\n- `numPoints` - the number of points to locate\n- `refCoords` - (numPoints x dimension) array of reference coordinates (see `DMGetDimension()`)\n\nOutput Parameter:\n- `realCoords` - (numPoints x coordinate dimension) array of coordinates (see `DMGetCoordinateDim()`)\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexCoordinatesToReference()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexReferenceToCoordinates\"))\n\"\"\"\nfunction DMPlexReferenceToCoordinates(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt, numPoints::PetscInt, refCoords::Vector{PetscReal}) end\n\n@for_petsc function DMPlexReferenceToCoordinates(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt, numPoints::$PetscInt, refCoords::Vector{$PetscReal} )\n\trealCoords = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexReferenceToCoordinates, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               dm, cell, numPoints, refCoords, realCoords,\n              )\n\n\n\treturn realCoords\nend \n\n\"\"\"\n\tDMPlexRemapGeometry(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, func::external) \nThis function maps the original `DM` coordinates to new coordinates.\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DM`\n- `time` - The time\n- `func` - The function transforming current coordinates to new coordinates\n\nCalling sequence of `func`:\n- `dim`          - The spatial dimension\n- `Nf`           - The number of input fields (here 1)\n- `NfAux`        - The number of input auxiliary fields\n- `uOff`         - The offset of the coordinates in u[] (here 0)\n- `uOff_x`       - The offset of the coordinates in u_x[] (here 0)\n- `u`            - The coordinate values at this point in space\n- `u_t`          - The coordinate time derivative at this point in space (here `NULL`)\n- `u_x`          - The coordinate derivatives at this point in space\n- `aOff`         - The offset of each auxiliary field in u[]\n- `aOff_x`       - The offset of each auxiliary field in u_x[]\n- `a`            - The auxiliary field values at this point in space\n- `a_t`          - The auxiliary field time derivative at this point in space (or `NULL`)\n- `a_x`          - The auxiliary field derivatives at this point in space\n- `t`            - The current time\n- `x`            - The coordinates of this point (here not used)\n- `numConstants` - The number of constants\n- `constants`    - The value of each constant\n- `f`            - The new coordinates at this point in space\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCoordinateDM()`, `DMProjectFieldLocal()`, `DMProjectFieldLabelLocal()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRemapGeometry\"))\n\"\"\"\nfunction DMPlexRemapGeometry(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, func::external) end\n\n@for_petsc function DMPlexRemapGeometry(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, func::external )\n\n    @chk ccall(\n               (:DMPlexRemapGeometry, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, external),\n               dm, time, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexShearGeometry(petsclib::PetscLibType,dm::PetscDM, direction::DMDirection, multipliers::Vector{PetscReal}) \nThis shears the domain, meaning adds a multiple of the shear coordinate to all other coordinates.\n\nNot Collective\n\nInput Parameters:\n- `dm`          - The `DMPLEX`\n- `direction`   - The shear coordinate direction, e.g. `DM_X` is the x-axis\n- `multipliers` - The multiplier m for each direction which is not the shear direction\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexRemapGeometry()`, `DMDirection`, `DM_X`, `DM_Y`, `DM_Z`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexShearGeometry\"))\n\"\"\"\nfunction DMPlexShearGeometry(petsclib::PetscLibType, dm::PetscDM, direction::DMDirection, multipliers::Vector{PetscReal}) end\n\n@for_petsc function DMPlexShearGeometry(petsclib::$UnionPetscLib, dm::PetscDM, direction::DMDirection, multipliers::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMPlexShearGeometry, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMDirection, Ptr{$PetscReal}),\n               dm, direction, multipliers,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum_cells::PetscInt,cell_size::PetscInt,num_comp::PetscInt,l_size::PetscInt,offsets::Vector{PetscInt} = DMPlexGetLocalOffsets(petsclib::PetscLibType,dm::PetscDM, domain_label::DMLabel, label_value::PetscInt, height::PetscInt, dm_field::PetscInt) \nAllocate and populate array of local offsets for each cell closure.\n\nNot collective\n\nInput Parameters:\n- `dm`           - The `DMPLEX` object\n- `domain_label` - label for `DMPLEX` domain, or NULL for whole domain\n- `label_value`  - Stratum value\n- `height`       - Height of target cells in `DMPLEX` topology\n- `dm_field`     - Index of `DMPLEX` field\n\nOutput Parameters:\n- `num_cells` - Number of local cells\n- `cell_size` - Size of each cell, given by cell_size * num_comp = num_dof\n- `num_comp`  - Number of components per dof\n- `l_size`    - Size of local vector\n- `offsets`   - Allocated offsets array for cells\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DMPlexGetLocalOffsetsSupport()`, `DM`, `DMPLEX`, `DMLabel`, `DMPlexGetClosureIndices()`, `DMPlexSetClosurePermutationTensor()`, `DMPlexGetCeedRestriction()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetLocalOffsets\"))\n\"\"\"\nfunction DMPlexGetLocalOffsets(petsclib::PetscLibType, dm::PetscDM, domain_label::DMLabel, label_value::PetscInt, height::PetscInt, dm_field::PetscInt) end\n\n@for_petsc function DMPlexGetLocalOffsets(petsclib::$UnionPetscLib, dm::PetscDM, domain_label::DMLabel, label_value::$PetscInt, height::$PetscInt, dm_field::$PetscInt )\n\tnum_cells_ = Ref{$PetscInt}()\n\tcell_size_ = Ref{$PetscInt}()\n\tnum_comp_ = Ref{$PetscInt}()\n\tl_size_ = Ref{$PetscInt}()\n\toffsets_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexGetLocalOffsets, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               dm, domain_label, label_value, height, dm_field, num_cells_, cell_size_, num_comp_, l_size_, offsets_,\n              )\n\n\tnum_cells = num_cells_[]\n\tcell_size = cell_size_[]\n\tnum_comp = num_comp_[]\n\tl_size = l_size_[]\n\toffsets = unsafe_wrap(Array, offsets_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn num_cells,cell_size,num_comp,l_size,offsets\nend \n\n\"\"\"\n\tnum_faces::PetscInt,num_comp::PetscInt,l_size::PetscInt,offsetsNeg::PetscInt,offsetsPos::PetscInt = DMPlexGetLocalOffsetsSupport(petsclib::PetscLibType,dm::PetscDM, domain_label::DMLabel, label_value::PetscInt) \nAllocate and populate arrays of local offsets for each face support.\n\nNot collective\n\nInput Parameters:\n- `dm`           - The `DMPLEX` object\n- `domain_label` - label for `DMPLEX` domain, or NULL for whole domain\n- `label_value`  - Stratum value\n\nOutput Parameters:\n- `num_faces`  - Number of local, non-boundary faces\n- `num_comp`   - Number of components per dof\n- `l_size`     - Size of local vector\n- `offsetsNeg` - Allocated offsets array for cells on the inward normal side of each face\n- `offsetsPos` - Allocated offsets array for cells on the outward normal side of each face\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DMPlexGetLocalOffsets()`, `DM`, `DMPLEX`, `DMLabel`, `DMPlexGetClosureIndices()`, `DMPlexSetClosurePermutationTensor()`, `DMPlexGetCeedRestriction()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetLocalOffsetsSupport\"))\n\"\"\"\nfunction DMPlexGetLocalOffsetsSupport(petsclib::PetscLibType, dm::PetscDM, domain_label::DMLabel, label_value::PetscInt) end\n\n@for_petsc function DMPlexGetLocalOffsetsSupport(petsclib::$UnionPetscLib, dm::PetscDM, domain_label::DMLabel, label_value::$PetscInt )\n\tnum_faces_ = Ref{$PetscInt}()\n\tnum_comp_ = Ref{$PetscInt}()\n\tl_size_ = Ref{$PetscInt}()\n\toffsetsNeg_ = Ref{$PetscInt}()\n\toffsetsPos_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetLocalOffsetsSupport, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, $PetscInt),\n               dm, domain_label, label_value, num_faces_, num_comp_, l_size_, offsetsNeg_, offsetsPos_,\n              )\n\n\tnum_faces = num_faces_[]\n\tnum_comp = num_comp_[]\n\tl_size = l_size_[]\n\toffsetsNeg = offsetsNeg_[]\n\toffsetsPos = offsetsPos_[]\n\n\treturn num_faces,num_comp,l_size,offsetsNeg,offsetsPos\nend \n\n\"\"\"\n\tDMPlexGetOrdering(petsclib::PetscLibType,dm::PetscDM, otype::MatOrderingType, label::DMLabel, perm::IS) \nCalculate a reordering of the mesh\n\nCollective\n\nInput Parameters:\n- `dm`    - The `DMPLEX` object\n- `otype` - type of reordering, see `MatOrderingType`\n- `label` - [Optional] Label used to segregate ordering into sets, or `NULL`\n\nOutput Parameter:\n- `perm` - The point permutation as an `IS`, `perm`[old point number] = new point number\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexPermute()`, `MatOrderingType`, `MatGetOrdering()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetOrdering\"))\n\"\"\"\nfunction DMPlexGetOrdering(petsclib::PetscLibType, dm::PetscDM, otype::MatOrderingType, label::DMLabel, perm::IS) end\n\n@for_petsc function DMPlexGetOrdering(petsclib::$UnionPetscLib, dm::PetscDM, otype::MatOrderingType, label::DMLabel, perm::IS )\n\n    @chk ccall(\n               (:DMPlexGetOrdering, $petsc_library),\n               PetscErrorCode,\n               (CDM, MatOrderingType, DMLabel, Ptr{CIS}),\n               dm, otype, label, perm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetOrdering1D(petsclib::PetscLibType,dm::PetscDM, perm::IS) \nReorder the vertices so that the mesh is in a line\n\nCollective\n\nInput Parameter:\n- `dm` - The `DMPLEX` object\n\nOutput Parameter:\n- `perm` - The point permutation as an `IS`, `perm`[old point number] = new point number\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMPlexGetOrdering()`, `DMPlexPermute()`, `MatGetOrdering()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetOrdering1D\"))\n\"\"\"\nfunction DMPlexGetOrdering1D(petsclib::PetscLibType, dm::PetscDM, perm::IS) end\n\n@for_petsc function DMPlexGetOrdering1D(petsclib::$UnionPetscLib, dm::PetscDM, perm::IS )\n\n    @chk ccall(\n               (:DMPlexGetOrdering1D, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, perm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPermute(petsclib::PetscLibType,dm::PetscDM, perm::IS, pdm::PetscDM) \nReorder the mesh according to the input permutation\n\nCollective\n\nInput Parameters:\n- `dm`   - The `DMPLEX` object\n- `perm` - The point permutation, `perm`[old point number] = new point number\n\nOutput Parameter:\n- `pdm` - The permuted `DM`\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `MatPermute()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexPermute\"))\n\"\"\"\nfunction DMPlexPermute(petsclib::PetscLibType, dm::PetscDM, perm::IS, pdm::PetscDM) end\n\n@for_petsc function DMPlexPermute(petsclib::$UnionPetscLib, dm::PetscDM, perm::IS, pdm::PetscDM )\n\tpdm_ = Ref(pdm.ptr)\n\n    @chk ccall(\n               (:DMPlexPermute, $petsc_library),\n               PetscErrorCode,\n               (CDM, CIS, Ptr{CDM}),\n               dm, perm, pdm_,\n              )\n\n\tpdm.ptr = pdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexReorderSetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag) \nSet flag indicating whether the DM should be reordered by default\n\nLogically Collective\n\nInput Parameters:\n- `dm`      - The `DM`\n- `reorder` - Flag for reordering\n\nLevel: intermediate\n\n-seealso: `DMPlexReorderGetDefault()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexReorderSetDefault\"))\n\"\"\"\nfunction DMPlexReorderSetDefault(petsclib::PetscLibType, dm::PetscDM, reorder::DMReorderDefaultFlag) end\n\n@for_petsc function DMPlexReorderSetDefault(petsclib::$UnionPetscLib, dm::PetscDM, reorder::DMReorderDefaultFlag )\n\n    @chk ccall(\n               (:DMPlexReorderSetDefault, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMReorderDefaultFlag),\n               dm, reorder,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexReorderGetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag) \nGet flag indicating whether the DM should be reordered by default\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM`\n\nOutput Parameter:\n- `reorder` - Flag for reordering\n\nLevel: intermediate\n\n-seealso: `DMPlexReorderSetDefault()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexReorderGetDefault\"))\n\"\"\"\nfunction DMPlexReorderGetDefault(petsclib::PetscLibType, dm::PetscDM, reorder::DMReorderDefaultFlag) end\n\n@for_petsc function DMPlexReorderGetDefault(petsclib::$UnionPetscLib, dm::PetscDM, reorder::DMReorderDefaultFlag )\n\n    @chk ccall(\n               (:DMPlexReorderGetDefault, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMReorderDefaultFlag}),\n               dm, reorder,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexExtrude(petsclib::PetscLibType,dm::PetscDM, layers::PetscInt, thickness::PetscReal, tensor::PetscBool, symmetric::PetscBool, periodic::PetscBool, normal::Vector{PetscReal}, thicknesses::Vector{PetscReal}, activeLabel::DMLabel, edm::PetscDM) \nExtrude a volumetric mesh from the input surface mesh\n\nInput Parameters:\n- `dm`          - The surface mesh\n- `layers`      - The number of extruded layers\n- `thickness`   - The total thickness of the extruded layers, or `PETSC_DETERMINE`\n- `tensor`      - Flag to create tensor produt cells\n- `symmetric`   - Flag to extrude symmetrically about the surface\n- `periodic`    - Flag to extrude periodically\n- `normal`      - Surface normal vector, or `NULL`\n- `thicknesses` - Thickness of each layer, or `NULL`\n- `activeLabel` - `DMLabel` to extrude from, or `NULL` to extrude entire mesh\n\nOutput Parameter:\n- `edm` - The volumetric mesh\n\nOptions Database Keys:\n- `-dm_plex_transform_extrude_thickness <t>`           - The total thickness of extruded layers\n- `-dm_plex_transform_extrude_use_tensor <bool>`       - Use tensor cells when extruding\n- `-dm_plex_transform_extrude_symmetric <bool>`        - Extrude layers symmetrically about the surface\n- `-dm_plex_transform_extrude_periodic <bool>`         - Extrude layers periodically\n- `-dm_plex_transform_extrude_normal <n0,...,nd>`      - Specify the extrusion direction\n- `-dm_plex_transform_extrude_thicknesses <t0,...,tl>` - Specify thickness of each layer\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMExtrude()`, `DMPlexTransform`, `DMPlexTransformExtrudeSetThickness()`, `DMPlexTransformExtrudeSetTensor()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexExtrude\"))\n\"\"\"\nfunction DMPlexExtrude(petsclib::PetscLibType, dm::PetscDM, layers::PetscInt, thickness::PetscReal, tensor::PetscBool, symmetric::PetscBool, periodic::PetscBool, normal::Vector{PetscReal}, thicknesses::Vector{PetscReal}, activeLabel::DMLabel, edm::PetscDM) end\n\n@for_petsc function DMPlexExtrude(petsclib::$UnionPetscLib, dm::PetscDM, layers::$PetscInt, thickness::$PetscReal, tensor::PetscBool, symmetric::PetscBool, periodic::PetscBool, normal::Vector{$PetscReal}, thicknesses::Vector{$PetscReal}, activeLabel::DMLabel, edm::PetscDM )\n\tedm_ = Ref(edm.ptr)\n\n    @chk ccall(\n               (:DMPlexExtrude, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscReal, PetscBool, PetscBool, PetscBool, Ptr{$PetscReal}, Ptr{$PetscReal}, DMLabel, Ptr{CDM}),\n               dm, layers, thickness, tensor, symmetric, periodic, normal, thicknesses, activeLabel, edm_,\n              )\n\n\tedm.ptr = edm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInflateToGeomModelUseXYZ(petsclib::PetscLibType,dm::PetscDM) \nSnaps the vertex coordinates of a `DMPLEX` object representing the mesh to its geometry if some vertices depart from the model. This usually happens with non\n\nCollective\n\nInput Parameter:\n- `dm` - The uninflated `DM` object representing the mesh\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMPlexCreateEGADS()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInflateToGeomModelUseXYZ\"))\n\"\"\"\nfunction DMPlexInflateToGeomModelUseXYZ(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexInflateToGeomModelUseXYZ(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexInflateToGeomModelUseXYZ, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateGeomFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, islite::PetscBool) \nCreate a `DMPLEX` mesh from an EGADS, IGES, or STEP file.\n\nCollective\n\nInput Parameters:\n- `comm`     - The MPI communicator\n- `filename` - The name of the EGADS, IGES, or STEP file\n- `islite`   - Flag for EGADSlite support\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMPlexCreateEGADS()`, `DMPlexCreateEGADSliteFromFile()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateGeomFromFile\"))\n\"\"\"\nfunction DMPlexCreateGeomFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, islite::PetscBool) end\n\n@for_petsc function DMPlexCreateGeomFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, islite::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateGeomFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{CDM}, PetscBool),\n               comm, filename, dm_, islite,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPlexGeomDataAndGrads(petsclib::PetscLibType,dm::PetscDM, fullGeomGrad::PetscBool) \nExposes Control Points and Control Point Weights defining the underlying geometry allowing user manipulation of the geometry.\n\nCollective\n\nInput Parameters:\n- `dm`           - The DM object representing the mesh with PetscContainer containing an EGADS geometry model\n- `fullGeomGrad` - PetscBool flag. Determines how the Surface Area and Volume Gradients wrt to Control Points and Control Point Weights are calculated.\nPETSC_FALSE :: Surface Area Gradient wrt Control Points and Control Point Weights are calculated using the change in the local\nFACE changes (not the entire body). Volume Gradients are not calculated. Faster computations.\nPETSC_TRUE  :: Surface Area Gradietn wrt to Control Points and Control Point Weights are calculated using the change observed in\nthe entire solid body. Volume Gradients are calculated. Slower computation due to the need to generate a new solid\nbody geometry for every Control Point and Control Point Weight change.\n\nOutput Parameter:\n- `dm` - The updated DM object representing the mesh with PetscContainers containing the Control Point, Control Point Weight and Gradient Data.\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMCreate()`, `DMPlexCreateGeom()`, `DMPlexModifyEGADSGeomModel()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGeomDataAndGrads\"))\n\"\"\"\nfunction DMPlexGeomDataAndGrads(petsclib::PetscLibType, dm::PetscDM, fullGeomGrad::PetscBool) end\n\n@for_petsc function DMPlexGeomDataAndGrads(petsclib::$UnionPetscLib, dm::PetscDM, fullGeomGrad::PetscBool )\n\n    @chk ccall(\n               (:DMPlexGeomDataAndGrads, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, fullGeomGrad,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexModifyGeomModel(petsclib::PetscLibType,dm::PetscDM, comm::MPI_Comm, newCP::Vector{PetscScalar}, newW::Vector{PetscScalar}, autoInflate::PetscBool, saveGeom::PetscBool, stpName::String) \nGenerates a new EGADS geometry model based in user provided Control Points and Control Points Weights. Optionally, the function will inflate the DM to the new geometry and save the new geometry to a file.\n\nCollective\n\nInput Parameters:\n- `dm`          - The DM object representing the mesh with PetscContainer containing an EGADS geometry model\n- `comm`        - MPI_Comm object\n- `newCP`       - C Array of [x, y, z] New/Updated Control Point Coordinates defining the geometry (See DMPlexGeomDataAndGrads() for format)\n- `newW`        - C Array of New/Updated Control Point Weights associated with the Control Points defining the new geometry (See DMPlexGemGrads() for format)\n- `autoInflate` - PetscBool Flag denoting if the user would like to inflate the DM points to the new geometry.\n- `saveGeom`    - PetscBool Flag denoting if the user would iike to save the new geometry to a file.\n- `stpName`     - Char Array indicating the name of the file to save the new geometry to. Extension must be included and will denote type of file written.\n*.stp or *.step = STEP File\n*.igs or *.iges = IGES File\n*.egads = EGADS File\n*.brep = BRep File (OpenCASCADE File)\n\nOutput Parameter:\n- `dm` - The updated DM object representing the mesh with PetscContainers containing the updated/modified geometry\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMCreate()`, `DMPlexCreateGeom()`, `DMPlexGeomDataAndGrads()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexModifyGeomModel\"))\n\"\"\"\nfunction DMPlexModifyGeomModel(petsclib::PetscLibType, dm::PetscDM, comm::MPI_Comm, newCP::Vector{PetscScalar}, newW::Vector{PetscScalar}, autoInflate::PetscBool, saveGeom::PetscBool, stpName::String) end\n\n@for_petsc function DMPlexModifyGeomModel(petsclib::$UnionPetscLib, dm::PetscDM, comm::MPI_Comm, newCP::Vector{$PetscScalar}, newW::Vector{$PetscScalar}, autoInflate::PetscBool, saveGeom::PetscBool, stpName::String )\n\n    @chk ccall(\n               (:DMPlexModifyGeomModel, $petsc_library),\n               PetscErrorCode,\n               (CDM, MPI_Comm, Ptr{$PetscScalar}, Ptr{$PetscScalar}, PetscBool, PetscBool, Ptr{Cchar}),\n               dm, comm, newCP, newW, autoInflate, saveGeom, stpName,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetGeomModelTUV(petsclib::PetscLibType,dm::PetscDM) \nGets the [t] (EDGES) and [u, v] (FACES) geometry parameters of DM points that are associated geometry relationships. Requires a DM with a EGADS model attached.\n\nCollective\n\nInput Parameter:\n- `dm` - The DM object representing the mesh with PetscContainer containing an EGADS geometry model\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMCreate()`, `DMPlexCreateGeom()`, `DMPlexGeomDataAndGrads()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelTUV\"))\n\"\"\"\nfunction DMPlexGetGeomModelTUV(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetGeomModelTUV(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexGetGeomModelTUV, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInflateToGeomModelUseTUV(petsclib::PetscLibType,dm::PetscDM) \nInflates the DM to the associated underlying geometry using the [t] {EDGES) and [u, v] (FACES} associated parameters. Requires a DM with an EGADS model attached and a previous call to DMPlexGetGeomModelTUV().\n\nCollective\n\nInput Parameter:\n- `dm` - The DM object representing the mesh with PetscContainer containing an EGADS geometry model\n\nLevel: intermediate\n\n-seealso: `DMPLEX`, `DMCreate()`, `DMPlexCreateGeom()`, `DMPlexGeomDataAndGrads()`, `DMPlexGetGeomModelTUV()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInflateToGeomModelUseTUV\"))\n\"\"\"\nfunction DMPlexInflateToGeomModelUseTUV(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexInflateToGeomModelUseTUV(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexInflateToGeomModelUseTUV, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexInflateToGeomModel(petsclib::PetscLibType,dm::PetscDM, useTUV::PetscBool) \nWrapper function allowing two methods for inflating refined meshes to the underlying geometric domain.\n\nCollective\n\nInput Parameters:\n- `dm`     - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `useTUV` - PetscBool indicating if the user would like to inflate the DMPlex to the underlying geometry\nusing (t) for nodes on EDGEs and (u, v) for nodes on FACEs or using the nodes (x, y, z) coordinates\nand shortest distance routine.\nIf useTUV = PETSC_TRUE, use the (t) or (u, v) parameters to inflate the DMPlex to the CAD geometry.\nIf useTUV = PETSC_FALSE, use the nodes (x, y, z) coordinates and the shortest disctance routine.\n\n-seealso: `DMPlexGetGeomModelTUV()`, `DMPlexInflateToGeomModelUseTUV()`, `DMPlexInflateToGeomModelUseXYZ()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInflateToGeomModel\"))\n\"\"\"\nfunction DMPlexInflateToGeomModel(petsclib::PetscLibType, dm::PetscDM, useTUV::PetscBool) end\n\n@for_petsc function DMPlexInflateToGeomModel(petsclib::$UnionPetscLib, dm::PetscDM, useTUV::PetscBool )\n\n    @chk ccall(\n               (:DMPlexInflateToGeomModel, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool),\n               dm, useTUV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumBodies::PetscInt = DMPlexGetGeomModelBodies(petsclib::PetscLibType,dm::PetscDM, bodies::PetscGeom) \nReturns an array of `PetscGeom` BODY objects attached to the referenced geometric model entity as well as the number of BODYs.\n\nCollective\n\nInput Parameter:\n- `dm` - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n\nOutput Parameters:\n- `bodies`    - Array of PetscGeom BODY objects referenced by the geometric model.\n- `numBodies` - Number of BODYs referenced by the geometric model. Also the size of **bodies array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelBodies\"))\n\"\"\"\nfunction DMPlexGetGeomModelBodies(petsclib::PetscLibType, dm::PetscDM, bodies::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelBodies(petsclib::$UnionPetscLib, dm::PetscDM, bodies::PetscGeom )\n\tnumBodies_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelBodies, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, Ptr{$PetscInt}),\n               dm, bodies, numBodies_,\n              )\n\n\tnumBodies = numBodies_[]\n\n\treturn numBodies\nend \n\n\"\"\"\n\tnumShells::PetscInt = DMPlexGetGeomModelBodyShells(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, shells::PetscGeom) \nReturns an array of `PetscGeom` SHELL objects attached to the referenced BODY geometric entity as well as the number of SHELLs.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom BODY object containing the SHELL objects of interest.\n\nOutput Parameters:\n- `shells`    - Array of PetscGeom SHELL objects referenced by the PetscGeom BODY object\n- `numShells` - Number of SHELLs referenced by the PetscGeom BODY object. Also the size of **shells array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelBodyShells\"))\n\"\"\"\nfunction DMPlexGetGeomModelBodyShells(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, shells::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelBodyShells(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, shells::PetscGeom )\n\tnumShells_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelBodyShells, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, shells, numShells_,\n              )\n\n\tnumShells = numShells_[]\n\n\treturn numShells\nend \n\n\"\"\"\n\tnumFaces::PetscInt = DMPlexGetGeomModelBodyFaces(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, faces::PetscGeom) \nReturns an array of `PetscGeom` FACE objects attached to the referenced BODY geometric entity as well as the number of FACEs.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom BODY object containing the FACE objects of interest.\n\nOutput Parameters:\n- `faces`    - Array of PetscGeom FACE objects referenced by the PetscGeom BODY object\n- `numFaces` - Number of FACEs referenced by the PetscGeom BODY object. Also the size of **faces array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelBodyFaces\"))\n\"\"\"\nfunction DMPlexGetGeomModelBodyFaces(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, faces::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelBodyFaces(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, faces::PetscGeom )\n\tnumFaces_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelBodyFaces, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, faces, numFaces_,\n              )\n\n\tnumFaces = numFaces_[]\n\n\treturn numFaces\nend \n\n\"\"\"\n\tnumLoops::PetscInt = DMPlexGetGeomModelBodyLoops(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, loops::PetscGeom) \nReturns an array of `PetscGeom` Loop objects attached to the referenced BODY geometric entity as well as the number of LOOPs.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom BODY object containing the LOOP objects of interest.\n\nOutput Parameters:\n- `loops`    - Array of PetscGeom FACE objects referenced by the PetscGeom SHELL object\n- `numLoops` - Number of LOOPs referenced by the PetscGeom BODY object. Also the size of **loops array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelBodyLoops\"))\n\"\"\"\nfunction DMPlexGetGeomModelBodyLoops(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, loops::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelBodyLoops(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, loops::PetscGeom )\n\tnumLoops_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelBodyLoops, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, loops, numLoops_,\n              )\n\n\tnumLoops = numLoops_[]\n\n\treturn numLoops\nend \n\n\"\"\"\n\tnumFaces::PetscInt = DMPlexGetGeomModelShellFaces(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, shell::PetscGeom, faces::PetscGeom) \nReturns an array of `PetscGeom` FACE objects attached to the referenced SHELL geometric entity as well as the number of FACEs.\n\nCollective\n\nInput Parameters:\n- `dm`    - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body`  - PetscGeom BODY object containing the FACE objects of interest.\n- `shell` - PetscGeom SHELL object with FACEs of interest.\n\nOutput Parameters:\n- `faces`    - Array of PetscGeom FACE objects referenced by the PetscGeom SHELL object\n- `numFaces` - Number of FACEs referenced by the PetscGeom SHELL object. Also the size of **faces array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelShellFaces\"))\n\"\"\"\nfunction DMPlexGetGeomModelShellFaces(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, shell::PetscGeom, faces::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelShellFaces(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, shell::PetscGeom, faces::PetscGeom )\n\tnumFaces_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelShellFaces, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, shell, faces, numFaces_,\n              )\n\n\tnumFaces = numFaces_[]\n\n\treturn numFaces\nend \n\n\"\"\"\n\tnumLoops::PetscInt = DMPlexGetGeomModelFaceLoops(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, face::PetscGeom, loops::PetscGeom) \nReturns an array of `PetscGeom` LOOP objects attached to the referenced FACE geometric entity as well as the number of LOOPs.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom BODY object containing the LOOP objects of interest.\n- `face` - PetscGeom FACE object with LOOPs of interest.\n\nOutput Parameters:\n- `loops`    - Array of PetscGeom LOOP objects referenced by the PetscGeom FACE object\n- `numLoops` - Number of LOOPs referenced by the PetscGeom FACE object. Also the size of **loops array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelFaceLoops\"))\n\"\"\"\nfunction DMPlexGetGeomModelFaceLoops(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, face::PetscGeom, loops::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelFaceLoops(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, face::PetscGeom, loops::PetscGeom )\n\tnumLoops_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelFaceLoops, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, face, loops, numLoops_,\n              )\n\n\tnumLoops = numLoops_[]\n\n\treturn numLoops\nend \n\n\"\"\"\n\tnumEdges::PetscInt = DMPlexGetGeomModelFaceEdges(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, face::PetscGeom, edges::PetscGeom) \nReturns an array of `PetscGeom` EDGE objects attached to the referenced FACE geometric entity as well as the number of EDGEs.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom Body object containing the EDGE objects of interest.\n- `face` - PetscGeom FACE object with EDGEs of interest.\n\nOutput Parameters:\n- `edges`    - Array of PetscGeom EDGE objects referenced by the PetscGeom FACE object\n- `numEdges` - Number of EDGEs referenced by the PetscGeom FACE object. Also the size of **edges array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelFaceEdges\"))\n\"\"\"\nfunction DMPlexGetGeomModelFaceEdges(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, face::PetscGeom, edges::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelFaceEdges(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, face::PetscGeom, edges::PetscGeom )\n\tnumEdges_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelFaceEdges, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, face, edges, numEdges_,\n              )\n\n\tnumEdges = numEdges_[]\n\n\treturn numEdges\nend \n\n\"\"\"\n\tnumEdges::PetscInt = DMPlexGetGeomModelBodyEdges(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, edges::PetscGeom) \nReturns an array of `PetscGeom` EDGE objects attached to the referenced BODY geometric entity as well as the number of EDGEs.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom body object of interest.\n\nOutput Parameters:\n- `edges`    - Array of PetscGeom EDGE objects referenced by the PetscGeom BODY object\n- `numEdges` - Number of EDGEs referenced by the PetscGeom BODY object. Also the size of **edges array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelBodyEdges\"))\n\"\"\"\nfunction DMPlexGetGeomModelBodyEdges(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, edges::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelBodyEdges(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, edges::PetscGeom )\n\tnumEdges_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelBodyEdges, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, edges, numEdges_,\n              )\n\n\tnumEdges = numEdges_[]\n\n\treturn numEdges\nend \n\n\"\"\"\n\tnumNodes::PetscInt = DMPlexGetGeomModelBodyNodes(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, nodes::PetscGeom) \nReturns an array of `PetscGeom` NODE objects attached to the referenced BODY geometric entity as well as the number of NODES.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom body object of interest.\n\nOutput Parameters:\n- `nodes`    - Array of PetscGeom NODE objects referenced by the PetscGeom BODY object\n- `numNodes` - Number of NODEs referenced by the PetscGeom BODY object. Also the size of **nodes array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelBodyNodes\"))\n\"\"\"\nfunction DMPlexGetGeomModelBodyNodes(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, nodes::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelBodyNodes(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, nodes::PetscGeom )\n\tnumNodes_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelBodyNodes, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, nodes, numNodes_,\n              )\n\n\tnumNodes = numNodes_[]\n\n\treturn numNodes\nend \n\n\"\"\"\n\tnumNodes::PetscInt = DMPlexGetGeomModelEdgeNodes(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, edge::PetscGeom, nodes::PetscGeom) \nReturns an array of `PetscGeom` NODE objects attached to the referenced EDGE geometric entity as well as the number of NODES.\n\nCollective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom body object containing the EDGE object of interest.\n- `edge` - PetscGeom EDGE object with NODEs of interest.\n\nOutput Parameters:\n- `nodes`    - Array of PetscGeom NODE objects referenced by the PetscGeom EDGE object\n- `numNodes` - Number of Nodes referenced by the PetscGeom EDGE object. Also the size of **nodes array.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomModelEdgeNodes\"))\n\"\"\"\nfunction DMPlexGetGeomModelEdgeNodes(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, edge::PetscGeom, nodes::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomModelEdgeNodes(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, edge::PetscGeom, nodes::PetscGeom )\n\tnumNodes_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomModelEdgeNodes, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, edge, nodes, numNodes_,\n              )\n\n\tnumNodes = numNodes_[]\n\n\treturn numNodes\nend \n\n\"\"\"\n\tid::PetscInt = DMPlexGetGeomID(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, topoObj::PetscGeom) \nReturns ID number of the entity in the geometric (CAD) model\n\nCollective\n\nInput Parameters:\n- `dm`      - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body`    - PetscGeom body object containing the lower level entity the ID number is being requested.\n- `topoObj` - PetscGeom SHELL, FACE, LOOP, EDGE, or NODE object for which ID number is being requested.\n\nOutput Parameter:\n- `id` - ID number of the entity\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomID\"))\n\"\"\"\nfunction DMPlexGetGeomID(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, topoObj::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomID(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, topoObj::PetscGeom )\n\tid_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomID, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, PetscGeom, Ptr{$PetscInt}),\n               dm, body, topoObj, id_,\n              )\n\n\tid = id_[]\n\n\treturn id\nend \n\n\"\"\"\n\tDMPlexGetGeomObject(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, geomType::PetscInt, geomID::PetscInt, geomObj::PetscGeom) \nReturns Geometry Object using the objects ID in the geometric (CAD) model\n\nCollective\n\nInput Parameters:\n- `dm`       - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body`     - PetscGeom body object containing the lower level entity the referenced by the ID.\n- `geomType` - Keyword SHELL, FACE, LOOP, EDGE, or NODE of the geometry type for which ID number is being requested.\n- `geomID`   - ID number of the geometry entity being requested.\n\nOutput Parameter:\n- `geomObj` - Geometry Object referenced by the ID number requested.\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomObject\"))\n\"\"\"\nfunction DMPlexGetGeomObject(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, geomType::PetscInt, geomID::PetscInt, geomObj::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomObject(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, geomType::$PetscInt, geomID::$PetscInt, geomObj::PetscGeom )\n\n    @chk ccall(\n               (:DMPlexGetGeomObject, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, $PetscInt, $PetscInt, Ptr{PetscGeom}),\n               dm, body, geomType, geomID, geomObj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumCntrlPnts::PetscInt = DMPlexGetGeomFaceNumOfControlPoints(petsclib::PetscLibType,dm::PetscDM, face::PetscGeom) \nReturns the total number of Control Points (and associated Weights) defining a FACE of a Geometry\n\nNot collective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `face` - PetscGeom FACE object\n\nOutput Parameter:\n- `numCntrlPnts` - Number of Control Points (and Weights) defining the FACE\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomFaceNumOfControlPoints\"))\n\"\"\"\nfunction DMPlexGetGeomFaceNumOfControlPoints(petsclib::PetscLibType, dm::PetscDM, face::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomFaceNumOfControlPoints(petsclib::$UnionPetscLib, dm::PetscDM, face::PetscGeom )\n\tnumCntrlPnts_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomFaceNumOfControlPoints, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, Ptr{$PetscInt}),\n               dm, face, numCntrlPnts_,\n              )\n\n\tnumCntrlPnts = numCntrlPnts_[]\n\n\treturn numCntrlPnts\nend \n\n\"\"\"\n\tvolume::PetscScalar,surfArea::PetscScalar,centerOfGravity::PetscScalar,COGsize::PetscInt,inertiaMatrixCOG::PetscScalar,IMCOGsize::PetscInt = DMPlexGetGeomBodyMassProperties(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom) \nReturns the Volume, Surface Area, Center of Gravity, and Inertia about the Body's Center of Gravity\n\nNot collective\n\nInput Parameters:\n- `dm`   - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `body` - PetscGeom BODY object\n\nOutput Parameters:\n- `volume`           - Volume of the CAD Body attached to the DM Plex\n- `surfArea`         - Surface Area of the CAD Body attached to the DM Plex\n- `centerOfGravity`  - Array with the Center of Gravity coordinates of the CAD Body attached to the DM Plex [x, y, z]\n- `COGszie`          - Size of centerOfGravity[] Array\n- `inertiaMatrixCOG` - Array containing the Inertia about the Body's Center of Gravity [Ixx, Ixy, Ixz, Iyx, Iyy, Iyz, Izx, Izy, Izz]\n- `IMCOGsize`        - Size of inertiaMatrixCOG[] Array\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomBodyMassProperties\"))\n\"\"\"\nfunction DMPlexGetGeomBodyMassProperties(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom) end\n\n@for_petsc function DMPlexGetGeomBodyMassProperties(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom )\n\tvolume_ = Ref{$PetscScalar}()\n\tsurfArea_ = Ref{$PetscScalar}()\n\tcenterOfGravity_ = Ref{$PetscScalar}()\n\tCOGsize_ = Ref{$PetscInt}()\n\tinertiaMatrixCOG_ = Ref{$PetscScalar}()\n\tIMCOGsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomBodyMassProperties, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, Ptr{$PetscScalar}, Ptr{$PetscScalar}, $PetscScalar, Ptr{$PetscInt}, $PetscScalar, Ptr{$PetscInt}),\n               dm, body, volume_, surfArea_, centerOfGravity_, COGsize_, inertiaMatrixCOG_, IMCOGsize_,\n              )\n\n\tvolume = volume_[]\n\tsurfArea = surfArea_[]\n\tcenterOfGravity = centerOfGravity_[]\n\tCOGsize = COGsize_[]\n\tinertiaMatrixCOG = inertiaMatrixCOG_[]\n\tIMCOGsize = IMCOGsize_[]\n\n\treturn volume,surfArea,centerOfGravity,COGsize,inertiaMatrixCOG,IMCOGsize\nend \n\n\"\"\"\n\tvolume::PetscScalar,surfArea::PetscScalar,COGsize::PetscInt,IMCOGsize::PetscInt = DMPlexRestoreGeomBodyMassProperties(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, centerOfGravity::PetscScalar, inertiaMatrixCOG::PetscScalar) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreGeomBodyMassProperties\"))\n\"\"\"\nfunction DMPlexRestoreGeomBodyMassProperties(petsclib::PetscLibType, dm::PetscDM, body::PetscGeom, centerOfGravity::PetscScalar, inertiaMatrixCOG::PetscScalar) end\n\n@for_petsc function DMPlexRestoreGeomBodyMassProperties(petsclib::$UnionPetscLib, dm::PetscDM, body::PetscGeom, centerOfGravity::$PetscScalar, inertiaMatrixCOG::$PetscScalar )\n\tvolume_ = Ref{$PetscScalar}()\n\tsurfArea_ = Ref{$PetscScalar}()\n\tCOGsize_ = Ref{$PetscInt}()\n\tIMCOGsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexRestoreGeomBodyMassProperties, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscGeom, Ptr{$PetscScalar}, Ptr{$PetscScalar}, $PetscScalar, Ptr{$PetscInt}, $PetscScalar, Ptr{$PetscInt}),\n               dm, body, volume_, surfArea_, centerOfGravity, COGsize_, inertiaMatrixCOG, IMCOGsize_,\n              )\n\n\tvolume = volume_[]\n\tsurfArea = surfArea_[]\n\tCOGsize = COGsize_[]\n\tIMCOGsize = IMCOGsize_[]\n\n\treturn volume,surfArea,COGsize,IMCOGsize\nend \n\n\"\"\"\n\tDMPlexFreeGeomObject(petsclib::PetscLibType,dm::PetscDM, geomObj::PetscGeom) \nFrees PetscGeom Objects\n\nNot collective\n\nInput Parameters:\n- `dm`      - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n- `geomObj` - PetscGeom object\n\nLevel: intermediate\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexFreeGeomObject\"))\n\"\"\"\nfunction DMPlexFreeGeomObject(petsclib::PetscLibType, dm::PetscDM, geomObj::PetscGeom) end\n\n@for_petsc function DMPlexFreeGeomObject(petsclib::$UnionPetscLib, dm::PetscDM, geomObj::PetscGeom )\n\n    @chk ccall(\n               (:DMPlexFreeGeomObject, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscGeom}),\n               dm, geomObj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcpCoordDataLength::PetscInt,cpCoordData::PetscScalar,maxNumEquiv::PetscInt,wDataLength::PetscInt,wData::PetscScalar = DMPlexGetGeomCntrlPntAndWeightData(petsclib::PetscLibType,dm::PetscDM, cpHashTable::PetscHMapI, cpEquiv::PetscMat, wHashTable::PetscHMapI) \nGets Control Point and Associated Weight Data for the Geometry attached to the DMPlex\n\nNot collective\n\nInput Parameter:\n- `dm` - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n\nOutput Parameters:\n- `cpHashTable`       - Hash Table containing the relationship between FACE ID and Control Point IDs.\n- `cpCoordDataLength` - Length of cpCoordData Array.\n- `cpCoordData`       - Array holding the Geometry Control Point Coordinate Data.\n- `maxNumEquiv`       - Maximum Number of Equivalent Control Points (Control Points with the same coordinates but different IDs).\n- `cpEquiv`           - Matrix with a size(Number of Control Points, Number or Control Points) which stores a value of 1.0 in locations where Control Points with different IDS (row or column) have the same coordinates\n- `wHashTable`        - Hash Table containing the relationship between FACE ID and Control Point Weight.\n- `wDataLength`       - Length of wData Array.\n- `wData`             - Array holding the Weight for an associated Geometry Control Point.\n\n-seealso:\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomCntrlPntAndWeightData\"))\n\"\"\"\nfunction DMPlexGetGeomCntrlPntAndWeightData(petsclib::PetscLibType, dm::PetscDM, cpHashTable::PetscHMapI, cpEquiv::PetscMat, wHashTable::PetscHMapI) end\n\n@for_petsc function DMPlexGetGeomCntrlPntAndWeightData(petsclib::$UnionPetscLib, dm::PetscDM, cpHashTable::PetscHMapI, cpEquiv::PetscMat, wHashTable::PetscHMapI )\n\tcpCoordDataLength_ = Ref{$PetscInt}()\n\tcpCoordData_ = Ref{$PetscScalar}()\n\tmaxNumEquiv_ = Ref{$PetscInt}()\n\tcpEquiv_ = Ref(cpEquiv.ptr)\n\twDataLength_ = Ref{$PetscInt}()\n\twData_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:DMPlexGetGeomCntrlPntAndWeightData, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscHMapI}, Ptr{$PetscInt}, $PetscScalar, Ptr{$PetscInt}, Ptr{CMat}, Ptr{PetscHMapI}, Ptr{$PetscInt}, $PetscScalar),\n               dm, cpHashTable, cpCoordDataLength_, cpCoordData_, maxNumEquiv_, cpEquiv_, wHashTable, wDataLength_, wData_,\n              )\n\n\tcpCoordDataLength = cpCoordDataLength_[]\n\tcpCoordData = cpCoordData_[]\n\tmaxNumEquiv = maxNumEquiv_[]\n\tcpEquiv.ptr = cpEquiv_[]\n\twDataLength = wDataLength_[]\n\twData = wData_[]\n\n\treturn cpCoordDataLength,cpCoordData,maxNumEquiv,wDataLength,wData\nend \n\n\"\"\"\n\tcpCoordDataLength::PetscInt,maxNumEquiv::PetscInt,wDataLength::PetscInt = DMPlexRestoreGeomCntrlPntAndWeightData(petsclib::PetscLibType,dm::PetscDM, cpHashTable::PetscHMapI, cpCoordData::PetscScalar, cpEquiv::PetscMat, wHashTable::PetscHMapI, wData::PetscScalar) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreGeomCntrlPntAndWeightData\"))\n\"\"\"\nfunction DMPlexRestoreGeomCntrlPntAndWeightData(petsclib::PetscLibType, dm::PetscDM, cpHashTable::PetscHMapI, cpCoordData::PetscScalar, cpEquiv::PetscMat, wHashTable::PetscHMapI, wData::PetscScalar) end\n\n@for_petsc function DMPlexRestoreGeomCntrlPntAndWeightData(petsclib::$UnionPetscLib, dm::PetscDM, cpHashTable::PetscHMapI, cpCoordData::$PetscScalar, cpEquiv::PetscMat, wHashTable::PetscHMapI, wData::$PetscScalar )\n\tcpCoordDataLength_ = Ref{$PetscInt}()\n\tmaxNumEquiv_ = Ref{$PetscInt}()\n\tcpEquiv_ = Ref(cpEquiv.ptr)\n\twDataLength_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexRestoreGeomCntrlPntAndWeightData, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscHMapI}, Ptr{$PetscInt}, $PetscScalar, Ptr{$PetscInt}, Ptr{CMat}, Ptr{PetscHMapI}, Ptr{$PetscInt}, $PetscScalar),\n               dm, cpHashTable, cpCoordDataLength_, cpCoordData, maxNumEquiv_, cpEquiv_, wHashTable, wDataLength_, wData,\n              )\n\n\tcpCoordDataLength = cpCoordDataLength_[]\n\tmaxNumEquiv = maxNumEquiv_[]\n\tcpEquiv.ptr = cpEquiv_[]\n\twDataLength = wDataLength_[]\n\n\treturn cpCoordDataLength,maxNumEquiv,wDataLength\nend \n\n\"\"\"\n\tcpArraySize::PetscInt,gradSACP::PetscScalar,gradVolCP::PetscScalar,wArraySize::PetscInt,gradSAW::PetscScalar,gradVolW::PetscScalar = DMPlexGetGeomGradData(petsclib::PetscLibType,dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat) \nGets Point, Surface and Volume Gradients with respect to changes in Control Points and their associated Weights for the Geometry attached to the DMPlex .\n\nNot collective\n\nInput Parameter:\n- `dm` - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n\nOutput Parameters:\n- `cpSurfGradHashTable` - Hash Table Relating the Control Point ID to the the Row in the cpSurfGrad Matrix\n- `cpSurfGrad`          - Matrix containing the Surface Gradient with respect to the Control Point Data. Data is ranged where the Row corresponds to Control Point ID and the Columns are associated with the Geometric FACE.\n- `cpArraySize`         - The size of arrays gradSACP and gradVolCP and is equal to 3 * total number of Control Points in the Geometry\n- `gradSACP`            - Array containing the Surface Area Gradient with respect to Control Point Data. Data is arranged by Control Point ID * 3 where 3 is for the coordinate dimension.\n- `gradVolCP`           - Array containing the Volume Gradient with respect to Control Point Data. Data is arranged by Control Point ID * 3 where 3 is for the coordinate dimension.\n- `wArraySize`          - The size of arrayws gradSAW and gradVolW and is equal to the total number of Control Points in the Geometry.\n- `gradSAW`             - Array containing the Surface Area Gradient with respect to Control Point Weight. Data is arranged by Control Point ID.\n- `gradVolW`            - Array containing the Volume Gradient with respect to Control Point Weight. Data is arranged by Control Point ID.\n\n-seealso: DMPlexGeomDataAndGrads\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomGradData\"))\n\"\"\"\nfunction DMPlexGetGeomGradData(petsclib::PetscLibType, dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat) end\n\n@for_petsc function DMPlexGetGeomGradData(petsclib::$UnionPetscLib, dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat )\n\tcpSurfGrad_ = Ref(cpSurfGrad.ptr)\n\tcpArraySize_ = Ref{$PetscInt}()\n\tgradSACP_ = Ref{$PetscScalar}()\n\tgradVolCP_ = Ref{$PetscScalar}()\n\twArraySize_ = Ref{$PetscInt}()\n\tgradSAW_ = Ref{$PetscScalar}()\n\tgradVolW_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:DMPlexGetGeomGradData, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscHMapI}, Ptr{CMat}, Ptr{$PetscInt}, $PetscScalar, $PetscScalar, Ptr{$PetscInt}, $PetscScalar, $PetscScalar),\n               dm, cpSurfGradHashTable, cpSurfGrad_, cpArraySize_, gradSACP_, gradVolCP_, wArraySize_, gradSAW_, gradVolW_,\n              )\n\n\tcpSurfGrad.ptr = cpSurfGrad_[]\n\tcpArraySize = cpArraySize_[]\n\tgradSACP = gradSACP_[]\n\tgradVolCP = gradVolCP_[]\n\twArraySize = wArraySize_[]\n\tgradSAW = gradSAW_[]\n\tgradVolW = gradVolW_[]\n\n\treturn cpArraySize,gradSACP,gradVolCP,wArraySize,gradSAW,gradVolW\nend \n\n\"\"\"\n\tcpArraySize::PetscInt,wArraySize::PetscInt = DMPlexRestoreGeomGradData(petsclib::PetscLibType,dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat, gradSACP::PetscScalar, gradVolCP::PetscScalar, gradSAW::PetscScalar, gradVolW::PetscScalar) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRestoreGeomGradData\"))\n\"\"\"\nfunction DMPlexRestoreGeomGradData(petsclib::PetscLibType, dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat, gradSACP::PetscScalar, gradVolCP::PetscScalar, gradSAW::PetscScalar, gradVolW::PetscScalar) end\n\n@for_petsc function DMPlexRestoreGeomGradData(petsclib::$UnionPetscLib, dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat, gradSACP::$PetscScalar, gradVolCP::$PetscScalar, gradSAW::$PetscScalar, gradVolW::$PetscScalar )\n\tcpSurfGrad_ = Ref(cpSurfGrad.ptr)\n\tcpArraySize_ = Ref{$PetscInt}()\n\twArraySize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexRestoreGeomGradData, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscHMapI}, Ptr{CMat}, Ptr{$PetscInt}, $PetscScalar, $PetscScalar, Ptr{$PetscInt}, $PetscScalar, $PetscScalar),\n               dm, cpSurfGradHashTable, cpSurfGrad_, cpArraySize_, gradSACP, gradVolCP, wArraySize_, gradSAW, gradVolW,\n              )\n\n\tcpSurfGrad.ptr = cpSurfGrad_[]\n\tcpArraySize = cpArraySize_[]\n\twArraySize = wArraySize_[]\n\n\treturn cpArraySize,wArraySize\nend \n\n\"\"\"\n\tnumCntrlPnts::PetscInt,cntrlPntFaceMap::PetscInt,cntrlPntWeightFaceMap::PetscInt,cntrlPntEdgeMap::PetscInt,cntrlPntWeightEdgeMap::PetscInt,cntrlPntVertexMap::PetscInt,cntrlPntWeightVertexMap::PetscInt = DMPlexGetGeomCntrlPntMaps(petsclib::PetscLibType,dm::PetscDM) \nGets arrays which maps Control Point IDs to their associated Geometry FACE, EDGE, and VERTEX.\n\nNot collective\n\nInput Parameter:\n- `dm` - The DMPlex object with an attached PetscContainer storing a CAD Geometry object\n\nOutput Parameters:\n- `numCntrlPnts`            - Number of Control Points defining the Geometry attached to the DMPlex\n- `cntrlPntFaceMap`         - Array containing the FACE ID for the Control Point. Array index corresponds to Control Point ID.\n- `cntrlPntWeightFaceMap`   - Array containing the FACE ID for the Control Point Weight. Array index corresponds to Control Point ID.\n- `cntrlPntEdgeMap`         - Array containing the EDGE ID for the Control Point. Array index corresponds to Control Point ID.\n- `cntrlPntWeightEdgeMap`   - Array containing the EDGE ID for the Control Point Weight. Array index corresponds to Control Point ID.\n- `cntrlPntVertexMap`       - Array containing the VERTEX ID for the Control Point. Array index corresponds to Control Point ID.\n- `cntrlPntWeightVertexMap` - Array containing the VERTEX ID for the Control Point Weight. Array index corresponds to Control Point ID.\n\n-seealso: DMPlexGeomDataAndGrads\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGeomCntrlPntMaps\"))\n\"\"\"\nfunction DMPlexGetGeomCntrlPntMaps(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexGetGeomCntrlPntMaps(petsclib::$UnionPetscLib, dm::PetscDM )\n\tnumCntrlPnts_ = Ref{$PetscInt}()\n\tcntrlPntFaceMap_ = Ref{$PetscInt}()\n\tcntrlPntWeightFaceMap_ = Ref{$PetscInt}()\n\tcntrlPntEdgeMap_ = Ref{$PetscInt}()\n\tcntrlPntWeightEdgeMap_ = Ref{$PetscInt}()\n\tcntrlPntVertexMap_ = Ref{$PetscInt}()\n\tcntrlPntWeightVertexMap_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexGetGeomCntrlPntMaps, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt),\n               dm, numCntrlPnts_, cntrlPntFaceMap_, cntrlPntWeightFaceMap_, cntrlPntEdgeMap_, cntrlPntWeightEdgeMap_, cntrlPntVertexMap_, cntrlPntWeightVertexMap_,\n              )\n\n\tnumCntrlPnts = numCntrlPnts_[]\n\tcntrlPntFaceMap = cntrlPntFaceMap_[]\n\tcntrlPntWeightFaceMap = cntrlPntWeightFaceMap_[]\n\tcntrlPntEdgeMap = cntrlPntEdgeMap_[]\n\tcntrlPntWeightEdgeMap = cntrlPntWeightEdgeMap_[]\n\tcntrlPntVertexMap = cntrlPntVertexMap_[]\n\tcntrlPntWeightVertexMap = cntrlPntWeightVertexMap_[]\n\n\treturn numCntrlPnts,cntrlPntFaceMap,cntrlPntWeightFaceMap,cntrlPntEdgeMap,cntrlPntWeightEdgeMap,cntrlPntVertexMap,cntrlPntWeightVertexMap\nend \n\n\"\"\"\n\tDMPlexInvertCell(petsclib::PetscLibType,cellType::DMPolytopeType, cone::Vector{PetscInt}) \nFlips cell orientations since `DMPLEX` stores some of them internally with outward normals.\n\nInput Parameters:\n- `cellType` - The cell type\n- `cone`     - The incoming cone\n\nOutput Parameter:\n- `cone` - The inverted cone (in-place)\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPolytopeType`, `DMPlexGenerate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexInvertCell\"))\n\"\"\"\nfunction DMPlexInvertCell(petsclib::PetscLibType, cellType::DMPolytopeType, cone::Vector{PetscInt}) end\n\n@for_petsc function DMPlexInvertCell(petsclib::$UnionPetscLib, cellType::DMPolytopeType, cone::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexInvertCell, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, Ptr{$PetscInt}),\n               cellType, cone,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexReorderCell(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, cone::Vector{PetscInt}) \nFlips cell orientations since `DMPLEX` stores some of them internally with outward normals.\n\nInput Parameters:\n- `dm`   - The `DMPLEX` object\n- `cell` - The cell\n- `cone` - The incoming cone\n\nOutput Parameter:\n- `cone` - The reordered cone (in-place)\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPolytopeType`, `DMPlexGenerate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexReorderCell\"))\n\"\"\"\nfunction DMPlexReorderCell(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt, cone::Vector{PetscInt}) end\n\n@for_petsc function DMPlexReorderCell(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt, cone::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexReorderCell, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               dm, cell, cone,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTriangleSetOptions(petsclib::PetscLibType,dm::PetscDM, opts::String) \nSet the options used for the Triangle mesh generator\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX` object\n- `opts` - The command line options\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTetgenSetOptions()`, `DMPlexGenerate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexTriangleSetOptions\"))\n\"\"\"\nfunction DMPlexTriangleSetOptions(petsclib::PetscLibType, dm::PetscDM, opts::String) end\n\n@for_petsc function DMPlexTriangleSetOptions(petsclib::$UnionPetscLib, dm::PetscDM, opts::String )\n\n    @chk ccall(\n               (:DMPlexTriangleSetOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, opts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTetgenSetOptions(petsclib::PetscLibType,dm::PetscDM, opts::String) \nSet the options used for the Tetgen mesh generator\n\nNot Collective\n\nInput Parameters:\n- `dm`   - The `DMPLEX` object\n- `opts` - The command line options\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTriangleSetOptions()`, `DMPlexGenerate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexTetgenSetOptions\"))\n\"\"\"\nfunction DMPlexTetgenSetOptions(petsclib::PetscLibType, dm::PetscDM, opts::String) end\n\n@for_petsc function DMPlexTetgenSetOptions(petsclib::$UnionPetscLib, dm::PetscDM, opts::String )\n\n    @chk ccall(\n               (:DMPlexTetgenSetOptions, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, opts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGenerate(petsclib::PetscLibType,boundary::PetscDM, name::String, interpolate::PetscBool, mesh::PetscDM) \nGenerates a mesh.\n\nNot Collective\n\nInput Parameters:\n- `boundary`    - The `DMPLEX` boundary object\n- `name`        - The mesh generation package name\n- `interpolate` - Flag to create intermediate mesh elements\n\nOutput Parameter:\n- `mesh` - The `DMPLEX` object\n\nOptions Database Keys:\n- `-dm_plex_generate <name>` - package to generate mesh, for example, triangle, ctetgen or tetgen\n- `-dm_generator <name>`     - package to generate mesh, for example, triangle, ctetgen or tetgen\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGenerate\"))\n\"\"\"\nfunction DMPlexGenerate(petsclib::PetscLibType, boundary::PetscDM, name::String, interpolate::PetscBool, mesh::PetscDM) end\n\n@for_petsc function DMPlexGenerate(petsclib::$UnionPetscLib, boundary::PetscDM, name::String, interpolate::PetscBool, mesh::PetscDM )\n\tmesh_ = Ref(mesh.ptr)\n\n    @chk ccall(\n               (:DMPlexGenerate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, PetscBool, Ptr{CDM}),\n               boundary, name, interpolate, mesh_,\n              )\n\n\tmesh.ptr = mesh_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexReconstructGradientsFVM(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, grad::PetscVec) \nreconstruct the gradient of a vector using a finite volume method.\n\nInput Parameters:\n- `dm`   - the mesh\n- `locX` - the local representation of the vector\n\nOutput Parameter:\n- `grad` - the global representation of the gradient\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `Vec`, `DMPlexGetGradientDM()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexReconstructGradientsFVM\"))\n\"\"\"\nfunction DMPlexReconstructGradientsFVM(petsclib::PetscLibType, dm::PetscDM, locX::PetscVec, grad::PetscVec) end\n\n@for_petsc function DMPlexReconstructGradientsFVM(petsclib::$UnionPetscLib, dm::PetscDM, locX::PetscVec, grad::PetscVec )\n\n    @chk ccall(\n               (:DMPlexReconstructGradientsFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, CVec),\n               dm, locX, grad,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexCreateCoordinateSpace(petsclib::PetscLibType,dm::PetscDM, degree::PetscInt, locized::PetscBool, project::PetscBool) \nCreates a finite element space for the coordinates\n\nCollective\n\nInput Parameters:\n- `dm`        - The `DMPLEX`\n- `degree`    - The degree of the finite element or `PETSC_DECIDE`\n- `localized` - Flag to create a localized (DG) coordinate space\n- `project`   - Flag to project current coordinates into the space\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscPointFn`, `PetscFECreateLagrange()`, `DMGetCoordinateDM()`, `DMPlexSetCoordinateMap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateCoordinateSpace\"))\n\"\"\"\nfunction DMPlexCreateCoordinateSpace(petsclib::PetscLibType, dm::PetscDM, degree::PetscInt, locized::PetscBool, project::PetscBool) end\n\n@for_petsc function DMPlexCreateCoordinateSpace(petsclib::$UnionPetscLib, dm::PetscDM, degree::$PetscInt, locized::PetscBool, project::PetscBool )\n\n    @chk ccall(\n               (:DMPlexCreateCoordinateSpace, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscBool, PetscBool),\n               dm, degree, locized, project,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewdm::PetscDM = DMPlexCreateDoublet(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, interpolate::PetscBool, refinementLimit::PetscReal) \nCreates a mesh of two cells of the specified type, optionally with later refinement.\n\nCollective\n\nInput Parameters:\n- `comm`            - The communicator for the `DM` object\n- `dim`             - The spatial dimension\n- `simplex`         - Flag for simplicial cells, otherwise they are tensor product cells\n- `interpolate`     - Flag to create intermediate mesh pieces (edges, faces)\n- `refinementLimit` - A nonzero number indicates the largest admissible volume for a refined cell\n\nOutput Parameter:\n- `newdm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateDoublet\"))\n\"\"\"\nfunction DMPlexCreateDoublet(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, interpolate::PetscBool, refinementLimit::PetscReal) end\n\n@for_petsc function DMPlexCreateDoublet(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, simplex::PetscBool, interpolate::PetscBool, refinementLimit::$PetscReal )\n\tnewdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateDoublet, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, PetscBool, PetscBool, $PetscReal, Ptr{CDM}),\n               comm, dim, simplex, interpolate, refinementLimit, newdm_,\n              )\n\n\tnewdm = PetscDM(newdm_[], petsclib)\n\n\treturn newdm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateBoxSurfaceMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, interpolate::PetscBool) \nCreates a mesh on the surface of the tensor product of unit intervals (box) using tensor cells (hexahedra).\n\nCollective\n\nInput Parameters:\n- `comm`        - The communicator for the `DM` object\n- `dim`         - The spatial dimension of the box, so the resulting mesh is has dimension `dim`-1\n- `faces`       - Number of faces per dimension, or `NULL` for (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3D\n- `lower`       - The lower left corner, or `NULL` for (0, 0, 0)\n- `upper`       - The upper right corner, or `NULL` for (1, 1, 1)\n- `interpolate` - Flag to create intermediate mesh pieces (edges, faces)\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMSetFromOptions()`, `DMPlexCreateBoxMesh()`, `DMPlexCreateFromFile()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateBoxSurfaceMesh\"))\n\"\"\"\nfunction DMPlexCreateBoxSurfaceMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateBoxSurfaceMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, faces::Vector{$PetscInt}, lower::Vector{$PetscReal}, upper::Vector{$PetscReal}, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateBoxSurfaceMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, PetscBool, Ptr{CDM}),\n               comm, dim, faces, lower, upper, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateBoxMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, interpolate::PetscBool, locizationHeight::PetscInt, sparseLocalize::PetscBool) \nCreates a mesh on the tensor product of unit intervals (box) using simplices or tensor cells (hexahedra).\n\nCollective\n\nInput Parameters:\n- `comm`               - The communicator for the `DM` object\n- `dim`                - The spatial dimension\n- `simplex`            - `PETSC_TRUE` for simplices, `PETSC_FALSE` for tensor cells\n- `faces`              - Number of faces per dimension, or `NULL` for (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3D\n- `lower`              - The lower left corner, or `NULL` for (0, 0, 0)\n- `upper`              - The upper right corner, or `NULL` for (1, 1, 1)\n- `periodicity`        - The boundary type for the X,Y,Z direction, or `NULL` for `DM_BOUNDARY_NONE`\n- `interpolate`        - Flag to create intermediate mesh pieces (edges, faces)\n- `localizationHeight` - Flag to localize edges and faces in addition to cells; only significant for periodic meshes\n- `sparseLocalize`     - Flag to localize coordinates only for cells near the periodic boundary; only significant for periodic meshes\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMSetFromOptions()`, `DMPlexCreateFromFile()`, `DMPlexCreateHexCylinderMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateBoxMesh\"))\n\"\"\"\nfunction DMPlexCreateBoxMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, interpolate::PetscBool, locizationHeight::PetscInt, sparseLocalize::PetscBool) end\n\n@for_petsc function DMPlexCreateBoxMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, simplex::PetscBool, faces::Vector{$PetscInt}, lower::Vector{$PetscReal}, upper::Vector{$PetscReal}, periodicity::Vector{DMBoundaryType}, interpolate::PetscBool, locizationHeight::$PetscInt, sparseLocalize::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateBoxMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, PetscBool, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{DMBoundaryType}, PetscBool, $PetscInt, PetscBool, Ptr{CDM}),\n               comm, dim, simplex, faces, lower, upper, periodicity, interpolate, locizationHeight, sparseLocalize, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateWedgeBoxMesh(petsclib::PetscLibType,comm::MPI_Comm, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, orderHeight::PetscBool, interpolate::PetscBool) \nCreates a 3\n\nCollective\n\nInput Parameters:\n- `comm`        - The communicator for the `DM` object\n- `faces`       - Number of faces per dimension, or `NULL` for (1, 1, 1)\n- `lower`       - The lower left corner, or `NULL` for (0, 0, 0)\n- `upper`       - The upper right corner, or `NULL` for (1, 1, 1)\n- `periodicity` - The boundary type for the X,Y,Z direction, or `NULL` for `DM_BOUNDARY_NONE`\n- `orderHeight` - If `PETSC_TRUE`, orders the extruded cells in the height first. Otherwise, orders the cell on the layers first\n- `interpolate` - Flag to create intermediate mesh pieces (edges, faces)\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateHexCylinderMesh()`, `DMPlexCreateWedgeCylinderMesh()`, `DMExtrude()`, `DMPlexCreateBoxMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateWedgeBoxMesh\"))\n\"\"\"\nfunction DMPlexCreateWedgeBoxMesh(petsclib::PetscLibType, comm::MPI_Comm, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, orderHeight::PetscBool, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateWedgeBoxMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, faces::Vector{$PetscInt}, lower::Vector{$PetscReal}, upper::Vector{$PetscReal}, periodicity::Vector{DMBoundaryType}, orderHeight::PetscBool, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateWedgeBoxMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{DMBoundaryType}, PetscBool, PetscBool, Ptr{CDM}),\n               comm, faces, lower, upper, periodicity, orderHeight, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateHypercubicMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, edges::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, overlap::PetscInt) \nCreates a periodic mesh on the tensor product of unit intervals using only vertices and edges.\n\nCollective\n\nInput Parameters:\n- `comm`    - The communicator for the `DM` object\n- `dim`     - The spatial dimension\n- `edges`   - Number of edges per dimension, or `NULL` for (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3D\n- `lower`   - The lower left corner, or `NULL` for (0, 0, 0)\n- `upper`   - The upper right corner, or `NULL` for (1, 1, 1)\n- `overlap` - The number of vertices in each direction to include in the overlap (default is 1)\n\nOutput Parameter:\n- `dm` - The DM object\n\nLevel: beginner\n\n-seealso: `DMSetFromOptions()`, `DMPlexCreateFromFile()`, `DMPlexCreateHexCylinderMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateHypercubicMesh\"))\n\"\"\"\nfunction DMPlexCreateHypercubicMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, edges::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, overlap::PetscInt) end\n\n@for_petsc function DMPlexCreateHypercubicMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, edges::Vector{$PetscInt}, lower::Vector{$PetscReal}, upper::Vector{$PetscReal}, overlap::$PetscInt )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateHypercubicMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, Ptr{CDM}),\n               comm, dim, edges, lower, upper, overlap, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPlexSetOptionsPrefix(petsclib::PetscLibType,dm::PetscDM, prefix::String) \nSets the prefix used for searching for all `DM` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `dm`     - the `DM` context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `SNESSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetOptionsPrefix\"))\n\"\"\"\nfunction DMPlexSetOptionsPrefix(petsclib::PetscLibType, dm::PetscDM, prefix::String) end\n\n@for_petsc function DMPlexSetOptionsPrefix(petsclib::$UnionPetscLib, dm::PetscDM, prefix::String )\n\n    @chk ccall(\n               (:DMPlexSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}),\n               dm, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateHexCylinderMesh(petsclib::PetscLibType,comm::MPI_Comm, periodicZ::DMBoundaryType, Nr::PetscInt) \nCreates a mesh on the tensor product of the unit interval with the circle (cylinder) using hexahedra.\n\nCollective\n\nInput Parameters:\n- `comm`      - The communicator for the `DM` object\n- `periodicZ` - The boundary type for the Z direction\n- `Nr`        - The number of refinements to carry out\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateBoxMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateHexCylinderMesh\"))\n\"\"\"\nfunction DMPlexCreateHexCylinderMesh(petsclib::PetscLibType, comm::MPI_Comm, periodicZ::DMBoundaryType, Nr::PetscInt) end\n\n@for_petsc function DMPlexCreateHexCylinderMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, periodicZ::DMBoundaryType, Nr::$PetscInt )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateHexCylinderMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMBoundaryType, $PetscInt, Ptr{CDM}),\n               comm, periodicZ, Nr, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateWedgeCylinderMesh(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, interpolate::PetscBool) \nCreates a mesh on the tensor product of the unit interval with the circle (cylinder) using wedges.\n\nCollective\n\nInput Parameters:\n- `comm`        - The communicator for the `DM` object\n- `n`           - The number of wedges around the origin\n- `interpolate` - Create edges and faces\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateHexCylinderMesh()`, `DMPlexCreateBoxMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateWedgeCylinderMesh\"))\n\"\"\"\nfunction DMPlexCreateWedgeCylinderMesh(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateWedgeCylinderMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateWedgeCylinderMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, PetscBool, Ptr{CDM}),\n               comm, n, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateTPSMesh(petsclib::PetscLibType,comm::MPI_Comm, tpstype::DMPlexTPSType, extent::Vector{PetscInt}, periodic::Vector{DMBoundaryType}, tps_distribute::PetscBool, refinements::PetscInt, layers::PetscInt, thickness::PetscReal) \nCreate a distributed, interpolated mesh of a triply\n\nCollective\n\nInput Parameters:\n- `comm`           - The communicator for the `DM` object\n- `tpstype`        - Type of triply-periodic surface\n- `extent`         - Array of length 3 containing number of periods in each direction\n- `periodic`       - array of length 3 with periodicity, or `NULL` for non-periodic\n- `tps_distribute` - Distribute 2D manifold mesh prior to refinement and extrusion (more scalable)\n- `refinements`    - Number of factor-of-2 refinements of 2D manifold mesh\n- `layers`         - Number of cell layers extruded in normal direction\n- `thickness`      - Thickness in normal direction\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateSphereMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateTPSMesh\"))\n\"\"\"\nfunction DMPlexCreateTPSMesh(petsclib::PetscLibType, comm::MPI_Comm, tpstype::DMPlexTPSType, extent::Vector{PetscInt}, periodic::Vector{DMBoundaryType}, tps_distribute::PetscBool, refinements::PetscInt, layers::PetscInt, thickness::PetscReal) end\n\n@for_petsc function DMPlexCreateTPSMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, tpstype::DMPlexTPSType, extent::Vector{$PetscInt}, periodic::Vector{DMBoundaryType}, tps_distribute::PetscBool, refinements::$PetscInt, layers::$PetscInt, thickness::$PetscReal )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateTPSMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMPlexTPSType, Ptr{$PetscInt}, Ptr{DMBoundaryType}, PetscBool, $PetscInt, $PetscInt, $PetscReal, Ptr{CDM}),\n               comm, tpstype, extent, periodic, tps_distribute, refinements, layers, thickness, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateSphereMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, R::PetscReal) \nCreates a mesh on the d\n\nCollective\n\nInput Parameters:\n- `comm`    - The communicator for the `DM` object\n- `dim`     - The dimension\n- `simplex` - Use simplices, or tensor product cells\n- `R`       - The radius\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateBallMesh()`, `DMPlexCreateBoxMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateSphereMesh\"))\n\"\"\"\nfunction DMPlexCreateSphereMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, R::PetscReal) end\n\n@for_petsc function DMPlexCreateSphereMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, simplex::PetscBool, R::$PetscReal )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateSphereMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, PetscBool, $PetscReal, Ptr{CDM}),\n               comm, dim, simplex, R, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateBallMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, R::PetscReal) \nCreates a simplex mesh on the d\n\nCollective\n\nInput Parameters:\n- `comm` - The communicator for the `DM` object\n- `dim`  - The dimension\n- `R`    - The radius\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nOptions Database Key:\n- `bd_dm_refine` - This will refine the surface mesh preserving the sphere geometry\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateSphereMesh()`, `DMPlexCreateBoxMesh()`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateBallMesh\"))\n\"\"\"\nfunction DMPlexCreateBallMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, R::PetscReal) end\n\n@for_petsc function DMPlexCreateBallMesh(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, R::$PetscReal )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateBallMesh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscReal, Ptr{CDM}),\n               comm, dim, R, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\trefdm::PetscDM = DMPlexCreateReferenceCell(petsclib::PetscLibType,comm::MPI_Comm, ct::DMPolytopeType) \nCreate a `DMPLEX` with the appropriate FEM reference cell\n\nCollective\n\nInput Parameters:\n- `comm` - The communicator\n- `ct`   - The cell type of the reference cell\n\nOutput Parameter:\n- `refdm` - The reference cell\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateBoxMesh()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateReferenceCell\"))\n\"\"\"\nfunction DMPlexCreateReferenceCell(petsclib::PetscLibType, comm::MPI_Comm, ct::DMPolytopeType) end\n\n@for_petsc function DMPlexCreateReferenceCell(petsclib::$UnionPetscLib, comm::MPI_Comm, ct::DMPolytopeType )\n\trefdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateReferenceCell, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMPolytopeType, Ptr{CDM}),\n               comm, ct, refdm_,\n              )\n\n\trefdm = PetscDM(refdm_[], petsclib)\n\n\treturn refdm\nend \n\n\"\"\"\n\tmesh::PetscDM = DMPlexCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `DMPLEX` object, which encapsulates an unstructured mesh, or CW complex, which can be expressed using a Hasse Diagram.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `DMPLEX` object\n\nOutput Parameter:\n- `mesh` - The `DMPLEX` object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMType`, `DMCreate()`, `DMSetType()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreate\"))\n\"\"\"\nfunction DMPlexCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMPlexCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tmesh_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CDM}),\n               comm, mesh_,\n              )\n\n\tmesh = PetscDM(mesh_[], petsclib)\n\n\treturn mesh\nend \n\n\"\"\"\n\tverticesAdjSaved::Vector{PetscInt} = DMPlexBuildFromCellListParallel(petsclib::PetscLibType,dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, numCorners::PetscInt, cells::Vector{PetscInt}, vertexSF::PetscSF) \nBuild a distributed `DMPLEX` topology from a list of vertices for each cell (common mesh generator output) where all cells have the same celltype\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `dm`          - The `DM`\n- `numCells`    - The number of cells owned by this process\n- `numVertices` - The number of vertices to be owned by this process, or `PETSC_DECIDE`\n- `NVertices`   - The global number of vertices, or `PETSC_DETERMINE`\n- `numCorners`  - The number of vertices for each cell\n- `cells`       - An array of  numCells \\times numCorners numbers, the global vertex numbers for each cell\n\nOutput Parameters:\n- `vertexSF`         - (Optional) `PetscSF` describing complete vertex ownership\n- `verticesAdjSaved` - (Optional) vertex adjacency array\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexBuildFromCellList()`, `DMPlexCreateFromCellListParallelPetsc()`, `DMPlexBuildCoordinatesFromCellListParallel()`,\n`PetscSF`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexBuildFromCellListParallel\"))\n\"\"\"\nfunction DMPlexBuildFromCellListParallel(petsclib::PetscLibType, dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, numCorners::PetscInt, cells::Vector{PetscInt}, vertexSF::PetscSF) end\n\n@for_petsc function DMPlexBuildFromCellListParallel(petsclib::$UnionPetscLib, dm::PetscDM, numCells::$PetscInt, numVertices::$PetscInt, NVertices::$PetscInt, numCorners::$PetscInt, cells::Vector{$PetscInt}, vertexSF::PetscSF )\n\tverticesAdjSaved_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexBuildFromCellListParallel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscSF}, Ptr{Ptr{$PetscInt}}),\n               dm, numCells, numVertices, NVertices, numCorners, cells, vertexSF, verticesAdjSaved_,\n              )\n\n\tverticesAdjSaved = unsafe_wrap(Array, verticesAdjSaved_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn verticesAdjSaved\nend \n\n\"\"\"\n\tverticesAdjSaved::Vector{PetscInt} = DMPlexBuildFromCellSectionParallel(petsclib::PetscLibType,dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, cellSection::PetscSection, cells::Vector{PetscInt}, vertexSF::PetscSF) \nBuild distributed `DMPLEX` topology from a list of vertices for each cell (common mesh generator output) allowing multiple celltypes\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `dm`          - The `DM`\n- `numCells`    - The number of cells owned by this process\n- `numVertices` - The number of vertices to be owned by this process, or `PETSC_DECIDE`\n- `NVertices`   - The global number of vertices, or `PETSC_DETERMINE`\n- `cellSection` - The `PetscSection` giving the number of vertices for each cell (layout of cells)\n- `cells`       - An array of the global vertex numbers for each cell\n\nOutput Parameters:\n- `vertexSF`         - (Optional) `PetscSF` describing complete vertex ownership\n- `verticesAdjSaved` - (Optional) vertex adjacency array\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexBuildFromCellListParallel()`, `DMPlexCreateFromCellSectionParallel()`, `DMPlexBuildCoordinatesFromCellListParallel()`,\n`PetscSF`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexBuildFromCellSectionParallel\"))\n\"\"\"\nfunction DMPlexBuildFromCellSectionParallel(petsclib::PetscLibType, dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, cellSection::PetscSection, cells::Vector{PetscInt}, vertexSF::PetscSF) end\n\n@for_petsc function DMPlexBuildFromCellSectionParallel(petsclib::$UnionPetscLib, dm::PetscDM, numCells::$PetscInt, numVertices::$PetscInt, NVertices::$PetscInt, cellSection::PetscSection, cells::Vector{$PetscInt}, vertexSF::PetscSF )\n\tverticesAdjSaved_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexBuildFromCellSectionParallel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, PetscSection, Ptr{$PetscInt}, Ptr{PetscSF}, Ptr{Ptr{$PetscInt}}),\n               dm, numCells, numVertices, NVertices, cellSection, cells, vertexSF, verticesAdjSaved_,\n              )\n\n\tverticesAdjSaved = unsafe_wrap(Array, verticesAdjSaved_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn verticesAdjSaved\nend \n\n\"\"\"\n\tDMPlexBuildCoordinatesFromCellListParallel(petsclib::PetscLibType,dm::PetscDM, spaceDim::PetscInt, sfVert::PetscSF, vertexCoords::Vector{PetscReal}) \nBuild `DM` coordinates from a list of coordinates for each owned vertex (common mesh generator output)\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `dm`           - The `DM`\n- `spaceDim`     - The spatial dimension used for coordinates\n- `sfVert`       - `PetscSF` describing complete vertex ownership\n- `vertexCoords` - An array of numVertices*spaceDim numbers, the coordinates of each vertex\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexBuildCoordinatesFromCellList()`, `DMPlexCreateFromCellListParallelPetsc()`, `DMPlexBuildFromCellListParallel()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexBuildCoordinatesFromCellListParallel\"))\n\"\"\"\nfunction DMPlexBuildCoordinatesFromCellListParallel(petsclib::PetscLibType, dm::PetscDM, spaceDim::PetscInt, sfVert::PetscSF, vertexCoords::Vector{PetscReal}) end\n\n@for_petsc function DMPlexBuildCoordinatesFromCellListParallel(petsclib::$UnionPetscLib, dm::PetscDM, spaceDim::$PetscInt, sfVert::PetscSF, vertexCoords::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMPlexBuildCoordinatesFromCellListParallel, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, PetscSF, Ptr{$PetscReal}),\n               dm, spaceDim, sfVert, vertexCoords,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvertexSF::PetscSF,verticesAdj::Vector{PetscInt},dm::PetscDM = DMPlexCreateFromCellListParallelPetsc(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, numCorners::PetscInt, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) \nCreate distributed `DMPLEX` from a list of vertices for each cell (common mesh generator output) where all cells have the same celltype\n\nCollective\n\nInput Parameters:\n- `comm`         - The communicator\n- `dim`          - The topological dimension of the mesh\n- `numCells`     - The number of cells owned by this process\n- `numVertices`  - The number of vertices owned by this process, or `PETSC_DECIDE`\n- `NVertices`    - The global number of vertices, or `PETSC_DECIDE`\n- `numCorners`   - The number of vertices for each cell\n- `interpolate`  - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically\n- `cells`        - An array of numCells*numCorners numbers, the global vertex numbers for each cell\n- `spaceDim`     - The spatial dimension used for coordinates\n- `vertexCoords` - An array of numVertices*spaceDim numbers, the coordinates of each vertex\n\nOutput Parameters:\n- `dm`          - The `DM`\n- `vertexSF`    - (Optional) `PetscSF` describing complete vertex ownership\n- `verticesAdj` - (Optional) vertex adjacency array\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromCellListPetsc()`, `DMPlexBuildFromCellListParallel()`, `DMPlexBuildCoordinatesFromCellListParallel()`, `DMPlexCreateFromDAG()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateFromCellListParallelPetsc\"))\n\"\"\"\nfunction DMPlexCreateFromCellListParallelPetsc(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, numCorners::PetscInt, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) end\n\n@for_petsc function DMPlexCreateFromCellListParallelPetsc(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, numCells::$PetscInt, numVertices::$PetscInt, NVertices::$PetscInt, numCorners::$PetscInt, interpolate::PetscBool, cells::Vector{$PetscInt}, spaceDim::$PetscInt, vertexCoords::Vector{$PetscReal} )\n\tvertexSF_ = Ref{PetscSF}()\n\tverticesAdj_ = Ref{Ptr{$PetscInt}}()\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateFromCellListParallelPetsc, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, PetscBool, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscReal}, Ptr{PetscSF}, Ptr{Ptr{$PetscInt}}, Ptr{CDM}),\n               comm, dim, numCells, numVertices, NVertices, numCorners, interpolate, cells, spaceDim, vertexCoords, vertexSF_, verticesAdj_, dm_,\n              )\n\n\tvertexSF = vertexSF_[]\n\tverticesAdj = unsafe_wrap(Array, verticesAdj_[], VecGetLocalSize(petsclib, x); own = false)\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn vertexSF,verticesAdj,dm\nend \n\n\"\"\"\n\tvertexSF::PetscSF,verticesAdj::Vector{PetscInt},dm::PetscDM = DMPlexCreateFromCellSectionParallel(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, cellSection::PetscSection, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) \nCreate distributed `DMPLEX` from a list of vertices for each cell (common mesh generator output) and supports multiple celltypes\n\nCollective\n\nInput Parameters:\n- `comm`         - The communicator\n- `dim`          - The topological dimension of the mesh\n- `numCells`     - The number of cells owned by this process\n- `numVertices`  - The number of vertices owned by this process, or `PETSC_DECIDE`\n- `NVertices`    - The global number of vertices, or `PETSC_DECIDE`\n- `cellSection`  - The `PetscSection` giving the number of vertices for each cell (layout of cells)\n- `interpolate`  - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically\n- `cells`        - An array of the global vertex numbers for each cell\n- `spaceDim`     - The spatial dimension used for coordinates\n- `vertexCoords` - An array of numVertices*spaceDim numbers, the coordinates of each vertex\n\nOutput Parameters:\n- `dm`          - The `DM`\n- `vertexSF`    - (Optional) `PetscSF` describing complete vertex ownership\n- `verticesAdj` - (Optional) vertex adjacency array\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromCellListPetsc()`, `DMPlexBuildFromCellListParallel()`, `DMPlexBuildCoordinatesFromCellListParallel()`, `DMPlexCreateFromDAG()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateFromCellSectionParallel\"))\n\"\"\"\nfunction DMPlexCreateFromCellSectionParallel(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, cellSection::PetscSection, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) end\n\n@for_petsc function DMPlexCreateFromCellSectionParallel(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, numCells::$PetscInt, numVertices::$PetscInt, NVertices::$PetscInt, cellSection::PetscSection, interpolate::PetscBool, cells::Vector{$PetscInt}, spaceDim::$PetscInt, vertexCoords::Vector{$PetscReal} )\n\tvertexSF_ = Ref{PetscSF}()\n\tverticesAdj_ = Ref{Ptr{$PetscInt}}()\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateFromCellSectionParallel, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, PetscSection, PetscBool, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscReal}, Ptr{PetscSF}, Ptr{Ptr{$PetscInt}}, Ptr{CDM}),\n               comm, dim, numCells, numVertices, NVertices, cellSection, interpolate, cells, spaceDim, vertexCoords, vertexSF_, verticesAdj_, dm_,\n              )\n\n\tvertexSF = vertexSF_[]\n\tverticesAdj = unsafe_wrap(Array, verticesAdj_[], VecGetLocalSize(petsclib, x); own = false)\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn vertexSF,verticesAdj,dm\nend \n\n\"\"\"\n\tDMPlexBuildFromCellList(petsclib::PetscLibType,dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, numCorners::PetscInt, cells::Vector{PetscInt}) \nBuild `DMPLEX` topology from a list of vertices for each cell (common mesh generator output)\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `dm`          - The `DM`\n- `numCells`    - The number of cells owned by this process\n- `numVertices` - The number of vertices owned by this process, or `PETSC_DETERMINE`\n- `numCorners`  - The number of vertices for each cell\n- `cells`       - An array of `numCells` x `numCorners` numbers, the global vertex numbers for each cell\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexBuildFromCellListParallel()`, `DMPlexBuildCoordinatesFromCellList()`, `DMPlexCreateFromCellListPetsc()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexBuildFromCellList\"))\n\"\"\"\nfunction DMPlexBuildFromCellList(petsclib::PetscLibType, dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, numCorners::PetscInt, cells::Vector{PetscInt}) end\n\n@for_petsc function DMPlexBuildFromCellList(petsclib::$UnionPetscLib, dm::PetscDM, numCells::$PetscInt, numVertices::$PetscInt, numCorners::$PetscInt, cells::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMPlexBuildFromCellList, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               dm, numCells, numVertices, numCorners, cells,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexBuildCoordinatesFromCellList(petsclib::PetscLibType,dm::PetscDM, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) \nBuild `DM` coordinates from a list of coordinates for each owned vertex (common mesh generator output)\n\nCollective\n\nInput Parameters:\n- `dm`           - The `DM`\n- `spaceDim`     - The spatial dimension used for coordinates\n- `vertexCoords` - An array of numVertices*spaceDim numbers, the coordinates of each vertex\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexBuildCoordinatesFromCellListParallel()`, `DMPlexCreateFromCellListPetsc()`, `DMPlexBuildFromCellList()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexBuildCoordinatesFromCellList\"))\n\"\"\"\nfunction DMPlexBuildCoordinatesFromCellList(petsclib::PetscLibType, dm::PetscDM, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) end\n\n@for_petsc function DMPlexBuildCoordinatesFromCellList(petsclib::$UnionPetscLib, dm::PetscDM, spaceDim::$PetscInt, vertexCoords::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMPlexBuildCoordinatesFromCellList, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscReal}),\n               dm, spaceDim, vertexCoords,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateFromCellListPetsc(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, numCorners::PetscInt, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) \nCreate `DMPLEX` from a list of vertices for each cell (common mesh generator output), but only process 0 takes in the input\n\nCollective\n\nInput Parameters:\n- `comm`         - The communicator\n- `dim`          - The topological dimension of the mesh\n- `numCells`     - The number of cells, only on process 0\n- `numVertices`  - The number of vertices owned by this process, or `PETSC_DECIDE`, only on process 0\n- `numCorners`   - The number of vertices for each cell, only on process 0\n- `interpolate`  - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically\n- `cells`        - An array of  numCells \\times numCorners numbers, the vertices for each cell, only on process 0\n- `spaceDim`     - The spatial dimension used for coordinates\n- `vertexCoords` - An array of  numVertices \\times spaceDim numbers, the coordinates of each vertex, only on process 0\n\nOutput Parameter:\n- `dm` - The `DM`, which only has points on process 0\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromCellListParallelPetsc()`, `DMPlexBuildFromCellList()`, `DMPlexBuildCoordinatesFromCellList()`, `DMPlexCreateFromDAG()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateFromCellListPetsc\"))\n\"\"\"\nfunction DMPlexCreateFromCellListPetsc(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, numCorners::PetscInt, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal}) end\n\n@for_petsc function DMPlexCreateFromCellListPetsc(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, numCells::$PetscInt, numVertices::$PetscInt, numCorners::$PetscInt, interpolate::PetscBool, cells::Vector{$PetscInt}, spaceDim::$PetscInt, vertexCoords::Vector{$PetscReal} )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateFromCellListPetsc, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, PetscBool, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscReal}, Ptr{CDM}),\n               comm, dim, numCells, numVertices, numCorners, interpolate, cells, spaceDim, vertexCoords, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPlexCreateFromDAG(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt, numPoints::Vector{PetscInt}, coneSize::Vector{PetscInt}, cones::Vector{PetscInt}, coneOrientations::Vector{PetscInt}, vertexCoords::Vector{PetscScalar}) \nThis takes as input the adjacency\n\nInput Parameters:\n- `dm`               - The empty `DM` object, usually from `DMCreate()` and `DMSetDimension()`\n- `depth`            - The depth of the DAG\n- `numPoints`        - Array of size  depth + 1  containing the number of points at each `depth`\n- `coneSize`         - The cone size of each point\n- `cones`            - The concatenation of the cone points for each point, the cone list must be oriented correctly for each point\n- `coneOrientations` - The orientation of each cone point\n- `vertexCoords`     - An array of  numPoints[0] \\times spacedim  numbers representing the coordinates of each vertex, with `spacedim` the value set via `DMSetCoordinateDim()`\n\nOutput Parameter:\n- `dm` - The `DM`\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromCellListPetsc()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateFromDAG\"))\n\"\"\"\nfunction DMPlexCreateFromDAG(petsclib::PetscLibType, dm::PetscDM, depth::PetscInt, numPoints::Vector{PetscInt}, coneSize::Vector{PetscInt}, cones::Vector{PetscInt}, coneOrientations::Vector{PetscInt}, vertexCoords::Vector{PetscScalar}) end\n\n@for_petsc function DMPlexCreateFromDAG(petsclib::$UnionPetscLib, dm::PetscDM, depth::$PetscInt, numPoints::Vector{$PetscInt}, coneSize::Vector{$PetscInt}, cones::Vector{$PetscInt}, coneOrientations::Vector{$PetscInt}, vertexCoords::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:DMPlexCreateFromDAG, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               dm, depth, numPoints, coneSize, cones, coneOrientations, vertexCoords,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, plexname::String, interpolate::PetscBool) \nThis takes a filename and produces a `DM`\n\nCollective\n\nInput Parameters:\n- `comm`        - The communicator\n- `filename`    - A file name\n- `plexname`    - The object name of the resulting `DM`, also used for intra-datafile lookup by some formats\n- `interpolate` - Flag to create intermediate mesh pieces (edges, faces)\n\nOutput Parameter:\n- `dm` - The `DM`\n\nOptions Database Key:\n- `-dm_plex_create_from_hdf5_xdmf` - use the `PETSC_VIEWER_HDF5_XDMF` format for reading HDF5\n\nUse `-dm_plex_create_ prefix` to pass options to the internal `PetscViewer`, e.g. `-dm_plex_create_viewer_hdf5_collective`\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromDAG()`, `DMPlexCreateFromCellListPetsc()`, `DMPlexCreate()`, `PetscObjectSetName()`, `DMView()`, `DMLoad()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateFromFile\"))\n\"\"\"\nfunction DMPlexCreateFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, plexname::String, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateFromFile(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, plexname::String, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateFromFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, PetscBool, Ptr{CDM}),\n               comm, filename, plexname, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateEphemeral(petsclib::PetscLibType,tr::DMPlexTransform, prefix::String) \nThis takes a `DMPlexTransform` and a base `DMPlex` and produces an ephemeral `DM`, meaning one that is created on the fly in response to queries.\n\nInput Parameters:\n- `tr`     - The `DMPlexTransform`\n- `prefix` - An options prefix, or NULL\n\nOutput Parameter:\n- `dm` - The `DM`\n\nLevel: beginner\n\n-seealso: `DMPlexCreateFromFile`, `DMPlexCreateFromDAG()`, `DMPlexCreateFromCellListPetsc()`, `DMPlexCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateEphemeral\"))\n\"\"\"\nfunction DMPlexCreateEphemeral(petsclib::PetscLibType, tr::DMPlexTransform, prefix::String) end\n\n@for_petsc function DMPlexCreateEphemeral(petsclib::$UnionPetscLib, tr::DMPlexTransform, prefix::String )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateEphemeral, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{Cchar}, Ptr{CDM}),\n               tr, prefix, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tDMPlexMarkBoundaryFaces(petsclib::PetscLibType,dm::PetscDM, val::PetscInt, label::DMLabel) \nMark all faces on the boundary\n\nCollective\n\nInput Parameters:\n- `dm`  - The original `DM`\n- `val` - The marker value, or `PETSC_DETERMINE` to use some value in the closure (or 1 if none are found)\n\nOutput Parameter:\n- `label` - The `DMLabel` marking boundary faces with the given value\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMLabelCreate()`, `DMCreateLabel()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexMarkBoundaryFaces\"))\n\"\"\"\nfunction DMPlexMarkBoundaryFaces(petsclib::PetscLibType, dm::PetscDM, val::PetscInt, label::DMLabel) end\n\n@for_petsc function DMPlexMarkBoundaryFaces(petsclib::$UnionPetscLib, dm::PetscDM, val::$PetscInt, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexMarkBoundaryFaces, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, DMLabel),\n               dm, val, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLabelComplete(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nStarting with a label marking points on a surface, we add the transitive closure to the surface\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - A `DMLabel` marking the surface points\n\nOutput Parameter:\n- `label` - A `DMLabel` marking all surface points in the transitive closure\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexLabelCohesiveComplete()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLabelComplete\"))\n\"\"\"\nfunction DMPlexLabelComplete(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexLabelComplete(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexLabelComplete, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLabelAddCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nStarting with a label marking points on a surface, we add a cell for each point\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - A `DMLabel` marking the surface points\n\nOutput Parameter:\n- `label` - A `DMLabel` incorporating cells\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexLabelAddFaceCells()`, `DMPlexLabelComplete()`, `DMPlexLabelCohesiveComplete()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLabelAddCells\"))\n\"\"\"\nfunction DMPlexLabelAddCells(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexLabelAddCells(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexLabelAddCells, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLabelAddFaceCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nStarting with a label marking faces on a surface, we add a cell for each face\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - A `DMLabel` marking the surface points\n\nOutput Parameter:\n- `label` - A `DMLabel` incorporating cells\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexLabelAddCells()`, `DMPlexLabelComplete()`, `DMPlexLabelCohesiveComplete()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLabelAddFaceCells\"))\n\"\"\"\nfunction DMPlexLabelAddFaceCells(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexLabelAddFaceCells(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexLabelAddFaceCells, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLabelClearCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel) \nRemove cells from a label\n\nInput Parameters:\n- `dm`    - The `DM`\n- `label` - A `DMLabel` marking surface points and their adjacent cells\n\nOutput Parameter:\n- `label` - A `DMLabel` without cells\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexLabelComplete()`, `DMPlexLabelCohesiveComplete()`, `DMPlexLabelAddCells()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLabelClearCells\"))\n\"\"\"\nfunction DMPlexLabelClearCells(petsclib::PetscLibType, dm::PetscDM, label::DMLabel) end\n\n@for_petsc function DMPlexLabelClearCells(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel )\n\n    @chk ccall(\n               (:DMPlexLabelClearCells, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumGhostCells::PetscInt = DMPlexConstructGhostCells(petsclib::PetscLibType,dm::PetscDM, labelName::String, dmGhosted::PetscDM) \nConstruct ghost cells which connect to every boundary face\n\nCollective\n\nInput Parameters:\n- `dm`        - The original `DM`\n- `labelName` - The label specifying the boundary faces, or \"Face Sets\" if this is `NULL`\n\nOutput Parameters:\n- `numGhostCells` - The number of ghost cells added to the `DM`\n- `dmGhosted`     - The new `DM`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexConstructGhostCells\"))\n\"\"\"\nfunction DMPlexConstructGhostCells(petsclib::PetscLibType, dm::PetscDM, labelName::String, dmGhosted::PetscDM) end\n\n@for_petsc function DMPlexConstructGhostCells(petsclib::$UnionPetscLib, dm::PetscDM, labelName::String, dmGhosted::PetscDM )\n\tnumGhostCells_ = Ref{$PetscInt}()\n\tdmGhosted_ = Ref(dmGhosted.ptr)\n\n    @chk ccall(\n               (:DMPlexConstructGhostCells, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{CDM}),\n               dm, labelName, numGhostCells_, dmGhosted_,\n              )\n\n\tnumGhostCells = numGhostCells_[]\n\tdmGhosted.ptr = dmGhosted_[]\n\n\treturn numGhostCells\nend \n\n\"\"\"\n\tDMPlexConstructCohesiveCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, splitLabel::DMLabel, dmSplit::PetscDM) \nConstruct cohesive cells which split the face along an internal interface\n\nCollective\n\nInput Parameters:\n- `dm`    - The original `DM`\n- `label` - The `DMLabel` specifying the boundary faces (this could be auto-generated)\n\nOutput Parameters:\n- `splitLabel` - The `DMLabel` containing the split points, or `NULL` if no output is desired\n- `dmSplit`    - The new `DM`\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()`, `DMPlexLabelCohesiveComplete()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexConstructCohesiveCells\"))\n\"\"\"\nfunction DMPlexConstructCohesiveCells(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, splitLabel::DMLabel, dmSplit::PetscDM) end\n\n@for_petsc function DMPlexConstructCohesiveCells(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, splitLabel::DMLabel, dmSplit::PetscDM )\n\tdmSplit_ = Ref(dmSplit.ptr)\n\n    @chk ccall(\n               (:DMPlexConstructCohesiveCells, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, DMLabel, Ptr{CDM}),\n               dm, label, splitLabel, dmSplit_,\n              )\n\n\tdmSplit.ptr = dmSplit_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLabelCohesiveComplete(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, blabel::DMLabel, bvalue::PetscInt, flip::PetscBool, split::PetscBool, subdm::PetscDM) \nStarting with a label marking points on an internal surface, we add all other mesh pieces\nto complete the surface\n\nInput Parameters:\n- `dm`     - The `DM`\n- `label`  - A `DMLabel` marking the surface\n- `blabel` - A `DMLabel` marking the vertices on the boundary which will not be duplicated, or `NULL` to find them automatically\n- `bvalue` - Value of `DMLabel` marking the vertices on the boundary\n- `flip`   - Flag to flip the submesh normal and replace points on the other side\n- `split`  - Split faces impinging on the surface, rather than clamping the surface boundary\n- `subdm`  - The `DM` associated with the label, or `NULL`\n\nOutput Parameter:\n- `label` - A `DMLabel` marking all surface points\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexConstructCohesiveCells()`, `DMPlexLabelComplete()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexLabelCohesiveComplete\"))\n\"\"\"\nfunction DMPlexLabelCohesiveComplete(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, blabel::DMLabel, bvalue::PetscInt, flip::PetscBool, split::PetscBool, subdm::PetscDM) end\n\n@for_petsc function DMPlexLabelCohesiveComplete(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, blabel::DMLabel, bvalue::$PetscInt, flip::PetscBool, split::PetscBool, subdm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexLabelCohesiveComplete, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, DMLabel, $PetscInt, PetscBool, PetscBool, CDM),\n               dm, label, blabel, bvalue, flip, split, subdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thybridLabel::DMLabel,splitLabel::DMLabel,dmInterface::PetscDM,dmHybrid::PetscDM = DMPlexCreateHybridMesh(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, bdlabel::DMLabel, bdvalue::PetscInt) \nCreate a mesh with hybrid cells along an internal interface\n\nCollective\n\nInput Parameters:\n- `dm`      - The original `DM`\n- `label`   - The label specifying the interface vertices\n- `bdlabel` - The optional label specifying the interface boundary vertices\n- `bdvalue` - Value of optional label specifying the interface boundary vertices\n\nOutput Parameters:\n- `hybridLabel` - The label fully marking the interface, or `NULL` if no output is desired\n- `splitLabel`  - The label containing the split points, or `NULL` if no output is desired\n- `dmInterface` - The new interface `DM`, or `NULL`\n- `dmHybrid`    - The new `DM` with cohesive cells\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexConstructCohesiveCells()`, `DMPlexLabelCohesiveComplete()`, `DMPlexGetSubpointMap()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateHybridMesh\"))\n\"\"\"\nfunction DMPlexCreateHybridMesh(petsclib::PetscLibType, dm::PetscDM, label::DMLabel, bdlabel::DMLabel, bdvalue::PetscInt) end\n\n@for_petsc function DMPlexCreateHybridMesh(petsclib::$UnionPetscLib, dm::PetscDM, label::DMLabel, bdlabel::DMLabel, bdvalue::$PetscInt )\n\thybridLabel_ = Ref{DMLabel}()\n\tsplitLabel_ = Ref{DMLabel}()\n\tdmInterface_ = Ref{CDM}()\n\tdmHybrid_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateHybridMesh, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, DMLabel, $PetscInt, Ptr{DMLabel}, Ptr{DMLabel}, Ptr{CDM}, Ptr{CDM}),\n               dm, label, bdlabel, bdvalue, hybridLabel_, splitLabel_, dmInterface_, dmHybrid_,\n              )\n\n\thybridLabel = hybridLabel_[]\n\tsplitLabel = splitLabel_[]\n\tdmInterface = PetscDM(dmInterface_[], petsclib)\n\tdmHybrid = PetscDM(dmHybrid_[], petsclib)\n\n\treturn hybridLabel,splitLabel,dmInterface,dmHybrid\nend \n\n\"\"\"\n\tfaceVertices::Vector{PetscInt},posOriented::PetscBool = DMPlexGetOrientedFace(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, faceSize::PetscInt, face::Vector{PetscInt}, numCorners::PetscInt, indices::Vector{PetscInt}, origVertices::Vector{PetscInt}) \nGiven a cell and a face, as a set of vertices, return the oriented face, as a set of vertices,\nin faceVertices. The orientation is such that the face normal points out of the cell\n\nNot Collective\n\nInput Parameters:\n- `dm`           - The original mesh\n- `cell`         - The cell mesh point\n- `faceSize`     - The number of vertices on the face\n- `face`         - The face vertices\n- `numCorners`   - The number of vertices on the cell\n- `indices`      - Local numbering of face vertices in cell cone\n- `origVertices` - Original face vertices\n\nOutput Parameters:\n- `faceVertices` - The face vertices properly oriented\n- `posOriented`  - `PETSC_TRUE` if the face was oriented with outward normal\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetCone()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetOrientedFace\"))\n\"\"\"\nfunction DMPlexGetOrientedFace(petsclib::PetscLibType, dm::PetscDM, cell::PetscInt, faceSize::PetscInt, face::Vector{PetscInt}, numCorners::PetscInt, indices::Vector{PetscInt}, origVertices::Vector{PetscInt}) end\n\n@for_petsc function DMPlexGetOrientedFace(petsclib::$UnionPetscLib, dm::PetscDM, cell::$PetscInt, faceSize::$PetscInt, face::Vector{$PetscInt}, numCorners::$PetscInt, indices::Vector{$PetscInt}, origVertices::Vector{$PetscInt} )\n\tfaceVertices = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tposOriented_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexGetOrientedFace, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               dm, cell, faceSize, face, numCorners, indices, origVertices, faceVertices, posOriented_,\n              )\n\n\tposOriented = posOriented_[]\n\n\treturn faceVertices,posOriented\nend \n\n\"\"\"\n\tsubdm::PetscDM = DMPlexCreateSubmesh(petsclib::PetscLibType,dm::PetscDM, vertexLabel::DMLabel, value::PetscInt, markedFaces::PetscBool) \nExtract a hypersurface from the mesh using vertices defined by a label\n\nInput Parameters:\n- `dm`          - The original mesh\n- `vertexLabel` - The `DMLabel` marking points contained in the surface\n- `value`       - The label value to use\n- `markedFaces` - `PETSC_TRUE` if surface faces are marked in addition to vertices, `PETSC_FALSE` if only vertices are marked\n\nOutput Parameter:\n- `subdm` - The surface mesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetSubpointMap()`, `DMGetLabel()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateSubmesh\"))\n\"\"\"\nfunction DMPlexCreateSubmesh(petsclib::PetscLibType, dm::PetscDM, vertexLabel::DMLabel, value::PetscInt, markedFaces::PetscBool) end\n\n@for_petsc function DMPlexCreateSubmesh(petsclib::$UnionPetscLib, dm::PetscDM, vertexLabel::DMLabel, value::$PetscInt, markedFaces::PetscBool )\n\tsubdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateSubmesh, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, $PetscInt, PetscBool, Ptr{CDM}),\n               dm, vertexLabel, value, markedFaces, subdm_,\n              )\n\n\tsubdm = PetscDM(subdm_[], petsclib)\n\n\treturn subdm\nend \n\n\"\"\"\n\tsubdm::PetscDM = DMPlexCreateCohesiveSubmesh(petsclib::PetscLibType,dm::PetscDM, hasLagrange::PetscBool, label::String, value::PetscInt) \nExtract from a mesh with cohesive cells the hypersurface defined by one face of the cells. Optionally, a label can be given to restrict the cells.\n\nInput Parameters:\n- `dm`          - The original mesh\n- `hasLagrange` - The mesh has Lagrange unknowns in the cohesive cells\n- `label`       - A label name, or `NULL`\n- `value`       - A label value\n\nOutput Parameter:\n- `subdm` - The surface mesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetSubpointMap()`, `DMPlexCreateSubmesh()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateCohesiveSubmesh\"))\n\"\"\"\nfunction DMPlexCreateCohesiveSubmesh(petsclib::PetscLibType, dm::PetscDM, hasLagrange::PetscBool, label::String, value::PetscInt) end\n\n@for_petsc function DMPlexCreateCohesiveSubmesh(petsclib::$UnionPetscLib, dm::PetscDM, hasLagrange::PetscBool, label::String, value::$PetscInt )\n\tsubdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateCohesiveSubmesh, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscBool, Ptr{Cchar}, $PetscInt, Ptr{CDM}),\n               dm, hasLagrange, label, value, subdm_,\n              )\n\n\tsubdm = PetscDM(subdm_[], petsclib)\n\n\treturn subdm\nend \n\n\"\"\"\n\tDMPlexReorderCohesiveSupports(petsclib::PetscLibType,dm::PetscDM) \nEnsure that face supports for cohesive end caps are ordered\n\nNot Collective\n\nInput Parameter:\n- `dm` - The `DM` containing cohesive cells\n\nLevel: developer\n\n-seealso: `DMPlexConstructCohesiveCells()`, `DMPlexCreateCohesiveSubmesh()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexReorderCohesiveSupports\"))\n\"\"\"\nfunction DMPlexReorderCohesiveSupports(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexReorderCohesiveSupports(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexReorderCohesiveSupports, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexFilter(petsclib::PetscLibType,dm::PetscDM, cellLabel::DMLabel, value::PetscInt, ignoreLabelHalo::PetscBool, sanitizeSubmesh::PetscBool, ownershipTransferSF::PetscSF, subdm::PetscDM) \nExtract a subset of mesh cells defined by a label as a separate mesh\n\nInput Parameters:\n- `dm`              - The original mesh\n- `cellLabel`       - The `DMLabel` marking cells contained in the new mesh\n- `value`           - The label value to use\n- `ignoreLabelHalo` - The flag indicating if labeled points that are in the halo are ignored\n- `sanitizeSubmesh` - The flag indicating if a subpoint is forced to be owned by a rank that owns a subcell that contains that point in its closure\n\nOutput Parameters:\n- `ownershipTransferSF` - The `PetscSF` representing the ownership transfers between parent local meshes due to submeshing.\n- `subdm`               - The new mesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexGetSubpointMap()`, `DMGetLabel()`, `DMLabelSetValue()`, `DMPlexCreateSubmesh()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexFilter\"))\n\"\"\"\nfunction DMPlexFilter(petsclib::PetscLibType, dm::PetscDM, cellLabel::DMLabel, value::PetscInt, ignoreLabelHalo::PetscBool, sanitizeSubmesh::PetscBool, ownershipTransferSF::PetscSF, subdm::PetscDM) end\n\n@for_petsc function DMPlexFilter(petsclib::$UnionPetscLib, dm::PetscDM, cellLabel::DMLabel, value::$PetscInt, ignoreLabelHalo::PetscBool, sanitizeSubmesh::PetscBool, ownershipTransferSF::PetscSF, subdm::PetscDM )\n\tsubdm_ = Ref(subdm.ptr)\n\n    @chk ccall(\n               (:DMPlexFilter, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel, $PetscInt, PetscBool, PetscBool, Ptr{PetscSF}, Ptr{CDM}),\n               dm, cellLabel, value, ignoreLabelHalo, sanitizeSubmesh, ownershipTransferSF, subdm_,\n              )\n\n\tsubdm.ptr = subdm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetSubpointMap(petsclib::PetscLibType,dm::PetscDM, subpointMap::DMLabel) \nReturns a `DMLabel` with point dimension as values\n\nInput Parameter:\n- `dm` - The submesh `DM`\n\nOutput Parameter:\n- `subpointMap` - The `DMLabel` of all the points from the original mesh in this submesh, or `NULL` if this is not a submesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateSubmesh()`, `DMPlexGetSubpointIS()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSubpointMap\"))\n\"\"\"\nfunction DMPlexGetSubpointMap(petsclib::PetscLibType, dm::PetscDM, subpointMap::DMLabel) end\n\n@for_petsc function DMPlexGetSubpointMap(petsclib::$UnionPetscLib, dm::PetscDM, subpointMap::DMLabel )\n\n    @chk ccall(\n               (:DMPlexGetSubpointMap, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMLabel}),\n               dm, subpointMap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetSubpointMap(petsclib::PetscLibType,dm::PetscDM, subpointMap::DMLabel) \nSets the `DMLabel` with point dimension as values\n\nInput Parameters:\n- `dm`          - The submesh `DM`\n- `subpointMap` - The `DMLabel` of all the points from the original mesh in this submesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateSubmesh()`, `DMPlexGetSubpointIS()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetSubpointMap\"))\n\"\"\"\nfunction DMPlexSetSubpointMap(petsclib::PetscLibType, dm::PetscDM, subpointMap::DMLabel) end\n\n@for_petsc function DMPlexSetSubpointMap(petsclib::$UnionPetscLib, dm::PetscDM, subpointMap::DMLabel )\n\n    @chk ccall(\n               (:DMPlexSetSubpointMap, $petsc_library),\n               PetscErrorCode,\n               (CDM, DMLabel),\n               dm, subpointMap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetSubpointIS(petsclib::PetscLibType,dm::PetscDM, subpointIS::IS) \nReturns an `IS` covering the entire subdm chart with the original points as data\n\nInput Parameter:\n- `dm` - The submesh `DM`\n\nOutput Parameter:\n- `subpointIS` - The `IS` of all the points from the original mesh in this submesh, or `NULL` if this is not a submesh\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreateSubmesh()`, `DMPlexGetSubpointMap()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetSubpointIS\"))\n\"\"\"\nfunction DMPlexGetSubpointIS(petsclib::PetscLibType, dm::PetscDM, subpointIS::IS) end\n\n@for_petsc function DMPlexGetSubpointIS(petsclib::$UnionPetscLib, dm::PetscDM, subpointIS::IS )\n\n    @chk ccall(\n               (:DMPlexGetSubpointIS, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CIS}),\n               dm, subpointIS,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMGetEnclosureRelation(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM, rel::DMEnclosureType) \nGet the relationship between `dmA` and `dmB`\n\nInput Parameters:\n- `dmA` - The first `DM`\n- `dmB` - The second `DM`\n\nOutput Parameter:\n- `rel` - The relation of `dmA` to `dmB`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetEnclosurePoint()`\n\n# External Links\n$(_doc_external(\"DM/DMGetEnclosureRelation\"))\n\"\"\"\nfunction DMGetEnclosureRelation(petsclib::PetscLibType, dmA::PetscDM, dmB::PetscDM, rel::DMEnclosureType) end\n\n@for_petsc function DMGetEnclosureRelation(petsclib::$UnionPetscLib, dmA::PetscDM, dmB::PetscDM, rel::DMEnclosureType )\n\n    @chk ccall(\n               (:DMGetEnclosureRelation, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, Ptr{DMEnclosureType}),\n               dmA, dmB, rel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpA::PetscInt = DMGetEnclosurePoint(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM, etype::DMEnclosureType, pB::PetscInt) \nGet the point `pA` in `dmA` which corresponds to the point `pB` in `dmB`\n\nInput Parameters:\n- `dmA`   - The first `DM`\n- `dmB`   - The second `DM`\n- `etype` - The type of enclosure relation that `dmA` has to `dmB`\n- `pB`    - A point of `dmB`\n\nOutput Parameter:\n- `pA` - The corresponding point of `dmA`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMGetEnclosureRelation()`\n\n# External Links\n$(_doc_external(\"DM/DMGetEnclosurePoint\"))\n\"\"\"\nfunction DMGetEnclosurePoint(petsclib::PetscLibType, dmA::PetscDM, dmB::PetscDM, etype::DMEnclosureType, pB::PetscInt) end\n\n@for_petsc function DMGetEnclosurePoint(petsclib::$UnionPetscLib, dmA::PetscDM, dmB::PetscDM, etype::DMEnclosureType, pB::$PetscInt )\n\tpA_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMGetEnclosurePoint, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, DMEnclosureType, $PetscInt, Ptr{$PetscInt}),\n               dmA, dmB, etype, pB, pA_,\n              )\n\n\tpA = pA_[]\n\n\treturn pA\nend \n\n\"\"\"\n\tdm::PetscDM = DMPlexCreateExodus(petsclib::PetscLibType,comm::MPI_Comm, exoid::PetscExodusIIInt, interpolate::PetscBool) \nCreate a `DMPLEX` mesh from an ExodusII file ID.\n\nCollective\n\nInput Parameters:\n- `comm`        - The MPI communicator\n- `exoid`       - The ExodusII id associated with a exodus file and obtained using ex_open\n- `interpolate` - Create faces and edges in the mesh\n\nOutput Parameter:\n- `dm` - The `DM` object representing the mesh\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `PETSCVIEWEREXODUSII`, `DMPLEX`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexCreateExodus\"))\n\"\"\"\nfunction DMPlexCreateExodus(petsclib::PetscLibType, comm::MPI_Comm, exoid::PetscExodusIIInt, interpolate::PetscBool) end\n\n@for_petsc function DMPlexCreateExodus(petsclib::$UnionPetscLib, comm::MPI_Comm, exoid::PetscExodusIIInt, interpolate::PetscBool )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexCreateExodus, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscExodusIIInt, PetscBool, Ptr{CDM}),\n               comm, exoid, interpolate, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tNf::PetscInt,v0::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal},detJ::Vector{PetscReal} = DMPlexRefineRegularGetAffineFaceTransforms(petsclib::PetscLibType,tr::DMPlexTransform, ct::DMPolytopeType) \nGets the affine map from the reference face cell to each face in the given cell\n\nInput Parameters:\n- `tr` - The `DMPlexTransform` object\n- `ct` - The cell type\n\nOutput Parameters:\n- `Nf`   - The number of faces for this cell type\n- `v0`   - The translation of the first vertex for each face\n- `J`    - The Jacobian for each face (map from original cell to subcell)\n- `invJ` - The inverse Jacobian for each face\n- `detJ` - The determinant of the Jacobian for each face\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DM`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexCellRefinerGetAffineTransforms()`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRefineRegularGetAffineFaceTransforms\"))\n\"\"\"\nfunction DMPlexRefineRegularGetAffineFaceTransforms(petsclib::PetscLibType, tr::DMPlexTransform, ct::DMPolytopeType) end\n\n@for_petsc function DMPlexRefineRegularGetAffineFaceTransforms(petsclib::$UnionPetscLib, tr::DMPlexTransform, ct::DMPolytopeType )\n\tNf_ = Ref{$PetscInt}()\n\tv0_ = Ref{Ptr{$PetscReal}}()\n\tJ_ = Ref{Ptr{$PetscReal}}()\n\tinvJ_ = Ref{Ptr{$PetscReal}}()\n\tdetJ_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:DMPlexRefineRegularGetAffineFaceTransforms, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               tr, ct, Nf_, v0_, J_, invJ_, detJ_,\n              )\n\n\tNf = Nf_[]\n\tv0 = unsafe_wrap(Array, v0_[], VecGetLocalSize(petsclib, x); own = false)\n\tJ = unsafe_wrap(Array, J_[], VecGetLocalSize(petsclib, x); own = false)\n\tinvJ = unsafe_wrap(Array, invJ_[], VecGetLocalSize(petsclib, x); own = false)\n\tdetJ = unsafe_wrap(Array, detJ_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nf,v0,J,invJ,detJ\nend \n\n\"\"\"\n\tNc::PetscInt,v0::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal} = DMPlexRefineRegularGetAffineTransforms(petsclib::PetscLibType,tr::DMPlexTransform, ct::DMPolytopeType) \nGets the affine map from the reference cell to each subcell\n\nInput Parameters:\n- `tr` - The `DMPlexTransform` object\n- `ct` - The cell type\n\nOutput Parameters:\n- `Nc`   - The number of subcells produced from this cell type\n- `v0`   - The translation of the first vertex for each subcell, an array of length dim * Nc. Pass `NULL` to ignore.\n- `J`    - The Jacobian for each subcell (map from reference cell to subcell), an array of length dim^2 * Nc. Pass `NULL` to ignore.\n- `invJ` - The inverse Jacobian for each subcell, an array of length dim^2 * Nc. Pass `NULL` to ignore.\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DM`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexRefineRegularGetAffineFaceTransforms()`, `DMPLEXREFINEREGULAR`\n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexRefineRegularGetAffineTransforms\"))\n\"\"\"\nfunction DMPlexRefineRegularGetAffineTransforms(petsclib::PetscLibType, tr::DMPlexTransform, ct::DMPolytopeType) end\n\n@for_petsc function DMPlexRefineRegularGetAffineTransforms(petsclib::$UnionPetscLib, tr::DMPlexTransform, ct::DMPolytopeType )\n\tNc_ = Ref{$PetscInt}()\n\tv0_ = Ref{Ptr{$PetscReal}}()\n\tJ_ = Ref{Ptr{$PetscReal}}()\n\tinvJ_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:DMPlexRefineRegularGetAffineTransforms, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               tr, ct, Nc_, v0_, J_, invJ_,\n              )\n\n\tNc = Nc_[]\n\tv0 = unsafe_wrap(Array, v0_[], VecGetLocalSize(petsclib, x); own = false)\n\tJ = unsafe_wrap(Array, J_[], VecGetLocalSize(petsclib, x); own = false)\n\tinvJ = unsafe_wrap(Array, invJ_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nc,v0,J,invJ\nend \n\n\"\"\"\n\tDMSlicedSetGhosts(petsclib::PetscLibType,dm::PetscDM, bs::PetscInt, nloc::PetscInt, Nghosts::PetscInt, ghosts::Vector{PetscInt}) \nSets the global indices of other processes elements that will\nbe ghosts on this process\n\nNot Collective\n\nInput Parameters:\n- `dm`      - the `DMSLICED` object\n- `bs`      - block size\n- `nlocal`  - number of local (owned, non-ghost) blocks\n- `Nghosts` - number of ghost blocks on this process\n- `ghosts`  - global indices of each ghost block\n\nLevel: advanced\n\n-seealso: `DM`, `DMSLICED`, `DMDestroy()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMSlicedSetGhosts\"))\n\"\"\"\nfunction DMSlicedSetGhosts(petsclib::PetscLibType, dm::PetscDM, bs::PetscInt, nloc::PetscInt, Nghosts::PetscInt, ghosts::Vector{PetscInt}) end\n\n@for_petsc function DMSlicedSetGhosts(petsclib::$UnionPetscLib, dm::PetscDM, bs::$PetscInt, nloc::$PetscInt, Nghosts::$PetscInt, ghosts::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMSlicedSetGhosts, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               dm, bs, nloc, Nghosts, ghosts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSlicedSetPreallocation(petsclib::PetscLibType,dm::PetscDM, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nsets the matrix memory preallocation for matrices computed by `DMSLICED`\n\nNot Collective\n\nInput Parameters:\n- `dm`    - the `DM` object\n- `d_nz`  - number of block nonzeros per block row in diagonal portion of local\nsubmatrix  (same for all local rows)\n- `d_nnz` - array containing the number of block nonzeros in the various block rows\nof the in diagonal portion of the local (possibly different for each block\nrow) or `NULL`.\n- `o_nz`  - number of block nonzeros per block row in the off-diagonal portion of local\nsubmatrix (same for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various block rows of the\noff-diagonal portion of the local submatrix (possibly different for\neach block row) or `NULL`.\n\nLevel: advanced\n\n-seealso: `DM`, `DMSLICED`, `DMDestroy()`, `DMCreateGlobalVector()`, `MatMPIAIJSetPreallocation()`,\n`MatMPIBAIJSetPreallocation()`, `DMSlicedGetMatrix()`, `DMSlicedSetBlockFills()`\n\n# External Links\n$(_doc_external(\"DM/DMSlicedSetPreallocation\"))\n\"\"\"\nfunction DMSlicedSetPreallocation(petsclib::PetscLibType, dm::PetscDM, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function DMSlicedSetPreallocation(petsclib::$UnionPetscLib, dm::PetscDM, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMSlicedSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               dm, d_nz, d_nnz, o_nz, o_nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSlicedSetBlockFills(petsclib::PetscLibType,dm::PetscDM, dfill::Vector{PetscInt}, ofill::Vector{PetscInt}) \nSets the fill pattern in each block for a multi\nof the matrix returned by `DMSlicedGetMatrix()`.\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - the `DM` object\n- `dfill` - the fill pattern in the diagonal block (may be `NULL`, means use dense block)\n- `ofill` - the fill pattern in the off-diagonal blocks\n\nLevel: advanced\n\n-seealso: `DM`, `DMSLICED`, `DMSlicedGetMatrix()`, `DMDASetBlockFills()`\n\n# External Links\n$(_doc_external(\"DM/DMSlicedSetBlockFills\"))\n\"\"\"\nfunction DMSlicedSetBlockFills(petsclib::PetscLibType, dm::PetscDM, dfill::Vector{PetscInt}, ofill::Vector{PetscInt}) end\n\n@for_petsc function DMSlicedSetBlockFills(petsclib::$UnionPetscLib, dm::PetscDM, dfill::Vector{$PetscInt}, ofill::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMSlicedSetBlockFills, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               dm, dfill, ofill,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = DMSlicedCreate(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, nloc::PetscInt, Nghosts::PetscInt, ghosts::Vector{PetscInt}, d_nnz::Vector{PetscInt}, o_nnz::Vector{PetscInt}) \nCreates a `DM` object, used to manage data for a unstructured problem\n\nCollective\n\nInput Parameters:\n- `comm`    - the processors that will share the global vector\n- `bs`      - the block size\n- `nlocal`  - number of vector entries on this process\n- `Nghosts` - number of ghost points needed on this process\n- `ghosts`  - global indices of all ghost points for this process\n- `d_nnz`   - matrix preallocation information representing coupling within this process\n- `o_nnz`   - matrix preallocation information representing coupling between this process and other processes\n\nOutput Parameter:\n- `dm` - the slice object\n\nLevel: advanced\n\n-seealso: `DM`, `DMSLICED`, `DMDestroy()`, `DMCreateGlobalVector()`, `DMSetType()`, `DMSlicedSetGhosts()`, `DMSlicedSetPreallocation()`,\n`VecGhostUpdateBegin()`, `VecGhostUpdateEnd()`,\n`VecGhostGetLocalForm()`, `VecGhostRestoreLocalForm()`\n\n# External Links\n$(_doc_external(\"DM/DMSlicedCreate\"))\n\"\"\"\nfunction DMSlicedCreate(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, nloc::PetscInt, Nghosts::PetscInt, ghosts::Vector{PetscInt}, d_nnz::Vector{PetscInt}, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function DMSlicedCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, nloc::$PetscInt, Nghosts::$PetscInt, ghosts::Vector{$PetscInt}, d_nnz::Vector{$PetscInt}, o_nnz::Vector{$PetscInt} )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMSlicedCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CDM}),\n               comm, bs, nloc, Nghosts, ghosts, d_nnz, o_nnz, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tx::PetscScalar,y::PetscScalar = DMDAMapCoordsToPeriodicDomain(petsclib::PetscLibType,da::PetscDM) \n\n# External Links\n$(_doc_external(\"Ts/DMDAMapCoordsToPeriodicDomain\"))\n\"\"\"\nfunction DMDAMapCoordsToPeriodicDomain(petsclib::PetscLibType, da::PetscDM) end\n\n@for_petsc function DMDAMapCoordsToPeriodicDomain(petsclib::$UnionPetscLib, da::PetscDM )\n\tx_ = Ref{$PetscScalar}()\n\ty_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:DMDAMapCoordsToPeriodicDomain, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               da, x_, y_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\n\treturn x,y\nend \n\n\"\"\"\n\tDMTSSetIFunction(petsclib::PetscLibType,dm::PetscDM, func::TSIFunctionFn, ctx::Cvoid) \nset `TS` implicit function evaluation function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `func` - function evaluating f(t,u,u_t)\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TS`, `DM`, `TSIFunctionFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIFunction\"))\n\"\"\"\nfunction DMTSSetIFunction(petsclib::PetscLibType, dm::PetscDM, func::TSIFunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetIFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::TSIFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetIFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSIFunctionFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetIFunctionContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `TS` implicit evaluation context destroy function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `TS`\n- `f`  - implicit evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `DMTSSetIFunction()`, `TSSetIFunction()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIFunctionContextDestroy\"))\n\"\"\"\nfunction DMTSSetIFunctionContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMTSSetIFunctionContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMTSSetIFunctionContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetIFunction(petsclib::PetscLibType,dm::PetscDM, func::TSIFunctionFn, ctx::Cvoid) \nget `TS` implicit residual evaluation function from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `func` - function evaluation function, for calling sequence see `TSIFunctionFn`\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TS`, `DM`, `DMTSSetIFunction()`, `TSIFunctionFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetIFunction\"))\n\"\"\"\nfunction DMTSGetIFunction(petsclib::PetscLibType, dm::PetscDM, func::TSIFunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetIFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::TSIFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetIFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSIFunctionFn, Cvoid),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetI2Function(petsclib::PetscLibType,dm::PetscDM, fun::TSI2FunctionFn, ctx::Cvoid) \nset `TS` implicit function evaluation function for 2nd order systems into a `TSDM`\n\nNot Collective\n\nInput Parameters:\n- `dm`  - `DM` to be used with `TS`\n- `fun` - function evaluation routine\n- `ctx` - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `TSSetI2Function()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetI2Function\"))\n\"\"\"\nfunction DMTSSetI2Function(petsclib::PetscLibType, dm::PetscDM, fun::TSI2FunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetI2Function(petsclib::$UnionPetscLib, dm::PetscDM, fun::TSI2FunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetI2Function, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSI2FunctionFn}, Ptr{Cvoid}),\n               dm, fun, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetI2FunctionContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `TS` implicit evaluation for 2nd order systems context destroy into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `TS`\n- `f`  - implicit evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TSSetI2FunctionContextDestroy()`, `DMTSSetI2Function()`, `TSSetI2Function()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetI2FunctionContextDestroy\"))\n\"\"\"\nfunction DMTSSetI2FunctionContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMTSSetI2FunctionContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMTSSetI2FunctionContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetI2Function(petsclib::PetscLibType,dm::PetscDM, fun::TSI2FunctionFn, ctx::Cvoid) \nget `TS` implicit residual evaluation function for 2nd order systems from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `fun` - function evaluation function, for calling sequence see `TSSetI2Function()`\n- `ctx` - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `DMTSSetI2Function()`, `TSGetI2Function()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetI2Function\"))\n\"\"\"\nfunction DMTSGetI2Function(petsclib::PetscLibType, dm::PetscDM, fun::TSI2FunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetI2Function(petsclib::$UnionPetscLib, dm::PetscDM, fun::TSI2FunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetI2Function, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSI2FunctionFn, Cvoid),\n               dm, fun, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetI2Jacobian(petsclib::PetscLibType,dm::PetscDM, jac::TSI2JacobianFn, ctx::Cvoid) \nset `TS` implicit Jacobian evaluation function for 2nd order systems from a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm`  - `DM` to be used with `TS`\n- `jac` - Jacobian evaluation routine\n- `ctx` - context for Jacobian evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `TSI2JacobianFn`, `TSSetI2Jacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetI2Jacobian\"))\n\"\"\"\nfunction DMTSSetI2Jacobian(petsclib::PetscLibType, dm::PetscDM, jac::TSI2JacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetI2Jacobian(petsclib::$UnionPetscLib, dm::PetscDM, jac::TSI2JacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetI2Jacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSI2JacobianFn}, Ptr{Cvoid}),\n               dm, jac, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetI2JacobianContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `TS` implicit Jacobian evaluation for 2nd order systems context destroy function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `TS`\n- `f`  - implicit Jacobian evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `TSSetI2JacobianContextDestroy()`, `DMTSSetI2Jacobian()`, `TSSetI2Jacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetI2JacobianContextDestroy\"))\n\"\"\"\nfunction DMTSSetI2JacobianContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMTSSetI2JacobianContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMTSSetI2JacobianContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetI2Jacobian(petsclib::PetscLibType,dm::PetscDM, jac::TSI2JacobianFn, ctx::Cvoid) \nget `TS` implicit Jacobian evaluation function for 2nd order systems from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `jac` - Jacobian evaluation function,  for calling sequence see `TSI2JacobianFn`\n- `ctx` - context for Jacobian evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `DMTSSetI2Jacobian()`, `TSGetI2Jacobian()`, `TSI2JacobianFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetI2Jacobian\"))\n\"\"\"\nfunction DMTSGetI2Jacobian(petsclib::PetscLibType, dm::PetscDM, jac::TSI2JacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetI2Jacobian(petsclib::$UnionPetscLib, dm::PetscDM, jac::TSI2JacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetI2Jacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSI2JacobianFn, Cvoid),\n               dm, jac, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetRHSFunction(petsclib::PetscLibType,dm::PetscDM, func::TSRHSFunctionFn, ctx::Cvoid) \nset `TS` explicit residual evaluation function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `func` - RHS function evaluation routine, see `TSRHSFunctionFn` for the calling sequence\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `TSRHSFunctionFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetRHSFunction\"))\n\"\"\"\nfunction DMTSSetRHSFunction(petsclib::PetscLibType, dm::PetscDM, func::TSRHSFunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetRHSFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::TSRHSFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSRHSFunctionFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetRHSFunctionContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `TS` explicit residual evaluation context destroy function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `TS`\n- `f`  - explicit evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TSSetRHSFunctionContextDestroy()`, `DMTSSetRHSFunction()`, `TSSetRHSFunction()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetRHSFunctionContextDestroy\"))\n\"\"\"\nfunction DMTSSetRHSFunctionContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMTSSetRHSFunctionContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMTSSetRHSFunctionContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetTransientVariable(petsclib::PetscLibType,dm::PetscDM, tvar::TSTransientVariableFn, ctx::Cvoid) \nsets function to transform from state to transient variables into a `DMTS`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `tvar` - a function that transforms to transient variables, see `TSTransientVariableFn` for the calling sequence\n- `ctx`  - a context for tvar\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TS`, `TSBDF`, `TSSetTransientVariable()`, `DMTSGetTransientVariable()`, `DMTSSetIFunction()`, `DMTSSetIJacobian()`, `TSTransientVariableFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetTransientVariable\"))\n\"\"\"\nfunction DMTSSetTransientVariable(petsclib::PetscLibType, dm::PetscDM, tvar::TSTransientVariableFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetTransientVariable(petsclib::$UnionPetscLib, dm::PetscDM, tvar::TSTransientVariableFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetTransientVariable, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSTransientVariableFn}, Ptr{Cvoid}),\n               dm, tvar, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetTransientVariable(petsclib::PetscLibType,dm::PetscDM, tvar::TSTransientVariableFn, ctx::Cvoid) \ngets function to transform from state to transient variables set with `DMTSSetTransientVariable()` from a `TSDM`\n\nLogically Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `tvar` - a function that transforms to transient variables, see `TSTransientVariableFn` for the calling sequence\n- `ctx`  - a context for tvar\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `DMTSSetTransientVariable()`, `DMTSGetIFunction()`, `DMTSGetIJacobian()`, `TSTransientVariableFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetTransientVariable\"))\n\"\"\"\nfunction DMTSGetTransientVariable(petsclib::PetscLibType, dm::PetscDM, tvar::TSTransientVariableFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetTransientVariable(petsclib::$UnionPetscLib, dm::PetscDM, tvar::TSTransientVariableFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetTransientVariable, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSTransientVariableFn, Ptr{Cvoid}),\n               dm, tvar, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetSolutionFunction(petsclib::PetscLibType,dm::PetscDM, func::TSSolutionFn, ctx::Cvoid) \ngets the `TS` solution evaluation function from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `func` - solution function evaluation function, for calling sequence see `TSSolutionFn`\n- `ctx`  - context for solution evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TS`, `DM`, `DMTSSetSolutionFunction()`, `TSSolutionFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetSolutionFunction\"))\n\"\"\"\nfunction DMTSGetSolutionFunction(petsclib::PetscLibType, dm::PetscDM, func::TSSolutionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetSolutionFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::TSSolutionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetSolutionFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSSolutionFn, Cvoid),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetSolutionFunction(petsclib::PetscLibType,dm::PetscDM, func::TSSolutionFn, ctx::Cvoid) \nset `TS` solution evaluation function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `func` - solution function evaluation routine, for calling sequence see `TSSolutionFn`\n- `ctx`  - context for solution evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `DMTSGetSolutionFunction()`, `TSSolutionFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetSolutionFunction\"))\n\"\"\"\nfunction DMTSSetSolutionFunction(petsclib::PetscLibType, dm::PetscDM, func::TSSolutionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetSolutionFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::TSSolutionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetSolutionFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSSolutionFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetForcingFunction(petsclib::PetscLibType,dm::PetscDM, func::TSForcingFn, ctx::Cvoid) \nset `TS` forcing function evaluation function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `func` - forcing function evaluation routine, for calling sequence see `TSForcingFn`\n- `ctx`  - context for solution evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `TSForcingFn`, `TSSetForcingFunction()`, `DMTSGetForcingFunction()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetForcingFunction\"))\n\"\"\"\nfunction DMTSSetForcingFunction(petsclib::PetscLibType, dm::PetscDM, func::TSForcingFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetForcingFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::TSForcingFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetForcingFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSForcingFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetForcingFunction(petsclib::PetscLibType,dm::PetscDM, f::TSForcingFn, ctx::Cvoid) \nget `TS` forcing function evaluation function from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `f`   - forcing function evaluation function; see `TSForcingFn` for the calling sequence\n- `ctx` - context for solution evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TS`, `DM`, `TSSetForcingFunction()`, `TSForcingFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetForcingFunction\"))\n\"\"\"\nfunction DMTSGetForcingFunction(petsclib::PetscLibType, dm::PetscDM, f::TSForcingFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetForcingFunction(petsclib::$UnionPetscLib, dm::PetscDM, f::TSForcingFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetForcingFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSForcingFn, Cvoid),\n               dm, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetRHSFunction(petsclib::PetscLibType,dm::PetscDM, func::TSRHSFunctionFn, ctx::Cvoid) \nget `TS` explicit residual evaluation function from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `func` - residual evaluation function, for calling sequence see `TSRHSFunctionFn`\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `TSRHSFunctionFn`, `TSGetRHSFunction()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetRHSFunction\"))\n\"\"\"\nfunction DMTSGetRHSFunction(petsclib::PetscLibType, dm::PetscDM, func::TSRHSFunctionFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetRHSFunction(petsclib::$UnionPetscLib, dm::PetscDM, func::TSRHSFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSRHSFunctionFn, Cvoid),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetIJacobian(petsclib::PetscLibType,dm::PetscDM, func::TSIJacobianFn, ctx::Cvoid) \nset `TS` Jacobian evaluation function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `func` - Jacobian evaluation routine, see `TSIJacobianFn` for the calling sequence\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TS`, `DM`, `TSIJacobianFn`, `DMTSGetIJacobian()`, `TSSetIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIJacobian\"))\n\"\"\"\nfunction DMTSSetIJacobian(petsclib::PetscLibType, dm::PetscDM, func::TSIJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetIJacobian(petsclib::$UnionPetscLib, dm::PetscDM, func::TSIJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetIJacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSIJacobianFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetIJacobianContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `TS` Jacobian evaluation context destroy function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `TS`\n- `f`  - Jacobian evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TSSetIJacobianContextDestroy()`, `TSSetI2JacobianContextDestroy()`, `DMTSSetIJacobian()`, `TSSetIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIJacobianContextDestroy\"))\n\"\"\"\nfunction DMTSSetIJacobianContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMTSSetIJacobianContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMTSSetIJacobianContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetIJacobian(petsclib::PetscLibType,dm::PetscDM, func::TSIJacobianFn, ctx::Cvoid) \nget `TS` Jacobian evaluation function from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `func` - Jacobian evaluation function, for calling sequence see `TSIJacobianFn`\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `DMTSSetIJacobian()`, `TSIJacobianFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetIJacobian\"))\n\"\"\"\nfunction DMTSGetIJacobian(petsclib::PetscLibType, dm::PetscDM, func::TSIJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetIJacobian(petsclib::$UnionPetscLib, dm::PetscDM, func::TSIJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetIJacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSIJacobianFn, Cvoid),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetRHSJacobian(petsclib::PetscLibType,dm::PetscDM, func::TSRHSJacobianFn, ctx::Cvoid) \nset `TS` Jacobian evaluation function into a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `func` - Jacobian evaluation routine, for calling sequence see `TSIJacobianFn`\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TSRHSJacobianFn`, `DMTSGetRHSJacobian()`, `TSSetRHSJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetRHSJacobian\"))\n\"\"\"\nfunction DMTSSetRHSJacobian(petsclib::PetscLibType, dm::PetscDM, func::TSRHSJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMTSSetRHSJacobian(petsclib::$UnionPetscLib, dm::PetscDM, func::TSRHSJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetRHSJacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{TSRHSJacobianFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetRHSJacobianContextDestroy(petsclib::PetscLibType,dm::PetscDM, f::PetscCtxDestroyFn) \nset `TS` Jacobian evaluation context destroy function from a `DMTS`\n\nNot Collective\n\nInput Parameters:\n- `dm` - `DM` to be used with `TS`\n- `f`  - Jacobian evaluation context destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `TS`, `TSSetRHSJacobianContextDestroy()`, `DMTSSetRHSJacobian()`, `TSSetRHSJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetRHSJacobianContextDestroy\"))\n\"\"\"\nfunction DMTSSetRHSJacobianContextDestroy(petsclib::PetscLibType, dm::PetscDM, f::PetscCtxDestroyFn) end\n\n@for_petsc function DMTSSetRHSJacobianContextDestroy(petsclib::$UnionPetscLib, dm::PetscDM, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMTSSetRHSJacobianContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscCtxDestroyFn}),\n               dm, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSGetRHSJacobian(petsclib::PetscLibType,dm::PetscDM, func::TSRHSJacobianFn, ctx::Cvoid) \nget `TS` Jacobian evaluation function from a `DMTS`\n\nNot Collective\n\nInput Parameter:\n- `dm` - `DM` to be used with `TS`\n\nOutput Parameters:\n- `func` - Jacobian evaluation function, for calling sequence see `TSRHSJacobianFn`\n- `ctx`  - context for residual evaluation\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`, `DMTSSetRHSJacobian()`, `TSRHSJacobianFn`\n\n# External Links\n$(_doc_external(\"Ts/DMTSGetRHSJacobian\"))\n\"\"\"\nfunction DMTSGetRHSJacobian(petsclib::PetscLibType, dm::PetscDM, func::TSRHSJacobianFn, ctx::Cvoid) end\n\n@for_petsc function DMTSGetRHSJacobian(petsclib::$UnionPetscLib, dm::PetscDM, func::TSRHSJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSGetRHSJacobian, $petsc_library),\n               PetscErrorCode,\n               (CDM, TSRHSJacobianFn, Cvoid),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetIFunctionSerialize(petsclib::PetscLibType,dm::PetscDM, view::external, load::external) \nsets functions used to view and load a `TSIFunctionFn` context\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `view` - viewer function\n- `load` - loading function\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIFunctionSerialize\"))\n\"\"\"\nfunction DMTSSetIFunctionSerialize(petsclib::PetscLibType, dm::PetscDM, view::external, load::external) end\n\n@for_petsc function DMTSSetIFunctionSerialize(petsclib::$UnionPetscLib, dm::PetscDM, view::external, load::external )\n\n    @chk ccall(\n               (:DMTSSetIFunctionSerialize, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external),\n               dm, view, load,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetIJacobianSerialize(petsclib::PetscLibType,dm::PetscDM, view::external, load::external) \nsets functions used to view and load a `TSIJacobianFn` context\n\nNot Collective\n\nInput Parameters:\n- `dm`   - `DM` to be used with `TS`\n- `view` - viewer function\n- `load` - loading function\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMTS`, `DM`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIJacobianSerialize\"))\n\"\"\"\nfunction DMTSSetIJacobianSerialize(petsclib::PetscLibType, dm::PetscDM, view::external, load::external) end\n\n@for_petsc function DMTSSetIJacobianSerialize(petsclib::$UnionPetscLib, dm::PetscDM, view::external, load::external )\n\n    @chk ccall(\n               (:DMTSSetIJacobianSerialize, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, external),\n               dm, view, load,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetBoundaryLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset the function for essential boundary data for a local implicit function evaluation.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local function evaluation\n- `ctx`  - context for function evaluation\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `DM`, `TS`, `DMTSSetIFunction()`, `DMTSSetIJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetBoundaryLocal\"))\n\"\"\"\nfunction DMTSSetBoundaryLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMTSSetBoundaryLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetBoundaryLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetIFunctionLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local implicit function evaluation function. This function is called with local vector\ncontaining the local vector information PLUS ghost point information. It should compute a result for all local\nelements and `DM` will automatically accumulate the overlapping values.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local function evaluation\n- `ctx`  - context for function evaluation\n\nLevel: beginner\n\n-seealso: [](ch_ts), `DM`, `DMTSGetIFunctionLocal()`, `DMTSSetIFunction()`, `DMTSSetIJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIFunctionLocal\"))\n\"\"\"\nfunction DMTSSetIFunctionLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMTSSetIFunctionLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetIFunctionLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetIJacobianLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local Jacobian evaluation function\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local Jacobian evaluation\n- `ctx`  - optional context for local Jacobian evaluation\n\nLevel: beginner\n\n-seealso: [](ch_ts), `DM`, `DMTSGetIJacobianLocal()`, `DMTSSetIFunctionLocal()`, `DMTSSetIJacobian()`, `DMTSSetIFunction()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetIJacobianLocal\"))\n\"\"\"\nfunction DMTSSetIJacobianLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMTSSetIJacobianLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetIJacobianLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSSetRHSFunctionLocal(petsclib::PetscLibType,dm::PetscDM, func::external, ctx::Cvoid) \nset a local rhs function evaluation function. This function is called with local vector\ncontaining the local vector information PLUS ghost point information. It should compute a result for all local\nelements and `DM` will automatically accumulate the overlapping values.\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local function evaluation\n- `ctx`  - context for function evaluation\n\nLevel: beginner\n\n-seealso: [](ch_ts), `DM`, `DMTSGetRHSFunctionLocal()`, `DMTSSetRHSFunction()`, `DMTSSetIFunction()`, `DMTSSetIJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSSetRHSFunctionLocal\"))\n\"\"\"\nfunction DMTSSetRHSFunctionLocal(petsclib::PetscLibType, dm::PetscDM, func::external, ctx::Cvoid) end\n\n@for_petsc function DMTSSetRHSFunctionLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMTSSetRHSFunctionLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, external, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSCreateRHSMassMatrix(petsclib::PetscLibType,dm::PetscDM) \nThis creates the mass matrix associated with the given `DM`, and a solver to invert it, and stores them in the `DM` context.\n\nCollective\n\nInput Parameter:\n- `dm` - `DM` providing the mass matrix\n\nLevel: developer\n\n-seealso: [](ch_ts), `DM`, `DMTSCreateRHSMassMatrixLumped()`, `DMTSDestroyRHSMassMatrix()`, `DMCreateMassMatrix()`, `DMTS`\n\n# External Links\n$(_doc_external(\"Ts/DMTSCreateRHSMassMatrix\"))\n\"\"\"\nfunction DMTSCreateRHSMassMatrix(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMTSCreateRHSMassMatrix(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMTSCreateRHSMassMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSCreateRHSMassMatrixLumped(petsclib::PetscLibType,dm::PetscDM) \nThis creates the lumped mass matrix associated with the given `DM`, and a solver to invert it, and stores them in the `DM` context.\n\nCollective\n\nInput Parameter:\n- `dm` - `DM` providing the mass matrix\n\nLevel: developer\n\n-seealso: [](ch_ts), `DM`, `DMTSCreateRHSMassMatrix()`, `DMTSDestroyRHSMassMatrix()`, `DMCreateMassMatrix()`, `DMTS`\n\n# External Links\n$(_doc_external(\"Ts/DMTSCreateRHSMassMatrixLumped\"))\n\"\"\"\nfunction DMTSCreateRHSMassMatrixLumped(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMTSCreateRHSMassMatrixLumped(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMTSCreateRHSMassMatrixLumped, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMTSDestroyRHSMassMatrix(petsclib::PetscLibType,dm::PetscDM) \nDestroys the mass matrix and solver stored in the `DM` context, if they exist.\n\nLogically Collective\n\nInput Parameter:\n- `dm` - `DM` providing the mass matrix\n\nLevel: developer\n\n-seealso: [](ch_ts), `DM`, `DMTSCreateRHSMassMatrixLumped()`, `DMCreateMassMatrix()`, `DMTS`\n\n# External Links\n$(_doc_external(\"Ts/DMTSDestroyRHSMassMatrix\"))\n\"\"\"\nfunction DMTSDestroyRHSMassMatrix(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMTSDestroyRHSMassMatrix(petsclib::$UnionPetscLib, dm::PetscDM )\n\n    @chk ccall(\n               (:DMTSDestroyRHSMassMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTSComputeRHSFunctionFVM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid) \nForm the forcing `F` from the local input `locX` using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`   - The mesh\n- `time` - The time\n- `locX` - Local solution\n- `user` - The user context\n\nOutput Parameter:\n- `F` - Global output vector\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMPLEX`, `TS`, `DMPlexComputeJacobianActionFEM()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexTSComputeRHSFunctionFVM\"))\n\"\"\"\nfunction DMPlexTSComputeRHSFunctionFVM(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexTSComputeRHSFunctionFVM(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexTSComputeRHSFunctionFVM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec, Ptr{Cvoid}),\n               dm, time, locX, F, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTSComputeBoundary(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, user::Cvoid) \nInsert the essential boundary values into the local input `locX` and/or its time derivative `locX_t` using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`     - The mesh\n- `time`   - The time\n- `locX`   - Local solution\n- `locX_t` - Local solution time derivative, or `NULL`\n- `user`   - The user context\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMPLEX`, `TS`, `DMPlexComputeJacobianActionFEM()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexTSComputeBoundary\"))\n\"\"\"\nfunction DMPlexTSComputeBoundary(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexTSComputeBoundary(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locX::PetscVec, locX_t::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexTSComputeBoundary, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec, Ptr{Cvoid}),\n               dm, time, locX, locX_t, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTSComputeIFunctionFEM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, locF::PetscVec, user::Cvoid) \nForm the local residual `locF` from the local input `locX` using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`     - The mesh\n- `time`   - The time\n- `locX`   - Local solution\n- `locX_t` - Local solution time derivative, or `NULL`\n- `user`   - The user context\n\nOutput Parameter:\n- `locF` - Local output vector\n\nLevel: developer\n\n-seealso: [](ch_ts), `DMPLEX`, `TS`, `DMPlexTSComputeRHSFunctionFEM()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexTSComputeIFunctionFEM\"))\n\"\"\"\nfunction DMPlexTSComputeIFunctionFEM(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, locF::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexTSComputeIFunctionFEM(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locX::PetscVec, locX_t::PetscVec, locF::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexTSComputeIFunctionFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec, CVec, Ptr{Cvoid}),\n               dm, time, locX, locX_t, locF, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTSComputeIJacobianFEM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat, user::Cvoid) \nForm the Jacobian `Jac` from the local input `locX` using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`       - The mesh\n- `time`     - The time\n- `locX`     - Local solution\n- `locX_t`   - Local solution time derivative, or `NULL`\n- `X_tShift` - The multiplicative parameter for dF/du_t\n- `user`     - The user context\n\nOutput Parameters:\n- `Jac`  - the Jacobian\n- `JacP` - an additional approximation for the Jacobian to be used to compute the preconditioner (often is `Jac`)\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `DM`, `DMPlexTSComputeIFunctionFEM()`, `DMPlexTSComputeRHSFunctionFEM()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexTSComputeIJacobianFEM\"))\n\"\"\"\nfunction DMPlexTSComputeIJacobianFEM(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat, user::Cvoid) end\n\n@for_petsc function DMPlexTSComputeIJacobianFEM(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locX::PetscVec, locX_t::PetscVec, X_tShift::$PetscReal, Jac::PetscMat, JacP::PetscMat, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexTSComputeIJacobianFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec, $PetscReal, CMat, CMat, Ptr{Cvoid}),\n               dm, time, locX, locX_t, X_tShift, Jac, JacP, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTSComputeRHSFunctionFEM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locG::PetscVec, user::Cvoid) \nForm the local residual `locG` from the local input `locX` using pointwise functions specified by the user\n\nInput Parameters:\n- `dm`   - The mesh\n- `time` - The time\n- `locX` - Local solution\n- `user` - The user context\n\nOutput Parameter:\n- `locG` - Local output vector\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `DM`, `DMPlexTSComputeIFunctionFEM()`, `DMPlexTSComputeIJacobianFEM()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexTSComputeRHSFunctionFEM\"))\n\"\"\"\nfunction DMPlexTSComputeRHSFunctionFEM(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locX::PetscVec, locG::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexTSComputeRHSFunctionFEM(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locX::PetscVec, locG::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexTSComputeRHSFunctionFEM, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec, Ptr{Cvoid}),\n               dm, time, locX, locG, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tresidual::PetscReal = DMTSCheckResidual(petsclib::PetscLibType,ts::TS, dm::PetscDM, t::PetscReal, u::PetscVec, u_t::PetscVec, tol::PetscReal) \nCheck the residual of the exact solution\n\nInput Parameters:\n- `ts`  - the `TS` object\n- `dm`  - the `DM`\n- `t`   - the time\n- `u`   - a `DM` vector\n- `u_t` - a `DM` vector\n- `tol` - A tolerance for the check, or -1 to print the results instead\n\nOutput Parameter:\n- `residual` - The residual norm of the exact solution, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_ts), `DM`, `DMTSCheckFromOptions()`, `DMTSCheckJacobian()`, `DNSNESCheckFromOptions()`, `DMSNESCheckDiscretization()`, `DMSNESCheckJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSCheckResidual\"))\n\"\"\"\nfunction DMTSCheckResidual(petsclib::PetscLibType, ts::TS, dm::PetscDM, t::PetscReal, u::PetscVec, u_t::PetscVec, tol::PetscReal) end\n\n@for_petsc function DMTSCheckResidual(petsclib::$UnionPetscLib, ts::TS, dm::PetscDM, t::$PetscReal, u::PetscVec, u_t::PetscVec, tol::$PetscReal )\n\tresidual_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMTSCheckResidual, $petsc_library),\n               PetscErrorCode,\n               (CTS, CDM, $PetscReal, CVec, CVec, $PetscReal, Ptr{$PetscReal}),\n               ts, dm, t, u, u_t, tol, residual_,\n              )\n\n\tresidual = residual_[]\n\n\treturn residual\nend \n\n\"\"\"\n\tisLinear::PetscBool,convRate::PetscReal = DMTSCheckJacobian(petsclib::PetscLibType,ts::TS, dm::PetscDM, t::PetscReal, u::PetscVec, u_t::PetscVec, tol::PetscReal) \nCheck the Jacobian of the exact solution against the residual using the Taylor Test\n\nInput Parameters:\n- `ts`  - the `TS` object\n- `dm`  - the `DM`\n- `t`   - the time\n- `u`   - a `DM` vector\n- `u_t` - a `DM` vector\n- `tol` - A tolerance for the check, or -1 to print the results instead\n\nOutput Parameters:\n- `isLinear` - Flag indicating that the function looks linear, or `NULL`\n- `convRate` - The rate of convergence of the linear model, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_ts), `DNTSCheckFromOptions()`, `DMTSCheckResidual()`, `DNSNESCheckFromOptions()`, `DMSNESCheckDiscretization()`, `DMSNESCheckResidual()`\n\n# External Links\n$(_doc_external(\"Ts/DMTSCheckJacobian\"))\n\"\"\"\nfunction DMTSCheckJacobian(petsclib::PetscLibType, ts::TS, dm::PetscDM, t::PetscReal, u::PetscVec, u_t::PetscVec, tol::PetscReal) end\n\n@for_petsc function DMTSCheckJacobian(petsclib::$UnionPetscLib, ts::TS, dm::PetscDM, t::$PetscReal, u::PetscVec, u_t::PetscVec, tol::$PetscReal )\n\tisLinear_ = Ref{PetscBool}()\n\tconvRate_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMTSCheckJacobian, $petsc_library),\n               PetscErrorCode,\n               (CIS, CDM, $PetscReal, CVec, CVec, $PetscReal, Ptr{PetscBool}, Ptr{$PetscReal}),\n               ts, dm, t, u, u_t, tol, isLinear_, convRate_,\n              )\n\n\tisLinear = isLinear_[]\n\tconvRate = convRate_[]\n\n\treturn isLinear,convRate\nend \n\n\"\"\"\n\tDMTSCheckFromOptions(petsclib::PetscLibType,ts::TS, u::PetscVec) \nCheck the residual and Jacobian functions using the exact solution by outputting some diagnostic information based on\nvalues in the options database\n\nInput Parameters:\n- `ts` - the `TS` object\n- `u`  - representative `TS` vector\n\nLevel: developer\n\n-seealso: `DMTS`\n\n# External Links\n$(_doc_external(\"Ts/DMTSCheckFromOptions\"))\n\"\"\"\nfunction DMTSCheckFromOptions(petsclib::PetscLibType, ts::TS, u::PetscVec) end\n\n@for_petsc function DMTSCheckFromOptions(petsclib::$UnionPetscLib, ts::TS, u::PetscVec )\n\n    @chk ccall(\n               (:DMTSCheckFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec),\n               ts, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDATSSetRHSFunctionLocal(petsclib::PetscLibType,dm::PetscDM, imode::InsertMode, func::DMDATSRHSFunctionLocalFn, ctx::Cvoid) \nset a local residual evaluation function for use with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - `DM` to associate callback with\n- `imode` - insert mode for the residual\n- `func`  - local residual evaluation, see `DMDATSRHSFunctionLocalFn` for the calling sequence\n- `ctx`   - optional context for local residual evaluation\n\nLevel: beginner\n\n-seealso: [](ch_ts), `DMDA`, `DMDATSRHSFunctionLocalFn`, `TS`, `TSSetRHSFunction()`, `DMTSSetRHSFunction()`, `DMDATSSetRHSJacobianLocal()`, `DMDASNESSetFunctionLocal()`\n\n# External Links\n$(_doc_external(\"Ts/DMDATSSetRHSFunctionLocal\"))\n\"\"\"\nfunction DMDATSSetRHSFunctionLocal(petsclib::PetscLibType, dm::PetscDM, imode::InsertMode, func::DMDATSRHSFunctionLocalFn, ctx::Cvoid) end\n\n@for_petsc function DMDATSSetRHSFunctionLocal(petsclib::$UnionPetscLib, dm::PetscDM, imode::InsertMode, func::DMDATSRHSFunctionLocalFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDATSSetRHSFunctionLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, InsertMode, Ptr{DMDATSRHSFunctionLocalFn}, Ptr{Cvoid}),\n               dm, imode, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDATSSetRHSJacobianLocal(petsclib::PetscLibType,dm::PetscDM, func::DMDATSRHSJacobianLocalFn, ctx::Cvoid) \nset a local residual evaluation function for use with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local RHS Jacobian evaluation routine, see `DMDATSRHSJacobianLocalFn` for the calling sequence\n- `ctx`  - optional context for local jacobian evaluation\n\nLevel: beginner\n\n-seealso: [](ch_ts), `DMDA`, `DMDATSRHSJacobianLocalFn`, `DMTSSetRHSJacobian()`,\n`DMDATSSetRHSFunctionLocal()`, `DMDASNESSetJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Ts/DMDATSSetRHSJacobianLocal\"))\n\"\"\"\nfunction DMDATSSetRHSJacobianLocal(petsclib::PetscLibType, dm::PetscDM, func::DMDATSRHSJacobianLocalFn, ctx::Cvoid) end\n\n@for_petsc function DMDATSSetRHSJacobianLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::DMDATSRHSJacobianLocalFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDATSSetRHSJacobianLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMDATSRHSJacobianLocalFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDATSSetIFunctionLocal(petsclib::PetscLibType,dm::PetscDM, imode::InsertMode, func::DMDATSIFunctionLocalFn, ctx::Cvoid) \nset a local residual evaluation function for use with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`    - `DM` to associate callback with\n- `imode` - the insert mode of the function\n- `func`  - local residual evaluation, see `DMDATSIFunctionLocalFn` for the calling sequence\n- `ctx`   - optional context for local residual evaluation\n\nLevel: beginner\n\n-seealso: [](ch_ts), `DMDA`, `DMDATSIFunctionLocalFn`, `DMTSSetIFunction()`,\n`DMDATSSetIJacobianLocal()`, `DMDASNESSetFunctionLocal()`\n\n# External Links\n$(_doc_external(\"Ts/DMDATSSetIFunctionLocal\"))\n\"\"\"\nfunction DMDATSSetIFunctionLocal(petsclib::PetscLibType, dm::PetscDM, imode::InsertMode, func::DMDATSIFunctionLocalFn, ctx::Cvoid) end\n\n@for_petsc function DMDATSSetIFunctionLocal(petsclib::$UnionPetscLib, dm::PetscDM, imode::InsertMode, func::DMDATSIFunctionLocalFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDATSSetIFunctionLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, InsertMode, Ptr{DMDATSIFunctionLocalFn}, Ptr{Cvoid}),\n               dm, imode, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMDATSSetIJacobianLocal(petsclib::PetscLibType,dm::PetscDM, func::DMDATSIJacobianLocalFn, ctx::Cvoid) \nset a local residual evaluation function for use with `DMDA`\n\nLogically Collective\n\nInput Parameters:\n- `dm`   - `DM` to associate callback with\n- `func` - local residual evaluation, see `DMDATSIJacobianLocalFn` for the calling sequence\n- `ctx`  - optional context for local residual evaluation\n\nLevel: beginner\n\n-seealso: [](ch_ts), `DMDA`, `DMDATSIJacobianLocalFn`, `DMTSSetIJacobian()`,\n`DMDATSSetIFunctionLocal()`, `DMDASNESSetJacobianLocal()`\n\n# External Links\n$(_doc_external(\"Ts/DMDATSSetIJacobianLocal\"))\n\"\"\"\nfunction DMDATSSetIJacobianLocal(petsclib::PetscLibType, dm::PetscDM, func::DMDATSIJacobianLocalFn, ctx::Cvoid) end\n\n@for_petsc function DMDATSSetIJacobianLocal(petsclib::$UnionPetscLib, dm::PetscDM, func::DMDATSIJacobianLocalFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMDATSSetIJacobianLocal, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMDATSIJacobianLocalFn}, Ptr{Cvoid}),\n               dm, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTSComputeRHSFunctionFVMCEED(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/DMPlexTSComputeRHSFunctionFVMCEED\"))\n\"\"\"\nfunction DMPlexTSComputeRHSFunctionFVMCEED(petsclib::PetscLibType, dm::PetscDM, time::PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid) end\n\n@for_petsc function DMPlexTSComputeRHSFunctionFVMCEED(petsclib::$UnionPetscLib, dm::PetscDM, time::$PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid )\n\n    @chk ccall(\n               (:DMPlexTSComputeRHSFunctionFVMCEED, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscReal, CVec, CVec, Ptr{Cvoid}),\n               dm, time, locX, F, user,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLandauAddMaxwellians(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, time::PetscReal, temps::Vector{PetscReal}, ns::Vector{PetscReal}, grid::PetscInt, b_id::PetscInt, n_batch::PetscInt, actx::Cvoid) \nAdd a Maxwellian distribution to a state\n\nCollective\n\nInput Parameters:\n- `dm`      - The mesh (local)\n- `time`    - Current time\n- `temps`   - Temperatures of each species (global)\n- `ns`      - Number density of each species (global)\n- `grid`    - index into current grid - just used for offset into `temp` and `ns`\n- `b_id`    - batch index\n- `n_batch` - number of batches\n- `actx`    - Landau context\n\nOutput Parameter:\n- `X` - The state (local to this grid)\n\nLevel: beginner\n\n-seealso: `DMPlexLandauCreateVelocitySpace()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauAddMaxwellians\"))\n\"\"\"\nfunction DMPlexLandauAddMaxwellians(petsclib::PetscLibType, dm::PetscDM, X::PetscVec, time::PetscReal, temps::Vector{PetscReal}, ns::Vector{PetscReal}, grid::PetscInt, b_id::PetscInt, n_batch::PetscInt, actx::Cvoid) end\n\n@for_petsc function DMPlexLandauAddMaxwellians(petsclib::$UnionPetscLib, dm::PetscDM, X::PetscVec, time::$PetscReal, temps::Vector{$PetscReal}, ns::Vector{$PetscReal}, grid::$PetscInt, b_id::$PetscInt, n_batch::$PetscInt, actx::Cvoid )\n\n    @chk ccall(\n               (:DMPlexLandauAddMaxwellians, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, $PetscInt, $PetscInt, Ptr{Cvoid}),\n               dm, X, time, temps, ns, grid, b_id, n_batch, actx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tX::PetscVec,J::PetscMat,pack::PetscDM = DMPlexLandauCreateVelocitySpace(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, prefix::String) \nCreate a `DMPLEX` velocity space mesh\n\nCollective\n\nInput Parameters:\n- `comm`   - The MPI communicator\n- `dim`    - velocity space dimension (2 for axisymmetric, 3 for full 3X + 3V solver)\n- `prefix` - prefix for options (not tested)\n\nOutput Parameters:\n- `pack` - The `DM` object representing the mesh\n- `X`    - A vector (user destroys)\n- `J`    - Optional matrix (object destroys)\n\nLevel: beginner\n\n-seealso: `DMPlexCreate()`, `DMPlexLandauDestroyVelocitySpace()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauCreateVelocitySpace\"))\n\"\"\"\nfunction DMPlexLandauCreateVelocitySpace(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, prefix::String) end\n\n@for_petsc function DMPlexLandauCreateVelocitySpace(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, prefix::String )\n\tX_ = Ref{CVec}()\n\tJ_ = Ref{CMat}()\n\tpack_ = Ref{CDM}()\n\n    @chk ccall(\n               (:DMPlexLandauCreateVelocitySpace, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{Cchar}, Ptr{CVec}, Ptr{CMat}, Ptr{CDM}),\n               comm, dim, prefix, X_, J_, pack_,\n              )\n\n\tX = PetscVec(X_[], petsclib)\n\tJ = PetscMat(J_[], petsclib)\n\tpack = PetscDM(pack_[], petsclib)\n\n\treturn X,J,pack\nend \n\n\"\"\"\n\tDMPlexLandauAccess(petsclib::PetscLibType,pack::PetscDM, X::PetscVec, func::external, user_ctx::Cvoid) \nAccess to the distribution function with user callback\n\nCollective\n\nInput Parameters:\n- `pack`     - the `DMCOMPOSITE`\n- `func`     - call back function\n- `user_ctx` - user context\n\nInput/Output Parameter:\n- `X` - Vector to data to\n\nLevel: advanced\n\n-seealso: `DMPlexLandauCreateVelocitySpace()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauAccess\"))\n\"\"\"\nfunction DMPlexLandauAccess(petsclib::PetscLibType, pack::PetscDM, X::PetscVec, func::external, user_ctx::Cvoid) end\n\n@for_petsc function DMPlexLandauAccess(petsclib::$UnionPetscLib, pack::PetscDM, X::PetscVec, func::external, user_ctx::Cvoid )\n\n    @chk ccall(\n               (:DMPlexLandauAccess, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, external, Ptr{Cvoid}),\n               pack, X, func, user_ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLandauDestroyVelocitySpace(petsclib::PetscLibType,dm::PetscDM) \nDestroy a `DMPLEX` velocity space mesh\n\nCollective\n\nInput/Output Parameters:\n- `dm` - the `DM` to destroy\n\nLevel: beginner\n\n-seealso: `DMPlexLandauCreateVelocitySpace()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauDestroyVelocitySpace\"))\n\"\"\"\nfunction DMPlexLandauDestroyVelocitySpace(petsclib::PetscLibType, dm::PetscDM) end\n\n@for_petsc function DMPlexLandauDestroyVelocitySpace(petsclib::$UnionPetscLib, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMPlexLandauDestroyVelocitySpace, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CDM},),\n               dm_,\n              )\n\n\tdm.ptr = dm_[]\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLandauPrintNorms(petsclib::PetscLibType,X::PetscVec, stepi::PetscInt) \ncollects moments and prints them\n\nCollective\n\nInput Parameters:\n- `X`     - the state\n- `stepi` - current step to print\n\nLevel: beginner\n\n-seealso: `DMPlexLandauCreateVelocitySpace()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauPrintNorms\"))\n\"\"\"\nfunction DMPlexLandauPrintNorms(petsclib::PetscLibType, X::PetscVec, stepi::PetscInt) end\n\n@for_petsc function DMPlexLandauPrintNorms(petsclib::$UnionPetscLib, X::PetscVec, stepi::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexLandauPrintNorms, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt),\n               X, stepi,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAmat::PetscMat = DMPlexLandauCreateMassMatrix(petsclib::PetscLibType,pack::PetscDM) \nCreate mass matrix for Landau in Plex space (not field major order of Jacobian)\n- `puts mass matrix into ctx->M`\n\nCollective\n\nInput Parameter:\n- `pack` - the `DM` object. Puts matrix in Landau context M field\n\nOutput Parameter:\n- `Amat` - The mass matrix (optional), mass matrix is added to the `DM` context\n\nLevel: beginner\n\n-seealso: `DMPlexLandauCreateVelocitySpace()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauCreateMassMatrix\"))\n\"\"\"\nfunction DMPlexLandauCreateMassMatrix(petsclib::PetscLibType, pack::PetscDM) end\n\n@for_petsc function DMPlexLandauCreateMassMatrix(petsclib::$UnionPetscLib, pack::PetscDM )\n\tAmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:DMPlexLandauCreateMassMatrix, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{CMat}),\n               pack, Amat_,\n              )\n\n\tAmat = PetscMat(Amat_[], petsclib)\n\n\treturn Amat\nend \n\n\"\"\"\n\tDMPlexLandauIFunction(petsclib::PetscLibType,ts::TS, time_dummy::PetscReal, X::PetscVec, X_t::PetscVec, F::PetscVec, actx::Cvoid) \n`TS` residual calculation, confusingly this computes the Jacobian w/o mass\n\nCollective\n\nInput Parameters:\n- `ts`         - The time stepping context\n- `time_dummy` - current time (not used)\n- `X`          - Current state\n- `X_t`        - Time derivative of current state\n- `actx`       - Landau context\n\nOutput Parameter:\n- `F` - The residual\n\nLevel: beginner\n\n-seealso: `DMPlexLandauCreateVelocitySpace()`, `DMPlexLandauIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauIFunction\"))\n\"\"\"\nfunction DMPlexLandauIFunction(petsclib::PetscLibType, ts::TS, time_dummy::PetscReal, X::PetscVec, X_t::PetscVec, F::PetscVec, actx::Cvoid) end\n\n@for_petsc function DMPlexLandauIFunction(petsclib::$UnionPetscLib, ts::TS, time_dummy::$PetscReal, X::PetscVec, X_t::PetscVec, F::PetscVec, actx::Cvoid )\n\n    @chk ccall(\n               (:DMPlexLandauIFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, CVec, Ptr{Cvoid}),\n               ts, time_dummy, X, X_t, F, actx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexLandauIJacobian(petsclib::PetscLibType,ts::TS, time_dummy::PetscReal, X::PetscVec, U_tdummy::PetscVec, shift::PetscReal, Amat::PetscMat, Pmat::PetscMat, actx::Cvoid) \n`TS` Jacobian construction, confusingly this adds mass\n\nCollective\n\nInput Parameters:\n- `ts`         - The time stepping context\n- `time_dummy` - current time (not used)\n- `X`          - Current state\n- `U_tdummy`   - Time derivative of current state (not used)\n- `shift`      - shift for du/dt term\n- `actx`       - Landau context\n\nOutput Parameters:\n- `Amat` - Jacobian\n- `Pmat` - same as Amat\n\nLevel: beginner\n\n-seealso: `DMPlexLandauCreateVelocitySpace()`, `DMPlexLandauIFunction()`\n\n# External Links\n$(_doc_external(\"Ts/DMPlexLandauIJacobian\"))\n\"\"\"\nfunction DMPlexLandauIJacobian(petsclib::PetscLibType, ts::TS, time_dummy::PetscReal, X::PetscVec, U_tdummy::PetscVec, shift::PetscReal, Amat::PetscMat, Pmat::PetscMat, actx::Cvoid) end\n\n@for_petsc function DMPlexLandauIJacobian(petsclib::$UnionPetscLib, ts::TS, time_dummy::$PetscReal, X::PetscVec, U_tdummy::PetscVec, shift::$PetscReal, Amat::PetscMat, Pmat::PetscMat, actx::Cvoid )\n\n    @chk ccall(\n               (:DMPlexLandauIJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, $PetscReal, CMat, CMat, Ptr{Cvoid}),\n               ts, time_dummy, X, U_tdummy, shift, Amat, Pmat, actx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexSetGlobalToNaturalSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexSetGlobalToNaturalSF\"))\n\"\"\"\nfunction DMPlexSetGlobalToNaturalSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMPlexSetGlobalToNaturalSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMPlexSetGlobalToNaturalSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, PetscSF),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexGetGlobalToNaturalSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF) \n\n# External Links\n$(_doc_external(\"DMPlex/DMPlexGetGlobalToNaturalSF\"))\n\"\"\"\nfunction DMPlexGetGlobalToNaturalSF(petsclib::PetscLibType, dm::PetscDM, sf::PetscSF) end\n\n@for_petsc function DMPlexGetGlobalToNaturalSF(petsclib::$UnionPetscLib, dm::PetscDM, sf::PetscSF )\n\n    @chk ccall(\n               (:DMPlexGetGlobalToNaturalSF, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscSF}),\n               dm, sf,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/DMaddons_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_DMAdaptor end\nconst DMAdaptor = Ptr{_n_DMAdaptor}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_DMSwarmDataField end\nconst DMSwarmDataField = Ptr{_n_DMSwarmDataField}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_DMSwarmDataBucket end\nconst DMSwarmDataBucket = Ptr{_n_DMSwarmDataBucket}\n\n#mutable struct _n_DMSwarmCellDM end\n#const DMSwarmCellDM = Ptr{_n_DMSwarmCellDM}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_DMSwarmSort end\nconst DMSwarmSort = Ptr{_n_DMSwarmSort}\n\nmutable struct _n_DMPlexPoCintQueue end\nconst DMPlexPoCintQueue = Ptr{_n_DMPlexPoCintQueue}\n\nmutable struct _n_DMNetworkMonitor end\nconst DMNetworkMonitor = Ptr{_n_DMNetworkMonitor}\n\n#mutable struct _n_DMField end\n#const DMField = Ptr{_n_DMField}\n#\n#mutable struct _n_DMPlexTransform end\n#const DMPlexTransform = Ptr{_n_DMPlexTransform}\n\n#mutable struct _n_PetscSimplePoCintFn end\n#const PetscSimplePoCintFn = Ptr{_n_PetscSimplePoCintFn}\n\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\n# -------------------------------------------------------\n\"\"\"\n\tDMAdaptorRegisterAll(petsclib::PetscLibType) \nRegisters all of the adaptor components in the `DM` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMAdaptorType`, `DMRegisterAll()`, `DMAdaptorRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorRegisterAll\"))\n\"\"\"\nfunction DMAdaptorRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function DMAdaptorRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMAdaptorRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorRegisterDestroy(petsclib::PetscLibType) \nThis function destroys the registered `DMAdaptorType`. It is called from `PetscFinalize()`.\n\nNot collective\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMAdaptorRegisterAll()`, `DMAdaptorType`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorRegisterDestroy\"))\n\"\"\"\nfunction DMAdaptorRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function DMAdaptorRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMAdaptorRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorRegister(petsclib::PetscLibType,name::String, vtype::PetscViewerType, format::PetscViewerFormat, monitor::external, create::external, destroy::external) \nRegisters a mesh adaptation monitor routine that may be accessed with `DMAdaptorMonitorSetFromOptions()`\n\nNot Collective\n\nInput Parameters:\n- `name`    - name of a new monitor routine\n- `vtype`   - A `PetscViewerType` for the output\n- `format`  - A `PetscViewerFormat` for the output\n- `monitor` - Monitor routine\n- `create`  - Creation routine, or `NULL`\n- `destroy` - Destruction routine, or `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `DMAdaptor`, `DMAdaptorMonitorSet()`, `DMAdaptorMonitorRegisterAll()`, `DMAdaptorMonitorSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorRegister\"))\n\"\"\"\nfunction DMAdaptorMonitorRegister(petsclib::PetscLibType, name::String, vtype::PetscViewerType, format::PetscViewerFormat, monitor::external, create::external, destroy::external) end\n\n@for_petsc function DMAdaptorMonitorRegister(petsclib::$UnionPetscLib, name::String, vtype::PetscViewerType, format::PetscViewerFormat, monitor::external, create::external, destroy::external )\n\n    @chk ccall(\n               (:DMAdaptorMonitorRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PetscViewerType, PetscViewerFormat, external, external, external),\n               name, vtype, format, monitor, create, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorRegisterDestroy(petsclib::PetscLibType) \nThis function destroys the registered monitors for `DMAdaptor`. It is called from `PetscFinalize()`.\n\nNot collective\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMAdaptorMonitorRegisterAll()`, `DMAdaptor`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorRegisterDestroy\"))\n\"\"\"\nfunction DMAdaptorMonitorRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function DMAdaptorMonitorRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMAdaptorMonitorRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tadaptor::DMAdaptor = DMAdaptorCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreate a `DMAdaptor` object. Its purpose is to construct a adaptation `DMLabel` or metric `Vec` that can be used to modify the `DM`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `DMAdaptor` object\n\nOutput Parameter:\n- `adaptor` - The `DMAdaptor` object\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMAdaptor`, `DMAdaptorDestroy()`, `DMAdaptorAdapt()`, `PetscConvEst`, `PetscConvEstCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorCreate\"))\n\"\"\"\nfunction DMAdaptorCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMAdaptorCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tadaptor_ = Ref{DMAdaptor}()\n\n    @chk ccall(\n               (:DMAdaptorCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{DMAdaptor}),\n               comm, adaptor_,\n              )\n\n\tadaptor = adaptor_[]\n\n\treturn adaptor\nend \n\n\"\"\"\n\tDMAdaptorDestroy(petsclib::PetscLibType,adaptor::DMAdaptor) \nDestroys a `DMAdaptor` object\n\nCollective\n\nInput Parameter:\n- `adaptor` - The `DMAdaptor` object\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMAdaptor`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorDestroy\"))\n\"\"\"\nfunction DMAdaptorDestroy(petsclib::PetscLibType, adaptor::DMAdaptor) end\n\n@for_petsc function DMAdaptorDestroy(petsclib::$UnionPetscLib, adaptor::DMAdaptor )\n\n    @chk ccall(\n               (:DMAdaptorDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMAdaptor},),\n               adaptor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetType(petsclib::PetscLibType,adaptor::DMAdaptor, method::DMAdaptorType) \nSets the particular implementation for a adaptor.\n\nCollective\n\nInput Parameters:\n- `adaptor` - The `DMAdaptor`\n- `method`  - The name of the adaptor type\n\nOptions Database Key:\n- `-adaptor_type <type>` - Sets the adaptor type; see `DMAdaptorType`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMAdaptor`, `DMAdaptorType`, `DMAdaptorGetType()`, `DMAdaptorCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetType\"))\n\"\"\"\nfunction DMAdaptorSetType(petsclib::PetscLibType, adaptor::DMAdaptor, method::DMAdaptorType) end\n\n@for_petsc function DMAdaptorSetType(petsclib::$UnionPetscLib, adaptor::DMAdaptor, method::DMAdaptorType )\n\n    @chk ccall(\n               (:DMAdaptorSetType, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, DMAdaptorType),\n               adaptor, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::DMAdaptorType = DMAdaptorGetType(petsclib::PetscLibType,adaptor::DMAdaptor) \nGets the type name (as a string) from the adaptor.\n\nNot Collective\n\nInput Parameter:\n- `adaptor` - The `DMAdaptor`\n\nOutput Parameter:\n- `type` - The `DMAdaptorType` name\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMAdaptor`, `DMAdaptorType`, `DMAdaptorSetType()`, `DMAdaptorCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorGetType\"))\n\"\"\"\nfunction DMAdaptorGetType(petsclib::PetscLibType, adaptor::DMAdaptor) end\n\n@for_petsc function DMAdaptorGetType(petsclib::$UnionPetscLib, adaptor::DMAdaptor )\n\ttype_ = Ref{DMAdaptorType}()\n\n    @chk ccall(\n               (:DMAdaptorGetType, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, Ptr{DMAdaptorType}),\n               adaptor, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tDMAdaptorMonitorSet(petsclib::PetscLibType,adaptor::DMAdaptor, monitor::external, ctx::Cvoid, monitordestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function to be called at every iteration to monitor\nthe error etc.\n\nLogically Collective\n\nInput Parameters:\n- `adaptor`        - the `DMAdaptor`\n- `monitor`        - pointer to function (if this is `NULL`, it turns off monitoring\n- `ctx`            - [optional] context for private data for the monitor routine (use `NULL` if no context is needed)\n- `monitordestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for its calling sequence\n\nCalling sequence of `monitor`:\n- `adaptor` - the `DMAdaptor`\n- `it`      - iteration number\n- `odm`     - the original `DM`\n- `adm`     - the adapted `DM`\n- `Nf`      - number of fields\n- `enorms`  - (estimated) 2-norm of the error for each field\n- `error`   - `Vec` of cellwise errors\n- `ctx`     - optional monitoring context, as set by `DMAdaptorMonitorSet()`\n\nOptions Database Keys:\n- `-adaptor_monitor_size`                - sets `DMAdaptorMonitorSize()`\n- `-adaptor_monitor_error`               - sets `DMAdaptorMonitorError()`\n- `-adaptor_monitor_error draw`          - sets `DMAdaptorMonitorErrorDraw()` and plots error\n- `-adaptor_monitor_error draw::draw_lg` - sets `DMAdaptorMonitorErrorDrawLG()` and plots error\n- `-dm_adaptor_monitor_cancel`           - Cancels all monitors that have been hardwired into a code by calls to `DMAdaptorMonitorSet()`, but does not cancel those set via the options database.\n\nLevel: beginner\n\n-seealso: [](ch_snes), `DMAdaptorMonitorError()`, `DMAdaptor`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorSet\"))\n\"\"\"\nfunction DMAdaptorMonitorSet(petsclib::PetscLibType, adaptor::DMAdaptor, monitor::external, ctx::Cvoid, monitordestroy::PetscCtxDestroyFn) end\n\n@for_petsc function DMAdaptorMonitorSet(petsclib::$UnionPetscLib, adaptor::DMAdaptor, monitor::external, ctx::Cvoid, monitordestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:DMAdaptorMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               adaptor, monitor, ctx, monitordestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorCancel(petsclib::PetscLibType,adaptor::DMAdaptor) \nClears all monitors for a `DMAdaptor` object.\n\nLogically Collective\n\nInput Parameter:\n- `adaptor` - the `DMAdaptor`\n\nOptions Database Key:\n- `-dm_adaptor_monitor_cancel` - Cancels all monitors that have been hardwired into a code by calls to `DMAdaptorMonitorSet()`, but does not cancel those set via the options database.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `DMAdaptorMonitorError()`, `DMAdaptorMonitorSet()`, `DMAdaptor`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorCancel\"))\n\"\"\"\nfunction DMAdaptorMonitorCancel(petsclib::PetscLibType, adaptor::DMAdaptor) end\n\n@for_petsc function DMAdaptorMonitorCancel(petsclib::$UnionPetscLib, adaptor::DMAdaptor )\n\n    @chk ccall(\n               (:DMAdaptorMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor,),\n               adaptor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorSetFromOptions(petsclib::PetscLibType,adaptor::DMAdaptor, opt::String, name::String, ctx::Cvoid) \nSets a monitor function and viewer appropriate for the type indicated by the user in the options database\n\nCollective\n\nInput Parameters:\n- `adaptor` - `DMadaptor` object you wish to monitor\n- `opt`     - the command line option for this monitor\n- `name`    - the monitor type one is seeking\n- `ctx`     - An optional user context for the monitor, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMAdaptorMonitorRegister()`, `DMAdaptorMonitorSet()`, `PetscOptionsGetViewer()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorSetFromOptions\"))\n\"\"\"\nfunction DMAdaptorMonitorSetFromOptions(petsclib::PetscLibType, adaptor::DMAdaptor, opt::String, name::String, ctx::Cvoid) end\n\n@for_petsc function DMAdaptorMonitorSetFromOptions(petsclib::$UnionPetscLib, adaptor::DMAdaptor, opt::String, name::String, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMAdaptorMonitorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cvoid}),\n               adaptor, opt, name, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetOptionsPrefix(petsclib::PetscLibType,adaptor::DMAdaptor, prefix::String) \nSets the prefix used for searching for all `DMAdaptor` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `adaptor` - the `DMAdaptor`\n- `prefix`  - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_snes), `DMAdaptor`, `SNESSetOptionsPrefix()`, `DMAdaptorSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetOptionsPrefix\"))\n\"\"\"\nfunction DMAdaptorSetOptionsPrefix(petsclib::PetscLibType, adaptor::DMAdaptor, prefix::String) end\n\n@for_petsc function DMAdaptorSetOptionsPrefix(petsclib::$UnionPetscLib, adaptor::DMAdaptor, prefix::String )\n\n    @chk ccall(\n               (:DMAdaptorSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, Ptr{Cchar}),\n               adaptor, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetFromOptions(petsclib::PetscLibType,adaptor::DMAdaptor) \nSets properties of a `DMAdaptor` object from values in the options database\n\nCollective\n\nInput Parameter:\n- `adaptor` - The `DMAdaptor` object\n\nOptions Database Keys:\n- `-adaptor_monitor_size`                - Monitor the mesh size\n- `-adaptor_monitor_error`               - Monitor the solution error\n- `-adaptor_sequence_num <num>`          - Number of adaptations to generate an optimal grid\n- `-adaptor_target_num <num>`            - Set the target number of vertices N_adapt, -1 for automatic determination\n- `-adaptor_refinement_factor <r>`       - Set r such that N_adapt = r^dim N_orig\n- `-adaptor_mixed_setup_function <func>` - Set the function func that sets up the mixed problem\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMAdaptor`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetFromOptions\"))\n\"\"\"\nfunction DMAdaptorSetFromOptions(petsclib::PetscLibType, adaptor::DMAdaptor) end\n\n@for_petsc function DMAdaptorSetFromOptions(petsclib::$UnionPetscLib, adaptor::DMAdaptor )\n\n    @chk ccall(\n               (:DMAdaptorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor,),\n               adaptor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorView(petsclib::PetscLibType,adaptor::DMAdaptor, viewer::PetscViewer) \nViews a `DMAdaptor` object\n\nCollective\n\nInput Parameters:\n- `adaptor` - The `DMAdaptor` object\n- `viewer`  - The `PetscViewer` object\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMAdaptor`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorView\"))\n\"\"\"\nfunction DMAdaptorView(petsclib::PetscLibType, adaptor::DMAdaptor, viewer::PetscViewer) end\n\n@for_petsc function DMAdaptorView(petsclib::$UnionPetscLib, adaptor::DMAdaptor, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMAdaptorView, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, PetscViewer),\n               adaptor, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorGetSolver(petsclib::PetscLibType,adaptor::DMAdaptor, snes::PetscSNES) \nGets the solver used to produce discrete solutions\n\nNot Collective\n\nInput Parameter:\n- `adaptor` - The `DMAdaptor` object\n\nOutput Parameter:\n- `snes` - The solver\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAdaptor`, `DMAdaptorSetSolver()`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorGetSolver\"))\n\"\"\"\nfunction DMAdaptorGetSolver(petsclib::PetscLibType, adaptor::DMAdaptor, snes::PetscSNES) end\n\n@for_petsc function DMAdaptorGetSolver(petsclib::$UnionPetscLib, adaptor::DMAdaptor, snes::PetscSNES )\n\tsnes_ = Ref(snes.ptr)\n\n    @chk ccall(\n               (:DMAdaptorGetSolver, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, Ptr{CSNES}),\n               adaptor, snes_,\n              )\n\n\tsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetSolver(petsclib::PetscLibType,adaptor::DMAdaptor, snes::PetscSNES) \nSets the solver used to produce discrete solutions\n\nNot Collective\n\nInput Parameters:\n- `adaptor` - The `DMAdaptor` object\n- `snes`    - The solver, this MUST have an attached `DM`/`PetscDS`, so that the exact solution can be computed\n\nLevel: intermediate\n\nSee also: \n=== \n`DMAdaptor`, `DMAdaptorGetSolver()`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetSolver\"))\n\"\"\"\nfunction DMAdaptorSetSolver(petsclib::PetscLibType, adaptor::DMAdaptor, snes::PetscSNES) end\n\n@for_petsc function DMAdaptorSetSolver(petsclib::$UnionPetscLib, adaptor::DMAdaptor, snes::PetscSNES )\n\n    @chk ccall(\n               (:DMAdaptorSetSolver, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, CSNES),\n               adaptor, snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum::PetscInt = DMAdaptorGetSequenceLength(petsclib::PetscLibType,adaptor::DMAdaptor) \nGets the number of sequential adaptations used by an adapter\n\nNot Collective\n\nInput Parameter:\n- `adaptor` - The `DMAdaptor` object\n\nOutput Parameter:\n- `num` - The number of adaptations\n\nLevel: intermediate\n\nSee also: \n=== \n`DMAdaptor`, `DMAdaptorSetSequenceLength()`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorGetSequenceLength\"))\n\"\"\"\nfunction DMAdaptorGetSequenceLength(petsclib::PetscLibType, adaptor::DMAdaptor) end\n\n@for_petsc function DMAdaptorGetSequenceLength(petsclib::$UnionPetscLib, adaptor::DMAdaptor )\n\tnum_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMAdaptorGetSequenceLength, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, Ptr{$PetscInt}),\n               adaptor, num_,\n              )\n\n\tnum = num_[]\n\n\treturn num\nend \n\n\"\"\"\n\tDMAdaptorSetSequenceLength(petsclib::PetscLibType,adaptor::DMAdaptor, num::PetscInt) \nSets the number of sequential adaptations\n\nNot Collective\n\nInput Parameters:\n- `adaptor` - The `DMAdaptor` object\n- `num`     - The number of adaptations\n\nLevel: intermediate\n\nSee also: \n=== \n`DMAdaptorGetSequenceLength()`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetSequenceLength\"))\n\"\"\"\nfunction DMAdaptorSetSequenceLength(petsclib::PetscLibType, adaptor::DMAdaptor, num::PetscInt) end\n\n@for_petsc function DMAdaptorSetSequenceLength(petsclib::$UnionPetscLib, adaptor::DMAdaptor, num::$PetscInt )\n\n    @chk ccall(\n               (:DMAdaptorSetSequenceLength, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, $PetscInt),\n               adaptor, num,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetUp(petsclib::PetscLibType,adaptor::DMAdaptor) \nAfter the solver is specified, creates data structures for controlling adaptivity\n\nCollective\n\nInput Parameter:\n- `adaptor` - The `DMAdaptor` object\n\nLevel: beginner\n\nSee also: \n=== \n`DMAdaptor`, `DMAdaptorCreate()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetUp\"))\n\"\"\"\nfunction DMAdaptorSetUp(petsclib::PetscLibType, adaptor::DMAdaptor) end\n\n@for_petsc function DMAdaptorSetUp(petsclib::$UnionPetscLib, adaptor::DMAdaptor )\n\n    @chk ccall(\n               (:DMAdaptorSetUp, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor,),\n               adaptor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetTransferFunction(petsclib::PetscLibType,adaptor::DMAdaptor, tfunc::external) \n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetTransferFunction\"))\n\"\"\"\nfunction DMAdaptorSetTransferFunction(petsclib::PetscLibType, adaptor::DMAdaptor, tfunc::external) end\n\n@for_petsc function DMAdaptorSetTransferFunction(petsclib::$UnionPetscLib, adaptor::DMAdaptor, tfunc::external )\n\n    @chk ccall(\n               (:DMAdaptorSetTransferFunction, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, external),\n               adaptor, tfunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitor(petsclib::PetscLibType,adaptor::DMAdaptor, it::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec) \nruns the user provided monitor routines, if they exist\n\nCollective\n\nInput Parameters:\n- `adaptor` - the `DMAdaptor`\n- `it`      - iteration number\n- `odm`     - the original `DM`\n- `adm`     - the adapted `DM`\n- `Nf`      - the number of fields\n- `enorms`  - the 2-norm error values for each field\n- `error`   - `Vec` of cellwise errors\n\nLevel: developer\n\n-seealso: [](ch_snes), `DMAdaptorMonitorSet()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitor\"))\n\"\"\"\nfunction DMAdaptorMonitor(petsclib::PetscLibType, adaptor::DMAdaptor, it::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec) end\n\n@for_petsc function DMAdaptorMonitor(petsclib::$UnionPetscLib, adaptor::DMAdaptor, it::$PetscInt, odm::PetscDM, adm::PetscDM, Nf::$PetscInt, enorms::Vector{$PetscReal}, error::PetscVec )\n\n    @chk ccall(\n               (:DMAdaptorMonitor, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, $PetscInt, CDM, CDM, $PetscInt, Ptr{$PetscReal}, CVec),\n               adaptor, it, odm, adm, Nf, enorms, error,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorSize(petsclib::PetscLibType,adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) \nPrints the mesh sizes at each iteration of an adaptation loop.\n\nCollective\n\nInput Parameters:\n- `adaptor` - the `DMAdaptor`\n- `n`       - iteration number\n- `odm`     - the original `DM`\n- `adm`     - the adapted `DM`\n- `Nf`      - number of fields\n- `enorms`  - 2-norm error values for each field (may be estimated).\n- `error`   - `Vec` of cellwise errors\n- `vf`      - The viewer context\n\nOptions Database Key:\n- `-adaptor_monitor_size` - Activates `DMAdaptorMonitorSize()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `DMAdaptor`, `DMAdaptorMonitorSet()`, `DMAdaptorMonitorError()`, `DMAdaptorMonitorErrorDraw()`, `DMAdaptorMonitorErrorDrawLG()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorSize\"))\n\"\"\"\nfunction DMAdaptorMonitorSize(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function DMAdaptorMonitorSize(petsclib::$UnionPetscLib, adaptor::DMAdaptor, n::$PetscInt, odm::PetscDM, adm::PetscDM, Nf::$PetscInt, enorms::Vector{$PetscReal}, error::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:DMAdaptorMonitorSize, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, $PetscInt, CDM, CDM, $PetscInt, Ptr{$PetscReal}, CVec, Ptr{PetscViewerAndFormat}),\n               adaptor, n, odm, adm, Nf, enorms, error, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorError(petsclib::PetscLibType,adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) \nPrints the error norm at each iteration of an adaptation loop.\n\nCollective\n\nInput Parameters:\n- `adaptor` - the `DMAdaptor`\n- `n`       - iteration number\n- `odm`     - the original `DM`\n- `adm`     - the adapted `DM`\n- `Nf`      - number of fields\n- `enorms`  - 2-norm error values for each field (may be estimated).\n- `error`   - `Vec` of cellwise errors\n- `vf`      - The viewer context\n\nOptions Database Key:\n- `-adaptor_monitor_error` - Activates `DMAdaptorMonitorError()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `DMAdaptor`, `DMAdaptorMonitorSet()`, `DMAdaptorMonitorErrorDraw()`, `DMAdaptorMonitorErrorDrawLG()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorError\"))\n\"\"\"\nfunction DMAdaptorMonitorError(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function DMAdaptorMonitorError(petsclib::$UnionPetscLib, adaptor::DMAdaptor, n::$PetscInt, odm::PetscDM, adm::PetscDM, Nf::$PetscInt, enorms::Vector{$PetscReal}, error::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:DMAdaptorMonitorError, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, $PetscInt, CDM, CDM, $PetscInt, Ptr{$PetscReal}, CVec, Ptr{PetscViewerAndFormat}),\n               adaptor, n, odm, adm, Nf, enorms, error, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorErrorDraw(petsclib::PetscLibType,adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) \nPlots the error at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `adaptor` - the `DMAdaptor`\n- `n`       - iteration number\n- `odm`     - the original `DM`\n- `adm`     - the adapted `DM`\n- `Nf`      - number of fields\n- `enorms`  - 2-norm error values for each field (may be estimated).\n- `error`   - `Vec` of cellwise errors\n- `vf`      - The viewer context\n\nOptions Database Key:\n- `-adaptor_monitor_error draw` - Activates `DMAdaptorMonitorErrorDraw()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `PETSCVIEWERDRAW`, `DMAdaptor`, `DMAdaptorMonitorSet()`, `DMAdaptorMonitorErrorDrawLG()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorErrorDraw\"))\n\"\"\"\nfunction DMAdaptorMonitorErrorDraw(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function DMAdaptorMonitorErrorDraw(petsclib::$UnionPetscLib, adaptor::DMAdaptor, n::$PetscInt, odm::PetscDM, adm::PetscDM, Nf::$PetscInt, enorms::Vector{$PetscReal}, error::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:DMAdaptorMonitorErrorDraw, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, $PetscInt, CDM, CDM, $PetscInt, Ptr{$PetscReal}, CVec, Ptr{PetscViewerAndFormat}),\n               adaptor, n, odm, adm, Nf, enorms, error, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = DMAdaptorMonitorErrorDrawLGCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the context for the error plotter `DMAdaptorMonitorErrorDrawLG()`\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PetscViewer`\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The viewer context\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `PETSCVIEWERDRAW`, `PetscViewerMonitorGLSetUp()`, `DMAdaptor`, `DMAdaptorMonitorSet()`, `DMAdaptorMonitorErrorDrawLG()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorErrorDrawLGCreate\"))\n\"\"\"\nfunction DMAdaptorMonitorErrorDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function DMAdaptorMonitorErrorDrawLGCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:DMAdaptorMonitorErrorDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tDMAdaptorMonitorErrorDrawLG(petsclib::PetscLibType,adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) \nPlots the error norm at each iteration of an adaptive loop.\n\nCollective\n\nInput Parameters:\n- `adaptor` - the `DMAdaptor`\n- `n`       - iteration number\n- `odm`     - the original `DM`\n- `adm`     - the adapted `DM`\n- `Nf`      - number of fields\n- `enorms`  - 2-norm error values for each field (may be estimated).\n- `error`   - `Vec` of cellwise errors\n- `vf`      - The viewer context, obtained via `DMAdaptorMonitorErrorDrawLGCreate()`\n\nOptions Database Key:\n- `-adaptor_error draw::draw_lg` - Activates `DMAdaptorMonitorErrorDrawLG()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `PETSCVIEWERDRAW`, `DMAdaptor`, `DMAdaptorMonitorSet()`, `DMAdaptorMonitorErrorDraw()`, `DMAdaptorMonitorError()`,\n`DMAdaptorMonitorTrueResidualDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorErrorDrawLG\"))\n\"\"\"\nfunction DMAdaptorMonitorErrorDrawLG(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::PetscDM, adm::PetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function DMAdaptorMonitorErrorDrawLG(petsclib::$UnionPetscLib, adaptor::DMAdaptor, n::$PetscInt, odm::PetscDM, adm::PetscDM, Nf::$PetscInt, enorms::Vector{$PetscReal}, error::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:DMAdaptorMonitorErrorDrawLG, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, $PetscInt, CDM, CDM, $PetscInt, Ptr{$PetscReal}, CVec, Ptr{PetscViewerAndFormat}),\n               adaptor, n, odm, adm, Nf, enorms, error, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorMonitorRegisterAll(petsclib::PetscLibType) \nRegisters all of the mesh adaptation monitors in the `SNES` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `DM`, `DMAdaptorMonitorRegister()`, `DMAdaptorRegister()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorMonitorRegisterAll\"))\n\"\"\"\nfunction DMAdaptorMonitorRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function DMAdaptorMonitorRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMAdaptorMonitorRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorAdapt(petsclib::PetscLibType,adaptor::DMAdaptor, x::PetscVec, strategy::DMAdaptationStrategy, adm::PetscDM, ax::PetscVec) \nCreates a new `DM` that is adapted to the problem\n\nNot Collective\n\nInput Parameters:\n- `adaptor`  - The `DMAdaptor` object\n- `x`        - The global approximate solution\n- `strategy` - The adaptation strategy, see `DMAdaptationStrategy`\n\nOutput Parameters:\n- `adm` - The adapted `DM`\n- `ax`  - The adapted solution\n\nOptions Database Keys:\n- `-snes_adapt <strategy>` - initial, sequential, multigrid\n- `-adapt_gradient_view`   - View the Clement interpolant of the solution gradient\n- `-adapt_hessian_view`    - View the Clement interpolant of the solution Hessian\n- `-adapt_metric_view`     - View the metric tensor for adaptive mesh refinement\n\nLevel: intermediate\n\nSee also: \n=== \n`DMAdaptor`, `DMAdaptationStrategy`, `DMAdaptorSetSolver()`, `DMAdaptorCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorAdapt\"))\n\"\"\"\nfunction DMAdaptorAdapt(petsclib::PetscLibType, adaptor::DMAdaptor, x::PetscVec, strategy::DMAdaptationStrategy, adm::PetscDM, ax::PetscVec) end\n\n@for_petsc function DMAdaptorAdapt(petsclib::$UnionPetscLib, adaptor::DMAdaptor, x::PetscVec, strategy::DMAdaptationStrategy, adm::PetscDM, ax::PetscVec )\n\tadm_ = Ref(adm.ptr)\n\tax_ = Ref(ax.ptr)\n\n    @chk ccall(\n               (:DMAdaptorAdapt, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, CVec, DMAdaptationStrategy, Ptr{CDM}, Ptr{CVec}),\n               adaptor, x, strategy, adm_, ax_,\n              )\n\n\tadm.ptr = C_NULL\n\tax.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetMixedSetupFunction(petsclib::PetscLibType,adaptor::DMAdaptor, setupFunc::external) \nSet the function setting up the mixed problem\n\nNot Collective\n\nInput Parameters:\n- `adaptor`   - the `DMAdaptor`\n- `setupFunc` - the function setting up the mixed problem\n\nLevel: advanced\n\n-seealso: `DMAdaptor`, `DMAdaptorGetMixedSetupFunction()`, `DMAdaptorAdapt()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetMixedSetupFunction\"))\n\"\"\"\nfunction DMAdaptorSetMixedSetupFunction(petsclib::PetscLibType, adaptor::DMAdaptor, setupFunc::external) end\n\n@for_petsc function DMAdaptorSetMixedSetupFunction(petsclib::$UnionPetscLib, adaptor::DMAdaptor, setupFunc::external )\n\n    @chk ccall(\n               (:DMAdaptorSetMixedSetupFunction, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, external),\n               adaptor, setupFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorGetCriterion(petsclib::PetscLibType,adaptor::DMAdaptor, criterion::DMAdaptationCriterion) \nGet the adaptation criterion\n\nNot Collective\n\nInput Parameter:\n- `adaptor` - the `DMAdaptor`\n\nOutput Parameter:\n- `criterion` - the criterion for adaptation\n\nLevel: advanced\n\n-seealso: `DMAdaptor`, `DMAdaptorSetCriterion()`, `DMAdaptationCriterion`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorGetCriterion\"))\n\"\"\"\nfunction DMAdaptorGetCriterion(petsclib::PetscLibType, adaptor::DMAdaptor, criterion::DMAdaptationCriterion) end\n\n@for_petsc function DMAdaptorGetCriterion(petsclib::$UnionPetscLib, adaptor::DMAdaptor, criterion::DMAdaptationCriterion )\n\n    @chk ccall(\n               (:DMAdaptorGetCriterion, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, Ptr{DMAdaptationCriterion}),\n               adaptor, criterion,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMAdaptorSetCriterion(petsclib::PetscLibType,adaptor::DMAdaptor, criterion::DMAdaptationCriterion) \nSet the adaptation criterion\n\nNot Collective\n\nInput Parameters:\n- `adaptor`   - the `DMAdaptor`\n- `criterion` - the adaptation criterion\n\nLevel: advanced\n\n-seealso: `DMAdaptor`, `DMAdaptorGetCriterion()`, `DMAdaptationCriterion`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptorSetCriterion\"))\n\"\"\"\nfunction DMAdaptorSetCriterion(petsclib::PetscLibType, adaptor::DMAdaptor, criterion::DMAdaptationCriterion) end\n\n@for_petsc function DMAdaptorSetCriterion(petsclib::$UnionPetscLib, adaptor::DMAdaptor, criterion::DMAdaptationCriterion )\n\n    @chk ccall(\n               (:DMAdaptorSetCriterion, $petsc_library),\n               PetscErrorCode,\n               (DMAdaptor, DMAdaptationCriterion),\n               adaptor, criterion,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmDataFieldGetEntries(petsclib::PetscLibType,gfield::DMSwarmDataField, data::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/DMSwarmDataFieldGetEntries\"))\n\"\"\"\nfunction DMSwarmDataFieldGetEntries(petsclib::PetscLibType, gfield::DMSwarmDataField, data::Cvoid) end\n\n@for_petsc function DMSwarmDataFieldGetEntries(petsclib::$UnionPetscLib, gfield::DMSwarmDataField, data::Cvoid )\n\n    @chk ccall(\n               (:DMSwarmDataFieldGetEntries, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmDataField, Cvoid),\n               gfield, data,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmDataFieldRestoreEntries(petsclib::PetscLibType,gfield::DMSwarmDataField, data::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/DMSwarmDataFieldRestoreEntries\"))\n\"\"\"\nfunction DMSwarmDataFieldRestoreEntries(petsclib::PetscLibType, gfield::DMSwarmDataField, data::Cvoid) end\n\n@for_petsc function DMSwarmDataFieldRestoreEntries(petsclib::$UnionPetscLib, gfield::DMSwarmDataField, data::Cvoid )\n\n    @chk ccall(\n               (:DMSwarmDataFieldRestoreEntries, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmDataField, Cvoid),\n               gfield, data,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tidx::PetscInt = DMSwarmDataBucketGetDMSwarmDataFieldIdByName(petsclib::PetscLibType,db::DMSwarmDataBucket, name::String) \n\n# External Links\n$(_doc_external(\"DM/DMSwarmDataBucketGetDMSwarmDataFieldIdByName\"))\n\"\"\"\nfunction DMSwarmDataBucketGetDMSwarmDataFieldIdByName(petsclib::PetscLibType, db::DMSwarmDataBucket, name::String) end\n\n@for_petsc function DMSwarmDataBucketGetDMSwarmDataFieldIdByName(petsclib::$UnionPetscLib, db::DMSwarmDataBucket, name::String )\n\tidx_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmDataBucketGetDMSwarmDataFieldIdByName, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmDataBucket, Ptr{Cchar}, Ptr{$PetscInt}),\n               db, name, idx_,\n              )\n\n\tidx = idx_[]\n\n\treturn idx\nend \n\n\"\"\"\n\tDMSwarmDataBucketGetDMSwarmDataFieldByName(petsclib::PetscLibType,db::DMSwarmDataBucket, name::String, gfield::DMSwarmDataField) \n\n# External Links\n$(_doc_external(\"DM/DMSwarmDataBucketGetDMSwarmDataFieldByName\"))\n\"\"\"\nfunction DMSwarmDataBucketGetDMSwarmDataFieldByName(petsclib::PetscLibType, db::DMSwarmDataBucket, name::String, gfield::DMSwarmDataField) end\n\n@for_petsc function DMSwarmDataBucketGetDMSwarmDataFieldByName(petsclib::$UnionPetscLib, db::DMSwarmDataBucket, name::String, gfield::DMSwarmDataField )\n\n    @chk ccall(\n               (:DMSwarmDataBucketGetDMSwarmDataFieldByName, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmDataBucket, Ptr{Cchar}, Ptr{DMSwarmDataField}),\n               db, name, gfield,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfound::PetscBool = DMSwarmDataBucketQueryDMSwarmDataFieldByName(petsclib::PetscLibType,db::DMSwarmDataBucket, name::String) \n\n# External Links\n$(_doc_external(\"DM/DMSwarmDataBucketQueryDMSwarmDataFieldByName\"))\n\"\"\"\nfunction DMSwarmDataBucketQueryDMSwarmDataFieldByName(petsclib::PetscLibType, db::DMSwarmDataBucket, name::String) end\n\n@for_petsc function DMSwarmDataBucketQueryDMSwarmDataFieldByName(petsclib::$UnionPetscLib, db::DMSwarmDataBucket, name::String )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMSwarmDataBucketQueryDMSwarmDataFieldByName, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmDataBucket, Ptr{Cchar}, Ptr{PetscBool}),\n               db, name, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n\"\"\"\n\tDMSwarmSortDestroy(petsclib::PetscLibType,_ctx::DMSwarmSort) \n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortDestroy\"))\n\"\"\"\nfunction DMSwarmSortDestroy(petsclib::PetscLibType, _ctx::DMSwarmSort) end\n\n@for_petsc function DMSwarmSortDestroy(petsclib::$UnionPetscLib, _ctx::DMSwarmSort )\n\n    @chk ccall(\n               (:DMSwarmSortDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMSwarmSort},),\n               _ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnpoints::PetscInt = DMSwarmSortGetNumberOfPointsPerCell(petsclib::PetscLibType,sw::PetscDM, cell::PetscInt) \nReturns the number of points in a cell\n\nNot Collective\n\nInput Parameters:\n- `sw`   - a `DMSWARM` objects\n- `cell` - the cell number in the cell `DM`\n\nOutput Parameter:\n- `npoints` - the number of points in the cell\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSortGetAccess()`, `DMSwarmSortGetPointsPerCell()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortGetNumberOfPointsPerCell\"))\n\"\"\"\nfunction DMSwarmSortGetNumberOfPointsPerCell(petsclib::PetscLibType, sw::PetscDM, cell::PetscInt) end\n\n@for_petsc function DMSwarmSortGetNumberOfPointsPerCell(petsclib::$UnionPetscLib, sw::PetscDM, cell::$PetscInt )\n\tnpoints_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmSortGetNumberOfPointsPerCell, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}),\n               sw, cell, npoints_,\n              )\n\n\tnpoints = npoints_[]\n\n\treturn npoints\nend \n\n\"\"\"\n\tDMSwarmSortGetPointsPerCell(petsclib::PetscLibType,sw::PetscDM, cell::PetscInt, npoints::PetscInt, pidlist::PetscInt) \nCreates an array of point indices for all points in a cell\n\nNot Collective\n\nInput Parameters:\n- `sw`      - a `DMSWARM` object\n- `cell`    - the cell number in the cell `DM`\n- `npoints` - the number of points in the cell\n- `pidlist` - array of the indices identifying all points in cell e\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmRestorePointsPerCell()`, `DMSwarmSortGetAccess()`, `DMSwarmSortGetNumberOfPointsPerCell()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortGetPointsPerCell\"))\n\"\"\"\nfunction DMSwarmSortGetPointsPerCell(petsclib::PetscLibType, sw::PetscDM, cell::PetscInt, npoints::PetscInt, pidlist::PetscInt) end\n\n@for_petsc function DMSwarmSortGetPointsPerCell(petsclib::$UnionPetscLib, sw::PetscDM, cell::$PetscInt, npoints::$PetscInt, pidlist::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmSortGetPointsPerCell, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, $PetscInt),\n               sw, cell, npoints, pidlist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSortRestorePointsPerCell(petsclib::PetscLibType,dm::PetscDM, e::PetscInt, npoints::PetscInt, pidlist::PetscInt) \nRestores an array of point indices for all points in a cell\n\nNot Collective\n\nInput Parameters:\n- `dm`      - a `DMSWARM` object\n- `e`       - the index of the cell\n- `npoints` - the number of points in the cell\n- `pidlist` - array of the indices identifying all points in cell e\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSortGetPointsPerCell()`, `DMSwarmSortGetAccess()`, `DMSwarmSortGetNumberOfPointsPerCell()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortRestorePointsPerCell\"))\n\"\"\"\nfunction DMSwarmSortRestorePointsPerCell(petsclib::PetscLibType, dm::PetscDM, e::PetscInt, npoints::PetscInt, pidlist::PetscInt) end\n\n@for_petsc function DMSwarmSortRestorePointsPerCell(petsclib::$UnionPetscLib, dm::PetscDM, e::$PetscInt, npoints::$PetscInt, pidlist::$PetscInt )\n\n    @chk ccall(\n               (:DMSwarmSortRestorePointsPerCell, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscInt}, $PetscInt),\n               dm, e, npoints, pidlist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSortGetAccess(petsclib::PetscLibType,sw::PetscDM) \nSetups up a `DMSWARM` point sort context for efficient traversal of points within a cell\n\nNot Collective\n\nInput Parameter:\n- `sw` - a `DMSWARM` object\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSortRestoreAccess()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortGetAccess\"))\n\"\"\"\nfunction DMSwarmSortGetAccess(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmSortGetAccess(petsclib::$UnionPetscLib, sw::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmSortGetAccess, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               sw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmSortRestoreAccess(petsclib::PetscLibType,sw::PetscDM) \nInvalidates the `DMSWARM` point sorting context previously computed with `DMSwarmSortGetAccess()`\n\nNot Collective\n\nInput Parameter:\n- `sw` - a `DMSWARM` object\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSortGetAccess()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortRestoreAccess\"))\n\"\"\"\nfunction DMSwarmSortRestoreAccess(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmSortRestoreAccess(petsclib::$UnionPetscLib, sw::PetscDM )\n\n    @chk ccall(\n               (:DMSwarmSortRestoreAccess, $petsc_library),\n               PetscErrorCode,\n               (CDM,),\n               sw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisvalid::PetscBool = DMSwarmSortGetIsValid(petsclib::PetscLibType,sw::PetscDM) \nGets the isvalid flag associated with a `DMSWARM` point sorting context\n\nNot Collective\n\nInput Parameter:\n- `sw` - a `DMSWARM` object\n\nOutput Parameter:\n- `isvalid` - flag indicating whether the sort context is up-to-date\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSortGetAccess()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortGetIsValid\"))\n\"\"\"\nfunction DMSwarmSortGetIsValid(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmSortGetIsValid(petsclib::$UnionPetscLib, sw::PetscDM )\n\tisvalid_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMSwarmSortGetIsValid, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{PetscBool}),\n               sw, isvalid_,\n              )\n\n\tisvalid = isvalid_[]\n\n\treturn isvalid\nend \n\n\"\"\"\n\tncells::PetscInt,npoints::PetscInt = DMSwarmSortGetSizes(petsclib::PetscLibType,sw::PetscDM) \nGets the sizes associated with a `DMSWARM` point sorting context\n\nNot Collective\n\nInput Parameter:\n- `sw` - a `DMSWARM` object\n\nOutput Parameters:\n- `ncells`  - number of cells within the sort context (pass `NULL` to ignore)\n- `npoints` - number of points used to create the sort context (pass `NULL` to ignore)\n\nLevel: advanced\n\n-seealso: `DMSWARM`, `DMSwarmSetType()`, `DMSwarmSortGetAccess()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmSortGetSizes\"))\n\"\"\"\nfunction DMSwarmSortGetSizes(petsclib::PetscLibType, sw::PetscDM) end\n\n@for_petsc function DMSwarmSortGetSizes(petsclib::$UnionPetscLib, sw::PetscDM )\n\tncells_ = Ref{$PetscInt}()\n\tnpoints_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmSortGetSizes, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               sw, ncells_, npoints_,\n              )\n\n\tncells = ncells_[]\n\tnpoints = npoints_[]\n\n\treturn ncells,npoints\nend \n\n\"\"\"\n\tDMSwarmCellDMDestroy(petsclib::PetscLibType,celldm::DMSwarmCellDM) \ndestroy a `DMSwarmCellDM`\n\nCollective\n\nInput Parameter:\n- `celldm` - address of `DMSwarmCellDM`\n\nLevel: advanced\n\n-seealso: `DMSwarmCellDM`, `DMSwarmCellDMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMDestroy\"))\n\"\"\"\nfunction DMSwarmCellDMDestroy(petsclib::PetscLibType, celldm::DMSwarmCellDM) end\n\n@for_petsc function DMSwarmCellDMDestroy(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM )\n\n    @chk ccall(\n               (:DMSwarmCellDMDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMSwarmCellDM},),\n               celldm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmCellDMView(petsclib::PetscLibType,celldm::DMSwarmCellDM, viewer::PetscViewer) \nview a `DMSwarmCellDM`\n\nCollective\n\nInput Parameters:\n- `celldm` - `DMSwarmCellDM`\n- `viewer` - viewer to display field, for example `PETSC_VIEWER_STDOUT_WORLD`\n\nLevel: advanced\n\n-seealso: `DMSwarmCellDM`, `DMSwarmCellDMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMView\"))\n\"\"\"\nfunction DMSwarmCellDMView(petsclib::PetscLibType, celldm::DMSwarmCellDM, viewer::PetscViewer) end\n\n@for_petsc function DMSwarmCellDMView(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMSwarmCellDMView, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, PetscViewer),\n               celldm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmCellDMGetDM(petsclib::PetscLibType,celldm::DMSwarmCellDM, dm::PetscDM) \nReturns the background `DM` for the `DMSwarm`\n\nNot Collective\n\nInput Parameter:\n- `celldm` - The `DMSwarmCellDM` object\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: intermediate\n\n-seealso: `DMSwarmCellDM`, `DM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMGetDM\"))\n\"\"\"\nfunction DMSwarmCellDMGetDM(petsclib::PetscLibType, celldm::DMSwarmCellDM, dm::PetscDM) end\n\n@for_petsc function DMSwarmCellDMGetDM(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMSwarmCellDMGetDM, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, Ptr{CDM}),\n               celldm, dm_,\n              )\n\n\tdm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tNf::PetscInt = DMSwarmCellDMGetFields(petsclib::PetscLibType,celldm::DMSwarmCellDM, names::String) \nReturns the `DM` fields for the `DMSwarm`\n\nNot Collective\n\nInput Parameter:\n- `celldm` - The `DMSwarmCellDM` object\n\nOutput Parameters:\n- `Nf`    - The number of fields\n- `names` - The array of field names in the `DMSWARM`\n\nLevel: intermediate\n\n-seealso: `DMSwarmCellDM`, `DM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMGetFields\"))\n\"\"\"\nfunction DMSwarmCellDMGetFields(petsclib::PetscLibType, celldm::DMSwarmCellDM, names::String) end\n\n@for_petsc function DMSwarmCellDMGetFields(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, names::String )\n\tNf_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmCellDMGetFields, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, Ptr{$PetscInt}, Ptr{Cchar}),\n               celldm, Nf_, names,\n              )\n\n\tNf = Nf_[]\n\n\treturn Nf\nend \n\n\"\"\"\n\tNfc::PetscInt = DMSwarmCellDMGetCoordinateFields(petsclib::PetscLibType,celldm::DMSwarmCellDM, names::String) \nReturns the `DM` coordinate fields for the `DMSwarm`\n\nNot Collective\n\nInput Parameter:\n- `celldm` - The `DMSwarmCellDM` object\n\nOutput Parameters:\n- `Nfc`   - The number of coordinate fields\n- `names` - The array of coordinate field names in the `DMSWARM`\n\nLevel: intermediate\n\n-seealso: `DMSwarmCellDM`, `DM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMGetCoordinateFields\"))\n\"\"\"\nfunction DMSwarmCellDMGetCoordinateFields(petsclib::PetscLibType, celldm::DMSwarmCellDM, names::String) end\n\n@for_petsc function DMSwarmCellDMGetCoordinateFields(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, names::String )\n\tNfc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmCellDMGetCoordinateFields, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, Ptr{$PetscInt}, Ptr{Cchar}),\n               celldm, Nfc_, names,\n              )\n\n\tNfc = Nfc_[]\n\n\treturn Nfc\nend \n\n\"\"\"\n\tDMSwarmCellDMGetCellID(petsclib::PetscLibType,celldm::DMSwarmCellDM, cellid::String) \nReturns the cell id field name for the `DMSwarm`\n\nNot Collective\n\nInput Parameter:\n- `celldm` - The `DMSwarmCellDM` object\n\nOutput Parameters:\n- `cellid` - The cell id field name in the `DMSWARM`\n\nLevel: intermediate\n\n-seealso: `DMSwarmCellDM`, `DM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMGetCellID\"))\n\"\"\"\nfunction DMSwarmCellDMGetCellID(petsclib::PetscLibType, celldm::DMSwarmCellDM, cellid::String) end\n\n@for_petsc function DMSwarmCellDMGetCellID(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, cellid::String )\n\tcellid_ = Ref(pointer(cellid))\n\n    @chk ccall(\n               (:DMSwarmCellDMGetCellID, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, Ptr{Ptr{Cchar}}),\n               celldm, cellid_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmCellDMGetSort(petsclib::PetscLibType,celldm::DMSwarmCellDM, sort::DMSwarmSort) \nReturns the sort context over the active `DMSwarmCellDM` for the `DMSwarm`\n\nNot Collective\n\nInput Parameter:\n- `celldm` - The `DMSwarmCellDM` object\n\nOutput Parameter:\n- `sort` - The `DMSwarmSort` object\n\nLevel: intermediate\n\n-seealso: `DMSwarmCellDM`, `DM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMGetSort\"))\n\"\"\"\nfunction DMSwarmCellDMGetSort(petsclib::PetscLibType, celldm::DMSwarmCellDM, sort::DMSwarmSort) end\n\n@for_petsc function DMSwarmCellDMGetSort(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, sort::DMSwarmSort )\n\n    @chk ccall(\n               (:DMSwarmCellDMGetSort, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, Ptr{DMSwarmSort}),\n               celldm, sort,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMSwarmCellDMSetSort(petsclib::PetscLibType,celldm::DMSwarmCellDM, sort::DMSwarmSort) \nSets the sort context over the active `DMSwarmCellDM` for the `DMSwarm`\n\nNot Collective\n\nInput Parameters:\n- `celldm` - The `DMSwarmCellDM` object\n- `sort`   - The `DMSwarmSort` object\n\nLevel: intermediate\n\n-seealso: `DMSwarmCellDM`, `DM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMSetSort\"))\n\"\"\"\nfunction DMSwarmCellDMSetSort(petsclib::PetscLibType, celldm::DMSwarmCellDM, sort::DMSwarmSort) end\n\n@for_petsc function DMSwarmCellDMSetSort(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, sort::DMSwarmSort )\n\n    @chk ccall(\n               (:DMSwarmCellDMSetSort, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, DMSwarmSort),\n               celldm, sort,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = DMSwarmCellDMGetBlockSize(petsclib::PetscLibType,celldm::DMSwarmCellDM, sw::PetscDM) \nReturns the total blocksize for the `DM` fields\n\nNot Collective\n\nInput Parameters:\n- `celldm` - The `DMSwarmCellDM` object\n- `sw`     - The `DMSwarm` object\n\nOutput Parameter:\n- `bs` - The total block size\n\nLevel: intermediate\n\n-seealso: `DMSwarmCellDM`, `DM`, `DMSwarmSetCellDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMGetBlockSize\"))\n\"\"\"\nfunction DMSwarmCellDMGetBlockSize(petsclib::PetscLibType, celldm::DMSwarmCellDM, sw::PetscDM) end\n\n@for_petsc function DMSwarmCellDMGetBlockSize(petsclib::$UnionPetscLib, celldm::DMSwarmCellDM, sw::PetscDM )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMSwarmCellDMGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (DMSwarmCellDM, CDM, Ptr{$PetscInt}),\n               celldm, sw, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\tcelldm::DMSwarmCellDM = DMSwarmCellDMCreate(petsclib::PetscLibType,dm::PetscDM, Nf::PetscInt, dmFields::String, Nfc::PetscInt, coordFields::String) \ncreate a `DMSwarmCellDM`\n\nCollective\n\nInput Parameters:\n- `dm`          - The background `DM` for the `DMSwarm`\n- `Nf`          - The number of swarm fields defined over `dm`\n- `dmFields`    - The swarm field names for the `dm` fields\n- `Nfc`         - The number of swarm fields to use for coordinates over `dm`\n- `coordFields` - The swarm field names for the `dm` coordinate fields\n\nOutput Parameter:\n- `celldm` - The new `DMSwarmCellDM`\n\nLevel: advanced\n\n-seealso: `DMSwarmCellDM`, `DMSWARM`, `DMSetType()`\n\n# External Links\n$(_doc_external(\"DM/DMSwarmCellDMCreate\"))\n\"\"\"\nfunction DMSwarmCellDMCreate(petsclib::PetscLibType, dm::PetscDM, Nf::PetscInt, dmFields::String, Nfc::PetscInt, coordFields::String) end\n\n@for_petsc function DMSwarmCellDMCreate(petsclib::$UnionPetscLib, dm::PetscDM, Nf::$PetscInt, dmFields::String, Nfc::$PetscInt, coordFields::String )\n\tdmFields_ = Ref(pointer(dmFields))\n\tcoordFields_ = Ref(pointer(coordFields))\n\tcelldm_ = Ref{DMSwarmCellDM}()\n\n    @chk ccall(\n               (:DMSwarmCellDMCreate, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{Ptr{Cchar}}, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{DMSwarmCellDM}),\n               dm, Nf, dmFields_, Nfc, coordFields_, celldm_,\n              )\n\n\tcelldm = celldm_[]\n\n\treturn celldm\nend \n\n\"\"\"\n\tqueue::DMPlexPoCintQueue = DMPlexPointQueueCreate(petsclib::PetscLibType,size::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueCreate\"))\n\"\"\"\nfunction DMPlexPointQueueCreate(petsclib::PetscLibType, size::PetscInt) end\n\n@for_petsc function DMPlexPointQueueCreate(petsclib::$UnionPetscLib, size::$PetscInt )\n\tqueue_ = Ref{DMPlexPoCintQueue}()\n\n    @chk ccall(\n               (:DMPlexPointQueueCreate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{DMPlexPoCintQueue}),\n               size, queue_,\n              )\n\n\tqueue = queue_[]\n\n\treturn queue\nend \n\n\"\"\"\n\tDMPlexPointQueueDestroy(petsclib::PetscLibType,queue::DMPlexPoCintQueue) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueDestroy\"))\n\"\"\"\nfunction DMPlexPointQueueDestroy(petsclib::PetscLibType, queue::DMPlexPoCintQueue) end\n\n@for_petsc function DMPlexPointQueueDestroy(petsclib::$UnionPetscLib, queue::DMPlexPoCintQueue )\n\n    @chk ccall(\n               (:DMPlexPointQueueDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMPlexPoCintQueue},),\n               queue,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPointQueueEnsureSize(petsclib::PetscLibType,queue::DMPlexPoCintQueue) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueEnsureSize\"))\n\"\"\"\nfunction DMPlexPointQueueEnsureSize(petsclib::PetscLibType, queue::DMPlexPoCintQueue) end\n\n@for_petsc function DMPlexPointQueueEnsureSize(petsclib::$UnionPetscLib, queue::DMPlexPoCintQueue )\n\n    @chk ccall(\n               (:DMPlexPointQueueEnsureSize, $petsc_library),\n               PetscErrorCode,\n               (DMPlexPoCintQueue,),\n               queue,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexPointQueueEnqueue(petsclib::PetscLibType,queue::DMPlexPoCintQueue, p::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueEnqueue\"))\n\"\"\"\nfunction DMPlexPointQueueEnqueue(petsclib::PetscLibType, queue::DMPlexPoCintQueue, p::PetscInt) end\n\n@for_petsc function DMPlexPointQueueEnqueue(petsclib::$UnionPetscLib, queue::DMPlexPoCintQueue, p::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexPointQueueEnqueue, $petsc_library),\n               PetscErrorCode,\n               (DMPlexPoCintQueue, $PetscInt),\n               queue, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tp::PetscInt = DMPlexPointQueueDequeue(petsclib::PetscLibType,queue::DMPlexPoCintQueue) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueDequeue\"))\n\"\"\"\nfunction DMPlexPointQueueDequeue(petsclib::PetscLibType, queue::DMPlexPoCintQueue) end\n\n@for_petsc function DMPlexPointQueueDequeue(petsclib::$UnionPetscLib, queue::DMPlexPoCintQueue )\n\tp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexPointQueueDequeue, $petsc_library),\n               PetscErrorCode,\n               (DMPlexPoCintQueue, Ptr{$PetscInt}),\n               queue, p_,\n              )\n\n\tp = p_[]\n\n\treturn p\nend \n\n\"\"\"\n\tp::PetscInt = DMPlexPointQueueFront(petsclib::PetscLibType,queue::DMPlexPoCintQueue) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueFront\"))\n\"\"\"\nfunction DMPlexPointQueueFront(petsclib::PetscLibType, queue::DMPlexPoCintQueue) end\n\n@for_petsc function DMPlexPointQueueFront(petsclib::$UnionPetscLib, queue::DMPlexPoCintQueue )\n\tp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexPointQueueFront, $petsc_library),\n               PetscErrorCode,\n               (DMPlexPoCintQueue, Ptr{$PetscInt}),\n               queue, p_,\n              )\n\n\tp = p_[]\n\n\treturn p\nend \n\n\"\"\"\n\tp::PetscInt = DMPlexPointQueueBack(petsclib::PetscLibType,queue::DMPlexPoCintQueue) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueBack\"))\n\"\"\"\nfunction DMPlexPointQueueBack(petsclib::PetscLibType, queue::DMPlexPoCintQueue) end\n\n@for_petsc function DMPlexPointQueueBack(petsclib::$UnionPetscLib, queue::DMPlexPoCintQueue )\n\tp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexPointQueueBack, $petsc_library),\n               PetscErrorCode,\n               (DMPlexPoCintQueue, Ptr{$PetscInt}),\n               queue, p_,\n              )\n\n\tp = p_[]\n\n\treturn p\nend \n\n\"\"\"\n\tempty::PetscBool = DMPlexPointQueueEmptyCollective(petsclib::PetscLibType,obj::PetscObject, queue::DMPlexPoCintQueue) \n\n# External Links\n$(_doc_external(\"DM/DMPlexPointQueueEmptyCollective\"))\n\"\"\"\nfunction DMPlexPointQueueEmptyCollective(petsclib::PetscLibType, obj::PetscObject, queue::DMPlexPoCintQueue) end\n\n@for_petsc function DMPlexPointQueueEmptyCollective(petsclib::$UnionPetscLib, obj::PetscObject, queue::DMPlexPoCintQueue )\n\tempty_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexPointQueueEmptyCollective, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, DMPlexPoCintQueue, Ptr{PetscBool}),\n               obj, queue, empty_,\n              )\n\n\tempty = empty_[]\n\n\treturn empty\nend \n\n\"\"\"\n\tDMFieldDestroy(petsclib::PetscLibType,field::DMField) \ndestroy a `DMField`\n\nCollective\n\nInput Parameter:\n- `field` - address of `DMField`\n\nLevel: advanced\n\n-seealso: `DMField`, `DMFieldCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldDestroy\"))\n\"\"\"\nfunction DMFieldDestroy(petsclib::PetscLibType, field::DMField) end\n\n@for_petsc function DMFieldDestroy(petsclib::$UnionPetscLib, field::DMField )\n\n    @chk ccall(\n               (:DMFieldDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMField},),\n               field,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldView(petsclib::PetscLibType,field::DMField, viewer::PetscViewer) \nview a `DMField`\n\nCollective\n\nInput Parameters:\n- `field`  - `DMField`\n- `viewer` - viewer to display field, for example `PETSC_VIEWER_STDOUT_WORLD`\n\nLevel: advanced\n\n-seealso: `DMField`, `DMFieldCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldView\"))\n\"\"\"\nfunction DMFieldView(petsclib::PetscLibType, field::DMField, viewer::PetscViewer) end\n\n@for_petsc function DMFieldView(petsclib::$UnionPetscLib, field::DMField, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMFieldView, $petsc_library),\n               PetscErrorCode,\n               (DMField, PetscViewer),\n               field, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldSetType(petsclib::PetscLibType,field::DMField, type::DMFieldType) \nset the `DMField` implementation\n\nCollective\n\nInput Parameters:\n- `field` - the `DMField` context\n- `type`  - a known method\n\nLevel: advanced\n\n-seealso: `DMField`, `DMFieldGetType()`, `DMFieldType`,\n\n# External Links\n$(_doc_external(\"DM/DMFieldSetType\"))\n\"\"\"\nfunction DMFieldSetType(petsclib::PetscLibType, field::DMField, type::DMFieldType) end\n\n@for_petsc function DMFieldSetType(petsclib::$UnionPetscLib, field::DMField, type::DMFieldType )\n\n    @chk ccall(\n               (:DMFieldSetType, $petsc_library),\n               PetscErrorCode,\n               (DMField, DMFieldType),\n               field, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::DMFieldType = DMFieldGetType(petsclib::PetscLibType,field::DMField) \nGets the `DMFieldType` name (as a string) from the `DMField`.\n\nNot Collective\n\nInput Parameter:\n- `field` - The `DMField` context\n\nOutput Parameter:\n- `type` - The `DMFieldType` name\n\nLevel: advanced\n\n-seealso: `DMField`, `DMFieldSetType()`, `DMFieldType`\n\n# External Links\n$(_doc_external(\"DM/DMFieldGetType\"))\n\"\"\"\nfunction DMFieldGetType(petsclib::PetscLibType, field::DMField) end\n\n@for_petsc function DMFieldGetType(petsclib::$UnionPetscLib, field::DMField )\n\ttype_ = Ref{DMFieldType}()\n\n    @chk ccall(\n               (:DMFieldGetType, $petsc_library),\n               PetscErrorCode,\n               (DMField, Ptr{DMFieldType}),\n               field, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tnc::PetscInt = DMFieldGetNumComponents(petsclib::PetscLibType,field::DMField) \nReturns the number of components in the field\n\nNot Collective\n\nInput Parameter:\n- `field` - The `DMField` object\n\nOutput Parameter:\n- `nc` - The number of field components\n\nLevel: intermediate\n\n-seealso: `DMField`, `DMFieldEvaluate()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldGetNumComponents\"))\n\"\"\"\nfunction DMFieldGetNumComponents(petsclib::PetscLibType, field::DMField) end\n\n@for_petsc function DMFieldGetNumComponents(petsclib::$UnionPetscLib, field::DMField )\n\tnc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMFieldGetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (DMField, Ptr{$PetscInt}),\n               field, nc_,\n              )\n\n\tnc = nc_[]\n\n\treturn nc\nend \n\n\"\"\"\n\tDMFieldGetDM(petsclib::PetscLibType,field::DMField, dm::PetscDM) \nReturns the `DM` for the manifold over which the field is defined.\n\nNot Collective\n\nInput Parameter:\n- `field` - The `DMField` object\n\nOutput Parameter:\n- `dm` - The `DM` object\n\nLevel: intermediate\n\n-seealso: `DMField`, `DM`, `DMFieldEvaluate()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldGetDM\"))\n\"\"\"\nfunction DMFieldGetDM(petsclib::PetscLibType, field::DMField, dm::PetscDM) end\n\n@for_petsc function DMFieldGetDM(petsclib::$UnionPetscLib, field::DMField, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMFieldGetDM, $petsc_library),\n               PetscErrorCode,\n               (DMField, Ptr{CDM}),\n               field, dm_,\n              )\n\n\tdm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldEvaluate(petsclib::PetscLibType,field::DMField, points::PetscVec, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) \nEvaluate the field and its derivatives on a set of points\n\nCollective\n\nInput Parameters:\n- `field`    - The `DMField` object\n- `points`   - The points at which to evaluate the field.  Should have size d x n,\nwhere d is the coordinate dimension of the manifold and n is the number\nof points\n- `datatype` - The PetscDataType of the output arrays: either `PETSC_REAL` or `PETSC_SCALAR`.\nIf the field is complex and datatype is `PETSC_REAL`, the real part of the\nfield is returned.\n\nOutput Parameters:\n- `B` - pointer to data of size c * n * sizeof(datatype), where c is the number of components in the field.\nIf B is not `NULL`, the values of the field are written in this array, varying first by component,\nthen by point.\n- `D` - pointer to data of size d * c * n * sizeof(datatype).\nIf `D` is not `NULL`, the values of the field's spatial derivatives are written in this array,\nvarying first by the partial derivative component, then by field component, then by point.\n- `H` - pointer to data of size d * d * c * n * sizeof(datatype).\nIf `H` is not `NULL`, the values of the field's second spatial derivatives are written in this array,\nvarying first by the second partial derivative component, then by field component, then by point.\n\nLevel: intermediate\n\n-seealso: `DMField`, `DMFieldGetDM()`, `DMFieldGetNumComponents()`, `DMFieldEvaluateFE()`, `DMFieldEvaluateFV()`, `PetscDataType`\n\n# External Links\n$(_doc_external(\"DM/DMFieldEvaluate\"))\n\"\"\"\nfunction DMFieldEvaluate(petsclib::PetscLibType, field::DMField, points::PetscVec, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) end\n\n@for_petsc function DMFieldEvaluate(petsclib::$UnionPetscLib, field::DMField, points::PetscVec, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid )\n\n    @chk ccall(\n               (:DMFieldEvaluate, $petsc_library),\n               PetscErrorCode,\n               (DMField, CVec, PetscDataType, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}),\n               field, points, datatype, B, D, H,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldEvaluateFE(petsclib::PetscLibType,field::DMField, cellIS::IS, points::PetscQuadrature, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) \nEvaluate the field and its derivatives on a set of points mapped from\nquadrature points on a reference point.  The derivatives are taken with respect to the\nreference coordinates.\n\nNot Collective\n\nInput Parameters:\n- `field`    - The `DMField` object\n- `cellIS`   - Index set for cells on which to evaluate the field\n- `points`   - The quadature containing the points in the reference cell at which to evaluate the field.\n- `datatype` - The PetscDataType of the output arrays: either `PETSC_REAL` or `PETSC_SCALAR`.\nIf the field is complex and datatype is `PETSC_REAL`, the real part of the\nfield is returned.\n\nOutput Parameters:\n- `B` - pointer to data of size c * n * sizeof(datatype), where c is the number of components in the field.\nIf B is not `NULL`, the values of the field are written in this array, varying first by component,\nthen by point.\n- `D` - pointer to data of size d * c * n * sizeof(datatype).\nIf D is not `NULL`, the values of the field's spatial derivatives are written in this array,\nvarying first by the partial derivative component, then by field component, then by point.\n- `H` - pointer to data of size d * d * c * n * sizeof(datatype).\nIf H is not `NULL`, the values of the field's second spatial derivatives are written in this array,\nvarying first by the second partial derivative component, then by field component, then by point.\n\nLevel: intermediate\n\n-seealso: `DMField`, `DM`, `DMFieldGetNumComponents()`, `DMFieldEvaluate()`, `DMFieldEvaluateFV()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldEvaluateFE\"))\n\"\"\"\nfunction DMFieldEvaluateFE(petsclib::PetscLibType, field::DMField, cellIS::IS, points::PetscQuadrature, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) end\n\n@for_petsc function DMFieldEvaluateFE(petsclib::$UnionPetscLib, field::DMField, cellIS::IS, points::PetscQuadrature, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid )\n\n    @chk ccall(\n               (:DMFieldEvaluateFE, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, PetscQuadrature, PetscDataType, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}),\n               field, cellIS, points, datatype, B, D, H,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldEvaluateFV(petsclib::PetscLibType,field::DMField, cellIS::IS, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) \nEvaluate the mean of a field and its finite volume derivatives on a set of points.\n\nNot Collective\n\nInput Parameters:\n- `field`    - The `DMField` object\n- `cellIS`   - Index set for cells on which to evaluate the field\n- `datatype` - The PetscDataType of the output arrays: either `PETSC_REAL` or `PETSC_SCALAR`.\nIf the field is complex and datatype is `PETSC_REAL`, the real part of the\nfield is returned.\n\nOutput Parameters:\n- `B` - pointer to data of size c * n * sizeof(datatype), where c is the number of components in the field.\nIf B is not `NULL`, the values of the field are written in this array, varying first by component,\nthen by point.\n- `D` - pointer to data of size d * c * n * sizeof(datatype).\nIf D is not `NULL`, the values of the field's spatial derivatives are written in this array,\nvarying first by the partial derivative component, then by field component, then by point.\n- `H` - pointer to data of size d * d * c * n * sizeof(datatype).\nIf H is not `NULL`, the values of the field's second spatial derivatives are written in this array,\nvarying first by the second partial derivative component, then by field component, then by point.\n\nLevel: intermediate\n\n-seealso: `DMField`, `IS`, `DMFieldGetNumComponents()`, `DMFieldEvaluate()`, `DMFieldEvaluateFE()`, `PetscDataType`\n\n# External Links\n$(_doc_external(\"DM/DMFieldEvaluateFV\"))\n\"\"\"\nfunction DMFieldEvaluateFV(petsclib::PetscLibType, field::DMField, cellIS::IS, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) end\n\n@for_petsc function DMFieldEvaluateFV(petsclib::$UnionPetscLib, field::DMField, cellIS::IS, datatype::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid )\n\n    @chk ccall(\n               (:DMFieldEvaluateFV, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, PetscDataType, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}),\n               field, cellIS, datatype, B, D, H,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tminDegree::PetscInt,maxDegree::PetscInt = DMFieldGetDegree(petsclib::PetscLibType,field::DMField, cellIS::IS) \nGet the polynomial degree of a field when pulled back onto the\nreference element\n\nNot Collective\n\nInput Parameters:\n- `field`  - the `DMField` object\n- `cellIS` - the index set of points over which we want know the invariance\n\nOutput Parameters:\n- `minDegree` - the degree of the largest polynomial space contained in the field on each element\n- `maxDegree` - the largest degree of the smallest polynomial space containing the field on any element\n\nLevel: intermediate\n\n-seealso: `DMField`, `IS`, `DMFieldEvaluateFE()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldGetDegree\"))\n\"\"\"\nfunction DMFieldGetDegree(petsclib::PetscLibType, field::DMField, cellIS::IS) end\n\n@for_petsc function DMFieldGetDegree(petsclib::$UnionPetscLib, field::DMField, cellIS::IS )\n\tminDegree_ = Ref{$PetscInt}()\n\tmaxDegree_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMFieldGetDegree, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               field, cellIS, minDegree_, maxDegree_,\n              )\n\n\tminDegree = minDegree_[]\n\tmaxDegree = maxDegree_[]\n\n\treturn minDegree,maxDegree\nend \n\n\"\"\"\n\tquad::PetscQuadrature = DMFieldCreateDefaultQuadrature(petsclib::PetscLibType,field::DMField, pointIS::IS) \nCreates a quadrature sufficient to integrate the field on the selected\npoints via pullback onto the reference element\n\nNot Collective\n\nInput Parameters:\n- `field`   - the `DMField` object\n- `pointIS` - the index set of points over which we wish to integrate the field\n\nOutput Parameter:\n- `quad` - a `PetscQuadrature` object\n\nLevel: developer\n\n-seealso: `DMFieldCreateDefaultFaceQuadrature()`, `DMField`, `PetscQuadrature`, `IS`, `DMFieldEvaluteFE()`, `DMFieldGetDegree()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldCreateDefaultQuadrature\"))\n\"\"\"\nfunction DMFieldCreateDefaultQuadrature(petsclib::PetscLibType, field::DMField, pointIS::IS) end\n\n@for_petsc function DMFieldCreateDefaultQuadrature(petsclib::$UnionPetscLib, field::DMField, pointIS::IS )\n\tquad_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:DMFieldCreateDefaultQuadrature, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, Ptr{PetscQuadrature}),\n               field, pointIS, quad_,\n              )\n\n\tquad = quad_[]\n\n\treturn quad\nend \n\n\"\"\"\n\tquad::PetscQuadrature = DMFieldCreateDefaultFaceQuadrature(petsclib::PetscLibType,field::DMField, pointIS::IS) \nCreates a quadrature sufficient to integrate the field on all faces of the selected cells via pullback onto the reference element\n\nNot Collective\n\nInput Parameters:\n- `field`   - the `DMField` object\n- `pointIS` - the index set of points over which we wish to integrate the field over faces\n\nOutput Parameter:\n- `quad` - a `PetscQuadrature` object\n\nLevel: developer\n\n-seealso: `DMFieldCreateDefaultQuadrature()`, `DMField`, `PetscQuadrature`, `IS`, `DMFieldEvaluteFE()`, `DMFieldGetDegree()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldCreateDefaultFaceQuadrature\"))\n\"\"\"\nfunction DMFieldCreateDefaultFaceQuadrature(petsclib::PetscLibType, field::DMField, pointIS::IS) end\n\n@for_petsc function DMFieldCreateDefaultFaceQuadrature(petsclib::$UnionPetscLib, field::DMField, pointIS::IS )\n\tquad_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:DMFieldCreateDefaultFaceQuadrature, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, Ptr{PetscQuadrature}),\n               field, pointIS, quad_,\n              )\n\n\tquad = quad_[]\n\n\treturn quad\nend \n\n\"\"\"\n\tgeom::PetscFEGeom = DMFieldCreateFEGeom(petsclib::PetscLibType,field::DMField, pointIS::IS, quad::PetscQuadrature, mode::PetscFEGeomMode) \nCompute and create the geometric factors of a coordinate field\n\nNot Collective\n\nInput Parameters:\n- `field`   - the `DMField` object\n- `pointIS` - the index set of points over which we wish to integrate the field\n- `quad`    - the quadrature points at which to evaluate the geometric factors\n- `mode`    - Type of geometry data to store\n\nOutput Parameter:\n- `geom` - the geometric factors\n\nLevel: developer\n\n-seealso: `DMField`, `PetscQuadrature`, `IS`, `PetscFEGeom`, `DMFieldEvaluateFE()`, `DMFieldCreateDefaulteQuadrature()`, `DMFieldGetDegree()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldCreateFEGeom\"))\n\"\"\"\nfunction DMFieldCreateFEGeom(petsclib::PetscLibType, field::DMField, pointIS::IS, quad::PetscQuadrature, mode::PetscFEGeomMode) end\n\n@for_petsc function DMFieldCreateFEGeom(petsclib::$UnionPetscLib, field::DMField, pointIS::IS, quad::PetscQuadrature, mode::PetscFEGeomMode )\n\tgeom_ = Ref{PetscFEGeom}()\n\n    @chk ccall(\n               (:DMFieldCreateFEGeom, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, PetscQuadrature, PetscFEGeomMode, PetscFEGeom),\n               field, pointIS, quad, mode, geom_,\n              )\n\n\tgeom = geom_[]\n\n\treturn geom\nend \n\n\"\"\"\n\tDMFieldInitializePackage(petsclib::PetscLibType) \nInitialize `DMField` package\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `DMFieldFinalizePackage()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldInitializePackage\"))\n\"\"\"\nfunction DMFieldInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function DMFieldInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMFieldInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldFinalizePackage(petsclib::PetscLibType) \nFinalize `DMField` package, it is called from `PetscFinalize()`\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `DMFieldInitializePackage()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldFinalizePackage\"))\n\"\"\"\nfunction DMFieldFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function DMFieldFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMFieldFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds an implementation of the `DMField` object.\n\nNot collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined implementation\n- `function` - routine to create method context\n\n-seealso: `DMField`, `DMFieldRegisterAll()`, `DMFieldRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMFieldRegister\"))\n\"\"\"\nfunction DMFieldRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function DMFieldRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:DMFieldRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcornerValues::PetscScalar,field::DMField = DMFieldCreateDA(petsclib::PetscLibType,dm::PetscDM, nc::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMFieldCreateDA\"))\n\"\"\"\nfunction DMFieldCreateDA(petsclib::PetscLibType, dm::PetscDM, nc::PetscInt) end\n\n@for_petsc function DMFieldCreateDA(petsclib::$UnionPetscLib, dm::PetscDM, nc::$PetscInt )\n\tcornerValues_ = Ref{$PetscScalar}()\n\tfield_ = Ref{DMField}()\n\n    @chk ccall(\n               (:DMFieldCreateDA, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, Ptr{$PetscScalar}, Ptr{DMField}),\n               dm, nc, cornerValues_, field_,\n              )\n\n\tcornerValues = cornerValues_[]\n\tfield = field_[]\n\n\treturn cornerValues,field\nend \n\n\"\"\"\n\tfield::DMField = DMFieldCreateDSWithDG(petsclib::PetscLibType,dm::PetscDM, dmDG::PetscDM, fieldNum::PetscInt, vec::PetscVec, vecDG::PetscVec) \n\n# External Links\n$(_doc_external(\"DM/DMFieldCreateDSWithDG\"))\n\"\"\"\nfunction DMFieldCreateDSWithDG(petsclib::PetscLibType, dm::PetscDM, dmDG::PetscDM, fieldNum::PetscInt, vec::PetscVec, vecDG::PetscVec) end\n\n@for_petsc function DMFieldCreateDSWithDG(petsclib::$UnionPetscLib, dm::PetscDM, dmDG::PetscDM, fieldNum::$PetscInt, vec::PetscVec, vecDG::PetscVec )\n\tfield_ = Ref{DMField}()\n\n    @chk ccall(\n               (:DMFieldCreateDSWithDG, $petsc_library),\n               PetscErrorCode,\n               (CDM, CDM, $PetscInt, CVec, CVec, Ptr{DMField}),\n               dm, dmDG, fieldNum, vec, vecDG, field_,\n              )\n\n\tfield = field_[]\n\n\treturn field\nend \n\n\"\"\"\n\tfield::DMField = DMFieldCreateDS(petsclib::PetscLibType,dm::PetscDM, fieldNum::PetscInt, vec::PetscVec) \n\n# External Links\n$(_doc_external(\"DM/DMFieldCreateDS\"))\n\"\"\"\nfunction DMFieldCreateDS(petsclib::PetscLibType, dm::PetscDM, fieldNum::PetscInt, vec::PetscVec) end\n\n@for_petsc function DMFieldCreateDS(petsclib::$UnionPetscLib, dm::PetscDM, fieldNum::$PetscInt, vec::PetscVec )\n\tfield_ = Ref{DMField}()\n\n    @chk ccall(\n               (:DMFieldCreateDS, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, CVec, Ptr{DMField}),\n               dm, fieldNum, vec, field_,\n              )\n\n\tfield = field_[]\n\n\treturn field\nend \n\n\"\"\"\n\tDMFieldShellGetContext(petsclib::PetscLibType,field::DMField, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellGetContext\"))\n\"\"\"\nfunction DMFieldShellGetContext(petsclib::PetscLibType, field::DMField, ctx::Cvoid) end\n\n@for_petsc function DMFieldShellGetContext(petsclib::$UnionPetscLib, field::DMField, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMFieldShellGetContext, $petsc_library),\n               PetscErrorCode,\n               (DMField, Ptr{Cvoid}),\n               field, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellEvaluateFEDefault(petsclib::PetscLibType,field::DMField, pointIS::IS, quad::PetscQuadrature, type::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellEvaluateFEDefault\"))\n\"\"\"\nfunction DMFieldShellEvaluateFEDefault(petsclib::PetscLibType, field::DMField, pointIS::IS, quad::PetscQuadrature, type::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) end\n\n@for_petsc function DMFieldShellEvaluateFEDefault(petsclib::$UnionPetscLib, field::DMField, pointIS::IS, quad::PetscQuadrature, type::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid )\n\n    @chk ccall(\n               (:DMFieldShellEvaluateFEDefault, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, PetscQuadrature, PetscDataType, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}),\n               field, pointIS, quad, type, B, D, H,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellEvaluateFVDefault(petsclib::PetscLibType,field::DMField, pointIS::IS, type::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellEvaluateFVDefault\"))\n\"\"\"\nfunction DMFieldShellEvaluateFVDefault(petsclib::PetscLibType, field::DMField, pointIS::IS, type::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid) end\n\n@for_petsc function DMFieldShellEvaluateFVDefault(petsclib::$UnionPetscLib, field::DMField, pointIS::IS, type::PetscDataType, B::Cvoid, D::Cvoid, H::Cvoid )\n\n    @chk ccall(\n               (:DMFieldShellEvaluateFVDefault, $petsc_library),\n               PetscErrorCode,\n               (DMField, CIS, PetscDataType, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}),\n               field, pointIS, type, B, D, H,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellSetDestroy(petsclib::PetscLibType,field::DMField, destroy::external) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellSetDestroy\"))\n\"\"\"\nfunction DMFieldShellSetDestroy(petsclib::PetscLibType, field::DMField, destroy::external) end\n\n@for_petsc function DMFieldShellSetDestroy(petsclib::$UnionPetscLib, field::DMField, destroy::external )\n\n    @chk ccall(\n               (:DMFieldShellSetDestroy, $petsc_library),\n               PetscErrorCode,\n               (DMField, external),\n               field, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellSetEvaluate(petsclib::PetscLibType,field::DMField, evaluate::external) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellSetEvaluate\"))\n\"\"\"\nfunction DMFieldShellSetEvaluate(petsclib::PetscLibType, field::DMField, evaluate::external) end\n\n@for_petsc function DMFieldShellSetEvaluate(petsclib::$UnionPetscLib, field::DMField, evaluate::external )\n\n    @chk ccall(\n               (:DMFieldShellSetEvaluate, $petsc_library),\n               PetscErrorCode,\n               (DMField, external),\n               field, evaluate,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellSetEvaluateFE(petsclib::PetscLibType,field::DMField, evaluateFE::external) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellSetEvaluateFE\"))\n\"\"\"\nfunction DMFieldShellSetEvaluateFE(petsclib::PetscLibType, field::DMField, evaluateFE::external) end\n\n@for_petsc function DMFieldShellSetEvaluateFE(petsclib::$UnionPetscLib, field::DMField, evaluateFE::external )\n\n    @chk ccall(\n               (:DMFieldShellSetEvaluateFE, $petsc_library),\n               PetscErrorCode,\n               (DMField, external),\n               field, evaluateFE,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellSetEvaluateFV(petsclib::PetscLibType,field::DMField, evaluateFV::external) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellSetEvaluateFV\"))\n\"\"\"\nfunction DMFieldShellSetEvaluateFV(petsclib::PetscLibType, field::DMField, evaluateFV::external) end\n\n@for_petsc function DMFieldShellSetEvaluateFV(petsclib::$UnionPetscLib, field::DMField, evaluateFV::external )\n\n    @chk ccall(\n               (:DMFieldShellSetEvaluateFV, $petsc_library),\n               PetscErrorCode,\n               (DMField, external),\n               field, evaluateFV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellSetGetDegree(petsclib::PetscLibType,field::DMField, getDegree::external) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellSetGetDegree\"))\n\"\"\"\nfunction DMFieldShellSetGetDegree(petsclib::PetscLibType, field::DMField, getDegree::external) end\n\n@for_petsc function DMFieldShellSetGetDegree(petsclib::$UnionPetscLib, field::DMField, getDegree::external )\n\n    @chk ccall(\n               (:DMFieldShellSetGetDegree, $petsc_library),\n               PetscErrorCode,\n               (DMField, external),\n               field, getDegree,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMFieldShellSetCreateDefaultQuadrature(petsclib::PetscLibType,field::DMField, createDefaultQuadrature::external) \n\n# External Links\n$(_doc_external(\"DM/DMFieldShellSetCreateDefaultQuadrature\"))\n\"\"\"\nfunction DMFieldShellSetCreateDefaultQuadrature(petsclib::PetscLibType, field::DMField, createDefaultQuadrature::external) end\n\n@for_petsc function DMFieldShellSetCreateDefaultQuadrature(petsclib::$UnionPetscLib, field::DMField, createDefaultQuadrature::external )\n\n    @chk ccall(\n               (:DMFieldShellSetCreateDefaultQuadrature, $petsc_library),\n               PetscErrorCode,\n               (DMField, external),\n               field, createDefaultQuadrature,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::Cvoid,field::DMField = DMFieldCreateShell(petsclib::PetscLibType,dm::PetscDM, numComponents::PetscInt, continuity::DMFieldContinuity) \n\n# External Links\n$(_doc_external(\"DM/DMFieldCreateShell\"))\n\"\"\"\nfunction DMFieldCreateShell(petsclib::PetscLibType, dm::PetscDM, numComponents::PetscInt, continuity::DMFieldContinuity) end\n\n@for_petsc function DMFieldCreateShell(petsclib::$UnionPetscLib, dm::PetscDM, numComponents::$PetscInt, continuity::DMFieldContinuity )\n\tctx_ = Ref{Cvoid}()\n\tfield_ = Ref{DMField}()\n\n    @chk ccall(\n               (:DMFieldCreateShell, $petsc_library),\n               PetscErrorCode,\n               (CDM, $PetscInt, DMFieldContinuity, Ptr{Cvoid}, Ptr{DMField}),\n               dm, numComponents, continuity, ctx_, field_,\n              )\n\n\tctx = ctx_[]\n\tfield = field_[]\n\n\treturn ctx,field\nend \n\n\"\"\"\n\tDMPlexTransformRegisterAll(petsclib::PetscLibType) \nRegisters all of the transform components in the `DM` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransformType`, `DMRegisterAll()`, `DMPlexTransformRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformRegisterAll\"))\n\"\"\"\nfunction DMPlexTransformRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function DMPlexTransformRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMPlexTransformRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformRegisterDestroy(petsclib::PetscLibType) \nThis function destroys the registered `DMPlexTransformType`. It is called from `PetscFinalize()`.\n\nNot collective\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMRegisterAll()`, `DMPlexTransformType`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformRegisterDestroy\"))\n\"\"\"\nfunction DMPlexTransformRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function DMPlexTransformRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMPlexTransformRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttr::DMPlexTransform = DMPlexTransformCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty transform object. The type can then be set with `DMPlexTransformSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the transform object\n\nOutput Parameter:\n- `tr` - The transform object\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformType`, `DMPlexTransformSetType()`, `DMPLEXREFINEREGULAR`, `DMPLEXTRANSFORMFILTER`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCreate\"))\n\"\"\"\nfunction DMPlexTransformCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function DMPlexTransformCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\ttr_ = Ref{DMPlexTransform}()\n\n    @chk ccall(\n               (:DMPlexTransformCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{DMPlexTransform}),\n               comm, tr_,\n              )\n\n\ttr = tr_[]\n\n\treturn tr\nend \n\n\"\"\"\n\tDMPlexTransformSetType(petsclib::PetscLibType,tr::DMPlexTransform, method::DMPlexTransformType) \nSets the particular implementation for a transform.\n\nCollective\n\nInput Parameters:\n- `tr`     - The transform\n- `method` - The name of the transform type\n\nOptions Database Key:\n- `-dm_plex_transform_type <type>` - Sets the transform type; see `DMPlexTransformType`\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformType`, `DMPlexTransformGetType()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetType\"))\n\"\"\"\nfunction DMPlexTransformSetType(petsclib::PetscLibType, tr::DMPlexTransform, method::DMPlexTransformType) end\n\n@for_petsc function DMPlexTransformSetType(petsclib::$UnionPetscLib, tr::DMPlexTransform, method::DMPlexTransformType )\n\n    @chk ccall(\n               (:DMPlexTransformSetType, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPlexTransformType),\n               tr, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::DMPlexTransformType = DMPlexTransformGetType(petsclib::PetscLibType,tr::DMPlexTransform) \nGets the type name (as a string) from the transform.\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `type` - The `DMPlexTransformType` name\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformType`, `DMPlexTransformSetType()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetType\"))\n\"\"\"\nfunction DMPlexTransformGetType(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformGetType(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\ttype_ = Ref{DMPlexTransformType}()\n\n    @chk ccall(\n               (:DMPlexTransformGetType, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{DMPlexTransformType}),\n               tr, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tDMPlexTransformView(petsclib::PetscLibType,tr::DMPlexTransform, v::PetscViewer) \nViews a `DMPlexTransform`\n\nCollective\n\nInput Parameters:\n- `tr` - the `DMPlexTransform` object to view\n- `v`  - the viewer\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformType`, `PetscViewer`, `DMPlexTransformDestroy()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformView\"))\n\"\"\"\nfunction DMPlexTransformView(petsclib::PetscLibType, tr::DMPlexTransform, v::PetscViewer) end\n\n@for_petsc function DMPlexTransformView(petsclib::$UnionPetscLib, tr::DMPlexTransform, v::PetscViewer )\n\n    @chk ccall(\n               (:DMPlexTransformView, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, PetscViewer),\n               tr, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformSetFromOptions(petsclib::PetscLibType,tr::DMPlexTransform) \nSets parameters in a transform from values in the options database\n\nCollective\n\nInput Parameter:\n- `tr` - the `DMPlexTransform` object to set options for\n\nOptions Database Keys:\n- `-dm_plex_transform_type`                      - Set the transform type, e.g. refine_regular\n- `-dm_plex_transform_label_match_strata`        - Only label points of the same stratum as the producing point\n- `-dm_plex_transform_label_replica_inc <inc>`   - Increment for the label value to be multiplied by the replica number, so that the new label value is oldValue + r * inc\n- `-dm_plex_transform_active <name>`             - Name for active mesh label\n- `-dm_plex_transform_active_values <v0,v1,...>` - Values in the active label\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformView()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetFromOptions\"))\n\"\"\"\nfunction DMPlexTransformSetFromOptions(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformSetFromOptions(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\n    @chk ccall(\n               (:DMPlexTransformSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform,),\n               tr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformDestroy(petsclib::PetscLibType,tr::DMPlexTransform) \nDestroys a `DMPlexTransform`\n\nCollective\n\nInput Parameter:\n- `tr` - the transform object to destroy\n\nLevel: beginner\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformView()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformDestroy\"))\n\"\"\"\nfunction DMPlexTransformDestroy(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformDestroy(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\n    @chk ccall(\n               (:DMPlexTransformDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMPlexTransform},),\n               tr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformSetUp(petsclib::PetscLibType,tr::DMPlexTransform) \nCreate the tables that drive the transform\n\nInput Parameter:\n- `tr` - The `DMPlexTransform` object\n\nLevel: intermediate\n\n-seealso: [](plex_transform_table), [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetUp\"))\n\"\"\"\nfunction DMPlexTransformSetUp(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformSetUp(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\n    @chk ccall(\n               (:DMPlexTransformSetUp, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform,),\n               tr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformGetDM(petsclib::PetscLibType,tr::DMPlexTransform, dm::PetscDM) \nGet the base `DM` for the transform\n\nInput Parameter:\n- `tr` - The `DMPlexTransform` object\n\nOutput Parameter:\n- `dm` - The original `DM` which will be transformed\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformSetDM()`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetDM\"))\n\"\"\"\nfunction DMPlexTransformGetDM(petsclib::PetscLibType, tr::DMPlexTransform, dm::PetscDM) end\n\n@for_petsc function DMPlexTransformGetDM(petsclib::$UnionPetscLib, tr::DMPlexTransform, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:DMPlexTransformGetDM, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{CDM}),\n               tr, dm_,\n              )\n\n\tdm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformSetDM(petsclib::PetscLibType,tr::DMPlexTransform, dm::PetscDM) \nSet the base `DM` for the transform\n\nInput Parameters:\n- `tr` - The `DMPlexTransform` object\n- `dm` - The original `DM` which will be transformed\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformGetDM()`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetDM\"))\n\"\"\"\nfunction DMPlexTransformSetDM(petsclib::PetscLibType, tr::DMPlexTransform, dm::PetscDM) end\n\n@for_petsc function DMPlexTransformSetDM(petsclib::$UnionPetscLib, tr::DMPlexTransform, dm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexTransformSetDM, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, CDM),\n               tr, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformGetActive(petsclib::PetscLibType,tr::DMPlexTransform, active::DMLabel) \nGet the `DMLabel` marking the active points for the transform\n\nInput Parameter:\n- `tr` - The `DMPlexTransform` object\n\nOutput Parameter:\n- `active` - The `DMLabel` indicating which points will be transformed\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformSetActive()`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetActive\"))\n\"\"\"\nfunction DMPlexTransformGetActive(petsclib::PetscLibType, tr::DMPlexTransform, active::DMLabel) end\n\n@for_petsc function DMPlexTransformGetActive(petsclib::$UnionPetscLib, tr::DMPlexTransform, active::DMLabel )\n\n    @chk ccall(\n               (:DMPlexTransformGetActive, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{DMLabel}),\n               tr, active,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformSetActive(petsclib::PetscLibType,tr::DMPlexTransform, active::DMLabel) \nSet the `DMLabel` marking the active points for the transform\n\nInput Parameters:\n- `tr`     - The `DMPlexTransform` object\n- `active` - The `DMLabel` indicating which points will be transformed\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformGetActive()`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetActive\"))\n\"\"\"\nfunction DMPlexTransformSetActive(petsclib::PetscLibType, tr::DMPlexTransform, active::DMLabel) end\n\n@for_petsc function DMPlexTransformSetActive(petsclib::$UnionPetscLib, tr::DMPlexTransform, active::DMLabel )\n\n    @chk ccall(\n               (:DMPlexTransformSetActive, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMLabel),\n               tr, active,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttrType::DMLabel = DMPlexTransformGetTransformTypes(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the `DMLabel` marking the transform type of each point for the transform\n\nInput Parameter:\n- `tr` - The `DMPlexTransform` object\n\nOutput Parameter:\n- `trType` - The `DMLabel` indicating the transform type for each point\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexSetTransformType()`, `DMPlexTransformGetActive()`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetTransformTypes\"))\n\"\"\"\nfunction DMPlexTransformGetTransformTypes(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformGetTransformTypes(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\ttrType_ = Ref{DMLabel}()\n\n    @chk ccall(\n               (:DMPlexTransformGetTransformTypes, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{DMLabel}),\n               tr, trType_,\n              )\n\n\ttrType = trType_[]\n\n\treturn trType\nend \n\n\"\"\"\n\tDMPlexTransformSetTransformTypes(petsclib::PetscLibType,tr::DMPlexTransform, trType::DMLabel) \nSet the `DMLabel` marking the transform type of each point for the transform\n\nInput Parameters:\n- `tr`     - The `DMPlexTransform` object\n- `trType` - The original `DM` which will be transformed\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformGetTransformTypes()`, `DMPlexTransformGetActive())`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetTransformTypes\"))\n\"\"\"\nfunction DMPlexTransformSetTransformTypes(petsclib::PetscLibType, tr::DMPlexTransform, trType::DMLabel) end\n\n@for_petsc function DMPlexTransformSetTransformTypes(petsclib::$UnionPetscLib, tr::DMPlexTransform, trType::DMLabel )\n\n    @chk ccall(\n               (:DMPlexTransformSetTransformTypes, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMLabel),\n               tr, trType,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformSetDimensions(petsclib::PetscLibType,tr::DMPlexTransform, dm::PetscDM, tdm::PetscDM) \nSet the dimensions for the transformed `DM`\n\nInput Parameters:\n- `tr` - The `DMPlexTransform` object\n- `dm` - The original `DM`\n\nOutput Parameter:\n- `tdm` - The transformed `DM`\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetDimensions\"))\n\"\"\"\nfunction DMPlexTransformSetDimensions(petsclib::PetscLibType, tr::DMPlexTransform, dm::PetscDM, tdm::PetscDM) end\n\n@for_petsc function DMPlexTransformSetDimensions(petsclib::$UnionPetscLib, tr::DMPlexTransform, dm::PetscDM, tdm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexTransformSetDimensions, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, CDM, CDM),\n               tr, dm, tdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt = DMPlexTransformGetChart(petsclib::PetscLibType,tr::DMPlexTransform) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetChart\"))\n\"\"\"\nfunction DMPlexTransformGetChart(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformGetChart(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetChart, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               tr, pStart_, pEnd_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\n\treturn pStart,pEnd\nend \n\n\"\"\"\n\tcelltype::DMPolytopeType = DMPlexTransformGetCellType(petsclib::PetscLibType,tr::DMPlexTransform, cell::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetCellType\"))\n\"\"\"\nfunction DMPlexTransformGetCellType(petsclib::PetscLibType, tr::DMPlexTransform, cell::PetscInt) end\n\n@for_petsc function DMPlexTransformGetCellType(petsclib::$UnionPetscLib, tr::DMPlexTransform, cell::$PetscInt )\n\tcelltype_ = Ref{DMPolytopeType}()\n\n    @chk ccall(\n               (:DMPlexTransformGetCellType, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, Ptr{DMPolytopeType}),\n               tr, cell, celltype_,\n              )\n\n\tcelltype = unsafe_string(celltype_[])\n\n\treturn celltype\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexTransformGetCellTypeStratum(petsclib::PetscLibType,tr::DMPlexTransform, celltype::DMPolytopeType) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetCellTypeStratum\"))\n\"\"\"\nfunction DMPlexTransformGetCellTypeStratum(petsclib::PetscLibType, tr::DMPlexTransform, celltype::DMPolytopeType) end\n\n@for_petsc function DMPlexTransformGetCellTypeStratum(petsclib::$UnionPetscLib, tr::DMPlexTransform, celltype::DMPolytopeType )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetCellTypeStratum, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               tr, celltype, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tdepth::PetscInt = DMPlexTransformGetDepth(petsclib::PetscLibType,tr::DMPlexTransform) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetDepth\"))\n\"\"\"\nfunction DMPlexTransformGetDepth(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformGetDepth(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tdepth_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetDepth, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{$PetscInt}),\n               tr, depth_,\n              )\n\n\tdepth = depth_[]\n\n\treturn depth\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMPlexTransformGetDepthStratum(petsclib::PetscLibType,tr::DMPlexTransform, depth::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetDepthStratum\"))\n\"\"\"\nfunction DMPlexTransformGetDepthStratum(petsclib::PetscLibType, tr::DMPlexTransform, depth::PetscInt) end\n\n@for_petsc function DMPlexTransformGetDepthStratum(petsclib::$UnionPetscLib, tr::DMPlexTransform, depth::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetDepthStratum, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               tr, depth, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tmatch::PetscBool = DMPlexTransformGetMatchStrata(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the flag which determines what points get added to the transformed labels\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `match` - If `PETSC_TRUE`, only add produced points at the same stratum as the original point to new labels\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformSetMatchStrata()`, `DMPlexGetPointDepth()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetMatchStrata\"))\n\"\"\"\nfunction DMPlexTransformGetMatchStrata(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformGetMatchStrata(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tmatch_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexTransformGetMatchStrata, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{PetscBool}),\n               tr, match_,\n              )\n\n\tmatch = match_[]\n\n\treturn match\nend \n\n\"\"\"\n\tDMPlexTransformSetMatchStrata(petsclib::PetscLibType,tr::DMPlexTransform, match::PetscBool) \nSet the flag which determines what points get added to the transformed labels\n\nNot Collective\n\nInput Parameters:\n- `tr`    - The `DMPlexTransform`\n- `match` - If `PETSC_TRUE`, only add produced points at the same stratum as the original point to new labels\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformGetMatchStrata()`, `DMPlexGetPointDepth()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformSetMatchStrata\"))\n\"\"\"\nfunction DMPlexTransformSetMatchStrata(petsclib::PetscLibType, tr::DMPlexTransform, match::PetscBool) end\n\n@for_petsc function DMPlexTransformSetMatchStrata(petsclib::$UnionPetscLib, tr::DMPlexTransform, match::PetscBool )\n\n    @chk ccall(\n               (:DMPlexTransformSetMatchStrata, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, PetscBool),\n               tr, match,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpNew::PetscInt = DMPlexTransformGetTargetPoint(petsclib::PetscLibType,tr::DMPlexTransform, ct::DMPolytopeType, ctNew::DMPolytopeType, p::PetscInt, r::PetscInt) \nGet the number of a point in the transformed mesh based on information from the original mesh.\n\nNot Collective\n\nInput Parameters:\n- `tr`    - The `DMPlexTransform`\n- `ct`    - The type of the original point which produces the new point\n- `ctNew` - The type of the new point\n- `p`     - The original point which produces the new point\n- `r`     - The replica number of the new point, meaning it is the rth point of type `ctNew` produced from `p`\n\nOutput Parameter:\n- `pNew` - The new point number\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexTransformGetSourcePoint()`, `DMPlexTransformCellTransform()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetTargetPoint\"))\n\"\"\"\nfunction DMPlexTransformGetTargetPoint(petsclib::PetscLibType, tr::DMPlexTransform, ct::DMPolytopeType, ctNew::DMPolytopeType, p::PetscInt, r::PetscInt) end\n\n@for_petsc function DMPlexTransformGetTargetPoint(petsclib::$UnionPetscLib, tr::DMPlexTransform, ct::DMPolytopeType, ctNew::DMPolytopeType, p::$PetscInt, r::$PetscInt )\n\tpNew_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetTargetPoint, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, DMPolytopeType, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               tr, ct, ctNew, p, r, pNew_,\n              )\n\n\tpNew = pNew_[]\n\n\treturn pNew\nend \n\n\"\"\"\n\tp::PetscInt,r::PetscInt = DMPlexTransformGetSourcePoint(petsclib::PetscLibType,tr::DMPlexTransform, pNew::PetscInt, ct::DMPolytopeType, ctNew::DMPolytopeType) \nGet the number of a point in the original mesh based on information from the transformed mesh.\n\nNot Collective\n\nInput Parameters:\n- `tr`   - The `DMPlexTransform`\n- `pNew` - The new point number\n\nOutput Parameters:\n- `ct`    - The type of the original point which produces the new point\n- `ctNew` - The type of the new point\n- `p`     - The original point which produces the new point\n- `r`     - The replica number of the new point, meaning it is the rth point of type ctNew produced from p\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexTransformGetTargetPoint()`, `DMPlexTransformCellTransform()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetSourcePoint\"))\n\"\"\"\nfunction DMPlexTransformGetSourcePoint(petsclib::PetscLibType, tr::DMPlexTransform, pNew::PetscInt, ct::DMPolytopeType, ctNew::DMPolytopeType) end\n\n@for_petsc function DMPlexTransformGetSourcePoint(petsclib::$UnionPetscLib, tr::DMPlexTransform, pNew::$PetscInt, ct::DMPolytopeType, ctNew::DMPolytopeType )\n\tp_ = Ref{$PetscInt}()\n\tr_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetSourcePoint, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, Ptr{DMPolytopeType}, Ptr{DMPolytopeType}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               tr, pNew, ct, ctNew, p_, r_,\n              )\n\n\tp = p_[]\n\tr = r_[]\n\n\treturn p,r\nend \n\n\"\"\"\n\trt::PetscInt,Nt::PetscInt,size::Vector{PetscInt},cone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexTransformCellTransform(petsclib::PetscLibType,tr::DMPlexTransform, source::DMPolytopeType, p::PetscInt, target::Vector{DMPolytopeType}) \nDescribes the transform of a given source cell into a set of other target cells. These produced cells become the new mesh.\n\nInput Parameters:\n- `tr`     - The `DMPlexTransform` object\n- `source` - The source cell type\n- `p`      - The source point, which can also determine the refine type\n\nOutput Parameters:\n- `rt`     - The refine type for this point\n- `Nt`     - The number of types produced by this point\n- `target` - An array of length `Nt` giving the types produced\n- `size`   - An array of length `Nt` giving the number of cells of each type produced\n- `cone`   - An array of length `Nt`*size[t]*coneSize[t] giving the cell type for each point in the cone of each produced point\n- `ornt`   - An array of length `Nt`*size[t]*coneSize[t] giving the orientation for each point in the cone of each produced point\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexTransformApply()`, `DMPlexTransformCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCellTransform\"))\n\"\"\"\nfunction DMPlexTransformCellTransform(petsclib::PetscLibType, tr::DMPlexTransform, source::DMPolytopeType, p::PetscInt, target::Vector{DMPolytopeType}) end\n\n@for_petsc function DMPlexTransformCellTransform(petsclib::$UnionPetscLib, tr::DMPlexTransform, source::DMPolytopeType, p::$PetscInt, target::Vector{DMPolytopeType} )\n\trt_ = Ref{$PetscInt}()\n\tNt_ = Ref{$PetscInt}()\n\ttarget_ = Ref(pointer(target))\n\tsize_ = Ref{Ptr{$PetscInt}}()\n\tcone_ = Ref{Ptr{$PetscInt}}()\n\tornt_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexTransformCellTransform, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{DMPolytopeType}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               tr, source, p, rt_, Nt_, target_, size_, cone_, ornt_,\n              )\n\n\trt = rt_[]\n\tNt = Nt_[]\n\tsize = unsafe_wrap(Array, size_[], VecGetLocalSize(petsclib, x); own = false)\n\tcone = unsafe_wrap(Array, cone_[], VecGetLocalSize(petsclib, x); own = false)\n\tornt = unsafe_wrap(Array, ornt_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn rt,Nt,size,cone,ornt\nend \n\n\"\"\"\n\trnew::PetscInt,onew::PetscInt = DMPlexTransformGetSubcellOrientationIdentity(petsclib::PetscLibType,tr::DMPlexTransform, sct::DMPolytopeType, sp::PetscInt, so::PetscInt, tct::DMPolytopeType, r::PetscInt, o::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetSubcellOrientationIdentity\"))\n\"\"\"\nfunction DMPlexTransformGetSubcellOrientationIdentity(petsclib::PetscLibType, tr::DMPlexTransform, sct::DMPolytopeType, sp::PetscInt, so::PetscInt, tct::DMPolytopeType, r::PetscInt, o::PetscInt) end\n\n@for_petsc function DMPlexTransformGetSubcellOrientationIdentity(petsclib::$UnionPetscLib, tr::DMPlexTransform, sct::DMPolytopeType, sp::$PetscInt, so::$PetscInt, tct::DMPolytopeType, r::$PetscInt, o::$PetscInt )\n\trnew_ = Ref{$PetscInt}()\n\tonew_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetSubcellOrientationIdentity, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, $PetscInt, $PetscInt, DMPolytopeType, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               tr, sct, sp, so, tct, r, o, rnew_, onew_,\n              )\n\n\trnew = rnew_[]\n\tonew = onew_[]\n\n\treturn rnew,onew\nend \n\n\"\"\"\n\trt::PetscInt,Nt::PetscInt,size::Vector{PetscInt},cone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexTransformCellTransformIdentity(petsclib::PetscLibType,tr::DMPlexTransform, source::DMPolytopeType, p::PetscInt, target::Vector{DMPolytopeType}) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCellTransformIdentity\"))\n\"\"\"\nfunction DMPlexTransformCellTransformIdentity(petsclib::PetscLibType, tr::DMPlexTransform, source::DMPolytopeType, p::PetscInt, target::Vector{DMPolytopeType}) end\n\n@for_petsc function DMPlexTransformCellTransformIdentity(petsclib::$UnionPetscLib, tr::DMPlexTransform, source::DMPolytopeType, p::$PetscInt, target::Vector{DMPolytopeType} )\n\trt_ = Ref{$PetscInt}()\n\tNt_ = Ref{$PetscInt}()\n\ttarget_ = Ref(pointer(target))\n\tsize_ = Ref{Ptr{$PetscInt}}()\n\tcone_ = Ref{Ptr{$PetscInt}}()\n\tornt_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexTransformCellTransformIdentity, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{DMPolytopeType}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               tr, source, p, rt_, Nt_, target_, size_, cone_, ornt_,\n              )\n\n\trt = rt_[]\n\tNt = Nt_[]\n\tsize = unsafe_wrap(Array, size_[], VecGetLocalSize(petsclib, x); own = false)\n\tcone = unsafe_wrap(Array, cone_[], VecGetLocalSize(petsclib, x); own = false)\n\tornt = unsafe_wrap(Array, ornt_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn rt,Nt,size,cone,ornt\nend \n\n\"\"\"\n\trnew::PetscInt,onew::PetscInt = DMPlexTransformGetSubcellOrientation(petsclib::PetscLibType,tr::DMPlexTransform, sct::DMPolytopeType, sp::PetscInt, so::PetscInt, tct::DMPolytopeType, r::PetscInt, o::PetscInt) \nTransform the replica number and orientation for a target point according to the group action for the source point\n\nNot Collective\n\nInput Parameters:\n- `tr`  - The `DMPlexTransform`\n- `sct` - The source point cell type, from whom the new cell is being produced\n- `sp`  - The source point\n- `so`  - The orientation of the source point in its enclosing parent\n- `tct` - The target point cell type\n- `r`   - The replica number requested for the produced cell type\n- `o`   - The orientation of the replica\n\nOutput Parameters:\n- `rnew` - The replica number, given the orientation of the parent\n- `onew` - The replica orientation, given the orientation of the parent\n\nLevel: advanced\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexTransformCellTransform()`, `DMPlexTransformApply()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetSubcellOrientation\"))\n\"\"\"\nfunction DMPlexTransformGetSubcellOrientation(petsclib::PetscLibType, tr::DMPlexTransform, sct::DMPolytopeType, sp::PetscInt, so::PetscInt, tct::DMPolytopeType, r::PetscInt, o::PetscInt) end\n\n@for_petsc function DMPlexTransformGetSubcellOrientation(petsclib::$UnionPetscLib, tr::DMPlexTransform, sct::DMPolytopeType, sp::$PetscInt, so::$PetscInt, tct::DMPolytopeType, r::$PetscInt, o::$PetscInt )\n\trnew_ = Ref{$PetscInt}()\n\tonew_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetSubcellOrientation, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, $PetscInt, $PetscInt, DMPolytopeType, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               tr, sct, sp, so, tct, r, o, rnew_, onew_,\n              )\n\n\trnew = rnew_[]\n\tonew = onew_[]\n\n\treturn rnew,onew\nend \n\n\"\"\"\n\tconeSize::PetscInt = DMPlexTransformGetConeSize(petsclib::PetscLibType,tr::DMPlexTransform, q::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetConeSize\"))\n\"\"\"\nfunction DMPlexTransformGetConeSize(petsclib::PetscLibType, tr::DMPlexTransform, q::PetscInt) end\n\n@for_petsc function DMPlexTransformGetConeSize(petsclib::$UnionPetscLib, tr::DMPlexTransform, q::$PetscInt )\n\tconeSize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformGetConeSize, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, Ptr{$PetscInt}),\n               tr, q, coneSize_,\n              )\n\n\tconeSize = coneSize_[]\n\n\treturn coneSize\nend \n\n\"\"\"\n\tcone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexTransformGetConeOriented(petsclib::PetscLibType,tr::DMPlexTransform, q::PetscInt, po::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetConeOriented\"))\n\"\"\"\nfunction DMPlexTransformGetConeOriented(petsclib::PetscLibType, tr::DMPlexTransform, q::PetscInt, po::PetscInt) end\n\n@for_petsc function DMPlexTransformGetConeOriented(petsclib::$UnionPetscLib, tr::DMPlexTransform, q::$PetscInt, po::$PetscInt )\n\tcone_ = Ref{Ptr{$PetscInt}}()\n\tornt_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexTransformGetConeOriented, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, $PetscInt, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               tr, q, po, cone_, ornt_,\n              )\n\n\tcone = unsafe_wrap(Array, cone_[], VecGetLocalSize(petsclib, x); own = false)\n\tornt = unsafe_wrap(Array, ornt_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn cone,ornt\nend \n\n\"\"\"\n\tcone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexTransformGetCone(petsclib::PetscLibType,tr::DMPlexTransform, q::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetCone\"))\n\"\"\"\nfunction DMPlexTransformGetCone(petsclib::PetscLibType, tr::DMPlexTransform, q::PetscInt) end\n\n@for_petsc function DMPlexTransformGetCone(petsclib::$UnionPetscLib, tr::DMPlexTransform, q::$PetscInt )\n\tcone_ = Ref{Ptr{$PetscInt}}()\n\tornt_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexTransformGetCone, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               tr, q, cone_, ornt_,\n              )\n\n\tcone = unsafe_wrap(Array, cone_[], VecGetLocalSize(petsclib, x); own = false)\n\tornt = unsafe_wrap(Array, ornt_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn cone,ornt\nend \n\n\"\"\"\n\tcone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexTransformRestoreCone(petsclib::PetscLibType,tr::DMPlexTransform, q::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformRestoreCone\"))\n\"\"\"\nfunction DMPlexTransformRestoreCone(petsclib::PetscLibType, tr::DMPlexTransform, q::PetscInt) end\n\n@for_petsc function DMPlexTransformRestoreCone(petsclib::$UnionPetscLib, tr::DMPlexTransform, q::$PetscInt )\n\tcone_ = Ref{Ptr{$PetscInt}}()\n\tornt_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexTransformRestoreCone, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               tr, q, cone_, ornt_,\n              )\n\n\tcone = unsafe_wrap(Array, cone_[], VecGetLocalSize(petsclib, x); own = false)\n\tornt = unsafe_wrap(Array, ornt_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn cone,ornt\nend \n\n\"\"\"\n\tNv::PetscInt,trVerts::Vector{PetscScalar} = DMPlexTransformGetCellVertices(petsclib::PetscLibType,tr::DMPlexTransform, ct::DMPolytopeType) \nGet the set of transformed vertices lying in the closure of a reference cell of given type\n\nInput Parameters:\n- `tr` - The `DMPlexTransform` object\n- `ct` - The cell type\n\nOutput Parameters:\n- `Nv`      - The number of transformed vertices in the closure of the reference cell of given type\n- `trVerts` - The coordinates of these vertices in the reference cell\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexTransformGetSubcellVertices()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetCellVertices\"))\n\"\"\"\nfunction DMPlexTransformGetCellVertices(petsclib::PetscLibType, tr::DMPlexTransform, ct::DMPolytopeType) end\n\n@for_petsc function DMPlexTransformGetCellVertices(petsclib::$UnionPetscLib, tr::DMPlexTransform, ct::DMPolytopeType )\n\tNv_ = Ref{$PetscInt}()\n\ttrVerts_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:DMPlexTransformGetCellVertices, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               tr, ct, Nv_, trVerts_,\n              )\n\n\tNv = Nv_[]\n\ttrVerts = unsafe_wrap(Array, trVerts_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nv,trVerts\nend \n\n\"\"\"\n\tsubVerts::Vector{PetscInt} = DMPlexTransformGetSubcellVertices(petsclib::PetscLibType,tr::DMPlexTransform, ct::DMPolytopeType, rct::DMPolytopeType, r::PetscInt) \nGet the set of transformed vertices defining a subcell in the reference cell of given type\n\nInput Parameters:\n- `tr`  - The `DMPlexTransform` object\n- `ct`  - The cell type\n- `rct` - The subcell type\n- `r`   - The subcell index\n\nOutput Parameter:\n- `subVerts` - The indices of these vertices in the set of vertices returned by `DMPlexTransformGetCellVertices()`\n\nLevel: developer\n\n-seealso: `DMPLEX`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexTransformGetCellVertices()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformGetSubcellVertices\"))\n\"\"\"\nfunction DMPlexTransformGetSubcellVertices(petsclib::PetscLibType, tr::DMPlexTransform, ct::DMPolytopeType, rct::DMPolytopeType, r::PetscInt) end\n\n@for_petsc function DMPlexTransformGetSubcellVertices(petsclib::$UnionPetscLib, tr::DMPlexTransform, ct::DMPolytopeType, rct::DMPolytopeType, r::$PetscInt )\n\tsubVerts_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:DMPlexTransformGetSubcellVertices, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, DMPolytopeType, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               tr, ct, rct, r, subVerts_,\n              )\n\n\tsubVerts = unsafe_wrap(Array, subVerts_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn subVerts\nend \n\n\"\"\"\n\tout::Vector{PetscScalar} = DMPlexTransformMapCoordinates(petsclib::PetscLibType,tr::DMPlexTransform, pct::DMPolytopeType, ct::DMPolytopeType, p::PetscInt, r::PetscInt, Nv::PetscInt, dE::PetscInt, in::Vector{PetscScalar}) \nCalculate new coordinates for produced points\n\nNot collective\n\nInput Parameters:\n- `tr`  - The `DMPlexTransform`\n- `pct` - The cell type of the parent, from whom the new cell is being produced\n- `ct`  - The type being produced\n- `p`   - The original point\n- `r`   - The replica number requested for the produced cell type\n- `Nv`  - Number of vertices in the closure of the parent cell\n- `dE`  - Spatial dimension\n- `in`  - array of size Nv*dE, holding coordinates of the vertices in the closure of the parent cell\n\nOutput Parameter:\n- `out` - The coordinates of the new vertices\n\nLevel: intermediate\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPolytopeType`, `DMPlexTransformApply()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformMapCoordinates\"))\n\"\"\"\nfunction DMPlexTransformMapCoordinates(petsclib::PetscLibType, tr::DMPlexTransform, pct::DMPolytopeType, ct::DMPolytopeType, p::PetscInt, r::PetscInt, Nv::PetscInt, dE::PetscInt, in::Vector{PetscScalar}) end\n\n@for_petsc function DMPlexTransformMapCoordinates(petsclib::$UnionPetscLib, tr::DMPlexTransform, pct::DMPolytopeType, ct::DMPolytopeType, p::$PetscInt, r::$PetscInt, Nv::$PetscInt, dE::$PetscInt, in::Vector{$PetscScalar} )\n\tout = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexTransformMapCoordinates, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, DMPolytopeType, DMPolytopeType, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               tr, pct, ct, p, r, Nv, dE, in, out,\n              )\n\n\n\treturn out\nend \n\n\"\"\"\n\tDMPlexTransformCreateDiscLabels(petsclib::PetscLibType,tr::DMPlexTransform, rdm::PetscDM) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCreateDiscLabels\"))\n\"\"\"\nfunction DMPlexTransformCreateDiscLabels(petsclib::PetscLibType, tr::DMPlexTransform, rdm::PetscDM) end\n\n@for_petsc function DMPlexTransformCreateDiscLabels(petsclib::$UnionPetscLib, tr::DMPlexTransform, rdm::PetscDM )\n\n    @chk ccall(\n               (:DMPlexTransformCreateDiscLabels, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, CDM),\n               tr, rdm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformApply(petsclib::PetscLibType,tr::DMPlexTransform, dm::PetscDM, tdm::PetscDM) \nExecute the transformation, producing another `DM`\n\nCollective\n\nInput Parameters:\n- `tr` - The `DMPlexTransform` object\n- `dm` - The original `DM`\n\nOutput Parameter:\n- `tdm` - The transformed `DM`\n\nLevel: intermediate\n\nOptions Database Keys:\n- `-dm_plex_transform_label_match_strata`      - Only label points of the same stratum as the producing point\n- `-dm_plex_transform_label_replica_inc <num>` - Increment for the label value to be multiplied by the replica number\n- `-dm_plex_transform_active <name>`           - Name for active mesh label\n\n-seealso: [](plex_transform_table), [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexTransform`, `DMPlexTransformCreate()`, `DMPlexTransformSetDM()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformApply\"))\n\"\"\"\nfunction DMPlexTransformApply(petsclib::PetscLibType, tr::DMPlexTransform, dm::PetscDM, tdm::PetscDM) end\n\n@for_petsc function DMPlexTransformApply(petsclib::$UnionPetscLib, tr::DMPlexTransform, dm::PetscDM, tdm::PetscDM )\n\ttdm_ = Ref(tdm.ptr)\n\n    @chk ccall(\n               (:DMPlexTransformApply, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, CDM, Ptr{CDM}),\n               tr, dm, tdm_,\n              )\n\n\ttdm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformAdaptLabel(petsclib::PetscLibType,dm::PetscDM, metric::PetscVec, adaptLabel::DMLabel, rgLabel::DMLabel, rdm::PetscDM) \n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformAdaptLabel\"))\n\"\"\"\nfunction DMPlexTransformAdaptLabel(petsclib::PetscLibType, dm::PetscDM, metric::PetscVec, adaptLabel::DMLabel, rgLabel::DMLabel, rdm::PetscDM) end\n\n@for_petsc function DMPlexTransformAdaptLabel(petsclib::$UnionPetscLib, dm::PetscDM, metric::PetscVec, adaptLabel::DMLabel, rgLabel::DMLabel, rdm::PetscDM )\n\trdm_ = Ref(rdm.ptr)\n\n    @chk ccall(\n               (:DMPlexTransformAdaptLabel, $petsc_library),\n               PetscErrorCode,\n               (CDM, CVec, DMLabel, DMLabel, Ptr{CDM}),\n               dm, metric, adaptLabel, rgLabel, rdm_,\n              )\n\n\trdm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tuseTensor::PetscBool = DMPlexTransformCohesiveExtrudeGetTensor(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the flag to use tensor cells\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `useTensor` - The flag to use tensor cells\n\n-seealso: `DMPlexTransform`, `DMPlexTransformCohesiveExtrudeSetTensor()`, `DMPlexTransformExtrudeGetTensor()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCohesiveExtrudeGetTensor\"))\n\"\"\"\nfunction DMPlexTransformCohesiveExtrudeGetTensor(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformCohesiveExtrudeGetTensor(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tuseTensor_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexTransformCohesiveExtrudeGetTensor, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{PetscBool}),\n               tr, useTensor_,\n              )\n\n\tuseTensor = useTensor_[]\n\n\treturn useTensor\nend \n\n\"\"\"\n\tDMPlexTransformCohesiveExtrudeSetTensor(petsclib::PetscLibType,tr::DMPlexTransform, useTensor::PetscBool) \nSet the flag to use tensor cells\n\nNot Collective\n\nInput Parameters:\n- `tr`        - The `DMPlexTransform`\n- `useTensor` - The flag for tensor cells\n\n-seealso: `DMPlexTransform`, `DMPlexTransformCohesiveExtrudeGetTensor()`, `DMPlexTransformExtrudeSetTensor()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCohesiveExtrudeSetTensor\"))\n\"\"\"\nfunction DMPlexTransformCohesiveExtrudeSetTensor(petsclib::PetscLibType, tr::DMPlexTransform, useTensor::PetscBool) end\n\n@for_petsc function DMPlexTransformCohesiveExtrudeSetTensor(petsclib::$UnionPetscLib, tr::DMPlexTransform, useTensor::PetscBool )\n\n    @chk ccall(\n               (:DMPlexTransformCohesiveExtrudeSetTensor, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, PetscBool),\n               tr, useTensor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\twidth::PetscReal = DMPlexTransformCohesiveExtrudeGetWidth(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the width of extruded cells\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `width` - The width of extruded cells, or 0.\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformCohesiveExtrudeSetWidth()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCohesiveExtrudeGetWidth\"))\n\"\"\"\nfunction DMPlexTransformCohesiveExtrudeGetWidth(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformCohesiveExtrudeGetWidth(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\twidth_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexTransformCohesiveExtrudeGetWidth, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{$PetscReal}),\n               tr, width_,\n              )\n\n\twidth = width_[]\n\n\treturn width\nend \n\n\"\"\"\n\tDMPlexTransformCohesiveExtrudeSetWidth(petsclib::PetscLibType,tr::DMPlexTransform, width::PetscReal) \nSet the width of extruded cells\n\nNot Collective\n\nInput Parameters:\n- `tr`    - The `DMPlexTransform`\n- `width` - The width of the extruded cells, or 0.\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformCohesiveExtrudeGetWidth()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCohesiveExtrudeSetWidth\"))\n\"\"\"\nfunction DMPlexTransformCohesiveExtrudeSetWidth(petsclib::PetscLibType, tr::DMPlexTransform, width::PetscReal) end\n\n@for_petsc function DMPlexTransformCohesiveExtrudeSetWidth(petsclib::$UnionPetscLib, tr::DMPlexTransform, width::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexTransformCohesiveExtrudeSetWidth, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscReal),\n               tr, width,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformCohesiveExtrudeGetUnsplit(petsclib::PetscLibType,tr::DMPlexTransform, unsplit::DMLabel) \nGet a new label marking the unsplit points in the transformed mesh\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `unsplit` - A new `DMLabel` marking the unsplit points in the transformed mesh\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformGetTransformTypes()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformCohesiveExtrudeGetUnsplit\"))\n\"\"\"\nfunction DMPlexTransformCohesiveExtrudeGetUnsplit(petsclib::PetscLibType, tr::DMPlexTransform, unsplit::DMLabel) end\n\n@for_petsc function DMPlexTransformCohesiveExtrudeGetUnsplit(petsclib::$UnionPetscLib, tr::DMPlexTransform, unsplit::DMLabel )\n\n    @chk ccall(\n               (:DMPlexTransformCohesiveExtrudeGetUnsplit, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{DMLabel}),\n               tr, unsplit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlayers::PetscInt = DMPlexTransformExtrudeGetLayers(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the number of extruded layers.\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `layers` - The number of layers\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeSetLayers()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeGetLayers\"))\n\"\"\"\nfunction DMPlexTransformExtrudeGetLayers(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformExtrudeGetLayers(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tlayers_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeGetLayers, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{$PetscInt}),\n               tr, layers_,\n              )\n\n\tlayers = layers_[]\n\n\treturn layers\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetLayers(petsclib::PetscLibType,tr::DMPlexTransform, layers::PetscInt) \nSet the number of extruded layers.\n\nNot Collective\n\nInput Parameters:\n- `tr`     - The `DMPlexTransform`\n- `layers` - The number of layers\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeGetLayers()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetLayers\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetLayers(petsclib::PetscLibType, tr::DMPlexTransform, layers::PetscInt) end\n\n@for_petsc function DMPlexTransformExtrudeSetLayers(petsclib::$UnionPetscLib, tr::DMPlexTransform, layers::$PetscInt )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetLayers, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt),\n               tr, layers,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tthickness::PetscReal = DMPlexTransformExtrudeGetThickness(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the total thickness of the layers\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `thickness` - The total thickness of the layers\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeSetThickness()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeGetThickness\"))\n\"\"\"\nfunction DMPlexTransformExtrudeGetThickness(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformExtrudeGetThickness(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tthickness_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeGetThickness, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{$PetscReal}),\n               tr, thickness_,\n              )\n\n\tthickness = thickness_[]\n\n\treturn thickness\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetThickness(petsclib::PetscLibType,tr::DMPlexTransform, thickness::PetscReal) \nSet the total thickness of the layers\n\nNot Collective\n\nInput Parameters:\n- `tr`        - The `DMPlexTransform`\n- `thickness` - The total thickness of the layers\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeGetThickness()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetThickness\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetThickness(petsclib::PetscLibType, tr::DMPlexTransform, thickness::PetscReal) end\n\n@for_petsc function DMPlexTransformExtrudeSetThickness(petsclib::$UnionPetscLib, tr::DMPlexTransform, thickness::$PetscReal )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetThickness, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscReal),\n               tr, thickness,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuseTensor::PetscBool = DMPlexTransformExtrudeGetTensor(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the flag to use tensor cells\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `useTensor` - The flag to use tensor cells\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeSetTensor()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeGetTensor\"))\n\"\"\"\nfunction DMPlexTransformExtrudeGetTensor(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformExtrudeGetTensor(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tuseTensor_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeGetTensor, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{PetscBool}),\n               tr, useTensor_,\n              )\n\n\tuseTensor = useTensor_[]\n\n\treturn useTensor\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetTensor(petsclib::PetscLibType,tr::DMPlexTransform, useTensor::PetscBool) \nSet the flag to use tensor cells\n\nNot Collective\n\nInput Parameters:\n- `tr`        - The `DMPlexTransform`\n- `useTensor` - The flag for tensor cells\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeGetTensor()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetTensor\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetTensor(petsclib::PetscLibType, tr::DMPlexTransform, useTensor::PetscBool) end\n\n@for_petsc function DMPlexTransformExtrudeSetTensor(petsclib::$UnionPetscLib, tr::DMPlexTransform, useTensor::PetscBool )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetTensor, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, PetscBool),\n               tr, useTensor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsymmetric::PetscBool = DMPlexTransformExtrudeGetSymmetric(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the flag to extrude symmetrically from the initial surface\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `symmetric` - The flag to extrude symmetrically\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeSetSymmetric()`, `DMPlexTransformExtrudeGetPeriodic()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeGetSymmetric\"))\n\"\"\"\nfunction DMPlexTransformExtrudeGetSymmetric(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformExtrudeGetSymmetric(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tsymmetric_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeGetSymmetric, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{PetscBool}),\n               tr, symmetric_,\n              )\n\n\tsymmetric = symmetric_[]\n\n\treturn symmetric\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetSymmetric(petsclib::PetscLibType,tr::DMPlexTransform, symmetric::PetscBool) \nSet the flag to extrude symmetrically from the initial surface\n\nNot Collective\n\nInput Parameters:\n- `tr`        - The `DMPlexTransform`\n- `symmetric` - The flag to extrude symmetrically\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeGetSymmetric()`, `DMPlexTransformExtrudeSetPeriodic()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetSymmetric\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetSymmetric(petsclib::PetscLibType, tr::DMPlexTransform, symmetric::PetscBool) end\n\n@for_petsc function DMPlexTransformExtrudeSetSymmetric(petsclib::$UnionPetscLib, tr::DMPlexTransform, symmetric::PetscBool )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetSymmetric, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, PetscBool),\n               tr, symmetric,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tperiodic::PetscBool = DMPlexTransformExtrudeGetPeriodic(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the flag to extrude periodically from the initial surface\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `periodic` - The flag to extrude periodically\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeSetPeriodic()`, `DMPlexTransformExtrudeGetSymmetric()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeGetPeriodic\"))\n\"\"\"\nfunction DMPlexTransformExtrudeGetPeriodic(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformExtrudeGetPeriodic(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tperiodic_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeGetPeriodic, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{PetscBool}),\n               tr, periodic_,\n              )\n\n\tperiodic = periodic_[]\n\n\treturn periodic\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetPeriodic(petsclib::PetscLibType,tr::DMPlexTransform, periodic::PetscBool) \nSet the flag to extrude periodically from the initial surface\n\nNot Collective\n\nInput Parameters:\n- `tr`       - The `DMPlexTransform`\n- `periodic` - The flag to extrude periodically\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeGetPeriodic()`, `DMPlexTransformExtrudeSetSymmetric()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetPeriodic\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetPeriodic(petsclib::PetscLibType, tr::DMPlexTransform, periodic::PetscBool) end\n\n@for_petsc function DMPlexTransformExtrudeSetPeriodic(petsclib::$UnionPetscLib, tr::DMPlexTransform, periodic::PetscBool )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetPeriodic, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, PetscBool),\n               tr, periodic,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnormal::Vector{PetscReal} = DMPlexTransformExtrudeGetNormal(petsclib::PetscLibType,tr::DMPlexTransform) \nGet the extrusion normal vector\n\nNot Collective\n\nInput Parameter:\n- `tr` - The `DMPlexTransform`\n\nOutput Parameter:\n- `normal` - The extrusion direction\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeSetNormal()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeGetNormal\"))\n\"\"\"\nfunction DMPlexTransformExtrudeGetNormal(petsclib::PetscLibType, tr::DMPlexTransform) end\n\n@for_petsc function DMPlexTransformExtrudeGetNormal(petsclib::$UnionPetscLib, tr::DMPlexTransform )\n\tnormal = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeGetNormal, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{$PetscReal}),\n               tr, normal,\n              )\n\n\n\treturn normal\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetNormal(petsclib::PetscLibType,tr::DMPlexTransform, normal::Vector{PetscReal}) \nSet the extrusion normal\n\nNot Collective\n\nInput Parameters:\n- `tr`     - The `DMPlexTransform`\n- `normal` - The extrusion direction\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeGetNormal()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetNormal\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetNormal(petsclib::PetscLibType, tr::DMPlexTransform, normal::Vector{PetscReal}) end\n\n@for_petsc function DMPlexTransformExtrudeSetNormal(petsclib::$UnionPetscLib, tr::DMPlexTransform, normal::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetNormal, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{$PetscReal}),\n               tr, normal,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetNormalFunction(petsclib::PetscLibType,tr::DMPlexTransform, normalFunc::PetscSimplePoCintFn) \nSet a function to determine the extrusion normal\n\nNot Collective\n\nInput Parameters:\n- `tr`         - The `DMPlexTransform`\n- `normalFunc` - A function determining the extrusion direction, see `PetscSimplePointFn` for the calling sequence\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeGetNormal()`, `PetscSimplePointFn`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetNormalFunction\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetNormalFunction(petsclib::PetscLibType, tr::DMPlexTransform, normalFunc::PetscSimplePoCintFn) end\n\n@for_petsc function DMPlexTransformExtrudeSetNormalFunction(petsclib::$UnionPetscLib, tr::DMPlexTransform, normalFunc::PetscSimplePoCintFn )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetNormalFunction, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, Ptr{PetscSimplePoCintFn}),\n               tr, normalFunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMPlexTransformExtrudeSetThicknesses(petsclib::PetscLibType,tr::DMPlexTransform, Nth::PetscInt, thicknesses::Vector{PetscReal}) \nSet the thickness of each layer\n\nNot Collective\n\nInput Parameters:\n- `tr`          - The `DMPlexTransform`\n- `Nth`         - The number of thicknesses\n- `thicknesses` - The array of thicknesses\n\nLevel: intermediate\n\n-seealso: `DMPlexTransform`, `DMPlexTransformExtrudeSetThickness()`, `DMPlexTransformExtrudeGetThickness()`\n\n# External Links\n$(_doc_external(\"DM/DMPlexTransformExtrudeSetThicknesses\"))\n\"\"\"\nfunction DMPlexTransformExtrudeSetThicknesses(petsclib::PetscLibType, tr::DMPlexTransform, Nth::PetscInt, thicknesses::Vector{PetscReal}) end\n\n@for_petsc function DMPlexTransformExtrudeSetThicknesses(petsclib::$UnionPetscLib, tr::DMPlexTransform, Nth::$PetscInt, thicknesses::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:DMPlexTransformExtrudeSetThicknesses, $petsc_library),\n               PetscErrorCode,\n               (DMPlexTransform, $PetscInt, Ptr{$PetscReal}),\n               tr, Nth, thicknesses,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmonitorptr::DMNetworkMonitor = DMNetworkMonitorCreate(petsclib::PetscLibType,network::PetscDM) \nCreates a network monitor context\n\nCollective\n\nInput Parameter:\n- `network` - network to monitor\n\nOutput Parameter:\n- `monitorptr` - the `DMNetworkMonitor` object\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkMonitor`, `DMNetworkMonitorDestroy()`, `DMNetworkMonitorAdd()`\n\n# External Links\n$(_doc_external(\"DM/DMNetworkMonitorCreate\"))\n\"\"\"\nfunction DMNetworkMonitorCreate(petsclib::PetscLibType, network::PetscDM) end\n\n@for_petsc function DMNetworkMonitorCreate(petsclib::$UnionPetscLib, network::PetscDM )\n\tmonitorptr_ = Ref{DMNetworkMonitor}()\n\n    @chk ccall(\n               (:DMNetworkMonitorCreate, $petsc_library),\n               PetscErrorCode,\n               (CDM, Ptr{DMNetworkMonitor}),\n               network, monitorptr_,\n              )\n\n\tmonitorptr = monitorptr_[]\n\n\treturn monitorptr\nend \n\n\"\"\"\n\tDMNetworkMonitorDestroy(petsclib::PetscLibType,monitor::DMNetworkMonitor) \nDestroys a network monitor and all associated viewers\n\nCollective\n\nInput Parameter:\n- `monitor` - monitor to destroy\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkMonitor`, `DMNetworkMonitorCreate()`, `DMNetworkMonitorAdd()`\n\n# External Links\n$(_doc_external(\"DM/DMNetworkMonitorDestroy\"))\n\"\"\"\nfunction DMNetworkMonitorDestroy(petsclib::PetscLibType, monitor::DMNetworkMonitor) end\n\n@for_petsc function DMNetworkMonitorDestroy(petsclib::$UnionPetscLib, monitor::DMNetworkMonitor )\n\n    @chk ccall(\n               (:DMNetworkMonitorDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMNetworkMonitor},),\n               monitor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMNetworkMonitorPop(petsclib::PetscLibType,monitor::DMNetworkMonitor) \nRemoves the most recently added viewer to a `DMNetworkMonitor`\n\nCollective\n\nInput Parameter:\n- `monitor` - the monitor\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkMonitor`, `DMNetworkMonitorCreate()`, `DMNetworkMonitorDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMNetworkMonitorPop\"))\n\"\"\"\nfunction DMNetworkMonitorPop(petsclib::PetscLibType, monitor::DMNetworkMonitor) end\n\n@for_petsc function DMNetworkMonitorPop(petsclib::$UnionPetscLib, monitor::DMNetworkMonitor )\n\n    @chk ccall(\n               (:DMNetworkMonitorPop, $petsc_library),\n               PetscErrorCode,\n               (DMNetworkMonitor,),\n               monitor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMNetworkMonitorAdd(petsclib::PetscLibType,monitor::DMNetworkMonitor, name::String, element::PetscInt, nodes::PetscInt, start::PetscInt, blocksize::PetscInt, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, hold::PetscBool) \nAdds a new viewer to a `DMNetworkMonitor`\n\nCollective\n\nInput Parameters:\n- `monitor`   - the monitor\n- `name`      - name of viewer\n- `element`   - vertex / edge number\n- `nodes`     - number of nodes\n- `start`     - variable starting offset\n- `blocksize` - variable blocksize\n- `xmin`      - xmin (or `PETSC_DECIDE`) for viewer\n- `xmax`      - xmax (or `PETSC_DECIDE`) for viewer\n- `ymin`      - ymin for viewer\n- `ymax`      - ymax for viewer\n- `hold`      - determines if plot limits should be held\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkMonitor`, `DMNetworkMonitorCreate()`, `DMNetworkMonitorDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMNetworkMonitorAdd\"))\n\"\"\"\nfunction DMNetworkMonitorAdd(petsclib::PetscLibType, monitor::DMNetworkMonitor, name::String, element::PetscInt, nodes::PetscInt, start::PetscInt, blocksize::PetscInt, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, hold::PetscBool) end\n\n@for_petsc function DMNetworkMonitorAdd(petsclib::$UnionPetscLib, monitor::DMNetworkMonitor, name::String, element::$PetscInt, nodes::$PetscInt, start::$PetscInt, blocksize::$PetscInt, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal, hold::PetscBool )\n\n    @chk ccall(\n               (:DMNetworkMonitorAdd, $petsc_library),\n               PetscErrorCode,\n               (DMNetworkMonitor, Ptr{Cchar}, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscReal, $PetscReal, $PetscReal, $PetscReal, PetscBool),\n               monitor, name, element, nodes, start, blocksize, xmin, xmax, ymin, ymax, hold,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMNetworkMonitorView(petsclib::PetscLibType,monitor::DMNetworkMonitor, x::PetscVec) \nA `DMNETWORK` specific monitor function for `TSMonitorSet()`\n\nCollective, No Fortran support\n\nInput Parameters:\n- `monitor` - `DMNetworkMonitor` object\n- `x`       - `TS` solution vector\n\nLevel: intermediate\n\n-seealso: `DM`, `DMNETWORK`, `DMNetworkMonitor`, `DMNetworkMonitorCreate()`, `DMNetworkMonitorDestroy()`, `DMNetworkMonitorAdd()`\n\n# External Links\n$(_doc_external(\"DM/DMNetworkMonitorView\"))\n\"\"\"\nfunction DMNetworkMonitorView(petsclib::PetscLibType, monitor::DMNetworkMonitor, x::PetscVec) end\n\n@for_petsc function DMNetworkMonitorView(petsclib::$UnionPetscLib, monitor::DMNetworkMonitor, x::PetscVec )\n\n    @chk ccall(\n               (:DMNetworkMonitorView, $petsc_library),\n               PetscErrorCode,\n               (DMNetworkMonitor, CVec),\n               monitor, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlabel::DMLabel = DMLabelCreate(petsclib::PetscLibType,comm::MPI_Comm, name::String) \nCreate a `DMLabel` object, which is a multimap\n\nCollective\n\nInput Parameters:\n- `comm` - The communicator, usually `PETSC_COMM_SELF`\n- `name` - The label name\n\nOutput Parameter:\n- `label` - The `DMLabel`\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelCreate\"))\n\"\"\"\nfunction DMLabelCreate(petsclib::PetscLibType, comm::MPI_Comm, name::String) end\n\n@for_petsc function DMLabelCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String )\n\tlabel_ = Ref{DMLabel}()\n\n    @chk ccall(\n               (:DMLabelCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{DMLabel}),\n               comm, name, label_,\n              )\n\n\tlabel = label_[]\n\n\treturn label\nend \n\n\"\"\"\n\tDMLabelSetUp(petsclib::PetscLibType,label::DMLabel) \nSetUp a `DMLabel` object\n\nCollective\n\nInput Parameters:\n- `label` - The `DMLabel`\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelSetUp\"))\n\"\"\"\nfunction DMLabelSetUp(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelSetUp(petsclib::$UnionPetscLib, label::DMLabel )\n\n    @chk ccall(\n               (:DMLabelSetUp, $petsc_library),\n               PetscErrorCode,\n               (DMLabel,),\n               label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelAddStratum(petsclib::PetscLibType,label::DMLabel, value::PetscInt) \nAdds a new stratum value in a `DMLabel`\n\nInput Parameters:\n- `label` - The `DMLabel`\n- `value` - The stratum value\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelAddStratum\"))\n\"\"\"\nfunction DMLabelAddStratum(petsclib::PetscLibType, label::DMLabel, value::PetscInt) end\n\n@for_petsc function DMLabelAddStratum(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelAddStratum, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt),\n               label, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelAddStrata(petsclib::PetscLibType,label::DMLabel, numStrata::PetscInt, stratumValues::Vector{PetscInt}) \nAdds new stratum values in a `DMLabel`\n\nNot Collective\n\nInput Parameters:\n- `label`         - The `DMLabel`\n- `numStrata`     - The number of stratum values\n- `stratumValues` - The stratum values\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelAddStrata\"))\n\"\"\"\nfunction DMLabelAddStrata(petsclib::PetscLibType, label::DMLabel, numStrata::PetscInt, stratumValues::Vector{PetscInt}) end\n\n@for_petsc function DMLabelAddStrata(petsclib::$UnionPetscLib, label::DMLabel, numStrata::$PetscInt, stratumValues::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:DMLabelAddStrata, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{$PetscInt}),\n               label, numStrata, stratumValues,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelAddStrataIS(petsclib::PetscLibType,label::DMLabel, valueIS::IS) \nAdds new stratum values in a `DMLabel`\n\nNot Collective\n\nInput Parameters:\n- `label`   - The `DMLabel`\n- `valueIS` - Index set with stratum values\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelAddStrataIS\"))\n\"\"\"\nfunction DMLabelAddStrataIS(petsclib::PetscLibType, label::DMLabel, valueIS::IS) end\n\n@for_petsc function DMLabelAddStrataIS(petsclib::$UnionPetscLib, label::DMLabel, valueIS::IS )\n\n    @chk ccall(\n               (:DMLabelAddStrataIS, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, CIS),\n               label, valueIS,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelView(petsclib::PetscLibType,label::DMLabel, viewer::PetscViewer) \nView the label\n\nCollective\n\nInput Parameters:\n- `label`  - The `DMLabel`\n- `viewer` - The `PetscViewer`\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `PetscViewer`, `DM`, `DMLabelCreate()`, `DMLabelDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelView\"))\n\"\"\"\nfunction DMLabelView(petsclib::PetscLibType, label::DMLabel, viewer::PetscViewer) end\n\n@for_petsc function DMLabelView(petsclib::$UnionPetscLib, label::DMLabel, viewer::PetscViewer )\n\n    @chk ccall(\n               (:DMLabelView, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, PetscViewer),\n               label, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelReset(petsclib::PetscLibType,label::DMLabel) \nDestroys internal data structures in a `DMLabel`\n\nNot Collective\n\nInput Parameter:\n- `label` - The `DMLabel`\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelDestroy()`, `DMLabelCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelReset\"))\n\"\"\"\nfunction DMLabelReset(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelReset(petsclib::$UnionPetscLib, label::DMLabel )\n\n    @chk ccall(\n               (:DMLabelReset, $petsc_library),\n               PetscErrorCode,\n               (DMLabel,),\n               label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelDestroy(petsclib::PetscLibType,label::DMLabel) \nDestroys a `DMLabel`\n\nCollective\n\nInput Parameter:\n- `label` - The `DMLabel`\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelReset()`, `DMLabelCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelDestroy\"))\n\"\"\"\nfunction DMLabelDestroy(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelDestroy(petsclib::$UnionPetscLib, label::DMLabel )\n\n    @chk ccall(\n               (:DMLabelDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{DMLabel},),\n               label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlabelnew::DMLabel = DMLabelDuplicate(petsclib::PetscLibType,label::DMLabel) \nDuplicates a `DMLabel`\n\nCollective\n\nInput Parameter:\n- `label` - The `DMLabel`\n\nOutput Parameter:\n- `labelnew` - new label\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelDuplicate\"))\n\"\"\"\nfunction DMLabelDuplicate(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelDuplicate(petsclib::$UnionPetscLib, label::DMLabel )\n\tlabelnew_ = Ref{DMLabel}()\n\n    @chk ccall(\n               (:DMLabelDuplicate, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{DMLabel}),\n               label, labelnew_,\n              )\n\n\tlabelnew = labelnew_[]\n\n\treturn labelnew\nend \n\n\"\"\"\n\tequal::PetscBool = DMLabelCompare(petsclib::PetscLibType,comm::MPI_Comm, l0::DMLabel, l1::DMLabel, message::Cchar) \nCompare two `DMLabel` objects\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `comm` - Comm over which to compare labels\n- `l0`   - First `DMLabel`\n- `l1`   - Second `DMLabel`\n\nOutput Parameters:\n- `equal`   - (Optional) Flag whether the two labels are equal\n- `message` - (Optional) Message describing the difference\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMCompareLabels()`, `DMLabelGetNumValues()`, `DMLabelGetDefaultValue()`, `DMLabelGetNonEmptyStratumValuesIS()`, `DMLabelGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelCompare\"))\n\"\"\"\nfunction DMLabelCompare(petsclib::PetscLibType, comm::MPI_Comm, l0::DMLabel, l1::DMLabel, message::Cchar) end\n\n@for_petsc function DMLabelCompare(petsclib::$UnionPetscLib, comm::MPI_Comm, l0::DMLabel, l1::DMLabel, message::Cchar )\n\tequal_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMLabelCompare, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMLabel, DMLabel, Ptr{PetscBool}, Cchar),\n               comm, l0, l1, equal_, message,\n              )\n\n\tequal = equal_[]\n\n\treturn equal\nend \n\n\"\"\"\n\tDMLabelComputeIndex(petsclib::PetscLibType,label::DMLabel) \nCreate an index structure for membership determination, automatically determining the bounds\n\nNot Collective\n\nInput Parameter:\n- `label` - The `DMLabel`\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelHasPoint()`, `DMLabelCreateIndex()`, `DMLabelDestroyIndex()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelComputeIndex\"))\n\"\"\"\nfunction DMLabelComputeIndex(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelComputeIndex(petsclib::$UnionPetscLib, label::DMLabel )\n\n    @chk ccall(\n               (:DMLabelComputeIndex, $petsc_library),\n               PetscErrorCode,\n               (DMLabel,),\n               label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelCreateIndex(petsclib::PetscLibType,label::DMLabel, pStart::PetscInt, pEnd::PetscInt) \nCreate an index structure for membership determination\n\nNot Collective\n\nInput Parameters:\n- `label`  - The `DMLabel`\n- `pStart` - The smallest point\n- `pEnd`   - The largest point + 1\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelHasPoint()`, `DMLabelComputeIndex()`, `DMLabelDestroyIndex()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelCreateIndex\"))\n\"\"\"\nfunction DMLabelCreateIndex(petsclib::PetscLibType, label::DMLabel, pStart::PetscInt, pEnd::PetscInt) end\n\n@for_petsc function DMLabelCreateIndex(petsclib::$UnionPetscLib, label::DMLabel, pStart::$PetscInt, pEnd::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelCreateIndex, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, $PetscInt),\n               label, pStart, pEnd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelDestroyIndex(petsclib::PetscLibType,label::DMLabel) \nDestroy the index structure\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelHasPoint()`, `DMLabelCreateIndex()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelDestroyIndex\"))\n\"\"\"\nfunction DMLabelDestroyIndex(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelDestroyIndex(petsclib::$UnionPetscLib, label::DMLabel )\n\n    @chk ccall(\n               (:DMLabelDestroyIndex, $petsc_library),\n               PetscErrorCode,\n               (DMLabel,),\n               label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt = DMLabelGetBounds(petsclib::PetscLibType,label::DMLabel) \nReturn the smallest and largest point in the label\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameters:\n- `pStart` - The smallest point\n- `pEnd`   - The largest point + 1\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelHasPoint()`, `DMLabelCreateIndex()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetBounds\"))\n\"\"\"\nfunction DMLabelGetBounds(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelGetBounds(petsclib::$UnionPetscLib, label::DMLabel )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetBounds, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               label, pStart_, pEnd_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\n\treturn pStart,pEnd\nend \n\n\"\"\"\n\tcontains::PetscBool = DMLabelHasValue(petsclib::PetscLibType,label::DMLabel, value::PetscInt) \nDetermine whether a label assigns the value to any point\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the value\n\nOutput Parameter:\n- `contains` - Flag indicating whether the label maps this value to any point\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `DMLabelHasPoint()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelHasValue\"))\n\"\"\"\nfunction DMLabelHasValue(petsclib::PetscLibType, label::DMLabel, value::PetscInt) end\n\n@for_petsc function DMLabelHasValue(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt )\n\tcontains_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMLabelHasValue, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{PetscBool}),\n               label, value, contains_,\n              )\n\n\tcontains = contains_[]\n\n\treturn contains\nend \n\n\"\"\"\n\tcontains::PetscBool = DMLabelHasPoint(petsclib::PetscLibType,label::DMLabel, point::PetscInt) \nDetermine whether a label assigns a value to a point\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `point` - the point\n\nOutput Parameter:\n- `contains` - Flag indicating whether the label maps this point to a value\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreateIndex()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelHasPoint\"))\n\"\"\"\nfunction DMLabelHasPoint(petsclib::PetscLibType, label::DMLabel, point::PetscInt) end\n\n@for_petsc function DMLabelHasPoint(petsclib::$UnionPetscLib, label::DMLabel, point::$PetscInt )\n\tcontains_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMLabelHasPoint, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{PetscBool}),\n               label, point, contains_,\n              )\n\n\tcontains = contains_[]\n\n\treturn contains\nend \n\n\"\"\"\n\tcontains::PetscBool = DMLabelStratumHasPoint(petsclib::PetscLibType,label::DMLabel, value::PetscInt, point::PetscInt) \nReturn true if the stratum contains a point\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the stratum value\n- `point` - the point\n\nOutput Parameter:\n- `contains` - true if the stratum contains the point\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelStratumHasPoint\"))\n\"\"\"\nfunction DMLabelStratumHasPoint(petsclib::PetscLibType, label::DMLabel, value::PetscInt, point::PetscInt) end\n\n@for_petsc function DMLabelStratumHasPoint(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt, point::$PetscInt )\n\tcontains_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMLabelStratumHasPoint, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, $PetscInt, Ptr{PetscBool}),\n               label, value, point, contains_,\n              )\n\n\tcontains = contains_[]\n\n\treturn contains\nend \n\n\"\"\"\n\tdefaultValue::PetscInt = DMLabelGetDefaultValue(petsclib::PetscLibType,label::DMLabel) \nGet the default value returned by `DMLabelGetValue()` if a point has not been explicitly given a value.\nWhen a label is created, it is initialized to -1.\n\nNot Collective\n\nInput Parameter:\n- `label` - a `DMLabel` object\n\nOutput Parameter:\n- `defaultValue` - the default value\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelSetDefaultValue()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetDefaultValue\"))\n\"\"\"\nfunction DMLabelGetDefaultValue(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelGetDefaultValue(petsclib::$UnionPetscLib, label::DMLabel )\n\tdefaultValue_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetDefaultValue, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{$PetscInt}),\n               label, defaultValue_,\n              )\n\n\tdefaultValue = defaultValue_[]\n\n\treturn defaultValue\nend \n\n\"\"\"\n\tdefaultValue::PetscInt = DMLabelSetDefaultValue(petsclib::PetscLibType,label::DMLabel) \nSet the default value returned by `DMLabelGetValue()` if a point has not been explicitly given a value.\nWhen a label is created, it is initialized to -1.\n\nNot Collective\n\nInput Parameter:\n- `label` - a `DMLabel` object\n\nOutput Parameter:\n- `defaultValue` - the default value\n\nLevel: beginner\n\n-seealso: `DMLabel`, `DM`, `DMLabelGetDefaultValue()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelSetDefaultValue\"))\n\"\"\"\nfunction DMLabelSetDefaultValue(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelSetDefaultValue(petsclib::$UnionPetscLib, label::DMLabel )\n\tdefaultValue_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelSetDefaultValue, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt),\n               label, defaultValue_,\n              )\n\n\tdefaultValue = defaultValue_[]\n\n\treturn defaultValue\nend \n\n\"\"\"\n\tvalue::PetscInt = DMLabelGetValue(petsclib::PetscLibType,label::DMLabel, point::PetscInt) \nReturn the value a label assigns to a point, or the label's default value (which is initially\n`DMLabelSetDefaultValue()`)\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `point` - the point\n\nOutput Parameter:\n- `value` - The point value, or the default value (-1 by default)\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelSetValue()`, `DMLabelClearValue()`, `DMLabelGetDefaultValue()`, `DMLabelSetDefaultValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetValue\"))\n\"\"\"\nfunction DMLabelGetValue(petsclib::PetscLibType, label::DMLabel, point::PetscInt) end\n\n@for_petsc function DMLabelGetValue(petsclib::$UnionPetscLib, label::DMLabel, point::$PetscInt )\n\tvalue_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetValue, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{$PetscInt}),\n               label, point, value_,\n              )\n\n\tvalue = value_[]\n\n\treturn value\nend \n\n\"\"\"\n\tDMLabelSetValue(petsclib::PetscLibType,label::DMLabel, point::PetscInt, value::PetscInt) \nSet the value a label assigns to a point.  If the value is the same as the label's default value (which is initially\nbe changed with `DMLabelSetDefaultValue()` to something different), then this function will do nothing.\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `point` - the point\n- `value` - The point value\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelClearValue()`, `DMLabelGetDefaultValue()`, `DMLabelSetDefaultValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelSetValue\"))\n\"\"\"\nfunction DMLabelSetValue(petsclib::PetscLibType, label::DMLabel, point::PetscInt, value::PetscInt) end\n\n@for_petsc function DMLabelSetValue(petsclib::$UnionPetscLib, label::DMLabel, point::$PetscInt, value::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelSetValue, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, $PetscInt),\n               label, point, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelClearValue(petsclib::PetscLibType,label::DMLabel, point::PetscInt, value::PetscInt) \nClear the value a label assigns to a point\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `point` - the point\n- `value` - The point value\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelClearValue\"))\n\"\"\"\nfunction DMLabelClearValue(petsclib::PetscLibType, label::DMLabel, point::PetscInt, value::PetscInt) end\n\n@for_petsc function DMLabelClearValue(petsclib::$UnionPetscLib, label::DMLabel, point::$PetscInt, value::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelClearValue, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, $PetscInt),\n               label, point, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelInsertIS(petsclib::PetscLibType,label::DMLabel, is::IS, value::PetscInt) \nSet all points in the `IS` to a value\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `is`    - the point `IS`\n- `value` - The point value\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelInsertIS\"))\n\"\"\"\nfunction DMLabelInsertIS(petsclib::PetscLibType, label::DMLabel, is::IS, value::PetscInt) end\n\n@for_petsc function DMLabelInsertIS(petsclib::$UnionPetscLib, label::DMLabel, is::IS, value::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelInsertIS, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, CIS, $PetscInt),\n               label, is, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumValues::PetscInt = DMLabelGetNumValues(petsclib::PetscLibType,label::DMLabel) \nGet the number of values that the `DMLabel` takes\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameter:\n- `numValues` - the number of values\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetNumValues\"))\n\"\"\"\nfunction DMLabelGetNumValues(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelGetNumValues(petsclib::$UnionPetscLib, label::DMLabel )\n\tnumValues_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetNumValues, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{$PetscInt}),\n               label, numValues_,\n              )\n\n\tnumValues = numValues_[]\n\n\treturn numValues\nend \n\n\"\"\"\n\tDMLabelGetValueIS(petsclib::PetscLibType,label::DMLabel, values::IS) \nGet an `IS` of all values that the `DMlabel` takes\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameter:\n- `values` - the value `IS`\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelGetNonEmptyStratumValuesIS()`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetValueIS\"))\n\"\"\"\nfunction DMLabelGetValueIS(petsclib::PetscLibType, label::DMLabel, values::IS) end\n\n@for_petsc function DMLabelGetValueIS(petsclib::$UnionPetscLib, label::DMLabel, values::IS )\n\tvalues_ = Ref(values.ptr)\n\n    @chk ccall(\n               (:DMLabelGetValueIS, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{CIS}),\n               label, values_,\n              )\n\n\tvalues.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tminValue::PetscInt,maxValue::PetscInt = DMLabelGetValueBounds(petsclib::PetscLibType,label::DMLabel) \nReturn the smallest and largest value in the label\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameters:\n- `minValue` - The smallest value\n- `maxValue` - The largest value\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelGetBounds()`, `DMLabelGetValue()`, `DMLabelSetValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetValueBounds\"))\n\"\"\"\nfunction DMLabelGetValueBounds(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelGetValueBounds(petsclib::$UnionPetscLib, label::DMLabel )\n\tminValue_ = Ref{$PetscInt}()\n\tmaxValue_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetValueBounds, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               label, minValue_, maxValue_,\n              )\n\n\tminValue = minValue_[]\n\tmaxValue = maxValue_[]\n\n\treturn minValue,maxValue\nend \n\n\"\"\"\n\tDMLabelGetNonEmptyStratumValuesIS(petsclib::PetscLibType,label::DMLabel, values::IS) \nGet an `IS` of all values that the `DMlabel` takes\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameter:\n- `values` - the value `IS`\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelGetValueIS()`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetNonEmptyStratumValuesIS\"))\n\"\"\"\nfunction DMLabelGetNonEmptyStratumValuesIS(petsclib::PetscLibType, label::DMLabel, values::IS) end\n\n@for_petsc function DMLabelGetNonEmptyStratumValuesIS(petsclib::$UnionPetscLib, label::DMLabel, values::IS )\n\tvalues_ = Ref(values.ptr)\n\n    @chk ccall(\n               (:DMLabelGetNonEmptyStratumValuesIS, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{CIS}),\n               label, values_,\n              )\n\n\tvalues.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tindex::PetscInt = DMLabelGetValueIndex(petsclib::PetscLibType,label::DMLabel, value::PetscInt) \nGet the index of a given value in the list of values for the `DMlabel`, or\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the value\n\nOutput Parameter:\n- `index` - the index of value in the list of values\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelGetValueIS()`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetValueIndex\"))\n\"\"\"\nfunction DMLabelGetValueIndex(petsclib::PetscLibType, label::DMLabel, value::PetscInt) end\n\n@for_petsc function DMLabelGetValueIndex(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt )\n\tindex_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetValueIndex, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{$PetscInt}),\n               label, value, index_,\n              )\n\n\tindex = index_[]\n\n\treturn index\nend \n\n\"\"\"\n\texists::PetscBool = DMLabelHasStratum(petsclib::PetscLibType,label::DMLabel, value::PetscInt) \nDetermine whether points exist with the given value\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the stratum value\n\nOutput Parameter:\n- `exists` - Flag saying whether points exist\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelHasStratum\"))\n\"\"\"\nfunction DMLabelHasStratum(petsclib::PetscLibType, label::DMLabel, value::PetscInt) end\n\n@for_petsc function DMLabelHasStratum(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt )\n\texists_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:DMLabelHasStratum, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{PetscBool}),\n               label, value, exists_,\n              )\n\n\texists = exists_[]\n\n\treturn exists\nend \n\n\"\"\"\n\tsize::PetscInt = DMLabelGetStratumSize(petsclib::PetscLibType,label::DMLabel, value::PetscInt) \nGet the size of a stratum\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the stratum value\n\nOutput Parameter:\n- `size` - The number of points in the stratum\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetStratumSize\"))\n\"\"\"\nfunction DMLabelGetStratumSize(petsclib::PetscLibType, label::DMLabel, value::PetscInt) end\n\n@for_petsc function DMLabelGetStratumSize(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetStratumSize, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{$PetscInt}),\n               label, value, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = DMLabelGetStratumBounds(petsclib::PetscLibType,label::DMLabel, value::PetscInt) \nGet the largest and smallest point of a stratum\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the stratum value\n\nOutput Parameters:\n- `start` - the smallest point in the stratum\n- `end`   - the largest point in the stratum\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetStratumBounds\"))\n\"\"\"\nfunction DMLabelGetStratumBounds(petsclib::PetscLibType, label::DMLabel, value::PetscInt) end\n\n@for_petsc function DMLabelGetStratumBounds(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetStratumBounds, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               label, value, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tDMLabelGetStratumIS(petsclib::PetscLibType,label::DMLabel, value::PetscInt, points::IS) \nGet an `IS` with the stratum points\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the stratum value\n\nOutput Parameter:\n- `points` - The stratum points\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetStratumIS\"))\n\"\"\"\nfunction DMLabelGetStratumIS(petsclib::PetscLibType, label::DMLabel, value::PetscInt, points::IS) end\n\n@for_petsc function DMLabelGetStratumIS(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt, points::IS )\n\tpoints_ = Ref(points.ptr)\n\n    @chk ccall(\n               (:DMLabelGetStratumIS, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, Ptr{CIS}),\n               label, value, points_,\n              )\n\n\tpoints.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelSetStratumIS(petsclib::PetscLibType,label::DMLabel, value::PetscInt, is::IS) \nSet the stratum points using an `IS`\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the stratum value\n- `is`    - The stratum points\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelSetStratumIS\"))\n\"\"\"\nfunction DMLabelSetStratumIS(petsclib::PetscLibType, label::DMLabel, value::PetscInt, is::IS) end\n\n@for_petsc function DMLabelSetStratumIS(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt, is::IS )\n\n    @chk ccall(\n               (:DMLabelSetStratumIS, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, CIS),\n               label, value, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelClearStratum(petsclib::PetscLibType,label::DMLabel, value::PetscInt) \nRemove a stratum\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `value` - the stratum value\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelClearStratum\"))\n\"\"\"\nfunction DMLabelClearStratum(petsclib::PetscLibType, label::DMLabel, value::PetscInt) end\n\n@for_petsc function DMLabelClearStratum(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelClearStratum, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt),\n               label, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelSetStratumBounds(petsclib::PetscLibType,label::DMLabel, value::PetscInt, pStart::PetscInt, pEnd::PetscInt) \nEfficiently give a contiguous set of points a given label value\n\nNot Collective\n\nInput Parameters:\n- `label`  - The `DMLabel`\n- `value`  - The label value for all points\n- `pStart` - The first point\n- `pEnd`   - A point beyond all marked points\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelSetStratumIS()`, `DMLabelGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelSetStratumBounds\"))\n\"\"\"\nfunction DMLabelSetStratumBounds(petsclib::PetscLibType, label::DMLabel, value::PetscInt, pStart::PetscInt, pEnd::PetscInt) end\n\n@for_petsc function DMLabelSetStratumBounds(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt, pStart::$PetscInt, pEnd::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelSetStratumBounds, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, $PetscInt, $PetscInt),\n               label, value, pStart, pEnd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tindex::PetscInt = DMLabelGetStratumPointIndex(petsclib::PetscLibType,label::DMLabel, value::PetscInt, p::PetscInt) \nGet the index of a point in a given stratum\n\nNot Collective\n\nInput Parameters:\n- `label` - The `DMLabel`\n- `value` - The label value\n- `p`     - A point with this value\n\nOutput Parameter:\n- `index` - The index of this point in the stratum, or -1 if the point is not in the stratum or the stratum does not exist\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelGetValueIndex()`, `DMLabelGetStratumIS()`, `DMLabelCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetStratumPointIndex\"))\n\"\"\"\nfunction DMLabelGetStratumPointIndex(petsclib::PetscLibType, label::DMLabel, value::PetscInt, p::PetscInt) end\n\n@for_petsc function DMLabelGetStratumPointIndex(petsclib::$UnionPetscLib, label::DMLabel, value::$PetscInt, p::$PetscInt )\n\tindex_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:DMLabelGetStratumPointIndex, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               label, value, p, index_,\n              )\n\n\tindex = index_[]\n\n\treturn index\nend \n\n\"\"\"\n\tDMLabelFilter(petsclib::PetscLibType,label::DMLabel, start::PetscInt, end_::PetscInt) \nRemove all points outside of [`start`, `end`)\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `start` - the first point kept\n- `end`   - one more than the last point kept\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelFilter\"))\n\"\"\"\nfunction DMLabelFilter(petsclib::PetscLibType, label::DMLabel, start::PetscInt, end_::PetscInt) end\n\n@for_petsc function DMLabelFilter(petsclib::$UnionPetscLib, label::DMLabel, start::$PetscInt, end_::$PetscInt )\n\n    @chk ccall(\n               (:DMLabelFilter, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, $PetscInt, $PetscInt),\n               label, start, end_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelPermute(petsclib::PetscLibType,label::DMLabel, permutation::IS, labelNew::DMLabel) \nCreate a new label with permuted points\n\nNot Collective\n\nInput Parameters:\n- `label`       - the `DMLabel`\n- `permutation` - the point permutation\n\nOutput Parameter:\n- `labelNew` - the new label containing the permuted points\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelPermute\"))\n\"\"\"\nfunction DMLabelPermute(petsclib::PetscLibType, label::DMLabel, permutation::IS, labelNew::DMLabel) end\n\n@for_petsc function DMLabelPermute(petsclib::$UnionPetscLib, label::DMLabel, permutation::IS, labelNew::DMLabel )\n\n    @chk ccall(\n               (:DMLabelPermute, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, CIS, Ptr{DMLabel}),\n               label, permutation, labelNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelPermuteValues(petsclib::PetscLibType,label::DMLabel, permutation::IS) \nPermute the values in a label\n\nNot collective\n\nInput Parameters:\n- `label`       - the `DMLabel`\n- `permutation` - the value permutation, permutation[old value] = new value\n\nOutput Parameter:\n- `label` - the `DMLabel` now with permuted values\n\n-seealso: `DMLabelRewriteValues()`, `DMLabel`, `DM`, `DMLabelPermute()`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelPermuteValues\"))\n\"\"\"\nfunction DMLabelPermuteValues(petsclib::PetscLibType, label::DMLabel, permutation::IS) end\n\n@for_petsc function DMLabelPermuteValues(petsclib::$UnionPetscLib, label::DMLabel, permutation::IS )\n\n    @chk ccall(\n               (:DMLabelPermuteValues, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, CIS),\n               label, permutation,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelRewriteValues(petsclib::PetscLibType,label::DMLabel, permutation::IS) \nPermute the values in a label, but some may be omitted\n\nNot collective\n\nInput Parameters:\n- `label`       - the `DMLabel`\n- `permutation` - the value permutation, permutation[old value] = new value, but some maybe omitted\n\nOutput Parameter:\n- `label` - the `DMLabel` now with permuted values\n\n-seealso: `DMLabelPermuteValues()`, `DMLabel`, `DM`, `DMLabelPermute()`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelRewriteValues\"))\n\"\"\"\nfunction DMLabelRewriteValues(petsclib::PetscLibType, label::DMLabel, permutation::IS) end\n\n@for_petsc function DMLabelRewriteValues(petsclib::$UnionPetscLib, label::DMLabel, permutation::IS )\n\n    @chk ccall(\n               (:DMLabelRewriteValues, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, CIS),\n               label, permutation,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelDistribute(petsclib::PetscLibType,label::DMLabel, sf::PetscSF, labelNew::DMLabel) \nCreate a new label pushed forward over the `PetscSF`\n\nCollective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `sf`    - the map from old to new distribution\n\nOutput Parameter:\n- `labelNew` - the new redistributed label\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelCreate()`, `DMLabelGetValue()`, `DMLabelSetValue()`, `DMLabelClearValue()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelDistribute\"))\n\"\"\"\nfunction DMLabelDistribute(petsclib::PetscLibType, label::DMLabel, sf::PetscSF, labelNew::DMLabel) end\n\n@for_petsc function DMLabelDistribute(petsclib::$UnionPetscLib, label::DMLabel, sf::PetscSF, labelNew::DMLabel )\n\n    @chk ccall(\n               (:DMLabelDistribute, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, PetscSF, Ptr{DMLabel}),\n               label, sf, labelNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelGather(petsclib::PetscLibType,label::DMLabel, sf::PetscSF, labelNew::DMLabel) \nGather all label values from leafs into roots\n\nCollective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `sf`    - the `PetscSF` communication map\n\nOutput Parameter:\n- `labelNew` - the new `DMLabel` with localised leaf values\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `DMLabelDistribute()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGather\"))\n\"\"\"\nfunction DMLabelGather(petsclib::PetscLibType, label::DMLabel, sf::PetscSF, labelNew::DMLabel) end\n\n@for_petsc function DMLabelGather(petsclib::$UnionPetscLib, label::DMLabel, sf::PetscSF, labelNew::DMLabel )\n\n    @chk ccall(\n               (:DMLabelGather, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, PetscSF, Ptr{DMLabel}),\n               label, sf, labelNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelPropagateBegin(petsclib::PetscLibType,label::DMLabel, sf::PetscSF) \nSetup a cycle of label propagation\n\nCollective\n\nInput Parameters:\n- `label` - The `DMLabel` to propagate across processes\n- `sf`    - The `PetscSF` describing parallel layout of the label points\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelPropagateEnd()`, `DMLabelPropagatePush()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelPropagateBegin\"))\n\"\"\"\nfunction DMLabelPropagateBegin(petsclib::PetscLibType, label::DMLabel, sf::PetscSF) end\n\n@for_petsc function DMLabelPropagateBegin(petsclib::$UnionPetscLib, label::DMLabel, sf::PetscSF )\n\n    @chk ccall(\n               (:DMLabelPropagateBegin, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, PetscSF),\n               label, sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelPropagateEnd(petsclib::PetscLibType,label::DMLabel, pointSF::PetscSF) \nTear down a cycle of label propagation\n\nCollective\n\nInput Parameters:\n- `label`   - The `DMLabel` to propagate across processes\n- `pointSF` - The `PetscSF` describing parallel layout of the label points\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelPropagateBegin()`, `DMLabelPropagatePush()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelPropagateEnd\"))\n\"\"\"\nfunction DMLabelPropagateEnd(petsclib::PetscLibType, label::DMLabel, pointSF::PetscSF) end\n\n@for_petsc function DMLabelPropagateEnd(petsclib::$UnionPetscLib, label::DMLabel, pointSF::PetscSF )\n\n    @chk ccall(\n               (:DMLabelPropagateEnd, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, PetscSF),\n               label, pointSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelPropagatePush(petsclib::PetscLibType,label::DMLabel, pointSF::PetscSF, markPoint::external, ctx::Cvoid) \nTear down a cycle of label propagation\n\nCollective\n\nInput Parameters:\n- `label`     - The `DMLabel` to propagate across processes\n- `pointSF`   - The `PetscSF` describing parallel layout of the label points\n- `markPoint` - An optional callback that is called when a point is marked, or `NULL`\n- `ctx`       - An optional user context for the callback, or `NULL`\n\nCalling sequence of `markPoint`:\n- `label` - The `DMLabel`\n- `p`     - The point being marked\n- `val`   - The label value for `p`\n- `ctx`   - An optional user context\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelPropagateBegin()`, `DMLabelPropagateEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelPropagatePush\"))\n\"\"\"\nfunction DMLabelPropagatePush(petsclib::PetscLibType, label::DMLabel, pointSF::PetscSF, markPoint::external, ctx::Cvoid) end\n\n@for_petsc function DMLabelPropagatePush(petsclib::$UnionPetscLib, label::DMLabel, pointSF::PetscSF, markPoint::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:DMLabelPropagatePush, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, PetscSF, external, Ptr{Cvoid}),\n               label, pointSF, markPoint, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelConvertToSection(petsclib::PetscLibType,label::DMLabel, section::PetscSection, is::IS) \nMake a `PetscSection`/`IS` pair that encodes the label\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameters:\n- `section` - the section giving offsets for each stratum\n- `is`      - An `IS` containing all the label points\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `DMLabelDistribute()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelConvertToSection\"))\n\"\"\"\nfunction DMLabelConvertToSection(petsclib::PetscLibType, label::DMLabel, section::PetscSection, is::IS) end\n\n@for_petsc function DMLabelConvertToSection(petsclib::$UnionPetscLib, label::DMLabel, section::PetscSection, is::IS )\n\tis_ = Ref(is.ptr)\n\n    @chk ccall(\n               (:DMLabelConvertToSection, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{PetscSection}, Ptr{CIS}),\n               label, section, is_,\n              )\n\n\tis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelRegisterAll(petsclib::PetscLibType) \nRegisters all of the `DMLabel` implementations in the `DM` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `DMLabel`, `DM`, `DMRegisterAll()`, `DMLabelRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelRegisterAll\"))\n\"\"\"\nfunction DMLabelRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function DMLabelRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMLabelRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelRegisterDestroy(petsclib::PetscLibType) \nThis function destroys the `DMLabel` registry. It is called from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelRegisterDestroy\"))\n\"\"\"\nfunction DMLabelRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function DMLabelRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:DMLabelRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelSetType(petsclib::PetscLibType,label::DMLabel, method::DMLabelType) \nSets the particular implementation for a label.\n\nCollective\n\nInput Parameters:\n- `label`  - The label\n- `method` - The name of the label type\n\nOptions Database Key:\n- `-dm_label_type <type>` - Sets the label type; use -help for a list of available types or see `DMLabelType`\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelGetType()`, `DMLabelCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelSetType\"))\n\"\"\"\nfunction DMLabelSetType(petsclib::PetscLibType, label::DMLabel, method::DMLabelType) end\n\n@for_petsc function DMLabelSetType(petsclib::$UnionPetscLib, label::DMLabel, method::DMLabelType )\n\n    @chk ccall(\n               (:DMLabelSetType, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, DMLabelType),\n               label, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::DMLabelType = DMLabelGetType(petsclib::PetscLibType,label::DMLabel) \nGets the type name (as a string) from the label.\n\nNot Collective\n\nInput Parameter:\n- `label` - The `DMLabel`\n\nOutput Parameter:\n- `type` - The `DMLabel` type name\n\nLevel: intermediate\n\n-seealso: `DMLabel`, `DM`, `DMLabelSetType()`, `DMLabelCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelGetType\"))\n\"\"\"\nfunction DMLabelGetType(petsclib::PetscLibType, label::DMLabel) end\n\n@for_petsc function DMLabelGetType(petsclib::$UnionPetscLib, label::DMLabel )\n\ttype_ = Ref{DMLabelType}()\n\n    @chk ccall(\n               (:DMLabelGetType, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{DMLabelType}),\n               label, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tDMLabelEphemeralGetLabel(petsclib::PetscLibType,label::DMLabel, olabel::DMLabel) \nGet the base label for this ephemeral label\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameter:\n- `olabel` - the base label for this ephemeral label\n\nLevel: intermediate\n\n-seealso: `DMLabelEphemeralSetLabel()`, `DMLabelEphemeralGetTransform()`, `DMLabelSetType()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelEphemeralGetLabel\"))\n\"\"\"\nfunction DMLabelEphemeralGetLabel(petsclib::PetscLibType, label::DMLabel, olabel::DMLabel) end\n\n@for_petsc function DMLabelEphemeralGetLabel(petsclib::$UnionPetscLib, label::DMLabel, olabel::DMLabel )\n\n    @chk ccall(\n               (:DMLabelEphemeralGetLabel, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{DMLabel}),\n               label, olabel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelEphemeralSetLabel(petsclib::PetscLibType,label::DMLabel, olabel::DMLabel) \nSet the base label for this ephemeral label\n\nNot Collective\n\nInput Parameters:\n- `label`  - the `DMLabel`\n- `olabel` - the base label for this ephemeral label\n\nLevel: intermediate\n\n-seealso: `DMLabelEphemeralGetLabel()`, `DMLabelEphemeralSetTransform()`, `DMLabelSetType()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelEphemeralSetLabel\"))\n\"\"\"\nfunction DMLabelEphemeralSetLabel(petsclib::PetscLibType, label::DMLabel, olabel::DMLabel) end\n\n@for_petsc function DMLabelEphemeralSetLabel(petsclib::$UnionPetscLib, label::DMLabel, olabel::DMLabel )\n\n    @chk ccall(\n               (:DMLabelEphemeralSetLabel, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, DMLabel),\n               label, olabel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelEphemeralGetTransform(petsclib::PetscLibType,label::DMLabel, tr::DMPlexTransform) \nGet the transform for this ephemeral label\n\nNot Collective\n\nInput Parameter:\n- `label` - the `DMLabel`\n\nOutput Parameter:\n- `tr` - the transform for this ephemeral label\n\nLevel: intermediate\n\n-seealso: `DMLabelEphemeralSetTransform()`, `DMLabelEphemeralGetLabel()`, `DMLabelSetType()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelEphemeralGetTransform\"))\n\"\"\"\nfunction DMLabelEphemeralGetTransform(petsclib::PetscLibType, label::DMLabel, tr::DMPlexTransform) end\n\n@for_petsc function DMLabelEphemeralGetTransform(petsclib::$UnionPetscLib, label::DMLabel, tr::DMPlexTransform )\n\n    @chk ccall(\n               (:DMLabelEphemeralGetTransform, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, Ptr{DMPlexTransform}),\n               label, tr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tDMLabelEphemeralSetTransform(petsclib::PetscLibType,label::DMLabel, tr::DMPlexTransform) \nSet the transform for this ephemeral label\n\nNot Collective\n\nInput Parameters:\n- `label` - the `DMLabel`\n- `tr`    - the transform for this ephemeral label\n\nLevel: intermediate\n\n-seealso: `DMLabelEphemeralGetTransform()`, `DMLabelEphemeralSetLabel()`, `DMLabelSetType()`\n\n# External Links\n$(_doc_external(\"DM/DMLabelEphemeralSetTransform\"))\n\"\"\"\nfunction DMLabelEphemeralSetTransform(petsclib::PetscLibType, label::DMLabel, tr::DMPlexTransform) end\n\n@for_petsc function DMLabelEphemeralSetTransform(petsclib::$UnionPetscLib, label::DMLabel, tr::DMPlexTransform )\n\n    @chk ccall(\n               (:DMLabelEphemeralSetTransform, $petsc_library),\n               PetscErrorCode,\n               (DMLabel, DMPlexTransform),\n               label, tr,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/IS_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_ISColoringValue end\nconst ISColoringValue = Ptr{_n_ISColoringValue}\n# -------------------------------------------------------\n\n\"\"\"\n\tis::IS = ISCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreate an index set object. `IS`, index sets, are PETSc objects used to do efficient indexing into other data structures such as `Vec` and `Mat`\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator\n\nOutput Parameter:\n- `is` - the new index set\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISType()`, `ISSetType()`, `ISCreateGeneral()`, `ISCreateStride()`, `ISCreateBlock()`, `ISAllGather()`\n\n# External Links\n$(_doc_external(\"Vec/ISCreate\"))\n\"\"\"\nfunction ISCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function ISCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tis_ = Ref{CIS}()\n\n    @chk ccall(\n               (:ISCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CIS}),\n               comm, is_,\n              )\n\n\tis = IS(is_[], petsclib)\n\n\treturn is\nend \n\n\"\"\"\n\tISSetType(petsclib::PetscLibType,is::IS, method::ISType) \nBuilds a index set, for a particular `ISType`\n\nCollective\n\nInput Parameters:\n- `is`     - The index set object\n- `method` - The name of the index set type\n\nOptions Database Key:\n- `-is_type <type>` - Sets the index set type; use `-help` for a list of available types\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISGENERAL`, `ISBLOCK`, `ISGetType()`, `ISCreate()`, `ISCreateGeneral()`, `ISCreateStride()`, `ISCreateBlock()`\n\n# External Links\n$(_doc_external(\"Vec/ISSetType\"))\n\"\"\"\nfunction ISSetType(petsclib::PetscLibType, is::IS, method::ISType) end\n\n@for_petsc function ISSetType(petsclib::$UnionPetscLib, is::IS, method::ISType )\n\n    @chk ccall(\n               (:ISSetType, $petsc_library),\n               PetscErrorCode,\n               (CIS, ISType),\n               is, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::ISType = ISGetType(petsclib::PetscLibType,is::IS) \nGets the index set type name, `ISType`, (as a string) from the `IS`.\n\nNot Collective\n\nInput Parameter:\n- `is` - The index set\n\nOutput Parameter:\n- `type` - The index set type name\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISType`, `ISSetType()`, `ISCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetType\"))\n\"\"\"\nfunction ISGetType(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetType(petsclib::$UnionPetscLib, is::IS )\n\ttype_ = Ref{ISType}()\n\n    @chk ccall(\n               (:ISGetType, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{ISType}),\n               is, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tISRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new index set implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine itself\n\n-seealso: [](sec_scatter), `IS`, `ISType`, `ISSetType()`, `ISRegisterAll()`, `ISRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/ISRegister\"))\n\"\"\"\nfunction ISRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function ISRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:ISRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscInt = ISRenumber(petsclib::PetscLibType,subset::IS, subset_mult::IS, subset_n::IS) \nRenumbers the non\n\nCollective\n\nInput Parameters:\n- `subset`      - the index set\n- `subset_mult` - the multiplicity of each entry in subset (optional, can be `NULL`)\n\nOutput Parameters:\n- `N`        - one past the largest entry of the new `IS`\n- `subset_n` - the new `IS`\n\nLevel: intermediate\n\n-seealso: `IS`\n\n# External Links\n$(_doc_external(\"Vec/ISRenumber\"))\n\"\"\"\nfunction ISRenumber(petsclib::PetscLibType, subset::IS, subset_mult::IS, subset_n::IS) end\n\n@for_petsc function ISRenumber(petsclib::$UnionPetscLib, subset::IS, subset_mult::IS, subset_n::IS )\n\tN_ = Ref{$PetscInt}()\n\tsubset_n_ = Ref(subset_n.ptr)\n\n    @chk ccall(\n               (:ISRenumber, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{$PetscInt}, Ptr{CIS}),\n               subset, subset_mult, N_, subset_n_,\n              )\n\n\tN = N_[]\n\tsubset_n.ptr = C_NULL\n\n\treturn N\nend \n\n\"\"\"\n\tsubis::IS = ISCreateSubIS(petsclib::PetscLibType,is::IS, comps::IS) \nCreate a sub index set from a global index set selecting some components.\n\nCollective\n\nInput Parameters:\n- `is`    - the index set\n- `comps` - which components we will extract from `is`\n\nOutput Parameters:\n- `subis` - the new sub index set\n\nExample usage:\nWe have an index set `is` living on 3 processes with the following values:\n| 4 9 0 | 2 6 7 | 10 11 1|\nand another index set `comps` used to indicate which components of is  we want to take,\n| 7 5  | 1 2 | 0 4|\nThe output index set `subis` should look like:\n| 11 7 | 9 0 | 4 6|\n\nLevel: intermediate\n\n-seealso: `IS`, `VecGetSubVector()`, `MatCreateSubMatrix()`\n\n# External Links\n$(_doc_external(\"Vec/ISCreateSubIS\"))\n\"\"\"\nfunction ISCreateSubIS(petsclib::PetscLibType, is::IS, comps::IS) end\n\n@for_petsc function ISCreateSubIS(petsclib::$UnionPetscLib, is::IS, comps::IS )\n\tsubis_ = Ref{CIS}()\n\n    @chk ccall(\n               (:ISCreateSubIS, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CIS}),\n               is, comps, subis_,\n              )\n\n\tsubis = IS(subis_[], petsclib)\n\n\treturn subis\nend \n\n\"\"\"\n\tISClearInfoCache(petsclib::PetscLibType,is::IS, clear_permanent_loc::PetscBool) \nclear the cache of computed index set properties\n\nNot Collective\n\nInput Parameters:\n- `is`                    - the index set\n- `clear_permanent_local` - whether to remove the permanent status of local properties\n\nLevel: developer\n\n-seealso: `IS`, `ISInfo`, `ISInfoType`, `ISSetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISClearInfoCache\"))\n\"\"\"\nfunction ISClearInfoCache(petsclib::PetscLibType, is::IS, clear_permanent_loc::PetscBool) end\n\n@for_petsc function ISClearInfoCache(petsclib::$UnionPetscLib, is::IS, clear_permanent_loc::PetscBool )\n\n    @chk ccall(\n               (:ISClearInfoCache, $petsc_library),\n               PetscErrorCode,\n               (CIS, PetscBool),\n               is, clear_permanent_loc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISSetInfo(petsclib::PetscLibType,is::IS, info::ISInfo, type::ISInfoType, permanent::PetscBool, flg::PetscBool) \nSet known information about an index set.\n\nLogically Collective if `ISInfoType` is `IS_GLOBAL`\n\nInput Parameters:\n- `is`        - the index set\n- `info`      - describing a property of the index set, one of those listed below,\n- `type`      - `IS_LOCAL` if the information describes the local portion of the index set,\n`IS_GLOBAL` if it describes the whole index set\n- `permanent` - `PETSC_TRUE` if it is known that the property will persist through changes to the index set, `PETSC_FALSE` otherwise\nIf the user sets a property as permanently known, it will bypass computation of that property\n- `flg`       - set the described property as true (`PETSC_TRUE`) or false (`PETSC_FALSE`)\n\nValues of `info` Describing `IS` Structure:\n- `IS_SORTED`      - the [local part of the] index set is sorted in ascending order\n- `IS_UNIQUE`      - each entry in the [local part of the] index set is unique\n- `IS_PERMUTATION` - the [local part of the] index set is a permutation of the integers {0, 1, ..., N-1}, where N is the size of the [local part of the] index set\n- `IS_INTERVAL`    - the [local part of the] index set is equal to a contiguous range of integers {f, f + 1, ..., f + N-1}\n- `IS_IDENTITY`    - the [local part of the] index set is equal to the integers {0, 1, ..., N-1}\n\nLevel: advanced\n\n-seealso: `ISInfo`, `ISInfoType`, `IS`\n\n# External Links\n$(_doc_external(\"Vec/ISSetInfo\"))\n\"\"\"\nfunction ISSetInfo(petsclib::PetscLibType, is::IS, info::ISInfo, type::ISInfoType, permanent::PetscBool, flg::PetscBool) end\n\n@for_petsc function ISSetInfo(petsclib::$UnionPetscLib, is::IS, info::ISInfo, type::ISInfoType, permanent::PetscBool, flg::PetscBool )\n\n    @chk ccall(\n               (:ISSetInfo, $petsc_library),\n               PetscErrorCode,\n               (CIS, ISInfo, ISInfoType, PetscBool, PetscBool),\n               is, info, type, permanent, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = ISGetInfo(petsclib::PetscLibType,is::IS, info::ISInfo, type::ISInfoType, compute::PetscBool) \nDetermine whether an index set satisfies a given property\n\nCollective or Logically Collective if the type is `IS_GLOBAL` (logically collective if the value of the property has been permanently set with `ISSetInfo()`)\n\nInput Parameters:\n- `is`      - the index set\n- `info`    - describing a property of the index set, one of those listed in the documentation of `ISSetInfo()`\n- `compute` - if `PETSC_FALSE`, the property will not be computed if it is not already known and the property will be assumed to be false\n- `type`    - whether the property is local (`IS_LOCAL`) or global (`IS_GLOBAL`)\n\nOutput Parameter:\n- `flg` - whether the property is true (`PETSC_TRUE`) or false (`PETSC_FALSE`)\n\nLevel: advanced\n\n-seealso: `IS`, `ISInfo`, `ISInfoType`, `ISSetInfo()`, `ISClearInfoCache()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetInfo\"))\n\"\"\"\nfunction ISGetInfo(petsclib::PetscLibType, is::IS, info::ISInfo, type::ISInfoType, compute::PetscBool) end\n\n@for_petsc function ISGetInfo(petsclib::$UnionPetscLib, is::IS, info::ISInfo, type::ISInfoType, compute::PetscBool )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CIS, ISInfo, ISInfoType, PetscBool, Ptr{PetscBool}),\n               is, info, type, compute, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tident::PetscBool = ISIdentity(petsclib::PetscLibType,is::IS) \nDetermines whether index set is the identity mapping.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `ident` - `PETSC_TRUE` if an identity, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: `IS`, `ISSetIdentity()`, `ISGetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISIdentity\"))\n\"\"\"\nfunction ISIdentity(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISIdentity(petsclib::$UnionPetscLib, is::IS )\n\tident_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISIdentity, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{PetscBool}),\n               is, ident_,\n              )\n\n\tident = ident_[]\n\n\treturn ident\nend \n\n\"\"\"\n\tISSetIdentity(petsclib::PetscLibType,is::IS) \nInforms the index set that it is an identity.\n\nLogically Collective\n\nInput Parameter:\n- `is` - the index set\n\nLevel: intermediate\n\n-seealso: `IS`, `ISIdentity()`, `ISSetInfo()`, `ISClearInfoCache()`\n\n# External Links\n$(_doc_external(\"Vec/ISSetIdentity\"))\n\"\"\"\nfunction ISSetIdentity(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISSetIdentity(petsclib::$UnionPetscLib, is::IS )\n\n    @chk ccall(\n               (:ISSetIdentity, $petsc_library),\n               PetscErrorCode,\n               (CIS,),\n               is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstart::PetscInt,contig::PetscBool = ISContiguousLocal(petsclib::PetscLibType,is::IS, gstart::PetscInt, gend::PetscInt) \nLocates an index set with contiguous range within a global range, if possible\n\nNot Collective\n\nInput Parameters:\n- `is`     - the index set\n- `gstart` - global start\n- `gend`   - global end\n\nOutput Parameters:\n- `start`  - start of contiguous block, as an offset from `gstart`\n- `contig` - `PETSC_TRUE` if the index set refers to contiguous entries on this process, else `PETSC_FALSE`\n\nLevel: developer\n\n-seealso: `IS`, `ISGetLocalSize()`, `VecGetOwnershipRange()`\n\n# External Links\n$(_doc_external(\"Vec/ISContiguousLocal\"))\n\"\"\"\nfunction ISContiguousLocal(petsclib::PetscLibType, is::IS, gstart::PetscInt, gend::PetscInt) end\n\n@for_petsc function ISContiguousLocal(petsclib::$UnionPetscLib, is::IS, gstart::$PetscInt, gend::$PetscInt )\n\tstart_ = Ref{$PetscInt}()\n\tcontig_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISContiguousLocal, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}),\n               is, gstart, gend, start_, contig_,\n              )\n\n\tstart = start_[]\n\tcontig = contig_[]\n\n\treturn start,contig\nend \n\n\"\"\"\n\tperm::PetscBool = ISPermutation(petsclib::PetscLibType,is::IS) \n`PETSC_TRUE` or `PETSC_FALSE` depending on whether the\nindex set has been declared to be a permutation.\n\nLogically Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `perm` - `PETSC_TRUE` if a permutation, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: `IS`, `ISSetPermutation()`, `ISGetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISPermutation\"))\n\"\"\"\nfunction ISPermutation(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISPermutation(petsclib::$UnionPetscLib, is::IS )\n\tperm_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISPermutation, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{PetscBool}),\n               is, perm_,\n              )\n\n\tperm = perm_[]\n\n\treturn perm\nend \n\n\"\"\"\n\tISSetPermutation(petsclib::PetscLibType,is::IS) \nInforms the index set that it is a permutation.\n\nLogically Collective\n\nInput Parameter:\n- `is` - the index set\n\nLevel: intermediate\n\n-seealso: `IS`, `ISPermutation()`, `ISSetInfo()`, `ISClearInfoCache().`\n\n# External Links\n$(_doc_external(\"Vec/ISSetPermutation\"))\n\"\"\"\nfunction ISSetPermutation(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISSetPermutation(petsclib::$UnionPetscLib, is::IS )\n\n    @chk ccall(\n               (:ISSetPermutation, $petsc_library),\n               PetscErrorCode,\n               (CIS,),\n               is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISDestroy(petsclib::PetscLibType,is::IS) \nDestroys an index set.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nLevel: beginner\n\n-seealso: `IS`, `ISCreateGeneral()`, `ISCreateStride()`, `ISCreateBlock()`\n\n# External Links\n$(_doc_external(\"Vec/ISDestroy\"))\n\"\"\"\nfunction ISDestroy(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISDestroy(petsclib::$UnionPetscLib, is::IS )\n\tis_ = Ref(is.ptr)\n\n    @chk ccall(\n               (:ISDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CIS},),\n               is_,\n              )\n\n\tis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISInvertPermutation(petsclib::PetscLibType,is::IS, nloc::PetscInt, isout::IS) \nCreates a new permutation that is the inverse of\na given permutation.\n\nCollective\n\nInput Parameters:\n- `is`     - the index set\n- `nlocal` - number of indices on this processor in result (ignored for 1 processor) or\nuse `PETSC_DECIDE`\n\nOutput Parameter:\n- `isout` - the inverse permutation\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetInfo()`, `ISSetPermutation()`, `ISGetPermutation()`\n\n# External Links\n$(_doc_external(\"Vec/ISInvertPermutation\"))\n\"\"\"\nfunction ISInvertPermutation(petsclib::PetscLibType, is::IS, nloc::PetscInt, isout::IS) end\n\n@for_petsc function ISInvertPermutation(petsclib::$UnionPetscLib, is::IS, nloc::$PetscInt, isout::IS )\n\tisout_ = Ref(isout.ptr)\n\n    @chk ccall(\n               (:ISInvertPermutation, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, Ptr{CIS}),\n               is, nloc, isout_,\n              )\n\n\tisout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt = ISGetSize(petsclib::PetscLibType,is::IS) \nReturns the global length of an index set.\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `size` - the global size\n\nLevel: beginner\n\n-seealso: `IS`\n\n# External Links\n$(_doc_external(\"Vec/ISGetSize\"))\n\"\"\"\nfunction ISGetSize(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetSize(petsclib::$UnionPetscLib, is::IS )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISGetSize, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}),\n               is, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tsize::PetscInt = ISGetLocalSize(petsclib::PetscLibType,is::IS) \nReturns the local (processor) length of an index set.\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `size` - the local size\n\nLevel: beginner\n\n-seealso: `IS`, `ISGetSize()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetLocalSize\"))\n\"\"\"\nfunction ISGetLocalSize(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetLocalSize(petsclib::$UnionPetscLib, is::IS )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISGetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}),\n               is, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tISGetLayout(petsclib::PetscLibType,is::IS, map::PetscLayout) \nget `PetscLayout` describing index set layout\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `map` - the layout\n\nLevel: developer\n\n-seealso: `IS`, `PetscLayout`, `ISSetLayout()`, `ISGetSize()`, `ISGetLocalSize()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetLayout\"))\n\"\"\"\nfunction ISGetLayout(petsclib::PetscLibType, is::IS, map::PetscLayout) end\n\n@for_petsc function ISGetLayout(petsclib::$UnionPetscLib, is::IS, map::PetscLayout )\n\n    @chk ccall(\n               (:ISGetLayout, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{PetscLayout}),\n               is, map,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISSetLayout(petsclib::PetscLibType,is::IS, map::PetscLayout) \nset `PetscLayout` describing index set layout\n\nCollective\n\nInput Parameters:\n- `is`  - the index set\n- `map` - the layout\n\nLevel: developer\n\n-seealso: `IS`, `PetscLayout`, `ISCreate()`, `ISGetLayout()`, `ISGetSize()`, `ISGetLocalSize()`\n\n# External Links\n$(_doc_external(\"Vec/ISSetLayout\"))\n\"\"\"\nfunction ISSetLayout(petsclib::PetscLibType, is::IS, map::PetscLayout) end\n\n@for_petsc function ISSetLayout(petsclib::$UnionPetscLib, is::IS, map::PetscLayout )\n\n    @chk ccall(\n               (:ISSetLayout, $petsc_library),\n               PetscErrorCode,\n               (CIS, PetscLayout),\n               is, map,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tptr::Vector{PetscInt} = ISGetIndices(petsclib::PetscLibType,is::IS) \nReturns a pointer to the indices.  The user should call\n`ISRestoreIndices()` after having looked at the indices.  The user should\nNOT change the indices.\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `ptr` - the location to put the pointer to the indices\n\nLevel: intermediate\n\n-seealso: `IS`, `ISRestoreIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetIndices\"))\n\"\"\"\nfunction ISGetIndices(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetIndices(petsclib::$UnionPetscLib, is::IS )\n\tptr_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISGetIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, ptr_,\n              )\n\n\tptr = unsafe_wrap(Array, ptr_[], ISGetLocalSize(petsclib, is); own = false)\n\n\treturn ptr\nend \n\n\"\"\"\n\tmin::PetscInt,max::PetscInt = ISGetMinMax(petsclib::PetscLibType,is::IS) \nGets the minimum and maximum values in an `IS`\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameters:\n- `min` - the minimum value, you may pass `NULL`\n- `max` - the maximum value, you may pass `NULL`\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetIndices()`, `ISRestoreIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetMinMax\"))\n\"\"\"\nfunction ISGetMinMax(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetMinMax(petsclib::$UnionPetscLib, is::IS )\n\tmin_ = Ref{$PetscInt}()\n\tmax_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISGetMinMax, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               is, min_, max_,\n              )\n\n\tmin = min_[]\n\tmax = max_[]\n\n\treturn min,max\nend \n\n\"\"\"\n\tlocation::PetscInt = ISLocate(petsclib::PetscLibType,is::IS, key::PetscInt) \ndetermine the location of an index within the local component of an index set\n\nNot Collective\n\nInput Parameters:\n- `is`  - the index set\n- `key` - the search key\n\nOutput Parameter:\n- `location` - if >= 0, a location within the index set that is equal to the key, otherwise the key is not in the index set\n\nLevel: intermediate\n\n-seealso: `IS`\n\n# External Links\n$(_doc_external(\"Vec/ISLocate\"))\n\"\"\"\nfunction ISLocate(petsclib::PetscLibType, is::IS, key::PetscInt) end\n\n@for_petsc function ISLocate(petsclib::$UnionPetscLib, is::IS, key::$PetscInt )\n\tlocation_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISLocate, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, Ptr{$PetscInt}),\n               is, key, location_,\n              )\n\n\tlocation = location_[]\n\n\treturn location\nend \n\n\"\"\"\n\tISRestoreIndices(petsclib::PetscLibType,is::IS, ptr::Vector{PetscInt}) \nRestores an index set to a usable state after a call to `ISGetIndices()`.\n\nNot Collective\n\nInput Parameters:\n- `is`  - the index set\n- `ptr` - the pointer obtained by `ISGetIndices()`\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISRestoreIndices\"))\n\"\"\"\nfunction ISRestoreIndices(petsclib::PetscLibType, is::IS, ptr::Vector{PetscInt}) end\n\n@for_petsc function ISRestoreIndices(petsclib::$UnionPetscLib, is::IS, ptr::Vector{$PetscInt} )\n\tptr_ = Ref(pointer(ptr))\n\n    @chk ccall(\n               (:ISRestoreIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, ptr_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tindices::Vector{PetscInt} = ISGetTotalIndices(petsclib::PetscLibType,is::IS) \nRetrieve an array containing all indices across the communicator.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `indices` - total indices with rank 0 indices first, and so on; total array size is\nthe same as returned with `ISGetSize()`.\n\nLevel: intermediate\n\n-seealso: `IS`, `ISRestoreTotalIndices()`, `ISGetNonlocalIndices()`, `ISGetSize()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetTotalIndices\"))\n\"\"\"\nfunction ISGetTotalIndices(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetTotalIndices(petsclib::$UnionPetscLib, is::IS )\n\tindices_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISGetTotalIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, indices_,\n              )\n\n\tindices = unsafe_wrap(Array, indices_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn indices\nend \n\n\"\"\"\n\tISRestoreTotalIndices(petsclib::PetscLibType,is::IS, indices::Vector{PetscInt}) \nRestore the index array obtained with `ISGetTotalIndices()`.\n\nNot Collective.\n\nInput Parameters:\n- `is`      - the index set\n- `indices` - index array; must be the array obtained with `ISGetTotalIndices()`\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetNonlocalIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISRestoreTotalIndices\"))\n\"\"\"\nfunction ISRestoreTotalIndices(petsclib::PetscLibType, is::IS, indices::Vector{PetscInt}) end\n\n@for_petsc function ISRestoreTotalIndices(petsclib::$UnionPetscLib, is::IS, indices::Vector{$PetscInt} )\n\tindices_ = Ref(pointer(indices))\n\n    @chk ccall(\n               (:ISRestoreTotalIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, indices_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tindices::Vector{PetscInt} = ISGetNonlocalIndices(petsclib::PetscLibType,is::IS) \nRetrieve an array of indices from remote processors\nin this communicator.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `indices` - indices with rank 0 indices first, and so on,  omitting\nthe current rank.  Total number of indices is the difference\ntotal and local, obtained with `ISGetSize()` and `ISGetLocalSize()`,\nrespectively.\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetTotalIndices()`, `ISRestoreNonlocalIndices()`, `ISGetSize()`, `ISGetLocalSize().`\n\n# External Links\n$(_doc_external(\"Vec/ISGetNonlocalIndices\"))\n\"\"\"\nfunction ISGetNonlocalIndices(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetNonlocalIndices(petsclib::$UnionPetscLib, is::IS )\n\tindices_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISGetNonlocalIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, indices_,\n              )\n\n\tindices = unsafe_wrap(Array, indices_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn indices\nend \n\n\"\"\"\n\tISRestoreNonlocalIndices(petsclib::PetscLibType,is::IS, indices::Vector{PetscInt}) \nRestore the index array obtained with `ISGetNonlocalIndices()`.\n\nNot Collective.\n\nInput Parameters:\n- `is`      - the index set\n- `indices` - index array; must be the array obtained with `ISGetNonlocalIndices()`\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetTotalIndices()`, `ISGetNonlocalIndices()`, `ISRestoreTotalIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISRestoreNonlocalIndices\"))\n\"\"\"\nfunction ISRestoreNonlocalIndices(petsclib::PetscLibType, is::IS, indices::Vector{PetscInt}) end\n\n@for_petsc function ISRestoreNonlocalIndices(petsclib::$UnionPetscLib, is::IS, indices::Vector{$PetscInt} )\n\tindices_ = Ref(pointer(indices))\n\n    @chk ccall(\n               (:ISRestoreNonlocalIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, indices_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISGetNonlocalIS(petsclib::PetscLibType,is::IS, complement::IS) \nGather all nonlocal indices for this `IS` and present\nthem as another sequential index set.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `complement` - sequential `IS` with indices identical to the result of\n`ISGetNonlocalIndices()`\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetNonlocalIndices()`, `ISRestoreNonlocalIndices()`, `ISAllGather()`, `ISGetSize()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetNonlocalIS\"))\n\"\"\"\nfunction ISGetNonlocalIS(petsclib::PetscLibType, is::IS, complement::IS) end\n\n@for_petsc function ISGetNonlocalIS(petsclib::$UnionPetscLib, is::IS, complement::IS )\n\tcomplement_ = Ref(complement.ptr)\n\n    @chk ccall(\n               (:ISGetNonlocalIS, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{CIS}),\n               is, complement_,\n              )\n\n\tcomplement.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISRestoreNonlocalIS(petsclib::PetscLibType,is::IS, complement::IS) \nRestore the `IS` obtained with `ISGetNonlocalIS()`.\n\nNot collective.\n\nInput Parameters:\n- `is`         - the index set\n- `complement` - index set of `is`'s nonlocal indices\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetNonlocalIS()`, `ISGetNonlocalIndices()`, `ISRestoreNonlocalIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISRestoreNonlocalIS\"))\n\"\"\"\nfunction ISRestoreNonlocalIS(petsclib::PetscLibType, is::IS, complement::IS) end\n\n@for_petsc function ISRestoreNonlocalIS(petsclib::$UnionPetscLib, is::IS, complement::IS )\n\tcomplement_ = Ref(complement.ptr)\n\n    @chk ccall(\n               (:ISRestoreNonlocalIS, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{CIS}),\n               is, complement_,\n              )\n\n\tcomplement.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISViewFromOptions(petsclib::PetscLibType,A::IS, obj::PetscObject, name::String) \nView an `IS` based on options in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the index set\n- `obj`  - Optional object that provides the prefix for the options database\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: `IS`, `ISView()`, `PetscObjectViewFromOptions()`, `ISCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISViewFromOptions\"))\n\"\"\"\nfunction ISViewFromOptions(petsclib::PetscLibType, A::IS, obj::PetscObject, name::String) end\n\n@for_petsc function ISViewFromOptions(petsclib::$UnionPetscLib, A::IS, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:ISViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CIS, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISView(petsclib::PetscLibType,is::IS, viewer::PetscViewer) \nDisplays an index set.\n\nCollective\n\nInput Parameters:\n- `is`     - the index set\n- `viewer` - viewer used to display the set, for example `PETSC_VIEWER_STDOUT_SELF`.\n\nLevel: intermediate\n\n-seealso: `IS`, `PetscViewer`, `PetscViewerASCIIOpen()`, `ISViewFromOptions()`\n\n# External Links\n$(_doc_external(\"Vec/ISView\"))\n\"\"\"\nfunction ISView(petsclib::PetscLibType, is::IS, viewer::PetscViewer) end\n\n@for_petsc function ISView(petsclib::$UnionPetscLib, is::IS, viewer::PetscViewer )\n\n    @chk ccall(\n               (:ISView, $petsc_library),\n               PetscErrorCode,\n               (CIS, PetscViewer),\n               is, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLoad(petsclib::PetscLibType,is::IS, viewer::PetscViewer) \nLoads an index set that has been stored in binary or HDF5 format with `ISView()`.\n\nCollective\n\nInput Parameters:\n- `is`     - the newly loaded index set, this needs to have been created with `ISCreate()` or some related function before a call to `ISLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()` or HDF5 file viewer, obtained from `PetscViewerHDF5Open()`\n\nLevel: intermediate\n\n-seealso: `IS`, `PetscViewerBinaryOpen()`, `ISView()`, `MatLoad()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"Vec/ISLoad\"))\n\"\"\"\nfunction ISLoad(petsclib::PetscLibType, is::IS, viewer::PetscViewer) end\n\n@for_petsc function ISLoad(petsclib::$UnionPetscLib, is::IS, viewer::PetscViewer )\n\n    @chk ccall(\n               (:ISLoad, $petsc_library),\n               PetscErrorCode,\n               (CIS, PetscViewer),\n               is, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISSort(petsclib::PetscLibType,is::IS) \nSorts the indices of an index set.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nLevel: intermediate\n\n-seealso: `IS`, `ISSortRemoveDups()`, `ISSorted()`\n\n# External Links\n$(_doc_external(\"Vec/ISSort\"))\n\"\"\"\nfunction ISSort(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISSort(petsclib::$UnionPetscLib, is::IS )\n\n    @chk ccall(\n               (:ISSort, $petsc_library),\n               PetscErrorCode,\n               (CIS,),\n               is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISSortRemoveDups(petsclib::PetscLibType,is::IS) \nSorts the indices of an index set, removing duplicates.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nLevel: intermediate\n\n-seealso: `IS`, `ISSort()`, `ISSorted()`\n\n# External Links\n$(_doc_external(\"Vec/ISSortRemoveDups\"))\n\"\"\"\nfunction ISSortRemoveDups(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISSortRemoveDups(petsclib::$UnionPetscLib, is::IS )\n\n    @chk ccall(\n               (:ISSortRemoveDups, $petsc_library),\n               PetscErrorCode,\n               (CIS,),\n               is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISToGeneral(petsclib::PetscLibType,is::IS) \nConverts an IS object of any type to `ISGENERAL` type\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nLevel: intermediate\n\n-seealso: `IS`, `ISSorted()`\n\n# External Links\n$(_doc_external(\"Vec/ISToGeneral\"))\n\"\"\"\nfunction ISToGeneral(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISToGeneral(petsclib::$UnionPetscLib, is::IS )\n\n    @chk ccall(\n               (:ISToGeneral, $petsc_library),\n               PetscErrorCode,\n               (CIS,),\n               is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = ISSorted(petsclib::PetscLibType,is::IS) \nChecks the indices to determine whether they have been sorted.\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `flg` - output flag, either `PETSC_TRUE` if the index set is sorted,\nor `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `ISSort()`, `ISSortRemoveDups()`\n\n# External Links\n$(_doc_external(\"Vec/ISSorted\"))\n\"\"\"\nfunction ISSorted(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISSorted(petsclib::$UnionPetscLib, is::IS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISSorted, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{PetscBool}),\n               is, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tnewIS::IS = ISDuplicate(petsclib::PetscLibType,is::IS) \nCreates a duplicate copy of an index set.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `newIS` - the copy of the index set\n\nLevel: beginner\n\n-seealso: `IS`, `ISCreateGeneral()`, `ISCopy()`\n\n# External Links\n$(_doc_external(\"Vec/ISDuplicate\"))\n\"\"\"\nfunction ISDuplicate(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISDuplicate(petsclib::$UnionPetscLib, is::IS )\n\tnewIS_ = Ref{CIS}()\n\n    @chk ccall(\n               (:ISDuplicate, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{CIS}),\n               is, newIS_,\n              )\n\n\tnewIS = IS(newIS_[], petsclib)\n\n\treturn newIS\nend \n\n\"\"\"\n\tISCopy(petsclib::PetscLibType,is::IS, isy::IS) \nCopies an index set.\n\nCollective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `isy` - the copy of the index set\n\nLevel: beginner\n\n-seealso: `IS`, `ISDuplicate()`, `ISShift()`\n\n# External Links\n$(_doc_external(\"Vec/ISCopy\"))\n\"\"\"\nfunction ISCopy(petsclib::PetscLibType, is::IS, isy::IS) end\n\n@for_petsc function ISCopy(petsclib::$UnionPetscLib, is::IS, isy::IS )\n\n    @chk ccall(\n               (:ISCopy, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS),\n               is, isy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISShift(petsclib::PetscLibType,is::IS, offset::PetscInt, isy::IS) \nShift all indices by given offset\n\nCollective\n\nInput Parameters:\n- `is`     - the index set\n- `offset` - the offset\n\nOutput Parameter:\n- `isy` - the shifted copy of the input index set\n\nLevel: beginner\n\n-seealso: `ISDuplicate()`, `ISCopy()`\n\n# External Links\n$(_doc_external(\"Vec/ISShift\"))\n\"\"\"\nfunction ISShift(petsclib::PetscLibType, is::IS, offset::PetscInt, isy::IS) end\n\n@for_petsc function ISShift(petsclib::$UnionPetscLib, is::IS, offset::$PetscInt, isy::IS )\n\n    @chk ccall(\n               (:ISShift, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, CIS),\n               is, offset, isy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISOnComm(petsclib::PetscLibType,is::IS, comm::MPI_Comm, mode::PetscCopyMode, newis::IS) \nSplit a parallel `IS` on subcomms (usually self) or concatenate index sets on subcomms into a parallel index set\n\nCollective\n\nInput Parameters:\n- `is`   - index set\n- `comm` - communicator for new index set\n- `mode` - copy semantics, `PETSC_USE_POINTER` for no-copy if possible, otherwise `PETSC_COPY_VALUES`\n\nOutput Parameter:\n- `newis` - new `IS` on `comm`\n\nLevel: advanced\n\n-seealso: `IS`\n\n# External Links\n$(_doc_external(\"Vec/ISOnComm\"))\n\"\"\"\nfunction ISOnComm(petsclib::PetscLibType, is::IS, comm::MPI_Comm, mode::PetscCopyMode, newis::IS) end\n\n@for_petsc function ISOnComm(petsclib::$UnionPetscLib, is::IS, comm::MPI_Comm, mode::PetscCopyMode, newis::IS )\n\tnewis_ = Ref(newis.ptr)\n\n    @chk ccall(\n               (:ISOnComm, $petsc_library),\n               PetscErrorCode,\n               (CIS, MPI_Comm, PetscCopyMode, Ptr{CIS}),\n               is, comm, mode, newis_,\n              )\n\n\tnewis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISSetBlockSize(petsclib::PetscLibType,is::IS, bs::PetscInt) \ninforms an index set that it has a given block size\n\nLogicall Collective\n\nInput Parameters:\n- `is` - index set\n- `bs` - block size\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetBlockSize()`, `ISCreateBlock()`, `ISBlockGetIndices()`,\n\n# External Links\n$(_doc_external(\"Vec/ISSetBlockSize\"))\n\"\"\"\nfunction ISSetBlockSize(petsclib::PetscLibType, is::IS, bs::PetscInt) end\n\n@for_petsc function ISSetBlockSize(petsclib::$UnionPetscLib, is::IS, bs::$PetscInt )\n\n    @chk ccall(\n               (:ISSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt),\n               is, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt = ISGetBlockSize(petsclib::PetscLibType,is::IS) \nReturns the number of elements in a block.\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `size` - the number of elements in a block\n\nLevel: intermediate\n\n-seealso: `IS`, `ISBlockGetSize()`, `ISGetSize()`, `ISCreateBlock()`, `ISSetBlockSize()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetBlockSize\"))\n\"\"\"\nfunction ISGetBlockSize(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetBlockSize(petsclib::$UnionPetscLib, is::IS )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}),\n               is, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tISSetCompressOutput(petsclib::PetscLibType,is::IS, compress::PetscBool) \nset the flag for output compression\n\nLogicall Collective\n\nInput Parameters:\n- `is`       - index set\n- `compress` - flag for output compression\n\nLevel: intermediate\n\n-seealso: `IS`, `ISGetCompressOutput()`, `ISView()`\n\n# External Links\n$(_doc_external(\"Vec/ISSetCompressOutput\"))\n\"\"\"\nfunction ISSetCompressOutput(petsclib::PetscLibType, is::IS, compress::PetscBool) end\n\n@for_petsc function ISSetCompressOutput(petsclib::$UnionPetscLib, is::IS, compress::PetscBool )\n\n    @chk ccall(\n               (:ISSetCompressOutput, $petsc_library),\n               PetscErrorCode,\n               (CIS, PetscBool),\n               is, compress,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcompress::PetscBool = ISGetCompressOutput(petsclib::PetscLibType,is::IS) \nReturns the flag for output compression\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `compress` - the flag to compress output\n\nLevel: intermediate\n\n-seealso: `IS`, `ISSetCompressOutput()`, `ISView()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetCompressOutput\"))\n\"\"\"\nfunction ISGetCompressOutput(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISGetCompressOutput(petsclib::$UnionPetscLib, is::IS )\n\tcompress_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISGetCompressOutput, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{PetscBool}),\n               is, compress_,\n              )\n\n\tcompress = compress_[]\n\n\treturn compress\nend \n\n\"\"\"\n\tISRegisterAll(petsclib::PetscLibType) \nRegisters all of the index set components in the `IS` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `IS`, `ISType`, `ISRegister()`\n\n# External Links\n$(_doc_external(\"Vec/ISRegisterAll\"))\n\"\"\"\nfunction ISRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function ISRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:ISRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tis::IS = ISCreateGeneral(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) \nCreates a data structure for an index set containing a list of integers.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `n`    - the length of the index set\n- `idx`  - the list of integers\n- `mode` - `PETSC_COPY_VALUES`, `PETSC_OWN_POINTER`, or `PETSC_USE_POINTER`; see `PetscCopyMode` for meaning of this flag.\n\nOutput Parameter:\n- `is` - the new index set\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISGENERAL`, `ISCreateStride()`, `ISCreateBlock()`, `ISAllGather()`, `PETSC_COPY_VALUES`, `PETSC_OWN_POINTER`,\n`PETSC_USE_POINTER`, `PetscCopyMode`, `ISGeneralSetIndicesFromMask()`\n\n# External Links\n$(_doc_external(\"Vec/ISCreateGeneral\"))\n\"\"\"\nfunction ISCreateGeneral(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) end\n\n@for_petsc function ISCreateGeneral(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, idx::Vector{$PetscInt}, mode::PetscCopyMode )\n\tis_ = Ref{CIS}()\n\n    @chk ccall(\n               (:ISCreateGeneral, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, PetscCopyMode, Ptr{CIS}),\n               comm, n, idx, mode, is_,\n              )\n\n\tis = IS(is_[], petsclib)\n\n\treturn is\nend \n\n\"\"\"\n\tISGeneralSetIndices(petsclib::PetscLibType,is::IS, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) \nSets the indices for an `ISGENERAL` index set\n\nLogically Collective\n\nInput Parameters:\n- `is`   - the index set\n- `n`    - the length of the index set\n- `idx`  - the list of integers\n- `mode` - see `PetscCopyMode` for meaning of this flag.\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISBLOCK`, `ISCreateGeneral()`, `ISGeneralSetIndicesFromMask()`, `ISBlockSetIndices()`, `ISGENERAL`, `PetscCopyMode`\n\n# External Links\n$(_doc_external(\"Vec/ISGeneralSetIndices\"))\n\"\"\"\nfunction ISGeneralSetIndices(petsclib::PetscLibType, is::IS, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) end\n\n@for_petsc function ISGeneralSetIndices(petsclib::$UnionPetscLib, is::IS, n::$PetscInt, idx::Vector{$PetscInt}, mode::PetscCopyMode )\n\n    @chk ccall(\n               (:ISGeneralSetIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, Ptr{$PetscInt}, PetscCopyMode),\n               is, n, idx, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISGeneralSetIndicesFromMask(petsclib::PetscLibType,is::IS, rstart::PetscInt, rend::PetscInt, mask::Vector{PetscBool}) \nSets the indices for an `ISGENERAL` index set using a boolean mask\n\nCollective\n\nInput Parameters:\n- `is`     - the index set\n- `rstart` - the range start index (inclusive)\n- `rend`   - the range end index (exclusive)\n- `mask`   - the boolean mask array of length rend-rstart, indices will be set for each `PETSC_TRUE` value in the array\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISCreateGeneral()`, `ISGeneralSetIndices()`, `ISGENERAL`\n\n# External Links\n$(_doc_external(\"Vec/ISGeneralSetIndicesFromMask\"))\n\"\"\"\nfunction ISGeneralSetIndicesFromMask(petsclib::PetscLibType, is::IS, rstart::PetscInt, rend::PetscInt, mask::Vector{PetscBool}) end\n\n@for_petsc function ISGeneralSetIndicesFromMask(petsclib::$UnionPetscLib, is::IS, rstart::$PetscInt, rend::$PetscInt, mask::Vector{PetscBool} )\n\n    @chk ccall(\n               (:ISGeneralSetIndicesFromMask, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, $PetscInt, Ptr{PetscBool}),\n               is, rstart, rend, mask,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISGeneralFilter(petsclib::PetscLibType,is::IS, start::PetscInt, _::PetscInt) \nRemove all indices outside of [start, end) from an `ISGENERAL`\n\nCollective\n\nInput Parameters:\n- `is`    - the index set\n- `start` - the lowest index kept\n- `end`   - one more than the highest index kept, `start` ≤ `end_`\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISGENERAL`, `ISCreateGeneral()`, `ISGeneralSetIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISGeneralFilter\"))\n\"\"\"\nfunction ISGeneralFilter(petsclib::PetscLibType, is::IS, start::PetscInt, end_::PetscInt) end\n\n@for_petsc function ISGeneralFilter(petsclib::$UnionPetscLib, is::IS, start::$PetscInt, end_::$PetscInt )\n\n    @chk ccall(\n               (:ISGeneralFilter, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, $PetscInt),\n               is, start, end_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfirst::PetscInt,step::PetscInt = ISStrideGetInfo(petsclib::PetscLibType,is::IS) \nReturns the first index in a stride index set and the stride width from an `IS` of `ISType` `ISSTRIDE`\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameters:\n- `first` - the first index\n- `step`  - the stride width\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISCreateStride()`, `ISGetSize()`, `ISSTRIDE`\n\n# External Links\n$(_doc_external(\"Vec/ISStrideGetInfo\"))\n\"\"\"\nfunction ISStrideGetInfo(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISStrideGetInfo(petsclib::$UnionPetscLib, is::IS )\n\tfirst_ = Ref{$PetscInt}()\n\tstep_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISStrideGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               is, first_, step_,\n              )\n\n\tfirst = first_[]\n\tstep = step_[]\n\n\treturn first,step\nend \n\n\"\"\"\n\tISStrideSetStride(petsclib::PetscLibType,is::IS, n::PetscInt, first::PetscInt, step::PetscInt) \nSets the stride information for a stride index set.\n\nLogically Collective\n\nInput Parameters:\n- `is`    - the index set\n- `n`     - the length of the locally owned portion of the index set\n- `first` - the first element of the locally owned portion of the index set\n- `step`  - the change to the next index\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISCreateGeneral()`, `ISCreateBlock()`, `ISAllGather()`, `ISSTRIDE`, `ISCreateStride()`, `ISStrideGetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISStrideSetStride\"))\n\"\"\"\nfunction ISStrideSetStride(petsclib::PetscLibType, is::IS, n::PetscInt, first::PetscInt, step::PetscInt) end\n\n@for_petsc function ISStrideSetStride(petsclib::$UnionPetscLib, is::IS, n::$PetscInt, first::$PetscInt, step::$PetscInt )\n\n    @chk ccall(\n               (:ISStrideSetStride, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, $PetscInt, $PetscInt),\n               is, n, first, step,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tis::IS = ISCreateStride(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, first::PetscInt, step::PetscInt) \nCreates a data structure for an index set containing a list of evenly spaced integers.\n\nCollective\n\nInput Parameters:\n- `comm`  - the MPI communicator\n- `n`     - the length of the locally owned portion of the index set\n- `first` - the first element of the locally owned portion of the index set\n- `step`  - the change to the next index\n\nOutput Parameter:\n- `is` - the new index set\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISStrideSetStride()`, `ISCreateGeneral()`, `ISCreateBlock()`, `ISAllGather()`, `ISSTRIDE`\n\n# External Links\n$(_doc_external(\"Vec/ISCreateStride\"))\n\"\"\"\nfunction ISCreateStride(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, first::PetscInt, step::PetscInt) end\n\n@for_petsc function ISCreateStride(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, first::$PetscInt, step::$PetscInt )\n\tis_ = Ref{CIS}()\n\n    @chk ccall(\n               (:ISCreateStride, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{CIS}),\n               comm, n, first, step, is_,\n              )\n\n\tis = IS(is_[], petsclib)\n\n\treturn is\nend \n\n\"\"\"\n\tISBlockSetIndices(petsclib::PetscLibType,is::IS, bs::PetscInt, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) \nSet integers representing blocks of indices in an index set of `ISType` `ISBLOCK`\n\nCollective\n\nInput Parameters:\n- `is`   - the index set\n- `bs`   - number of elements in each block\n- `n`    - the length of the index set (the number of blocks)\n- `idx`  - the list of integers, one for each block, the integers contain the index of the first index of each block divided by the block size\n- `mode` - see `PetscCopyMode`, only `PETSC_COPY_VALUES` and `PETSC_OWN_POINTER` are supported\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISCreateStride()`, `ISCreateGeneral()`, `ISAllGather()`, `ISCreateBlock()`, `ISBLOCK`, `ISGeneralSetIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISBlockSetIndices\"))\n\"\"\"\nfunction ISBlockSetIndices(petsclib::PetscLibType, is::IS, bs::PetscInt, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) end\n\n@for_petsc function ISBlockSetIndices(petsclib::$UnionPetscLib, is::IS, bs::$PetscInt, n::$PetscInt, idx::Vector{$PetscInt}, mode::PetscCopyMode )\n\n    @chk ccall(\n               (:ISBlockSetIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, $PetscInt, Ptr{$PetscInt}, PetscCopyMode),\n               is, bs, n, idx, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tis::IS = ISCreateBlock(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) \nCreates a data structure for an index set containing\na list of integers. Each integer represents a fixed block size set of indices.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `bs`   - number of elements in each block\n- `n`    - the length of the index set (the number of blocks)\n- `idx`  - the list of integers, one for each block, the integers contain the index of the first entry of each block divided by the block size\n- `mode` - see `PetscCopyMode`, only `PETSC_COPY_VALUES` and `PETSC_OWN_POINTER` are supported in this routine\n\nOutput Parameter:\n- `is` - the new index set\n\nLevel: beginner\n\n-seealso: [](sec_scatter), `IS`, `ISCreateStride()`, `ISCreateGeneral()`, `ISAllGather()`, `ISBlockSetIndices()`, `ISBLOCK`, `ISGENERAL`\n\n# External Links\n$(_doc_external(\"Vec/ISCreateBlock\"))\n\"\"\"\nfunction ISCreateBlock(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode) end\n\n@for_petsc function ISCreateBlock(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, idx::Vector{$PetscInt}, mode::PetscCopyMode )\n\tis_ = Ref{CIS}()\n\n    @chk ccall(\n               (:ISCreateBlock, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscInt}, PetscCopyMode, Ptr{CIS}),\n               comm, bs, n, idx, mode, is_,\n              )\n\n\tis = IS(is_[], petsclib)\n\n\treturn is\nend \n\n\"\"\"\n\tidx::Vector{PetscInt} = ISBlockGetIndices(petsclib::PetscLibType,is::IS) \nGets the indices associated with each block in an `ISBLOCK`\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `idx` - the integer indices, one for each block and count of block not indices\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISBLOCK`, `ISGetIndices()`, `ISBlockRestoreIndices()`, `ISBlockSetIndices()`, `ISCreateBlock()`\n\n# External Links\n$(_doc_external(\"Vec/ISBlockGetIndices\"))\n\"\"\"\nfunction ISBlockGetIndices(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISBlockGetIndices(petsclib::$UnionPetscLib, is::IS )\n\tidx_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISBlockGetIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, idx_,\n              )\n\n\tidx = unsafe_wrap(Array, idx_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn idx\nend \n\n\"\"\"\n\tidx::Vector{PetscInt} = ISBlockRestoreIndices(petsclib::PetscLibType,is::IS) \nRestores the indices associated with each block  in an `ISBLOCK` obtained with `ISBlockGetIndices()`\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `idx` - the integer indices\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISBLOCK`, `ISRestoreIndices()`, `ISBlockGetIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISBlockRestoreIndices\"))\n\"\"\"\nfunction ISBlockRestoreIndices(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISBlockRestoreIndices(petsclib::$UnionPetscLib, is::IS )\n\tidx_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISBlockRestoreIndices, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{Ptr{$PetscInt}}),\n               is, idx_,\n              )\n\n\tidx = unsafe_wrap(Array, idx_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn idx\nend \n\n\"\"\"\n\tsize::PetscInt = ISBlockGetLocalSize(petsclib::PetscLibType,is::IS) \nReturns the local number of blocks in the index set of `ISType` `ISBLOCK`\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `size` - the local number of blocks\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISGetBlockSize()`, `ISBlockGetSize()`, `ISGetSize()`, `ISCreateBlock()`, `ISBLOCK`\n\n# External Links\n$(_doc_external(\"Vec/ISBlockGetLocalSize\"))\n\"\"\"\nfunction ISBlockGetLocalSize(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISBlockGetLocalSize(petsclib::$UnionPetscLib, is::IS )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISBlockGetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}),\n               is, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tsize::PetscInt = ISBlockGetSize(petsclib::PetscLibType,is::IS) \nReturns the global number of blocks in parallel in the index set of `ISType` `ISBLOCK`\n\nNot Collective\n\nInput Parameter:\n- `is` - the index set\n\nOutput Parameter:\n- `size` - the global number of blocks\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISGetBlockSize()`, `ISBlockGetLocalSize()`, `ISGetSize()`, `ISCreateBlock()`, `ISBLOCK`\n\n# External Links\n$(_doc_external(\"Vec/ISBlockGetSize\"))\n\"\"\"\nfunction ISBlockGetSize(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISBlockGetSize(petsclib::$UnionPetscLib, is::IS )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISBlockGetSize, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}),\n               is, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tISBuildTwoSided(petsclib::PetscLibType,ito::IS, toindx::IS, rows::IS) \nTakes an `IS` that describes where each element will be mapped globally over all ranks.\nGenerates an `IS` that contains new numbers from remote or local on the `IS`.\n\nCollective\n\nInput Parameters:\n- `ito`    - an `IS` describes to which rank each entry will be mapped. Negative target rank will be ignored\n- `toindx` - an `IS` describes what indices should send. `NULL` means sending natural numbering\n\nOutput Parameter:\n- `rows` - contains new numbers from remote or local\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `IS`, `MatPartitioningCreate()`, `ISPartitioningToNumbering()`, `ISPartitioningCount()`\n\n# External Links\n$(_doc_external(\"Vec/ISBuildTwoSided\"))\n\"\"\"\nfunction ISBuildTwoSided(petsclib::PetscLibType, ito::IS, toindx::IS, rows::IS) end\n\n@for_petsc function ISBuildTwoSided(petsclib::$UnionPetscLib, ito::IS, toindx::IS, rows::IS )\n\trows_ = Ref(rows.ptr)\n\n    @chk ccall(\n               (:ISBuildTwoSided, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CIS}),\n               ito, toindx, rows_,\n              )\n\n\trows.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISPartitioningToNumbering(petsclib::PetscLibType,part::IS, is::IS) \nTakes an `IS' that represents a partitioning (the MPI rank that each local entry belongs to) and on each MPI process\ngenerates an `IS` that contains a new global node number in the new ordering for each entry\n\nCollective\n\nInput Parameter:\n- `part` - a partitioning as generated by `MatPartitioningApply()` or `MatPartitioningApplyND()`\n\nOutput Parameter:\n- `is` - on each processor the index set that defines the global numbers\n(in the new numbering) for all the nodes currently (before the partitioning)\non that processor\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `IS`, `MatPartitioningCreate()`, `AOCreateBasic()`, `ISPartitioningCount()`\n\n# External Links\n$(_doc_external(\"Vec/ISPartitioningToNumbering\"))\n\"\"\"\nfunction ISPartitioningToNumbering(petsclib::PetscLibType, part::IS, is::IS) end\n\n@for_petsc function ISPartitioningToNumbering(petsclib::$UnionPetscLib, part::IS, is::IS )\n\tis_ = Ref(is.ptr)\n\n    @chk ccall(\n               (:ISPartitioningToNumbering, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{CIS}),\n               part, is_,\n              )\n\n\tis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tcount::Vector{PetscInt} = ISPartitioningCount(petsclib::PetscLibType,part::IS, len::PetscInt) \nTakes a `IS` that represents a partitioning (the MPI rank that each local entry belongs to) and determines the number of\nresulting elements on each (partition) rank\n\nCollective\n\nInput Parameters:\n- `part` - a partitioning as generated by `MatPartitioningApply()` or `MatPartitioningApplyND()`\n- `len`  - length of the array count, this is the total number of partitions\n\nOutput Parameter:\n- `count` - array of length size, to contain the number of elements assigned\nto each partition, where size is the number of partitions generated\n(see notes below).\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `IS`, `MatPartitioningCreate()`, `AOCreateBasic()`, `ISPartitioningToNumbering()`,\n`MatPartitioningSetNParts()`, `MatPartitioningApply()`, `MatPartitioningApplyND()`\n\n# External Links\n$(_doc_external(\"Vec/ISPartitioningCount\"))\n\"\"\"\nfunction ISPartitioningCount(petsclib::PetscLibType, part::IS, len::PetscInt) end\n\n@for_petsc function ISPartitioningCount(petsclib::$UnionPetscLib, part::IS, len::$PetscInt )\n\tcount = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:ISPartitioningCount, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, Ptr{$PetscInt}),\n               part, len, count,\n              )\n\n\n\treturn count\nend \n\n\"\"\"\n\tISAllGather(petsclib::PetscLibType,is::IS, isout::IS) \nGiven an index set `IS` on each processor, generates a large\nindex set (same on each processor) by concatenating together each\nprocessors index set.\n\nCollective\n\nInput Parameter:\n- `is` - the distributed index set\n\nOutput Parameter:\n- `isout` - the concatenated index set (same on all processors)\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISCreateGeneral()`, `ISCreateStride()`, `ISCreateBlock()`\n\n# External Links\n$(_doc_external(\"Vec/ISAllGather\"))\n\"\"\"\nfunction ISAllGather(petsclib::PetscLibType, is::IS, isout::IS) end\n\n@for_petsc function ISAllGather(petsclib::$UnionPetscLib, is::IS, isout::IS )\n\tisout_ = Ref(isout.ptr)\n\n    @chk ccall(\n               (:ISAllGather, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{CIS}),\n               is, isout_,\n              )\n\n\tisout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\toutN::PetscInt = ISAllGatherColors(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, lindices::Vector{ISColoringValue}, outindices::Vector{ISColoringValue}) \nGiven a set of colors on each processor, generates a large\nset (same on each processor) by concatenating together each processors colors\n\nCollective\n\nInput Parameters:\n- `comm`     - communicator to share the indices\n- `n`        - local size of set\n- `lindices` - local colors\n\nOutput Parameters:\n- `outN`       - total number of indices\n- `outindices` - all of the colors\n\nLevel: intermediate\n\n-seealso: `ISColoringValue`, `ISColoring()`, `ISCreateGeneral()`, `ISCreateStride()`, `ISCreateBlock()`, `ISAllGather()`\n\n# External Links\n$(_doc_external(\"Vec/ISAllGatherColors\"))\n\"\"\"\nfunction ISAllGatherColors(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, lindices::Vector{ISColoringValue}, outindices::Vector{ISColoringValue}) end\n\n@for_petsc function ISAllGatherColors(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, lindices::Vector{ISColoringValue}, outindices::Vector{ISColoringValue} )\n\toutN_ = Ref{$PetscInt}()\n\toutindices_ = Ref(pointer(outindices))\n\n    @chk ccall(\n               (:ISAllGatherColors, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{ISColoringValue}, Ptr{$PetscInt}, Ptr{Ptr{ISColoringValue}}),\n               comm, n, lindices, outN_, outindices_,\n              )\n\n\toutN = outN_[]\n\n\treturn outN\nend \n\n\"\"\"\n\tISComplement(petsclib::PetscLibType,is::IS, nmin::PetscInt, nmax::PetscInt, isout::IS) \nGiven an index set `IS` generates the complement index set. That is\nall indices that are NOT in the given set.\n\nCollective\n\nInput Parameters:\n- `is`   - the index set\n- `nmin` - the first index desired in the local part of the complement\n- `nmax` - the largest index desired in the local part of the complement (note that all indices in `is` must be greater or equal to `nmin` and less than `nmax`)\n\nOutput Parameter:\n- `isout` - the complement\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISCreateGeneral()`, `ISCreateStride()`, `ISCreateBlock()`, `ISAllGather()`\n\n# External Links\n$(_doc_external(\"Vec/ISComplement\"))\n\"\"\"\nfunction ISComplement(petsclib::PetscLibType, is::IS, nmin::PetscInt, nmax::PetscInt, isout::IS) end\n\n@for_petsc function ISComplement(petsclib::$UnionPetscLib, is::IS, nmin::$PetscInt, nmax::$PetscInt, isout::IS )\n\tisout_ = Ref(isout.ptr)\n\n    @chk ccall(\n               (:ISComplement, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, $PetscInt, Ptr{CIS}),\n               is, nmin, nmax, isout_,\n              )\n\n\tisout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISCompressIndicesGeneral(petsclib::PetscLibType,n::PetscInt, nkeys::PetscInt, bs::PetscInt, imax::PetscInt, is_in::Vector{IS}, is_out::Vector{IS}) \nconvert the indices of an array of `IS` into an array of `ISGENERAL` of block indices\n\nInput Parameters:\n- `n`     - maximum possible length of the index set\n- `nkeys` - expected number of keys when using `PETSC_USE_CTABLE`\n- `bs`    - the size of block\n- `imax`  - the number of index sets\n- `is_in` - the non-blocked array of index sets\n\nOutput Parameter:\n- `is_out` - the blocked new index set, as `ISGENERAL`, not as `ISBLOCK`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISGENERAL`, `ISExpandIndicesGeneral()`\n\n# External Links\n$(_doc_external(\"Vec/ISCompressIndicesGeneral\"))\n\"\"\"\nfunction ISCompressIndicesGeneral(petsclib::PetscLibType, n::PetscInt, nkeys::PetscInt, bs::PetscInt, imax::PetscInt, is_in::Vector{IS}, is_out::Vector{IS}) end\n\n@for_petsc function ISCompressIndicesGeneral(petsclib::$UnionPetscLib, n::$PetscInt, nkeys::$PetscInt, bs::$PetscInt, imax::$PetscInt, is_in::Vector{IS}, is_out::Vector{IS} )\n\n    @chk ccall(\n               (:ISCompressIndicesGeneral, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{CIS}, Ptr{CIS}),\n               n, nkeys, bs, imax, is_in, is_out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISExpandIndicesGeneral(petsclib::PetscLibType,n::PetscInt, nkeys::PetscInt, bs::PetscInt, imax::PetscInt, is_in::Vector{IS}, is_out::Vector{IS}) \nconvert the indices of an array `IS` into non\n\nInput Parameters:\n- `n`     - the length of the index set (not being used)\n- `nkeys` - expected number of keys when `PETSC_USE_CTABLE` is used\n- `bs`    - the size of block\n- `imax`  - the number of index sets\n- `is_in` - the blocked array of index sets, must be as large as `imax`\n\nOutput Parameter:\n- `is_out` - the non-blocked new index set, as `ISGENERAL`, must be as large as `imax`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISGENERAL`, `ISCompressIndicesGeneral()`\n\n# External Links\n$(_doc_external(\"Vec/ISExpandIndicesGeneral\"))\n\"\"\"\nfunction ISExpandIndicesGeneral(petsclib::PetscLibType, n::PetscInt, nkeys::PetscInt, bs::PetscInt, imax::PetscInt, is_in::Vector{IS}, is_out::Vector{IS}) end\n\n@for_petsc function ISExpandIndicesGeneral(petsclib::$UnionPetscLib, n::$PetscInt, nkeys::$PetscInt, bs::$PetscInt, imax::$PetscInt, is_in::Vector{IS}, is_out::Vector{IS} )\n\n    @chk ccall(\n               (:ISExpandIndicesGeneral, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{CIS}, Ptr{CIS}),\n               n, nkeys, bs, imax, is_in, is_out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISDifference(petsclib::PetscLibType,is1::IS, is2::IS, isout::IS) \nComputes the difference between two index sets.\n\nCollective\n\nInput Parameters:\n- `is1` - first index, to have items removed from it\n- `is2` - index values to be removed\n\nOutput Parameter:\n- `isout` - is1 - is2\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISDestroy()`, `ISView()`, `ISSum()`, `ISExpand()`\n\n# External Links\n$(_doc_external(\"Vec/ISDifference\"))\n\"\"\"\nfunction ISDifference(petsclib::PetscLibType, is1::IS, is2::IS, isout::IS) end\n\n@for_petsc function ISDifference(petsclib::$UnionPetscLib, is1::IS, is2::IS, isout::IS )\n\tisout_ = Ref(isout.ptr)\n\n    @chk ccall(\n               (:ISDifference, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CIS}),\n               is1, is2, isout_,\n              )\n\n\tisout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISSum(petsclib::PetscLibType,is1::IS, is2::IS, is3::IS) \nComputes the sum (union) of two index sets.\n\nOnly sequential version (at the moment)\n\nInput Parameters:\n- `is1` - index set to be extended\n- `is2` - index values to be added\n\nOutput Parameter:\n- `is3` - the sum; this can not be `is1` or `is2`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISDestroy()`, `ISView()`, `ISDifference()`, `ISExpand()`\n\n# External Links\n$(_doc_external(\"Vec/ISSum\"))\n\"\"\"\nfunction ISSum(petsclib::PetscLibType, is1::IS, is2::IS, is3::IS) end\n\n@for_petsc function ISSum(petsclib::$UnionPetscLib, is1::IS, is2::IS, is3::IS )\n\tis3_ = Ref(is3.ptr)\n\n    @chk ccall(\n               (:ISSum, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CIS}),\n               is1, is2, is3_,\n              )\n\n\tis3.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISExpand(petsclib::PetscLibType,is1::IS, is2::IS, isout::IS) \nComputes the union of two index sets, by concatenating 2 lists and\nremoving duplicates.\n\nCollective\n\nInput Parameters:\n- `is1` - first index set\n- `is2` - index values to be added\n\nOutput Parameter:\n- `isout` - `is1` + `is2` The index set `is2` is appended to `is1` removing duplicates\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISDestroy()`, `ISView()`, `ISDifference()`, `ISSum()`, `ISIntersect()`\n\n# External Links\n$(_doc_external(\"Vec/ISExpand\"))\n\"\"\"\nfunction ISExpand(petsclib::PetscLibType, is1::IS, is2::IS, isout::IS) end\n\n@for_petsc function ISExpand(petsclib::$UnionPetscLib, is1::IS, is2::IS, isout::IS )\n\tisout_ = Ref(isout.ptr)\n\n    @chk ccall(\n               (:ISExpand, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CIS}),\n               is1, is2, isout_,\n              )\n\n\tisout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISIntersect(petsclib::PetscLibType,is1::IS, is2::IS, isout::IS) \nComputes the intersection of two index sets, by sorting and comparing.\n\nCollective\n\nInput Parameters:\n- `is1` - first index set\n- `is2` - second index set\n\nOutput Parameter:\n- `isout` - the sorted intersection of `is1` and `is2`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISDestroy()`, `ISView()`, `ISDifference()`, `ISSum()`, `ISExpand()`, `ISConcatenate()`\n\n# External Links\n$(_doc_external(\"Vec/ISIntersect\"))\n\"\"\"\nfunction ISIntersect(petsclib::PetscLibType, is1::IS, is2::IS, isout::IS) end\n\n@for_petsc function ISIntersect(petsclib::$UnionPetscLib, is1::IS, is2::IS, isout::IS )\n\tisout_ = Ref(isout.ptr)\n\n    @chk ccall(\n               (:ISIntersect, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{CIS}),\n               is1, is2, isout_,\n              )\n\n\tisout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISConcatenate(petsclib::PetscLibType,comm::MPI_Comm, len::PetscInt, islist::Vector{IS}, isout::IS) \nForms a new `IS` by locally concatenating the indices from an `IS` list without reordering.\n\nCollective\n\nInput Parameters:\n- `comm`   - communicator of the concatenated `IS`.\n- `len`    - size of islist array (nonnegative)\n- `islist` - array of index sets\n\nOutput Parameter:\n- `isout` - The concatenated index set; empty, if `len` == 0.\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISDifference()`, `ISSum()`, `ISExpand()`, `ISIntersect()`\n\n# External Links\n$(_doc_external(\"Vec/ISConcatenate\"))\n\"\"\"\nfunction ISConcatenate(petsclib::PetscLibType, comm::MPI_Comm, len::PetscInt, islist::Vector{IS}, isout::IS) end\n\n@for_petsc function ISConcatenate(petsclib::$UnionPetscLib, comm::MPI_Comm, len::$PetscInt, islist::Vector{IS}, isout::IS )\n\tisout_ = Ref(isout.ptr)\n\n    @chk ccall(\n               (:ISConcatenate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{CIS}, Ptr{CIS}),\n               comm, len, islist, isout_,\n              )\n\n\tisout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISListToPair(petsclib::PetscLibType,comm::MPI_Comm, listlen::PetscInt, islist::Vector{IS}, xis::IS, yis::IS) \nConvert an `IS` list to a pair of `IS` of equal length defining an equivalent integer multimap.\nEach `IS` in `islist` is assigned an integer j so that all of the indices of that `IS` are\nmapped to j.\n\nCollective\n\nInput Parameters:\n- `comm`    - `MPI_Comm`\n- `listlen` - `IS` list length\n- `islist`  - `IS` list\n\nOutput Parameters:\n- `xis` - domain `IS`\n- `yis` - range  `IS`\n\nLevel: developer\n\n-seealso: `IS`, `ISPairToList()`\n\n# External Links\n$(_doc_external(\"Vec/ISListToPair\"))\n\"\"\"\nfunction ISListToPair(petsclib::PetscLibType, comm::MPI_Comm, listlen::PetscInt, islist::Vector{IS}, xis::IS, yis::IS) end\n\n@for_petsc function ISListToPair(petsclib::$UnionPetscLib, comm::MPI_Comm, listlen::$PetscInt, islist::Vector{IS}, xis::IS, yis::IS )\n\txis_ = Ref(xis.ptr)\n\tyis_ = Ref(yis.ptr)\n\n    @chk ccall(\n               (:ISListToPair, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{CIS}, Ptr{CIS}, Ptr{CIS}),\n               comm, listlen, islist, xis_, yis_,\n              )\n\n\txis.ptr = C_NULL\n\tyis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tlistlen::PetscInt = ISPairToList(petsclib::PetscLibType,xis::IS, yis::IS, islist::IS) \nConvert an `IS` pair encoding an integer map to a list of `IS`.\n\nCollective\n\nInput Parameters:\n- `xis` - domain `IS`\n- `yis` - range `IS`, the maximum value must be less than `PETSC_MPI_INT_MAX`\n\nOutput Parameters:\n- `listlen` - length of `islist`\n- `islist`  - list of `IS`s breaking up indices by color\n\nLevel: developer\n\n-seealso: `IS`, `ISListToPair()`\n\n# External Links\n$(_doc_external(\"Vec/ISPairToList\"))\n\"\"\"\nfunction ISPairToList(petsclib::PetscLibType, xis::IS, yis::IS, islist::IS) end\n\n@for_petsc function ISPairToList(petsclib::$UnionPetscLib, xis::IS, yis::IS, islist::IS )\n\tlistlen_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISPairToList, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{$PetscInt}, CIS),\n               xis, yis, listlen_, islist,\n              )\n\n\tlistlen = listlen_[]\n\n\treturn listlen\nend \n\n\"\"\"\n\tISEmbed(petsclib::PetscLibType,a::IS, b::IS, drop::PetscBool, c::IS) \nEmbed `IS` `a` into `IS` `b` by finding the locations in `b` that have the same indices as in `a`.\nIf `c` is the `IS` of these locations, we have `a = b*c`, regarded as a composition of the\ncorresponding `ISLocalToGlobalMapping`.\n\nNot Collective\n\nInput Parameters:\n- `a`    - `IS` to embed\n- `b`    - `IS` to embed into\n- `drop` - flag indicating whether to drop indices of `a` that are not in `b`.\n\nOutput Parameter:\n- `c` - local embedding indices\n\nLevel: developer\n\n-seealso: `IS`, `ISLocalToGlobalMapping`\n\n# External Links\n$(_doc_external(\"Vec/ISEmbed\"))\n\"\"\"\nfunction ISEmbed(petsclib::PetscLibType, a::IS, b::IS, drop::PetscBool, c::IS) end\n\n@for_petsc function ISEmbed(petsclib::$UnionPetscLib, a::IS, b::IS, drop::PetscBool, c::IS )\n\tc_ = Ref(c.ptr)\n\n    @chk ccall(\n               (:ISEmbed, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, PetscBool, Ptr{CIS}),\n               a, b, drop, c_,\n              )\n\n\tc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tISSortPermutation(petsclib::PetscLibType,f::IS, always::PetscBool, h::IS) \ncalculate the permutation of the indices into a nondecreasing order.\n\nNot Collective\n\nInput Parameters:\n- `f`      - `IS` to sort\n- `always` - build the permutation even when `f`'s indices are nondecreasing.\n\nOutput Parameter:\n- `h` - permutation or `NULL`, if `f` is nondecreasing and `always` == `PETSC_FALSE`.\n\nLevel: advanced\n\n-seealso: `IS`, `ISLocalToGlobalMapping`, `ISSort()`\n\n# External Links\n$(_doc_external(\"Vec/ISSortPermutation\"))\n\"\"\"\nfunction ISSortPermutation(petsclib::PetscLibType, f::IS, always::PetscBool, h::IS) end\n\n@for_petsc function ISSortPermutation(petsclib::$UnionPetscLib, f::IS, always::PetscBool, h::IS )\n\th_ = Ref(h.ptr)\n\n    @chk ccall(\n               (:ISSortPermutation, $petsc_library),\n               PetscErrorCode,\n               (CIS, PetscBool, Ptr{CIS}),\n               f, always, h_,\n              )\n\n\th.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = ISEqual(petsclib::PetscLibType,is1::IS, is2::IS) \nCompares if two index sets have the same set of indices.\n\nCollective\n\nInput Parameters:\n- `is1` - first index set to compare\n- `is2` - second index set to compare\n\nOutput Parameter:\n- `flg` - output flag, either `PETSC_TRUE` (if both index sets have the\nsame indices), or `PETSC_FALSE` if the index sets differ by size\nor by the set of indices)\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISEqualUnsorted()`\n\n# External Links\n$(_doc_external(\"Vec/ISEqual\"))\n\"\"\"\nfunction ISEqual(petsclib::PetscLibType, is1::IS, is2::IS) end\n\n@for_petsc function ISEqual(petsclib::$UnionPetscLib, is1::IS, is2::IS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISEqual, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{PetscBool}),\n               is1, is2, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = ISEqualUnsorted(petsclib::PetscLibType,is1::IS, is2::IS) \nCompares if two index sets have the same indices.\n\nCollective\n\nInput Parameters:\n- `is1` - first index set to compare\n- `is2` - second index set to compare\n\nOutput Parameter:\n- `flg` - output flag, either `PETSC_TRUE` (if both index sets have the\nsame indices), or `PETSC_FALSE` if the index sets differ by size\nor by the set of indices)\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISEqual()`\n\n# External Links\n$(_doc_external(\"Vec/ISEqualUnsorted\"))\n\"\"\"\nfunction ISEqualUnsorted(petsclib::PetscLibType, is1::IS, is2::IS) end\n\n@for_petsc function ISEqualUnsorted(petsclib::$UnionPetscLib, is1::IS, is2::IS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:ISEqualUnsorted, $petsc_library),\n               PetscErrorCode,\n               (CIS, CIS, Ptr{PetscBool}),\n               is1, is2, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt,points::Vector{PetscInt} = ISGetPointRange(petsclib::PetscLibType,pointIS::IS) \nReturns a description of the points in an `IS` suitable for traversal\n\nNot Collective\n\nInput Parameter:\n- `pointIS` - The `IS` object\n\nOutput Parameters:\n- `pStart` - The first index, see notes\n- `pEnd`   - One past the last index, see notes\n- `points` - The indices, see notes\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISRestorePointRange()`, `ISGetPointSubrange()`, `ISGetIndices()`, `ISCreateStride()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetPointRange\"))\n\"\"\"\nfunction ISGetPointRange(petsclib::PetscLibType, pointIS::IS) end\n\n@for_petsc function ISGetPointRange(petsclib::$UnionPetscLib, pointIS::IS )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\tpoints_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISGetPointRange, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               pointIS, pStart_, pEnd_, points_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\tpoints = unsafe_wrap(Array, points_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pStart,pEnd,points\nend \n\n\"\"\"\n\tISRestorePointRange(petsclib::PetscLibType,pointIS::IS, pStart::PetscInt, pEnd::PetscInt, points::Vector{PetscInt}) \nDestroys the traversal description created with `ISGetPointRange()`\n\nNot Collective\n\nInput Parameters:\n- `pointIS` - The `IS` object\n- `pStart`  - The first index, from `ISGetPointRange()`\n- `pEnd`    - One past the last index, from `ISGetPointRange()`\n- `points`  - The indices, from `ISGetPointRange()`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISGetPointRange()`, `ISGetPointSubrange()`, `ISGetIndices()`, `ISCreateStride()`\n\n# External Links\n$(_doc_external(\"Vec/ISRestorePointRange\"))\n\"\"\"\nfunction ISRestorePointRange(petsclib::PetscLibType, pointIS::IS, pStart::PetscInt, pEnd::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function ISRestorePointRange(petsclib::$UnionPetscLib, pointIS::IS, pStart::$PetscInt, pEnd::$PetscInt, points::Vector{$PetscInt} )\n\tpoints_ = Ref(pointer(points))\n\n    @chk ccall(\n               (:ISRestorePointRange, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               pointIS, pStart, pEnd, points_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISGetPointSubrange(petsclib::PetscLibType,subpointIS::IS, pStart::PetscInt, pEnd::PetscInt, points::Vector{PetscInt}) \nConfigures the input `IS` to be a subrange for the traversal information given\n\nNot Collective\n\nInput Parameters:\n- `subpointIS` - The `IS` object to be configured\n- `pStart`     - The first index of the subrange\n- `pEnd`       - One past the last index for the subrange\n- `points`     - The indices for the entire range, from `ISGetPointRange()`\n\nOutput Parameters:\n- `subpointIS` - The `IS` object now configured to be a subrange\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `ISGetPointRange()`, `ISRestorePointRange()`, `ISGetIndices()`, `ISCreateStride()`\n\n# External Links\n$(_doc_external(\"Vec/ISGetPointSubrange\"))\n\"\"\"\nfunction ISGetPointSubrange(petsclib::PetscLibType, subpointIS::IS, pStart::PetscInt, pEnd::PetscInt, points::Vector{PetscInt}) end\n\n@for_petsc function ISGetPointSubrange(petsclib::$UnionPetscLib, subpointIS::IS, pStart::$PetscInt, pEnd::$PetscInt, points::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:ISGetPointSubrange, $petsc_library),\n               PetscErrorCode,\n               (CIS, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               subpointIS, pStart, pEnd, points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnout::PetscInt,idxout::Vector{PetscInt} = ISGlobalToLocalMappingApply(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::PetscInt, idx::Vector{PetscInt}) \nProvides the local numbering for a list of integers\nspecified with a global numbering.\n\nNot Collective\n\nInput Parameters:\n- `mapping` - mapping between local and global numbering\n- `type`    - `IS_GTOLM_MASK` - maps global indices with no local value to -1 in the output list (i.e., mask them)\n`IS_GTOLM_DROP` - drops the indices with no local value from the output list\n- `n`       - number of global indices to map\n- `idx`     - global indices to map\n\nOutput Parameters:\n- `nout`   - number of indices in output array (if type == `IS_GTOLM_MASK` then nout = n)\n- `idxout` - local index of each global index, one must pass in an array long enough\nto hold all the indices. You can call `ISGlobalToLocalMappingApply()` with\nidxout == NULL to determine the required length (returned in nout)\nand then allocate the required space and call `ISGlobalToLocalMappingApply()`\na second time to set the values.\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingApply()`, `ISGlobalToLocalMappingApplyBlock()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/ISGlobalToLocalMappingApply\"))\n\"\"\"\nfunction ISGlobalToLocalMappingApply(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::PetscInt, idx::Vector{PetscInt}) end\n\n@for_petsc function ISGlobalToLocalMappingApply(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::$PetscInt, idx::Vector{$PetscInt} )\n\tnout_ = Ref{$PetscInt}()\n\tidxout = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:ISGlobalToLocalMappingApply, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, ISGlobalToLocalMappingMode, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mapping, type, n, idx, nout_, idxout,\n              )\n\n\tnout = nout_[]\n\n\treturn nout,idxout\nend \n\n\"\"\"\n\tISGlobalToLocalMappingApplyIS(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, is::IS, newis::IS) \nCreates from an `IS` in the global numbering\na new index set using the local numbering defined in an `ISLocalToGlobalMapping`\ncontext.\n\nNot Collective\n\nInput Parameters:\n- `mapping` - mapping between local and global numbering\n- `type`    - `IS_GTOLM_MASK` - maps global indices with no local value to -1 in the output list (i.e., mask them)\n`IS_GTOLM_DROP` - drops the indices with no local value from the output list\n- `is`      - index set in global numbering\n\nOutput Parameter:\n- `newis` - index set in local numbering\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISGlobalToLocalMapping`, `ISGlobalToLocalMappingApply()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/ISGlobalToLocalMappingApplyIS\"))\n\"\"\"\nfunction ISGlobalToLocalMappingApplyIS(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, is::IS, newis::IS) end\n\n@for_petsc function ISGlobalToLocalMappingApplyIS(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, is::IS, newis::IS )\n\tnewis_ = Ref(newis.ptr)\n\n    @chk ccall(\n               (:ISGlobalToLocalMappingApplyIS, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, ISGlobalToLocalMappingMode, CIS, Ptr{CIS}),\n               mapping, type, is, newis_,\n              )\n\n\tnewis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tnout::PetscInt,idxout::Vector{PetscInt} = ISGlobalToLocalMappingApplyBlock(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::PetscInt, idx::Vector{PetscInt}) \nProvides the local block numbering for a list of integers\nspecified with a block global numbering.\n\nNot Collective\n\nInput Parameters:\n- `mapping` - mapping between local and global numbering\n- `type`    - `IS_GTOLM_MASK` - maps global indices with no local value to -1 in the output list (i.e., mask them)\n`IS_GTOLM_DROP` - drops the indices with no local value from the output list\n- `n`       - number of global indices to map\n- `idx`     - global indices to map\n\nOutput Parameters:\n- `nout`   - number of indices in output array (if type == `IS_GTOLM_MASK` then nout = n)\n- `idxout` - local index of each global index, one must pass in an array long enough\nto hold all the indices. You can call `ISGlobalToLocalMappingApplyBlock()` with\nidxout == NULL to determine the required length (returned in nout)\nand then allocate the required space and call `ISGlobalToLocalMappingApplyBlock()`\na second time to set the values.\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingApply()`, `ISGlobalToLocalMappingApply()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/ISGlobalToLocalMappingApplyBlock\"))\n\"\"\"\nfunction ISGlobalToLocalMappingApplyBlock(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::PetscInt, idx::Vector{PetscInt}) end\n\n@for_petsc function ISGlobalToLocalMappingApplyBlock(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::$PetscInt, idx::Vector{$PetscInt} )\n\tnout_ = Ref{$PetscInt}()\n\tidxout = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:ISGlobalToLocalMappingApplyBlock, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, ISGlobalToLocalMappingMode, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mapping, type, n, idx, nout_, idxout,\n              )\n\n\tnout = nout_[]\n\n\treturn nout,idxout\nend \n\n\"\"\"\n\tISFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `IS` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Vec/ISFinalizePackage\"))\n\"\"\"\nfunction ISFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function ISFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:ISFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `IS` package. It is called\nfrom PetscDLLibraryRegister_petscvec() when using dynamic libraries, and on the first call to ISCreateXXXX()\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Vec/ISInitializePackage\"))\n\"\"\"\nfunction ISInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function ISInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:ISInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISComplementVec(petsclib::PetscLibType,S::IS, V::PetscVec, T::IS) \nCreates the complement of the index set relative to a layout defined by a `Vec`\n\nCollective\n\nInput Parameters:\n- `S` - a PETSc `IS`\n- `V` - the reference vector space\n\nOutput Parameter:\n- `T` - the complement of S\n\nLevel: advanced\n\n-seealso: `IS`, `Vec`, `ISCreateGeneral()`\n\n# External Links\n$(_doc_external(\"Vec/ISComplementVec\"))\n\"\"\"\nfunction ISComplementVec(petsclib::PetscLibType, S::IS, V::PetscVec, T::IS) end\n\n@for_petsc function ISComplementVec(petsclib::$UnionPetscLib, S::IS, V::PetscVec, T::IS )\n\tT_ = Ref(T.ptr)\n\n    @chk ccall(\n               (:ISComplementVec, $petsc_library),\n               PetscErrorCode,\n               (CIS, CVec, Ptr{CIS}),\n               S, V, T_,\n              )\n\n\tT.ptr = C_NULL\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/ISaddons_wrappers.jl",
    "content": "\"\"\"\n\tnltog::ISLocalToGlobalMapping = ISLocalToGlobalMappingDuplicate(petsclib::PetscLibType,ltog::ISLocalToGlobalMapping) \nDuplicates the local to global mapping object\n\nNot Collective\n\nInput Parameter:\n- `ltog` - local to global mapping\n\nOutput Parameter:\n- `nltog` - the duplicated local to global mapping\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingDuplicate\"))\n\"\"\"\nfunction ISLocalToGlobalMappingDuplicate(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingDuplicate(petsclib::$UnionPetscLib, ltog::ISLocalToGlobalMapping )\n\tnltog_ = Ref{ISLocalToGlobalMapping}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingDuplicate, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{ISLocalToGlobalMapping}),\n               ltog, nltog_,\n              )\n\n\tnltog = nltog_[]\n\n\treturn nltog\nend \n\n\"\"\"\n\tn::PetscInt = ISLocalToGlobalMappingGetSize(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nGets the local size of a local to global mapping\n\nNot Collective\n\nInput Parameter:\n- `mapping` - local to global mapping\n\nOutput Parameter:\n- `n` - the number of entries in the local mapping, `ISLocalToGlobalMappingGetIndices()` returns an array of this length\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetSize\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetSize(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetSize(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetSize, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}),\n               mapping, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tISLocalToGlobalMappingViewFromOptions(petsclib::PetscLibType,A::ISLocalToGlobalMapping, obj::PetscObject, name::String) \nView an `ISLocalToGlobalMapping` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the local to global mapping object\n- `obj`  - Optional object that provides the options prefix used for the options database query\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `PetscViewer`, `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingView`, `PetscObjectViewFromOptions()`, `ISLocalToGlobalMappingCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingViewFromOptions\"))\n\"\"\"\nfunction ISLocalToGlobalMappingViewFromOptions(petsclib::PetscLibType, A::ISLocalToGlobalMapping, obj::PetscObject, name::String) end\n\n@for_petsc function ISLocalToGlobalMappingViewFromOptions(petsclib::$UnionPetscLib, A::ISLocalToGlobalMapping, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingView(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, viewer::PetscViewer) \nView a local to global mapping\n\nCollective on viewer\n\nInput Parameters:\n- `mapping` - local to global mapping\n- `viewer`  - viewer\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `PetscViewer`, `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingView\"))\n\"\"\"\nfunction ISLocalToGlobalMappingView(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, viewer::PetscViewer) end\n\n@for_petsc function ISLocalToGlobalMappingView(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, viewer::PetscViewer )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingView, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, PetscViewer),\n               mapping, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingLoad(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, viewer::PetscViewer) \nLoads a local\n\nCollective on viewer\n\nInput Parameters:\n- `mapping` - the newly loaded map, this needs to have been created with `ISLocalToGlobalMappingCreate()` or some related function before a call to `ISLocalToGlobalMappingLoad()`\n- `viewer`  - binary file viewer, obtained from `PetscViewerBinaryOpen()`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `PetscViewer`, `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingView()`, `ISLocalToGlobalMappingCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingLoad\"))\n\"\"\"\nfunction ISLocalToGlobalMappingLoad(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, viewer::PetscViewer) end\n\n@for_petsc function ISLocalToGlobalMappingLoad(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, viewer::PetscViewer )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingLoad, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, PetscViewer),\n               mapping, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmapping::ISLocalToGlobalMapping = ISLocalToGlobalMappingCreateIS(petsclib::PetscLibType,is::IS) \nCreates a mapping between a local (0 to n)\nordering and a global parallel ordering.\n\nNot Collective\n\nInput Parameter:\n- `is` - index set containing the global numbers for each local number\n\nOutput Parameter:\n- `mapping` - new mapping data structure\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingCreateIS\"))\n\"\"\"\nfunction ISLocalToGlobalMappingCreateIS(petsclib::PetscLibType, is::IS) end\n\n@for_petsc function ISLocalToGlobalMappingCreateIS(petsclib::$UnionPetscLib, is::IS )\n\tmapping_ = Ref{ISLocalToGlobalMapping}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingCreateIS, $petsc_library),\n               PetscErrorCode,\n               (CIS, Ptr{ISLocalToGlobalMapping}),\n               is, mapping_,\n              )\n\n\tmapping = mapping_[]\n\n\treturn mapping\nend \n\n\"\"\"\n\tmapping::ISLocalToGlobalMapping = ISLocalToGlobalMappingCreateSF(petsclib::PetscLibType,sf::PetscSF, start::PetscInt) \nCreates a mapping between a local (0 to n) ordering and a global parallel ordering induced by a star forest.\n\nCollective\n\nInput Parameters:\n- `sf`    - star forest mapping contiguous local indices to (rank, offset)\n- `start` - first global index on this process, or `PETSC_DECIDE` to compute contiguous global numbering automatically\n\nOutput Parameter:\n- `mapping` - new mapping data structure\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `PetscSF`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingCreateSF\"))\n\"\"\"\nfunction ISLocalToGlobalMappingCreateSF(petsclib::PetscLibType, sf::PetscSF, start::PetscInt) end\n\n@for_petsc function ISLocalToGlobalMappingCreateSF(petsclib::$UnionPetscLib, sf::PetscSF, start::$PetscInt )\n\tmapping_ = Ref{ISLocalToGlobalMapping}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingCreateSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, $PetscInt, Ptr{ISLocalToGlobalMapping}),\n               sf, start, mapping_,\n              )\n\n\tmapping = mapping_[]\n\n\treturn mapping\nend \n\n\"\"\"\n\tISLocalToGlobalMappingSetBlockSize(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, bs::PetscInt) \nSets the blocksize of the mapping\n\nNot Collective\n\nInput Parameters:\n- `mapping` - mapping data structure\n- `bs`      - the blocksize\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingSetBlockSize\"))\n\"\"\"\nfunction ISLocalToGlobalMappingSetBlockSize(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, bs::PetscInt) end\n\n@for_petsc function ISLocalToGlobalMappingSetBlockSize(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, bs::$PetscInt )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, $PetscInt),\n               mapping, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = ISLocalToGlobalMappingGetBlockSize(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nGets the blocksize of the mapping\nordering and a global parallel ordering.\n\nNot Collective\n\nInput Parameter:\n- `mapping` - mapping data structure\n\nOutput Parameter:\n- `bs` - the blocksize\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetBlockSize\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetBlockSize(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetBlockSize(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}),\n               mapping, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\tmapping::ISLocalToGlobalMapping = ISLocalToGlobalMappingCreate(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, indices::Vector{PetscInt}, mode::PetscCopyMode) \nCreates a mapping between a local (0 to n)\nordering and a global parallel ordering.\n\nNot Collective, but communicator may have more than one process\n\nInput Parameters:\n- `comm`    - MPI communicator\n- `bs`      - the block size\n- `n`       - the number of local elements divided by the block size, or equivalently the number of block indices\n- `indices` - the global index for each local element, these do not need to be in increasing order (sorted), these values should not be scaled (i.e. multiplied) by the blocksize bs\n- `mode`    - see PetscCopyMode\n\nOutput Parameter:\n- `mapping` - new mapping data structure\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingSetFromOptions()`,\n`ISLOCALTOGLOBALMAPPINGBASIC`, `ISLOCALTOGLOBALMAPPINGHASH`\n`ISLocalToGlobalMappingSetType()`, `ISLocalToGlobalMappingType`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingCreate\"))\n\"\"\"\nfunction ISLocalToGlobalMappingCreate(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, indices::Vector{PetscInt}, mode::PetscCopyMode) end\n\n@for_petsc function ISLocalToGlobalMappingCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, indices::Vector{$PetscInt}, mode::PetscCopyMode )\n\tmapping_ = Ref{ISLocalToGlobalMapping}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscInt}, PetscCopyMode, Ptr{ISLocalToGlobalMapping}),\n               comm, bs, n, indices, mode, mapping_,\n              )\n\n\tmapping = mapping_[]\n\n\treturn mapping\nend \n\n\"\"\"\n\tISLocalToGlobalMappingSetFromOptions(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nSet mapping options from the options database.\n\nNot Collective\n\nInput Parameter:\n- `mapping` - mapping data structure\n\nOptions Database Key:\n- `-islocaltoglobalmapping_type` - <basic,hash> nonscalable and scalable versions\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingDestroy()`,\n`ISLocalToGlobalMappingCreateIS()`, `ISLOCALTOGLOBALMAPPINGBASIC`,\n`ISLOCALTOGLOBALMAPPINGHASH`, `ISLocalToGlobalMappingSetType()`, `ISLocalToGlobalMappingType`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingSetFromOptions\"))\n\"\"\"\nfunction ISLocalToGlobalMappingSetFromOptions(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingSetFromOptions(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping,),\n               mapping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingDestroy(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nDestroys a mapping between a local (0 to n)\nordering and a global parallel ordering.\n\nNot Collective\n\nInput Parameter:\n- `mapping` - mapping data structure\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingDestroy\"))\n\"\"\"\nfunction ISLocalToGlobalMappingDestroy(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingDestroy(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{ISLocalToGlobalMapping},),\n               mapping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingApplyIS(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, is::IS, newis::IS) \nCreates from an `IS` in the local numbering\na new index set using the global numbering defined in an `ISLocalToGlobalMapping`\ncontext.\n\nCollective\n\nInput Parameters:\n- `mapping` - mapping between local and global numbering\n- `is`      - index set in local numbering\n\nOutput Parameter:\n- `newis` - index set in global numbering\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingApply()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingDestroy()`, `ISGlobalToLocalMappingApply()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingApplyIS\"))\n\"\"\"\nfunction ISLocalToGlobalMappingApplyIS(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, is::IS, newis::IS) end\n\n@for_petsc function ISLocalToGlobalMappingApplyIS(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, is::IS, newis::IS )\n\tnewis_ = Ref(newis.ptr)\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingApplyIS, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, CIS, Ptr{CIS}),\n               mapping, is, newis_,\n              )\n\n\tnewis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tout::Vector{PetscInt} = ISLocalToGlobalMappingApply(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, N::PetscInt, in::Vector{PetscInt}) \nTakes a list of integers in a local numbering\nand converts them to the global numbering.\n\nNot Collective\n\nInput Parameters:\n- `mapping` - the local to global mapping context\n- `N`       - number of integers\n- `in`      - input indices in local numbering\n\nOutput Parameter:\n- `out` - indices in global numbering\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingApplyBlock()`, `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingDestroy()`,\n`ISLocalToGlobalMappingApplyIS()`, `AOCreateBasic()`, `AOApplicationToPetsc()`,\n`AOPetscToApplication()`, `ISGlobalToLocalMappingApply()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingApply\"))\n\"\"\"\nfunction ISLocalToGlobalMappingApply(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, N::PetscInt, in::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingApply(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, N::$PetscInt, in::Vector{$PetscInt} )\n\tout = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingApply, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mapping, N, in, out,\n              )\n\n\n\treturn out\nend \n\n\"\"\"\n\tout::Vector{PetscInt} = ISLocalToGlobalMappingApplyBlock(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, N::PetscInt, in::Vector{PetscInt}) \nTakes a list of integers in a local block numbering and converts them to the global block numbering\n\nNot Collective\n\nInput Parameters:\n- `mapping` - the local to global mapping context\n- `N`       - number of integers\n- `in`      - input indices in local block numbering\n\nOutput Parameter:\n- `out` - indices in global block numbering\n\nExample:\nIf the index values are {0,1,6,7} set with a call to `ISLocalToGlobalMappingCreate`(`PETSC_COMM_SELF`,2,2,{0,3}) then the mapping applied to 0\n(the first block) would produce 0 and the mapping applied to 1 (the second block) would produce 3.\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingApply()`, `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingDestroy()`,\n`ISLocalToGlobalMappingApplyIS()`, `AOCreateBasic()`, `AOApplicationToPetsc()`,\n`AOPetscToApplication()`, `ISGlobalToLocalMappingApply()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingApplyBlock\"))\n\"\"\"\nfunction ISLocalToGlobalMappingApplyBlock(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, N::PetscInt, in::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingApplyBlock(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, N::$PetscInt, in::Vector{$PetscInt} )\n\tout = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingApplyBlock, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mapping, N, in, out,\n              )\n\n\n\treturn out\nend \n\n\"\"\"\n\tnproc::PetscInt,procs::Vector{PetscInt},numprocs::Vector{PetscInt},indices::Vector{PetscInt} = ISLocalToGlobalMappingGetBlockInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nGets the neighbor information\n\nCollective the first time it is called\n\nInput Parameter:\n- `mapping` - the mapping from local to global indexing\n\nOutput Parameters:\n- `nproc`    - number of processes that are connected to the calling process\n- `procs`    - neighboring processes\n- `numprocs` - number of block indices for each process\n- `indices`  - block indices (in local numbering) shared with neighbors (sorted by global numbering)\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingRestoreBlockInfo()`, `ISLocalToGlobalMappingGetBlockMultiLeavesSF()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetBlockInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetBlockInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetBlockInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\tnproc_ = Ref{$PetscInt}()\n\tprocs_ = Ref{Ptr{$PetscInt}}()\n\tnumprocs_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetBlockInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, nproc_, procs_, numprocs_, indices,\n              )\n\n\tnproc = nproc_[]\n\tprocs = unsafe_wrap(Array, procs_[], VecGetLocalSize(petsclib, x); own = false)\n\tnumprocs = unsafe_wrap(Array, numprocs_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nproc,procs,numprocs,indices\nend \n\n\"\"\"\n\tn::PetscInt,n_procs::Vector{PetscInt},procs::Vector{PetscInt} = ISLocalToGlobalMappingGetBlockNodeInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nGets the neighbor information for each local block index\n\nCollective the first time it is called\n\nInput Parameter:\n- `mapping` - the mapping from local to global indexing\n\nOutput Parameters:\n- `n`       - number of local block nodes\n- `n_procs` - an array storing the number of processes for each local block node (including self)\n- `procs`   - the processes' rank for each local block node (sorted, self is first)\n\nLevel: advanced\n\n-seealso: `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingGetBlockInfo()`, `ISLocalToGlobalMappingRestoreBlockNodeInfo()`, `ISLocalToGlobalMappingGetNodeInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetBlockNodeInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetBlockNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetBlockNodeInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\tn_ = Ref{$PetscInt}()\n\tn_procs_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetBlockNodeInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, n_, n_procs_, procs,\n              )\n\n\tn = n_[]\n\tn_procs = unsafe_wrap(Array, n_procs_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,n_procs,procs\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRestoreBlockNodeInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, n::PetscInt, n_procs::Vector{PetscInt}, procs::Vector{PetscInt}) \nFrees the memory allocated by `ISLocalToGlobalMappingGetBlockNodeInfo()`\n\nNot Collective\n\nInput Parameters:\n- `mapping` - the mapping from local to global indexing\n- `n`       - number of local block nodes\n- `n_procs` - an array storing the number of processes for each local block nodes (including self)\n- `procs`   - the processes' rank for each local block node (sorted, self is first)\n\nLevel: advanced\n\n-seealso: `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingGetBlockNodeInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRestoreBlockNodeInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRestoreBlockNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, n::PetscInt, n_procs::Vector{PetscInt}, procs::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingRestoreBlockNodeInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, n::$PetscInt, n_procs::Vector{$PetscInt}, procs::Vector{$PetscInt} )\n\tn_procs_ = Ref(pointer(n_procs))\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRestoreBlockNodeInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, n, n_procs_, procs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingGetBlockMultiLeavesSF(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, mlsf::PetscSF) \nGet the star\n\nCollective the first time it is called\n\nInput Parameter:\n- `mapping` - the mapping from local to global indexing\n\nOutput Parameter:\n- `mlsf` - the `PetscSF`\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingGetBlockNodeInfo()`, `PetscSF`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetBlockMultiLeavesSF\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetBlockMultiLeavesSF(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, mlsf::PetscSF) end\n\n@for_petsc function ISLocalToGlobalMappingGetBlockMultiLeavesSF(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, mlsf::PetscSF )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetBlockMultiLeavesSF, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{PetscSF}),\n               mapping, mlsf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRestoreBlockInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, nproc::PetscInt, procs::Vector{PetscInt}, numprocs::Vector{PetscInt}, indices::Vector{PetscInt}) \nFrees the memory allocated by `ISLocalToGlobalMappingGetBlockInfo()`\n\nNot Collective\n\nInput Parameters:\n- `mapping`  - the mapping from local to global indexing\n- `nproc`    - number of processes that are connected to the calling process\n- `procs`    - neighboring processes\n- `numprocs` - number of block indices for each process\n- `indices`  - block indices (in local numbering) shared with neighbors (sorted by global numbering)\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingGetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRestoreBlockInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRestoreBlockInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, nproc::PetscInt, procs::Vector{PetscInt}, numprocs::Vector{PetscInt}, indices::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingRestoreBlockInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, nproc::$PetscInt, procs::Vector{$PetscInt}, numprocs::Vector{$PetscInt}, indices::Vector{$PetscInt} )\n\tprocs_ = Ref(pointer(procs))\n\tnumprocs_ = Ref(pointer(numprocs))\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRestoreBlockInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, nproc, procs_, numprocs_, indices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnproc::PetscInt,procs::Vector{PetscInt},numprocs::Vector{PetscInt},indices::Vector{PetscInt} = ISLocalToGlobalMappingGetInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nGets the neighbor information for each process\n\nCollective the first time it is called\n\nInput Parameter:\n- `mapping` - the mapping from local to global indexing\n\nOutput Parameters:\n- `nproc`    - number of processes that are connected to the calling process\n- `procs`    - neighboring processes\n- `numprocs` - number of indices for each process\n- `indices`  - indices (in local numbering) shared with neighbors (sorted by global numbering)\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingRestoreInfo()`, `ISLocalToGlobalMappingGetNodeInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\tnproc_ = Ref{$PetscInt}()\n\tprocs_ = Ref{Ptr{$PetscInt}}()\n\tnumprocs_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, nproc_, procs_, numprocs_, indices,\n              )\n\n\tnproc = nproc_[]\n\tprocs = unsafe_wrap(Array, procs_[], VecGetLocalSize(petsclib, x); own = false)\n\tnumprocs = unsafe_wrap(Array, numprocs_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nproc,procs,numprocs,indices\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRestoreInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, nproc::PetscInt, procs::Vector{PetscInt}, numprocs::Vector{PetscInt}, indices::Vector{PetscInt}) \nFrees the memory allocated by `ISLocalToGlobalMappingGetInfo()`\n\nNot Collective\n\nInput Parameters:\n- `mapping`  - the mapping from local to global indexing\n- `nproc`    - number of processes that are connected to the calling process\n- `procs`    - neighboring processes\n- `numprocs` - number of indices for each process\n- `indices`  - indices (in local numbering) shared with neighbors (sorted by global numbering)\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingGetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRestoreInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRestoreInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, nproc::PetscInt, procs::Vector{PetscInt}, numprocs::Vector{PetscInt}, indices::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingRestoreInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, nproc::$PetscInt, procs::Vector{$PetscInt}, numprocs::Vector{$PetscInt}, indices::Vector{$PetscInt} )\n\tprocs_ = Ref(pointer(procs))\n\tnumprocs_ = Ref(pointer(numprocs))\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRestoreInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, nproc, procs_, numprocs_, indices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt,n_procs::Vector{PetscInt},procs::Vector{PetscInt} = ISLocalToGlobalMappingGetNodeInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping) \nGets the neighbor information of local nodes\n\nCollective the first time it is called\n\nInput Parameter:\n- `mapping` - the mapping from local to global indexing\n\nOutput Parameters:\n- `n`       - number of local nodes\n- `n_procs` - an array storing the number of processes for each local node (including self)\n- `procs`   - the processes' rank for each local node (sorted, self is first)\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingGetInfo()`, `ISLocalToGlobalMappingRestoreNodeInfo()`, `ISLocalToGlobalMappingGetBlockNodeInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetNodeInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetNodeInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping )\n\tn_ = Ref{$PetscInt}()\n\tn_procs_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetNodeInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, n_, n_procs_, procs,\n              )\n\n\tn = n_[]\n\tn_procs = unsafe_wrap(Array, n_procs_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,n_procs,procs\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRestoreNodeInfo(petsclib::PetscLibType,mapping::ISLocalToGlobalMapping, n::PetscInt, n_procs::Vector{PetscInt}, procs::Vector{PetscInt}) \nFrees the memory allocated by `ISLocalToGlobalMappingGetNodeInfo()`\n\nNot Collective\n\nInput Parameters:\n- `mapping` - the mapping from local to global indexing\n- `n`       - number of local nodes\n- `n_procs` - an array storing the number of processes for each local node (including self)\n- `procs`   - the processes' rank for each local node (sorted, self is first)\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingDestroy()`, `ISLocalToGlobalMappingCreateIS()`, `ISLocalToGlobalMappingCreate()`,\n`ISLocalToGlobalMappingGetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRestoreNodeInfo\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRestoreNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, n::PetscInt, n_procs::Vector{PetscInt}, procs::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingRestoreNodeInfo(petsclib::$UnionPetscLib, mapping::ISLocalToGlobalMapping, n::$PetscInt, n_procs::Vector{$PetscInt}, procs::Vector{$PetscInt} )\n\tn_procs_ = Ref(pointer(n_procs))\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRestoreNodeInfo, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               mapping, n, n_procs_, procs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tarray::Vector{PetscInt} = ISLocalToGlobalMappingGetIndices(petsclib::PetscLibType,ltog::ISLocalToGlobalMapping) \nGet global indices for every local point that is mapped\n\nNot Collective\n\nInput Parameter:\n- `ltog` - local to global mapping\n\nOutput Parameter:\n- `array` - array of indices, the length of this array may be obtained with `ISLocalToGlobalMappingGetSize()`\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingApply()`, `ISLocalToGlobalMappingRestoreIndices()`,\n`ISLocalToGlobalMappingGetBlockIndices()`, `ISLocalToGlobalMappingRestoreBlockIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetIndices\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetIndices(petsclib::$UnionPetscLib, ltog::ISLocalToGlobalMapping )\n\tarray_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetIndices, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{Ptr{$PetscInt}}),\n               ltog, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRestoreIndices(petsclib::PetscLibType,ltog::ISLocalToGlobalMapping, array::Vector{PetscInt}) \nRestore indices obtained with `ISLocalToGlobalMappingGetIndices()`\n\nNot Collective\n\nInput Parameters:\n- `ltog`  - local to global mapping\n- `array` - array of indices\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingApply()`, `ISLocalToGlobalMappingGetIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRestoreIndices\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRestoreIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping, array::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingRestoreIndices(petsclib::$UnionPetscLib, ltog::ISLocalToGlobalMapping, array::Vector{$PetscInt} )\n\tarray_ = Ref(pointer(array))\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRestoreIndices, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{Ptr{$PetscInt}}),\n               ltog, array_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tarray::Vector{PetscInt} = ISLocalToGlobalMappingGetBlockIndices(petsclib::PetscLibType,ltog::ISLocalToGlobalMapping) \nGet global indices for every local block in a `ISLocalToGlobalMapping`\n\nNot Collective\n\nInput Parameter:\n- `ltog` - local to global mapping\n\nOutput Parameter:\n- `array` - array of indices\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingApply()`,\n`ISLocalToGlobalMappingRestoreBlockIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetBlockIndices\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetBlockIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetBlockIndices(petsclib::$UnionPetscLib, ltog::ISLocalToGlobalMapping )\n\tarray_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetBlockIndices, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{Ptr{$PetscInt}}),\n               ltog, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRestoreBlockIndices(petsclib::PetscLibType,ltog::ISLocalToGlobalMapping, array::Vector{PetscInt}) \nRestore indices obtained with `ISLocalToGlobalMappingGetBlockIndices()`\n\nNot Collective\n\nInput Parameters:\n- `ltog`  - local to global mapping\n- `array` - array of indices\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingApply()`, `ISLocalToGlobalMappingGetIndices()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRestoreBlockIndices\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRestoreBlockIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping, array::Vector{PetscInt}) end\n\n@for_petsc function ISLocalToGlobalMappingRestoreBlockIndices(petsclib::$UnionPetscLib, ltog::ISLocalToGlobalMapping, array::Vector{$PetscInt} )\n\tarray_ = Ref(pointer(array))\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRestoreBlockIndices, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{Ptr{$PetscInt}}),\n               ltog, array_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingConcatenate(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, ltogs::Vector{ISLocalToGlobalMapping}, ltogcat::ISLocalToGlobalMapping) \nCreate a new mapping that concatenates a list of mappings\n\nNot Collective\n\nInput Parameters:\n- `comm`  - communicator for the new mapping, must contain the communicator of every mapping to concatenate\n- `n`     - number of mappings to concatenate\n- `ltogs` - local to global mappings\n\nOutput Parameter:\n- `ltogcat` - new mapping\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingCreate()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingConcatenate\"))\n\"\"\"\nfunction ISLocalToGlobalMappingConcatenate(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, ltogs::Vector{ISLocalToGlobalMapping}, ltogcat::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingConcatenate(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, ltogs::Vector{ISLocalToGlobalMapping}, ltogcat::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingConcatenate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{ISLocalToGlobalMapping}, Ptr{ISLocalToGlobalMapping}),\n               comm, n, ltogs, ltogcat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRegister(petsclib::PetscLibType,sname::String, fnc::external) \nRegisters a method for applying a global to local mapping with an `ISLocalToGlobalMapping`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new method\n- `function` - routine to create method context\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingRegisterAll()`, `ISLocalToGlobalMappingRegisterDestroy()`, `ISLOCALTOGLOBALMAPPINGBASIC`,\n`ISLOCALTOGLOBALMAPPINGHASH`, `ISLocalToGlobalMapping`, `ISLocalToGlobalMappingApply()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRegister\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function ISLocalToGlobalMappingRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISLocalToGlobalMappingSetType(petsclib::PetscLibType,ltog::ISLocalToGlobalMapping, type::ISLocalToGlobalMappingType) \nSets the implementation type `ISLocalToGlobalMapping` will use\n\nLogically Collective\n\nInput Parameters:\n- `ltog` - the `ISLocalToGlobalMapping` object\n- `type` - a known method\n\nOptions Database Key:\n- `-islocaltoglobalmapping_type  <method>` - Sets the method; use -help for a list of available methods (for instance, basic or hash)\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingType`, `ISLocalToGlobalMappingRegister()`, `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingGetType()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingSetType\"))\n\"\"\"\nfunction ISLocalToGlobalMappingSetType(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping, type::ISLocalToGlobalMappingType) end\n\n@for_petsc function ISLocalToGlobalMappingSetType(petsclib::$UnionPetscLib, ltog::ISLocalToGlobalMapping, type::ISLocalToGlobalMappingType )\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingSetType, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, ISLocalToGlobalMappingType),\n               ltog, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::ISLocalToGlobalMappingType = ISLocalToGlobalMappingGetType(petsclib::PetscLibType,ltog::ISLocalToGlobalMapping) \nGet the type of the `ISLocalToGlobalMapping`\n\nNot Collective\n\nInput Parameter:\n- `ltog` - the `ISLocalToGlobalMapping` object\n\nOutput Parameter:\n- `type` - the type\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `ISLocalToGlobalMappingType`, `ISLocalToGlobalMappingRegister()`, `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingSetType()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingGetType\"))\n\"\"\"\nfunction ISLocalToGlobalMappingGetType(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping) end\n\n@for_petsc function ISLocalToGlobalMappingGetType(petsclib::$UnionPetscLib, ltog::ISLocalToGlobalMapping )\n\ttype_ = Ref{ISLocalToGlobalMappingType}()\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingGetType, $petsc_library),\n               PetscErrorCode,\n               (ISLocalToGlobalMapping, Ptr{ISLocalToGlobalMappingType}),\n               ltog, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tISLocalToGlobalMappingRegisterAll(petsclib::PetscLibType) \nRegisters all of the local to global mapping components in the `IS` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `ISRegister()`, `ISLocalToGlobalRegister()`\n\n# External Links\n$(_doc_external(\"Vec/ISLocalToGlobalMappingRegisterAll\"))\n\"\"\"\nfunction ISLocalToGlobalMappingRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function ISLocalToGlobalMappingRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:ISLocalToGlobalMappingRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISColoringReference(petsclib::PetscLibType,coloring::ISColoring) \n\n# External Links\n$(_doc_external(\"Vec/ISColoringReference\"))\n\"\"\"\nfunction ISColoringReference(petsclib::PetscLibType, coloring::ISColoring) end\n\n@for_petsc function ISColoringReference(petsclib::$UnionPetscLib, coloring::ISColoring )\n\n    @chk ccall(\n               (:ISColoringReference, $petsc_library),\n               PetscErrorCode,\n               (ISColoring,),\n               coloring,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISColoringSetType(petsclib::PetscLibType,coloring::ISColoring, type::ISColoringType) \nindicates if the coloring is for the local representation (including ghost points) or the global representation of a `Mat`\n\nCollective\n\nInput Parameters:\n- `coloring` - the coloring object\n- `type`     - either `IS_COLORING_LOCAL` or `IS_COLORING_GLOBAL`\n\nLevel: intermediate\n\n-seealso: `MatFDColoringCreate()`, `ISColoring`, `ISColoringType`, `ISColoringCreate()`, `IS_COLORING_LOCAL`, `IS_COLORING_GLOBAL`, `ISColoringGetType()`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringSetType\"))\n\"\"\"\nfunction ISColoringSetType(petsclib::PetscLibType, coloring::ISColoring, type::ISColoringType) end\n\n@for_petsc function ISColoringSetType(petsclib::$UnionPetscLib, coloring::ISColoring, type::ISColoringType )\n\n    @chk ccall(\n               (:ISColoringSetType, $petsc_library),\n               PetscErrorCode,\n               (ISColoring, ISColoringType),\n               coloring, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::ISColoringType = ISColoringGetType(petsclib::PetscLibType,coloring::ISColoring) \ngets if the coloring is for the local representation (including ghost points) or the global representation\n\nCollective\n\nInput Parameter:\n- `coloring` - the coloring object\n\nOutput Parameter:\n- `type` - either `IS_COLORING_LOCAL` or `IS_COLORING_GLOBAL`\n\nLevel: intermediate\n\n-seealso: `MatFDColoringCreate()`, `ISColoring`, `ISColoringType`, `ISColoringCreate()`, `IS_COLORING_LOCAL`, `IS_COLORING_GLOBAL`, `ISColoringSetType()`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringGetType\"))\n\"\"\"\nfunction ISColoringGetType(petsclib::PetscLibType, coloring::ISColoring) end\n\n@for_petsc function ISColoringGetType(petsclib::$UnionPetscLib, coloring::ISColoring )\n\ttype_ = Ref{ISColoringType}()\n\n    @chk ccall(\n               (:ISColoringGetType, $petsc_library),\n               PetscErrorCode,\n               (ISColoring, Ptr{ISColoringType}),\n               coloring, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tISColoringDestroy(petsclib::PetscLibType,iscoloring::ISColoring) \nDestroys an `ISColoring` coloring context.\n\nCollective\n\nInput Parameter:\n- `iscoloring` - the coloring context\n\nLevel: advanced\n\n-seealso: `ISColoring`, `ISColoringView()`, `MatColoring`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringDestroy\"))\n\"\"\"\nfunction ISColoringDestroy(petsclib::PetscLibType, iscoloring::ISColoring) end\n\n@for_petsc function ISColoringDestroy(petsclib::$UnionPetscLib, iscoloring::ISColoring )\n\n    @chk ccall(\n               (:ISColoringDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{ISColoring},),\n               iscoloring,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISColoringViewFromOptions(petsclib::PetscLibType,obj::ISColoring, bobj::PetscObject, optionname::String) \nProcesses command line options to determine if/how an `ISColoring` object is to be viewed.\n\nCollective\n\nInput Parameters:\n- `obj`        - the `ISColoring` object\n- `bobj`       - prefix to use for viewing, or `NULL` to use prefix of `mat`\n- `optionname` - option to activate viewing\n\nLevel: intermediate\n\n-seealso: `ISColoring`, `ISColoringView()`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringViewFromOptions\"))\n\"\"\"\nfunction ISColoringViewFromOptions(petsclib::PetscLibType, obj::ISColoring, bobj::PetscObject, optionname::String) end\n\n@for_petsc function ISColoringViewFromOptions(petsclib::$UnionPetscLib, obj::ISColoring, bobj::PetscObject, optionname::String )\n\n    @chk ccall(\n               (:ISColoringViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (ISColoring, PetscObject, Ptr{Cchar}),\n               obj, bobj, optionname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tISColoringView(petsclib::PetscLibType,iscoloring::ISColoring, viewer::PetscViewer) \nViews an `ISColoring` coloring context.\n\nCollective\n\nInput Parameters:\n- `iscoloring` - the coloring context\n- `viewer`     - the viewer\n\nLevel: advanced\n\n-seealso: `ISColoring()`, `ISColoringViewFromOptions()`, `ISColoringDestroy()`, `ISColoringGetIS()`, `MatColoring`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringView\"))\n\"\"\"\nfunction ISColoringView(petsclib::PetscLibType, iscoloring::ISColoring, viewer::PetscViewer) end\n\n@for_petsc function ISColoringView(petsclib::$UnionPetscLib, iscoloring::ISColoring, viewer::PetscViewer )\n\n    @chk ccall(\n               (:ISColoringView, $petsc_library),\n               PetscErrorCode,\n               (ISColoring, PetscViewer),\n               iscoloring, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt,nc::PetscInt = ISColoringGetColors(petsclib::PetscLibType,iscoloring::ISColoring, colors::ISColoringValue) \nReturns an array with the color for each local node\n\nNot Collective\n\nInput Parameter:\n- `iscoloring` - the coloring context\n\nOutput Parameters:\n- `n`      - number of nodes\n- `nc`     - number of colors\n- `colors` - color for each node\n\nLevel: advanced\n\n-seealso: `ISColoring`, `ISColoringValue`, `ISColoringRestoreIS()`, `ISColoringView()`, `ISColoringGetIS()`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringGetColors\"))\n\"\"\"\nfunction ISColoringGetColors(petsclib::PetscLibType, iscoloring::ISColoring, colors::ISColoringValue) end\n\n@for_petsc function ISColoringGetColors(petsclib::$UnionPetscLib, iscoloring::ISColoring, colors::ISColoringValue )\n\tn_ = Ref{$PetscInt}()\n\tnc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:ISColoringGetColors, $petsc_library),\n               PetscErrorCode,\n               (ISColoring, Ptr{$PetscInt}, Ptr{$PetscInt}, ISColoringValue),\n               iscoloring, n_, nc_, colors,\n              )\n\n\tn = n_[]\n\tnc = nc_[]\n\n\treturn n,nc\nend \n\n\"\"\"\n\tnn::PetscInt = ISColoringGetIS(petsclib::PetscLibType,iscoloring::ISColoring, mode::PetscCopyMode, isis::Vector{IS}) \nExtracts index sets from the coloring context. Each is contains the nodes of one color\n\nCollective\n\nInput Parameters:\n- `iscoloring` - the coloring context\n- `mode`       - if this value is `PETSC_OWN_POINTER` then the caller owns the pointer and must free the array of `IS` and each `IS` in the array\n\nOutput Parameters:\n- `nn`   - number of index sets in the coloring context\n- `isis` - array of index sets\n\nLevel: advanced\n\n-seealso: `ISColoring`, `IS`, `ISColoringRestoreIS()`, `ISColoringView()`, `ISColoringGetColoring()`, `ISColoringGetColors()`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringGetIS\"))\n\"\"\"\nfunction ISColoringGetIS(petsclib::PetscLibType, iscoloring::ISColoring, mode::PetscCopyMode, isis::Vector{IS}) end\n\n@for_petsc function ISColoringGetIS(petsclib::$UnionPetscLib, iscoloring::ISColoring, mode::PetscCopyMode, isis::Vector{IS} )\n\tnn_ = Ref{$PetscInt}()\n\tisis_ = Ref(pointer(isis))\n\n    @chk ccall(\n               (:ISColoringGetIS, $petsc_library),\n               PetscErrorCode,\n               (ISColoring, PetscCopyMode, Ptr{$PetscInt}, Ptr{Ptr{CIS}}),\n               iscoloring, mode, nn_, isis_,\n              )\n\n\tnn = nn_[]\n\n\treturn nn\nend \n\n\"\"\"\n\tISColoringRestoreIS(petsclib::PetscLibType,iscoloring::ISColoring, mode::PetscCopyMode, is::Vector{IS}) \nRestores the index sets extracted from the coloring context with `ISColoringGetIS()` using `PETSC_USE_POINTER`\n\nCollective\n\nInput Parameters:\n- `iscoloring` - the coloring context\n- `mode`       - who retains ownership of the is\n- `is`         - array of index sets\n\nLevel: advanced\n\n-seealso: `ISColoring()`, `IS`, `ISColoringGetIS()`, `ISColoringView()`, `PetscCopyMode`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringRestoreIS\"))\n\"\"\"\nfunction ISColoringRestoreIS(petsclib::PetscLibType, iscoloring::ISColoring, mode::PetscCopyMode, is::Vector{IS}) end\n\n@for_petsc function ISColoringRestoreIS(petsclib::$UnionPetscLib, iscoloring::ISColoring, mode::PetscCopyMode, is::Vector{IS} )\n\tis_ = Ref(pointer(is))\n\n    @chk ccall(\n               (:ISColoringRestoreIS, $petsc_library),\n               PetscErrorCode,\n               (ISColoring, PetscCopyMode, Ptr{Ptr{CIS}}),\n               iscoloring, mode, is_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tiscoloring::ISColoring = ISColoringCreate(petsclib::PetscLibType,comm::MPI_Comm, ncolors::PetscInt, n::PetscInt, colors::Vector{ISColoringValue}, mode::PetscCopyMode) \nGenerates an `ISColoring` context from lists (provided by each MPI process) of colors for each node.\n\nCollective\n\nInput Parameters:\n- `comm`    - communicator for the processors creating the coloring\n- `ncolors` - max color value\n- `n`       - number of nodes on this processor\n- `colors`  - array containing the colors for this MPI rank, color numbers begin at 0, for each local node\n- `mode`    - see `PetscCopyMode` for meaning of this flag.\n\nOutput Parameter:\n- `iscoloring` - the resulting coloring data structure\n\nOptions Database Key:\n- `-is_coloring_view` - Activates `ISColoringView()`\n\nLevel: advanced\n\n-seealso: `ISColoring`, `ISColoringValue`, `MatColoringCreate()`, `ISColoringView()`, `ISColoringDestroy()`, `ISColoringSetType()`\n\n# External Links\n$(_doc_external(\"Vec/ISColoringCreate\"))\n\"\"\"\nfunction ISColoringCreate(petsclib::PetscLibType, comm::MPI_Comm, ncolors::PetscInt, n::PetscInt, colors::Vector{ISColoringValue}, mode::PetscCopyMode) end\n\n@for_petsc function ISColoringCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, ncolors::$PetscInt, n::$PetscInt, colors::Vector{ISColoringValue}, mode::PetscCopyMode )\n\tiscoloring_ = Ref{ISColoring}()\n\n    @chk ccall(\n               (:ISColoringCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{ISColoringValue}, PetscCopyMode, Ptr{ISColoring}),\n               comm, ncolors, n, colors, mode, iscoloring_,\n              )\n\n\tiscoloring = iscoloring_[]\n\n\treturn iscoloring\nend \n\n\"\"\"\n\tISColoringValueCast(petsclib::PetscLibType,a::PetscCount, b::ISColoringValue) \n\n# External Links\n$(_doc_external(\"Vec/ISColoringValueCast\"))\n\"\"\"\nfunction ISColoringValueCast(petsclib::PetscLibType, a::PetscCount, b::ISColoringValue) end\n\n@for_petsc function ISColoringValueCast(petsclib::$UnionPetscLib, a::PetscCount, b::ISColoringValue )\n\n    @chk ccall(\n               (:ISColoringValueCast, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{ISColoringValue}),\n               a, b,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/KSPGuess_wrappers.jl",
    "content": "\"\"\"\n\tKSPGuessRegister(petsclib::PetscLibType,sname::String, fnc::external) \nRegisters a method for initial guess computation in Krylov subspace solver package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined solver\n- `function` - routine to create method context\n\n-seealso: [](ch_ksp), `KSPGuess`, `KSPGuessRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessRegister\"))\n\"\"\"\nfunction KSPGuessRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function KSPGuessRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:KSPGuessRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGuessSetFromOptions(petsclib::PetscLibType,guess::KSPGuess) \nSets the options for a `KSPGuess` from the options database\n\nCollective\n\nInput Parameter:\n- `guess` - `KSPGuess` object\n\nOptions Database Keys:\n- `-ksp_guess_type <method>`       - Turns on generation of initial guesses and sets the method; use -help for a list of available methods\n- `-ksp_guess_view <viewer>`       - view the `KSPGuess` object\n- `-ksp_guess_fischer_model <a,b>` - set details for the Fischer models\n- `-ksp_guess_fischer_monitor`     - monitor the Fischer models\n- `-ksp_guess_fischer_tol <tol>`   - set the tolerance for the Fischer models\n- `-ksp_guess_pod_size <size>`     - Number of snapshots\n- `-ksp_guess_pod_monitor true`    - monitor the pod initial guess processing\n- `-ksp_guess_pod_tol <tol>`       - Tolerance to retain eigenvectors\n- `-ksp_guess_pod_Ainner true`     - Use the operator as inner product (must be SPD)\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuess`, `KSPGetGuess()`, `KSPGuessSetType()`, `KSPGuessType`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessSetFromOptions\"))\n\"\"\"\nfunction KSPGuessSetFromOptions(petsclib::PetscLibType, guess::KSPGuess) end\n\n@for_petsc function KSPGuessSetFromOptions(petsclib::$UnionPetscLib, guess::KSPGuess )\n\n    @chk ccall(\n               (:KSPGuessSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess,),\n               guess,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGuessSetTolerance(petsclib::PetscLibType,guess::KSPGuess, tol::PetscReal) \nSets the relative tolerance used in either eigenvalue (POD) or singular value (Fischer type 3) calculations.\n\nCollective\n\nInput Parameters:\n- `guess` - `KSPGuess` object\n- `tol`   - the tolerance\n\nOptions Database Key:\n- `-ksp_guess_fischer_tol <tol>` - set the tolerance for the Fischer models\n- `-ksp_guess_pod_tol <tol>`     - set the tolerance for the Pod models\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuess`, `KSPGuessType`, `KSPGuessSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessSetTolerance\"))\n\"\"\"\nfunction KSPGuessSetTolerance(petsclib::PetscLibType, guess::KSPGuess, tol::PetscReal) end\n\n@for_petsc function KSPGuessSetTolerance(petsclib::$UnionPetscLib, guess::KSPGuess, tol::$PetscReal )\n\n    @chk ccall(\n               (:KSPGuessSetTolerance, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess, $PetscReal),\n               guess, tol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGuessDestroy(petsclib::PetscLibType,guess::KSPGuess) \nDestroys `KSPGuess` context.\n\nCollective\n\nInput Parameter:\n- `guess` - initial guess object\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuessCreate()`, `KSPGuess`, `KSPGuessType`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessDestroy\"))\n\"\"\"\nfunction KSPGuessDestroy(petsclib::PetscLibType, guess::KSPGuess) end\n\n@for_petsc function KSPGuessDestroy(petsclib::$UnionPetscLib, guess::KSPGuess )\n\n    @chk ccall(\n               (:KSPGuessDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{KSPGuess},),\n               guess,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGuessView(petsclib::PetscLibType,guess::KSPGuess, view::PetscViewer) \nView the `KSPGuess` object\n\nLogically Collective\n\nInput Parameters:\n- `guess` - the initial guess object for the Krylov method\n- `view`  - the viewer object\n\nOptions Database Key:\n- `-ksp_guess_view viewer` - view the `KSPGuess` object\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPGuess`, `KSPGuessType`, `KSPGuessRegister()`, `KSPGuessCreate()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessView\"))\n\"\"\"\nfunction KSPGuessView(petsclib::PetscLibType, guess::KSPGuess, view::PetscViewer) end\n\n@for_petsc function KSPGuessView(petsclib::$UnionPetscLib, guess::KSPGuess, view::PetscViewer )\n\n    @chk ccall(\n               (:KSPGuessView, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess, PetscViewer),\n               guess, view,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tguess::KSPGuess = KSPGuessCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `KSPGuess` context.\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `guess` - location to put the `KSPGuess` context\n\nOptions Database Keys:\n- `-ksp_guess_type  <method>`      - Turns on generation of initial guesses and sets the method; use -help for a list of available methods\n- `-ksp_guess_view <viewer>`       - view the `KSPGuess` object\n- `-ksp_guess_fischer_model <a,b>` - set details for the Fischer models\n- `-ksp_guess_fischer_monitor`     - monitor the fischer models\n- `-ksp_guess_fischer_tol <tol>`   - set the tolerance for the Fischer models\n- `-ksp_guess_pod_size <size>`     - Number of snapshots\n- `-ksp_guess_pod_monitor true`    - monitor the pod initial guess processing\n- `-ksp_guess_pod_tol <tol>`       - Tolerance to retain eigenvectors\n- `-ksp_guess_pod_Ainner true`     - Use the operator as inner product (must be SPD)\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPSolve()`, `KSPGuessDestroy()`, `KSPGuess`, `KSPGuessType`, `KSP`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessCreate\"))\n\"\"\"\nfunction KSPGuessCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function KSPGuessCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tguess_ = Ref{KSPGuess}()\n\n    @chk ccall(\n               (:KSPGuessCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{KSPGuess}),\n               comm, guess_,\n              )\n\n\tguess = guess_[]\n\n\treturn guess\nend \n\n\"\"\"\n\tKSPGuessSetType(petsclib::PetscLibType,guess::KSPGuess, type::KSPGuessType) \nSets the type of a `KSPGuess`. Each `KSPGuessType` provides a different algorithm for computing the initial guess.\n\nLogically Collective\n\nInput Parameters:\n- `guess` - the initial guess object for the Krylov method\n- `type`  - a known `KSPGuessType`\n\nOptions Database Key:\n- `-ksp_guess_type  <method>` - Turns on generation of initial guesses and sets the method; see `KSPGuessType` for a list of available types\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPGuess`, `KSPGuessType`, `KSPGuessRegister()`, `KSPGuessCreate()`, `KSPGUESSFISCHER`, `KSPGUESSPOD`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessSetType\"))\n\"\"\"\nfunction KSPGuessSetType(petsclib::PetscLibType, guess::KSPGuess, type::KSPGuessType) end\n\n@for_petsc function KSPGuessSetType(petsclib::$UnionPetscLib, guess::KSPGuess, type::KSPGuessType )\n\n    @chk ccall(\n               (:KSPGuessSetType, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess, KSPGuessType),\n               guess, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::KSPGuessType = KSPGuessGetType(petsclib::PetscLibType,guess::KSPGuess) \nGets the `KSPGuessType` as a string from the `KSPGuess` object.\n\nNot Collective\n\nInput Parameter:\n- `guess` - the initial guess context\n\nOutput Parameter:\n- `type` - type of `KSPGuess` method\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuess`, `KSPGuessSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessGetType\"))\n\"\"\"\nfunction KSPGuessGetType(petsclib::PetscLibType, guess::KSPGuess) end\n\n@for_petsc function KSPGuessGetType(petsclib::$UnionPetscLib, guess::KSPGuess )\n\ttype_ = Ref{KSPGuessType}()\n\n    @chk ccall(\n               (:KSPGuessGetType, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess, Ptr{KSPGuessType}),\n               guess, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tKSPGuessUpdate(petsclib::PetscLibType,guess::KSPGuess, rhs::PetscVec, sol::PetscVec) \nUpdates the guess object with the current solution and rhs vector\n\nCollective\n\nInput Parameters:\n- `guess` - the initial guess context\n- `rhs`   - the corresponding rhs\n- `sol`   - the computed solution\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuessCreate()`, `KSPGuess`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessUpdate\"))\n\"\"\"\nfunction KSPGuessUpdate(petsclib::PetscLibType, guess::KSPGuess, rhs::PetscVec, sol::PetscVec) end\n\n@for_petsc function KSPGuessUpdate(petsclib::$UnionPetscLib, guess::KSPGuess, rhs::PetscVec, sol::PetscVec )\n\n    @chk ccall(\n               (:KSPGuessUpdate, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess, CVec, CVec),\n               guess, rhs, sol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGuessFormGuess(petsclib::PetscLibType,guess::KSPGuess, rhs::PetscVec, sol::PetscVec) \nForm the initial guess\n\nCollective\n\nInput Parameters:\n- `guess` - the initial guess context\n- `rhs`   - the current right-hand side vector\n- `sol`   - the initial guess vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuessCreate()`, `KSPGuess`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessFormGuess\"))\n\"\"\"\nfunction KSPGuessFormGuess(petsclib::PetscLibType, guess::KSPGuess, rhs::PetscVec, sol::PetscVec) end\n\n@for_petsc function KSPGuessFormGuess(petsclib::$UnionPetscLib, guess::KSPGuess, rhs::PetscVec, sol::PetscVec )\n\n    @chk ccall(\n               (:KSPGuessFormGuess, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess, CVec, CVec),\n               guess, rhs, sol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGuessSetUp(petsclib::PetscLibType,guess::KSPGuess) \nSetup the initial guess object\n\nCollective\n\nInput Parameter:\n- `guess` - the initial guess context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuessCreate()`, `KSPGuess`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessSetUp\"))\n\"\"\"\nfunction KSPGuessSetUp(petsclib::PetscLibType, guess::KSPGuess) end\n\n@for_petsc function KSPGuessSetUp(petsclib::$UnionPetscLib, guess::KSPGuess )\n\n    @chk ccall(\n               (:KSPGuessSetUp, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess,),\n               guess,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGuessFischerSetModel(petsclib::PetscLibType,guess::KSPGuess, model::PetscInt, size::PetscInt) \nSet the Paul Fischer algorithm or its variants to compute the initial guess for a `KSPSolve()`\n\nLogically Collective\n\nInput Parameters:\n- `guess` - the initial guess context\n- `model` - use model 1, model 2, model 3, or any other number to turn it off\n- `size`  - size of subspace used to generate initial guess\n\nOptions Database Key:\n- `-ksp_guess_fischer_model <model,size>` - uses the Fischer initial guess generator for repeated linear solves\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPGuess`, `KSPGuessCreate()`, `KSPSetUseFischerGuess()`, `KSPSetGuess()`, `KSPGetGuess()`, `KSP`\n\n# External Links\n$(_doc_external(\"Ksp/KSPGuessFischerSetModel\"))\n\"\"\"\nfunction KSPGuessFischerSetModel(petsclib::PetscLibType, guess::KSPGuess, model::PetscInt, size::PetscInt) end\n\n@for_petsc function KSPGuessFischerSetModel(petsclib::$UnionPetscLib, guess::KSPGuess, model::$PetscInt, size::$PetscInt )\n\n    @chk ccall(\n               (:KSPGuessFischerSetModel, $petsc_library),\n               PetscErrorCode,\n               (KSPGuess, $PetscInt, $PetscInt),\n               guess, model, size,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/KSP_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct KSPConvergedReasonViewFn end\n\nmutable struct KSPMonitorFn end\n\nmutable struct KSPConvergenceTestFn end\n\nmutable struct KSPComputeOperatorsFn end\n\nmutable struct KSPComputeRHSFn end\n\nmutable struct KSPComputeInitialGuessFn end\n\nmutable struct _n_PeCtx end\nconst PeCtx = Ptr{_n_PeCtx}\n\nmutable struct KSPPSolveFn end\n\nmutable struct KSPMonitorRegisterFn end\n\nmutable struct KSPMonitorRegisterCreateFn end\n\nmutable struct KSPMonitorRegisterDestroyFn end\n\nmutable struct _n_KSPGuess end\nconst KSPGuess = Ptr{_n_KSPGuess}\n\nmutable struct KSPFlexibleModifyPCFn end\n\n# -------------------------------------------------------\n\"\"\"\n\tKSPComputeOperator(petsclib::PetscLibType,ksp::PetscKSP, mattype::MatType, mat::PetscMat) \nComputes the explicit preconditioned operator, including diagonal scaling and null\nspace removal if applicable.\n\nCollective\n\nInput Parameters:\n- `ksp`     - the Krylov subspace context\n- `mattype` - the matrix type to be used\n\nOutput Parameter:\n- `mat` - the explicit preconditioned operator\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOperators()`, `KSPComputeEigenvaluesExplicitly()`, `PCComputeOperator()`, `KSPSetDiagonalScale()`, `KSPSetNullSpace()`, `MatType`\n\n# External Links\n$(_doc_external(\"KSP/KSPComputeOperator\"))\n\"\"\"\nfunction KSPComputeOperator(petsclib::PetscLibType, ksp::PetscKSP, mattype::MatType, mat::PetscMat) end\n\n@for_petsc function KSPComputeOperator(petsclib::$UnionPetscLib, ksp::PetscKSP, mattype::MatType, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:KSPComputeOperator, $petsc_library),\n               PetscErrorCode,\n               (CKSP, MatType, Ptr{CMat}),\n               ksp, mattype, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tr::Vector{PetscReal},c::Vector{PetscReal} = KSPComputeEigenvaluesExplicitly(petsclib::PetscLibType,ksp::PetscKSP, nmax::PetscInt) \nComputes all of the eigenvalues of the\npreconditioned operator using LAPACK.\n\nCollective\n\nInput Parameters:\n- `ksp`  - iterative context obtained from `KSPCreate()`\n- `nmax` - size of arrays `r` and `c`\n\nOutput Parameters:\n- `r` - real part of computed eigenvalues, provided by user with a dimension at least of `n`\n- `c` - complex part of computed eigenvalues, provided by user with a dimension at least of `n`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPComputeEigenvalues()`, `KSPMonitorSingularValue()`, `KSPComputeExtremeSingularValues()`, `KSPSetOperators()`, `KSPSolve()`\n\n# External Links\n$(_doc_external(\"KSP/KSPComputeEigenvaluesExplicitly\"))\n\"\"\"\nfunction KSPComputeEigenvaluesExplicitly(petsclib::PetscLibType, ksp::PetscKSP, nmax::PetscInt) end\n\n@for_petsc function KSPComputeEigenvaluesExplicitly(petsclib::$UnionPetscLib, ksp::PetscKSP, nmax::$PetscInt )\n\tr = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tc = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:KSPComputeEigenvaluesExplicitly, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ksp, nmax, r, c,\n              )\n\n\n\treturn r,c\nend \n\n\"\"\"\n\tKSPMonitorLGRange(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, monctx::Cvoid) \n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorLGRange\"))\n\"\"\"\nfunction KSPMonitorLGRange(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, monctx::Cvoid) end\n\n@for_petsc function KSPMonitorLGRange(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, monctx::Cvoid )\n\n    @chk ccall(\n               (:KSPMonitorLGRange, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               ksp, n, rnorm, monctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\temax::PetscReal,emin::PetscReal = KSPComputeExtremeSingularValues(petsclib::PetscLibType,ksp::PetscKSP) \nComputes the extreme singular values\nfor the preconditioned operator. Called after or during `KSPSolve()`.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameters:\n- `emax` - maximum estimated singular value\n- `emin` - minimum estimated singular value\n\nOptions Database Key:\n- `-ksp_view_singularvalues` - compute extreme singular values and print when `KSPSolve()` completes.\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetComputeSingularValues()`, `KSPMonitorSingularValue()`, `KSPComputeEigenvalues()`, `KSP`, `KSPComputeRitz()`\n\n# External Links\n$(_doc_external(\"KSP/KSPComputeExtremeSingularValues\"))\n\"\"\"\nfunction KSPComputeExtremeSingularValues(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPComputeExtremeSingularValues(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\temax_ = Ref{$PetscReal}()\n\temin_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPComputeExtremeSingularValues, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ksp, emax_, emin_,\n              )\n\n\temax = emax_[]\n\temin = emin_[]\n\n\treturn emax,emin\nend \n\n\"\"\"\n\tr::Vector{PetscReal},c::Vector{PetscReal},neig::PetscInt = KSPComputeEigenvalues(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt) \nComputes the extreme eigenvalues for the\npreconditioned operator. Called after or during `KSPSolve()`.\n\nNot Collective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `n`   - size of arrays `r` and `c`. The number of eigenvalues computed `neig` will, in general, be less than this.\n\nOutput Parameters:\n- `r`    - real part of computed eigenvalues, provided by user with a dimension of at least `n`\n- `c`    - complex part of computed eigenvalues, provided by user with a dimension of at least `n`\n- `neig` - actual number of eigenvalues computed (will be less than or equal to `n`)\n\nOptions Database Key:\n- `-ksp_view_eigenvalues` - Prints eigenvalues to stdout\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetComputeEigenvalues()`, `KSPSetComputeSingularValues()`, `KSPMonitorSingularValue()`, `KSPComputeExtremeSingularValues()`, `KSP`, `KSPComputeRitz()`\n\n# External Links\n$(_doc_external(\"KSP/KSPComputeEigenvalues\"))\n\"\"\"\nfunction KSPComputeEigenvalues(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt) end\n\n@for_petsc function KSPComputeEigenvalues(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt )\n\tr = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tc = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tneig_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPComputeEigenvalues, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               ksp, n, r, c, neig_,\n              )\n\n\tneig = neig_[]\n\n\treturn r,c,neig\nend \n\n\"\"\"\n\tnrit::PetscInt,tetar::Vector{PetscReal},tetai::Vector{PetscReal} = KSPComputeRitz(petsclib::PetscLibType,ksp::PetscKSP, ritz::PetscBool, small::PetscBool, S::Vector{PetscVec}) \nComputes the Ritz or harmonic Ritz pairs associated with the\nsmallest or largest in modulus, for the preconditioned operator.\n\nNot Collective\n\nInput Parameters:\n- `ksp`   - iterative solver obtained from `KSPCreate()`\n- `ritz`  - `PETSC_TRUE` or `PETSC_FALSE` for Ritz pairs or harmonic Ritz pairs, respectively\n- `small` - `PETSC_TRUE` or `PETSC_FALSE` for smallest or largest (harmonic) Ritz values, respectively\n\nOutput Parameters:\n- `nrit`  - On input number of (harmonic) Ritz pairs to compute; on output, actual number of computed (harmonic) Ritz pairs\n- `S`     - an array of the Ritz vectors, pass in an array of vectors of size `nrit`\n- `tetar` - real part of the Ritz values, pass in an array of size `nrit`\n- `tetai` - imaginary part of the Ritz values, pass in an array of size `nrit`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetComputeRitz()`, `KSP`, `KSPGMRES`, `KSPComputeEigenvalues()`, `KSPSetComputeSingularValues()`, `KSPMonitorSingularValue()`\n\n# External Links\n$(_doc_external(\"KSP/KSPComputeRitz\"))\n\"\"\"\nfunction KSPComputeRitz(petsclib::PetscLibType, ksp::PetscKSP, ritz::PetscBool, small::PetscBool, S::Vector{PetscVec}) end\n\n@for_petsc function KSPComputeRitz(petsclib::$UnionPetscLib, ksp::PetscKSP, ritz::PetscBool, small::PetscBool, S::Vector{PetscVec} )\n\tnrit_ = Ref{$PetscInt}()\n\ttetar = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\ttetai = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:KSPComputeRitz, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool, PetscBool, Ptr{$PetscInt}, Ptr{CVec}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ksp, ritz, small, nrit_, S, tetar, tetai,\n              )\n\n\tnrit = nrit_[]\n\n\treturn nrit,tetar,tetai\nend \n\n\"\"\"\n\tKSPSetUpOnBlocks(petsclib::PetscLibType,ksp::PetscKSP) \nSets up the preconditioner for each block in\nthe block Jacobi `PCJACOBI`, overlapping Schwarz `PCASM`, and fieldsplit `PCFIELDSPLIT` preconditioners\n\nCollective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCSetUpOnBlocks()`, `KSPSetUp()`, `PCSetUp()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetUpOnBlocks\"))\n\"\"\"\nfunction KSPSetUpOnBlocks(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPSetUpOnBlocks(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPSetUpOnBlocks, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetReusePreconditioner(petsclib::PetscLibType,ksp::PetscKSP, flag::PetscBool) \nreuse the current preconditioner for future `KSPSolve()`, do not construct a new preconditioner even if the `Mat` operator\nin the `KSP` has different values\n\nCollective\n\nInput Parameters:\n- `ksp`  - iterative solver obtained from `KSPCreate()`\n- `flag` - `PETSC_TRUE` to reuse the current preconditioner, or `PETSC_FALSE` to construct a new preconditioner\n\nOptions Database Key:\n- `-ksp_reuse_preconditioner <true,false>` - reuse the previously computed preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGetReusePreconditioner()`,\n`SNESSetLagPreconditioner()`, `SNES`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetReusePreconditioner\"))\n\"\"\"\nfunction KSPSetReusePreconditioner(petsclib::PetscLibType, ksp::PetscKSP, flag::PetscBool) end\n\n@for_petsc function KSPSetReusePreconditioner(petsclib::$UnionPetscLib, ksp::PetscKSP, flag::PetscBool )\n\n    @chk ccall(\n               (:KSPSetReusePreconditioner, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = KSPGetReusePreconditioner(petsclib::PetscLibType,ksp::PetscKSP) \nDetermines if the `KSP` reuses the current preconditioner even if the `Mat` operator in the `KSP` has changed.\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `flag` - the boolean flag indicating if the current preconditioner should be reused\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `KSPSetReusePreconditioner()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetReusePreconditioner\"))\n\"\"\"\nfunction KSPGetReusePreconditioner(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetReusePreconditioner(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetReusePreconditioner, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tKSPSetSkipPCSetFromOptions(petsclib::PetscLibType,ksp::PetscKSP, flag::PetscBool) \nprevents `KSPSetFromOptions()` from calling `PCSetFromOptions()`.\nThis is used if the same `PC` is shared by more than one `KSP` so its options are not reset for each `KSP`\n\nCollective\n\nInput Parameters:\n- `ksp`  - iterative solver obtained from `KSPCreate()`\n- `flag` - `PETSC_TRUE` to skip calling the `PCSetFromOptions()`\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `PCSetReusePreconditioner()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetSkipPCSetFromOptions\"))\n\"\"\"\nfunction KSPSetSkipPCSetFromOptions(petsclib::PetscLibType, ksp::PetscKSP, flag::PetscBool) end\n\n@for_petsc function KSPSetSkipPCSetFromOptions(petsclib::$UnionPetscLib, ksp::PetscKSP, flag::PetscBool )\n\n    @chk ccall(\n               (:KSPSetSkipPCSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetUp(petsclib::PetscLibType,ksp::PetscKSP) \nSets up the internal data structures for the\nlater use `KSPSolve()` the `KSP` linear iterative solver.\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative solver, `KSP`, obtained from `KSPCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPSetUpOnBlocks()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetUp\"))\n\"\"\"\nfunction KSPSetUp(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPSetUp(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPSetUp, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedReasonView(petsclib::PetscLibType,ksp::PetscKSP, viewer::PetscViewer) \nDisplays the reason a `KSP` solve converged or diverged, `KSPConvergedReason` to a `PetscViewer`\n\nCollective\n\nInput Parameters:\n- `ksp`    - iterative solver obtained from `KSPCreate()`\n- `viewer` - the `PetscViewer` on which to display the reason\n\nOptions Database Keys:\n- `-ksp_converged_reason`          - print reason for converged or diverged, also prints number of iterations\n- `-ksp_converged_reason ::failed` - only print reason and number of iterations when diverged\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPConvergedReasonViewFromOptions()`, `KSPCreate()`, `KSPSetUp()`, `KSPDestroy()`, `KSPSetTolerances()`, `KSPConvergedDefault()`,\n`KSPSolveTranspose()`, `KSPGetIterationNumber()`, `KSP`, `KSPGetConvergedReason()`, `PetscViewerPushFormat()`, `PetscViewerPopFormat()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedReasonView\"))\n\"\"\"\nfunction KSPConvergedReasonView(petsclib::PetscLibType, ksp::PetscKSP, viewer::PetscViewer) end\n\n@for_petsc function KSPConvergedReasonView(petsclib::$UnionPetscLib, ksp::PetscKSP, viewer::PetscViewer )\n\n    @chk ccall(\n               (:KSPConvergedReasonView, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscViewer),\n               ksp, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedReasonViewSet(petsclib::PetscLibType,ksp::PetscKSP, f::KSPConvergedReasonViewFn, vctx::Cvoid, reasonviewdestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function that is to be used at the\nend of the linear solver to display the convergence reason of the linear solver.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`               - the `KSP` context\n- `f`                 - the `ksp` converged reason view function, see `KSPConvergedReasonViewFn`\n- `vctx`              - [optional] user-defined context for private data for the\n`KSPConvergedReason` view routine (use `NULL` if no context is desired)\n- `reasonviewdestroy` - [optional] routine that frees `vctx` (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence\n\nOptions Database Keys:\n- `-ksp_converged_reason`             - sets a default `KSPConvergedReasonView()`\n- `-ksp_converged_reason_view_cancel` - cancels all converged reason viewers that have been hardwired into a code by\ncalls to `KSPConvergedReasonViewSet()`, but does not cancel those set via the options database.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPConvergedReasonView()`, `KSPConvergedReasonViewFn`, `KSPConvergedReasonViewCancel()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedReasonViewSet\"))\n\"\"\"\nfunction KSPConvergedReasonViewSet(petsclib::PetscLibType, ksp::PetscKSP, f::KSPConvergedReasonViewFn, vctx::Cvoid, reasonviewdestroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPConvergedReasonViewSet(petsclib::$UnionPetscLib, ksp::PetscKSP, f::KSPConvergedReasonViewFn, vctx::Cvoid, reasonviewdestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPConvergedReasonViewSet, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPConvergedReasonViewFn}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ksp, f, vctx, reasonviewdestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedReasonViewCancel(petsclib::PetscLibType,ksp::PetscKSP) \nClears all the `KSPConvergedReason` view functions for a `KSP` object set with `KSPConvergedReasonViewSet()`\nas well as the default viewer.\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPDestroy()`, `KSPReset()`, `KSPConvergedReasonViewSet()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedReasonViewCancel\"))\n\"\"\"\nfunction KSPConvergedReasonViewCancel(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPConvergedReasonViewCancel(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPConvergedReasonViewCancel, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedReasonViewFromOptions(petsclib::PetscLibType,ksp::PetscKSP) \nProcesses command line options to determine if/how a `KSPReason` is to be viewed.\n\nCollective\n\nInput Parameter:\n- `ksp` - the `KSP` object\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPConvergedReasonView()`, `KSPConvergedReasonViewSet()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedReasonViewFromOptions\"))\n\"\"\"\nfunction KSPConvergedReasonViewFromOptions(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPConvergedReasonViewFromOptions(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPConvergedReasonViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedRateView(petsclib::PetscLibType,ksp::PetscKSP, viewer::PetscViewer) \nDisplays the convergence rate <https://en.wikipedia.org/wiki/Coefficient_of_determination> of `KSPSolve()` to a viewer\n\nCollective\n\nInput Parameters:\n- `ksp`    - iterative solver obtained from `KSPCreate()`\n- `viewer` - the `PetscViewer` to display the reason\n\nOptions Database Key:\n- `-ksp_converged_rate` - print reason for convergence or divergence and the convergence rate (or 0.0 for divergence)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPConvergedReasonView()`, `KSPGetConvergedRate()`, `KSPSetTolerances()`, `KSPConvergedDefault()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedRateView\"))\n\"\"\"\nfunction KSPConvergedRateView(petsclib::PetscLibType, ksp::PetscKSP, viewer::PetscViewer) end\n\n@for_petsc function KSPConvergedRateView(petsclib::$UnionPetscLib, ksp::PetscKSP, viewer::PetscViewer )\n\n    @chk ccall(\n               (:KSPConvergedRateView, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscViewer),\n               ksp, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSolve(petsclib::PetscLibType,ksp::PetscKSP, b::PetscVec, x::PetscVec) \nSolves a linear system associated with `KSP` object\n\nCollective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `b`   - the right-hand side vector\n- `x`   - the solution (this may be the same vector as `b`, then `b` will be overwritten with the answer)\n\nOptions Database Keys:\n- `-ksp_view_eigenvalues`                      - compute preconditioned operators eigenvalues\n- `-ksp_view_eigenvalues_explicit`             - compute the eigenvalues by forming the dense operator and using LAPACK\n- `-ksp_view_mat binary`                       - save matrix to the default binary viewer\n- `-ksp_view_pmat binary`                      - save matrix used to build preconditioner to the default binary viewer\n- `-ksp_view_rhs binary`                       - save right-hand side vector to the default binary viewer\n- `-ksp_view_solution binary`                  - save computed solution vector to the default binary viewer\n(can be read later with src/ksp/tutorials/ex10.c for testing solvers)\n- `-ksp_view_mat_explicit`                     - for matrix-free operators, computes the matrix entries and views them\n- `-ksp_view_preconditioned_operator_explicit` - computes the product of the preconditioner and matrix as an explicit matrix and views it\n- `-ksp_converged_reason`                      - print reason for converged or diverged, also prints number of iterations\n- `-ksp_view_final_residual`                   - print 2-norm of true linear system residual at the end of the solution process\n- `-ksp_error_if_not_converged`                - stop the program as soon as an error is detected in a `KSPSolve()`\n- `-ksp_view_pre`                              - print the ksp data structure before the system solution\n- `-ksp_view`                                  - print the ksp data structure at the end of the system solution\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPDestroy()`, `KSPSetTolerances()`, `KSPConvergedDefault()`,\n`KSPSolveTranspose()`, `KSPGetIterationNumber()`, `MatNullSpaceCreate()`, `MatSetNullSpace()`, `MatSetTransposeNullSpace()`, `KSP`,\n`KSPConvergedReasonView()`, `KSPCheckSolve()`, `KSPSetErrorIfNotConverged()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSolve\"))\n\"\"\"\nfunction KSPSolve(petsclib::PetscLibType, ksp::PetscKSP, b::Union{PetscVec,Ptr}, x::Union{PetscVec,Ptr}) end\n\n@for_petsc function KSPSolve(petsclib::$UnionPetscLib, ksp::PetscKSP, b::Union{PetscVec,Ptr}, x::Union{PetscVec,Ptr} )\n\n    @chk ccall(\n               (:KSPSolve, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, CVec),\n               ksp, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSolveTranspose(petsclib::PetscLibType,ksp::PetscKSP, b::PetscVec, x::PetscVec) \nSolves a linear system with the transpose of the matrix associated with the `KSP` object,  A^T x = b.\n\nCollective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `b`   - right-hand side vector\n- `x`   - solution vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPDestroy()`, `KSPSetTolerances()`, `KSPConvergedDefault()`,\n`KSPSolve()`, `KSP`, `KSPSetOperators()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSolveTranspose\"))\n\"\"\"\nfunction KSPSolveTranspose(petsclib::PetscLibType, ksp::PetscKSP, b::PetscVec, x::PetscVec) end\n\n@for_petsc function KSPSolveTranspose(petsclib::$UnionPetscLib, ksp::PetscKSP, b::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:KSPSolveTranspose, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, CVec),\n               ksp, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMatSolve(petsclib::PetscLibType,ksp::PetscKSP, B::PetscMat, X::PetscMat) \nSolves a linear system with multiple right\n\nInput Parameters:\n- `ksp` - iterative solver\n- `B`   - block of right-hand sides\n\nOutput Parameter:\n- `X` - block of solutions\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSolve()`, `MatMatSolve()`, `KSPMatSolveTranspose()`, `MATDENSE`, `KSPHPDDM`, `PCBJACOBI`, `PCASM`, `KSPSetMatSolveBatchSize()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMatSolve\"))\n\"\"\"\nfunction KSPMatSolve(petsclib::PetscLibType, ksp::PetscKSP, B::PetscMat, X::PetscMat) end\n\n@for_petsc function KSPMatSolve(petsclib::$UnionPetscLib, ksp::PetscKSP, B::PetscMat, X::PetscMat )\n\n    @chk ccall(\n               (:KSPMatSolve, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CMat, CMat),\n               ksp, B, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMatSolveTranspose(petsclib::PetscLibType,ksp::PetscKSP, B::PetscMat, X::PetscMat) \nSolves a linear system with the transposed matrix with multiple right\n\nInput Parameters:\n- `ksp` - iterative solver\n- `B`   - block of right-hand sides\n\nOutput Parameter:\n- `X` - block of solutions\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSolveTranspose()`, `MatMatTransposeSolve()`, `KSPMatSolve()`, `MATDENSE`, `KSPHPDDM`, `PCBJACOBI`, `PCASM`\n\n# External Links\n$(_doc_external(\"KSP/KSPMatSolveTranspose\"))\n\"\"\"\nfunction KSPMatSolveTranspose(petsclib::PetscLibType, ksp::PetscKSP, B::PetscMat, X::PetscMat) end\n\n@for_petsc function KSPMatSolveTranspose(petsclib::$UnionPetscLib, ksp::PetscKSP, B::PetscMat, X::PetscMat )\n\n    @chk ccall(\n               (:KSPMatSolveTranspose, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CMat, CMat),\n               ksp, B, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetMatSolveBatchSize(petsclib::PetscLibType,ksp::PetscKSP, bs::PetscInt) \nSets the maximum number of columns treated simultaneously in `KSPMatSolve()`.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the `KSP` iterative solver\n- `bs`  - batch size\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPMatSolve()`, `KSPGetMatSolveBatchSize()`, `-mat_mumps_icntl_27`, `-matmatmult_Bbn`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetMatSolveBatchSize\"))\n\"\"\"\nfunction KSPSetMatSolveBatchSize(petsclib::PetscLibType, ksp::PetscKSP, bs::PetscInt) end\n\n@for_petsc function KSPSetMatSolveBatchSize(petsclib::$UnionPetscLib, ksp::PetscKSP, bs::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetMatSolveBatchSize, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = KSPGetMatSolveBatchSize(petsclib::PetscLibType,ksp::PetscKSP) \nGets the maximum number of columns treated simultaneously in `KSPMatSolve()`.\n\nInput Parameter:\n- `ksp` - iterative solver context\n\nOutput Parameter:\n- `bs` - batch size\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPMatSolve()`, `KSPSetMatSolveBatchSize()`, `-mat_mumps_icntl_27`, `-matmatmult_Bbn`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetMatSolveBatchSize\"))\n\"\"\"\nfunction KSPGetMatSolveBatchSize(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetMatSolveBatchSize(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetMatSolveBatchSize, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\tKSPResetViewers(petsclib::PetscLibType,ksp::PetscKSP) \nResets all the viewers set from the options database during `KSPSetFromOptions()`\n\nCollective\n\nInput Parameter:\n- `ksp` - the `KSP` iterative solver context obtained from `KSPCreate()`\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPSolve()`, `KSPSetFromOptions()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPResetViewers\"))\n\"\"\"\nfunction KSPResetViewers(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPResetViewers(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPResetViewers, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPReset(petsclib::PetscLibType,ksp::PetscKSP) \nRemoves any allocated `Vec` and `Mat` from the `KSP` data structures.\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPReset\"))\n\"\"\"\nfunction KSPReset(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPReset(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPReset, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPDestroy(petsclib::PetscLibType,ksp::PetscKSP) \nDestroys a `KSP` context.\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPDestroy\"))\n\"\"\"\nfunction KSPDestroy(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPDestroy(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:KSPDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CKSP},),\n               ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetPCSide(petsclib::PetscLibType,ksp::PetscKSP, side::PCSide) \nSets the preconditioning side.\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `side` - the preconditioning side, where side is one of\n-seealso: [](ch_ksp), `KSPGetPCSide()`, `KSPSetNormType()`, `KSPGetNormType()`, `KSP`, `KSPSetPreSolve()`, `KSPSetPostSolve()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetPCSide\"))\n\"\"\"\nfunction KSPSetPCSide(petsclib::PetscLibType, ksp::PetscKSP, side::PCSide) end\n\n@for_petsc function KSPSetPCSide(petsclib::$UnionPetscLib, ksp::PetscKSP, side::PCSide )\n\n    @chk ccall(\n               (:KSPSetPCSide, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PCSide),\n               ksp, side,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetPCSide(petsclib::PetscLibType,ksp::PetscKSP, side::PCSide) \nGets the preconditioning side.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `side` - the preconditioning side, where side is one of\n-seealso: [](ch_ksp), `KSPSetPCSide()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetPCSide\"))\n\"\"\"\nfunction KSPGetPCSide(petsclib::PetscLibType, ksp::PetscKSP, side::PCSide) end\n\n@for_petsc function KSPGetPCSide(petsclib::$UnionPetscLib, ksp::PetscKSP, side::PCSide )\n\n    @chk ccall(\n               (:KSPGetPCSide, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PCSide}),\n               ksp, side,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trtol::PetscReal,abstol::PetscReal,dtol::PetscReal,maxits::PetscInt = KSPGetTolerances(petsclib::PetscLibType,ksp::PetscKSP) \nGets the relative, absolute, divergence, and maximum\niteration tolerances used by the default `KSP` convergence tests.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov subspace context\n\nOutput Parameters:\n- `rtol`   - the relative convergence tolerance\n- `abstol` - the absolute convergence tolerance\n- `dtol`   - the divergence tolerance\n- `maxits` - maximum number of iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSetTolerances()`, `KSP`, `KSPSetMinimumIterations()`, `KSPGetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetTolerances\"))\n\"\"\"\nfunction KSPGetTolerances(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetTolerances(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\trtol_ = Ref{$PetscReal}()\n\tabstol_ = Ref{$PetscReal}()\n\tdtol_ = Ref{$PetscReal}()\n\tmaxits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               ksp, rtol_, abstol_, dtol_, maxits_,\n              )\n\n\trtol = rtol_[]\n\tabstol = abstol_[]\n\tdtol = dtol_[]\n\tmaxits = maxits_[]\n\n\treturn rtol,abstol,dtol,maxits\nend \n\n\"\"\"\n\tKSPSetTolerances(petsclib::PetscLibType,ksp::PetscKSP, rtol::PetscReal, abstol::PetscReal, dtol::PetscReal, maxits::PetscInt) \nSets the relative, absolute, divergence, and maximum\niteration tolerances used by the default `KSP` convergence testers.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`    - the Krylov subspace context\n- `rtol`   - the relative convergence tolerance, relative decrease in the (possibly preconditioned) residual norm\n- `abstol` - the absolute convergence tolerance   absolute size of the (possibly preconditioned) residual norm\n- `dtol`   - the divergence tolerance,   amount (possibly preconditioned) residual norm can increase before `KSPConvergedDefault()` concludes that the method is diverging\n- `maxits` - maximum number of iterations to use\n\nOptions Database Keys:\n- `-ksp_atol <abstol>`   - Sets `abstol`\n- `-ksp_rtol <rtol>`     - Sets `rtol`\n- `-ksp_divtol <dtol>`   - Sets `dtol`\n- `-ksp_max_it <maxits>` - Sets `maxits`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetTolerances()`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSP`, `KSPSetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetTolerances\"))\n\"\"\"\nfunction KSPSetTolerances(petsclib::PetscLibType, ksp::PetscKSP, rtol::PetscReal, abstol::PetscReal, dtol::PetscReal, maxits::PetscInt) end\n\n@for_petsc function KSPSetTolerances(petsclib::$UnionPetscLib, ksp::PetscKSP, rtol::$PetscReal, abstol::$PetscReal, dtol::$PetscReal, maxits::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal, $PetscReal, $PetscReal, $PetscInt),\n               ksp, rtol, abstol, dtol, maxits,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetMinimumIterations(petsclib::PetscLibType,ksp::PetscKSP, minit::PetscInt) \nSets the minimum number of iterations to use, regardless of the tolerances\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the Krylov subspace context\n- `minit` - minimum number of iterations to use\n\nOptions Database Key:\n- `-ksp_min_it <minits>` - Sets `minit`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetTolerances()`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSP`, `KSPSetTolerances()`, `KSPGetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetMinimumIterations\"))\n\"\"\"\nfunction KSPSetMinimumIterations(petsclib::PetscLibType, ksp::PetscKSP, minit::PetscInt) end\n\n@for_petsc function KSPSetMinimumIterations(petsclib::$UnionPetscLib, ksp::PetscKSP, minit::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetMinimumIterations, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, minit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tminit::PetscInt = KSPGetMinimumIterations(petsclib::PetscLibType,ksp::PetscKSP) \nGets the minimum number of iterations to use, regardless of the tolerances, that was set with `KSPSetMinimumIterations()` or `\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov subspace context\n\nOutput Parameter:\n- `minit` - minimum number of iterations to use\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetTolerances()`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSP`, `KSPSetTolerances()`, `KSPSetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetMinimumIterations\"))\n\"\"\"\nfunction KSPGetMinimumIterations(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetMinimumIterations(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tminit_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetMinimumIterations, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, minit_,\n              )\n\n\tminit = minit_[]\n\n\treturn minit\nend \n\n\"\"\"\n\tKSPSetInitialGuessNonzero(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nTells the iterative solver that the\ninitial guess is nonzero; otherwise `KSP` assumes the initial guess\nis to be zero (and thus zeros it out before solving).\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` indicates the guess is non-zero, `PETSC_FALSE` indicates the guess is zero\n\nOptions Database Key:\n- `-ksp_initial_guess_nonzero <true,false>` - use nonzero initial guess\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPGetInitialGuessNonzero()`, `KSPGuessSetType()`, `KSPGuessType`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetInitialGuessNonzero\"))\n\"\"\"\nfunction KSPSetInitialGuessNonzero(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetInitialGuessNonzero(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetInitialGuessNonzero, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = KSPGetInitialGuessNonzero(petsclib::PetscLibType,ksp::PetscKSP) \nDetermines whether the `KSP` solver is using\na zero initial guess.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` if guess is nonzero, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSetInitialGuessNonzero()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetInitialGuessNonzero\"))\n\"\"\"\nfunction KSPGetInitialGuessNonzero(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetInitialGuessNonzero(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetInitialGuessNonzero, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tKSPSetErrorIfNotConverged(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nCauses `KSPSolve()` to generate an error if the solver has not converged as soon as the error is detected.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` indicates you want the error generated\n\nOptions Database Key:\n- `-ksp_error_if_not_converged <true,false>` - generate an error and stop the program\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetErrorIfNotConverged()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetErrorIfNotConverged\"))\n\"\"\"\nfunction KSPSetErrorIfNotConverged(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetErrorIfNotConverged(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetErrorIfNotConverged, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = KSPGetErrorIfNotConverged(petsclib::PetscLibType,ksp::PetscKSP) \nWill `KSPSolve()` generate an error if the solver does not converge?\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from KSPCreate()\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` if it will generate an error, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSetErrorIfNotConverged()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetErrorIfNotConverged\"))\n\"\"\"\nfunction KSPGetErrorIfNotConverged(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetErrorIfNotConverged(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetErrorIfNotConverged, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tKSPSetInitialGuessKnoll(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nTells the iterative solver to use `PCApply()` on the right hand side vector to compute the initial guess (The Knoll trick)\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPGetInitialGuessKnoll()`, `KSPGuess`, `KSPSetInitialGuessNonzero()`, `KSPGetInitialGuessNonzero()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetInitialGuessKnoll\"))\n\"\"\"\nfunction KSPSetInitialGuessKnoll(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetInitialGuessKnoll(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetInitialGuessKnoll, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = KSPGetInitialGuessKnoll(petsclib::PetscLibType,ksp::PetscKSP) \nDetermines whether the `KSP` solver is using the Knoll trick (using PCApply(pc,b,...) to compute\nthe initial guess\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` if using Knoll trick, else `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetInitialGuessKnoll()`, `KSPSetInitialGuessNonzero()`, `KSPGetInitialGuessNonzero()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetInitialGuessKnoll\"))\n\"\"\"\nfunction KSPGetInitialGuessKnoll(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetInitialGuessKnoll(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetInitialGuessKnoll, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tflg::PetscBool = KSPGetComputeSingularValues(petsclib::PetscLibType,ksp::PetscKSP) \nGets the flag indicating whether the extreme singular\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n- `-ksp_monitor_singular_value` - Activates `KSPSetComputeSingularValues()`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPComputeExtremeSingularValues()`, `KSPMonitorSingularValue()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetComputeSingularValues\"))\n\"\"\"\nfunction KSPGetComputeSingularValues(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetComputeSingularValues(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetComputeSingularValues, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tKSPSetComputeSingularValues(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nSets a flag so that the extreme singular\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n- `-ksp_monitor_singular_value` - Activates `KSPSetComputeSingularValues()`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPComputeExtremeSingularValues()`, `KSPMonitorSingularValue()`, `KSP`, `KSPSetComputeRitz()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeSingularValues\"))\n\"\"\"\nfunction KSPSetComputeSingularValues(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetComputeSingularValues(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetComputeSingularValues, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = KSPGetComputeEigenvalues(petsclib::PetscLibType,ksp::PetscKSP) \nGets the flag indicating that the extreme eigenvalues\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPComputeEigenvalues()`, `KSPComputeEigenvaluesExplicitly()`, `KSP`, `KSPSetComputeRitz()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetComputeEigenvalues\"))\n\"\"\"\nfunction KSPGetComputeEigenvalues(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetComputeEigenvalues(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetComputeEigenvalues, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tKSPSetComputeEigenvalues(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nSets a flag so that the extreme eigenvalues\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPComputeEigenvalues()`, `KSPComputeEigenvaluesExplicitly()`, `KSP`, `KSPSetComputeRitz()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeEigenvalues\"))\n\"\"\"\nfunction KSPSetComputeEigenvalues(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetComputeEigenvalues(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetComputeEigenvalues, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetComputeRitz(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nSets a flag so that the Ritz or harmonic Ritz pairs\nwill be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPComputeRitz()`, `KSP`, `KSPComputeEigenvalues()`, `KSPComputeExtremeSingularValues()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeRitz\"))\n\"\"\"\nfunction KSPSetComputeRitz(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetComputeRitz(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetComputeRitz, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tr::PetscVec = KSPGetRhs(petsclib::PetscLibType,ksp::PetscKSP) \nGets the right\nbe solved.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `r` - right-hand-side vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGetSolution()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetRhs\"))\n\"\"\"\nfunction KSPGetRhs(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetRhs(petsclib::$UnionPetscLib, ksp::PetscKSP)\n    r_ = Ref{CVec}()\n\n    @chk ccall(\n               (:KSPGetRhs, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CVec}),\n               ksp, r_,\n              )\n\n\treturn PetscVec(r_[], petsclib)\nend \n\n\"\"\"\n\tv::PetscVec = KSPGetSolution(petsclib::PetscLibType,ksp::PetscKSP) \nGets the location of the solution for the linear system to be solved.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nReturn Value:\n- `v` - solution vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGetRhs()`, `KSPBuildSolution()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetSolution\"))\n\"\"\"\nfunction KSPGetSolution(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetSolution(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:KSPGetSolution, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CVec}),\n               ksp, v_,\n              )\n\n\tv =  PetscVec(v_[], petsclib)\n\treturn v\nend \n\n\"\"\"\n\tKSPSetPC(petsclib::PetscLibType,ksp::PetscKSP, pc::PC) \nSets the preconditioner to be used to calculate the\napplication of the preconditioner on a vector into a `KSP`.\n\nCollective\n\nInput Parameters:\n- `ksp` - the `KSP` iterative solver obtained from `KSPCreate()`\n- `pc`  - the preconditioner object (if `NULL` it returns the `PC` currently held by the `KSP`)\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGetPC()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetPC\"))\n\"\"\"\nfunction KSPSetPC(petsclib::PetscLibType, ksp::PetscKSP, pc::PC) end\n\n@for_petsc function KSPSetPC(petsclib::$UnionPetscLib, ksp::PetscKSP, pc::PC )\n\n    @chk ccall(\n               (:KSPSetPC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PC),\n               ksp, pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetPC(petsclib::PetscLibType,ksp::PetscKSP, pc::PC) \nReturns a pointer to the preconditioner context with the `KSP`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `pc` - preconditioner context\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPSetPC()`, `KSP`, `PC`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetPC\"))\n\"\"\"\nfunction KSPGetPC(petsclib::PetscLibType, ksp::PetscKSP, pc::PC) end\n\n@for_petsc function KSPGetPC(petsclib::$UnionPetscLib, ksp::PetscKSP, pc::PC )\n\n    @chk ccall(\n               (:KSPGetPC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PC}),\n               ksp, pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitor(petsclib::PetscLibType,ksp::PetscKSP, it::PetscInt, rnorm::PetscReal) \nruns the user provided monitor routines, if they exist\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative solver obtained from `KSPCreate()`\n- `it`    - iteration number\n- `rnorm` - relative norm of the residual\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPMonitorSet()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitor\"))\n\"\"\"\nfunction KSPMonitor(petsclib::PetscLibType, ksp::PetscKSP, it::PetscInt, rnorm::PetscReal) end\n\n@for_petsc function KSPMonitor(petsclib::$UnionPetscLib, ksp::PetscKSP, it::$PetscInt, rnorm::$PetscReal )\n\n    @chk ccall(\n               (:KSPMonitor, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal),\n               ksp, it, rnorm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorSet(petsclib::PetscLibType,ksp::PetscKSP, monitor::KSPMonitorFn, ctx::Cvoid, monitordestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function to be called at every iteration to monitor, i.e. display in some way, perhaps by printing in the terminal,\nthe residual norm computed in a `KSPSolve()`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`            - iterative solver obtained from `KSPCreate()`\n- `monitor`        - pointer to function (if this is `NULL`, it turns off monitoring, see `KSPMonitorFn`\n- `ctx`            - [optional] context for private data for the monitor routine (use `NULL` if no context is needed)\n- `monitordestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence\n\nOptions Database Keys:\n- `-ksp_monitor`                             - sets `KSPMonitorResidual()`\n- `-ksp_monitor hdf5:filename`               - sets `KSPMonitorResidualView()` and saves residual\n- `-ksp_monitor draw`                        - sets `KSPMonitorResidualView()` and plots residual\n- `-ksp_monitor draw::draw_lg`               - sets `KSPMonitorResidualDrawLG()` and plots residual\n- `-ksp_monitor_pause_final`                 - Pauses any graphics when the solve finishes (only works for internal monitors)\n- `-ksp_monitor_true_residual`               - sets `KSPMonitorTrueResidual()`\n- `-ksp_monitor_true_residual draw::draw_lg` - sets `KSPMonitorTrueResidualDrawLG()` and plots residual\n- `-ksp_monitor_max`                         - sets `KSPMonitorTrueResidualMax()`\n- `-ksp_monitor_singular_value`              - sets `KSPMonitorSingularValue()`\n- `-ksp_monitor_cancel`                      - cancels all monitors that have been hardwired into a code by calls to `KSPMonitorSet()`, but\ndoes not cancel those set via the options database.\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPMonitorResidual()`, `KSPMonitorRegister()`, `KSPMonitorCancel()`, `KSP`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSet\"))\n\"\"\"\nfunction KSPMonitorSet(petsclib::PetscLibType, ksp::PetscKSP, monitor::KSPMonitorFn, ctx::Cvoid, monitordestroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPMonitorSet(petsclib::$UnionPetscLib, ksp::PetscKSP, monitor::KSPMonitorFn, ctx::Cvoid, monitordestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPMonitorFn}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ksp, monitor, ctx, monitordestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorCancel(petsclib::PetscLibType,ksp::PetscKSP) \nClears all monitors for a `KSP` object.\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOptions Database Key:\n- `-ksp_monitor_cancel` - Cancels all monitors that have been hardwired into a code by calls to `KSPMonitorSet()`, but does not cancel those set via the options database.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPMonitorResidual()`, `KSPMonitorSet()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorCancel\"))\n\"\"\"\nfunction KSPMonitorCancel(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPMonitorCancel(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetMonitorContext(petsclib::PetscLibType,ksp::PetscKSP, ctx::Cvoid) \nGets the monitoring context, as set by `KSPMonitorSet()` for the FIRST monitor only.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `ctx` - monitoring context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPMonitorResidual()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetMonitorContext\"))\n\"\"\"\nfunction KSPGetMonitorContext(petsclib::PetscLibType, ksp::PetscKSP, ctx::Cvoid) end\n\n@for_petsc function KSPGetMonitorContext(petsclib::$UnionPetscLib, ksp::PetscKSP, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPGetMonitorContext, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Cvoid}),\n               ksp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetResidualHistory(petsclib::PetscLibType,ksp::PetscKSP, a::Vector{PetscReal}, na::PetscCount, reset::PetscBool) \nSets the array used to hold the residual history.\nIf set, this array will contain the residual norms computed at each\niteration of the solver.\n\nNot Collective\n\nInput Parameters:\n- `ksp`   - iterative solver obtained from `KSPCreate()`\n- `a`     - array to hold history\n- `na`    - size of `a`\n- `reset` - `PETSC_TRUE` indicates the history counter is reset to zero\nfor each new linear solve\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPGetResidualHistory()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetResidualHistory\"))\n\"\"\"\nfunction KSPSetResidualHistory(petsclib::PetscLibType, ksp::PetscKSP, a::Vector{PetscReal}, na::PetscCount, reset::PetscBool) end\n\n@for_petsc function KSPSetResidualHistory(petsclib::$UnionPetscLib, ksp::PetscKSP, a::Vector{$PetscReal}, na::PetscCount, reset::PetscBool )\n\n    @chk ccall(\n               (:KSPSetResidualHistory, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}, PetscCount, PetscBool),\n               ksp, a, na, reset,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscReal},na::PetscInt = KSPGetResidualHistory(petsclib::PetscLibType,ksp::PetscKSP) \nGets the array used to hold the residual history and the number of residuals it contains.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameters:\n- `a`  - pointer to array to hold history (or `NULL`)\n- `na` - number of used entries in a (or `NULL`). Note this has different meanings depending on the `reset` argument to `KSPSetResidualHistory()`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetResidualHistory()`, `KSP`, `KSPGetIterationNumber()`, `KSPSTCG`, `KSPBCGSL`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetResidualHistory\"))\n\"\"\"\nfunction KSPGetResidualHistory(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetResidualHistory(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ta_ = Ref{Ptr{$PetscReal}}()\n\tna_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetResidualHistory, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Ptr{$PetscReal}}, Ptr{$PetscInt}),\n               ksp, a_, na_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\tna = na_[]\n\n\treturn a,na\nend \n\n\"\"\"\n\tKSPSetErrorHistory(petsclib::PetscLibType,ksp::PetscKSP, a::Vector{PetscReal}, na::PetscCount, reset::PetscBool) \nSets the array used to hold the error history. If set, this array will contain the error norms computed at each iteration of the solver.\n\nNot Collective\n\nInput Parameters:\n- `ksp`   - iterative solver obtained from `KSPCreate()`\n- `a`     - array to hold history\n- `na`    - size of `a`\n- `reset` - `PETSC_TRUE` indicates the history counter is reset to zero for each new linear solve\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPGetErrorHistory()`, `KSPSetResidualHistory()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetErrorHistory\"))\n\"\"\"\nfunction KSPSetErrorHistory(petsclib::PetscLibType, ksp::PetscKSP, a::Vector{PetscReal}, na::PetscCount, reset::PetscBool) end\n\n@for_petsc function KSPSetErrorHistory(petsclib::$UnionPetscLib, ksp::PetscKSP, a::Vector{$PetscReal}, na::PetscCount, reset::PetscBool )\n\n    @chk ccall(\n               (:KSPSetErrorHistory, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}, PetscCount, PetscBool),\n               ksp, a, na, reset,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscReal},na::PetscInt = KSPGetErrorHistory(petsclib::PetscLibType,ksp::PetscKSP) \nGets the array used to hold the error history and the number of residuals it contains.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameters:\n- `a`  - pointer to array to hold history (or `NULL`)\n- `na` - number of used entries in a (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetErrorHistory()`, `KSPGetResidualHistory()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetErrorHistory\"))\n\"\"\"\nfunction KSPGetErrorHistory(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetErrorHistory(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ta_ = Ref{Ptr{$PetscReal}}()\n\tna_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetErrorHistory, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Ptr{$PetscReal}}, Ptr{$PetscInt}),\n               ksp, a_, na_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\tna = na_[]\n\n\treturn a,na\nend \n\n\"\"\"\n\tcr::PetscReal,rRsq::PetscReal,ce::PetscReal,eRsq::PetscReal = KSPComputeConvergenceRate(petsclib::PetscLibType,ksp::PetscKSP) \nCompute the convergence rate for the iteration <https:/en.wikipedia.org/wiki/Coefficient_of_determination>\n\nNot Collective\n\nInput Parameter:\n- `ksp` - The `KSP`\n\nOutput Parameters:\n- `cr`   - The residual contraction rate\n- `rRsq` - The coefficient of determination, R^2, indicating the linearity of the data\n- `ce`   - The error contraction rate\n- `eRsq` - The coefficient of determination, R^2, indicating the linearity of the data\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedRateView()`\n\n# External Links\n$(_doc_external(\"KSP/KSPComputeConvergenceRate\"))\n\"\"\"\nfunction KSPComputeConvergenceRate(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPComputeConvergenceRate(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tcr_ = Ref{$PetscReal}()\n\trRsq_ = Ref{$PetscReal}()\n\tce_ = Ref{$PetscReal}()\n\teRsq_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPComputeConvergenceRate, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ksp, cr_, rRsq_, ce_, eRsq_,\n              )\n\n\tcr = cr_[]\n\trRsq = rRsq_[]\n\tce = ce_[]\n\teRsq = eRsq_[]\n\n\treturn cr,rRsq,ce,eRsq\nend \n\n\"\"\"\n\tKSPSetConvergenceTest(petsclib::PetscLibType,ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) \nSets the function to be used to determine convergence of `KSPSolve()`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - iterative solver obtained from `KSPCreate()`\n- `converge` - pointer to the function, see `KSPConvergenceTestFn`\n- `ctx`      - context for private data for the convergence routine (may be `NULL`)\n- `destroy`  - a routine for destroying the context (may be `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergenceTestFn`, `KSPConvergedDefault()`, `KSPGetConvergenceContext()`, `KSPSetTolerances()`, `KSPGetConvergenceTest()`, `KSPGetAndClearConvergenceTest()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetConvergenceTest\"))\n\"\"\"\nfunction KSPSetConvergenceTest(petsclib::PetscLibType, ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPSetConvergenceTest(petsclib::$UnionPetscLib, ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPSetConvergenceTest, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPConvergenceTestFn}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ksp, converge, ctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetConvergenceTest(petsclib::PetscLibType,ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) \nGets the function to be used to determine convergence.\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameters:\n- `converge` - pointer to convergence test function, see `KSPConvergenceTestFn`\n- `ctx`      - context for private data for the convergence routine (may be `NULL`)\n- `destroy`  - a routine for destroying the context (may be `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedDefault()`, `KSPGetConvergenceContext()`, `KSPSetTolerances()`, `KSPSetConvergenceTest()`, `KSPGetAndClearConvergenceTest()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetConvergenceTest\"))\n\"\"\"\nfunction KSPGetConvergenceTest(petsclib::PetscLibType, ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPGetConvergenceTest(petsclib::$UnionPetscLib, ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPGetConvergenceTest, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPConvergenceTestFn, Cvoid, PetscCtxDestroyFn),\n               ksp, converge, ctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetAndClearConvergenceTest(petsclib::PetscLibType,ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) \nGets the function to be used to determine convergence. Removes the current test without calling destroy on the test context\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameters:\n- `converge` - pointer to convergence test function, see `KSPConvergenceTestFn`\n- `ctx`      - context for private data for the convergence routine\n- `destroy`  - a routine for destroying the context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedDefault()`, `KSPGetConvergenceContext()`, `KSPSetTolerances()`, `KSPSetConvergenceTest()`, `KSPGetConvergenceTest()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetAndClearConvergenceTest\"))\n\"\"\"\nfunction KSPGetAndClearConvergenceTest(petsclib::PetscLibType, ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPGetAndClearConvergenceTest(petsclib::$UnionPetscLib, ksp::PetscKSP, converge::KSPConvergenceTestFn, ctx::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPGetAndClearConvergenceTest, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPConvergenceTestFn, Cvoid, PetscCtxDestroyFn),\n               ksp, converge, ctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetConvergenceContext(petsclib::PetscLibType,ksp::PetscKSP, ctx::Cvoid) \nGets the convergence context set with `KSPSetConvergenceTest()`.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\n- `ctx` - monitoring context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSPGetConvergenceTest()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetConvergenceContext\"))\n\"\"\"\nfunction KSPGetConvergenceContext(petsclib::PetscLibType, ksp::PetscKSP, ctx::Cvoid) end\n\n@for_petsc function KSPGetConvergenceContext(petsclib::$UnionPetscLib, ksp::PetscKSP, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPGetConvergenceContext, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Cvoid}),\n               ksp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBuildSolution(petsclib::PetscLibType,ksp::PetscKSP, v::PetscVec, V::PetscVec) \nBuilds the approximate solution in a vector provided.\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameter:\nProvide exactly one of\n- `v` - location to stash solution, optional, otherwise pass `NULL`\n- `V` - the solution is returned in this location. This vector is created internally. This vector should NOT be destroyed by the user with `VecDestroy()`.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGetSolution()`, `KSPBuildResidual()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPBuildSolution\"))\n\"\"\"\nfunction KSPBuildSolution(petsclib::PetscLibType, ksp::PetscKSP, v::PetscVec, V::PetscVec) end\n\n@for_petsc function KSPBuildSolution(petsclib::$UnionPetscLib, ksp::PetscKSP, v::PetscVec, V::PetscVec )\n\tV_ = Ref(V.ptr)\n\n    @chk ccall(\n               (:KSPBuildSolution, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, Ptr{CVec}),\n               ksp, v, V_,\n              )\n\n\tV.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBuildResidual(petsclib::PetscLibType,ksp::PetscKSP, t::PetscVec, v::PetscVec, V::PetscVec) \nBuilds the residual in a vector provided.\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative solver obtained from `KSPCreate()`\n\nOutput Parameters:\n- `t` - work vector.  If not provided then one is generated.\n- `v` - optional location to stash residual.  If `v` is not provided, then a location is generated.\n- `V` - the residual\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPBuildSolution()`\n\n# External Links\n$(_doc_external(\"KSP/KSPBuildResidual\"))\n\"\"\"\nfunction KSPBuildResidual(petsclib::PetscLibType, ksp::PetscKSP, t::PetscVec, v::PetscVec, V::PetscVec) end\n\n@for_petsc function KSPBuildResidual(petsclib::$UnionPetscLib, ksp::PetscKSP, t::PetscVec, v::PetscVec, V::PetscVec )\n\tV_ = Ref(V.ptr)\n\n    @chk ccall(\n               (:KSPBuildResidual, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, CVec, Ptr{CVec}),\n               ksp, t, v, V_,\n              )\n\n\tV.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetDiagonalScale(petsclib::PetscLibType,ksp::PetscKSP, scale::PetscBool) \nTells `KSP` to symmetrically diagonally scale the system\nbefore solving. This actually CHANGES the matrix (and right-hand side).\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the `KSP` context\n- `scale` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Keys:\n- `-ksp_diagonal_scale`     - perform a diagonal scaling before the solve\n- `-ksp_diagonal_scale_fix` - scale the matrix back AFTER the solve\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPGetDiagonalScale()`, `KSPSetDiagonalScaleFix()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetDiagonalScale\"))\n\"\"\"\nfunction KSPSetDiagonalScale(petsclib::PetscLibType, ksp::PetscKSP, scale::PetscBool) end\n\n@for_petsc function KSPSetDiagonalScale(petsclib::$UnionPetscLib, ksp::PetscKSP, scale::PetscBool )\n\n    @chk ccall(\n               (:KSPSetDiagonalScale, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tscale::PetscBool = KSPGetDiagonalScale(petsclib::PetscLibType,ksp::PetscKSP) \nChecks if `KSP` solver scales the matrix and right\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n- `scale` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetDiagonalScale()`, `KSPSetDiagonalScaleFix()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetDiagonalScale\"))\n\"\"\"\nfunction KSPGetDiagonalScale(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetDiagonalScale(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tscale_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetDiagonalScale, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, scale_,\n              )\n\n\tscale = scale_[]\n\n\treturn scale\nend \n\n\"\"\"\n\tKSPSetDiagonalScaleFix(petsclib::PetscLibType,ksp::PetscKSP, fix::PetscBool) \nTells `KSP` to diagonally scale the system back after solving.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the `KSP` context\n- `fix` - `PETSC_TRUE` to scale back after the system solve, `PETSC_FALSE` to not\nrescale (default)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetDiagonalScale()`, `KSPSetDiagonalScale()`, `KSPGetDiagonalScaleFix()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetDiagonalScaleFix\"))\n\"\"\"\nfunction KSPSetDiagonalScaleFix(petsclib::PetscLibType, ksp::PetscKSP, fix::PetscBool) end\n\n@for_petsc function KSPSetDiagonalScaleFix(petsclib::$UnionPetscLib, ksp::PetscKSP, fix::PetscBool )\n\n    @chk ccall(\n               (:KSPSetDiagonalScaleFix, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, fix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfix::PetscBool = KSPGetDiagonalScaleFix(petsclib::PetscLibType,ksp::PetscKSP) \nDetermines if `KSP` diagonally scales the system back after solving. That is `KSPSetDiagonalScaleFix()` has been called\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n- `fix` - `PETSC_TRUE` to scale back after the system solve, `PETSC_FALSE` to not\nrescale (default)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetDiagonalScale()`, `KSPSetDiagonalScale()`, `KSPSetDiagonalScaleFix()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetDiagonalScaleFix\"))\n\"\"\"\nfunction KSPGetDiagonalScaleFix(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetDiagonalScaleFix(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tfix_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetDiagonalScaleFix, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, fix_,\n              )\n\n\tfix = fix_[]\n\n\treturn fix\nend \n\n\"\"\"\n\tKSPSetComputeOperators(petsclib::PetscLibType,ksp::PetscKSP, func::Union{KSPComputeOperatorsFn, Ptr}, ctx::Union{Cvoid, Ptr}) \nset routine to compute the linear operators\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the `KSP` context\n- `func` - function to compute the operators, see `KSPComputeOperatorsFn` for the calling sequence\n- `ctx`  - optional context\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOperators()`, `KSPSetComputeRHS()`, `DMKSPSetComputeOperators()`, `KSPSetComputeInitialGuess()`, `KSPComputeOperatorsFn`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeOperators\"))\n\"\"\"\nfunction KSPSetComputeOperators(petsclib::PetscLibType, ksp::PetscKSP, func::Union{KSPComputeOperatorsFn, Ptr}, ctx::Union{Cvoid, Ptr}) end\n\n@for_petsc function KSPSetComputeOperators(petsclib::$UnionPetscLib, ksp::PetscKSP, func::Union{KSPComputeOperatorsFn, Ptr}, ctx::Union{Cvoid, Ptr})\n\n    @chk ccall(\n               (:KSPSetComputeOperators, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPComputeOperatorsFn}, Ptr{Cvoid}),\n               ksp, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetComputeRHS(petsclib::PetscLibType,ksp::PetscKSP, func::Union{KSPComputeRHSFn,Ptr}, ctx::Union{Cvoid, Ptr}) \nset routine to compute the right\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the `KSP` context\n- `func` - function to compute the right-hand side, see `KSPComputeRHSFn` for the calling sequence\n- `ctx`  - optional context\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `DMKSPSetComputeRHS()`, `KSPSetComputeOperators()`, `KSPSetOperators()`, `KSPComputeRHSFn`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeRHS\"))\n\"\"\"\nfunction KSPSetComputeRHS(petsclib::PetscLibType, ksp::PetscKSP, func::Union{KSPComputeRHSFn,Ptr}, ctx::Union{Cvoid, Ptr}) end\n\n@for_petsc function KSPSetComputeRHS(petsclib::$UnionPetscLib, ksp::PetscKSP, func::Union{KSPComputeRHSFn,Ptr}, ctx::Union{Cvoid, Ptr} )\n\n    @chk ccall(\n               (:KSPSetComputeRHS, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPComputeRHSFn}, Ptr{Cvoid}),\n               ksp, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetComputeInitialGuess(petsclib::PetscLibType,ksp::PetscKSP, func::Union{KSPComputeInitialGuessFn, Ptr}, ctx::Union{Cvoid, Ptr}) \nset routine to compute the initial guess of the linear system\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the `KSP` context\n- `func` - function to compute the initial guess, see `KSPComputeInitialGuessFn` for calling sequence\n- `ctx`  - optional context\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `KSPSetComputeRHS()`, `KSPSetComputeOperators()`, `DMKSPSetComputeInitialGuess()`, `KSPSetInitialGuessNonzero()`,\n`KSPComputeInitialGuessFn`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeInitialGuess\"))\n\"\"\"\nfunction KSPSetComputeInitialGuess(petsclib::PetscLibType, ksp::PetscKSP, func::Union{KSPComputeInitialGuessFn, Ptr}, ctx::Union{Cvoid, Ptr}) end\n\n@for_petsc function KSPSetComputeInitialGuess(petsclib::$UnionPetscLib, ksp::PetscKSP, func::Union{KSPComputeInitialGuessFn, Ptr}, ctx::Union{Cvoid, Ptr})\n\n    @chk ccall(\n               (:KSPSetComputeInitialGuess, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPComputeInitialGuessFn}, Ptr{Cvoid}),\n               ksp, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = KSPSetUseExplicitTranspose(petsclib::PetscLibType,ksp::PetscKSP) \nDetermines the explicit transpose of the operator is formed in `KSPSolveTranspose()`. In some configurations (like GPUs) it may\nbe explicitly formed since the solve is much more efficient.\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` to transpose the system in `KSPSolveTranspose()`, `PETSC_FALSE` to not transpose (default)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSolveTranspose()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetUseExplicitTranspose\"))\n\"\"\"\nfunction KSPSetUseExplicitTranspose(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPSetUseExplicitTranspose(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPSetUseExplicitTranspose, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\trnorm::PetscReal = KSPGetResidualNorm(petsclib::PetscLibType,ksp::PetscKSP) \nGets the last (possibly approximate and/or preconditioned) residual norm that has been computed.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `rnorm` - residual norm\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetNormType()`, `KSPBuildResidual()`, `KSPNormType`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetResidualNorm\"))\n\"\"\"\nfunction KSPGetResidualNorm(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetResidualNorm(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\trnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPGetResidualNorm, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}),\n               ksp, rnorm_,\n              )\n\n\trnorm = rnorm_[]\n\n\treturn rnorm\nend \n\n\"\"\"\n\tits::PetscInt = KSPGetIterationNumber(petsclib::PetscLibType,ksp::PetscKSP) \nGets the current iteration number; if the `KSPSolve()` is complete, returns the number of iterations used.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `its` - number of iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPGetResidualNorm()`, `KSPBuildResidual()`, `KSPGetTotalIterations()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetIterationNumber\"))\n\"\"\"\nfunction KSPGetIterationNumber(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetIterationNumber(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetIterationNumber, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, its_,\n              )\n\n\tits = its_[]\n\n\treturn its\nend \n\n\n\"\"\"\n\tits::PetscInt = KSPGetTotalIterations(petsclib::PetscLibType,ksp::PetscKSP) \nGets the total number of iterations this `KSP` object has performed since was created, counted over all linear solves\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `its` - total number of iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPBuildResidual()`, `KSPGetResidualNorm()`, `KSPGetIterationNumber()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetTotalIterations\"))\n\"\"\"\nfunction KSPGetTotalIterations(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetTotalIterations(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetTotalIterations, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, its_,\n              )\n\n\tits = its_[]\n\n\treturn its\nend \n\n\"\"\"\n\tKSPMonitorResidual(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrint the (possibly preconditioned, possibly approximate) residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - (preconditioned) residual norm value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor` - Activates `KSPMonitorResidual()` to print the norm value at each iteration\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidualView()`, `KSPMonitorResidualDrawLG()`,\n`KSPMonitorResidualRange()`, `KSPMonitorTrueResidualDraw()`, `KSPMonitorTrueResidualDrawLG()`, `KSPMonitorTrueResidualMax()`,\n`KSPMonitorSingularValue()`, `KSPMonitorSolutionDrawLG()`, `KSPMonitorSolutionDraw()`, `KSPMonitorSolution()`,\n`KSPMonitorErrorDrawLG()`, `KSPMonitorErrorDraw()`, `KSPMonitorError()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorResidual\"))\n\"\"\"\nfunction KSPMonitorResidual(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorResidual(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorResidual, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorResidualView(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the (possibly preconditioned) residual at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor viewertype` - Activates `KSPMonitorResidualView()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidual()`, `KSPMonitorResidualDrawLG()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorResidualView\"))\n\"\"\"\nfunction KSPMonitorResidualView(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorResidualView(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorResidualView, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorResidualDrawLG(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the (possibly preconditioned) residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor draw::draw_lg` - Activates `KSPMonitorResidualDrawLG()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `PETSCVIEWERDRAW`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidualView()`, `KSPMonitorResidual()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorResidualDrawLG\"))\n\"\"\"\nfunction KSPMonitorResidualDrawLG(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorResidualDrawLG(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorResidualDrawLG, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = KSPMonitorResidualDrawLGCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the context for the (possibly preconditioned) residual norm monitor `KSPMonitorResidualDrawLG()`\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PetscViewer` of type `PETSCVIEWERDRAW`\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The viewer context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `PETSCVIEWERDRAW`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidualDrawLG()`,\n`PetscViewerFormat`, `PetscViewer`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorResidualDrawLGCreate\"))\n\"\"\"\nfunction KSPMonitorResidualDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorResidualDrawLGCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:KSPMonitorResidualDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tKSPMonitorResidualShort(petsclib::PetscLibType,ksp::PetscKSP, its::PetscInt, fnorm::PetscReal, vf::PetscViewerAndFormat) \n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorResidualShort\"))\n\"\"\"\nfunction KSPMonitorResidualShort(petsclib::PetscLibType, ksp::PetscKSP, its::PetscInt, fnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorResidualShort(petsclib::$UnionPetscLib, ksp::PetscKSP, its::$PetscInt, fnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorResidualShort, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, its, fnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorResidualRange(petsclib::PetscLibType,ksp::PetscKSP, it::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the percentage of residual elements that are more than 10 percent of the maximum value.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `it`    - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_range` - Activates `KSPMonitorResidualRange()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorResidualRange\"))\n\"\"\"\nfunction KSPMonitorResidualRange(petsclib::PetscLibType, ksp::PetscKSP, it::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorResidualRange(petsclib::$UnionPetscLib, ksp::PetscKSP, it::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorResidualRange, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, it, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorTrueResidual(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the true residual norm, as well as the (possibly preconditioned, possibly approximate) residual norm,\nat each iteration of a `KSPSolve()` iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_true_residual` - Activates `KSPMonitorTrueResidual()` to print both norm values at each iteration\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorTrueResidual\"))\n\"\"\"\nfunction KSPMonitorTrueResidual(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorTrueResidual(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorTrueResidual, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorTrueResidualView(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the true residual at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context of type `PETSCVIEWERDRAW`\n\nOptions Database Key:\n- `-ksp_monitor_true_residual viewertype` - Activates `KSPMonitorTrueResidualView()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidual()`,\n`KSPMonitorTrueResidualDrawLG()`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorTrueResidualView\"))\n\"\"\"\nfunction KSPMonitorTrueResidualView(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorTrueResidualView(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorTrueResidualView, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorTrueResidualDrawLG(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the true residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_true_residual draw::draw_lg` - Activates `KSPMonitorTrueResidualDrawLG()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorTrueResidualDraw()`, `KSPMonitorResidual`,\n`KSPMonitorTrueResidualDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorTrueResidualDrawLG\"))\n\"\"\"\nfunction KSPMonitorTrueResidualDrawLG(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorTrueResidualDrawLG(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorTrueResidualDrawLG, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = KSPMonitorTrueResidualDrawLGCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the context for the true residual monitor `KSPMonitorTrueResidualDrawLG()`\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PetscViewer` of type `PETSCVIEWERDRAW`\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The viewer context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorTrueResidualDrawLGCreate\"))\n\"\"\"\nfunction KSPMonitorTrueResidualDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorTrueResidualDrawLGCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:KSPMonitorTrueResidualDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tKSPMonitorTrueResidualMax(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the true residual max norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_true_residual_max` - Activates `KSPMonitorTrueResidualMax()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorTrueResidualMax\"))\n\"\"\"\nfunction KSPMonitorTrueResidualMax(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorTrueResidualMax(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorTrueResidualMax, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorError(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the error norm, as well as the (possibly preconditioned) residual norm, at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_error` - Activates `KSPMonitorError()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorError\"))\n\"\"\"\nfunction KSPMonitorError(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorError(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorError, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorErrorDraw(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the error at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_error draw` - Activates `KSPMonitorErrorDraw()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorErrorDrawLG()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorErrorDraw\"))\n\"\"\"\nfunction KSPMonitorErrorDraw(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorErrorDraw(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorErrorDraw, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorErrorDrawLG(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the error and residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_error draw::draw_lg` - Activates `KSPMonitorTrueResidualDrawLG()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorErrorDraw()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorErrorDrawLG\"))\n\"\"\"\nfunction KSPMonitorErrorDrawLG(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorErrorDrawLG(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorErrorDrawLG, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = KSPMonitorErrorDrawLGCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the context for the error and preconditioned residual plotter `KSPMonitorErrorDrawLG()`\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PetscViewer`\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The viewer context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorErrorDrawLG()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorErrorDrawLGCreate\"))\n\"\"\"\nfunction KSPMonitorErrorDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorErrorDrawLGCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:KSPMonitorErrorDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tKSPMonitorSolution(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrint the solution norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_solution` - Activates `KSPMonitorSolution()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPMonitorSet()`, `KSPMonitorTrueResidual()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSolution\"))\n\"\"\"\nfunction KSPMonitorSolution(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorSolution(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorSolution, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorSolutionDraw(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the solution at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_solution draw` - Activates `KSPMonitorSolutionDraw()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPMonitorSet()`, `KSPMonitorTrueResidual()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSolutionDraw\"))\n\"\"\"\nfunction KSPMonitorSolutionDraw(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorSolutionDraw(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorSolutionDraw, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorSolutionDrawLG(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the solution norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_solution draw::draw_lg` - Activates `KSPMonitorSolutionDrawLG()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorSolutionDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSolutionDrawLG\"))\n\"\"\"\nfunction KSPMonitorSolutionDrawLG(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorSolutionDrawLG(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorSolutionDrawLG, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = KSPMonitorSolutionDrawLGCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the context for the `KSP` monitor `KSPMonitorSolutionDrawLG()`\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PetscViewer`\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The viewer context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPMonitorSet()`, `KSPMonitorTrueResidual()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSolutionDrawLGCreate\"))\n\"\"\"\nfunction KSPMonitorSolutionDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorSolutionDrawLGCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:KSPMonitorSolutionDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tKSPMonitorSingularValue(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the two norm of the true residual and estimation of the extreme singular values of the preconditioned problem at each iteration.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the iterative context\n- `n`     - the iteration\n- `rnorm` - the two norm of the residual\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_monitor_singular_value` - Activates `KSPMonitorSingularValue()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPComputeExtremeSingularValues()`, `KSPMonitorSingularValueCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSingularValue\"))\n\"\"\"\nfunction KSPMonitorSingularValue(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorSingularValue(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorSingularValue, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = KSPMonitorSingularValueCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the singular value monitor context needed by `KSPMonitorSingularValue()`\n\nCollective\n\nInput Parameters:\n- `viewer` - The PetscViewer\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The viewer context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorSingularValue()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSingularValueCreate\"))\n\"\"\"\nfunction KSPMonitorSingularValueCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorSingularValueCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:KSPMonitorSingularValueCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tctx::Cvoid = KSPMonitorDynamicToleranceCreate(petsclib::PetscLibType) \nCreates the context used by `KSPMonitorDynamicTolerance()`\n\nLogically Collective\n\nOutput Parameter:\n- `ctx` - a void pointer\n\nOptions Database Key:\n- `-sub_ksp_dynamic_tolerance <coef>` - coefficient of dynamic tolerance for inner solver, default is 1.0\n\nLevel: advanced\n\n-seealso: [](sec_flexibleksp), `KSP`, `KSPMonitorDynamicTolerance()`, `KSPMonitorDynamicToleranceDestroy()`, `KSPMonitorDynamicToleranceSetCoefficient()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorDynamicToleranceCreate\"))\n\"\"\"\nfunction KSPMonitorDynamicToleranceCreate(petsclib::PetscLibType) end\n\n@for_petsc function KSPMonitorDynamicToleranceCreate(petsclib::$UnionPetscLib)\n\tctx_ = Ref{Cvoid}()\n\n    @chk ccall(\n               (:KSPMonitorDynamicToleranceCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid},),\n               ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tcoeff::PetscReal = KSPMonitorDynamicToleranceSetCoefficient(petsclib::PetscLibType,ctx::Cvoid) \nSets the coefficient in the context used by `KSPMonitorDynamicTolerance()`\n\nLogically Collective\n\nOutput Parameters:\n- `ctx`   - the context for `KSPMonitorDynamicTolerance()`\n- `coeff` - the coefficient, default is 1.0\n\nOptions Database Key:\n- `-sub_ksp_dynamic_tolerance <coef>` - coefficient of dynamic tolerance for inner solver, default is 1.0\n\nLevel: advanced\n\n-seealso: [](sec_flexibleksp), `KSP`, `KSPMonitorDynamicTolerance()`, `KSPMonitorDynamicToleranceDestroy()`, `KSPMonitorDynamicToleranceCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorDynamicToleranceSetCoefficient\"))\n\"\"\"\nfunction KSPMonitorDynamicToleranceSetCoefficient(petsclib::PetscLibType, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorDynamicToleranceSetCoefficient(petsclib::$UnionPetscLib, ctx::Cvoid )\n\tcoeff_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPMonitorDynamicToleranceSetCoefficient, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, $PetscReal),\n               ctx, coeff_,\n              )\n\n\tcoeff = coeff_[]\n\n\treturn coeff\nend \n\n\"\"\"\n\tKSPMonitorDynamicTolerance(petsclib::PetscLibType,ksp::PetscKSP, its::PetscInt, fnorm::PetscReal, ctx::Cvoid) \nA monitor that changes the inner tolerance of nested preconditioners in every outer iteration in an adaptive way.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `its`   - iteration number (not used)\n- `fnorm` - the current residual norm\n- `ctx`   - context used by monitor\n\nOptions Database Key:\n- `-sub_ksp_dynamic_tolerance <coef>` - coefficient of dynamic tolerance for inner solver, default is 1.0\n\nLevel: advanced\n\n-seealso: [](sec_flexibleksp), `KSP`, `KSPMonitorDynamicToleranceCreate()`, `KSPMonitorDynamicToleranceDestroy()`, `KSPMonitorDynamicToleranceSetCoefficient()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorDynamicTolerance\"))\n\"\"\"\nfunction KSPMonitorDynamicTolerance(petsclib::PetscLibType, ksp::PetscKSP, its::PetscInt, fnorm::PetscReal, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorDynamicTolerance(petsclib::$UnionPetscLib, ksp::PetscKSP, its::$PetscInt, fnorm::$PetscReal, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPMonitorDynamicTolerance, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               ksp, its, fnorm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorDynamicToleranceDestroy(petsclib::PetscLibType,ctx::Cvoid) \nDestroy the monitor context used in `KSPMonitorDynamicTolerance()`\n\nInput Parameter:\n- `ctx` - the monitor context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorDynamicTolerance()`, `KSPMonitorSet()`, `KSPMonitorDynamicToleranceCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorDynamicToleranceDestroy\"))\n\"\"\"\nfunction KSPMonitorDynamicToleranceDestroy(petsclib::PetscLibType, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorDynamicToleranceDestroy(petsclib::$UnionPetscLib, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPMonitorDynamicToleranceDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cvoid,),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedSkip(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, reason::KSPConvergedReason, dtx::Cvoid) \nConvergence test that do not return as converged\nuntil the maximum number of iterations is reached.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm residual value (may be estimated)\n- `dtx`   - unused convergence context\n\nOutput Parameter:\n- `reason` - `KSP_CONVERGED_ITERATING` or `KSP_CONVERGED_ITS`\n\nOptions Database Key:\n- `-ksp_convergence_test skip` - skips the test\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPCG`, `KSPBCGS`, `KSPConvergenceTestFn`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPSetNormType()`, [](sec_flexibleksp),\n`KSPConvergedReason`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedSkip\"))\n\"\"\"\nfunction KSPConvergedSkip(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, reason::KSPConvergedReason, dtx::Cvoid) end\n\n@for_petsc function KSPConvergedSkip(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, reason::KSPConvergedReason, dtx::Cvoid )\n\n    @chk ccall(\n               (:KSPConvergedSkip, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{KSPConvergedReason}, Ptr{Cvoid}),\n               ksp, n, rnorm, reason, dtx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetConvergedNegativeCurvature(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nAllows to declare convergence and return `KSP_CONVERGED_NEG_CURVE` when negative curvature is detected\n\nCollective\n\nInput Parameters:\n- `ksp` - iterative context\n- `flg` - the Boolean value\n\nOptions Database Key:\n- `-ksp_converged_neg_curve <bool>` - Declare convergence if negative curvature is detected\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedReason`, `KSPGetConvergedNegativeCurvature()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetConvergedNegativeCurvature\"))\n\"\"\"\nfunction KSPSetConvergedNegativeCurvature(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetConvergedNegativeCurvature(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetConvergedNegativeCurvature, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = KSPGetConvergedNegativeCurvature(petsclib::PetscLibType,ksp::PetscKSP) \nGet the flag to declare convergence if negative curvature is detected\n\nCollective\n\nInput Parameter:\n- `ksp` - iterative context\n\nOutput Parameter:\n- `flg` - the Boolean value\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedReason`, `KSPSetConvergedNegativeCurvature()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetConvergedNegativeCurvature\"))\n\"\"\"\nfunction KSPGetConvergedNegativeCurvature(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetConvergedNegativeCurvature(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetConvergedNegativeCurvature, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tctx::Cvoid = KSPConvergedDefaultCreate(petsclib::PetscLibType) \nCreates and initializes the context used by the `KSPConvergedDefault()` function\n\nNot Collective\n\nOutput Parameter:\n- `ctx` - convergence context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedDefault()`, `KSPConvergedDefaultDestroy()`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`,\n`KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUIRNorm()`, `KSPConvergedDefaultSetUMIRNorm()`,\n`KSPConvergedDefaultSetConvergedMaxits()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedDefaultCreate\"))\n\"\"\"\nfunction KSPConvergedDefaultCreate(petsclib::PetscLibType) end\n\n@for_petsc function KSPConvergedDefaultCreate(petsclib::$UnionPetscLib)\n\tctx_ = Ref{Cvoid}()\n\n    @chk ccall(\n               (:KSPConvergedDefaultCreate, $petsc_library),\n               PetscErrorCode,\n               (Cvoid,),\n               ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tKSPConvergedDefaultSetUIRNorm(petsclib::PetscLibType,ksp::PetscKSP) \nmakes the default convergence test use  || B*(b\ninstead of  || B*b ||. In the case of right preconditioner or if `KSPSetNormType`(ksp,`KSP_NORM_UNPRECONDITIONED`)\nis used there is no B in the above formula.\n\nCollective\n\nInput Parameters:\n- `ksp` - iterative context\n\nOptions Database Key:\n- `-ksp_converged_use_initial_residual_norm <bool>` - Use initial residual norm for computing relative convergence\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetConvergedMaxits()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedDefaultSetUIRNorm\"))\n\"\"\"\nfunction KSPConvergedDefaultSetUIRNorm(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPConvergedDefaultSetUIRNorm(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPConvergedDefaultSetUIRNorm, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedDefaultSetUMIRNorm(petsclib::PetscLibType,ksp::PetscKSP) \nmakes the default convergence test use min(|| B*(b\nIn the case of right preconditioner or if `KSPSetNormType`(ksp,`KSP_NORM_UNPRECONDITIONED`)\nis used there is no B in the above formula.\n\nCollective\n\nInput Parameters:\n- `ksp` - iterative context\n\nOptions Database Key:\n- `-ksp_converged_use_min_initial_residual_norm <bool>` - Use minimum of initial residual norm and b for computing relative convergence\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUIRNorm()`, `KSPConvergedDefaultSetConvergedMaxits()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedDefaultSetUMIRNorm\"))\n\"\"\"\nfunction KSPConvergedDefaultSetUMIRNorm(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPConvergedDefaultSetUMIRNorm(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPConvergedDefaultSetUMIRNorm, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedDefaultSetConvergedMaxits(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nallows the default convergence test to declare convergence and return `KSP_CONVERGED_ITS` if the maximum number of iterations is reached\n\nCollective\n\nInput Parameters:\n- `ksp` - iterative context\n- `flg` - boolean flag\n\nOptions Database Key:\n- `-ksp_converged_maxits <bool>` - Declare convergence if the maximum number of iterations is reached\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetUIRNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedDefaultSetConvergedMaxits\"))\n\"\"\"\nfunction KSPConvergedDefaultSetConvergedMaxits(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPConvergedDefaultSetConvergedMaxits(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPConvergedDefaultSetConvergedMaxits, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedDefault(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, reason::KSPConvergedReason, ctx::Cvoid) \nDefault code to determine convergence of the linear iterative solvers\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - residual norm (may be estimated, depending on the method may be the preconditioned residual norm)\n- `ctx`   - convergence context which must be created by `KSPConvergedDefaultCreate()`\n\nOutput Parameter:\n- `reason` - the convergence reason; it is positive if the iteration has converged,\nnegative if the iteration has diverged, and `KSP_CONVERGED_ITERATING` otherwise\n\nOptions Database Keys:\n- `-ksp_max_it`                                  - maximum number of linear iterations\n- `-ksp_min_it`                                  - minimum number of linear iterations, defaults to 0\n- `-ksp_rtol rtol`                               - relative tolerance used in default determination of convergence, i.e. if residual norm decreases by this factor than convergence is declared\n- `-ksp_atol abstol`                             - absolute tolerance used in default convergence test, i.e. if residual norm is less than this then convergence is declared\n- `-ksp_divtol tol`                              - if residual norm increases by this factor than divergence is declared\n- `-ksp_converged_use_initial_residual_norm`     - see `KSPConvergedDefaultSetUIRNorm()`\n- `-ksp_converged_use_min_initial_residual_norm` - see `KSPConvergedDefaultSetUMIRNorm()`\n- `-ksp_converged_maxits`                        - see `KSPConvergedDefaultSetConvergedMaxits()`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`,\n`KSPSetMinimumIterations()`, `KSPConvergenceTestFn`,\n`KSPConvergedDefaultSetUIRNorm()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetConvergedMaxits()`, `KSPConvergedDefaultCreate()`, `KSPConvergedDefaultDestroy()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedDefault\"))\n\"\"\"\nfunction KSPConvergedDefault(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, reason::KSPConvergedReason, ctx::Cvoid) end\n\n@for_petsc function KSPConvergedDefault(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, reason::KSPConvergedReason, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPConvergedDefault, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{KSPConvergedReason}, Ptr{Cvoid}),\n               ksp, n, rnorm, reason, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPConvergedDefaultDestroy(petsclib::PetscLibType,ctx::Cvoid) \nFrees the space used by the `KSPConvergedDefault()` function context\n\nNot Collective\n\nInput Parameter:\n- `ctx` - convergence context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedDefault()`, `KSPConvergedDefaultCreate()`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`,\n`KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUIRNorm()`, `KSPConvergedDefaultSetUMIRNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPConvergedDefaultDestroy\"))\n\"\"\"\nfunction KSPConvergedDefaultDestroy(petsclib::PetscLibType, ctx::Cvoid) end\n\n@for_petsc function KSPConvergedDefaultDestroy(petsclib::$UnionPetscLib, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPConvergedDefaultDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cvoid,),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBuildSolutionDefault(petsclib::PetscLibType,ksp::PetscKSP, v::PetscVec, V::PetscVec) \n\n# External Links\n$(_doc_external(\"KSP/KSPBuildSolutionDefault\"))\n\"\"\"\nfunction KSPBuildSolutionDefault(petsclib::PetscLibType, ksp::PetscKSP, v::PetscVec, V::PetscVec) end\n\n@for_petsc function KSPBuildSolutionDefault(petsclib::$UnionPetscLib, ksp::PetscKSP, v::PetscVec, V::PetscVec )\n\tV_ = Ref(V.ptr)\n\n    @chk ccall(\n               (:KSPBuildSolutionDefault, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, Ptr{CVec}),\n               ksp, v, V_,\n              )\n\n\tV.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBuildResidualDefault(petsclib::PetscLibType,ksp::PetscKSP, t::PetscVec, v::PetscVec, V::PetscVec) \nDefault code to compute the residual.\n\nCollecive on ksp\n\nInput Parameters:\n- `ksp` - iterative context\n- `t`   - pointer to temporary vector\n- `v`   - pointer to user vector\n\nOutput Parameter:\n- `V` - pointer to a vector containing the residual\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPBuildSolutionDefault()`\n\n# External Links\n$(_doc_external(\"KSP/KSPBuildResidualDefault\"))\n\"\"\"\nfunction KSPBuildResidualDefault(petsclib::PetscLibType, ksp::PetscKSP, t::PetscVec, v::PetscVec, V::PetscVec) end\n\n@for_petsc function KSPBuildResidualDefault(petsclib::$UnionPetscLib, ksp::PetscKSP, t::PetscVec, v::PetscVec, V::PetscVec )\n\tV_ = Ref(V.ptr)\n\n    @chk ccall(\n               (:KSPBuildResidualDefault, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, CVec, Ptr{CVec}),\n               ksp, t, v, V_,\n              )\n\n\tV.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tright::Vector{PetscVec},left::Vector{PetscVec} = KSPCreateVecs(petsclib::PetscLibType,ksp::PetscKSP, rightn::PetscInt, leftn::PetscInt) \nGets a number of work vectors suitably sized for the operator in the `KSP`\n\nCollective\n\nInput Parameters:\n- `ksp`    - iterative context\n- `rightn` - number of right work vectors to allocate\n- `leftn`  - number of left work vectors to allocate\n\nOutput Parameters:\n- `right` - the array of vectors created\n- `left`  - the array of left vectors\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MatCreateVecs()`, `VecDestroyVecs()`, `KSPSetWorkVecs()`\n\n# External Links\n$(_doc_external(\"KSP/KSPCreateVecs\"))\n\"\"\"\nfunction KSPCreateVecs(petsclib::PetscLibType, ksp::PetscKSP, rightn::PetscInt, leftn::PetscInt) end\n\n@for_petsc function KSPCreateVecs(petsclib::$UnionPetscLib, ksp::PetscKSP, rightn::$PetscInt, leftn::$PetscInt )\n\tright_ = Ref{Ptr{CVec}}()\n\tleft_ = Ref{Ptr{CVec}}()\n\n    @chk ccall(\n               (:KSPCreateVecs, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, Ptr{Ptr{CVec}}, $PetscInt, Ptr{Ptr{CVec}}),\n               ksp, rightn, right_, leftn, left_,\n              )\n\n\ta_v = unsafe_wrap(Array, right_[], rightn; own = false)\n    if rightn != 0\n        v = PetscVec(a_v[1], petsclib)\n        right = ntuple(i -> similar(v), rightn)\n    else\n        right = nothing\n    end\n\n    \n    a_v = unsafe_wrap(Array, left_[], leftn; own = false)\n    if leftn != 0\n        v = PetscVec(a_v[1], petsclib)\n        left = ntuple(i -> similar(v), leftn)\n    else\n        left = nothing\n    end\n\n\treturn right,left\nend \n\n\"\"\"\n\tKSPSetWorkVecs(petsclib::PetscLibType,ksp::PetscKSP, nw::PetscInt) \nSets a number of work vectors into a `KSP` object\n\nCollective\n\nInput Parameters:\n- `ksp` - iterative context\n- `nw`  - number of work vectors to allocate\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPCreateVecs()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetWorkVecs\"))\n\"\"\"\nfunction KSPSetWorkVecs(petsclib::PetscLibType, ksp::PetscKSP, nw::PetscInt) end\n\n@for_petsc function KSPSetWorkVecs(petsclib::$UnionPetscLib, ksp::PetscKSP, nw::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetWorkVecs, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, nw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPDestroyDefault(petsclib::PetscLibType,ksp::PetscKSP) \n\n# External Links\n$(_doc_external(\"KSP/KSPDestroyDefault\"))\n\"\"\"\nfunction KSPDestroyDefault(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPDestroyDefault(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPDestroyDefault, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\treason::KSPConvergedReason = KSPGetConvergedReason(petsclib::PetscLibType,ksp::PetscKSP) \nGets the reason the `KSP` iteration was stopped.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n- `reason` - negative value indicates diverged, positive value converged, see `KSPConvergedReason` for the possible values\n\nOptions Database Key:\n- `-ksp_converged_reason` - prints the reason to standard out when the solve ends\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPConvergedReason`, `KSP`, `KSPSetConvergenceTest()`, `KSPConvergedDefault()`, `KSPSetTolerances()`,\n`KSPConvergedReasonView()`, `KSPGetConvergedReasonString()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetConvergedReason\"))\n\"\"\"\nfunction KSPGetConvergedReason(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetConvergedReason(petsclib::$UnionPetscLib, ksp::PetscKSP)\n    reason = Ref{KSPConvergedReason}()\n    @chk ccall(\n               (:KSPGetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPConvergedReason}),\n               ksp, reason,\n              )\n\n\n\treturn reason[]\nend \n\n\"\"\"\n\tKSPGetConvergedReasonString(petsclib::PetscLibType,ksp::PetscKSP, strreason::String) \nReturn a human readable string for a `KSPConvergedReason`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n- `strreason` - a human readable string that describes ksp converged reason\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetConvergedReasonString\"))\n\"\"\"\nfunction KSPGetConvergedReasonString(petsclib::PetscLibType, ksp::PetscKSP, strreason::String) end\n\n@for_petsc function KSPGetConvergedReasonString(petsclib::$UnionPetscLib, ksp::PetscKSP, strreason::String )\n\tstrreason_ = Ref(pointer(strreason))\n\n    @chk ccall(\n               (:KSPGetConvergedReasonString, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Ptr{Cchar}}),\n               ksp, strreason_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetDM(petsclib::PetscLibType,ksp::PetscKSP, dm::PetscDM) \nSets the `DM` that may be used by some preconditioners and that may be used to construct the linear system\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the `KSP`\n- `dm`  - the `DM`, cannot be `NULL` to remove a previously set `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `DM`, `KSPGetDM()`, `KSPSetDMActive()`, `KSPSetComputeOperators()`, `KSPSetComputeRHS()`, `KSPSetComputeInitialGuess()`, `DMKSPSetComputeOperators()`, `DMKSPSetComputeRHS()`, `DMKSPSetComputeInitialGuess()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetDM\"))\n\"\"\"\nfunction KSPSetDM(petsclib::PetscLibType, ksp::PetscKSP, dm::PetscDM) end\n\n@for_petsc function KSPSetDM(petsclib::$UnionPetscLib, ksp::PetscKSP, dm::PetscDM )\n\n    @chk ccall(\n               (:KSPSetDM, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CDM),\n               ksp, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetDMActive(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nIndicates the `DM` should be used to generate the linear system matrix and right\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the `KSP`\n- `flg` - use the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `DM`, `KSPGetDM()`, `KSPSetDM()`, `SNESSetDM()`, `KSPSetComputeOperators()`, `KSPSetComputeRHS()`, `KSPSetComputeInitialGuess()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetDMActive\"))\n\"\"\"\nfunction KSPSetDMActive(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetDMActive(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetDMActive, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n    dm::PetscDM = KSPGetDM(petsclib::PetscLibType,ksp::PetscKSP) \nGets the `DM` that may be used by some preconditioners and that may be used to construct the linear system\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the `KSP`\n\nOutput Parameter:\n- `dm` - the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `DM`, `KSPSetDM()`, `KSPSetDMActive()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetDM\"))\n\"\"\"\nfunction KSPGetDM(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetDM(petsclib::$UnionPetscLib, ksp::PetscKSP)\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:KSPGetDM, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CDM}),\n               ksp, dm_,\n              )\n\n    dm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tKSPSetApplicationContext(petsclib::PetscLibType,ksp::PetscKSP, ctx::Cvoid) \nSets the optional user\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the `KSP` context\n- `ctx` - user context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetApplicationContext\"))\n\"\"\"\nfunction KSPSetApplicationContext(petsclib::PetscLibType, ksp::PetscKSP, ctx::Cvoid) end\n\n@for_petsc function KSPSetApplicationContext(petsclib::$UnionPetscLib, ksp::PetscKSP, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPSetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Cvoid}),\n               ksp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetApplicationContext(petsclib::PetscLibType,ksp::PetscKSP, ctx::PeCtx) \nGets the user\n\nNot Collective\n\nInput Parameter:\n- `ksp` - `KSP` context\n\nOutput Parameter:\n- `ctx` - a pointer to the user context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetApplicationContext()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetApplicationContext\"))\n\"\"\"\nfunction KSPGetApplicationContext(petsclib::PetscLibType, ksp::PetscKSP, ctx::PeCtx) end\n\n@for_petsc function KSPGetApplicationContext(petsclib::$UnionPetscLib, ksp::PetscKSP, ctx::PeCtx )\n\n    @chk ccall(\n               (:KSPGetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PeCtx),\n               ksp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPCheckSolve(petsclib::PetscLibType,ksp::PetscKSP, pc::PC, vec::PetscVec) \nChecks if the `PCSetUp()` or `KSPSolve()` failed and set the error flag for the outer `PC`. A `KSP_DIVERGED_ITS` is\nnot considered a failure in this context\n\nCollective\n\nInput Parameters:\n- `ksp` - the linear solver `KSP` context.\n- `pc`  - the preconditioner context\n- `vec` - a vector that will be initialized with Inf to indicate lack of convergence\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPCreate()`, `KSPSetType()`, `KSPCheckNorm()`, `KSPCheckDot()`\n\n# External Links\n$(_doc_external(\"KSP/KSPCheckSolve\"))\n\"\"\"\nfunction KSPCheckSolve(petsclib::PetscLibType, ksp::PetscKSP, pc::PC, vec::PetscVec) end\n\n@for_petsc function KSPCheckSolve(petsclib::$UnionPetscLib, ksp::PetscKSP, pc::PC, vec::PetscVec )\n\n    @chk ccall(\n               (:KSPCheckSolve, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PC, CVec),\n               ksp, pc, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPInitialResidual(petsclib::PetscLibType,ksp::PetscKSP, vsoln::PetscVec, vt1::PetscVec, vt2::PetscVec, vres::PetscVec, vb::PetscVec) \nComputes the residual. Either b\npreconditioning or C*(b - A*x) with left preconditioning; the latter\nresidual is often called the \"preconditioned residual\".\n\nCollective\n\nInput Parameters:\n- `ksp`   - the `KSP` solver object\n- `vsoln` - solution to use in computing residual\n- `vt1`   - temporary work vector\n- `vt2`   - temporary work vector\n- `vb`    - right-hand-side vector\n\nOutput Parameter:\n- `vres` - calculated residual\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `KSPMonitor()`\n\n# External Links\n$(_doc_external(\"KSP/KSPInitialResidual\"))\n\"\"\"\nfunction KSPInitialResidual(petsclib::PetscLibType, ksp::PetscKSP, vsoln::PetscVec, vt1::PetscVec, vt2::PetscVec, vres::PetscVec, vb::PetscVec) end\n\n@for_petsc function KSPInitialResidual(petsclib::$UnionPetscLib, ksp::PetscKSP, vsoln::PetscVec, vt1::PetscVec, vt2::PetscVec, vres::PetscVec, vb::PetscVec )\n\n    @chk ccall(\n               (:KSPInitialResidual, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, CVec, CVec, CVec, CVec),\n               ksp, vsoln, vt1, vt2, vres, vb,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPUnwindPreconditioner(petsclib::PetscLibType,ksp::PetscKSP, vsoln::PetscVec, vt1::PetscVec) \nUnwinds the preconditioning in the solution. That is,\ntakes solution to the preconditioned problem and gets the solution to the\noriginal problem from it.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `vsoln` - solution vector\n- `vt1`   - temporary work vector\n\nOutput Parameter:\n- `vsoln` - contains solution on output\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetPCSide()`\n\n# External Links\n$(_doc_external(\"KSP/KSPUnwindPreconditioner\"))\n\"\"\"\nfunction KSPUnwindPreconditioner(petsclib::PetscLibType, ksp::PetscKSP, vsoln::PetscVec, vt1::PetscVec) end\n\n@for_petsc function KSPUnwindPreconditioner(petsclib::$UnionPetscLib, ksp::PetscKSP, vsoln::PetscVec, vt1::PetscVec )\n\n    @chk ccall(\n               (:KSPUnwindPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CVec, CVec),\n               ksp, vsoln, vt1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPLoad(petsclib::PetscLibType,newdm::PetscKSP, viewer::PetscViewer) \nLoads a `KSP` that has been stored in a `PETSCVIEWERBINARY`  with `KSPView()`.\n\nCollective\n\nInput Parameters:\n- `newdm`  - the newly loaded `KSP`, this needs to have been created with `KSPCreate()` or\nsome related function before a call to `KSPLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `PetscViewerBinaryOpen()`, `KSPView()`, `MatLoad()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLoad\"))\n\"\"\"\nfunction KSPLoad(petsclib::PetscLibType, newdm::PetscKSP, viewer::PetscViewer) end\n\n@for_petsc function KSPLoad(petsclib::$UnionPetscLib, newdm::PetscKSP, viewer::PetscViewer )\n\n    @chk ccall(\n               (:KSPLoad, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscViewer),\n               newdm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPView(petsclib::PetscLibType,ksp::PetscKSP, viewer::PetscViewer) \nPrints the various parameters currently set in the `KSP` object. For example, the convergence tolerances and `KSPType`.\nAlso views the `PC` and `Mat` contained by the `KSP` with `PCView()` and `MatView()`.\n\nCollective\n\nInput Parameters:\n- `ksp`    - the Krylov space context\n- `viewer` - visualization context\n\nOptions Database Key:\n- `-ksp_view` - print the `KSP` data structure at the end of each `KSPSolve()` call\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `PetscViewer`, `PCView()`, `PetscViewerASCIIOpen()`, `KSPViewFromOptions()`\n\n# External Links\n$(_doc_external(\"KSP/KSPView\"))\n\"\"\"\nfunction KSPView(petsclib::PetscLibType, ksp::PetscKSP, viewer::PetscViewer) end\n\n@for_petsc function KSPView(petsclib::$UnionPetscLib, ksp::PetscKSP, viewer::PetscViewer )\n\n    @chk ccall(\n               (:KSPView, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscViewer),\n               ksp, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPViewFromOptions(petsclib::PetscLibType,A::PetscKSP, obj::PetscObject, name::String) \nView (print) a `KSP` object based on values in the options database. Also views the `PC` and `Mat` contained by the `KSP`\nwith `PCView()` and `MatView()`.\n\nCollective\n\nInput Parameters:\n- `A`    - Krylov solver context\n- `obj`  - Optional object that provides the options prefix used to query the options database\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPView()`, `PetscObjectViewFromOptions()`, `KSPCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPViewFromOptions\"))\n\"\"\"\nfunction KSPViewFromOptions(petsclib::PetscLibType, A::PetscKSP, obj::PetscObject, name::String) end\n\n@for_petsc function KSPViewFromOptions(petsclib::$UnionPetscLib, A::PetscKSP, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:KSPViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetNormType(petsclib::PetscLibType,ksp::PetscKSP, normtype::KSPNormType) \nSets the type of residual norm that is used for convergence testing in `KSPSolve()` for the given `KSP` context\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - Krylov solver context\n- `normtype` - one of\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSPConvergedSkip()`, `KSPSetCheckNormIteration()`, `KSPSetPCSide()`, `KSPGetPCSide()`, `KSPNormType`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetNormType\"))\n\"\"\"\nfunction KSPSetNormType(petsclib::PetscLibType, ksp::PetscKSP, normtype::KSPNormType) end\n\n@for_petsc function KSPSetNormType(petsclib::$UnionPetscLib, ksp::PetscKSP, normtype::KSPNormType )\n\n    @chk ccall(\n               (:KSPSetNormType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPNormType),\n               ksp, normtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetCheckNormIteration(petsclib::PetscLibType,ksp::PetscKSP, it::PetscInt) \nSets the first iteration at which the norm of the residual will be\ncomputed and used in the convergence test of `KSPSolve()` for the given `KSP` context\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - Krylov solver context\n- `it`  - use -1 to check at all iterations\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSPConvergedSkip()`, `KSPSetNormType()`, `KSPSetLagNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetCheckNormIteration\"))\n\"\"\"\nfunction KSPSetCheckNormIteration(petsclib::PetscLibType, ksp::PetscKSP, it::PetscInt) end\n\n@for_petsc function KSPSetCheckNormIteration(petsclib::$UnionPetscLib, ksp::PetscKSP, it::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetCheckNormIteration, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, it,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetLagNorm(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nLags the residual norm calculation so that it is computed as part of the `MPI_Allreduce()` used for\ncomputing the inner products needed for the next iteration.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - Krylov solver context\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n- `-ksp_lag_norm` - lag the calculated residual norm\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSPConvergedSkip()`, `KSPSetNormType()`, `KSPSetCheckNormIteration()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetLagNorm\"))\n\"\"\"\nfunction KSPSetLagNorm(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPSetLagNorm(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPSetLagNorm, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetSupportedNorm(petsclib::PetscLibType,ksp::PetscKSP, normtype::KSPNormType, pcside::PCSide, priority::PetscInt) \nSets a norm and preconditioner side supported by a `KSPType`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - Krylov method\n- `normtype` - supported norm type of the type `KSPNormType`\n- `pcside`   - preconditioner side, of the type `PCSide` that can be used with this `KSPNormType`\n- `priority` - positive integer preference for this combination; larger values have higher priority\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPNormType`, `PCSide`, `KSPSetNormType()`, `KSPSetPCSide()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetSupportedNorm\"))\n\"\"\"\nfunction KSPSetSupportedNorm(petsclib::PetscLibType, ksp::PetscKSP, normtype::KSPNormType, pcside::PCSide, priority::PetscInt) end\n\n@for_petsc function KSPSetSupportedNorm(petsclib::$UnionPetscLib, ksp::PetscKSP, normtype::KSPNormType, pcside::PCSide, priority::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetSupportedNorm, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPNormType, PCSide, $PetscInt),\n               ksp, normtype, pcside, priority,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnormtype::KSPNormType = KSPGetNormType(petsclib::PetscLibType,ksp::PetscKSP) \nGets the `KSPNormType` that is used for convergence testing during `KSPSolve()` for this `KSP` context\n\nNot Collective\n\nInput Parameter:\n- `ksp` - Krylov solver context\n\nOutput Parameter:\n- `normtype` - the `KSPNormType` that is used for convergence testing\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPNormType`, `KSPSetNormType()`, `KSPConvergedSkip()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetNormType\"))\n\"\"\"\nfunction KSPGetNormType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetNormType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tnormtype_ = Ref{KSPNormType}()\n\n    @chk ccall(\n               (:KSPGetNormType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPNormType}),\n               ksp, normtype_,\n              )\n\n\tnormtype = unsafe_string(normtype_[])\n\n\treturn normtype\nend \n\n\"\"\"\n\tKSPSetOperators(petsclib::PetscLibType,ksp::PetscKSP, Amat::PetscMat, Pmat::PetscMat) \nSets the matrix associated with the linear system\nand a (possibly) different one from which the preconditioner will be built into the `KSP` context. The matrix will then be used during `KSPSolve()`\n\nCollective\n\nInput Parameters:\n- `ksp`  - the `KSP` context\n- `Amat` - the matrix that defines the linear system\n- `Pmat` - the matrix to be used in constructing the preconditioner, usually the same as `Amat`.\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `Mat`, `KSPSolve()`, `KSPGetPC()`, `PCGetOperators()`, `PCSetOperators()`, `KSPGetOperators()`, `KSPSetComputeOperators()`, `KSPSetComputeInitialGuess()`, `KSPSetComputeRHS()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetOperators\"))\n\"\"\"\nfunction KSPSetOperators(petsclib::PetscLibType, ksp::AbstractPetscKSP, Amat::AbstractPetscMat, Pmat::AbstractPetscMat) end\n\n@for_petsc function KSPSetOperators(petsclib::$UnionPetscLib, ksp::AbstractPetscKSP, Amat::AbstractPetscMat, Pmat::AbstractPetscMat )\n\n    @chk ccall(\n               (:KSPSetOperators, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CMat, CMat),\n               ksp, Amat, Pmat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAmat, PMat = KSPGetOperators(petsclib::PetscLibType,ksp::PetscKSP) \nGets the matrix associated with the linear system\nand a (possibly) different one used to construct the preconditioner from the `KSP` context\n\nCollective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nOutput Parameters:\n- `Amat` - the matrix that defines the linear system\n- `Pmat` - the matrix to be used in constructing the preconditioner, usually the same as `Amat`.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `KSPGetPC()`, `PCSetOperators()`, `KSPSetOperators()`, `KSPGetOperatorsSet()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetOperators\"))\n\"\"\"\nfunction KSPGetOperators(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetOperators(petsclib::$UnionPetscLib, ksp::PetscKSP)\n\tAmat_ = Ref{CVec}()\n\tPmat_ = Ref{CVec}()\n\n    @chk ccall(\n               (:KSPGetOperators, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CMat}, Ptr{CMat}),\n               ksp, Amat_, Pmat_,\n              )\n\n    Amat =  PetscMat(Amat_[], petsclib)\n    Pmat =  PetscMat(Pmat_[], petsclib)\n    \n\treturn Amat, Pmat\nend \n\n\"\"\"\n\tmat::PetscBool,pmat::PetscBool = KSPGetOperatorsSet(petsclib::PetscLibType,ksp::PetscKSP) \nDetermines if the matrix associated with the linear system and\npossibly a different one from which the preconditioner will be built have been set in the `KSP` with `KSPSetOperators()`\n\nNot Collective, though the results on all processes will be the same\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nOutput Parameters:\n- `mat`  - the matrix associated with the linear system was set\n- `pmat` - matrix from which the preconditioner will be built, usually the same as `mat` was set\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `PCSetOperators()`, `KSPGetOperators()`, `KSPSetOperators()`, `PCGetOperators()`, `PCGetOperatorsSet()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetOperatorsSet\"))\n\"\"\"\nfunction KSPGetOperatorsSet(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetOperatorsSet(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tmat_ = Ref{PetscBool}()\n\tpmat_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPGetOperatorsSet, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}, Ptr{PetscBool}),\n               ksp, mat_, pmat_,\n              )\n\n\tmat = mat_[]\n\tpmat = pmat_[]\n\n\treturn mat,pmat\nend \n\n\"\"\"\n\tKSPSetPreSolve(petsclib::PetscLibType,ksp::PetscKSP, presolve::KSPPSolveFn, ctx::Cvoid) \nSets a function that is called at the beginning of each `KSPSolve()`. Used in conjunction with `KSPSetPostSolve()`.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - the solver object\n- `presolve` - the function to call before the solve, see` KSPPSolveFn`\n- `ctx`      - an optional context needed by the function\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPPSolveFn`, `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPSetPostSolve()`, `PCEISENSTAT`, `PCPreSolve()`, `PCPostSolve()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetPreSolve\"))\n\"\"\"\nfunction KSPSetPreSolve(petsclib::PetscLibType, ksp::PetscKSP, presolve::KSPPSolveFn, ctx::Cvoid) end\n\n@for_petsc function KSPSetPreSolve(petsclib::$UnionPetscLib, ksp::PetscKSP, presolve::KSPPSolveFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPSetPreSolve, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPPSolveFn}, Ptr{Cvoid}),\n               ksp, presolve, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetPostSolve(petsclib::PetscLibType,ksp::PetscKSP, postsolve::KSPPSolveFn, ctx::Cvoid) \nSets a function that is called at the end of each `KSPSolve()` (whether it converges or not). Used in conjunction with `KSPSetPreSolve()`.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`       - the solver object\n- `postsolve` - the function to call after the solve, see` KSPPSolveFn`\n- `ctx`       - an optional context needed by the function\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPPSolveFn`, `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPSetPreSolve()`, `PCEISENSTAT`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetPostSolve\"))\n\"\"\"\nfunction KSPSetPostSolve(petsclib::PetscLibType, ksp::PetscKSP, postsolve::KSPPSolveFn, ctx::Cvoid) end\n\n@for_petsc function KSPSetPostSolve(petsclib::$UnionPetscLib, ksp::PetscKSP, postsolve::KSPPSolveFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPSetPostSolve, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPPSolveFn}, Ptr{Cvoid}),\n               ksp, postsolve, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetNestLevel(petsclib::PetscLibType,ksp::PetscKSP, level::PetscInt) \nsets the amount of nesting the `KSP` has. That is the number of levels of `KSP` above this `KSP` in a linear solve.\n\nCollective\n\nInput Parameters:\n- `ksp`   - the `KSP`\n- `level` - the nest level\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`, `KSPGetNestLevel()`, `PCSetKSPNestLevel()`, `PCGetKSPNestLevel()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetNestLevel\"))\n\"\"\"\nfunction KSPSetNestLevel(petsclib::PetscLibType, ksp::PetscKSP, level::PetscInt) end\n\n@for_petsc function KSPSetNestLevel(petsclib::$UnionPetscLib, ksp::PetscKSP, level::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetNestLevel, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, level,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlevel::PetscInt = KSPGetNestLevel(petsclib::PetscLibType,ksp::PetscKSP) \ngets the amount of nesting the `KSP` has\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the `KSP`\n\nOutput Parameter:\n- `level` - the nest level\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`, `KSPSetNestLevel()`, `PCSetKSPNestLevel()`, `PCGetKSPNestLevel()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetNestLevel\"))\n\"\"\"\nfunction KSPGetNestLevel(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetNestLevel(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tlevel_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGetNestLevel, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, level_,\n              )\n\n\tlevel = level_[]\n\n\treturn level\nend \n\n\"\"\"\n\tinksp::PetscKSP = KSPCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates the `KSP` context. This `KSP` context is used in PETSc to solve linear systems with `KSPSolve()`\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `inksp` - location to put the `KSP` context\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`, `KSPSetType()`\n\n# External Links\n$(_doc_external(\"KSP/KSPCreate\"))\n\"\"\"\nfunction KSPCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function KSPCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tinksp_ = Ref{CKSP}()\n\n    @chk ccall(\n               (:KSPCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CKSP}),\n               comm, inksp_,\n              )\n\n\tinksp = PetscKSP(inksp_[], petsclib)\n\n\treturn inksp\nend \n\n\"\"\"\n\tKSPSetType(petsclib::PetscLibType,ksp::PetscKSP, type::KSPType) \nSets the algorithm/method to be used to solve the linear system with the given `KSP`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the Krylov space context\n- `type` - a known method\n\nOptions Database Key:\n- `-ksp_type  <method>` - Sets the method; see `KSPGType` or use `-help` for a list  of available methods (for instance, cg or gmres)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSetType()`, `KSPType`, `KSPRegister()`, `KSPCreate()`, `KSP`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetType\"))\n\"\"\"\nfunction KSPSetType(petsclib::PetscLibType, ksp::PetscKSP, type::KSPType) end\n\n@for_petsc function KSPSetType(petsclib::$UnionPetscLib, ksp::PetscKSP, type::KSPType )\n\n    @chk ccall(\n               (:KSPSetType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPType),\n               ksp, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::KSPType = KSPGetType(petsclib::PetscLibType,ksp::PetscKSP) \nGets the `KSP` type as a string from the `KSP` object.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - Krylov context\n\nOutput Parameter:\n- `type` - name of the `KSP` method\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPType`, `KSP`, `KSPSetType()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetType\"))\n\"\"\"\nfunction KSPGetType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ttype_ = Ref{KSPType}()\n\n    @chk ccall(\n               (:KSPGetType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPType}),\n               ksp, type_,\n              )\n              \n    if type_[] == C_NULL\n        type = \"\"\n    else\n        type = unsafe_string(type_[])\n    end\n\n\treturn type\nend \n\n\"\"\"\n\tKSPRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a method, `KSPType`, to the Krylov subspace solver package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined solver\n- `function` - routine to create method\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPType`, `KSPSetType`, `KSPRegisterAll()`\n\n# External Links\n$(_doc_external(\"KSP/KSPRegister\"))\n\"\"\"\nfunction KSPRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function KSPRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:KSPRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorRegister(petsclib::PetscLibType,name::String, vtype::PetscViewerType, format::PetscViewerFormat, monitor::KSPMonitorRegisterFn, create::KSPMonitorRegisterCreateFn, destroy::KSPMonitorRegisterDestroyFn) \nRegisters a Krylov subspace solver monitor routine that may be accessed with `KSPMonitorSetFromOptions()`\n\nNot Collective\n\nInput Parameters:\n- `name`    - name of a new monitor type\n- `vtype`   - A `PetscViewerType` for the output\n- `format`  - A `PetscViewerFormat` for the output\n- `monitor` - Monitor routine, see `KSPMonitorRegisterFn`\n- `create`  - Creation routine, or `NULL`\n- `destroy` - Destruction routine, or `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorRegisterAll()`, `KSPMonitorSetFromOptions()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorRegister\"))\n\"\"\"\nfunction KSPMonitorRegister(petsclib::PetscLibType, name::String, vtype::PetscViewerType, format::PetscViewerFormat, monitor::KSPMonitorRegisterFn, create::KSPMonitorRegisterCreateFn, destroy::KSPMonitorRegisterDestroyFn) end\n\n@for_petsc function KSPMonitorRegister(petsclib::$UnionPetscLib, name::String, vtype::PetscViewerType, format::PetscViewerFormat, monitor::KSPMonitorRegisterFn, create::KSPMonitorRegisterCreateFn, destroy::KSPMonitorRegisterDestroyFn )\n\n    @chk ccall(\n               (:KSPMonitorRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PetscViewerType, PetscViewerFormat, Ptr{KSPMonitorRegisterFn}, Ptr{KSPMonitorRegisterCreateFn}, Ptr{KSPMonitorRegisterDestroyFn}),\n               name, vtype, format, monitor, create, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetOptionsPrefix(petsclib::PetscLibType,ksp::PetscKSP, prefix::String) \nSets the prefix used for searching for all\n`KSP` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`    - the Krylov context\n- `prefix` - the prefix string to prepend to all `KSP` option requests\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPAppendOptionsPrefix()`, `KSPGetOptionsPrefix()`, `KSPSetFromOptions()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetOptionsPrefix\"))\n\"\"\"\nfunction KSPSetOptionsPrefix(petsclib::PetscLibType, ksp::PetscKSP, prefix::String) end\n\n@for_petsc function KSPSetOptionsPrefix(petsclib::$UnionPetscLib, ksp::PetscKSP, prefix::String )\n\n    @chk ccall(\n               (:KSPSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Cchar}),\n               ksp, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPAppendOptionsPrefix(petsclib::PetscLibType,ksp::PetscKSP, prefix::String) \nAppends to the prefix used for searching for all\n`KSP` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`    - the Krylov context\n- `prefix` - the prefix string to prepend to all `KSP` option requests\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOptionsPrefix()`, `KSPGetOptionsPrefix()`, `KSPSetFromOptions()`\n\n# External Links\n$(_doc_external(\"KSP/KSPAppendOptionsPrefix\"))\n\"\"\"\nfunction KSPAppendOptionsPrefix(petsclib::PetscLibType, ksp::PetscKSP, prefix::String) end\n\n@for_petsc function KSPAppendOptionsPrefix(petsclib::$UnionPetscLib, ksp::PetscKSP, prefix::String )\n\n    @chk ccall(\n               (:KSPAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Cchar}),\n               ksp, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetUseFischerGuess(petsclib::PetscLibType,ksp::PetscKSP, model::PetscInt, size::PetscInt) \nUse the Paul Fischer algorithm or its variants to compute initial guesses for a set of solves with related right\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the Krylov context\n- `model` - use model 1, model 2, model 3, or any other number to turn it off\n- `size`  - size of subspace used to generate initial guess\n\nOptions Database Key:\n- `-ksp_fischer_guess <model,size>` - uses the Fischer initial guess generator for repeated linear solves\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `KSPSetGuess()`, `KSPGetGuess()`, `KSPGuess`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetUseFischerGuess\"))\n\"\"\"\nfunction KSPSetUseFischerGuess(petsclib::PetscLibType, ksp::PetscKSP, model::PetscInt, size::PetscInt) end\n\n@for_petsc function KSPSetUseFischerGuess(petsclib::$UnionPetscLib, ksp::PetscKSP, model::$PetscInt, size::$PetscInt )\n\n    @chk ccall(\n               (:KSPSetUseFischerGuess, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscInt),\n               ksp, model, size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetGuess(petsclib::PetscLibType,ksp::PetscKSP, guess::KSPGuess) \nSet the initial guess object `KSPGuess` to be used by the `KSP` object to generate initial guesses\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the Krylov context\n- `guess` - the object created with `KSPGuessCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPGuess`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `KSPSetUseFischerGuess()`, `KSPGetGuess()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetGuess\"))\n\"\"\"\nfunction KSPSetGuess(petsclib::PetscLibType, ksp::PetscKSP, guess::KSPGuess) end\n\n@for_petsc function KSPSetGuess(petsclib::$UnionPetscLib, ksp::PetscKSP, guess::KSPGuess )\n\n    @chk ccall(\n               (:KSPSetGuess, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPGuess),\n               ksp, guess,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGetGuess(petsclib::PetscLibType,ksp::PetscKSP, guess::KSPGuess) \nGets the initial guess generator for the `KSP`.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov context\n\nOutput Parameter:\n- `guess` - the object\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuess`, `KSP`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `KSPSetUseFischerGuess()`, `KSPSetGuess()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetGuess\"))\n\"\"\"\nfunction KSPGetGuess(petsclib::PetscLibType, ksp::PetscKSP, guess::KSPGuess) end\n\n@for_petsc function KSPGetGuess(petsclib::$UnionPetscLib, ksp::PetscKSP, guess::KSPGuess )\n\n    @chk ccall(\n               (:KSPGetGuess, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPGuess}),\n               ksp, guess,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tprefix::String = KSPGetOptionsPrefix(petsclib::PetscLibType,ksp::PetscKSP) \nGets the prefix used for searching for all `KSP` options in the database.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov context\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used is returned\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetFromOptions()`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetOptionsPrefix\"))\n\"\"\"\nfunction KSPGetOptionsPrefix(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGetOptionsPrefix(petsclib::$UnionPetscLib, ksp::PetscKSP )\n    \n    prefix_ = Ref{Ptr{Int8}}()\n\n    @chk ccall(\n               (:KSPGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Ptr{Cchar}}),\n               ksp, prefix_,\n              )\n\n    if prefix_[] == C_NULL\n        prefix = \"\"\n    else\n\t    prefix = unsafe_string(prefix_[])\n    end\n\n\treturn prefix\nend \n\n\"\"\"\n\tKSPMonitorSetFromOptions(petsclib::PetscLibType,ksp::PetscKSP, opt::String, name::String, ctx::Cvoid) \nSets a monitor function and viewer appropriate for the type indicated by the user in the options database\n\nCollective\n\nInput Parameters:\n- `ksp`  - `KSP` object you wish to monitor\n- `opt`  - the command line option for this monitor\n- `name` - the monitor type one is seeking\n- `ctx`  - An optional user context for the monitor, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPMonitorRegister()`, `KSPMonitorSet()`, `PetscOptionsCreateViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSetFromOptions\"))\n\"\"\"\nfunction KSPMonitorSetFromOptions(petsclib::PetscLibType, ksp::PetscKSP, opt::String, name::String, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorSetFromOptions(petsclib::$UnionPetscLib, ksp::PetscKSP, opt::String, name::String, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPMonitorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cvoid}),\n               ksp, opt, name, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPSetFromOptions(petsclib::PetscLibType,ksp::PetscKSP) \nSets `KSP` options from the options database.\nThis routine must be called before `KSPSetUp()` if the user is to be\nallowed to set the Krylov type.\n\nCollective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOptions Database Keys:\n- `-ksp_rtol rtol`                                                          - relative tolerance used in default determination of convergence, i.e.\nif residual norm decreases by this factor than convergence is declared\n- `-ksp_atol abstol`                                                        - absolute tolerance used in default convergence test, i.e. if residual\nnorm is less than this then convergence is declared\n- `-ksp_divtol tol`                                                         - if residual norm increases by this factor than divergence is declared\n- `-ksp_max_it`                                                             - maximum number of linear iterations\n- `-ksp_min_it`                                                             - minimum number of linear iterations to use, defaults to zero\n\n- `-ksp_reuse_preconditioner <true,false>`                                  - reuse the previously computed preconditioner\n\n- `-ksp_converged_use_initial_residual_norm`                                - see `KSPConvergedDefaultSetUIRNorm()`\n- `-ksp_converged_use_min_initial_residual_norm`                            - see `KSPConvergedDefaultSetUMIRNorm()`\n- `-ksp_converged_maxits`                                                   - see `KSPConvergedDefaultSetConvergedMaxits()`\n- `-ksp_norm_type <none,preconditioned,unpreconditioned,natural>`           - see `KSPSetNormType()`\n- `-ksp_check_norm_iteration it`                                            - do not compute residual norm until iteration number it (does compute at 0th iteration)\nworks only for `KSPBCGS`, `KSPIBCGS`, and `KSPCG`\n- `-ksp_lag_norm`                                                           - compute the norm of the residual for the ith iteration on the i+1 iteration;\nthis means that one can use the norm of the residual for convergence test WITHOUT\nan extra `MPI_Allreduce()` limiting global synchronizations.\nThis will require 1 more iteration of the solver than usual.\n- `-ksp_guess_type`                                                         - Type of initial guess generator for repeated linear solves\n- `-ksp_fischer_guess <model,size>`                                         - uses the Fischer initial guess generator for repeated linear solves\n- `-ksp_constant_null_space`                                                - assume the operator (matrix) has the constant vector in its null space\n- `-ksp_test_null_space`                                                    - tests the null space set with `MatSetNullSpace()` to see if it truly is a null space\n- `-ksp_knoll`                                                              - compute initial guess by applying the preconditioner to the right-hand side\n- `-ksp_monitor_cancel`                                                     - cancel all previous convergene monitor routines set\n- `-ksp_monitor`                                                            - print residual norm at each iteration\n- `-ksp_monitor draw::draw_lg`                                              - plot residual norm at each iteration, see `KSPMonitorResidual()`\n- `-ksp_monitor_true_residual`                                              - print the true l2 residual norm at each iteration, see `KSPMonitorTrueResidual()`\n- `-all_ksp_monitor <optional filename>`                                    - print residual norm at each iteration for ALL KSP solves, regardless of their prefix. This is\nuseful for `PCFIELDSPLIT`, `PCMG`, etc that have inner solvers and\nyou wish to track the convergence of all the solvers\n- `-ksp_monitor_solution [ascii binary or draw][:filename][:format option]` - plot solution at each iteration\n- `-ksp_monitor_singular_value`                                             - monitor extreme singular values at each iteration\n- `-ksp_converged_reason`                                                   - view the convergence state at the end of the solve\n- `-ksp_use_explicittranspose`                                              - transpose the system explicitly in `KSPSolveTranspose()`\n- `-ksp_error_if_not_converged`                                             - stop the program as soon as an error is detected in a `KSPSolve()`, `KSP_DIVERGED_ITS`\nis not treated as an error on inner solves\n- `-ksp_converged_rate`                                                     - view the convergence rate at the end of the solve\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOptionsPrefix()`, `KSPResetFromOptions()`, `KSPSetUseFischerGuess()`\n\n# External Links\n$(_doc_external(\"KSP/KSPSetFromOptions\"))\n\"\"\"\nfunction KSPSetFromOptions(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPSetFromOptions(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPResetFromOptions(petsclib::PetscLibType,ksp::PetscKSP) \nSets `KSP` parameters from user options ONLY if the `KSP` was previously set from options\n\nCollective\n\nInput Parameter:\n- `ksp` - the `KSP` context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetFromOptions()`, `KSPSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"KSP/KSPResetFromOptions\"))\n\"\"\"\nfunction KSPResetFromOptions(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPResetFromOptions(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPResetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `KSP` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscFinalize()`, `KSPInitializePackage()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFinalizePackage\"))\n\"\"\"\nfunction KSPFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function KSPFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:KSPFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `KSP` package. It is called\nfrom `PetscDLLibraryRegister_petscksp()` when using dynamic libraries, and on the first call to `KSPCreate()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscInitialize()`, `KSPFinalizePackage()`\n\n# External Links\n$(_doc_external(\"KSP/KSPInitializePackage\"))\n\"\"\"\nfunction KSPInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function KSPInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:KSPInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::Cvoid = KSPMonitorSAWsCreate(petsclib::PetscLibType,ksp::PetscKSP) \ncreate an SAWs monitor context for `KSP`\n\nCollective\n\nInput Parameter:\n- `ksp` - `KSP` to monitor\n\nOutput Parameter:\n- `ctx` - context for monitor\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorSAWs()`, `KSPMonitorSAWsDestroy()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSAWsCreate\"))\n\"\"\"\nfunction KSPMonitorSAWsCreate(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPMonitorSAWsCreate(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tctx_ = Ref{Cvoid}()\n\n    @chk ccall(\n               (:KSPMonitorSAWsCreate, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Cvoid),\n               ksp, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tKSPMonitorSAWsDestroy(petsclib::PetscLibType,ctx::Cvoid) \ndestroy a monitor context created with `KSPMonitorSAWsCreate()`\n\nCollective\n\nInput Parameter:\n- `ctx` - monitor context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorSAWsCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSAWsDestroy\"))\n\"\"\"\nfunction KSPMonitorSAWsDestroy(petsclib::PetscLibType, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorSAWsDestroy(petsclib::$UnionPetscLib, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPMonitorSAWsDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cvoid,),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorSAWs(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, ctx::Cvoid) \nmonitor `KSP` solution using SAWs\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `ctx`   - created with `KSPMonitorSAWsCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorSAWsCreate()`, `KSPMonitorSAWsDestroy()`, `KSPMonitorSingularValue()`, `KSPComputeExtremeSingularValues()`, `PetscViewerSAWsOpen()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMonitorSAWs\"))\n\"\"\"\nfunction KSPMonitorSAWs(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorSAWs(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPMonitorSAWs, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               ksp, n, rnorm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGMRESSetPreAllocateVectors(petsclib::PetscLibType,ksp::PetscKSP) \nCauses `KSPGMRES` and `KSPFGMRES` to preallocate all its\nneeded work vectors at initial setup rather than the default, which\nis to allocate several at a time when needed.\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOptions Database Key:\n- `-ksp_gmres_preallocate` - Activates `KSPGmresSetPreAllocateVectors()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRESSetRestart()`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESGetOrthogonalization()`,\n`VecMDot()`, `VecMAXPY()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESSetPreAllocateVectors\"))\n\"\"\"\nfunction KSPGMRESSetPreAllocateVectors(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGMRESSetPreAllocateVectors(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPGMRESSetPreAllocateVectors, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGMRESClassicalGramSchmidtOrthogonalization(petsclib::PetscLibType,ksp::PetscKSP, it::PetscInt) \nThis is the basic orthogonalization routine\nusing classical Gram-Schmidt with possible iterative refinement to improve the stability\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `ksp` - `KSP` object, must be associated with `KSPGMRES`, `KSPFGMRES`, or `KSPLGMRES` Krylov method\n- `it`  - one less than the current GMRES restart iteration, i.e. the size of the Krylov space\n\nOptions Database Keys:\n- `-ksp_gmres_classicalgramschmidt`                                             - Activates `KSPGMRESClassicalGramSchmidtOrthogonalization()`\n- `-ksp_gmres_cgs_refinement_type <refine_never,refine_ifneeded,refine_always>` - determine if iterative refinement is\nused to increase the stability of the classical Gram-Schmidt  orthogonalization.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRESCGSRefinementType`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESSetCGSRefinementType()`,\n`KSPGMRESGetCGSRefinementType()`, `KSPGMRESGetOrthogonalization()`, `KSPGMRESModifiedGramSchmidtOrthogonalization()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESClassicalGramSchmidtOrthogonalization\"))\n\"\"\"\nfunction KSPGMRESClassicalGramSchmidtOrthogonalization(petsclib::PetscLibType, ksp::PetscKSP, it::PetscInt) end\n\n@for_petsc function KSPGMRESClassicalGramSchmidtOrthogonalization(petsclib::$UnionPetscLib, ksp::PetscKSP, it::$PetscInt )\n\n    @chk ccall(\n               (:KSPGMRESClassicalGramSchmidtOrthogonalization, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, it,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGMRESSetOrthogonalization(petsclib::PetscLibType,ksp::PetscKSP, fcn::external) \nSets the orthogonalization routine used by `KSPGMRES` and `KSPFGMRES`.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `fcn` - orthogonalization function\n\nCalling sequence of `fcn`:\n- `ksp` - the solver context\n- `it`  - the current iteration\n\nOptions Database Keys:\n- `-ksp_gmres_classicalgramschmidt` - Activates KSPGMRESClassicalGramSchmidtOrthogonalization() (default)\n- `-ksp_gmres_modifiedgramschmidt`  - Activates KSPGMRESModifiedGramSchmidtOrthogonalization()\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRESSetRestart()`, `KSPGMRESSetPreAllocateVectors()`,\n`KSPGMRESSetCGSRefinementType()`, `KSPGMRESModifiedGramSchmidtOrthogonalization()`,\n`KSPGMRESClassicalGramSchmidtOrthogonalization()`, `KSPGMRESGetCGSRefinementType()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESSetOrthogonalization\"))\n\"\"\"\nfunction KSPGMRESSetOrthogonalization(petsclib::PetscLibType, ksp::PetscKSP, fcn::external) end\n\n@for_petsc function KSPGMRESSetOrthogonalization(petsclib::$UnionPetscLib, ksp::PetscKSP, fcn::external )\n\n    @chk ccall(\n               (:KSPGMRESSetOrthogonalization, $petsc_library),\n               PetscErrorCode,\n               (CKSP, external),\n               ksp, fcn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGMRESMonitorKrylov(petsclib::PetscLibType,ksp::PetscKSP, its::PetscInt, fgnorm::PetscReal, dummy::Cvoid) \nCalls `VecView()` to monitor each new direction in the `KSPGMRES` accumulated Krylov space.\n\nCollective\n\nInput Parameters:\n- `ksp`    - the `KSP` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual (or gradient)\n- `dummy`  - a collection of viewers created with `PetscViewersCreate()`\n\nOptions Database Key:\n- `-ksp_gmres_krylov_monitor <bool>` - Plot the Krylov directions\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRES`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `VecView()`, `PetscViewersCreate()`, `PetscViewersDestroy()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESMonitorKrylov\"))\n\"\"\"\nfunction KSPGMRESMonitorKrylov(petsclib::PetscLibType, ksp::PetscKSP, its::PetscInt, fgnorm::PetscReal, dummy::Cvoid) end\n\n@for_petsc function KSPGMRESMonitorKrylov(petsclib::$UnionPetscLib, ksp::PetscKSP, its::$PetscInt, fgnorm::$PetscReal, dummy::Cvoid )\n\n    @chk ccall(\n               (:KSPGMRESMonitorKrylov, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               ksp, its, fgnorm, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGMRESSetCGSRefinementType(petsclib::PetscLibType,ksp::PetscKSP, type::KSPGMRESCGSRefinementType) \nSets the type of iterative refinement to use\nin the classical Gram-Schmidt orthogonalization used by `KSPGMRES` and other PETSc GMRES implementations.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the Krylov space solver context\n- `type` - the type of refinement\n-seealso: [](ch_ksp), `KSPGMRES`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESCGSRefinementType`, `KSPGMRESClassicalGramSchmidtOrthogonalization()`, `KSPGMRESGetCGSRefinementType()`,\n`KSPGMRESGetOrthogonalization()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESSetCGSRefinementType\"))\n\"\"\"\nfunction KSPGMRESSetCGSRefinementType(petsclib::PetscLibType, ksp::PetscKSP, type::KSPGMRESCGSRefinementType) end\n\n@for_petsc function KSPGMRESSetCGSRefinementType(petsclib::$UnionPetscLib, ksp::PetscKSP, type::KSPGMRESCGSRefinementType )\n\n    @chk ccall(\n               (:KSPGMRESSetCGSRefinementType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPGMRESCGSRefinementType),\n               ksp, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::KSPGMRESCGSRefinementType = KSPGMRESGetCGSRefinementType(petsclib::PetscLibType,ksp::PetscKSP) \nGets the type of iterative refinement to use\nin the classical Gram-Schmidt orthogonalization used by `KSPGMRES` and other PETSc GMRES implementations.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space solver context\n\nOutput Parameter:\n- `type` - the type of refinement\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRES`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESCGSRefinementType`, `KSPGMRESClassicalGramSchmidtOrthogonalization()`, `KSPGMRESSetCGSRefinementType()`,\n`KSPGMRESGetOrthogonalization()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESGetCGSRefinementType\"))\n\"\"\"\nfunction KSPGMRESGetCGSRefinementType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGMRESGetCGSRefinementType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ttype_ = Ref{KSPGMRESCGSRefinementType}()\n\n    @chk ccall(\n               (:KSPGMRESGetCGSRefinementType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPGMRESCGSRefinementType}),\n               ksp, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tKSPGMRESSetRestart(petsclib::PetscLibType,ksp::PetscKSP, restart::PetscInt) \nSets number of iterations at which GMRES (`KSPGMRES`, `KSPFGMRES`, `KSPPGMRES`, `KSPAGMRES`, `KSPDGMRES`, `KSPPIPEFGMRES`,\nand `KSPLGMRES`) restarts.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`     - the Krylov space solver context\n- `restart` - integer restart value, this corresponds to the number of iterations of GMRES to perform before restarting\n\nOptions Database Key:\n- `-ksp_gmres_restart <positive integer>` - integer restart value\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRES`, `KSPSetTolerances()`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESSetPreAllocateVectors()`, `KSPGMRESGetRestart()`,\n`KSPFGMRES`, `KSPLGMRES`, `KSPPGMRES`, `KSPAGMRES`, `KSPDGMRES`, `KSPPIPEFGMRES`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESSetRestart\"))\n\"\"\"\nfunction KSPGMRESSetRestart(petsclib::PetscLibType, ksp::PetscKSP, restart::PetscInt) end\n\n@for_petsc function KSPGMRESSetRestart(petsclib::$UnionPetscLib, ksp::PetscKSP, restart::$PetscInt )\n\n    @chk ccall(\n               (:KSPGMRESSetRestart, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, restart,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trestart::PetscInt = KSPGMRESGetRestart(petsclib::PetscLibType,ksp::PetscKSP) \nGets number of iterations at which GMRES (`KSPGMRES`, `KSPFGMRES`, `KSPPGMRES`, `KSPAGMRES`, `KSPDGMRES`, `KSPPIPEFGMRES`,\nand `KSPLGMRES`) restarts.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space solver context\n\nOutput Parameter:\n- `restart` - integer restart value\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRES`, `KSPSetTolerances()`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESSetPreAllocateVectors()`, `KSPGMRESSetRestart()`,\n`KSPFGMRES`, `KSPLGMRES`, `KSPPGMRES`, `KSPAGMRES`, `KSPDGMRES`, `KSPPIPEFGMRES`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESGetRestart\"))\n\"\"\"\nfunction KSPGMRESGetRestart(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGMRESGetRestart(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\trestart_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGMRESGetRestart, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, restart_,\n              )\n\n\trestart = restart_[]\n\n\treturn restart\nend \n\n\"\"\"\n\tKSPGMRESSetHapTol(petsclib::PetscLibType,ksp::PetscKSP, tol::PetscReal) \nSets the tolerance for detecting a happy ending in GMRES (`KSPGMRES`, `KSPFGMRES` and `KSPLGMRES` and others)\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the Krylov space solver context\n- `tol` - the tolerance for detecting a happy ending\n\nOptions Database Key:\n- `-ksp_gmres_haptol <positive real value>` - set tolerance for determining happy breakdown\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRES`, `KSPSetTolerances()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESSetHapTol\"))\n\"\"\"\nfunction KSPGMRESSetHapTol(petsclib::PetscLibType, ksp::PetscKSP, tol::PetscReal) end\n\n@for_petsc function KSPGMRESSetHapTol(petsclib::$UnionPetscLib, ksp::PetscKSP, tol::$PetscReal )\n\n    @chk ccall(\n               (:KSPGMRESSetHapTol, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, tol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGMRESSetBreakdownTolerance(petsclib::PetscLibType,ksp::PetscKSP, tol::PetscReal) \nSets the tolerance for determining divergence breakdown in `KSPGMRES` at restart.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the Krylov space solver context\n- `tol` - the tolerance\n\nOptions Database Key:\n- `-ksp_gmres_breakdown_tolerance <positive real value>` - set tolerance for determining divergence breakdown\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRES`, `KSPSetTolerances()`, `KSPGMRESSetHapTol()`, `KSPConvergedReason`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESSetBreakdownTolerance\"))\n\"\"\"\nfunction KSPGMRESSetBreakdownTolerance(petsclib::PetscLibType, ksp::PetscKSP, tol::PetscReal) end\n\n@for_petsc function KSPGMRESSetBreakdownTolerance(petsclib::$UnionPetscLib, ksp::PetscKSP, tol::$PetscReal )\n\n    @chk ccall(\n               (:KSPGMRESSetBreakdownTolerance, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, tol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGMRESModifiedGramSchmidtOrthogonalization(petsclib::PetscLibType,ksp::PetscKSP, it::PetscInt) \nThis is the basic orthogonalization routine\nusing modified Gram-Schmidt.\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `ksp` - `KSP` object, must be associated with `KSPGMRES`, `KSPFGMRES`, or `KSPLGMRES` Krylov method\n- `it`  - one less than the current GMRES restart iteration, i.e. the size of the Krylov space\n\nOptions Database Key:\n- `-ksp_gmres_modifiedgramschmidt` - Activates `KSPGMRESModifiedGramSchmidtOrthogonalization()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGMRESSetOrthogonalization()`, `KSPGMRESClassicalGramSchmidtOrthogonalization()`, `KSPGMRESGetOrthogonalization()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGMRESModifiedGramSchmidtOrthogonalization\"))\n\"\"\"\nfunction KSPGMRESModifiedGramSchmidtOrthogonalization(petsclib::PetscLibType, ksp::PetscKSP, it::PetscInt) end\n\n@for_petsc function KSPGMRESModifiedGramSchmidtOrthogonalization(petsclib::$UnionPetscLib, ksp::PetscKSP, it::$PetscInt )\n\n    @chk ccall(\n               (:KSPGMRESModifiedGramSchmidtOrthogonalization, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, it,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPPIPEFGMRESSetShift(petsclib::PetscLibType,ksp::PetscKSP, shift::PetscScalar) \nSet the shift parameter for the flexible, pipelined `KSPPIPEFGMRES` solver.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the Krylov space context\n- `shift` - the shift\n\nOptions Database Key:\n- `-ksp_pipefgmres_shift <shift>` - set the shift parameter\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPPIPEFGMRES`, `KSPComputeEigenvalues()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEFGMRESSetShift\"))\n\"\"\"\nfunction KSPPIPEFGMRESSetShift(petsclib::PetscLibType, ksp::PetscKSP, shift::PetscScalar) end\n\n@for_petsc function KSPPIPEFGMRESSetShift(petsclib::$UnionPetscLib, ksp::PetscKSP, shift::$PetscScalar )\n\n    @chk ccall(\n               (:KSPPIPEFGMRESSetShift, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscScalar),\n               ksp, shift,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFGMRESSetModifyPC(petsclib::PetscLibType,ksp::PetscKSP, fcn::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) \nSets the routine used by `KSPFGMRES` to modify the preconditioner. [](sec_flexibleksp)\n\nLogically Collective\n\nInput Parameters:\n- `ksp`     - iterative context obtained from `KSPCreate()`\n- `fcn`     - function to modify the `PC`, see `KSPFlexibleModifyPCFn`\n- `ctx`     - optional context\n- `destroy` - optional context destroy routine\n\nOptions Database Keys:\n- `-ksp_fgmres_modifypcnochange` - do not change the `PC`\n- `-ksp_fgmres_modifypcksp`      - changes the inner KSP solver tolerances\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [](sec_flexibleksp), `KSPFGMRES`, `KSPFlexibleModifyPCFn`, `KSPFlexibleSetModifyPC()`, `KSPFGMRESModifyPCNoChange()`, `KSPFGMRESModifyPCKSP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFGMRESSetModifyPC\"))\n\"\"\"\nfunction KSPFGMRESSetModifyPC(petsclib::PetscLibType, ksp::PetscKSP, fcn::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPFGMRESSetModifyPC(petsclib::$UnionPetscLib, ksp::PetscKSP, fcn::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPFGMRESSetModifyPC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPFlexibleModifyPCFn}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ksp, fcn, ctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFlexibleSetModifyPC(petsclib::PetscLibType,ksp::PetscKSP, fcn::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) \nSets the routine used by flexible `KSP` methods to modify the preconditioner. [](sec_flexibleksp)\n\nLogically Collective\n\nInput Parameters:\n- `ksp`     - iterative context obtained from `KSPCreate()`\n- `fcn`     - function to modify the `PC`, see `KSPFlexibleModifyPCFn`\n- `ctx`     - optional context\n- `destroy` - optional context destroy routine\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [](sec_flexibleksp), `KSPFGMRES`, `KSPFGMRESModifyPCNoChange()`, `KSPFGMRESModifyPCKSP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFlexibleSetModifyPC\"))\n\"\"\"\nfunction KSPFlexibleSetModifyPC(petsclib::PetscLibType, ksp::PetscKSP, fcn::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPFlexibleSetModifyPC(petsclib::$UnionPetscLib, ksp::PetscKSP, fcn::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPFlexibleSetModifyPC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPFlexibleModifyPCFn}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ksp, fcn, ctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFGMRESModifyPCNoChange(petsclib::PetscLibType,ksp::PetscKSP, total_its::PetscInt, loc_its::PetscInt, res_norm::PetscReal, ctx::Cvoid) \nthis is the default used by `KSPFMGMRES`\n\nInput Parameters:\n- `ksp`       - the ksp context being used.\n- `total_its` - the total number of `KSPFGMRES` iterations that have occurred.\n- `loc_its`   - the number of `KSPFGMRES` iterations since last restart.\n- `res_norm`  - the current residual norm.\n- `ctx`       - context variable, unused in this routine\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [](sec_flexibleksp), `KSPFGMRES`, `KSPFlexibleModifyPCFn`, `KSPFGMRESSetModifyPC()`, `KSPFGMRESModifyPCKSP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFGMRESModifyPCNoChange\"))\n\"\"\"\nfunction KSPFGMRESModifyPCNoChange(petsclib::PetscLibType, ksp::PetscKSP, total_its::PetscInt, loc_its::PetscInt, res_norm::PetscReal, ctx::Cvoid) end\n\n@for_petsc function KSPFGMRESModifyPCNoChange(petsclib::$UnionPetscLib, ksp::PetscKSP, total_its::$PetscInt, loc_its::$PetscInt, res_norm::$PetscReal, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPFGMRESModifyPCNoChange, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               ksp, total_its, loc_its, res_norm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFGMRESModifyPCKSP(petsclib::PetscLibType,ksp::PetscKSP, total_its::PetscInt, loc_its::PetscInt, res_norm::PetscReal, ctx::Cvoid) \nmodifies the attributes of the `KSPFGMRES` preconditioner, see [](sec_flexibleksp).\n\nInput Parameters:\n- `ksp`       - the ksp context being used.\n- `total_its` - the total number of `KSPFGMRES` iterations that have occurred.\n- `loc_its`   - the number of `KSPFGMRES` iterations since last restart.\n- `res_norm`  - the current residual norm.\n- `ctx`       - context, not used in this routine\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [](sec_flexibleksp), `KSPFGMRES`, `KSPFlexibleModifyPCFn`, `KSPFGMRESSetModifyPC()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFGMRESModifyPCKSP\"))\n\"\"\"\nfunction KSPFGMRESModifyPCKSP(petsclib::PetscLibType, ksp::PetscKSP, total_its::PetscInt, loc_its::PetscInt, res_norm::PetscReal, ctx::Cvoid) end\n\n@for_petsc function KSPFGMRESModifyPCKSP(petsclib::$UnionPetscLib, ksp::PetscKSP, total_its::$PetscInt, loc_its::$PetscInt, res_norm::$PetscReal, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPFGMRESModifyPCKSP, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               ksp, total_its, loc_its, res_norm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPLGMRESSetAugDim(petsclib::PetscLibType,ksp::PetscKSP, dim::PetscInt) \nSet the number of error approximations to include in the approximation space (default is 2) for `KSPLGMRES`\n\nCollective\n\nInput Parameters:\n- `ksp` - the `KSP` context\n- `dim` - the number of vectors to use\n\nOptions Database Key:\n- `-ksp_lgmres_augment dim` - the number of error approximations to include\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPLGMRES`, `KSPLGMRESSetConstant()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLGMRESSetAugDim\"))\n\"\"\"\nfunction KSPLGMRESSetAugDim(petsclib::PetscLibType, ksp::PetscKSP, dim::PetscInt) end\n\n@for_petsc function KSPLGMRESSetAugDim(petsclib::$UnionPetscLib, ksp::PetscKSP, dim::$PetscInt )\n\n    @chk ccall(\n               (:KSPLGMRESSetAugDim, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPLGMRESSetConstant(petsclib::PetscLibType,ksp::PetscKSP) \nkeep the error approximation space a constant size for every restart cycle\n\nCollective\n\nInput Parameters:\n- `ksp` - the `KSP` context\n\nOptions Database Key:\n- `-ksp_lgmres_constant` - set the size to be constant\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPLGMRES`, `KSPLGMRESSetAugDim()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLGMRESSetConstant\"))\n\"\"\"\nfunction KSPLGMRESSetConstant(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPLGMRESSetConstant(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\n    @chk ccall(\n               (:KSPLGMRESSetConstant, $petsc_library),\n               PetscErrorCode,\n               (CKSP,),\n               ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPChebyshevSetEigenvalues(petsclib::PetscLibType,ksp::PetscKSP, emax::PetscReal, emin::PetscReal) \nSets estimates for the extreme eigenvalues of the preconditioned problem.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the Krylov space context\n- `emax` - the eigenvalue maximum estimate\n- `emin` - the eigenvalue minimum estimate\n\nOptions Database Key:\n- `-ksp_chebyshev_eigenvalues emin,emax` - extreme eigenvalues\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCHEBYSHEV`, `KSPChebyshevEstEigSet()`,\n\n# External Links\n$(_doc_external(\"KSP/KSPChebyshevSetEigenvalues\"))\n\"\"\"\nfunction KSPChebyshevSetEigenvalues(petsclib::PetscLibType, ksp::PetscKSP, emax::PetscReal, emin::PetscReal) end\n\n@for_petsc function KSPChebyshevSetEigenvalues(petsclib::$UnionPetscLib, ksp::PetscKSP, emax::$PetscReal, emin::$PetscReal )\n\n    @chk ccall(\n               (:KSPChebyshevSetEigenvalues, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal, $PetscReal),\n               ksp, emax, emin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPChebyshevEstEigSet(petsclib::PetscLibType,ksp::PetscKSP, a::PetscReal, b::PetscReal, c::PetscReal, d::PetscReal) \nAutomatically estimate the eigenvalues to use for Chebyshev\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the Krylov space context\n- `a`   - multiple of min eigenvalue estimate to use for min Chebyshev bound (or `PETSC_DECIDE`)\n- `b`   - multiple of max eigenvalue estimate to use for min Chebyshev bound (or `PETSC_DECIDE`)\n- `c`   - multiple of min eigenvalue estimate to use for max Chebyshev bound (or `PETSC_DECIDE`)\n- `d`   - multiple of max eigenvalue estimate to use for max Chebyshev bound (or `PETSC_DECIDE`)\n\nOptions Database Key:\n- `-ksp_chebyshev_esteig a,b,c,d` - estimate eigenvalues using a Krylov method, then use this transform for Chebyshev eigenvalue bounds\n\n-seealso: [](ch_ksp), `KSPCHEBYSHEV`, `KSPChebyshevEstEigSetUseNoisy()`, `KSPChebyshevEstEigGetKSP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPChebyshevEstEigSet\"))\n\"\"\"\nfunction KSPChebyshevEstEigSet(petsclib::PetscLibType, ksp::PetscKSP, a::PetscReal, b::PetscReal, c::PetscReal, d::PetscReal) end\n\n@for_petsc function KSPChebyshevEstEigSet(petsclib::$UnionPetscLib, ksp::PetscKSP, a::$PetscReal, b::$PetscReal, c::$PetscReal, d::$PetscReal )\n\n    @chk ccall(\n               (:KSPChebyshevEstEigSet, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               ksp, a, b, c, d,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPChebyshevEstEigSetUseNoisy(petsclib::PetscLibType,ksp::PetscKSP, use::PetscBool) \nuse a noisy random number generated right\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - linear solver context\n- `use` - `PETSC_TRUE` to use noisy\n\nOptions Database Key:\n- `-ksp_chebyshev_esteig_noisy <true,false>` - Use noisy right-hand side for estimate\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCHEBYSHEV`, `KSPChebyshevEstEigSet()`, `KSPChebyshevEstEigGetKSP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPChebyshevEstEigSetUseNoisy\"))\n\"\"\"\nfunction KSPChebyshevEstEigSetUseNoisy(petsclib::PetscLibType, ksp::PetscKSP, use::PetscBool) end\n\n@for_petsc function KSPChebyshevEstEigSetUseNoisy(petsclib::$UnionPetscLib, ksp::PetscKSP, use::PetscBool )\n\n    @chk ccall(\n               (:KSPChebyshevEstEigSetUseNoisy, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPChebyshevEstEigGetKSP(petsclib::PetscLibType,ksp::PetscKSP, kspest::PetscKSP) \nGet the Krylov method context used to estimate the eigenvalues for the Chebyshev method.\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `kspest` - the eigenvalue estimation Krylov space context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPCHEBYSHEV`, `KSPChebyshevEstEigSet()`\n\n# External Links\n$(_doc_external(\"KSP/KSPChebyshevEstEigGetKSP\"))\n\"\"\"\nfunction KSPChebyshevEstEigGetKSP(petsclib::PetscLibType, ksp::PetscKSP, kspest::PetscKSP) end\n\n@for_petsc function KSPChebyshevEstEigGetKSP(petsclib::$UnionPetscLib, ksp::PetscKSP, kspest::PetscKSP )\n\tkspest_ = Ref(kspest.ptr)\n\n    @chk ccall(\n               (:KSPChebyshevEstEigGetKSP, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CKSP}),\n               ksp, kspest_,\n              )\n\n\tkspest.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPChebyshevSetKind(petsclib::PetscLibType,ksp::PetscKSP, kind::KSPChebyshevKind) \nset the kind of Chebyshev polynomial to use\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - Linear solver context\n- `kind` - The kind of Chebyshev polynomial to use, see `KSPChebyshevKind`, one of `KSP_CHEBYSHEV_FIRST`, `KSP_CHEBYSHEV_FOURTH`, or `KSP_CHEBYSHEV_OPT_FOURTH`\n\nOptions Database Key:\n- `-ksp_chebyshev_kind <kind>` - which kind of Chebyshev polynomial to use\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCHEBYSHEV`, `KSPChebyshevKind`, `KSPChebyshevGetKind()`, `KSP_CHEBYSHEV_FIRST`, `KSP_CHEBYSHEV_FOURTH`, `KSP_CHEBYSHEV_OPT_FOURTH`\n\n# External Links\n$(_doc_external(\"KSP/KSPChebyshevSetKind\"))\n\"\"\"\nfunction KSPChebyshevSetKind(petsclib::PetscLibType, ksp::PetscKSP, kind::KSPChebyshevKind) end\n\n@for_petsc function KSPChebyshevSetKind(petsclib::$UnionPetscLib, ksp::PetscKSP, kind::KSPChebyshevKind )\n\n    @chk ccall(\n               (:KSPChebyshevSetKind, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPChebyshevKind),\n               ksp, kind,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPChebyshevGetKind(petsclib::PetscLibType,ksp::PetscKSP, kind::KSPChebyshevKind) \nget the kind of Chebyshev polynomial to use\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - Linear solver context\n- `kind` - The kind of Chebyshev polynomial used\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCHEBYSHEV`, `KSPChebyshevKind`, `KSPChebyshevSetKind()`, `KSP_CHEBYSHEV_FIRST`, `KSP_CHEBYSHEV_FOURTH`, `KSP_CHEBYSHEV_OPT_FOURTH`\n\n# External Links\n$(_doc_external(\"KSP/KSPChebyshevGetKind\"))\n\"\"\"\nfunction KSPChebyshevGetKind(petsclib::PetscLibType, ksp::PetscKSP, kind::KSPChebyshevKind) end\n\n@for_petsc function KSPChebyshevGetKind(petsclib::$UnionPetscLib, ksp::PetscKSP, kind::KSPChebyshevKind )\n\n    @chk ccall(\n               (:KSPChebyshevGetKind, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPChebyshevKind}),\n               ksp, kind,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFCGSetMmax(petsclib::PetscLibType,ksp::PetscKSP, mmax::PetscInt) \nset the maximum number of previous directions `KSPFCG` will store for orthogonalization\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the Krylov space context\n- `mmax` - the maximum number of previous directions to orthogonalize against\n\nOptions Database Key:\n- `-ksp_fcg_mmax <N>` - maximum number of search directions\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPFCG`, `KSPFCGGetTruncationType()`, `KSPFCGGetNprealloc()`, `KSPFCGetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFCGSetMmax\"))\n\"\"\"\nfunction KSPFCGSetMmax(petsclib::PetscLibType, ksp::PetscKSP, mmax::PetscInt) end\n\n@for_petsc function KSPFCGSetMmax(petsclib::$UnionPetscLib, ksp::PetscKSP, mmax::$PetscInt )\n\n    @chk ccall(\n               (:KSPFCGSetMmax, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, mmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmmax::PetscInt = KSPFCGGetMmax(petsclib::PetscLibType,ksp::PetscKSP) \nget the maximum number of previous directions `KSPFCG` will store\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `mmax` - the maximum number of previous directions allowed for orthogonalization\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPFCG`, `KSPFCGGetTruncationType()`, `KSPFCGGetNprealloc()`, `KSPFCGSetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFCGGetMmax\"))\n\"\"\"\nfunction KSPFCGGetMmax(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPFCGGetMmax(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tmmax_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPFCGGetMmax, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, mmax_,\n              )\n\n\tmmax = mmax_[]\n\n\treturn mmax\nend \n\n\"\"\"\n\tKSPFCGSetNprealloc(petsclib::PetscLibType,ksp::PetscKSP, nprealloc::PetscInt) \nset the number of directions to preallocate with `KSPFCG`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`       - the Krylov space context\n- `nprealloc` - the number of vectors to preallocate\n\nOptions Database Key:\n- `-ksp_fcg_nprealloc <N>` - number of directions to preallocate\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPFCG`, `KSPFCGGetTruncationType()`, `KSPFCGGetNprealloc()`, `KSPFCGSetMmax()`, `KSPFCGGetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFCGSetNprealloc\"))\n\"\"\"\nfunction KSPFCGSetNprealloc(petsclib::PetscLibType, ksp::PetscKSP, nprealloc::PetscInt) end\n\n@for_petsc function KSPFCGSetNprealloc(petsclib::$UnionPetscLib, ksp::PetscKSP, nprealloc::$PetscInt )\n\n    @chk ccall(\n               (:KSPFCGSetNprealloc, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, nprealloc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnprealloc::PetscInt = KSPFCGGetNprealloc(petsclib::PetscLibType,ksp::PetscKSP) \nget the number of directions preallocate by `KSPFCG`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `nprealloc` - the number of directions preallocated\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPFCG`, `KSPFCGGetTruncationType()`, `KSPFCGSetNprealloc()`, `KSPFCGSetMmax()`, `KSPFCGGetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFCGGetNprealloc\"))\n\"\"\"\nfunction KSPFCGGetNprealloc(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPFCGGetNprealloc(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tnprealloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPFCGGetNprealloc, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, nprealloc_,\n              )\n\n\tnprealloc = nprealloc_[]\n\n\treturn nprealloc\nend \n\n\"\"\"\n\tKSPFCGSetTruncationType(petsclib::PetscLibType,ksp::PetscKSP, truncstrat::KSPFCDTruncationType) \nspecify how many of its stored previous directions `KSPFCG` uses during orthoganalization\n\nLogically Collective\n\nInput Parameters:\n- `ksp`        - the Krylov space context\n- `truncstrat` - the choice of strategy\n-seealso: [](ch_ksp), `KSPFCDTruncationType`, `KSPFCGGetTruncationType()`, `KSPFCGSetNprealloc()`, `KSPFCGSetMmax()`, `KSPFCGGetMmax()`,\n`KSP_FCD_TRUNC_TYPE_STANDARD`, `KSP_FCD_TRUNC_TYPE_NOTAY`\n\n# External Links\n$(_doc_external(\"KSP/KSPFCGSetTruncationType\"))\n\"\"\"\nfunction KSPFCGSetTruncationType(petsclib::PetscLibType, ksp::PetscKSP, truncstrat::KSPFCDTruncationType) end\n\n@for_petsc function KSPFCGSetTruncationType(petsclib::$UnionPetscLib, ksp::PetscKSP, truncstrat::KSPFCDTruncationType )\n\n    @chk ccall(\n               (:KSPFCGSetTruncationType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPFCDTruncationType),\n               ksp, truncstrat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttruncstrat::KSPFCDTruncationType = KSPFCGGetTruncationType(petsclib::PetscLibType,ksp::PetscKSP) \nget the truncation strategy employed by `KSPFCG`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `truncstrat` - the strategy type\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPFCG`, `KSPFCGSetTruncationType()`, `KSPFCDTruncationType`, `KSP_FCD_TRUNC_TYPE_STANDARD`, `KSP_FCD_TRUNC_TYPE_NOTAY`\n\n# External Links\n$(_doc_external(\"KSP/KSPFCGGetTruncationType\"))\n\"\"\"\nfunction KSPFCGGetTruncationType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPFCGGetTruncationType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ttruncstrat_ = Ref{KSPFCDTruncationType}()\n\n    @chk ccall(\n               (:KSPFCGGetTruncationType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPFCDTruncationType}),\n               ksp, truncstrat_,\n              )\n\n\ttruncstrat = unsafe_string(truncstrat_[])\n\n\treturn truncstrat\nend \n\n\"\"\"\n\tKSPPIPEFCGSetMmax(petsclib::PetscLibType,ksp::PetscKSP, mmax::PetscInt) \nset the maximum number of previous directions `KSPPIPEFCG` will store for orthogonalization\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the Krylov space context\n- `mmax` - the maximum number of previous directions to orthogonalize against\n\nOptions Database Key:\n- `-ksp_pipefcg_mmax <N>` - maximum number of previous directions\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPPIPEFCG`, `KSPPIPEFCGSetTruncationType()`, `KSPPIPEFCGSetNprealloc()`, `KSPFCGSetMmax()`, `KSPFCGGetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEFCGSetMmax\"))\n\"\"\"\nfunction KSPPIPEFCGSetMmax(petsclib::PetscLibType, ksp::PetscKSP, mmax::PetscInt) end\n\n@for_petsc function KSPPIPEFCGSetMmax(petsclib::$UnionPetscLib, ksp::PetscKSP, mmax::$PetscInt )\n\n    @chk ccall(\n               (:KSPPIPEFCGSetMmax, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, mmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmmax::PetscInt = KSPPIPEFCGGetMmax(petsclib::PetscLibType,ksp::PetscKSP) \nget the maximum number of previous directions `KSPPIPEFCG` will store\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `mmax` - the maximum number of previous directions allowed for orthogonalization\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPPIPEFCG`, `KSPPIPEFCGGetTruncationType()`, `KSPPIPEFCGGetNprealloc()`, `KSPPIPEFCGSetMmax()`, `KSPFCGGetMmax()`, `KSPFCGSetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEFCGGetMmax\"))\n\"\"\"\nfunction KSPPIPEFCGGetMmax(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPIPEFCGGetMmax(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tmmax_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPPIPEFCGGetMmax, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, mmax_,\n              )\n\n\tmmax = mmax_[]\n\n\treturn mmax\nend \n\n\"\"\"\n\tKSPPIPEFCGSetNprealloc(petsclib::PetscLibType,ksp::PetscKSP, nprealloc::PetscInt) \nset the number of directions to preallocate with `KSPPIPEFCG`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`       - the Krylov space context\n- `nprealloc` - the number of vectors to preallocate\n\nOptions Database Key:\n- `-ksp_pipefcg_nprealloc <N>` - the number of vectors to preallocate\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPPIPEFCG`, `KSPPIPEFCGSetTruncationType()`, `KSPPIPEFCGGetNprealloc()`, `KSPPIPEFCGSetMmax()`, `KSPPIPEFCGGetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEFCGSetNprealloc\"))\n\"\"\"\nfunction KSPPIPEFCGSetNprealloc(petsclib::PetscLibType, ksp::PetscKSP, nprealloc::PetscInt) end\n\n@for_petsc function KSPPIPEFCGSetNprealloc(petsclib::$UnionPetscLib, ksp::PetscKSP, nprealloc::$PetscInt )\n\n    @chk ccall(\n               (:KSPPIPEFCGSetNprealloc, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, nprealloc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnprealloc::PetscInt = KSPPIPEFCGGetNprealloc(petsclib::PetscLibType,ksp::PetscKSP) \nget the number of directions to preallocate by `KSPPIPEFCG`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `nprealloc` - the number of directions preallocated\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPPIPEFCG`, `KSPPIPEFCGGetTruncationType()`, `KSPPIPEFCGSetNprealloc()`, `KSPPIPEFCGSetMmax()`, `KSPPIPEFCGGetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEFCGGetNprealloc\"))\n\"\"\"\nfunction KSPPIPEFCGGetNprealloc(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPIPEFCGGetNprealloc(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tnprealloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPPIPEFCGGetNprealloc, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, nprealloc_,\n              )\n\n\tnprealloc = nprealloc_[]\n\n\treturn nprealloc\nend \n\n\"\"\"\n\tKSPPIPEFCGSetTruncationType(petsclib::PetscLibType,ksp::PetscKSP, truncstrat::KSPFCDTruncationType) \nspecify how many of its stored previous directions `KSPPIPEFCG` uses during orthoganalization\n\nLogically Collective\n\nInput Parameters:\n- `ksp`        - the Krylov space context\n- `truncstrat` - the choice of strategy\n-seealso: [](ch_ksp), `KSPPIPEFCG`, `KSPPIPEFCGGetTruncationType`, `KSPFCDTruncationType`, `KSP_FCD_TRUNC_TYPE_STANDARD`, `KSP_FCD_TRUNC_TYPE_NOTAY`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEFCGSetTruncationType\"))\n\"\"\"\nfunction KSPPIPEFCGSetTruncationType(petsclib::PetscLibType, ksp::PetscKSP, truncstrat::KSPFCDTruncationType) end\n\n@for_petsc function KSPPIPEFCGSetTruncationType(petsclib::$UnionPetscLib, ksp::PetscKSP, truncstrat::KSPFCDTruncationType )\n\n    @chk ccall(\n               (:KSPPIPEFCGSetTruncationType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPFCDTruncationType),\n               ksp, truncstrat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttruncstrat::KSPFCDTruncationType = KSPPIPEFCGGetTruncationType(petsclib::PetscLibType,ksp::PetscKSP) \nget the truncation strategy employed by `KSPPIPEFCG`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `truncstrat` - the strategy type\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPPIPEFCG`, `KSPPIPEFCGSetTruncationType`, `KSPFCDTruncationType`, `KSP_FCD_TRUNC_TYPE_STANDARD`, `KSP_FCD_TRUNC_TYPE_NOTAY`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEFCGGetTruncationType\"))\n\"\"\"\nfunction KSPPIPEFCGGetTruncationType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPIPEFCGGetTruncationType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ttruncstrat_ = Ref{KSPFCDTruncationType}()\n\n    @chk ccall(\n               (:KSPPIPEFCGGetTruncationType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPFCDTruncationType}),\n               ksp, truncstrat_,\n              )\n\n\ttruncstrat = unsafe_string(truncstrat_[])\n\n\treturn truncstrat\nend \n\n\"\"\"\n\tKSPPythonSetType(petsclib::PetscLibType,ksp::PetscKSP, pyname::String) \nInitialize a `KSP` object to a type implemented in Python.\n\nCollective\n\nInput Parameters:\n- `ksp`  - the linear solver `KSP` context.\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOptions Database Key:\n- `-ksp_python_type <pyname>`  - python class\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetType()`, `KSPPYTHON`, `PetscPythonInitialize()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPythonSetType\"))\n\"\"\"\nfunction KSPPythonSetType(petsclib::PetscLibType, ksp::PetscKSP, pyname::String) end\n\n@for_petsc function KSPPythonSetType(petsclib::$UnionPetscLib, ksp::PetscKSP, pyname::String )\n\n    @chk ccall(\n               (:KSPPythonSetType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Cchar}),\n               ksp, pyname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpyname::String = KSPPythonGetType(petsclib::PetscLibType,ksp::PetscKSP) \nGet the type of a `KSP` object implemented in Python.\n\nNot Collective\n\nInput Parameter:\n- `ksp`  - the linear solver `KSP` context.\n\nOutput Parameter:\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetType()`, `KSPPYTHON`, `PetscPythonInitialize()`, `KSPPythonSetType()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPythonGetType\"))\n\"\"\"\nfunction KSPPythonGetType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPythonGetType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tpyname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:KSPPythonGetType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{Ptr{Cchar}}),\n               ksp, pyname_,\n              )\n\n\tpyname = unsafe_wrap(Array, pyname_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pyname\nend \n\n\"\"\"\n\tKSPCGSetType(petsclib::PetscLibType,ksp::PetscKSP, type::KSPCGType) \nSets the variant of the conjugate gradient method to\nuse for solving a linear system with a complex coefficient matrix.\nThis option is irrelevant when solving a real system.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the iterative context\n- `type` - the variant of CG to use, one of\n-seealso: [](ch_ksp), `KSP`, `KSPCG`\n\n# External Links\n$(_doc_external(\"KSP/KSPCGSetType\"))\n\"\"\"\nfunction KSPCGSetType(petsclib::PetscLibType, ksp::PetscKSP, type::KSPCGType) end\n\n@for_petsc function KSPCGSetType(petsclib::$UnionPetscLib, ksp::PetscKSP, type::KSPCGType )\n\n    @chk ccall(\n               (:KSPCGSetType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPCGType),\n               ksp, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPCGUseSingleReduction(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nMerge the two inner products needed in `KSPCG` into a single `MPI_Allreduce()` call.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the iterative context\n- `flg` - turn on or off the single reduction\n\nOptions Database Key:\n- `-ksp_cg_single_reduction <bool>` - Merge inner products into single `MPI_Allreduce()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [](sec_pipelineksp), `KSP`, `KSPCG`, `KSPGMRES`, `KSPPIPECG`, `KSPPIPECR`, `and KSPGROPPCG`\n\n# External Links\n$(_doc_external(\"KSP/KSPCGUseSingleReduction\"))\n\"\"\"\nfunction KSPCGUseSingleReduction(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPCGUseSingleReduction(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPCGUseSingleReduction, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPCGSetRadius(petsclib::PetscLibType,ksp::PetscKSP, radius::PetscReal) \nSets the radius of the trust region used by the `KSPCG` when the solver is used inside `SNESNEWTONTR`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`    - the iterative context\n- `radius` - the trust region radius (0 is the default that disable the use of the radius)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPCG`, `KSPNASH`, `KSPSTCG`, `KSPGLTR`, `SNESNEWTONTR`\n\n# External Links\n$(_doc_external(\"KSP/KSPCGSetRadius\"))\n\"\"\"\nfunction KSPCGSetRadius(petsclib::PetscLibType, ksp::PetscKSP, radius::PetscReal) end\n\n@for_petsc function KSPCGSetRadius(petsclib::$UnionPetscLib, ksp::PetscKSP, radius::$PetscReal )\n\n    @chk ccall(\n               (:KSPCGSetRadius, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, radius,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPCGSetObjectiveTarget(petsclib::PetscLibType,ksp::PetscKSP, obj::PetscReal) \nSets the target value for the CG quadratic model\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the iterative context\n- `obj` - the objective value (0 is the default)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPCG`, `KSPNASH`, `KSPSTCG`, `KSPGLTR`, `SNESNEWTONTR`\n\n# External Links\n$(_doc_external(\"KSP/KSPCGSetObjectiveTarget\"))\n\"\"\"\nfunction KSPCGSetObjectiveTarget(petsclib::PetscLibType, ksp::PetscKSP, obj::PetscReal) end\n\n@for_petsc function KSPCGSetObjectiveTarget(petsclib::$UnionPetscLib, ksp::PetscKSP, obj::$PetscReal )\n\n    @chk ccall(\n               (:KSPCGSetObjectiveTarget, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPCGGetNormD(petsclib::PetscLibType,ksp::PetscKSP, norm_d::PetscReal) \nGet norm of the direction when the solver is used inside `SNESNEWTONTR`\n\nNot collective\n\nInput Parameters:\n- `ksp`    - the iterative context\n- `norm_d` - the norm of the direction\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPCG`, `KSPNASH`, `KSPSTCG`, `KSPGLTR`, `SNESNEWTONTR`\n\n# External Links\n$(_doc_external(\"KSP/KSPCGGetNormD\"))\n\"\"\"\nfunction KSPCGGetNormD(petsclib::PetscLibType, ksp::PetscKSP, norm_d::PetscReal) end\n\n@for_petsc function KSPCGGetNormD(petsclib::$UnionPetscLib, ksp::PetscKSP, norm_d::$PetscReal )\n\n    @chk ccall(\n               (:KSPCGGetNormD, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}),\n               ksp, norm_d,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPCGGetObjFcn(petsclib::PetscLibType,ksp::PetscKSP, o_fcn::PetscReal) \nGet the conjugate gradient objective function value\n\nNot collective\n\nInput Parameters:\n- `ksp`   - the iterative context\n- `o_fcn` - the objective function value\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPCG`, `KSPNASH`, `KSPSTCG`, `KSPGLTR`, `KSPMonitorSet`\n\n# External Links\n$(_doc_external(\"KSP/KSPCGGetObjFcn\"))\n\"\"\"\nfunction KSPCGGetObjFcn(petsclib::PetscLibType, ksp::PetscKSP, o_fcn::PetscReal) end\n\n@for_petsc function KSPCGGetObjFcn(petsclib::$UnionPetscLib, ksp::PetscKSP, o_fcn::$PetscReal )\n\n    @chk ccall(\n               (:KSPCGGetObjFcn, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}),\n               ksp, o_fcn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\te_min::PetscReal = KSPGLTRGetMinEig(petsclib::PetscLibType,ksp::PetscKSP) \nGet minimum eigenvalue computed by `KSPGLTR`\n\nCollective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `e_min` - the minimum eigenvalue\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPGLTR`, `KSPGLTRGetLambda()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGLTRGetMinEig\"))\n\"\"\"\nfunction KSPGLTRGetMinEig(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGLTRGetMinEig(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\te_min_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPGLTRGetMinEig, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}),\n               ksp, e_min_,\n              )\n\n\te_min = e_min_[]\n\n\treturn e_min\nend \n\n\"\"\"\n\tlambda::PetscReal = KSPGLTRGetLambda(petsclib::PetscLibType,ksp::PetscKSP) \nGet the multiplier on the trust\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `lambda` - the multiplier\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPGLTR`, `KSPGLTRGetMinEig()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGLTRGetLambda\"))\n\"\"\"\nfunction KSPGLTRGetLambda(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGLTRGetLambda(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tlambda_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPGLTRGetLambda, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}),\n               ksp, lambda_,\n              )\n\n\tlambda = lambda_[]\n\n\treturn lambda\nend \n\n\"\"\"\n\tKSPHPDDMSetDeflationMat(petsclib::PetscLibType,ksp::PetscKSP, U::PetscMat) \n\n# External Links\n$(_doc_external(\"KSP/KSPHPDDMSetDeflationMat\"))\n\"\"\"\nfunction KSPHPDDMSetDeflationMat(petsclib::PetscLibType, ksp::PetscKSP, U::PetscMat) end\n\n@for_petsc function KSPHPDDMSetDeflationMat(petsclib::$UnionPetscLib, ksp::PetscKSP, U::PetscMat )\n\n    @chk ccall(\n               (:KSPHPDDMSetDeflationMat, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CMat),\n               ksp, U,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPHPDDMGetDeflationMat(petsclib::PetscLibType,ksp::PetscKSP, U::PetscMat) \n\n# External Links\n$(_doc_external(\"KSP/KSPHPDDMGetDeflationMat\"))\n\"\"\"\nfunction KSPHPDDMGetDeflationMat(petsclib::PetscLibType, ksp::PetscKSP, U::PetscMat) end\n\n@for_petsc function KSPHPDDMGetDeflationMat(petsclib::$UnionPetscLib, ksp::PetscKSP, U::PetscMat )\n\tU_ = Ref(U.ptr)\n\n    @chk ccall(\n               (:KSPHPDDMGetDeflationMat, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CMat}),\n               ksp, U_,\n              )\n\n\tU.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPHPDDMSetType(petsclib::PetscLibType,ksp::PetscKSP, type::KSPHPDDMType) \n\n# External Links\n$(_doc_external(\"KSP/KSPHPDDMSetType\"))\n\"\"\"\nfunction KSPHPDDMSetType(petsclib::PetscLibType, ksp::PetscKSP, type::KSPHPDDMType) end\n\n@for_petsc function KSPHPDDMSetType(petsclib::$UnionPetscLib, ksp::PetscKSP, type::KSPHPDDMType )\n\n    @chk ccall(\n               (:KSPHPDDMSetType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPHPDDMType),\n               ksp, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::KSPHPDDMType = KSPHPDDMGetType(petsclib::PetscLibType,ksp::PetscKSP) \n\n# External Links\n$(_doc_external(\"KSP/KSPHPDDMGetType\"))\n\"\"\"\nfunction KSPHPDDMGetType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPHPDDMGetType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ttype_ = Ref{KSPHPDDMType}()\n\n    @chk ccall(\n               (:KSPHPDDMGetType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPHPDDMType}),\n               ksp, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tKSPRichardsonSetScale(petsclib::PetscLibType,ksp::PetscKSP, scale::PetscReal) \nSet the damping factor; if this routine is not called, the factor defaults to 1.0.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the iterative context\n- `scale` - the damping factor\n\nOptions Database Key:\n- `-ksp_richardson_scale <scale>` - Set the scale factor\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPRICHARDSON`, `KSPRichardsonSetSelfScale()`\n\n# External Links\n$(_doc_external(\"KSP/KSPRichardsonSetScale\"))\n\"\"\"\nfunction KSPRichardsonSetScale(petsclib::PetscLibType, ksp::PetscKSP, scale::PetscReal) end\n\n@for_petsc function KSPRichardsonSetScale(petsclib::$UnionPetscLib, ksp::PetscKSP, scale::$PetscReal )\n\n    @chk ccall(\n               (:KSPRichardsonSetScale, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPRichardsonSetSelfScale(petsclib::PetscLibType,ksp::PetscKSP, scale::PetscBool) \nSets Richardson to automatically determine optimal scaling at each iteration to minimize the 2\npreconditioned residual\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the iterative context\n- `scale` - `PETSC_TRUE` or the default of `PETSC_FALSE`\n\nOptions Database Key:\n- `-ksp_richardson_self_scale` - Use self-scaling\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPRICHARDSON`, `KSPRichardsonSetScale()`\n\n# External Links\n$(_doc_external(\"KSP/KSPRichardsonSetSelfScale\"))\n\"\"\"\nfunction KSPRichardsonSetSelfScale(petsclib::PetscLibType, ksp::PetscKSP, scale::PetscBool) end\n\n@for_petsc function KSPRichardsonSetSelfScale(petsclib::$UnionPetscLib, ksp::PetscKSP, scale::PetscBool )\n\n    @chk ccall(\n               (:KSPRichardsonSetSelfScale, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFETIDPSetPressureOperator(petsclib::PetscLibType,ksp::PetscKSP, P::PetscMat) \nSets the operator used to set up the pressure preconditioner for the saddle point `KSPFETIDP` solver,\n\nCollective\n\nInput Parameters:\n- `ksp` - the `KSPFETIDP` solver\n- `P`   - the linear operator to be preconditioned, usually the mass matrix.\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPFETIDP`, `MATIS`, `PCBDDC`, `KSPFETIDPGetInnerBDDC()`, `KSPFETIDPGetInnerKSP()`, `KSPSetOperators()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFETIDPSetPressureOperator\"))\n\"\"\"\nfunction KSPFETIDPSetPressureOperator(petsclib::PetscLibType, ksp::PetscKSP, P::PetscMat) end\n\n@for_petsc function KSPFETIDPSetPressureOperator(petsclib::$UnionPetscLib, ksp::PetscKSP, P::PetscMat )\n\n    @chk ccall(\n               (:KSPFETIDPSetPressureOperator, $petsc_library),\n               PetscErrorCode,\n               (CKSP, CMat),\n               ksp, P,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFETIDPGetInnerKSP(petsclib::PetscLibType,ksp::PetscKSP, innerksp::PetscKSP) \nGets the `KSP` object for the Lagrange multipliers from inside a `KSPFETIDP`\n\nInput Parameter:\n- `ksp` - the `KSPFETIDP`\n\nOutput Parameter:\n- `innerksp` - the `KSP` for the multipliers\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPFETIDP`, `MATIS`, `PCBDDC`, `KSPFETIDPSetInnerBDDC()`, `KSPFETIDPGetInnerBDDC()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFETIDPGetInnerKSP\"))\n\"\"\"\nfunction KSPFETIDPGetInnerKSP(petsclib::PetscLibType, ksp::PetscKSP, innerksp::PetscKSP) end\n\n@for_petsc function KSPFETIDPGetInnerKSP(petsclib::$UnionPetscLib, ksp::PetscKSP, innerksp::PetscKSP )\n\tinnerksp_ = Ref(innerksp.ptr)\n\n    @chk ccall(\n               (:KSPFETIDPGetInnerKSP, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CKSP}),\n               ksp, innerksp_,\n              )\n\n\tinnerksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFETIDPGetInnerBDDC(petsclib::PetscLibType,ksp::PetscKSP, pc::PC) \nGets the `PCBDDC` preconditioner used to set up the `KSPFETIDP` matrix for the Lagrange multipliers\n\nInput Parameter:\n- `ksp` - the `KSPFETIDP` Krylov solver\n\nOutput Parameter:\n- `pc` - the `PCBDDC` preconditioner\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MATIS`, `PCBDDC`, `KSPFETIDP`, `KSPFETIDPSetInnerBDDC()`, `KSPFETIDPGetInnerKSP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFETIDPGetInnerBDDC\"))\n\"\"\"\nfunction KSPFETIDPGetInnerBDDC(petsclib::PetscLibType, ksp::PetscKSP, pc::PC) end\n\n@for_petsc function KSPFETIDPGetInnerBDDC(petsclib::$UnionPetscLib, ksp::PetscKSP, pc::PC )\n\n    @chk ccall(\n               (:KSPFETIDPGetInnerBDDC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PC}),\n               ksp, pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPFETIDPSetInnerBDDC(petsclib::PetscLibType,ksp::PetscKSP, pc::PC) \nProvides the `PCBDDC` preconditioner used to set up the `KSPFETIDP` matrix for the Lagrange multipliers\n\nCollective\n\nInput Parameters:\n- `ksp` - the `KSPFETIDP` Krylov solver\n- `pc`  - the `PCBDDC` preconditioner\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MATIS`, `PCBDDC`, `KSPFETIDPGetInnerBDDC()`, `KSPFETIDPGetInnerKSP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPFETIDPSetInnerBDDC\"))\n\"\"\"\nfunction KSPFETIDPSetInnerBDDC(petsclib::PetscLibType, ksp::PetscKSP, pc::PC) end\n\n@for_petsc function KSPFETIDPSetInnerBDDC(petsclib::$UnionPetscLib, ksp::PetscKSP, pc::PC )\n\n    @chk ccall(\n               (:KSPFETIDPSetInnerBDDC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PC),\n               ksp, pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBCGSLSetXRes(petsclib::PetscLibType,ksp::PetscKSP, delta::PetscReal) \nSets the parameter governing when\nexact residuals will be used instead of computed residuals for `KSPCBGSL`.\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - iterative context of type `KSPBCGSL`\n- `delta` - computed residuals are used alone when delta is not positive\n\nOptions Database Key:\n- `-ksp_bcgsl_xres delta` - Threshold used to decide when to refresh computed residuals\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPBCGSLSetEll()`, `KSPBCGSLSetPol()`, `KSP`, `KSPCBGSL`, `KSPBCGSLSetUsePseudoinverse()`\n\n# External Links\n$(_doc_external(\"KSP/KSPBCGSLSetXRes\"))\n\"\"\"\nfunction KSPBCGSLSetXRes(petsclib::PetscLibType, ksp::PetscKSP, delta::PetscReal) end\n\n@for_petsc function KSPBCGSLSetXRes(petsclib::$UnionPetscLib, ksp::PetscKSP, delta::$PetscReal )\n\n    @chk ccall(\n               (:KSPBCGSLSetXRes, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, delta,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBCGSLSetUsePseudoinverse(petsclib::PetscLibType,ksp::PetscKSP, use_pinv::PetscBool) \nUse pseudoinverse (via SVD) to solve polynomial part of the update in `KSPCBGSL` solver\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - iterative context of type `KSPCBGSL`\n- `use_pinv` - set to `PETSC_TRUE` when using pseudoinverse\n\nOptions Database Key:\n- `-ksp_bcgsl_pinv <true,false>` - use pseudoinverse\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPBCGSLSetEll()`, `KSP`, `KSPCBGSL`, `KSPBCGSLSetPol()`, `KSPBCGSLSetXRes()`\n\n# External Links\n$(_doc_external(\"KSP/KSPBCGSLSetUsePseudoinverse\"))\n\"\"\"\nfunction KSPBCGSLSetUsePseudoinverse(petsclib::PetscLibType, ksp::PetscKSP, use_pinv::PetscBool) end\n\n@for_petsc function KSPBCGSLSetUsePseudoinverse(petsclib::$UnionPetscLib, ksp::PetscKSP, use_pinv::PetscBool )\n\n    @chk ccall(\n               (:KSPBCGSLSetUsePseudoinverse, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, use_pinv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBCGSLSetPol(petsclib::PetscLibType,ksp::PetscKSP, uMROR::PetscBool) \nSets the type of polynomial part that will\nbe used in the `KSPCBGSL` `KSPSolve()`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - iterative context of type `KSPCBGSL`\n- `uMROR` - set to `PETSC_TRUE` when the polynomial is a convex combination of an MR and an OR step.\n\nOptions Database Keys:\n- `-ksp_bcgsl_cxpoly` - use enhanced polynomial\n- `-ksp_bcgsl_mrpoly` - use standard polynomial\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPBCGSL`, `KSPCreate()`, `KSPSetType()`, `KSPCBGSL`, `KSPBCGSLSetUsePseudoinverse()`, `KSPBCGSLSetEll()`, `KSPBCGSLSetXRes()`\n\n# External Links\n$(_doc_external(\"KSP/KSPBCGSLSetPol\"))\n\"\"\"\nfunction KSPBCGSLSetPol(petsclib::PetscLibType, ksp::PetscKSP, uMROR::PetscBool) end\n\n@for_petsc function KSPBCGSLSetPol(petsclib::$UnionPetscLib, ksp::PetscKSP, uMROR::PetscBool )\n\n    @chk ccall(\n               (:KSPBCGSLSetPol, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, uMROR,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPBCGSLSetEll(petsclib::PetscLibType,ksp::PetscKSP, ell::PetscInt) \nSets the number of search directions to use in the `KSPBCGSL` Krylov solver\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative context, `KSP`, of type `KSPBCGSL`\n- `ell` - number of search directions to use\n\nOptions Database Key:\n- `-ksp_bcgsl_ell ell` - Number of Krylov search directions\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPBCGSLSetUsePseudoinverse()`, `KSP`, `KSPBCGSL`, `KSPBCGSLSetPol()`, `KSPBCGSLSetXRes()`\n\n# External Links\n$(_doc_external(\"KSP/KSPBCGSLSetEll\"))\n\"\"\"\nfunction KSPBCGSLSetEll(petsclib::PetscLibType, ksp::PetscKSP, ell::PetscInt) end\n\n@for_petsc function KSPBCGSLSetEll(petsclib::$UnionPetscLib, ksp::PetscKSP, ell::$PetscInt )\n\n    @chk ccall(\n               (:KSPBCGSLSetEll, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, ell,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPQCGSetTrustRegionRadius(petsclib::PetscLibType,ksp::PetscKSP, delta::PetscReal) \nSets the radius of the trust region for `KSPQCG`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`   - the iterative context\n- `delta` - the trust region radius (Infinity is the default)\n\nOptions Database Key:\n- `-ksp_qcg_trustregionradius <delta>` - trust region radius\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPQCG`, `KSPQCGGetTrialStepNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPQCGSetTrustRegionRadius\"))\n\"\"\"\nfunction KSPQCGSetTrustRegionRadius(petsclib::PetscLibType, ksp::PetscKSP, delta::PetscReal) end\n\n@for_petsc function KSPQCGSetTrustRegionRadius(petsclib::$UnionPetscLib, ksp::PetscKSP, delta::$PetscReal )\n\n    @chk ccall(\n               (:KSPQCGSetTrustRegionRadius, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, delta,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttsnorm::PetscReal = KSPQCGGetTrialStepNorm(petsclib::PetscLibType,ksp::PetscKSP) \nGets the norm of a trial step vector in `KSPQCG`.  The WCG step may be\nconstrained, so this is not necessarily the length of the ultimate step taken in `KSPQCG`.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `tsnorm` - the norm\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPQCG`, `KSPQCGSetTrustRegionRadius()`\n\n# External Links\n$(_doc_external(\"KSP/KSPQCGGetTrialStepNorm\"))\n\"\"\"\nfunction KSPQCGGetTrialStepNorm(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPQCGGetTrialStepNorm(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ttsnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPQCGGetTrialStepNorm, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}),\n               ksp, tsnorm_,\n              )\n\n\ttsnorm = tsnorm_[]\n\n\treturn tsnorm\nend \n\n\"\"\"\n\tquadratic::PetscReal = KSPQCGGetQuadratic(petsclib::PetscLibType,ksp::PetscKSP) \nGets the value of the quadratic function, evaluated at the new iterate\n\nCollective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `quadratic` - the quadratic function evaluated at the new iterate\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPQCG`\n\n# External Links\n$(_doc_external(\"KSP/KSPQCGGetQuadratic\"))\n\"\"\"\nfunction KSPQCGGetQuadratic(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPQCGGetQuadratic(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tquadratic_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPQCGGetQuadratic, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}),\n               ksp, quadratic_,\n              )\n\n\tquadratic = quadratic_[]\n\n\treturn quadratic\nend \n\n\"\"\"\n\tKSPGCRSetModifyPC(petsclib::PetscLibType,ksp::PetscKSP, fnc::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) \nSets the routine used by `KSPGCR` to modify the preconditioner for each iteration\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - iterative context obtained from `KSPCreate()`\n- `function` - user defined function to modify the preconditioner, see `KSPFlexibleModifyPCFn`\n- `ctx`      - user provided context for the modify preconditioner function\n- `destroy`  - the function to use to destroy the user provided application context.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPGCR`, `KSPFlexibleModifyPCFn`, `KSPFGMRESModifyPCFn`, [](sec_flexibleksp)\n\n# External Links\n$(_doc_external(\"KSP/KSPGCRSetModifyPC\"))\n\"\"\"\nfunction KSPGCRSetModifyPC(petsclib::PetscLibType, ksp::PetscKSP, fnc::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPGCRSetModifyPC(petsclib::$UnionPetscLib, ksp::PetscKSP, fnc::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPGCRSetModifyPC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPFlexibleModifyPCFn}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ksp, fnc, ctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPGCRSetRestart(petsclib::PetscLibType,ksp::PetscKSP, restart::PetscInt) \nSets number of iterations at which `KSPGCR` restarts.\n\nNot Collective\n\nInput Parameters:\n- `ksp`     - the Krylov space context\n- `restart` - integer restart value\n\nOptions Database Key:\n- `-ksp_gcr_restart <restart>` - the number of stored vectors to orthogonalize against\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGCR`, `KSPSetTolerances()`, `KSPGCRGetRestart()`, `KSPGMRESSetRestart()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGCRSetRestart\"))\n\"\"\"\nfunction KSPGCRSetRestart(petsclib::PetscLibType, ksp::PetscKSP, restart::PetscInt) end\n\n@for_petsc function KSPGCRSetRestart(petsclib::$UnionPetscLib, ksp::PetscKSP, restart::$PetscInt )\n\n    @chk ccall(\n               (:KSPGCRSetRestart, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, restart,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trestart::PetscInt = KSPGCRGetRestart(petsclib::PetscLibType,ksp::PetscKSP) \nGets number of iterations at which `KSPGCR` restarts.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `restart` - integer restart value\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGCR`, `KSPSetTolerances()`, `KSPGCRSetRestart()`, `KSPGMRESGetRestart()`\n\n# External Links\n$(_doc_external(\"KSP/KSPGCRGetRestart\"))\n\"\"\"\nfunction KSPGCRGetRestart(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPGCRGetRestart(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\trestart_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPGCRGetRestart, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, restart_,\n              )\n\n\trestart = restart_[]\n\n\treturn restart\nend \n\n\"\"\"\n\tKSPPIPEGCRSetUnrollW(petsclib::PetscLibType,ksp::PetscKSP, unroll_w::PetscBool) \nSet to `PETSC_TRUE` to use `KSPPIPEGCR` with unrolling of the w vector\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - the Krylov space context\n- `unroll_w` - use unrolling\n\nLevel: intermediate\n\nOptions Database Key:\n- `-ksp_pipegcr_unroll_w <bool>` - use unrolling\n\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRSetTruncationType()`, `KSPPIPEGCRSetNprealloc()`, `KSPPIPEGCRGetUnrollW()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRSetUnrollW\"))\n\"\"\"\nfunction KSPPIPEGCRSetUnrollW(petsclib::PetscLibType, ksp::PetscKSP, unroll_w::PetscBool) end\n\n@for_petsc function KSPPIPEGCRSetUnrollW(petsclib::$UnionPetscLib, ksp::PetscKSP, unroll_w::PetscBool )\n\n    @chk ccall(\n               (:KSPPIPEGCRSetUnrollW, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, unroll_w,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tunroll_w::PetscBool = KSPPIPEGCRGetUnrollW(petsclib::PetscLibType,ksp::PetscKSP) \nGet information on `KSPPIPEGCR` if it uses unrolling the w vector\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `unroll_w` - `KSPPIPEGCR` uses unrolling (bool)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRGetTruncationType()`, `KSPPIPEGCRGetNprealloc()`, `KSPPIPEGCRSetUnrollW()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRGetUnrollW\"))\n\"\"\"\nfunction KSPPIPEGCRGetUnrollW(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPIPEGCRGetUnrollW(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tunroll_w_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPPIPEGCRGetUnrollW, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, unroll_w_,\n              )\n\n\tunroll_w = unroll_w_[]\n\n\treturn unroll_w\nend \n\n\"\"\"\n\tKSPPIPEGCRSetMmax(petsclib::PetscLibType,ksp::PetscKSP, mmax::PetscInt) \nset the maximum number of previous directions `KSPPIPEGCR` will store for orthogonalization\n\nLogically Collective\n\nInput Parameters:\n- `ksp`  - the Krylov space context\n- `mmax` - the maximum number of previous directions to orthogonalize against\n\nOptions Database Key:\n- `-ksp_pipegcr_mmax <mmax>` - maximum number of previous directions\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRSetTruncationType()`, `KSPPIPEGCRSetNprealloc()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRSetMmax\"))\n\"\"\"\nfunction KSPPIPEGCRSetMmax(petsclib::PetscLibType, ksp::PetscKSP, mmax::PetscInt) end\n\n@for_petsc function KSPPIPEGCRSetMmax(petsclib::$UnionPetscLib, ksp::PetscKSP, mmax::$PetscInt )\n\n    @chk ccall(\n               (:KSPPIPEGCRSetMmax, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, mmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmmax::PetscInt = KSPPIPEGCRGetMmax(petsclib::PetscLibType,ksp::PetscKSP) \nget the maximum number of previous directions `KSPPIPEGCR` will store\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `mmax` - the maximum number of previous directions allowed for orthogonalization\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRGetTruncationType()`, `KSPPIPEGCRGetNprealloc()`, `KSPPIPEGCRSetMmax()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRGetMmax\"))\n\"\"\"\nfunction KSPPIPEGCRGetMmax(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPIPEGCRGetMmax(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tmmax_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPPIPEGCRGetMmax, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, mmax_,\n              )\n\n\tmmax = mmax_[]\n\n\treturn mmax\nend \n\n\"\"\"\n\tKSPPIPEGCRSetNprealloc(petsclib::PetscLibType,ksp::PetscKSP, nprealloc::PetscInt) \nset the number of directions to preallocate with `KSPPIPEGCR`\n\nLogically Collective\n\nInput Parameters:\n- `ksp`       - the Krylov space context\n- `nprealloc` - the number of vectors to preallocate\n\nLevel: advanced\n\nOptions Database Key:\n- `-ksp_pipegcr_nprealloc <N>` - number of vectors to preallocate\n\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRGetTruncationType()`, `KSPPIPEGCRGetNprealloc()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRSetNprealloc\"))\n\"\"\"\nfunction KSPPIPEGCRSetNprealloc(petsclib::PetscLibType, ksp::PetscKSP, nprealloc::PetscInt) end\n\n@for_petsc function KSPPIPEGCRSetNprealloc(petsclib::$UnionPetscLib, ksp::PetscKSP, nprealloc::$PetscInt )\n\n    @chk ccall(\n               (:KSPPIPEGCRSetNprealloc, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt),\n               ksp, nprealloc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnprealloc::PetscInt = KSPPIPEGCRGetNprealloc(petsclib::PetscLibType,ksp::PetscKSP) \nget the number of directions preallocate by `KSPPIPEGCR`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `nprealloc` - the number of directions preallocated\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRGetTruncationType()`, `KSPPIPEGCRSetNprealloc()`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRGetNprealloc\"))\n\"\"\"\nfunction KSPPIPEGCRGetNprealloc(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPIPEGCRGetNprealloc(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tnprealloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:KSPPIPEGCRGetNprealloc, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscInt}),\n               ksp, nprealloc_,\n              )\n\n\tnprealloc = nprealloc_[]\n\n\treturn nprealloc\nend \n\n\"\"\"\n\tKSPPIPEGCRSetTruncationType(petsclib::PetscLibType,ksp::PetscKSP, truncstrat::KSPFCDTruncationType) \nspecify how many of its stored previous directions `KSPPIPEGCR` uses during orthogonalization\n\nLogically Collective\n\nInput Parameters:\n- `ksp`        - the Krylov space context\n- `truncstrat` - the choice of strategy\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRTruncationType`, `KSPFCDTruncationType`, `KSP_FCD_TRUNC_TYPE_STANDARD`, `KSP_FCD_TRUNC_TYPE_NOTAY`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRSetTruncationType\"))\n\"\"\"\nfunction KSPPIPEGCRSetTruncationType(petsclib::PetscLibType, ksp::PetscKSP, truncstrat::KSPFCDTruncationType) end\n\n@for_petsc function KSPPIPEGCRSetTruncationType(petsclib::$UnionPetscLib, ksp::PetscKSP, truncstrat::KSPFCDTruncationType )\n\n    @chk ccall(\n               (:KSPPIPEGCRSetTruncationType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, KSPFCDTruncationType),\n               ksp, truncstrat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttruncstrat::KSPFCDTruncationType = KSPPIPEGCRGetTruncationType(petsclib::PetscLibType,ksp::PetscKSP) \nget the truncation strategy employed by `KSPPIPEGCR`\n\nNot Collective\n\nInput Parameter:\n- `ksp` - the Krylov space context\n\nOutput Parameter:\n- `truncstrat` - the strategy type\n-seealso: [](ch_ksp), `KSPPIPEGCR`, `KSPPIPEGCRSetTruncationType`, `KSPPIPEGCRTruncationType`, `KSPFCDTruncationType`, `KSP_FCD_TRUNC_TYPE_STANDARD`, `KSP_FCD_TRUNC_TYPE_NOTAY`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRGetTruncationType\"))\n\"\"\"\nfunction KSPPIPEGCRGetTruncationType(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPPIPEGCRGetTruncationType(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\ttruncstrat_ = Ref{KSPFCDTruncationType}()\n\n    @chk ccall(\n               (:KSPPIPEGCRGetTruncationType, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPFCDTruncationType}),\n               ksp, truncstrat_,\n              )\n\n\ttruncstrat = unsafe_string(truncstrat_[])\n\n\treturn truncstrat\nend \n\n\"\"\"\n\tKSPPIPEGCRSetModifyPC(petsclib::PetscLibType,ksp::PetscKSP, fnc::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) \nSets the routine used by `KSPPIPEGCR` to modify the preconditioner at each iteration\n\nLogically Collective\n\nInput Parameters:\n- `ksp`      - iterative context obtained from `KSPCreate()`\n- `function` - user defined function to modify the preconditioner, see `KSPFlexibleModifyPCFn`\n- `ctx`      - user provided context for the modify preconditioner function\n- `destroy`  - the function to use to destroy the user provided application context.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPFlexibleSetModifyPC()`, `KSPFlexibleModifyPCFn`, `KSPPIPEGCR`\n\n# External Links\n$(_doc_external(\"KSP/KSPPIPEGCRSetModifyPC\"))\n\"\"\"\nfunction KSPPIPEGCRSetModifyPC(petsclib::PetscLibType, ksp::PetscKSP, fnc::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function KSPPIPEGCRSetModifyPC(petsclib::$UnionPetscLib, ksp::PetscKSP, fnc::KSPFlexibleModifyPCFn, ctx::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:KSPPIPEGCRSetModifyPC, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{KSPFlexibleModifyPCFn}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ksp, fnc, ctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMINRESSetUseQLP(petsclib::PetscLibType,ksp::PetscKSP, qlp::PetscBool) \nUse the QLP variant of `KSPMINRES`\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - the iterative context\n- `qlp` - a Boolean indicating if the QLP variant should be used\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPMINRES`, `KSPMINRESGetUseQLP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMINRESSetUseQLP\"))\n\"\"\"\nfunction KSPMINRESSetUseQLP(petsclib::PetscLibType, ksp::PetscKSP, qlp::PetscBool) end\n\n@for_petsc function KSPMINRESSetUseQLP(petsclib::$UnionPetscLib, ksp::PetscKSP, qlp::PetscBool )\n\n    @chk ccall(\n               (:KSPMINRESSetUseQLP, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, qlp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMINRESSetRadius(petsclib::PetscLibType,ksp::PetscKSP, radius::PetscReal) \nSet the maximum solution norm allowed for use with trust region methods\n\nLogically Collective\n\nInput Parameters:\n- `ksp`    - the iterative context\n- `radius` - the value\n\nLevel: beginner\n\nOptions Database Key:\n- `-ksp_minres_radius <real>` - maximum allowed solution norm\n\n-seealso: [](ch_ksp), `KSP`, `KSPMINRES`, `KSPMINRESSetUseQLP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMINRESSetRadius\"))\n\"\"\"\nfunction KSPMINRESSetRadius(petsclib::PetscLibType, ksp::PetscKSP, radius::PetscReal) end\n\n@for_petsc function KSPMINRESSetRadius(petsclib::$UnionPetscLib, ksp::PetscKSP, radius::$PetscReal )\n\n    @chk ccall(\n               (:KSPMINRESSetRadius, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscReal),\n               ksp, radius,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tqlp::PetscBool = KSPMINRESGetUseQLP(petsclib::PetscLibType,ksp::PetscKSP) \nGet the flag that indicates if the QLP variant is being used\n\nLogically Collective\n\nInput Parameter:\n- `ksp` - the iterative context\n\nOutput Parameter:\n- `qlp` - a Boolean indicating if the QLP variant is used\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPMINRES`, `KSPMINRESSetUseQLP()`\n\n# External Links\n$(_doc_external(\"KSP/KSPMINRESGetUseQLP\"))\n\"\"\"\nfunction KSPMINRESGetUseQLP(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPMINRESGetUseQLP(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tqlp_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:KSPMINRESGetUseQLP, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{PetscBool}),\n               ksp, qlp_,\n              )\n\n\tqlp = qlp_[]\n\n\treturn qlp\nend \n\n\"\"\"\n\tKSPLSQRSetComputeStandardErrorVec(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nCompute a vector of standard error estimates during `KSPSolve()` for  `KSPLSQR`.\n\nLogically Collective\n\nInput Parameters:\n- `ksp` - iterative context\n- `flg` - compute the vector of standard estimates or not\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSolve()`, `KSPLSQR`, `KSPLSQRGetStandardErrorVec()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRSetComputeStandardErrorVec\"))\n\"\"\"\nfunction KSPLSQRSetComputeStandardErrorVec(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPLSQRSetComputeStandardErrorVec(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPLSQRSetComputeStandardErrorVec, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPLSQRSetExactMatNorm(petsclib::PetscLibType,ksp::PetscKSP, flg::PetscBool) \nCompute exact matrix norm instead of iteratively refined estimate.\n\nNot Collective\n\nInput Parameters:\n- `ksp` - iterative context\n- `flg` - compute exact matrix norm or not\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSolve()`, `KSPLSQR`, `KSPLSQRGetNorms()`, `KSPLSQRConvergedDefault()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRSetExactMatNorm\"))\n\"\"\"\nfunction KSPLSQRSetExactMatNorm(petsclib::PetscLibType, ksp::PetscKSP, flg::PetscBool) end\n\n@for_petsc function KSPLSQRSetExactMatNorm(petsclib::$UnionPetscLib, ksp::PetscKSP, flg::PetscBool )\n\n    @chk ccall(\n               (:KSPLSQRSetExactMatNorm, $petsc_library),\n               PetscErrorCode,\n               (CKSP, PetscBool),\n               ksp, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPLSQRGetStandardErrorVec(petsclib::PetscLibType,ksp::PetscKSP, se::PetscVec) \nGet vector of standard error estimates.\nOnly available if -ksp_lsqr_set_standard_error was set to true\nor `KSPLSQRSetComputeStandardErrorVec`(ksp, `PETSC_TRUE`) was called.\nOtherwise returns `NULL`.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative context\n\nOutput Parameter:\n- `se` - vector of standard estimates\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSolve()`, `KSPLSQR`, `KSPLSQRSetComputeStandardErrorVec()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRGetStandardErrorVec\"))\n\"\"\"\nfunction KSPLSQRGetStandardErrorVec(petsclib::PetscLibType, ksp::PetscKSP, se::PetscVec) end\n\n@for_petsc function KSPLSQRGetStandardErrorVec(petsclib::$UnionPetscLib, ksp::PetscKSP, se::PetscVec )\n\tse_ = Ref(se.ptr)\n\n    @chk ccall(\n               (:KSPLSQRGetStandardErrorVec, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{CVec}),\n               ksp, se_,\n              )\n\n\tse.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tarnorm::PetscReal,anorm::PetscReal = KSPLSQRGetNorms(petsclib::PetscLibType,ksp::PetscKSP) \nGet the norm estimates that `KSPLSQR` computes internally during `KSPSolve()`.\n\nNot Collective\n\nInput Parameter:\n- `ksp` - iterative context\n\nOutput Parameters:\n- `arnorm` - good estimate of (A*Pmat^{-T})*r, where r = A x - b, used in specific stopping criterion\n- `anorm`  - poor estimate of A*Pmat^{-T}_{frobenius} used in specific stopping criterion\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSolve()`, `KSPLSQR`, `KSPLSQRSetExactMatNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRGetNorms\"))\n\"\"\"\nfunction KSPLSQRGetNorms(petsclib::PetscLibType, ksp::PetscKSP) end\n\n@for_petsc function KSPLSQRGetNorms(petsclib::$UnionPetscLib, ksp::PetscKSP )\n\tarnorm_ = Ref{$PetscReal}()\n\tanorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:KSPLSQRGetNorms, $petsc_library),\n               PetscErrorCode,\n               (CKSP, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ksp, arnorm_, anorm_,\n              )\n\n\tarnorm = arnorm_[]\n\tanorm = anorm_[]\n\n\treturn arnorm,anorm\nend \n\n\"\"\"\n\tKSPLSQRMonitorResidual(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the residual norm, as well as the normal equation residual norm, at each iteration of an iterative solver for the `KSPLSQR` solver\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_lsqr_monitor` - Activates `KSPLSQRMonitorResidual()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPLSQR`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`, `KSPLSQRMonitorResidualDrawLG()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRMonitorResidual\"))\n\"\"\"\nfunction KSPLSQRMonitorResidual(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPLSQRMonitorResidual(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPLSQRMonitorResidual, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPLSQRMonitorResidualDrawLG(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the true residual norm at each iteration of an iterative solver for the `KSPLSQR` solver\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-ksp_lsqr_monitor draw::draw_lg` - Activates `KSPMonitorTrueResidualDrawLG()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPLSQR`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPLSQRMonitorResidual()`, `KSPLSQRMonitorResidualDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRMonitorResidualDrawLG\"))\n\"\"\"\nfunction KSPLSQRMonitorResidualDrawLG(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPLSQRMonitorResidualDrawLG(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPLSQRMonitorResidualDrawLG, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = KSPLSQRMonitorResidualDrawLGCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the line graph object for the `KSPLSQR` residual and normal equation residual norm\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PetscViewer`\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The `PetscViewerAndFormat`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPLSQR`, `KSPMonitorSet()`, `KSPLSQRMonitorResidual()`, `KSPLSQRMonitorResidualDrawLG()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRMonitorResidualDrawLGCreate\"))\n\"\"\"\nfunction KSPLSQRMonitorResidualDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function KSPLSQRMonitorResidualDrawLGCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:KSPLSQRMonitorResidualDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tKSPLSQRConvergedDefault(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, reason::KSPConvergedReason, ctx::Cvoid) \nDetermines convergence of the `KSPLSQR` Krylov method, including a check on the residual norm of the normal equations.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm residual value (may be estimated)\n- `ctx`   - convergence context which must have been created by `KSPConvergedDefaultCreate()`\n\nOutput Parameter:\n- `reason` - the convergence reason\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPLSQR`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`,\n`KSPConvergedDefaultSetUIRNorm()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultCreate()`, `KSPConvergedDefaultDestroy()`,\n`KSPConvergedDefault()`, `KSPLSQRGetNorms()`, `KSPLSQRSetExactMatNorm()`\n\n# External Links\n$(_doc_external(\"KSP/KSPLSQRConvergedDefault\"))\n\"\"\"\nfunction KSPLSQRConvergedDefault(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, reason::KSPConvergedReason, ctx::Cvoid) end\n\n@for_petsc function KSPLSQRConvergedDefault(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, reason::KSPConvergedReason, ctx::Cvoid )\n\n    @chk ccall(\n               (:KSPLSQRConvergedDefault, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{KSPConvergedReason}, Ptr{Cvoid}),\n               ksp, n, rnorm, reason, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorSNESResidual(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the `SNES` residual norm, as well as the `KSP` residual norm, at each iteration of a `KSPSolve()` called within a `SNESSolve()`.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n- `-snes_monitor_ksp` - Activates `KSPMonitorSNESResidual()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`, `KSPMonitor()`, `SNESMonitor()`, `PetscViewerAndFormat()`\n\n# External Links\n$(_doc_external(\"Snes/KSPMonitorSNESResidual\"))\n\"\"\"\nfunction KSPMonitorSNESResidual(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorSNESResidual(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorSNESResidual, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tKSPMonitorSNESResidualDrawLG(petsclib::PetscLibType,ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPlots the linear `KSP` residual norm and the `SNES` residual norm of a `KSPSolve()` called within a `SNESSolve()`.\n\nCollective\n\nInput Parameters:\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context, created with `KSPMonitorSNESResidualDrawLGCreate()`\n\nOptions Database Key:\n- `-snes_monitor_ksp draw::draw_lg` - Activates `KSPMonitorSNESResidualDrawLG()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `SNESMonitor()`, `KSPMonitor()`, `KSPMonitorSNESResidualDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"Snes/KSPMonitorSNESResidualDrawLG\"))\n\"\"\"\nfunction KSPMonitorSNESResidualDrawLG(petsclib::PetscLibType, ksp::PetscKSP, n::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function KSPMonitorSNESResidualDrawLG(petsclib::$UnionPetscLib, ksp::PetscKSP, n::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:KSPMonitorSNESResidualDrawLG, $petsc_library),\n               PetscErrorCode,\n               (CKSP, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               ksp, n, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = KSPMonitorSNESResidualDrawLGCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) \nCreates the `PetscViewer` used by `KSPMonitorSNESResidualDrawLG()`\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PetscViewer`\n- `format` - The viewer format\n- `ctx`    - An optional user context\n\nOutput Parameter:\n- `vf` - The viewer context\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `KSP`, `SNES`, `PetscViewerFormat`, `PetscViewerAndFormat`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`\n\n# External Links\n$(_doc_external(\"Snes/KSPMonitorSNESResidualDrawLGCreate\"))\n\"\"\"\nfunction KSPMonitorSNESResidualDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid) end\n\n@for_petsc function KSPMonitorSNESResidualDrawLGCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat, ctx::Cvoid )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:KSPMonitorSNESResidualDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, Ptr{Cvoid}, PetscViewerAndFormat),\n               viewer, format, ctx, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n"
  },
  {
    "path": "src/autowrapped/Mat_wrappers.jl",
    "content": "# autodefined type arguments for class Mat ------\nmutable struct _n_MatNullSpace end\nconst MatNullSpace = Ptr{_n_MatNullSpace}\n\nmutable struct _n_MatTransposeColoring end\nconst MatTransposeColoring = Ptr{_n_MatTransposeColoring}\n\nmutable struct _n_hypre_ParCSRMatrix end\nconst hypre_ParCSRMatrix = Ptr{_n_hypre_ParCSRMatrix}\n\nmutable struct _n_PetscFunctionList end\nconst PetscFunctionList = Ptr{_n_PetscFunctionList}\n\nmutable struct MatHtoolKernelFn end\n\n# -------------------------------------------------------\n\"\"\"\n\tMatSetType(petsclib::PetscLibType,mat::PetscMat, matype::MatType) \nBuilds matrix object for a particular matrix type\n\nCollective\n\nInput Parameters:\n- `mat`    - the matrix object\n- `matype` - matrix type\n\nOptions Database Key:\n- `-mat_type  <method>` - Sets the type; see `MatType`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `PCSetType()`, `VecSetType()`, `MatCreate()`, `MatType`\n\n# External Links\n$(_doc_external(\"Mat/MatSetType\"))\n\"\"\"\nfunction MatSetType(petsclib::PetscLibType, mat::PetscMat, matype::MatType) end\n\n@for_petsc function MatSetType(petsclib::$UnionPetscLib, mat::PetscMat, matype::MatType )\n\n    @chk ccall(\n               (:MatSetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatType),\n               mat, matype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::MatType = MatGetType(petsclib::PetscLibType,mat::PetscMat) \nGets the matrix type as a string from the matrix object.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `type` - name of matrix type\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatType`, `MatSetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetType\"))\n\"\"\"\nfunction MatGetType(petsclib::PetscLibType, mat::AbstractPetscMat) end\n\n@for_petsc function MatGetType(petsclib::$UnionPetscLib, mat::AbstractPetscMat )\n\ttype_ = Ref{MatType}()\n\n    @chk ccall(\n               (:MatGetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatType}),\n               mat, type_,\n              )\n\n\t# Handle NULL type (matrix not yet set up)\n\tif type_[] == C_NULL\n\t\treturn \"(not set)\"\n\tend\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tvtype::VecType = MatGetVecType(petsclib::PetscLibType,mat::PetscMat) \nGets the vector type the matrix will return with `MatCreateVecs()`\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `vtype` - name of vector type\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatType`, `MatSetVecType()`, `VecType`\n\n# External Links\n$(_doc_external(\"Mat/MatGetVecType\"))\n\"\"\"\nfunction MatGetVecType(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetVecType(petsclib::$UnionPetscLib, mat::PetscMat )\n\tvtype_ = Ref{VecType}()\n\n    @chk ccall(\n               (:MatGetVecType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{VecType}),\n               mat, vtype_,\n              )\n\n\tvtype = unsafe_string(vtype_[])\n\n\treturn vtype\nend \n\n\"\"\"\n\tMatSetVecType(petsclib::PetscLibType,mat::PetscMat, vtype::VecType) \nSet the vector type the matrix will return with `MatCreateVecs()`\n\nCollective\n\nInput Parameters:\n- `mat`   - the matrix object\n- `vtype` - vector type\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `VecType`, `VecSetType()`, `MatGetVecType()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetVecType\"))\n\"\"\"\nfunction MatSetVecType(petsclib::PetscLibType, mat::PetscMat, vtype::VecType) end\n\n@for_petsc function MatSetVecType(petsclib::$UnionPetscLib, mat::PetscMat, vtype::VecType )\n\n    @chk ccall(\n               (:MatSetVecType, $petsc_library),\n               PetscErrorCode,\n               (CMat, VecType),\n               mat, vtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRegister(petsclib::PetscLibType,sname::Vector{Cchar}, fnc::external) \nAdds a new matrix type implementation that is usable as a `Mat` in PETSc\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined matrix type\n- `function` - routine to create method context\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatType`, `MatSetType()`, `MatRegisterAll()`\n\n# External Links\n$(_doc_external(\"Mat/MatRegister\"))\n\"\"\"\nfunction MatRegister(petsclib::PetscLibType, sname::Vector{Cchar}, fnc::external) end\n\n@for_petsc function MatRegister(petsclib::$UnionPetscLib, sname::Vector{Cchar}, fnc::external )\n\n    @chk ccall(\n               (:MatRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRegisterRootName(petsclib::PetscLibType,rname::Vector{Cchar}, sname::Vector{Cchar}, mname::Vector{Cchar}) \nRegisters a name that can be used for either a sequential or its corresponding parallel matrix type.\n\nInput Parameters:\n- `rname` - the rootname, for example, `MATAIJ`\n- `sname` - the name of the sequential matrix type, for example, `MATSEQAIJ`\n- `mname` - the name of the parallel matrix type, for example, `MATMPIAIJ`\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatType`, `PetscObjectBaseTypeCompare()`\n\n# External Links\n$(_doc_external(\"Mat/MatRegisterRootName\"))\n\"\"\"\nfunction MatRegisterRootName(petsclib::PetscLibType, rname::Vector{Cchar}, sname::Vector{Cchar}, mname::Vector{Cchar}) end\n\n@for_petsc function MatRegisterRootName(petsclib::$UnionPetscLib, rname::Vector{Cchar}, sname::Vector{Cchar}, mname::Vector{Cchar} )\n\n    @chk ccall(\n               (:MatRegisterRootName, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}),\n               rname, sname, mname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductReplaceMats(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, D::PetscMat) \nReplace the input matrices for the matrix\n\nCollective\n\nInput Parameters:\n- `A` - the matrix or `NULL` if not being replaced\n- `B` - the matrix or `NULL` if not being replaced\n- `C` - the matrix or `NULL` if not being replaced\n- `D` - the matrix whose values are computed via a matrix-matrix product operation\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductCreate()`, `MatProductSetFromOptions()`, `MatProductSymbolic()`, `MatProductClear()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductReplaceMats\"))\n\"\"\"\nfunction MatProductReplaceMats(petsclib::PetscLibType, A::Union{Ptr,PetscMat}, B::Union{Ptr,PetscMat}, C::Union{Ptr,PetscMat}, D::Union{Ptr,PetscMat}) end\n\n@for_petsc function MatProductReplaceMats(petsclib::$UnionPetscLib, A::Union{Ptr,PetscMat}, B::Union{Ptr,PetscMat}, C::Union{Ptr,PetscMat}, D::Union{Ptr,PetscMat})\n\n    @chk ccall(\n               (:MatProductReplaceMats, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat),\n               A, B, C, D,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductSetFromOptions(petsclib::PetscLibType,mat::PetscMat) \nSets the options for the computation of a matrix\nthe algorithm etc are determined from the options database.\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix whose values are computed via a matrix-matrix product operation\n\nOptions Database Keys:\n- `-mat_product_clear`                 - Clear intermediate data structures after `MatProductNumeric()` has been called\n- `-mat_product_algorithm <algorithm>` - Sets the algorithm, see `MatProductAlgorithm` for possible values\n- `-mat_product_algorithm_backend_cpu` - Use the CPU to perform the computation even if the matrix is a GPU matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatSetFromOptions()`, `MatProductCreate()`, `MatProductCreateWithMat()`, `MatProductNumeric()`,\n`MatProductSetType()`, `MatProductSetAlgorithm()`, `MatProductAlgorithm`\n\n# External Links\n$(_doc_external(\"Mat/MatProductSetFromOptions\"))\n\"\"\"\nfunction MatProductSetFromOptions(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatProductSetFromOptions(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatProductSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductView(petsclib::PetscLibType,mat::PetscMat, viewer::PetscViewer) \nView the private matrix\n\nLogically Collective\n\nInput Parameters:\n- `mat`    - the matrix obtained with `MatProductCreate()` or `MatProductCreateWithMat()`\n- `viewer` - where the information on the matrix-matrix algorithm of `mat` should be reviewed\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProductType`, `Mat`, `MatProductSetFromOptions()`, `MatView()`, `MatProductCreate()`, `MatProductCreateWithMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductView\"))\n\"\"\"\nfunction MatProductView(petsclib::PetscLibType, mat::PetscMat, viewer::PetscViewer) end\n\n@for_petsc function MatProductView(petsclib::$UnionPetscLib, mat::PetscMat, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatProductView, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscViewer),\n               mat, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductNumeric(petsclib::PetscLibType,mat::PetscMat) \nCompute a matrix\n\nCollective\n\nInput/Output Parameter:\n- `mat` - the matrix whose values are computed via a matrix-matrix product operation\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductSetAlgorithm()`, `MatProductSetType()`, `MatProductCreate()`, `MatSetType()`, `MatProductSymbolic()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductNumeric\"))\n\"\"\"\nfunction MatProductNumeric(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatProductNumeric(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatProductNumeric, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductSymbolic(petsclib::PetscLibType,mat::PetscMat) \nPerform the symbolic portion of a matrix\nproduct to be done with `MatProductNumeric()`\n\nCollective\n\nInput/Output Parameter:\n- `mat` - the matrix whose values are to be computed via a matrix-matrix product operation\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductCreate()`, `MatProductCreateWithMat()`, `MatProductSetFromOptions()`, `MatProductNumeric()`, `MatProductSetType()`, `MatProductSetAlgorithm()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductSymbolic\"))\n\"\"\"\nfunction MatProductSymbolic(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatProductSymbolic(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatProductSymbolic, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductSetFill(petsclib::PetscLibType,mat::PetscMat, fill::PetscReal) \nSet an expected fill of the matrix whose values are computed via a matrix\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix whose values are to be computed via a matrix-matrix product operation\n- `fill` - expected fill as ratio of nnz(mat)/(nnz(A) + nnz(B) + nnz(C)); use `PETSC_DETERMINE` or `PETSC_CURRENT` if you do not have a good estimate.\nIf the product is a dense matrix, this value is not used.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `PETSC_DETERMINE`, `Mat`, `MatProductSetFromOptions()`, `MatProductSetType()`, `MatProductSetAlgorithm()`, `MatProductCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductSetFill\"))\n\"\"\"\nfunction MatProductSetFill(petsclib::PetscLibType, mat::PetscMat, fill::PetscReal) end\n\n@for_petsc function MatProductSetFill(petsclib::$UnionPetscLib, mat::PetscMat, fill::$PetscReal )\n\n    @chk ccall(\n               (:MatProductSetFill, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               mat, fill,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductSetAlgorithm(petsclib::PetscLibType,mat::PetscMat, alg::MatProductAlgorithm) \nRequests a particular algorithm for a matrix\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix whose values are computed via a matrix-matrix product operation\n- `alg` - particular implementation algorithm of the matrix product, e.g., `MATPRODUCTALGORITHMDEFAULT`.\n\nOptions Database Key:\n- `-mat_product_algorithm <algorithm>` - Sets the algorithm, see `MatProductAlgorithm`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductClear()`, `MatProductSetType()`, `MatProductSetFill()`, `MatProductCreate()`, `MatProductAlgorithm`, `MatProductType`, `MatProductGetAlgorithm()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductSetAlgorithm\"))\n\"\"\"\nfunction MatProductSetAlgorithm(petsclib::PetscLibType, mat::PetscMat, alg::MatProductAlgorithm) end\n\n@for_petsc function MatProductSetAlgorithm(petsclib::$UnionPetscLib, mat::PetscMat, alg::MatProductAlgorithm )\n\n    @chk ccall(\n               (:MatProductSetAlgorithm, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatProductAlgorithm),\n               mat, alg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductGetAlgorithm(petsclib::PetscLibType,mat::PetscMat, alg::MatProductAlgorithm) \nReturns the selected algorithm for a matrix\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix whose values are computed via a matrix-matrix product operation\n\nOutput Parameter:\n- `alg` - the selected algorithm of the matrix product, e.g., `MATPRODUCTALGORITHMDEFAULT`.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductSetAlgorithm()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductGetAlgorithm\"))\n\"\"\"\nfunction MatProductGetAlgorithm(petsclib::PetscLibType, mat::PetscMat, alg::MatProductAlgorithm) end\n\n@for_petsc function MatProductGetAlgorithm(petsclib::$UnionPetscLib, mat::PetscMat, alg::MatProductAlgorithm )\n\n    @chk ccall(\n               (:MatProductGetAlgorithm, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatProductAlgorithm}),\n               mat, alg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductSetType(petsclib::PetscLibType,mat::PetscMat, productype::MatProductType) \nSets a particular matrix\n\nCollective\n\nInput Parameters:\n- `mat`        - the matrix whose values are computed via a matrix-matrix product operation\n- `productype` - matrix product type, e.g., `MATPRODUCT_AB`,`MATPRODUCT_AtB`,`MATPRODUCT_ABt`,`MATPRODUCT_PtAP`,`MATPRODUCT_RARt`,`MATPRODUCT_ABC`,\nsee `MatProductType`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductCreate()`, `MatProductType`,\n`MATPRODUCT_AB`, `MATPRODUCT_AtB`, `MATPRODUCT_ABt`, `MATPRODUCT_PtAP`, `MATPRODUCT_RARt`, `MATPRODUCT_ABC`\n\n# External Links\n$(_doc_external(\"Mat/MatProductSetType\"))\n\"\"\"\nfunction MatProductSetType(petsclib::PetscLibType, mat::PetscMat, productype::MatProductType) end\n\n@for_petsc function MatProductSetType(petsclib::$UnionPetscLib, mat::PetscMat, productype::MatProductType )\n\n    @chk ccall(\n               (:MatProductSetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatProductType),\n               mat, productype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductClear(petsclib::PetscLibType,mat::PetscMat) \nClears from the matrix any internal data structures related to the computation of the values of the matrix from matrix\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix whose values are to be computed via a matrix-matrix product operation\n\nOptions Database Key:\n- `-mat_product_clear` - Clear intermediate data structures after `MatProductNumeric()` has been called\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductClear\"))\n\"\"\"\nfunction MatProductClear(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatProductClear(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatProductClear, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatProductCreateWithMat(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, D::PetscMat) \nSet a given matrix to have its values computed via matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix (optional, use `NULL` if not needed)\n- `D` - the matrix whose values are to be computed via a matrix-matrix product operation\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductType`, `MatProductSetType()`, `MatProductAlgorithm`,\n`MatProductSetAlgorithm`, `MatProductCreate()`, `MatProductClear()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductCreateWithMat\"))\n\"\"\"\nfunction MatProductCreateWithMat(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::Union{Ptr,PetscMat}, D::PetscMat) end\n\n@for_petsc function MatProductCreateWithMat(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::Union{Ptr,PetscMat}, D::PetscMat )\n\n    @chk ccall(\n               (:MatProductCreateWithMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat),\n               A, B, C, D,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tD::PetscMat = MatProductCreate(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat) \ncreate a matrix to hold the result of a matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix (or `NULL`)\n\nOutput Parameter:\n- `D` - the matrix whose values are to be computed via a matrix-matrix product operation\n\nLevel: intermediate\n\nExample:\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductCreateWithMat()`, `MatProductSetType()`, `MatProductSetAlgorithm()`, `MatProductClear()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductCreate\"))\n\"\"\"\nfunction MatProductCreate(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::Union{Ptr,PetscMat}) end\n\n@for_petsc function MatProductCreate(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::Union{Ptr,PetscMat})\n\tD_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatProductCreate, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, Ptr{CMat}),\n               A, B, C, D_,\n              )\n\n\tD = PetscMat(D_[], petsclib)\n\n\treturn D\nend \n\n\"\"\"\n\tmtype::MatProductType = MatProductGetType(petsclib::PetscLibType,mat::PetscMat) \nReturns the type of matrix\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix whose values are to be computed via a matrix-matrix product operation\n\nOutput Parameter:\n- `mtype` - the `MatProductType`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductCreateWithMat()`, `MatProductSetType()`, `MatProductCreate()`, `MatProductType`, `MatProductAlgorithm`\n\n# External Links\n$(_doc_external(\"Mat/MatProductGetType\"))\n\"\"\"\nfunction MatProductGetType(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatProductGetType(petsclib::$UnionPetscLib, mat::PetscMat )\n\tmtype_ = Ref{MatProductType}()\n\n    @chk ccall(\n               (:MatProductGetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatProductType}),\n               mat, mtype_,\n              )\n\n\tmtype = unsafe_string(mtype_[])\n\n\treturn mtype\nend \n\n\"\"\"\n\tMatProductGetMats(petsclib::PetscLibType,mat::PetscMat, A::PetscMat, B::PetscMat, C::PetscMat) \nReturns the matrices associated with the matrix\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix whose values are to be computed via a matrix-matrix product operation\n\nOutput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix (may be `NULL` for some `MatProductType`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatProduct`, `Mat`, `MatProductCreateWithMat()`, `MatProductSetType()`, `MatProductSetAlgorithm()`, `MatProductCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatProductGetMats\"))\n\"\"\"\nfunction MatProductGetMats(petsclib::PetscLibType, mat::PetscMat, A::PetscMat, B::PetscMat, C::Union{Ptr,PetscMat}) end\n\n@for_petsc function MatProductGetMats(petsclib::$UnionPetscLib, mat::PetscMat, A::PetscMat, B::PetscMat, C::Union{Ptr,PetscMat})\n\tA_ = Ref(A.ptr)\n\tB_ = Ref(B.ptr)\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatProductGetMats, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{CMat}, Ptr{CMat}),\n               mat, A_, B_, C_,\n              )\n\n\tA.ptr = C_NULL\n\tB.ptr = C_NULL\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the PETSc interface to the `Mat`\npackage. It is called from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `Mat`, `PetscFinalize()`, `MatInitializePackage()`\n\n# External Links\n$(_doc_external(\"Mat/MatFinalizePackage\"))\n\"\"\"\nfunction MatFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function MatFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:MatFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `Mat` package. It is called\nfrom `PetscDLLibraryRegister_petscmat()` when using dynamic libraries, and on the first call to `MatCreate()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `PetscInitialize()`, `MatFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Mat/MatInitializePackage\"))\n\"\"\"\nfunction MatInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function MatInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:MatInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetRandom(petsclib::PetscLibType,x::PetscMat, rctx::PetscRandom) \nSets all components of a matrix to random numbers.\n\nLogically Collective\n\nInput Parameters:\n- `x`    - the matrix\n- `rctx` - the `PetscRandom` object, formed by `PetscRandomCreate()`, or `NULL` and\nit will create one internally.\n\nExample:\n-seealso: [](ch_matrices), `Mat`, `PetscRandom`, `PetscRandomCreate()`, `MatZeroEntries()`, `MatSetValues()`, `PetscRandomDestroy()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetRandom\"))\n\"\"\"\nfunction MatSetRandom(petsclib::PetscLibType, x::PetscMat, rctx::Union{Ptr,PetscRandom}) end\n\n@for_petsc function MatSetRandom(petsclib::$UnionPetscLib, x::PetscMat, rctx::Union{Ptr,PetscRandom})\n\n    @chk ccall(\n               (:MatSetRandom, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscRandom),\n               x, rctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCopyHashToXAIJ(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \ncopy hash table entries into an XAIJ matrix type\n\nLogically Collective\n\nInput Parameter:\n- `A` - A matrix in unassembled, hash table form\n\nOutput Parameter:\n- `B` - The XAIJ matrix. This can either be `A` or some matrix of equivalent size, e.g. obtained from `A` via `MatDuplicate()`\n\nExample:\n-seealso: [](ch_matrices), `Mat`, `MAT_USE_HASH_TABLE`\n\n# External Links\n$(_doc_external(\"Mat/MatCopyHashToXAIJ\"))\n\"\"\"\nfunction MatCopyHashToXAIJ(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatCopyHashToXAIJ(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:MatCopyHashToXAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               A, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpivot::PetscReal,row::PetscInt = MatFactorGetErrorZeroPivot(petsclib::PetscLibType,mat::PetscMat) \nreturns the pivot value that was determined to be zero and the row it occurred in\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the factored matrix\n\nOutput Parameters:\n- `pivot` - the pivot value computed\n- `row`   - the row that the zero pivot occurred. This row value must be interpreted carefully due to row reorderings and which processes\nthe share the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroEntries()`, `MatFactor()`, `MatGetFactor()`,\n`MatLUFactorSymbolic()`, `MatCholeskyFactorSymbolic()`, `MatFactorClearError()`,\n`MAT_FACTOR_NUMERIC_ZEROPIVOT`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorGetErrorZeroPivot\"))\n\"\"\"\nfunction MatFactorGetErrorZeroPivot(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatFactorGetErrorZeroPivot(petsclib::$UnionPetscLib, mat::PetscMat )\n\tpivot_ = Ref{$PetscReal}()\n\trow_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatFactorGetErrorZeroPivot, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               mat, pivot_, row_,\n              )\n\n\tpivot = pivot_[]\n\trow = row_[]\n\n\treturn pivot,row\nend \n\n\"\"\"\n\tMatFactorGetError(petsclib::PetscLibType,mat::PetscMat, err::MatFactorError) \ngets the error code from a factorization\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the factored matrix\n\nOutput Parameter:\n- `err` - the error code\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroEntries()`, `MatFactor()`, `MatGetFactor()`, `MatLUFactorSymbolic()`, `MatCholeskyFactorSymbolic()`,\n`MatFactorClearError()`, `MatFactorGetErrorZeroPivot()`, `MatFactorError`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorGetError\"))\n\"\"\"\nfunction MatFactorGetError(petsclib::PetscLibType, mat::PetscMat, err::MatFactorError) end\n\n@for_petsc function MatFactorGetError(petsclib::$UnionPetscLib, mat::PetscMat, err::MatFactorError )\n\n    @chk ccall(\n               (:MatFactorGetError, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatFactorError}),\n               mat, err,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFactorClearError(petsclib::PetscLibType,mat::PetscMat) \nclears the error code in a factorization\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the factored matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroEntries()`, `MatFactor()`, `MatGetFactor()`, `MatLUFactorSymbolic()`, `MatCholeskyFactorSymbolic()`, `MatFactorGetError()`, `MatFactorGetErrorZeroPivot()`,\n`MatGetErrorCode()`, `MatFactorError`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorClearError\"))\n\"\"\"\nfunction MatFactorClearError(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatFactorClearError(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatFactorClearError, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFindNonzeroRows(petsclib::PetscLibType,mat::PetscMat, keptrows::IS) \nLocate all rows that are not completely zero in the matrix\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `keptrows` - the rows that are not completely zero\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatFindZeroRows()`\n\n# External Links\n$(_doc_external(\"Mat/MatFindNonzeroRows\"))\n\"\"\"\nfunction MatFindNonzeroRows(petsclib::PetscLibType, mat::PetscMat, keptrows::IS) end\n\n@for_petsc function MatFindNonzeroRows(petsclib::$UnionPetscLib, mat::PetscMat, keptrows::IS )\n\n    @chk ccall(\n               (:MatFindNonzeroRows, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}),\n               mat, keptrows,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFindZeroRows(petsclib::PetscLibType,mat::PetscMat, zerorows::IS) \nLocate all rows that are completely zero in the matrix\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `zerorows` - the rows that are completely zero\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatFindNonzeroRows()`\n\n# External Links\n$(_doc_external(\"Mat/MatFindZeroRows\"))\n\"\"\"\nfunction MatFindZeroRows(petsclib::PetscLibType, mat::PetscMat, zerorows::IS) end\n\n@for_petsc function MatFindZeroRows(petsclib::$UnionPetscLib, mat::PetscMat, zerorows::IS )\n\n    @chk ccall(\n               (:MatFindZeroRows, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}),\n               mat, zerorows,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetDiagonalBlock(petsclib::PetscLibType,A::PetscMat, a::PetscMat) \nReturns the part of the matrix associated with the on\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `a` - the diagonal part (which is a SEQUENTIAL matrix)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateAIJ()`, `MATAIJ`, `MATBAIJ`, `MATSBAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatGetDiagonalBlock\"))\n\"\"\"\nfunction MatGetDiagonalBlock(petsclib::PetscLibType, A::PetscMat, a::PetscMat) end\n\n@for_petsc function MatGetDiagonalBlock(petsclib::$UnionPetscLib, A::PetscMat, a::PetscMat )\n\ta_ = Ref(a.ptr)\n\n    @chk ccall(\n               (:MatGetDiagonalBlock, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, a_,\n              )\n\n\ta.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\ttrace::PetscScalar = MatGetTrace(petsclib::PetscLibType,mat::PetscMat) \nGets the trace of a matrix. The sum of the diagonal entries.\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `trace` - the sum of the diagonal entries\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`\n\n# External Links\n$(_doc_external(\"Mat/MatGetTrace\"))\n\"\"\"\nfunction MatGetTrace(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetTrace(petsclib::$UnionPetscLib, mat::PetscMat )\n\ttrace_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatGetTrace, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               mat, trace_,\n              )\n\n\ttrace = trace_[]\n\n\treturn trace\nend \n\n\"\"\"\n\tMatRealPart(petsclib::PetscLibType,mat::PetscMat) \nZeros out the imaginary part of the matrix\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatImaginaryPart()`\n\n# External Links\n$(_doc_external(\"Mat/MatRealPart\"))\n\"\"\"\nfunction MatRealPart(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatRealPart(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatRealPart, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnghosts::PetscInt,ghosts::Vector{PetscInt} = MatGetGhosts(petsclib::PetscLibType,mat::PetscMat) \nGet the global indices of all ghost nodes defined by the sparse matrix\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `nghosts` - number of ghosts (for `MATBAIJ` and `MATSBAIJ` matrices there is one ghost for each matrix block)\n- `ghosts`  - the global indices of the ghost points\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `VecCreateGhost()`, `VecCreateGhostBlock()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetGhosts\"))\n\"\"\"\nfunction MatGetGhosts(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetGhosts(petsclib::$UnionPetscLib, mat::PetscMat )\n\tnghosts_ = Ref{$PetscInt}()\n\tghosts_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:MatGetGhosts, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               mat, nghosts_, ghosts_,\n              )\n\n    nghosts = nghosts_[]\n    ghosts = unsafe_wrap(Array, ghosts_[], Int(nghosts); own = false)\n\n    return nghosts,ghosts\nend \n\n\"\"\"\n\tMatImaginaryPart(petsclib::PetscLibType,mat::PetscMat) \nMoves the imaginary part of the matrix to the real part and zeros the imaginary part\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatRealPart()`\n\n# External Links\n$(_doc_external(\"Mat/MatImaginaryPart\"))\n\"\"\"\nfunction MatImaginaryPart(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatImaginaryPart(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatImaginaryPart, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmissing::PetscBool,dd::PetscInt = MatMissingDiagonal(petsclib::PetscLibType,mat::PetscMat) \nDetermine if sparse matrix is missing a diagonal entry (or block entry for `MATBAIJ` and `MATSBAIJ` matrices) in the nonzero structure\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `missing` - is any diagonal entry missing\n- `dd`      - first diagonal entry that is missing (optional) on this process\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`\n\n# External Links\n$(_doc_external(\"Mat/MatMissingDiagonal\"))\n\"\"\"\nfunction MatMissingDiagonal(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatMissingDiagonal(petsclib::$UnionPetscLib, mat::PetscMat )\n\tmissing_ = Ref{PetscBool}()\n\tdd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatMissingDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}, Ptr{$PetscInt}),\n               mat, missing_, dd_,\n              )\n\n\tmissing = missing_[]\n\tdd = dd_[]\n\n\treturn missing,dd\nend \n\n\"\"\"\n\tncols::PetscInt,cols::Vector{PetscInt},vals::Vector{PetscScalar} = MatGetRow(petsclib::PetscLibType,mat::PetscMat, row::PetscInt) \nGets a row of a matrix.  You MUST call `MatRestoreRow()`\nfor each row that you get to ensure that your application does\nnot bleed memory.\n\nNot Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `row` - the row to get\n\nOutput Parameters:\n- `ncols` - if not `NULL`, the number of nonzeros in `row`\n- `cols`  - if not `NULL`, the column numbers\n- `vals`  - if not `NULL`, the numerical values\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatRestoreRow()`, `MatSetValues()`, `MatGetValues()`, `MatCreateSubMatrices()`, `MatGetDiagonal()`, `MatGetRowIJ()`, `MatRestoreRowIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRow\"))\n\"\"\"\nfunction MatGetRow(petsclib::PetscLibType, mat::PetscMat, row::PetscInt) end\n\n@for_petsc function MatGetRow(petsclib::$UnionPetscLib, mat::PetscMat, row::$PetscInt )\n\tncols_ = Ref{$PetscInt}()\n\tcols_ = Ref{Ptr{$PetscInt}}()\n\tvals_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatGetRow, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscScalar}}),\n               mat, row, ncols_, cols_, vals_,\n              )\n\n    ncols = ncols_[]\n    cols = unsafe_wrap(Array, cols_[], Int(ncols); own = false)\n    vals = unsafe_wrap(Array, vals_[], Int(ncols); own = false)\n\n    return ncols,cols,vals\nend \n\n\"\"\"\n\tMatConjugate(petsclib::PetscLibType,mat::PetscMat) \nreplaces the matrix values with their complex conjugates\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatRealPart()`, `MatImaginaryPart()`, `VecConjugate()`, `MatTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatConjugate\"))\n\"\"\"\nfunction MatConjugate(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatConjugate(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatConjugate, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tncols::PetscInt,cols::Vector{PetscInt},vals::Vector{PetscScalar} = MatRestoreRow(petsclib::PetscLibType,mat::PetscMat, row::PetscInt) \nFrees any temporary space allocated by `MatGetRow()`.\n\nNot Collective\n\nInput Parameters:\n- `mat`   - the matrix\n- `row`   - the row to get\n- `ncols` - the number of nonzeros\n- `cols`  - the columns of the nonzeros\n- `vals`  - if nonzero the column values\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetRow()`\n\n# External Links\n$(_doc_external(\"Mat/MatRestoreRow\"))\n\"\"\"\nfunction MatRestoreRow(petsclib::PetscLibType, mat::PetscMat, row::PetscInt) end\n\n@for_petsc function MatRestoreRow(petsclib::$UnionPetscLib, mat::PetscMat, row::$PetscInt )\n\tncols_ = Ref{$PetscInt}()\n\tcols_ = Ref{Ptr{$PetscInt}}()\n\tvals_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatRestoreRow, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscScalar}}),\n               mat, row, ncols_, cols_, vals_,\n              )\n\n    ncols = ncols_[]\n    cols = unsafe_wrap(Array, cols_[], Int(ncols); own = false)\n    vals = unsafe_wrap(Array, vals_[], Int(ncols); own = false)\n\n    return ncols,cols,vals\nend \n\n\"\"\"\n\tMatGetRowUpperTriangular(petsclib::PetscLibType,mat::PetscMat) \nSets a flag to enable calls to `MatGetRow()` for matrix in `MATSBAIJ` format.\nYou should call `MatRestoreRowUpperTriangular()` after calling` MatGetRow()` and `MatRestoreRow()` to disable the flag.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSBAIJ`, `MatRestoreRowUpperTriangular()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowUpperTriangular\"))\n\"\"\"\nfunction MatGetRowUpperTriangular(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetRowUpperTriangular(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatGetRowUpperTriangular, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRestoreRowUpperTriangular(petsclib::PetscLibType,mat::PetscMat) \nDisable calls to `MatGetRow()` for matrix in `MATSBAIJ` format.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSBAIJ`, `MatGetRowUpperTriangular()`\n\n# External Links\n$(_doc_external(\"Mat/MatRestoreRowUpperTriangular\"))\n\"\"\"\nfunction MatRestoreRowUpperTriangular(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatRestoreRowUpperTriangular(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatRestoreRowUpperTriangular, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetOptionsPrefix(petsclib::PetscLibType,A::PetscMat, prefix::Vector{Cchar}) \nSets the prefix used for searching for all\n`Mat` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `A`      - the matrix\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatSetFromOptions()`, `MatSetOptionsPrefixFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetOptionsPrefix\"))\n\"\"\"\nfunction MatSetOptionsPrefix(petsclib::PetscLibType, A::PetscMat, prefix::Vector{Cchar}) end\n\n@for_petsc function MatSetOptionsPrefix(petsclib::$UnionPetscLib, A::PetscMat, prefix::Vector{Cchar} )\n\n    @chk ccall(\n               (:MatSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cchar}),\n               A, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetOptionsPrefixFactor(petsclib::PetscLibType,A::PetscMat, prefix::Vector{Cchar}) \nSets the prefix used for searching for all matrix factor options in the database for\nfor matrices created with `MatGetFactor()`\n\nLogically Collective\n\nInput Parameters:\n- `A`      - the matrix\n- `prefix` - the prefix to prepend to all option names for the factored matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`,   [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatSetFromOptions()`, `MatSetOptionsPrefix()`, `MatAppendOptionsPrefixFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetOptionsPrefixFactor\"))\n\"\"\"\nfunction MatSetOptionsPrefixFactor(petsclib::PetscLibType, A::PetscMat, prefix::Vector{Cchar}) end\n\n@for_petsc function MatSetOptionsPrefixFactor(petsclib::$UnionPetscLib, A::PetscMat, prefix::Vector{Cchar} )\n\n    @chk ccall(\n               (:MatSetOptionsPrefixFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cchar}),\n               A, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatAppendOptionsPrefixFactor(petsclib::PetscLibType,A::PetscMat, prefix::Vector{Cchar}) \nAppends to the prefix used for searching for all matrix factor options in the database for\nfor matrices created with `MatGetFactor()`\n\nLogically Collective\n\nInput Parameters:\n- `A`      - the matrix\n- `prefix` - the prefix to prepend to all option names for the factored matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`,\n`PetscObjectGetOptionsPrefix()`, `TSAppendOptionsPrefix()`, `SNESAppendOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `MatSetOptionsPrefixFactor()`,\n`MatSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Mat/MatAppendOptionsPrefixFactor\"))\n\"\"\"\nfunction MatAppendOptionsPrefixFactor(petsclib::PetscLibType, A::PetscMat, prefix::Vector{Cchar}) end\n\n@for_petsc function MatAppendOptionsPrefixFactor(petsclib::$UnionPetscLib, A::PetscMat, prefix::Vector{Cchar} )\n\n    @chk ccall(\n               (:MatAppendOptionsPrefixFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cchar}),\n               A, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatAppendOptionsPrefix(petsclib::PetscLibType,A::PetscMat, prefix::Vector{Cchar}) \nAppends to the prefix used for searching for all\nmatrix options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `A`      - the matrix\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetOptionsPrefix()`, `MatAppendOptionsPrefixFactor()`, `MatSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Mat/MatAppendOptionsPrefix\"))\n\"\"\"\nfunction MatAppendOptionsPrefix(petsclib::PetscLibType, A::PetscMat, prefix::Vector{Cchar}) end\n\n@for_petsc function MatAppendOptionsPrefix(petsclib::$UnionPetscLib, A::PetscMat, prefix::Vector{Cchar} )\n\n    @chk ccall(\n               (:MatAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cchar}),\n               A, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetOptionsPrefix(petsclib::PetscLibType,A::PetscMat, prefix::Vector{Cchar}) \nGets the prefix used for searching for all\nmatrix options in the database.\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatAppendOptionsPrefix()`, `MatSetOptionsPrefix()`, `MatAppendOptionsPrefixFactor()`, `MatSetOptionsPrefixFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOptionsPrefix\"))\n\"\"\"\nfunction MatGetOptionsPrefix(petsclib::PetscLibType, A::PetscMat, prefix::Vector{Cchar}) end\n\n@for_petsc function MatGetOptionsPrefix(petsclib::$UnionPetscLib, A::PetscMat, prefix::Vector{Cchar} )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:MatGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{Cchar}}),\n               A, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetState(petsclib::PetscLibType,A::PetscMat, state::PetscObjectState) \nGets the state of a `Mat`. Same value as returned by `PetscObjectStateGet()`\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `state` - the object state\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `PetscObjectStateGet()`, `MatGetNonzeroState()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetState\"))\n\"\"\"\nfunction MatGetState(petsclib::PetscLibType, A::PetscMat, state::PetscObjectState) end\n\n@for_petsc function MatGetState(petsclib::$UnionPetscLib, A::PetscMat, state::PetscObjectState )\n\n    @chk ccall(\n               (:MatGetState, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscObjectState}),\n               A, state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatResetPreallocation(petsclib::PetscLibType,A::PetscMat) \nReset matrix to use the original preallocation values provided by the user, for example with `MatXAIJSetPreallocation()`\n\nCollective\n\nInput Parameter:\n- `A` - the matrix\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJSetPreallocation()`, `MatMPIAIJSetPreallocation()`, `MatXAIJSetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatResetPreallocation\"))\n\"\"\"\nfunction MatResetPreallocation(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatResetPreallocation(petsclib::$UnionPetscLib, A::PetscMat )\n\n    @chk ccall(\n               (:MatResetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatResetHash(petsclib::PetscLibType,A::PetscMat) \nReset the matrix so that it will use a hash table for the next round of `MatSetValues()` and `MatAssemblyBegin()`/`MatAssemblyEnd()`.\n\nCollective\n\nInput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatResetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatResetHash\"))\n\"\"\"\nfunction MatResetHash(petsclib::PetscLibType, A::AbstractPetscMat) end\n\n@for_petsc function MatResetHash(petsclib::$UnionPetscLib, A::AbstractPetscMat )\n\n    @chk ccall(\n               (:MatResetHash, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetUp(petsclib::PetscLibType,A::PetscMat) \nSets up the internal matrix data structures for later use by the matrix\n\nCollective\n\nInput Parameter:\n- `A` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatMult()`, `MatCreate()`, `MatDestroy()`, `MatXAIJSetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetUp\"))\n\"\"\"\nfunction MatSetUp(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSetUp(petsclib::$UnionPetscLib, A::PetscMat )\n\n    @chk ccall(\n               (:MatSetUp, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatViewFromOptions(petsclib::PetscLibType,A::PetscMat, obj::PetscObject, name::Vector{Cchar}) \nView properties of the matrix based on options set in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the matrix\n- `obj`  - optional additional object that provides the options prefix to use\n- `name` - command line option\n\nOptions Database Key:\n- `-mat_view [viewertype]:...` - the viewer and its options\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatView()`, `PetscObjectViewFromOptions()`, `MatCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatViewFromOptions\"))\n\"\"\"\nfunction MatViewFromOptions(petsclib::PetscLibType, A::PetscMat, obj::PetscObject, name::Vector{Cchar}) end\n\n@for_petsc function MatViewFromOptions(petsclib::$UnionPetscLib, A::PetscMat, obj::PetscObject, name::Vector{Cchar} )\n\n    @chk ccall(\n               (:MatViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatView(petsclib::PetscLibType,mat::PetscMat, viewer::PetscViewer) \ndisplay information about a matrix in a variety ways\n\nCollective on viewer\n\nInput Parameters:\n- `mat`    - the matrix\n- `viewer` - visualization context\n\nOptions Database Keys:\n- `-mat_view ::ascii_info`           - Prints info on matrix at conclusion of `MatAssemblyEnd()`\n- `-mat_view ::ascii_info_detail`    - Prints more detailed info\n- `-mat_view`                        - Prints matrix in ASCII format\n- `-mat_view ::ascii_matlab`         - Prints matrix in MATLAB format\n- `-mat_view draw`                   - PetscDraws nonzero structure of matrix, using `MatView()` and `PetscDrawOpenX()`.\n- `-display <name>`                  - Sets display name (default is host)\n- `-draw_pause <sec>`                - Sets number of seconds to pause after display\n- `-mat_view socket`                 - Sends matrix to socket, can be accessed from MATLAB (see Users-Manual: ch_matlab for details)\n- `-viewer_socket_machine <machine>` - -\n- `-viewer_socket_port <port>`       - -\n- `-mat_view binary`                 - save matrix to file in binary format\n- `-viewer_binary_filename <name>`   - -\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `PetscViewerPushFormat()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`, `PetscViewer`,\n`PetscViewerSocketOpen()`, `PetscViewerBinaryOpen()`, `MatLoad()`, `MatViewFromOptions()`\n\n# External Links\n$(_doc_external(\"Mat/MatView\"))\n\"\"\"\nfunction MatView(petsclib::PetscLibType, mat::PetscMat, viewer::PetscViewer) end\n\n@for_petsc function MatView(petsclib::$UnionPetscLib, mat::PetscMat, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatView, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscViewer),\n               mat, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLoad(petsclib::PetscLibType,mat::PetscMat, viewer::PetscViewer) \nLoads a matrix that has been stored in binary/HDF5 format\nwith `MatView()`.  The matrix format is determined from the options database.\nGenerates a parallel MPI matrix if the communicator has more than one\nprocessor.  The default matrix type is `MATAIJ`.\n\nCollective\n\nInput Parameters:\n- `mat`    - the newly loaded matrix, this needs to have been created with `MatCreate()`\nor some related function before a call to `MatLoad()`\n- `viewer` - `PETSCVIEWERBINARY`/`PETSCVIEWERHDF5` file viewer\n\nOptions Database Key:\n- `-matload_block_size <bs>` - set block size\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `PetscViewerBinaryOpen()`, `PetscViewerSetType()`, `MatView()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"Mat/MatLoad\"))\n\"\"\"\nfunction MatLoad(petsclib::PetscLibType, mat::PetscMat, viewer::PetscViewer) end\n\n@for_petsc function MatLoad(petsclib::$UnionPetscLib, mat::PetscMat, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatLoad, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscViewer),\n               mat, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDestroy(petsclib::PetscLibType,A::AbstractPetscMat) \nFrees space taken by a matrix.\n\nCollective\n\nInput Parameter:\n- `A` - the matrix\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatDestroy\"))\n\"\"\"\nfunction MatDestroy(petsclib::PetscLibType, A::AbstractPetscMat) end\n\n@for_petsc function MatDestroy(petsclib::$UnionPetscLib, A::AbstractPetscMat )\n\tA_ = Ref(A.ptr)\n\n    @chk ccall(\n               (:MatDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CMat},),\n               A_,\n              )\n\n\tA.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValues(petsclib::PetscLibType,mat::AbstractPetscMat, m::PetscInt, idxm::Vector{PetscInt}, n::PetscInt, idxn::Vector{PetscInt}, v::Vector{PetscScalar}, addv::InsertMode) \nInserts or adds a block of values into a matrix.\nThese values may be cached, so `MatAssemblyBegin()` and `MatAssemblyEnd()`\nMUST be called after all calls to `MatSetValues()` have been completed.\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `m`    - the number of rows\n- `idxm` - the global indices of the rows\n- `n`    - the number of columns\n- `idxn` - the global indices of the columns\n- `v`    - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n- `addv` - either `ADD_VALUES` to add values to any existing entries, or `INSERT_VALUES` to replace existing entries with new values\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`,\n`InsertMode`, `INSERT_VALUES`, `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValues\"))\n\"\"\"\nfunction MatSetValues(petsclib::PetscLibType, mat::AbstractPetscMat, m::PetscInt, idxm::Vector{PetscInt}, n::PetscInt, idxn::Vector{PetscInt}, v::Vector{PetscScalar}, addv::InsertMode) end\n\n@for_petsc function MatSetValues(petsclib::$UnionPetscLib, mat::AbstractPetscMat, m::$PetscInt, idxm::Vector{$PetscInt}, n::$PetscInt, idxn::Vector{$PetscInt}, v::Vector{$PetscScalar}, addv::InsertMode )\n\n    @chk ccall(\n               (:MatSetValues, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               mat, m, idxm, n, idxn, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesIS(petsclib::PetscLibType,mat::PetscMat, ism::IS, isn::IS, v::Vector{PetscScalar}, addv::InsertMode) \nInserts or adds a block of values into a matrix using an `IS` to indicate the rows and columns\nThese values may be cached, so `MatAssemblyBegin()` and `MatAssemblyEnd()`\nMUST be called after all calls to `MatSetValues()` have been completed.\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `ism`  - the rows to provide\n- `isn`  - the columns to provide\n- `v`    - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n- `addv` - either `ADD_VALUES` to add values to any existing entries, or `INSERT_VALUES` to replace existing entries with new values\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetOption()`, `MatSetValues()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`,\n`InsertMode`, `INSERT_VALUES`, `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesIS\"))\n\"\"\"\nfunction MatSetValuesIS(petsclib::PetscLibType, mat::PetscMat, ism::IS, isn::IS, v::Vector{PetscScalar}, addv::InsertMode) end\n\n@for_petsc function MatSetValuesIS(petsclib::$UnionPetscLib, mat::PetscMat, ism::IS, isn::IS, v::Vector{$PetscScalar}, addv::InsertMode )\n\n    @chk ccall(\n               (:MatSetValuesIS, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{$PetscScalar}, InsertMode),\n               mat, ism, isn, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesRowLocal(petsclib::PetscLibType,mat::PetscMat, row::PetscInt, v::Vector{PetscScalar}) \nInserts a row (block row for `MATBAIJ` matrices) of nonzero\nvalues into a matrix\n\nNot Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `row` - the (block) row to set\n- `v`   - a one-dimensional array that contains the values. For `MATBAIJ` they are implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`,\n`InsertMode`, `INSERT_VALUES`, `ADD_VALUES`, `MatSetValues()`, `MatSetValuesRow()`, `MatSetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesRowLocal\"))\n\"\"\"\nfunction MatSetValuesRowLocal(petsclib::PetscLibType, mat::PetscMat, row::PetscInt, v::Vector{PetscScalar}) end\n\n@for_petsc function MatSetValuesRowLocal(petsclib::$UnionPetscLib, mat::PetscMat, row::$PetscInt, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatSetValuesRowLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscScalar}),\n               mat, row, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesRow(petsclib::PetscLibType,mat::PetscMat, row::PetscInt, v::Vector{PetscScalar}) \nInserts a row (block row for `MATBAIJ` matrices) of nonzero\nvalues into a matrix\n\nNot Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `row` - the (block) row to set\n- `v`   - a logically two-dimensional (column major) array of values for  block matrices with blocksize larger than one, otherwise a one dimensional array of values\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatSetValues()`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`,\n`InsertMode`, `INSERT_VALUES`, `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesRow\"))\n\"\"\"\nfunction MatSetValuesRow(petsclib::PetscLibType, mat::PetscMat, row::PetscInt, v::Vector{PetscScalar}) end\n\n@for_petsc function MatSetValuesRow(petsclib::$UnionPetscLib, mat::PetscMat, row::$PetscInt, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatSetValuesRow, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscScalar}),\n               mat, row, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesStencil(petsclib::PetscLibType,mat::PetscMat, m::PetscInt, idxm::Vector{MatStencil}, n::PetscInt, idxn::Vector{MatStencil}, v::Vector{PetscScalar}, addv::InsertMode) \nInserts or adds a block of values into a matrix.\nUsing structured grid indexing\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `m`    - number of rows being entered\n- `idxm` - grid coordinates (and component number when dof > 1) for matrix rows being entered\n- `n`    - number of columns being entered\n- `idxn` - grid coordinates (and component number when dof > 1) for matrix columns being entered\n- `v`    - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n- `addv` - either `ADD_VALUES` to add to existing entries at that location or `INSERT_VALUES` to replace existing entries with new values\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `DMDA`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`\n`MatSetValues()`, `MatSetValuesBlockedStencil()`, `MatSetStencil()`, `DMCreateMatrix()`, `DMDAVecGetArray()`, `MatStencil`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesStencil\"))\n\"\"\"\nfunction MatSetValuesStencil(petsclib::PetscLibType, mat::PetscMat, m::PetscInt, idxm::Vector{MatStencil}, n::PetscInt, idxn::Vector{MatStencil}, v::Vector{PetscScalar}, addv::InsertMode) end\n\n@for_petsc function MatSetValuesStencil(petsclib::$UnionPetscLib, mat::PetscMat, m::$PetscInt, idxm::Vector{MatStencil}, n::$PetscInt, idxn::Vector{MatStencil}, v::Vector{$PetscScalar}, addv::InsertMode )\n\n    @chk ccall(\n               (:MatSetValuesStencil, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{MatStencil}, $PetscInt, Ptr{MatStencil}, Ptr{$PetscScalar}, InsertMode),\n               mat, m, idxm, n, idxn, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesBlockedStencil(petsclib::PetscLibType,mat::PetscMat, m::PetscInt, idxm::Vector{MatStencil}, n::PetscInt, idxn::Vector{MatStencil}, v::Vector{PetscScalar}, addv::InsertMode) \nInserts or adds a block of values into a matrix.\nUsing structured grid indexing\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `m`    - number of rows being entered\n- `idxm` - grid coordinates for matrix rows being entered\n- `n`    - number of columns being entered\n- `idxn` - grid coordinates for matrix columns being entered\n- `v`    - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n- `addv` - either `ADD_VALUES` to add to existing entries or `INSERT_VALUES` to replace existing entries with new values\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `DMDA`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`\n`MatSetValues()`, `MatSetValuesStencil()`, `MatSetStencil()`, `DMCreateMatrix()`, `DMDAVecGetArray()`, `MatStencil`,\n`MatSetBlockSize()`, `MatSetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesBlockedStencil\"))\n\"\"\"\nfunction MatSetValuesBlockedStencil(petsclib::PetscLibType, mat::PetscMat, m::PetscInt, idxm::Vector{MatStencil}, n::PetscInt, idxn::Vector{MatStencil}, v::Vector{PetscScalar}, addv::InsertMode) end\n\n@for_petsc function MatSetValuesBlockedStencil(petsclib::$UnionPetscLib, mat::PetscMat, m::$PetscInt, idxm::Vector{MatStencil}, n::$PetscInt, idxn::Vector{MatStencil}, v::Vector{$PetscScalar}, addv::InsertMode )\n\n    @chk ccall(\n               (:MatSetValuesBlockedStencil, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{MatStencil}, $PetscInt, Ptr{MatStencil}, Ptr{$PetscScalar}, InsertMode),\n               mat, m, idxm, n, idxn, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetStencil(petsclib::PetscLibType,mat::PetscMat, dim::PetscInt, dims::Vector{PetscInt}, starts::Vector{PetscInt}, dof::PetscInt) \nSets the grid information for setting values into a matrix via\n`MatSetValuesStencil()`\n\nNot Collective\n\nInput Parameters:\n- `mat`    - the matrix\n- `dim`    - dimension of the grid 1, 2, or 3\n- `dims`   - number of grid points in x, y, and z direction, including ghost points on your processor\n- `starts` - starting point of ghost nodes on your processor in x, y, and z direction\n- `dof`    - number of degrees of freedom per node\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatStencil`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`\n`MatSetValues()`, `MatSetValuesBlockedStencil()`, `MatSetValuesStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetStencil\"))\n\"\"\"\nfunction MatSetStencil(petsclib::PetscLibType, mat::PetscMat, dim::PetscInt, dims::Vector{PetscInt}, starts::Vector{PetscInt}, dof::PetscInt) end\n\n@for_petsc function MatSetStencil(petsclib::$UnionPetscLib, mat::PetscMat, dim::$PetscInt, dims::Vector{$PetscInt}, starts::Vector{$PetscInt}, dof::$PetscInt )\n\n    @chk ccall(\n               (:MatSetStencil, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt),\n               mat, dim, dims, starts, dof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesBlocked(petsclib::PetscLibType,mat::PetscMat, m::PetscInt, idxm::Vector{PetscInt}, n::PetscInt, idxn::Vector{PetscInt}, v::Vector{PetscScalar}, addv::InsertMode) \nInserts or adds a block of values into a matrix.\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `m`    - the number of block rows\n- `idxm` - the global block indices\n- `n`    - the number of block columns\n- `idxn` - the global block indices\n- `v`    - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n- `addv` - either `ADD_VALUES` to add values to any existing entries, or `INSERT_VALUES` replaces existing entries with new values\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSetBlockSize()`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValues()`, `MatSetValuesBlockedLocal()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesBlocked\"))\n\"\"\"\nfunction MatSetValuesBlocked(petsclib::PetscLibType, mat::PetscMat, m::PetscInt, idxm::Vector{PetscInt}, n::PetscInt, idxn::Vector{PetscInt}, v::Vector{PetscScalar}, addv::InsertMode) end\n\n@for_petsc function MatSetValuesBlocked(petsclib::$UnionPetscLib, mat::PetscMat, m::$PetscInt, idxm::Vector{$PetscInt}, n::$PetscInt, idxn::Vector{$PetscInt}, v::Vector{$PetscScalar}, addv::InsertMode )\n\n    @chk ccall(\n               (:MatSetValuesBlocked, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               mat, m, idxm, n, idxn, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetValues(petsclib::PetscLibType,mat::PetscMat, m::PetscInt, idxm::Vector{PetscInt}, n::PetscInt, idxn::Vector{PetscInt}, v::Vector{PetscScalar}) \nGets a block of local values from a matrix.\n\nNot Collective; can only return values that are owned by the give process\n\nInput Parameters:\n- `mat`  - the matrix\n- `v`    - a logically two-dimensional array for storing the values\n- `m`    - the number of rows\n- `idxm` - the  global indices of the rows\n- `n`    - the number of columns\n- `idxn` - the global indices of the columns\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetRow()`, `MatCreateSubMatrices()`, `MatSetValues()`, `MatGetOwnershipRange()`, `MatGetValuesLocal()`, `MatGetValue()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetValues\"))\n\"\"\"\nfunction MatGetValues(petsclib::PetscLibType, mat::PetscMat, m::PetscInt, idxm::Vector{PetscInt}, n::PetscInt, idxn::Vector{PetscInt}, v::Vector{PetscScalar}) end\n\n@for_petsc function MatGetValues(petsclib::$UnionPetscLib, mat::PetscMat, m::$PetscInt, idxm::Vector{$PetscInt}, n::$PetscInt, idxn::Vector{$PetscInt}, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatGetValues, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               mat, m, idxm, n, idxn, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetValuesLocal(petsclib::PetscLibType,mat::PetscMat, nrow::PetscInt, irow::Vector{PetscInt}, ncol::PetscInt, icol::Vector{PetscInt}, y::Vector{PetscScalar}) \nretrieves values from certain locations in a matrix using the local numbering of the indices\ndefined previously by `MatSetLocalToGlobalMapping()`\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `nrow` - number of rows\n- `irow` - the row local indices\n- `ncol` - number of columns\n- `icol` - the column local indices\n\nOutput Parameter:\n- `y` - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValues()`, `MatSetLocalToGlobalMapping()`,\n`MatSetValuesLocal()`, `MatGetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetValuesLocal\"))\n\"\"\"\nfunction MatGetValuesLocal(petsclib::PetscLibType, mat::PetscMat, nrow::PetscInt, irow::Vector{PetscInt}, ncol::PetscInt, icol::Vector{PetscInt}, y::Vector{PetscScalar}) end\n\n@for_petsc function MatGetValuesLocal(petsclib::$UnionPetscLib, mat::PetscMat, nrow::$PetscInt, irow::Vector{$PetscInt}, ncol::$PetscInt, icol::Vector{$PetscInt}, y::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatGetValuesLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               mat, nrow, irow, ncol, icol, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesBatch(petsclib::PetscLibType,mat::PetscMat, nb::PetscInt, bs::PetscInt, rows::Vector{PetscInt}, v::Vector{PetscScalar}) \nAdds (`ADD_VALUES`) many blocks of values into a matrix at once. The blocks must all be square and\nthe same size. Currently, this can only be called once and creates the given matrix.\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `nb`   - the number of blocks\n- `bs`   - the number of rows (and columns) in each block\n- `rows` - a concatenation of the rows for each block\n- `v`    - a concatenation of logically two-dimensional arrays of values\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`,\n`InsertMode`, `INSERT_VALUES`, `ADD_VALUES`, `MatSetValues()`, `MatSetPreallocationCOO()`, `MatSetValuesCOO()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesBatch\"))\n\"\"\"\nfunction MatSetValuesBatch(petsclib::PetscLibType, mat::PetscMat, nb::PetscInt, bs::PetscInt, rows::Vector{PetscInt}, v::Vector{PetscScalar}) end\n\n@for_petsc function MatSetValuesBatch(petsclib::$UnionPetscLib, mat::PetscMat, nb::$PetscInt, bs::$PetscInt, rows::Vector{$PetscInt}, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatSetValuesBatch, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               mat, nb, bs, rows, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetLocalToGlobalMapping(petsclib::PetscLibType,x::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping) \nSets a local\nthe routine `MatSetValuesLocal()` to allow users to insert matrix entries\nusing a local (per-processor) numbering.\n\nNot Collective\n\nInput Parameters:\n- `x`        - the matrix\n- `rmapping` - row mapping created with `ISLocalToGlobalMappingCreate()` or `ISLocalToGlobalMappingCreateIS()`\n- `cmapping` - column mapping\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `DM`, `DMCreateMatrix()`, `MatGetLocalToGlobalMapping()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValues()`, `MatSetValuesLocal()`, `MatGetValuesLocal()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetLocalToGlobalMapping\"))\n\"\"\"\nfunction MatSetLocalToGlobalMapping(petsclib::PetscLibType, x::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping) end\n\n@for_petsc function MatSetLocalToGlobalMapping(petsclib::$UnionPetscLib, x::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:MatSetLocalToGlobalMapping, $petsc_library),\n               PetscErrorCode,\n               (CMat, ISLocalToGlobalMapping, ISLocalToGlobalMapping),\n               x, rmapping, cmapping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetLocalToGlobalMapping(petsclib::PetscLibType,A::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping) \nGets the local\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameters:\n- `rmapping` - row mapping\n- `cmapping` - column mapping\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatSetLocalToGlobalMapping()`, `MatSetValuesLocal()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetLocalToGlobalMapping\"))\n\"\"\"\nfunction MatGetLocalToGlobalMapping(petsclib::PetscLibType, A::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping) end\n\n@for_petsc function MatGetLocalToGlobalMapping(petsclib::$UnionPetscLib, A::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:MatGetLocalToGlobalMapping, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{ISLocalToGlobalMapping}, Ptr{ISLocalToGlobalMapping}),\n               A, rmapping, cmapping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetLayouts(petsclib::PetscLibType,A::PetscMat, rmap::PetscLayout, cmap::PetscLayout) \nSets the `PetscLayout` objects for rows and columns of a matrix\n\nLogically Collective\n\nInput Parameters:\n- `A`    - the matrix\n- `rmap` - row layout\n- `cmap` - column layout\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `PetscLayout`, `MatCreateVecs()`, `MatGetLocalToGlobalMapping()`, `MatGetLayouts()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetLayouts\"))\n\"\"\"\nfunction MatSetLayouts(petsclib::PetscLibType, A::PetscMat, rmap::PetscLayout, cmap::PetscLayout) end\n\n@for_petsc function MatSetLayouts(petsclib::$UnionPetscLib, A::PetscMat, rmap::PetscLayout, cmap::PetscLayout )\n\n    @chk ccall(\n               (:MatSetLayouts, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscLayout, PetscLayout),\n               A, rmap, cmap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetLayouts(petsclib::PetscLibType,A::PetscMat, rmap::PetscLayout, cmap::PetscLayout) \nGets the `PetscLayout` objects for rows and columns\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameters:\n- `rmap` - row layout\n- `cmap` - column layout\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Layouts](sec_matlayout), `PetscLayout`, `MatCreateVecs()`, `MatGetLocalToGlobalMapping()`, `MatSetLayouts()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetLayouts\"))\n\"\"\"\nfunction MatGetLayouts(petsclib::PetscLibType, A::PetscMat, rmap::PetscLayout, cmap::PetscLayout) end\n\n@for_petsc function MatGetLayouts(petsclib::$UnionPetscLib, A::PetscMat, rmap::PetscLayout, cmap::PetscLayout )\n\n    @chk ccall(\n               (:MatGetLayouts, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscLayout}, Ptr{PetscLayout}),\n               A, rmap, cmap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesLocal(petsclib::PetscLibType,mat::PetscMat, nrow::PetscInt, irow::Vector{PetscInt}, ncol::PetscInt, icol::Vector{PetscInt}, y::Vector{PetscScalar}, addv::InsertMode) \nInserts or adds values into certain locations of a matrix,\nusing a local numbering of the rows and columns.\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `nrow` - number of rows\n- `irow` - the row local indices\n- `ncol` - number of columns\n- `icol` - the column local indices\n- `y`    - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n- `addv` - either `ADD_VALUES` to add values to any existing entries, or `INSERT_VALUES` to replace existing entries with new values\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValues()`, `MatSetLocalToGlobalMapping()`,\n`MatGetValuesLocal()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesLocal\"))\n\"\"\"\nfunction MatSetValuesLocal(petsclib::PetscLibType, mat::PetscMat, nrow::PetscInt, irow::Vector{PetscInt}, ncol::PetscInt, icol::Vector{PetscInt}, y::Vector{PetscScalar}, addv::InsertMode) end\n\n@for_petsc function MatSetValuesLocal(petsclib::$UnionPetscLib, mat::PetscMat, nrow::$PetscInt, irow::Vector{$PetscInt}, ncol::$PetscInt, icol::Vector{$PetscInt}, y::Vector{$PetscScalar}, addv::InsertMode )\n\n    @chk ccall(\n               (:MatSetValuesLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               mat, nrow, irow, ncol, icol, y, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesBlockedLocal(petsclib::PetscLibType,mat::PetscMat, nrow::PetscInt, irow::Vector{PetscInt}, ncol::PetscInt, icol::Vector{PetscInt}, y::Vector{PetscScalar}, addv::InsertMode) \nInserts or adds values into certain locations of a matrix,\nusing a local ordering of the nodes a block at a time.\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `nrow` - number of rows\n- `irow` - the row local indices\n- `ncol` - number of columns\n- `icol` - the column local indices\n- `y`    - a one-dimensional array that contains the values implicitly stored as a two-dimensional array, by default in row-major order.\nSee `MAT_ROW_ORIENTED` in `MatSetOption()` for how to use column-major order.\n- `addv` - either `ADD_VALUES` to add values to any existing entries, or `INSERT_VALUES` to replace existing entries with new values\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSetBlockSize()`, `MatSetLocalToGlobalMapping()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`,\n`MatSetValuesLocal()`, `MatSetValuesBlocked()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesBlockedLocal\"))\n\"\"\"\nfunction MatSetValuesBlockedLocal(petsclib::PetscLibType, mat::PetscMat, nrow::PetscInt, irow::Vector{PetscInt}, ncol::PetscInt, icol::Vector{PetscInt}, y::Vector{PetscScalar}, addv::InsertMode) end\n\n@for_petsc function MatSetValuesBlockedLocal(petsclib::$UnionPetscLib, mat::PetscMat, nrow::$PetscInt, irow::Vector{$PetscInt}, ncol::$PetscInt, icol::Vector{$PetscInt}, y::Vector{$PetscScalar}, addv::InsertMode )\n\n    @chk ccall(\n               (:MatSetValuesBlockedLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               mat, nrow, irow, ncol, icol, y, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMultDiagonalBlock(petsclib::PetscLibType,mat::PetscMat, x::PetscVec, y::PetscVec) \nComputes the matrix\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `x`   - the vector to be multiplied\n\nOutput Parameter:\n- `y` - the result\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatMult()`, `MatMultTranspose()`, `MatMultAdd()`, `MatMultTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultDiagonalBlock\"))\n\"\"\"\nfunction MatMultDiagonalBlock(petsclib::PetscLibType, mat::PetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function MatMultDiagonalBlock(petsclib::$UnionPetscLib, mat::PetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:MatMultDiagonalBlock, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMult(petsclib::PetscLibType,mat::PetscMat, x::PetscVec, y::PetscVec) \nComputes the matrix\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `x`   - the vector to be multiplied\n\nOutput Parameter:\n- `y` - the result\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatMultTranspose()`, `MatMultAdd()`, `MatMultTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatMult\"))\n\"\"\"\nfunction MatMult(petsclib::PetscLibType, mat::AbstractPetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function MatMult(petsclib::$UnionPetscLib, mat::AbstractPetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:MatMult, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMultTranspose(petsclib::PetscLibType,mat::PetscMat, x::PetscVec, y::PetscVec) \nComputes matrix transpose times a vector y = A^T * x.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `x`   - the vector to be multiplied\n\nOutput Parameter:\n- `y` - the result\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatMult()`, `MatMultAdd()`, `MatMultTransposeAdd()`, `MatMultHermitianTranspose()`, `MatTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultTranspose\"))\n\"\"\"\nfunction MatMultTranspose(petsclib::PetscLibType, mat::PetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function MatMultTranspose(petsclib::$UnionPetscLib, mat::PetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:MatMultTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMultHermitianTranspose(petsclib::PetscLibType,mat::PetscMat, x::PetscVec, y::PetscVec) \nComputes matrix Hermitian\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `x`   - the vector to be multiplied\n\nOutput Parameter:\n- `y` - the result\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatMult()`, `MatMultAdd()`, `MatMultHermitianTransposeAdd()`, `MatMultTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultHermitianTranspose\"))\n\"\"\"\nfunction MatMultHermitianTranspose(petsclib::PetscLibType, mat::PetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function MatMultHermitianTranspose(petsclib::$UnionPetscLib, mat::PetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:MatMultHermitianTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMultAdd(petsclib::PetscLibType,mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec) \nComputes v3 = v2 + A * v1.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `v1`  - the vector to be multiplied by `mat`\n- `v2`  - the vector to be added to the result\n\nOutput Parameter:\n- `v3` - the result\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatMultTranspose()`, `MatMult()`, `MatMultTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultAdd\"))\n\"\"\"\nfunction MatMultAdd(petsclib::PetscLibType, mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec) end\n\n@for_petsc function MatMultAdd(petsclib::$UnionPetscLib, mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec )\n\n    @chk ccall(\n               (:MatMultAdd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, v1, v2, v3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMultTransposeAdd(petsclib::PetscLibType,mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec) \nComputes v3 = v2 + A^T * v1.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `v1`  - the vector to be multiplied by the transpose of the matrix\n- `v2`  - the vector to be added to the result\n\nOutput Parameter:\n- `v3` - the result\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatMultTranspose()`, `MatMultAdd()`, `MatMult()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultTransposeAdd\"))\n\"\"\"\nfunction MatMultTransposeAdd(petsclib::PetscLibType, mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec) end\n\n@for_petsc function MatMultTransposeAdd(petsclib::$UnionPetscLib, mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec )\n\n    @chk ccall(\n               (:MatMultTransposeAdd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, v1, v2, v3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMultHermitianTransposeAdd(petsclib::PetscLibType,mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec) \nComputes v3 = v2 + A^H * v1.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `v1`  - the vector to be multiplied by the Hermitian transpose\n- `v2`  - the vector to be added to the result\n\nOutput Parameter:\n- `v3` - the result\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatMultHermitianTranspose()`, `MatMultTranspose()`, `MatMultAdd()`, `MatMult()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultHermitianTransposeAdd\"))\n\"\"\"\nfunction MatMultHermitianTransposeAdd(petsclib::PetscLibType, mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec) end\n\n@for_petsc function MatMultHermitianTransposeAdd(petsclib::$UnionPetscLib, mat::PetscMat, v1::PetscVec, v2::PetscVec, v3::PetscVec )\n\n    @chk ccall(\n               (:MatMultHermitianTransposeAdd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, v1, v2, v3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tt::MatFactorType = MatGetFactorType(petsclib::PetscLibType,mat::PetscMat) \ngets the type of factorization a matrix is\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `t` - the type, one of `MAT_FACTOR_NONE`, `MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ILU`, `MAT_FACTOR_ICC,MAT_FACTOR_ILUDT`, `MAT_FACTOR_QR`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorType`, `MatGetFactor()`, `MatSetFactorType()`, `MAT_FACTOR_NONE`, `MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ILU`,\n`MAT_FACTOR_ICC`,`MAT_FACTOR_ILUDT`, `MAT_FACTOR_QR`\n\n# External Links\n$(_doc_external(\"Mat/MatGetFactorType\"))\n\"\"\"\nfunction MatGetFactorType(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetFactorType(petsclib::$UnionPetscLib, mat::PetscMat )\n\tt_ = Ref{MatFactorType}()\n\n    @chk ccall(\n               (:MatGetFactorType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatFactorType}),\n               mat, t_,\n              )\n\n\tt = unsafe_string(t_[])\n\n\treturn t\nend \n\n\"\"\"\n\tMatSetFactorType(petsclib::PetscLibType,mat::PetscMat, t::MatFactorType) \nsets the type of factorization a matrix is\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `t`   - the type, one of `MAT_FACTOR_NONE`, `MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ILU`, `MAT_FACTOR_ICC,MAT_FACTOR_ILUDT`, `MAT_FACTOR_QR`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorType`, `MatGetFactor()`, `MatGetFactorType()`, `MAT_FACTOR_NONE`, `MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ILU`,\n`MAT_FACTOR_ICC`,`MAT_FACTOR_ILUDT`, `MAT_FACTOR_QR`\n\n# External Links\n$(_doc_external(\"Mat/MatSetFactorType\"))\n\"\"\"\nfunction MatSetFactorType(petsclib::PetscLibType, mat::PetscMat, t::MatFactorType) end\n\n@for_petsc function MatSetFactorType(petsclib::$UnionPetscLib, mat::PetscMat, t::MatFactorType )\n\n    @chk ccall(\n               (:MatSetFactorType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatFactorType),\n               mat, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n    MatGetInfo(petsclib::PetscLibType,mat::PetscMat, flag::MatInfoType, info::Ref{MatInfo}) \nReturns information about matrix storage (number of\nnonzeros, memory, etc.).\n\nCollective if `MAT_GLOBAL_MAX` or `MAT_GLOBAL_SUM` is used as the flag\n\nInput Parameters:\n- `mat`  - the matrix\n- `flag` - flag indicating the type of parameters to be returned (`MAT_LOCAL` - local matrix, `MAT_GLOBAL_MAX` - maximum over all processors, `MAT_GLOBAL_SUM` - sum over all processors)\n\nOutput Parameter:\n- `info` - matrix information context\n\nOptions Database Key:\n- `-mat_view ::ascii_info` - print matrix info to `PETSC_STDOUT`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatInfo`, `MatStashGetInfo()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetInfo\"))\n\"\"\"\nfunction MatGetInfo(petsclib::PetscLibType, mat::PetscMat, flag::MatInfoType, info::Ref{MatInfo}) end\n\n@for_petsc function MatGetInfo(petsclib::$UnionPetscLib, mat::PetscMat, flag::MatInfoType, info::Ref{MatInfo})\n    @chk ccall(\n               (:MatGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatInfoType, Ptr{MatInfo}),\n               mat, flag, info,\n              )\n    return nothing\nend\n\n\"\"\"\n\tMatLUFactor(petsclib::PetscLibType,mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) \nPerforms in\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `row`  - row permutation\n- `col`  - column permutation\n- `info` - options for factorization, includes\n-seealso: [](ch_matrices), [Matrix Factorization](sec_matfactor), `Mat`, `MatFactorType`, `MatLUFactorSymbolic()`, `MatLUFactorNumeric()`, `MatCholeskyFactor()`,\n`MatGetOrdering()`, `MatSetUnfactored()`, `MatFactorInfo`, `MatGetFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatLUFactor\"))\n\"\"\"\nfunction MatLUFactor(petsclib::PetscLibType, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) end\n\n@for_petsc function MatLUFactor(petsclib::$UnionPetscLib, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatLUFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{MatFactorInfo}),\n               mat, row, col, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatILUFactor(petsclib::PetscLibType,mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) \nPerforms in\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `row`  - row permutation\n- `col`  - column permutation\n- `info` - structure containing\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatILUFactorSymbolic()`, `MatLUFactorNumeric()`, `MatCholeskyFactor()`, `MatFactorInfo`\n\n# External Links\n$(_doc_external(\"Mat/MatILUFactor\"))\n\"\"\"\nfunction MatILUFactor(petsclib::PetscLibType, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) end\n\n@for_petsc function MatILUFactor(petsclib::$UnionPetscLib, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatILUFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{MatFactorInfo}),\n               mat, row, col, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLUFactorSymbolic(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) \nPerforms symbolic LU factorization of matrix.\nCall this routine before calling `MatLUFactorNumeric()` and after `MatGetFactor()`.\n\nCollective\n\nInput Parameters:\n- `fact` - the factor matrix obtained with `MatGetFactor()`\n- `mat`  - the matrix\n- `row`  - the row permutation\n- `col`  - the column permutation\n- `info` - options for factorization, includes\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatLUFactor()`, `MatLUFactorNumeric()`, `MatCholeskyFactor()`, `MatFactorInfo`, `MatFactorInfoInitialize()`\n\n# External Links\n$(_doc_external(\"Mat/MatLUFactorSymbolic\"))\n\"\"\"\nfunction MatLUFactorSymbolic(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) end\n\n@for_petsc function MatLUFactorSymbolic(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatLUFactorSymbolic, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CIS, CIS, Ptr{MatFactorInfo}),\n               fact, mat, row, col, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLUFactorNumeric(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, info::MatFactorInfo) \nPerforms numeric LU factorization of a matrix.\nCall this routine after first calling `MatLUFactorSymbolic()` and `MatGetFactor()`.\n\nCollective\n\nInput Parameters:\n- `fact` - the factor matrix obtained with `MatGetFactor()`\n- `mat`  - the matrix\n- `info` - options for factorization\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatFactorInfo`, `MatLUFactorSymbolic()`, `MatLUFactor()`, `MatCholeskyFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatLUFactorNumeric\"))\n\"\"\"\nfunction MatLUFactorNumeric(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, info::MatFactorInfo) end\n\n@for_petsc function MatLUFactorNumeric(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatLUFactorNumeric, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, Ptr{MatFactorInfo}),\n               fact, mat, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCholeskyFactor(petsclib::PetscLibType,mat::PetscMat, perm::IS, info::MatFactorInfo) \nPerforms in\nsymmetric matrix.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `perm` - row and column permutations\n- `info` - expected fill as ratio of original fill\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatFactorInfo`, `MatLUFactor()`, `MatCholeskyFactorSymbolic()`, `MatCholeskyFactorNumeric()`\n`MatGetOrdering()`\n\n# External Links\n$(_doc_external(\"Mat/MatCholeskyFactor\"))\n\"\"\"\nfunction MatCholeskyFactor(petsclib::PetscLibType, mat::PetscMat, perm::IS, info::MatFactorInfo) end\n\n@for_petsc function MatCholeskyFactor(petsclib::$UnionPetscLib, mat::PetscMat, perm::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatCholeskyFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, Ptr{MatFactorInfo}),\n               mat, perm, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCholeskyFactorSymbolic(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, perm::IS, info::MatFactorInfo) \nPerforms symbolic Cholesky factorization\nof a symmetric matrix.\n\nCollective\n\nInput Parameters:\n- `fact` - the factor matrix obtained with `MatGetFactor()`\n- `mat`  - the matrix\n- `perm` - row and column permutations\n- `info` - options for factorization, includes\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorInfo`, `MatGetFactor()`, `MatLUFactorSymbolic()`, `MatCholeskyFactor()`, `MatCholeskyFactorNumeric()`\n`MatGetOrdering()`\n\n# External Links\n$(_doc_external(\"Mat/MatCholeskyFactorSymbolic\"))\n\"\"\"\nfunction MatCholeskyFactorSymbolic(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, perm::IS, info::MatFactorInfo) end\n\n@for_petsc function MatCholeskyFactorSymbolic(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, perm::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatCholeskyFactorSymbolic, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CIS, Ptr{MatFactorInfo}),\n               fact, mat, perm, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCholeskyFactorNumeric(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, info::MatFactorInfo) \nPerforms numeric Cholesky factorization\nof a symmetric matrix. Call this routine after first calling `MatGetFactor()` and\n`MatCholeskyFactorSymbolic()`.\n\nCollective\n\nInput Parameters:\n- `fact` - the factor matrix obtained with `MatGetFactor()`, where the factored values are stored\n- `mat`  - the initial matrix that is to be factored\n- `info` - options for factorization\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorInfo`, `MatGetFactor()`, `MatCholeskyFactorSymbolic()`, `MatCholeskyFactor()`, `MatLUFactorNumeric()`\n\n# External Links\n$(_doc_external(\"Mat/MatCholeskyFactorNumeric\"))\n\"\"\"\nfunction MatCholeskyFactorNumeric(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, info::MatFactorInfo) end\n\n@for_petsc function MatCholeskyFactorNumeric(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatCholeskyFactorNumeric, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, Ptr{MatFactorInfo}),\n               fact, mat, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatQRFactor(petsclib::PetscLibType,mat::PetscMat, col::IS, info::MatFactorInfo) \nPerforms in\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `col`  - column permutation\n- `info` - options for factorization, includes\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorInfo`, `MatGetFactor()`, `MatQRFactorSymbolic()`, `MatQRFactorNumeric()`, `MatLUFactor()`,\n`MatSetUnfactored()`\n\n# External Links\n$(_doc_external(\"Mat/MatQRFactor\"))\n\"\"\"\nfunction MatQRFactor(petsclib::PetscLibType, mat::PetscMat, col::IS, info::MatFactorInfo) end\n\n@for_petsc function MatQRFactor(petsclib::$UnionPetscLib, mat::PetscMat, col::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatQRFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, Ptr{MatFactorInfo}),\n               mat, col, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatQRFactorSymbolic(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, col::IS, info::MatFactorInfo) \nPerforms symbolic QR factorization of matrix.\nCall this routine after `MatGetFactor()` but before calling `MatQRFactorNumeric()`.\n\nCollective\n\nInput Parameters:\n- `fact` - the factor matrix obtained with `MatGetFactor()`\n- `mat`  - the matrix\n- `col`  - column permutation\n- `info` - options for factorization, includes\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatFactorInfo`, `MatQRFactor()`, `MatQRFactorNumeric()`, `MatLUFactor()`, `MatFactorInfoInitialize()`\n\n# External Links\n$(_doc_external(\"Mat/MatQRFactorSymbolic\"))\n\"\"\"\nfunction MatQRFactorSymbolic(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, col::IS, info::MatFactorInfo) end\n\n@for_petsc function MatQRFactorSymbolic(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, col::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatQRFactorSymbolic, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CIS, Ptr{MatFactorInfo}),\n               fact, mat, col, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatQRFactorNumeric(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, info::MatFactorInfo) \nPerforms numeric QR factorization of a matrix.\nCall this routine after first calling `MatGetFactor()`, and `MatQRFactorSymbolic()`.\n\nCollective\n\nInput Parameters:\n- `fact` - the factor matrix obtained with `MatGetFactor()`\n- `mat`  - the matrix\n- `info` - options for factorization\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorInfo`, `MatGetFactor()`, `MatQRFactor()`, `MatQRFactorSymbolic()`, `MatLUFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatQRFactorNumeric\"))\n\"\"\"\nfunction MatQRFactorNumeric(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, info::MatFactorInfo) end\n\n@for_petsc function MatQRFactorNumeric(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatQRFactorNumeric, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, Ptr{MatFactorInfo}),\n               fact, mat, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSolve(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, x::PetscVec) \nSolves A x = b, given a factored matrix.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the factored matrix\n- `b`   - the right-hand-side vector\n\nOutput Parameter:\n- `x` - the result vector\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatLUFactor()`, `MatSolveAdd()`, `MatSolveTranspose()`, `MatSolveTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatSolve\"))\n\"\"\"\nfunction MatSolve(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, x::PetscVec) end\n\n@for_petsc function MatSolve(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:MatSolve, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatSolve(petsclib::PetscLibType,A::PetscMat, B::PetscMat, X::PetscMat) \nSolves A X = B, given a factored matrix.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the factored matrix\n- `B` - the right-hand-side matrix `MATDENSE` (or sparse `MATAIJ`-- when using MUMPS)\n\nOutput Parameter:\n- `X` - the result matrix (dense matrix)\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatSolve()`, `MatMatSolveTranspose()`, `MatLUFactor()`, `MatCholeskyFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatMatSolve\"))\n\"\"\"\nfunction MatMatSolve(petsclib::PetscLibType, A::PetscMat, B::PetscMat, X::PetscMat) end\n\n@for_petsc function MatMatSolve(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, X::PetscMat )\n\n    @chk ccall(\n               (:MatMatSolve, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat),\n               A, B, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatSolveTranspose(petsclib::PetscLibType,A::PetscMat, B::PetscMat, X::PetscMat) \nSolves A^T X = B , given a factored matrix.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the factored matrix\n- `B` - the right-hand-side matrix  (`MATDENSE` matrix)\n\nOutput Parameter:\n- `X` - the result matrix (dense matrix)\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatSolveTranspose()`, `MatMatSolve()`, `MatLUFactor()`, `MatCholeskyFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatMatSolveTranspose\"))\n\"\"\"\nfunction MatMatSolveTranspose(petsclib::PetscLibType, A::PetscMat, B::PetscMat, X::PetscMat) end\n\n@for_petsc function MatMatSolveTranspose(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, X::PetscMat )\n\n    @chk ccall(\n               (:MatMatSolveTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat),\n               A, B, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatTransposeSolve(petsclib::PetscLibType,A::PetscMat, Bt::PetscMat, X::PetscMat) \nSolves A X = B^T, given a factored matrix.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A`  - the factored matrix\n- `Bt` - the transpose of right-hand-side matrix as a `MATDENSE`\n\nOutput Parameter:\n- `X` - the result matrix (dense matrix)\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatMatSolve()`, `MatMatSolveTranspose()`, `MatLUFactor()`, `MatCholeskyFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatMatTransposeSolve\"))\n\"\"\"\nfunction MatMatTransposeSolve(petsclib::PetscLibType, A::PetscMat, Bt::PetscMat, X::PetscMat) end\n\n@for_petsc function MatMatTransposeSolve(petsclib::$UnionPetscLib, A::PetscMat, Bt::PetscMat, X::PetscMat )\n\n    @chk ccall(\n               (:MatMatTransposeSolve, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat),\n               A, Bt, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatForwardSolve(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, x::PetscVec) \nSolves  L x = b , given a factored matrix, A = LU , or\nU^T*D^(1/2) x = b, given a factored symmetric matrix, A = U^T*D*U,\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the factored matrix\n- `b`   - the right-hand-side vector\n\nOutput Parameter:\n- `x` - the result vector\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatBackwardSolve()`, `MatGetFactor()`, `MatSolve()`\n\n# External Links\n$(_doc_external(\"Mat/MatForwardSolve\"))\n\"\"\"\nfunction MatForwardSolve(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, x::PetscVec) end\n\n@for_petsc function MatForwardSolve(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:MatForwardSolve, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatBackwardSolve(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, x::PetscVec) \nSolves U x = b, given a factored matrix, A = LU.\nD^(1/2) U x = b, given a factored symmetric matrix, A = U^T*D*U,\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the factored matrix\n- `b`   - the right-hand-side vector\n\nOutput Parameter:\n- `x` - the result vector\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatForwardSolve()`, `MatGetFactor()`, `MatSolve()`\n\n# External Links\n$(_doc_external(\"Mat/MatBackwardSolve\"))\n\"\"\"\nfunction MatBackwardSolve(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, x::PetscVec) end\n\n@for_petsc function MatBackwardSolve(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:MatBackwardSolve, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSolveAdd(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, y::PetscVec, x::PetscVec) \nComputes x = y + A^{\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the factored matrix\n- `b`   - the right-hand-side vector\n- `y`   - the vector to be added to\n\nOutput Parameter:\n- `x` - the result vector\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatSolve()`, `MatGetFactor()`, `MatSolveTranspose()`, `MatSolveTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatSolveAdd\"))\n\"\"\"\nfunction MatSolveAdd(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, y::PetscVec, x::PetscVec) end\n\n@for_petsc function MatSolveAdd(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, y::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:MatSolveAdd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, b, y, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSolveTranspose(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, x::PetscVec) \nSolves A^T x = b, given a factored matrix.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the factored matrix\n- `b`   - the right-hand-side vector\n\nOutput Parameter:\n- `x` - the result vector\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `KSP`, `MatSolve()`, `MatSolveAdd()`, `MatSolveTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatSolveTranspose\"))\n\"\"\"\nfunction MatSolveTranspose(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, x::PetscVec) end\n\n@for_petsc function MatSolveTranspose(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:MatSolveTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSolveTransposeAdd(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, y::PetscVec, x::PetscVec) \nComputes x = y + A^{\nfactored matrix.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the factored matrix\n- `b`   - the right-hand-side vector\n- `y`   - the vector to be added to\n\nOutput Parameter:\n- `x` - the result vector\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatSolve()`, `MatSolveAdd()`, `MatSolveTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatSolveTransposeAdd\"))\n\"\"\"\nfunction MatSolveTransposeAdd(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, y::PetscVec, x::PetscVec) end\n\n@for_petsc function MatSolveTransposeAdd(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, y::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:MatSolveTransposeAdd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, b, y, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSOR(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, omega::PetscReal, flag::MatSORType, shift::PetscReal, its::PetscInt, lits::PetscInt, x::PetscVec) \nComputes relaxation (SOR, Gauss\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat`   - the matrix\n- `b`     - the right-hand side\n- `omega` - the relaxation factor\n- `flag`  - flag indicating the type of SOR (see below)\n- `shift` - diagonal shift\n- `its`   - the number of iterations\n- `lits`  - the number of local iterations\n\nOutput Parameter:\n- `x` - the solution (can contain an initial guess, use option `SOR_ZERO_INITIAL_GUESS` to indicate no guess)\n\nSOR Flags:\n- `SOR_FORWARD_SWEEP`     - forward SOR\n- `SOR_BACKWARD_SWEEP`     - backward SOR\n- `SOR_SYMMETRIC_SWEEP`     - SSOR (symmetric SOR)\n- `SOR_LOCAL_FORWARD_SWEEP`     - local forward SOR\n- `SOR_LOCAL_BACKWARD_SWEEP`     - local forward SOR\n- `SOR_LOCAL_SYMMETRIC_SWEEP`     - local SSOR\n- `SOR_EISENSTAT`     - SOR with Eisenstat trick\n- `SOR_APPLY_UPPER`, `SOR_APPLY_LOWER`     - applies\nupper/lower triangular part of matrix to\nvector (with omega)\n- `SOR_ZERO_INITIAL_GUESS`     - zero initial guess\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatMult()`, `KSP`, `PC`, `MatGetFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatSOR\"))\n\"\"\"\nfunction MatSOR(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, omega::PetscReal, flag::MatSORType, shift::PetscReal, its::PetscInt, lits::PetscInt, x::PetscVec) end\n\n@for_petsc function MatSOR(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, omega::$PetscReal, flag::MatSORType, shift::$PetscReal, its::$PetscInt, lits::$PetscInt, x::PetscVec )\n\n    @chk ccall(\n               (:MatSOR, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, $PetscReal, MatSORType, $PetscReal, $PetscInt, $PetscInt, CVec),\n               mat, b, omega, flag, shift, its, lits, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCopy(petsclib::PetscLibType,A::PetscMat, B::PetscMat, str::MatStructure) \nCopies a matrix to another matrix.\n\nCollective\n\nInput Parameters:\n- `A`   - the matrix\n- `str` - `SAME_NONZERO_PATTERN` or `DIFFERENT_NONZERO_PATTERN`\n\nOutput Parameter:\n- `B` - where the copy is put\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatConvert()`, `MatDuplicate()`\n\n# External Links\n$(_doc_external(\"Mat/MatCopy\"))\n\"\"\"\nfunction MatCopy(petsclib::PetscLibType, A::PetscMat, B::PetscMat, str::MatStructure) end\n\n@for_petsc function MatCopy(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, str::MatStructure )\n\n    @chk ccall(\n               (:MatCopy, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatStructure),\n               A, B, str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatConvert(petsclib::PetscLibType,mat::PetscMat, newtype::MatType, reuse::MatReuse, M::PetscMat) \nConverts a matrix to another matrix, either of the same\nor different type.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `newtype` - new matrix type.  Use `MATSAME` to create a new matrix of the\nsame type as the original matrix.\n- `reuse`   - denotes if the destination matrix is to be created or reused.\nUse `MAT_INPLACE_MATRIX` for inplace conversion (that is when you want the input `Mat` to be changed to contain the matrix in the new format), otherwise use\n`MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX` (can only be used after the first call was made with `MAT_INITIAL_MATRIX`, causes the matrix space in M to be reused).\n\nOutput Parameter:\n- `M` - pointer to place new matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCopy()`, `MatDuplicate()`, `MAT_INITIAL_MATRIX`, `MAT_REUSE_MATRIX`, `MAT_INPLACE_MATRIX`\n\n# External Links\n$(_doc_external(\"Mat/MatConvert\"))\n\"\"\"\nfunction MatConvert(petsclib::PetscLibType, mat::PetscMat, newtype::MatType, reuse::MatReuse, M::PetscMat) end\n\n@for_petsc function MatConvert(petsclib::$UnionPetscLib, mat::PetscMat, newtype::MatType, reuse::MatReuse, M::PetscMat )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:MatConvert, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatType, MatReuse, Ptr{CMat}),\n               mat, newtype, reuse, M_,\n              )\n\n\tM.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::MatSolverType = MatFactorGetSolverType(petsclib::PetscLibType,mat::PetscMat) \nReturns name of the package providing the factorization routines\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix, must be a factored matrix\n\nOutput Parameter:\n- `type` - the string name of the package (do not free this string)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatSolverType`, `MatCopy()`, `MatDuplicate()`, `MatGetFactorAvailable()`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorGetSolverType\"))\n\"\"\"\nfunction MatFactorGetSolverType(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatFactorGetSolverType(petsclib::$UnionPetscLib, mat::PetscMat )\n\ttype_ = Ref{MatSolverType}()\n\n    @chk ccall(\n               (:MatFactorGetSolverType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatSolverType}),\n               mat, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tMatSolverTypeRegister(petsclib::PetscLibType,package::MatSolverType, mtype::MatType, ftype::MatFactorType, createfactor::external) \nRegisters a `MatSolverType` that works for a particular matrix type\n\nLogically Collective, No Fortran Support\n\nInput Parameters:\n- `package`      - name of the package, for example `petsc` or `superlu`\n- `mtype`        - the matrix type that works with this package\n- `ftype`        - the type of factorization supported by the package\n- `createfactor` - routine that will create the factored matrix ready to be used\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorGetSolverType()`, `MatCopy()`, `MatDuplicate()`, `MatGetFactorAvailable()`,\n`MatGetFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatSolverTypeRegister\"))\n\"\"\"\nfunction MatSolverTypeRegister(petsclib::PetscLibType, package::MatSolverType, mtype::MatType, ftype::MatFactorType, createfactor::external) end\n\n@for_petsc function MatSolverTypeRegister(petsclib::$UnionPetscLib, package::MatSolverType, mtype::MatType, ftype::MatFactorType, createfactor::external )\n\n    @chk ccall(\n               (:MatSolverTypeRegister, $petsc_library),\n               PetscErrorCode,\n               (MatSolverType, MatType, MatFactorType, external),\n               package, mtype, ftype, createfactor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatFactorGetCanUseOrdering(petsclib::PetscLibType,mat::PetscMat) \nIndicates if the factorization can use the ordering provided in `MatLUFactorSymbolic()`, `MatCholeskyFactorSymbolic()`\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if uses the ordering\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatCopy()`, `MatDuplicate()`, `MatGetFactorAvailable()`, `MatGetFactor()`, `MatLUFactorSymbolic()`, `MatCholeskyFactorSymbolic()`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorGetCanUseOrdering\"))\n\"\"\"\nfunction MatFactorGetCanUseOrdering(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatFactorGetCanUseOrdering(petsclib::$UnionPetscLib, mat::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatFactorGetCanUseOrdering, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               mat, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatFactorGetPreferredOrdering(petsclib::PetscLibType,mat::PetscMat, ftype::MatFactorType, otype::MatOrderingType) \nThe preferred ordering for a particular matrix factor object\n\nLogically Collective\n\nInput Parameters:\n- `mat`   - the matrix obtained with `MatGetFactor()`\n- `ftype` - the factorization type to be used\n\nOutput Parameter:\n- `otype` - the preferred ordering type\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatFactorType`, `MatOrderingType`, `MatCopy()`, `MatDuplicate()`, `MatGetFactorAvailable()`, `MatGetFactor()`, `MatLUFactorSymbolic()`, `MatCholeskyFactorSymbolic()`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorGetPreferredOrdering\"))\n\"\"\"\nfunction MatFactorGetPreferredOrdering(petsclib::PetscLibType, mat::PetscMat, ftype::MatFactorType, otype::MatOrderingType) end\n\n@for_petsc function MatFactorGetPreferredOrdering(petsclib::$UnionPetscLib, mat::PetscMat, ftype::MatFactorType, otype::MatOrderingType )\n\n    @chk ccall(\n               (:MatFactorGetPreferredOrdering, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatFactorType, Ptr{MatOrderingType}),\n               mat, ftype, otype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetFactor(petsclib::PetscLibType,mat::PetscMat, type::MatSolverType, ftype::MatFactorType, f::PetscMat) \nReturns a matrix suitable to calls to MatXXFactorSymbolic,Numeric()\n\nCollective\n\nInput Parameters:\n- `mat`   - the matrix\n- `type`  - name of solver type, for example, `superlu`, `petsc` (to use PETSc's solver if it is available), if this is 'NULL', then the first result that satisfies\nthe other criteria is returned\n- `ftype` - factor type, `MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ICC`, `MAT_FACTOR_ILU`, `MAT_FACTOR_QR`\n\nOutput Parameter:\n- `f` - the factor matrix used with MatXXFactorSymbolic,Numeric() calls. Can be `NULL` in some cases, see notes below.\n\nOptions Database Keys:\n- `-pc_factor_mat_solver_type <type>`    - choose the type at run time. When using `KSP` solvers\n- `-pc_factor_mat_factor_on_host <bool>` - do mat factorization on host (with device matrices). Default is doing it on device\n- `-pc_factor_mat_solve_on_host <bool>`  - do mat solve on host (with device matrices). Default is doing it on device\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `KSP`, `MatSolverType`, `MatFactorType`, `MatCopy()`, `MatDuplicate()`,\n`MatGetFactorAvailable()`, `MatFactorGetCanUseOrdering()`, `MatSolverTypeRegister()`, `MatSolverTypeGet()`\n`MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ICC`, `MAT_FACTOR_ILU`, `MAT_FACTOR_QR`, `MatInitializePackage()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetFactor\"))\n\"\"\"\nfunction MatGetFactor(petsclib::PetscLibType, mat::PetscMat, type::MatSolverType, ftype::MatFactorType, f::PetscMat) end\n\n@for_petsc function MatGetFactor(petsclib::$UnionPetscLib, mat::PetscMat, type::MatSolverType, ftype::MatFactorType, f::PetscMat )\n\tf_ = Ref(f.ptr)\n\n    @chk ccall(\n               (:MatGetFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatSolverType, MatFactorType, Ptr{CMat}),\n               mat, type, ftype, f_,\n              )\n\n\tf.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatGetFactorAvailable(petsclib::PetscLibType,mat::PetscMat, type::MatSolverType, ftype::MatFactorType) \nReturns a flag if matrix supports particular type and factor type\n\nNot Collective\n\nInput Parameters:\n- `mat`   - the matrix\n- `type`  - name of solver type, for example, `superlu`, `petsc` (to use PETSc's default)\n- `ftype` - factor type, `MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ICC`, `MAT_FACTOR_ILU`, `MAT_FACTOR_QR`\n\nOutput Parameter:\n- `flg` - PETSC_TRUE if the factorization is available\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatSolverType`, `MatFactorType`, `MatGetFactor()`, `MatCopy()`, `MatDuplicate()`, `MatSolverTypeRegister()`,\n`MAT_FACTOR_LU`, `MAT_FACTOR_CHOLESKY`, `MAT_FACTOR_ICC`, `MAT_FACTOR_ILU`, `MAT_FACTOR_QR`, `MatSolverTypeGet()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetFactorAvailable\"))\n\"\"\"\nfunction MatGetFactorAvailable(petsclib::PetscLibType, mat::PetscMat, type::MatSolverType, ftype::MatFactorType) end\n\n@for_petsc function MatGetFactorAvailable(petsclib::$UnionPetscLib, mat::PetscMat, type::MatSolverType, ftype::MatFactorType )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatGetFactorAvailable, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatSolverType, MatFactorType, Ptr{PetscBool}),\n               mat, type, ftype, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatDuplicate(petsclib::PetscLibType,mat::PetscMat, op::MatDuplicateOption, M::PetscMat) \nDuplicates a matrix including the non\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `op`  - One of `MAT_DO_NOT_COPY_VALUES`, `MAT_COPY_VALUES`, or `MAT_SHARE_NONZERO_PATTERN`.\nSee the manual page for `MatDuplicateOption()` for an explanation of these options.\n\nOutput Parameter:\n- `M` - pointer to place new matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCopy()`, `MatConvert()`, `MatDuplicateOption`\n\n# External Links\n$(_doc_external(\"Mat/MatDuplicate\"))\n\"\"\"\nfunction MatDuplicate(petsclib::PetscLibType, mat::PetscMat, op::MatDuplicateOption, M::PetscMat) end\n\n@for_petsc function MatDuplicate(petsclib::$UnionPetscLib, mat::PetscMat, op::MatDuplicateOption, M::PetscMat )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:MatDuplicate, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatDuplicateOption, Ptr{CMat}),\n               mat, op, M_,\n              )\n\n\tM.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetDiagonal(petsclib::PetscLibType,mat::PetscMat, v::PetscVec) \nGets the diagonal of a matrix as a `Vec`\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `v` - the diagonal of the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `Vec`, `MatGetRow()`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRowMaxAbs()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetDiagonal\"))\n\"\"\"\nfunction MatGetDiagonal(petsclib::PetscLibType, mat::PetscMat, v::PetscVec) end\n\n@for_petsc function MatGetDiagonal(petsclib::$UnionPetscLib, mat::PetscMat, v::PetscVec )\n\n    @chk ccall(\n               (:MatGetDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec),\n               mat, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetRowMin(petsclib::PetscLibType,mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) \nGets the minimum value (of the real part) of each\nrow of the matrix\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `v`   - the vector for storing the maximums\n- `idx` - the indices of the column found for each row (optional, pass `NULL` if not needed)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetDiagonal()`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRowMaxAbs()`, `MatGetRowMinAbs()`,\n`MatGetRowMax()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowMin\"))\n\"\"\"\nfunction MatGetRowMin(petsclib::PetscLibType, mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) end\n\n@for_petsc function MatGetRowMin(petsclib::$UnionPetscLib, mat::PetscMat, v::PetscVec, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatGetRowMin, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, Ptr{$PetscInt}),\n               mat, v, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetRowMinAbs(petsclib::PetscLibType,mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) \nGets the minimum value (in absolute value) of each\nrow of the matrix\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `v`   - the vector for storing the minimums\n- `idx` - the indices of the column found for each row (or `NULL` if not needed)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetDiagonal()`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRowMax()`, `MatGetRowMaxAbs()`, `MatGetRowMin()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowMinAbs\"))\n\"\"\"\nfunction MatGetRowMinAbs(petsclib::PetscLibType, mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) end\n\n@for_petsc function MatGetRowMinAbs(petsclib::$UnionPetscLib, mat::PetscMat, v::PetscVec, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatGetRowMinAbs, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, Ptr{$PetscInt}),\n               mat, v, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetRowMax(petsclib::PetscLibType,mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) \nGets the maximum value (of the real part) of each\nrow of the matrix\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `v`   - the vector for storing the maximums\n- `idx` - the indices of the column found for each row (optional, otherwise pass `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetDiagonal()`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRowMaxAbs()`, `MatGetRowMin()`, `MatGetRowMinAbs()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowMax\"))\n\"\"\"\nfunction MatGetRowMax(petsclib::PetscLibType, mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) end\n\n@for_petsc function MatGetRowMax(petsclib::$UnionPetscLib, mat::PetscMat, v::PetscVec, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatGetRowMax, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, Ptr{$PetscInt}),\n               mat, v, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetRowMaxAbs(petsclib::PetscLibType,mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) \nGets the maximum value (in absolute value) of each\nrow of the matrix\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `v`   - the vector for storing the maximums\n- `idx` - the indices of the column found for each row (or `NULL` if not needed)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetDiagonal()`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRowSum()`, `MatGetRowMin()`, `MatGetRowMinAbs()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowMaxAbs\"))\n\"\"\"\nfunction MatGetRowMaxAbs(petsclib::PetscLibType, mat::PetscMat, v::PetscVec, idx::Vector{PetscInt}) end\n\n@for_petsc function MatGetRowMaxAbs(petsclib::$UnionPetscLib, mat::PetscMat, v::PetscVec, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatGetRowMaxAbs, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, Ptr{$PetscInt}),\n               mat, v, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetRowSumAbs(petsclib::PetscLibType,mat::PetscMat, v::PetscVec) \nGets the sum value (in absolute value) of each row of the matrix\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `v` - the vector for storing the sum\n\nLevel: intermediate\n\nThis code is only implemented for a couple of matrix formats.\n\n-seealso: [](ch_matrices), `Mat`, `MatGetDiagonal()`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRowMax()`, `MatGetRowMin()`, `MatGetRowMinAbs()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowSumAbs\"))\n\"\"\"\nfunction MatGetRowSumAbs(petsclib::PetscLibType, mat::PetscMat, v::PetscVec) end\n\n@for_petsc function MatGetRowSumAbs(petsclib::$UnionPetscLib, mat::PetscMat, v::PetscVec )\n\n    @chk ccall(\n               (:MatGetRowSumAbs, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec),\n               mat, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetRowSum(petsclib::PetscLibType,mat::PetscMat, v::PetscVec) \nGets the sum of each row of the matrix\n\nLogically or Neighborhood Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `v` - the vector for storing the sum of rows\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetDiagonal()`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRowMax()`, `MatGetRowMin()`, `MatGetRowMaxAbs()`, `MatGetRowMinAbs()`, `MatGetRowSumAbs()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowSum\"))\n\"\"\"\nfunction MatGetRowSum(petsclib::PetscLibType, mat::PetscMat, v::PetscVec) end\n\n@for_petsc function MatGetRowSum(petsclib::$UnionPetscLib, mat::PetscMat, v::PetscVec )\n\n    @chk ccall(\n               (:MatGetRowSum, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec),\n               mat, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatTransposeSetPrecursor(petsclib::PetscLibType,mat::PetscMat, B::PetscMat) \nSet the matrix from which the second matrix will receive numerical transpose data with a call to `MatTranspose`(A,`MAT_REUSE_MATRIX`,&B)\nwhen B was not obtained with `MatTranspose`(A,`MAT_INITIAL_MATRIX`,&B)\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix to provide the transpose\n\nOutput Parameter:\n- `B` - the matrix to contain the transpose; it MUST have the nonzero structure of the transpose of A or the code will crash or generate incorrect results\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatTransposeSymbolic()`, `MatTranspose()`, `MatMultTranspose()`, `MatMultTransposeAdd()`, `MatIsTranspose()`, `MatReuse`, `MAT_INITIAL_MATRIX`, `MAT_REUSE_MATRIX`, `MAT_INPLACE_MATRIX`\n\n# External Links\n$(_doc_external(\"Mat/MatTransposeSetPrecursor\"))\n\"\"\"\nfunction MatTransposeSetPrecursor(petsclib::PetscLibType, mat::PetscMat, B::PetscMat) end\n\n@for_petsc function MatTransposeSetPrecursor(petsclib::$UnionPetscLib, mat::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:MatTransposeSetPrecursor, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               mat, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatTranspose(petsclib::PetscLibType,mat::PetscMat, reuse::MatReuse, B::PetscMat) \nComputes the transpose of a matrix, either in\n\nCollective\n\nInput Parameters:\n- `mat`   - the matrix to transpose\n- `reuse` - either `MAT_INITIAL_MATRIX`, `MAT_REUSE_MATRIX`, or `MAT_INPLACE_MATRIX`\n\nOutput Parameter:\n- `B` - the transpose of the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTransposeSetPrecursor()`, `MatMultTranspose()`, `MatMultTransposeAdd()`, `MatIsTranspose()`, `MatReuse`, `MAT_INITIAL_MATRIX`, `MAT_REUSE_MATRIX`, `MAT_INPLACE_MATRIX`,\n`MatTransposeSymbolic()`, `MatCreateTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatTranspose\"))\n\"\"\"\nfunction MatTranspose(petsclib::PetscLibType, mat::PetscMat, reuse::MatReuse, B::PetscMat) end\n\n@for_petsc function MatTranspose(petsclib::$UnionPetscLib, mat::PetscMat, reuse::MatReuse, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CMat}),\n               mat, reuse, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatTransposeSymbolic(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nComputes the symbolic part of the transpose of a matrix.\n\nCollective\n\nInput Parameter:\n- `A` - the matrix to transpose\n\nOutput Parameter:\n- `B` - the transpose. This is a complete matrix but the numerical portion is invalid. One can call `MatTranspose`(A,`MAT_REUSE_MATRIX`,&B) to compute the\nnumerical portion.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTransposeSetPrecursor()`, `MatTranspose()`, `MatMultTranspose()`, `MatMultTransposeAdd()`, `MatIsTranspose()`, `MatReuse`, `MAT_INITIAL_MATRIX`, `MAT_REUSE_MATRIX`, `MAT_INPLACE_MATRIX`\n\n# External Links\n$(_doc_external(\"Mat/MatTransposeSymbolic\"))\n\"\"\"\nfunction MatTransposeSymbolic(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatTransposeSymbolic(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatTransposeSymbolic, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatIsTranspose(petsclib::PetscLibType,A::PetscMat, B::PetscMat, tol::PetscReal) \nTest whether a matrix is another one's transpose,\nor its own, in which case it tests symmetry.\n\nCollective\n\nInput Parameters:\n- `A`   - the matrix to test\n- `B`   - the matrix to test against, this can equal the first parameter\n- `tol` - tolerance, differences between entries smaller than this are counted as zero\n\nOutput Parameter:\n- `flg` - the result\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTranspose()`, `MatIsSymmetric()`, `MatIsHermitian()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsTranspose\"))\n\"\"\"\nfunction MatIsTranspose(petsclib::PetscLibType, A::PetscMat, B::PetscMat, tol::PetscReal) end\n\n@for_petsc function MatIsTranspose(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, tol::$PetscReal )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscReal, Ptr{PetscBool}),\n               A, B, tol, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatHermitianTranspose(petsclib::PetscLibType,mat::PetscMat, reuse::MatReuse, B::PetscMat) \nComputes an in\n\nCollective\n\nInput Parameters:\n- `mat`   - the matrix to transpose and complex conjugate\n- `reuse` - either `MAT_INITIAL_MATRIX`, `MAT_REUSE_MATRIX`, or `MAT_INPLACE_MATRIX`\n\nOutput Parameter:\n- `B` - the Hermitian transpose\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTranspose()`, `MatMultTranspose()`, `MatMultTransposeAdd()`, `MatIsTranspose()`, `MatReuse`\n\n# External Links\n$(_doc_external(\"Mat/MatHermitianTranspose\"))\n\"\"\"\nfunction MatHermitianTranspose(petsclib::PetscLibType, mat::PetscMat, reuse::MatReuse, B::PetscMat) end\n\n@for_petsc function MatHermitianTranspose(petsclib::$UnionPetscLib, mat::PetscMat, reuse::MatReuse, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatHermitianTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CMat}),\n               mat, reuse, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatIsHermitianTranspose(petsclib::PetscLibType,A::PetscMat, B::PetscMat, tol::PetscReal) \nTest whether a matrix is another one's Hermitian transpose,\n\nCollective\n\nInput Parameters:\n- `A`   - the matrix to test\n- `B`   - the matrix to test against, this can equal the first parameter\n- `tol` - tolerance, differences between entries smaller than this are counted as zero\n\nOutput Parameter:\n- `flg` - the result\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTranspose()`, `MatIsSymmetric()`, `MatIsHermitian()`, `MatIsTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsHermitianTranspose\"))\n\"\"\"\nfunction MatIsHermitianTranspose(petsclib::PetscLibType, A::PetscMat, B::PetscMat, tol::PetscReal) end\n\n@for_petsc function MatIsHermitianTranspose(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, tol::$PetscReal )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsHermitianTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscReal, Ptr{PetscBool}),\n               A, B, tol, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatPermute(petsclib::PetscLibType,mat::PetscMat, row::IS, col::IS, B::PetscMat) \nCreates a new matrix with rows and columns permuted from the\noriginal.\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix to permute\n- `row` - row permutation, each processor supplies only the permutation for its rows\n- `col` - column permutation, each processor supplies only the permutation for its columns\n\nOutput Parameter:\n- `B` - the permuted matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetOrdering()`, `ISAllGather()`, `MatCreateSubMatrix()`\n\n# External Links\n$(_doc_external(\"Mat/MatPermute\"))\n\"\"\"\nfunction MatPermute(petsclib::PetscLibType, mat::PetscMat, row::IS, col::IS, B::PetscMat) end\n\n@for_petsc function MatPermute(petsclib::$UnionPetscLib, mat::PetscMat, row::IS, col::IS, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatPermute, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{CMat}),\n               mat, row, col, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nCompares two matrices.\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the matrices are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatMultEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatEqual\"))\n\"\"\"\nfunction MatEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, Ptr{PetscBool}),\n               A, B, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatDiagonalScale(petsclib::PetscLibType,mat::PetscMat, l::PetscVec, r::PetscVec) \nScales a matrix on the left and right by diagonal\nmatrices that are stored as vectors.  Either of the two scaling\nmatrices can be `NULL`.\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix to be scaled\n- `l`   - the left scaling vector (or `NULL`)\n- `r`   - the right scaling vector (or `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatScale()`, `MatShift()`, `MatDiagonalSet()`\n\n# External Links\n$(_doc_external(\"Mat/MatDiagonalScale\"))\n\"\"\"\nfunction MatDiagonalScale(petsclib::PetscLibType, mat::PetscMat, l::Union{Ptr,PetscVec}, r::Union{Ptr,PetscVec}) end\n\n@for_petsc function MatDiagonalScale(petsclib::$UnionPetscLib, mat::PetscMat, l::Union{Ptr,PetscVec}, r::Union{Ptr,PetscVec})\n\n    @chk ccall(\n               (:MatDiagonalScale, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               mat, l, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatScale(petsclib::PetscLibType,mat::PetscMat, a::PetscScalar) \nScales all elements of a matrix by a given number.\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the matrix to be scaled\n- `a`   - the scaling value\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Mat/MatScale\"))\n\"\"\"\nfunction MatScale(petsclib::PetscLibType, mat::PetscMat, a::PetscScalar) end\n\n@for_petsc function MatScale(petsclib::$UnionPetscLib, mat::PetscMat, a::$PetscScalar )\n\n    @chk ccall(\n               (:MatScale, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscScalar),\n               mat, a,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnrm::PetscReal = MatNorm(petsclib::PetscLibType,mat::PetscMat, type::NormType) \nCalculates various norms of a matrix.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `type` - the type of norm, `NORM_1`, `NORM_FROBENIUS`, `NORM_INFINITY`\n\nOutput Parameter:\n- `nrm` - the resulting norm\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`\n\n# External Links\n$(_doc_external(\"Mat/MatNorm\"))\n\"\"\"\nfunction MatNorm(petsclib::PetscLibType, mat::PetscMat, type::NormType) end\n\n@for_petsc function MatNorm(petsclib::$UnionPetscLib, mat::PetscMat, type::NormType )\n\tnrm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatNorm, $petsc_library),\n               PetscErrorCode,\n               (CMat, NormType, Ptr{$PetscReal}),\n               mat, type, nrm_,\n              )\n\n\tnrm = nrm_[]\n\n\treturn nrm\nend \n\n\"\"\"\n\tMatAssemblyBegin(petsclib::PetscLibType,mat::PetscMat, type::MatAssemblyType) \nBegins assembling the matrix.  This routine should\nbe called after completing all calls to `MatSetValues()`.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `type` - type of assembly, either `MAT_FLUSH_ASSEMBLY` or `MAT_FINAL_ASSEMBLY`\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatAssemblyEnd()`, `MatSetValues()`, `MatAssembled()`\n\n# External Links\n$(_doc_external(\"Mat/MatAssemblyBegin\"))\n\"\"\"\nfunction MatAssemblyBegin(petsclib::PetscLibType, mat::AbstractPetscMat, type::MatAssemblyType) end\n\n@for_petsc function MatAssemblyBegin(petsclib::$UnionPetscLib, mat::AbstractPetscMat, type::MatAssemblyType )\n\n    @chk ccall(\n               (:MatAssemblyBegin, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatAssemblyType),\n               mat, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tassembled::PetscBool = MatAssembled(petsclib::PetscLibType,mat::PetscMat) \nIndicates if a matrix has been assembled and is ready for\nuse; for example, in matrix-vector product.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `assembled` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatAssemblyEnd()`, `MatSetValues()`, `MatAssemblyBegin()`\n\n# External Links\n$(_doc_external(\"Mat/MatAssembled\"))\n\"\"\"\nfunction MatAssembled(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatAssembled(petsclib::$UnionPetscLib, mat::PetscMat )\n\tassembled_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatAssembled, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               mat, assembled_,\n              )\n\n\tassembled = assembled_[]\n\n\treturn assembled\nend \n\n\"\"\"\n\tMatAssemblyEnd(petsclib::PetscLibType,mat::PetscMat, type::MatAssemblyType) \nCompletes assembling the matrix.  This routine should\nbe called after `MatAssemblyBegin()`.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `type` - type of assembly, either `MAT_FLUSH_ASSEMBLY` or `MAT_FINAL_ASSEMBLY`\n\nOptions Database Keys:\n- `-mat_view ::ascii_info`             - Prints info on matrix at conclusion of `MatAssemblyEnd()`\n- `-mat_view ::ascii_info_detail`      - Prints more detailed info\n- `-mat_view`                          - Prints matrix in ASCII format\n- `-mat_view ::ascii_matlab`           - Prints matrix in MATLAB format\n- `-mat_view draw`                     - draws nonzero structure of matrix, using `MatView()` and `PetscDrawOpenX()`.\n- `-display <name>`                    - Sets display name (default is host)\n- `-draw_pause <sec>`                  - Sets number of seconds to pause after display\n- `-mat_view socket`                   - Sends matrix to socket, can be accessed from MATLAB (See [Using MATLAB with PETSc](ch_matlab))\n- `-viewer_socket_machine <machine>`   - Machine to use for socket\n- `-viewer_socket_port <port>`         - Port number to use for socket\n- `-mat_view binary:filename[:append]` - Save matrix to file in binary format\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatAssemblyBegin()`, `MatSetValues()`, `PetscDrawOpenX()`, `PetscDrawCreate()`, `MatView()`, `MatAssembled()`, `PetscViewerSocketOpen()`\n\n# External Links\n$(_doc_external(\"Mat/MatAssemblyEnd\"))\n\"\"\"\nfunction MatAssemblyEnd(petsclib::PetscLibType, mat::AbstractPetscMat, type::MatAssemblyType) end\n\n@for_petsc function MatAssemblyEnd(petsclib::$UnionPetscLib, mat::AbstractPetscMat, type::MatAssemblyType )\n\n    @chk ccall(\n               (:MatAssemblyEnd, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatAssemblyType),\n               mat, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetOption(petsclib::PetscLibType,mat::PetscMat, op::MatOption, flg::PetscBool) \nSets a parameter option for a matrix. Some options\nmay be specific to certain storage formats.  Some options\ndetermine how values will be inserted (or added). Sorted,\nrow-oriented input will generally assemble the fastest. The default\nis row-oriented.\n\nLogically Collective for certain operations, such as `MAT_SPD`, not collective for `MAT_ROW_ORIENTED`, see `MatOption`\n\nInput Parameters:\n- `mat` - the matrix\n- `op`  - the option, one of those listed below (and possibly others),\n- `flg` - turn the option on (`PETSC_TRUE`) or off (`PETSC_FALSE`)\n\nOptions Describing Matrix Structure:\n- `MAT_SPD`                         - symmetric positive definite\n- `MAT_SYMMETRIC`                   - symmetric in terms of both structure and value\n- `MAT_HERMITIAN`                   - transpose is the complex conjugation\n- `MAT_STRUCTURALLY_SYMMETRIC`      - symmetric nonzero structure\n- `MAT_SYMMETRY_ETERNAL`            - indicates the symmetry (or Hermitian structure) or its absence will persist through any changes to the matrix\n- `MAT_STRUCTURAL_SYMMETRY_ETERNAL` - indicates the structural symmetry or its absence will persist through any changes to the matrix\n- `MAT_SPD_ETERNAL`                 - indicates the value of `MAT_SPD` (true or false) will persist through any changes to the matrix\n\nThese are not really options of the matrix, they are knowledge about the structure of the matrix that users may provide so that they\ndo not need to be computed (usually at a high cost)\n\nOptions For Use with `MatSetValues()`:\nInsert a logically dense subblock, which can be\n- `MAT_ROW_ORIENTED`                - row-oriented (default)\n\nThese options reflect the data you pass in with `MatSetValues()`; it has\nnothing to do with how the data is stored internally in the matrix\ndata structure.\n\nWhen (re)assembling a matrix, we can restrict the input for\nefficiency/debugging purposes.  These options include\n- `MAT_NEW_NONZERO_LOCATIONS`       - additional insertions will be allowed if they generate a new nonzero (slow)\n- `MAT_FORCE_DIAGONAL_ENTRIES`      - forces diagonal entries to be allocated\n- `MAT_IGNORE_OFF_PROC_ENTRIES`     - drops off-processor entries\n- `MAT_NEW_NONZERO_LOCATION_ERR`    - generates an error for new matrix entry\n- `MAT_USE_HASH_TABLE`              - uses a hash table to speed up matrix assembly\n- `MAT_NO_OFF_PROC_ENTRIES`         - you know each process will only set values for its own rows, will generate an error if\nany process sets values for another process. This avoids all reductions in the MatAssembly routines and thus improves\nperformance for very large process counts.\n- `MAT_SUBSET_OFF_PROC_ENTRIES`     - you know that the first assembly after setting this flag will set a superset\nof the off-process entries required for all subsequent assemblies. This avoids a rendezvous step in the MatAssembly\nfunctions, instead sending only neighbor messages.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatOption`, `Mat`, `MatGetOption()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetOption\"))\n\"\"\"\nfunction MatSetOption(petsclib::PetscLibType, mat::PetscMat, op::MatOption, flg::PetscBool) end\n\n@for_petsc function MatSetOption(petsclib::$UnionPetscLib, mat::PetscMat, op::MatOption, flg::PetscBool )\n\n    @chk ccall(\n               (:MatSetOption, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatOption, PetscBool),\n               mat, op, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatGetOption(petsclib::PetscLibType,mat::PetscMat, op::MatOption) \nGets a parameter option that has been set for a matrix.\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `op`  - the option, this only responds to certain options, check the code for which ones\n\nOutput Parameter:\n- `flg` - turn the option on (`PETSC_TRUE`) or off (`PETSC_FALSE`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatOption`, `MatSetOption()`, `MatIsSymmetric()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`,\n`MatIsSymmetricKnown()`, `MatIsHermitianKnown()`, `MatIsStructurallySymmetricKnown()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOption\"))\n\"\"\"\nfunction MatGetOption(petsclib::PetscLibType, mat::PetscMat, op::MatOption) end\n\n@for_petsc function MatGetOption(petsclib::$UnionPetscLib, mat::PetscMat, op::MatOption )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatGetOption, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatOption, Ptr{PetscBool}),\n               mat, op, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatZeroEntries(petsclib::PetscLibType,mat::PetscMat) \nZeros all entries of a matrix.  For sparse matrices\nthis routine retains the old nonzero structure.\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRows()`, `MatZeroRowsColumns()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroEntries\"))\n\"\"\"\nfunction MatZeroEntries(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatZeroEntries(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatZeroEntries, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsColumns(petsclib::PetscLibType,mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows and columns of a matrix.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `numRows` - the number of rows/columns to zero\n- `rows`    - the global row indices\n- `diag`    - value put in the diagonal of the eliminated rows\n- `x`       - optional vector of the solution for zeroed rows (other entries in vector are not used), these must be set before this call\n- `b`       - optional vector of the right-hand side, that will be adjusted by provided solution entries\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRows()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsColumns\"))\n\"\"\"\nfunction MatZeroRowsColumns(petsclib::PetscLibType, mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsColumns(petsclib::$UnionPetscLib, mat::PetscMat, numRows::$PetscInt, rows::Vector{$PetscInt}, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsColumns, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscScalar, CVec, CVec),\n               mat, numRows, rows, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsColumnsIS(petsclib::PetscLibType,mat::PetscMat, is::IS, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows and columns of a matrix.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `is`   - the rows to zero\n- `diag` - value put in all diagonals of eliminated rows (0.0 will even eliminate diagonal entry)\n- `x`    - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`    - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRows()`, `MatZeroRowsColumnsStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsColumnsIS\"))\n\"\"\"\nfunction MatZeroRowsColumnsIS(petsclib::PetscLibType, mat::PetscMat, is::IS, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsColumnsIS(petsclib::$UnionPetscLib, mat::PetscMat, is::IS, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsColumnsIS, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, $PetscScalar, CVec, CVec),\n               mat, is, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRows(petsclib::PetscLibType,mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows of a matrix.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `numRows` - the number of rows to zero\n- `rows`    - the global row indices\n- `diag`    - value put in the diagonal of the zeroed rows\n- `x`       - optional vector of solutions for zeroed rows (other entries in vector are not used), these must be set before this call\n- `b`       - optional vector of right-hand side, that will be adjusted by provided solution entries\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`, `PCREDISTRIBUTE`, `MAT_KEEP_NONZERO_PATTERN`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRows\"))\n\"\"\"\nfunction MatZeroRows(petsclib::PetscLibType, mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRows(petsclib::$UnionPetscLib, mat::PetscMat, numRows::$PetscInt, rows::Vector{$PetscInt}, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRows, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscScalar, CVec, CVec),\n               mat, numRows, rows, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsIS(petsclib::PetscLibType,mat::PetscMat, is::IS, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows of a matrix indicated by an `IS`\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `is`   - index set, `IS`, of rows to remove (if `NULL` then no row is removed)\n- `diag` - value put in all diagonals of eliminated rows\n- `x`    - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`    - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRows()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`, `IS`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsIS\"))\n\"\"\"\nfunction MatZeroRowsIS(petsclib::PetscLibType, mat::PetscMat, is::Union{Ptr,IS}, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsIS(petsclib::$UnionPetscLib, mat::PetscMat, is::Union{Ptr,IS}, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsIS, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, $PetscScalar, CVec, CVec),\n               mat, is, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsStencil(petsclib::PetscLibType,mat::PetscMat, numRows::PetscInt, rows::Vector{MatStencil}, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows of a matrix indicated by a `MatStencil`. These rows must be local to the process.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `numRows` - the number of rows to remove\n- `rows`    - the grid coordinates (and component number when dof > 1) for matrix rows indicated by an array of `MatStencil`\n- `diag`    - value put in all diagonals of eliminated rows (0.0 will even eliminate diagonal entry)\n- `x`       - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`       - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatStencil`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRows()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsStencil\"))\n\"\"\"\nfunction MatZeroRowsStencil(petsclib::PetscLibType, mat::PetscMat, numRows::PetscInt, rows::Vector{MatStencil}, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsStencil(petsclib::$UnionPetscLib, mat::PetscMat, numRows::$PetscInt, rows::Vector{MatStencil}, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsStencil, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{MatStencil}, $PetscScalar, CVec, CVec),\n               mat, numRows, rows, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsColumnsStencil(petsclib::PetscLibType,mat::PetscMat, numRows::PetscInt, rows::Vector{MatStencil}, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all row and column entries (except possibly the main diagonal)\nof a set of rows and columns of a matrix.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `numRows` - the number of rows/columns to remove\n- `rows`    - the grid coordinates (and component number when dof > 1) for matrix rows\n- `diag`    - value put in all diagonals of eliminated rows (0.0 will even eliminate diagonal entry)\n- `x`       - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`       - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRows()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsColumnsStencil\"))\n\"\"\"\nfunction MatZeroRowsColumnsStencil(petsclib::PetscLibType, mat::PetscMat, numRows::PetscInt, rows::Vector{MatStencil}, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsColumnsStencil(petsclib::$UnionPetscLib, mat::PetscMat, numRows::$PetscInt, rows::Vector{MatStencil}, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsColumnsStencil, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{MatStencil}, $PetscScalar, CVec, CVec),\n               mat, numRows, rows, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsLocal(petsclib::PetscLibType,mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows of a matrix; using local numbering of rows.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `numRows` - the number of rows to remove\n- `rows`    - the local row indices\n- `diag`    - value put in all diagonals of eliminated rows\n- `x`       - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`       - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRows()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsLocal\"))\n\"\"\"\nfunction MatZeroRowsLocal(petsclib::PetscLibType, mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsLocal(petsclib::$UnionPetscLib, mat::PetscMat, numRows::$PetscInt, rows::Vector{$PetscInt}, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscScalar, CVec, CVec),\n               mat, numRows, rows, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsLocalIS(petsclib::PetscLibType,mat::PetscMat, is::IS, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows of a matrix; using local numbering of rows.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `is`   - index set of rows to remove\n- `diag` - value put in all diagonals of eliminated rows\n- `x`    - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`    - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRows()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsLocalIS\"))\n\"\"\"\nfunction MatZeroRowsLocalIS(petsclib::PetscLibType, mat::PetscMat, is::IS, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsLocalIS(petsclib::$UnionPetscLib, mat::PetscMat, is::IS, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsLocalIS, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, $PetscScalar, CVec, CVec),\n               mat, is, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsColumnsLocal(petsclib::PetscLibType,mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows and columns of a matrix; using local numbering of rows.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `numRows` - the number of rows to remove\n- `rows`    - the global row indices\n- `diag`    - value put in all diagonals of eliminated rows\n- `x`       - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`       - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRows()`, `MatZeroRowsColumnsLocalIS()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsColumnsLocal\"))\n\"\"\"\nfunction MatZeroRowsColumnsLocal(petsclib::PetscLibType, mat::PetscMat, numRows::PetscInt, rows::Vector{PetscInt}, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsColumnsLocal(petsclib::$UnionPetscLib, mat::PetscMat, numRows::$PetscInt, rows::Vector{$PetscInt}, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsColumnsLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscScalar, CVec, CVec),\n               mat, numRows, rows, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatZeroRowsColumnsLocalIS(petsclib::PetscLibType,mat::PetscMat, is::IS, diag::PetscScalar, x::PetscVec, b::PetscVec) \nZeros all entries (except possibly the main diagonal)\nof a set of rows and columns of a matrix; using local numbering of rows.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `is`   - index set of rows to remove\n- `diag` - value put in all diagonals of eliminated rows\n- `x`    - optional vector of solutions for zeroed rows (other entries in vector are not used)\n- `b`    - optional vector of right-hand side, that will be adjusted by provided solution\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatZeroRowsIS()`, `MatZeroRowsColumns()`, `MatZeroRowsLocalIS()`, `MatZeroRowsStencil()`, `MatZeroEntries()`, `MatZeroRowsLocal()`, `MatSetOption()`,\n`MatZeroRowsColumnsLocal()`, `MatZeroRows()`, `MatZeroRowsColumnsIS()`, `MatZeroRowsColumnsStencil()`\n\n# External Links\n$(_doc_external(\"Mat/MatZeroRowsColumnsLocalIS\"))\n\"\"\"\nfunction MatZeroRowsColumnsLocalIS(petsclib::PetscLibType, mat::PetscMat, is::IS, diag::PetscScalar, x::PetscVec, b::PetscVec) end\n\n@for_petsc function MatZeroRowsColumnsLocalIS(petsclib::$UnionPetscLib, mat::PetscMat, is::IS, diag::$PetscScalar, x::PetscVec, b::PetscVec )\n\n    @chk ccall(\n               (:MatZeroRowsColumnsLocalIS, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, $PetscScalar, CVec, CVec),\n               mat, is, diag, x, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt = MatGetSize(petsclib::PetscLibType,mat::PetscMat) \nReturns the numbers of rows and columns in a matrix.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `m` - the number of global rows\n- `n` - the number of global columns\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetSizes()`, `MatGetLocalSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetSize\"))\n\"\"\"\nfunction MatGetSize(petsclib::PetscLibType, mat::AbstractPetscMat) end\n\n@for_petsc function MatGetSize(petsclib::$UnionPetscLib, mat::AbstractPetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatGetSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mat, m_, n_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\n\treturn m,n\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt = MatGetLocalSize(petsclib::PetscLibType,mat::PetscMat) \nFor most matrix formats, excluding `MATELEMENTAL` and `MATSCALAPACK`, Returns the number of local rows and local columns\nof a matrix. For all matrices this is the local size of the left and right vectors as returned by `MatCreateVecs()`.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `m` - the number of local rows, use `NULL` to not obtain this value\n- `n` - the number of local columns, use `NULL` to not obtain this value\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetSizes()`, `MatGetSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetLocalSize\"))\n\"\"\"\nfunction MatGetLocalSize(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetLocalSize(petsclib::$UnionPetscLib, mat::PetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatGetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mat, m_, n_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\n\treturn m,n\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt = MatGetOwnershipRangeColumn(petsclib::PetscLibType,mat::PetscMat) \nReturns the range of matrix columns associated with rows of a\nvector one multiplies this matrix by that are owned by this processor.\n\nNot Collective, unless matrix has not been allocated, then collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `m` - the global index of the first local column, use `NULL` to not obtain this value\n- `n` - one more than the global index of the last local column, use `NULL` to not obtain this value\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetOwnershipRange()`, `MatGetOwnershipRanges()`, `MatGetOwnershipRangesColumn()`, `PetscLayout`,\n`MatSetSizes()`, `MatCreateAIJ()`, `DMDAGetGhostCorners()`, `DM`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOwnershipRangeColumn\"))\n\"\"\"\nfunction MatGetOwnershipRangeColumn(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetOwnershipRangeColumn(petsclib::$UnionPetscLib, mat::PetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatGetOwnershipRangeColumn, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mat, m_, n_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\n\treturn m,n\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt = MatGetOwnershipRange(petsclib::PetscLibType,mat::PetscMat) \nFor matrices that own values by row, excludes `MATELEMENTAL` and `MATSCALAPACK`, returns the range of matrix rows owned by\nthis MPI process.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `m` - the global index of the first local row, use `NULL` to not obtain this value\n- `n` - one more than the global index of the last local row, use `NULL` to not obtain this value\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetOwnershipRanges()`, `MatGetOwnershipRangeColumn()`, `MatGetOwnershipRangesColumn()`, `PetscSplitOwnership()`,\n`PetscSplitOwnershipBlock()`, `PetscLayout`, `MatSetSizes()`, `MatCreateAIJ()`, `DMDAGetGhostCorners()`, `DM`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOwnershipRange\"))\n\"\"\"\nfunction MatGetOwnershipRange(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetOwnershipRange(petsclib::$UnionPetscLib, mat::PetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatGetOwnershipRange, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mat, m_, n_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\n\treturn m,n\nend \n\n\"\"\"\n\tranges::Vector{PetscInt} = MatGetOwnershipRanges(petsclib::PetscLibType,mat::PetscMat) \nFor matrices that own values by row, excludes `MATELEMENTAL` and\n`MATSCALAPACK`, returns the range of matrix rows owned by each process.\n\nNot Collective, unless matrix has not been allocated\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `ranges` - start of each processors portion plus one more than the total length at the end, of length `size` + 1\nwhere `size` is the number of MPI processes used by `mat`\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetOwnershipRange()`, `MatGetOwnershipRangeColumn()`, `MatGetOwnershipRangesColumn()`, `PetscLayout`,\n`PetscSplitOwnership()`, `PetscSplitOwnershipBlock()`, `MatSetSizes()`, `MatCreateAIJ()`,\n`DMDAGetGhostCorners()`, `DM`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOwnershipRanges\"))\n\"\"\"\nfunction MatGetOwnershipRanges(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetOwnershipRanges(petsclib::$UnionPetscLib, mat::PetscMat)\n    ranges_ = Ref{Ptr{$PetscInt}}()\n    @chk ccall(\n        (:MatGetOwnershipRanges, $petsc_library),\n        PetscErrorCode,\n        (CMat, Ptr{Ptr{$PetscInt}}),\n        mat, ranges_,\n    )\n    # Get the MPI communicator directly from the PETSc object via ccall\n    comm_ref = Ref{MPI.MPI_Comm}()\n    @chk ccall(\n        (:PetscObjectGetComm, $petsc_library),\n        PetscErrorCode,\n        (CMat, Ptr{MPI.MPI_Comm}),\n        mat, comm_ref,\n    )\n    comm = MPI.Comm(comm_ref[])\n    nproc = MPI.Comm_size(comm)\n    ranges = unsafe_wrap(Array, ranges_[], nproc + 1; own = false)\n    return ranges\nend\n\n\"\"\"\n\tranges::Vector{PetscInt} = MatGetOwnershipRangesColumn(petsclib::PetscLibType,mat::PetscMat) \nReturns the ranges of matrix columns associated with rows of a\nvector one multiplies this vector by that are owned by each processor.\n\nNot Collective, unless matrix has not been allocated\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `ranges` - start of each processors portion plus one more than the total length at the end\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetOwnershipRange()`, `MatGetOwnershipRangeColumn()`, `MatGetOwnershipRanges()`,\n`PetscSplitOwnership()`, `PetscSplitOwnershipBlock()`, `PetscLayout`, `MatSetSizes()`, `MatCreateAIJ()`,\n`DMDAGetGhostCorners()`, `DM`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOwnershipRangesColumn\"))\n\"\"\"\nfunction MatGetOwnershipRangesColumn(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetOwnershipRangesColumn(petsclib::$UnionPetscLib, mat::PetscMat )\n\tranges_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:MatGetOwnershipRangesColumn, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscInt}}),\n               mat, ranges_,\n              )\n\n    # Get the MPI communicator directly from the PETSc object via ccall\n    comm_ref = Ref{MPI.MPI_Comm}()\n    @chk ccall(\n        (:PetscObjectGetComm, $petsc_library),\n        PetscErrorCode,\n        (CMat, Ptr{MPI.MPI_Comm}),\n        mat, comm_ref,\n    )\n    comm = MPI.Comm(comm_ref[])\n    \n    nproc = MPI.Comm_size(comm)\n    ranges = unsafe_wrap(Array, ranges_[], nproc + 1; own = false)\n\n    return ranges\nend \n\n\"\"\"\n\tMatGetOwnershipIS(petsclib::PetscLibType,A::PetscMat, rows::IS, cols::IS) \nGet row and column ownership of a matrices' values as index sets.\n\nNot Collective\n\nInput Parameter:\n- `A` - matrix\n\nOutput Parameters:\n- `rows` - rows in which this process owns elements, , use `NULL` to not obtain this value\n- `cols` - columns in which this process owns elements, use `NULL` to not obtain this value\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `IS`, `Mat`, `MatGetOwnershipRanges()`, `MatSetValues()`, `MATELEMENTAL`, `MATSCALAPACK`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOwnershipIS\"))\n\"\"\"\nfunction MatGetOwnershipIS(petsclib::PetscLibType, A::PetscMat, rows::IS, cols::IS) end\n\n@for_petsc function MatGetOwnershipIS(petsclib::$UnionPetscLib, A::PetscMat, rows::IS, cols::IS )\n\n    @chk ccall(\n               (:MatGetOwnershipIS, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}, Ptr{CIS}),\n               A, rows, cols,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatILUFactorSymbolic(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) \nPerforms symbolic ILU factorization of a matrix obtained with `MatGetFactor()`\nUses levels of fill only, not drop tolerance. Use `MatLUFactorNumeric()`\nto complete the factorization.\n\nCollective\n\nInput Parameters:\n- `fact` - the factorized matrix obtained with `MatGetFactor()`\n- `mat`  - the matrix\n- `row`  - row permutation\n- `col`  - column permutation\n- `info` - structure containing\n-seealso: [](ch_matrices), `Mat`, [Matrix Factorization](sec_matfactor), `MatGetFactor()`, `MatLUFactorSymbolic()`, `MatLUFactorNumeric()`, `MatCholeskyFactor()`\n`MatGetOrdering()`, `MatFactorInfo`\n\n# External Links\n$(_doc_external(\"Mat/MatILUFactorSymbolic\"))\n\"\"\"\nfunction MatILUFactorSymbolic(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo) end\n\n@for_petsc function MatILUFactorSymbolic(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, row::IS, col::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatILUFactorSymbolic, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CIS, CIS, Ptr{MatFactorInfo}),\n               fact, mat, row, col, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatICCFactorSymbolic(petsclib::PetscLibType,fact::PetscMat, mat::PetscMat, perm::IS, info::MatFactorInfo) \nPerforms symbolic incomplete\nCholesky factorization for a symmetric matrix.  Use\n`MatCholeskyFactorNumeric()` to complete the factorization.\n\nCollective\n\nInput Parameters:\n- `fact` - the factorized matrix obtained with `MatGetFactor()`\n- `mat`  - the matrix to be factored\n- `perm` - row and column permutation\n- `info` - structure containing\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatCholeskyFactorNumeric()`, `MatCholeskyFactor()`, `MatFactorInfo`\n\n# External Links\n$(_doc_external(\"Mat/MatICCFactorSymbolic\"))\n\"\"\"\nfunction MatICCFactorSymbolic(petsclib::PetscLibType, fact::PetscMat, mat::PetscMat, perm::IS, info::MatFactorInfo) end\n\n@for_petsc function MatICCFactorSymbolic(petsclib::$UnionPetscLib, fact::PetscMat, mat::PetscMat, perm::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatICCFactorSymbolic, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CIS, Ptr{MatFactorInfo}),\n               fact, mat, perm, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsubmat::Vector{PetscMat} = MatCreateSubMatrices(petsclib::PetscLibType,mat::PetscMat, n::PetscInt, irow::Vector{IS}, icol::Vector{IS}, scall::MatReuse) \nExtracts several submatrices from a matrix. If submat\npoints to an array of valid matrices, they may be reused to store the new\nsubmatrices.\n\nCollective\n\nInput Parameters:\n- `mat`   - the matrix\n- `n`     - the number of submatrixes to be extracted (on this processor, may be zero)\n- `irow`  - index set of rows to extract\n- `icol`  - index set of columns to extract\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `submat` - the array of submatrices\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroySubMatrices()`, `MatCreateSubMatrix()`, `MatGetRow()`, `MatGetDiagonal()`, `MatReuse`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSubMatrices\"))\n\"\"\"\nfunction MatCreateSubMatrices(petsclib::PetscLibType, mat::PetscMat, n::PetscInt, irow::Vector{IS}, icol::Vector{IS}, scall::MatReuse) end\n\n@for_petsc function MatCreateSubMatrices(petsclib::$UnionPetscLib, mat::PetscMat, n::$PetscInt, irow::Vector{IS}, icol::Vector{IS}, scall::MatReuse )\n\tsubmat_ = Ref{Ptr{PetscMat}}()\n\n    @chk ccall(\n               (:MatCreateSubMatrices, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CIS}, Ptr{CIS}, MatReuse, Ptr{Ptr{CMat}}),\n               mat, n, irow, icol, scall, submat_,\n              )\n\n\tsubmat = unsafe_wrap(Array, submat_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn submat\nend \n\n\"\"\"\n\tsubmat::Vector{PetscMat} = MatCreateSubMatricesMPI(petsclib::PetscLibType,mat::PetscMat, n::PetscInt, irow::Vector{IS}, icol::Vector{IS}, scall::MatReuse) \nExtracts MPI submatrices across a sub communicator of `mat` (by pairs of `IS` that may live on subcomms).\n\nCollective\n\nInput Parameters:\n- `mat`   - the matrix\n- `n`     - the number of submatrixes to be extracted\n- `irow`  - index set of rows to extract\n- `icol`  - index set of columns to extract\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `submat` - the array of submatrices\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `PCGASM`, `MatCreateSubMatrices()`, `MatCreateSubMatrix()`, `MatGetRow()`, `MatGetDiagonal()`, `MatReuse`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSubMatricesMPI\"))\n\"\"\"\nfunction MatCreateSubMatricesMPI(petsclib::PetscLibType, mat::PetscMat, n::PetscInt, irow::Vector{IS}, icol::Vector{IS}, scall::MatReuse) end\n\n@for_petsc function MatCreateSubMatricesMPI(petsclib::$UnionPetscLib, mat::PetscMat, n::$PetscInt, irow::Vector{IS}, icol::Vector{IS}, scall::MatReuse )\n\tsubmat_ = Ref{Ptr{PetscMat}}()\n\n    @chk ccall(\n               (:MatCreateSubMatricesMPI, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CIS}, Ptr{CIS}, MatReuse, Ptr{Ptr{CMat}}),\n               mat, n, irow, icol, scall, submat_,\n              )\n\n\tsubmat = unsafe_wrap(Array, submat_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn submat\nend \n\n\"\"\"\n\tMatDestroyMatrices(petsclib::PetscLibType,n::PetscInt, mat::Vector{PetscMat}) \nDestroys an array of matrices\n\nCollective\n\nInput Parameters:\n- `n`   - the number of local matrices\n- `mat` - the matrices (this is a pointer to the array of matrices)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSubMatrices()`, `MatDestroySubMatrices()`\n\n# External Links\n$(_doc_external(\"Mat/MatDestroyMatrices\"))\n\"\"\"\nfunction MatDestroyMatrices(petsclib::PetscLibType, n::PetscInt, mat::Vector{PetscMat}) end\n\n@for_petsc function MatDestroyMatrices(petsclib::$UnionPetscLib, n::$PetscInt, mat::Vector{PetscMat} )\n\tmat_ = Ref(pointer(mat))\n\n    @chk ccall(\n               (:MatDestroyMatrices, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Ptr{CMat}}),\n               n, mat_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDestroySubMatrices(petsclib::PetscLibType,n::PetscInt, mat::Vector{PetscMat}) \nDestroys a set of matrices obtained with `MatCreateSubMatrices()`.\n\nCollective\n\nInput Parameters:\n- `n`   - the number of local matrices\n- `mat` - the matrices (this is a pointer to the array of matrices, to match the calling sequence of `MatCreateSubMatrices()`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSubMatrices()`, `MatDestroyMatrices()`\n\n# External Links\n$(_doc_external(\"Mat/MatDestroySubMatrices\"))\n\"\"\"\nfunction MatDestroySubMatrices(petsclib::PetscLibType, n::PetscInt, mat::Vector{PetscMat}) end\n\n@for_petsc function MatDestroySubMatrices(petsclib::$UnionPetscLib, n::$PetscInt, mat::Vector{PetscMat} )\n\tmat_ = Ref(pointer(mat))\n\n    @chk ccall(\n               (:MatDestroySubMatrices, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Ptr{CMat}}),\n               n, mat_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetSeqNonzeroStructure(petsclib::PetscLibType,mat::PetscMat, matstruct::PetscMat) \nExtracts the nonzero structure from a matrix and stores it, in its entirety, on each process\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `matstruct` - the sequential matrix with the nonzero structure of `mat`\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroySeqNonzeroStructure()`, `MatCreateSubMatrices()`, `MatDestroyMatrices()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetSeqNonzeroStructure\"))\n\"\"\"\nfunction MatGetSeqNonzeroStructure(petsclib::PetscLibType, mat::PetscMat, matstruct::PetscMat) end\n\n@for_petsc function MatGetSeqNonzeroStructure(petsclib::$UnionPetscLib, mat::PetscMat, matstruct::PetscMat )\n\tmatstruct_ = Ref(matstruct.ptr)\n\n    @chk ccall(\n               (:MatGetSeqNonzeroStructure, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               mat, matstruct_,\n              )\n\n\tmatstruct.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDestroySeqNonzeroStructure(petsclib::PetscLibType,mat::PetscMat) \nDestroys matrix obtained with `MatGetSeqNonzeroStructure()`.\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetSeqNonzeroStructure()`\n\n# External Links\n$(_doc_external(\"Mat/MatDestroySeqNonzeroStructure\"))\n\"\"\"\nfunction MatDestroySeqNonzeroStructure(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatDestroySeqNonzeroStructure(petsclib::$UnionPetscLib, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:MatDestroySeqNonzeroStructure, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CMat},),\n               mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatIncreaseOverlap(petsclib::PetscLibType,mat::PetscMat, n::PetscInt, is::Vector{IS}, ov::PetscInt) \nGiven a set of submatrices indicated by index sets,\nreplaces the index sets by larger ones that represent submatrices with\nadditional overlap.\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `n`   - the number of index sets\n- `is`  - the array of index sets (these index sets will changed during the call)\n- `ov`  - the additional overlap requested\n\nOptions Database Key:\n- `-mat_increase_overlap_scalable` - use a scalable algorithm to compute the overlap (supported by MPIAIJ matrix)\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `PCASM`, `MatSetBlockSize()`, `MatIncreaseOverlapSplit()`, `MatCreateSubMatrices()`\n\n# External Links\n$(_doc_external(\"Mat/MatIncreaseOverlap\"))\n\"\"\"\nfunction MatIncreaseOverlap(petsclib::PetscLibType, mat::PetscMat, n::PetscInt, is::Vector{IS}, ov::PetscInt) end\n\n@for_petsc function MatIncreaseOverlap(petsclib::$UnionPetscLib, mat::PetscMat, n::$PetscInt, is::Vector{IS}, ov::$PetscInt )\n\n    @chk ccall(\n               (:MatIncreaseOverlap, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CIS}, $PetscInt),\n               mat, n, is, ov,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatIncreaseOverlapSplit(petsclib::PetscLibType,mat::PetscMat, n::PetscInt, is::Vector{IS}, ov::PetscInt) \nGiven a set of submatrices indicated by index sets across\na sub communicator, replaces the index sets by larger ones that represent submatrices with\nadditional overlap.\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `n`   - the number of index sets\n- `is`  - the array of index sets (these index sets will changed during the call)\n- `ov`  - the additional overlap requested\n\n`   Options Database Key:\n- `-mat_increase_overlap_scalable` - use a scalable algorithm to compute the overlap (supported by MPIAIJ matrix)\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSubMatrices()`, `MatIncreaseOverlap()`\n\n# External Links\n$(_doc_external(\"Mat/MatIncreaseOverlapSplit\"))\n\"\"\"\nfunction MatIncreaseOverlapSplit(petsclib::PetscLibType, mat::PetscMat, n::PetscInt, is::Vector{IS}, ov::PetscInt) end\n\n@for_petsc function MatIncreaseOverlapSplit(petsclib::$UnionPetscLib, mat::PetscMat, n::$PetscInt, is::Vector{IS}, ov::$PetscInt )\n\n    @chk ccall(\n               (:MatIncreaseOverlapSplit, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CIS}, $PetscInt),\n               mat, n, is, ov,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = MatGetBlockSize(petsclib::PetscLibType,mat::PetscMat) \nReturns the matrix block size.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `bs` - block size\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATBAIJ`, `MATSBAIJ`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetBlockSize\"))\n\"\"\"\nfunction MatGetBlockSize(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetBlockSize(petsclib::$UnionPetscLib, mat::PetscMat )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               mat, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\trbs::PetscInt,cbs::PetscInt = MatGetBlockSizes(petsclib::PetscLibType,mat::PetscMat) \nReturns the matrix block row and column sizes.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `rbs` - row block size\n- `cbs` - column block size\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATBAIJ`, `MATSBAIJ`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSize()`, `MatSetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetBlockSizes\"))\n\"\"\"\nfunction MatGetBlockSizes(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetBlockSizes(petsclib::$UnionPetscLib, mat::PetscMat )\n\trbs_ = Ref{$PetscInt}()\n\tcbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatGetBlockSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mat, rbs_, cbs_,\n              )\n\n\trbs = rbs_[]\n\tcbs = cbs_[]\n\n\treturn rbs,cbs\nend \n\n\"\"\"\n\tMatSetBlockSize(petsclib::PetscLibType,mat::PetscMat, bs::PetscInt) \nSets the matrix block size.\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `bs`  - block size\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATBAIJ`, `MATSBAIJ`, `MATAIJ`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSizes()`, `MatGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetBlockSize\"))\n\"\"\"\nfunction MatSetBlockSize(petsclib::PetscLibType, mat::PetscMat, bs::PetscInt) end\n\n@for_petsc function MatSetBlockSize(petsclib::$UnionPetscLib, mat::PetscMat, bs::$PetscInt )\n\n    @chk ccall(\n               (:MatSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               mat, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatComputeVariableBlockEnvelope(petsclib::PetscLibType,mat::PetscMat) \nGiven a matrix whose nonzeros are in blocks along the diagonal this computes and stores\nthe sizes of these blocks in the matrix. An individual block may lie over several processes.\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatInvertVariableBlockEnvelope()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatComputeVariableBlockEnvelope\"))\n\"\"\"\nfunction MatComputeVariableBlockEnvelope(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatComputeVariableBlockEnvelope(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatComputeVariableBlockEnvelope, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatInvertVariableBlockEnvelope(petsclib::PetscLibType,A::PetscMat, reuse::MatReuse, C::PetscMat) \nset matrix C to be the inverted block diagonal of matrix A\n\nCollective\n\nInput Parameters:\n- `A`     - the matrix\n- `reuse` - indicates if the `C` matrix was obtained from a previous call to this routine\n\nOutput Parameter:\n- `C` - matrix with inverted block diagonal of `A`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatInvertBlockDiagonal()`, `MatComputeBlockDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatInvertVariableBlockEnvelope\"))\n\"\"\"\nfunction MatInvertVariableBlockEnvelope(petsclib::PetscLibType, A::PetscMat, reuse::MatReuse, C::PetscMat) end\n\n@for_petsc function MatInvertVariableBlockEnvelope(petsclib::$UnionPetscLib, A::PetscMat, reuse::MatReuse, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatInvertVariableBlockEnvelope, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CMat}),\n               A, reuse, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetVariableBlockSizes(petsclib::PetscLibType,mat::PetscMat, nblocks::PetscInt, bsizes::Vector{PetscInt}) \nSets diagonal point\n\nNot Collective\n\nInput Parameters:\n- `mat`     - the matrix\n- `nblocks` - the number of blocks on this process, each block can only exist on a single process\n- `bsizes`  - the block sizes\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSizes()`, `MatGetBlockSizes()`, `MatGetVariableBlockSizes()`,\n`MatComputeVariableBlockEnvelope()`, `PCVPBJACOBI`\n\n# External Links\n$(_doc_external(\"Mat/MatSetVariableBlockSizes\"))\n\"\"\"\nfunction MatSetVariableBlockSizes(petsclib::PetscLibType, mat::PetscMat, nblocks::PetscInt, bsizes::Vector{PetscInt}) end\n\n@for_petsc function MatSetVariableBlockSizes(petsclib::$UnionPetscLib, mat::PetscMat, nblocks::$PetscInt, bsizes::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatSetVariableBlockSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}),\n               mat, nblocks, bsizes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnblocks::PetscInt,bsizes::Vector{PetscInt} = MatGetVariableBlockSizes(petsclib::PetscLibType,mat::PetscMat) \nGets a diagonal blocks of the matrix that need not be of the same size\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `nblocks` - the number of blocks on this process\n- `bsizes`  - the block sizes\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSizes()`, `MatGetBlockSizes()`, `MatSetVariableBlockSizes()`, `MatComputeVariableBlockEnvelope()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetVariableBlockSizes\"))\n\"\"\"\nfunction MatGetVariableBlockSizes(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetVariableBlockSizes(petsclib::$UnionPetscLib, mat::PetscMat )\n\tnblocks_ = Ref{$PetscInt}()\n\tbsizes_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:MatGetVariableBlockSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               mat, nblocks_, bsizes_,\n              )\n\n\tnblocks = nblocks_[]\n\tbsizes = unsafe_wrap(Array, bsizes_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nblocks,bsizes\nend \n\n\"\"\"\n\tMatSelectVariableBlockSizes(petsclib::PetscLibType,subA::PetscMat, A::PetscMat, isrow::IS) \nWhen creating a submatrix, pass on the variable block sizes\n\nNot Collective\n\nInput Parameter:\n- `subA`  - the submatrix\n- `A`     - the original matrix\n- `isrow` - The `IS` of selected rows for the submatrix, must be sorted\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatSetVariableBlockSizes()`, `MatComputeVariableBlockEnvelope()`\n\n# External Links\n$(_doc_external(\"Mat/MatSelectVariableBlockSizes\"))\n\"\"\"\nfunction MatSelectVariableBlockSizes(petsclib::PetscLibType, subA::PetscMat, A::PetscMat, isrow::IS) end\n\n@for_petsc function MatSelectVariableBlockSizes(petsclib::$UnionPetscLib, subA::PetscMat, A::PetscMat, isrow::IS )\n\n    @chk ccall(\n               (:MatSelectVariableBlockSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CIS),\n               subA, A, isrow,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetBlockSizes(petsclib::PetscLibType,mat::PetscMat, rbs::PetscInt, cbs::PetscInt) \nSets the matrix block row and column sizes.\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `rbs` - row block size\n- `cbs` - column block size\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSize()`, `MatGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetBlockSizes\"))\n\"\"\"\nfunction MatSetBlockSizes(petsclib::PetscLibType, mat::PetscMat, rbs::PetscInt, cbs::PetscInt) end\n\n@for_petsc function MatSetBlockSizes(petsclib::$UnionPetscLib, mat::PetscMat, rbs::$PetscInt, cbs::$PetscInt )\n\n    @chk ccall(\n               (:MatSetBlockSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt),\n               mat, rbs, cbs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetBlockSizesFromMats(petsclib::PetscLibType,mat::PetscMat, fromRow::PetscMat, fromCol::PetscMat) \nSets the matrix block row and column sizes to match a pair of matrices\n\nLogically Collective\n\nInput Parameters:\n- `mat`     - the matrix\n- `fromRow` - matrix from which to copy row block size\n- `fromCol` - matrix from which to copy column block size (can be same as fromRow)\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqBAIJ()`, `MatCreateBAIJ()`, `MatGetBlockSize()`, `MatSetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetBlockSizesFromMats\"))\n\"\"\"\nfunction MatSetBlockSizesFromMats(petsclib::PetscLibType, mat::PetscMat, fromRow::PetscMat, fromCol::PetscMat) end\n\n@for_petsc function MatSetBlockSizesFromMats(petsclib::$UnionPetscLib, mat::PetscMat, fromRow::PetscMat, fromCol::PetscMat )\n\n    @chk ccall(\n               (:MatSetBlockSizesFromMats, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat),\n               mat, fromRow, fromCol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatResidual(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec) \nDefault routine to calculate the residual r = b\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `b`   - the right-hand-side\n- `x`   - the approximate solution\n\nOutput Parameter:\n- `r` - location to store the residual\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatMult()`, `MatMultAdd()`, `PCMGSetResidual()`\n\n# External Links\n$(_doc_external(\"Mat/MatResidual\"))\n\"\"\"\nfunction MatResidual(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec) end\n\n@for_petsc function MatResidual(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec )\n\n    @chk ccall(\n               (:MatResidual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, b, x, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt,ia::Vector{PetscInt},ja::Vector{PetscInt},done::PetscBool = MatGetRowIJ(petsclib::PetscLibType,mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) \nReturns the compressed row storage i and j indices for the local rows of a sparse matrix\n\nCollective\n\nInput Parameters:\n- `mat`             - the matrix\n- `shift`           - 0 or 1 indicating we want the indices starting at 0 or 1\n- `symmetric`       - `PETSC_TRUE` or `PETSC_FALSE` indicating the matrix data structure should be symmetrized\n- `inodecompressed` - `PETSC_TRUE` or `PETSC_FALSE`  indicating if the nonzero structure of the\ninodes or the nonzero elements is wanted. For `MATBAIJ` matrices the compressed version is\nalways used.\n\nOutput Parameters:\n- `n`    - number of local rows in the (possibly compressed) matrix, use `NULL` if not needed\n- `ia`   - the row pointers; that is ia[0] = 0, ia[row] = ia[row-1] + number of elements in that row of the matrix, use `NULL` if not needed\n- `ja`   - the column indices, use `NULL` if not needed\n- `done` - indicates if the routine actually worked and returned appropriate ia[] and ja[] arrays; callers\nare responsible for handling the case when done == `PETSC_FALSE` and ia and ja are not set\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATAIJ`, `MatGetColumnIJ()`, `MatRestoreRowIJ()`, `MatSeqAIJGetArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetRowIJ\"))\n\"\"\"\nfunction MatGetRowIJ(petsclib::PetscLibType, mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) end\n\n@for_petsc function MatGetRowIJ(petsclib::$UnionPetscLib, mat::PetscMat, shift::$PetscInt, symmetric::PetscBool, inodecompressed::PetscBool )\n\tn_ = Ref{$PetscInt}()\n\tia_ = Ref{Ptr{$PetscInt}}()\n\tja_ = Ref{Ptr{$PetscInt}}()\n\tdone_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatGetRowIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, PetscBool, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{PetscBool}),\n               mat, shift, symmetric, inodecompressed, n_, ia_, ja_, done_,\n              )\n\n\tn = n_[]\n\tia = unsafe_wrap(Array, ia_[], VecGetLocalSize(petsclib, x); own = false)\n\tja = unsafe_wrap(Array, ja_[], VecGetLocalSize(petsclib, x); own = false)\n\tdone = done_[]\n\n\treturn n,ia,ja,done\nend \n\n\"\"\"\n\tn::PetscInt,ia::Vector{PetscInt},ja::Vector{PetscInt},done::PetscBool = MatGetColumnIJ(petsclib::PetscLibType,mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) \nReturns the compressed column storage i and j indices for sequential matrices.\n\nCollective\n\nInput Parameters:\n- `mat`             - the matrix\n- `shift`           - 1 or zero indicating we want the indices starting at 0 or 1\n- `symmetric`       - `PETSC_TRUE` or `PETSC_FALSE` indicating the matrix data structure should be\nsymmetrized\n- `inodecompressed` - `PETSC_TRUE` or `PETSC_FALSE` indicating if the nonzero structure of the\ninodes or the nonzero elements is wanted. For `MATBAIJ` matrices the compressed version is\nalways used.\n\nOutput Parameters:\n- `n`    - number of columns in the (possibly compressed) matrix\n- `ia`   - the column pointers; that is ia[0] = 0, ia[col] = i[col-1] + number of elements in that col of the matrix\n- `ja`   - the row indices\n- `done` - `PETSC_TRUE` or `PETSC_FALSE`, indicating whether the values have been returned\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetRowIJ()`, `MatRestoreColumnIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnIJ\"))\n\"\"\"\nfunction MatGetColumnIJ(petsclib::PetscLibType, mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) end\n\n@for_petsc function MatGetColumnIJ(petsclib::$UnionPetscLib, mat::PetscMat, shift::$PetscInt, symmetric::PetscBool, inodecompressed::PetscBool )\n\tn_ = Ref{$PetscInt}()\n\tia_ = Ref{Ptr{$PetscInt}}()\n\tja_ = Ref{Ptr{$PetscInt}}()\n\tdone_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatGetColumnIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, PetscBool, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{PetscBool}),\n               mat, shift, symmetric, inodecompressed, n_, ia_, ja_, done_,\n              )\n\n\tn = n_[]\n\tia = unsafe_wrap(Array, ia_[], VecGetLocalSize(petsclib, x); own = false)\n\tja = unsafe_wrap(Array, ja_[], VecGetLocalSize(petsclib, x); own = false)\n\tdone = done_[]\n\n\treturn n,ia,ja,done\nend \n\n\"\"\"\n\tn::PetscInt,ia::Vector{PetscInt},ja::Vector{PetscInt},done::PetscBool = MatRestoreRowIJ(petsclib::PetscLibType,mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) \nCall after you are completed with the ia,ja indices obtained with `MatGetRowIJ()`.\n\nCollective\n\nInput Parameters:\n- `mat`             - the matrix\n- `shift`           - 1 or zero indicating we want the indices starting at 0 or 1\n- `symmetric`       - `PETSC_TRUE` or `PETSC_FALSE` indicating the matrix data structure should be symmetrized\n- `inodecompressed` - `PETSC_TRUE` or `PETSC_FALSE` indicating if the nonzero structure of the\ninodes or the nonzero elements is wanted. For `MATBAIJ` matrices the compressed version is\nalways used.\n- `n`               - size of (possibly compressed) matrix\n- `ia`              - the row pointers\n- `ja`              - the column indices\n\nOutput Parameter:\n- `done` - `PETSC_TRUE` or `PETSC_FALSE` indicated that the values have been returned\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetRowIJ()`, `MatRestoreColumnIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatRestoreRowIJ\"))\n\"\"\"\nfunction MatRestoreRowIJ(petsclib::PetscLibType, mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) end\n\n@for_petsc function MatRestoreRowIJ(petsclib::$UnionPetscLib, mat::PetscMat, shift::$PetscInt, symmetric::PetscBool, inodecompressed::PetscBool )\n\tn_ = Ref{$PetscInt}()\n\tia_ = Ref{Ptr{$PetscInt}}()\n\tja_ = Ref{Ptr{$PetscInt}}()\n\tdone_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatRestoreRowIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, PetscBool, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{PetscBool}),\n               mat, shift, symmetric, inodecompressed, n_, ia_, ja_, done_,\n              )\n\n\tn = n_[]\n\tia = unsafe_wrap(Array, ia_[], VecGetLocalSize(petsclib, x); own = false)\n\tja = unsafe_wrap(Array, ja_[], VecGetLocalSize(petsclib, x); own = false)\n\tdone = done_[]\n\n\treturn n,ia,ja,done\nend \n\n\"\"\"\n\tn::PetscInt,ia::Vector{PetscInt},ja::Vector{PetscInt},done::PetscBool = MatRestoreColumnIJ(petsclib::PetscLibType,mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) \nCall after you are completed with the ia,ja indices obtained with `MatGetColumnIJ()`.\n\nCollective\n\nInput Parameters:\n- `mat`             - the matrix\n- `shift`           - 1 or zero indicating we want the indices starting at 0 or 1\n- `symmetric`       - `PETSC_TRUE` or `PETSC_FALSE` indicating the matrix data structure should be symmetrized\n- `inodecompressed` - `PETSC_TRUE` or `PETSC_FALSE` indicating if the nonzero structure of the\ninodes or the nonzero elements is wanted. For `MATBAIJ` matrices the compressed version is\nalways used.\n\nOutput Parameters:\n- `n`    - size of (possibly compressed) matrix\n- `ia`   - the column pointers\n- `ja`   - the row indices\n- `done` - `PETSC_TRUE` or `PETSC_FALSE` indicated that the values have been returned\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetColumnIJ()`, `MatRestoreRowIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatRestoreColumnIJ\"))\n\"\"\"\nfunction MatRestoreColumnIJ(petsclib::PetscLibType, mat::PetscMat, shift::PetscInt, symmetric::PetscBool, inodecompressed::PetscBool) end\n\n@for_petsc function MatRestoreColumnIJ(petsclib::$UnionPetscLib, mat::PetscMat, shift::$PetscInt, symmetric::PetscBool, inodecompressed::PetscBool )\n\tn_ = Ref{$PetscInt}()\n\tia_ = Ref{Ptr{$PetscInt}}()\n\tja_ = Ref{Ptr{$PetscInt}}()\n\tdone_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatRestoreColumnIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, PetscBool, PetscBool, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{PetscBool}),\n               mat, shift, symmetric, inodecompressed, n_, ia_, ja_, done_,\n              )\n\n\tn = n_[]\n\tia = unsafe_wrap(Array, ia_[], VecGetLocalSize(petsclib, x); own = false)\n\tja = unsafe_wrap(Array, ja_[], VecGetLocalSize(petsclib, x); own = false)\n\tdone = done_[]\n\n\treturn n,ia,ja,done\nend \n\n\"\"\"\n\tMatSetUnfactored(petsclib::PetscLibType,mat::PetscMat) \nResets a factored matrix to be treated as unfactored.\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the factored matrix to be reset\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `PCFactorSetUseInPlace()`, `PCFactorGetUseInPlace()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetUnfactored\"))\n\"\"\"\nfunction MatSetUnfactored(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatSetUnfactored(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatSetUnfactored, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewmat::PetscMat = MatCreateSubMatrix(petsclib::PetscLibType,mat::PetscMat, isrow::IS, iscol::IS, cll::MatReuse) \nGets a single submatrix on the same number of processors\nas the original matrix.\n\nCollective\n\nInput Parameters:\n- `mat`   - the original matrix\n- `isrow` - parallel `IS` containing the rows this processor should obtain\n- `iscol` - parallel `IS` containing all columns you wish to keep. Each process should list the columns that will be in IT's \"diagonal part\" in the new matrix.\n- `cll`   - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `newmat` - the new submatrix, of the same type as the original matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSubMatrices()`, `MatCreateSubMatricesMPI()`, `MatCreateSubMatrixVirtual()`, `MatSubMatrixVirtualUpdate()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSubMatrix\"))\n\"\"\"\nfunction MatCreateSubMatrix(petsclib::PetscLibType, mat::PetscMat, isrow::IS, iscol::IS, cll::MatReuse) end\n\n@for_petsc function MatCreateSubMatrix(petsclib::$UnionPetscLib, mat::PetscMat, isrow::IS, iscol::IS, cll::MatReuse )\n\tnewmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSubMatrix, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, MatReuse, Ptr{CMat}),\n               mat, isrow, iscol, cll, newmat_,\n              )\n\n\tnewmat = PetscMat(newmat_[], petsclib)\n\n\treturn newmat\nend \n\n\"\"\"\n\tMatPropagateSymmetryOptions(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nPropagates symmetry options set on a matrix to another matrix\n\nNot Collective\n\nInput Parameters:\n- `A` - the matrix we wish to propagate options from\n- `B` - the matrix we wish to propagate options to\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetOption()`, `MatIsSymmetricKnown()`, `MatIsSPDKnown()`, `MatIsHermitianKnown()`, `MatIsStructurallySymmetricKnown()`\n\n# External Links\n$(_doc_external(\"Mat/MatPropagateSymmetryOptions\"))\n\"\"\"\nfunction MatPropagateSymmetryOptions(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatPropagateSymmetryOptions(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:MatPropagateSymmetryOptions, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               A, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatStashSetInitialSize(petsclib::PetscLibType,mat::PetscMat, size::PetscInt, bsize::PetscInt) \nsets the sizes of the matrix stash, that is\nused during the assembly process to store values that belong to\nother processors.\n\nNot Collective\n\nInput Parameters:\n- `mat`   - the matrix\n- `size`  - the initial size of the stash.\n- `bsize` - the initial size of the block-stash(if used).\n\nOptions Database Keys:\n- `-matstash_initial_size <size> or <size0,size1,...sizep-1>`            - set initial size\n- `-matstash_block_initial_size <bsize>  or <bsize0,bsize1,...bsizep-1>` - set initial block size\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatAssemblyBegin()`, `MatAssemblyEnd()`, `Mat`, `MatStashGetInfo()`\n\n# External Links\n$(_doc_external(\"Mat/MatStashSetInitialSize\"))\n\"\"\"\nfunction MatStashSetInitialSize(petsclib::PetscLibType, mat::PetscMat, size::PetscInt, bsize::PetscInt) end\n\n@for_petsc function MatStashSetInitialSize(petsclib::$UnionPetscLib, mat::PetscMat, size::$PetscInt, bsize::$PetscInt )\n\n    @chk ccall(\n               (:MatStashSetInitialSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt),\n               mat, size, bsize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatInterpolateAdd(petsclib::PetscLibType,A::PetscMat, x::PetscVec, y::PetscVec, w::PetscVec) \nw = y + A*x or A^T*x depending on the shape of\nthe matrix\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the matrix\n- `x` - the vector to be multiplied by the interpolation operator\n- `y` - the vector to be added to the result\n\nOutput Parameter:\n- `w` - the resulting vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatMultAdd()`, `MatMultTransposeAdd()`, `MatRestrict()`, `PCMG`\n\n# External Links\n$(_doc_external(\"Mat/MatInterpolateAdd\"))\n\"\"\"\nfunction MatInterpolateAdd(petsclib::PetscLibType, A::PetscMat, x::PetscVec, y::PetscVec, w::PetscVec) end\n\n@for_petsc function MatInterpolateAdd(petsclib::$UnionPetscLib, A::PetscMat, x::PetscVec, y::PetscVec, w::PetscVec )\n\n    @chk ccall(\n               (:MatInterpolateAdd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               A, x, y, w,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatInterpolate(petsclib::PetscLibType,A::PetscMat, x::PetscVec, y::PetscVec) \ny = A*x or A^T*x depending on the shape of\nthe matrix\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the matrix\n- `x` - the vector to be interpolated\n\nOutput Parameter:\n- `y` - the resulting vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatMultAdd()`, `MatMultTransposeAdd()`, `MatRestrict()`, `PCMG`\n\n# External Links\n$(_doc_external(\"Mat/MatInterpolate\"))\n\"\"\"\nfunction MatInterpolate(petsclib::PetscLibType, A::PetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function MatInterpolate(petsclib::$UnionPetscLib, A::PetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:MatInterpolate, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               A, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRestrict(petsclib::PetscLibType,A::PetscMat, x::PetscVec, y::PetscVec) \ny = A*x or A^T*x\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the matrix\n- `x` - the vector to be restricted\n\nOutput Parameter:\n- `y` - the resulting vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatMultAdd()`, `MatMultTransposeAdd()`, `MatInterpolate()`, `PCMG`\n\n# External Links\n$(_doc_external(\"Mat/MatRestrict\"))\n\"\"\"\nfunction MatRestrict(petsclib::PetscLibType, A::PetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function MatRestrict(petsclib::$UnionPetscLib, A::PetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:MatRestrict, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               A, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatInterpolateAdd(petsclib::PetscLibType,A::PetscMat, x::PetscMat, w::PetscMat, y::PetscMat) \nY = W + A*X or W + A^T*X depending on the shape of `A`\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the matrix\n- `x` - the input dense matrix to be multiplied\n- `w` - the input dense matrix to be added to the result\n\nOutput Parameter:\n- `y` - the output dense matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatInterpolateAdd()`, `MatMatInterpolate()`, `MatMatRestrict()`, `PCMG`\n\n# External Links\n$(_doc_external(\"Mat/MatMatInterpolateAdd\"))\n\"\"\"\nfunction MatMatInterpolateAdd(petsclib::PetscLibType, A::PetscMat, x::PetscMat, w::PetscMat, y::PetscMat) end\n\n@for_petsc function MatMatInterpolateAdd(petsclib::$UnionPetscLib, A::PetscMat, x::PetscMat, w::PetscMat, y::PetscMat )\n\ty_ = Ref(y.ptr)\n\n    @chk ccall(\n               (:MatMatInterpolateAdd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, Ptr{CMat}),\n               A, x, w, y_,\n              )\n\n\ty.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatInterpolate(petsclib::PetscLibType,A::PetscMat, x::PetscMat, y::PetscMat) \nY = A*X or A^T*X depending on the shape of `A`\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the matrix\n- `x` - the input dense matrix\n\nOutput Parameter:\n- `y` - the output dense matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatInterpolate()`, `MatRestrict()`, `MatMatRestrict()`, `PCMG`\n\n# External Links\n$(_doc_external(\"Mat/MatMatInterpolate\"))\n\"\"\"\nfunction MatMatInterpolate(petsclib::PetscLibType, A::PetscMat, x::PetscMat, y::PetscMat) end\n\n@for_petsc function MatMatInterpolate(petsclib::$UnionPetscLib, A::PetscMat, x::PetscMat, y::PetscMat )\n\ty_ = Ref(y.ptr)\n\n    @chk ccall(\n               (:MatMatInterpolate, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, Ptr{CMat}),\n               A, x, y_,\n              )\n\n\ty.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatRestrict(petsclib::PetscLibType,A::PetscMat, x::PetscMat, y::PetscMat) \nY = A*X or A^T*X depending on the shape of `A`\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A` - the matrix\n- `x` - the input dense matrix\n\nOutput Parameter:\n- `y` - the output dense matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatRestrict()`, `MatInterpolate()`, `MatMatInterpolate()`, `PCMG`\n\n# External Links\n$(_doc_external(\"Mat/MatMatRestrict\"))\n\"\"\"\nfunction MatMatRestrict(petsclib::PetscLibType, A::PetscMat, x::PetscMat, y::PetscMat) end\n\n@for_petsc function MatMatRestrict(petsclib::$UnionPetscLib, A::PetscMat, x::PetscMat, y::PetscMat )\n\ty_ = Ref(y.ptr)\n\n    @chk ccall(\n               (:MatMatRestrict, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, Ptr{CMat}),\n               A, x, y_,\n              )\n\n\ty.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetNullSpace(petsclib::PetscLibType,mat::PetscMat, nullsp::MatNullSpace) \nretrieves the null space of a matrix.\n\nLogically Collective\n\nInput Parameters:\n- `mat`    - the matrix\n- `nullsp` - the null space object\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatSetNullSpace()`, `MatNullSpace`\n\n# External Links\n$(_doc_external(\"Mat/MatGetNullSpace\"))\n\"\"\"\nfunction MatGetNullSpace(petsclib::PetscLibType, mat::PetscMat, nullsp::MatNullSpace) end\n\n@for_petsc function MatGetNullSpace(petsclib::$UnionPetscLib, mat::PetscMat, nullsp::MatNullSpace )\n\n    @chk ccall(\n               (:MatGetNullSpace, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatNullSpace}),\n               mat, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetNullSpaces(petsclib::PetscLibType,n::PetscInt, mat::Vector{PetscMat}, nullsp::Vector{MatNullSpace}) \ngets the null spaces, transpose null spaces, and near null spaces from an array of matrices\n\nLogically Collective\n\nInput Parameters:\n- `n`   - the number of matrices\n- `mat` - the array of matrices\n\nOutput Parameters:\n- `nullsp` - an array of null spaces, `NULL` for each matrix that does not have a null space, length 3 * `n`\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatGetNullSpace()`, `MatSetTransposeNullSpace()`, `MatGetTransposeNullSpace()`,\n`MatNullSpaceRemove()`, `MatRestoreNullSpaces()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetNullSpaces\"))\n\"\"\"\nfunction MatGetNullSpaces(petsclib::PetscLibType, n::PetscInt, mat::Vector{PetscMat}, nullsp::Vector{MatNullSpace}) end\n\n@for_petsc function MatGetNullSpaces(petsclib::$UnionPetscLib, n::$PetscInt, mat::Vector{PetscMat}, nullsp::Vector{MatNullSpace} )\n\tnullsp_ = Ref(pointer(nullsp))\n\n    @chk ccall(\n               (:MatGetNullSpaces, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{CMat}, Ptr{Ptr{MatNullSpace}}),\n               n, mat, nullsp_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRestoreNullSpaces(petsclib::PetscLibType,n::PetscInt, mat::Vector{PetscMat}, nullsp::Vector{MatNullSpace}) \nsets the null spaces, transpose null spaces, and near null spaces obtained with `MatGetNullSpaces()` for an array of matrices\n\nLogically Collective\n\nInput Parameters:\n- `n`      - the number of matrices\n- `mat`    - the array of matrices\n- `nullsp` - an array of null spaces\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatGetNullSpace()`, `MatSetTransposeNullSpace()`, `MatGetTransposeNullSpace()`,\n`MatNullSpaceRemove()`, `MatGetNullSpaces()`\n\n# External Links\n$(_doc_external(\"Mat/MatRestoreNullSpaces\"))\n\"\"\"\nfunction MatRestoreNullSpaces(petsclib::PetscLibType, n::PetscInt, mat::Vector{PetscMat}, nullsp::Vector{MatNullSpace}) end\n\n@for_petsc function MatRestoreNullSpaces(petsclib::$UnionPetscLib, n::$PetscInt, mat::Vector{PetscMat}, nullsp::Vector{MatNullSpace} )\n\tnullsp_ = Ref(pointer(nullsp))\n\n    @chk ccall(\n               (:MatRestoreNullSpaces, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{CMat}, Ptr{Ptr{MatNullSpace}}),\n               n, mat, nullsp_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetNullSpace(petsclib::PetscLibType,mat::PetscMat, nullsp::MatNullSpace) \nattaches a null space to a matrix.\n\nLogically Collective\n\nInput Parameters:\n- `mat`    - the matrix\n- `nullsp` - the null space object\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatGetNullSpace()`, `MatSetTransposeNullSpace()`, `MatGetTransposeNullSpace()`, `MatNullSpaceRemove()`,\n`KSPSetPCSide()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetNullSpace\"))\n\"\"\"\nfunction MatSetNullSpace(petsclib::PetscLibType, mat::PetscMat, nullsp::MatNullSpace) end\n\n@for_petsc function MatSetNullSpace(petsclib::$UnionPetscLib, mat::PetscMat, nullsp::MatNullSpace )\n\n    @chk ccall(\n               (:MatSetNullSpace, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatNullSpace),\n               mat, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetTransposeNullSpace(petsclib::PetscLibType,mat::PetscMat, nullsp::MatNullSpace) \nretrieves the null space of the transpose of a matrix.\n\nLogically Collective\n\nInput Parameters:\n- `mat`    - the matrix\n- `nullsp` - the null space object\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatSetTransposeNullSpace()`, `MatSetNullSpace()`, `MatGetNullSpace()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetTransposeNullSpace\"))\n\"\"\"\nfunction MatGetTransposeNullSpace(petsclib::PetscLibType, mat::PetscMat, nullsp::MatNullSpace) end\n\n@for_petsc function MatGetTransposeNullSpace(petsclib::$UnionPetscLib, mat::PetscMat, nullsp::MatNullSpace )\n\n    @chk ccall(\n               (:MatGetTransposeNullSpace, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatNullSpace}),\n               mat, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetTransposeNullSpace(petsclib::PetscLibType,mat::PetscMat, nullsp::MatNullSpace) \nattaches the null space of a transpose of a matrix to the matrix\n\nLogically Collective\n\nInput Parameters:\n- `mat`    - the matrix\n- `nullsp` - the null space object\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatGetNullSpace()`, `MatSetNullSpace()`, `MatGetTransposeNullSpace()`, `MatNullSpaceRemove()`, `KSPSetPCSide()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetTransposeNullSpace\"))\n\"\"\"\nfunction MatSetTransposeNullSpace(petsclib::PetscLibType, mat::PetscMat, nullsp::MatNullSpace) end\n\n@for_petsc function MatSetTransposeNullSpace(petsclib::$UnionPetscLib, mat::PetscMat, nullsp::MatNullSpace )\n\n    @chk ccall(\n               (:MatSetTransposeNullSpace, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatNullSpace),\n               mat, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetNearNullSpace(petsclib::PetscLibType,mat::PetscMat, nullsp::MatNullSpace) \nattaches a null space to a matrix, which is often the null space (rigid body modes) of the operator without boundary conditions\nThis null space will be used to provide near null space vectors to a multigrid preconditioner built from this matrix.\n\nLogically Collective\n\nInput Parameters:\n- `mat`    - the matrix\n- `nullsp` - the null space object\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNullSpace()`, `MatNullSpaceCreateRigidBody()`, `MatGetNearNullSpace()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetNearNullSpace\"))\n\"\"\"\nfunction MatSetNearNullSpace(petsclib::PetscLibType, mat::PetscMat, nullsp::MatNullSpace) end\n\n@for_petsc function MatSetNearNullSpace(petsclib::$UnionPetscLib, mat::PetscMat, nullsp::MatNullSpace )\n\n    @chk ccall(\n               (:MatSetNearNullSpace, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatNullSpace),\n               mat, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetNearNullSpace(petsclib::PetscLibType,mat::PetscMat, nullsp::MatNullSpace) \nGet null space attached with `MatSetNearNullSpace()`\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `nullsp` - the null space object, `NULL` if not set\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatSetNearNullSpace()`, `MatGetNullSpace()`, `MatNullSpaceCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetNearNullSpace\"))\n\"\"\"\nfunction MatGetNearNullSpace(petsclib::PetscLibType, mat::PetscMat, nullsp::MatNullSpace) end\n\n@for_petsc function MatGetNearNullSpace(petsclib::$UnionPetscLib, mat::PetscMat, nullsp::MatNullSpace )\n\n    @chk ccall(\n               (:MatGetNearNullSpace, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatNullSpace}),\n               mat, nullsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatICCFactor(petsclib::PetscLibType,mat::PetscMat, row::IS, info::MatFactorInfo) \nPerforms in\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `row`  - row/column permutation\n- `info` - information on desired factorization process\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatFactorInfo`, `MatGetFactor()`, `MatICCFactorSymbolic()`, `MatLUFactorNumeric()`, `MatCholeskyFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatICCFactor\"))\n\"\"\"\nfunction MatICCFactor(petsclib::PetscLibType, mat::PetscMat, row::IS, info::MatFactorInfo) end\n\n@for_petsc function MatICCFactor(petsclib::$UnionPetscLib, mat::PetscMat, row::IS, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatICCFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, Ptr{MatFactorInfo}),\n               mat, row, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDiagonalScaleLocal(petsclib::PetscLibType,mat::PetscMat, diag::PetscVec) \nScales columns of a matrix given the scaling values including the\nghosted ones.\n\nNot Collective\n\nInput Parameters:\n- `mat`  - the matrix\n- `diag` - the diagonal values, including ghost ones\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Mat/MatDiagonalScaleLocal\"))\n\"\"\"\nfunction MatDiagonalScaleLocal(petsclib::PetscLibType, mat::PetscMat, diag::PetscVec) end\n\n@for_petsc function MatDiagonalScaleLocal(petsclib::$UnionPetscLib, mat::PetscMat, diag::PetscVec )\n\n    @chk ccall(\n               (:MatDiagonalScaleLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec),\n               mat, diag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnneg::PetscInt,nzero::PetscInt,npos::PetscInt = MatGetInertia(petsclib::PetscLibType,mat::PetscMat) \nGets the inertia from a factored matrix\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `nneg`  - number of negative eigenvalues\n- `nzero` - number of zero eigenvalues\n- `npos`  - number of positive eigenvalues\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatCholeskyFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetInertia\"))\n\"\"\"\nfunction MatGetInertia(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatGetInertia(petsclib::$UnionPetscLib, mat::PetscMat )\n\tnneg_ = Ref{$PetscInt}()\n\tnzero_ = Ref{$PetscInt}()\n\tnpos_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatGetInertia, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mat, nneg_, nzero_, npos_,\n              )\n\n\tnneg = nneg_[]\n\tnzero = nzero_[]\n\tnpos = npos_[]\n\n\treturn nneg,nzero,npos\nend \n\n\"\"\"\n\tMatSolves(petsclib::PetscLibType,mat::PetscMat, b::Vecs, x::Vecs) \nSolves A x = b, given a factored matrix, for a collection of vectors\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `mat` - the factored matrix obtained with `MatGetFactor()`\n- `b`   - the right-hand-side vectors\n\nOutput Parameter:\n- `x` - the result vectors\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `Vecs`, `MatSolveAdd()`, `MatSolveTranspose()`, `MatSolveTransposeAdd()`, `MatSolve()`\n\n# External Links\n$(_doc_external(\"Mat/MatSolves\"))\n\"\"\"\nfunction MatSolves(petsclib::PetscLibType, mat::PetscMat, b::Vecs, x::Vecs) end\n\n@for_petsc function MatSolves(petsclib::$UnionPetscLib, mat::PetscMat, b::Vecs, x::Vecs )\n\n    @chk ccall(\n               (:MatSolves, $petsc_library),\n               PetscErrorCode,\n               (CMat, Vecs, Vecs),\n               mat, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatIsSymmetric(petsclib::PetscLibType,A::PetscMat, tol::PetscReal) \nTest whether a matrix is symmetric\n\nCollective\n\nInput Parameters:\n- `A`   - the matrix to test\n- `tol` - difference between value and its transpose less than this amount counts as equal (use 0.0 for exact transpose)\n\nOutput Parameter:\n- `flg` - the result\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, `MatSetOption()`, `MatIsSymmetricKnown()`,\n`MAT_SYMMETRIC`, `MAT_SYMMETRY_ETERNAL`\n\n# External Links\n$(_doc_external(\"Mat/MatIsSymmetric\"))\n\"\"\"\nfunction MatIsSymmetric(petsclib::PetscLibType, A::PetscMat, tol::PetscReal) end\n\n@for_petsc function MatIsSymmetric(petsclib::$UnionPetscLib, A::PetscMat, tol::$PetscReal )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsSymmetric, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal, Ptr{PetscBool}),\n               A, tol, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatIsHermitian(petsclib::PetscLibType,A::PetscMat, tol::PetscReal) \nTest whether a matrix is Hermitian\n\nCollective\n\nInput Parameters:\n- `A`   - the matrix to test\n- `tol` - difference between value and its transpose less than this amount counts as equal (use 0.0 for exact Hermitian)\n\nOutput Parameter:\n- `flg` - the result\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitianKnown()`, `MatIsStructurallySymmetric()`, `MatSetOption()`,\n`MatIsSymmetricKnown()`, `MatIsSymmetric()`, `MAT_HERMITIAN`, `MAT_SYMMETRY_ETERNAL`\n\n# External Links\n$(_doc_external(\"Mat/MatIsHermitian\"))\n\"\"\"\nfunction MatIsHermitian(petsclib::PetscLibType, A::PetscMat, tol::PetscReal) end\n\n@for_petsc function MatIsHermitian(petsclib::$UnionPetscLib, A::PetscMat, tol::$PetscScalar )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsHermitian, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscScalar, Ptr{PetscBool}),\n               A, tol, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tset::PetscBool,flg::PetscBool = MatIsSymmetricKnown(petsclib::PetscLibType,A::PetscMat) \nChecks if a matrix knows if it is symmetric or not and its symmetric state\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix to check\n\nOutput Parameters:\n- `set` - `PETSC_TRUE` if the matrix knows its symmetry state (this tells you if the next flag is valid)\n- `flg` - the result (only valid if set is `PETSC_TRUE`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MAT_SYMMETRY_ETERNAL`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, `MatSetOption()`, `MatIsSymmetric()`, `MatIsHermitianKnown()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsSymmetricKnown\"))\n\"\"\"\nfunction MatIsSymmetricKnown(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatIsSymmetricKnown(petsclib::$UnionPetscLib, A::PetscMat )\n\tset_ = Ref{PetscBool}()\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsSymmetricKnown, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}, Ptr{PetscBool}),\n               A, set_, flg_,\n              )\n\n\tset = set_[]\n\tflg = flg_[]\n\n\treturn set,flg\nend \n\n\"\"\"\n\tset::PetscBool,flg::PetscBool = MatIsSPDKnown(petsclib::PetscLibType,A::PetscMat) \nChecks if a matrix knows if it is symmetric positive definite or not and its symmetric positive definite state\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix to check\n\nOutput Parameters:\n- `set` - `PETSC_TRUE` if the matrix knows its symmetric positive definite state (this tells you if the next flag is valid)\n- `flg` - the result (only valid if set is `PETSC_TRUE`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MAT_SPD_ETERNAL`, `MAT_SPD`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, `MatSetOption()`, `MatIsSymmetric()`, `MatIsHermitianKnown()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsSPDKnown\"))\n\"\"\"\nfunction MatIsSPDKnown(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatIsSPDKnown(petsclib::$UnionPetscLib, A::PetscMat )\n\tset_ = Ref{PetscBool}()\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsSPDKnown, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}, Ptr{PetscBool}),\n               A, set_, flg_,\n              )\n\n\tset = set_[]\n\tflg = flg_[]\n\n\treturn set,flg\nend \n\n\"\"\"\n\tset::PetscBool,flg::PetscBool = MatIsHermitianKnown(petsclib::PetscLibType,A::PetscMat) \nChecks if a matrix knows if it is Hermitian or not and its Hermitian state\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix to check\n\nOutput Parameters:\n- `set` - `PETSC_TRUE` if the matrix knows its Hermitian state (this tells you if the next flag is valid)\n- `flg` - the result (only valid if set is `PETSC_TRUE`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MAT_SYMMETRY_ETERNAL`, `MAT_HERMITIAN`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, `MatSetOption()`, `MatIsSymmetric()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsHermitianKnown\"))\n\"\"\"\nfunction MatIsHermitianKnown(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatIsHermitianKnown(petsclib::$UnionPetscLib, A::PetscMat )\n\tset_ = Ref{PetscBool}()\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsHermitianKnown, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}, Ptr{PetscBool}),\n               A, set_, flg_,\n              )\n\n\tset = set_[]\n\tflg = flg_[]\n\n\treturn set,flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatIsStructurallySymmetric(petsclib::PetscLibType,A::PetscMat) \nTest whether a matrix is structurally symmetric\n\nCollective\n\nInput Parameter:\n- `A` - the matrix to test\n\nOutput Parameter:\n- `flg` - the result\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MAT_STRUCTURALLY_SYMMETRIC`, `MAT_STRUCTURAL_SYMMETRY_ETERNAL`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitian()`, `MatIsSymmetric()`, `MatSetOption()`, `MatIsStructurallySymmetricKnown()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsStructurallySymmetric\"))\n\"\"\"\nfunction MatIsStructurallySymmetric(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatIsStructurallySymmetric(petsclib::$UnionPetscLib, A::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsStructurallySymmetric, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               A, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tset::PetscBool,flg::PetscBool = MatIsStructurallySymmetricKnown(petsclib::PetscLibType,A::PetscMat) \nChecks if a matrix knows if it is structurally symmetric or not and its structurally symmetric state\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix to check\n\nOutput Parameters:\n- `set` - PETSC_TRUE if the matrix knows its structurally symmetric state (this tells you if the next flag is valid)\n- `flg` - the result (only valid if set is PETSC_TRUE)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MAT_STRUCTURALLY_SYMMETRIC`, `MatTranspose()`, `MatIsTranspose()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, `MatSetOption()`, `MatIsSymmetric()`, `MatIsHermitianKnown()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsStructurallySymmetricKnown\"))\n\"\"\"\nfunction MatIsStructurallySymmetricKnown(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatIsStructurallySymmetricKnown(petsclib::$UnionPetscLib, A::PetscMat )\n\tset_ = Ref{PetscBool}()\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsStructurallySymmetricKnown, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}, Ptr{PetscBool}),\n               A, set_, flg_,\n              )\n\n\tset = set_[]\n\tflg = flg_[]\n\n\treturn set,flg\nend \n\n\"\"\"\n\tnstash::PetscInt,reallocs::PetscInt,bnstash::PetscInt,breallocs::PetscInt = MatStashGetInfo(petsclib::PetscLibType,mat::PetscMat) \nGets how many values are currently in the matrix stash, i.e. need\nto be communicated to other processors during the `MatAssemblyBegin()`/`MatAssemblyEnd()` process\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `nstash`    - the size of the stash\n- `reallocs`  - the number of additional mallocs incurred.\n- `bnstash`   - the size of the block stash\n- `breallocs` - the number of additional mallocs incurred.in the block stash\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `MatAssemblyBegin()`, `MatAssemblyEnd()`, `Mat`, `MatStashSetInitialSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatStashGetInfo\"))\n\"\"\"\nfunction MatStashGetInfo(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatStashGetInfo(petsclib::$UnionPetscLib, mat::PetscMat )\n\tnstash_ = Ref{$PetscInt}()\n\treallocs_ = Ref{$PetscInt}()\n\tbnstash_ = Ref{$PetscInt}()\n\tbreallocs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatStashGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mat, nstash_, reallocs_, bnstash_, breallocs_,\n              )\n\n\tnstash = nstash_[]\n\treallocs = reallocs_[]\n\tbnstash = bnstash_[]\n\tbreallocs = breallocs_[]\n\n\treturn nstash,reallocs,bnstash,breallocs\nend \n\n\"\"\"\n\tright::PetscVec,left::PetscVec = MatCreateVecs(petsclib::PetscLibType,mat::PetscMat) \nGet vector(s) compatible with the matrix, i.e. with the same\nparallel layout, `PetscLayout` for rows and columns\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameters:\n- `right` - (optional) vector that the matrix can be multiplied against\n- `left`  - (optional) vector that the matrix vector product can be stored in\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `Vec`, `VecCreate()`, `VecDestroy()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateVecs\"))\n\"\"\"\nfunction MatCreateVecs(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatCreateVecs(petsclib::$UnionPetscLib, mat::PetscMat )\n\tright_ = Ref{CVec}()\n\tleft_ = Ref{CVec}()\n\n    @chk ccall(\n               (:MatCreateVecs, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CVec}, Ptr{CVec}),\n               mat, right_, left_,\n              )\n\n\tright = PetscVec(right_[], petsclib)\n\tleft = PetscVec(left_[], petsclib)\n\n\treturn right,left\nend \n\n\"\"\"\n\tMatFactorInfoInitialize(petsclib::PetscLibType,info::MatFactorInfo) \nInitializes a `MatFactorInfo` data structure\nwith default values.\n\nNot Collective\n\nInput Parameter:\n- `info` - the `MatFactorInfo` data structure\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorInfo`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorInfoInitialize\"))\n\"\"\"\nfunction MatFactorInfoInitialize(petsclib::PetscLibType, info::MatFactorInfo) end\n\n@for_petsc function MatFactorInfoInitialize(petsclib::$UnionPetscLib, info::MatFactorInfo )\n\n    @chk ccall(\n               (:MatFactorInfoInitialize, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MatFactorInfo},),\n               info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFactorSetSchurIS(petsclib::PetscLibType,mat::PetscMat, is::IS) \nSet indices corresponding to the Schur complement you wish to have computed\n\nCollective\n\nInput Parameters:\n- `mat` - the factored matrix\n- `is`  - the index set defining the Schur indices (0-based)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorGetSchurComplement()`, `MatFactorRestoreSchurComplement()`, `MatFactorCreateSchurComplement()`, `MatFactorSolveSchurComplement()`,\n`MatFactorSolveSchurComplementTranspose()`, `MATSOLVERMUMPS`, `MATSOLVERMKL_PARDISO`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorSetSchurIS\"))\n\"\"\"\nfunction MatFactorSetSchurIS(petsclib::PetscLibType, mat::PetscMat, is::IS) end\n\n@for_petsc function MatFactorSetSchurIS(petsclib::$UnionPetscLib, mat::PetscMat, is::IS )\n\n    @chk ccall(\n               (:MatFactorSetSchurIS, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS),\n               mat, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tS::PetscMat,status::MatFactorSchurStatus = MatFactorCreateSchurComplement(petsclib::PetscLibType,F::PetscMat) \nCreate a Schur complement matrix object using Schur data computed during the factorization step\n\nLogically Collective\n\nInput Parameters:\n- `F`      - the factored matrix obtained by calling `MatGetFactor()`\n- `S`      - location where to return the Schur complement, can be `NULL`\n- `status` - the status of the Schur complement matrix, can be `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorGetSchurComplement()`, `MatFactorSchurStatus`, `MATSOLVERMUMPS`, `MATSOLVERMKL_PARDISO`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorCreateSchurComplement\"))\n\"\"\"\nfunction MatFactorCreateSchurComplement(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatFactorCreateSchurComplement(petsclib::$UnionPetscLib, F::PetscMat )\n\tS_ = Ref{CMat}()\n\tstatus_ = Ref{MatFactorSchurStatus}()\n\n    @chk ccall(\n               (:MatFactorCreateSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{MatFactorSchurStatus}),\n               F, S_, status_,\n              )\n\n\tS = PetscMat(S_[], petsclib)\n\tstatus = status_[]\n\n\treturn S,status\nend \n\n\"\"\"\n\tMatFactorGetSchurComplement(petsclib::PetscLibType,F::PetscMat, S::PetscMat, status::MatFactorSchurStatus) \nGets access to a Schur complement matrix using the current Schur data within a factored matrix\n\nLogically Collective\n\nInput Parameters:\n- `F`      - the factored matrix obtained by calling `MatGetFactor()`\n- `S`      - location where to return the Schur complement, can be `NULL`\n- `status` - the status of the Schur complement matrix, can be `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorRestoreSchurComplement()`, `MatFactorCreateSchurComplement()`, `MatFactorSchurStatus`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorGetSchurComplement\"))\n\"\"\"\nfunction MatFactorGetSchurComplement(petsclib::PetscLibType, F::PetscMat, S::Union{Ptr,PetscMat}, status::Union{Ptr,MatFactorSchurStatus}) end\n\n@for_petsc function MatFactorGetSchurComplement(petsclib::$UnionPetscLib, F::PetscMat, S::Union{Ptr,PetscMat}, status::Union{Ptr,MatFactorSchurStatus})\n\tS_ = Ref(S.ptr)\n\n    @chk ccall(\n               (:MatFactorGetSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{MatFactorSchurStatus}),\n               F, S_, status,\n              )\n\n\tS.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFactorRestoreSchurComplement(petsclib::PetscLibType,F::PetscMat, S::PetscMat, status::MatFactorSchurStatus) \nRestore the Schur complement matrix object obtained from a call to `MatFactorGetSchurComplement()`\n\nLogically Collective\n\nInput Parameters:\n- `F`      - the factored matrix obtained by calling `MatGetFactor()`\n- `S`      - location where the Schur complement is stored\n- `status` - the status of the Schur complement matrix (see `MatFactorSchurStatus`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorCreateSchurComplement()`, `MatFactorSchurStatus`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorRestoreSchurComplement\"))\n\"\"\"\nfunction MatFactorRestoreSchurComplement(petsclib::PetscLibType, F::PetscMat, S::PetscMat, status::MatFactorSchurStatus) end\n\n@for_petsc function MatFactorRestoreSchurComplement(petsclib::$UnionPetscLib, F::PetscMat, S::PetscMat, status::MatFactorSchurStatus )\n\tS_ = Ref(S.ptr)\n\n    @chk ccall(\n               (:MatFactorRestoreSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, MatFactorSchurStatus),\n               F, S_, status,\n              )\n\n\tS.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFactorSolveSchurComplementTranspose(petsclib::PetscLibType,F::PetscMat, rhs::PetscVec, sol::PetscVec) \nSolve the transpose of the Schur complement system computed during the factorization step\n\nLogically Collective\n\nInput Parameters:\n- `F`   - the factored matrix obtained by calling `MatGetFactor()`\n- `rhs` - location where the right-hand side of the Schur complement system is stored\n- `sol` - location where the solution of the Schur complement system has to be returned\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorSolveSchurComplement()`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorSolveSchurComplementTranspose\"))\n\"\"\"\nfunction MatFactorSolveSchurComplementTranspose(petsclib::PetscLibType, F::PetscMat, rhs::PetscVec, sol::PetscVec) end\n\n@for_petsc function MatFactorSolveSchurComplementTranspose(petsclib::$UnionPetscLib, F::PetscMat, rhs::PetscVec, sol::PetscVec )\n\n    @chk ccall(\n               (:MatFactorSolveSchurComplementTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               F, rhs, sol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFactorSolveSchurComplement(petsclib::PetscLibType,F::PetscMat, rhs::PetscVec, sol::PetscVec) \nSolve the Schur complement system computed during the factorization step\n\nLogically Collective\n\nInput Parameters:\n- `F`   - the factored matrix obtained by calling `MatGetFactor()`\n- `rhs` - location where the right-hand side of the Schur complement system is stored\n- `sol` - location where the solution of the Schur complement system has to be returned\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorSolveSchurComplementTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorSolveSchurComplement\"))\n\"\"\"\nfunction MatFactorSolveSchurComplement(petsclib::PetscLibType, F::PetscMat, rhs::PetscVec, sol::PetscVec) end\n\n@for_petsc function MatFactorSolveSchurComplement(petsclib::$UnionPetscLib, F::PetscMat, rhs::PetscVec, sol::PetscVec )\n\n    @chk ccall(\n               (:MatFactorSolveSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               F, rhs, sol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFactorInvertSchurComplement(petsclib::PetscLibType,F::PetscMat) \nInvert the Schur complement matrix computed during the factorization step\n\nLogically Collective\n\nInput Parameter:\n- `F` - the factored matrix obtained by calling `MatGetFactor()`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorGetSchurComplement()`, `MatFactorCreateSchurComplement()`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorInvertSchurComplement\"))\n\"\"\"\nfunction MatFactorInvertSchurComplement(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatFactorInvertSchurComplement(petsclib::$UnionPetscLib, F::PetscMat )\n\n    @chk ccall(\n               (:MatFactorInvertSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFactorFactorizeSchurComplement(petsclib::PetscLibType,F::PetscMat) \nFactorize the Schur complement matrix computed during the factorization step\n\nLogically Collective\n\nInput Parameter:\n- `F` - the factored matrix obtained by calling `MatGetFactor()`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorInvertSchurComplement()`\n\n# External Links\n$(_doc_external(\"Mat/MatFactorFactorizeSchurComplement\"))\n\"\"\"\nfunction MatFactorFactorizeSchurComplement(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatFactorFactorizeSchurComplement(petsclib::$UnionPetscLib, F::PetscMat )\n\n    @chk ccall(\n               (:MatFactorFactorizeSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPtAP(petsclib::PetscLibType,A::PetscMat, P::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) \nCreates the matrix product C = P^T * A * P\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A`     - the matrix\n- `P`     - the projection matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `fill`  - expected fill as ratio of nnz(C)/(nnz(A) + nnz(P)), use `PETSC_DETERMINE` or `PETSC_CURRENT` if you do not have a good estimate\nif the result is a dense matrix this is irrelevant\n\nOutput Parameter:\n- `C` - the product matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatProductCreate()`, `MatMatMult()`, `MatRARt()`\n\n# External Links\n$(_doc_external(\"Mat/MatPtAP\"))\n\"\"\"\nfunction MatPtAP(petsclib::PetscLibType, A::PetscMat, P::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) end\n\n@for_petsc function MatPtAP(petsclib::$UnionPetscLib, A::PetscMat, P::PetscMat, scall::MatReuse, fill::$PetscReal, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatPtAP, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatReuse, $PetscReal, Ptr{CMat}),\n               A, P, scall, fill, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRARt(petsclib::PetscLibType,A::PetscMat, R::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) \nCreates the matrix product C = R * A * R^T\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A`     - the matrix\n- `R`     - the projection matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `fill`  - expected fill as ratio of nnz(C)/nnz(A), use `PETSC_DETERMINE` or `PETSC_CURRENT` if you do not have a good estimate\nif the result is a dense matrix this is irrelevant\n\nOutput Parameter:\n- `C` - the product matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatProductCreate()`, `MatMatMult()`, `MatPtAP()`\n\n# External Links\n$(_doc_external(\"Mat/MatRARt\"))\n\"\"\"\nfunction MatRARt(petsclib::PetscLibType, A::PetscMat, R::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) end\n\n@for_petsc function MatRARt(petsclib::$UnionPetscLib, A::PetscMat, R::PetscMat, scall::MatReuse, fill::$PetscReal, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatRARt, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatReuse, $PetscReal, Ptr{CMat}),\n               A, R, scall, fill, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatMult(petsclib::PetscLibType,A::PetscMat, B::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) \nPerforms matrix\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A`     - the left matrix\n- `B`     - the right matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `fill`  - expected fill as ratio of nnz(C)/(nnz(A) + nnz(B)), use `PETSC_DETERMINE` or `PETSC_CURRENT` if you do not have a good estimate\nif the result is a dense matrix this is irrelevant\n\nOutput Parameter:\n- `C` - the product matrix\n\n-seealso: [](ch_matrices), `Mat`, `MatProductType`, `MATPRODUCT_AB`, `MatTransposeMatMult()`, `MatMatTransposeMult()`, `MatPtAP()`, `MatProductCreate()`, `MatProductSymbolic()`, `MatProductReplaceMats()`, `MatProductNumeric()`\n\n# External Links\n$(_doc_external(\"Mat/MatMatMult\"))\n\"\"\"\nfunction MatMatMult(petsclib::PetscLibType, A::PetscMat, B::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) end\n\n@for_petsc function MatMatMult(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, scall::MatReuse, fill::$PetscReal, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatMatMult, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatReuse, $PetscReal, Ptr{CMat}),\n               A, B, scall, fill, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatTransposeMult(petsclib::PetscLibType,A::PetscMat, B::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) \nPerforms matrix\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A`     - the left matrix\n- `B`     - the right matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `fill`  - expected fill as ratio of nnz(C)/(nnz(A) + nnz(B)), use `PETSC_DETERMINE` or `PETSC_CURRENT` if not known\n\nOutput Parameter:\n- `C` - the product matrix\n\nOptions Database Key:\n- `-matmattransmult_mpidense_mpidense_via {allgatherv,cyclic}` - Choose between algorithms for `MATMPIDENSE` matrices: the\nfirst redundantly copies the transposed `B` matrix on each process and requires O(log P) communication complexity;\nthe second never stores more than one portion of the `B` matrix at a time but requires O(P) communication complexity.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatProductCreate()`, `MATPRODUCT_ABt`, `MatMatMult()`, `MatTransposeMatMult()` `MatPtAP()`, `MatProductAlgorithm`, `MatProductType`\n\n# External Links\n$(_doc_external(\"Mat/MatMatTransposeMult\"))\n\"\"\"\nfunction MatMatTransposeMult(petsclib::PetscLibType, A::PetscMat, B::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) end\n\n@for_petsc function MatMatTransposeMult(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, scall::MatReuse, fill::$PetscReal, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatMatTransposeMult, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatReuse, $PetscReal, Ptr{CMat}),\n               A, B, scall, fill, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatTransposeMatMult(petsclib::PetscLibType,A::PetscMat, B::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) \nPerforms matrix\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A`     - the left matrix\n- `B`     - the right matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `fill`  - expected fill as ratio of nnz(C)/(nnz(A) + nnz(B)), use `PETSC_DETERMINE` or `PETSC_CURRENT` if not known\n\nOutput Parameter:\n- `C` - the product matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatProductCreate()`, `MATPRODUCT_AtB`, `MatMatMult()`, `MatMatTransposeMult()`, `MatPtAP()`\n\n# External Links\n$(_doc_external(\"Mat/MatTransposeMatMult\"))\n\"\"\"\nfunction MatTransposeMatMult(petsclib::PetscLibType, A::PetscMat, B::PetscMat, scall::MatReuse, fill::PetscReal, C::PetscMat) end\n\n@for_petsc function MatTransposeMatMult(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, scall::MatReuse, fill::$PetscReal, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatTransposeMatMult, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatReuse, $PetscReal, Ptr{CMat}),\n               A, B, scall, fill, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMatMatMult(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, scall::MatReuse, fill::PetscReal, D::PetscMat) \nPerforms matrix\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `A`     - the left matrix\n- `B`     - the middle matrix\n- `C`     - the right matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `fill`  - expected fill as ratio of nnz(D)/(nnz(A) + nnz(B)+nnz(C)), use `PETSC_DETERMINE` or `PETSC_CURRENT` if you do not have a good estimate\nif the result is a dense matrix this is irrelevant\n\nOutput Parameter:\n- `D` - the product matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatProductCreate()`, `MATPRODUCT_ABC`, `MatMatMult`, `MatPtAP()`, `MatMatTransposeMult()`, `MatTransposeMatMult()`\n\n# External Links\n$(_doc_external(\"Mat/MatMatMatMult\"))\n\"\"\"\nfunction MatMatMatMult(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::PetscMat, scall::MatReuse, fill::PetscReal, D::PetscMat) end\n\n@for_petsc function MatMatMatMult(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::PetscMat, scall::MatReuse, fill::$PetscReal, D::PetscMat )\n\tD_ = Ref(D.ptr)\n\n    @chk ccall(\n               (:MatMatMatMult, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, MatReuse, $PetscReal, Ptr{CMat}),\n               A, B, C, scall, fill, D_,\n              )\n\n\tD.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tmatredundant::PetscMat = MatCreateRedundantMatrix(petsclib::PetscLibType,mat::PetscMat, nsubcomm::PetscInt, subcomm::MPI_Comm, reuse::MatReuse) \nCreate redundant matrices and put them into processors of subcommunicators.\n\nCollective\n\nInput Parameters:\n- `mat`      - the matrix\n- `nsubcomm` - the number of subcommunicators (= number of redundant parallel or sequential matrices)\n- `subcomm`  - MPI communicator split from the communicator where mat resides in (or `MPI_COMM_NULL` if nsubcomm is used)\n- `reuse`    - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `matredundant` - redundant matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroy()`, `PetscSubcommCreate()`, `PetscSubcomm`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateRedundantMatrix\"))\n\"\"\"\nfunction MatCreateRedundantMatrix(petsclib::PetscLibType, mat::PetscMat, nsubcomm::PetscInt, subcomm::MPI_Comm, reuse::MatReuse) end\n\n@for_petsc function MatCreateRedundantMatrix(petsclib::$UnionPetscLib, mat::PetscMat, nsubcomm::$PetscInt, subcomm::MPI_Comm, reuse::MatReuse )\n\tmatredundant_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateRedundantMatrix, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, MPI_Comm, MatReuse, Ptr{CMat}),\n               mat, nsubcomm, subcomm, reuse, matredundant_,\n              )\n\n\tmatredundant = PetscMat(matredundant_[], petsclib)\n\n\treturn matredundant\nend \n\n\"\"\"\n\tMatGetMultiProcBlock(petsclib::PetscLibType,mat::PetscMat, subComm::MPI_Comm, scall::MatReuse, subMat::PetscMat) \nCreate multiple 'parallel submatrices' from\na given `Mat`. Each submatrix can span multiple procs.\n\nCollective\n\nInput Parameters:\n- `mat`     - the matrix\n- `subComm` - the sub communicator obtained as if by `MPI_Comm_split(PetscObjectComm((PetscObject)mat))`\n- `scall`   - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `subMat` - parallel sub-matrices each spanning a given `subcomm`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateRedundantMatrix()`, `MatCreateSubMatrices()`, `PCBJACOBI`\n\n# External Links\n$(_doc_external(\"Mat/MatGetMultiProcBlock\"))\n\"\"\"\nfunction MatGetMultiProcBlock(petsclib::PetscLibType, mat::PetscMat, subComm::MPI_Comm, scall::MatReuse, subMat::PetscMat) end\n\n@for_petsc function MatGetMultiProcBlock(petsclib::$UnionPetscLib, mat::PetscMat, subComm::MPI_Comm, scall::MatReuse, subMat::PetscMat )\n\tsubMat_ = Ref(subMat.ptr)\n\n    @chk ccall(\n               (:MatGetMultiProcBlock, $petsc_library),\n               PetscErrorCode,\n               (CMat, MPI_Comm, MatReuse, Ptr{CMat}),\n               mat, subComm, scall, subMat_,\n              )\n\n\tsubMat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetLocalSubMatrix(petsclib::PetscLibType,mat::PetscMat, isrow::IS, iscol::IS, submat::PetscMat) \nGets a reference to a submatrix specified in local numbering\n\nNot Collective\n\nInput Parameters:\n- `mat`   - matrix to extract local submatrix from\n- `isrow` - local row indices for submatrix\n- `iscol` - local column indices for submatrix\n\nOutput Parameter:\n- `submat` - the submatrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatRestoreLocalSubMatrix()`, `MatCreateLocalRef()`, `MatSetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetLocalSubMatrix\"))\n\"\"\"\nfunction MatGetLocalSubMatrix(petsclib::PetscLibType, mat::PetscMat, isrow::IS, iscol::IS, submat::PetscMat) end\n\n@for_petsc function MatGetLocalSubMatrix(petsclib::$UnionPetscLib, mat::PetscMat, isrow::IS, iscol::IS, submat::PetscMat )\n\tsubmat_ = Ref(submat.ptr)\n\n    @chk ccall(\n               (:MatGetLocalSubMatrix, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{CMat}),\n               mat, isrow, iscol, submat_,\n              )\n\n\tsubmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRestoreLocalSubMatrix(petsclib::PetscLibType,mat::PetscMat, isrow::IS, iscol::IS, submat::PetscMat) \nRestores a reference to a submatrix specified in local numbering obtained with `MatGetLocalSubMatrix()`\n\nNot Collective\n\nInput Parameters:\n- `mat`    - matrix to extract local submatrix from\n- `isrow`  - local row indices for submatrix\n- `iscol`  - local column indices for submatrix\n- `submat` - the submatrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetLocalSubMatrix()`\n\n# External Links\n$(_doc_external(\"Mat/MatRestoreLocalSubMatrix\"))\n\"\"\"\nfunction MatRestoreLocalSubMatrix(petsclib::PetscLibType, mat::PetscMat, isrow::IS, iscol::IS, submat::PetscMat) end\n\n@for_petsc function MatRestoreLocalSubMatrix(petsclib::$UnionPetscLib, mat::PetscMat, isrow::IS, iscol::IS, submat::PetscMat )\n\tsubmat_ = Ref(submat.ptr)\n\n    @chk ccall(\n               (:MatRestoreLocalSubMatrix, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{CMat}),\n               mat, isrow, iscol, submat_,\n              )\n\n\tsubmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFindZeroDiagonals(petsclib::PetscLibType,mat::PetscMat, is::IS) \nFinds all the rows of a matrix that have zero or no diagonal entry in the matrix\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `is` - if any rows have zero diagonals this contains the list of them\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatMultTranspose()`, `MatMultAdd()`, `MatMultTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatFindZeroDiagonals\"))\n\"\"\"\nfunction MatFindZeroDiagonals(petsclib::PetscLibType, mat::PetscMat, is::IS) end\n\n@for_petsc function MatFindZeroDiagonals(petsclib::$UnionPetscLib, mat::PetscMat, is::IS )\n\n    @chk ccall(\n               (:MatFindZeroDiagonals, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}),\n               mat, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFindOffBlockDiagonalEntries(petsclib::PetscLibType,mat::PetscMat, is::IS) \nFinds all the rows of a matrix that have entries outside of the main diagonal block (defined by the matrix block size)\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `is` - contains the list of rows with off block diagonal entries\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatMultTranspose()`, `MatMultAdd()`, `MatMultTransposeAdd()`\n\n# External Links\n$(_doc_external(\"Mat/MatFindOffBlockDiagonalEntries\"))\n\"\"\"\nfunction MatFindOffBlockDiagonalEntries(petsclib::PetscLibType, mat::PetscMat, is::IS) end\n\n@for_petsc function MatFindOffBlockDiagonalEntries(petsclib::$UnionPetscLib, mat::PetscMat, is::IS )\n\n    @chk ccall(\n               (:MatFindOffBlockDiagonalEntries, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}),\n               mat, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalues::Vector{PetscScalar} = MatInvertBlockDiagonal(petsclib::PetscLibType,mat::PetscMat) \nInverts the block diagonal entries.\n\nCollective; No Fortran Support\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `values` - the block inverses in column major order (FORTRAN-like)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatInvertVariableBlockEnvelope()`, `MatInvertBlockDiagonalMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatInvertBlockDiagonal\"))\n\"\"\"\nfunction MatInvertBlockDiagonal(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatInvertBlockDiagonal(petsclib::$UnionPetscLib, mat::PetscMat )\n\tvalues_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatInvertBlockDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               mat, values_,\n              )\n\n\tvalues = unsafe_wrap(Array, values_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn values\nend \n\n\"\"\"\n\tMatInvertVariableBlockDiagonal(petsclib::PetscLibType,mat::PetscMat, nblocks::PetscInt, bsizes::Vector{PetscInt}, values::Vector{PetscScalar}) \nInverts the point block diagonal entries.\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `mat`     - the matrix\n- `nblocks` - the number of blocks on the process, set with `MatSetVariableBlockSizes()`\n- `bsizes`  - the size of each block on the process, set with `MatSetVariableBlockSizes()`\n\nOutput Parameter:\n- `values` - the block inverses in column major order (FORTRAN-like)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatInvertBlockDiagonal()`, `MatSetVariableBlockSizes()`, `MatInvertVariableBlockEnvelope()`\n\n# External Links\n$(_doc_external(\"Mat/MatInvertVariableBlockDiagonal\"))\n\"\"\"\nfunction MatInvertVariableBlockDiagonal(petsclib::PetscLibType, mat::PetscMat, nblocks::PetscInt, bsizes::Vector{PetscInt}, values::Vector{PetscScalar}) end\n\n@for_petsc function MatInvertVariableBlockDiagonal(petsclib::$UnionPetscLib, mat::PetscMat, nblocks::$PetscInt, bsizes::Vector{$PetscInt}, values::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatInvertVariableBlockDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               mat, nblocks, bsizes, values,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatInvertBlockDiagonalMat(petsclib::PetscLibType,A::PetscMat, C::PetscMat) \nset the values of matrix C to be the inverted block diagonal of matrix A\n\nCollective\n\nInput Parameters:\n- `A` - the matrix\n- `C` - matrix with inverted block diagonal of `A`.  This matrix should be created and may have its type set.\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatInvertBlockDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatInvertBlockDiagonalMat\"))\n\"\"\"\nfunction MatInvertBlockDiagonalMat(petsclib::PetscLibType, A::PetscMat, C::PetscMat) end\n\n@for_petsc function MatInvertBlockDiagonalMat(petsclib::$UnionPetscLib, A::PetscMat, C::PetscMat )\n\n    @chk ccall(\n               (:MatInvertBlockDiagonalMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               A, C,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatTransColoringApplySpToDen(petsclib::PetscLibType,coloring::MatTransposeColoring, B::PetscMat, Btdense::PetscMat) \nGiven a symbolic matrix product C = A*B^T for which\na `MatTransposeColoring` context has been created, computes a dense B^T by applying\n`MatTransposeColoring` to sparse `B`.\n\nCollective\n\nInput Parameters:\n- `coloring` - coloring context created with `MatTransposeColoringCreate()`\n- `B`        - sparse matrix\n\nOutput Parameter:\n- `Btdense` - dense matrix B^T\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatTransposeColoringCreate()`, `MatTransposeColoringDestroy()`, `MatTransColoringApplyDenToSp()`\n\n# External Links\n$(_doc_external(\"Mat/MatTransColoringApplySpToDen\"))\n\"\"\"\nfunction MatTransColoringApplySpToDen(petsclib::PetscLibType, coloring::MatTransposeColoring, B::PetscMat, Btdense::PetscMat) end\n\n@for_petsc function MatTransColoringApplySpToDen(petsclib::$UnionPetscLib, coloring::MatTransposeColoring, B::PetscMat, Btdense::PetscMat )\n\n    @chk ccall(\n               (:MatTransColoringApplySpToDen, $petsc_library),\n               PetscErrorCode,\n               (MatTransposeColoring, CMat, CMat),\n               coloring, B, Btdense,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatTransColoringApplyDenToSp(petsclib::PetscLibType,matcoloring::MatTransposeColoring, Cden::PetscMat, Csp::PetscMat) \nGiven a symbolic matrix product C_{sp} = A*B^T for which\na `MatTransposeColoring` context has been created and a dense matrix C_{den} = A*B^T_{dense}\nin which `B^T_{dens}` is obtained from `MatTransColoringApplySpToDen()`, recover sparse matrix\nC_{sp} from C_{den}.\n\nCollective\n\nInput Parameters:\n- `matcoloring` - coloring context created with `MatTransposeColoringCreate()`\n- `Cden`        - matrix product of a sparse matrix and a dense matrix Btdense\n\nOutput Parameter:\n- `Csp` - sparse matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatTransposeColoringCreate()`, `MatTransposeColoringDestroy()`, `MatTransColoringApplySpToDen()`\n\n# External Links\n$(_doc_external(\"Mat/MatTransColoringApplyDenToSp\"))\n\"\"\"\nfunction MatTransColoringApplyDenToSp(petsclib::PetscLibType, matcoloring::MatTransposeColoring, Cden::PetscMat, Csp::PetscMat) end\n\n@for_petsc function MatTransColoringApplyDenToSp(petsclib::$UnionPetscLib, matcoloring::MatTransposeColoring, Cden::PetscMat, Csp::PetscMat )\n\n    @chk ccall(\n               (:MatTransColoringApplyDenToSp, $petsc_library),\n               PetscErrorCode,\n               (MatTransposeColoring, CMat, CMat),\n               matcoloring, Cden, Csp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetNonzeroState(petsclib::PetscLibType,mat::PetscMat, state::PetscObjectState) \nReturns a 64\nmatrix has had new nonzero locations added to (or removed from) the matrix since the previous call, the value will be larger.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `state` - the current state\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `PetscObjectStateGet()`, `PetscObjectGetId()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetNonzeroState\"))\n\"\"\"\nfunction MatGetNonzeroState(petsclib::PetscLibType, mat::PetscMat, state::PetscObjectState) end\n\n@for_petsc function MatGetNonzeroState(petsclib::$UnionPetscLib, mat::PetscMat, state::PetscObjectState )\n\n    @chk ccall(\n               (:MatGetNonzeroState, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscObjectState}),\n               mat, state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmpimat::PetscMat = MatCreateMPIMatConcatenateSeqMat(petsclib::PetscLibType,comm::MPI_Comm, seqmat::PetscMat, n::PetscInt, reuse::MatReuse) \nCreates a single large PETSc matrix by concatenating sequential\nmatrices from each processor\n\nCollective\n\nInput Parameters:\n- `comm`   - the communicators the parallel matrix will live on\n- `seqmat` - the input sequential matrices\n- `n`      - number of local columns (or `PETSC_DECIDE`)\n- `reuse`  - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `mpimat` - the parallel matrix generated\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIMatConcatenateSeqMat\"))\n\"\"\"\nfunction MatCreateMPIMatConcatenateSeqMat(petsclib::PetscLibType, comm::MPI_Comm, seqmat::PetscMat, n::PetscInt, reuse::MatReuse) end\n\n@for_petsc function MatCreateMPIMatConcatenateSeqMat(petsclib::$UnionPetscLib, comm::MPI_Comm, seqmat::PetscMat, n::$PetscInt, reuse::MatReuse )\n\tmpimat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIMatConcatenateSeqMat, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, CMat, $PetscInt, MatReuse, Ptr{CMat}),\n               comm, seqmat, n, reuse, mpimat_,\n              )\n\n\tmpimat = PetscMat(mpimat_[], petsclib)\n\n\treturn mpimat\nend \n\n\"\"\"\n\tn::PetscInt,iss::Vector{IS} = MatSubdomainsCreateCoalesce(petsclib::PetscLibType,A::PetscMat, N::PetscInt) \nCreates index subdomains by coalescing adjacent MPI processes' ownership ranges.\n\nCollective\n\nInput Parameters:\n- `A` - the matrix to create subdomains from\n- `N` - requested number of subdomains\n\nOutput Parameters:\n- `n`   - number of subdomains resulting on this MPI process\n- `iss` - `IS` list with indices of subdomains on this MPI process\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `IS`\n\n# External Links\n$(_doc_external(\"Mat/MatSubdomainsCreateCoalesce\"))\n\"\"\"\nfunction MatSubdomainsCreateCoalesce(petsclib::PetscLibType, A::PetscMat, N::PetscInt) end\n\n@for_petsc function MatSubdomainsCreateCoalesce(petsclib::$UnionPetscLib, A::PetscMat, N::$PetscInt )\n\tn_ = Ref{$PetscInt}()\n\tiss_ = Ref{Ptr{CIS}}()\n\n    @chk ccall(\n               (:MatSubdomainsCreateCoalesce, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{CIS}}),\n               A, N, n_, iss_,\n              )\n\n\tn = n_[]\n\tiss = unsafe_wrap(Array, iss_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,iss\nend \n\n\"\"\"\n\tMatGalerkin(petsclib::PetscLibType,restrct::PetscMat, dA::PetscMat, interpolate::PetscMat, reuse::MatReuse, fill::PetscReal, A::PetscMat) \nConstructs the coarse grid problem matrix via Galerkin projection.\n\nIf the interpolation and restriction operators are the same, uses `MatPtAP()`.\nIf they are not the same, uses `MatMatMatMult()`.\n\nOnce the coarse grid problem is constructed, correct for interpolation operators\nthat are not of full rank, which can legitimately happen in the case of non-nested\ngeometric multigrid.\n\nInput Parameters:\n- `restrct`     - restriction operator\n- `dA`          - fine grid matrix\n- `interpolate` - interpolation operator\n- `reuse`       - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `fill`        - expected fill, use `PETSC_DETERMINE` or `PETSC_DETERMINE` if you do not have a good estimate\n\nOutput Parameter:\n- `A` - the Galerkin coarse matrix\n\nOptions Database Key:\n- `-pc_mg_galerkin <both,pmat,mat,none>` - for what matrices the Galerkin process should be used\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatPtAP()`, `MatMatMatMult()`\n\n# External Links\n$(_doc_external(\"Mat/MatGalerkin\"))\n\"\"\"\nfunction MatGalerkin(petsclib::PetscLibType, restrct::PetscMat, dA::PetscMat, interpolate::PetscMat, reuse::MatReuse, fill::PetscReal, A::PetscMat) end\n\n@for_petsc function MatGalerkin(petsclib::$UnionPetscLib, restrct::PetscMat, dA::PetscMat, interpolate::PetscMat, reuse::MatReuse, fill::$PetscReal, A::PetscMat )\n\tA_ = Ref(A.ptr)\n\n    @chk ccall(\n               (:MatGalerkin, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, MatReuse, $PetscReal, Ptr{CMat}),\n               restrct, dA, interpolate, reuse, fill, A_,\n              )\n\n\tA.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\thas::PetscBool = MatHasOperation(petsclib::PetscLibType,mat::PetscMat, op::MatOperation) \nDetermines whether the given matrix supports the particular operation.\n\nNot Collective\n\nInput Parameters:\n- `mat` - the matrix\n- `op`  - the operation, for example, `MATOP_GET_DIAGONAL`\n\nOutput Parameter:\n- `has` - either `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateShell()`, `MatGetOperation()`, `MatSetOperation()`\n\n# External Links\n$(_doc_external(\"Mat/MatHasOperation\"))\n\"\"\"\nfunction MatHasOperation(petsclib::PetscLibType, mat::PetscMat, op::MatOperation) end\n\n@for_petsc function MatHasOperation(petsclib::$UnionPetscLib, mat::PetscMat, op::MatOperation )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatHasOperation, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatOperation, Ptr{PetscBool}),\n               mat, op, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\tcong::PetscBool = MatHasCongruentLayouts(petsclib::PetscLibType,mat::PetscMat) \nDetermines whether the rows and columns layouts of the matrix are congruent\n\nCollective\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `cong` - either `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatSetSizes()`, `PetscLayout`\n\n# External Links\n$(_doc_external(\"Mat/MatHasCongruentLayouts\"))\n\"\"\"\nfunction MatHasCongruentLayouts(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatHasCongruentLayouts(petsclib::$UnionPetscLib, mat::PetscMat )\n\tcong_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatHasCongruentLayouts, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               mat, cong_,\n              )\n\n\tcong = cong_[]\n\n\treturn cong\nend \n\n\"\"\"\n\tMatSetInf(petsclib::PetscLibType,A::PetscMat) \n\n# External Links\n$(_doc_external(\"Mat/MatSetInf\"))\n\"\"\"\nfunction MatSetInf(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSetInf(petsclib::$UnionPetscLib, A::PetscMat )\n\n    @chk ccall(\n               (:MatSetInf, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgraph::PetscMat = MatCreateGraph(petsclib::PetscLibType,A::PetscMat, sym::PetscBool, scale::PetscBool, filter::PetscReal, num_idx::PetscInt, index::Vector{PetscInt}) \ncreate a scalar matrix (that is a matrix with one vertex for each block vertex in the original matrix), for use in graph algorithms\nand possibly removes small values from the graph structure.\n\nCollective\n\nInput Parameters:\n- `A`       - the matrix\n- `sym`     - `PETSC_TRUE` indicates that the graph should be symmetrized\n- `scale`   - `PETSC_TRUE` indicates that the graph edge weights should be symmetrically scaled with the diagonal entry\n- `filter`  - filter value - < 0: does nothing; == 0: removes only 0.0 entries; otherwise: removes entries with abs(entries) <= value\n- `num_idx` - size of 'index' array\n- `index`   - array of block indices to use for graph strength of connection weight\n\nOutput Parameter:\n- `graph` - the resulting graph\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `PCGAMG`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateGraph\"))\n\"\"\"\nfunction MatCreateGraph(petsclib::PetscLibType, A::PetscMat, sym::PetscBool, scale::PetscBool, filter::PetscReal, num_idx::PetscInt, index::Vector{PetscInt}) end\n\n@for_petsc function MatCreateGraph(petsclib::$UnionPetscLib, A::PetscMat, sym::PetscBool, scale::PetscBool, filter::$PetscReal, num_idx::$PetscInt, index::Vector{$PetscInt} )\n\tgraph_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateGraph, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool, PetscBool, $PetscReal, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               A, sym, scale, filter, num_idx, index, graph_,\n              )\n\n\tgraph = PetscMat(graph_[], petsclib)\n\n\treturn graph\nend \n\n\"\"\"\n\tMatEliminateZeros(petsclib::PetscLibType,A::PetscMat, keep::PetscBool) \neliminate the nondiagonal zero entries in place from the nonzero structure of a sparse `Mat` in place,\nmeaning the same memory is used for the matrix, and no new memory is allocated.\n\nCollective\n\nInput Parameters:\n- `A`    - the matrix\n- `keep` - if for a given row of `A`, the diagonal coefficient is zero, indicates whether it should be left in the structure or eliminated as well\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateGraph()`, `MatFilter()`\n\n# External Links\n$(_doc_external(\"Mat/MatEliminateZeros\"))\n\"\"\"\nfunction MatEliminateZeros(petsclib::PetscLibType, A::PetscMat, keep::PetscBool) end\n\n@for_petsc function MatEliminateZeros(petsclib::$UnionPetscLib, A::PetscMat, keep::PetscBool )\n\n    @chk ccall(\n               (:MatEliminateZeros, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, keep,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tm::PetscMemType = MatGetCurrentMemType(petsclib::PetscLibType,A::PetscMat) \nGet the memory location of the matrix\n\nNot Collective, but the result will be the same on all MPI processes\n\nInput Parameter:\n- `A` - the matrix whose memory type we are checking\n\nOutput Parameter:\n- `m` - the memory type\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatBoundToCPU()`, `PetscMemType`\n\n# External Links\n$(_doc_external(\"Mat/MatGetCurrentMemType\"))\n\"\"\"\nfunction MatGetCurrentMemType(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatGetCurrentMemType(petsclib::$UnionPetscLib, A::PetscMat )\n\tm_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:MatGetCurrentMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscMemType}),\n               A, m_,\n              )\n\n\tm = unsafe_string(m_[])\n\n\treturn m\nend \n\n\"\"\"\n\tMatScaLAPACKSetBlockSizes(petsclib::PetscLibType,A::PetscMat, mb::PetscInt, nb::PetscInt) \nSets the block sizes to be used for the distribution of\nthe `MATSCALAPACK` matrix\n\nLogically Collective\n\nInput Parameters:\n- `A`  - a `MATSCALAPACK` matrix\n- `mb` - the row block size\n- `nb` - the column block size\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSCALAPACK`, `MatCreateScaLAPACK()`, `MatScaLAPACKGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatScaLAPACKSetBlockSizes\"))\n\"\"\"\nfunction MatScaLAPACKSetBlockSizes(petsclib::PetscLibType, A::PetscMat, mb::PetscInt, nb::PetscInt) end\n\n@for_petsc function MatScaLAPACKSetBlockSizes(petsclib::$UnionPetscLib, A::PetscMat, mb::$PetscInt, nb::$PetscInt )\n\n    @chk ccall(\n               (:MatScaLAPACKSetBlockSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt),\n               A, mb, nb,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmb::PetscInt,nb::PetscInt = MatScaLAPACKGetBlockSizes(petsclib::PetscLibType,A::PetscMat) \nGets the block sizes used in the distribution of\nthe `MATSCALAPACK` matrix\n\nNot Collective\n\nInput Parameter:\n- `A` - a `MATSCALAPACK` matrix\n\nOutput Parameters:\n- `mb` - the row block size\n- `nb` - the column block size\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSCALAPACK`, `MatCreateScaLAPACK()`, `MatScaLAPACKSetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatScaLAPACKGetBlockSizes\"))\n\"\"\"\nfunction MatScaLAPACKGetBlockSizes(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatScaLAPACKGetBlockSizes(petsclib::$UnionPetscLib, A::PetscMat )\n\tmb_ = Ref{$PetscInt}()\n\tnb_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatScaLAPACKGetBlockSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               A, mb_, nb_,\n              )\n\n\tmb = mb_[]\n\tnb = nb_[]\n\n\treturn mb,nb\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateScaLAPACK(petsclib::PetscLibType,comm::MPI_Comm, mb::PetscInt, nb::PetscInt, M::PetscInt, N::PetscInt, rsrc::PetscInt, csrc::PetscInt) \nCreates a dense parallel matrix in ScaLAPACK format\n(2D block cyclic distribution) for a `MATSCALAPACK` matrix\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `mb`   - row block size (or `PETSC_DECIDE` to have it set)\n- `nb`   - column block size (or `PETSC_DECIDE` to have it set)\n- `M`    - number of global rows\n- `N`    - number of global columns\n- `rsrc` - coordinate of process that owns the first row of the distributed matrix\n- `csrc` - coordinate of process that owns the first column of the distributed matrix\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Key:\n- `-mat_scalapack_block_sizes` - size of the blocks to use (one or two integers separated by comma)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSCALAPACK`, `MATDENSE`, `MATELEMENTAL`, `MatCreate()`, `MatCreateDense()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateScaLAPACK\"))\n\"\"\"\nfunction MatCreateScaLAPACK(petsclib::PetscLibType, comm::MPI_Comm, mb::PetscInt, nb::PetscInt, M::PetscInt, N::PetscInt, rsrc::PetscInt, csrc::PetscInt) end\n\n@for_petsc function MatCreateScaLAPACK(petsclib::$UnionPetscLib, comm::MPI_Comm, mb::$PetscInt, nb::$PetscInt, M::$PetscInt, N::$PetscInt, rsrc::$PetscInt, csrc::$PetscInt )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateScaLAPACK, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, mb, nb, M, N, rsrc, csrc, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatMPISELLSetPreallocation(petsclib::PetscLibType,B::PetscMat, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nPreallocates memory for a `MATMPISELL` sparse parallel matrix in sell format.\nFor good matrix assembly performance the user should preallocate the matrix storage by\nsetting the parameters `d_nz` (or `d_nnz`) and `o_nz` (or `o_nnz`).\n\nCollective\n\nInput Parameters:\n- `B`     - the matrix\n- `d_nz`  - number of nonzeros per row in DIAGONAL portion of local submatrix\n(same value is used for all local rows)\n- `d_nnz` - array containing the number of nonzeros in the various rows of the\nDIAGONAL portion of the local submatrix (possibly different for each row)\nor NULL (`PETSC_NULL_INTEGER` in Fortran), if `d_nz` is used to specify the nonzero structure.\nThe size of this array is equal to the number of local rows, i.e 'm'.\nFor matrices that will be factored, you must leave room for (and set)\nthe diagonal entry even if it is zero.\n- `o_nz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local\nsubmatrix (same value is used for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various rows of the\nOFF-DIAGONAL portion of the local submatrix (possibly different for\neach row) or NULL (`PETSC_NULL_INTEGER` in Fortran), if `o_nz` is used to specify the nonzero\nstructure. The size of this array is equal to the number\nof local rows, i.e 'm'.\n\nExample usage:\nConsider the following 8x8 matrix with 34 non-zero values, that is\nassembled across 3 processors. Lets assume that proc0 owns 3 rows,\nproc1 owns 3 rows, proc2 owns 2 rows. This division can be shown\nas follows\n\n-seealso: `Mat`, `MatCreate()`, `MatCreateSeqSELL()`, `MatSetValues()`, `MatCreateSELL()`,\n`MATMPISELL`, `MatGetInfo()`, `PetscSplitOwnership()`, `MATSELL`\n\n# External Links\n$(_doc_external(\"Mat/MatMPISELLSetPreallocation\"))\n\"\"\"\nfunction MatMPISELLSetPreallocation(petsclib::PetscLibType, B::PetscMat, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function MatMPISELLSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatMPISELLSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               B, d_nz, d_nnz, o_nz, o_nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSELL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_rlenmax::PetscInt, d_rlen::Vector{PetscInt}, o_rlenmax::PetscInt, o_rlen::Vector{PetscInt}) \nCreates a sparse parallel matrix in `MATSELL` format.\n\nCollective\n\nInput Parameters:\n- `comm`      - MPI communicator\n- `m`         - number of local rows (or `PETSC_DECIDE` to have calculated if M is given). This value should be the same as the local size used in creating the y vector for the matrix-vector product y = Ax.\n- `n`         - This value should be the same as the local size used in creating the x vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have calculated if `N` is given) For square matrices n is almost always `m`.\n- `M`         - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`         - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `d_rlenmax` - max number of nonzeros per row in DIAGONAL portion of local submatrix (same value is used for all local rows)\n- `d_rlen`    - array containing the number of nonzeros in the various rows of the DIAGONAL portion of the local submatrix (possibly different for each row) or `NULL`, if d_rlenmax is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.e `m`.\n- `o_rlenmax` - max number of nonzeros per row in the OFF-DIAGONAL portion of local submatrix (same value is used for all local rows).\n- `o_rlen`    - array containing the number of nonzeros in the various rows of the OFF-DIAGONAL portion of the local submatrix (possibly different for each row) or `NULL`, if `o_rlenmax` is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.e `m`.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Key:\n- `-mat_sell_oneindex` - Internally use indexing starting at 1\nrather than 0.  When calling `MatSetValues()`,\nthe user still MUST index entries starting at 0!\n\nExample:\nConsider the following 8x8 matrix with 34 non-zero values, that is\nassembled across 3 processors. Lets assume that proc0 owns 3 rows,\nproc1 owns 3 rows, proc2 owns 2 rows. This division can be shown\nas follows\n\n-seealso: `Mat`, `MATSELL`, `MatCreate()`, `MatCreateSeqSELL()`, `MatSetValues()`, `MatMPISELLSetPreallocation()`, `MATMPISELL`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSELL\"))\n\"\"\"\nfunction MatCreateSELL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_rlenmax::PetscInt, d_rlen::Union{Ptr,Vector{PetscInt}}, o_rlenmax::PetscInt, o_rlen::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSELL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_rlenmax::$PetscInt, d_rlen::Union{Ptr,Vector{$PetscInt}}, o_rlenmax::$PetscInt, o_rlen::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSELL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, M, N, d_rlenmax, d_rlen, o_rlenmax, o_rlen, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tcolmap::Vector{PetscInt} = MatMPISELLGetSeqSELL(petsclib::PetscLibType,A::PetscMat, Ad::PetscMat, Ao::PetscMat) \nReturns the local pieces of this distributed matrix\n\nNot Collective\n\nInput Parameter:\n- `A` - the `MATMPISELL` matrix\n\nOutput Parameters:\n- `Ad`     - The diagonal portion of `A`\n- `Ao`     - The off-diagonal portion of `A`\n- `colmap` - An array mapping local column numbers of `Ao` to global column numbers of the parallel matrix\n\nLevel: advanced\n\n-seealso: `Mat`, `MATSEQSELL`, `MATMPISELL`\n\n# External Links\n$(_doc_external(\"Mat/MatMPISELLGetSeqSELL\"))\n\"\"\"\nfunction MatMPISELLGetSeqSELL(petsclib::PetscLibType, A::PetscMat, Ad::PetscMat, Ao::PetscMat) end\n\n@for_petsc function MatMPISELLGetSeqSELL(petsclib::$UnionPetscLib, A::PetscMat, Ad::PetscMat, Ao::PetscMat )\n\tAd_ = Ref(Ad.ptr)\n\tAo_ = Ref(Ao.ptr)\n\tcolmap_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:MatMPISELLGetSeqSELL, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{CMat}, Ptr{Ptr{$PetscInt}}),\n               A, Ad_, Ao_, colmap_,\n              )\n\n\tAd.ptr = C_NULL\n\tAo.ptr = C_NULL\n\tcolmap = unsafe_wrap(Array, colmap_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn colmap\nend \n\n\"\"\"\n\tMatMPISELLGetLocalMatCondensed(petsclib::PetscLibType,A::PetscMat, scall::MatReuse, row::IS, col::IS, A_loc::PetscMat) \nCreates a `MATSEQSELL` matrix from an `MATMPISELL` matrix by\ntaking all its local rows and NON-ZERO columns\n\nNot Collective\n\nInput Parameters:\n- `A`     - the matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `row`   - index sets of rows to extract (or `NULL`)\n- `col`   - index sets of columns to extract (or `NULL`)\n\nOutput Parameter:\n- `A_loc` - the local sequential matrix generated\n\nLevel: advanced\n\n-seealso: `Mat`, `MATSEQSELL`, `MATMPISELL`, `MatGetOwnershipRange()`, `MatMPISELLGetLocalMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPISELLGetLocalMatCondensed\"))\n\"\"\"\nfunction MatMPISELLGetLocalMatCondensed(petsclib::PetscLibType, A::PetscMat, scall::MatReuse, row::Union{Ptr,IS}, col::Union{Ptr,IS}, A_loc::PetscMat) end\n\n@for_petsc function MatMPISELLGetLocalMatCondensed(petsclib::$UnionPetscLib, A::PetscMat, scall::MatReuse, row::Union{Ptr,IS}, col::Union{Ptr,IS}, A_loc::PetscMat )\n\tA_loc_ = Ref(A_loc.ptr)\n\n    @chk ccall(\n               (:MatMPISELLGetLocalMatCondensed, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CIS}, Ptr{CIS}, Ptr{CMat}),\n               A, scall, row, col, A_loc_,\n              )\n\n\tA_loc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqSELLSetPreallocation(petsclib::PetscLibType,B::PetscMat, rlenmax::PetscInt, rlen::Vector{PetscInt}) \nFor good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameter `nz`\n(or the array `nnz`).\n\nCollective\n\nInput Parameters:\n- `B`       - The `MATSEQSELL` matrix\n- `rlenmax` - number of nonzeros per row (same for all rows), ignored if `rlen` is provided\n- `rlen`    - array containing the number of nonzeros in the various rows (possibly different for each row) or `NULL`\n\nLevel: intermediate\n\n-seealso: `Mat`, `MATSEQSELL`, `MATSELL`, `MatCreate()`, `MatCreateSELL()`, `MatSetValues()`, `MatGetInfo()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSELLSetPreallocation\"))\n\"\"\"\nfunction MatSeqSELLSetPreallocation(petsclib::PetscLibType, B::PetscMat, rlenmax::PetscInt, rlen::Vector{PetscInt}) end\n\n@for_petsc function MatSeqSELLSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, rlenmax::$PetscInt, rlen::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatSeqSELLSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}),\n               B, rlenmax, rlen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tratio::PetscReal = MatSeqSELLGetFillRatio(petsclib::PetscLibType,A::PetscMat) \nreturns a ratio that indicates the irregularity of the matrix.\n\nNot Collective\n\nInput Parameter:\n- `A` - a MATSEQSELL matrix\n\nOutput Parameter:\n- `ratio` - ratio of number of padded zeros to number of allocated elements\n\nLevel: intermediate\n\n-seealso: `MATSEQSELL`, `MatSeqSELLGetAvgSliceWidth()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSELLGetFillRatio\"))\n\"\"\"\nfunction MatSeqSELLGetFillRatio(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqSELLGetFillRatio(petsclib::$UnionPetscLib, A::PetscMat )\n\tratio_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatSeqSELLGetFillRatio, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               A, ratio_,\n              )\n\n\tratio = ratio_[]\n\n\treturn ratio\nend \n\n\"\"\"\n\tslicewidth::PetscInt = MatSeqSELLGetMaxSliceWidth(petsclib::PetscLibType,A::PetscMat) \nreturns the maximum slice width.\n\nNot Collective\n\nInput Parameter:\n- `A` - a MATSEQSELL matrix\n\nOutput Parameter:\n- `slicewidth` - maximum slice width\n\nLevel: intermediate\n\n-seealso: `MATSEQSELL`, `MatSeqSELLGetAvgSliceWidth()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSELLGetMaxSliceWidth\"))\n\"\"\"\nfunction MatSeqSELLGetMaxSliceWidth(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqSELLGetMaxSliceWidth(petsclib::$UnionPetscLib, A::PetscMat )\n\tslicewidth_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSeqSELLGetMaxSliceWidth, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               A, slicewidth_,\n              )\n\n\tslicewidth = slicewidth_[]\n\n\treturn slicewidth\nend \n\n\"\"\"\n\tslicewidth::PetscReal = MatSeqSELLGetAvgSliceWidth(petsclib::PetscLibType,A::PetscMat) \nreturns the average slice width.\n\nNot Collective\n\nInput Parameter:\n- `A` - a MATSEQSELL matrix\n\nOutput Parameter:\n- `slicewidth` - average slice width\n\nLevel: intermediate\n\n-seealso: `MATSEQSELL`, `MatSeqSELLGetMaxSliceWidth()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSELLGetAvgSliceWidth\"))\n\"\"\"\nfunction MatSeqSELLGetAvgSliceWidth(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqSELLGetAvgSliceWidth(petsclib::$UnionPetscLib, A::PetscMat )\n\tslicewidth_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatSeqSELLGetAvgSliceWidth, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               A, slicewidth_,\n              )\n\n\tslicewidth = slicewidth_[]\n\n\treturn slicewidth\nend \n\n\"\"\"\n\tMatSeqSELLSetSliceHeight(petsclib::PetscLibType,A::PetscMat, sliceheight::PetscInt) \nsets the slice height.\n\nNot Collective\n\nInput Parameters:\n- `A`           - a MATSEQSELL matrix\n- `sliceheight` - slice height\n\n-seealso: `MATSEQSELL`, `MatSeqSELLGetVarSliceSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSELLSetSliceHeight\"))\n\"\"\"\nfunction MatSeqSELLSetSliceHeight(petsclib::PetscLibType, A::PetscMat, sliceheight::PetscInt) end\n\n@for_petsc function MatSeqSELLSetSliceHeight(petsclib::$UnionPetscLib, A::PetscMat, sliceheight::$PetscInt )\n\n    @chk ccall(\n               (:MatSeqSELLSetSliceHeight, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               A, sliceheight,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvariance::PetscReal = MatSeqSELLGetVarSliceSize(petsclib::PetscLibType,A::PetscMat) \nreturns the variance of the slice size.\n\nNot Collective\n\nInput Parameter:\n- `A` - a MATSEQSELL matrix\n\nOutput Parameter:\n- `variance` - variance of the slice size\n\nLevel: intermediate\n\n-seealso: `MATSEQSELL`, `MatSeqSELLSetSliceHeight()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSELLGetVarSliceSize\"))\n\"\"\"\nfunction MatSeqSELLGetVarSliceSize(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqSELLGetVarSliceSize(petsclib::$UnionPetscLib, A::PetscMat )\n\tvariance_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatSeqSELLGetVarSliceSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               A, variance_,\n              )\n\n\tvariance = variance_[]\n\n\treturn variance\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqSELL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, rlenmax::PetscInt, rlen::Union{Ptr,Vector{PetscInt}}) \nCreates a sparse matrix in `MATSEQSELL` format.\n\nCollective\n\nInput Parameters:\n- `comm`    - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`       - number of rows\n- `n`       - number of columns\n- `rlenmax` - maximum number of nonzeros in a row, ignored if `rlen` is provided\n- `rlen`    - array containing the number of nonzeros in the various rows (possibly different for each row) or NULL\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: `Mat`, `MATSEQSELL`, `MatCreate()`, `MatCreateSELL()`, `MatSetValues()`, `MatSeqSELLSetPreallocation()`, `MATSELL`, `MATMPISELL`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqSELL\"))\n\"\"\"\nfunction MatCreateSeqSELL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, rlenmax::PetscInt, rlen::Union{Ptr, Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqSELL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, rlenmax::$PetscInt, rlen::Union{Ptr, Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqSELL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, rlenmax, rlen, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatPreallocatorPreallocate(petsclib::PetscLibType,mat::PetscMat, fill::PetscBool, A::PetscMat) \nPreallocates the A matrix, using information from a `MATPREALLOCATOR` mat, optionally filling A with zeros\n\nInput Parameters:\n- `mat`  - the `MATPREALLOCATOR` preallocator matrix\n- `fill` - fill the matrix with zeros\n- `A`    - the matrix to be preallocated\n\n-seealso: `MATPREALLOCATOR`, `MatXAIJSetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatPreallocatorPreallocate\"))\n\"\"\"\nfunction MatPreallocatorPreallocate(petsclib::PetscLibType, mat::PetscMat, fill::PetscBool, A::PetscMat) end\n\n@for_petsc function MatPreallocatorPreallocate(petsclib::$UnionPetscLib, mat::PetscMat, fill::PetscBool, A::PetscMat )\n\n    @chk ccall(\n               (:MatPreallocatorPreallocate, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool, CMat),\n               mat, fill, A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tJ::PetscMat = MatCreateConstantDiagonal(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, diag::PetscScalar) \nCreates a matrix with a uniform value along the diagonal\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `m`    - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given). This value should be the same as the local size used in creating the y vector for the matrix-vector product y = Ax.\n- `n`    - This value should be the same as the local size used in creating the x vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have calculated if `N` is given) For square matrices n is almost always `m`.\n- `M`    - number of global rows (or `PETSC_DETERMINE` to have calculated if m is given)\n- `N`    - number of global columns (or `PETSC_DETERMINE` to have calculated if n is given)\n- `diag` - the diagonal value\n\nOutput Parameter:\n- `J` - the diagonal matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroy()`, `MATCONSTANTDIAGONAL`, `MatScale()`, `MatShift()`, `MatMult()`, `MatGetDiagonal()`, `MatGetFactor()`, `MatSolve()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateConstantDiagonal\"))\n\"\"\"\nfunction MatCreateConstantDiagonal(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, diag::PetscScalar) end\n\n@for_petsc function MatCreateConstantDiagonal(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, diag::$PetscScalar )\n\tJ_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateConstantDiagonal, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscScalar, Ptr{CMat}),\n               comm, m, n, M, N, diag, J_,\n              )\n\n\tJ = PetscMat(J_[], petsclib)\n\n\treturn J\nend \n\n\"\"\"\n\tvalue::PetscScalar = MatConstantDiagonalGetConstant(petsclib::PetscLibType,mat::PetscMat) \nGet the scalar constant of a constant diagonal matrix\n\nNot collective\n\nInput Parameter:\n- `mat` - a `MATCONSTANTDIAGONAL`\n\nOutput Parameter:\n- `value` - the scalar value\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroy()`, `MATCONSTANTDIAGONAL`\n\n# External Links\n$(_doc_external(\"Mat/MatConstantDiagonalGetConstant\"))\n\"\"\"\nfunction MatConstantDiagonalGetConstant(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatConstantDiagonalGetConstant(petsclib::$UnionPetscLib, mat::PetscMat )\n\tvalue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatConstantDiagonalGetConstant, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               mat, value_,\n              )\n\n\tvalue = value_[]\n\n\treturn value\nend \n\n\"\"\"\n\tMatMPIBAIJSetPreallocationCSR(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) \nCreates a sparse parallel matrix in `MATBAIJ` format using the given nonzero structure and (optional) numerical values\n\nCollective\n\nInput Parameters:\n- `B`  - the matrix\n- `bs` - the block size\n- `i`  - the indices into `j` for the start of each local row (starts with zero)\n- `j`  - the column indices for each local row (starts with zero) these must be sorted for each row\n- `v`  - optional values in the matrix, use `NULL` if not provided\n\nLevel: advanced\n\n-seealso: `Mat`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIBAIJSetPreallocation()`, `MatCreateAIJ()`, `MATMPIAIJ`, `MatCreateMPIBAIJWithArrays()`, `MATMPIBAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIBAIJSetPreallocationCSR\"))\n\"\"\"\nfunction MatMPIBAIJSetPreallocationCSR(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Union{Ptr,Vector{PetscScalar}}) end\n\n@for_petsc function MatMPIBAIJSetPreallocationCSR(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, v::Union{Ptr,Vector{$PetscScalar}})\n\n    @chk ccall(\n               (:MatMPIBAIJSetPreallocationCSR, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               B, bs, i, j, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIBAIJSetPreallocation(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nAllocates memory for a sparse parallel matrix in `MATMPIBAIJ` format\n(block compressed row).\n\nCollective\n\nInput Parameters:\n- `B`     - the matrix\n- `bs`    - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row\nblocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `d_nz`  - number of block nonzeros per block row in diagonal portion of local\nsubmatrix  (same for all local rows)\n- `d_nnz` - array containing the number of block nonzeros in the various block rows\nof the in diagonal portion of the local (possibly different for each block\nrow) or `NULL`.  If you plan to factor the matrix you must leave room for the diagonal entry and\nset it even if it is zero.\n- `o_nz`  - number of block nonzeros per block row in the off-diagonal portion of local\nsubmatrix (same for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various block rows of the\noff-diagonal portion of the local submatrix (possibly different for\neach block row) or `NULL`.\n\nIf the *_nnz parameter is given then the *_nz parameter is ignored\n\nOptions Database Keys:\n- `-mat_block_size`            - size of the blocks to use\n- `-mat_use_hash_table <fact>` - set hash table factor\n\nLevel: intermediate\n\n-seealso: `Mat`, `MATMPIBAIJ`, `MatCreate()`, `MatCreateSeqBAIJ()`, `MatSetValues()`, `MatCreateBAIJ()`, `MatMPIBAIJSetPreallocationCSR()`, `PetscSplitOwnership()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIBAIJSetPreallocation\"))\n\"\"\"\nfunction MatMPIBAIJSetPreallocation(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatMPIBAIJSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, d_nz::$PetscInt, d_nnz::Union{Ptr,Vector{$PetscInt}}, o_nz::$PetscInt, o_nnz::Union{Ptr,Vector{$PetscInt}})\n\n    @chk ccall(\n               (:MatMPIBAIJSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               B, bs, d_nz, d_nnz, o_nz, o_nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateBAIJ(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) \nCreates a sparse parallel matrix in `MATBAIJ` format\n(block compressed row).\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `bs`    - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row blocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if M is given). This value should be the same as the local size used in creating the y vector for the matrix-vector product y = Ax.\n- `n`     - number of local columns (or `PETSC_DECIDE` to have calculated if N is given). This value should be the same as the local size used in creating the x vector for the matrix-vector product y = Ax.\n- `M`     - number of global rows (or `PETSC_DETERMINE` to have calculated if m is given)\n- `N`     - number of global columns (or `PETSC_DETERMINE` to have calculated if n is given)\n- `d_nz`  - number of nonzero blocks per block row in diagonal portion of local submatrix  (same for all local rows)\n- `d_nnz` - array containing the number of nonzero blocks in the various block rows of the in diagonal portion of the local (possibly different for each block row) or NULL.  If you plan to factor the matrix you must leave room for the diagonal entry and set it even if it is zero.\n- `o_nz`  - number of nonzero blocks per block row in the off-diagonal portion of local submatrix (same for all local rows).\n- `o_nnz` - array containing the number of nonzero blocks in the various block rows of the off-diagonal portion of the local submatrix (possibly different for each block row) or NULL.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_block_size`            - size of the blocks to use\n- `-mat_use_hash_table <fact>` - set hash table factor\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatCreate()`, `MatCreateSeqBAIJ()`, `MatSetValues()`, `MatMPIBAIJSetPreallocation()`, `MatMPIBAIJSetPreallocationCSR()`,\n`MatGetOwnershipRange()`,  `MatGetOwnershipRanges()`, `MatGetOwnershipRangeColumn()`, `MatGetOwnershipRangesColumn()`, `PetscLayout`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateBAIJ\"))\n\"\"\"\nfunction MatCreateBAIJ(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateBAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Union{Ptr,Vector{$PetscInt}}, o_nz::$PetscInt, o_nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateBAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, bs, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatMPIBAIJSetHashTableFactor(petsclib::PetscLibType,mat::PetscMat, fact::PetscReal) \nSets the factor required to compute the size of the matrices hash table\n\nInput Parameters:\n- `mat`  - the matrix\n- `fact` - factor\n\nOptions Database Key:\n- `-mat_use_hash_table <fact>` - provide the factor\n\nLevel: advanced\n\n-seealso: `Mat`, `MATMPIBAIJ`, `MatSetOption()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIBAIJSetHashTableFactor\"))\n\"\"\"\nfunction MatMPIBAIJSetHashTableFactor(petsclib::PetscLibType, mat::PetscMat, fact::PetscReal) end\n\n@for_petsc function MatMPIBAIJSetHashTableFactor(petsclib::$UnionPetscLib, mat::PetscMat, fact::$PetscReal )\n\n    @chk ccall(\n               (:MatMPIBAIJSetHashTableFactor, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               mat, fact,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcolmap::Vector{PetscInt} = MatMPIBAIJGetSeqBAIJ(petsclib::PetscLibType,A::PetscMat, Ad::PetscMat, Ao::PetscMat) \n\n# External Links\n$(_doc_external(\"Mat/MatMPIBAIJGetSeqBAIJ\"))\n\"\"\"\nfunction MatMPIBAIJGetSeqBAIJ(petsclib::PetscLibType, A::PetscMat, Ad::PetscMat, Ao::PetscMat) end\n\n@for_petsc function MatMPIBAIJGetSeqBAIJ(petsclib::$UnionPetscLib, A::PetscMat, Ad::PetscMat, Ao::PetscMat )\n\tAd_ = Ref(Ad.ptr)\n\tAo_ = Ref(Ao.ptr)\n\tcolmap_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:MatMPIBAIJGetSeqBAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{CMat}, Ptr{Ptr{$PetscInt}}),\n               A, Ad_, Ao_, colmap_,\n              )\n\n\tAd.ptr = C_NULL\n\tAo.ptr = C_NULL\n\tcolmap = unsafe_wrap(Array, colmap_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn colmap\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateMPIBAIJWithArrays(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) \ncreates a `MATMPIBAIJ` matrix using arrays that contain in standard block CSR format for the local rows.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `bs`   - the block size, only a block size of 1 is supported\n- `m`    - number of local rows (Cannot be `PETSC_DECIDE`)\n- `n`    - This value should be the same as the local size used in creating the x vector for the matrix-vector product  y = Ax . (or `PETSC_DECIDE` to have calculated if `N` is given) For square matrices `n` is almost always `m`.\n- `M`    - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`    - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `i`    - row indices; that is i[0] = 0, i[row] = i[row-1] + number of block elements in that rowth block row of the matrix\n- `j`    - column indices\n- `a`    - matrix values\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`,\n`MATMPIAIJ`, `MatCreateAIJ()`, `MatCreateMPIAIJWithSplitArrays()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIBAIJWithArrays\"))\n\"\"\"\nfunction MatCreateMPIBAIJWithArrays(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) end\n\n@for_petsc function MatCreateMPIBAIJWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar} )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIBAIJWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, bs, m, n, M, N, i, j, a, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateBAIJMKL(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nCreates a sparse parallel matrix in `MATBAIJMKL` format (block compressed row).\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `bs`    - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row blocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given) This value should be the same as the local size used in creating the y vector for the matrix-vector product y = Ax.\n- `n`     - number of local columns (or `PETSC_DECIDE` to have calculated if `N` is given) This value should be the same as the local size used in creating the x vector for the matrix-vector product y = Ax.\n- `M`     - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`     - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `d_nz`  - number of nonzero blocks per block row in diagonal portion of local submatrix  (same for all local rows)\n- `d_nnz` - array containing the number of nonzero blocks in the various block rows of the in diagonal portion of the local (possibly different for each block row) or `NULL`.  If you plan to factor the matrix you must leave room for the diagonal entry and set it even if it is zero.\n- `o_nz`  - number of nonzero blocks per block row in the off-diagonal portion of local submatrix (same for all local rows).\n- `o_nnz` - array containing the number of nonzero blocks in the various block rows of the off-diagonal portion of the local submatrix (possibly different for each block row) or `NULL`.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_block_size`            - size of the blocks to use\n- `-mat_use_hash_table <fact>` - set hash table factor\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATBAIJMKL`, `MATBAIJ`, `MatCreate()`, `MatCreateSeqBAIJMKL()`, `MatSetValues()`, `MatMPIBAIJSetPreallocation()`, `MatMPIBAIJSetPreallocationCSR()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateBAIJMKL\"))\n\"\"\"\nfunction MatCreateBAIJMKL(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateBAIJMKL(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Union{Ptr,Vector{$PetscInt}}, o_nz::$PetscInt, o_nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateBAIJMKL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, bs, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tindices::PetscInt = MatSeqBAIJSetColumnIndices(petsclib::PetscLibType,mat::PetscMat) \nSet the column indices for all the block rows in the matrix.\n\nInput Parameters:\n- `mat`     - the `MATSEQBAIJ` matrix\n- `indices` - the block column indices\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQBAIJ`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqBAIJSetColumnIndices\"))\n\"\"\"\nfunction MatSeqBAIJSetColumnIndices(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatSeqBAIJSetColumnIndices(petsclib::$UnionPetscLib, mat::PetscMat )\n\tindices_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSeqBAIJSetColumnIndices, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               mat, indices_,\n              )\n\n\tindices = indices_[]\n\n\treturn indices\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqBAIJGetArray(petsclib::PetscLibType,A::PetscMat) \ngives read/write access to the array where the data for a `MATSEQBAIJ` matrix is stored\n\nNot Collective\n\nInput Parameter:\n- `A` - a `MATSEQBAIJ` matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQBAIJ`, `MatSeqBAIJRestoreArray()`, `MatSeqAIJGetArray()`, `MatSeqAIJRestoreArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqBAIJGetArray\"))\n\"\"\"\nfunction MatSeqBAIJGetArray(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqBAIJGetArray(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqBAIJGetArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqBAIJRestoreArray(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array where the data for a `MATSEQBAIJ` matrix is stored obtained by `MatSeqBAIJGetArray()`\n\nNot Collective\n\nInput Parameters:\n- `A`     - a `MATSEQBAIJ` matrix\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqBAIJGetArray()`, `MatSeqAIJGetArray()`, `MatSeqAIJRestoreArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqBAIJRestoreArray\"))\n\"\"\"\nfunction MatSeqBAIJRestoreArray(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqBAIJRestoreArray(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqBAIJRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqBAIJ(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse matrix in `MATSEQAIJ` (block\ncompressed row) format.  For good matrix assembly performance the\nuser should preallocate the matrix storage by setting the parameter `nz`\n(or the array `nnz`).\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `bs`   - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row\nblocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzero blocks  per block row (same for all rows)\n- `nnz`  - array containing the number of nonzero blocks in the various block rows\n(possibly different for each block row) or `NULL`\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_no_unroll`  - uses code that does not unroll the loops in the block calculations (much slower)\n- `-mat_block_size` - size of the blocks to use\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrices](sec_matsparse), `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatCreateBAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqBAIJ\"))\n\"\"\"\nfunction MatCreateSeqBAIJ(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqBAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqBAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, bs, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatSeqBAIJSetPreallocation(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nSets the block size and expected nonzeros\nper row in the matrix. For good matrix assembly performance the\nuser should preallocate the matrix storage by setting the parameter `nz`\n(or the array `nnz`).\n\nCollective\n\nInput Parameters:\n- `B`   - the matrix\n- `bs`  - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row\nblocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `nz`  - number of block nonzeros per block row (same for all rows)\n- `nnz` - array containing the number of block nonzeros in the various block rows\n(possibly different for each block row) or `NULL`\n\nOptions Database Keys:\n- `-mat_no_unroll`  - uses code that does not unroll the loops in the block calculations (much slower)\n- `-mat_block_size` - size of the blocks to use\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrices](sec_matsparse), `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatCreateBAIJ()`, `MatGetInfo()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqBAIJSetPreallocation\"))\n\"\"\"\nfunction MatSeqBAIJSetPreallocation(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatSeqBAIJSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}})\n\n    @chk ccall(\n               (:MatSeqBAIJSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               B, bs, nz, nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqBAIJSetPreallocationCSR(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) \nCreates a sparse sequential matrix in `MATSEQBAIJ` format using the given nonzero structure and (optional) numerical values\n\nCollective\n\nInput Parameters:\n- `B`  - the matrix\n- `bs` - the blocksize\n- `i`  - the indices into `j` for the start of each local row (indices start with zero)\n- `j`  - the column indices for each local row (indices start with zero) these must be sorted for each row\n- `v`  - optional values in the matrix, use `NULL` if not provided\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateSeqBAIJ()`, `MatSetValues()`, `MatSeqBAIJSetPreallocation()`, `MATSEQBAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqBAIJSetPreallocationCSR\"))\n\"\"\"\nfunction MatSeqBAIJSetPreallocationCSR(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Union{Ptr,Vector{PetscScalar}}) end\n\n@for_petsc function MatSeqBAIJSetPreallocationCSR(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, v::Union{Ptr,Vector{$PetscScalar}})\n\n    @chk ccall(\n               (:MatSeqBAIJSetPreallocationCSR, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               B, bs, i, j, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateSeqBAIJWithArrays(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) \nCreates a `MATSEQBAIJ` matrix using matrix elements provided by the user.\n\nCollective\n\nInput Parameters:\n- `comm` - must be an MPI communicator of size 1\n- `bs`   - size of block\n- `m`    - number of rows\n- `n`    - number of columns\n- `i`    - row indices; that is i[0] = 0, i[row] = i[row-1] + number of elements in that row block row of the matrix\n- `j`    - column indices\n- `a`    - matrix values\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateBAIJ()`, `MatCreateSeqBAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqBAIJWithArrays\"))\n\"\"\"\nfunction MatCreateSeqBAIJWithArrays(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) end\n\n@for_petsc function MatCreateSeqBAIJWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar} )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqBAIJWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, bs, m, n, i, j, a, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqBAIJMKL(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse matrix of type `MATSEQBAIJMKL`.\nThis type inherits from `MATSEQBAIJ` and is largely identical, but uses sparse BLAS\nroutines from Intel MKL whenever possible.\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `bs`   - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row blocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzero blocks  per block row (same for all rows)\n- `nnz`  - array containing the number of nonzero blocks in the various block rows (possibly different for each block row) or `NULL`\n\nOutput Parameter:\n- `A` - the matrix\n\nIt is recommended that one use the `MatCreate()`, `MatSetType()` and/or `MatSetFromOptions()`,\nMatXXXXSetPreallocation() paradigm instead of this routine directly.\n[MatXXXXSetPreallocation() is, for example, `MatSeqBAIJSetPreallocation()`]\n\nOptions Database Keys:\n- `-mat_no_unroll`  - uses code that does not unroll the loops in the block calculations (much slower)\n- `-mat_block_size` - size of the blocks to use\n\nLevel: intermediate\n\n-seealso: [Sparse Matrices](sec_matsparse), `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatCreateBAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqBAIJMKL\"))\n\"\"\"\nfunction MatCreateSeqBAIJMKL(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqBAIJMKL(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqBAIJMKL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, bs, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatPythonSetType(petsclib::PetscLibType,mat::PetscMat, pyname::Vector{Cchar}) \nInitialize a `Mat` object implemented in Python.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix object.\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOptions Database Key:\n- `-mat_python_type <pyname>`  - python class\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatType`, `MatCreate()`, `MatSetType()`, `MATPYTHON`, `PetscPythonInitialize()`\n\n# External Links\n$(_doc_external(\"Mat/MatPythonSetType\"))\n\"\"\"\nfunction MatPythonSetType(petsclib::PetscLibType, mat::PetscMat, pyname::Vector{Cchar}) end\n\n@for_petsc function MatPythonSetType(petsclib::$UnionPetscLib, mat::PetscMat, pyname::Vector{Cchar} )\n\n    @chk ccall(\n               (:MatPythonSetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cchar}),\n               mat, pyname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpyname::Vector{Cchar} = MatPythonGetType(petsclib::PetscLibType,mat::PetscMat) \nGet the Python name of a `Mat` object implemented in Python.\n\nNot Collective\n\nInput Parameter:\n- `mat`  - the matrix\n\nOutput Parameter:\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatType`, `MatCreate()`, `MatSetType()`, `MATPYTHON`, `PetscPythonInitialize()`, `MatPythonSetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatPythonGetType\"))\n\"\"\"\nfunction MatPythonGetType(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatPythonGetType(petsclib::$UnionPetscLib, mat::PetscMat )\n\tpyname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:MatPythonGetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{Cchar}}),\n               mat, pyname_,\n              )\n\n\tpyname = unsafe_wrap(Array, pyname_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pyname\nend \n\n\"\"\"\n\tA::PetscMat = MatPythonCreate(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, pyname::Vector{Cchar}) \nCreate a `Mat` object implemented in Python.\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `m`  - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)\n- `n`  - number of local columns (or `PETSC_DECIDE` to have calculated if `N` is given)\n- `M`  - number of global rows (or `PETSC_DECIDE` to have calculated if `m` is given)\n- `N`  - number of global columns (or `PETSC_DECIDE` to have calculated if `n` is given)\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOutput Parameter:\n- `A`  - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatType`, `MATPYTHON`, `MatPythonSetType()`, `PetscPythonInitialize()`\n\n# External Links\n$(_doc_external(\"Mat/MatPythonCreate\"))\n\"\"\"\nfunction MatPythonCreate(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, pyname::Vector{Cchar}) end\n\n@for_petsc function MatPythonCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, pyname::Vector{Cchar} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatPythonCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{Cchar}, Ptr{CMat}),\n               comm, m, n, M, N, pyname, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tnewmat::PetscMat = MatCreateLocalRef(petsclib::PetscLibType,A::PetscMat, isrow::IS, iscol::IS) \nGets a logical reference to a local submatrix, for use in assembly, that is to set values into the matrix\n\nNot Collective\n\nInput Parameters:\n- `A`     - full matrix, generally parallel\n- `isrow` - Local index set for the rows\n- `iscol` - Local index set for the columns\n\nOutput Parameter:\n- `newmat` - new serial `Mat`\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATSUBMATRIX`, `MatCreateSubMatrixVirtual()`, `MatSetValuesLocal()`, `MatSetValuesBlockedLocal()`, `MatGetLocalSubMatrix()`, `MatCreateSubMatrix()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateLocalRef\"))\n\"\"\"\nfunction MatCreateLocalRef(petsclib::PetscLibType, A::PetscMat, isrow::IS, iscol::IS) end\n\n@for_petsc function MatCreateLocalRef(petsclib::$UnionPetscLib, A::PetscMat, isrow::IS, iscol::IS )\n\tnewmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLocalRef, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{CMat}),\n               A, isrow, iscol, newmat_,\n              )\n\n\tnewmat = PetscMat(newmat_[], petsclib)\n\n\treturn newmat\nend \n\n\"\"\"\n\tMatShellGetContext(petsclib::PetscLibType,mat::PetscMat, ctx::Cvoid) \nReturns the user\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix, should have been created with `MatCreateShell()`\n\nOutput Parameter:\n- `ctx` - the user provided context\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellSetOperation()`, `MatShellSetContext()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellGetContext\"))\n\"\"\"\nfunction MatShellGetContext(petsclib::PetscLibType, mat::AbstractPetscMat, ctx::Union{Cvoid,Ptr}) end\n\n@for_petsc function MatShellGetContext(petsclib::$UnionPetscLib, mat::Union{AbstractPetscMat,Ptr}, ctx::Union{Cvoid,Ptr,Ref})\n\n    @chk ccall(\n               (:MatShellGetContext, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cvoid}),\n               mat, ctx,\n              )\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatShellSetMatProductOperation(petsclib::PetscLibType,A::PetscMat, ptype::MatProductType, symbolic::external, numeric::external, destroy::external, Btype::MatType, Ctype::MatType) \nAllows user to set a matrix matrix operation for a `MATSHELL` shell matrix.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `A`        - the `MATSHELL` shell matrix\n- `ptype`    - the product type\n- `symbolic` - the function for the symbolic phase (can be `NULL`)\n- `numeric`  - the function for the numerical phase\n- `destroy`  - the function for the destruction of the needed data generated during the symbolic phase (can be `NULL`)\n- `Btype`    - the matrix type for the matrix to be multiplied against\n- `Ctype`    - the matrix type for the result (can be `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`, `MatShellSetContext()`, `MatSetOperation()`, `MatProductType`, `MatType`, `MatSetUp()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellSetMatProductOperation\"))\n\"\"\"\nfunction MatShellSetMatProductOperation(petsclib::PetscLibType, A::PetscMat, ptype::MatProductType, symbolic::Union{Ptr,external}, numeric::Union{Ptr,external}, destroy::Union{Ptr,external}, Btype::MatType, Ctype::Union{Ptr,MatType}) end\n\n@for_petsc function MatShellSetMatProductOperation(petsclib::$UnionPetscLib, A::PetscMat, ptype::MatProductType, symbolic::Union{Ptr,external}, numeric::external, destroy::Union{Ptr,external}, Btype::MatType, Ctype::Union{Ptr,MatType})\n\n    @chk ccall(\n               (:MatShellSetMatProductOperation, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatProductType, external, external, external, MatType, MatType),\n               A, ptype, symbolic, numeric, destroy, Btype, Ctype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateShell(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, ctx::Ptr) \nCreates a new matrix of `MatType` `MATSHELL` for use with a user\nprivate matrix data storage format.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `m`    - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)\n- `n`    - number of local columns (or `PETSC_DECIDE` to have calculated if `N` is given)\n- `M`    - number of global rows (may be `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`    - number of global columns (may be `PETSC_DETERMINE` to have calculated if `n` is given)\n- `ctx`  - pointer to data needed by the shell matrix routines\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatShellSetOperation()`, `MatHasOperation()`, `MatShellGetContext()`, `MatShellSetContext()`, `MatShellSetManageScalingShifts()`, `MatShellSetMatProductOperation()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateShell\"))\n\"\"\"\nfunction MatCreateShell(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateShell(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, ctx::Ptr )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateShell, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{Cvoid}, Ptr{CMat}),\n               comm, m, n, M, N, ctx, A_,\n              )\n\n\t#A = PetscMat(A_[], petsclib)\n    #A = MatShell{$PetscLib, OType}(A_, ctx)\n    \n\n\treturn A\nend \n\n\"\"\"\n\tMatShellSetContext(petsclib::PetscLibType,mat::PetscMat, ctx::Cvoid) \nsets the context for a `MATSHELL` shell matrix\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the `MATSHELL` shell matrix\n- `ctx` - the context\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellSetContext\"))\n\"\"\"\nfunction MatShellSetContext(petsclib::PetscLibType, mat::PetscMat, ctx::Cvoid) end\n\n@for_petsc function MatShellSetContext(petsclib::$UnionPetscLib, mat::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:MatShellSetContext, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cvoid}),\n               mat, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatShellSetContextDestroy(petsclib::PetscLibType,mat::PetscMat, f::PetscCtxDestroyFn) \nsets the destroy function for a `MATSHELL` shell matrix context\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the shell matrix\n- `f`   - the context destroy function, see `PetscCtxDestroyFn` for calling sequence\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellSetContext()`,\n`PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Mat/MatShellSetContextDestroy\"))\n\"\"\"\nfunction MatShellSetContextDestroy(petsclib::PetscLibType, mat::PetscMat, f::PetscCtxDestroyFn) end\n\n@for_petsc function MatShellSetContextDestroy(petsclib::$UnionPetscLib, mat::PetscMat, f::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:MatShellSetContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscCtxDestroyFn}),\n               mat, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatShellSetVecType(petsclib::PetscLibType,mat::PetscMat, vtype::VecType) \nSets the `VecType` of `Vec` returned by `MatCreateVecs()`\n\nLogically Collective\n\nInput Parameters:\n- `mat`   - the `MATSHELL` shell matrix\n- `vtype` - type to use for creating vectors\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateVecs()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellSetVecType\"))\n\"\"\"\nfunction MatShellSetVecType(petsclib::PetscLibType, mat::PetscMat, vtype::VecType) end\n\n@for_petsc function MatShellSetVecType(petsclib::$UnionPetscLib, mat::PetscMat, vtype::VecType )\n\n    @chk ccall(\n               (:MatShellSetVecType, $petsc_library),\n               PetscErrorCode,\n               (CMat, VecType),\n               mat, vtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatShellSetManageScalingShifts(petsclib::PetscLibType,A::PetscMat) \nAllows the user to control the scaling and shift operations of the `MATSHELL`. Must be called immediately\nafter `MatCreateShell()`\n\nLogically Collective\n\nInput Parameter:\n- `A` - the `MATSHELL` shell matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`, `MatShellSetContext()`, `MatShellSetOperation()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellSetManageScalingShifts\"))\n\"\"\"\nfunction MatShellSetManageScalingShifts(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatShellSetManageScalingShifts(petsclib::$UnionPetscLib, A::PetscMat )\n\n    @chk ccall(\n               (:MatShellSetManageScalingShifts, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatShellTestMult(petsclib::PetscLibType,mat::PetscMat, f::external, base::PetscVec, ctx::Cvoid) \nCompares the multiply routine provided to the `MATSHELL` with differencing on a given function.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `mat`  - the `MATSHELL` shell matrix\n- `f`    - the function\n- `base` - differences are computed around this vector, see `MatMFFDSetBase()`, for Jacobians this is the point at which the Jacobian is being evaluated\n- `ctx`  - an optional context for the function\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the multiply is likely correct\n\nOptions Database Key:\n- `-mat_shell_test_mult_view` - print if any differences are detected between the products and print the difference\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`, `MatShellTestMultTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellTestMult\"))\n\"\"\"\nfunction MatShellTestMult(petsclib::PetscLibType, mat::PetscMat, f::external, base::PetscVec, ctx::Cvoid) end\n\n@for_petsc function MatShellTestMult(petsclib::$UnionPetscLib, mat::PetscMat, f::external, base::PetscVec, ctx::Cvoid )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatShellTestMult, $petsc_library),\n               PetscErrorCode,\n               (CMat, external, CVec, Ptr{Cvoid}, Ptr{PetscBool}),\n               mat, f, base, ctx, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatShellTestMultTranspose(petsclib::PetscLibType,mat::PetscMat, f::external, base::PetscVec, ctx::Cvoid) \nCompares the multiply transpose routine provided to the `MATSHELL` with differencing on a given function.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `mat`  - the `MATSHELL` shell matrix\n- `f`    - the function\n- `base` - differences are computed around this vector, see `MatMFFDSetBase()`, for Jacobians this is the point at which the Jacobian is being evaluated\n- `ctx`  - an optional context for the function\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the multiply is likely correct\n\nOptions Database Key:\n- `-mat_shell_test_mult_view` - print if any differences are detected between the products and print the difference\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`, `MatShellTestMult()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellTestMultTranspose\"))\n\"\"\"\nfunction MatShellTestMultTranspose(petsclib::PetscLibType, mat::PetscMat, f::external, base::PetscVec, ctx::Cvoid) end\n\n@for_petsc function MatShellTestMultTranspose(petsclib::$UnionPetscLib, mat::PetscMat, f::external, base::PetscVec, ctx::Cvoid )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatShellTestMultTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, external, CVec, Ptr{Cvoid}, Ptr{PetscBool}),\n               mat, f, base, ctx, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatIsShell(petsclib::PetscLibType,mat::PetscMat) \nInquires if a matrix is derived from `MATSHELL`\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `flg` - the Boolean value\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATSHELL`, `MATMFFD`, `MatCreateShell()`, `MATTRANSPOSEVIRTUAL`, `MATSCHURCOMPLEMENT`\n\n# External Links\n$(_doc_external(\"Mat/MatIsShell\"))\n\"\"\"\nfunction MatIsShell(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatIsShell(petsclib::$UnionPetscLib, mat::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsShell, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               mat, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatMAIJGetAIJ(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nGet the `MATAIJ` matrix describing the blockwise action of the `MATMAIJ` matrix\n\nNot Collective, but if the `MATMAIJ` matrix is parallel, the `MATAIJ` matrix is also parallel\n\nInput Parameter:\n- `A` - the `MATMAIJ` matrix\n\nOutput Parameter:\n- `B` - the `MATAIJ` matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMAIJ`, `MATAIJ`, `MatCreateMAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatMAIJGetAIJ\"))\n\"\"\"\nfunction MatMAIJGetAIJ(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatMAIJGetAIJ(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatMAIJGetAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMAIJRedimension(petsclib::PetscLibType,A::PetscMat, dof::PetscInt, B::PetscMat) \nGet a new `MATMAIJ` matrix with the same action, but for a different block size\n\nLogically Collective\n\nInput Parameters:\n- `A`   - the `MATMAIJ` matrix\n- `dof` - the block size for the new matrix\n\nOutput Parameter:\n- `B` - the new `MATMAIJ` matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMAIJ`, `MatCreateMAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatMAIJRedimension\"))\n\"\"\"\nfunction MatMAIJRedimension(petsclib::PetscLibType, A::PetscMat, dof::PetscInt, B::PetscMat) end\n\n@for_petsc function MatMAIJRedimension(petsclib::$UnionPetscLib, A::PetscMat, dof::$PetscInt, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatMAIJRedimension, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CMat}),\n               A, dof, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaij::PetscMat = MatCreateMAIJ(petsclib::PetscLibType,A::PetscMat, dof::PetscInt) \nCreates a matrix type providing restriction and interpolation\noperations for multicomponent problems.  It interpolates each component the same\nway independently.  The matrix type is based on `MATSEQAIJ` for sequential matrices,\nand `MATMPIAIJ` for distributed matrices.\n\nCollective\n\nInput Parameters:\n- `A`   - the `MATAIJ` matrix describing the action on blocks\n- `dof` - the block size (number of components per node)\n\nOutput Parameter:\n- `maij` - the new `MATMAIJ` matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATAIJ`, `MATMAIJ`, `MatMAIJGetAIJ()`, `MatMAIJRedimension()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMAIJ\"))\n\"\"\"\nfunction MatCreateMAIJ(petsclib::PetscLibType, A::PetscMat, dof::PetscInt) end\n\n@for_petsc function MatCreateMAIJ(petsclib::$UnionPetscLib, A::PetscMat, dof::$PetscInt )\n\tmaij_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CMat}),\n               A, dof, maij_,\n              )\n\n\tmaij = PetscMat(maij_[], petsclib)\n\n\treturn maij\nend \n\n\"\"\"\n\tflg::PetscBool = MatISGetAllowRepeated(petsclib::PetscLibType,A::PetscMat) \nGet the flag to allow repeated entries in the local to global map\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `flg` - the boolean flag\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateIS()`, `MatSetLocalToGlobalMapping()`, `MatISSetAllowRepeated()`\n\n# External Links\n$(_doc_external(\"Mat/MatISGetAllowRepeated\"))\n\"\"\"\nfunction MatISGetAllowRepeated(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatISGetAllowRepeated(petsclib::$UnionPetscLib, A::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatISGetAllowRepeated, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               A, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatISSetAllowRepeated(petsclib::PetscLibType,A::PetscMat, flg::PetscBool) \nSet the flag to allow repeated entries in the local to global map\n\nLogically Collective\n\nInput Parameters:\n- `A`   - the matrix\n- `flg` - the boolean flag\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateIS()`, `MatSetLocalToGlobalMapping()`, `MatISGetAllowRepeated()`\n\n# External Links\n$(_doc_external(\"Mat/MatISSetAllowRepeated\"))\n\"\"\"\nfunction MatISSetAllowRepeated(petsclib::PetscLibType, A::PetscMat, flg::PetscBool) end\n\n@for_petsc function MatISSetAllowRepeated(petsclib::$UnionPetscLib, A::PetscMat, flg::PetscBool )\n\n    @chk ccall(\n               (:MatISSetAllowRepeated, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatISStoreL2L(petsclib::PetscLibType,A::PetscMat, store::PetscBool) \nStore local\n\nLogically Collective\n\nInput Parameters:\n- `A`     - the matrix\n- `store` - the boolean flag\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateIS()`, `MatISSetPreallocation()`, `MatPtAP()`\n\n# External Links\n$(_doc_external(\"Mat/MatISStoreL2L\"))\n\"\"\"\nfunction MatISStoreL2L(petsclib::PetscLibType, A::PetscMat, store::PetscBool) end\n\n@for_petsc function MatISStoreL2L(petsclib::$UnionPetscLib, A::PetscMat, store::PetscBool )\n\n    @chk ccall(\n               (:MatISStoreL2L, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, store,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatISFixLocalEmpty(petsclib::PetscLibType,A::PetscMat, fix::PetscBool) \nCompress out zero local rows from the local matrices\n\nLogically Collective\n\nInput Parameters:\n- `A`   - the matrix\n- `fix` - the boolean flag\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATIS`, `MatCreate()`, `MatCreateIS()`, `MatISSetPreallocation()`, `MatAssemblyEnd()`, `MAT_FINAL_ASSEMBLY`\n\n# External Links\n$(_doc_external(\"Mat/MatISFixLocalEmpty\"))\n\"\"\"\nfunction MatISFixLocalEmpty(petsclib::PetscLibType, A::PetscMat, fix::PetscBool) end\n\n@for_petsc function MatISFixLocalEmpty(petsclib::$UnionPetscLib, A::PetscMat, fix::PetscBool )\n\n    @chk ccall(\n               (:MatISFixLocalEmpty, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, fix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatISSetPreallocation(petsclib::PetscLibType,B::PetscMat, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nPreallocates memory for a `MATIS` parallel matrix.\n\nCollective\n\nInput Parameters:\n- `B`     - the matrix\n- `d_nz`  - number of nonzeros per row in DIAGONAL portion of local submatrix\n(same value is used for all local rows)\n- `d_nnz` - array containing the number of nonzeros in the various rows of the\nDIAGONAL portion of the local submatrix (possibly different for each row)\nor `NULL`, if `d_nz` is used to specify the nonzero structure.\nThe size of this array is equal to the number of local rows, i.e `m`.\nFor matrices that will be factored, you must leave room for (and set)\nthe diagonal entry even if it is zero.\n- `o_nz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local\nsubmatrix (same value is used for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various rows of the\nOFF-DIAGONAL portion of the local submatrix (possibly different for\neach row) or `NULL`, if `o_nz` is used to specify the nonzero\nstructure. The size of this array is equal to the number\nof local rows, i.e `m`.\n\nIf the *_nnz parameter is given then the *_nz parameter is ignored\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateIS()`, `MatMPIAIJSetPreallocation()`, `MatISGetLocalMat()`, `MATIS`\n\n# External Links\n$(_doc_external(\"Mat/MatISSetPreallocation\"))\n\"\"\"\nfunction MatISSetPreallocation(petsclib::PetscLibType, B::PetscMat, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatISSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, d_nz::$PetscInt, d_nnz::Union{Ptr,Vector{$PetscInt}}, o_nz::$PetscInt, o_nnz::Union{Ptr,Vector{$PetscInt}})\n\n    @chk ccall(\n               (:MatISSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               B, d_nz, d_nnz, o_nz, o_nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatISGetLocalMat(petsclib::PetscLibType,mat::PetscMat, loc::PetscMat) \nGets the local matrix stored inside a `MATIS` matrix.\n\nNot Collective.\n\nInput Parameter:\n- `mat` - the matrix\n\nOutput Parameter:\n- `local` - the local matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATIS`, `MatISRestoreLocalMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatISGetLocalMat\"))\n\"\"\"\nfunction MatISGetLocalMat(petsclib::PetscLibType, mat::PetscMat, loc::PetscMat) end\n\n@for_petsc function MatISGetLocalMat(petsclib::$UnionPetscLib, mat::PetscMat, loc::PetscMat )\n\tloc_ = Ref(loc.ptr)\n\n    @chk ccall(\n               (:MatISGetLocalMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               mat, loc_,\n              )\n\n\tloc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatISRestoreLocalMat(petsclib::PetscLibType,mat::PetscMat, loc::PetscMat) \nRestores the local matrix obtained with `MatISGetLocalMat()`\n\nNot Collective.\n\nInput Parameters:\n- `mat`   - the matrix\n- `local` - the local matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATIS`, `MatISGetLocalMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatISRestoreLocalMat\"))\n\"\"\"\nfunction MatISRestoreLocalMat(petsclib::PetscLibType, mat::PetscMat, loc::PetscMat) end\n\n@for_petsc function MatISRestoreLocalMat(petsclib::$UnionPetscLib, mat::PetscMat, loc::PetscMat )\n\tloc_ = Ref(loc.ptr)\n\n    @chk ccall(\n               (:MatISRestoreLocalMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               mat, loc_,\n              )\n\n\tloc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatISSetLocalMatType(petsclib::PetscLibType,mat::PetscMat, mtype::MatType) \nSpecifies the type of local matrix inside the `MATIS`\n\nLogically Collective.\n\nInput Parameters:\n- `mat`   - the matrix\n- `mtype` - the local matrix type\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATIS`, `MatSetType()`, `MatType`\n\n# External Links\n$(_doc_external(\"Mat/MatISSetLocalMatType\"))\n\"\"\"\nfunction MatISSetLocalMatType(petsclib::PetscLibType, mat::PetscMat, mtype::MatType) end\n\n@for_petsc function MatISSetLocalMatType(petsclib::$UnionPetscLib, mat::PetscMat, mtype::MatType )\n\n    @chk ccall(\n               (:MatISSetLocalMatType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatType),\n               mat, mtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatISSetLocalMat(petsclib::PetscLibType,mat::PetscMat, loc::PetscMat) \nReplace the local matrix stored inside a `MATIS` object.\n\nNot Collective\n\nInput Parameters:\n- `mat`   - the matrix\n- `local` - the local matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATIS`, `MatISSetLocalMatType`, `MatISGetLocalMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatISSetLocalMat\"))\n\"\"\"\nfunction MatISSetLocalMat(petsclib::PetscLibType, mat::PetscMat, loc::PetscMat) end\n\n@for_petsc function MatISSetLocalMat(petsclib::$UnionPetscLib, mat::PetscMat, loc::PetscMat )\n\n    @chk ccall(\n               (:MatISSetLocalMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               mat, loc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateIS(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, rmap::ISLocalToGlobalMapping, cmap::ISLocalToGlobalMapping) \nCreates a \"process\" unassembled matrix.\n\nCollective.\n\nInput Parameters:\n- `comm` - MPI communicator that will share the matrix\n- `bs`   - block size of the matrix\n- `m`    - local size of left vector used in matrix vector products\n- `n`    - local size of right vector used in matrix vector products\n- `M`    - global size of left vector used in matrix vector products\n- `N`    - global size of right vector used in matrix vector products\n- `rmap` - local to global map for rows\n- `cmap` - local to global map for cols\n\nOutput Parameter:\n- `A` - the resulting matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATIS`, `MatSetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateIS\"))\n\"\"\"\nfunction MatCreateIS(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, rmap::ISLocalToGlobalMapping, cmap::ISLocalToGlobalMapping) end\n\n@for_petsc function MatCreateIS(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, rmap::ISLocalToGlobalMapping, cmap::ISLocalToGlobalMapping )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateIS, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, ISLocalToGlobalMapping, ISLocalToGlobalMapping, Ptr{CMat}),\n               comm, bs, m, n, M, N, rmap, cmap, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatISGetLocalToGlobalMapping(petsclib::PetscLibType,A::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping) \nGets the local\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameters:\n- `rmapping` - row mapping\n- `cmapping` - column mapping\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATIS`, `MatSetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"Mat/MatISGetLocalToGlobalMapping\"))\n\"\"\"\nfunction MatISGetLocalToGlobalMapping(petsclib::PetscLibType, A::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping) end\n\n@for_petsc function MatISGetLocalToGlobalMapping(petsclib::$UnionPetscLib, A::PetscMat, rmapping::ISLocalToGlobalMapping, cmapping::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:MatISGetLocalToGlobalMapping, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{ISLocalToGlobalMapping}, Ptr{ISLocalToGlobalMapping}),\n               A, rmapping, cmapping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHermitianTransposeGetMat(petsclib::PetscLibType,A::PetscMat, M::PetscMat) \nGets the `Mat` object stored inside a `MATHERMITIANTRANSPOSEVIRTUAL`\n\nLogically Collective\n\nInput Parameter:\n- `A` - the `MATHERMITIANTRANSPOSEVIRTUAL` matrix\n\nOutput Parameter:\n- `M` - the matrix object stored inside A\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATHERMITIANTRANSPOSEVIRTUAL`, `MatCreateHermitianTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatHermitianTransposeGetMat\"))\n\"\"\"\nfunction MatHermitianTransposeGetMat(petsclib::PetscLibType, A::PetscMat, M::PetscMat) end\n\n@for_petsc function MatHermitianTransposeGetMat(petsclib::$UnionPetscLib, A::PetscMat, M::PetscMat )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:MatHermitianTransposeGetMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, M_,\n              )\n\n\tM.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscMat = MatCreateHermitianTranspose(petsclib::PetscLibType,A::PetscMat) \nCreates a new matrix object of `MatType` `MATHERMITIANTRANSPOSEVIRTUAL` that behaves like A'*\n\nCollective\n\nInput Parameter:\n- `A` - the (possibly rectangular) matrix\n\nOutput Parameter:\n- `N` - the matrix that represents A'*\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateNormal()`, `MatMult()`, `MatMultHermitianTranspose()`, `MatCreate()`,\n`MATTRANSPOSEVIRTUAL`, `MatCreateTranspose()`, `MatHermitianTransposeGetMat()`, `MATNORMAL`, `MATNORMALHERMITIAN`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateHermitianTranspose\"))\n\"\"\"\nfunction MatCreateHermitianTranspose(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatCreateHermitianTranspose(petsclib::$UnionPetscLib, A::PetscMat )\n\tN_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateHermitianTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, N_,\n              )\n\n\tN = PetscMat(N_[], petsclib)\n\n\treturn N\nend \n\n\"\"\"\n\tMatTransposeGetMat(petsclib::PetscLibType,A::PetscMat, M::PetscMat) \nGets the `Mat` object stored inside a `MATTRANSPOSEVIRTUAL`\n\nLogically Collective\n\nInput Parameter:\n- `A` - the `MATTRANSPOSEVIRTUAL` matrix\n\nOutput Parameter:\n- `M` - the matrix object stored inside `A`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATTRANSPOSEVIRTUAL`, `MatCreateTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatTransposeGetMat\"))\n\"\"\"\nfunction MatTransposeGetMat(petsclib::PetscLibType, A::PetscMat, M::PetscMat) end\n\n@for_petsc function MatTransposeGetMat(petsclib::$UnionPetscLib, A::PetscMat, M::PetscMat )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:MatTransposeGetMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, M_,\n              )\n\n\tM.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscMat = MatCreateTranspose(petsclib::PetscLibType,A::PetscMat) \nCreates a new matrix `MATTRANSPOSEVIRTUAL` object that behaves like A'\n\nCollective\n\nInput Parameter:\n- `A` - the (possibly rectangular) matrix\n\nOutput Parameter:\n- `N` - the matrix that represents A'\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATTRANSPOSEVIRTUAL`, `MatCreateNormal()`, `MatMult()`, `MatMultTranspose()`, `MatCreate()`,\n`MATNORMALHERMITIAN`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateTranspose\"))\n\"\"\"\nfunction MatCreateTranspose(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatCreateTranspose(petsclib::$UnionPetscLib, A::PetscMat )\n\tN_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, N_,\n              )\n\n\tN = PetscMat(N_[], petsclib)\n\n\treturn N\nend \n\n\"\"\"\n\tMatDenseGetLocalMatrix(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nFor a `MATMPIDENSE` or `MATSEQDENSE` matrix returns the sequential\nmatrix that represents the operator. For sequential matrices it returns itself.\n\nInput Parameter:\n- `A` - the sequential or MPI `MATDENSE` matrix\n\nOutput Parameter:\n- `B` - the inner matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATMPIDENSE`, `MATSEQDENSE`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetLocalMatrix\"))\n\"\"\"\nfunction MatDenseGetLocalMatrix(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatDenseGetLocalMatrix(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatDenseGetLocalMatrix, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIDenseSetPreallocation(petsclib::PetscLibType,B::PetscMat, data::PetscScalar) \nSets the array used to store the matrix entries\n\nCollective\n\nInput Parameters:\n- `B`    - the matrix\n- `data` - optional location of matrix data.  Set to `NULL` for PETSc\nto control all matrix memory allocation.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIDENSE`, `MatCreate()`, `MatCreateSeqDense()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIDenseSetPreallocation\"))\n\"\"\"\nfunction MatMPIDenseSetPreallocation(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatMPIDenseSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, data::Union{Ptr,$PetscScalar} )\n\n    @chk ccall(\n               (:MatMPIDenseSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscScalar),\n               B, data,\n              )\n\n\treturn nothing\nend \n\n\"\"\"\n\tarray::PetscScalar = MatDensePlaceArray(petsclib::PetscLibType,mat::PetscMat) \nAllows one to replace the array in a `MATDENSE` matrix with an\narray provided by the user. This is useful to avoid copying an array\ninto a matrix\n\nNot Collective\n\nInput Parameters:\n- `mat`   - the matrix\n- `array` - the array in column major order\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArray()`, `MatDenseResetArray()`, `VecPlaceArray()`, `VecGetArray()`, `VecRestoreArray()`, `VecReplaceArray()`, `VecResetArray()`,\n`MatDenseReplaceArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatDensePlaceArray\"))\n\"\"\"\nfunction MatDensePlaceArray(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatDensePlaceArray(petsclib::$UnionPetscLib, mat::PetscMat )\n\tarray_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatDensePlaceArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               mat, array_,\n              )\n\n\tarray = array_[]\n\n\treturn array\nend \n\n\"\"\"\n\tMatDenseResetArray(petsclib::PetscLibType,mat::PetscMat) \nResets the matrix array to that it previously had before the call to `MatDensePlaceArray()`\n\nNot Collective\n\nInput Parameter:\n- `mat` - the matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArray()`, `MatDensePlaceArray()`, `VecPlaceArray()`, `VecGetArray()`, `VecRestoreArray()`, `VecReplaceArray()`, `VecResetArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseResetArray\"))\n\"\"\"\nfunction MatDenseResetArray(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatDenseResetArray(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatDenseResetArray, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tarray::PetscScalar = MatDenseReplaceArray(petsclib::PetscLibType,mat::PetscMat) \nAllows one to replace the array in a dense matrix with an\narray provided by the user. This is useful to avoid copying an array\ninto a matrix\n\nNot Collective\n\nInput Parameters:\n- `mat`   - the matrix\n- `array` - the array in column major order\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatDensePlaceArray()`, `MatDenseGetArray()`, `VecReplaceArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseReplaceArray\"))\n\"\"\"\nfunction MatDenseReplaceArray(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatDenseReplaceArray(petsclib::$UnionPetscLib, mat::PetscMat )\n\tarray_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatDenseReplaceArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               mat, array_,\n              )\n\n\tarray = array_[]\n\n\treturn array\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateDense(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, data::Union{Ptr,Vector{PetscScalar}}) \nCreates a matrix in `MATDENSE` format.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `m`    - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)\n- `n`    - number of local columns (or `PETSC_DECIDE` to have calculated if `N` is given)\n- `M`    - number of global rows (or `PETSC_DECIDE` to have calculated if `m` is given)\n- `N`    - number of global columns (or `PETSC_DECIDE` to have calculated if `n` is given)\n- `data` - optional location of matrix data.  Set data to `NULL` (`PETSC_NULL_SCALAR_ARRAY` for Fortran users) for PETSc to control all matrix memory allocation.\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatCreate()`, `MatCreateSeqDense()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateDense\"))\n\"\"\"\nfunction MatCreateDense(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, data::Union{Ptr,Vector{PetscScalar}}) end\n\n@for_petsc function MatCreateDense(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, data::Union{Ptr,Vector{$PetscScalar}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateDense, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, m, n, M, N, data, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tlda::PetscInt = MatDenseGetLDA(petsclib::PetscLibType,A::PetscMat) \ngets the leading dimension of the array returned from `MatDenseGetArray()`\n\nNot Collective\n\nInput Parameter:\n- `A` - a `MATDENSE` or `MATDENSECUDA` matrix\n\nOutput Parameter:\n- `lda` - the leading dimension\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MatDenseGetArray()`, `MatDenseRestoreArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseSetLDA()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetLDA\"))\n\"\"\"\nfunction MatDenseGetLDA(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseGetLDA(petsclib::$UnionPetscLib, A::PetscMat )\n\tlda_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatDenseGetLDA, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               A, lda_,\n              )\n\n\tlda = lda_[]\n\n\treturn lda\nend \n\n\"\"\"\n\tMatDenseSetLDA(petsclib::PetscLibType,A::PetscMat, lda::PetscInt) \nSets the leading dimension of the array used by the `MATDENSE` matrix\n\nCollective if the matrix layouts have not yet been setup\n\nInput Parameters:\n- `A`   - a `MATDENSE` or `MATDENSECUDA` matrix\n- `lda` - the leading dimension\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MatDenseGetArray()`, `MatDenseRestoreArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseGetLDA()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseSetLDA\"))\n\"\"\"\nfunction MatDenseSetLDA(petsclib::PetscLibType, A::PetscMat, lda::PetscInt) end\n\n@for_petsc function MatDenseSetLDA(petsclib::$UnionPetscLib, A::PetscMat, lda::$PetscInt )\n\n    @chk ccall(\n               (:MatDenseSetLDA, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               A, lda,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseGetArray(petsclib::PetscLibType,A::PetscMat) \ngives read\n\nLogically Collective\n\nInput Parameter:\n- `A` - a dense matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseRestoreArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetArray\"))\n\"\"\"\nfunction MatDenseGetArray(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseGetArray(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n\n    # 1. Get the raw pointer from PETSc\n    @chk ccall(\n               (:MatDenseGetArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n    # 2. Use the existing helper to get dimensions (no Refs needed here!)\n    m, n = MatGetLocalSize(petsclib, A)\n\n    # 3. Wrap the pointer in a Julia Array. \n    # PETSc dense matrices are column-major, matching Julia's layout perfectly.\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n\n\n    return array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseRestoreArray(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array where the data for a `MATDENSE` matrix is stored obtained by `MatDenseGetArray()`\n\nLogically Collective\n\nInput Parameters:\n- `A`     - a dense matrix\n- `array` - pointer to the data (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreArray\"))\n\"\"\"\nfunction MatDenseRestoreArray(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseRestoreArray(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, ptr_ref,\n              )\n    return nothing\nend\n\n@for_petsc function MatDenseRestoreArray(petsclib::$UnionPetscLib, A::PetscMat, array::Array{$PetscScalar})\n    # Create a temporary Ref to the array's internal pointer to satisfy the ** signature\n    ptr_ref = Ref(pointer(array))\n    \n    @chk ccall(\n               (:MatDenseRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, ptr_ref,\n              )\n    return nothing\nend\n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseGetArrayRead(petsclib::PetscLibType,A::PetscMat) \ngives read\n\nNot Collective\n\nInput Parameter:\n- `A` - a dense matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseRestoreArrayRead()`, `MatDenseGetArray()`, `MatDenseRestoreArray()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetArrayRead\"))\n\"\"\"\nfunction MatDenseGetArrayRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseGetArrayRead(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseGetArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n\n    return array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseRestoreArrayRead(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array where the data for a `MATDENSE` matrix is stored obtained by `MatDenseGetArrayRead()`\n\nNot Collective\n\nInput Parameters:\n- `A`     - a dense matrix\n- `array` - pointer to the data (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArrayRead()`, `MatDenseGetArray()`, `MatDenseRestoreArray()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreArrayRead\"))\n\"\"\"\nfunction MatDenseRestoreArrayRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseRestoreArrayRead(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseRestoreArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n\n    return array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseGetArrayWrite(petsclib::PetscLibType,A::PetscMat) \ngives write\n\nNot Collective\n\nInput Parameter:\n- `A` - a dense matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseRestoreArrayWrite()`, `MatDenseGetArray()`, `MatDenseRestoreArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetArrayWrite\"))\n\"\"\"\nfunction MatDenseGetArrayWrite(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseGetArrayWrite(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseGetArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n\n    return array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseRestoreArrayWrite(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array where the data for a `MATDENSE` matrix is stored obtained by `MatDenseGetArrayWrite()`\n\nNot Collective\n\nInput Parameters:\n- `A`     - a dense matrix\n- `array` - pointer to the data (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArrayWrite()`, `MatDenseGetArray()`, `MatDenseRestoreArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreArrayWrite\"))\n\"\"\"\nfunction MatDenseRestoreArrayWrite(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseRestoreArrayWrite(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseRestoreArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n\n    return array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar},mtype::PetscMemType = MatDenseGetArrayAndMemType(petsclib::PetscLibType,A::PetscMat) \ngives read\n\nLogically Collective\n\nInput Parameter:\n- `A` - a dense matrix\n\nOutput Parameters:\n- `array` - pointer to the data\n- `mtype` - memory type of the returned pointer\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseRestoreArrayAndMemType()`, `MatDenseGetArrayReadAndMemType()`, `MatDenseGetArrayWriteAndMemType()`, `MatDenseGetArrayRead()`,\n`MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`, `MatSeqAIJGetCSRAndMemType()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetArrayAndMemType\"))\n\"\"\"\nfunction MatDenseGetArrayAndMemType(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseGetArrayAndMemType(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n    mtype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:MatDenseGetArrayAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}, Ptr{PetscMemType}),\n               A, array_, mtype_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n    return array, mtype_[]\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseRestoreArrayAndMemType(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array that is obtained by `MatDenseGetArrayAndMemType()`\n\nLogically Collective\n\nInput Parameters:\n- `A`     - a dense matrix\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArrayAndMemType()`, `MatDenseGetArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreArrayAndMemType\"))\n\"\"\"\nfunction MatDenseRestoreArrayAndMemType(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseRestoreArrayAndMemType(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseRestoreArrayAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n\n    return array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar},mtype::PetscMemType = MatDenseGetArrayReadAndMemType(petsclib::PetscLibType,A::PetscMat) \ngives read\n\nLogically Collective\n\nInput Parameter:\n- `A` - a dense matrix\n\nOutput Parameters:\n- `array` - pointer to the data\n- `mtype` - memory type of the returned pointer\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseRestoreArrayReadAndMemType()`, `MatDenseGetArrayWriteAndMemType()`,\n`MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`, `MatSeqAIJGetCSRAndMemType()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetArrayReadAndMemType\"))\n\"\"\"\nfunction MatDenseGetArrayReadAndMemType(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseGetArrayReadAndMemType(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n    mtype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:MatDenseGetArrayReadAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}, Ptr{PetscMemType}),\n               A, array_, mtype_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n    return array, mtype_[]\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseRestoreArrayReadAndMemType(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array that is obtained by `MatDenseGetArrayReadAndMemType()`\n\nLogically Collective\n\nInput Parameters:\n- `A`     - a dense matrix\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArrayReadAndMemType()`, `MatDenseGetArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreArrayReadAndMemType\"))\n\"\"\"\nfunction MatDenseRestoreArrayReadAndMemType(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseRestoreArrayReadAndMemType(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseRestoreArrayReadAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar},mtype::PetscMemType = MatDenseGetArrayWriteAndMemType(petsclib::PetscLibType,A::PetscMat) \ngives write\n\nLogically Collective\n\nInput Parameter:\n- `A` - a dense matrix\n\nOutput Parameters:\n- `array` - pointer to the data\n- `mtype` - memory type of the returned pointer\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseRestoreArrayWriteAndMemType()`, `MatDenseGetArrayReadAndMemType()`, `MatDenseGetArrayRead()`,\n`MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`, `MatSeqAIJGetCSRAndMemType()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetArrayWriteAndMemType\"))\n\"\"\"\nfunction MatDenseGetArrayWriteAndMemType(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseGetArrayWriteAndMemType(petsclib::$UnionPetscLib, A::PetscMat )\n    array_ = Ref{Ptr{$PetscScalar}}()\n    mtype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:MatDenseGetArrayWriteAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}, Ptr{PetscMemType}),\n               A, array_, mtype_,\n              )\n\n    m, n = MatGetLocalSize(petsclib, A)\n    array = unsafe_wrap(Array, array_[], (Int(m), Int(n)); own = false)\n    return array, mtype_[]\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatDenseRestoreArrayWriteAndMemType(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array that is obtained by `MatDenseGetArrayReadAndMemType()`\n\nLogically Collective\n\nInput Parameters:\n- `A`     - a dense matrix\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetArrayWriteAndMemType()`, `MatDenseGetArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseGetArrayWrite()`, `MatDenseRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreArrayWriteAndMemType\"))\n\"\"\"\nfunction MatDenseRestoreArrayWriteAndMemType(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseRestoreArrayWriteAndMemType(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseRestoreArrayWriteAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqDense(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, data::Vector{PetscScalar}) \nCreates a `MATSEQDENSE` that\nis stored in column major order (the usual Fortran format).\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`    - number of rows\n- `n`    - number of columns\n- `data` - optional location of matrix data in column major order.  Use `NULL` for PETSc to control all matrix memory allocation.\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQDENSE`, `MatCreate()`, `MatCreateDense()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqDense\"))\n\"\"\"\nfunction MatCreateSeqDense(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, data::Union{Ptr,Vector{PetscScalar}}) end\n\n@for_petsc function MatCreateSeqDense(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, data::Union{Ptr,Vector{$PetscScalar}})\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqDense, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, m, n, data, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatSeqDenseSetPreallocation(petsclib::PetscLibType,B::PetscMat, data::Vector{PetscScalar}) \nSets the array used for storing the matrix elements of a `MATSEQDENSE` matrix\n\nCollective\n\nInput Parameters:\n- `B`    - the matrix\n- `data` - the array (or `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQDENSE`, `MatCreate()`, `MatCreateDense()`, `MatSetValues()`, `MatDenseSetLDA()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqDenseSetPreallocation\"))\n\"\"\"\nfunction MatSeqDenseSetPreallocation(petsclib::PetscLibType, B::PetscMat, data::Vector{PetscScalar}) end\n\n@for_petsc function MatSeqDenseSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, data::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatSeqDenseSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               B, data,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvals::Vector{PetscScalar} = MatDenseGetColumn(petsclib::PetscLibType,A::PetscMat, col::PetscInt) \ngives access to a column of a dense matrix. This is only the local part of the column. You MUST call `MatDenseRestoreColumn()` to avoid memory bleeding.\n\nNot Collective\n\nInput Parameters:\n- `A`   - a `MATSEQDENSE` or `MATMPIDENSE` matrix\n- `col` - column index\n\nOutput Parameter:\n- `vals` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseRestoreColumn()`, `MatDenseGetColumnVec()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetColumn\"))\n\"\"\"\nfunction MatDenseGetColumn(petsclib::PetscLibType, A::PetscMat, col::PetscInt) end\n\n@for_petsc function MatDenseGetColumn(petsclib::$UnionPetscLib, A::PetscMat, col::$PetscInt )\n\tvals_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseGetColumn, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{Ptr{$PetscScalar}}),\n               A, col, vals_,\n              )\n\n\tvals = unsafe_wrap(Array, vals_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn vals\nend \n\n\"\"\"\n\tvals::Vector{PetscScalar} = MatDenseRestoreColumn(petsclib::PetscLibType,A::PetscMat) \nreturns access to a column of a `MATDENSE` matrix which is returned by `MatDenseGetColumn()`.\n\nNot Collective\n\nInput Parameters:\n- `A`    - a `MATSEQDENSE` or `MATMPIDENSE` matrix\n- `vals` - pointer to the data (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MatDenseGetColumn()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreColumn\"))\n\"\"\"\nfunction MatDenseRestoreColumn(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatDenseRestoreColumn(petsclib::$UnionPetscLib, A::PetscMat )\n\tvals_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatDenseRestoreColumn, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, vals_,\n              )\n\n\tvals = unsafe_wrap(Array, vals_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn vals\nend \n\n\"\"\"\n\tMatDenseGetColumnVec(petsclib::PetscLibType,A::PetscMat, col::PetscInt, v::PetscVec) \nGives read\n\nCollective\n\nInput Parameters:\n- `A`   - the `Mat` object\n- `col` - the column index\n\nOutput Parameter:\n- `v` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVecRead()`, `MatDenseGetColumnVecWrite()`, `MatDenseRestoreColumnVec()`, `MatDenseRestoreColumnVecRead()`, `MatDenseRestoreColumnVecWrite()`, `MatDenseGetColumn()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetColumnVec\"))\n\"\"\"\nfunction MatDenseGetColumnVec(petsclib::PetscLibType, A::PetscMat, col::PetscInt, v::PetscVec) end\n\n@for_petsc function MatDenseGetColumnVec(petsclib::$UnionPetscLib, A::PetscMat, col::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseGetColumnVec, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CVec}),\n               A, col, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDenseRestoreColumnVec(petsclib::PetscLibType,A::PetscMat, col::PetscInt, v::PetscVec) \nReturns access to a column of a dense matrix obtained from `MatDenseGetColumnVec()`.\n\nCollective\n\nInput Parameters:\n- `A`   - the `Mat` object\n- `col` - the column index\n- `v`   - the `Vec` object (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseGetColumnVecRead()`, `MatDenseGetColumnVecWrite()`, `MatDenseRestoreColumnVecRead()`, `MatDenseRestoreColumnVecWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreColumnVec\"))\n\"\"\"\nfunction MatDenseRestoreColumnVec(petsclib::PetscLibType, A::PetscMat, col::PetscInt, v::PetscVec) end\n\n@for_petsc function MatDenseRestoreColumnVec(petsclib::$UnionPetscLib, A::PetscMat, col::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseRestoreColumnVec, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CVec}),\n               A, col, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDenseGetColumnVecRead(petsclib::PetscLibType,A::PetscMat, col::PetscInt, v::PetscVec) \nGives read\n\nCollective\n\nInput Parameters:\n- `A`   - the `Mat` object\n- `col` - the column index\n\nOutput Parameter:\n- `v` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseGetColumnVecWrite()`, `MatDenseRestoreColumnVec()`, `MatDenseRestoreColumnVecRead()`, `MatDenseRestoreColumnVecWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetColumnVecRead\"))\n\"\"\"\nfunction MatDenseGetColumnVecRead(petsclib::PetscLibType, A::PetscMat, col::PetscInt, v::PetscVec) end\n\n@for_petsc function MatDenseGetColumnVecRead(petsclib::$UnionPetscLib, A::PetscMat, col::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseGetColumnVecRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CVec}),\n               A, col, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDenseRestoreColumnVecRead(petsclib::PetscLibType,A::PetscMat, col::PetscInt, v::PetscVec) \nReturns access to a column of a dense matrix obtained from `MatDenseGetColumnVecRead()`.\n\nCollective\n\nInput Parameters:\n- `A`   - the `Mat` object\n- `col` - the column index\n- `v`   - the `Vec` object (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseGetColumnVecRead()`, `MatDenseGetColumnVecWrite()`, `MatDenseRestoreColumnVec()`, `MatDenseRestoreColumnVecWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreColumnVecRead\"))\n\"\"\"\nfunction MatDenseRestoreColumnVecRead(petsclib::PetscLibType, A::PetscMat, col::PetscInt, v::PetscVec) end\n\n@for_petsc function MatDenseRestoreColumnVecRead(petsclib::$UnionPetscLib, A::PetscMat, col::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseRestoreColumnVecRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CVec}),\n               A, col, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDenseGetColumnVecWrite(petsclib::PetscLibType,A::PetscMat, col::PetscInt, v::PetscVec) \nGives write\n\nCollective\n\nInput Parameters:\n- `A`   - the `Mat` object\n- `col` - the column index\n\nOutput Parameter:\n- `v` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseGetColumnVecRead()`, `MatDenseRestoreColumnVec()`, `MatDenseRestoreColumnVecRead()`, `MatDenseRestoreColumnVecWrite()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetColumnVecWrite\"))\n\"\"\"\nfunction MatDenseGetColumnVecWrite(petsclib::PetscLibType, A::PetscMat, col::PetscInt, v::PetscVec) end\n\n@for_petsc function MatDenseGetColumnVecWrite(petsclib::$UnionPetscLib, A::PetscMat, col::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseGetColumnVecWrite, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CVec}),\n               A, col, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDenseRestoreColumnVecWrite(petsclib::PetscLibType,A::PetscMat, col::PetscInt, v::PetscVec) \nReturns access to a column of a dense matrix obtained from `MatDenseGetColumnVecWrite()`.\n\nCollective\n\nInput Parameters:\n- `A`   - the `Mat` object\n- `col` - the column index\n- `v`   - the `Vec` object (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseGetColumnVecRead()`, `MatDenseGetColumnVecWrite()`, `MatDenseRestoreColumnVec()`, `MatDenseRestoreColumnVecRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreColumnVecWrite\"))\n\"\"\"\nfunction MatDenseRestoreColumnVecWrite(petsclib::PetscLibType, A::PetscMat, col::PetscInt, v::PetscVec) end\n\n@for_petsc function MatDenseRestoreColumnVecWrite(petsclib::$UnionPetscLib, A::PetscMat, col::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseRestoreColumnVecWrite, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CVec}),\n               A, col, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDenseGetSubMatrix(petsclib::PetscLibType,A::PetscMat, rbegin::PetscInt, rend::PetscInt, cbegin::PetscInt, cend::PetscInt, v::PetscMat) \nGives access to a block of rows and columns of a dense matrix, represented as a `Mat`.\n\nCollective\n\nInput Parameters:\n- `A`      - the `Mat` object\n- `rbegin` - the first global row index in the block (if `PETSC_DECIDE`, is 0)\n- `rend`   - the global row index past the last one in the block (if `PETSC_DECIDE`, is `M`)\n- `cbegin` - the first global column index in the block (if `PETSC_DECIDE`, is 0)\n- `cend`   - the global column index past the last one in the block (if `PETSC_DECIDE`, is `N`)\n\nOutput Parameter:\n- `v` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseRestoreColumnVec()`, `MatDenseRestoreSubMatrix()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseGetSubMatrix\"))\n\"\"\"\nfunction MatDenseGetSubMatrix(petsclib::PetscLibType, A::PetscMat, rbegin::PetscInt, rend::PetscInt, cbegin::PetscInt, cend::PetscInt, v::PetscMat) end\n\n@for_petsc function MatDenseGetSubMatrix(petsclib::$UnionPetscLib, A::PetscMat, rbegin::$PetscInt, rend::$PetscInt, cbegin::$PetscInt, cend::$PetscInt, v::PetscMat )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseGetSubMatrix, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{CMat}),\n               A, rbegin, rend, cbegin, cend, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDenseRestoreSubMatrix(petsclib::PetscLibType,A::PetscMat, v::PetscMat) \nReturns access to a block of columns of a dense matrix obtained from `MatDenseGetSubMatrix()`.\n\nCollective\n\nInput Parameters:\n- `A` - the `Mat` object\n- `v` - the `Mat` object (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseRestoreColumnVec()`, `MatDenseGetSubMatrix()`\n\n# External Links\n$(_doc_external(\"Mat/MatDenseRestoreSubMatrix\"))\n\"\"\"\nfunction MatDenseRestoreSubMatrix(petsclib::PetscLibType, A::PetscMat, v::PetscMat) end\n\n@for_petsc function MatDenseRestoreSubMatrix(petsclib::$UnionPetscLib, A::PetscMat, v::PetscMat )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:MatDenseRestoreSubMatrix, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqDenseInvert(petsclib::PetscLibType,A::PetscMat) \n\n# External Links\n$(_doc_external(\"Mat/MatSeqDenseInvert\"))\n\"\"\"\nfunction MatSeqDenseInvert(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqDenseInvert(petsclib::$UnionPetscLib, A::PetscMat )\n\n    @chk ccall(\n               (:MatSeqDenseInvert, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmats::PetscMat,mat::PetscMat = MatCreateComposite(petsclib::PetscLibType,comm::MPI_Comm, nmat::PetscInt) \nCreates a matrix as the sum or product of one or more matrices\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `nmat` - number of matrices to put in\n- `mats` - the matrices\n\nOutput Parameter:\n- `mat` - the matrix\n\nOptions Database Keys:\n- `-mat_composite_merge`       - merge in `MatAssemblyEnd()`\n- `-mat_composite_merge_mvctx` - merge Mvctx of component matrices to optimize communication in `MatMult()` for ADDITIVE matrices\n- `-mat_composite_merge_type`  - set merge direction\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroy()`, `MatMult()`, `MatCompositeAddMat()`, `MatCompositeGetMat()`, `MatCompositeMerge()`, `MatCompositeSetType()`,\n`MATCOMPOSITE`, `MatCompositeType`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateComposite\"))\n\"\"\"\nfunction MatCreateComposite(petsclib::PetscLibType, comm::MPI_Comm, nmat::PetscInt) end\n\n@for_petsc function MatCreateComposite(petsclib::$UnionPetscLib, comm::MPI_Comm, nmat::$PetscInt )\n\tmats_ = Ref{CMat}()\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateComposite, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{CMat}, Ptr{CMat}),\n               comm, nmat, mats_, mat_,\n              )\n\n\tmats = PetscMat(mats_[], petsclib)\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mats,mat\nend \n\n\"\"\"\n\tMatCompositeAddMat(petsclib::PetscLibType,mat::PetscMat, smat::PetscMat) \nAdd another matrix to a composite matrix.\n\nCollective\n\nInput Parameters:\n- `mat`  - the composite matrix\n- `smat` - the partial matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateComposite()`, `MatCompositeGetMat()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeAddMat\"))\n\"\"\"\nfunction MatCompositeAddMat(petsclib::PetscLibType, mat::PetscMat, smat::PetscMat) end\n\n@for_petsc function MatCompositeAddMat(petsclib::$UnionPetscLib, mat::PetscMat, smat::PetscMat )\n\n    @chk ccall(\n               (:MatCompositeAddMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               mat, smat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCompositeSetType(petsclib::PetscLibType,mat::PetscMat, type::MatCompositeType) \nIndicates if the matrix is defined as the sum of a set of matrices or the product.\n\nLogically Collective\n\nInput Parameters:\n- `mat`  - the composite matrix\n- `type` - the `MatCompositeType` to use for the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroy()`, `MatMult()`, `MatCompositeAddMat()`, `MatCreateComposite()`, `MatCompositeGetType()`, `MATCOMPOSITE`,\n`MatCompositeType`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeSetType\"))\n\"\"\"\nfunction MatCompositeSetType(petsclib::PetscLibType, mat::PetscMat, type::MatCompositeType) end\n\n@for_petsc function MatCompositeSetType(petsclib::$UnionPetscLib, mat::PetscMat, type::MatCompositeType )\n\n    @chk ccall(\n               (:MatCompositeSetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatCompositeType),\n               mat, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::MatCompositeType = MatCompositeGetType(petsclib::PetscLibType,mat::PetscMat) \nReturns type of composite.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the composite matrix\n\nOutput Parameter:\n- `type` - type of composite\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateComposite()`, `MatCompositeSetType()`, `MATCOMPOSITE`, `MatCompositeType`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeGetType\"))\n\"\"\"\nfunction MatCompositeGetType(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatCompositeGetType(petsclib::$UnionPetscLib, mat::PetscMat )\n\ttype_ = Ref{MatCompositeType}()\n\n    @chk ccall(\n               (:MatCompositeGetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatCompositeType}),\n               mat, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tMatCompositeSetMatStructure(petsclib::PetscLibType,mat::PetscMat, str::MatStructure) \nIndicates structure of matrices in the composite matrix.\n\nNot Collective\n\nInput Parameters:\n- `mat` - the composite matrix\n- `str` - either `SAME_NONZERO_PATTERN`, `DIFFERENT_NONZERO_PATTERN` (default) or `SUBSET_NONZERO_PATTERN`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatAXPY()`, `MatCreateComposite()`, `MatCompositeMerge()` `MatCompositeGetMatStructure()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeSetMatStructure\"))\n\"\"\"\nfunction MatCompositeSetMatStructure(petsclib::PetscLibType, mat::PetscMat, str::MatStructure) end\n\n@for_petsc function MatCompositeSetMatStructure(petsclib::$UnionPetscLib, mat::PetscMat, str::MatStructure )\n\n    @chk ccall(\n               (:MatCompositeSetMatStructure, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatStructure),\n               mat, str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCompositeGetMatStructure(petsclib::PetscLibType,mat::PetscMat, str::MatStructure) \nReturns the structure of matrices in the composite matrix.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the composite matrix\n\nOutput Parameter:\n- `str` - structure of the matrices\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateComposite()`, `MatCompositeSetMatStructure()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeGetMatStructure\"))\n\"\"\"\nfunction MatCompositeGetMatStructure(petsclib::PetscLibType, mat::PetscMat, str::MatStructure) end\n\n@for_petsc function MatCompositeGetMatStructure(petsclib::$UnionPetscLib, mat::PetscMat, str::MatStructure )\n\n    @chk ccall(\n               (:MatCompositeGetMatStructure, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatStructure}),\n               mat, str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCompositeSetMergeType(petsclib::PetscLibType,mat::PetscMat, type::MatCompositeMergeType) \nSets order of `MatCompositeMerge()`.\n\nLogically Collective\n\nInput Parameters:\n- `mat`  - the composite matrix\n- `type` - `MAT_COMPOSITE_MERGE RIGHT` (default) to start merge from right with the first added matrix (mat[0]),\n`MAT_COMPOSITE_MERGE_LEFT` to start merge from left with the last added matrix (mat[nmat-1])\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateComposite()`, `MatCompositeMerge()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeSetMergeType\"))\n\"\"\"\nfunction MatCompositeSetMergeType(petsclib::PetscLibType, mat::PetscMat, type::MatCompositeMergeType) end\n\n@for_petsc function MatCompositeSetMergeType(petsclib::$UnionPetscLib, mat::PetscMat, type::MatCompositeMergeType )\n\n    @chk ccall(\n               (:MatCompositeSetMergeType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatCompositeMergeType),\n               mat, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCompositeMerge(petsclib::PetscLibType,mat::PetscMat) \nGiven a composite matrix, replaces it with a \"regular\" matrix\nby summing or computing the product of all the matrices inside the composite matrix.\n\nCollective\n\nInput Parameter:\n- `mat` - the composite matrix\n\nOptions Database Keys:\n- `-mat_composite_merge`      - merge in `MatAssemblyEnd()`\n- `-mat_composite_merge_type` - set merge direction\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroy()`, `MatMult()`, `MatCompositeAddMat()`, `MatCreateComposite()`, `MatCompositeSetMatStructure()`, `MatCompositeSetMergeType()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeMerge\"))\n\"\"\"\nfunction MatCompositeMerge(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatCompositeMerge(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatCompositeMerge, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnmat::PetscInt = MatCompositeGetNumberMat(petsclib::PetscLibType,mat::PetscMat) \nReturns the number of matrices in the composite matrix.\n\nNot Collective\n\nInput Parameter:\n- `mat` - the composite matrix\n\nOutput Parameter:\n- `nmat` - number of matrices in the composite matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateComposite()`, `MatCompositeGetMat()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeGetNumberMat\"))\n\"\"\"\nfunction MatCompositeGetNumberMat(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatCompositeGetNumberMat(petsclib::$UnionPetscLib, mat::PetscMat )\n\tnmat_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatCompositeGetNumberMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               mat, nmat_,\n              )\n\n\tnmat = nmat_[]\n\n\treturn nmat\nend \n\n\"\"\"\n\tMatCompositeGetMat(petsclib::PetscLibType,mat::PetscMat, i::PetscInt, Ai::PetscMat) \nReturns the ith matrix from the composite matrix.\n\nLogically Collective\n\nInput Parameters:\n- `mat` - the composite matrix\n- `i`   - the number of requested matrix\n\nOutput Parameter:\n- `Ai` - ith matrix in composite\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateComposite()`, `MatCompositeGetNumberMat()`, `MatCompositeAddMat()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeGetMat\"))\n\"\"\"\nfunction MatCompositeGetMat(petsclib::PetscLibType, mat::PetscMat, i::PetscInt, Ai::PetscMat) end\n\n@for_petsc function MatCompositeGetMat(petsclib::$UnionPetscLib, mat::PetscMat, i::$PetscInt, Ai::PetscMat )\n\tAi_ = Ref(Ai.ptr)\n\n    @chk ccall(\n               (:MatCompositeGetMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CMat}),\n               mat, i, Ai_,\n              )\n\n\tAi.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tscalings::PetscScalar = MatCompositeSetScalings(petsclib::PetscLibType,mat::PetscMat) \nSets separate scaling factors for component matrices.\n\nLogically Collective\n\nInput Parameters:\n- `mat`      - the composite matrix\n- `scalings` - array of scaling factors with scalings[i] being factor of i-th matrix, for i in [0, nmat)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatScale()`, `MatDiagonalScale()`, `MATCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Mat/MatCompositeSetScalings\"))\n\"\"\"\nfunction MatCompositeSetScalings(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatCompositeSetScalings(petsclib::$UnionPetscLib, mat::PetscMat )\n\tscalings_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatCompositeSetScalings, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               mat, scalings_,\n              )\n\n\tscalings = scalings_[]\n\n\treturn scalings\nend \n\n\"\"\"\n\tMatLRCGetMats(petsclib::PetscLibType,N::PetscMat, A::PetscMat, U::PetscMat, c::PetscVec, V::PetscMat) \nReturns the constituents of an LRC matrix\n\nNot collective\n\nInput Parameter:\n- `N` - matrix of type `MATLRC`\n\nOutput Parameters:\n- `A` - the (sparse) matrix\n- `U` - first dense rectangular (tall and skinny) matrix\n- `c` - a sequential vector containing the diagonal of C\n- `V` - second dense rectangular (tall and skinny) matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatLRCSetMats()`, `Mat`, `MATLRC`, `MatCreateLRC()`\n\n# External Links\n$(_doc_external(\"Mat/MatLRCGetMats\"))\n\"\"\"\nfunction MatLRCGetMats(petsclib::PetscLibType, N::PetscMat, A::PetscMat, U::PetscMat, c::PetscVec, V::PetscMat) end\n\n@for_petsc function MatLRCGetMats(petsclib::$UnionPetscLib, N::PetscMat, A::PetscMat, U::PetscMat, c::PetscVec, V::PetscMat )\n\tA_ = Ref(A.ptr)\n\tU_ = Ref(U.ptr)\n\tc_ = Ref(c.ptr)\n\tV_ = Ref(V.ptr)\n\n    @chk ccall(\n               (:MatLRCGetMats, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{CMat}, Ptr{CVec}, Ptr{CMat}),\n               N, A_, U_, c_, V_,\n              )\n\n\tA.ptr = C_NULL\n\tU.ptr = C_NULL\n\tc.ptr = C_NULL\n\tV.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLRCSetMats(petsclib::PetscLibType,N::PetscMat, A::PetscMat, U::PetscMat, c::PetscVec, V::PetscMat) \nSets the constituents of an LRC matrix\n\nLogically collective\n\nInput Parameters:\n- `N` - matrix of type `MATLRC`\n- `A` - the (sparse) matrix\n- `U` - first dense rectangular (tall and skinny) matrix\n- `c` - a sequential vector containing the diagonal of C\n- `V` - second dense rectangular (tall and skinny) matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatLRCGetMats()`, `Mat`, `MATLRC`, `MatCreateLRC()`\n\n# External Links\n$(_doc_external(\"Mat/MatLRCSetMats\"))\n\"\"\"\nfunction MatLRCSetMats(petsclib::PetscLibType, N::PetscMat, A::PetscMat, U::PetscMat, c::PetscVec, V::PetscMat) end\n\n@for_petsc function MatLRCSetMats(petsclib::$UnionPetscLib, N::PetscMat, A::PetscMat, U::PetscMat, c::PetscVec, V::PetscMat )\n\n    @chk ccall(\n               (:MatLRCSetMats, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CVec, CMat),\n               N, A, U, c, V,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscMat = MatCreateLRC(petsclib::PetscLibType,A::PetscMat, U::PetscMat, c::PetscVec, V::PetscMat) \nCreates a new matrix object that behaves like A + U*C*V' of type `MATLRC`\n\nCollective\n\nInput Parameters:\n- `A` - the (sparse) matrix (can be `NULL`)\n- `U` - dense rectangular (tall and skinny) matrix\n- `V` - dense rectangular (tall and skinny) matrix\n- `c` - a vector containing the diagonal of C (can be `NULL`)\n\nOutput Parameter:\n- `N` - the matrix that represents A + U*C*V'\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATLRC`, `MatLRCGetMats()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateLRC\"))\n\"\"\"\nfunction MatCreateLRC(petsclib::PetscLibType, A::PetscMat, U::PetscMat, c::Union{Ptr,PetscVec}, V::PetscMat) end\n\n@for_petsc function MatCreateLRC(petsclib::$UnionPetscLib, A::PetscMat, U::PetscMat, c::Union{Ptr,PetscVec}, V::PetscMat )\n\tN_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLRC, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CVec, CMat, Ptr{CMat}),\n               A, U, c, V, N_,\n              )\n\n\tN = PetscMat(N_[], petsclib)\n\n\treturn N\nend \n\n\"\"\"\n\tJ::PetscMat = MatCreateMFFD(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt) \nCreates a matrix\napproximately multiply a vector by the matrix (Jacobian) . See also `MatCreateSNESMF()`\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `m`    - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given). This value should be the same as the local size used in creating the y vector for the matrix-vector product y = Ax.\n- `n`    - This value should be the same as the local size used in creating the x vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have calculated if `N` is given) For square matrices `n` is almost always `m`.\n- `M`    - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`    - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n\nOutput Parameter:\n- `J` - the matrix-free matrix\n\nOptions Database Keys:\n- `-mat_mffd_type`             - wp or ds (see `MATMFFD_WP` or `MATMFFD_DS`)\n- `-mat_mffd_err`              - square root of estimated relative error in function evaluation\n- `-mat_mffd_period`           - how often h is recomputed, defaults to 1, every time\n- `-mat_mffd_check_positivity` - possibly decrease `h` until U + h*a has only positive values\n- `-mat_mffd_umin <umin>`      - Sets umin (for default PETSc routine that computes h only)\n- `-mat_mffd_complex`          - use the Lyness trick with complex numbers to compute the matrix-vector product instead of differencing (requires real valued functions but that PETSc be configured for complex numbers)\n- `-snes_mf`                   - use the finite difference based matrix-free matrix with `SNESSolve()` and no preconditioner\n- `-snes_mf_operator`          - use the finite difference based matrix-free matrix with `SNESSolve()` but construct a preconditioner\nusing the matrix passed as `pmat` to `SNESSetJacobian()`.\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatDestroy()`, `MatMFFDSetFunctionError()`, `MatMFFDDSSetUmin()`, `MatMFFDSetFunction()`\n`MatMFFDSetHHistory()`, `MatMFFDResetHHistory()`, `MatCreateSNESMF()`, `MatCreateShell()`, `MATSHELL`,\n`MatMFFDGetH()`, `MatMFFDRegister()`, `MatMFFDComputeJacobian()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMFFD\"))\n\"\"\"\nfunction MatCreateMFFD(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateMFFD(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt )\n\tJ_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMFFD, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, m, n, M, N, J_,\n              )\n\n\tJ = PetscMat(J_[], petsclib)\n\n\treturn J\nend \n\n\"\"\"\n\tMatMPISBAIJSetPreallocation(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nFor good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameters\nd_nz (or d_nnz) and o_nz (or o_nnz).  By setting these parameters accurately,\nperformance can be increased by more than a factor of 50.\n\nCollective\n\nInput Parameters:\n- `B`     - the matrix\n- `bs`    - size of block, the blocks are ALWAYS square. One can use MatSetBlockSizes() to set a different row and column blocksize but the row\nblocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with MatCreateVecs()\n- `d_nz`  - number of block nonzeros per block row in diagonal portion of local\nsubmatrix  (same for all local rows)\n- `d_nnz` - array containing the number of block nonzeros in the various block rows\nin the upper triangular and diagonal part of the in diagonal portion of the local\n(possibly different for each block row) or `NULL`.  If you plan to factor the matrix you must leave room\nfor the diagonal entry and set a value even if it is zero.\n- `o_nz`  - number of block nonzeros per block row in the off-diagonal portion of local\nsubmatrix (same for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various block rows of the\noff-diagonal portion of the local submatrix that is right of the diagonal\n(possibly different for each block row) or `NULL`.\n\nOptions Database Keys:\n- `-mat_no_unroll`  - uses code that does not unroll the loops in the\nblock calculations (much slower)\n- `-mat_block_size` - size of the blocks to use\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATMPISBAIJ`, `MATSBAIJ`, `MatCreate()`, `MatCreateSeqSBAIJ()`, `MatSetValues()`, `MatCreateBAIJ()`, `PetscSplitOwnership()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPISBAIJSetPreallocation\"))\n\"\"\"\nfunction MatMPISBAIJSetPreallocation(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function MatMPISBAIJSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatMPISBAIJSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               B, bs, d_nz, d_nnz, o_nz, o_nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSBAIJ(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nCreates a sparse parallel matrix in symmetric block AIJ format, `MATSBAIJ`,\n(block compressed row).  For good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameters\n`d_nz` (or `d_nnz`) and `o_nz` (or `o_nnz`).\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `bs`    - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row blocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given) This value should be the same as the local size used in creating the y vector for the matrix-vector product y = Ax.\n- `n`     - number of local columns (or `PETSC_DECIDE` to have calculated if `N` is given) This value should be the same as the local size used in creating the x vector for the matrix-vector product y = Ax.\n- `M`     - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`     - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `d_nz`  - number of block nonzeros per block row in diagonal portion of local submatrix (same for all local rows)\n- `d_nnz` - array containing the number of block nonzeros in the various block rows in the upper triangular portion of the in diagonal portion of the local (possibly different for each block block row) or `NULL`. If you plan to factor the matrix you must leave room for the diagonal entry and set its value even if it is zero.\n- `o_nz`  - number of block nonzeros per block row in the off-diagonal portion of local submatrix (same for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various block rows of the off-diagonal portion of the local submatrix (possibly different for each block row) or `NULL`.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_no_unroll`  - uses code that does not unroll the loops in the block calculations (much slower)\n- `-mat_block_size` - size of the blocks to use\n- `-mat_mpi`        - use the parallel matrix data structures even on one processor (defaults to using SeqBAIJ format on one processor)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSBAIJ`, `MatCreate()`, `MatCreateSeqSBAIJ()`, `MatSetValues()`, `MatCreateBAIJ()`,\n`MatGetOwnershipRange()`,  `MatGetOwnershipRanges()`, `MatGetOwnershipRangeColumn()`, `MatGetOwnershipRangesColumn()`, `PetscLayout`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSBAIJ\"))\n\"\"\"\nfunction MatCreateSBAIJ(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSBAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Union{Ptr,Vector{$PetscInt}}, o_nz::$PetscInt, o_nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSBAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, bs, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateMPISBAIJWithArrays(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) \ncreates a `MATMPISBAIJ` matrix using arrays that contain in standard CSR format for the local rows.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `bs`   - the block size, only a block size of 1 is supported\n- `m`    - number of local rows (Cannot be `PETSC_DECIDE`)\n- `n`    - This value should be the same as the local size used in creating the x vector for the matrix-vector product  y = Ax . (or `PETSC_DECIDE` to have calculated if `N` is given) For square matrices `n` is almost always `m`.\n- `M`    - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`    - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `i`    - row indices; that is i[0] = 0, i[row] = i[row-1] + number of block elements in that row block row of the matrix\n- `j`    - column indices\n- `a`    - matrix values\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATMPISBAIJ`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`,\n`MATMPIAIJ`, `MatCreateAIJ()`, `MatCreateMPIAIJWithSplitArrays()`, `MatMPISBAIJSetPreallocationCSR()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPISBAIJWithArrays\"))\n\"\"\"\nfunction MatCreateMPISBAIJWithArrays(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) end\n\n@for_petsc function MatCreateMPISBAIJWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar} )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPISBAIJWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, bs, m, n, M, N, i, j, a, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tMatMPISBAIJSetPreallocationCSR(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) \nCreates a sparse parallel matrix in `MATMPISBAIJ` format using the given nonzero structure and (optional) numerical values\n\nCollective\n\nInput Parameters:\n- `B`  - the matrix\n- `bs` - the block size\n- `i`  - the indices into `j` for the start of each local row (indices start with zero)\n- `j`  - the column indices for each local row (indices start with zero) these must be sorted for each row\n- `v`  - optional values in the matrix, pass `NULL` if not provided\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMPISBAIJ`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIBAIJSetPreallocation()`, `MatCreateAIJ()`, `MATMPIAIJ`,\n`MatCreateMPISBAIJWithArrays()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPISBAIJSetPreallocationCSR\"))\n\"\"\"\nfunction MatMPISBAIJSetPreallocationCSR(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) end\n\n@for_petsc function MatMPISBAIJSetPreallocationCSR(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatMPISBAIJSetPreallocationCSR, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               B, bs, i, j, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tindices::PetscInt = MatSeqSBAIJSetColumnIndices(petsclib::PetscLibType,mat::PetscMat) \nSet the column indices for all the rows\nin a `MATSEQSBAIJ` matrix.\n\nInput Parameters:\n- `mat`     - the `MATSEQSBAIJ` matrix\n- `indices` - the column indices\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQSBAIJ`, `MatCreateSeqSBAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSBAIJSetColumnIndices\"))\n\"\"\"\nfunction MatSeqSBAIJSetColumnIndices(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatSeqSBAIJSetColumnIndices(petsclib::$UnionPetscLib, mat::PetscMat )\n\tindices_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSeqSBAIJSetColumnIndices, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               mat, indices_,\n              )\n\n\tindices = indices_[]\n\n\treturn indices\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqSBAIJGetArray(petsclib::PetscLibType,A::PetscMat) \ngives access to the array where the numerical data for a `MATSEQSBAIJ` matrix is stored\n\nNot Collective\n\nInput Parameter:\n- `A` - a `MATSEQSBAIJ` matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQSBAIJ`, `MatSeqSBAIJRestoreArray()`, `MatSeqAIJGetArray()`, `MatSeqAIJRestoreArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSBAIJGetArray\"))\n\"\"\"\nfunction MatSeqSBAIJGetArray(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqSBAIJGetArray(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqSBAIJGetArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqSBAIJRestoreArray(petsclib::PetscLibType,A::PetscMat) \nreturns access to the array where the numerical data for a `MATSEQSBAIJ` matrix is stored obtained by `MatSeqSBAIJGetArray()`\n\nNot Collective\n\nInput Parameters:\n- `A`     - a `MATSEQSBAIJ` matrix\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQSBAIJ`, `MatSeqSBAIJGetArray()`, `MatSeqAIJGetArray()`, `MatSeqAIJRestoreArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSBAIJRestoreArray\"))\n\"\"\"\nfunction MatSeqSBAIJRestoreArray(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqSBAIJRestoreArray(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqSBAIJRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tMatSeqSBAIJSetPreallocation(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse symmetric matrix in block AIJ (block\ncompressed row) `MATSEQSBAIJ` format.  For good matrix assembly performance the\nuser should preallocate the matrix storage by setting the parameter `nz`\n(or the array `nnz`).\n\nCollective\n\nInput Parameters:\n- `B`   - the symmetric matrix\n- `bs`  - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row\nblocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with `MatCreateVecs()`\n- `nz`  - number of block nonzeros per block row (same for all rows)\n- `nnz` - array containing the number of block nonzeros in the upper triangular plus\ndiagonal portion of each block (possibly different for each block row) or `NULL`\n\nOptions Database Keys:\n- `-mat_no_unroll`  - uses code that does not unroll the loops in the block calculations (much slower)\n- `-mat_block_size` - size of the blocks to use (only works if a negative bs is passed in\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrices](sec_matsparse), `MATSEQSBAIJ`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatCreateSBAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSBAIJSetPreallocation\"))\n\"\"\"\nfunction MatSeqSBAIJSetPreallocation(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) end\n\n@for_petsc function MatSeqSBAIJSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, nz::$PetscInt, nnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatSeqSBAIJSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               B, bs, nz, nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqSBAIJSetPreallocationCSR(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) \nCreates a sparse parallel matrix in `MATSEQSBAIJ` format using the given nonzero structure and (optional) numerical values\n\nInput Parameters:\n- `B`  - the matrix\n- `bs` - size of block, the blocks are ALWAYS square.\n- `i`  - the indices into `j` for the start of each local row (indices start with zero)\n- `j`  - the column indices for each local row (indices start with zero) these must be sorted for each row\n- `v`  - optional values in the matrix, use `NULL` if not provided\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQSBAIJ`, `MatCreate()`, `MatCreateSeqSBAIJ()`, `MatSetValuesBlocked()`, `MatSeqSBAIJSetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqSBAIJSetPreallocationCSR\"))\n\"\"\"\nfunction MatSeqSBAIJSetPreallocationCSR(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) end\n\n@for_petsc function MatSeqSBAIJSetPreallocationCSR(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatSeqSBAIJSetPreallocationCSR, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               B, bs, i, j, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqSBAIJ(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse symmetric matrix in (block\ncompressed row) `MATSEQSBAIJ` format.  For good matrix assembly performance the\nuser should preallocate the matrix storage by setting the parameter `nz`\n(or the array `nnz`).\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `bs`   - size of block, the blocks are ALWAYS square. One can use `MatSetBlockSizes()` to set a different row and column blocksize but the row blocksize always defines the size of the blocks. The column blocksize sets the blocksize of the vectors obtained with MatCreateVecs()\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of block nonzeros per block row (same for all rows)\n- `nnz`  - array containing the number of block nonzeros in the upper triangular plus diagonal portion of each block (possibly different for each block row) or `NULL`\n\nOutput Parameter:\n- `A` - the symmetric matrix\n\nOptions Database Keys:\n- `-mat_no_unroll`  - uses code that does not unroll the loops in the block calculations (much slower)\n- `-mat_block_size` - size of the blocks to use\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrices](sec_matsparse), `MATSEQSBAIJ`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatCreateSBAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqSBAIJ\"))\n\"\"\"\nfunction MatCreateSeqSBAIJ(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqSBAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqSBAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, bs, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateSeqSBAIJWithArrays(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) \nCreates an sequential `MATSEQSBAIJ` matrix using matrix elements\n(upper triangular entries in CSR format) provided by the user.\n\nCollective\n\nInput Parameters:\n- `comm` - must be an MPI communicator of size 1\n- `bs`   - size of block\n- `m`    - number of rows\n- `n`    - number of columns\n- `i`    - row indices; that is i[0] = 0, i[row] = i[row-1] + number of block elements in that row block row of the matrix\n- `j`    - column indices\n- `a`    - matrix values\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQSBAIJ`, `MatCreate()`, `MatCreateSBAIJ()`, `MatCreateSeqSBAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqSBAIJWithArrays\"))\n\"\"\"\nfunction MatCreateSeqSBAIJWithArrays(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) end\n\n@for_petsc function MatCreateSeqSBAIJWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, m::$PetscInt, n::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar} )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqSBAIJWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, bs, m, n, i, j, a, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tMatReorderingSeqSBAIJ(petsclib::PetscLibType,A::PetscMat, perm::IS) \n\n# External Links\n$(_doc_external(\"Mat/MatReorderingSeqSBAIJ\"))\n\"\"\"\nfunction MatReorderingSeqSBAIJ(petsclib::PetscLibType, A::PetscMat, perm::IS) end\n\n@for_petsc function MatReorderingSeqSBAIJ(petsclib::$UnionPetscLib, A::PetscMat, perm::IS )\n\n    @chk ccall(\n               (:MatReorderingSeqSBAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS),\n               A, perm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatKAIJGetAIJ(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nGet the `MATAIJ` matrix describing the blockwise action of the `MATKAIJ` matrix\n\nNot Collective, but if the `MATKAIJ` matrix is parallel, the `MATAIJ` matrix is also parallel\n\nInput Parameter:\n- `A` - the `MATKAIJ` matrix\n\nOutput Parameter:\n- `B` - the `MATAIJ` matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateKAIJ()`, `MATKAIJ`, `MATAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJGetAIJ\"))\n\"\"\"\nfunction MatKAIJGetAIJ(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatKAIJGetAIJ(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatKAIJGetAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt,S::Vector{PetscScalar} = MatKAIJGetS(petsclib::PetscLibType,A::PetscMat) \nGet the `S` matrix describing the shift action of the `MATKAIJ` matrix\n\nNot Collective; the entire `S` is stored and returned independently on all processes.\n\nInput Parameter:\n- `A` - the `MATKAIJ` matrix\n\nOutput Parameters:\n- `m` - the number of rows in `S`\n- `n` - the number of columns in `S`\n- `S` - the S matrix, in form of a scalar array in column-major format\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatCreateKAIJ()`, `MatGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJGetS\"))\n\"\"\"\nfunction MatKAIJGetS(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJGetS(petsclib::$UnionPetscLib, A::PetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tS_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJGetS, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               A, m_, n_, S_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\tS = unsafe_wrap(Array, S_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn m,n,S\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt,S::Vector{PetscScalar} = MatKAIJGetSRead(petsclib::PetscLibType,A::PetscMat) \nGet a read\n\nNot Collective; the entire `S` is stored and returned independently on all processes.\n\nInput Parameter:\n- `A` - the `MATKAIJ` matrix\n\nOutput Parameters:\n- `m` - the number of rows in `S`\n- `n` - the number of columns in `S`\n- `S` - the S matrix, in form of a scalar array in column-major format\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatCreateKAIJ()`, `MatGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJGetSRead\"))\n\"\"\"\nfunction MatKAIJGetSRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJGetSRead(petsclib::$UnionPetscLib, A::PetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tS_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJGetSRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               A, m_, n_, S_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\tS = unsafe_wrap(Array, S_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn m,n,S\nend \n\n\"\"\"\n\tS::Vector{PetscScalar} = MatKAIJRestoreS(petsclib::PetscLibType,A::PetscMat) \nRestore array obtained with `MatKAIJGetS()`\n\nNot Collective\n\nInput Parameters:\n- `A` - the `MATKAIJ` matrix\n- `S` - location of pointer to array obtained with `MatKAIJGetS()`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetS()`, `MatKAIJGetSRead()`, `MatKAIJRestoreSRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJRestoreS\"))\n\"\"\"\nfunction MatKAIJRestoreS(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJRestoreS(petsclib::$UnionPetscLib, A::PetscMat )\n\tS_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJRestoreS, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, S_,\n              )\n\n\tS = unsafe_wrap(Array, S_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn S\nend \n\n\"\"\"\n\tS::Vector{PetscScalar} = MatKAIJRestoreSRead(petsclib::PetscLibType,A::PetscMat) \nRestore array obtained with `MatKAIJGetSRead()`\n\nNot Collective\n\nInput Parameters:\n- `A` - the `MATKAIJ` matrix\n- `S` - location of pointer to array obtained with `MatKAIJGetS()`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetS()`, `MatKAIJGetSRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJRestoreSRead\"))\n\"\"\"\nfunction MatKAIJRestoreSRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJRestoreSRead(petsclib::$UnionPetscLib, A::PetscMat )\n\tS_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJRestoreSRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, S_,\n              )\n\n\tS = unsafe_wrap(Array, S_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn S\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt,T::Vector{PetscScalar} = MatKAIJGetT(petsclib::PetscLibType,A::PetscMat) \nGet the transformation matrix `T` associated with the `MATKAIJ` matrix\n\nNot Collective; the entire `T` is stored and returned independently on all processes\n\nInput Parameter:\n- `A` - the `MATKAIJ` matrix\n\nOutput Parameters:\n- `m` - the number of rows in `T`\n- `n` - the number of columns in `T`\n- `T` - the T matrix, in form of a scalar array in column-major format\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatCreateKAIJ()`, `MatGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJGetT\"))\n\"\"\"\nfunction MatKAIJGetT(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJGetT(petsclib::$UnionPetscLib, A::PetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tT_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJGetT, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               A, m_, n_, T_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\tT = unsafe_wrap(Array, T_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn m,n,T\nend \n\n\"\"\"\n\tm::PetscInt,n::PetscInt,T::Vector{PetscScalar} = MatKAIJGetTRead(petsclib::PetscLibType,A::PetscMat) \nGet a read\n\nNot Collective; the entire `T` is stored and returned independently on all processes\n\nInput Parameter:\n- `A` - the `MATKAIJ` matrix\n\nOutput Parameters:\n- `m` - the number of rows in `T`\n- `n` - the number of columns in `T`\n- `T` - the T matrix, in form of a scalar array in column-major format\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatCreateKAIJ()`, `MatGetBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJGetTRead\"))\n\"\"\"\nfunction MatKAIJGetTRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJGetTRead(petsclib::$UnionPetscLib, A::PetscMat )\n\tm_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tT_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJGetTRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               A, m_, n_, T_,\n              )\n\n\tm = m_[]\n\tn = n_[]\n\tT = unsafe_wrap(Array, T_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn m,n,T\nend \n\n\"\"\"\n\tT::Vector{PetscScalar} = MatKAIJRestoreT(petsclib::PetscLibType,A::PetscMat) \nRestore array obtained with `MatKAIJGetT()`\n\nNot Collective\n\nInput Parameters:\n- `A` - the `MATKAIJ` matrix\n- `T` - location of pointer to array obtained with `MatKAIJGetS()`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetT()`, `MatKAIJGetTRead()`, `MatKAIJRestoreTRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJRestoreT\"))\n\"\"\"\nfunction MatKAIJRestoreT(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJRestoreT(petsclib::$UnionPetscLib, A::PetscMat )\n\tT_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJRestoreT, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, T_,\n              )\n\n\tT = unsafe_wrap(Array, T_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn T\nend \n\n\"\"\"\n\tT::Vector{PetscScalar} = MatKAIJRestoreTRead(petsclib::PetscLibType,A::PetscMat) \nRestore array obtained with `MatKAIJGetTRead()`\n\nNot Collective\n\nInput Parameters:\n- `A` - the `MATKAIJ` matrix\n- `T` - location of pointer to array obtained with `MatKAIJGetS()`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetT()`, `MatKAIJGetTRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJRestoreTRead\"))\n\"\"\"\nfunction MatKAIJRestoreTRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJRestoreTRead(petsclib::$UnionPetscLib, A::PetscMat )\n\tT_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatKAIJRestoreTRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, T_,\n              )\n\n\tT = unsafe_wrap(Array, T_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn T\nend \n\n\"\"\"\n\tMatKAIJSetAIJ(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nSet the `MATAIJ` matrix describing the blockwise action of the `MATKAIJ` matrix\n\nLogically Collective; if the `MATAIJ` matrix is parallel, the `MATKAIJ` matrix is also parallel\n\nInput Parameters:\n- `A` - the `MATKAIJ` matrix\n- `B` - the `MATAIJ` matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetAIJ()`, `MatKAIJSetS()`, `MatKAIJSetT()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJSetAIJ\"))\n\"\"\"\nfunction MatKAIJSetAIJ(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatKAIJSetAIJ(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:MatKAIJSetAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               A, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatKAIJSetS(petsclib::PetscLibType,A::PetscMat, p::PetscInt, q::PetscInt, S::Vector{PetscScalar}) \nSet the `S` matrix describing the shift action of the `MATKAIJ` matrix\n\nLogically Collective; the entire `S` is stored independently on all processes.\n\nInput Parameters:\n- `A` - the `MATKAIJ` matrix\n- `p` - the number of rows in `S`\n- `q` - the number of columns in `S`\n- `S` - the S matrix, in form of a scalar array in column-major format\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetS()`, `MatKAIJSetT()`, `MatKAIJSetAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJSetS\"))\n\"\"\"\nfunction MatKAIJSetS(petsclib::PetscLibType, A::PetscMat, p::PetscInt, q::PetscInt, S::Vector{PetscScalar}) end\n\n@for_petsc function MatKAIJSetS(petsclib::$UnionPetscLib, A::PetscMat, p::$PetscInt, q::$PetscInt, S::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatKAIJSetS, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               A, p, q, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tidentity::PetscBool = MatKAIJGetScaledIdentity(petsclib::PetscLibType,A::PetscMat) \nCheck if both `S` and `T` are scaled identities.\n\nLogically Collective.\n\nInput Parameter:\n- `A` - the `MATKAIJ` matrix\n\nOutput Parameter:\n- `identity` - the Boolean value\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetS()`, `MatKAIJGetT()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJGetScaledIdentity\"))\n\"\"\"\nfunction MatKAIJGetScaledIdentity(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatKAIJGetScaledIdentity(petsclib::$UnionPetscLib, A::PetscMat )\n\tidentity_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatKAIJGetScaledIdentity, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               A, identity_,\n              )\n\n\tidentity = identity_[]\n\n\treturn identity\nend \n\n\"\"\"\n\tMatKAIJSetT(petsclib::PetscLibType,A::PetscMat, p::PetscInt, q::PetscInt, T::Vector{PetscScalar}) \nSet the transformation matrix `T` associated with the `MATKAIJ` matrix\n\nLogically Collective; the entire `T` is stored independently on all processes.\n\nInput Parameters:\n- `A` - the `MATKAIJ` matrix\n- `p` - the number of rows in `S`\n- `q` - the number of columns in `S`\n- `T` - the `T` matrix, in form of a scalar array in column-major format\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATKAIJ`, `MatKAIJGetT()`, `MatKAIJSetS()`, `MatKAIJSetAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatKAIJSetT\"))\n\"\"\"\nfunction MatKAIJSetT(petsclib::PetscLibType, A::PetscMat, p::PetscInt, q::PetscInt, T::Vector{PetscScalar}) end\n\n@for_petsc function MatKAIJSetT(petsclib::$UnionPetscLib, A::PetscMat, p::$PetscInt, q::$PetscInt, T::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatKAIJSetT, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               A, p, q, T,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tkaij::PetscMat = MatCreateKAIJ(petsclib::PetscLibType,A::PetscMat, p::PetscInt, q::PetscInt, S::Vector{PetscScalar}, T::Vector{PetscScalar}) \nCreates a matrix of type `MATKAIJ`.\n\nCollective\n\nInput Parameters:\n- `A` - the `MATAIJ` matrix\n- `p` - number of rows in `S` and `T`\n- `q` - number of columns in `S` and `T`\n- `S` - the `S` matrix (can be `NULL`), stored as a `PetscScalar` array (column-major)\n- `T` - the `T` matrix (can be `NULL`), stored as a `PetscScalar` array (column-major)\n\nOutput Parameter:\n- `kaij` - the new `MATKAIJ` matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatKAIJSetAIJ()`, `MatKAIJSetS()`, `MatKAIJSetT()`, `MatKAIJGetAIJ()`, `MatKAIJGetS()`, `MatKAIJGetT()`, `MATKAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateKAIJ\"))\n\"\"\"\nfunction MatCreateKAIJ(petsclib::PetscLibType, A::PetscMat, p::PetscInt, q::PetscInt, S::Union{Ptr,Vector{PetscScalar}}, T::Union{Ptr,Vector{PetscScalar}}) end\n\n@for_petsc function MatCreateKAIJ(petsclib::$UnionPetscLib, A::PetscMat, p::$PetscInt, q::$PetscInt, S::Union{Ptr,Vector{$PetscScalar}}, T::Union{Ptr,Vector{$PetscScalar}} )\n\tkaij_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateKAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{$PetscScalar}, Ptr{CMat}),\n               A, p, q, S, T, kaij_,\n              )\n\n\tkaij = PetscMat(kaij_[], petsclib)\n\n\treturn kaij\nend \n\n\"\"\"\n\tB::PetscMat = MatMPIAdjCreateNonemptySubcommMat(petsclib::PetscLibType,A::PetscMat) \ncreate the same `MATMPIADJ` matrix on a subcommunicator containing only processes owning a positive number of rows\n\nCollective\n\nInput Parameter:\n- `A` - original `MATMPIADJ` matrix\n\nOutput Parameter:\n- `B` - matrix on subcommunicator, `NULL` on MPI processes that own zero rows of `A`\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIADJ`, `MatCreateMPIAdj()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAdjCreateNonemptySubcommMat\"))\n\"\"\"\nfunction MatMPIAdjCreateNonemptySubcommMat(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatMPIAdjCreateNonemptySubcommMat(petsclib::$UnionPetscLib, A::PetscMat )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatMPIAdjCreateNonemptySubcommMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tMatMPIAdjToSeq(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nConverts an parallel `MATMPIADJ` matrix to complete `MATMPIADJ` on each process (needed by sequential partitioners)\n\nLogically Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `B` - the same matrix on all processes\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIADJ`, `MatCreate()`, `MatCreateMPIAdj()`, `MatSetValues()`, `MatMPIAdjToSeqRankZero()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAdjToSeq\"))\n\"\"\"\nfunction MatMPIAdjToSeq(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatMPIAdjToSeq(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatMPIAdjToSeq, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIAdjToSeqRankZero(petsclib::PetscLibType,A::PetscMat, B::PetscMat) \nConverts an parallel `MATMPIADJ` matrix to complete `MATMPIADJ` on rank zero (needed by sequential partitioners)\n\nLogically Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `B` - the same matrix on rank zero, not set on other ranks\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIADJ`, `MatCreate()`, `MatCreateMPIAdj()`, `MatSetValues()`, `MatMPIAdjToSeq()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAdjToSeqRankZero\"))\n\"\"\"\nfunction MatMPIAdjToSeqRankZero(petsclib::PetscLibType, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatMPIAdjToSeqRankZero(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:MatMPIAdjToSeqRankZero, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\ti::PetscInt,j::PetscInt,values::PetscInt = MatMPIAdjSetPreallocation(petsclib::PetscLibType,B::PetscMat) \nSets the array used for storing the matrix elements\n\nLogically Collective\n\nInput Parameters:\n- `B`      - the matrix\n- `i`      - the indices into `j` for the start of each row\n- `j`      - the column indices for each row (sorted for each row).\nThe indices in `i` and `j` start with zero (NOT with one).\n- `values` - [use `NULL` if not provided] edge weights\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateMPIAdj()`, `MatSetValues()`, `MATMPIADJ`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAdjSetPreallocation\"))\n\"\"\"\nfunction MatMPIAdjSetPreallocation(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatMPIAdjSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat )\n\ti_ = Ref{$PetscInt}()\n\tj_ = Ref{$PetscInt}()\n\tvalues_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatMPIAdjSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               B, i_, j_, values_,\n              )\n\n\ti = i_[]\n\tj = j_[]\n\tvalues = values_[]\n\n\treturn i,j,values\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateMPIAdj(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, values::Vector{PetscInt}) \nCreates a sparse matrix representing an adjacency list.\nThe matrix need not have numerical values associated with it, it is\nintended for ordering (to reduce bandwidth etc) and partitioning.\n\nCollective\n\nInput Parameters:\n- `comm`   - MPI communicator\n- `m`      - number of local rows\n- `N`      - number of global columns\n- `i`      - the indices into `j` for the start of each row\n- `j`      - the column indices for each row (sorted for each row).\n- `values` - the values, optional, use `NULL` if not provided\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatConvert()`, `MatGetOrdering()`, `MATMPIADJ`, `MatMPIAdjSetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAdj\"))\n\"\"\"\nfunction MatCreateMPIAdj(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, values::Union{Ptr, Vector{PetscInt}}) end\n\n@for_petsc function MatCreateMPIAdj(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, N::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, values::Union{Ptr, Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAdj, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, N, i, j, values, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatScatterGetVecScatter(petsclib::PetscLibType,mat::PetscMat, scatter::VecScatter) \nReturns the user\n\nLogically Collective\n\nInput Parameter:\n- `mat` - the matrix, should have been created with MatCreateScatter() or have type `MATSCATTER`\n\nOutput Parameter:\n- `scatter` - the scatter context\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATSCATTER`, `MatCreateScatter()`, `MatScatterSetVecScatter()`\n\n# External Links\n$(_doc_external(\"Mat/MatScatterGetVecScatter\"))\n\"\"\"\nfunction MatScatterGetVecScatter(petsclib::PetscLibType, mat::PetscMat, scatter::VecScatter) end\n\n@for_petsc function MatScatterGetVecScatter(petsclib::$UnionPetscLib, mat::PetscMat, scatter::VecScatter )\n\n    @chk ccall(\n               (:MatScatterGetVecScatter, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{VecScatter}),\n               mat, scatter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateScatter(petsclib::PetscLibType,comm::MPI_Comm, scatter::VecScatter) \nCreates a new matrix of `MatType` `MATSCATTER`, based on a VecScatter\n\nCollective\n\nInput Parameters:\n- `comm`    - MPI communicator\n- `scatter` - a `VecScatter`\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatScatterSetVecScatter()`, `MatScatterGetVecScatter()`, `MATSCATTER`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateScatter\"))\n\"\"\"\nfunction MatCreateScatter(petsclib::PetscLibType, comm::MPI_Comm, scatter::VecScatter) end\n\n@for_petsc function MatCreateScatter(petsclib::$UnionPetscLib, comm::MPI_Comm, scatter::VecScatter )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateScatter, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, VecScatter, Ptr{CMat}),\n               comm, scatter, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatScatterSetVecScatter(petsclib::PetscLibType,mat::PetscMat, scatter::VecScatter) \nsets the scatter that the matrix is to apply as its linear operator in a `MATSCATTER`\n\nLogically Collective\n\nInput Parameters:\n- `mat`     - the `MATSCATTER` matrix\n- `scatter` - the scatter context create with `VecScatterCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSCATTER`, `MatCreateScatter()`\n\n# External Links\n$(_doc_external(\"Mat/MatScatterSetVecScatter\"))\n\"\"\"\nfunction MatScatterSetVecScatter(petsclib::PetscLibType, mat::PetscMat, scatter::VecScatter) end\n\n@for_petsc function MatScatterSetVecScatter(petsclib::$UnionPetscLib, mat::PetscMat, scatter::VecScatter )\n\n    @chk ccall(\n               (:MatScatterSetVecScatter, $petsc_library),\n               PetscErrorCode,\n               (CMat, VecScatter),\n               mat, scatter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tC::PetscMat = MatCreateCentering(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a new matrix object that implements the (symmetric and idempotent) centering matrix,  I\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows (or `PETSC_DECIDE` to have calculated if `N` is given) This value should be the same as the local size used in creating the `y` vector for the matrix-vector product y = Ax.\n- `N`    - number of global rows (or `PETSC_DETERMINE` to have calculated if `n` is given)\n\nOutput Parameter:\n- `C` - the matrix\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateLRC()`, `MatCreateComposite()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateCentering\"))\n\"\"\"\nfunction MatCreateCentering(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateCentering(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tC_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateCentering, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, C_,\n              )\n\n\tC = PetscMat(C_[], petsclib)\n\n\treturn C\nend \n\n\"\"\"\n\tMatDiagonalGetDiagonal(petsclib::PetscLibType,A::PetscMat, diag::PetscVec) \nGet the diagonal of a `MATDIAGONAL`\n\nInput Parameter:\n- `A` - the `MATDIAGONAL`\n\nOutput Parameter:\n- `diag` - the `Vec` that defines the diagonal\n\nLevel: developer\n\n-seealso: [](ch_matrices), `MATDIAGONAL`, `MatCreateDiagonal()`, `MatDiagonalRestoreDiagonal()`, `MatDiagonalGetInverseDiagonal()`, `MatGetDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatDiagonalGetDiagonal\"))\n\"\"\"\nfunction MatDiagonalGetDiagonal(petsclib::PetscLibType, A::PetscMat, diag::PetscVec) end\n\n@for_petsc function MatDiagonalGetDiagonal(petsclib::$UnionPetscLib, A::PetscMat, diag::PetscVec )\n\tdiag_ = Ref(diag.ptr)\n\n    @chk ccall(\n               (:MatDiagonalGetDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CVec}),\n               A, diag_,\n              )\n\n\tdiag.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDiagonalRestoreDiagonal(petsclib::PetscLibType,A::PetscMat, diag::PetscVec) \nRestore the diagonal of a `MATDIAGONAL`\n\nInput Parameters:\n- `A`    - the `MATDIAGONAL`\n- `diag` - the `Vec` obtained from `MatDiagonalGetDiagonal()`\n\nLevel: developer\n\n-seealso: [](ch_matrices), `MATDIAGONAL`, `MatCreateDiagonal()`, `MatDiagonalGetDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatDiagonalRestoreDiagonal\"))\n\"\"\"\nfunction MatDiagonalRestoreDiagonal(petsclib::PetscLibType, A::PetscMat, diag::PetscVec) end\n\n@for_petsc function MatDiagonalRestoreDiagonal(petsclib::$UnionPetscLib, A::PetscMat, diag::PetscVec )\n\tdiag_ = Ref(diag.ptr)\n\n    @chk ccall(\n               (:MatDiagonalRestoreDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CVec}),\n               A, diag_,\n              )\n\n\tdiag.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDiagonalGetInverseDiagonal(petsclib::PetscLibType,A::PetscMat, inv_diag::PetscVec) \nGet the inverse diagonal of a `MATDIAGONAL`\n\nInput Parameter:\n- `A` - the `MATDIAGONAL`\n\nOutput Parameter:\n- `inv_diag` - the `Vec` that defines the inverse diagonal\n\nLevel: developer\n\n-seealso: [](ch_matrices), `MATDIAGONAL`, `MatCreateDiagonal()`, `MatDiagonalRestoreInverseDiagonal()`, `MatDiagonalGetDiagonal()`, `MATLMVMBROYDEN`, `MatSolve()`\n\n# External Links\n$(_doc_external(\"Mat/MatDiagonalGetInverseDiagonal\"))\n\"\"\"\nfunction MatDiagonalGetInverseDiagonal(petsclib::PetscLibType, A::PetscMat, inv_diag::PetscVec) end\n\n@for_petsc function MatDiagonalGetInverseDiagonal(petsclib::$UnionPetscLib, A::PetscMat, inv_diag::PetscVec )\n\tinv_diag_ = Ref(inv_diag.ptr)\n\n    @chk ccall(\n               (:MatDiagonalGetInverseDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CVec}),\n               A, inv_diag_,\n              )\n\n\tinv_diag.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDiagonalRestoreInverseDiagonal(petsclib::PetscLibType,A::PetscMat, inv_diag::PetscVec) \nRestore the inverse diagonal of a `MATDIAGONAL`\n\nInput Parameters:\n- `A`        - the `MATDIAGONAL`\n- `inv_diag` - the `Vec` obtained from `MatDiagonalGetInverseDiagonal()`\n\nLevel: developer\n\n-seealso: [](ch_matrices), `MATDIAGONAL`, `MatCreateDiagonal()`, `MatDiagonalGetInverseDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatDiagonalRestoreInverseDiagonal\"))\n\"\"\"\nfunction MatDiagonalRestoreInverseDiagonal(petsclib::PetscLibType, A::PetscMat, inv_diag::PetscVec) end\n\n@for_petsc function MatDiagonalRestoreInverseDiagonal(petsclib::$UnionPetscLib, A::PetscMat, inv_diag::PetscVec )\n\tinv_diag_ = Ref(inv_diag.ptr)\n\n    @chk ccall(\n               (:MatDiagonalRestoreInverseDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CVec}),\n               A, inv_diag_,\n              )\n\n\tinv_diag.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tJ::PetscMat = MatCreateDiagonal(petsclib::PetscLibType,diag::PetscVec) \nCreates a matrix defined by a given vector along its diagonal.\n\nCollective\n\nInput Parameter:\n- `diag` - vector for the diagonal\n\nOutput Parameter:\n- `J` - the diagonal matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatDestroy()`, `MATCONSTANTDIAGONAL`, `MatScale()`, `MatShift()`, `MatMult()`, `MatGetDiagonal()`, `MatSolve()`\n`MatDiagonalRestoreInverseDiagonal()`, `MatDiagonalGetDiagonal()`, `MatDiagonalRestoreDiagonal()`, `MatDiagonalGetInverseDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateDiagonal\"))\n\"\"\"\nfunction MatCreateDiagonal(petsclib::PetscLibType, diag::PetscVec) end\n\n@for_petsc function MatCreateDiagonal(petsclib::$UnionPetscLib, diag::PetscVec )\n\tJ_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{CMat}),\n               diag, J_,\n              )\n\n\tJ = PetscMat(J_[], petsclib)\n\n\treturn J\nend \n\n\"\"\"\n\tMatNormalGetMat(petsclib::PetscLibType,A::PetscMat, M::PetscMat) \nGets the `Mat` object stored inside a `MATNORMAL`\n\nLogically Collective\n\nInput Parameter:\n- `A` - the `MATNORMAL` matrix\n\nOutput Parameter:\n- `M` - the matrix object stored inside `A`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATNORMAL`, `MATNORMALHERMITIAN`, `MatCreateNormal()`\n\n# External Links\n$(_doc_external(\"Mat/MatNormalGetMat\"))\n\"\"\"\nfunction MatNormalGetMat(petsclib::PetscLibType, A::PetscMat, M::PetscMat) end\n\n@for_petsc function MatNormalGetMat(petsclib::$UnionPetscLib, A::PetscMat, M::PetscMat )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:MatNormalGetMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, M_,\n              )\n\n\tM.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscMat = MatCreateNormal(petsclib::PetscLibType,A::PetscMat) \nCreates a new `MATNORMAL` matrix object that behaves like A^T A.\n\nCollective\n\nInput Parameter:\n- `A` - the (possibly rectangular) matrix\n\nOutput Parameter:\n- `N` - the matrix that represents A^T A \n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATNORMAL`, `MatMult()`, `MatNormalGetMat()`, `MATNORMALHERMITIAN`, `MatCreateNormalHermitian()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateNormal\"))\n\"\"\"\nfunction MatCreateNormal(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatCreateNormal(petsclib::$UnionPetscLib, A::PetscMat )\n\tN_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateNormal, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, N_,\n              )\n\n\tN = PetscMat(N_[], petsclib)\n\n\treturn N\nend \n\n\"\"\"\n\tMatNormalHermitianGetMat(petsclib::PetscLibType,A::PetscMat, M::PetscMat) \nGets the `Mat` object stored inside a `MATNORMALHERMITIAN`\n\nLogically Collective\n\nInput Parameter:\n- `A` - the `MATNORMALHERMITIAN` matrix\n\nOutput Parameter:\n- `M` - the matrix object stored inside `A`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATNORMALHERMITIAN`, `MatCreateNormalHermitian()`\n\n# External Links\n$(_doc_external(\"Mat/MatNormalHermitianGetMat\"))\n\"\"\"\nfunction MatNormalHermitianGetMat(petsclib::PetscLibType, A::PetscMat, M::PetscMat) end\n\n@for_petsc function MatNormalHermitianGetMat(petsclib::$UnionPetscLib, A::PetscMat, M::PetscMat )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:MatNormalHermitianGetMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, M_,\n              )\n\n\tM.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscMat = MatCreateNormalHermitian(petsclib::PetscLibType,A::PetscMat) \nCreates a new matrix object `MATNORMALHERMITIAN` that behaves like A^* A.\n\nCollective\n\nInput Parameter:\n- `A` - the (possibly rectangular complex) matrix\n\nOutput Parameter:\n- `N` - the matrix that represents  A^* A\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATNORMAL`, `MATNORMALHERMITIAN`, `MatNormalHermitianGetMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateNormalHermitian\"))\n\"\"\"\nfunction MatCreateNormalHermitian(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatCreateNormalHermitian(petsclib::$UnionPetscLib, A::PetscMat )\n\tN_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateNormalHermitian, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, N_,\n              )\n\n\tN = PetscMat(N_[], petsclib)\n\n\treturn N\nend \n\n\"\"\"\n\tMatBlockMatSetPreallocation(petsclib::PetscLibType,B::PetscMat, bs::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nFor good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameter nz\n(or the array nnz).  By setting these parameters accurately, performance\nduring matrix assembly can be increased by more than a factor of 50.\n\nCollective\n\nInput Parameters:\n- `B`   - The matrix\n- `bs`  - size of each block in matrix\n- `nz`  - number of nonzeros per block row (same for all rows)\n- `nnz` - array containing the number of nonzeros in the various block rows\n(possibly different for each row) or `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateBlockMat()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatBlockMatSetPreallocation\"))\n\"\"\"\nfunction MatBlockMatSetPreallocation(petsclib::PetscLibType, B::PetscMat, bs::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) end\n\n@for_petsc function MatBlockMatSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, bs::$PetscInt, nz::$PetscInt, nnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatBlockMatSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               B, bs, nz, nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateBlockMat(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, bs::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) \nCreates a new matrix in which each block contains a uniform\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `m`    - number of rows\n- `n`    - number of columns\n- `bs`   - size of each submatrix\n- `nz`   - expected maximum number of nonzero blocks in row (use `PETSC_DEFAULT` if not known)\n- `nnz`  - expected number of nonzers per block row if known (use `NULL` otherwise)\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATBLOCKMAT`, `MatCreateNest()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateBlockMat\"))\n\"\"\"\nfunction MatCreateBlockMat(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, bs::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateBlockMat(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, bs::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateBlockMat, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, bs, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateFFT(petsclib::PetscLibType,comm::MPI_Comm, ndim::PetscInt, dim::Vector{PetscInt}, mattype::MatType) \nCreates a matrix object that provides FFT via an external package\n\nCollective\n\nInput Parameters:\n- `comm`    - MPI communicator\n- `ndim`    - the ndim-dimensional transform\n- `dim`     - array of size ndim, dim[i] contains the vector length in the i-dimension\n- `mattype` - package type, e.g., `MATFFTW` or `MATSEQCUFFT`\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Key:\n- `-mat_fft_type` - set FFT type fft or seqcufft\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATFFTW`, `MATSEQCUFFT`, `MatCreateVecsFFTW()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateFFT\"))\n\"\"\"\nfunction MatCreateFFT(petsclib::PetscLibType, comm::MPI_Comm, ndim::PetscInt, dim::Vector{PetscInt}, mattype::MatType) end\n\n@for_petsc function MatCreateFFT(petsclib::$UnionPetscLib, comm::MPI_Comm, ndim::$PetscInt, dim::Vector{$PetscInt}, mattype::MatType )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateFFT, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, MatType, Ptr{CMat}),\n               comm, ndim, dim, mattype, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tx::PetscVec,y::PetscVec,z::PetscVec = MatCreateVecsFFTW(petsclib::PetscLibType,A::PetscMat) \nGet vector(s) compatible with the matrix, i.e. with the\nparallel layout determined by `MATFFTW`\n\nCollective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameters:\n- `x` - (optional) input vector of forward FFTW\n- `y` - (optional) output vector of forward FFTW\n- `z` - (optional) output vector of backward FFTW\n\nOptions Database Key:\n- `-mat_fftw_plannerflags` - set FFTW planner flags\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATFFTW`, `MatCreateFFT()`, `MatCreateVecs()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateVecsFFTW\"))\n\"\"\"\nfunction MatCreateVecsFFTW(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatCreateVecsFFTW(petsclib::$UnionPetscLib, A::PetscMat )\n\tx_ = Ref{CVec}()\n\ty_ = Ref{CVec}()\n\tz_ = Ref{CVec}()\n\n    @chk ccall(\n               (:MatCreateVecsFFTW, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CVec}, Ptr{CVec}, Ptr{CVec}),\n               A, x_, y_, z_,\n              )\n\n\tx = PetscVec(x_[], petsclib)\n\ty = PetscVec(y_[], petsclib)\n\tz = PetscVec(z_[], petsclib)\n\n\treturn x,y,z\nend \n\n\"\"\"\n\tMatHtoolSetKernel(petsclib::PetscLibType,A::PetscMat, kernel::MatHtoolKernelFn, kernelctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Mat/MatHtoolSetKernel\"))\n\"\"\"\nfunction MatHtoolSetKernel(petsclib::PetscLibType, A::PetscMat, kernel::MatHtoolKernelFn, kernelctx::Cvoid) end\n\n@for_petsc function MatHtoolSetKernel(petsclib::$UnionPetscLib, A::PetscMat, kernel::MatHtoolKernelFn, kernelctx::Cvoid )\n\n    @chk ccall(\n               (:MatHtoolSetKernel, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatHtoolKernelFn}, Ptr{Cvoid}),\n               A, kernel, kernelctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHtoolGetPermutationSource(petsclib::PetscLibType,A::PetscMat, is::IS) \n\n# External Links\n$(_doc_external(\"Mat/MatHtoolGetPermutationSource\"))\n\"\"\"\nfunction MatHtoolGetPermutationSource(petsclib::PetscLibType, A::PetscMat, is::IS) end\n\n@for_petsc function MatHtoolGetPermutationSource(petsclib::$UnionPetscLib, A::PetscMat, is::IS )\n\n    @chk ccall(\n               (:MatHtoolGetPermutationSource, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}),\n               A, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHtoolGetPermutationTarget(petsclib::PetscLibType,A::PetscMat, is::IS) \n\n# External Links\n$(_doc_external(\"Mat/MatHtoolGetPermutationTarget\"))\n\"\"\"\nfunction MatHtoolGetPermutationTarget(petsclib::PetscLibType, A::PetscMat, is::IS) end\n\n@for_petsc function MatHtoolGetPermutationTarget(petsclib::$UnionPetscLib, A::PetscMat, is::IS )\n\n    @chk ccall(\n               (:MatHtoolGetPermutationTarget, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}),\n               A, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHtoolUsePermutation(petsclib::PetscLibType,A::PetscMat, use::PetscBool) \n\n# External Links\n$(_doc_external(\"Mat/MatHtoolUsePermutation\"))\n\"\"\"\nfunction MatHtoolUsePermutation(petsclib::PetscLibType, A::PetscMat, use::PetscBool) end\n\n@for_petsc function MatHtoolUsePermutation(petsclib::$UnionPetscLib, A::PetscMat, use::PetscBool )\n\n    @chk ccall(\n               (:MatHtoolUsePermutation, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHtoolUseRecompression(petsclib::PetscLibType,A::PetscMat, use::PetscBool) \n\n# External Links\n$(_doc_external(\"Mat/MatHtoolUseRecompression\"))\n\"\"\"\nfunction MatHtoolUseRecompression(petsclib::PetscLibType, A::PetscMat, use::PetscBool) end\n\n@for_petsc function MatHtoolUseRecompression(petsclib::$UnionPetscLib, A::PetscMat, use::PetscBool )\n\n    @chk ccall(\n               (:MatHtoolUseRecompression, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tkernel::MatHtoolKernelFn,kernelctx::Cvoid,B::PetscMat = MatCreateHtoolFromKernel(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, spacedim::PetscInt, coords_target::Vector{PetscReal}, coords_source::Vector{PetscReal}) \n\n# External Links\n$(_doc_external(\"Mat/MatCreateHtoolFromKernel\"))\n\"\"\"\nfunction MatCreateHtoolFromKernel(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, spacedim::PetscInt, coords_target::Vector{PetscReal}, coords_source::Vector{PetscReal}) end\n\n@for_petsc function MatCreateHtoolFromKernel(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, spacedim::$PetscInt, coords_target::Vector{$PetscReal}, coords_source::Vector{$PetscReal} )\n\tkernel_ = Ref{MatHtoolKernelFn}()\n\tkernelctx_ = Ref{Cvoid}()\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateHtoolFromKernel, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{MatHtoolKernelFn}, Ptr{Cvoid}, Ptr{CMat}),\n               comm, m, n, M, N, spacedim, coords_target, coords_source, kernel_, kernelctx_, B_,\n              )\n\n\tkernel = kernel_[]\n\tkernelctx = kernelctx_[]\n\tB = PetscMat(B_[], petsclib)\n\n\treturn kernel,kernelctx,B\nend \n\n\"\"\"\n\tMatHYPRESetPreallocation(petsclib::PetscLibType,A::PetscMat, dnz::PetscInt, dnnz::Vector{PetscInt}, onz::PetscInt, onnz::Vector{PetscInt}) \nPreallocates memory for a sparse parallel matrix in HYPRE IJ format\n\nCollective\n\nInput Parameters:\n- `A`    - the matrix\n- `dnz`  - number of nonzeros per row in DIAGONAL portion of local submatrix\n(same value is used for all local rows)\n- `dnnz` - array containing the number of nonzeros in the various rows of the\nDIAGONAL portion of the local submatrix (possibly different for each row)\nor `NULL` (`PETSC_NULL_INTEGER` in Fortran), if `d_nz` is used to specify the nonzero structure.\nThe size of this array is equal to the number of local rows, i.e `m`.\nFor matrices that will be factored, you must leave room for (and set)\nthe diagonal entry even if it is zero.\n- `onz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local\nsubmatrix (same value is used for all local rows).\n- `onnz` - array containing the number of nonzeros in the various rows of the\nOFF-DIAGONAL portion of the local submatrix (possibly different for\neach row) or `NULL` (`PETSC_NULL_INTEGER` in Fortran), if `o_nz` is used to specify the nonzero\nstructure. The size of this array is equal to the number\nof local rows, i.e `m`.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatMPIAIJSetPreallocation()`, `MATHYPRE`, `MATAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatHYPRESetPreallocation\"))\n\"\"\"\nfunction MatHYPRESetPreallocation(petsclib::PetscLibType, A::PetscMat, dnz::PetscInt, dnnz::Vector{PetscInt}, onz::PetscInt, onnz::Vector{PetscInt}) end\n\n@for_petsc function MatHYPRESetPreallocation(petsclib::$UnionPetscLib, A::PetscMat, dnz::$PetscInt, dnnz::Vector{$PetscInt}, onz::$PetscInt, onnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatHYPRESetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               A, dnz, dnnz, onz, onnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHYPREGetParCSR(petsclib::PetscLibType,A::PetscMat, parcsr::hypre_ParCSRMatrix) \nGets the pointer to the ParCSR matrix\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `A` - the `MATHYPRE` object\n\nOutput Parameter:\n- `parcsr` - the pointer to the `hypre_ParCSRMatrix`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATHYPRE`, `PetscCopyMode`\n\n# External Links\n$(_doc_external(\"Mat/MatHYPREGetParCSR\"))\n\"\"\"\nfunction MatHYPREGetParCSR(petsclib::PetscLibType, A::PetscMat, parcsr::hypre_ParCSRMatrix) end\n\n@for_petsc function MatHYPREGetParCSR(petsclib::$UnionPetscLib, A::PetscMat, parcsr::hypre_ParCSRMatrix )\n\n    @chk ccall(\n               (:MatHYPREGetParCSR, $petsc_library),\n               PetscErrorCode,\n               (CMat, hypre_ParCSRMatrix),\n               A, parcsr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewmat::PetscMat = MatCreateSubMatrixVirtual(petsclib::PetscLibType,A::PetscMat, isrow::IS, iscol::IS) \nCreates a virtual matrix `MATSUBMATRIX` that acts as a submatrix\n\nCollective\n\nInput Parameters:\n- `A`     - matrix that we will extract a submatrix of\n- `isrow` - rows to be present in the submatrix\n- `iscol` - columns to be present in the submatrix\n\nOutput Parameter:\n- `newmat` - new matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATSUBMATRIX`, `MATLOCALREF`, `MatCreateLocalRef()`, `MatCreateSubMatrix()`, `MatSubMatrixVirtualUpdate()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSubMatrixVirtual\"))\n\"\"\"\nfunction MatCreateSubMatrixVirtual(petsclib::PetscLibType, A::PetscMat, isrow::IS, iscol::IS) end\n\n@for_petsc function MatCreateSubMatrixVirtual(petsclib::$UnionPetscLib, A::PetscMat, isrow::IS, iscol::IS )\n\tnewmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSubMatrixVirtual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{CMat}),\n               A, isrow, iscol, newmat_,\n              )\n\n\tnewmat = PetscMat(newmat_[], petsclib)\n\n\treturn newmat\nend \n\n\"\"\"\n\tMatSubMatrixVirtualUpdate(petsclib::PetscLibType,N::PetscMat, A::PetscMat, isrow::IS, iscol::IS) \nUpdates a `MATSUBMATRIX` virtual submatrix\n\nCollective\n\nInput Parameters:\n- `N`     - submatrix to update\n- `A`     - full matrix in the submatrix\n- `isrow` - rows in the update (same as the first time the submatrix was created)\n- `iscol` - columns in the update (same as the first time the submatrix was created)\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATSUBMATRIX`, `MatCreateSubMatrixVirtual()`\n\n# External Links\n$(_doc_external(\"Mat/MatSubMatrixVirtualUpdate\"))\n\"\"\"\nfunction MatSubMatrixVirtualUpdate(petsclib::PetscLibType, N::PetscMat, A::PetscMat, isrow::IS, iscol::IS) end\n\n@for_petsc function MatSubMatrixVirtualUpdate(petsclib::$UnionPetscLib, N::PetscMat, A::PetscMat, isrow::IS, iscol::IS )\n\n    @chk ccall(\n               (:MatSubMatrixVirtualUpdate, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CIS, CIS),\n               N, A, isrow, iscol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatNestGetSubMat(petsclib::PetscLibType,A::PetscMat, idxm::PetscInt, jdxm::PetscInt, sub::PetscMat) \nReturns a single, sub\n\nNot Collective\n\nInput Parameters:\n- `A`    - `MATNEST` matrix\n- `idxm` - index of the matrix within the nest matrix\n- `jdxm` - index of the matrix within the nest matrix\n\nOutput Parameter:\n- `sub` - matrix at index `idxm`, `jdxm` within the nest matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatNestGetSize()`, `MatNestGetSubMats()`, `MatCreateNest()`, `MatNestSetSubMat()`,\n`MatNestGetLocalISs()`, `MatNestGetISs()`\n\n# External Links\n$(_doc_external(\"Mat/MatNestGetSubMat\"))\n\"\"\"\nfunction MatNestGetSubMat(petsclib::PetscLibType, A::PetscMat, idxm::PetscInt, jdxm::PetscInt, sub::PetscMat) end\n\n@for_petsc function MatNestGetSubMat(petsclib::$UnionPetscLib, A::PetscMat, idxm::$PetscInt, jdxm::$PetscInt, sub::PetscMat )\n\tsub_ = Ref(sub.ptr)\n\n    @chk ccall(\n               (:MatNestGetSubMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{CMat}),\n               A, idxm, jdxm, sub_,\n              )\n\n\tsub.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatNestSetSubMat(petsclib::PetscLibType,A::PetscMat, idxm::PetscInt, jdxm::PetscInt, sub::PetscMat) \nSet a single submatrix in the `MATNEST`\n\nLogically Collective\n\nInput Parameters:\n- `A`    - `MATNEST` matrix\n- `idxm` - index of the matrix within the nest matrix\n- `jdxm` - index of the matrix within the nest matrix\n- `sub`  - matrix at index `idxm`, `jdxm` within the nest matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatNestSetSubMats()`, `MatNestGetSubMats()`, `MatNestGetLocalISs()`, `MatCreateNest()`,\n`MatNestGetSubMat()`, `MatNestGetISs()`, `MatNestGetSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatNestSetSubMat\"))\n\"\"\"\nfunction MatNestSetSubMat(petsclib::PetscLibType, A::PetscMat, idxm::PetscInt, jdxm::PetscInt, sub::PetscMat) end\n\n@for_petsc function MatNestSetSubMat(petsclib::$UnionPetscLib, A::PetscMat, idxm::$PetscInt, jdxm::$PetscInt, sub::PetscMat )\n\n    @chk ccall(\n               (:MatNestSetSubMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, CMat),\n               A, idxm, jdxm, sub,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tM::PetscInt,N::PetscInt = MatNestGetSubMats(petsclib::PetscLibType,A::PetscMat, mat::PetscMat) \nReturns the entire two dimensional array of matrices defining a `MATNEST` matrix.\n\nNot Collective\n\nInput Parameter:\n- `A` - nest matrix\n\nOutput Parameters:\n- `M`   - number of submatrix rows in the nest matrix\n- `N`   - number of submatrix columns in the nest matrix\n- `mat` - array of matrices\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatNestGetSize()`, `MatNestGetSubMat()`, `MatNestGetLocalISs()`, `MatCreateNest()`,\n`MatNestSetSubMats()`, `MatNestGetISs()`, `MatNestSetSubMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatNestGetSubMats\"))\n\"\"\"\nfunction MatNestGetSubMats(petsclib::PetscLibType, A::PetscMat, mat::PetscMat) end\n\n@for_petsc function MatNestGetSubMats(petsclib::$UnionPetscLib, A::PetscMat, mat::PetscMat )\n\tM_ = Ref{$PetscInt}()\n\tN_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatNestGetSubMats, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, CMat),\n               A, M_, N_, mat,\n              )\n\n\tM = M_[]\n\tN = N_[]\n\n\treturn M,N\nend \n\n\"\"\"\n\tM::PetscInt,N::PetscInt = MatNestGetSize(petsclib::PetscLibType,A::PetscMat) \nReturns the size of the `MATNEST` matrix.\n\nNot Collective\n\nInput Parameter:\n- `A` - `MATNEST` matrix\n\nOutput Parameters:\n- `M` - number of rows in the nested mat\n- `N` - number of cols in the nested mat\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatNestGetSubMat()`, `MatNestGetSubMats()`, `MatCreateNest()`, `MatNestGetLocalISs()`,\n`MatNestGetISs()`\n\n# External Links\n$(_doc_external(\"Mat/MatNestGetSize\"))\n\"\"\"\nfunction MatNestGetSize(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatNestGetSize(petsclib::$UnionPetscLib, A::PetscMat )\n\tM_ = Ref{$PetscInt}()\n\tN_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatNestGetSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               A, M_, N_,\n              )\n\n\tM = M_[]\n\tN = N_[]\n\n\treturn M,N\nend \n\n\"\"\"\n\tMatNestGetISs(petsclib::PetscLibType,A::PetscMat, rows::Vector{IS}, cols::Vector{IS}) \nReturns the index sets partitioning the row and column spaces of a `MATNEST`\n\nNot Collective\n\nInput Parameter:\n- `A` - `MATNEST` matrix\n\nOutput Parameters:\n- `rows` - array of row index sets (pass `NULL` to ignore)\n- `cols` - array of column index sets (pass `NULL` to ignore)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatNestGetSubMat()`, `MatNestGetSubMats()`, `MatNestGetSize()`, `MatNestGetLocalISs()`,\n`MatCreateNest()`, `MatNestSetSubMats()`\n\n# External Links\n$(_doc_external(\"Mat/MatNestGetISs\"))\n\"\"\"\nfunction MatNestGetISs(petsclib::PetscLibType, A::PetscMat, rows::Vector{IS}, cols::Vector{IS}) end\n\n@for_petsc function MatNestGetISs(petsclib::$UnionPetscLib, A::PetscMat, rows::Vector{IS}, cols::Vector{IS} )\n\n    @chk ccall(\n               (:MatNestGetISs, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}, Ptr{CIS}),\n               A, rows, cols,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatNestGetLocalISs(petsclib::PetscLibType,A::PetscMat, rows::Vector{IS}, cols::Vector{IS}) \nReturns the index sets partitioning the row and column spaces of a `MATNEST`\n\nNot Collective\n\nInput Parameter:\n- `A` - `MATNEST` matrix\n\nOutput Parameters:\n- `rows` - array of row index sets (pass `NULL` to ignore)\n- `cols` - array of column index sets (pass `NULL` to ignore)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatNestGetSubMat()`, `MatNestGetSubMats()`, `MatNestGetSize()`, `MatNestGetISs()`, `MatCreateNest()`,\n`MatNestSetSubMats()`, `MatNestSetSubMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatNestGetLocalISs\"))\n\"\"\"\nfunction MatNestGetLocalISs(petsclib::PetscLibType, A::PetscMat, rows::Vector{IS}, cols::Vector{IS}) end\n\n@for_petsc function MatNestGetLocalISs(petsclib::$UnionPetscLib, A::PetscMat, rows::Vector{IS}, cols::Vector{IS} )\n\n    @chk ccall(\n               (:MatNestGetLocalISs, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}, Ptr{CIS}),\n               A, rows, cols,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatNestSetVecType(petsclib::PetscLibType,A::PetscMat, vtype::VecType) \nSets the type of `Vec` returned by `MatCreateVecs()`\n\nNot Collective\n\nInput Parameters:\n- `A`     - `MATNEST` matrix\n- `vtype` - `VecType` to use for creating vectors\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatCreateVecs()`, `MatCreateNest()`, `VecType`\n\n# External Links\n$(_doc_external(\"Mat/MatNestSetVecType\"))\n\"\"\"\nfunction MatNestSetVecType(petsclib::PetscLibType, A::PetscMat, vtype::VecType) end\n\n@for_petsc function MatNestSetVecType(petsclib::$UnionPetscLib, A::PetscMat, vtype::VecType )\n\n    @chk ccall(\n               (:MatNestSetVecType, $petsc_library),\n               PetscErrorCode,\n               (CMat, VecType),\n               A, vtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatNestSetSubMats(petsclib::PetscLibType,A::PetscMat, nr::PetscInt, is_row::Vector{IS}, nc::PetscInt, is_col::Vector{IS}, a::Vector{PetscMat}) \nSets the nested submatrices in a `MATNEST`\n\nCollective\n\nInput Parameters:\n- `A`      - `MATNEST` matrix\n- `nr`     - number of nested row blocks\n- `is_row` - index sets for each nested row block, or `NULL` to make contiguous\n- `nc`     - number of nested column blocks\n- `is_col` - index sets for each nested column block, or `NULL` to make contiguous\n- `a`      - array of  nr \\times nc submatrices, or `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatCreateNest()`, `MatNestSetSubMat()`, `MatNestGetSubMat()`, `MatNestGetSubMats()`\n\n# External Links\n$(_doc_external(\"Mat/MatNestSetSubMats\"))\n\"\"\"\nfunction MatNestSetSubMats(petsclib::PetscLibType, A::PetscMat, nr::PetscInt, is_row::Vector{IS}, nc::PetscInt, is_col::Vector{IS}, a::Vector{PetscMat}) end\n\n@for_petsc function MatNestSetSubMats(petsclib::$UnionPetscLib, A::PetscMat, nr::$PetscInt, is_row::Vector{IS}, nc::$PetscInt, is_col::Vector{IS}, a::Vector{PetscMat} )\n\n    @chk ccall(\n               (:MatNestSetSubMats, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CIS}, $PetscInt, Ptr{CIS}, Ptr{CMat}),\n               A, nr, is_row, nc, is_col, a,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateNest(petsclib::PetscLibType,comm::MPI_Comm, nr::PetscInt, is_row::Vector{IS}, nc::PetscInt, is_col::Vector{IS}, a::Vector{PetscMat}) \nCreates a new `MATNEST` matrix containing several nested submatrices, each stored separately\n\nCollective\n\nInput Parameters:\n- `comm`   - Communicator for the new `MATNEST`\n- `nr`     - number of nested row blocks\n- `is_row` - index sets for each nested row block, or `NULL` to make contiguous\n- `nc`     - number of nested column blocks\n- `is_col` - index sets for each nested column block, or `NULL` to make contiguous\n- `a`      - array of nr \\times nc submatrices, empty submatrices can be passed using `NULL`\n\nOutput Parameter:\n- `B` - new matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATNEST`, `MatCreate()`, `VecCreateNest()`, `DMCreateMatrix()`, `MatNestSetSubMat()`,\n`MatNestGetSubMat()`, `MatNestGetLocalISs()`, `MatNestGetSize()`,\n`MatNestGetISs()`, `MatNestSetSubMats()`, `MatNestGetSubMats()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateNest\"))\n\"\"\"\nfunction MatCreateNest(petsclib::PetscLibType, comm::MPI_Comm, nr::PetscInt, is_row::Vector{IS}, nc::PetscInt, is_col::Vector{IS}, a::Vector{PetscMat}) end\n\n@for_petsc function MatCreateNest(petsclib::$UnionPetscLib, comm::MPI_Comm, nr::$PetscInt, is_row::Vector{IS}, nc::$PetscInt, is_col::Vector{IS}, a::Vector{PetscMat} )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateNest, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{CIS}, $PetscInt, Ptr{CIS}, Ptr{CMat}, Ptr{CMat}),\n               comm, nr, is_row, nc, is_col, a, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tMatMPIAIJGetNumberNonzeros(petsclib::PetscLibType,A::PetscMat, nz::PetscCount) \ngets the number of nonzeros in the matrix on this MPI rank\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `nz` - the number of nonzeros\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJGetNumberNonzeros\"))\n\"\"\"\nfunction MatMPIAIJGetNumberNonzeros(petsclib::PetscLibType, A::PetscMat, nz::PetscCount) end\n\n@for_petsc function MatMPIAIJGetNumberNonzeros(petsclib::$UnionPetscLib, A::PetscMat, nz::PetscCount )\n\n    @chk ccall(\n               (:MatMPIAIJGetNumberNonzeros, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscCount}),\n               A, nz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIAIJSetUseScalableIncreaseOverlap(petsclib::PetscLibType,A::PetscMat, sc::PetscBool) \nDetermine if the matrix uses a scalable algorithm to compute the overlap\n\nCollective\n\nInput Parameters:\n- `A`  - the matrix\n- `sc` - `PETSC_TRUE` indicates use the scalable algorithm (default is not to use the scalable algorithm)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJSetUseScalableIncreaseOverlap\"))\n\"\"\"\nfunction MatMPIAIJSetUseScalableIncreaseOverlap(petsclib::PetscLibType, A::PetscMat, sc::PetscBool) end\n\n@for_petsc function MatMPIAIJSetUseScalableIncreaseOverlap(petsclib::$UnionPetscLib, A::PetscMat, sc::PetscBool )\n\n    @chk ccall(\n               (:MatMPIAIJSetUseScalableIncreaseOverlap, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, sc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgarray::PetscInt,mat::PetscMat = MatCreateMPIAIJWithSeqAIJ(petsclib::PetscLibType,comm::MPI_Comm, M::PetscInt, N::PetscInt, A::PetscMat, B::PetscMat) \ncreates a `MATMPIAIJ` matrix using `MATSEQAIJ` matrices that contain the \"diagonal\"\nand \"off-diagonal\" part of the matrix in CSR format.\n\nCollective\n\nInput Parameters:\n- `comm`   - MPI communicator\n- `M`      - the global row size\n- `N`      - the global column size\n- `A`      - \"diagonal\" portion of matrix\n- `B`      - if garray is `NULL`, B should be the offdiag matrix using global col ids and of size N - if garray is not `NULL`, B should be the offdiag matrix using local col ids and of size garray\n- `garray` - either `NULL` or the global index of `B` columns. If not `NULL`, it should be allocated by `PetscMalloc1()` and will be owned by `mat` thereafter.\n\nOutput Parameter:\n- `mat` - the matrix, with input `A` as its local diagonal matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`, `MATSEQAIJ`, `MatCreateMPIAIJWithSplitArrays()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJWithSeqAIJ\"))\n\"\"\"\nfunction MatCreateMPIAIJWithSeqAIJ(petsclib::PetscLibType, comm::MPI_Comm, M::PetscInt, N::PetscInt, A::PetscMat, B::PetscMat) end\n\n@for_petsc function MatCreateMPIAIJWithSeqAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, M::$PetscInt, N::$PetscInt, A::PetscMat, B::PetscMat )\n\tgarray_ = Ref{$PetscInt}()\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJWithSeqAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, CMat, CMat, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, M, N, A, B, garray_, mat_,\n              )\n\n\tgarray = garray_[]\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn garray,mat\nend \n\n\"\"\"\n\tMatMPIAIJSetPreallocationCSR(petsclib::PetscLibType,B::PetscMat, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) \nAllocates memory for a sparse parallel matrix in `MATAIJ` format\n(the default parallel PETSc format).\n\nCollective\n\nInput Parameters:\n- `B` - the matrix\n- `i` - the indices into `j` for the start of each local row (indices start with zero)\n- `j` - the column indices for each local row (indices start with zero)\n- `v` - optional values in the matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatCreateAIJ()`,\n`MatCreateSeqAIJWithArrays()`, `MatCreateMPIAIJWithSplitArrays()`, `MatCreateMPIAIJWithArrays()`, `MatSetPreallocationCOO()`, `MatSetValuesCOO()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJSetPreallocationCSR\"))\n\"\"\"\nfunction MatMPIAIJSetPreallocationCSR(petsclib::PetscLibType, B::PetscMat, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) end\n\n@for_petsc function MatMPIAIJSetPreallocationCSR(petsclib::$UnionPetscLib, B::PetscMat, i::Vector{$PetscInt}, j::Vector{$PetscInt}, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatMPIAIJSetPreallocationCSR, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               B, i, j, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIAIJSetPreallocation(petsclib::PetscLibType,B::PetscMat, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nPreallocates memory for a sparse parallel matrix in `MATMPIAIJ` format\n(the default parallel PETSc format).  For good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameters\n`d_nz` (or `d_nnz`) and `o_nz` (or `o_nnz`).\n\nCollective\n\nInput Parameters:\n- `B`     - the matrix\n- `d_nz`  - number of nonzeros per row in DIAGONAL portion of local submatrix\n(same value is used for all local rows)\n- `d_nnz` - array containing the number of nonzeros in the various rows of the\nDIAGONAL portion of the local submatrix (possibly different for each row)\nor `NULL` (`PETSC_NULL_INTEGER` in Fortran), if `d_nz` is used to specify the nonzero structure.\nThe size of this array is equal to the number of local rows, i.e 'm'.\nFor matrices that will be factored, you must leave room for (and set)\nthe diagonal entry even if it is zero.\n- `o_nz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local\nsubmatrix (same value is used for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various rows of the\nOFF-DIAGONAL portion of the local submatrix (possibly different for\neach row) or `NULL` (`PETSC_NULL_INTEGER` in Fortran), if `o_nz` is used to specify the nonzero\nstructure. The size of this array is equal to the number\nof local rows, i.e 'm'.\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrices](sec_matsparse), `MATMPIAIJ`, `MATAIJ`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatCreateAIJ()`, `MatMPIAIJSetPreallocationCSR()`,\n`MatGetInfo()`, `PetscSplitOwnership()`, `MatSetPreallocationCOO()`, `MatSetValuesCOO()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJSetPreallocation\"))\n\"\"\"\nfunction MatMPIAIJSetPreallocation(petsclib::PetscLibType, B::PetscMat, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function MatMPIAIJSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatMPIAIJSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               B, d_nz, d_nnz, o_nz, o_nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateMPIAIJWithArrays(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) \ncreates a `MATMPIAIJ` matrix using arrays that contain in standard\nCSR format for the local rows.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `m`    - number of local rows (Cannot be `PETSC_DECIDE`)\n- `n`    - This value should be the same as the local size used in creating the\nx vector for the matrix-vector product  y = Ax. (or `PETSC_DECIDE` to have\ncalculated if `N` is given) For square matrices n is almost always `m`.\n- `M`    - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`    - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `i`    - row indices (of length m+1); that is i[0] = 0, i[row] = i[row-1] + number of elements in that row of the matrix\n- `j`    - global column indices\n- `a`    - optional matrix values\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`,\n`MATMPIAIJ`, `MatCreateAIJ()`, `MatCreateMPIAIJWithSplitArrays()`, `MatUpdateMPIAIJWithArray()`, `MatSetPreallocationCOO()`, `MatSetValuesCOO()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJWithArrays\"))\n\"\"\"\nfunction MatCreateMPIAIJWithArrays(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) end\n\n@for_petsc function MatCreateMPIAIJWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar} )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, m, n, M, N, i, j, a, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tMatUpdateMPIAIJWithArrays(petsclib::PetscLibType,mat::PetscMat, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, Ii::Vector{PetscInt}, J::Vector{PetscInt}, v::Vector{PetscScalar}) \nupdates a `MATMPIAIJ` matrix using arrays that contain in standard\nCSR format for the local rows. Only the numerical values are updated the other arrays must be identical to what was passed\nfrom `MatCreateMPIAIJWithArrays()`\n\nDeprecated: Use `MatUpdateMPIAIJWithArray()`\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `m`   - number of local rows (Cannot be `PETSC_DECIDE`)\n- `n`   - This value should be the same as the local size used in creating the\nx vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have\ncalculated if N is given) For square matrices n is almost always m.\n- `M`   - number of global rows (or `PETSC_DETERMINE` to have calculated if m is given)\n- `N`   - number of global columns (or `PETSC_DETERMINE` to have calculated if n is given)\n- `Ii`  - row indices; that is Ii[0] = 0, Ii[row] = Ii[row-1] + number of elements in that row of the matrix\n- `J`   - column indices\n- `v`   - matrix values\n\nLevel: deprecated\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`,\n`MatCreateAIJ()`, `MatCreateMPIAIJWithSplitArrays()`, `MatUpdateMPIAIJWithArray()`, `MatSetPreallocationCOO()`, `MatSetValuesCOO()`\n\n# External Links\n$(_doc_external(\"Mat/MatUpdateMPIAIJWithArrays\"))\n\"\"\"\nfunction MatUpdateMPIAIJWithArrays(petsclib::PetscLibType, mat::PetscMat, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, Ii::Vector{PetscInt}, J::Vector{PetscInt}, v::Vector{PetscScalar}) end\n\n@for_petsc function MatUpdateMPIAIJWithArrays(petsclib::$UnionPetscLib, mat::PetscMat, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, Ii::Vector{$PetscInt}, J::Vector{$PetscInt}, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatUpdateMPIAIJWithArrays, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               mat, m, n, M, N, Ii, J, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatUpdateMPIAIJWithArray(petsclib::PetscLibType,mat::PetscMat, v::Vector{PetscScalar}) \nupdates an `MATMPIAIJ` matrix using an array that contains the nonzero values\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `v`   - matrix values, stored by row\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`,\n`MATMPIAIJ`, `MatCreateAIJ()`, `MatCreateMPIAIJWithSplitArrays()`, `MatUpdateMPIAIJWithArrays()`, `MatSetPreallocationCOO()`, `MatSetValuesCOO()`\n\n# External Links\n$(_doc_external(\"Mat/MatUpdateMPIAIJWithArray\"))\n\"\"\"\nfunction MatUpdateMPIAIJWithArray(petsclib::PetscLibType, mat::PetscMat, v::Vector{PetscScalar}) end\n\n@for_petsc function MatUpdateMPIAIJWithArray(petsclib::$UnionPetscLib, mat::PetscMat, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatUpdateMPIAIJWithArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               mat, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateAIJ(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nCreates a sparse parallel matrix in `MATAIJ` format\n(the default parallel PETSc format).  For good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameters\n`d_nz` (or `d_nnz`) and `o_nz` (or `o_nnz`).\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if M is given). This value should be the same as the local size used in creating the y vector for the matrix-vector product y = Ax.\n- `n`     - This value should be the same as the local size used in creating the x vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have calculated if N is given) For square matrices n is almost always m.\n- `M`     - number of global rows (or `PETSC_DETERMINE` to have calculated if m is given)\n- `N`     - number of global columns (or `PETSC_DETERMINE` to have calculated if n is given)\n- `d_nz`  - number of nonzeros per row in DIAGONAL portion of local submatrix (same value is used for all local rows)\n- `d_nnz` - array containing the number of nonzeros in the various rows of the DIAGONAL portion of the local submatrix (possibly different for each row) or `NULL`, if `d_nz` is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.e 'm'.\n- `o_nz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local submatrix (same value is used for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various rows of the OFF-DIAGONAL portion of the local submatrix (possibly different for each row) or `NULL`, if `o_nz` is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.e 'm'.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_no_inode`                     - Do not use inodes\n- `-mat_inode_limit <limit>`          - Sets inode limit (max limit=5)\n- `-matmult_vecscatter_view <viewer>` - View the vecscatter (i.e., communication pattern) used in `MatMult()` of sparse parallel matrices.\nSee viewer types in manual of `MatView()`. Of them, ascii_matlab, draw or binary cause the `VecScatter`\nto be viewed as a matrix. Entry (i,j) is the size of message (in bytes) rank i sends to rank j in one `MatMult()` call.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrix Creation](sec_matsparse), `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`,\n`MATMPIAIJ`, `MatCreateMPIAIJWithArrays()`, `MatGetOwnershipRange()`, `MatGetOwnershipRanges()`, `MatGetOwnershipRangeColumn()`,\n`MatGetOwnershipRangesColumn()`, `PetscLayout`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateAIJ\"))\n\"\"\"\nfunction MatCreateAIJ(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Union{Ptr,Vector{$PetscInt}}, o_nz::$PetscInt, o_nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tcolmap::Vector{PetscInt} = MatMPIAIJGetSeqAIJ(petsclib::PetscLibType,A::PetscMat, Ad::PetscMat, Ao::PetscMat) \nReturns the local pieces of this distributed matrix\n\nNot Collective\n\nInput Parameter:\n- `A` - The `MATMPIAIJ` matrix\n\nOutput Parameters:\n- `Ad`     - The local diagonal block as a `MATSEQAIJ` matrix\n- `Ao`     - The local off-diagonal block as a `MATSEQAIJ` matrix\n- `colmap` - An array mapping local column numbers of `Ao` to global column numbers of the parallel matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`, `MatMPIAIJGetLocalMat()`, `MatMPIAIJGetLocalMatCondensed()`, `MatCreateAIJ()`, `MATSEQAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJGetSeqAIJ\"))\n\"\"\"\nfunction MatMPIAIJGetSeqAIJ(petsclib::PetscLibType, A::PetscMat, Ad::PetscMat, Ao::PetscMat) end\n\n@for_petsc function MatMPIAIJGetSeqAIJ(petsclib::$UnionPetscLib, A::PetscMat, Ad::PetscMat, Ao::PetscMat )\n\tAd_ = Ref(Ad.ptr)\n\tAo_ = Ref(Ao.ptr)\n\tcolmap_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:MatMPIAIJGetSeqAIJ, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{CMat}, Ptr{Ptr{$PetscInt}}),\n               A, Ad_, Ao_, colmap_,\n              )\n\n\tAd.ptr = C_NULL\n\tAo.ptr = C_NULL\n\tcolmap = unsafe_wrap(Array, colmap_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn colmap\nend \n\n\"\"\"\n\tMatCreateMPIAIJSumSeqAIJNumeric(petsclib::PetscLibType,seqmat::PetscMat, mpimat::PetscMat) \n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJSumSeqAIJNumeric\"))\n\"\"\"\nfunction MatCreateMPIAIJSumSeqAIJNumeric(petsclib::PetscLibType, seqmat::PetscMat, mpimat::PetscMat) end\n\n@for_petsc function MatCreateMPIAIJSumSeqAIJNumeric(petsclib::$UnionPetscLib, seqmat::PetscMat, mpimat::PetscMat )\n\n    @chk ccall(\n               (:MatCreateMPIAIJSumSeqAIJNumeric, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               seqmat, mpimat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmpimat::PetscMat = MatCreateMPIAIJSumSeqAIJSymbolic(petsclib::PetscLibType,comm::MPI_Comm, seqmat::PetscMat, m::PetscInt, n::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJSumSeqAIJSymbolic\"))\n\"\"\"\nfunction MatCreateMPIAIJSumSeqAIJSymbolic(petsclib::PetscLibType, comm::MPI_Comm, seqmat::PetscMat, m::PetscInt, n::PetscInt) end\n\n@for_petsc function MatCreateMPIAIJSumSeqAIJSymbolic(petsclib::$UnionPetscLib, comm::MPI_Comm, seqmat::PetscMat, m::$PetscInt, n::$PetscInt )\n\tmpimat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJSumSeqAIJSymbolic, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, CMat, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, seqmat, m, n, mpimat_,\n              )\n\n\tmpimat = PetscMat(mpimat_[], petsclib)\n\n\treturn mpimat\nend \n\n\"\"\"\n\tmpimat::PetscMat = MatCreateMPIAIJSumSeqAIJ(petsclib::PetscLibType,comm::MPI_Comm, seqmat::PetscMat, m::PetscInt, n::PetscInt, scall::MatReuse) \nCreates a `MATMPIAIJ` matrix by adding sequential\nmatrices from each processor\n\nCollective\n\nInput Parameters:\n- `comm`   - the communicators the parallel matrix will live on\n- `seqmat` - the input sequential matrices\n- `m`      - number of local rows (or `PETSC_DECIDE`)\n- `n`      - number of local columns (or `PETSC_DECIDE`)\n- `scall`  - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `mpimat` - the parallel matrix generated\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateAIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJSumSeqAIJ\"))\n\"\"\"\nfunction MatCreateMPIAIJSumSeqAIJ(petsclib::PetscLibType, comm::MPI_Comm, seqmat::PetscMat, m::PetscInt, n::PetscInt, scall::MatReuse) end\n\n@for_petsc function MatCreateMPIAIJSumSeqAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, seqmat::PetscMat, m::$PetscInt, n::$PetscInt, scall::MatReuse )\n\tmpimat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJSumSeqAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, CMat, $PetscInt, $PetscInt, MatReuse, Ptr{CMat}),\n               comm, seqmat, m, n, scall, mpimat_,\n              )\n\n\tmpimat = PetscMat(mpimat_[], petsclib)\n\n\treturn mpimat\nend \n\n\"\"\"\n\tMatAIJGetLocalMat(petsclib::PetscLibType,A::PetscMat, A_loc::PetscMat) \nCreates a `MATSEQAIJ` from a `MATAIJ` matrix.\n\nNot Collective\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `A_loc` - the local sequential matrix generated\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatMPIAIJGetLocalMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatAIJGetLocalMat\"))\n\"\"\"\nfunction MatAIJGetLocalMat(petsclib::PetscLibType, A::PetscMat, A_loc::PetscMat) end\n\n@for_petsc function MatAIJGetLocalMat(petsclib::$UnionPetscLib, A::PetscMat, A_loc::PetscMat )\n\tA_loc_ = Ref(A_loc.ptr)\n\n    @chk ccall(\n               (:MatAIJGetLocalMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, A_loc_,\n              )\n\n\tA_loc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIAIJGetLocalMat(petsclib::PetscLibType,A::PetscMat, scall::MatReuse, A_loc::PetscMat) \nCreates a `MATSEQAIJ` from a `MATMPIAIJ` matrix.\n\nNot Collective\n\nInput Parameters:\n- `A`     - the matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `A_loc` - the local sequential matrix generated\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`, `MatGetOwnershipRange()`, `MatMPIAIJGetLocalMatCondensed()`, `MatMPIAIJGetLocalMatMerge()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJGetLocalMat\"))\n\"\"\"\nfunction MatMPIAIJGetLocalMat(petsclib::PetscLibType, A::PetscMat, scall::MatReuse, A_loc::PetscMat) end\n\n@for_petsc function MatMPIAIJGetLocalMat(petsclib::$UnionPetscLib, A::PetscMat, scall::MatReuse, A_loc::PetscMat )\n\tA_loc_ = Ref(A_loc.ptr)\n\n    @chk ccall(\n               (:MatMPIAIJGetLocalMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CMat}),\n               A, scall, A_loc_,\n              )\n\n\tA_loc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIAIJGetLocalMatMerge(petsclib::PetscLibType,A::PetscMat, scall::MatReuse, glob::IS, A_loc::PetscMat) \nCreates a `MATSEQAIJ` from a `MATMPIAIJ` matrix by taking all its local rows and putting them into a sequential matrix with\nmlocal rows and n columns. Where n is the sum of the number of columns of the diagonal and off-diagonal part\n\nNot Collective\n\nInput Parameters:\n- `A`     - the matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameters:\n- `glob`  - sequential `IS` with global indices associated with the columns of the local sequential matrix generated (can be `NULL`)\n- `A_loc` - the local sequential matrix generated\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`, `MatGetOwnershipRange()`, `MatMPIAIJGetLocalMat()`, `MatMPIAIJGetLocalMatCondensed()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJGetLocalMatMerge\"))\n\"\"\"\nfunction MatMPIAIJGetLocalMatMerge(petsclib::PetscLibType, A::PetscMat, scall::MatReuse, glob::IS, A_loc::PetscMat) end\n\n@for_petsc function MatMPIAIJGetLocalMatMerge(petsclib::$UnionPetscLib, A::PetscMat, scall::MatReuse, glob::IS, A_loc::PetscMat )\n\tA_loc_ = Ref(A_loc.ptr)\n\n    @chk ccall(\n               (:MatMPIAIJGetLocalMatMerge, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CIS}, Ptr{CMat}),\n               A, scall, glob, A_loc_,\n              )\n\n\tA_loc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMPIAIJGetLocalMatCondensed(petsclib::PetscLibType,A::PetscMat, scall::MatReuse, row::IS, col::IS, A_loc::PetscMat) \nCreates a `MATSEQAIJ` matrix from an `MATMPIAIJ` matrix by taking all its local rows and NON\n\nNot Collective\n\nInput Parameters:\n- `A`     - the matrix\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n- `row`   - index set of rows to extract (or `NULL`)\n- `col`   - index set of columns to extract (or `NULL`)\n\nOutput Parameter:\n- `A_loc` - the local sequential matrix generated\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMPIAIJ`, `MatGetOwnershipRange()`, `MatMPIAIJGetLocalMat()`\n\n# External Links\n$(_doc_external(\"Mat/MatMPIAIJGetLocalMatCondensed\"))\n\"\"\"\nfunction MatMPIAIJGetLocalMatCondensed(petsclib::PetscLibType, A::PetscMat, scall::MatReuse, row::IS, col::IS, A_loc::PetscMat) end\n\n@for_petsc function MatMPIAIJGetLocalMatCondensed(petsclib::$UnionPetscLib, A::PetscMat, scall::MatReuse, row::IS, col::IS, A_loc::PetscMat )\n\tA_loc_ = Ref(A_loc.ptr)\n\n    @chk ccall(\n               (:MatMPIAIJGetLocalMatCondensed, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CIS}, Ptr{CIS}, Ptr{CMat}),\n               A, scall, row, col, A_loc_,\n              )\n\n\tA_loc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetBrowsOfAcols(petsclib::PetscLibType,A::PetscMat, B::PetscMat, scall::MatReuse, rowb::IS, colb::IS, B_seq::PetscMat) \nReturns `IS` that contain rows of `B` that equal to nonzero columns of local `A`\n\nCollective\n\nInput Parameters:\n- `A`     - the first matrix in `MATMPIAIJ` format\n- `B`     - the second matrix in `MATMPIAIJ` format\n- `scall` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameters:\n- `rowb`  - On input index sets of rows of B to extract (or `NULL`), modified on output\n- `colb`  - On input index sets of columns of B to extract (or `NULL`), modified on output\n- `B_seq` - the sequential matrix generated\n\nLevel: developer\n\n-seealso: `Mat`, `MATMPIAIJ`, `IS`, `MatReuse`\n\n# External Links\n$(_doc_external(\"Mat/MatGetBrowsOfAcols\"))\n\"\"\"\nfunction MatGetBrowsOfAcols(petsclib::PetscLibType, A::PetscMat, B::PetscMat, scall::MatReuse, rowb::IS, colb::IS, B_seq::PetscMat) end\n\n@for_petsc function MatGetBrowsOfAcols(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, scall::MatReuse, rowb::IS, colb::IS, B_seq::PetscMat )\n\tB_seq_ = Ref(B_seq.ptr)\n\n    @chk ccall(\n               (:MatGetBrowsOfAcols, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatReuse, Ptr{CIS}, Ptr{CIS}, Ptr{CMat}),\n               A, B, scall, rowb, colb, B_seq_,\n              )\n\n\tB_seq.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateMPIAIJWithSplitArrays(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}, oi::Vector{PetscInt}, oj::Vector{PetscInt}, oa::Vector{PetscScalar}) \ncreates a `MATMPIAIJ` matrix using arrays that contain the \"diagonal\"\nand \"off-diagonal\" part of the matrix in CSR format.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `m`    - number of local rows (Cannot be `PETSC_DECIDE`)\n- `n`    - This value should be the same as the local size used in creating the\nx vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have\ncalculated if `N` is given) For square matrices `n` is almost always `m`.\n- `M`    - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`    - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `i`    - row indices for \"diagonal\" portion of matrix; that is i[0] = 0, i[row] = i[row-1] + number of elements in that row of the matrix\n- `j`    - column indices, which must be local, i.e., based off the start column of the diagonal portion\n- `a`    - matrix values\n- `oi`   - row indices for \"off-diagonal\" portion of matrix; that is oi[0] = 0, oi[row] = oi[row-1] + number of elements in that row of the matrix\n- `oj`   - column indices, which must be global, representing global columns in the `MATMPIAIJ` matrix\n- `oa`   - matrix values\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`,\n`MATMPIAIJ`, `MatCreateAIJ()`, `MatCreateMPIAIJWithArrays()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJWithSplitArrays\"))\n\"\"\"\nfunction MatCreateMPIAIJWithSplitArrays(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}, oi::Vector{PetscInt}, oj::Vector{PetscInt}, oa::Vector{PetscScalar}) end\n\n@for_petsc function MatCreateMPIAIJWithSplitArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar}, oi::Vector{$PetscInt}, oj::Vector{$PetscInt}, oa::Vector{$PetscScalar} )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJWithSplitArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, m, n, M, N, i, j, a, oi, oj, oa, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateMPIAIJCRL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}, onz::PetscInt, onnz::Vector{PetscInt}) \nCreates a sparse matrix of type `MATMPIAIJCRL`.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzeros per row (same for all rows), for the \"diagonal\" submatrix\n- `nnz`  - array containing the number of nonzeros in the various rows (possibly different for each row) or `NULL`, for the \"diagonal\" submatrix\n- `onz`  - number of nonzeros per row (same for all rows), for the \"off-diagonal\" submatrix\n- `onnz` - array containing the number of nonzeros in the various rows (possibly different for each row) or `NULL`, for the \"off-diagonal\" submatrix\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrix Creation](sec_matsparse), `MATAIJ`, `MATAIJSELL`, `MATAIJPERM`, `MATAIJMKL`, `MatCreate()`, `MatCreateMPIAIJPERM()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJCRL\"))\n\"\"\"\nfunction MatCreateMPIAIJCRL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}, onz::PetscInt, onnz::Vector{PetscInt}) end\n\n@for_petsc function MatCreateMPIAIJCRL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Vector{$PetscInt}, onz::$PetscInt, onnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJCRL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, onz, onnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateAIJKokkos(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"Mat/MatCreateAIJKokkos\"))\n\"\"\"\nfunction MatCreateAIJKokkos(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function MatCreateAIJKokkos(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateAIJKokkos, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateMPIAIJMKL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nCreates a sparse parallel matrix whose local\nportions are stored as `MATSEQAIJMKL` matrices (a matrix class that inherits\nfrom `MATSEQAIJ` but uses some operations provided by Intel MKL).\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)\nThis value should be the same as the local size used in creating the\ny vector for the matrix-vector product y = Ax.\n- `n`     - This value should be the same as the local size used in creating the\nx vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have\ncalculated if N is given) For square matrices n is almost always `m`.\n- `M`     - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`     - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `d_nz`  - number of nonzeros per row in DIAGONAL portion of local submatrix\n(same value is used for all local rows)\n- `d_nnz` - array containing the number of nonzeros in the various rows of the\nDIAGONAL portion of the local submatrix (possibly different for each row)\nor `NULL`, if `d_nz` is used to specify the nonzero structure.\nThe size of this array is equal to the number of local rows, i.e `m`.\nFor matrices you plan to factor you must leave room for the diagonal entry and\nput in the entry even if it is zero.\n- `o_nz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local\nsubmatrix (same value is used for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various rows of the\nOFF-DIAGONAL portion of the local submatrix (possibly different for\neach row) or `NULL`, if `o_nz` is used to specify the nonzero\nstructure. The size of this array is equal to the number\nof local rows, i.e `m`.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Key:\n- `-mat_aijmkl_no_spmv2` - disables use of the SpMV2 inspector-executor routines\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrix Creation](sec_matsparse), `MATMPIAIJMKL`, `MatCreate()`, `MatCreateSeqAIJMKL()`,\n`MatSetValues()`, `MatGetOwnershipRange()`, `MatGetOwnershipRanges()`, `MatGetOwnershipRangeColumn()`,\n`MatGetOwnershipRangesColumn()`, `PetscLayout`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJMKL\"))\n\"\"\"\nfunction MatCreateMPIAIJMKL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function MatCreateMPIAIJMKL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJMKL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatSTRUMPACKSetReordering(petsclib::PetscLibType,F::PetscMat, reordering::MatSTRUMPACKReordering) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> fill\n\nLogically Collective\n\nInput Parameters:\n- `F`          - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `reordering` - the code to be used to find the fill-reducing reordering\n\nOptions Database Key:\n- `-mat_strumpack_reordering <METIS>` - Sparsity reducing matrix reordering, see `MatSTRUMPACKReordering`\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatSTRUMPACKReordering`, `MatGetFactor()`, `MatSTRUMPACKSetColPerm()`, `MatSTRUMPACKGetReordering()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetReordering\"))\n\"\"\"\nfunction MatSTRUMPACKSetReordering(petsclib::PetscLibType, F::PetscMat, reordering::MatSTRUMPACKReordering) end\n\n@for_petsc function MatSTRUMPACKSetReordering(petsclib::$UnionPetscLib, F::PetscMat, reordering::MatSTRUMPACKReordering )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetReordering, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatSTRUMPACKReordering),\n               F, reordering,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSTRUMPACKGetReordering(petsclib::PetscLibType,F::PetscMat, reordering::MatSTRUMPACKReordering) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> fill\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n\nOutput Parameter:\n- `reordering` - the code to be used to find the fill-reducing reordering\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatSTRUMPACKReordering`, `MatGetFactor()`, `MatSTRUMPACKSetReordering()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetReordering\"))\n\"\"\"\nfunction MatSTRUMPACKGetReordering(petsclib::PetscLibType, F::PetscMat, reordering::MatSTRUMPACKReordering) end\n\n@for_petsc function MatSTRUMPACKGetReordering(petsclib::$UnionPetscLib, F::PetscMat, reordering::MatSTRUMPACKReordering )\n\n    @chk ccall(\n               (:MatSTRUMPACKGetReordering, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatSTRUMPACKReordering}),\n               F, reordering,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSTRUMPACKSetColPerm(petsclib::PetscLibType,F::PetscMat, cperm::PetscBool) \nSet whether STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master>\nshould try to permute the columns of the matrix in order to get a nonzero diagonal\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()`\n- `cperm` - `PETSC_TRUE` to permute (internally) the columns of the matrix\n\nOptions Database Key:\n- `-mat_strumpack_colperm <cperm>` - true to use the permutation\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `MatSTRUMPACKSetReordering()`, `Mat`, `MatGetFactor()`, `MatSTRUMPACKGetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetColPerm\"))\n\"\"\"\nfunction MatSTRUMPACKSetColPerm(petsclib::PetscLibType, F::PetscMat, cperm::PetscBool) end\n\n@for_petsc function MatSTRUMPACKSetColPerm(petsclib::$UnionPetscLib, F::PetscMat, cperm::PetscBool )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetColPerm, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               F, cperm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcperm::PetscBool = MatSTRUMPACKGetColPerm(petsclib::PetscLibType,F::PetscMat) \nGet whether STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master>\nwill try to permute the columns of the matrix in order to get a nonzero diagonal\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()`\n\nOutput Parameter:\n- `cperm` - Indicates whether STRUMPACK will permute columns\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `MatSTRUMPACKSetReordering()`, `Mat`, `MatGetFactor()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetColPerm\"))\n\"\"\"\nfunction MatSTRUMPACKGetColPerm(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetColPerm(petsclib::$UnionPetscLib, F::PetscMat )\n\tcperm_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetColPerm, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               F, cperm_,\n              )\n\n\tcperm = cperm_[]\n\n\treturn cperm\nend \n\n\"\"\"\n\tMatSTRUMPACKSetGPU(petsclib::PetscLibType,F::PetscMat, gpu::PetscBool) \nSet whether STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master>\nshould enable GPU acceleration (not supported for all compression types)\n\nLogically Collective\n\nInput Parameters:\n- `F`   - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `gpu` - whether or not to use GPU acceleration\n\nOptions Database Key:\n- `-mat_strumpack_gpu <gpu>` - true to use gpu offload\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKGetGPU()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetGPU\"))\n\"\"\"\nfunction MatSTRUMPACKSetGPU(petsclib::PetscLibType, F::PetscMat, gpu::PetscBool) end\n\n@for_petsc function MatSTRUMPACKSetGPU(petsclib::$UnionPetscLib, F::PetscMat, gpu::PetscBool )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetGPU, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               F, gpu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgpu::PetscBool = MatSTRUMPACKGetGPU(petsclib::PetscLibType,F::PetscMat) \nGet whether STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master>\nwill try to use GPU acceleration (not supported for all compression types)\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n\nOutput Parameter:\n- `gpu` - whether or not STRUMPACK will try to use GPU acceleration\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKSetGPU()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetGPU\"))\n\"\"\"\nfunction MatSTRUMPACKGetGPU(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetGPU(petsclib::$UnionPetscLib, F::PetscMat )\n\tgpu_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetGPU, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               F, gpu_,\n              )\n\n\tgpu = gpu_[]\n\n\treturn gpu\nend \n\n\"\"\"\n\tMatSTRUMPACKSetCompression(petsclib::PetscLibType,F::PetscMat, comp::MatSTRUMPACKCompressionType) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> compression type\n\nInput Parameters:\n- `F`    - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `comp` - Type of compression to be used in the approximate sparse factorization\n\nOptions Database Key:\n- `-mat_strumpack_compression <NONE>` - Type of rank-structured compression in sparse LU factors (choose one of) NONE HSS BLR HODLR BLR_HODLR ZFP_BLR_HODLR LOSSLESS LOSSY\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKCompressionType`, `MatSTRUMPACKGetCompression()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetCompression\"))\n\"\"\"\nfunction MatSTRUMPACKSetCompression(petsclib::PetscLibType, F::PetscMat, comp::MatSTRUMPACKCompressionType) end\n\n@for_petsc function MatSTRUMPACKSetCompression(petsclib::$UnionPetscLib, F::PetscMat, comp::MatSTRUMPACKCompressionType )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetCompression, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatSTRUMPACKCompressionType),\n               F, comp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSTRUMPACKGetCompression(petsclib::PetscLibType,F::PetscMat, comp::MatSTRUMPACKCompressionType) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> compression type\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n\nOutput Parameter:\n- `comp` - Type of compression to be used in the approximate sparse factorization\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKCompressionType`, `MatSTRUMPACKSetCompression()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetCompression\"))\n\"\"\"\nfunction MatSTRUMPACKGetCompression(petsclib::PetscLibType, F::PetscMat, comp::MatSTRUMPACKCompressionType) end\n\n@for_petsc function MatSTRUMPACKGetCompression(petsclib::$UnionPetscLib, F::PetscMat, comp::MatSTRUMPACKCompressionType )\n\n    @chk ccall(\n               (:MatSTRUMPACKGetCompression, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatSTRUMPACKCompressionType}),\n               F, comp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSTRUMPACKSetCompRelTol(petsclib::PetscLibType,F::PetscMat, rtol::PetscReal) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> relative tolerance for compression\n\nLogically Collective\n\nInput Parameters:\n- `F`    - the factored matrix obtained by calling `MatGetFactor()`\n- `rtol` - relative compression tolerance\n\nOptions Database Key:\n- `-mat_strumpack_compression_rel_tol <1e-4>` - Relative compression tolerance, when using `-pctype ilu`\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatGetFactor()`, `MatSTRUMPACKGetCompRelTol()`, `MatSTRUMPACKSetReordering()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetCompRelTol\"))\n\"\"\"\nfunction MatSTRUMPACKSetCompRelTol(petsclib::PetscLibType, F::PetscMat, rtol::PetscReal) end\n\n@for_petsc function MatSTRUMPACKSetCompRelTol(petsclib::$UnionPetscLib, F::PetscMat, rtol::$PetscReal )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetCompRelTol, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               F, rtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trtol::PetscReal = MatSTRUMPACKGetCompRelTol(petsclib::PetscLibType,F::PetscMat) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> relative tolerance for compression\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()`\n\nOutput Parameter:\n- `rtol` - relative compression tolerance\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatGetFactor()`, `MatSTRUMPACKSetCompRelTol()`, `MatSTRUMPACKSetReordering()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetCompRelTol\"))\n\"\"\"\nfunction MatSTRUMPACKGetCompRelTol(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetCompRelTol(petsclib::$UnionPetscLib, F::PetscMat )\n\trtol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetCompRelTol, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               F, rtol_,\n              )\n\n\trtol = rtol_[]\n\n\treturn rtol\nend \n\n\"\"\"\n\tMatSTRUMPACKSetCompAbsTol(petsclib::PetscLibType,F::PetscMat, atol::PetscReal) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> absolute tolerance for compression\n\nLogically Collective\n\nInput Parameters:\n- `F`    - the factored matrix obtained by calling `MatGetFactor()`\n- `atol` - absolute compression tolerance\n\nOptions Database Key:\n- `-mat_strumpack_compression_abs_tol <1e-10>` - Absolute compression tolerance, when using `-pctype ilu`\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatGetFactor()`, `MatSTRUMPACKGetCompAbsTol()`, `MatSTRUMPACKSetReordering()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetCompAbsTol\"))\n\"\"\"\nfunction MatSTRUMPACKSetCompAbsTol(petsclib::PetscLibType, F::PetscMat, atol::PetscReal) end\n\n@for_petsc function MatSTRUMPACKSetCompAbsTol(petsclib::$UnionPetscLib, F::PetscMat, atol::$PetscReal )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetCompAbsTol, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               F, atol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tatol::PetscReal = MatSTRUMPACKGetCompAbsTol(petsclib::PetscLibType,F::PetscMat) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> absolute tolerance for compression\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()`\n\nOutput Parameter:\n- `atol` - absolute compression tolerance\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatGetFactor()`, `MatSTRUMPACKSetCompAbsTol()`, `MatSTRUMPACKSetReordering()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetCompAbsTol\"))\n\"\"\"\nfunction MatSTRUMPACKGetCompAbsTol(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetCompAbsTol(petsclib::$UnionPetscLib, F::PetscMat )\n\tatol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetCompAbsTol, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               F, atol_,\n              )\n\n\tatol = atol_[]\n\n\treturn atol\nend \n\n\"\"\"\n\tMatSTRUMPACKSetCompLeafSize(petsclib::PetscLibType,F::PetscMat, leaf_size::PetscInt) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> leaf size for HSS, BLR, HODLR...\n\nLogically Collective\n\nInput Parameters:\n- `F`         - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `leaf_size` - Size of diagonal blocks in rank-structured approximation\n\nOptions Database Key:\n- `-mat_strumpack_compression_leaf_size` - Size of diagonal blocks in rank-structured approximation, when using `-pctype ilu`\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatGetFactor()`, `MatSTRUMPACKGetCompLeafSize()`, `MatSTRUMPACKSetReordering()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetCompLeafSize\"))\n\"\"\"\nfunction MatSTRUMPACKSetCompLeafSize(petsclib::PetscLibType, F::PetscMat, leaf_size::PetscInt) end\n\n@for_petsc function MatSTRUMPACKSetCompLeafSize(petsclib::$UnionPetscLib, F::PetscMat, leaf_size::$PetscInt )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetCompLeafSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               F, leaf_size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tleaf_size::PetscInt = MatSTRUMPACKGetCompLeafSize(petsclib::PetscLibType,F::PetscMat) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> leaf size for HSS, BLR, HODLR...\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n\nOutput Parameter:\n- `leaf_size` - Size of diagonal blocks in rank-structured approximation\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, [](ch_matrices), `Mat`, `MatGetFactor()`, `MatSTRUMPACKSetCompLeafSize()`, `MatSTRUMPACKSetReordering()`, `MatSTRUMPACKSetColPerm()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetCompLeafSize\"))\n\"\"\"\nfunction MatSTRUMPACKGetCompLeafSize(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetCompLeafSize(petsclib::$UnionPetscLib, F::PetscMat )\n\tleaf_size_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetCompLeafSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               F, leaf_size_,\n              )\n\n\tleaf_size = leaf_size_[]\n\n\treturn leaf_size\nend \n\n\"\"\"\n\tMatSTRUMPACKSetGeometricNxyz(petsclib::PetscLibType,F::PetscMat, nx::PetscInt, ny::PetscInt, nz::PetscInt) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> mesh x, y and z dimensions, for use with GEOMETRIC ordering.\n\nLogically Collective\n\nInput Parameters:\n- `F`  - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `nx` - x dimension of the mesh\n- `ny` - y dimension of the mesh\n- `nz` - z dimension of the mesh\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetGeometricNxyz\"))\n\"\"\"\nfunction MatSTRUMPACKSetGeometricNxyz(petsclib::PetscLibType, F::PetscMat, nx::PetscInt, ny::PetscInt, nz::PetscInt) end\n\n@for_petsc function MatSTRUMPACKSetGeometricNxyz(petsclib::$UnionPetscLib, F::PetscMat, nx::$PetscInt, ny::$PetscInt, nz::$PetscInt )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetGeometricNxyz, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, $PetscInt),\n               F, nx, ny, nz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSTRUMPACKSetGeometricComponents(petsclib::PetscLibType,F::PetscMat, nc::PetscInt) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master>\nnumber of degrees of freedom per mesh point, for use with GEOMETRIC ordering.\n\nLogically Collective\n\nInput Parameters:\n- `F`  - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `nc` - Number of components/dof's per grid point\n\nOptions Database Key:\n- `-mat_strumpack_geometric_components <1>` - Number of components per mesh point, for geometric nested dissection ordering\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetGeometricComponents\"))\n\"\"\"\nfunction MatSTRUMPACKSetGeometricComponents(petsclib::PetscLibType, F::PetscMat, nc::PetscInt) end\n\n@for_petsc function MatSTRUMPACKSetGeometricComponents(petsclib::$UnionPetscLib, F::PetscMat, nc::$PetscInt )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetGeometricComponents, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               F, nc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSTRUMPACKSetGeometricWidth(petsclib::PetscLibType,F::PetscMat, w::PetscInt) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> width of the separator, for use with GEOMETRIC ordering.\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `w` - width of the separator\n\nOptions Database Key:\n- `-mat_strumpack_geometric_width <1>` - Width of the separator of the mesh, for geometric nested dissection ordering\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetGeometricWidth\"))\n\"\"\"\nfunction MatSTRUMPACKSetGeometricWidth(petsclib::PetscLibType, F::PetscMat, w::PetscInt) end\n\n@for_petsc function MatSTRUMPACKSetGeometricWidth(petsclib::$UnionPetscLib, F::PetscMat, w::$PetscInt )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetGeometricWidth, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               F, w,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSTRUMPACKSetCompMinSepSize(petsclib::PetscLibType,F::PetscMat, min_sep_size::PetscInt) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> minimum separator size for low\n\nLogically Collective\n\nInput Parameters:\n- `F`            - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `min_sep_size` - minimum dense matrix size for low-rank approximation\n\nOptions Database Key:\n- `-mat_strumpack_compression_min_sep_size <min_sep_size>` - Minimum size of dense sub-block for low-rank compression\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKGetCompMinSepSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetCompMinSepSize\"))\n\"\"\"\nfunction MatSTRUMPACKSetCompMinSepSize(petsclib::PetscLibType, F::PetscMat, min_sep_size::PetscInt) end\n\n@for_petsc function MatSTRUMPACKSetCompMinSepSize(petsclib::$UnionPetscLib, F::PetscMat, min_sep_size::$PetscInt )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetCompMinSepSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               F, min_sep_size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmin_sep_size::PetscInt = MatSTRUMPACKGetCompMinSepSize(petsclib::PetscLibType,F::PetscMat) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> minimum separator size for low\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n\nOutput Parameter:\n- `min_sep_size` - minimum dense matrix size for low-rank approximation\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKSetCompMinSepSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetCompMinSepSize\"))\n\"\"\"\nfunction MatSTRUMPACKGetCompMinSepSize(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetCompMinSepSize(petsclib::$UnionPetscLib, F::PetscMat )\n\tmin_sep_size_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetCompMinSepSize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               F, min_sep_size_,\n              )\n\n\tmin_sep_size = min_sep_size_[]\n\n\treturn min_sep_size\nend \n\n\"\"\"\n\tMatSTRUMPACKSetCompLossyPrecision(petsclib::PetscLibType,F::PetscMat, lossy_prec::PetscInt) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> precision for lossy compression (requires ZFP support)\n\nLogically Collective\n\nInput Parameters:\n- `F`          - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `lossy_prec` - Number of bitplanes to use in lossy compression\n\nOptions Database Key:\n- `-mat_strumpack_compression_lossy_precision <lossy_prec>` - Precision when using lossy compression [1-64], when using `-pctype ilu -mat_strumpack_compression MAT_STRUMPACK_COMPRESSION_TYPE_LOSSY`\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKGetCompLossyPrecision()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetCompLossyPrecision\"))\n\"\"\"\nfunction MatSTRUMPACKSetCompLossyPrecision(petsclib::PetscLibType, F::PetscMat, lossy_prec::PetscInt) end\n\n@for_petsc function MatSTRUMPACKSetCompLossyPrecision(petsclib::$UnionPetscLib, F::PetscMat, lossy_prec::$PetscInt )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetCompLossyPrecision, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               F, lossy_prec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlossy_prec::PetscInt = MatSTRUMPACKGetCompLossyPrecision(petsclib::PetscLibType,F::PetscMat) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master> precision for lossy compression (requires ZFP support)\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n\nOutput Parameter:\n- `lossy_prec` - Number of bitplanes to use in lossy compression\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKSetCompLossyPrecision()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetCompLossyPrecision\"))\n\"\"\"\nfunction MatSTRUMPACKGetCompLossyPrecision(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetCompLossyPrecision(petsclib::$UnionPetscLib, F::PetscMat )\n\tlossy_prec_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetCompLossyPrecision, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               F, lossy_prec_,\n              )\n\n\tlossy_prec = lossy_prec_[]\n\n\treturn lossy_prec\nend \n\n\"\"\"\n\tMatSTRUMPACKSetCompButterflyLevels(petsclib::PetscLibType,F::PetscMat, bfly_lvls::PetscInt) \nSet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master>\nnumber of butterfly levels in HODLR compression (requires ButterflyPACK support)\n\nLogically Collective\n\nInput Parameters:\n- `F`         - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n- `bfly_lvls` - Number of levels of butterfly compression in HODLR compression\n\nOptions Database Key:\n- `-mat_strumpack_compression_butterfly_levels <bfly_lvls>` - Number of levels in the hierarchically off-diagonal matrix for which to use butterfly,\nwhen using `-pctype ilu`, (BLR_)HODLR compression\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKGetCompButterflyLevels()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKSetCompButterflyLevels\"))\n\"\"\"\nfunction MatSTRUMPACKSetCompButterflyLevels(petsclib::PetscLibType, F::PetscMat, bfly_lvls::PetscInt) end\n\n@for_petsc function MatSTRUMPACKSetCompButterflyLevels(petsclib::$UnionPetscLib, F::PetscMat, bfly_lvls::$PetscInt )\n\n    @chk ccall(\n               (:MatSTRUMPACKSetCompButterflyLevels, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               F, bfly_lvls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbfly_lvls::PetscInt = MatSTRUMPACKGetCompButterflyLevels(petsclib::PetscLibType,F::PetscMat) \nGet STRUMPACK <https://portal.nersc.gov/project/sparse/strumpack/master>\nnumber of butterfly levels in HODLR compression (requires ButterflyPACK support)\n\nLogically Collective\n\nInput Parameters:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` from PETSc-STRUMPACK interface\n\nOutput Parameter:\n- `bfly_lvls` - Number of levels of butterfly compression in HODLR compression\n\nLevel: intermediate\n\n-seealso: `MATSOLVERSTRUMPACK`, `MatGetFactor()`, `MatSTRUMPACKSetCompButterflyLevels()`\n\n# External Links\n$(_doc_external(\"Mat/MatSTRUMPACKGetCompButterflyLevels\"))\n\"\"\"\nfunction MatSTRUMPACKGetCompButterflyLevels(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSTRUMPACKGetCompButterflyLevels(petsclib::$UnionPetscLib, F::PetscMat )\n\tbfly_lvls_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSTRUMPACKGetCompButterflyLevels, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               F, bfly_lvls_,\n              )\n\n\tbfly_lvls = bfly_lvls_[]\n\n\treturn bfly_lvls\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateMPIAIJSELL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nCreates a sparse parallel matrix whose local\nportions are stored as `MATSEQAIJSELL` matrices (a matrix class that inherits\nfrom SEQAIJ but performs some operations in SELL format).\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)\nThis value should be the same as the local size used in creating the\ny vector for the matrix-vector product y = Ax.\n- `n`     - This value should be the same as the local size used in creating the\nx vector for the matrix-vector product y = Ax. (or `PETSC_DECIDE` to have\ncalculated if `N` is given) For square matrices `n` is almost always `m`.\n- `M`     - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`     - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `d_nz`  - number of nonzeros per row in DIAGONAL portion of local submatrix\n(same value is used for all local rows)\n- `d_nnz` - array containing the number of nonzeros in the various rows of the\nDIAGONAL portion of the local submatrix (possibly different for each row)\nor `NULL`, if `d_nz` is used to specify the nonzero structure.\nThe size of this array is equal to the number of local rows, i.e `m`.\nFor matrices you plan to factor you must leave room for the diagonal entry and\nput in the entry even if it is zero.\n- `o_nz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local\nsubmatrix (same value is used for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various rows of the\nOFF-DIAGONAL portion of the local submatrix (possibly different for\neach row) or `NULL`, if `o_nz` is used to specify the nonzero\nstructure. The size of this array is equal to the number\nof local rows, i.e `m`.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Key:\n- `-mat_aijsell_eager_shadow` - Construct shadow matrix upon matrix assembly; default is to take a \"lazy\" approach, performing this step the first\ntime the matrix is applied\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrix Creation](sec_matsparse), `MATSEQAIJSELL`, `MATMPIAIJSELL`, `MATAIJSELL`, `MatCreate()`, `MatCreateSeqAIJSELL()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJSELL\"))\n\"\"\"\nfunction MatCreateMPIAIJSELL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function MatCreateMPIAIJSELL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJSELL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateAIJViennaCL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"Mat/MatCreateAIJViennaCL\"))\n\"\"\"\nfunction MatCreateAIJViennaCL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) end\n\n@for_petsc function MatCreateAIJViennaCL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Vector{$PetscInt}, o_nz::$PetscInt, o_nnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateAIJViennaCL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tdiagU::PetscScalar = MatSuperluDistGetDiagU(petsclib::PetscLibType,F::PetscMat) \n\n# External Links\n$(_doc_external(\"Mat/MatSuperluDistGetDiagU\"))\n\"\"\"\nfunction MatSuperluDistGetDiagU(petsclib::PetscLibType, F::PetscMat) end\n\n@for_petsc function MatSuperluDistGetDiagU(petsclib::$UnionPetscLib, F::PetscMat )\n\tdiagU_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatSuperluDistGetDiagU, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               F, diagU_,\n              )\n\n\tdiagU = diagU_[]\n\n\treturn diagU\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateMPIAIJPERM(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt}) \nCreates a sparse parallel matrix whose local\nportions are stored as `MATSEQAIJPERM` matrices (a matrix class that inherits\nfrom SEQAIJ but includes some optimizations to allow more effective\nvectorization).\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)\nThis value should be the same as the local size used in creating the\ny vector for the matrix-vector product y = Ax.\n- `n`     - This value should be the same as the local size used in creating the\nx vector for the matrix-vector product y = Ax. (or PETSC_DECIDE to have\ncalculated if `N` is given) For square matrices `n` is almost always `m`.\n- `M`     - number of global rows (or `PETSC_DETERMINE` to have calculated if `m` is given)\n- `N`     - number of global columns (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `d_nz`  - number of nonzeros per row in DIAGONAL portion of local submatrix\n(same value is used for all local rows)\n- `d_nnz` - array containing the number of nonzeros in the various rows of the\nDIAGONAL portion of the local submatrix (possibly different for each row)\nor `NULL`, if `d_nz` is used to specify the nonzero structure.\nThe size of this array is equal to the number of local rows, i.e `m`.\nFor matrices you plan to factor you must leave room for the diagonal entry and\nput in the entry even if it is zero.\n- `o_nz`  - number of nonzeros per row in the OFF-DIAGONAL portion of local\nsubmatrix (same value is used for all local rows).\n- `o_nnz` - array containing the number of nonzeros in the various rows of the\nOFF-DIAGONAL portion of the local submatrix (possibly different for\neach row) or `NULL`, if `o_nz` is used to specify the nonzero\nstructure. The size of this array is equal to the number\nof local rows, i.e `m`.\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_no_inode`            - Do not use inodes\n- `-mat_inode_limit <limit>` - Sets inode limit (max limit=5)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrix Creation](sec_matsparse), `MATMPIAIJPERM`, `MatCreate()`, `MatCreateSeqAIJPERM()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateMPIAIJPERM\"))\n\"\"\"\nfunction MatCreateMPIAIJPERM(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, d_nz::PetscInt, d_nnz::Union{Ptr,Vector{PetscInt}}, o_nz::PetscInt, o_nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateMPIAIJPERM(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, d_nz::$PetscInt, d_nnz::Union{Ptr,Vector{$PetscInt}}, o_nz::$PetscInt, o_nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateMPIAIJPERM, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, M, N, d_nz, d_nnz, o_nz, o_nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatMumpsSetIcntl(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt, ival::PetscInt) \nSet MUMPS parameter ICNTL() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array `ICNTL()`\n- `ival`  - value of MUMPS `ICNTL(icntl)`\n\nOptions Database Key:\n- `-mat_mumps_icntl_<icntl> <ival>` - change the option numbered `icntl` to `ival`\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsGetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfo()`, `MatMumpsGetRinfog()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsSetIcntl\"))\n\"\"\"\nfunction MatMumpsSetIcntl(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt, ival::PetscInt) end\n\n@for_petsc function MatMumpsSetIcntl(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt, ival::$PetscInt )\n\n    @chk ccall(\n               (:MatMumpsSetIcntl, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt),\n               F, icntl, ival,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tival::PetscInt = MatMumpsGetIcntl(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt) \nGet MUMPS parameter ICNTL() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array ICNTL()\n\nOutput Parameter:\n- `ival` - value of MUMPS ICNTL(icntl)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfo()`, `MatMumpsGetRinfog()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetIcntl\"))\n\"\"\"\nfunction MatMumpsGetIcntl(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt) end\n\n@for_petsc function MatMumpsGetIcntl(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt )\n\tival_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatMumpsGetIcntl, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}),\n               F, icntl, ival_,\n              )\n\n\tival = ival_[]\n\n\treturn ival\nend \n\n\"\"\"\n\tMatMumpsSetCntl(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt, val::PetscReal) \nSet MUMPS parameter CNTL() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array `CNTL()`\n- `val`   - value of MUMPS `CNTL(icntl)`\n\nOptions Database Key:\n- `-mat_mumps_cntl_<icntl> <val>` - change the option numbered icntl to ival\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsGetIcntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfo()`, `MatMumpsGetRinfog()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsSetCntl\"))\n\"\"\"\nfunction MatMumpsSetCntl(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt, val::PetscReal) end\n\n@for_petsc function MatMumpsSetCntl(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt, val::$PetscReal )\n\n    @chk ccall(\n               (:MatMumpsSetCntl, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscReal),\n               F, icntl, val,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tval::PetscReal = MatMumpsGetCntl(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt) \nGet MUMPS parameter CNTL() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array CNTL()\n\nOutput Parameter:\n- `val` - value of MUMPS CNTL(icntl)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsGetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfo()`, `MatMumpsGetRinfog()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetCntl\"))\n\"\"\"\nfunction MatMumpsGetCntl(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt) end\n\n@for_petsc function MatMumpsGetCntl(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatMumpsGetCntl, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscReal}),\n               F, icntl, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tMatMumpsGetInverse(petsclib::PetscLibType,F::PetscMat, spRHS::PetscMat) \nGet user\n\nLogically Collective\n\nInput Parameter:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n\nOutput Parameter:\n- `spRHS` - sequential sparse matrix in `MATTRANSPOSEVIRTUAL` format with requested entries of inverse of `A`\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatCreateTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetInverse\"))\n\"\"\"\nfunction MatMumpsGetInverse(petsclib::PetscLibType, F::PetscMat, spRHS::PetscMat) end\n\n@for_petsc function MatMumpsGetInverse(petsclib::$UnionPetscLib, F::PetscMat, spRHS::PetscMat )\n\n    @chk ccall(\n               (:MatMumpsGetInverse, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               F, spRHS,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMumpsGetInverseTranspose(petsclib::PetscLibType,F::PetscMat, spRHST::PetscMat) \nGet user\n\nLogically Collective\n\nInput Parameter:\n- `F` - the factored matrix of A obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n\nOutput Parameter:\n- `spRHST` - sequential sparse matrix in `MATAIJ` format containing the requested entries of inverse of `A`^T\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatCreateTranspose()`, `MatMumpsGetInverse()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetInverseTranspose\"))\n\"\"\"\nfunction MatMumpsGetInverseTranspose(petsclib::PetscLibType, F::PetscMat, spRHST::PetscMat) end\n\n@for_petsc function MatMumpsGetInverseTranspose(petsclib::$UnionPetscLib, F::PetscMat, spRHST::PetscMat )\n\n    @chk ccall(\n               (:MatMumpsGetInverseTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               F, spRHST,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMumpsSetBlk(petsclib::PetscLibType,F::PetscMat, nblk::PetscInt, blkvar::Vector{PetscInt}, blkptr::Vector{PetscInt}) \nSet user\n\nNot collective, only relevant on the first process of the MPI communicator\n\nInput Parameters:\n- `F`      - the factored matrix of A obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `nblk`   - the number of blocks\n- `blkvar` - see MUMPS documentation, `blkvar(blkptr(iblk):blkptr(iblk+1)-1)`, (`iblk=1, nblk`) holds the variables associated to block `iblk`\n- `blkptr` - array starting at 1 and of size `nblk + 1` storing the prefix sum of all blocks\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `MATSOLVERMUMPS`, `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsSetBlk\"))\n\"\"\"\nfunction MatMumpsSetBlk(petsclib::PetscLibType, F::PetscMat, nblk::PetscInt, blkvar::Vector{PetscInt}, blkptr::Vector{PetscInt}) end\n\n@for_petsc function MatMumpsSetBlk(petsclib::$UnionPetscLib, F::PetscMat, nblk::$PetscInt, blkvar::Vector{$PetscInt}, blkptr::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatMumpsSetBlk, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               F, nblk, blkvar, blkptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tival::PetscInt = MatMumpsGetInfo(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt) \nGet MUMPS parameter INFO() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array INFO()\n\nOutput Parameter:\n- `ival` - value of MUMPS INFO(icntl)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsGetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfo()`, `MatMumpsGetRinfog()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetInfo\"))\n\"\"\"\nfunction MatMumpsGetInfo(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt) end\n\n@for_petsc function MatMumpsGetInfo(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt )\n\tival_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatMumpsGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}),\n               F, icntl, ival_,\n              )\n\n\tival = ival_[]\n\n\treturn ival\nend \n\n\"\"\"\n\tival::PetscInt = MatMumpsGetInfog(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt) \nGet MUMPS parameter INFOG() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array INFOG()\n\nOutput Parameter:\n- `ival` - value of MUMPS INFOG(icntl)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsGetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetRinfo()`, `MatMumpsGetRinfog()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetInfog\"))\n\"\"\"\nfunction MatMumpsGetInfog(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt) end\n\n@for_petsc function MatMumpsGetInfog(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt )\n\tival_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatMumpsGetInfog, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}),\n               F, icntl, ival_,\n              )\n\n\tival = ival_[]\n\n\treturn ival\nend \n\n\"\"\"\n\tval::PetscReal = MatMumpsGetRinfo(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt) \nGet MUMPS parameter RINFO() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array RINFO()\n\nOutput Parameter:\n- `val` - value of MUMPS RINFO(icntl)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsGetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfog()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetRinfo\"))\n\"\"\"\nfunction MatMumpsGetRinfo(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt) end\n\n@for_petsc function MatMumpsGetRinfo(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatMumpsGetRinfo, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscReal}),\n               F, icntl, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tval::PetscReal = MatMumpsGetRinfog(petsclib::PetscLibType,F::PetscMat, icntl::PetscInt) \nGet MUMPS parameter RINFOG() <https://mumps\n\nLogically Collective\n\nInput Parameters:\n- `F`     - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n- `icntl` - index of MUMPS parameter array RINFOG()\n\nOutput Parameter:\n- `val` - value of MUMPS RINFOG(icntl)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsGetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfo()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetRinfog\"))\n\"\"\"\nfunction MatMumpsGetRinfog(petsclib::PetscLibType, F::PetscMat, icntl::PetscInt) end\n\n@for_petsc function MatMumpsGetRinfog(petsclib::$UnionPetscLib, F::PetscMat, icntl::$PetscInt )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatMumpsGetRinfog, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscReal}),\n               F, icntl, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tsize::PetscInt = MatMumpsGetNullPivots(petsclib::PetscLibType,F::PetscMat, array::PetscInt) \nGet MUMPS parameter PIVNUL_LIST() <https://mumps\n\nLogically Collective\n\nInput Parameter:\n- `F` - the factored matrix obtained by calling `MatGetFactor()` with a `MatSolverType` of `MATSOLVERMUMPS` and a `MatFactorType` of `MAT_FACTOR_LU` or `MAT_FACTOR_CHOLESKY`\n\nOutput Parameters:\n- `size`  - local size of the array. The size of the array is non-zero only on MPI rank 0\n- `array` - array of rows with null pivot, these rows follow 0-based indexing. The array gets allocated within the function and the user is responsible\nfor freeing this array.\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MatMumpsSetIcntl()`, `MatMumpsGetIcntl()`, `MatMumpsSetCntl()`, `MatMumpsGetCntl()`, `MatMumpsGetInfo()`, `MatMumpsGetInfog()`, `MatMumpsGetRinfo()`\n\n# External Links\n$(_doc_external(\"Mat/MatMumpsGetNullPivots\"))\n\"\"\"\nfunction MatMumpsGetNullPivots(petsclib::PetscLibType, F::PetscMat, array::PetscInt) end\n\n@for_petsc function MatMumpsGetNullPivots(petsclib::$UnionPetscLib, F::PetscMat, array::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatMumpsGetNullPivots, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, $PetscInt),\n               F, size_, array,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tMatSeqAIJSetValuesLocalFast(petsclib::PetscLibType,A::PetscMat, m::PetscInt, im::Vector{PetscInt}, n::PetscInt, in::Vector{PetscInt}, v::Vector{PetscScalar}, is::InsertMode) \n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJSetValuesLocalFast\"))\n\"\"\"\nfunction MatSeqAIJSetValuesLocalFast(petsclib::PetscLibType, A::PetscMat, m::PetscInt, im::Vector{PetscInt}, n::PetscInt, in::Vector{PetscInt}, v::Vector{PetscScalar}, is::InsertMode) end\n\n@for_petsc function MatSeqAIJSetValuesLocalFast(petsclib::$UnionPetscLib, A::PetscMat, m::$PetscInt, im::Vector{$PetscInt}, n::$PetscInt, in::Vector{$PetscInt}, v::Vector{$PetscScalar}, is::InsertMode )\n\n    @chk ccall(\n               (:MatSeqAIJSetValuesLocalFast, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               A, m, im, n, in, v, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqAIJSetTotalPreallocation(petsclib::PetscLibType,A::PetscMat, nztotal::PetscInt) \nSets an upper bound on the total number of expected nonzeros in the matrix.\n\nInput Parameters:\n- `A`       - the `MATSEQAIJ` matrix\n- `nztotal` - bound on the number of nonzeros\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatSetOption()`, `MAT_SORTED_FULL`, `MatSetValues()`, `MatSeqAIJSetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJSetTotalPreallocation\"))\n\"\"\"\nfunction MatSeqAIJSetTotalPreallocation(petsclib::PetscLibType, A::PetscMat, nztotal::PetscInt) end\n\n@for_petsc function MatSeqAIJSetTotalPreallocation(petsclib::$UnionPetscLib, A::PetscMat, nztotal::$PetscInt )\n\n    @chk ccall(\n               (:MatSeqAIJSetTotalPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               A, nztotal,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tindices::PetscInt = MatSeqAIJSetColumnIndices(petsclib::PetscLibType,mat::PetscMat) \nSet the column indices for all the rows\nin the matrix.\n\nInput Parameters:\n- `mat`     - the `MATSEQAIJ` matrix\n- `indices` - the column indices\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATSEQAIJ`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJSetColumnIndices\"))\n\"\"\"\nfunction MatSeqAIJSetColumnIndices(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatSeqAIJSetColumnIndices(petsclib::$UnionPetscLib, mat::PetscMat )\n\tindices_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSeqAIJSetColumnIndices, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               mat, indices_,\n              )\n\n\tindices = indices_[]\n\n\treturn indices\nend \n\n\"\"\"\n\tMatStoreValues(petsclib::PetscLibType,mat::PetscMat) \nStashes a copy of the matrix values; this allows reusing of the linear part of a Jacobian, while recomputing only the\nnonlinear portion.\n\nLogically Collect\n\nInput Parameter:\n- `mat` - the matrix (currently only `MATAIJ` matrices support this option)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatRetrieveValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatStoreValues\"))\n\"\"\"\nfunction MatStoreValues(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatStoreValues(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatStoreValues, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatRetrieveValues(petsclib::PetscLibType,mat::PetscMat) \nRetrieves the copy of the matrix values that was stored with `MatStoreValues()`\n\nLogically Collect\n\nInput Parameter:\n- `mat` - the matrix (currently only `MATAIJ` matrices support this option)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatStoreValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatRetrieveValues\"))\n\"\"\"\nfunction MatRetrieveValues(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatRetrieveValues(petsclib::$UnionPetscLib, mat::PetscMat )\n\n    @chk ccall(\n               (:MatRetrieveValues, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqAIJ(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse matrix in `MATSEQAIJ` (compressed row) format\n(the default parallel PETSc format).  For good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameter `nz`\n(or the array `nnz`).\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzeros per row (same for all rows)\n- `nnz`  - array containing the number of nonzeros in the various rows\n(possibly different for each row) or NULL\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_no_inode`            - Do not use inodes\n- `-mat_inode_limit <limit>` - Sets inode limit (max limit=5)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, [Sparse Matrix Creation](sec_matsparse), `MatCreate()`, `MatCreateAIJ()`, `MatSetValues()`, `MatSeqAIJSetColumnIndices()`, `MatCreateSeqAIJWithArrays()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJ\"))\n\"\"\"\nfunction MatCreateSeqAIJ(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqAIJ(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJ, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatSeqAIJSetPreallocation(petsclib::PetscLibType,B::PetscMat, nz::PetscInt, nnz::Vector{PetscInt}) \nFor good matrix assembly performance\nthe user should preallocate the matrix storage by setting the parameter nz\n(or the array nnz).  By setting these parameters accurately, performance\nduring matrix assembly can be increased by more than a factor of 50.\n\nCollective\n\nInput Parameters:\n- `B`   - The matrix\n- `nz`  - number of nonzeros per row (same for all rows)\n- `nnz` - array containing the number of nonzeros in the various rows\n(possibly different for each row) or NULL\n\nOptions Database Keys:\n- `-mat_no_inode`            - Do not use inodes\n- `-mat_inode_limit <limit>` - Sets inode limit (max limit=5)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateAIJ()`, `MatSetValues()`, `MatSeqAIJSetColumnIndices()`, `MatCreateSeqAIJWithArrays()`, `MatGetInfo()`,\n`MatSeqAIJSetTotalPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJSetPreallocation\"))\n\"\"\"\nfunction MatSeqAIJSetPreallocation(petsclib::PetscLibType, B::PetscMat, nz::PetscInt, nnz::Vector{PetscInt}) end\n\n@for_petsc function MatSeqAIJSetPreallocation(petsclib::$UnionPetscLib, B::PetscMat, nz::$PetscInt, nnz::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatSeqAIJSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}),\n               B, nz, nnz,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqAIJSetPreallocationCSR(petsclib::PetscLibType,B::PetscMat, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) \nAllocates memory for a sparse sequential matrix in `MATSEQAIJ` format.\n\nInput Parameters:\n- `B` - the matrix\n- `i` - the indices into `j` for the start of each row (indices start with zero)\n- `j` - the column indices for each row (indices start with zero) these must be sorted for each row\n- `v` - optional values in the matrix, use `NULL` if not provided\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatSeqAIJSetPreallocation()`, `MATSEQAIJ`, `MatResetPreallocation()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJSetPreallocationCSR\"))\n\"\"\"\nfunction MatSeqAIJSetPreallocationCSR(petsclib::PetscLibType, B::PetscMat, i::Vector{PetscInt}, j::Vector{PetscInt}, v::Vector{PetscScalar}) end\n\n@for_petsc function MatSeqAIJSetPreallocationCSR(petsclib::$UnionPetscLib, B::PetscMat, i::Vector{$PetscInt}, j::Vector{$PetscInt}, v::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatSeqAIJSetPreallocationCSR, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               B, i, j, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqAIJKron(petsclib::PetscLibType,A::PetscMat, B::PetscMat, reuse::MatReuse, C::PetscMat) \nComputes `C`, the Kronecker product of `A` and `B`.\n\nInput Parameters:\n- `A`     - left-hand side matrix\n- `B`     - right-hand side matrix\n- `reuse` - either `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`\n\nOutput Parameter:\n- `C` - Kronecker product of `A` and `B`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqAIJ()`, `MATSEQAIJ`, `MATKAIJ`, `MatReuse`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJKron\"))\n\"\"\"\nfunction MatSeqAIJKron(petsclib::PetscLibType, A::PetscMat, B::PetscMat, reuse::MatReuse, C::PetscMat) end\n\n@for_petsc function MatSeqAIJKron(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, reuse::MatReuse, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatSeqAIJKron, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, MatReuse, Ptr{CMat}),\n               A, B, reuse, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n    array::Vector{PetscScalar} = MatSeqAIJGetArray(petsclib::PetscLibType, A::PetscMat)\n\nReturns a 1D Julia Array (Vector) providing direct read/write access to the internal\nnumerical values of a `MATSEQAIJ` (Sparse) matrix.\n\nNote: This only provides access to the values array. It does not allow changing\nthe sparsity pattern (row pointers or column indices).\n\nNot Collective\n\nInput Parameter:\n- `A` - a `MATSEQAIJ` matrix\n\nOutput Parameter:\n- `array` - A `Vector` view of the non-zero values.\n\nLevel: intermediate\n\nSee also: `MatSeqAIJRestoreArray()`, `MatDenseGetArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJGetArray\"))\n\"\"\"\nfunction MatSeqAIJGetArray(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqAIJGetArray(petsclib::$UnionPetscLib, A::PetscMat)\n    array_ = Ref{Ptr{$PetscScalar}}()\n\n    # 1. Get the pointer to the numerical values\n    @chk ccall(\n               (:MatSeqAIJGetArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n    # 2. Get the matrix info to determine the number of nonzeros\n    info_ref = Ref{LibPETSc.MatInfo}()\n    LibPETSc.MatGetInfo(petsclib, A, LibPETSc.MAT_LOCAL, info_ref)\n\n    # 3. Extract the nnz count using the [] syntax to unwrap the Ref\n    nnz = Int(info_ref[].nz_used)\n\n    return unsafe_wrap(Array, array_[], nnz; own = false)\nend\n\n\"\"\"\n    MatSeqAIJRestoreArray(petsclib::PetscLibType, A::PetscMat, array::Array)\n\nRestores a `MATSEQAIJ` matrix after direct access to its internal data was obtained\nvia `MatSeqAIJGetArray()`.\n\nCalling this function is required to \"unlock\" the matrix and allow PETSc to perform\nsubsequent operations (like assembly or multiplication).\n\nNot Collective\n\nInput Parameters:\n- `petsclib` - the PETSc library configuration\n- `A`        - a `MATSEQAIJ` matrix\n- `array`    - the array obtained from `MatSeqAIJGetArray()`\n\nLevel: intermediate\n\nSee also: `MatSeqAIJGetArray()`, `MatDenseRestoreArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJRestoreArray\"))\n\"\"\"\nfunction MatSeqAIJRestoreArray(petsclib::PetscLibType, A::PetscMat, array::Array) end\n\n@for_petsc function MatSeqAIJRestoreArray(petsclib::$UnionPetscLib, A::PetscMat, array::Array{$PetscScalar})\n    # Create a Ref to the pointer of the Julia array to satisfy the ** signature\n    ptr_ref = Ref(pointer(array))\n\n    @chk ccall(\n               (:MatSeqAIJRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, ptr_ref,\n              )\n    return nothing\nend\n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqAIJGetArrayRead(petsclib::PetscLibType,A::PetscMat) \ngives read\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `A` - a `MATSEQAIJ` matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJGetArray()`, `MatSeqAIJRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJGetArrayRead\"))\n\"\"\"\nfunction MatSeqAIJGetArrayRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqAIJGetArrayRead(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqAIJGetArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqAIJRestoreArrayRead(petsclib::PetscLibType,A::PetscMat) \nrestore the read\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `A` - a `MATSEQAIJ` matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJGetArray()`, `MatSeqAIJGetArrayRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJRestoreArrayRead\"))\n\"\"\"\nfunction MatSeqAIJRestoreArrayRead(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqAIJRestoreArrayRead(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqAIJRestoreArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqAIJGetArrayWrite(petsclib::PetscLibType,A::PetscMat) \ngives write\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `A` - a `MATSEQAIJ` matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJGetArray()`, `MatSeqAIJRestoreArrayRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJGetArrayWrite\"))\n\"\"\"\nfunction MatSeqAIJGetArrayWrite(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqAIJGetArrayWrite(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqAIJGetArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\tarray::Vector{PetscScalar} = MatSeqAIJRestoreArrayWrite(petsclib::PetscLibType,A::PetscMat) \nrestore the read\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `A` - a MATSEQAIJ matrix\n\nOutput Parameter:\n- `array` - pointer to the data\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJGetArray()`, `MatSeqAIJGetArrayRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJRestoreArrayWrite\"))\n\"\"\"\nfunction MatSeqAIJRestoreArrayWrite(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqAIJRestoreArrayWrite(petsclib::$UnionPetscLib, A::PetscMat )\n\tarray_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:MatSeqAIJRestoreArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscScalar}}),\n               A, array_,\n              )\n\n\tarray = unsafe_wrap(Array, array_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn array\nend \n\n\"\"\"\n\ti::Vector{PetscInt},j::Vector{PetscInt},a::Vector{PetscScalar},mtype::PetscMemType = MatSeqAIJGetCSRAndMemType(petsclib::PetscLibType,mat::PetscMat) \nGet the CSR arrays and the memory type of the `MATSEQAIJ` matrix\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `mat` - a matrix of type `MATSEQAIJ` or its subclasses\n\nOutput Parameters:\n- `i`     - row map array of the matrix\n- `j`     - column index array of the matrix\n- `a`     - data array of the matrix\n- `mtype` - memory type of the arrays\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJGetArray()`, `MatSeqAIJGetArrayRead()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJGetCSRAndMemType\"))\n\"\"\"\nfunction MatSeqAIJGetCSRAndMemType(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatSeqAIJGetCSRAndMemType(petsclib::$UnionPetscLib, mat::PetscMat )\n\ti_ = Ref{Ptr{$PetscInt}}()\n\tj_ = Ref{Ptr{$PetscInt}}()\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\tmtype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:MatSeqAIJGetCSRAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscScalar}}, Ptr{PetscMemType}),\n               mat, i_, j_, a_, mtype_,\n              )\n\n\ti = unsafe_wrap(Array, i_[], VecGetLocalSize(petsclib, x); own = false)\n\tj = unsafe_wrap(Array, j_[], VecGetLocalSize(petsclib, x); own = false)\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\tmtype = unsafe_string(mtype_[])\n\n\treturn i,j,a,mtype\nend \n\n\"\"\"\n\tnz::PetscInt = MatSeqAIJGetMaxRowNonzeros(petsclib::PetscLibType,A::PetscMat) \nreturns the maximum number of nonzeros in any row\n\nNot Collective\n\nInput Parameter:\n- `A` - a `MATSEQAIJ` matrix\n\nOutput Parameter:\n- `nz` - the maximum number of nonzeros in any row\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJRestoreArray()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJGetMaxRowNonzeros\"))\n\"\"\"\nfunction MatSeqAIJGetMaxRowNonzeros(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatSeqAIJGetMaxRowNonzeros(petsclib::$UnionPetscLib, A::PetscMat )\n\tnz_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatSeqAIJGetMaxRowNonzeros, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               A, nz_,\n              )\n\n\tnz = nz_[]\n\n\treturn nz\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateSeqAIJWithArrays(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) \nCreates an sequential `MATSEQAIJ` matrix using matrix elements (in CSR format)\nprovided by the user.\n\nCollective\n\nInput Parameters:\n- `comm` - must be an MPI communicator of size 1\n- `m`    - number of rows\n- `n`    - number of columns\n- `i`    - row indices; that is i[0] = 0, i[row] = i[row-1] + number of elements in that row of the matrix\n- `j`    - column indices\n- `a`    - matrix values\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateAIJ()`, `MatCreateSeqAIJ()`, `MatCreateMPIAIJWithArrays()`, `MatMPIAIJSetPreallocationCSR()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJWithArrays\"))\n\"\"\"\nfunction MatCreateSeqAIJWithArrays(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}) end\n\n@for_petsc function MatCreateSeqAIJWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar} )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, m, n, i, j, a, mat_,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tmat::PetscMat = MatCreateSeqAIJFromTriple(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}, nz::PetscCount, idx::PetscBool) \nCreates an sequential `MATSEQAIJ` matrix using matrix elements (in COO format)\nprovided by the user.\n\nCollective\n\nInput Parameters:\n- `comm` - must be an MPI communicator of size 1\n- `m`    - number of rows\n- `n`    - number of columns\n- `i`    - row indices\n- `j`    - column indices\n- `a`    - matrix values\n- `nz`   - number of nonzeros\n- `idx`  - if the `i` and `j` indices start with 1 use `PETSC_TRUE` otherwise use `PETSC_FALSE`\n\nOutput Parameter:\n- `mat` - the matrix\n\nLevel: intermediate\n\nExample:\nFor the following matrix, the input data expected is as shown (using 0 based indexing)\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateAIJ()`, `MatCreateSeqAIJ()`, `MatCreateSeqAIJWithArrays()`, `MatMPIAIJSetPreallocationCSR()`, `MatSetValuesCOO()`, `MatSetPreallocationCOO()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJFromTriple\"))\n\"\"\"\nfunction MatCreateSeqAIJFromTriple(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, i::Vector{PetscInt}, j::Vector{PetscInt}, a::Vector{PetscScalar}, nz::PetscCount, idx::PetscBool) end\n\n@for_petsc function MatCreateSeqAIJFromTriple(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, i::Vector{$PetscInt}, j::Vector{$PetscInt}, a::Vector{$PetscScalar}, nz::PetscCount, idx::PetscBool )\n\tmat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJFromTriple, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CMat}, PetscCount, PetscBool),\n               comm, m, n, i, j, a, mat_, nz, idx,\n              )\n\n\tmat = PetscMat(mat_[], petsclib)\n\n\treturn mat\nend \n\n\"\"\"\n\tMatSeqAIJSetType(petsclib::PetscLibType,mat::PetscMat, matype::MatType) \nConverts a `MATSEQAIJ` matrix to a subtype\n\nCollective\n\nInput Parameters:\n- `mat`    - the matrix object\n- `matype` - matrix type\n\nOptions Database Key:\n- `-mat_seqaij_type  <method>` - for example seqaijcrl\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `PCSetType()`, `VecSetType()`, `MatCreate()`, `MatType`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJSetType\"))\n\"\"\"\nfunction MatSeqAIJSetType(petsclib::PetscLibType, mat::PetscMat, matype::MatType) end\n\n@for_petsc function MatSeqAIJSetType(petsclib::$UnionPetscLib, mat::PetscMat, matype::MatType )\n\n    @chk ccall(\n               (:MatSeqAIJSetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatType),\n               mat, matype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSeqAIJRegister(petsclib::PetscLibType,sname::Vector{Cchar}, fnc::external) \n\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined matrix type, for example `MATSEQAIJCRL`\n- `function` - routine to convert to subtype\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJRegisterAll()`\n\n# External Links\n$(_doc_external(\"Mat/MatSeqAIJRegister\"))\n\"\"\"\nfunction MatSeqAIJRegister(petsclib::PetscLibType, sname::Vector{Cchar}, fnc::external) end\n\n@for_petsc function MatSeqAIJRegister(petsclib::$UnionPetscLib, sname::Vector{Cchar}, fnc::external )\n\n    @chk ccall(\n               (:MatSeqAIJRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatInodeAdjustForInodes(petsclib::PetscLibType,A::PetscMat, rperm::IS, cperm::IS) \n\n# External Links\n$(_doc_external(\"Mat/MatInodeAdjustForInodes\"))\n\"\"\"\nfunction MatInodeAdjustForInodes(petsclib::PetscLibType, A::PetscMat, rperm::IS, cperm::IS) end\n\n@for_petsc function MatInodeAdjustForInodes(petsclib::$UnionPetscLib, A::PetscMat, rperm::IS, cperm::IS )\n\n    @chk ccall(\n               (:MatInodeAdjustForInodes, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CIS}, Ptr{CIS}),\n               A, rperm, cperm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnode_count::PetscInt,sizes::Vector{PetscInt},limit::PetscInt = MatInodeGetInodeSizes(petsclib::PetscLibType,A::PetscMat) \nReturns the inode information of a matrix with inodes\n\nNot Collective\n\nInput Parameter:\n- `A` - the Inode matrix or matrix derived from the Inode class -- e.g., `MATSEQAIJ`\n\nOutput Parameters:\n- `node_count` - no of inodes present in the matrix.\n- `sizes`      - an array of size `node_count`, with the sizes of each inode.\n- `limit`      - the max size used to generate the inodes.\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetInfo()`\n\n# External Links\n$(_doc_external(\"Mat/MatInodeGetInodeSizes\"))\n\"\"\"\nfunction MatInodeGetInodeSizes(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatInodeGetInodeSizes(petsclib::$UnionPetscLib, A::PetscMat )\n\tnode_count_ = Ref{$PetscInt}()\n\tsizes_ = Ref{Ptr{$PetscInt}}()\n\tlimit_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatInodeGetInodeSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               A, node_count_, sizes_, limit_,\n              )\n\n\tnode_count = node_count_[]\n\tsizes = unsafe_wrap(Array, sizes_[], VecGetLocalSize(petsclib, x); own = false)\n\tlimit = limit_[]\n\n\treturn node_count,sizes,limit\nend \n\n\n\"\"\"\n\tA::PetscMat = MatCreateSeqAIJCRL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse matrix of type `MATSEQAIJCRL`.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzeros per row (same for all rows), ignored if `nnz` is given\n- `nnz`  - array containing the number of nonzeros in the various rows\n(possibly different for each row) or `NULL`\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateMPIAIJPERM()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJCRL\"))\n\"\"\"\nfunction MatCreateSeqAIJCRL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqAIJCRL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJCRL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\n\"\"\"\n\tA::PetscMat = MatCreateSeqAIJKokkos(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJKokkos\"))\n\"\"\"\nfunction MatCreateSeqAIJKokkos(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqAIJKokkos(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJKokkos, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatSuperluSetILUDropTol(petsclib::PetscLibType,F::PetscMat, dtol::PetscReal) \nSet SuperLU <https://portal.nersc.gov/project/sparse/superlu/superlu_ug.pdf> ILU drop tolerance\n\nLogically Collective\n\nInput Parameters:\n- `F`    - the factored matrix obtained by calling `MatGetFactor()`\n- `dtol` - drop tolerance\n\nOptions Database Key:\n- `-mat_superlu_ilu_droptol <dtol>` - the drop tolerance\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetFactor()`, `MATSOLVERSUPERLU`\n\n# External Links\n$(_doc_external(\"Mat/MatSuperluSetILUDropTol\"))\n\"\"\"\nfunction MatSuperluSetILUDropTol(petsclib::PetscLibType, F::PetscMat, dtol::PetscReal) end\n\n@for_petsc function MatSuperluSetILUDropTol(petsclib::$UnionPetscLib, F::PetscMat, dtol::$PetscReal )\n\n    @chk ccall(\n               (:MatSuperluSetILUDropTol, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               F, dtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqAIJViennaCL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJViennaCL\"))\n\"\"\"\nfunction MatCreateSeqAIJViennaCL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqAIJViennaCL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJViennaCL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqAIJMKL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse matrix of type `MATSEQAIJMKL`.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzeros per row (same for all rows)\n- `nnz`  - array containing the number of nonzeros in the various rows\n(possibly different for each row) or `NULL`\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_aijmkl_no_spmv2`         - disable use of the SpMV2 inspector-executor routines\n- `-mat_aijmkl_eager_inspection` - perform MKL \"inspection\" phase upon matrix assembly; default is to do \"lazy\" inspection,\nperforming this step the first time the matrix is applied\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateMPIAIJMKL()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJMKL\"))\n\"\"\"\nfunction MatCreateSeqAIJMKL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) end\n\n@for_petsc function MatCreateSeqAIJMKL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJMKL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqAIJSELL(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse matrix of type `MATSEQAIJSELL`.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzeros per row (same for all rows)\n- `nnz`  - array containing the number of nonzeros in the various rows\n(possibly different for each row) or `NULL`\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_aijsell_eager_shadow` - Construct shadow matrix upon matrix assembly; default is to take a \"lazy\" approach,\nperforming this step the first time the matrix is applied\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateMPIAIJSELL()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJSELL\"))\n\"\"\"\nfunction MatCreateSeqAIJSELL(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Union{Ptr,Vector{PetscInt}}) end\n\n@for_petsc function MatCreateSeqAIJSELL(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Union{Ptr,Vector{$PetscInt}} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJSELL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateSeqAIJPERM(petsclib::PetscLibType,comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) \nCreates a sparse matrix of type `MATSEQAIJPERM`.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `m`    - number of rows\n- `n`    - number of columns\n- `nz`   - number of nonzeros per row (same for all rows), ignored if `nnz` is given\n- `nnz`  - array containing the number of nonzeros in the various rows (possibly different for each row) or `NULL`\n\nOutput Parameter:\n- `A` - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateMPIAIJPERM()`, `MatSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJPERM\"))\n\"\"\"\nfunction MatCreateSeqAIJPERM(petsclib::PetscLibType, comm::MPI_Comm, m::PetscInt, n::PetscInt, nz::PetscInt, nnz::Vector{PetscInt}) end\n\n@for_petsc function MatCreateSeqAIJPERM(petsclib::$UnionPetscLib, comm::MPI_Comm, m::$PetscInt, n::$PetscInt, nz::$PetscInt, nnz::Vector{$PetscInt} )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSeqAIJPERM, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CMat}),\n               comm, m, n, nz, nnz, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tdata::PetscScalar,A::PetscMat = MatCreateDenseFromVecType(petsclib::PetscLibType,comm::MPI_Comm, vtype::VecType, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, lda::PetscInt) \nCreate a matrix that matches the type of a Vec.\n\nCollective\n\nInput Parameters:\n- `comm`  - the communicator\n- `vtype` - the vector type\n- `m`     - number of local rows (or `PETSC_DECIDE` to have calculated if `M` is given)\n- `n`     - number of local columns (or `PETSC_DECIDE` to have calculated if `N` is given)\n- `M`     - number of global rows (or `PETSC_DECIDE` to have calculated if `m` is given)\n- `N`     - number of global columns (or `PETSC_DECIDE` to have calculated if `n` is given)\n- `lda`   - optional leading dimension. Pass any non-positive number to use the default.\n- `data`  - optional location of matrix data, which should have the same memory type as the vector. Pass `NULL` to have PETSc take care of matrix memory allocation.\n\nOutput Parameter:\n- `A` - the dense matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateDense()`, `MatCreateDenseCUDA()`, `MatCreateDenseHIP()`, `PetscMemType`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateDenseFromVecType\"))\n\"\"\"\nfunction MatCreateDenseFromVecType(petsclib::PetscLibType, comm::MPI_Comm, vtype::VecType, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, lda::PetscInt) end\n\n@for_petsc function MatCreateDenseFromVecType(petsclib::$UnionPetscLib, comm::MPI_Comm, vtype::VecType, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, lda::$PetscInt )\n\tdata_ = Ref{$PetscScalar}()\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateDenseFromVecType, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, VecType, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{CMat}),\n               comm, vtype, m, n, M, N, lda, data_, A_,\n              )\n\n\tdata = data_[]\n\tA = PetscMat(A_[], petsclib)\n\n\treturn data,A\nend \n\n\"\"\"\n\tMatGetColumnVector(petsclib::PetscLibType,A::PetscMat, yy::PetscVec, col::PetscInt) \nGets the values from a given column of a matrix.\n\nNot Collective\n\nInput Parameters:\n- `A`   - the matrix\n- `yy`  - the vector\n- `col` - the column requested (in global numbering)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatGetRow()`, `MatGetDiagonal()`, `MatMult()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnVector\"))\n\"\"\"\nfunction MatGetColumnVector(petsclib::PetscLibType, A::PetscMat, yy::PetscVec, col::PetscInt) end\n\n@for_petsc function MatGetColumnVector(petsclib::$UnionPetscLib, A::PetscMat, yy::PetscVec, col::$PetscInt )\n\n    @chk ccall(\n               (:MatGetColumnVector, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, $PetscInt),\n               A, yy, col,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnNorms(petsclib::PetscLibType,A::PetscMat, type::NormType, norms::Vector{PetscReal}) \nGets the norms of each column of a sparse or dense matrix.\n\nInput Parameters:\n- `A`    - the matrix\n- `type` - `NORM_2`, `NORM_1` or `NORM_INFINITY`\n\nOutput Parameter:\n- `norms` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `NormType`, `MatNorm()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnNorms\"))\n\"\"\"\nfunction MatGetColumnNorms(petsclib::PetscLibType, A::PetscMat, type::NormType, norms::Vector{PetscReal}) end\n\n@for_petsc function MatGetColumnNorms(petsclib::$UnionPetscLib, A::PetscMat, type::NormType, norms::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:MatGetColumnNorms, $petsc_library),\n               PetscErrorCode,\n               (CMat, NormType, Ptr{$PetscReal}),\n               A, type, norms,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnSumsRealPart(petsclib::PetscLibType,A::PetscMat, sums::Vector{PetscReal}) \nGets the sums of the real part of each column of a sparse or dense matrix.\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `sums` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetColumnSumsImaginaryPart()`, `VecSum()`, `MatGetColumnMeans()`, `MatGetColumnNorms()`, `MatGetColumnReductions()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnSumsRealPart\"))\n\"\"\"\nfunction MatGetColumnSumsRealPart(petsclib::PetscLibType, A::PetscMat, sums::Vector{PetscReal}) end\n\n@for_petsc function MatGetColumnSumsRealPart(petsclib::$UnionPetscLib, A::PetscMat, sums::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:MatGetColumnSumsRealPart, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               A, sums,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnSumsImaginaryPart(petsclib::PetscLibType,A::PetscMat, sums::Vector{PetscReal}) \nGets the sums of the imaginary part of each column of a sparse or dense matrix.\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `sums` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetColumnSumsRealPart()`, `VecSum()`, `MatGetColumnMeans()`, `MatGetColumnNorms()`, `MatGetColumnReductions()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnSumsImaginaryPart\"))\n\"\"\"\nfunction MatGetColumnSumsImaginaryPart(petsclib::PetscLibType, A::PetscMat, sums::Vector{PetscReal}) end\n\n@for_petsc function MatGetColumnSumsImaginaryPart(petsclib::$UnionPetscLib, A::PetscMat, sums::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:MatGetColumnSumsImaginaryPart, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               A, sums,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnSums(petsclib::PetscLibType,A::PetscMat, sums::Vector{PetscScalar}) \nGets the sums of each column of a sparse or dense matrix.\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `sums` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `VecSum()`, `MatGetColumnMeans()`, `MatGetColumnNorms()`, `MatGetColumnReductions()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnSums\"))\n\"\"\"\nfunction MatGetColumnSums(petsclib::PetscLibType, A::PetscMat, sums::Vector{PetscScalar}) end\n\n@for_petsc function MatGetColumnSums(petsclib::$UnionPetscLib, A::PetscMat, sums::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatGetColumnSums, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               A, sums,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnMeansRealPart(petsclib::PetscLibType,A::PetscMat, means::Vector{PetscReal}) \nGets the arithmetic means of the real part of each column of a sparse or dense matrix.\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `means` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetColumnMeansImaginaryPart()`, `VecSum()`, `MatGetColumnSums()`, `MatGetColumnNorms()`, `MatGetColumnReductions()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnMeansRealPart\"))\n\"\"\"\nfunction MatGetColumnMeansRealPart(petsclib::PetscLibType, A::PetscMat, means::Vector{PetscReal}) end\n\n@for_petsc function MatGetColumnMeansRealPart(petsclib::$UnionPetscLib, A::PetscMat, means::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:MatGetColumnMeansRealPart, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               A, means,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnMeansImaginaryPart(petsclib::PetscLibType,A::PetscMat, means::Vector{PetscReal}) \nGets the arithmetic means of the imaginary part of each column of a sparse or dense matrix.\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `means` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatGetColumnMeansRealPart()`, `VecSum()`, `MatGetColumnSums()`, `MatGetColumnNorms()`, `MatGetColumnReductions()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnMeansImaginaryPart\"))\n\"\"\"\nfunction MatGetColumnMeansImaginaryPart(petsclib::PetscLibType, A::PetscMat, means::Vector{PetscReal}) end\n\n@for_petsc function MatGetColumnMeansImaginaryPart(petsclib::$UnionPetscLib, A::PetscMat, means::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:MatGetColumnMeansImaginaryPart, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               A, means,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnMeans(petsclib::PetscLibType,A::PetscMat, means::Vector{PetscScalar}) \nGets the arithmetic means of each column of a sparse or dense matrix.\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `means` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `VecSum()`, `MatGetColumnSums()`, `MatGetColumnNorms()`, `MatGetColumnReductions()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnMeans\"))\n\"\"\"\nfunction MatGetColumnMeans(petsclib::PetscLibType, A::PetscMat, means::Vector{PetscScalar}) end\n\n@for_petsc function MatGetColumnMeans(petsclib::$UnionPetscLib, A::PetscMat, means::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatGetColumnMeans, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               A, means,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetColumnReductions(petsclib::PetscLibType,A::PetscMat, type::PetscInt, reductions::Vector{PetscReal}) \nGets the reductions of each column of a sparse or dense matrix.\n\nInput Parameters:\n- `A`    - the matrix\n- `type` - A constant defined in `NormType` or `ReductionType`: `NORM_2`, `NORM_1`, `NORM_INFINITY`, `REDUCTION_SUM_REALPART`,\n`REDUCTION_SUM_IMAGINARYPART`, `REDUCTION_MEAN_REALPART`, `REDUCTION_MEAN_IMAGINARYPART`\n\nOutput Parameter:\n- `reductions` - an array as large as the TOTAL number of columns in the matrix\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `ReductionType`, `NormType`, `MatGetColumnNorms()`, `MatGetColumnSums()`, `MatGetColumnMeans()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetColumnReductions\"))\n\"\"\"\nfunction MatGetColumnReductions(petsclib::PetscLibType, A::PetscMat, type::PetscInt, reductions::Vector{PetscReal}) end\n\n@for_petsc function MatGetColumnReductions(petsclib::$UnionPetscLib, A::PetscMat, type::$PetscInt, reductions::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:MatGetColumnReductions, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscReal}),\n               A, type, reductions,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatReorderForNonzeroDiagonal(petsclib::PetscLibType,mat::PetscMat, abstol::PetscReal, ris::IS, cis::IS) \nChanges matrix ordering to remove\nzeros from diagonal. This may help in the `PCLU` factorization to\nprevent a zero pivot.\n\nCollective\n\nInput Parameters:\n- `mat`    - matrix to reorder\n- `abstol` - absolute tolerance, it attempts to move all values smaller off the diagonal\n- `ris`    - the row reordering\n- `cis`    - the column reordering; this may be changed\n\nLevel: intermediate\n\nOptions Database Key:\n- `-pc_factor_nonzeros_along_diagonal` - Reorder to remove zeros from diagonal\n\n-seealso: `Mat`, `MatGetFactor()`, `MatGetOrdering()`\n\n# External Links\n$(_doc_external(\"Mat/MatReorderForNonzeroDiagonal\"))\n\"\"\"\nfunction MatReorderForNonzeroDiagonal(petsclib::PetscLibType, mat::PetscMat, abstol::PetscReal, ris::IS, cis::IS) end\n\n@for_petsc function MatReorderForNonzeroDiagonal(petsclib::$UnionPetscLib, mat::PetscMat, abstol::$PetscReal, ris::IS, cis::IS )\n\n    @chk ccall(\n               (:MatReorderForNonzeroDiagonal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal, CIS, CIS),\n               mat, abstol, ris, cis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tA::PetscMat = MatCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a matrix where the type is determined\nfrom either a call to `MatSetType()` or from the options database\nwith a call to `MatSetFromOptions()`.\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Keys:\n- `-mat_type seqaij`   - `MATSEQAIJ` type, uses `MatCreateSeqAIJ()`\n- `-mat_type mpiaij`   - `MATMPIAIJ` type, uses `MatCreateAIJ()`\n- `-mat_type seqdense` - `MATSEQDENSE`, uses `MatCreateSeqDense()`\n- `-mat_type mpidense` - `MATMPIDENSE` type, uses `MatCreateDense()`\n- `-mat_type seqbaij`  - `MATSEQBAIJ` type, uses `MatCreateSeqBAIJ()`\n- `-mat_type mpibaij`  - `MATMPIBAIJ` type, uses `MatCreateBAIJ()`\n\nSee the manpages for particular formats (e.g., `MATSEQAIJ`)\nfor additional format-specific options.\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqAIJ()`, `MatCreateAIJ()`,\n`MatCreateSeqDense()`, `MatCreateDense()`,\n`MatCreateSeqBAIJ()`, `MatCreateBAIJ()`,\n`MatCreateSeqSBAIJ()`, `MatCreateSBAIJ()`,\n`MatConvert()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreate\"))\n\"\"\"\nfunction MatCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function MatCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CMat}),\n               comm, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tA::PetscMat = MatCreateFromOptions(petsclib::PetscLibType,comm::MPI_Comm, prefix::Vector{Cchar}, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt) \nCreates a matrix whose type is set from the options database\n\nCollective\n\nInput Parameters:\n- `comm`   - MPI communicator\n- `prefix` - [optional] prefix for the options database\n- `bs`     - the blocksize (commonly 1)\n- `m`      - the local number of rows (or `PETSC_DECIDE`)\n- `n`      - the local number of columns (or `PETSC_DECIDE` or `PETSC_DETERMINE`)\n- `M`      - the global number of rows (or `PETSC_DETERMINE`)\n- `N`      - the global number of columns (or `PETSC_DETERMINE`)\n\nOutput Parameter:\n- `A` - the matrix\n\nOptions Database Key:\n- `-mat_type` - see `MatType`, for example `aij`, `aijcusparse`, `baij`, `sbaij`, `dense`, defaults to `aij`\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqAIJ()`, `MatCreateAIJ()`,\n`MatCreateSeqDense()`, `MatCreateDense()`,\n`MatCreateSeqBAIJ()`, `MatCreateBAIJ()`,\n`MatCreateSeqSBAIJ()`, `MatCreateSBAIJ()`,\n`MatConvert()`, `MatCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateFromOptions\"))\n\"\"\"\nfunction MatCreateFromOptions(petsclib::PetscLibType, comm::MPI_Comm, prefix::Vector{Cchar}, bs::PetscInt, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateFromOptions(petsclib::$UnionPetscLib, comm::MPI_Comm, prefix::Vector{Cchar}, bs::$PetscInt, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt )\n\tA_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, prefix, bs, m, n, M, N, A_,\n              )\n\n\tA = PetscMat(A_[], petsclib)\n\n\treturn A\nend \n\n\"\"\"\n\tMatSetErrorIfFailure(petsclib::PetscLibType,mat::PetscMat, flg::PetscBool) \nCauses `Mat` to generate an immediate error, for example a zero pivot, is detected.\n\nLogically Collective\n\nInput Parameters:\n- `mat` - matrix obtained from `MatCreate()`\n- `flg` - `PETSC_TRUE` indicates you want the error generated\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `PCSetErrorIfFailure()`, `KSPConvergedReason`, `SNESConvergedReason`\n\n# External Links\n$(_doc_external(\"Mat/MatSetErrorIfFailure\"))\n\"\"\"\nfunction MatSetErrorIfFailure(petsclib::PetscLibType, mat::PetscMat, flg::PetscBool) end\n\n@for_petsc function MatSetErrorIfFailure(petsclib::$UnionPetscLib, mat::PetscMat, flg::PetscBool )\n\n    @chk ccall(\n               (:MatSetErrorIfFailure, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               mat, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetSizes(petsclib::PetscLibType,A::PetscMat, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt) \nSets the local and global sizes, and checks to determine compatibility\n\nCollective\n\nInput Parameters:\n- `A` - the matrix\n- `m` - number of local rows (or `PETSC_DECIDE`)\n- `n` - number of local columns (or `PETSC_DECIDE`)\n- `M` - number of global rows (or `PETSC_DETERMINE`)\n- `N` - number of global columns (or `PETSC_DETERMINE`)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatGetSize()`, `PetscSplitOwnership()`, `MatGetOwnershipRange()`, `MatGetOwnershipRanges()`,\n`MatGetOwnershipRangeColumn()`, `MatGetOwnershipRangesColumn()`, `PetscLayout`, `VecSetSizes()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetSizes\"))\n\"\"\"\nfunction MatSetSizes(petsclib::PetscLibType, A::PetscMat, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt) end\n\n@for_petsc function MatSetSizes(petsclib::$UnionPetscLib, A::PetscMat, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt )\n\n    @chk ccall(\n               (:MatSetSizes, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, $PetscInt, $PetscInt),\n               A, m, n, M, N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetFromOptions(petsclib::PetscLibType,B::PetscMat) \nCreates a matrix where the type is determined\nfrom the options database.\n\nCollective\n\nInput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_type seqaij`   - `MATSEQAIJ` type, uses `MatCreateSeqAIJ()`\n- `-mat_type mpiaij`   - `MATMPIAIJ` type, uses `MatCreateAIJ()`\n- `-mat_type seqdense` - `MATSEQDENSE` type, uses `MatCreateSeqDense()`\n- `-mat_type mpidense` - `MATMPIDENSE`, uses `MatCreateDense()`\n- `-mat_type seqbaij`  - `MATSEQBAIJ`, uses `MatCreateSeqBAIJ()`\n- `-mat_type mpibaij`  - `MATMPIBAIJ`, uses `MatCreateBAIJ()`\n\nSee the manpages for particular formats (e.g., `MATSEQAIJ`)\nfor additional format-specific options.\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatCreateSeqAIJ()`, `MatCreateAIJ()`,\n`MatCreateSeqDense()`, `MatCreateDense()`,\n`MatCreateSeqBAIJ()`, `MatCreateBAIJ()`,\n`MatCreateSeqSBAIJ()`, `MatCreateSBAIJ()`,\n`MatConvert()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetFromOptions\"))\n\"\"\"\nfunction MatSetFromOptions(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatSetFromOptions(petsclib::$UnionPetscLib, B::PetscMat )\n\n    @chk ccall(\n               (:MatSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatXAIJSetPreallocation(petsclib::PetscLibType,A::PetscMat, bs::PetscInt, dnnz::Vector{PetscInt}, onnz::Vector{PetscInt}, dnnzu::Vector{PetscInt}, onnzu::Vector{PetscInt}) \nset preallocation for serial and parallel `MATAIJ`, `MATBAIJ`, and `MATSBAIJ` matrices and their unassembled versions.\n\nCollective\n\nInput Parameters:\n- `A`     - matrix being preallocated\n- `bs`    - block size\n- `dnnz`  - number of nonzero column blocks per block row of diagonal part of parallel matrix\n- `onnz`  - number of nonzero column blocks per block row of off-diagonal part of parallel matrix\n- `dnnzu` - number of nonzero column blocks per block row of upper-triangular part of diagonal part of parallel matrix\n- `onnzu` - number of nonzero column blocks per block row of upper-triangular part of off-diagonal part of parallel matrix\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSeqAIJSetPreallocation()`, `MatMPIAIJSetPreallocation()`, `MatSeqBAIJSetPreallocation()`, `MatMPIBAIJSetPreallocation()`,\n`MatSeqSBAIJSetPreallocation()`, `MatMPISBAIJSetPreallocation()`,\n`PetscSplitOwnership()`\n\n# External Links\n$(_doc_external(\"Mat/MatXAIJSetPreallocation\"))\n\"\"\"\nfunction MatXAIJSetPreallocation(petsclib::PetscLibType, A::PetscMat, bs::PetscInt, dnnz::Vector{PetscInt}, onnz::Vector{PetscInt}, dnnzu::Vector{PetscInt}, onnzu::Vector{PetscInt}) end\n\n@for_petsc function MatXAIJSetPreallocation(petsclib::$UnionPetscLib, A::PetscMat, bs::$PetscInt, dnnz::Vector{$PetscInt}, onnz::Vector{$PetscInt}, dnnzu::Vector{$PetscInt}, onnzu::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatXAIJSetPreallocation, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               A, bs, dnnz, onnz, dnnzu, onnzu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHeaderMerge(petsclib::PetscLibType,A::PetscMat, C::PetscMat) \nMerges some information from the header of `C` to `A`; the `C` object is then destroyed\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `A` - a `Mat` being merged into\n- `C` - the `Mat` providing the merge information\n\nLevel: developer\n\n-seealso: `Mat`, `MatHeaderReplace()`\n\n# External Links\n$(_doc_external(\"Mat/MatHeaderMerge\"))\n\"\"\"\nfunction MatHeaderMerge(petsclib::PetscLibType, A::PetscMat, C::PetscMat) end\n\n@for_petsc function MatHeaderMerge(petsclib::$UnionPetscLib, A::PetscMat, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatHeaderMerge, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatHeaderReplace(petsclib::PetscLibType,A::PetscMat, C::PetscMat) \nReplaces the internal data of matrix `A` by the internal data of matrix `C` while deleting the outer wrapper of `C`\n\nInput Parameters:\n- `A` - a `Mat` whose internal data is to be replaced\n- `C` - the `Mat` providing new internal data for `A`\n\nLevel: advanced\n\n-seealso: `Mat`, `MatHeaderMerge()`\n\n# External Links\n$(_doc_external(\"Mat/MatHeaderReplace\"))\n\"\"\"\nfunction MatHeaderReplace(petsclib::PetscLibType, A::PetscMat, C::PetscMat) end\n\n@for_petsc function MatHeaderReplace(petsclib::$UnionPetscLib, A::PetscMat, C::PetscMat )\n\tC_ = Ref(C.ptr)\n\n    @chk ccall(\n               (:MatHeaderReplace, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, C_,\n              )\n\n\tC.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatBindToCPU(petsclib::PetscLibType,A::PetscMat, flg::PetscBool) \nmarks a matrix to temporarily stay on the CPU and perform computations on the CPU\n\nLogically Collective\n\nInput Parameters:\n- `A`   - the matrix\n- `flg` - bind to the CPU if value of `PETSC_TRUE`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatBoundToCPU()`\n\n# External Links\n$(_doc_external(\"Mat/MatBindToCPU\"))\n\"\"\"\nfunction MatBindToCPU(petsclib::PetscLibType, A::PetscMat, flg::PetscBool) end\n\n@for_petsc function MatBindToCPU(petsclib::$UnionPetscLib, A::PetscMat, flg::PetscBool )\n\n    @chk ccall(\n               (:MatBindToCPU, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatBoundToCPU(petsclib::PetscLibType,A::PetscMat) \nquery if a matrix is bound to the CPU\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `flg` - the logical flag\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatBindToCPU()`\n\n# External Links\n$(_doc_external(\"Mat/MatBoundToCPU\"))\n\"\"\"\nfunction MatBoundToCPU(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatBoundToCPU(petsclib::$UnionPetscLib, A::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatBoundToCPU, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               A, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatSetPreallocationCOO(petsclib::PetscLibType,A::PetscMat, ncoo::PetscCount, coo_i::Vector{PetscInt}, coo_j::Vector{PetscInt}) \nset preallocation for matrices using a coordinate format of the entries with global indices\n\nCollective\n\nInput Parameters:\n- `A`     - matrix being preallocated\n- `ncoo`  - number of entries\n- `coo_i` - row indices\n- `coo_j` - column indices\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetValuesCOO()`, `MatSeqAIJSetPreallocation()`, `MatMPIAIJSetPreallocation()`, `MatSeqBAIJSetPreallocation()`,\n`MatMPIBAIJSetPreallocation()`, `MatSeqSBAIJSetPreallocation()`, `MatMPISBAIJSetPreallocation()`, `MatSetPreallocationCOOLocal()`,\n`DMSetMatrixPreallocateSkip()`, `MatCreateSeqAIJFromTriple()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetPreallocationCOO\"))\n\"\"\"\nfunction MatSetPreallocationCOO(petsclib::PetscLibType, A::PetscMat, ncoo::PetscCount, coo_i::Vector{PetscInt}, coo_j::Vector{PetscInt}) end\n\n@for_petsc function MatSetPreallocationCOO(petsclib::$UnionPetscLib, A::PetscMat, ncoo::PetscCount, coo_i::Vector{$PetscInt}, coo_j::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatSetPreallocationCOO, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscCount, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               A, ncoo, coo_i, coo_j,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetPreallocationCOOLocal(petsclib::PetscLibType,A::PetscMat, ncoo::PetscCount, coo_i::Vector{PetscInt}, coo_j::Vector{PetscInt}) \nset preallocation for matrices using a coordinate format of the entries with local indices\n\nCollective\n\nInput Parameters:\n- `A`     - matrix being preallocated\n- `ncoo`  - number of entries\n- `coo_i` - row indices (local numbering; may be modified)\n- `coo_j` - column indices (local numbering; may be modified)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetValuesCOO()`, `MatSeqAIJSetPreallocation()`, `MatMPIAIJSetPreallocation()`, `MatSeqBAIJSetPreallocation()`,\n`MatMPIBAIJSetPreallocation()`, `MatSeqSBAIJSetPreallocation()`, `MatMPISBAIJSetPreallocation()`, `MatSetPreallocationCOO()`,\n`DMSetMatrixPreallocateSkip()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetPreallocationCOOLocal\"))\n\"\"\"\nfunction MatSetPreallocationCOOLocal(petsclib::PetscLibType, A::PetscMat, ncoo::PetscCount, coo_i::Vector{PetscInt}, coo_j::Vector{PetscInt}) end\n\n@for_petsc function MatSetPreallocationCOOLocal(petsclib::$UnionPetscLib, A::PetscMat, ncoo::PetscCount, coo_i::Vector{$PetscInt}, coo_j::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatSetPreallocationCOOLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscCount, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               A, ncoo, coo_i, coo_j,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetValuesCOO(petsclib::PetscLibType,A::PetscMat, coo_v::Vector{PetscScalar}, imode::InsertMode) \nset values at once in a matrix preallocated using `MatSetPreallocationCOO()`\n\nCollective\n\nInput Parameters:\n- `A`     - matrix being preallocated\n- `coo_v` - the matrix values (can be `NULL`)\n- `imode` - the insert mode\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatSetPreallocationCOO()`, `MatSetPreallocationCOOLocal()`, `InsertMode`, `INSERT_VALUES`, `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesCOO\"))\n\"\"\"\nfunction MatSetValuesCOO(petsclib::PetscLibType, A::PetscMat, coo_v::Vector{PetscScalar}, imode::InsertMode) end\n\n@for_petsc function MatSetValuesCOO(petsclib::$UnionPetscLib, A::PetscMat, coo_v::Vector{$PetscScalar}, imode::InsertMode )\n\n    @chk ccall(\n               (:MatSetValuesCOO, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}, InsertMode),\n               A, coo_v, imode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSetBindingPropagates(petsclib::PetscLibType,A::PetscMat, flg::PetscBool) \nSets whether the state of being bound to the CPU for a GPU matrix type propagates to child and some other associated objects\n\nInput Parameters:\n- `A`   - the matrix\n- `flg` - flag indicating whether the boundtocpu flag should be propagated\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `VecSetBindingPropagates()`, `MatGetBindingPropagates()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetBindingPropagates\"))\n\"\"\"\nfunction MatSetBindingPropagates(petsclib::PetscLibType, A::PetscMat, flg::PetscBool) end\n\n@for_petsc function MatSetBindingPropagates(petsclib::$UnionPetscLib, A::PetscMat, flg::PetscBool )\n\n    @chk ccall(\n               (:MatSetBindingPropagates, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatGetBindingPropagates(petsclib::PetscLibType,A::PetscMat) \nGets whether the state of being bound to the CPU for a GPU matrix type propagates to child and some other associated objects\n\nInput Parameter:\n- `A` - the matrix\n\nOutput Parameter:\n- `flg` - flag indicating whether the boundtocpu flag will be propagated\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatSetBindingPropagates()`\n\n# External Links\n$(_doc_external(\"Mat/MatGetBindingPropagates\"))\n\"\"\"\nfunction MatGetBindingPropagates(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatGetBindingPropagates(petsclib::$UnionPetscLib, A::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatGetBindingPropagates, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               A, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tbw::PetscInt = MatComputeBandwidth(petsclib::PetscLibType,A::PetscMat, fraction::PetscReal) \nCalculate the full bandwidth of the matrix, meaning the width 2k+1 where k diagonals on either side are sufficient to contain all the matrix nonzeros.\n\nCollective\n\nInput Parameters:\n- `A`        - The `Mat`\n- `fraction` - An optional percentage of the Frobenius norm of the matrix that the bandwidth should enclose\n\nOutput Parameter:\n- `bw` - The matrix bandwidth\n\nLevel: beginner\n\n-seealso: `DMPlexCreate()`, `DMPlexSetConeSize()`, `DMPlexSetChart()`\n\n# External Links\n$(_doc_external(\"Mat/MatComputeBandwidth\"))\n\"\"\"\nfunction MatComputeBandwidth(petsclib::PetscLibType, A::PetscMat, fraction::PetscReal) end\n\n@for_petsc function MatComputeBandwidth(petsclib::$UnionPetscLib, A::PetscMat, fraction::$PetscReal )\n\tbw_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatComputeBandwidth, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal, Ptr{$PetscInt}),\n               A, fraction, bw_,\n              )\n\n\tbw = bw_[]\n\n\treturn bw\nend \n\n\"\"\"\n\tMatAXPY(petsclib::PetscLibType,Y::PetscMat, a::PetscScalar, X::PetscMat, str::MatStructure) \nComputes Y = a*X + Y.\n\nLogically Collective\n\nInput Parameters:\n- `a`   - the scalar multiplier\n- `X`   - the first matrix\n- `Y`   - the second matrix\n- `str` - either `SAME_NONZERO_PATTERN`, `DIFFERENT_NONZERO_PATTERN`, `UNKNOWN_NONZERO_PATTERN`, or `SUBSET_NONZERO_PATTERN` (nonzeros of `X` is a subset of `Y`'s)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatAYPX()`\n\n# External Links\n$(_doc_external(\"Mat/MatAXPY\"))\n\"\"\"\nfunction MatAXPY(petsclib::PetscLibType, Y::PetscMat, a::PetscScalar, X::PetscMat, str::MatStructure) end\n\n@for_petsc function MatAXPY(petsclib::$UnionPetscLib, Y::PetscMat, a::$PetscScalar, X::PetscMat, str::MatStructure )\n\n    @chk ccall(\n               (:MatAXPY, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscScalar, CMat, MatStructure),\n               Y, a, X, str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatShift(petsclib::PetscLibType,Y::PetscMat, a::PetscScalar) \nComputes `Y =  Y + a I`, where `a` is a `PetscScalar`\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `Y` - the matrix\n- `a` - the `PetscScalar`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatDiagonalSet()`, `MatScale()`, `MatDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Mat/MatShift\"))\n\"\"\"\nfunction MatShift(petsclib::PetscLibType, Y::PetscMat, a::PetscScalar) end\n\n@for_petsc function MatShift(petsclib::$UnionPetscLib, Y::PetscMat, a::$PetscScalar )\n\n    @chk ccall(\n               (:MatShift, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscScalar),\n               Y, a,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDiagonalSet(petsclib::PetscLibType,Y::PetscMat, D::PetscVec, is::InsertMode) \nComputes `Y` = `Y` + `D`, where `D` is a diagonal matrix\nthat is represented as a vector. Or Y[i,i] = D[i] if `InsertMode` is\n`INSERT_VALUES`.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `Y`  - the input matrix\n- `D`  - the diagonal matrix, represented as a vector\n- `is` - `INSERT_VALUES` or `ADD_VALUES`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatShift()`, `MatScale()`, `MatDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Mat/MatDiagonalSet\"))\n\"\"\"\nfunction MatDiagonalSet(petsclib::PetscLibType, Y::PetscMat, D::PetscVec, is::InsertMode) end\n\n@for_petsc function MatDiagonalSet(petsclib::$UnionPetscLib, Y::PetscMat, D::PetscVec, is::InsertMode )\n\n    @chk ccall(\n               (:MatDiagonalSet, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, InsertMode),\n               Y, D, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatAYPX(petsclib::PetscLibType,Y::PetscMat, a::PetscScalar, X::PetscMat, str::MatStructure) \nComputes Y = a*Y + X.\n\nLogically Collective\n\nInput Parameters:\n- `a`   - the `PetscScalar` multiplier\n- `Y`   - the first matrix\n- `X`   - the second matrix\n- `str` - either `SAME_NONZERO_PATTERN`, `DIFFERENT_NONZERO_PATTERN`, `UNKNOWN_NONZERO_PATTERN`, or `SUBSET_NONZERO_PATTERN` (nonzeros of `X` is a subset of `Y`'s)\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatAXPY()`\n\n# External Links\n$(_doc_external(\"Mat/MatAYPX\"))\n\"\"\"\nfunction MatAYPX(petsclib::PetscLibType, Y::PetscMat, a::PetscScalar, X::PetscMat, str::MatStructure) end\n\n@for_petsc function MatAYPX(petsclib::$UnionPetscLib, Y::PetscMat, a::$PetscScalar, X::PetscMat, str::MatStructure )\n\n    @chk ccall(\n               (:MatAYPX, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscScalar, CMat, MatStructure),\n               Y, a, X, str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatComputeOperator(petsclib::PetscLibType,inmat::PetscMat, mattype::MatType, mat::PetscMat) \nComputes the explicit matrix\n\nCollective\n\nInput Parameters:\n- `inmat`   - the matrix\n- `mattype` - the matrix type for the explicit operator\n\nOutput Parameter:\n- `mat` - the explicit  operator\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatConvert()`, `MatMult()`, `MatComputeOperatorTranspose()`\n\n# External Links\n$(_doc_external(\"Mat/MatComputeOperator\"))\n\"\"\"\nfunction MatComputeOperator(petsclib::PetscLibType, inmat::PetscMat, mattype::MatType, mat::PetscMat) end\n\n@for_petsc function MatComputeOperator(petsclib::$UnionPetscLib, inmat::PetscMat, mattype::MatType, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:MatComputeOperator, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatType, Ptr{CMat}),\n               inmat, mattype, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatComputeOperatorTranspose(petsclib::PetscLibType,inmat::PetscMat, mattype::MatType, mat::PetscMat) \nComputes the explicit matrix representation of\na give matrix that can apply `MatMultTranspose()`\n\nCollective\n\nInput Parameters:\n- `inmat`   - the matrix\n- `mattype` - the matrix type for the explicit operator\n\nOutput Parameter:\n- `mat` - the explicit  operator transposed\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatConvert()`, `MatMult()`, `MatComputeOperator()`\n\n# External Links\n$(_doc_external(\"Mat/MatComputeOperatorTranspose\"))\n\"\"\"\nfunction MatComputeOperatorTranspose(petsclib::PetscLibType, inmat::PetscMat, mattype::MatType, mat::PetscMat) end\n\n@for_petsc function MatComputeOperatorTranspose(petsclib::$UnionPetscLib, inmat::PetscMat, mattype::MatType, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:MatComputeOperatorTranspose, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatType, Ptr{CMat}),\n               inmat, mattype, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFilter(petsclib::PetscLibType,A::PetscMat, tol::PetscReal, compress::PetscBool, keep::PetscBool) \nSet all values in the matrix with an absolute value less than or equal to the tolerance to zero, and optionally compress the underlying storage\n\nInput Parameters:\n- `A`        - The matrix\n- `tol`      - The zero tolerance\n- `compress` - Whether the storage from the input matrix `A` should be compressed once values less than or equal to `tol` are set to zero\n- `keep`     - If `compress` is true and for a given row of `A`, the diagonal coefficient is less than or equal to `tol`, indicates whether it should be left in the structure or eliminated as well\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`, `MatZeroEntries()`, `MatEliminateZeros()`, `VecFilter()`\n\n# External Links\n$(_doc_external(\"Mat/MatFilter\"))\n\"\"\"\nfunction MatFilter(petsclib::PetscLibType, A::PetscMat, tol::PetscReal, compress::PetscBool, keep::PetscBool) end\n\n@for_petsc function MatFilter(petsclib::$UnionPetscLib, A::PetscMat, tol::$PetscReal, compress::PetscBool, keep::PetscBool )\n\n    @chk ccall(\n               (:MatFilter, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal, PetscBool, PetscBool),\n               A, tol, compress, keep,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatMultEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMultAddEqual()`, `MatMultTransposeEqual()`, `MatMultTransposeAddEqual()`, `MatIsLinear()`, `MatEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultEqual\"))\n\"\"\"\nfunction MatMultEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMultEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMultEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatMultAddEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMultEqual()`, `MatMultTransposeEqual()`, `MatMultTransposeAddEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultAddEqual\"))\n\"\"\"\nfunction MatMultAddEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMultAddEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMultAddEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatMultTransposeEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeAddEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultTransposeEqual\"))\n\"\"\"\nfunction MatMultTransposeEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMultTransposeEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMultTransposeEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatMultTransposeAddEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultTransposeAddEqual\"))\n\"\"\"\nfunction MatMultTransposeAddEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMultTransposeAddEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMultTransposeAddEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatMultHermitianTransposeEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMatMultEqual()`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultHermitianTransposeEqual\"))\n\"\"\"\nfunction MatMultHermitianTransposeEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMultHermitianTransposeEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMultHermitianTransposeEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatMultHermitianTransposeAddEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMatMultEqual()`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMultHermitianTransposeAddEqual\"))\n\"\"\"\nfunction MatMultHermitianTransposeAddEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMultHermitianTransposeAddEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMultHermitianTransposeAddEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatMatMultEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) \nTest A*B*x = C*x for n random vector x\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMatMultEqual\"))\n\"\"\"\nfunction MatMatMultEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMatMultEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMatMultEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, C, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatTransposeMatMultEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) \nTest A^T*B*x = C*x for n random vector x\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMatMultEqual()`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatTransposeMatMultEqual\"))\n\"\"\"\nfunction MatTransposeMatMultEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) end\n\n@for_petsc function MatTransposeMatMultEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatTransposeMatMultEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, C, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatMatTransposeMultEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) \nTest A*B^T*x = C*x for n random vector x\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMatMultEqual()`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatMatTransposeMultEqual\"))\n\"\"\"\nfunction MatMatTransposeMultEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) end\n\n@for_petsc function MatMatTransposeMultEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatMatTransposeMultEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, C, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatPtAPMultEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMatMultEqual()`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatPtAPMultEqual\"))\n\"\"\"\nfunction MatPtAPMultEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) end\n\n@for_petsc function MatPtAPMultEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatPtAPMultEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, C, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatRARtMultEqual(petsclib::PetscLibType,A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) \nCompares matrix\n\nCollective\n\nInput Parameters:\n- `A` - the first matrix\n- `B` - the second matrix\n- `C` - the third matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the products are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMatMultEqual()`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatRARtMultEqual\"))\n\"\"\"\nfunction MatRARtMultEqual(petsclib::PetscLibType, A::PetscMat, B::PetscMat, C::PetscMat, n::PetscInt) end\n\n@for_petsc function MatRARtMultEqual(petsclib::$UnionPetscLib, A::PetscMat, B::PetscMat, C::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatRARtMultEqual, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, $PetscInt, Ptr{PetscBool}),\n               A, B, C, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = MatIsLinear(petsclib::PetscLibType,A::PetscMat, n::PetscInt) \nCheck if a shell matrix `A` is a linear operator.\n\nCollective\n\nInput Parameters:\n- `A` - the shell matrix\n- `n` - number of random vectors to be tested\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the shell matrix is linear; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatMatMultEqual()`, `MatMultEqual()`, `MatMultAddEqual()`, `MatMultTransposeEqual()`\n\n# External Links\n$(_doc_external(\"Mat/MatIsLinear\"))\n\"\"\"\nfunction MatIsLinear(petsclib::PetscLibType, A::PetscMat, n::PetscInt) end\n\n@for_petsc function MatIsLinear(petsclib::$UnionPetscLib, A::PetscMat, n::$PetscInt )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatIsLinear, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{PetscBool}),\n               A, n, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatSetHPL(petsclib::PetscLibType,A::PetscMat, iseed::Cint) \nfills a `MATSEQDENSE` matrix using the HPL 2.3 random matrix generation routine\n\nCollective\n\nInput Parameters:\n- `A`     - the matrix\n- `iseed` - the random number seed\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatSetHPL\"))\n\"\"\"\nfunction MatSetHPL(petsclib::PetscLibType, A::PetscMat, iseed::Cint) end\n\n@for_petsc function MatSetHPL(petsclib::$UnionPetscLib, A::PetscMat, iseed::Cint )\n\n    @chk ccall(\n               (:MatSetHPL, $petsc_library),\n               PetscErrorCode,\n               (CMat, Cint),\n               A, iseed,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tL::PetscMat = MatCreateLaplacian(petsclib::PetscLibType,A::PetscMat, tol::PetscReal, weighted::PetscBool) \nCreate the matrix Laplacian, with all values in the matrix less than the tolerance set to zero\n\nInput Parameters:\n- `A`        - The matrix\n- `tol`      - The zero tolerance\n- `weighted` - Flag for using edge weights\n\nOutput Parameter:\n- `L` - The graph Laplacian matrix\n\nLevel: intermediate\n\n-seealso: `MatFilter()`, `MatGetGraph()`\n\n# External Links\n$(_doc_external(\"Mat/MatCreateLaplacian\"))\n\"\"\"\nfunction MatCreateLaplacian(petsclib::PetscLibType, A::PetscMat, tol::PetscReal, weighted::PetscBool) end\n\n@for_petsc function MatCreateLaplacian(petsclib::$UnionPetscLib, A::PetscMat, tol::$PetscReal, weighted::PetscBool )\n\tL_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLaplacian, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal, PetscBool, Ptr{CMat}),\n               A, tol, weighted, L_,\n              )\n\n\tL = PetscMat(L_[], petsclib)\n\n\treturn L\nend \n\n\"\"\"\n\tMatOrderingRegister(petsclib::PetscLibType,sname::Vector{Cchar}, fnc::external) \nAdds a new sparse matrix ordering to the matrix package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of ordering (for example `MATORDERINGND`)\n- `function` - function pointer that creates the ordering\n\nLevel: developer\n\n-seealso: `Mat`, `MatOrderingType`, `MatOrderingRegisterAll()`, `MatGetOrdering()`\n\n# External Links\n$(_doc_external(\"Mat/MatOrderingRegister\"))\n\"\"\"\nfunction MatOrderingRegister(petsclib::PetscLibType, sname::Vector{Cchar}, fnc::external) end\n\n@for_petsc function MatOrderingRegister(petsclib::$UnionPetscLib, sname::Vector{Cchar}, fnc::external )\n\n    @chk ccall(\n               (:MatOrderingRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetOrdering(petsclib::PetscLibType,mat::PetscMat, type::MatOrderingType, rperm::IS, cperm::IS) \nGets a reordering for a matrix to reduce fill or to\nimprove numerical stability of LU factorization.\n\nCollective\n\nInput Parameters:\n- `mat`  - the matrix\n- `type` - type of reordering, one of the following\n-seealso: `MatOrderingRegister()`, `PCFactorSetMatOrderingType()`, `MatColoring`, `MatColoringCreate()`, `MatOrderingType`, `Mat`\n\n# External Links\n$(_doc_external(\"Mat/MatGetOrdering\"))\n\"\"\"\nfunction MatGetOrdering(petsclib::PetscLibType, mat::PetscMat, type::MatOrderingType, rperm::IS, cperm::IS) end\n\n@for_petsc function MatGetOrdering(petsclib::$UnionPetscLib, mat::PetscMat, type::MatOrderingType, rperm::IS, cperm::IS )\n\n    @chk ccall(\n               (:MatGetOrdering, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatOrderingType, Ptr{CIS}, Ptr{CIS}),\n               mat, type, rperm, cperm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetOrderingList(petsclib::PetscLibType,list::PetscFunctionList) \n\n# External Links\n$(_doc_external(\"Mat/MatGetOrderingList\"))\n\"\"\"\nfunction MatGetOrderingList(petsclib::PetscLibType, list::PetscFunctionList) end\n\n@for_petsc function MatGetOrderingList(petsclib::$UnionPetscLib, list::PetscFunctionList )\n\n    @chk ccall(\n               (:MatGetOrderingList, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFunctionList},),\n               list,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMeshToCellGraph(petsclib::PetscLibType,mesh::PetscMat, ncommonnodes::PetscInt, dual::PetscMat) \nConvert a mesh to a cell graph.\n\nCollective\n\nInput Parameters:\n- `mesh`         - the graph that represents the coupling of the vertices of the mesh\n- `ncommonnodes` - mesh elements that share this number of common nodes are considered neighbors, use 2 for triangles and\nquadrilaterials, 3 for tetrahedrals and 4 for hexahedrals\n\nOutput Parameter:\n- `dual` - the dual graph\n\nLevel: advanced\n\n-seealso: `MatCreateMPIAdj()`, `MatPartitioningCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatMeshToCellGraph\"))\n\"\"\"\nfunction MatMeshToCellGraph(petsclib::PetscLibType, mesh::PetscMat, ncommonnodes::PetscInt, dual::PetscMat) end\n\n@for_petsc function MatMeshToCellGraph(petsclib::$UnionPetscLib, mesh::PetscMat, ncommonnodes::$PetscInt, dual::PetscMat )\n\tdual_ = Ref(dual.ptr)\n\n    @chk ccall(\n               (:MatMeshToCellGraph, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{CMat}),\n               mesh, ncommonnodes, dual_,\n              )\n\n\tdual.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSetMultAlgorithm(petsclib::PetscLibType,B::PetscMat, alg::MatLMVMMultAlgorithm) \nSet the algorithm used by a `MatLMVM` for products\n\nLogically collective\n\nInput Parameters:\n- `B`   - a `MatLMVM` matrix\n- `alg` - one of the algorithm classes (`MAT_LMVM_MULT_RECURSIVE`, `MAT_LMVM_MULT_DENSE`, `MAT_LMVM_MULT_COMPACT_DENSE`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `MatLMVM`, `MatLMVMMultAlgorithm`, `MatLMVMGetMultAlgorithm()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSetMultAlgorithm\"))\n\"\"\"\nfunction MatLMVMSetMultAlgorithm(petsclib::PetscLibType, B::PetscMat, alg::MatLMVMMultAlgorithm) end\n\n@for_petsc function MatLMVMSetMultAlgorithm(petsclib::$UnionPetscLib, B::PetscMat, alg::MatLMVMMultAlgorithm )\n\n    @chk ccall(\n               (:MatLMVMSetMultAlgorithm, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatLMVMMultAlgorithm),\n               B, alg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMGetMultAlgorithm(petsclib::PetscLibType,B::PetscMat, alg::MatLMVMMultAlgorithm) \nGet the algorithm used by a `MatLMVM` for products\n\nNot collective\n\nInput Parameter:\n- `B` - a `MatLMVM` matrix\n\nOutput Parameter:\n- `alg` - one of the algorithm classes (`MAT_LMVM_MULT_RECURSIVE`, `MAT_LMVM_MULT_DENSE`, `MAT_LMVM_MULT_COMPACT_DENSE`)\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `MatLMVM`, `MatLMVMMultAlgorithm`, `MatLMVMSetMultAlgorithm()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetMultAlgorithm\"))\n\"\"\"\nfunction MatLMVMGetMultAlgorithm(petsclib::PetscLibType, B::PetscMat, alg::MatLMVMMultAlgorithm) end\n\n@for_petsc function MatLMVMGetMultAlgorithm(petsclib::$UnionPetscLib, B::PetscMat, alg::MatLMVMMultAlgorithm )\n\n    @chk ccall(\n               (:MatLMVMGetMultAlgorithm, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatLMVMMultAlgorithm}),\n               B, alg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMGetLastUpdate(petsclib::PetscLibType,B::PetscMat, x_prev::PetscVec, f_prev::PetscVec) \nGet the last vectors passed to `MatLMVMUpdate()`\n\nNot collective\n\nInput Parameter:\n- `B` - a `MatLMVM` matrix\n\nOutput Parameters:\n- `x_prev` - the last solution vector\n- `f_prev` - the last function vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `MatLMVM`, `MatLMVMUpdate()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetLastUpdate\"))\n\"\"\"\nfunction MatLMVMGetLastUpdate(petsclib::PetscLibType, B::PetscMat, x_prev::PetscVec, f_prev::PetscVec) end\n\n@for_petsc function MatLMVMGetLastUpdate(petsclib::$UnionPetscLib, B::PetscMat, x_prev::PetscVec, f_prev::PetscVec )\n\tx_prev_ = Ref(x_prev.ptr)\n\tf_prev_ = Ref(f_prev.ptr)\n\n    @chk ccall(\n               (:MatLMVMGetLastUpdate, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CVec}, Ptr{CVec}),\n               B, x_prev_, f_prev_,\n              )\n\n\tx_prev.ptr = C_NULL\n\tf_prev.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMUpdate(petsclib::PetscLibType,B::PetscMat, X::PetscVec, F::PetscVec) \nAdds (X\n\nInput Parameters:\n- `B` - A `MATLMVM` matrix\n- `X` - Solution vector\n- `F` - Function vector\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMReset()`, `MatLMVMAllocate()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMUpdate\"))\n\"\"\"\nfunction MatLMVMUpdate(petsclib::PetscLibType, B::PetscMat, X::PetscVec, F::PetscVec) end\n\n@for_petsc function MatLMVMUpdate(petsclib::$UnionPetscLib, B::PetscMat, X::PetscVec, F::PetscVec )\n\n    @chk ccall(\n               (:MatLMVMUpdate, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               B, X, F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMClearJ0(petsclib::PetscLibType,B::PetscMat) \nRemoves all definitions of J0 and reverts to\nan identity matrix (scale = 1.0).\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMClearJ0\"))\n\"\"\"\nfunction MatLMVMClearJ0(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMClearJ0(petsclib::$UnionPetscLib, B::PetscMat )\n\n    @chk ccall(\n               (:MatLMVMClearJ0, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSetJ0Scale(petsclib::PetscLibType,B::PetscMat, scale::PetscReal) \nAllows the user to define a scalar value\nmu such that J0 = mu*I.\n\nInput Parameters:\n- `B`     - A `MATLMVM` matrix\n- `scale` - Scalar value mu that defines the initial Jacobian\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetDiagScale()`, `MatLMVMSetJ0()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSetJ0Scale\"))\n\"\"\"\nfunction MatLMVMSetJ0Scale(petsclib::PetscLibType, B::PetscMat, scale::PetscReal) end\n\n@for_petsc function MatLMVMSetJ0Scale(petsclib::$UnionPetscLib, B::PetscMat, scale::$PetscReal )\n\n    @chk ccall(\n               (:MatLMVMSetJ0Scale, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               B, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSetJ0Diag(petsclib::PetscLibType,B::PetscMat, V::PetscVec) \nAllows the user to define a vector\nV such that J0 = diag(V).\n\nInput Parameters:\n- `B` - An LMVM-type matrix\n- `V` - Vector that defines the diagonal of the initial Jacobian: values are copied, V is not referenced\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetScale()`, `MatLMVMSetJ0()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSetJ0Diag\"))\n\"\"\"\nfunction MatLMVMSetJ0Diag(petsclib::PetscLibType, B::PetscMat, V::PetscVec) end\n\n@for_petsc function MatLMVMSetJ0Diag(petsclib::$UnionPetscLib, B::PetscMat, V::PetscVec )\n\n    @chk ccall(\n               (:MatLMVMSetJ0Diag, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec),\n               B, V,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSetJ0(petsclib::PetscLibType,B::PetscMat, J0::PetscMat) \nAllows the user to define the initial Jacobian matrix from which the LMVM\nup.\n\nInput Parameters:\n- `B`  - An LMVM-type matrix\n- `J0` - The initial Jacobian matrix, will be referenced by B.\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0PC()`, `MatLMVMSetJ0KSP()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSetJ0\"))\n\"\"\"\nfunction MatLMVMSetJ0(petsclib::PetscLibType, B::PetscMat, J0::PetscMat) end\n\n@for_petsc function MatLMVMSetJ0(petsclib::$UnionPetscLib, B::PetscMat, J0::PetscMat )\n\n    @chk ccall(\n               (:MatLMVMSetJ0, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat),\n               B, J0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSetJ0PC(petsclib::PetscLibType,B::PetscMat, J0pc::PC) \nAllows the user to define a `PC` object that acts as the initial inverse\n\nInput Parameters:\n- `B`    - A `MATLMVM` matrix\n- `J0pc` - `PC` object where `PCApply()` defines an inverse application for J0\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMGetJ0PC()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSetJ0PC\"))\n\"\"\"\nfunction MatLMVMSetJ0PC(petsclib::PetscLibType, B::PetscMat, J0pc::PC) end\n\n@for_petsc function MatLMVMSetJ0PC(petsclib::$UnionPetscLib, B::PetscMat, J0pc::PC )\n\n    @chk ccall(\n               (:MatLMVMSetJ0PC, $petsc_library),\n               PetscErrorCode,\n               (CMat, PC),\n               B, J0pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSetJ0KSP(petsclib::PetscLibType,B::PetscMat, J0ksp::PetscKSP) \nAllows the user to provide a pre\napproximation.\n\nInput Parameters:\n- `B`     - A `MATLMVM` matrix\n- `J0ksp` - `KSP` solver for the initial inverse-Jacobian application\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMGetJ0KSP()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSetJ0KSP\"))\n\"\"\"\nfunction MatLMVMSetJ0KSP(petsclib::PetscLibType, B::PetscMat, J0ksp::PetscKSP) end\n\n@for_petsc function MatLMVMSetJ0KSP(petsclib::$UnionPetscLib, B::PetscMat, J0ksp::PetscKSP )\n\n    @chk ccall(\n               (:MatLMVMSetJ0KSP, $petsc_library),\n               PetscErrorCode,\n               (CMat, CKSP),\n               B, J0ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMGetJ0(petsclib::PetscLibType,B::PetscMat, J0::PetscMat) \nReturns a pointer to the internal `J0` matrix.\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nOutput Parameter:\n- `J0` - `Mat` object for defining the initial Jacobian\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetJ0\"))\n\"\"\"\nfunction MatLMVMGetJ0(petsclib::PetscLibType, B::PetscMat, J0::PetscMat) end\n\n@for_petsc function MatLMVMGetJ0(petsclib::$UnionPetscLib, B::PetscMat, J0::PetscMat )\n\tJ0_ = Ref(J0.ptr)\n\n    @chk ccall(\n               (:MatLMVMGetJ0, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               B, J0_,\n              )\n\n\tJ0.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMGetJ0PC(petsclib::PetscLibType,B::PetscMat, J0pc::PC) \nReturns a pointer to the internal `PC` object\nassociated with the initial Jacobian.\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nOutput Parameter:\n- `J0pc` - `PC` object for defining the initial inverse-Jacobian\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0PC()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetJ0PC\"))\n\"\"\"\nfunction MatLMVMGetJ0PC(petsclib::PetscLibType, B::PetscMat, J0pc::PC) end\n\n@for_petsc function MatLMVMGetJ0PC(petsclib::$UnionPetscLib, B::PetscMat, J0pc::PC )\n\n    @chk ccall(\n               (:MatLMVMGetJ0PC, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PC}),\n               B, J0pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMGetJ0KSP(petsclib::PetscLibType,B::PetscMat, J0ksp::PetscKSP) \nReturns a pointer to the internal `KSP` solver\nassociated with the initial Jacobian.\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nOutput Parameter:\n- `J0ksp` - `KSP` solver for defining the initial inverse-Jacobian\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0KSP()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetJ0KSP\"))\n\"\"\"\nfunction MatLMVMGetJ0KSP(petsclib::PetscLibType, B::PetscMat, J0ksp::PetscKSP) end\n\n@for_petsc function MatLMVMGetJ0KSP(petsclib::$UnionPetscLib, B::PetscMat, J0ksp::PetscKSP )\n\tJ0ksp_ = Ref(J0ksp.ptr)\n\n    @chk ccall(\n               (:MatLMVMGetJ0KSP, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CKSP}),\n               B, J0ksp_,\n              )\n\n\tJ0ksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMApplyJ0Fwd(petsclib::PetscLibType,B::PetscMat, X::PetscVec, Y::PetscVec) \nApplies an approximation of the forward\nmatrix-vector product with the initial Jacobian.\n\nInput Parameters:\n- `B` - A `MATLMVM` matrix\n- `X` - vector to multiply with J0\n\nOutput Parameter:\n- `Y` - resulting vector for the operation\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0()`, `MatLMVMSetJ0Scale()`, `MatLMVMSetJ0ScaleDiag()`,\n`MatLMVMSetJ0PC()`, `MatLMVMSetJ0KSP()`, `MatLMVMApplyJ0Inv()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMApplyJ0Fwd\"))\n\"\"\"\nfunction MatLMVMApplyJ0Fwd(petsclib::PetscLibType, B::PetscMat, X::PetscVec, Y::PetscVec) end\n\n@for_petsc function MatLMVMApplyJ0Fwd(petsclib::$UnionPetscLib, B::PetscMat, X::PetscVec, Y::PetscVec )\n\n    @chk ccall(\n               (:MatLMVMApplyJ0Fwd, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               B, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMApplyJ0Inv(petsclib::PetscLibType,B::PetscMat, X::PetscVec, Y::PetscVec) \nApplies some estimation of the initial Jacobian\ninverse to the given vector.\n\nInput Parameters:\n- `B` - A `MATLMVM` matrix\n- `X` - vector to \"multiply\" with J0^{-1}\n\nOutput Parameter:\n- `Y` - resulting vector for the operation\n\nLevel: advanced\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0()`, `MatLMVMSetJ0Scale()`, `MatLMVMSetJ0ScaleDiag()`,\n`MatLMVMSetJ0PC()`, `MatLMVMSetJ0KSP()`, `MatLMVMApplyJ0Fwd()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMApplyJ0Inv\"))\n\"\"\"\nfunction MatLMVMApplyJ0Inv(petsclib::PetscLibType, B::PetscMat, X::PetscVec, Y::PetscVec) end\n\n@for_petsc function MatLMVMApplyJ0Inv(petsclib::$UnionPetscLib, B::PetscMat, X::PetscVec, Y::PetscVec )\n\n    @chk ccall(\n               (:MatLMVMApplyJ0Inv, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               B, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = MatLMVMIsAllocated(petsclib::PetscLibType,B::PetscMat) \nReturns a boolean flag that shows whether\nthe necessary data structures for the underlying matrix is allocated.\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if allocated, `PETSC_FALSE` otherwise\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMAllocate()`, `MatLMVMReset()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMIsAllocated\"))\n\"\"\"\nfunction MatLMVMIsAllocated(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMIsAllocated(petsclib::$UnionPetscLib, B::PetscMat )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatLMVMIsAllocated, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               B, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tMatLMVMAllocate(petsclib::PetscLibType,B::PetscMat, X::PetscVec, F::PetscVec) \nProduces all necessary common memory for\nLMVM approximations based on the solution and function vectors\nprovided.\n\nInput Parameters:\n- `B` - A `MATLMVM` matrix\n- `X` - Solution vector\n- `F` - Function vector\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMReset()`, `MatLMVMUpdate()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMAllocate\"))\n\"\"\"\nfunction MatLMVMAllocate(petsclib::PetscLibType, B::PetscMat, X::PetscVec, F::PetscVec) end\n\n@for_petsc function MatLMVMAllocate(petsclib::$UnionPetscLib, B::PetscMat, X::PetscVec, F::PetscVec )\n\n    @chk ccall(\n               (:MatLMVMAllocate, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               B, X, F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMResetShift(petsclib::PetscLibType,B::PetscMat) \nZero the shift factor for a `MATLMVM`.\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMAllocate()`, `MatLMVMUpdate()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMResetShift\"))\n\"\"\"\nfunction MatLMVMResetShift(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMResetShift(petsclib::$UnionPetscLib, B::PetscMat )\n\n    @chk ccall(\n               (:MatLMVMResetShift, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMReset(petsclib::PetscLibType,B::PetscMat, destructive::PetscBool) \nFlushes all of the accumulated updates out of\nthe `MATLMVM` approximation.\n\nInput Parameters:\n- `B`           - A `MATLMVM` matrix\n- `destructive` - flag for enabling destruction of data structures\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMAllocate()`, `MatLMVMUpdate()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMReset\"))\n\"\"\"\nfunction MatLMVMReset(petsclib::PetscLibType, B::PetscMat, destructive::PetscBool) end\n\n@for_petsc function MatLMVMReset(petsclib::$UnionPetscLib, B::PetscMat, destructive::PetscBool )\n\n    @chk ccall(\n               (:MatLMVMReset, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               B, destructive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSetHistorySize(petsclib::PetscLibType,B::PetscMat, hist_size::PetscInt) \nSet the number of past iterates to be\nstored for the construction of the limited-memory quasi-Newton update.\n\nInput Parameters:\n- `B`         - A `MATLMVM` matrix\n- `hist_size` - number of past iterates (default 5)\n\nOptions Database Key:\n- `-mat_lmvm_hist_size <m>` - set number of past iterates\n\nLevel: beginner\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMGetUpdateCount()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSetHistorySize\"))\n\"\"\"\nfunction MatLMVMSetHistorySize(petsclib::PetscLibType, B::PetscMat, hist_size::PetscInt) end\n\n@for_petsc function MatLMVMSetHistorySize(petsclib::$UnionPetscLib, B::PetscMat, hist_size::$PetscInt )\n\n    @chk ccall(\n               (:MatLMVMSetHistorySize, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               B, hist_size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thist_size::PetscInt = MatLMVMGetHistorySize(petsclib::PetscLibType,B::PetscMat) \n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetHistorySize\"))\n\"\"\"\nfunction MatLMVMGetHistorySize(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMGetHistorySize(petsclib::$UnionPetscLib, B::PetscMat )\n\thist_size_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatLMVMGetHistorySize, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               B, hist_size_,\n              )\n\n\thist_size = hist_size_[]\n\n\treturn hist_size\nend \n\n\"\"\"\n\tnupdates::PetscInt = MatLMVMGetUpdateCount(petsclib::PetscLibType,B::PetscMat) \nReturns the number of accepted updates.\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nOutput Parameter:\n- `nupdates` - number of accepted updates\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMGetRejectCount()`, `MatLMVMReset()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetUpdateCount\"))\n\"\"\"\nfunction MatLMVMGetUpdateCount(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMGetUpdateCount(petsclib::$UnionPetscLib, B::PetscMat )\n\tnupdates_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatLMVMGetUpdateCount, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               B, nupdates_,\n              )\n\n\tnupdates = nupdates_[]\n\n\treturn nupdates\nend \n\n\"\"\"\n\tnrejects::PetscInt = MatLMVMGetRejectCount(petsclib::PetscLibType,B::PetscMat) \nReturns the number of rejected updates.\nThe counters are reset when `MatLMVMReset()` is called.\n\nInput Parameter:\n- `B` - A `MATLMVM` matrix\n\nOutput Parameter:\n- `nrejects` - number of rejected updates\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMReset()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMGetRejectCount\"))\n\"\"\"\nfunction MatLMVMGetRejectCount(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMGetRejectCount(petsclib::$UnionPetscLib, B::PetscMat )\n\tnrejects_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatLMVMGetRejectCount, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscInt}),\n               B, nrejects_,\n              )\n\n\tnrejects = nrejects_[]\n\n\treturn nrejects\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMDiagBroyden(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nDiagBrdn creates a symmetric Broyden\nfor approximating Hessians.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_theta`      - (developer) convex ratio between BFGS and DFP components of the diagonal J0 scaling\n- `-mat_lmvm_rho`        - (developer) update limiter for the J0 scaling\n- `-mat_lmvm_alpha`      - (developer) coefficient factor for the quadratic subproblem in J0 scaling\n- `-mat_lmvm_beta`       - (developer) exponential factor for the diagonal J0 scaling\n- `-mat_lmvm_sigma_hist` - (developer) number of past updates to use in J0 scaling.\n- `-mat_lmvm_tol`        - (developer) tolerance for bounding the denominator of the rescaling away from 0.\n- `-mat_lmvm_forward`    - (developer) whether or not to use the forward or backward Broyden update to the diagonal\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreate()`, `MATLMVM`, `MATLMVMDIAGBRDN`, `MatCreateLMVMDFP()`, `MatCreateLMVMSR1()`,\n`MatCreateLMVMBFGS()`, `MatCreateLMVMBroyden()`, `MatCreateLMVMSymBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMDiagBroyden\"))\n\"\"\"\nfunction MatCreateLMVMDiagBroyden(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMDiagBroyden(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMDiagBroyden, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMBadBroyden(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a limited\napproximation matrix used for a Jacobian. L-BadBrdn is not guaranteed to be\nsymmetric or positive-definite.\n\nTo use the L-BadBrdn matrix with other vector types, the matrix must be\ncreated using `MatCreate()` and `MatSetType()`, followed by `MatLMVMAllocate()`.\nThis ensures that the internal storage and work vectors are duplicated from the\ncorrect type of vector.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_hist_size`         - the number of history vectors to keep\n- `-mat_lmvm_mult_algorithm`    - the algorithm to use for multiplication (recursive, dense, compact_dense)\n- `-mat_lmvm_cache_J0_products` - whether products between the base Jacobian J0 and history vectors should be cached or recomputed\n- `-mat_lmvm_debug`             - (developer) perform internal debugging checks\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreate()`, `MATLMVM`, `MATLMVMBADBRDN`, `MatCreateLMVMDFP()`, `MatCreateLMVMSR1()`,\n`MatCreateLMVMBFGS()`, `MatCreateLMVMBroyden()`, `MatCreateLMVMSymBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMBadBroyden\"))\n\"\"\"\nfunction MatCreateLMVMBadBroyden(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMBadBroyden(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMBadBroyden, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMBroyden(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a limited\nmatrix used for a Jacobian. L-Brdn is not guaranteed to be symmetric or\npositive-definite.\n\nTo use the L-Brdn matrix with other vector types, the matrix must be\ncreated using `MatCreate()` and `MatSetType()`, followed by `MatLMVMAllocate()`.\nThis ensures that the internal storage and work vectors are duplicated from the\ncorrect type of vector.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_hist_size`         - the number of history vectors to keep\n- `-mat_lmvm_mult_algorithm`    - the algorithm to use for multiplication (recursive, dense, compact_dense)\n- `-mat_lmvm_cache_J0_products` - whether products between the base Jacobian J0 and history vectors should be cached or recomputed\n- `-mat_lmvm_debug`             - (developer) perform internal debugging checks\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreate()`, `MATLMVM`, `MATLMVMBRDN`, `MatCreateLMVMDFP()`, `MatCreateLMVMSR1()`,\n`MatCreateLMVMBFGS()`, `MatCreateLMVMBadBroyden()`, `MatCreateLMVMSymBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMBroyden\"))\n\"\"\"\nfunction MatCreateLMVMBroyden(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMBroyden(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMBroyden, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMDQN(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a dense representation of the limited\nQuasi-Newton approximation to a Hessian.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nLevel: advanced\n\n-seealso: `MatCreate()`, `MATLMVM`, `MATLMVMDBFGS`, `MATLMVMDDFP`, `MatCreateLMVMDDFP()`, `MatCreateLMVMDBFGS()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMDQN\"))\n\"\"\"\nfunction MatCreateLMVMDQN(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMDQN(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMDQN, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMDBFGS(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a dense representation of the limited\nBroyden-Fletcher-Goldfarb-Shanno (BFGS) approximation to a Hessian.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nLevel: advanced\n\n-seealso: `MatCreate()`, `MATLMVM`, `MATLMVMDBFGS`, `MatCreateLMVMBFGS()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMDBFGS\"))\n\"\"\"\nfunction MatCreateLMVMDBFGS(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMDBFGS(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMDBFGS, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMDDFP(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a dense representation of the limited\nDavidon-Fletcher-Powell (DFP) approximation to a Hessian.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nLevel: advanced\n\n-seealso: `MatCreate()`, `MATLMVM`, `MATLMVMDDFP`, `MatCreateLMVMDFP()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMDDFP\"))\n\"\"\"\nfunction MatCreateLMVMDDFP(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMDDFP(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMDDFP, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tMatLMVMDenseSetType(petsclib::PetscLibType,B::PetscMat, type::MatLMVMDenseType) \nSets the memory storage type for dense `MATLMVM`\n\nInput Parameters:\n- `B`    - the `MATLMVM` matrix\n- `type` - scale type, see `MatLMVMDenseSetType`\n\nOptions Database Keys:\n- `-mat_lqn_type   <reorder,inplace>` - set the strategy\n- `-mat_lbfgs_type <reorder,inplace>` - set the strategy\n- `-mat_ldfp_type  <reorder,inplace>` - set the strategy\n\nLevel: intermediate\n\nMatLMVMDenseTypes:\n- `MAT_LMVM_DENSE_REORDER`   - reorders memory to minimize kernel launch\n- `MAT_LMVM_DENSE_INPLACE`   - launches kernel inplace to minimize memory movement\n\n-seealso: [](ch_ksp), `MATLMVMDQN`, `MATLMVMDBFGS`, `MATLMVMDDFP`, `MatLMVMDenseType`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMDenseSetType\"))\n\"\"\"\nfunction MatLMVMDenseSetType(petsclib::PetscLibType, B::PetscMat, type::MatLMVMDenseType) end\n\n@for_petsc function MatLMVMDenseSetType(petsclib::$UnionPetscLib, B::PetscMat, type::MatLMVMDenseType )\n\n    @chk ccall(\n               (:MatLMVMDenseSetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatLMVMDenseType),\n               B, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMSR1(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a limited\nmatrix used for a Jacobian. L-SR1 is symmetric by construction, but is not\nguaranteed to be positive-definite.\n\nTo use the L-SR1 matrix with other vector types, the matrix must be\ncreated using `MatCreate()` and `MatSetType()`, followed by `MatLMVMAllocate()`.\nThis ensures that the internal storage and work vectors are duplicated from the\ncorrect type of vector.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_hist_size`         - the number of history vectors to keep\n- `-mat_lmvm_mult_algorithm`    - the algorithm to use for multiplication (recursive, dense, compact_dense)\n- `-mat_lmvm_cache_J0_products` - whether products between the base Jacobian J0 and history vectors should be cached or recomputed\n- `-mat_lmvm_eps`               - (developer) numerical zero tolerance for testing when an update should be skipped\n- `-mat_lmvm_debug`             - (developer) perform internal debugging checks\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreate()`, `MATLMVM`, `MATLMVMSR1`, `MatCreateLMVMBFGS()`, `MatCreateLMVMDFP()`,\n`MatCreateLMVMBroyden()`, `MatCreateLMVMBadBroyden()`, `MatCreateLMVMSymBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMSR1\"))\n\"\"\"\nfunction MatCreateLMVMSR1(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMSR1(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMSR1, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMBFGS(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a limited\nmatrix used for approximating Jacobians. L-BFGS is symmetric positive-definite by\nconstruction, and is commonly used to approximate Hessians in optimization\nproblems.\n\nTo use the L-BFGS matrix with other vector types, the matrix must be\ncreated using `MatCreate()` and `MatSetType()`, followed by `MatLMVMAllocate()`.\nThis ensures that the internal storage and work vectors are duplicated from the\ncorrect type of vector.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_scale_type` - (developer) type of scaling applied to J0 (none, scalar, diagonal)\n- `-mat_lmvm_theta`      - (developer) convex ratio between BFGS and DFP components of the diagonal J0 scaling\n- `-mat_lmvm_rho`        - (developer) update limiter for the J0 scaling\n- `-mat_lmvm_alpha`      - (developer) coefficient factor for the quadratic subproblem in J0 scaling\n- `-mat_lmvm_beta`       - (developer) exponential factor for the diagonal J0 scaling\n- `-mat_lmvm_sigma_hist` - (developer) number of past updates to use in J0 scaling\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreate()`, `MATLMVM`, `MATLMVMBFGS`, `MatCreateLMVMDFP()`, `MatCreateLMVMSR1()`,\n`MatCreateLMVMBroyden()`, `MatCreateLMVMBadBroyden()`, `MatCreateLMVMSymBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMBFGS\"))\n\"\"\"\nfunction MatCreateLMVMBFGS(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMBFGS(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMBFGS, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tphi::PetscReal = MatLMVMSymBroydenGetPhi(petsclib::PetscLibType,B::PetscMat) \nGet the phi parameter for a Broyden class quasi\n\nInput Parameter:\n- `B` - The matrix\n\nOutput Parameter:\n- `phi` - a number defining an update that is an affine combination of the BFGS update (phi = 0) and DFP update (phi = 1)\n\nLevel: advanced\n\n-seealso: [](ch_ksp),\n`MATLMVMSYMBROYDEN`, `MATLMVMSYMBADBROYDEN`,\n`MATLMVMDFP`, `MATLMVMBFGS`,\n`MatLMVMSymBroydenSetPhi()`,\n`MatLMVMSymBadBroydenGetPsi()`, `MatLMVMSymBadBroydenSetPsi()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSymBroydenGetPhi\"))\n\"\"\"\nfunction MatLMVMSymBroydenGetPhi(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMSymBroydenGetPhi(petsclib::$UnionPetscLib, B::PetscMat )\n\tphi_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatLMVMSymBroydenGetPhi, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               B, phi_,\n              )\n\n\tphi = phi_[]\n\n\treturn phi\nend \n\n\"\"\"\n\tMatLMVMSymBroydenSetPhi(petsclib::PetscLibType,B::PetscMat, phi::PetscReal) \nGet the phi parameter for a Broyden class quasi\n\nInput Parameters:\n- `B`   - The matrix\n- `phi` - a number defining an update that is a convex combination of the BFGS update (phi = 0) and DFP update (phi = 1)\n\nLevel: advanced\n\n-seealso: [](ch_ksp),\n`MATLMVMSYMBROYDEN`, `MATLMVMSYMBADBROYDEN`,\n`MATLMVMDFP`, `MATLMVMBFGS`,\n`MatLMVMSymBroydenGetPhi()`,\n`MatLMVMSymBadBroydenGetPsi()`, `MatLMVMSymBadBroydenSetPsi()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSymBroydenSetPhi\"))\n\"\"\"\nfunction MatLMVMSymBroydenSetPhi(petsclib::PetscLibType, B::PetscMat, phi::PetscReal) end\n\n@for_petsc function MatLMVMSymBroydenSetPhi(petsclib::$UnionPetscLib, B::PetscMat, phi::$PetscReal )\n\n    @chk ccall(\n               (:MatLMVMSymBroydenSetPhi, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               B, phi,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpsi::PetscReal = MatLMVMSymBadBroydenGetPsi(petsclib::PetscLibType,B::PetscMat) \nGet the psi parameter for a Broyden class quasi\n\nInput Parameter:\n- `B` - The matrix\n\nOutput Parameter:\n- `psi` - a number defining an update that is an affine combination of the BFGS update (psi = 1) and DFP update (psi = 0)\n\nLevel: advanced\n\n-seealso: [](ch_ksp),\n`MATLMVMSYMBROYDEN`, `MATLMVMSYMBADBROYDEN`,\n`MATLMVMDFP`, `MATLMVMBFGS`,\n`MatLMVMSymBadBroydenSetPsi()`,\n`MatLMVMSymBroydenGetPhi()`, `MatLMVMSymBroydenSetPhi()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSymBadBroydenGetPsi\"))\n\"\"\"\nfunction MatLMVMSymBadBroydenGetPsi(petsclib::PetscLibType, B::PetscMat) end\n\n@for_petsc function MatLMVMSymBadBroydenGetPsi(petsclib::$UnionPetscLib, B::PetscMat )\n\tpsi_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatLMVMSymBadBroydenGetPsi, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscReal}),\n               B, psi_,\n              )\n\n\tpsi = psi_[]\n\n\treturn psi\nend \n\n\"\"\"\n\tMatLMVMSymBadBroydenSetPsi(petsclib::PetscLibType,B::PetscMat, psi::PetscReal) \nGet the psi parameter for a Broyden class quasi\n\nInput Parameters:\n- `B`   - The matrix\n- `psi` - a number defining an update that is a convex combination of the BFGS update (psi = 1) and DFP update (psi = 0)\n\nLevel: developer\n\n-seealso: [](ch_ksp),\n`MATLMVMSYMBROYDEN`, `MATLMVMSYMBADBROYDEN`,\n`MATLMVMDFP`, `MATLMVMBFGS`,\n`MatLMVMSymBadBroydenGetPsi()`,\n`MatLMVMSymBroydenGetPhi()`, `MatLMVMSymBroydenSetPhi()`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSymBadBroydenSetPsi\"))\n\"\"\"\nfunction MatLMVMSymBadBroydenSetPsi(petsclib::PetscLibType, B::PetscMat, psi::PetscReal) end\n\n@for_petsc function MatLMVMSymBadBroydenSetPsi(petsclib::$UnionPetscLib, B::PetscMat, psi::$PetscReal )\n\n    @chk ccall(\n               (:MatLMVMSymBadBroydenSetPsi, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               B, psi,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSymBroydenSetDelta(petsclib::PetscLibType,B::PetscMat, delta::PetscScalar) \nSets the starting value for the diagonal scaling vector computed\nin the SymBrdn approximations (also works for BFGS and DFP).\n\nInput Parameters:\n- `B`     - `MATLMVM` matrix\n- `delta` - initial value for diagonal scaling\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MATLMVMSYMBROYDEN`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSymBroydenSetDelta\"))\n\"\"\"\nfunction MatLMVMSymBroydenSetDelta(petsclib::PetscLibType, B::PetscMat, delta::PetscScalar) end\n\n@for_petsc function MatLMVMSymBroydenSetDelta(petsclib::$UnionPetscLib, B::PetscMat, delta::$PetscScalar )\n\n    @chk ccall(\n               (:MatLMVMSymBroydenSetDelta, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscScalar),\n               B, delta,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatLMVMSymBroydenSetScaleType(petsclib::PetscLibType,B::PetscMat, stype::MatLMVMSymBroydenScaleType) \nSets the scale type for symmetric Broyden\n\nInput Parameters:\n- `B`     - the `MATLMVM` matrix\n- `stype` - scale type, see `MatLMVMSymBroydenScaleType`\n\nOptions Database Key:\n- `-mat_lmvm_scale_type <none,scalar,diagonal>` - set the scaling type\n\nLevel: intermediate\n\nMatLMVMSymBrdnScaleTypes:\n- `MAT_LMVM_SYMBROYDEN_SCALE_NONE`       - use whatever initial Hessian is already there (will be the identity if the user does nothing)\n- `MAT_LMVM_SYMBROYDEN_SCALE_SCALAR`     - use the Shanno scalar as the initial Hessian\n- `MAT_LMVM_SYMBROYDEN_SCALE_DIAGONAL`   - use a diagonalized BFGS update as the initial Hessian\n- `MAT_LMVM_SYMBROYDEN_SCALE_USER`       - same as `MAT_LMVM_SYMBROYDEN_NONE`\n- `MAT_LMVM_SYMBROYDEN_SCALE_DECIDE`     - let PETSc decide\n\n-seealso: [](ch_ksp), `MATLMVMSYMBROYDEN`, `MatCreateLMVMSymBroyden()`, `MatLMVMSymBroydenScaleType`\n\n# External Links\n$(_doc_external(\"Ksp/MatLMVMSymBroydenSetScaleType\"))\n\"\"\"\nfunction MatLMVMSymBroydenSetScaleType(petsclib::PetscLibType, B::PetscMat, stype::MatLMVMSymBroydenScaleType) end\n\n@for_petsc function MatLMVMSymBroydenSetScaleType(petsclib::$UnionPetscLib, B::PetscMat, stype::MatLMVMSymBroydenScaleType )\n\n    @chk ccall(\n               (:MatLMVMSymBroydenSetScaleType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatLMVMSymBroydenScaleType),\n               B, stype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMSymBroyden(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a limited\nfor approximating Jacobians.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator, set to `PETSC_COMM_SELF`\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_hist_size`         - the number of history vectors to keep\n- `-mat_lmvm_phi`               - convex ratio between BFGS and DFP components of the update\n- `-mat_lmvm_scale_type`        - type of scaling applied to J0 (none, scalar, diagonal)\n- `-mat_lmvm_mult_algorithm`    - the algorithm to use for multiplication (recursive, dense, compact_dense)\n- `-mat_lmvm_cache_J0_products` - whether products between the base Jacobian J0 and history vectors should be cached or recomputed\n- `-mat_lmvm_eps`               - (developer) numerical zero tolerance for testing when an update should be skipped\n- `-mat_lmvm_debug`             - (developer) perform internal debugging checks\n- `-mat_lmvm_theta`             - (developer) convex ratio between BFGS and DFP components of the diagonal J0 scaling\n- `-mat_lmvm_rho`               - (developer) update limiter for the J0 scaling\n- `-mat_lmvm_alpha`             - (developer) coefficient factor for the quadratic subproblem in J0 scaling\n- `-mat_lmvm_beta`              - (developer) exponential factor for the diagonal J0 scaling\n- `-mat_lmvm_sigma_hist`        - (developer) number of past updates to use in J0 scaling\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreate()`, `MATLMVM`, `MATLMVMSYMBROYDEN`, `MatCreateLMVMDFP()`, `MatCreateLMVMSR1()`,\n`MatCreateLMVMBFGS()`, `MatCreateLMVMBroyden()`, `MatCreateLMVMBadBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMSymBroyden\"))\n\"\"\"\nfunction MatCreateLMVMSymBroyden(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMSymBroyden(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMSymBroyden, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMSymBadBroyden(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a limited\nfor approximating Jacobians.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_hist_size`         - the number of history vectors to keep\n- `-mat_lmvm_psi`               - convex ratio between BFGS and DFP components of the update\n- `-mat_lmvm_scale_type`        - type of scaling applied to J0 (none, scalar, diagonal)\n- `-mat_lmvm_mult_algorithm`    - the algorithm to use for multiplication (recursive, dense, compact_dense)\n- `-mat_lmvm_cache_J0_products` - whether products between the base Jacobian J0 and history vectors should be cached or recomputed\n- `-mat_lmvm_eps`               - (developer) numerical zero tolerance for testing when an update should be skipped\n- `-mat_lmvm_debug`             - (developer) perform internal debugging checks\n- `-mat_lmvm_theta`             - (developer) convex ratio between BFGS and DFP components of the diagonal J0 scaling\n- `-mat_lmvm_rho`               - (developer) update limiter for the J0 scaling\n- `-mat_lmvm_alpha`             - (developer) coefficient factor for the quadratic subproblem in J0 scaling\n- `-mat_lmvm_beta`              - (developer) exponential factor for the diagonal J0 scaling\n- `-mat_lmvm_sigma_hist`        - (developer) number of past updates to use in J0 scaling\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MatCreate()`, `MATLMVM`, `MATLMVMSYMBROYDEN`, `MatCreateLMVMDFP()`, `MatCreateLMVMSR1()`,\n`MatCreateLMVMBFGS()`, `MatCreateLMVMBroyden()`, `MatCreateLMVMBadBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMSymBadBroyden\"))\n\"\"\"\nfunction MatCreateLMVMSymBadBroyden(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMSymBadBroyden(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMSymBadBroyden, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tB::PetscMat = MatCreateLMVMDFP(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a limited\nused for approximating Jacobians. L-DFP is symmetric positive-definite by\nconstruction, and is the dual of L-BFGS where Y and S vectors swap roles.\n\nTo use the L-DFP matrix with other vector types, the matrix must be\ncreated using `MatCreate()` and `MatSetType()`, followed by `MatLMVMAllocate()`.\nThis ensures that the internal storage and work vectors are duplicated from the\ncorrect type of vector.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `n`    - number of local rows for storage vectors\n- `N`    - global size of the storage vectors\n\nOutput Parameter:\n- `B` - the matrix\n\nOptions Database Keys:\n- `-mat_lmvm_scale_type` - (developer) type of scaling applied to J0 (none, scalar, diagonal)\n- `-mat_lmvm_theta`      - (developer) convex ratio between BFGS and DFP components of the diagonal J0 scaling\n- `-mat_lmvm_rho`        - (developer) update limiter for the J0 scaling\n- `-mat_lmvm_alpha`      - (developer) coefficient factor for the quadratic subproblem in J0 scaling\n- `-mat_lmvm_beta`       - (developer) exponential factor for the diagonal J0 scaling\n- `-mat_lmvm_sigma_hist` - (developer) number of past updates to use in J0 scaling\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreate()`, `MATLMVM`, `MATLMVMDFP`, `MatCreateLMVMBFGS()`, `MatCreateLMVMSR1()`,\n`MatCreateLMVMBroyden()`, `MatCreateLMVMBadBroyden()`, `MatCreateLMVMSymBroyden()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateLMVMDFP\"))\n\"\"\"\nfunction MatCreateLMVMDFP(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function MatCreateLMVMDFP(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tB_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateLMVMDFP, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CMat}),\n               comm, n, N, B_,\n              )\n\n\tB = PetscMat(B_[], petsclib)\n\n\treturn B\nend \n\n\"\"\"\n\tS::PetscMat = MatCreateSchurComplement(petsclib::PetscLibType,A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) \nCreates a new `Mat` that behaves like the Schur complement of a matrix\n\nCollective\n\nInput Parameters:\n- `A00`  - the upper-left block of the original matrix A = [A00 A01; A10 A11]\n- `Ap00` - matrix from which the preconditioner is constructed for use in ksp(A00,Ap00) to approximate the action of A00^{-1}\n- `A01`  - the upper-right block of the original matrix A = [A00 A01; A10 A11]\n- `A10`  - the lower-left block of the original matrix A = [A00 A01; A10 A11]\n- `A11`  - (optional) the lower-right block of the original matrix A = [A00 A01; A10 A11]\n\nOutput Parameter:\n- `S` - the matrix that behaves as the Schur complement S = A11 - A10 ksp(A00,Ap00) A01\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreateNormal()`, `MatMult()`, `MatCreate()`, `MatSchurComplementGetKSP()`, `MatSchurComplementUpdateSubMatrices()`, `MatCreateTranspose()`, `MatGetSchurComplement()`,\n`MatSchurComplementGetPmat()`, `MatSchurComplementSetSubMatrices()`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateSchurComplement\"))\n\"\"\"\nfunction MatCreateSchurComplement(petsclib::PetscLibType, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) end\n\n@for_petsc function MatCreateSchurComplement(petsclib::$UnionPetscLib, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat )\n\tS_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat, CMat, Ptr{CMat}),\n               A00, Ap00, A01, A10, A11, S_,\n              )\n\n\tS = PetscMat(S_[], petsclib)\n\n\treturn S\nend \n\n\"\"\"\n\tMatSchurComplementSetSubMatrices(petsclib::PetscLibType,S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) \nSets the matrices that define the Schur complement\n\nCollective\n\nInput Parameters:\n- `S`    - matrix obtained with `MatSetType`(S,`MATSCHURCOMPLEMENT`)\n- `A00`  - the upper-left block of the original matrix A = [A00 A01; A10 A11]\n- `Ap00` - matrix from which the preconditioner is constructed for use in ksp(A00,Ap00) to approximate the action of A00^{-1}\n- `A01`  - the upper-right block of the original matrix A = [A00 A01; A10 A11]\n- `A10`  - the lower-left block of the original matrix A = [A00 A01; A10 A11]\n- `A11`  - (optional) the lower-right block of the original matrix A = [A00 A01; A10 A11]\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `Mat`, `MatCreateNormal()`, `MatMult()`, `MatCreate()`, `MatSchurComplementGetKSP()`, `MatSchurComplementUpdateSubMatrices()`, `MatCreateTranspose()`, `MatCreateSchurComplement()`, `MatGetSchurComplement()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementSetSubMatrices\"))\n\"\"\"\nfunction MatSchurComplementSetSubMatrices(petsclib::PetscLibType, S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) end\n\n@for_petsc function MatSchurComplementSetSubMatrices(petsclib::$UnionPetscLib, S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat )\n\n    @chk ccall(\n               (:MatSchurComplementSetSubMatrices, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat, CMat, CMat),\n               S, A00, Ap00, A01, A10, A11,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSchurComplementGetKSP(petsclib::PetscLibType,S::PetscMat, ksp::PetscKSP) \nGets the `KSP` object that is used to solve with `A00` in the Schur complement matrix S = A11\n\nNot Collective\n\nInput Parameter:\n- `S` - matrix obtained with `MatCreateSchurComplement()` (or equivalent) and implementing the action of  A11 - A10 ksp(A00,Ap00) A01 \n\nOutput Parameter:\n- `ksp` - the linear solver object\n\nOptions Database Key:\n- `-fieldsplit_<splitname_0>_XXX` - sets `KSP` and `PC` options for the 0-split solver inside the Schur complement used in `PCFIELDSPLIT`; default <splitname_0> is 0.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `Mat`, `MatSchurComplementSetKSP()`, `MatCreateSchurComplement()`, `MatCreateNormal()`, `MatMult()`, `MatCreate()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementGetKSP\"))\n\"\"\"\nfunction MatSchurComplementGetKSP(petsclib::PetscLibType, S::PetscMat, ksp::PetscKSP) end\n\n@for_petsc function MatSchurComplementGetKSP(petsclib::$UnionPetscLib, S::PetscMat, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:MatSchurComplementGetKSP, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CKSP}),\n               S, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSchurComplementSetKSP(petsclib::PetscLibType,S::PetscMat, ksp::PetscKSP) \nSets the `KSP` object that is used to solve with `A00` in the Schur complement matrix  S = A11\n\nNot Collective\n\nInput Parameters:\n- `S`   - matrix created with `MatCreateSchurComplement()`\n- `ksp` - the linear solver object\n\nLevel: developer\n\n-seealso: [](ch_ksp), `Mat`, `MatSchurComplementGetKSP()`, `MatCreateSchurComplement()`, `MatCreateNormal()`, `MatMult()`, `MatCreate()`, `MATSCHURCOMPLEMENT`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementSetKSP\"))\n\"\"\"\nfunction MatSchurComplementSetKSP(petsclib::PetscLibType, S::PetscMat, ksp::PetscKSP) end\n\n@for_petsc function MatSchurComplementSetKSP(petsclib::$UnionPetscLib, S::PetscMat, ksp::PetscKSP )\n\n    @chk ccall(\n               (:MatSchurComplementSetKSP, $petsc_library),\n               PetscErrorCode,\n               (CMat, CKSP),\n               S, ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSchurComplementUpdateSubMatrices(petsclib::PetscLibType,S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) \nUpdates the Schur complement matrix object with new submatrices\n\nCollective\n\nInput Parameters:\n- `S`    - matrix obtained with `MatCreateSchurComplement()` (or `MatSchurSetSubMatrices()`) and implementing the action of A11 - A10 ksp(A00,Ap00) A01\n- `A00`  - the upper-left block of the original matrix A = [A00 A01; A10 A11]\n- `Ap00` - matrix from which the preconditioner is constructed for use in ksp(A00,Ap00) to approximate the action of A00^{-1}\n- `A01`  - the upper-right block of the original matrix A = [A00 A01; A10 A11]\n- `A10`  - the lower-left block of the original matrix A = [A00 A01; A10 A11]\n- `A11`  - (optional) the lower-right block of the original matrix A = [A00 A01; A10 A11]\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `Mat`, `MatCreateNormal()`, `MatMult()`, `MatCreate()`, `MatSchurComplementGetKSP()`, `MatCreateSchurComplement()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementUpdateSubMatrices\"))\n\"\"\"\nfunction MatSchurComplementUpdateSubMatrices(petsclib::PetscLibType, S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) end\n\n@for_petsc function MatSchurComplementUpdateSubMatrices(petsclib::$UnionPetscLib, S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat )\n\n    @chk ccall(\n               (:MatSchurComplementUpdateSubMatrices, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat, CMat, CMat),\n               S, A00, Ap00, A01, A10, A11,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSchurComplementGetSubMatrices(petsclib::PetscLibType,S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) \nGet the individual submatrices in the Schur complement\n\nCollective\n\nInput Parameter:\n- `S` - matrix obtained with `MatCreateSchurComplement()` (or equivalent) and implementing the action of A11 - A10 ksp(A00,Ap00) A01\n\nOutput Parameters:\n- `A00`  - the upper-left block of the original matrix A = [A00 A01; A10 A11]\n- `Ap00` - matrix from which the preconditioner is constructed for use in ksp(A00,Ap00) to approximate the action of A^{-1}\n- `A01`  - the upper-right block of the original matrix A = [A00 A01; A10 A11]\n- `A10`  - the lower-left block of the original matrix A = [A00 A01; A10 A11]\n- `A11`  - (optional) the lower-right block of the original matrix A = [A00 A01; A10 A11]\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `MatCreateNormal()`, `MatMult()`, `MatCreate()`, `MatSchurComplementGetKSP()`, `MatCreateSchurComplement()`, `MatSchurComplementUpdateSubMatrices()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementGetSubMatrices\"))\n\"\"\"\nfunction MatSchurComplementGetSubMatrices(petsclib::PetscLibType, S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) end\n\n@for_petsc function MatSchurComplementGetSubMatrices(petsclib::$UnionPetscLib, S::PetscMat, A00::PetscMat, Ap00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat )\n\tA00_ = Ref(A00.ptr)\n\tAp00_ = Ref(Ap00.ptr)\n\tA01_ = Ref(A01.ptr)\n\tA10_ = Ref(A10.ptr)\n\tA11_ = Ref(A11.ptr)\n\n    @chk ccall(\n               (:MatSchurComplementGetSubMatrices, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}, Ptr{CMat}, Ptr{CMat}, Ptr{CMat}, Ptr{CMat}),\n               S, A00_, Ap00_, A01_, A10_, A11_,\n              )\n\n\tA00.ptr = C_NULL\n\tAp00.ptr = C_NULL\n\tA01.ptr = C_NULL\n\tA10.ptr = C_NULL\n\tA11.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSchurComplementComputeExplicitOperator(petsclib::PetscLibType,A::PetscMat, S::PetscMat) \nCompute the Schur complement matrix explicitly\n\nCollective\n\nInput Parameter:\n- `A` - the matrix obtained with `MatCreateSchurComplement()`\n\nOutput Parameter:\n- `S` - the Schur complement matrix\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MatCreateSchurComplement()`, `MatSchurComplementUpdateSubMatrices()`, `MatSchurComplementGetPmat()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementComputeExplicitOperator\"))\n\"\"\"\nfunction MatSchurComplementComputeExplicitOperator(petsclib::PetscLibType, A::PetscMat, S::PetscMat) end\n\n@for_petsc function MatSchurComplementComputeExplicitOperator(petsclib::$UnionPetscLib, A::PetscMat, S::PetscMat )\n\tS_ = Ref(S.ptr)\n\n    @chk ccall(\n               (:MatSchurComplementComputeExplicitOperator, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CMat}),\n               A, S_,\n              )\n\n\tS.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatGetSchurComplement(petsclib::PetscLibType,A::PetscMat, isrow0::IS, iscol0::IS, isrow1::IS, iscol1::IS, mreuse::MatReuse, S::PetscMat, ainvtype::MatSchurComplementAinvType, preuse::MatReuse, Sp::PetscMat) \nObtain the Schur complement from eliminating part of the matrix in another part.\n\nCollective\n\nInput Parameters:\n- `A`        - matrix in which the complement is to be taken\n- `isrow0`   - rows to eliminate\n- `iscol0`   - columns to eliminate, (isrow0,iscol0) should be square and nonsingular\n- `isrow1`   - rows in which the Schur complement is formed\n- `iscol1`   - columns in which the Schur complement is formed\n- `mreuse`   - `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`, use `MAT_IGNORE_MATRIX` to put nothing in `S`\n- `ainvtype` - the type of approximation used for the inverse of the (0,0) block used in forming `Sp`:\n`MAT_SCHUR_COMPLEMENT_AINV_DIAG`, `MAT_SCHUR_COMPLEMENT_AINV_LUMP`, `MAT_SCHUR_COMPLEMENT_AINV_BLOCK_DIAG`, or `MAT_SCHUR_COMPLEMENT_AINV_FULL`\n- `preuse`   - `MAT_INITIAL_MATRIX` or `MAT_REUSE_MATRIX`, use `MAT_IGNORE_MATRIX` to put nothing in `Sp`\n\nOutput Parameters:\n- `S`  - exact Schur complement, often of type `MATSCHURCOMPLEMENT` which is difficult to use for preconditioning\n- `Sp` - approximate Schur complement from which a preconditioner can be built A11 - A10 inv(DIAGFORM(A00)) A01\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MatCreateSubMatrix()`, `PCFIELDSPLIT`, `MatCreateSchurComplement()`, `MatSchurComplementAinvType`\n\n# External Links\n$(_doc_external(\"Ksp/MatGetSchurComplement\"))\n\"\"\"\nfunction MatGetSchurComplement(petsclib::PetscLibType, A::PetscMat, isrow0::IS, iscol0::IS, isrow1::IS, iscol1::IS, mreuse::MatReuse, S::PetscMat, ainvtype::MatSchurComplementAinvType, preuse::MatReuse, Sp::PetscMat) end\n\n@for_petsc function MatGetSchurComplement(petsclib::$UnionPetscLib, A::PetscMat, isrow0::IS, iscol0::IS, isrow1::IS, iscol1::IS, mreuse::MatReuse, S::PetscMat, ainvtype::MatSchurComplementAinvType, preuse::MatReuse, Sp::PetscMat )\n\tS_ = Ref(S.ptr)\n\tSp_ = Ref(Sp.ptr)\n\n    @chk ccall(\n               (:MatGetSchurComplement, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, CIS, CIS, MatReuse, Ptr{CMat}, MatSchurComplementAinvType, MatReuse, Ptr{CMat}),\n               A, isrow0, iscol0, isrow1, iscol1, mreuse, S_, ainvtype, preuse, Sp_,\n              )\n\n\tS.ptr = C_NULL\n\tSp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSchurComplementSetAinvType(petsclib::PetscLibType,S::PetscMat, ainvtype::MatSchurComplementAinvType) \nset the type of approximation used for the inverse of the (0,0) block used in forming `Sp` in `MatSchurComplementGetPmat()`\n\nNot Collective\n\nInput Parameters:\n- `S`        - matrix obtained with `MatCreateSchurComplement()` (or equivalent) and implementing the action of A11 - A10 ksp(A00,Ap00) A01\n- `ainvtype` - type of approximation to be used to form approximate Schur complement Sp = A11 - A10 inv(DIAGFORM(A00)) A01:\n`MAT_SCHUR_COMPLEMENT_AINV_DIAG`, `MAT_SCHUR_COMPLEMENT_AINV_LUMP`, `MAT_SCHUR_COMPLEMENT_AINV_BLOCK_DIAG`, or `MAT_SCHUR_COMPLEMENT_AINV_FULL`\n\nOptions Database Key:\n- `-mat_schur_complement_ainv_type diag | lump | blockdiag | full` - set schur complement type\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MatSchurComplementAinvType`, `MatCreateSchurComplement()`, `MatGetSchurComplement()`, `MatSchurComplementGetPmat()`, `MatSchurComplementGetAinvType()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementSetAinvType\"))\n\"\"\"\nfunction MatSchurComplementSetAinvType(petsclib::PetscLibType, S::PetscMat, ainvtype::MatSchurComplementAinvType) end\n\n@for_petsc function MatSchurComplementSetAinvType(petsclib::$UnionPetscLib, S::PetscMat, ainvtype::MatSchurComplementAinvType )\n\n    @chk ccall(\n               (:MatSchurComplementSetAinvType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatSchurComplementAinvType),\n               S, ainvtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tainvtype::MatSchurComplementAinvType = MatSchurComplementGetAinvType(petsclib::PetscLibType,S::PetscMat) \nget the type of approximation for the inverse of the (0,0) block used in forming `Sp` in `MatSchurComplementGetPmat()`\n\nNot Collective\n\nInput Parameter:\n- `S` - matrix obtained with `MatCreateSchurComplement()` (or equivalent) and implementing the action of A11 - A10 ksp(A00,Ap00) A01\n\nOutput Parameter:\n- `ainvtype` - type of approximation used to form approximate Schur complement Sp = A11 - A10 inv(DIAGFORM(A00)) A01:\n`MAT_SCHUR_COMPLEMENT_AINV_DIAG`, `MAT_SCHUR_COMPLEMENT_AINV_LUMP`, `MAT_SCHUR_COMPLEMENT_AINV_BLOCK_DIAG`, or `MAT_SCHUR_COMPLEMENT_AINV_FULL`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MatSchurComplementAinvType`, `MatCreateSchurComplement()`, `MatGetSchurComplement()`, `MatSchurComplementGetPmat()`, `MatSchurComplementSetAinvType()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementGetAinvType\"))\n\"\"\"\nfunction MatSchurComplementGetAinvType(petsclib::PetscLibType, S::PetscMat) end\n\n@for_petsc function MatSchurComplementGetAinvType(petsclib::$UnionPetscLib, S::PetscMat )\n\tainvtype_ = Ref{MatSchurComplementAinvType}()\n\n    @chk ccall(\n               (:MatSchurComplementGetAinvType, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatSchurComplementAinvType}),\n               S, ainvtype_,\n              )\n\n\tainvtype = unsafe_string(ainvtype_[])\n\n\treturn ainvtype\nend \n\n\"\"\"\n\tSp::PetscMat = MatCreateSchurComplementPmat(petsclib::PetscLibType,A00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat, ainvtype::MatSchurComplementAinvType, preuse::MatReuse) \ncreate a matrix for preconditioning the Schur complement by explicitly assembling the sparse matrix\nSp = A11 - A10 inv(DIAGFORM(A00)) A01\n\nCollective\n\nInput Parameters:\n- `A00`      - the upper-left part of the original matrix A = [A00 A01; A10 A11]\n- `A01`      - (optional) the upper-right part of the original matrix A = [A00 A01; A10 A11]\n- `A10`      - (optional) the lower-left part of the original matrix A = [A00 A01; A10 A11]\n- `A11`      - (optional) the lower-right part of the original matrix A = [A00 A01; A10 A11]\n- `ainvtype` - type of approximation for DIAGFORM(A00) used when forming Sp = A11 - A10 inv(DIAGFORM(A00)) A01. See `MatSchurComplementAinvType`.\n- `preuse`   - `MAT_INITIAL_MATRIX` for a new `Sp`, or `MAT_REUSE_MATRIX` to reuse an existing `Sp`, or `MAT_IGNORE_MATRIX` to put nothing in `Sp`\n\nOutput Parameter:\n- `Sp` - approximate Schur complement suitable for constructing a preconditioner for the true Schur complement S = A11 - A10 inv(A00) A01\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MatCreateSchurComplement()`, `MatGetSchurComplement()`, `MatSchurComplementGetPmat()`, `MatSchurComplementAinvType`\n\n# External Links\n$(_doc_external(\"Ksp/MatCreateSchurComplementPmat\"))\n\"\"\"\nfunction MatCreateSchurComplementPmat(petsclib::PetscLibType, A00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat, ainvtype::MatSchurComplementAinvType, preuse::MatReuse) end\n\n@for_petsc function MatCreateSchurComplementPmat(petsclib::$UnionPetscLib, A00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat, ainvtype::MatSchurComplementAinvType, preuse::MatReuse )\n\tSp_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSchurComplementPmat, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat, MatSchurComplementAinvType, MatReuse, Ptr{CMat}),\n               A00, A01, A10, A11, ainvtype, preuse, Sp_,\n              )\n\n\tSp = PetscMat(Sp_[], petsclib)\n\n\treturn Sp\nend \n\n\"\"\"\n\tMatSchurComplementGetPmat(petsclib::PetscLibType,S::PetscMat, preuse::MatReuse, Sp::PetscMat) \nObtain a matrix for preconditioning the Schur complement by assembling Sp = A11\n\nCollective\n\nInput Parameters:\n- `S`      - matrix obtained with MatCreateSchurComplement() (or equivalent) that implements the action of A11 - A10 ksp(A00,Ap00) A01\n- `preuse` - `MAT_INITIAL_MATRIX` for a new `Sp`, or `MAT_REUSE_MATRIX` to reuse an existing `Sp`, or `MAT_IGNORE_MATRIX` to put nothing in `Sp`\n\nOutput Parameter:\n- `Sp` - approximate Schur complement suitable for preconditioning the exact Schur complement S = A11 - A10 inv(A00) A01\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `MatCreateSubMatrix()`, `PCFIELDSPLIT`, `MatGetSchurComplement()`, `MatCreateSchurComplement()`, `MatSchurComplementSetAinvType()`\n\n# External Links\n$(_doc_external(\"Ksp/MatSchurComplementGetPmat\"))\n\"\"\"\nfunction MatSchurComplementGetPmat(petsclib::PetscLibType, S::PetscMat, preuse::MatReuse, Sp::PetscMat) end\n\n@for_petsc function MatSchurComplementGetPmat(petsclib::$UnionPetscLib, S::PetscMat, preuse::MatReuse, Sp::PetscMat )\n\tSp_ = Ref(Sp.ptr)\n\n    @chk ccall(\n               (:MatSchurComplementGetPmat, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatReuse, Ptr{CMat}),\n               S, preuse, Sp_,\n              )\n\n\tSp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tJ::PetscMat = MatCreateSNESMFMore(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec) \nCreates a matrix\ncontext for use with a `SNES` solver that uses the More method to compute an optimal h based on the noise of the function.  This matrix can be used as\nthe Jacobian argument for the routine `SNESSetJacobian()`.\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `x`    - vector where `SNES` solution is to be stored.\n\nOutput Parameter:\n- `J` - the matrix-free matrix\n\nOptions Database Keys:\n- `-snes_mf_err <error_rel>` - see `MatCreateSNESMF()`\n- `-snes_mf_umin <umin>`     - see `MatCreateSNESMF()`\n- `-snes_mf_compute_err`     - compute the square root or relative error in function\n- `-snes_mf_freq_err <freq>` - set the frequency to recompute the parameters\n- `-snes_mf_jorge`           - use the method of Jorge More\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESCreateMF()`, `MatCreateMFFD()`, `MatDestroy()`, `MatMFFDSetFunctionError()`\n\n# External Links\n$(_doc_external(\"Snes/MatCreateSNESMFMore\"))\n\"\"\"\nfunction MatCreateSNESMFMore(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec) end\n\n@for_petsc function MatCreateSNESMFMore(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec )\n\tJ_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSNESMFMore, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, Ptr{CMat}),\n               snes, x, J_,\n              )\n\n\tJ = PetscMat(J_[], petsclib)\n\n\treturn J\nend \n\n\"\"\"\n\tMatSNESMFMoreSetParameters(petsclib::PetscLibType,mat::PetscMat, error::PetscReal, umin::PetscReal, h::PetscReal) \nSets the parameters for the approximation of\nmatrix-vector products using finite differences, see  `MatCreateSNESMFMore()`\n\nInput Parameters:\n- `mat`   - the matrix\n- `error` - relative error (should be set to the square root of the relative error in the function evaluations)\n- `umin`  - minimum allowable u-value\n- `h`     - differencing parameter\n\nOptions Database Keys:\n- `-snes_mf_err <error_rel>` - see `MatCreateSNESMF()`\n- `-snes_mf_umin <umin>`     - see `MatCreateSNESMF()`\n- `-snes_mf_compute_err`     - compute the square root or relative error in function\n- `-snes_mf_freq_err <freq>` - set the frequency to recompute the parameters\n- `-snes_mf_jorge`           - use the method of Jorge More\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `MatCreateSNESMF()`, `MatCreateSNESMFMore()`\n\n# External Links\n$(_doc_external(\"Snes/MatSNESMFMoreSetParameters\"))\n\"\"\"\nfunction MatSNESMFMoreSetParameters(petsclib::PetscLibType, mat::PetscMat, error::PetscReal, umin::PetscReal, h::PetscReal) end\n\n@for_petsc function MatSNESMFMoreSetParameters(petsclib::$UnionPetscLib, mat::PetscMat, error::$PetscReal, umin::$PetscReal, h::$PetscReal )\n\n    @chk ccall(\n               (:MatSNESMFMoreSetParameters, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal, $PetscReal, $PetscReal),\n               mat, error, umin, h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSNESMFGetSNES(petsclib::PetscLibType,J::PetscMat, snes::PetscSNES) \nreturns the `SNES` associated with a matrix created with `MatCreateSNESMF()`\n\nNot Collective\n\nInput Parameter:\n- `J` - the matrix\n\nOutput Parameter:\n- `snes` - the `SNES` object\n\nLevel: advanced\n\n-seealso: [](ch_snes), `Mat`, `SNES`, `MatCreateSNESMF()`\n\n# External Links\n$(_doc_external(\"Snes/MatSNESMFGetSNES\"))\n\"\"\"\nfunction MatSNESMFGetSNES(petsclib::PetscLibType, J::PetscMat, snes::PetscSNES) end\n\n@for_petsc function MatSNESMFGetSNES(petsclib::$UnionPetscLib, J::PetscMat, snes::PetscSNES )\n\tsnes_ = Ref(snes.ptr)\n\n    @chk ccall(\n               (:MatSNESMFGetSNES, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CSNES}),\n               J, snes_,\n              )\n\n\tsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatSNESMFSetReuseBase(petsclib::PetscLibType,J::PetscMat, use::PetscBool) \nCauses the base vector to be used for differencing even if the function provided to `SNESSetFunction()` is not the\nsame as that provided to `MatMFFDSetFunction()`.\n\nLogically Collective\n\nInput Parameters:\n- `J`   - the `MATMFFD` matrix\n- `use` - if true always reuse the base vector instead of recomputing f(u) even if the function in the `MATMFFD` is\nnot `SNESComputeFunction()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `MATMFFD`, `MatMFFDSetFunction()`, `SNESSetFunction()`, `MatCreateSNESMF()`, `MatSNESMFGetReuseBase()`\n\n# External Links\n$(_doc_external(\"Snes/MatSNESMFSetReuseBase\"))\n\"\"\"\nfunction MatSNESMFSetReuseBase(petsclib::PetscLibType, J::PetscMat, use::PetscBool) end\n\n@for_petsc function MatSNESMFSetReuseBase(petsclib::$UnionPetscLib, J::PetscMat, use::PetscBool )\n\n    @chk ccall(\n               (:MatSNESMFSetReuseBase, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               J, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuse::PetscBool = MatSNESMFGetReuseBase(petsclib::PetscLibType,J::PetscMat) \nDetermines if the base vector is to be used for differencing even if the function provided to `SNESSetFunction()` is not the\nsame as that provided to `MatMFFDSetFunction()`.\n\nLogically Collective\n\nInput Parameter:\n- `J` - the `MATMFFD` matrix\n\nOutput Parameter:\n- `use` - if true always reuse the base vector instead of recomputing f(u) even if the function in the `MATMFFD` is\nnot `SNESComputeFunction()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `Mat`, `SNES`, `MatSNESMFSetReuseBase()`, `MatCreateSNESMF()`\n\n# External Links\n$(_doc_external(\"Snes/MatSNESMFGetReuseBase\"))\n\"\"\"\nfunction MatSNESMFGetReuseBase(petsclib::PetscLibType, J::PetscMat) end\n\n@for_petsc function MatSNESMFGetReuseBase(petsclib::$UnionPetscLib, J::PetscMat )\n\tuse_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatSNESMFGetReuseBase, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{PetscBool}),\n               J, use_,\n              )\n\n\tuse = use_[]\n\n\treturn use\nend \n\n\"\"\"\n\tJ::PetscMat = MatCreateSNESMF(petsclib::PetscLibType,snes::PetscSNES) \nCreates a finite differencing based matrix\na `SNES` solver.  This matrix can be used as the Jacobian argument for\nthe routine `SNESSetJacobian()`. See `MatCreateMFFD()` for details on how\nthe finite difference computation is done.\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `J` - the matrix-free matrix which is of type `MATMFFD`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `MATMFFD`, `MatDestroy()`, `MatMFFDSetFunction()`, `MatMFFDSetFunctionError()`, `MatMFFDDSSetUmin()`\n`MatMFFDSetHHistory()`, `MatMFFDResetHHistory()`, `MatCreateMFFD()`, `MatCreateShell()`,\n`MatMFFDGetH()`, `MatMFFDRegister()`, `MatMFFDComputeJacobian()`, `MatSNESMFSetReuseBase()`, `MatSNESMFGetReuseBase()`\n\n# External Links\n$(_doc_external(\"Snes/MatCreateSNESMF\"))\n\"\"\"\nfunction MatCreateSNESMF(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function MatCreateSNESMF(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tJ_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSNESMF, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CMat}),\n               snes, J_,\n              )\n\n\tJ = PetscMat(J_[], petsclib)\n\n\treturn J\nend \n\n\"\"\"\n\tdm::PetscDM = MatGetDM(petsclib::PetscLibType,A::PetscMat) \nGets the `DM` defining the data layout of the matrix\n\nNot Collective\n\nInput Parameter:\n- `A` - The `Mat`\n\nOutput Parameter:\n- `dm` - The `DM`\n\nLevel: intermediate\n\nNote:\nA matrix may not have a `DM` associated with it\n\nDeveloper Note:\nSince the `Mat` class doesn't know about the `DM` class the `DM` object is associated with the `Mat` through a `PetscObjectCompose()` operation\n\nSee also: \n=== \n`DM`, `MatSetDM()`, `DMCreateMatrix()`, `DMSetMatType()`\n\n# External Links\n$(_doc_external(\"DM/MatGetDM\"))\n\"\"\"\nfunction MatGetDM(petsclib::PetscLibType, A::PetscMat) end\n\n@for_petsc function MatGetDM(petsclib::$UnionPetscLib, A::PetscMat )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:MatGetDM, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{CDM}),\n               A, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n    return dm\nend \n\n\"\"\"\n\tMatSetDM(petsclib::PetscLibType,A::PetscMat, dm::PetscDM) \nSets the `DM` defining the data layout of the matrix\n\nNot Collective\n\nInput Parameters:\n- `A`  - The `Mat`\n- `dm` - The `DM`\n\nLevel: developer\n\nNote:\nThis is rarely used in practice, rather `DMCreateMatrix()` is used to create a matrix associated with a particular `DM`\n\nDeveloper Note:\nSince the `Mat` class doesn't know about the `DM` class the `DM` object is associated with\nthe `Mat` through a `PetscObjectCompose()` operation\n\nSee also: \n=== \n`DM`, `MatGetDM()`, `DMCreateMatrix()`, `DMSetMatType()`\n\n# External Links\n$(_doc_external(\"DM/MatSetDM\"))\n\"\"\"\nfunction MatSetDM(petsclib::PetscLibType, A::PetscMat, dm::PetscDM) end\n\n@for_petsc function MatSetDM(petsclib::$UnionPetscLib, A::PetscMat, dm::PetscDM )\n\n    @chk ccall(\n               (:MatSetDM, $petsc_library),\n               PetscErrorCode,\n               (CMat, CDM),\n               A, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDFischer(petsclib::PetscLibType,jac::PetscMat, X::PetscVec, Con::PetscVec, XL::PetscVec, XU::PetscVec, T1::PetscVec, T2::PetscVec, Da::PetscVec, Db::PetscVec) \nCalculates an element of the B\nFischer-Burmeister function for complementarity problems.\n\nCollective\n\nInput Parameters:\n- `jac` - the jacobian of `f` at `X`\n- `X`   - current point\n- `Con` - constraints function evaluated at `X`\n- `XL`  - lower bounds\n- `XU`  - upper bounds\n- `T1`  - work vector\n- `T2`  - work vector\n\nOutput Parameters:\n- `Da` - diagonal perturbation component of the result\n- `Db` - row scaling component of the result\n\nLevel: developer\n\n-seealso: `Mat`, `VecFischer()`, `VecSFischer()`, `MatDSFischer()`\n\n# External Links\n$(_doc_external(\"Tao/MatDFischer\"))\n\"\"\"\nfunction MatDFischer(petsclib::PetscLibType, jac::PetscMat, X::PetscVec, Con::PetscVec, XL::PetscVec, XU::PetscVec, T1::PetscVec, T2::PetscVec, Da::PetscVec, Db::PetscVec) end\n\n@for_petsc function MatDFischer(petsclib::$UnionPetscLib, jac::PetscMat, X::PetscVec, Con::PetscVec, XL::PetscVec, XU::PetscVec, T1::PetscVec, T2::PetscVec, Da::PetscVec, Db::PetscVec )\n\n    @chk ccall(\n               (:MatDFischer, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec, CVec, CVec, CVec, CVec, CVec),\n               jac, X, Con, XL, XU, T1, T2, Da, Db,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatDSFischer(petsclib::PetscLibType,jac::PetscMat, X::PetscVec, Con::PetscVec, XL::PetscVec, XU::PetscVec, mu::PetscReal, T1::PetscVec, T2::PetscVec, Da::PetscVec, Db::PetscVec, Dm::PetscVec) \nCalculates an element of the B\nsmoothed Fischer-Burmeister function for complementarity problems.\n\nCollective\n\nInput Parameters:\n- `jac` - the jacobian of f at X\n- `X`   - current point\n- `Con` - constraint function evaluated at X\n- `XL`  - lower bounds\n- `XU`  - upper bounds\n- `mu`  - smoothing parameter\n- `T1`  - work vector\n- `T2`  - work vector\n\nOutput Parameters:\n- `Da` - diagonal perturbation component of the result\n- `Db` - row scaling component of the result\n- `Dm` - derivative with respect to scaling parameter\n\nLevel: developer\n\n-seealso: `Mat`, `VecFischer()`, `VecDFischer()`, `MatDFischer()`\n\n# External Links\n$(_doc_external(\"Tao/MatDSFischer\"))\n\"\"\"\nfunction MatDSFischer(petsclib::PetscLibType, jac::PetscMat, X::PetscVec, Con::PetscVec, XL::PetscVec, XU::PetscVec, mu::PetscReal, T1::PetscVec, T2::PetscVec, Da::PetscVec, Db::PetscVec, Dm::PetscVec) end\n\n@for_petsc function MatDSFischer(petsclib::$UnionPetscLib, jac::PetscMat, X::PetscVec, Con::PetscVec, XL::PetscVec, XU::PetscVec, mu::$PetscReal, T1::PetscVec, T2::PetscVec, Da::PetscVec, Db::PetscVec, Dm::PetscVec )\n\n    @chk ccall(\n               (:MatDSFischer, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec, CVec, $PetscReal, CVec, CVec, CVec, CVec, CVec),\n               jac, X, Con, XL, XU, mu, T1, T2, Da, Db, Dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tJ::PetscMat = MatCreateSubMatrixFree(petsclib::PetscLibType,mat::PetscMat, Rows::IS, Cols::IS) \nCreates a reduced matrix by masking a\nfull matrix.\n\nCollective\n\nInput Parameters:\n- `mat`  - matrix of arbitrary type\n- `Rows` - the rows that will be in the submatrix\n- `Cols` - the columns that will be in the submatrix\n\nOutput Parameter:\n- `J` - New matrix\n\nLevel: developer\n\n-seealso: `MatCreate()`\n\n# External Links\n$(_doc_external(\"Tao/MatCreateSubMatrixFree\"))\n\"\"\"\nfunction MatCreateSubMatrixFree(petsclib::PetscLibType, mat::PetscMat, Rows::IS, Cols::IS) end\n\n@for_petsc function MatCreateSubMatrixFree(petsclib::$UnionPetscLib, mat::PetscMat, Rows::IS, Cols::IS )\n\tJ_ = Ref{CMat}()\n\n    @chk ccall(\n               (:MatCreateSubMatrixFree, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CIS, Ptr{CMat}),\n               mat, Rows, Cols, J_,\n              )\n\n\tJ = PetscMat(J_[], petsclib)\n\n\treturn J\nend \n\n\"\"\"\n\tMatSetValue(petsclib::PetscLibType,mat::PetscMat, i::PetscInt, j::PetscInt, va::PetscScalar, mode::InsertMode) \n\n# External Links\n$(_doc_external(\"Mat/MatSetValue\"))\n\"\"\"\nfunction MatSetValue(petsclib::PetscLibType, mat::PetscMat, i::PetscInt, j::PetscInt, va::PetscScalar, mode::InsertMode) end\n\n@for_petsc function MatSetValue(petsclib::$UnionPetscLib, mat::PetscMat, i::$PetscInt, j::$PetscInt, va::$PetscScalar, mode::InsertMode )\n\n    @chk ccall(\n               (:MatSetValue, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, $PetscScalar, InsertMode),\n               mat, i, j, va, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tva::PetscScalar = MatGetValue(petsclib::PetscLibType,mat::PetscMat, row::PetscInt, col::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/MatGetValue\"))\n\"\"\"\nfunction MatGetValue(petsclib::PetscLibType, mat::PetscMat, row::PetscInt, col::PetscInt) end\n\n@for_petsc function MatGetValue(petsclib::$UnionPetscLib, mat::PetscMat, row::$PetscInt, col::$PetscInt )\n\tva_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatGetValue, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               mat, row, col, va_,\n              )\n\n\tva = va_[]\n\n\treturn va\nend \n\n\"\"\"\n\tMatSetValueLocal(petsclib::PetscLibType,mat::PetscMat, i::PetscInt, j::PetscInt, va::PetscScalar, mode::InsertMode) \n\n# External Links\n$(_doc_external(\"Mat/MatSetValueLocal\"))\n\"\"\"\nfunction MatSetValueLocal(petsclib::PetscLibType, mat::PetscMat, i::PetscInt, j::PetscInt, va::PetscScalar, mode::InsertMode) end\n\n@for_petsc function MatSetValueLocal(petsclib::$UnionPetscLib, mat::PetscMat, i::$PetscInt, j::$PetscInt, va::$PetscScalar, mode::InsertMode )\n\n    @chk ccall(\n               (:MatSetValueLocal, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, $PetscScalar, InsertMode),\n               mat, i, j, va, mode,\n              )\n\n\n\treturn nothing\nend \n\n# NOTE:\n# there are a few functions that are not listed by the python routine, but that are relevant\n# Below, they are wrapped manually\n\n\n\n\"\"\"\n    MatShellSetOperation(petsclib::PetscLibType, mat::PetscMat, op::MatOperation, g::Ptr)\n\nAllows user to set a matrix operation for a `MATSHELL` shell matrix.\n\nLogically Collective\n\nInput Parameters:\n`mat` - the `MATSHELL` shell matrix\n`op`  - the name of the operation\n`g`   - a pointer to the function that provides the operation created with `@cfunction`\n\nLevel: advanced\n\n-seealso: `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`, `MatShellSetContext()`, `MatSetOperation()`, `MatShellSetManageScalingShifts()`, `MatShellSetMatProductOperation()`\n\n# External Links\n$(_doc_external(\"Mat/MatShellSetOperation\"))\n\"\"\"\nfunction MatShellSetOperation(petsclib::PetscLibType, mat::AbstractPetscMat, op::MatOperation, g::Ptr) end\n\n@for_petsc function MatShellSetOperation(petsclib::$UnionPetscLib, mat::AbstractPetscMat, op::MatOperation, g::Ptr)\n\n    @chk ccall(\n               (:MatShellSetOperation, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatOperation, Ptr{Cvoid}),\n               mat, op, g,\n              )\n\n\treturn nothing\nend"
  },
  {
    "path": "src/autowrapped/Mataddons_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_MatColoring end\nconst MatColoring = Ptr{_n_MatColoring}\n\nmutable struct _n_MatFDColoring end\nconst MatFDColoring = Ptr{_n_MatFDColoring}\n\nmutable struct MatFDColoringFn end\n\nmutable struct _n_MatPartitioning end\nconst MatPartitioning = Ptr{_n_MatPartitioning}\n\nmutable struct MatNullSpaceRemoveFn end\n\nmutable struct MatMFFDFn end\n\nmutable struct MatMFFDiFn end\n\nmutable struct MatMFFDiBaseFn end\n\nmutable struct MatMFFDCheckhFn end\n\nmutable struct _n_MatCoarsen end\nconst MatCoarsen = Ptr{_n_MatCoarsen}\n\nmutable struct _n_PetscCoarsenData end\nconst PetscCoarsenData = Ptr{_n_PetscCoarsenData}\n\n# -------------------------------------------------------\n\"\"\"\n\tMatColoringPatch(petsclib::PetscLibType,mat::PetscMat, ncolors::PetscInt, n::PetscInt, colorarray::Vector{ISColoringValue}, iscoloring::ISColoring) \nUsed inside matrix coloring routines that use `MatGetRowIJ()` and/or\n`MatGetColumnIJ()`.\n\nCollective\n\nInput Parameters:\n- `mat`        - the matrix\n- `ncolors`    - maximum color value\n- `n`          - number of entries in colorarray\n- `colorarray` - array indicating color for each column\n\nOutput Parameter:\n- `iscoloring` - coloring generated using colorarray information\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatGetRowIJ()`, `MatGetColumnIJ()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringPatch\"))\n\"\"\"\nfunction MatColoringPatch(petsclib::PetscLibType, mat::PetscMat, ncolors::PetscInt, n::PetscInt, colorarray::Vector{ISColoringValue}, iscoloring::ISColoring) end\n\n@for_petsc function MatColoringPatch(petsclib::$UnionPetscLib, mat::PetscMat, ncolors::$PetscInt, n::$PetscInt, colorarray::Vector{ISColoringValue}, iscoloring::ISColoring )\n\n    @chk ccall(\n               (:MatColoringPatch, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, $PetscInt, Ptr{ISColoringValue}, Ptr{ISColoring}),\n               mat, ncolors, n, colorarray, iscoloring,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatColoringRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new sparse matrix coloring to the  matrix package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of Coloring (for example `MATCOLORINGSL`)\n- `function` - function pointer that creates the coloring\n\nLevel: developer\n\n-seealso: `MatColoringType`, `MatColoringRegisterDestroy()`, `MatColoringRegisterAll()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringRegister\"))\n\"\"\"\nfunction MatColoringRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function MatColoringRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:MatColoringRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmcptr::MatColoring = MatColoringCreate(petsclib::PetscLibType,m::PetscMat) \nCreates a matrix coloring context.\n\nCollective\n\nInput Parameter:\n- `m` - a `Mat` from which a coloring is derived\n\nOutput Parameter:\n- `mcptr` - the new `MatColoring` context\n\nOptions Database Keys:\n- `-mat_coloring_type`      - the type of coloring algorithm used. See `MatColoringType`.\n- `-mat_coloring_maxcolors` - the maximum number of relevant colors, all nodes not in a color are in maxcolors+1\n- `-mat_coloring_distance`  - compute a distance 1,2,... coloring.\n- `-mat_coloring_view`      - print information about the coloring and the produced index sets\n- `-mat_coloring_test`      - debugging option that prints all coloring incompatibilities\n- `-mat_is_coloring_test`   - debugging option that throws an error if MatColoringApply() generates an incorrect iscoloring\n\nLevel: beginner\n\n-seealso: `MatColoringSetFromOptions()`, `MatColoring`, `MatColoringApply()`, `MatFDColoringCreate()`, `DMCreateColoring()`, `MatColoringType`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringCreate\"))\n\"\"\"\nfunction MatColoringCreate(petsclib::PetscLibType, m::PetscMat) end\n\n@for_petsc function MatColoringCreate(petsclib::$UnionPetscLib, m::PetscMat )\n\tmcptr_ = Ref{MatColoring}()\n\n    @chk ccall(\n               (:MatColoringCreate, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatColoring}),\n               m, mcptr_,\n              )\n\n\tmcptr = mcptr_[]\n\n\treturn mcptr\nend \n\n\"\"\"\n\tMatColoringDestroy(petsclib::PetscLibType,mc::MatColoring) \nDestroys the matrix coloring context\n\nCollective\n\nInput Parameter:\n- `mc` - the `MatColoring` context\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringCreate()`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringDestroy\"))\n\"\"\"\nfunction MatColoringDestroy(petsclib::PetscLibType, mc::MatColoring) end\n\n@for_petsc function MatColoringDestroy(petsclib::$UnionPetscLib, mc::MatColoring )\n\n    @chk ccall(\n               (:MatColoringDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MatColoring},),\n               mc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatColoringSetType(petsclib::PetscLibType,mc::MatColoring, type::MatColoringType) \nSets the type of coloring algorithm used\n\nCollective\n\nInput Parameters:\n- `mc`   - the `MatColoring` context\n- `type` - the type of coloring\n\nOptions Database Key:\n- `-mat_coloring_type type` - the name of the type\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringSetFromOptions()`, `MatColoringType`, `MatColoringCreate()`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringSetType\"))\n\"\"\"\nfunction MatColoringSetType(petsclib::PetscLibType, mc::MatColoring, type::MatColoringType) end\n\n@for_petsc function MatColoringSetType(petsclib::$UnionPetscLib, mc::MatColoring, type::MatColoringType )\n\n    @chk ccall(\n               (:MatColoringSetType, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, MatColoringType),\n               mc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatColoringSetFromOptions(petsclib::PetscLibType,mc::MatColoring) \nSets `MatColoring` options from options database\n\nCollective\n\nInput Parameter:\n- `mc` - `MatColoring` context\n\nOptions Database Keys:\n- `-mat_coloring_type`      - the type of coloring algorithm used. See `MatColoringType`.\n- `-mat_coloring_maxcolors` - the maximum number of relevant colors, all nodes not in a color are in maxcolors+1\n- `-mat_coloring_distance`  - compute a distance 1,2,... coloring.\n- `-mat_coloring_view`      - print information about the coloring and the produced index sets\n- `-snes_fd_color`          - instruct SNES to using coloring and then `MatFDColoring` to compute the Jacobians\n- `-snes_fd_color_use_mat`  - instruct `SNES` to color the matrix directly instead of the `DM` from which the matrix comes (the default)\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringApply()`, `MatColoringSetDistance()`, `MatColoringSetType()`, `SNESComputeJacobianDefaultColor()`, `MatColoringType`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringSetFromOptions\"))\n\"\"\"\nfunction MatColoringSetFromOptions(petsclib::PetscLibType, mc::MatColoring) end\n\n@for_petsc function MatColoringSetFromOptions(petsclib::$UnionPetscLib, mc::MatColoring )\n\n    @chk ccall(\n               (:MatColoringSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MatColoring,),\n               mc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatColoringSetDistance(petsclib::PetscLibType,mc::MatColoring, dist::PetscInt) \nSets the distance of the coloring\n\nLogically Collective\n\nInput Parameters:\n- `mc`   - the `MatColoring` context\n- `dist` - the distance the coloring should compute\n\nOptions Database Key:\n- `-mat_coloring_type` - the type of coloring algorithm used. See `MatColoringType`.\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringSetFromOptions()`, `MatColoringGetDistance()`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringSetDistance\"))\n\"\"\"\nfunction MatColoringSetDistance(petsclib::PetscLibType, mc::MatColoring, dist::PetscInt) end\n\n@for_petsc function MatColoringSetDistance(petsclib::$UnionPetscLib, mc::MatColoring, dist::$PetscInt )\n\n    @chk ccall(\n               (:MatColoringSetDistance, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, $PetscInt),\n               mc, dist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdist::PetscInt = MatColoringGetDistance(petsclib::PetscLibType,mc::MatColoring) \nGets the distance of the coloring\n\nLogically Collective\n\nInput Parameter:\n- `mc` - the `MatColoring` context\n\nOutput Parameter:\n- `dist` - the current distance being used for the coloring.\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringSetDistance()`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringGetDistance\"))\n\"\"\"\nfunction MatColoringGetDistance(petsclib::PetscLibType, mc::MatColoring) end\n\n@for_petsc function MatColoringGetDistance(petsclib::$UnionPetscLib, mc::MatColoring )\n\tdist_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatColoringGetDistance, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, Ptr{$PetscInt}),\n               mc, dist_,\n              )\n\n\tdist = dist_[]\n\n\treturn dist\nend \n\n\"\"\"\n\tMatColoringSetMaxColors(petsclib::PetscLibType,mc::MatColoring, maxcolors::PetscInt) \nSets the maximum number of colors to produce\n\nLogically Collective\n\nInput Parameters:\n- `mc`        - the `MatColoring` context\n- `maxcolors` - the maximum number of colors to produce\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringGetMaxColors()`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringSetMaxColors\"))\n\"\"\"\nfunction MatColoringSetMaxColors(petsclib::PetscLibType, mc::MatColoring, maxcolors::PetscInt) end\n\n@for_petsc function MatColoringSetMaxColors(petsclib::$UnionPetscLib, mc::MatColoring, maxcolors::$PetscInt )\n\n    @chk ccall(\n               (:MatColoringSetMaxColors, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, $PetscInt),\n               mc, maxcolors,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxcolors::PetscInt = MatColoringGetMaxColors(petsclib::PetscLibType,mc::MatColoring) \nGets the maximum number of colors\n\nLogically Collective\n\nInput Parameter:\n- `mc` - the `MatColoring` context\n\nOutput Parameter:\n- `maxcolors` - the current maximum number of colors to produce\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringSetMaxColors()`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringGetMaxColors\"))\n\"\"\"\nfunction MatColoringGetMaxColors(petsclib::PetscLibType, mc::MatColoring) end\n\n@for_petsc function MatColoringGetMaxColors(petsclib::$UnionPetscLib, mc::MatColoring )\n\tmaxcolors_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatColoringGetMaxColors, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, Ptr{$PetscInt}),\n               mc, maxcolors_,\n              )\n\n\tmaxcolors = maxcolors_[]\n\n\treturn maxcolors\nend \n\n\"\"\"\n\tMatColoringApply(petsclib::PetscLibType,mc::MatColoring, coloring::ISColoring) \nApply the coloring to the matrix, producing index\nsets corresponding to a number of independent sets in the induced\ngraph.\n\nCollective\n\nInput Parameter:\n- `mc` - the `MatColoring` context\n\nOutput Parameter:\n- `coloring` - the `ISColoring` instance containing the coloring\n\nLevel: beginner\n\n-seealso: `ISColoring`, `MatColoring`, `MatColoringCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringApply\"))\n\"\"\"\nfunction MatColoringApply(petsclib::PetscLibType, mc::MatColoring, coloring::ISColoring) end\n\n@for_petsc function MatColoringApply(petsclib::$UnionPetscLib, mc::MatColoring, coloring::ISColoring )\n\n    @chk ccall(\n               (:MatColoringApply, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, Ptr{ISColoring}),\n               mc, coloring,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatColoringView(petsclib::PetscLibType,mc::MatColoring, viewer::PetscViewer) \nOutput details about the `MatColoring`.\n\nCollective\n\nInput Parameters:\n- `mc`     - the `MatColoring` context\n- `viewer` - the Viewer context\n\nLevel: beginner\n\n-seealso: `PetscViewer`, `MatColoring`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringView\"))\n\"\"\"\nfunction MatColoringView(petsclib::PetscLibType, mc::MatColoring, viewer::PetscViewer) end\n\n@for_petsc function MatColoringView(petsclib::$UnionPetscLib, mc::MatColoring, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatColoringView, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, PetscViewer),\n               mc, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatColoringSetWeightType(petsclib::PetscLibType,mc::MatColoring, wt::MatColoringWeightType) \nSet the type of weight computation used while computing the coloring\n\nLogically Collective\n\nInput Parameters:\n- `mc` - the `MatColoring` context\n- `wt` - the weight type\n\nLevel: beginner\n\n-seealso: `MatColoring`, `MatColoringWeightType`, `MatColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatColoringSetWeightType\"))\n\"\"\"\nfunction MatColoringSetWeightType(petsclib::PetscLibType, mc::MatColoring, wt::MatColoringWeightType) end\n\n@for_petsc function MatColoringSetWeightType(petsclib::$UnionPetscLib, mc::MatColoring, wt::MatColoringWeightType )\n\n    @chk ccall(\n               (:MatColoringSetWeightType, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, MatColoringWeightType),\n               mc, wt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdegrees::PetscInt = MatColoringGetDegrees(petsclib::PetscLibType,G::PetscMat, distance::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/MatColoringGetDegrees\"))\n\"\"\"\nfunction MatColoringGetDegrees(petsclib::PetscLibType, G::PetscMat, distance::PetscInt) end\n\n@for_petsc function MatColoringGetDegrees(petsclib::$UnionPetscLib, G::PetscMat, distance::$PetscInt )\n\tdegrees_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatColoringGetDegrees, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}),\n               G, distance, degrees_,\n              )\n\n\tdegrees = degrees_[]\n\n\treturn degrees\nend \n\n\"\"\"\n\tMatColoringCreateWeights(petsclib::PetscLibType,mc::MatColoring, weights::PetscReal, lperm::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/MatColoringCreateWeights\"))\n\"\"\"\nfunction MatColoringCreateWeights(petsclib::PetscLibType, mc::MatColoring, weights::PetscReal, lperm::PetscInt) end\n\n@for_petsc function MatColoringCreateWeights(petsclib::$UnionPetscLib, mc::MatColoring, weights::$PetscReal, lperm::$PetscInt )\n\n    @chk ccall(\n               (:MatColoringCreateWeights, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, $PetscReal, $PetscInt),\n               mc, weights, lperm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tweights::PetscReal,lperm::PetscInt = MatColoringSetWeights(petsclib::PetscLibType,mc::MatColoring) \n\n# External Links\n$(_doc_external(\"Mat/MatColoringSetWeights\"))\n\"\"\"\nfunction MatColoringSetWeights(petsclib::PetscLibType, mc::MatColoring) end\n\n@for_petsc function MatColoringSetWeights(petsclib::$UnionPetscLib, mc::MatColoring )\n\tweights_ = Ref{$PetscReal}()\n\tlperm_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatColoringSetWeights, $petsc_library),\n               PetscErrorCode,\n               (MatColoring, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               mc, weights_, lperm_,\n              )\n\n\tweights = weights_[]\n\tlperm = lperm_[]\n\n\treturn weights,lperm\nend \n\n\"\"\"\n\tMatFDColoringSetF(petsclib::PetscLibType,fd::MatFDColoring, F::PetscVec) \n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetF\"))\n\"\"\"\nfunction MatFDColoringSetF(petsclib::PetscLibType, fd::MatFDColoring, F::PetscVec) end\n\n@for_petsc function MatFDColoringSetF(petsclib::$UnionPetscLib, fd::MatFDColoring, F::PetscVec )\n\n    @chk ccall(\n               (:MatFDColoringSetF, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, CVec),\n               fd, F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringView(petsclib::PetscLibType,c::MatFDColoring, viewer::PetscViewer) \nViews a finite difference coloring context.\n\nCollective\n\nInput Parameters:\n- `c`      - the coloring context\n- `viewer` - visualization context\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringView\"))\n\"\"\"\nfunction MatFDColoringView(petsclib::PetscLibType, c::MatFDColoring, viewer::PetscViewer) end\n\n@for_petsc function MatFDColoringView(petsclib::$UnionPetscLib, c::MatFDColoring, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatFDColoringView, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, PetscViewer),\n               c, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringSetParameters(petsclib::PetscLibType,matfd::MatFDColoring, error::PetscReal, umin::PetscReal) \nSets the parameters for the approximation of\na sparse Jacobian matrix using finite differences and matrix coloring\n\nLogically Collective\n\nInput Parameters:\n- `matfd` - the coloring context\n- `error` - relative error\n- `umin`  - minimum allowable u-value magnitude\n\nLevel: advanced\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetParameters\"))\n\"\"\"\nfunction MatFDColoringSetParameters(petsclib::PetscLibType, matfd::MatFDColoring, error::PetscReal, umin::PetscReal) end\n\n@for_petsc function MatFDColoringSetParameters(petsclib::$UnionPetscLib, matfd::MatFDColoring, error::$PetscReal, umin::$PetscReal )\n\n    @chk ccall(\n               (:MatFDColoringSetParameters, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, $PetscReal, $PetscReal),\n               matfd, error, umin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringSetBlockSize(petsclib::PetscLibType,matfd::MatFDColoring, brows::PetscInt, bcols::PetscInt) \nSets block size for efficient inserting entries of Jacobian matrix.\n\nLogically Collective\n\nInput Parameters:\n- `matfd` - the coloring context\n- `brows` - number of rows in the block\n- `bcols` - number of columns in the block\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetBlockSize\"))\n\"\"\"\nfunction MatFDColoringSetBlockSize(petsclib::PetscLibType, matfd::MatFDColoring, brows::PetscInt, bcols::PetscInt) end\n\n@for_petsc function MatFDColoringSetBlockSize(petsclib::$UnionPetscLib, matfd::MatFDColoring, brows::$PetscInt, bcols::$PetscInt )\n\n    @chk ccall(\n               (:MatFDColoringSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, $PetscInt, $PetscInt),\n               matfd, brows, bcols,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringSetUp(petsclib::PetscLibType,mat::PetscMat, iscoloring::ISColoring, color::MatFDColoring) \nSets up the internal data structures of matrix coloring context for the later use.\n\nCollective\n\nInput Parameters:\n- `mat`        - the matrix containing the nonzero structure of the Jacobian\n- `iscoloring` - the coloring of the matrix; usually obtained with `MatGetColoring()` or `DMCreateColoring()`\n- `color`      - the matrix coloring context\n\nLevel: beginner\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringDestroy()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetUp\"))\n\"\"\"\nfunction MatFDColoringSetUp(petsclib::PetscLibType, mat::PetscMat, iscoloring::ISColoring, color::MatFDColoring) end\n\n@for_petsc function MatFDColoringSetUp(petsclib::$UnionPetscLib, mat::PetscMat, iscoloring::ISColoring, color::MatFDColoring )\n\n    @chk ccall(\n               (:MatFDColoringSetUp, $petsc_library),\n               PetscErrorCode,\n               (CMat, ISColoring, MatFDColoring),\n               mat, iscoloring, color,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringGetFunction(petsclib::PetscLibType,matfd::MatFDColoring, f::MatFDColoringFn, fctx::Cvoid) \nGets the function to use for computing the Jacobian.\n\nNot Collective\n\nInput Parameter:\n- `matfd` - the coloring context\n\nOutput Parameters:\n- `f`    - the function, see `MatFDColoringFn` for the calling sequence\n- `fctx` - the optional user-defined function context\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringSetFunction()`, `MatFDColoringSetFromOptions()`, `MatFDColoringFn`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringGetFunction\"))\n\"\"\"\nfunction MatFDColoringGetFunction(petsclib::PetscLibType, matfd::MatFDColoring, f::MatFDColoringFn, fctx::Cvoid) end\n\n@for_petsc function MatFDColoringGetFunction(petsclib::$UnionPetscLib, matfd::MatFDColoring, f::MatFDColoringFn, fctx::Cvoid )\n\n    @chk ccall(\n               (:MatFDColoringGetFunction, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, MatFDColoringFn, Cvoid),\n               matfd, f, fctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringSetFunction(petsclib::PetscLibType,matfd::MatFDColoring, f::MatFDColoringFn, fctx::Cvoid) \nSets the function to use for computing the Jacobian.\n\nLogically Collective\n\nInput Parameters:\n- `matfd` - the coloring context\n- `f`     - the function, see `MatFDColoringFn` for the calling sequence\n- `fctx`  - the optional user-defined function context\n\nLevel: advanced\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringGetFunction()`, `MatFDColoringSetFromOptions()`, `MatFDColoringFn`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetFunction\"))\n\"\"\"\nfunction MatFDColoringSetFunction(petsclib::PetscLibType, matfd::MatFDColoring, f::MatFDColoringFn, fctx::Cvoid) end\n\n@for_petsc function MatFDColoringSetFunction(petsclib::$UnionPetscLib, matfd::MatFDColoring, f::MatFDColoringFn, fctx::Cvoid )\n\n    @chk ccall(\n               (:MatFDColoringSetFunction, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, Ptr{MatFDColoringFn}, Ptr{Cvoid}),\n               matfd, f, fctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringSetFromOptions(petsclib::PetscLibType,matfd::MatFDColoring) \nSets coloring finite difference parameters from\nthe options database.\n\nCollective\n\nThe Jacobian, F'(u), is estimated with the differencing approximation\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringView()`, `MatFDColoringSetParameters()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetFromOptions\"))\n\"\"\"\nfunction MatFDColoringSetFromOptions(petsclib::PetscLibType, matfd::MatFDColoring) end\n\n@for_petsc function MatFDColoringSetFromOptions(petsclib::$UnionPetscLib, matfd::MatFDColoring )\n\n    @chk ccall(\n               (:MatFDColoringSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring,),\n               matfd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringSetType(petsclib::PetscLibType,matfd::MatFDColoring, type::MatMFFDType) \nSets the approach for computing the finite difference parameter\n\nCollective\n\nInput Parameters:\n- `matfd` - the coloring context\n- `type`  - either `MATMFFD_WP` or `MATMFFD_DS`\n\nOptions Database Key:\n- `-mat_fd_type` - \"wp\" or \"ds\"\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringView()`, `MatFDColoringSetParameters()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetType\"))\n\"\"\"\nfunction MatFDColoringSetType(petsclib::PetscLibType, matfd::MatFDColoring, type::MatMFFDType) end\n\n@for_petsc function MatFDColoringSetType(petsclib::$UnionPetscLib, matfd::MatFDColoring, type::MatMFFDType )\n\n    @chk ccall(\n               (:MatFDColoringSetType, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, MatMFFDType),\n               matfd, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcolor::MatFDColoring = MatFDColoringCreate(petsclib::PetscLibType,mat::PetscMat, iscoloring::ISColoring) \nCreates a matrix coloring context for finite difference\ncomputation of Jacobians.\n\nCollective\n\nInput Parameters:\n- `mat`        - the matrix containing the nonzero structure of the Jacobian\n- `iscoloring` - the coloring of the matrix; usually obtained with `MatColoringCreate()` or `DMCreateColoring()`\n\nOutput Parameter:\n- `color` - the new coloring context\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringDestroy()`, `SNESComputeJacobianDefaultColor()`, `ISColoringCreate()`,\n`MatFDColoringSetFunction()`, `MatFDColoringSetFromOptions()`, `MatFDColoringApply()`,\n`MatFDColoringView()`, `MatFDColoringSetParameters()`, `MatColoringCreate()`, `DMCreateColoring()`, `MatFDColoringSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringCreate\"))\n\"\"\"\nfunction MatFDColoringCreate(petsclib::PetscLibType, mat::PetscMat, iscoloring::ISColoring) end\n\n@for_petsc function MatFDColoringCreate(petsclib::$UnionPetscLib, mat::PetscMat, iscoloring::ISColoring )\n\tcolor_ = Ref{MatFDColoring}()\n\n    @chk ccall(\n               (:MatFDColoringCreate, $petsc_library),\n               PetscErrorCode,\n               (CMat, ISColoring, Ptr{MatFDColoring}),\n               mat, iscoloring, color_,\n              )\n\n\tcolor = color_[]\n\n\treturn color\nend \n\n\"\"\"\n\tMatFDColoringDestroy(petsclib::PetscLibType,c::MatFDColoring) \nDestroys a matrix coloring context that was created\nvia `MatFDColoringCreate()`.\n\nCollective\n\nInput Parameter:\n- `c` - coloring context\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringDestroy\"))\n\"\"\"\nfunction MatFDColoringDestroy(petsclib::PetscLibType, c::MatFDColoring) end\n\n@for_petsc function MatFDColoringDestroy(petsclib::$UnionPetscLib, c::MatFDColoring )\n\n    @chk ccall(\n               (:MatFDColoringDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MatFDColoring},),\n               c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt,cols::Vector{PetscInt} = MatFDColoringGetPerturbedColumns(petsclib::PetscLibType,coloring::MatFDColoring) \nReturns the indices of the columns that\nthat are currently being perturbed.\n\nNot Collective\n\nInput Parameter:\n- `coloring` - coloring context created with `MatFDColoringCreate()`\n\nOutput Parameters:\n- `n`    - the number of local columns being perturbed\n- `cols` - the column indices, in global numbering\n\nLevel: advanced\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringDestroy()`, `MatFDColoringView()`, `MatFDColoringApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringGetPerturbedColumns\"))\n\"\"\"\nfunction MatFDColoringGetPerturbedColumns(petsclib::PetscLibType, coloring::MatFDColoring) end\n\n@for_petsc function MatFDColoringGetPerturbedColumns(petsclib::$UnionPetscLib, coloring::MatFDColoring )\n\tn_ = Ref{$PetscInt}()\n\tcols_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:MatFDColoringGetPerturbedColumns, $petsc_library),\n               PetscErrorCode,\n               (MatFDColoring, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               coloring, n_, cols_,\n              )\n\n\tn = n_[]\n\tcols = unsafe_wrap(Array, cols_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,cols\nend \n\n\"\"\"\n\tMatFDColoringApply(petsclib::PetscLibType,J::PetscMat, coloring::MatFDColoring, x1::PetscVec, sctx::Cvoid) \nGiven a matrix for which a `MatFDColoring` context\nhas been created, computes the Jacobian for a function via finite differences.\n\nCollective\n\nInput Parameters:\n- `J`        - matrix to store Jacobian entries into\n- `coloring` - coloring context created with `MatFDColoringCreate()`\n- `x1`       - location at which Jacobian is to be computed\n- `sctx`     - context required by function, if this is being used with the `SNES` solver then it is `SNES` object, otherwise it is `NULL`\n\nOptions Database Keys:\n- `-mat_fd_type`                       - \"wp\" or \"ds\"  (see `MATMFFD_WP` or `MATMFFD_DS`)\n- `-mat_fd_coloring_view`              - Activates basic viewing or coloring\n- `-mat_fd_coloring_view draw`         - Activates drawing of coloring\n- `-mat_fd_coloring_view ::ascii_info` - Activates viewing of coloring info\n\nLevel: intermediate\n\n-seealso: `Mat`, `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringDestroy()`, `MatFDColoringView()`, `MatFDColoringSetFunction()`, `MatFDColoringSetValues()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringApply\"))\n\"\"\"\nfunction MatFDColoringApply(petsclib::PetscLibType, J::PetscMat, coloring::MatFDColoring, x1::PetscVec, sctx::Cvoid) end\n\n@for_petsc function MatFDColoringApply(petsclib::$UnionPetscLib, J::PetscMat, coloring::MatFDColoring, x1::PetscVec, sctx::Cvoid )\n\n    @chk ccall(\n               (:MatFDColoringApply, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatFDColoring, CVec, Ptr{Cvoid}),\n               J, coloring, x1, sctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringSetValues(petsclib::PetscLibType,J::PetscMat, coloring::MatFDColoring, y::Vector{PetscScalar}) \ntakes a matrix in compressed color format and enters the matrix into a PETSc `Mat`\n\nCollective\n\nInput Parameters:\n- `J`        - the sparse matrix\n- `coloring` - created with `MatFDColoringCreate()` and a local coloring\n- `y`        - column major storage of matrix values with one color of values per column, the number of rows of `y` should match\nthe number of local rows of `J` and the number of columns is the number of colors.\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatFDColoringCreate()`, `ISColoring`, `ISColoringCreate()`, `ISColoringSetType()`, `IS_COLORING_LOCAL`, `MatFDColoringSetBlockSize()`\n\n# External Links\n$(_doc_external(\"Mat/MatFDColoringSetValues\"))\n\"\"\"\nfunction MatFDColoringSetValues(petsclib::PetscLibType, J::PetscMat, coloring::MatFDColoring, y::Vector{PetscScalar}) end\n\n@for_petsc function MatFDColoringSetValues(petsclib::$UnionPetscLib, J::PetscMat, coloring::MatFDColoring, y::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:MatFDColoringSetValues, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatFDColoring, Ptr{$PetscScalar}),\n               J, coloring, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatFDColoringUseDM(petsclib::PetscLibType,coloring::PetscMat, fdcoloring::MatFDColoring) \nallows a `MatFDColoring` object to use the `DM` associated with the matrix to compute a `IS_COLORING_LOCAL` coloring\n\nInput Parameters:\n- `coloring`   - The matrix to get the `DM` from\n- `fdcoloring` - the `MatFDColoring` object\n\nLevel: advanced\n\nDeveloper Note:\nThis routine exists because the PETSc `Mat` library does not know about the `DM` objects\n\nSee also: \n=== \n`DM`, `MatFDColoring`, `MatFDColoringCreate()`, `ISColoringType`\n\n# External Links\n$(_doc_external(\"Dm/MatFDColoringUseDM\"))\n\"\"\"\nfunction MatFDColoringUseDM(petsclib::PetscLibType, coloring::PetscMat, fdcoloring::MatFDColoring) end\n\n@for_petsc function MatFDColoringUseDM(petsclib::$UnionPetscLib, coloring::PetscMat, fdcoloring::MatFDColoring )\n\n    @chk ccall(\n               (:MatFDColoringUseDM, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatFDColoring),\n               coloring, fdcoloring,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatTransposeColoringDestroy(petsclib::PetscLibType,c::MatTransposeColoring) \nDestroys a coloring context for matrix product C = A*B^T that was created\nvia `MatTransposeColoringCreate()`.\n\nCollective\n\nInput Parameter:\n- `c` - coloring context\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTransposeColoringCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatTransposeColoringDestroy\"))\n\"\"\"\nfunction MatTransposeColoringDestroy(petsclib::PetscLibType, c::MatTransposeColoring) end\n\n@for_petsc function MatTransposeColoringDestroy(petsclib::$UnionPetscLib, c::MatTransposeColoring )\n\n    @chk ccall(\n               (:MatTransposeColoringDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MatTransposeColoring},),\n               c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcolor::MatTransposeColoring = MatTransposeColoringCreate(petsclib::PetscLibType,mat::PetscMat, iscoloring::ISColoring) \nCreates a matrix coloring context for the matrix product C = A*B^T.\n\nCollective\n\nInput Parameters:\n- `mat`        - the matrix product C\n- `iscoloring` - the coloring of the matrix; usually obtained with `MatColoringCreate()` or `DMCreateColoring()`\n\nOutput Parameter:\n- `color` - the new coloring context\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatTransposeColoringDestroy()`, `MatTransColoringApplySpToDen()`,\n`MatTransColoringApplyDenToSp()`\n\n# External Links\n$(_doc_external(\"Mat/MatTransposeColoringCreate\"))\n\"\"\"\nfunction MatTransposeColoringCreate(petsclib::PetscLibType, mat::PetscMat, iscoloring::ISColoring) end\n\n@for_petsc function MatTransposeColoringCreate(petsclib::$UnionPetscLib, mat::PetscMat, iscoloring::ISColoring )\n\tcolor_ = Ref{MatTransposeColoring}()\n\n    @chk ccall(\n               (:MatTransposeColoringCreate, $petsc_library),\n               PetscErrorCode,\n               (CMat, ISColoring, Ptr{MatTransposeColoring}),\n               mat, iscoloring, color_,\n              )\n\n\tcolor = color_[]\n\n\treturn color\nend \n\n\"\"\"\n\tMatPartitioningRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new sparse matrix partitioning to the  matrix package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of partitioning (for example `MATPARTITIONINGCURRENT`) or `MATPARTITIONINGPARMETIS`\n- `function` - function pointer that creates the partitioning type\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningCreate()`, `MatPartitioningRegisterDestroy()`, `MatPartitioningRegisterAll()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningRegister\"))\n\"\"\"\nfunction MatPartitioningRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function MatPartitioningRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:MatPartitioningRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::MatPartitioningType = MatPartitioningGetType(petsclib::PetscLibType,partitioning::MatPartitioning) \nGets the Partitioning method type and name (as a string)\nfrom the partitioning context.\n\nNot Collective\n\nInput Parameter:\n- `partitioning` - the partitioning context\n\nOutput Parameter:\n- `type` - partitioner type\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningCreate()`, `MatPartitioningRegisterDestroy()`, `MatPartitioningRegisterAll()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningGetType\"))\n\"\"\"\nfunction MatPartitioningGetType(petsclib::PetscLibType, partitioning::MatPartitioning) end\n\n@for_petsc function MatPartitioningGetType(petsclib::$UnionPetscLib, partitioning::MatPartitioning )\n\ttype_ = Ref{MatPartitioningType}()\n\n    @chk ccall(\n               (:MatPartitioningGetType, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{MatPartitioningType}),\n               partitioning, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tMatPartitioningSetNParts(petsclib::PetscLibType,part::MatPartitioning, n::PetscInt) \nSet how many partitions need to be created;\nby default this is one per processor. Certain partitioning schemes may\nin fact only support that option.\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context\n- `n`    - the number of partitions\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetNParts\"))\n\"\"\"\nfunction MatPartitioningSetNParts(petsclib::PetscLibType, part::MatPartitioning, n::PetscInt) end\n\n@for_petsc function MatPartitioningSetNParts(petsclib::$UnionPetscLib, part::MatPartitioning, n::$PetscInt )\n\n    @chk ccall(\n               (:MatPartitioningSetNParts, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscInt),\n               part, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningApplyND(petsclib::PetscLibType,matp::MatPartitioning, partitioning::IS) \nGets a nested dissection partitioning for a matrix.\n\nCollective\n\nInput Parameter:\n- `matp` - the matrix partitioning object\n\nOutput Parameter:\n- `partitioning` - the partitioning. For each local node, a positive value indicates the processor\nnumber the node has been assigned to. Negative x values indicate the separator level -(x+1).\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioningRegister()`, `MatPartitioningCreate()`,\n`MatPartitioningDestroy()`, `MatPartitioningSetAdjacency()`, `ISPartitioningToNumbering()`,\n`ISPartitioningCount()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningApplyND\"))\n\"\"\"\nfunction MatPartitioningApplyND(petsclib::PetscLibType, matp::MatPartitioning, partitioning::IS) end\n\n@for_petsc function MatPartitioningApplyND(petsclib::$UnionPetscLib, matp::MatPartitioning, partitioning::IS )\n\tpartitioning_ = Ref(partitioning.ptr)\n\n    @chk ccall(\n               (:MatPartitioningApplyND, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{CIS}),\n               matp, partitioning_,\n              )\n\n\tpartitioning.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningApply(petsclib::PetscLibType,matp::MatPartitioning, partitioning::IS) \nGets a partitioning for the graph represented by a sparse matrix.\n\nCollective\n\nInput Parameter:\n- `matp` - the matrix partitioning object\n\nOutput Parameter:\n- `partitioning` - the partitioning. For each local node this tells the MPI rank that that node is assigned to.\n\nOptions Database Keys:\n- `-mat_partitioning_type <type>` - set the partitioning package or algorithm to use\n- `-mat_partitioning_view`        - display information about the partitioning object\n\nLevel: beginner\n\nThe user can define additional partitionings; see `MatPartitioningRegister()`.\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningRegister()`, `MatPartitioningCreate()`,\n`MatPartitioningDestroy()`, `MatPartitioningSetAdjacency()`, `ISPartitioningToNumbering()`,\n`ISPartitioningCount()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningApply\"))\n\"\"\"\nfunction MatPartitioningApply(petsclib::PetscLibType, matp::MatPartitioning, partitioning::IS) end\n\n@for_petsc function MatPartitioningApply(petsclib::$UnionPetscLib, matp::MatPartitioning, partitioning::IS )\n\tpartitioning_ = Ref(partitioning.ptr)\n\n    @chk ccall(\n               (:MatPartitioningApply, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{CIS}),\n               matp, partitioning_,\n              )\n\n\tpartitioning.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningImprove(petsclib::PetscLibType,matp::MatPartitioning, partitioning::IS) \nImproves the quality of a given partition.\n\nCollective\n\nInput Parameters:\n- `matp`         - the matrix partitioning object\n- `partitioning` - the original partitioning. For each local node this tells the processor\nnumber that that node is assigned to.\n\nOptions Database Key:\n- `-mat_partitioning_improve` - improve the quality of the given partition\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningApply()`, `MatPartitioningCreate()`,\n`MatPartitioningDestroy()`, `MatPartitioningSetAdjacency()`, `ISPartitioningToNumbering()`,\n`ISPartitioningCount()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningImprove\"))\n\"\"\"\nfunction MatPartitioningImprove(petsclib::PetscLibType, matp::MatPartitioning, partitioning::IS) end\n\n@for_petsc function MatPartitioningImprove(petsclib::$UnionPetscLib, matp::MatPartitioning, partitioning::IS )\n\tpartitioning_ = Ref(partitioning.ptr)\n\n    @chk ccall(\n               (:MatPartitioningImprove, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{CIS}),\n               matp, partitioning_,\n              )\n\n\tpartitioning.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningViewImbalance(petsclib::PetscLibType,matp::MatPartitioning, partitioning::IS) \nDisplay partitioning imbalance information.\n\nCollective\n\nInput Parameters:\n- `matp`         - the matrix partitioning object\n- `partitioning` - the partitioning. For each local node this tells the MPI rank that that node is assigned to.\n\nOptions Database Key:\n- `-mat_partitioning_view_balance` - view the balance information from the last partitioning\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningApply()`, `MatPartitioningView()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningViewImbalance\"))\n\"\"\"\nfunction MatPartitioningViewImbalance(petsclib::PetscLibType, matp::MatPartitioning, partitioning::IS) end\n\n@for_petsc function MatPartitioningViewImbalance(petsclib::$UnionPetscLib, matp::MatPartitioning, partitioning::IS )\n\n    @chk ccall(\n               (:MatPartitioningViewImbalance, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, CIS),\n               matp, partitioning,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningSetAdjacency(petsclib::PetscLibType,part::MatPartitioning, adj::PetscMat) \nSets the adjacency graph (matrix) of the thing to be\npartitioned.\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context\n- `adj`  - the adjacency matrix, this can be any `MatType` but the natural representation is `MATMPIADJ`\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetAdjacency\"))\n\"\"\"\nfunction MatPartitioningSetAdjacency(petsclib::PetscLibType, part::MatPartitioning, adj::PetscMat) end\n\n@for_petsc function MatPartitioningSetAdjacency(petsclib::$UnionPetscLib, part::MatPartitioning, adj::PetscMat )\n\n    @chk ccall(\n               (:MatPartitioningSetAdjacency, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, CMat),\n               part, adj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningDestroy(petsclib::PetscLibType,part::MatPartitioning) \nDestroys the partitioning context.\n\nCollective\n\nInput Parameter:\n- `part` - the partitioning context\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningDestroy\"))\n\"\"\"\nfunction MatPartitioningDestroy(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningDestroy(petsclib::$UnionPetscLib, part::MatPartitioning )\n\n    @chk ccall(\n               (:MatPartitioningDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MatPartitioning},),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningSetVertexWeights(petsclib::PetscLibType,part::MatPartitioning, weights::Vector{PetscInt}) \nSets the weights for vertices for a partitioning.\n\nLogically Collective\n\nInput Parameters:\n- `part`    - the partitioning context\n- `weights` - the weights, on each process this array must have the same size as the number of local rows times the value passed with `MatPartitioningSetNumberVertexWeights()` or\n1 if that is not provided\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningSetType()`, `MatPartitioningSetPartitionWeights()`, `MatPartitioningSetNumberVertexWeights()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetVertexWeights\"))\n\"\"\"\nfunction MatPartitioningSetVertexWeights(petsclib::PetscLibType, part::MatPartitioning, weights::Vector{PetscInt}) end\n\n@for_petsc function MatPartitioningSetVertexWeights(petsclib::$UnionPetscLib, part::MatPartitioning, weights::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatPartitioningSetVertexWeights, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{$PetscInt}),\n               part, weights,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningSetPartitionWeights(petsclib::PetscLibType,part::MatPartitioning, weights::Vector{PetscReal}) \nSets the weights for each partition.\n\nLogically Collective\n\nInput Parameters:\n- `part`    - the partitioning context\n- `weights` - An array of size nparts that is used to specify the fraction of\nvertex weight that should be distributed to each sub-domain for\nthe balance constraint. If all of the sub-domains are to be of\nthe same size, then each of the nparts elements should be set\nto a value of 1/nparts. Note that the sum of all of the weights\nshould be one.\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningSetVertexWeights()`, `MatPartitioningCreate()`, `MatPartitioningSetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetPartitionWeights\"))\n\"\"\"\nfunction MatPartitioningSetPartitionWeights(petsclib::PetscLibType, part::MatPartitioning, weights::Vector{PetscReal}) end\n\n@for_petsc function MatPartitioningSetPartitionWeights(petsclib::$UnionPetscLib, part::MatPartitioning, weights::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:MatPartitioningSetPartitionWeights, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{$PetscReal}),\n               part, weights,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningSetUseEdgeWeights(petsclib::PetscLibType,part::MatPartitioning, use_edge_weights::PetscBool) \nSet a flag to indicate whether or not to use edge weights.\n\nLogically Collective\n\nInput Parameters:\n- `part`             - the partitioning context\n- `use_edge_weights` - the flag indicateing whether or not to use edge weights. By default no edge weights will be used,\nthat is, use_edge_weights is set to FALSE. If set use_edge_weights to TRUE, users need to make sure legal\nedge weights are stored in an ADJ matrix.\n\nOptions Database Key:\n- `-mat_partitioning_use_edge_weights` - (true or false)\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningSetType()`, `MatPartitioningSetVertexWeights()`, `MatPartitioningSetPartitionWeights()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetUseEdgeWeights\"))\n\"\"\"\nfunction MatPartitioningSetUseEdgeWeights(petsclib::PetscLibType, part::MatPartitioning, use_edge_weights::PetscBool) end\n\n@for_petsc function MatPartitioningSetUseEdgeWeights(petsclib::$UnionPetscLib, part::MatPartitioning, use_edge_weights::PetscBool )\n\n    @chk ccall(\n               (:MatPartitioningSetUseEdgeWeights, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, PetscBool),\n               part, use_edge_weights,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuse_edge_weights::PetscBool = MatPartitioningGetUseEdgeWeights(petsclib::PetscLibType,part::MatPartitioning) \nGet a flag that indicates whether or not to edge weights are used.\n\nLogically Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `use_edge_weights` - the flag indicateing whether or not to edge weights are used.\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningSetType()`, `MatPartitioningSetVertexWeights()`, `MatPartitioningSetPartitionWeights()`,\n`MatPartitioningSetUseEdgeWeights`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningGetUseEdgeWeights\"))\n\"\"\"\nfunction MatPartitioningGetUseEdgeWeights(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningGetUseEdgeWeights(petsclib::$UnionPetscLib, part::MatPartitioning )\n\tuse_edge_weights_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatPartitioningGetUseEdgeWeights, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{PetscBool}),\n               part, use_edge_weights_,\n              )\n\n\tuse_edge_weights = use_edge_weights_[]\n\n\treturn use_edge_weights\nend \n\n\"\"\"\n\tnewp::MatPartitioning = MatPartitioningCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a partitioning context.\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `newp` - location to put the context\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningSetType()`, `MatPartitioningApply()`, `MatPartitioningDestroy()`,\n`MatPartitioningSetAdjacency()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningCreate\"))\n\"\"\"\nfunction MatPartitioningCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function MatPartitioningCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tnewp_ = Ref{MatPartitioning}()\n\n    @chk ccall(\n               (:MatPartitioningCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{MatPartitioning}),\n               comm, newp_,\n              )\n\n\tnewp = newp_[]\n\n\treturn newp\nend \n\n\"\"\"\n\tMatPartitioningViewFromOptions(petsclib::PetscLibType,A::MatPartitioning, obj::PetscObject, name::String) \nView a partitioning context from the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the partitioning context\n- `obj`  - Optional object that provides the prefix used in the options database check\n- `name` - command line option\n\nOptions Database Key:\n- `-mat_partitioning_view [viewertype]:...` - the viewer and its options\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningView()`, `PetscObjectViewFromOptions()`, `MatPartitioningCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningViewFromOptions\"))\n\"\"\"\nfunction MatPartitioningViewFromOptions(petsclib::PetscLibType, A::MatPartitioning, obj::PetscObject, name::String) end\n\n@for_petsc function MatPartitioningViewFromOptions(petsclib::$UnionPetscLib, A::MatPartitioning, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:MatPartitioningViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningView(petsclib::PetscLibType,part::MatPartitioning, viewer::PetscViewer) \nPrints the partitioning data structure.\n\nCollective\n\nInput Parameters:\n- `part`   - the partitioning context\n- `viewer` - optional visualization context\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `PetscViewer`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningView\"))\n\"\"\"\nfunction MatPartitioningView(petsclib::PetscLibType, part::MatPartitioning, viewer::PetscViewer) end\n\n@for_petsc function MatPartitioningView(petsclib::$UnionPetscLib, part::MatPartitioning, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatPartitioningView, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, PetscViewer),\n               part, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningSetType(petsclib::PetscLibType,part::MatPartitioning, type::MatPartitioningType) \nSets the type of partitioner to use\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context.\n- `type` - a known method\n\nOptions Database Key:\n- `-mat_partitioning_type  <type>` - (for instance, parmetis), use -help for a list of available methods or see  `MatPartitioningType`\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningApply()`, `MatPartitioningType`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetType\"))\n\"\"\"\nfunction MatPartitioningSetType(petsclib::PetscLibType, part::MatPartitioning, type::MatPartitioningType) end\n\n@for_petsc function MatPartitioningSetType(petsclib::$UnionPetscLib, part::MatPartitioning, type::MatPartitioningType )\n\n    @chk ccall(\n               (:MatPartitioningSetType, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, MatPartitioningType),\n               part, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningSetFromOptions(petsclib::PetscLibType,part::MatPartitioning) \nSets various partitioning options from the\noptions database for the partitioning object\n\nCollective\n\nInput Parameter:\n- `part` - the partitioning context.\n\nOptions Database Keys:\n- `-mat_partitioning_type  <type>` - (for instance, parmetis), use -help for a list of available methods\n- `-mat_partitioning_nparts`       - number of subgraphs\n\nLevel: beginner\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetFromOptions\"))\n\"\"\"\nfunction MatPartitioningSetFromOptions(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningSetFromOptions(petsclib::$UnionPetscLib, part::MatPartitioning )\n\n    @chk ccall(\n               (:MatPartitioningSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning,),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningSetNumberVertexWeights(petsclib::PetscLibType,partitioning::MatPartitioning, ncon::PetscInt) \nSets the number of weights per vertex\n\nNot Collective\n\nInput Parameters:\n- `partitioning` - the partitioning context\n- `ncon`         - the number of weights\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningSetVertexWeights()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningSetNumberVertexWeights\"))\n\"\"\"\nfunction MatPartitioningSetNumberVertexWeights(petsclib::PetscLibType, partitioning::MatPartitioning, ncon::PetscInt) end\n\n@for_petsc function MatPartitioningSetNumberVertexWeights(petsclib::$UnionPetscLib, partitioning::MatPartitioning, ncon::$PetscInt )\n\n    @chk ccall(\n               (:MatPartitioningSetNumberVertexWeights, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscInt),\n               partitioning, ncon,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningHierarchicalGetFineparts(petsclib::PetscLibType,part::MatPartitioning, fineparts::IS) \n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningHierarchicalGetFineparts\"))\n\"\"\"\nfunction MatPartitioningHierarchicalGetFineparts(petsclib::PetscLibType, part::MatPartitioning, fineparts::IS) end\n\n@for_petsc function MatPartitioningHierarchicalGetFineparts(petsclib::$UnionPetscLib, part::MatPartitioning, fineparts::IS )\n\tfineparts_ = Ref(fineparts.ptr)\n\n    @chk ccall(\n               (:MatPartitioningHierarchicalGetFineparts, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{CIS}),\n               part, fineparts_,\n              )\n\n\tfineparts.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningHierarchicalGetCoarseparts(petsclib::PetscLibType,part::MatPartitioning, coarseparts::IS) \n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningHierarchicalGetCoarseparts\"))\n\"\"\"\nfunction MatPartitioningHierarchicalGetCoarseparts(petsclib::PetscLibType, part::MatPartitioning, coarseparts::IS) end\n\n@for_petsc function MatPartitioningHierarchicalGetCoarseparts(petsclib::$UnionPetscLib, part::MatPartitioning, coarseparts::IS )\n\tcoarseparts_ = Ref(coarseparts.ptr)\n\n    @chk ccall(\n               (:MatPartitioningHierarchicalGetCoarseparts, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{CIS}),\n               part, coarseparts_,\n              )\n\n\tcoarseparts.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningHierarchicalSetNcoarseparts(petsclib::PetscLibType,part::MatPartitioning, ncoarseparts::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningHierarchicalSetNcoarseparts\"))\n\"\"\"\nfunction MatPartitioningHierarchicalSetNcoarseparts(petsclib::PetscLibType, part::MatPartitioning, ncoarseparts::PetscInt) end\n\n@for_petsc function MatPartitioningHierarchicalSetNcoarseparts(petsclib::$UnionPetscLib, part::MatPartitioning, ncoarseparts::$PetscInt )\n\n    @chk ccall(\n               (:MatPartitioningHierarchicalSetNcoarseparts, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscInt),\n               part, ncoarseparts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningHierarchicalSetNfineparts(petsclib::PetscLibType,part::MatPartitioning, nfineparts::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningHierarchicalSetNfineparts\"))\n\"\"\"\nfunction MatPartitioningHierarchicalSetNfineparts(petsclib::PetscLibType, part::MatPartitioning, nfineparts::PetscInt) end\n\n@for_petsc function MatPartitioningHierarchicalSetNfineparts(petsclib::$UnionPetscLib, part::MatPartitioning, nfineparts::$PetscInt )\n\n    @chk ccall(\n               (:MatPartitioningHierarchicalSetNfineparts, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscInt),\n               part, nfineparts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningPartySetGlobal(petsclib::PetscLibType,part::MatPartitioning, glob::String) \nSet global method for Party partitioner.\n\nCollective\n\nInput Parameters:\n- `part`   - the partitioning context\n- `global` - a string representing the method\n\nOptions Database Key:\n- `-mat_partitioning_party_global <method>` - the global method\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARTY`, `MatPartitioningPartySetLocal()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPartySetGlobal\"))\n\"\"\"\nfunction MatPartitioningPartySetGlobal(petsclib::PetscLibType, part::MatPartitioning, glob::String) end\n\n@for_petsc function MatPartitioningPartySetGlobal(petsclib::$UnionPetscLib, part::MatPartitioning, glob::String )\n\n    @chk ccall(\n               (:MatPartitioningPartySetGlobal, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{Cchar}),\n               part, glob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningPartySetLocal(petsclib::PetscLibType,part::MatPartitioning, loc::String) \nSet local method used by the Party partitioner.\n\nCollective\n\nInput Parameters:\n- `part`  - the partitioning context\n- `local` - a string representing the method\n\nOptions Database Key:\n- `-mat_partitioning_party_local <method>` - the local method\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARTY`, `MatPartitioningPartySetGlobal()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPartySetLocal\"))\n\"\"\"\nfunction MatPartitioningPartySetLocal(petsclib::PetscLibType, part::MatPartitioning, loc::String) end\n\n@for_petsc function MatPartitioningPartySetLocal(petsclib::$UnionPetscLib, part::MatPartitioning, loc::String )\n\n    @chk ccall(\n               (:MatPartitioningPartySetLocal, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{Cchar}),\n               part, loc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningPartySetCoarseLevel(petsclib::PetscLibType,part::MatPartitioning, level::PetscReal) \nSet the coarse level parameter for the\nParty partitioner.\n\nCollective\n\nInput Parameters:\n- `part`  - the partitioning context\n- `level` - the coarse level in range [0.0,1.0]\n\nOptions Database Key:\n- `-mat_partitioning_party_coarse <l>` - Coarse level\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARTY`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPartySetCoarseLevel\"))\n\"\"\"\nfunction MatPartitioningPartySetCoarseLevel(petsclib::PetscLibType, part::MatPartitioning, level::PetscReal) end\n\n@for_petsc function MatPartitioningPartySetCoarseLevel(petsclib::$UnionPetscLib, part::MatPartitioning, level::$PetscReal )\n\n    @chk ccall(\n               (:MatPartitioningPartySetCoarseLevel, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscReal),\n               part, level,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningPartySetMatchOptimization(petsclib::PetscLibType,part::MatPartitioning, opt::PetscBool) \nActivate matching optimization for\ngraph reduction.\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context\n- `opt`  - boolean flag\n\nOptions Database Key:\n- `-mat_partitioning_party_match_optimization` - Matching optimization on/off\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARTY`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPartySetMatchOptimization\"))\n\"\"\"\nfunction MatPartitioningPartySetMatchOptimization(petsclib::PetscLibType, part::MatPartitioning, opt::PetscBool) end\n\n@for_petsc function MatPartitioningPartySetMatchOptimization(petsclib::$UnionPetscLib, part::MatPartitioning, opt::PetscBool )\n\n    @chk ccall(\n               (:MatPartitioningPartySetMatchOptimization, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, PetscBool),\n               part, opt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningPartySetBipart(petsclib::PetscLibType,part::MatPartitioning, bp::PetscBool) \nActivate or deactivate recursive bisection in the Party partitioner\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context\n- `bp`   - boolean flag\n\nOptions Database Key:\n- `-mat_partitioning_party_bipart` - Bipartitioning option on/off\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARTY`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPartySetBipart\"))\n\"\"\"\nfunction MatPartitioningPartySetBipart(petsclib::PetscLibType, part::MatPartitioning, bp::PetscBool) end\n\n@for_petsc function MatPartitioningPartySetBipart(petsclib::$UnionPetscLib, part::MatPartitioning, bp::PetscBool )\n\n    @chk ccall(\n               (:MatPartitioningPartySetBipart, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, PetscBool),\n               part, bp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningParmetisSetCoarseSequential(petsclib::PetscLibType,part::MatPartitioning) \nUse the sequential code to\ndo the partitioning of the coarse grid.\n\nLogically Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARMETIS`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningParmetisSetCoarseSequential\"))\n\"\"\"\nfunction MatPartitioningParmetisSetCoarseSequential(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningParmetisSetCoarseSequential(petsclib::$UnionPetscLib, part::MatPartitioning )\n\n    @chk ccall(\n               (:MatPartitioningParmetisSetCoarseSequential, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning,),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningParmetisSetRepartition(petsclib::PetscLibType,part::MatPartitioning) \nRepartition\ncurrent mesh to rebalance computation.\n\nLogically Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARMETIS`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningParmetisSetRepartition\"))\n\"\"\"\nfunction MatPartitioningParmetisSetRepartition(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningParmetisSetRepartition(petsclib::$UnionPetscLib, part::MatPartitioning )\n\n    @chk ccall(\n               (:MatPartitioningParmetisSetRepartition, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning,),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcut::PetscInt = MatPartitioningParmetisGetEdgeCut(petsclib::PetscLibType,part::MatPartitioning) \nReturns the number of edge cuts in the vertex partition.\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `cut` - the edge cut\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGPARMETIS`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningParmetisGetEdgeCut\"))\n\"\"\"\nfunction MatPartitioningParmetisGetEdgeCut(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningParmetisGetEdgeCut(petsclib::$UnionPetscLib, part::MatPartitioning )\n\tcut_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatPartitioningParmetisGetEdgeCut, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{$PetscInt}),\n               part, cut_,\n              )\n\n\tcut = cut_[]\n\n\treturn cut\nend \n\n\"\"\"\n\tMatPartitioningPTScotchSetImbalance(petsclib::PetscLibType,part::MatPartitioning, imb::PetscReal) \nSets the value of the load imbalance\nratio to be used during strategy selection.\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context\n- `imb`  - the load imbalance ratio\n\nOptions Database Key:\n- `-mat_partitioning_ptscotch_imbalance <imb>` - set load imbalance ratio\n\n-seealso: `MATPARTITIONINGSCOTCH`, `MatPartitioningPTScotchSetStrategy()`, `MatPartitioningPTScotchGetImbalance()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPTScotchSetImbalance\"))\n\"\"\"\nfunction MatPartitioningPTScotchSetImbalance(petsclib::PetscLibType, part::MatPartitioning, imb::PetscReal) end\n\n@for_petsc function MatPartitioningPTScotchSetImbalance(petsclib::$UnionPetscLib, part::MatPartitioning, imb::$PetscReal )\n\n    @chk ccall(\n               (:MatPartitioningPTScotchSetImbalance, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscReal),\n               part, imb,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\timb::PetscReal = MatPartitioningPTScotchGetImbalance(petsclib::PetscLibType,part::MatPartitioning) \nGets the value of the load imbalance\nratio used during strategy selection.\n\nNot Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `imb` - the load imbalance ratio\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGSCOTCH`, `MatPartitioningPTScotchSetImbalance()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPTScotchGetImbalance\"))\n\"\"\"\nfunction MatPartitioningPTScotchGetImbalance(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningPTScotchGetImbalance(petsclib::$UnionPetscLib, part::MatPartitioning )\n\timb_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatPartitioningPTScotchGetImbalance, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{$PetscReal}),\n               part, imb_,\n              )\n\n\timb = imb_[]\n\n\treturn imb\nend \n\n\"\"\"\n\tMatPartitioningPTScotchSetStrategy(petsclib::PetscLibType,part::MatPartitioning, strategy::MPPTScotchStrategyType) \nSets the strategy to be used in PTScotch.\n\nCollective\n\nInput Parameters:\n- `part`     - the partitioning context\n- `strategy` - the strategy, one of\n-seealso: `MATPARTITIONINGSCOTCH`, `MatPartitioningPTScotchSetImbalance()`, `MatPartitioningPTScotchGetStrategy()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPTScotchSetStrategy\"))\n\"\"\"\nfunction MatPartitioningPTScotchSetStrategy(petsclib::PetscLibType, part::MatPartitioning, strategy::MPPTScotchStrategyType) end\n\n@for_petsc function MatPartitioningPTScotchSetStrategy(petsclib::$UnionPetscLib, part::MatPartitioning, strategy::MPPTScotchStrategyType )\n\n    @chk ccall(\n               (:MatPartitioningPTScotchSetStrategy, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, MPPTScotchStrategyType),\n               part, strategy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningPTScotchGetStrategy(petsclib::PetscLibType,part::MatPartitioning, strategy::MPPTScotchStrategyType) \nGets the strategy used in PTScotch.\n\nNot Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `strategy` - the strategy\n\nLevel: advanced\n\n-seealso: `MATPARTITIONINGSCOTCH`, `MatPartitioningPTScotchSetStrategy()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningPTScotchGetStrategy\"))\n\"\"\"\nfunction MatPartitioningPTScotchGetStrategy(petsclib::PetscLibType, part::MatPartitioning, strategy::MPPTScotchStrategyType) end\n\n@for_petsc function MatPartitioningPTScotchGetStrategy(petsclib::$UnionPetscLib, part::MatPartitioning, strategy::MPPTScotchStrategyType )\n\n    @chk ccall(\n               (:MatPartitioningPTScotchGetStrategy, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{MPPTScotchStrategyType}),\n               part, strategy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoSetGlobal(petsclib::PetscLibType,part::MatPartitioning, method::MPChacoGlobalType) \nSet the global method for Chaco partitioner.\n\nCollective\n\nInput Parameters:\n- `part`   - the partitioning context\n- `method` - one of `MP_CHACO_MULTILEVEL`, `MP_CHACO_SPECTRAL`, `MP_CHACO_LINEAR`,\n`MP_CHACO_RANDOM` or `MP_CHACO_SCATTERED`\n\nOptions Database Key:\n- `-mat_partitioning_chaco_global <method>` - the global method\n\nLevel: advanced\n\n-seealso: `MatPartitioning`, `MatPartioningSetType()`, `MatPartitioningType`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetLocal()`, `MatPartitioningChacoGetGlobal()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoSetGlobal\"))\n\"\"\"\nfunction MatPartitioningChacoSetGlobal(petsclib::PetscLibType, part::MatPartitioning, method::MPChacoGlobalType) end\n\n@for_petsc function MatPartitioningChacoSetGlobal(petsclib::$UnionPetscLib, part::MatPartitioning, method::MPChacoGlobalType )\n\n    @chk ccall(\n               (:MatPartitioningChacoSetGlobal, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, MPChacoGlobalType),\n               part, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoGetGlobal(petsclib::PetscLibType,part::MatPartitioning, method::MPChacoGlobalType) \nGet the global method used by the Chaco partitioner.\n\nNot Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `method` - the method\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetGlobal()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoGetGlobal\"))\n\"\"\"\nfunction MatPartitioningChacoGetGlobal(petsclib::PetscLibType, part::MatPartitioning, method::MPChacoGlobalType) end\n\n@for_petsc function MatPartitioningChacoGetGlobal(petsclib::$UnionPetscLib, part::MatPartitioning, method::MPChacoGlobalType )\n\n    @chk ccall(\n               (:MatPartitioningChacoGetGlobal, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{MPChacoGlobalType}),\n               part, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoSetLocal(petsclib::PetscLibType,part::MatPartitioning, method::MPChacoLocalType) \nSet the local method for the Chaco partitioner.\n\nCollective\n\nInput Parameters:\n- `part`   - the partitioning context\n- `method` - one of `MP_CHACO_KERNIGHAN` or `MP_CHACO_NONE`\n\nOptions Database Key:\n- `-mat_partitioning_chaco_local <method>` - the local method\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetGlobal()`, `MatPartitioningChacoGetLocal()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoSetLocal\"))\n\"\"\"\nfunction MatPartitioningChacoSetLocal(petsclib::PetscLibType, part::MatPartitioning, method::MPChacoLocalType) end\n\n@for_petsc function MatPartitioningChacoSetLocal(petsclib::$UnionPetscLib, part::MatPartitioning, method::MPChacoLocalType )\n\n    @chk ccall(\n               (:MatPartitioningChacoSetLocal, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, MPChacoLocalType),\n               part, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoGetLocal(petsclib::PetscLibType,part::MatPartitioning, method::MPChacoLocalType) \nGet local method used by the Chaco partitioner.\n\nNot Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `method` - the method\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetLocal()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoGetLocal\"))\n\"\"\"\nfunction MatPartitioningChacoGetLocal(petsclib::PetscLibType, part::MatPartitioning, method::MPChacoLocalType) end\n\n@for_petsc function MatPartitioningChacoGetLocal(petsclib::$UnionPetscLib, part::MatPartitioning, method::MPChacoLocalType )\n\n    @chk ccall(\n               (:MatPartitioningChacoGetLocal, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{MPChacoLocalType}),\n               part, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoSetCoarseLevel(petsclib::PetscLibType,part::MatPartitioning, level::PetscReal) \nSet the coarse level parameter for the\nChaco partitioner.\n\nCollective\n\nInput Parameters:\n- `part`  - the partitioning context\n- `level` - the coarse level in range [0.0,1.0]\n\nOptions Database Key:\n- `-mat_partitioning_chaco_coarse <l>` - Coarse level\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MatPartitioning`, `MATPARTITIONINGCHACO`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoSetCoarseLevel\"))\n\"\"\"\nfunction MatPartitioningChacoSetCoarseLevel(petsclib::PetscLibType, part::MatPartitioning, level::PetscReal) end\n\n@for_petsc function MatPartitioningChacoSetCoarseLevel(petsclib::$UnionPetscLib, part::MatPartitioning, level::$PetscReal )\n\n    @chk ccall(\n               (:MatPartitioningChacoSetCoarseLevel, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscReal),\n               part, level,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoSetEigenSolver(petsclib::PetscLibType,part::MatPartitioning, method::MPChacoEigenType) \nSet the eigensolver method for Chaco partitioner.\n\nCollective\n\nInput Parameters:\n- `part`   - the partitioning context\n- `method` - one of `MP_CHACO_LANCZOS` or `MP_CHACO_RQI`\n\nOptions Database Key:\n- `-mat_partitioning_chaco_eigen_solver <method>` - the eigensolver\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MatPartitioning`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetEigenTol()`, `MatPartitioningChacoSetEigenNumber()`,\n`MatPartitioningChacoGetEigenSolver()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoSetEigenSolver\"))\n\"\"\"\nfunction MatPartitioningChacoSetEigenSolver(petsclib::PetscLibType, part::MatPartitioning, method::MPChacoEigenType) end\n\n@for_petsc function MatPartitioningChacoSetEigenSolver(petsclib::$UnionPetscLib, part::MatPartitioning, method::MPChacoEigenType )\n\n    @chk ccall(\n               (:MatPartitioningChacoSetEigenSolver, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, MPChacoEigenType),\n               part, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoGetEigenSolver(petsclib::PetscLibType,part::MatPartitioning, method::MPChacoEigenType) \nGet the eigensolver used by the Chaco partitioner.\n\nNot Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `method` - the method\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MatPartitioning`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetEigenSolver()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoGetEigenSolver\"))\n\"\"\"\nfunction MatPartitioningChacoGetEigenSolver(petsclib::PetscLibType, part::MatPartitioning, method::MPChacoEigenType) end\n\n@for_petsc function MatPartitioningChacoGetEigenSolver(petsclib::$UnionPetscLib, part::MatPartitioning, method::MPChacoEigenType )\n\n    @chk ccall(\n               (:MatPartitioningChacoGetEigenSolver, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{MPChacoEigenType}),\n               part, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatPartitioningChacoSetEigenTol(petsclib::PetscLibType,part::MatPartitioning, tol::PetscReal) \nSets the tolerance for the eigensolver used by Chaco\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context\n- `tol`  - the tolerance\n\nOptions Database Key:\n- `-mat_partitioning_chaco_eigen_tol <tol>` - Tolerance for eigensolver\n\n-seealso: `MatPartitioningType`, `MatPartitioning`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetEigenSolver()`, `MatPartitioningChacoGetEigenTol()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoSetEigenTol\"))\n\"\"\"\nfunction MatPartitioningChacoSetEigenTol(petsclib::PetscLibType, part::MatPartitioning, tol::PetscReal) end\n\n@for_petsc function MatPartitioningChacoSetEigenTol(petsclib::$UnionPetscLib, part::MatPartitioning, tol::$PetscReal )\n\n    @chk ccall(\n               (:MatPartitioningChacoSetEigenTol, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscReal),\n               part, tol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttol::PetscReal = MatPartitioningChacoGetEigenTol(petsclib::PetscLibType,part::MatPartitioning) \nGets the eigensolver tolerance used by Chaco\n\nNot Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `tol` - the tolerance\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MatPartitioning`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetEigenTol()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoGetEigenTol\"))\n\"\"\"\nfunction MatPartitioningChacoGetEigenTol(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningChacoGetEigenTol(petsclib::$UnionPetscLib, part::MatPartitioning )\n\ttol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:MatPartitioningChacoGetEigenTol, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{$PetscReal}),\n               part, tol_,\n              )\n\n\ttol = tol_[]\n\n\treturn tol\nend \n\n\"\"\"\n\tMatPartitioningChacoSetEigenNumber(petsclib::PetscLibType,part::MatPartitioning, num::PetscInt) \nSets the number of eigenvectors to compute by Chaco during partitioning\nduring partitioning.\n\nCollective\n\nInput Parameters:\n- `part` - the partitioning context\n- `num`  - the number of eigenvectors\n\nOptions Database Key:\n- `-mat_partitioning_chaco_eigen_number <n>` - Number of eigenvectors\n\n-seealso: `MatPartitioningType`, `MatPartitioning`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetEigenSolver()`, `MatPartitioningChacoGetEigenTol()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoSetEigenNumber\"))\n\"\"\"\nfunction MatPartitioningChacoSetEigenNumber(petsclib::PetscLibType, part::MatPartitioning, num::PetscInt) end\n\n@for_petsc function MatPartitioningChacoSetEigenNumber(petsclib::$UnionPetscLib, part::MatPartitioning, num::$PetscInt )\n\n    @chk ccall(\n               (:MatPartitioningChacoSetEigenNumber, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, $PetscInt),\n               part, num,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum::PetscInt = MatPartitioningChacoGetEigenNumber(petsclib::PetscLibType,part::MatPartitioning) \nGets the number of eigenvectors used by Chaco.\n\nNot Collective\n\nInput Parameter:\n- `part` - the partitioning context\n\nOutput Parameter:\n- `num` - number of eigenvectors\n\nLevel: advanced\n\n-seealso: `MatPartitioningType`, `MatPartitioning`, `MATPARTITIONINGCHACO`, `MatPartitioningChacoSetEigenNumber()`\n\n# External Links\n$(_doc_external(\"Mat/MatPartitioningChacoGetEigenNumber\"))\n\"\"\"\nfunction MatPartitioningChacoGetEigenNumber(petsclib::PetscLibType, part::MatPartitioning) end\n\n@for_petsc function MatPartitioningChacoGetEigenNumber(petsclib::$UnionPetscLib, part::MatPartitioning )\n\tnum_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatPartitioningChacoGetEigenNumber, $petsc_library),\n               PetscErrorCode,\n               (MatPartitioning, Ptr{$PetscInt}),\n               part, num_,\n              )\n\n\tnum = num_[]\n\n\treturn num\nend \n\n\"\"\"\n\tMatNullSpaceSetFunction(petsclib::PetscLibType,sp::MatNullSpace, rem::MatNullSpaceRemoveFn, ctx::Cvoid) \nset a function that removes a null space from a vector\nout of null spaces.\n\nLogically Collective\n\nInput Parameters:\n- `sp`  - the `MatNullSpace` null space object\n- `rem` - the function that removes the null space\n- `ctx` - context for the remove function\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatNullSpaceDestroy()`, `MatNullSpaceRemove()`, `MatSetNullSpace()`, `MatNullSpaceCreate()`, `MatNullSpaceRemoveFn`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceSetFunction\"))\n\"\"\"\nfunction MatNullSpaceSetFunction(petsclib::PetscLibType, sp::MatNullSpace, rem::MatNullSpaceRemoveFn, ctx::Cvoid) end\n\n@for_petsc function MatNullSpaceSetFunction(petsclib::$UnionPetscLib, sp::MatNullSpace, rem::MatNullSpaceRemoveFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:MatNullSpaceSetFunction, $petsc_library),\n               PetscErrorCode,\n               (MatNullSpace, Ptr{MatNullSpaceRemoveFn}, Ptr{Cvoid}),\n               sp, rem, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thas_const::PetscBool,n::PetscInt = MatNullSpaceGetVecs(petsclib::PetscLibType,sp::MatNullSpace, vecs::Vector{PetscVec}) \nget the vectors defining the null space\n\nNot Collective\n\nInput Parameter:\n- `sp` - null space object\n\nOutput Parameters:\n- `has_const` - `PETSC_TRUE` if the null space contains the constant vector, otherwise `PETSC_FALSE`\n- `n`         - number of vectors (excluding constant vector) in the null space\n- `vecs`      - returns array of length `n` containing the orthonormal vectors that span the null space (excluding the constant vector), `NULL` if `n` is 0\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatNullSpaceCreate()`, `MatGetNullSpace()`, `MatGetNearNullSpace()`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceGetVecs\"))\n\"\"\"\nfunction MatNullSpaceGetVecs(petsclib::PetscLibType, sp::MatNullSpace, vecs::Vector{PetscVec}) end\n\n@for_petsc function MatNullSpaceGetVecs(petsclib::$UnionPetscLib, sp::MatNullSpace, vecs::Vector{PetscVec} )\n\thas_const_ = Ref{PetscBool}()\n\tn_ = Ref{$PetscInt}()\n\tvecs_ = Ref(pointer(vecs))\n\n    @chk ccall(\n               (:MatNullSpaceGetVecs, $petsc_library),\n               PetscErrorCode,\n               (MatNullSpace, Ptr{PetscBool}, Ptr{$PetscInt}, Ptr{Ptr{CVec}}),\n               sp, has_const_, n_, vecs_,\n              )\n\n\thas_const = has_const_[]\n\tn = n_[]\n\n\treturn has_const,n\nend \n\n\"\"\"\n\tsp::MatNullSpace = MatNullSpaceCreateRigidBody(petsclib::PetscLibType,coords::PetscVec) \ncreate rigid body modes from coordinates\n\nCollective\n\nInput Parameter:\n- `coords` - block of coordinates of each node, must have block size set\n\nOutput Parameter:\n- `sp` - the null space\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatSetNullSpace()`, `PCGAMG`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceCreateRigidBody\"))\n\"\"\"\nfunction MatNullSpaceCreateRigidBody(petsclib::PetscLibType, coords::PetscVec) end\n\n@for_petsc function MatNullSpaceCreateRigidBody(petsclib::$UnionPetscLib, coords::PetscVec )\n\tsp_ = Ref{MatNullSpace}()\n\n    @chk ccall(\n               (:MatNullSpaceCreateRigidBody, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{MatNullSpace}),\n               coords, sp_,\n              )\n\n\tsp = sp_[]\n\n\treturn sp\nend \n\n\"\"\"\n\tMatNullSpaceView(petsclib::PetscLibType,sp::MatNullSpace, viewer::PetscViewer) \nVisualizes a null space object.\n\nCollective\n\nInput Parameters:\n- `sp`     - the null space\n- `viewer` - visualization context\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `PetscViewer`, `MatNullSpaceCreate()`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceView\"))\n\"\"\"\nfunction MatNullSpaceView(petsclib::PetscLibType, sp::MatNullSpace, viewer::PetscViewer) end\n\n@for_petsc function MatNullSpaceView(petsclib::$UnionPetscLib, sp::MatNullSpace, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatNullSpaceView, $petsc_library),\n               PetscErrorCode,\n               (MatNullSpace, PetscViewer),\n               sp, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSP::MatNullSpace = MatNullSpaceCreate(petsclib::PetscLibType,comm::MPI_Comm, has_cnst::PetscBool, n::PetscInt, vecs::Vector{PetscVec}) \nCreates a `MatNullSpace` data structure used to project vectors out of null spaces.\n\nCollective\n\nInput Parameters:\n- `comm`     - the MPI communicator associated with the object\n- `has_cnst` - `PETSC_TRUE` if the null space contains the constant vector; otherwise `PETSC_FALSE`\n- `n`        - number of vectors (excluding constant vector) in null space\n- `vecs`     - the vectors that span the null space (excluding the constant vector);\nthese vectors must be orthonormal. These vectors are NOT copied, so do not change them\nafter this call. You should free the array that you pass in and destroy the vectors (this will reduce the reference count\nfor them by one).\n\nOutput Parameter:\n- `SP` - the null space context\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatNullSpaceDestroy()`, `MatNullSpaceRemove()`, `MatSetNullSpace()`, `MatNullSpaceSetFunction()`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceCreate\"))\n\"\"\"\nfunction MatNullSpaceCreate(petsclib::PetscLibType, comm::MPI_Comm, has_cnst::PetscBool, n::PetscInt, vecs::Vector{PetscVec}) end\n\n@for_petsc function MatNullSpaceCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, has_cnst::PetscBool, n::$PetscInt, vecs::Vector{PetscVec} )\n\tSP_ = Ref{MatNullSpace}()\n\n    @chk ccall(\n               (:MatNullSpaceCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscBool, $PetscInt, Ptr{CVec}, Ptr{MatNullSpace}),\n               comm, has_cnst, n, vecs, SP_,\n              )\n\n\tSP = SP_[]\n\n\treturn SP\nend \n\n\"\"\"\n\tMatNullSpaceDestroy(petsclib::PetscLibType,sp::MatNullSpace) \nDestroys a data structure used to project vectors out of null spaces.\n\nCollective\n\nInput Parameter:\n- `sp` - the null space context to be destroyed\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatNullSpaceCreate()`, `MatNullSpaceRemove()`, `MatNullSpaceSetFunction()`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceDestroy\"))\n\"\"\"\nfunction MatNullSpaceDestroy(petsclib::PetscLibType, sp::MatNullSpace) end\n\n@for_petsc function MatNullSpaceDestroy(petsclib::$UnionPetscLib, sp::MatNullSpace )\n\n    @chk ccall(\n               (:MatNullSpaceDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MatNullSpace},),\n               Ref(sp),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatNullSpaceRemove(petsclib::PetscLibType,sp::MatNullSpace, vec::PetscVec) \nRemoves all the components of a null space from a vector.\n\nCollective\n\nInput Parameters:\n- `sp`  - the null space context (if this is `NULL` then no null space is removed)\n- `vec` - the vector from which the null space is to be removed\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatNullSpaceCreate()`, `MatNullSpaceDestroy()`, `MatNullSpaceSetFunction()`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceRemove\"))\n\"\"\"\nfunction MatNullSpaceRemove(petsclib::PetscLibType, sp::MatNullSpace, vec::PetscVec) end\n\n@for_petsc function MatNullSpaceRemove(petsclib::$UnionPetscLib, sp::MatNullSpace, vec::PetscVec )\n\n    @chk ccall(\n               (:MatNullSpaceRemove, $petsc_library),\n               PetscErrorCode,\n               (MatNullSpace, CVec),\n               sp, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisNull::PetscBool = MatNullSpaceTest(petsclib::PetscLibType,sp::MatNullSpace, mat::PetscMat) \nTests if the claimed null space is really a null space of a matrix\n\nCollective\n\nInput Parameters:\n- `sp`  - the null space context\n- `mat` - the matrix\n\nOutput Parameter:\n- `isNull` - `PETSC_TRUE` if the nullspace is valid for this matrix\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MatNullSpace`, `MatNullSpaceCreate()`, `MatNullSpaceDestroy()`, `MatNullSpaceSetFunction()`\n\n# External Links\n$(_doc_external(\"Mat/MatNullSpaceTest\"))\n\"\"\"\nfunction MatNullSpaceTest(petsclib::PetscLibType, sp::MatNullSpace, mat::PetscMat) end\n\n@for_petsc function MatNullSpaceTest(petsclib::$UnionPetscLib, sp::MatNullSpace, mat::PetscMat )\n\tisNull_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:MatNullSpaceTest, $petsc_library),\n               PetscErrorCode,\n               (MatNullSpace, CMat, Ptr{PetscBool}),\n               sp, mat, isNull_,\n              )\n\n\tisNull = isNull_[]\n\n\treturn isNull\nend \n\n\"\"\"\n\tMatMFFDWPSetComputeNormU(petsclib::PetscLibType,A::PetscMat, flag::PetscBool) \nSets whether it computes the ||U|| used by the Walker\nPETSc routine for computing h. With any Krylov solver this need only\nbe computed during the first iteration and kept for later.\n\nInput Parameters:\n- `A`    - the `MATMFFD` matrix\n- `flag` - `PETSC_TRUE` causes it to compute ||U||, `PETSC_FALSE` uses the previous value\n\nOptions Database Key:\n- `-mat_mffd_compute_normu <true,false>` - true by default, false can save calculations but you\nmust be sure that ||U|| has not changed in the mean time.\n\nLevel: advanced\n\n-seealso: `MATMFFD_WP`, `MATMFFD`, `MatMFFDSetFunctionError()`, `MatCreateSNESMF()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDWPSetComputeNormU\"))\n\"\"\"\nfunction MatMFFDWPSetComputeNormU(petsclib::PetscLibType, A::PetscMat, flag::PetscBool) end\n\n@for_petsc function MatMFFDWPSetComputeNormU(petsclib::$UnionPetscLib, A::PetscMat, flag::PetscBool )\n\n    @chk ccall(\n               (:MatMFFDWPSetComputeNormU, $petsc_library),\n               PetscErrorCode,\n               (CMat, PetscBool),\n               A, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the MATMFFD` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `PetscFinalize()`, `MatCreateMFFD()`, `MatCreateSNESMF()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDFinalizePackage\"))\n\"\"\"\nfunction MatMFFDFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function MatMFFDFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:MatMFFDFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the MATMFFD` package. It is called\nfrom `MatInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDInitializePackage\"))\n\"\"\"\nfunction MatMFFDInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function MatMFFDInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:MatMFFDInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetType(petsclib::PetscLibType,mat::PetscMat, ftype::MatMFFDType) \nSets the method that is used to compute the\ndifferencing parameter for finite difference matrix-free formulations.\n\nInput Parameters:\n- `mat`   - the \"matrix-free\" matrix created via `MatCreateSNESMF()`, or `MatCreateMFFD()`\nor `MatSetType`(mat,`MATMFFD`);\n- `ftype` - the type requested, either `MATMFFD_WP` or `MATMFFD_DS`\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MATMFFD_WP`, `MATMFFD_DS`, `MatCreateSNESMF()`, `MatMFFDRegister()`, `MatMFFDSetFunction()`, `MatCreateMFFD()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetType\"))\n\"\"\"\nfunction MatMFFDSetType(petsclib::PetscLibType, mat::PetscMat, ftype::MatMFFDType) end\n\n@for_petsc function MatMFFDSetType(petsclib::$UnionPetscLib, mat::PetscMat, ftype::MatMFFDType )\n\n    @chk ccall(\n               (:MatMFFDSetType, $petsc_library),\n               PetscErrorCode,\n               (CMat, MatMFFDType),\n               mat, ftype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a method to the `MATMFFD` registry.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined compute-h module\n- `function` - routine to create method context\n\nLevel: developer\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMFFDRegisterAll()`, `MatMFFDRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDRegister\"))\n\"\"\"\nfunction MatMFFDRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function MatMFFDRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:MatMFFDRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetOptionsPrefix(petsclib::PetscLibType,mat::PetscMat, prefix::String) \nSets the prefix used for searching for all\nMATMFFD` options in the database.\n\nCollective\n\nInput Parameters:\n- `mat`    - the `MATMFFD` context\n- `prefix` - the prefix to prepend to all option names\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatSetFromOptions()`, `MatCreateSNESMF()`, `MatCreateMFFD()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetOptionsPrefix\"))\n\"\"\"\nfunction MatMFFDSetOptionsPrefix(petsclib::PetscLibType, mat::PetscMat, prefix::String) end\n\n@for_petsc function MatMFFDSetOptionsPrefix(petsclib::$UnionPetscLib, mat::PetscMat, prefix::String )\n\n    @chk ccall(\n               (:MatMFFDSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{Cchar}),\n               mat, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\th::PetscScalar = MatMFFDGetH(petsclib::PetscLibType,mat::PetscMat) \nGets the last value that was used as the differencing for a `MATMFFD` matrix\nparameter.\n\nNot Collective\n\nInput Parameters:\n- `mat` - the `MATMFFD` matrix\n\nOutput Parameter:\n- `h` - the differencing step size\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatCreateSNESMF()`, `MatMFFDSetHHistory()`, `MatCreateMFFD()`, `MatMFFDResetHHistory()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDGetH\"))\n\"\"\"\nfunction MatMFFDGetH(petsclib::PetscLibType, mat::PetscMat) end\n\n@for_petsc function MatMFFDGetH(petsclib::$UnionPetscLib, mat::PetscMat )\n\th_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:MatMFFDGetH, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}),\n               mat, h_,\n              )\n\n\th = h_[]\n\n\treturn h\nend \n\n\"\"\"\n\tMatMFFDSetFunction(petsclib::PetscLibType,mat::PetscMat, func::MatMFFDFn, funcctx::Cvoid) \nSets the function used in applying the matrix\n\nLogically Collective\n\nInput Parameters:\n- `mat`     - the matrix-free matrix `MATMFFD` created via `MatCreateSNESMF()` or `MatCreateMFFD()`\n- `func`    - the function to use\n- `funcctx` - optional function context passed to function\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMFFDFn`, `MatCreateSNESMF()`, `MatMFFDGetH()`, `MatCreateMFFD()`,\n`MatMFFDSetHHistory()`, `MatMFFDResetHHistory()`, `SNESSetFunction()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetFunction\"))\n\"\"\"\nfunction MatMFFDSetFunction(petsclib::PetscLibType, mat::PetscMat, func::MatMFFDFn, funcctx::Cvoid) end\n\n@for_petsc function MatMFFDSetFunction(petsclib::$UnionPetscLib, mat::PetscMat, func::MatMFFDFn, funcctx::Cvoid )\n\n    @chk ccall(\n               (:MatMFFDSetFunction, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatMFFDFn}, Ptr{Cvoid}),\n               mat, func, funcctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetFunctioni(petsclib::PetscLibType,mat::PetscMat, funci::MatMFFDiFn) \nSets the function for computing a single component for a `MATMFFD` matrix\n\nLogically Collective\n\nInput Parameters:\n- `mat`   - the matrix-free matrix `MATMFFD`\n- `funci` - the function to use\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMFFDiFn`, `MatCreateSNESMF()`, `MatMFFDGetH()`, `MatMFFDSetHHistory()`, `MatMFFDResetHHistory()`,\n`SNESSetFunction()`, `MatGetDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetFunctioni\"))\n\"\"\"\nfunction MatMFFDSetFunctioni(petsclib::PetscLibType, mat::PetscMat, funci::MatMFFDiFn) end\n\n@for_petsc function MatMFFDSetFunctioni(petsclib::$UnionPetscLib, mat::PetscMat, funci::MatMFFDiFn )\n\n    @chk ccall(\n               (:MatMFFDSetFunctioni, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatMFFDiFn}),\n               mat, funci,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetFunctioniBase(petsclib::PetscLibType,mat::PetscMat, func::MatMFFDiBaseFn) \nSets the function to compute the base vector for a single component function evaluation for a `MATMFFD` matrix\n\nLogically Collective\n\nInput Parameters:\n- `mat`  - the `MATMFFD` matrix-free matrix\n- `func` - the function to use\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatCreateSNESMF()`, `MatMFFDGetH()`, `MatCreateMFFD()`,\n`MatMFFDSetHHistory()`, `MatMFFDResetHHistory()`, `SNESSetFunction()`, `MatGetDiagonal()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetFunctioniBase\"))\n\"\"\"\nfunction MatMFFDSetFunctioniBase(petsclib::PetscLibType, mat::PetscMat, func::MatMFFDiBaseFn) end\n\n@for_petsc function MatMFFDSetFunctioniBase(petsclib::$UnionPetscLib, mat::PetscMat, func::MatMFFDiBaseFn )\n\n    @chk ccall(\n               (:MatMFFDSetFunctioniBase, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatMFFDiBaseFn}),\n               mat, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetPeriod(petsclib::PetscLibType,mat::PetscMat, period::PetscInt) \nSets how often the step\n\nLogically Collective\n\nInput Parameters:\n- `mat`    - the `MATMFFD` matrix-free matrix\n- `period` - 1 for every time, 2 for every second etc\n\nOptions Database Key:\n- `-mat_mffd_period <period>` - Sets how often `h` is recomputed\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatCreateSNESMF()`, `MatMFFDGetH()`,\n`MatMFFDSetHHistory()`, `MatMFFDResetHHistory()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetPeriod\"))\n\"\"\"\nfunction MatMFFDSetPeriod(petsclib::PetscLibType, mat::PetscMat, period::PetscInt) end\n\n@for_petsc function MatMFFDSetPeriod(petsclib::$UnionPetscLib, mat::PetscMat, period::$PetscInt )\n\n    @chk ccall(\n               (:MatMFFDSetPeriod, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt),\n               mat, period,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetFunctionError(petsclib::PetscLibType,mat::PetscMat, error::PetscReal) \nSets the error_rel for the approximation of matrix\n\nLogically Collective\n\nInput Parameters:\n- `mat`   - the `MATMFFD` matrix-free matrix\n- `error` - relative error (should be set to the square root of the relative error in the function evaluations)\n\nOptions Database Key:\n- `-mat_mffd_err <error_rel>` - Sets error_rel\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatCreateSNESMF()`, `MatMFFDGetH()`, `MatCreateMFFD()`,\n`MatMFFDSetHHistory()`, `MatMFFDResetHHistory()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetFunctionError\"))\n\"\"\"\nfunction MatMFFDSetFunctionError(petsclib::PetscLibType, mat::PetscMat, error::PetscReal) end\n\n@for_petsc function MatMFFDSetFunctionError(petsclib::$UnionPetscLib, mat::PetscMat, error::$PetscReal )\n\n    @chk ccall(\n               (:MatMFFDSetFunctionError, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               mat, error,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetHHistory(petsclib::PetscLibType,J::PetscMat, history::Vector{PetscScalar}, nhistory::PetscInt) \nSets an array to collect a history of the\ndifferencing values (h) computed for the matrix-free product `MATMFFD` matrix\n\nLogically Collective\n\nInput Parameters:\n- `J`        - the `MATMFFD` matrix-free matrix\n- `history`  - space to hold the history\n- `nhistory` - number of entries in history, if more entries are generated than\nnhistory, then the later ones are discarded\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMFFDGetH()`, `MatCreateSNESMF()`,\n`MatMFFDResetHHistory()`, `MatMFFDSetFunctionError()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetHHistory\"))\n\"\"\"\nfunction MatMFFDSetHHistory(petsclib::PetscLibType, J::PetscMat, history::Vector{PetscScalar}, nhistory::PetscInt) end\n\n@for_petsc function MatMFFDSetHHistory(petsclib::$UnionPetscLib, J::PetscMat, history::Vector{$PetscScalar}, nhistory::$PetscInt )\n\n    @chk ccall(\n               (:MatMFFDSetHHistory, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{$PetscScalar}, $PetscInt),\n               J, history, nhistory,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDResetHHistory(petsclib::PetscLibType,J::PetscMat) \nResets the counter to zero to begin\ncollecting a new set of differencing histories for the `MATMFFD` matrix\n\nLogically Collective\n\nInput Parameter:\n- `J` - the matrix-free matrix context\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMFFDGetH()`, `MatCreateSNESMF()`,\n`MatMFFDSetHHistory()`, `MatMFFDSetFunctionError()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDResetHHistory\"))\n\"\"\"\nfunction MatMFFDResetHHistory(petsclib::PetscLibType, J::PetscMat) end\n\n@for_petsc function MatMFFDResetHHistory(petsclib::$UnionPetscLib, J::PetscMat )\n\n    @chk ccall(\n               (:MatMFFDResetHHistory, $petsc_library),\n               PetscErrorCode,\n               (CMat,),\n               J,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetBase(petsclib::PetscLibType,J::PetscMat, U::PetscVec, F::PetscVec) \nSets the vector `U` at which matrix vector products of the\nJacobian are computed for the `MATMFFD` matrix\n\nLogically Collective\n\nInput Parameters:\n- `J` - the `MATMFFD` matrix\n- `U` - the vector\n- `F` - (optional) vector that contains F(u) if it has been already computed\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMult()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetBase\"))\n\"\"\"\nfunction MatMFFDSetBase(petsclib::PetscLibType, J::PetscMat, U::PetscVec, F::PetscVec) end\n\n@for_petsc function MatMFFDSetBase(petsclib::$UnionPetscLib, J::PetscMat, U::PetscVec, F::PetscVec )\n\n    @chk ccall(\n               (:MatMFFDSetBase, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               J, U, F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDSetCheckh(petsclib::PetscLibType,J::PetscMat, fun::MatMFFDCheckhFn, ctx::Cvoid) \nSets a function that checks the computed `h` and adjusts\nit to satisfy some criteria for the `MATMFFD` matrix\n\nLogically Collective\n\nInput Parameters:\n- `J`   - the `MATMFFD` matrix\n- `fun` - the function that checks `h`, see `MatMFFDCheckhFn`\n- `ctx` - any context needed by the function\n\nOptions Database Keys:\n- `-mat_mffd_check_positivity <bool>` - Ensure that U + h*a  is non-negative\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMFFDCheckhFn`, `MatMFFDCheckPositivity()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDSetCheckh\"))\n\"\"\"\nfunction MatMFFDSetCheckh(petsclib::PetscLibType, J::PetscMat, fun::MatMFFDCheckhFn, ctx::Cvoid) end\n\n@for_petsc function MatMFFDSetCheckh(petsclib::$UnionPetscLib, J::PetscMat, fun::MatMFFDCheckhFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:MatMFFDSetCheckh, $petsc_library),\n               PetscErrorCode,\n               (CMat, Ptr{MatMFFDCheckhFn}, Ptr{Cvoid}),\n               J, fun, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDCheckPositivity(petsclib::PetscLibType,dummy::Cvoid, U::PetscVec, a::PetscVec, h::PetscScalar) \nChecks that all entries in U + h*a  are positive or\nzero, decreases `h` until this is satisfied for a `MATMFFD` matrix\n\nLogically Collective\n\nInput Parameters:\n- `dummy` - context variable (unused)\n- `U`     - base vector that is added to\n- `a`     - vector that is added\n- `h`     - scaling factor on `a`, may be changed on output\n\nOptions Database Keys:\n- `-mat_mffd_check_positivity <bool>` - Ensure that U + h*a is nonnegative\n\nLevel: advanced\n\n-seealso: [](ch_matrices), `Mat`, `MATMFFD`, `MatMFFDSetCheckh()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDCheckPositivity\"))\n\"\"\"\nfunction MatMFFDCheckPositivity(petsclib::PetscLibType, dummy::Cvoid, U::PetscVec, a::PetscVec, h::PetscScalar) end\n\n@for_petsc function MatMFFDCheckPositivity(petsclib::$UnionPetscLib, dummy::Cvoid, U::PetscVec, a::PetscVec, h::$PetscScalar )\n\n    @chk ccall(\n               (:MatMFFDCheckPositivity, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, CVec, CVec, Ptr{$PetscScalar}),\n               dummy, U, a, h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDDSSetUmin(petsclib::PetscLibType,A::PetscMat, umin::PetscReal) \nSets the \"umin\" parameter used by the\nPETSc routine for computing the differencing parameter, h, which is used\nfor matrix-free Jacobian-vector products for a `MATMFFD` matrix.\n\nInput Parameters:\n- `A`    - the `MATMFFD` matrix\n- `umin` - the parameter\n\nLevel: advanced\n\n-seealso: `MATMFFD`, `MatMFFDSetFunctionError()`, `MatCreateSNESMF()`\n\n# External Links\n$(_doc_external(\"Mat/MatMFFDDSSetUmin\"))\n\"\"\"\nfunction MatMFFDDSSetUmin(petsclib::PetscLibType, A::PetscMat, umin::PetscReal) end\n\n@for_petsc function MatMFFDDSSetUmin(petsclib::$UnionPetscLib, A::PetscMat, umin::$PetscReal )\n\n    @chk ccall(\n               (:MatMFFDDSSetUmin, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscReal),\n               A, umin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatMFFDComputeJacobian(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec, jac::PetscMat, B::PetscMat, dummy::Cvoid) \nTells the matrix\nJacobian matrix-vector products will be computed at, i.e. J(x) * a. The x is obtained\nfrom the `SNES` object (using `SNESGetSolution()`).\n\nCollective\n\nInput Parameters:\n- `snes`  - the nonlinear solver context\n- `x`     - the point at which the Jacobian-vector products will be performed\n- `jac`   - the matrix-free Jacobian object of `MatType` `MATMFFD`, likely obtained with `MatCreateSNESMF()`\n- `B`     - either the same as `jac` or another matrix type (ignored)\n- `dummy` - the user context (ignored)\n\nOptions Database Key:\n- `-snes_mf` - use the matrix created with `MatSNESMFCreate()` to setup the Jacobian for each new solution in the Newton process\n\nLevel: developer\n\n-seealso: [](ch_snes), `MatMFFDGetH()`, `MatCreateSNESMF()`, `MatMFFDSetBase()`, `MatCreateMFFD()`, `MATMFFD`,\n`MatMFFDSetHHistory()`, `MatMFFDSetFunctionError()`, `SNESSetJacobian()`\n\n# External Links\n$(_doc_external(\"Snes/MatMFFDComputeJacobian\"))\n\"\"\"\nfunction MatMFFDComputeJacobian(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec, jac::PetscMat, B::PetscMat, dummy::Cvoid) end\n\n@for_petsc function MatMFFDComputeJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec, jac::PetscMat, B::PetscMat, dummy::Cvoid )\n\n    @chk ccall(\n               (:MatMFFDComputeJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CMat, CMat, Ptr{Cvoid}),\n               snes, x, jac, B, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new sparse matrix coarsening algorithm to the matrix package.\n\nLogically Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of coarsen (for example `MATCOARSENMIS`)\n- `function` - function pointer that creates the coarsen type\n\nLevel: developer\n\n-seealso: `MatCoarsen`, `MatCoarsenType`, `MatCoarsenSetType()`, `MatCoarsenCreate()`, `MatCoarsenRegisterDestroy()`, `MatCoarsenRegisterAll()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenRegister\"))\n\"\"\"\nfunction MatCoarsenRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function MatCoarsenRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:MatCoarsenRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::MatCoarsenType = MatCoarsenGetType(petsclib::PetscLibType,coarsen::MatCoarsen) \nGets the Coarsen method type and name (as a string)\nfrom the coarsen context.\n\nNot Collective\n\nInput Parameter:\n- `coarsen` - the coarsen context\n\nOutput Parameter:\n- `type` - coarsener type\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenCreate()`, `MatCoarsenType`, `MatCoarsenSetType()`, `MatCoarsenRegister()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenGetType\"))\n\"\"\"\nfunction MatCoarsenGetType(petsclib::PetscLibType, coarsen::MatCoarsen) end\n\n@for_petsc function MatCoarsenGetType(petsclib::$UnionPetscLib, coarsen::MatCoarsen )\n\ttype_ = Ref{MatCoarsenType}()\n\n    @chk ccall(\n               (:MatCoarsenGetType, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, Ptr{MatCoarsenType}),\n               coarsen, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tMatCoarsenApply(petsclib::PetscLibType,coarser::MatCoarsen) \nGets a coarsen for a matrix.\n\nCollective\n\nInput Parameter:\n- `coarser` - the coarsen\n\nOptions Database Keys:\n- `-mat_coarsen_type mis|hem|misk` - mis: maximal independent set based; misk: distance k MIS; hem: heavy edge matching\n- `-mat_coarsen_view`              - view the coarsening object\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenSetFromOptions()`, `MatCoarsenSetType()`, `MatCoarsenRegister()`, `MatCoarsenCreate()`,\n`MatCoarsenDestroy()`, `MatCoarsenSetAdjacency()`\n`MatCoarsenGetData()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenApply\"))\n\"\"\"\nfunction MatCoarsenApply(petsclib::PetscLibType, coarser::MatCoarsen) end\n\n@for_petsc function MatCoarsenApply(petsclib::$UnionPetscLib, coarser::MatCoarsen )\n\n    @chk ccall(\n               (:MatCoarsenApply, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen,),\n               coarser,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetAdjacency(petsclib::PetscLibType,agg::MatCoarsen, adj::PetscMat) \nSets the adjacency graph (matrix) of the thing to be coarsened.\n\nCollective\n\nInput Parameters:\n- `agg` - the coarsen context\n- `adj` - the adjacency matrix\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenSetFromOptions()`, `Mat`, `MatCoarsenCreate()`, `MatCoarsenApply()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetAdjacency\"))\n\"\"\"\nfunction MatCoarsenSetAdjacency(petsclib::PetscLibType, agg::MatCoarsen, adj::PetscMat) end\n\n@for_petsc function MatCoarsenSetAdjacency(petsclib::$UnionPetscLib, agg::MatCoarsen, adj::PetscMat )\n\n    @chk ccall(\n               (:MatCoarsenSetAdjacency, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, CMat),\n               agg, adj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetStrictAggs(petsclib::PetscLibType,agg::MatCoarsen, str::PetscBool) \nSet whether to keep strict (non overlapping) aggregates in the linked list of aggregates for a coarsen context\n\nLogically Collective\n\nInput Parameters:\n- `agg` - the coarsen context\n- `str` - `PETSC_TRUE` keep strict aggregates, `PETSC_FALSE` allow overlap\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenCreate()`, `MatCoarsenSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetStrictAggs\"))\n\"\"\"\nfunction MatCoarsenSetStrictAggs(petsclib::PetscLibType, agg::MatCoarsen, str::PetscBool) end\n\n@for_petsc function MatCoarsenSetStrictAggs(petsclib::$UnionPetscLib, agg::MatCoarsen, str::PetscBool )\n\n    @chk ccall(\n               (:MatCoarsenSetStrictAggs, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, PetscBool),\n               agg, str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenDestroy(petsclib::PetscLibType,agg::MatCoarsen) \nDestroys the coarsen context.\n\nCollective\n\nInput Parameter:\n- `agg` - the coarsen context\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenDestroy\"))\n\"\"\"\nfunction MatCoarsenDestroy(petsclib::PetscLibType, agg::MatCoarsen) end\n\n@for_petsc function MatCoarsenDestroy(petsclib::$UnionPetscLib, agg::MatCoarsen )\n\n    @chk ccall(\n               (:MatCoarsenDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MatCoarsen},),\n               agg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenViewFromOptions(petsclib::PetscLibType,A::MatCoarsen, obj::PetscObject, name::String) \nView the coarsener from the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the coarsen context\n- `obj`  - Optional object that provides the prefix for the option name\n- `name` - command line option (usually `-mat_coarsen_view`)\n\nOptions Database Key:\n- `-mat_coarsen_view [viewertype]:...` - the viewer and its options\n\n-seealso: `MatCoarsen`, `MatCoarsenView`, `PetscObjectViewFromOptions()`, `MatCoarsenCreate()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenViewFromOptions\"))\n\"\"\"\nfunction MatCoarsenViewFromOptions(petsclib::PetscLibType, A::MatCoarsen, obj::PetscObject, name::String) end\n\n@for_petsc function MatCoarsenViewFromOptions(petsclib::$UnionPetscLib, A::MatCoarsen, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:MatCoarsenViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenView(petsclib::PetscLibType,agg::MatCoarsen, viewer::PetscViewer) \nPrints the coarsen data structure.\n\nCollective\n\nInput Parameters:\n- `agg`    - the coarsen context\n- `viewer` - optional visualization context\n\nFor viewing the options database see `MatCoarsenViewFromOptions()`\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `PetscViewer`, `PetscViewerASCIIOpen()`, `MatCoarsenViewFromOptions`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenView\"))\n\"\"\"\nfunction MatCoarsenView(petsclib::PetscLibType, agg::MatCoarsen, viewer::PetscViewer) end\n\n@for_petsc function MatCoarsenView(petsclib::$UnionPetscLib, agg::MatCoarsen, viewer::PetscViewer )\n\n    @chk ccall(\n               (:MatCoarsenView, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, PetscViewer),\n               agg, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetType(petsclib::PetscLibType,coarser::MatCoarsen, type::MatCoarsenType) \nSets the type of aggregator to use\n\nCollective\n\nInput Parameters:\n- `coarser` - the coarsen context.\n- `type`    - a known coarsening method\n\nOptions Database Key:\n- `-mat_coarsen_type  <type>` - maximal independent set based; distance k MIS; heavy edge matching\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenCreate()`, `MatCoarsenApply()`, `MatCoarsenType`, `MatCoarsenGetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetType\"))\n\"\"\"\nfunction MatCoarsenSetType(petsclib::PetscLibType, coarser::MatCoarsen, type::MatCoarsenType) end\n\n@for_petsc function MatCoarsenSetType(petsclib::$UnionPetscLib, coarser::MatCoarsen, type::MatCoarsenType )\n\n    @chk ccall(\n               (:MatCoarsenSetType, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, MatCoarsenType),\n               coarser, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetGreedyOrdering(petsclib::PetscLibType,coarser::MatCoarsen, perm::IS) \nSets the ordering of the vertices to use with a greedy coarsening method\n\nLogically Collective\n\nInput Parameters:\n- `coarser` - the coarsen context\n- `perm`    - vertex ordering of (greedy) algorithm\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenType`, `MatCoarsenCreate()`, `MatCoarsenSetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetGreedyOrdering\"))\n\"\"\"\nfunction MatCoarsenSetGreedyOrdering(petsclib::PetscLibType, coarser::MatCoarsen, perm::IS) end\n\n@for_petsc function MatCoarsenSetGreedyOrdering(petsclib::$UnionPetscLib, coarser::MatCoarsen, perm::IS )\n\n    @chk ccall(\n               (:MatCoarsenSetGreedyOrdering, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, CIS),\n               coarser, perm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenGetData(petsclib::PetscLibType,coarser::MatCoarsen, llist::PetscCoarsenData) \nGets the weights for vertices for a coarsener.\n\nLogically Collective, No Fortran Support\n\nInput Parameter:\n- `coarser` - the coarsen context\n\nOutput Parameter:\n- `llist` - linked list of aggregates\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenApply()`, `MatCoarsenCreate()`, `MatCoarsenSetType()`, `PetscCoarsenData`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenGetData\"))\n\"\"\"\nfunction MatCoarsenGetData(petsclib::PetscLibType, coarser::MatCoarsen, llist::PetscCoarsenData) end\n\n@for_petsc function MatCoarsenGetData(petsclib::$UnionPetscLib, coarser::MatCoarsen, llist::PetscCoarsenData )\n\n    @chk ccall(\n               (:MatCoarsenGetData, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, PetscCoarsenData),\n               coarser, llist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetFromOptions(petsclib::PetscLibType,coarser::MatCoarsen) \nSets various coarsen options from the options database.\n\nCollective\n\nInput Parameter:\n- `coarser` - the coarsen context.\n\nOptions Database Key:\n- `-mat_coarsen_type  <type>`                                                       - mis: maximal independent set based; misk: distance k MIS; hem: heavy edge matching\n- `-mat_coarsen_max_it <its> number of iterations to use in the coarsening process` - see `MatCoarsenSetMaximumIterations()`\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenType`, `MatCoarsenApply()`, `MatCoarsenCreate()`, `MatCoarsenSetType()`,\n`MatCoarsenSetMaximumIterations()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetFromOptions\"))\n\"\"\"\nfunction MatCoarsenSetFromOptions(petsclib::PetscLibType, coarser::MatCoarsen) end\n\n@for_petsc function MatCoarsenSetFromOptions(petsclib::$UnionPetscLib, coarser::MatCoarsen )\n\n    @chk ccall(\n               (:MatCoarsenSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen,),\n               coarser,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetMaximumIterations(petsclib::PetscLibType,coarse::MatCoarsen, n::PetscInt) \nMaximum `MATCOARSENHEM` iterations to use\n\nLogically Collective\n\nInput Parameters:\n- `coarse` - the coarsen context\n- `n`      - number of HEM iterations\n\nOptions Database Key:\n- `-mat_coarsen_max_it <default=4>` - Maximum `MATCOARSENHEM` iterations to use\n\nLevel: intermediate\n\n-seealso: `MatCoarsen`, `MatCoarsenType`, `MatCoarsenApply()`, `MatCoarsenCreate()`, `MatCoarsenSetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetMaximumIterations\"))\n\"\"\"\nfunction MatCoarsenSetMaximumIterations(petsclib::PetscLibType, coarse::MatCoarsen, n::PetscInt) end\n\n@for_petsc function MatCoarsenSetMaximumIterations(petsclib::$UnionPetscLib, coarse::MatCoarsen, n::$PetscInt )\n\n    @chk ccall(\n               (:MatCoarsenSetMaximumIterations, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, $PetscInt),\n               coarse, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetStrengthIndex(petsclib::PetscLibType,coarse::MatCoarsen, n::PetscInt, idx::Vector{PetscInt}) \nIndex array to use for index to use for strength of connection\n\nLogically Collective\n\nInput Parameters:\n- `coarse` - the coarsen context\n- `n`      - number of indices\n- `idx`    - array of indices\n\nOptions Database Key:\n- `-mat_coarsen_strength_index` - array of subset of variables per vertex to use for strength norm, -1 for using all (default)\n\nLevel: intermediate\n\n-seealso: `MatCoarsen`, `MatCoarsenType`, `MatCoarsenApply()`, `MatCoarsenCreate()`, `MatCoarsenSetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetStrengthIndex\"))\n\"\"\"\nfunction MatCoarsenSetStrengthIndex(petsclib::PetscLibType, coarse::MatCoarsen, n::PetscInt, idx::Vector{PetscInt}) end\n\n@for_petsc function MatCoarsenSetStrengthIndex(petsclib::$UnionPetscLib, coarse::MatCoarsen, n::$PetscInt, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:MatCoarsenSetStrengthIndex, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, $PetscInt, Ptr{$PetscInt}),\n               coarse, n, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tMatCoarsenSetThreshold(petsclib::PetscLibType,coarse::MatCoarsen, b::PetscReal) \nSet the threshold for HEM\n\nLogically Collective\n\nInput Parameters:\n- `coarse` - the coarsen context\n- `b`      - threshold value\n\nOptions Database Key:\n- `-mat_coarsen_threshold <-1>` - threshold\n\nLevel: intermediate\n\n-seealso: `MatCoarsen`, `MatCoarsenType`, `MatCoarsenApply()`, `MatCoarsenCreate()`, `MatCoarsenSetType()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenSetThreshold\"))\n\"\"\"\nfunction MatCoarsenSetThreshold(petsclib::PetscLibType, coarse::MatCoarsen, b::PetscReal) end\n\n@for_petsc function MatCoarsenSetThreshold(petsclib::$UnionPetscLib, coarse::MatCoarsen, b::$PetscReal )\n\n    @chk ccall(\n               (:MatCoarsenSetThreshold, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, $PetscReal),\n               coarse, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewcrs::MatCoarsen = MatCoarsenCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a coarsen context.\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `newcrs` - location to put the context\n\nLevel: advanced\n\n-seealso: `MatCoarsen`, `MatCoarsenSetType()`, `MatCoarsenApply()`, `MatCoarsenDestroy()`,\n`MatCoarsenSetAdjacency()`, `MatCoarsenGetData()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenCreate\"))\n\"\"\"\nfunction MatCoarsenCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function MatCoarsenCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tnewcrs_ = Ref{MatCoarsen}()\n\n    @chk ccall(\n               (:MatCoarsenCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{MatCoarsen}),\n               comm, newcrs_,\n              )\n\n\tnewcrs = newcrs_[]\n\n\treturn newcrs\nend \n\n\"\"\"\n\tMatCoarsenMISKSetDistance(petsclib::PetscLibType,crs::MatCoarsen, k::PetscInt) \nthe distance to be used by MISK\n\nCollective\n\nInput Parameters:\n- `crs` - the coarsen\n- `k`   - the distance\n\nOptions Database Key:\n- `-mat_coarsen_misk_distance <k>` - distance for MIS\n\nLevel: advanced\n\n-seealso: `MATCOARSENMISK`, `MatCoarsen`, `MatCoarsenSetFromOptions()`, `MatCoarsenSetType()`, `MatCoarsenRegister()`, `MatCoarsenCreate()`,\n`MatCoarsenDestroy()`, `MatCoarsenSetAdjacency()`, `MatCoarsenMISKGetDistance()`\n`MatCoarsenGetData()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenMISKSetDistance\"))\n\"\"\"\nfunction MatCoarsenMISKSetDistance(petsclib::PetscLibType, crs::MatCoarsen, k::PetscInt) end\n\n@for_petsc function MatCoarsenMISKSetDistance(petsclib::$UnionPetscLib, crs::MatCoarsen, k::$PetscInt )\n\n    @chk ccall(\n               (:MatCoarsenMISKSetDistance, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, $PetscInt),\n               crs, k,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tk::PetscInt = MatCoarsenMISKGetDistance(petsclib::PetscLibType,crs::MatCoarsen) \ngets the distance to be used by MISK\n\nCollective\n\nInput Parameter:\n- `crs` - the coarsen\n\nOutput Parameter:\n- `k` - the distance\n\nLevel: advanced\n\n-seealso: `MATCOARSENMISK`, `MatCoarsen`, `MatCoarsenSetFromOptions()`, `MatCoarsenSetType()`,\n`MatCoarsenRegister()`, `MatCoarsenCreate()`, `MatCoarsenDestroy()`,\n`MatCoarsenSetAdjacency()`, `MatCoarsenGetData()`\n\n# External Links\n$(_doc_external(\"Mat/MatCoarsenMISKGetDistance\"))\n\"\"\"\nfunction MatCoarsenMISKGetDistance(petsclib::PetscLibType, crs::MatCoarsen) end\n\n@for_petsc function MatCoarsenMISKGetDistance(petsclib::$UnionPetscLib, crs::MatCoarsen )\n\tk_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:MatCoarsenMISKGetDistance, $petsc_library),\n               PetscErrorCode,\n               (MatCoarsen, Ptr{$PetscInt}),\n               crs, k_,\n              )\n\n\tk = k_[]\n\n\treturn k\nend \n\n"
  },
  {
    "path": "src/autowrapped/PC_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PCRiCchardsonConvergedReason end\nconst PCRiCchardsonConvergedReason = Ptr{_n_PCRiCchardsonConvergedReason}\n\nmutable struct PCModifySubMatricesFn end\n\nmutable struct PCMGCoarseSpaceConstructorFn end\n\nmutable struct PCShellPSolveFn end\n\n# -------------------------------------------------------\n\"\"\"\n\tPCSetType(petsclib::PetscLibType,pc::PC, type::PCType) \nBuilds `PC` for a particular preconditioner type\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - a known method, see `PCType` for possible values\n\nOptions Database Key:\n- `-pc_type <type>` - Sets `PC` type\n\n-seealso: [](ch_ksp), `KSPSetType()`, `PCType`, `PCRegister()`, `PCCreate()`, `KSPGetPC()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetType\"))\n\"\"\"\nfunction PCSetType(petsclib::PetscLibType, pc::PC, type::PCType) end\n\n@for_petsc function PCSetType(petsclib::$UnionPetscLib, pc::PC, type::PCType )\n\n    @chk ccall(\n               (:PCSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCType = PCGetType(petsclib::PetscLibType,pc::PC) \nGets the `PCType` (as a string) from the `PC`\ncontext.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - name of preconditioner method\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCType`, `PCSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetType\"))\n\"\"\"\nfunction PCGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCType}()\n\n    @chk ccall(\n               (:PCGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCSetFromOptions(petsclib::PetscLibType,pc::PC) \nSets `PC` options from the options database.\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOptions Database Key:\n- `-pc_type` - name of type, for example `bjacobi`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCSetType()`, `PCType`, `KSPSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetFromOptions\"))\n\"\"\"\nfunction PCSetFromOptions(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCSetFromOptions(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetDM(petsclib::PetscLibType,pc::PC, dm::PetscDM) \nSets the `DM` that may be used by some preconditioners\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `dm` - the `DM`, can be `NULL` to remove any current `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `DM`, `PCGetDM()`, `KSPSetDM()`, `KSPGetDM()`, `SNESSetDM()`, `TSSetDM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetDM\"))\n\"\"\"\nfunction PCSetDM(petsclib::PetscLibType, pc::PC, dm::PetscDM) end\n\n@for_petsc function PCSetDM(petsclib::$UnionPetscLib, pc::PC, dm::PetscDM )\n\n    @chk ccall(\n               (:PCSetDM, $petsc_library),\n               PetscErrorCode,\n               (PC, CDM),\n               pc, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = PCGetDM(petsclib::PetscLibType,pc::PC) \nGets the `DM` that may be used by some preconditioners\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `dm` - the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `DM`, `PCSetDM()`, `KSPSetDM()`, `KSPGetDM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetDM\"))\n\"\"\"\nfunction PCGetDM(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGetDM(petsclib::$UnionPetscLib, pc::PC)\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:PCGetDM, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CDM}),\n               pc, dm_,\n              )\n\n    dm = PetscDM(dm_[], petsclib)\n\treturn dm\nend \n\n\"\"\"\n\tPCSetApplicationContext(petsclib::PetscLibType,pc::PC, ctx::Cvoid) \nSets the optional user\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the `PC` context\n- `ctx` - optional user context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCGetApplicationContext()`, `KSPSetApplicationContext()`, `KSPGetApplicationContext()`, `PetscObjectCompose()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetApplicationContext\"))\n\"\"\"\nfunction PCSetApplicationContext(petsclib::PetscLibType, pc::PC, ctx::Cvoid) end\n\n@for_petsc function PCSetApplicationContext(petsclib::$UnionPetscLib, pc::PC, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCSetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cvoid}),\n               pc, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGetApplicationContext(petsclib::PetscLibType,pc::PC, ctx::PeCtx) \nGets the user\n\nNot Collective\n\nInput Parameter:\n- `pc` - `PC` context\n\nOutput Parameter:\n- `ctx` - user context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCSetApplicationContext()`, `KSPSetApplicationContext()`, `KSPGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetApplicationContext\"))\n\"\"\"\nfunction PCGetApplicationContext(petsclib::PetscLibType, pc::PC, ctx::PeCtx) end\n\n@for_petsc function PCGetApplicationContext(petsclib::$UnionPetscLib, pc::PC, ctx::PeCtx )\n\n    @chk ccall(\n               (:PCGetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (PC, PeCtx),\n               pc, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCReset(petsclib::PetscLibType,pc::PC) \nResets a `PC` context to the state it was in before `PCSetUp()` was called, and removes any allocated `Vec` and `Mat` from its data structure\n\nCollective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCSetUp()`\n\n# External Links\n$(_doc_external(\"Ksp/PCReset\"))\n\"\"\"\nfunction PCReset(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCReset(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCReset, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDestroy(petsclib::PetscLibType,pc::PC) \nDestroys `PC` context that was created with `PCCreate()`.\n\nCollective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCSetUp()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDestroy\"))\n\"\"\"\nfunction PCDestroy(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCDestroy(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PC},),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = PCGetDiagonalScale(petsclib::PetscLibType,pc::PC) \nIndicates if the preconditioner applies an additional left and right\nscaling as needed by certain time-stepping codes.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` if it applies the scaling\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCSetUp()`, `PCDiagonalScaleLeft()`, `PCDiagonalScaleRight()`, `PCSetDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetDiagonalScale\"))\n\"\"\"\nfunction PCGetDiagonalScale(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGetDiagonalScale(petsclib::$UnionPetscLib, pc::PC )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCGetDiagonalScale, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tPCSetDiagonalScale(petsclib::PetscLibType,pc::PC, s::PetscVec) \nIndicates the left scaling to use to apply an additional left and right\nscaling as needed by certain time-stepping codes.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the `PC` preconditioner context\n- `s`  - scaling vector\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCreate()`, `PCSetUp()`, `PCDiagonalScaleLeft()`, `PCDiagonalScaleRight()`, `PCGetDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetDiagonalScale\"))\n\"\"\"\nfunction PCSetDiagonalScale(petsclib::PetscLibType, pc::PC, s::PetscVec) end\n\n@for_petsc function PCSetDiagonalScale(petsclib::$UnionPetscLib, pc::PC, s::PetscVec )\n\n    @chk ccall(\n               (:PCSetDiagonalScale, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec),\n               pc, s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDiagonalScaleLeft(petsclib::PetscLibType,pc::PC, in::PetscVec, out::PetscVec) \nScales a vector by the left scaling as needed by certain time\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the `PC` preconditioner context\n- `in`  - input vector\n- `out` - scaled vector (maybe the same as in)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCreate()`, `PCSetUp()`, `PCSetDiagonalScale()`, `PCDiagonalScaleRight()`, `MatDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDiagonalScaleLeft\"))\n\"\"\"\nfunction PCDiagonalScaleLeft(petsclib::PetscLibType, pc::PC, in::PetscVec, out::PetscVec) end\n\n@for_petsc function PCDiagonalScaleLeft(petsclib::$UnionPetscLib, pc::PC, in::PetscVec, out::PetscVec )\n\n    @chk ccall(\n               (:PCDiagonalScaleLeft, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec),\n               pc, in, out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDiagonalScaleRight(petsclib::PetscLibType,pc::PC, in::PetscVec, out::PetscVec) \nScales a vector by the right scaling as needed by certain time\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the `PC` preconditioner context\n- `in`  - input vector\n- `out` - scaled vector (maybe the same as in)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCreate()`, `PCSetUp()`, `PCDiagonalScaleLeft()`, `PCSetDiagonalScale()`, `MatDiagonalScale()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDiagonalScaleRight\"))\n\"\"\"\nfunction PCDiagonalScaleRight(petsclib::PetscLibType, pc::PC, in::PetscVec, out::PetscVec) end\n\n@for_petsc function PCDiagonalScaleRight(petsclib::$UnionPetscLib, pc::PC, in::PetscVec, out::PetscVec )\n\n    @chk ccall(\n               (:PCDiagonalScaleRight, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec),\n               pc, in, out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetUseAmat(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nSets a flag to indicate that when the preconditioner needs to apply (part of) the\noperator during the preconditioning process it applies the Amat provided to `TSSetRHSJacobian()`,\n`TSSetIJacobian()`, `SNESSetJacobian()`, `KSPSetOperators()` or `PCSetOperators()` not the Pmat.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the `PC` preconditioner context\n- `flg` - `PETSC_TRUE` to use the Amat, `PETSC_FALSE` to use the Pmat (default is false)\n\nOptions Database Key:\n- `-pc_use_amat <true,false>` - use the amat argument to `KSPSetOperators()` or `PCSetOperators()` to apply the operator\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCGetUseAmat()`, `PCBJACOBI`, `PCMG`, `PCFIELDSPLIT`, `PCCOMPOSITE`,\n`KSPSetOperators()`, `PCSetOperators()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetUseAmat\"))\n\"\"\"\nfunction PCSetUseAmat(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCSetUseAmat(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCSetUseAmat, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetErrorIfFailure(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nCauses `PC` to generate an error if a floating point exception, for example a zero pivot, is detected.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - iterative context obtained from `PCCreate()`\n- `flg` - `PETSC_TRUE` indicates you want the error generated\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `KSPSetErrorIfNotConverged()`, `PCGetInitialGuessNonzero()`, `PCSetInitialGuessKnoll()`, `PCGetInitialGuessKnoll()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetErrorIfFailure\"))\n\"\"\"\nfunction PCSetErrorIfFailure(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCSetErrorIfFailure(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCSetErrorIfFailure, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCGetUseAmat(petsclib::PetscLibType,pc::PC) \nGets a flag to indicate that when the preconditioner needs to apply (part of) the\noperator during the preconditioning process it applies the Amat provided to `TSSetRHSJacobian()`,\n`TSSetIJacobian()`, `SNESSetJacobian()`, `KSPSetOperators()` or `PCSetOperators()` not the Pmat.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` to use the Amat, `PETSC_FALSE` to use the Pmat (default is false)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCSetUseAmat()`, `PCBJACOBI`, `PCMG`, `PCFIELDSPLIT`, `PCCOMPOSITE`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetUseAmat\"))\n\"\"\"\nfunction PCGetUseAmat(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGetUseAmat(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCGetUseAmat, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCSetKSPNestLevel(petsclib::PetscLibType,pc::PC, level::PetscInt) \nsets the amount of nesting the `KSP` that contains this `PC` has\n\nCollective\n\nInput Parameters:\n- `pc`    - the `PC`\n- `level` - the nest level\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`, `KSPGetNestLevel()`, `PCGetKSPNestLevel()`, `KSPSetNestLevel()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetKSPNestLevel\"))\n\"\"\"\nfunction PCSetKSPNestLevel(petsclib::PetscLibType, pc::PC, level::PetscInt) end\n\n@for_petsc function PCSetKSPNestLevel(petsclib::$UnionPetscLib, pc::PC, level::$PetscInt )\n\n    @chk ccall(\n               (:PCSetKSPNestLevel, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, level,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlevel::PetscInt = PCGetKSPNestLevel(petsclib::PetscLibType,pc::PC) \ngets the amount of nesting the `KSP` that contains this `PC` has\n\nNot Collective\n\nInput Parameter:\n- `pc` - the `PC`\n\nOutput Parameter:\n- `level` - the nest level\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`, `KSPSetNestLevel()`, `PCSetKSPNestLevel()`, `KSPGetNestLevel()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetKSPNestLevel\"))\n\"\"\"\nfunction PCGetKSPNestLevel(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGetKSPNestLevel(petsclib::$UnionPetscLib, pc::PC )\n\tlevel_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCGetKSPNestLevel, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}),\n               pc, level_,\n              )\n\n\tlevel = level_[]\n\n\treturn level\nend \n\n\"\"\"\n\tnewpc::PC = PCCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a preconditioner context, `PC`\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `newpc` - location to put the `PC` preconditioner context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCType`, `PCSetType`, `PCSetUp()`, `PCApply()`, `PCDestroy()`, `KSP`, `KSPGetPC()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCreate\"))\n\"\"\"\nfunction PCCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PCCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tnewpc_ = Ref{PC}()\n\n    @chk ccall(\n               (:PCCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PC}),\n               comm, newpc_,\n              )\n\n\tnewpc = newpc_[]\n\n\treturn newpc\nend \n\n\"\"\"\n\tPCApply(petsclib::PetscLibType,pc::PC, x::PetscVec, y::PetscVec) \nApplies the preconditioner to a vector.\n\nCollective\n\nInput Parameters:\n- `pc` - the `PC` preconditioner context\n- `x`  - input vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApplyTranspose()`, `PCApplyBAorAB()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApply\"))\n\"\"\"\nfunction PCApply(petsclib::PetscLibType, pc::PC, x::PetscVec, y::PetscVec) end\n\n@for_petsc function PCApply(petsclib::$UnionPetscLib, pc::PC, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:PCApply, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec),\n               pc, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMatApply(petsclib::PetscLibType,pc::PC, X::PetscMat, Y::PetscMat) \nApplies the preconditioner to multiple vectors stored as a `MATDENSE`. Like `PCApply()`, `Y` and `X` must be different matrices.\n\nCollective\n\nInput Parameters:\n- `pc` - the `PC` preconditioner context\n- `X`  - block of input vectors\n\nOutput Parameter:\n- `Y` - block of output vectors\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApply()`, `KSPMatSolve()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMatApply\"))\n\"\"\"\nfunction PCMatApply(petsclib::PetscLibType, pc::PC, X::PetscMat, Y::PetscMat) end\n\n@for_petsc function PCMatApply(petsclib::$UnionPetscLib, pc::PC, X::PetscMat, Y::PetscMat )\n\n    @chk ccall(\n               (:PCMatApply, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, CMat),\n               pc, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMatApplyTranspose(petsclib::PetscLibType,pc::PC, X::PetscMat, Y::PetscMat) \nApplies the transpose of preconditioner to multiple vectors stored as a `MATDENSE`. Like `PCApplyTranspose()`, `Y` and `X` must be different matrices.\n\nCollective\n\nInput Parameters:\n- `pc` - the `PC` preconditioner context\n- `X`  - block of input vectors\n\nOutput Parameter:\n- `Y` - block of output vectors\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApplyTranspose()`, `KSPMatSolveTranspose()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMatApplyTranspose\"))\n\"\"\"\nfunction PCMatApplyTranspose(petsclib::PetscLibType, pc::PC, X::PetscMat, Y::PetscMat) end\n\n@for_petsc function PCMatApplyTranspose(petsclib::$UnionPetscLib, pc::PC, X::PetscMat, Y::PetscMat )\n\n    @chk ccall(\n               (:PCMatApplyTranspose, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, CMat),\n               pc, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCApplySymmetricLeft(petsclib::PetscLibType,pc::PC, x::PetscVec, y::PetscVec) \nApplies the left part of a symmetric preconditioner to a vector.\n\nCollective\n\nInput Parameters:\n- `pc` - the `PC` preconditioner context\n- `x`  - input vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApply()`, `PCApplySymmetricRight()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplySymmetricLeft\"))\n\"\"\"\nfunction PCApplySymmetricLeft(petsclib::PetscLibType, pc::PC, x::PetscVec, y::PetscVec) end\n\n@for_petsc function PCApplySymmetricLeft(petsclib::$UnionPetscLib, pc::PC, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:PCApplySymmetricLeft, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec),\n               pc, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCApplySymmetricRight(petsclib::PetscLibType,pc::PC, x::PetscVec, y::PetscVec) \nApplies the right part of a symmetric preconditioner to a vector.\n\nCollective\n\nInput Parameters:\n- `pc` - the `PC` preconditioner context\n- `x`  - input vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApply()`, `PCApplySymmetricLeft()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplySymmetricRight\"))\n\"\"\"\nfunction PCApplySymmetricRight(petsclib::PetscLibType, pc::PC, x::PetscVec, y::PetscVec) end\n\n@for_petsc function PCApplySymmetricRight(petsclib::$UnionPetscLib, pc::PC, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:PCApplySymmetricRight, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec),\n               pc, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCApplyTranspose(petsclib::PetscLibType,pc::PC, x::PetscVec, y::PetscVec) \nApplies the transpose of preconditioner to a vector.\n\nCollective\n\nInput Parameters:\n- `pc` - the `PC` preconditioner context\n- `x`  - input vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApply()`, `PCApplyBAorAB()`, `PCApplyBAorABTranspose()`, `PCApplyTransposeExists()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplyTranspose\"))\n\"\"\"\nfunction PCApplyTranspose(petsclib::PetscLibType, pc::PC, x::PetscVec, y::PetscVec) end\n\n@for_petsc function PCApplyTranspose(petsclib::$UnionPetscLib, pc::PC, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:PCApplyTranspose, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec),\n               pc, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCApplyTransposeExists(petsclib::PetscLibType,pc::PC) \nTest whether the preconditioner has a transpose apply operation\n\nCollective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if a transpose operation is defined\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApplyTranspose()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplyTransposeExists\"))\n\"\"\"\nfunction PCApplyTransposeExists(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCApplyTransposeExists(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCApplyTransposeExists, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCApplyBAorAB(petsclib::PetscLibType,pc::PC, side::PCSide, x::PetscVec, y::PetscVec, work::PetscVec) \nApplies the preconditioner and operator to a vector. y = B*A*x  or  y = A*B*x.\n\nCollective\n\nInput Parameters:\n- `pc`   - the `PC` preconditioner context\n- `side` - indicates the preconditioner side, one of `PC_LEFT`, `PC_RIGHT`, or `PC_SYMMETRIC`\n- `x`    - input vector\n- `work` - work vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApply()`, `PCApplyTranspose()`, `PCApplyBAorABTranspose()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplyBAorAB\"))\n\"\"\"\nfunction PCApplyBAorAB(petsclib::PetscLibType, pc::PC, side::PCSide, x::PetscVec, y::PetscVec, work::PetscVec) end\n\n@for_petsc function PCApplyBAorAB(petsclib::$UnionPetscLib, pc::PC, side::PCSide, x::PetscVec, y::PetscVec, work::PetscVec )\n\n    @chk ccall(\n               (:PCApplyBAorAB, $petsc_library),\n               PetscErrorCode,\n               (PC, PCSide, CVec, CVec, CVec),\n               pc, side, x, y, work,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCApplyBAorABTranspose(petsclib::PetscLibType,pc::PC, side::PCSide, x::PetscVec, y::PetscVec, work::PetscVec) \nApplies the transpose of the preconditioner\nand operator to a vector. That is, applies B^T * A^T with left preconditioning,\nNOT (B*A)^T = A^T*B^T.\n\nCollective\n\nInput Parameters:\n- `pc`   - the `PC` preconditioner context\n- `side` - indicates the preconditioner side, one of `PC_LEFT`, `PC_RIGHT`, or `PC_SYMMETRIC`\n- `x`    - input vector\n- `work` - work vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApply()`, `PCApplyTranspose()`, `PCApplyBAorAB()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplyBAorABTranspose\"))\n\"\"\"\nfunction PCApplyBAorABTranspose(petsclib::PetscLibType, pc::PC, side::PCSide, x::PetscVec, y::PetscVec, work::PetscVec) end\n\n@for_petsc function PCApplyBAorABTranspose(petsclib::$UnionPetscLib, pc::PC, side::PCSide, x::PetscVec, y::PetscVec, work::PetscVec )\n\n    @chk ccall(\n               (:PCApplyBAorABTranspose, $petsc_library),\n               PetscErrorCode,\n               (PC, PCSide, CVec, CVec, CVec),\n               pc, side, x, y, work,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\texists::PetscBool = PCApplyRichardsonExists(petsclib::PetscLibType,pc::PC) \nDetermines whether a particular preconditioner has a\nbuilt-in fast application of Richardson's method.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner\n\nOutput Parameter:\n- `exists` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `KSPRICHARDSON`, `PCApplyRichardson()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplyRichardsonExists\"))\n\"\"\"\nfunction PCApplyRichardsonExists(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCApplyRichardsonExists(petsclib::$UnionPetscLib, pc::PC )\n\texists_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCApplyRichardsonExists, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, exists_,\n              )\n\n\texists = exists_[]\n\n\treturn exists\nend \n\n\"\"\"\n\toutits::PetscInt = PCApplyRichardson(petsclib::PetscLibType,pc::PC, b::PetscVec, y::PetscVec, w::PetscVec, rtol::PetscReal, abstol::PetscReal, dtol::PetscReal, its::PetscInt, guesszero::PetscBool, reason::PCRiCchardsonConvergedReason) \nApplies several steps of Richardson iteration with\nthe particular preconditioner. This routine is usually used by the\nKrylov solvers and not the application code directly.\n\nCollective\n\nInput Parameters:\n- `pc`        - the `PC` preconditioner context\n- `b`         - the right-hand side\n- `w`         - one work vector\n- `rtol`      - relative decrease in residual norm convergence criteria\n- `abstol`    - absolute residual norm convergence criteria\n- `dtol`      - divergence residual norm increase criteria\n- `its`       - the number of iterations to apply.\n- `guesszero` - if the input x contains nonzero initial guess\n\nOutput Parameters:\n- `outits` - number of iterations actually used (for SOR this always equals its)\n- `reason` - the reason the apply terminated\n- `y`      - the solution (also contains initial guess if guesszero is `PETSC_FALSE`\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCApplyRichardsonExists()`\n\n# External Links\n$(_doc_external(\"Ksp/PCApplyRichardson\"))\n\"\"\"\nfunction PCApplyRichardson(petsclib::PetscLibType, pc::PC, b::PetscVec, y::PetscVec, w::PetscVec, rtol::PetscReal, abstol::PetscReal, dtol::PetscReal, its::PetscInt, guesszero::PetscBool, reason::PCRiCchardsonConvergedReason) end\n\n@for_petsc function PCApplyRichardson(petsclib::$UnionPetscLib, pc::PC, b::PetscVec, y::PetscVec, w::PetscVec, rtol::$PetscReal, abstol::$PetscReal, dtol::$PetscReal, its::$PetscInt, guesszero::PetscBool, reason::PCRiCchardsonConvergedReason )\n\toutits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCApplyRichardson, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec, CVec, $PetscReal, $PetscReal, $PetscReal, $PetscInt, PetscBool, Ptr{$PetscInt}, Ptr{PCRiCchardsonConvergedReason}),\n               pc, b, y, w, rtol, abstol, dtol, its, guesszero, outits_, reason,\n              )\n\n\toutits = outits_[]\n\n\treturn outits\nend \n\n\"\"\"\n\tPCSetFailedReason(petsclib::PetscLibType,pc::PC, reason::PCFailedReason) \nSets the reason a `PCSetUp()` failed or `PC_NOERROR` if it did not fail\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the `PC` preconditioner context\n- `reason` - the reason it failed\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCApply()`, `PCDestroy()`, `PCFailedReason`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetFailedReason\"))\n\"\"\"\nfunction PCSetFailedReason(petsclib::PetscLibType, pc::PC, reason::PCFailedReason) end\n\n@for_petsc function PCSetFailedReason(petsclib::$UnionPetscLib, pc::PC, reason::PCFailedReason )\n\n    @chk ccall(\n               (:PCSetFailedReason, $petsc_library),\n               PetscErrorCode,\n               (PC, PCFailedReason),\n               pc, reason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGetFailedReason(petsclib::PetscLibType,pc::PC, reason::PCFailedReason) \nGets the reason a `PCSetUp()` failed or `PC_NOERROR` if it did not fail\n\nNot Collective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameter:\n- `reason` - the reason it failed\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCApply()`, `PCDestroy()`, `PCSetFailedReason()`, `PCFailedReason`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetFailedReason\"))\n\"\"\"\nfunction PCGetFailedReason(petsclib::PetscLibType, pc::PC, reason::PCFailedReason) end\n\n@for_petsc function PCGetFailedReason(petsclib::$UnionPetscLib, pc::PC, reason::PCFailedReason )\n\n    @chk ccall(\n               (:PCGetFailedReason, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCFailedReason}),\n               pc, reason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCReduceFailedReason(petsclib::PetscLibType,pc::PC) \nReduce the failed reason among the MPI processes that share the `PC`\n\nCollective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCApply()`, `PCDestroy()`, `PCGetFailedReason()`, `PCSetFailedReason()`, `PCFailedReason`\n\n# External Links\n$(_doc_external(\"Ksp/PCReduceFailedReason\"))\n\"\"\"\nfunction PCReduceFailedReason(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCReduceFailedReason(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCReduceFailedReason, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetUp(petsclib::PetscLibType,pc::PC) \nPrepares for the use of a preconditioner. Performs all the one\ncan be used with `PCApply()`\n\nCollective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCApply()`, `PCDestroy()`, `KSPSetUp()`, `PCSetUpOnBlocks()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetUp\"))\n\"\"\"\nfunction PCSetUp(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCSetUp(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCSetUp, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetUpOnBlocks(petsclib::PetscLibType,pc::PC) \nSets up the preconditioner for each block in\nthe block Jacobi, overlapping Schwarz, and fieldsplit methods.\n\nCollective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCSetUp()`, `PCCreate()`, `PCApply()`, `PCDestroy()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetUpOnBlocks\"))\n\"\"\"\nfunction PCSetUpOnBlocks(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCSetUpOnBlocks(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCSetUpOnBlocks, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetModifySubMatrices(petsclib::PetscLibType,pc::PC, func::PCModifySubMatricesFn, ctx::Cvoid) \nSets a user\nsubmatrices that arise within certain subdomain-based preconditioners such as `PCASM`\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the `PC` preconditioner context\n- `func` - routine for modifying the submatrices, see `PCModifySubMatricesFn`\n- `ctx`  - optional user-defined context (may be `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCModifySubMatricesFn`, `PCBJACOBI`, `PCASM`, `PCModifySubMatrices()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetModifySubMatrices\"))\n\"\"\"\nfunction PCSetModifySubMatrices(petsclib::PetscLibType, pc::PC, func::PCModifySubMatricesFn, ctx::Cvoid) end\n\n@for_petsc function PCSetModifySubMatrices(petsclib::$UnionPetscLib, pc::PC, func::PCModifySubMatricesFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCSetModifySubMatrices, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCModifySubMatricesFn}, Ptr{Cvoid}),\n               pc, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCModifySubMatrices(petsclib::PetscLibType,pc::PC, nsub::PetscInt, row::Vector{IS}, col::Vector{IS}, submat::Vector{PetscMat}, ctx::Cvoid) \nCalls an optional user\ncertain preconditioners if one has been set with `PCSetModifySubMatrices()`.\n\nCollective\n\nInput Parameters:\n- `pc`     - the `PC` preconditioner context\n- `nsub`   - the number of local submatrices\n- `row`    - an array of index sets that contain the global row numbers\nthat comprise each local submatrix\n- `col`    - an array of index sets that contain the global column numbers\nthat comprise each local submatrix\n- `submat` - array of local submatrices\n- `ctx`    - optional user-defined context for private data for the\nuser-defined routine (may be `NULL`)\n\nOutput Parameter:\n- `submat` - array of local submatrices (the entries of which may\nhave been modified)\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCModifySubMatricesFn`, `PCSetModifySubMatrices()`\n\n# External Links\n$(_doc_external(\"Ksp/PCModifySubMatrices\"))\n\"\"\"\nfunction PCModifySubMatrices(petsclib::PetscLibType, pc::PC, nsub::PetscInt, row::Vector{IS}, col::Vector{IS}, submat::Vector{PetscMat}, ctx::Cvoid) end\n\n@for_petsc function PCModifySubMatrices(petsclib::$UnionPetscLib, pc::PC, nsub::$PetscInt, row::Vector{IS}, col::Vector{IS}, submat::Vector{PetscMat}, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCModifySubMatrices, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{IS}, Ptr{IS}, Ptr{CMat}, Ptr{Cvoid}),\n               pc, nsub, row, col, submat, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetOperators(petsclib::PetscLibType,pc::PC, Amat::PetscMat, Pmat::PetscMat) \nSets the matrix associated with the linear system and\na (possibly) different one associated with the preconditioner.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the `PC` preconditioner context\n- `Amat` - the matrix that defines the linear system\n- `Pmat` - the matrix to be used in constructing the preconditioner, usually the same as Amat.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCGetOperators()`, `MatZeroEntries()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetOperators\"))\n\"\"\"\nfunction PCSetOperators(petsclib::PetscLibType, pc::PC, Amat::PetscMat, Pmat::PetscMat) end\n\n@for_petsc function PCSetOperators(petsclib::$UnionPetscLib, pc::PC, Amat::PetscMat, Pmat::PetscMat )\n\n    @chk ccall(\n               (:PCSetOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, CMat),\n               pc, Amat, Pmat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetReusePreconditioner(petsclib::PetscLibType,pc::PC, flag::PetscBool) \nreuse the current preconditioner even if the operator in the preconditioner `PC` has changed.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the `PC` preconditioner context\n- `flag` - `PETSC_TRUE` do not compute a new preconditioner, `PETSC_FALSE` do compute a new preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCGetOperators()`, `MatZeroEntries()`, `PCGetReusePreconditioner()`, `KSPSetReusePreconditioner()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetReusePreconditioner\"))\n\"\"\"\nfunction PCSetReusePreconditioner(petsclib::PetscLibType, pc::PC, flag::PetscBool) end\n\n@for_petsc function PCSetReusePreconditioner(petsclib::$UnionPetscLib, pc::PC, flag::PetscBool )\n\n    @chk ccall(\n               (:PCSetReusePreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = PCGetReusePreconditioner(petsclib::PetscLibType,pc::PC) \nDetermines if the `PC` reuses the current preconditioner even if the operator in the preconditioner has changed.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` do not compute a new preconditioner, `PETSC_FALSE` do compute a new preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCGetOperators()`, `MatZeroEntries()`, `PCSetReusePreconditioner()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetReusePreconditioner\"))\n\"\"\"\nfunction PCGetReusePreconditioner(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGetReusePreconditioner(petsclib::$UnionPetscLib, pc::PC )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCGetReusePreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tPCGetOperators(petsclib::PetscLibType,pc::PC, Amat::PetscMat, Pmat::PetscMat) \nGets the matrix associated with the linear system and\npossibly a different one which is used to construct the preconditioner.\n\nNot Collective, though parallel `Mat`s are returned if `pc` is parallel\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameters:\n- `Amat` - the matrix defining the linear system\n- `Pmat` - the matrix from which the preconditioner is constructed, usually the same as Amat.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCSetOperators()`, `KSPGetOperators()`, `KSPSetOperators()`, `PCGetOperatorsSet()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetOperators\"))\n\"\"\"\nfunction PCGetOperators(petsclib::PetscLibType, pc::PC, Amat::PetscMat, Pmat::PetscMat) end\n\n@for_petsc function PCGetOperators(petsclib::$UnionPetscLib, pc::PC, Amat::PetscMat, Pmat::PetscMat )\n\tAmat_ = Ref(Amat.ptr)\n\tPmat_ = Ref(Pmat.ptr)\n\n    @chk ccall(\n               (:PCGetOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CMat}, Ptr{CMat}),\n               pc, Amat_, Pmat_,\n              )\n\n\tAmat.ptr = C_NULL\n\tPmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tmat::PetscBool,pmat::PetscBool = PCGetOperatorsSet(petsclib::PetscLibType,pc::PC) \nDetermines if the matrix associated with the linear system and\npossibly a different one associated with the preconditioner have been set in the `PC`.\n\nNot Collective, though the results on all processes should be the same\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameters:\n- `mat`  - the matrix associated with the linear system was set\n- `pmat` - matrix associated with the preconditioner was set, usually the same\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCSetOperators()`, `KSPGetOperators()`, `KSPSetOperators()`, `PCGetOperators()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetOperatorsSet\"))\n\"\"\"\nfunction PCGetOperatorsSet(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGetOperatorsSet(petsclib::$UnionPetscLib, pc::PC )\n\tmat_ = Ref{PetscBool}()\n\tpmat_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCGetOperatorsSet, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}, Ptr{PetscBool}),\n               pc, mat_, pmat_,\n              )\n\n\tmat = mat_[]\n\tpmat = pmat_[]\n\n\treturn mat,pmat\nend \n\n\"\"\"\n\tPCFactorGetMatrix(petsclib::PetscLibType,pc::PC, mat::PetscMat) \nGets the factored matrix from the\npreconditioner context.  This routine is valid only for the `PCLU`,\n`PCILU`, `PCCHOLESKY`, and `PCICC` methods.\n\nNot Collective though `mat` is parallel if `pc` is parallel\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameters:\n- `mat` - the factored matrix\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCLU`, `PCILU`, `PCCHOLESKY`, `PCICC`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetMatrix\"))\n\"\"\"\nfunction PCFactorGetMatrix(petsclib::PetscLibType, pc::PC, mat::PetscMat) end\n\n@for_petsc function PCFactorGetMatrix(petsclib::$UnionPetscLib, pc::PC, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:PCFactorGetMatrix, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CMat}),\n               pc, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetOptionsPrefix(petsclib::PetscLibType,pc::PC, prefix::String) \nSets the prefix used for searching for all\n`PC` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the `PC` preconditioner context\n- `prefix` - the prefix string to prepend to all `PC` option requests\n\n-seealso: [](ch_ksp), `PC`, `PCSetFromOptions`, `PCAppendOptionsPrefix()`, `PCGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetOptionsPrefix\"))\n\"\"\"\nfunction PCSetOptionsPrefix(petsclib::PetscLibType, pc::PC, prefix::String) end\n\n@for_petsc function PCSetOptionsPrefix(petsclib::$UnionPetscLib, pc::PC, prefix::String )\n\n    @chk ccall(\n               (:PCSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}),\n               pc, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCAppendOptionsPrefix(petsclib::PetscLibType,pc::PC, prefix::String) \nAppends to the prefix used for searching for all\n`PC` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the `PC` preconditioner context\n- `prefix` - the prefix string to prepend to all `PC` option requests\n\n-seealso: [](ch_ksp), `PC`, `PCSetFromOptions`, `PCSetOptionsPrefix()`, `PCGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCAppendOptionsPrefix\"))\n\"\"\"\nfunction PCAppendOptionsPrefix(petsclib::PetscLibType, pc::PC, prefix::String) end\n\n@for_petsc function PCAppendOptionsPrefix(petsclib::$UnionPetscLib, pc::PC, prefix::String )\n\n    @chk ccall(\n               (:PCAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}),\n               pc, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGetOptionsPrefix(petsclib::PetscLibType,pc::PC, prefix::String) \nGets the prefix used for searching for all\nPC options in the database.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the `PC` preconditioner context\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used, is returned\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCSetFromOptions`, `PCSetOptionsPrefix()`, `PCAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetOptionsPrefix\"))\n\"\"\"\nfunction PCGetOptionsPrefix(petsclib::PetscLibType, pc::PC, prefix::String) end\n\n@for_petsc function PCGetOptionsPrefix(petsclib::$UnionPetscLib, pc::PC, prefix::String )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:PCGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Ptr{Cchar}}),\n               pc, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPreSolve(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \nOptional pre\nthe iterative solve itself. Used in conjunction with `PCPostSolve()`\n\nCollective\n\nInput Parameters:\n- `pc`  - the `PC` preconditioner context\n- `ksp` - the Krylov subspace context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCPostSolve()`, `KSP`, `PCSetPostSetUp()`, `KSPSetPreSolve()`, `KSPSetPostSolve()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPreSolve\"))\n\"\"\"\nfunction PCPreSolve(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCPreSolve(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\n    @chk ccall(\n               (:PCPreSolve, $petsc_library),\n               PetscErrorCode,\n               (PC, CKSP),\n               pc, ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetPostSetUp(petsclib::PetscLibType,pc::PC, postsetup::external) \nSets function called at the end of `PCSetUp()` to adjust the computed preconditioner\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the preconditioner object\n- `postsetup` - the function to call after `PCSetUp()`\n\nCalling sequence of `postsetup`:\n- `pc` - the `PC` context\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCSetUp()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetPostSetUp\"))\n\"\"\"\nfunction PCSetPostSetUp(petsclib::PetscLibType, pc::PC, postsetup::external) end\n\n@for_petsc function PCSetPostSetUp(petsclib::$UnionPetscLib, pc::PC, postsetup::external )\n\n    @chk ccall(\n               (:PCSetPostSetUp, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, postsetup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPostSolve(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \nOptional post\npreconditioner-specific actions that must be performed after\nthe iterative solve itself.\n\nCollective\n\nInput Parameters:\n- `pc`  - the `PC` preconditioner context\n- `ksp` - the `KSP` Krylov subspace context\n\n-seealso: [](ch_ksp), `PC`, `KSPSetPostSolve()`, `KSPSetPreSolve()`, `PCPreSolve()`, `KSPSolve()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPostSolve\"))\n\"\"\"\nfunction PCPostSolve(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCPostSolve(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\n    @chk ccall(\n               (:PCPostSolve, $petsc_library),\n               PetscErrorCode,\n               (PC, CKSP),\n               pc, ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCLoad(petsclib::PetscLibType,newdm::PC, viewer::PetscViewer) \nLoads a `PC` that has been stored in binary  with `PCView()`.\n\nCollective\n\nInput Parameters:\n- `newdm`  - the newly loaded `PC`, this needs to have been created with `PCCreate()` or\nsome related function before a call to `PCLoad()`.\n- `viewer` - binary file viewer `PETSCVIEWERBINARY`, obtained from `PetscViewerBinaryOpen()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PetscViewerBinaryOpen()`, `PCView()`, `MatLoad()`, `VecLoad()`, `PETSCVIEWERBINARY`\n\n# External Links\n$(_doc_external(\"Ksp/PCLoad\"))\n\"\"\"\nfunction PCLoad(petsclib::PetscLibType, newdm::PC, viewer::PetscViewer) end\n\n@for_petsc function PCLoad(petsclib::$UnionPetscLib, newdm::PC, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PCLoad, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscViewer),\n               newdm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCViewFromOptions(petsclib::PetscLibType,A::PC, obj::PetscObject, name::String) \nView (print or provide information about) the `PC`, based on options in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PC` context\n- `obj`  - Optional object that provides the options prefix\n- `name` - command line option name\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PC`, `PCView`, `PetscObjectViewFromOptions()`, `PCCreate()`\n\n# External Links\n$(_doc_external(\"Ksp/PCViewFromOptions\"))\n\"\"\"\nfunction PCViewFromOptions(petsclib::PetscLibType, A::PC, obj::PetscObject, name::String) end\n\n@for_petsc function PCViewFromOptions(petsclib::$UnionPetscLib, A::PC, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PCViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCView(petsclib::PetscLibType,pc::PC, viewer::PetscViewer) \nPrints information about the `PC`\n\nCollective\n\nInput Parameters:\n- `pc`     - the `PC` preconditioner context\n- `viewer` - optional `PetscViewer` visualization context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PetscViewer`, `PetscViewerType`, `KSPView()`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Ksp/PCView\"))\n\"\"\"\nfunction PCView(petsclib::PetscLibType, pc::PC, viewer::PetscViewer) end\n\n@for_petsc function PCView(petsclib::$UnionPetscLib, pc::PC, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PCView, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscViewer),\n               pc, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a method (`PCType`) to the PETSc preconditioner package.\n\nNot collective. No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined solver\n- `function` - routine to create the method context which will be stored in a `PC` when `PCSetType()` is called\n\n-seealso: [](ch_ksp), `PC`, `PCType`, `PCRegisterAll()`, `PCSetType()`, `PCShellSetContext()`, `PCShellSetApply()`, `PCSHELL`\n\n# External Links\n$(_doc_external(\"Ksp/PCRegister\"))\n\"\"\"\nfunction PCRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PCRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PCRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCComputeOperator(petsclib::PetscLibType,pc::PC, mattype::MatType, mat::PetscMat) \nComputes the explicit preconditioned operator as a matrix `Mat`.\n\nCollective\n\nInput Parameters:\n- `pc`      - the `PC` preconditioner object\n- `mattype` - the `MatType` to be used for the operator\n\nOutput Parameter:\n- `mat` - the explicit preconditioned operator\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `KSPComputeOperator()`, `MatType`\n\n# External Links\n$(_doc_external(\"Ksp/PCComputeOperator\"))\n\"\"\"\nfunction PCComputeOperator(petsclib::PetscLibType, pc::PC, mattype::MatType, mat::PetscMat) end\n\n@for_petsc function PCComputeOperator(petsclib::$UnionPetscLib, pc::PC, mattype::MatType, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:PCComputeOperator, $petsc_library),\n               PetscErrorCode,\n               (PC, MatType, Ptr{CMat}),\n               pc, mattype, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSetCoordinates(petsclib::PetscLibType,pc::PC, dim::PetscInt, nloc::PetscInt, coords::Vector{PetscReal}) \nsets the coordinates of all the nodes (degrees of freedom in the vector) on the local process\n\nCollective\n\nInput Parameters:\n- `pc`     - the `PC` preconditioner context\n- `dim`    - the dimension of the coordinates 1, 2, or 3\n- `nloc`   - the blocked size of the coordinates array\n- `coords` - the coordinates array\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `MatSetNearNullSpace()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSetCoordinates\"))\n\"\"\"\nfunction PCSetCoordinates(petsclib::PetscLibType, pc::PC, dim::PetscInt, nloc::PetscInt, coords::Vector{PetscReal}) end\n\n@for_petsc function PCSetCoordinates(petsclib::$UnionPetscLib, pc::PC, dim::$PetscInt, nloc::$PetscInt, coords::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PCSetCoordinates, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, $PetscInt, Ptr{$PetscReal}),\n               pc, dim, nloc, coords,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum_levels::PetscInt = PCGetInterpolations(petsclib::PetscLibType,pc::PC, interpolations::Vector{PetscMat}) \nGets interpolation matrices for all levels (except level 0)\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the precondition context\n\nOutput Parameters:\n- `num_levels`     - the number of levels\n- `interpolations` - the interpolation matrices (size of `num_levels`-1)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCMG`, `PCMGGetRestriction()`, `PCMGSetInterpolation()`, `PCMGGetInterpolation()`, `PCGetCoarseOperators()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetInterpolations\"))\n\"\"\"\nfunction PCGetInterpolations(petsclib::PetscLibType, pc::PC, interpolations::Vector{PetscMat}) end\n\n@for_petsc function PCGetInterpolations(petsclib::$UnionPetscLib, pc::PC, interpolations::Vector{PetscMat} )\n\tnum_levels_ = Ref{$PetscInt}()\n\tinterpolations_ = Ref(pointer(interpolations))\n\n    @chk ccall(\n               (:PCGetInterpolations, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{CMat}}),\n               pc, num_levels_, interpolations_,\n              )\n\n\tnum_levels = num_levels_[]\n\n\treturn num_levels\nend \n\n\"\"\"\n\tnum_levels::PetscInt = PCGetCoarseOperators(petsclib::PetscLibType,pc::PC, coarseOperators::Vector{PetscMat}) \nGets coarse operator matrices for all levels (except the finest level)\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the precondition context\n\nOutput Parameters:\n- `num_levels`      - the number of levels\n- `coarseOperators` - the coarse operator matrices (size of `num_levels`-1)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCMG`, `PCMGGetRestriction()`, `PCMGSetInterpolation()`, `PCMGGetRScale()`, `PCMGGetInterpolation()`, `PCGetInterpolations()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGetCoarseOperators\"))\n\"\"\"\nfunction PCGetCoarseOperators(petsclib::PetscLibType, pc::PC, coarseOperators::Vector{PetscMat}) end\n\n@for_petsc function PCGetCoarseOperators(petsclib::$UnionPetscLib, pc::PC, coarseOperators::Vector{PetscMat} )\n\tnum_levels_ = Ref{$PetscInt}()\n\tcoarseOperators_ = Ref(pointer(coarseOperators))\n\n    @chk ccall(\n               (:PCGetCoarseOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{CMat}}),\n               pc, num_levels_, coarseOperators_,\n              )\n\n\tnum_levels = num_levels_[]\n\n\treturn num_levels\nend \n\n\"\"\"\n\tPCMatSetApplyOperation(petsclib::PetscLibType,pc::PC, matop::MatOperation) \nSet which matrix operation of the matrix implements `PCApply()` for `PCMAT`.\n\nLogically collective\n\nInput Parameters:\n- `pc`    - An instance of `PCMAT`\n- `matop` - The selected `MatOperation`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMAT`, `PCMatGetApplyOperation()`, `PCApply()`, `MatOperation`\n\n# External Links\n$(_doc_external(\"Ksp/PCMatSetApplyOperation\"))\n\"\"\"\nfunction PCMatSetApplyOperation(petsclib::PetscLibType, pc::PC, matop::MatOperation) end\n\n@for_petsc function PCMatSetApplyOperation(petsclib::$UnionPetscLib, pc::PC, matop::MatOperation )\n\n    @chk ccall(\n               (:PCMatSetApplyOperation, $petsc_library),\n               PetscErrorCode,\n               (PC, MatOperation),\n               pc, matop,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMatGetApplyOperation(petsclib::PetscLibType,pc::PC, matop::MatOperation) \nGet which matrix operation of the matrix implements `PCApply()` for `PCMAT`.\n\nLogically collective\n\nInput Parameter:\n- `pc` - An instance of `PCMAT`\n\nOutput Parameter:\n- `matop` - The `MatOperation`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMAT`, `PCMatSetApplyOperation()`, `PCApply()`, `MatOperation`\n\n# External Links\n$(_doc_external(\"Ksp/PCMatGetApplyOperation\"))\n\"\"\"\nfunction PCMatGetApplyOperation(petsclib::PetscLibType, pc::PC, matop::MatOperation) end\n\n@for_petsc function PCMatGetApplyOperation(petsclib::$UnionPetscLib, pc::PC, matop::MatOperation )\n\n    @chk ccall(\n               (:PCMatGetApplyOperation, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{MatOperation}),\n               pc, matop,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCASMSetLocalSubdomains(petsclib::PetscLibType,pc::PC, n::PetscInt, is::Vector{IS}, is_loc::Vector{IS}) \nSets the local subdomains (for this processor only) for the additive Schwarz preconditioner `PCASM`.\n\nCollective\n\nInput Parameters:\n- `pc`       - the preconditioner context\n- `n`        - the number of subdomains for this processor (default value = 1)\n- `is`       - the index set that defines the subdomains for this processor (or `NULL` for PETSc to determine subdomains)\nthe values of the `is` array are copied so you can free the array (not the `IS` in the array) after this call\n- `is_local` - the index sets that define the local part of the subdomains for this processor, not used unless `PCASMType` is `PC_ASM_RESTRICT`\n(or `NULL` to not provide these). The values of the `is_local` array are copied so you can free the array\n(not the `IS` in the array) after this call\n\nOptions Database Key:\n- `-pc_asm_local_blocks <blks>` - Sets number of local blocks\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMSetOverlap()`, `PCASMGetSubKSP()`,\n`PCASMCreateSubdomains2D()`, `PCASMGetLocalSubdomains()`, `PCASMType`, `PCASMSetType()`, `PCGASM`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetLocalSubdomains\"))\n\"\"\"\nfunction PCASMSetLocalSubdomains(petsclib::PetscLibType, pc::PC, n::PetscInt, is::Vector{IS}, is_loc::Vector{IS}) end\n\n@for_petsc function PCASMSetLocalSubdomains(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt, is::Vector{IS}, is_loc::Vector{IS} )\n\n    @chk ccall(\n               (:PCASMSetLocalSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{IS}, Ptr{IS}),\n               pc, n, is, is_loc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCASMSetTotalSubdomains(petsclib::PetscLibType,pc::PC, N::PetscInt, is::Vector{IS}, is_loc::Vector{IS}) \nSets the subdomains for all processors for the\nadditive Schwarz preconditioner, `PCASM`.\n\nCollective, all MPI ranks must pass in the same array of `IS`\n\nInput Parameters:\n- `pc`       - the preconditioner context\n- `N`        - the number of subdomains for all processors\n- `is`       - the index sets that define the subdomains for all processors (or `NULL` to ask PETSc to determine the subdomains)\nthe values of the `is` array are copied so you can free the array (not the `IS` in the array) after this call\n- `is_local` - the index sets that define the local part of the subdomains for this processor (or `NULL` to not provide this information)\nThe values of the `is_local` array are copied so you can free the array (not the `IS` in the array) after this call\n\nOptions Database Key:\n- `-pc_asm_blocks <blks>` - Sets total blocks\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetLocalSubdomains()`, `PCASMSetOverlap()`, `PCASMGetSubKSP()`,\n`PCASMCreateSubdomains2D()`, `PCGASM`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetTotalSubdomains\"))\n\"\"\"\nfunction PCASMSetTotalSubdomains(petsclib::PetscLibType, pc::PC, N::PetscInt, is::Vector{IS}, is_loc::Vector{IS}) end\n\n@for_petsc function PCASMSetTotalSubdomains(petsclib::$UnionPetscLib, pc::PC, N::$PetscInt, is::Vector{IS}, is_loc::Vector{IS} )\n\n    @chk ccall(\n               (:PCASMSetTotalSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{IS}, Ptr{IS}),\n               pc, N, is, is_loc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCASMSetOverlap(petsclib::PetscLibType,pc::PC, ovl::PetscInt) \nSets the overlap between a pair of subdomains for the\nadditive Schwarz preconditioner, `PCASM`.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `ovl` - the amount of overlap between subdomains (ovl >= 0, default value = 1)\n\nOptions Database Key:\n- `-pc_asm_overlap <ovl>` - Sets overlap\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMSetLocalSubdomains()`, `PCASMGetSubKSP()`,\n`PCASMCreateSubdomains2D()`, `PCASMGetLocalSubdomains()`, `MatIncreaseOverlap()`, `PCGASM`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetOverlap\"))\n\"\"\"\nfunction PCASMSetOverlap(petsclib::PetscLibType, pc::PC, ovl::PetscInt) end\n\n@for_petsc function PCASMSetOverlap(petsclib::$UnionPetscLib, pc::PC, ovl::$PetscInt )\n\n    @chk ccall(\n               (:PCASMSetOverlap, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, ovl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCASMSetType(petsclib::PetscLibType,pc::PC, type::PCASMType) \nSets the type of restriction and interpolation used\nfor local problems in the additive Schwarz method, `PCASM`.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - variant of `PCASM`, one of\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMGetSubKSP()`,\n`PCASMCreateSubdomains2D()`, `PCASMType`, `PCASMSetLocalType()`, `PCASMGetLocalType()`, `PCGASM`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetType\"))\n\"\"\"\nfunction PCASMSetType(petsclib::PetscLibType, pc::PC, type::PCASMType) end\n\n@for_petsc function PCASMSetType(petsclib::$UnionPetscLib, pc::PC, type::PCASMType )\n\n    @chk ccall(\n               (:PCASMSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCASMType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCASMType = PCASMGetType(petsclib::PetscLibType,pc::PC) \nGets the type of restriction and interpolation used\nfor local problems in the additive Schwarz method, `PCASM`.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - variant of `PCASM`, one of\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMGetSubKSP()`, `PCGASM`,\n`PCASMCreateSubdomains2D()`, `PCASMType`, `PCASMSetType()`, `PCASMSetLocalType()`, `PCASMGetLocalType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMGetType\"))\n\"\"\"\nfunction PCASMGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCASMGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCASMType}()\n\n    @chk ccall(\n               (:PCASMGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCASMType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCASMSetLocalType(petsclib::PetscLibType,pc::PC, type::PCCompositeType) \nSets the type of composition used for local problems in the additive Schwarz method, `PCASM`.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - type of composition, one of\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetType()`, `PCASMGetType()`, `PCASMGetLocalType()`, `PCASMType`, `PCCompositeType`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetLocalType\"))\n\"\"\"\nfunction PCASMSetLocalType(petsclib::PetscLibType, pc::PC, type::PCCompositeType) end\n\n@for_petsc function PCASMSetLocalType(petsclib::$UnionPetscLib, pc::PC, type::PCCompositeType )\n\n    @chk ccall(\n               (:PCASMSetLocalType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCCompositeType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCCompositeType = PCASMGetLocalType(petsclib::PetscLibType,pc::PC) \nGets the type of composition used for local problems in the additive Schwarz method, `PCASM`.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - type of composition, one of\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetType()`, `PCASMGetType()`, `PCASMSetLocalType()`, `PCASMType`, `PCCompositeType`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMGetLocalType\"))\n\"\"\"\nfunction PCASMGetLocalType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCASMGetLocalType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCCompositeType}()\n\n    @chk ccall(\n               (:PCASMGetLocalType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCCompositeType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCASMSetSortIndices(petsclib::PetscLibType,pc::PC, doSort::PetscBool) \nDetermines whether subdomain indices are sorted.\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `doSort` - sort the subdomain indices\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetLocalSubdomains()`, `PCASMSetTotalSubdomains()`, `PCASMGetSubKSP()`,\n`PCASMCreateSubdomains2D()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetSortIndices\"))\n\"\"\"\nfunction PCASMSetSortIndices(petsclib::PetscLibType, pc::PC, doSort::PetscBool) end\n\n@for_petsc function PCASMSetSortIndices(petsclib::$UnionPetscLib, pc::PC, doSort::PetscBool )\n\n    @chk ccall(\n               (:PCASMSetSortIndices, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, doSort,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn_loc::PetscInt,first_loc::PetscInt = PCASMGetSubKSP(petsclib::PetscLibType,pc::PC, ksp::Vector{PetscKSP}) \nGets the local `KSP` contexts for all blocks on\nthis processor.\n\nCollective iff first_local is requested\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n_local`     - the number of blocks on this processor or `NULL`\n- `first_local` - the global number of the first block on this processor or `NULL`, all processors must request or all must pass `NULL`\n- `ksp`         - the array of `KSP` contexts\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMSetOverlap()`,\n`PCASMCreateSubdomains2D()`,\n\n# External Links\n$(_doc_external(\"Ksp/PCASMGetSubKSP\"))\n\"\"\"\nfunction PCASMGetSubKSP(petsclib::PetscLibType, pc::PC, ksp::Vector{PetscKSP}) end\n\n@for_petsc function PCASMGetSubKSP(petsclib::$UnionPetscLib, pc::PC, ksp::Vector{PetscKSP} )\n\tn_loc_ = Ref{$PetscInt}()\n\tfirst_loc_ = Ref{$PetscInt}()\n\tksp_ = Ref(pointer(ksp))\n\n    @chk ccall(\n               (:PCASMGetSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{CKSP}}),\n               pc, n_loc_, first_loc_, ksp_,\n              )\n\n\tn_loc = n_loc_[]\n\tfirst_loc = first_loc_[]\n\n\treturn n_loc,first_loc\nend \n\n\"\"\"\n\toutis::Vector{IS} = PCASMCreateSubdomains(petsclib::PetscLibType,A::PetscMat, n::PetscInt) \nCreates the index sets for the overlapping Schwarz\npreconditioner, `PCASM`,  for any problem on a general grid.\n\nCollective\n\nInput Parameters:\n- `A` - The global matrix operator\n- `n` - the number of local blocks\n\nOutput Parameter:\n- `outis` - the array of index sets defining the subdomains\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetLocalSubdomains()`, `PCASMDestroySubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMCreateSubdomains\"))\n\"\"\"\nfunction PCASMCreateSubdomains(petsclib::PetscLibType, A::PetscMat, n::PetscInt) end\n\n@for_petsc function PCASMCreateSubdomains(petsclib::$UnionPetscLib, A::PetscMat, n::$PetscInt )\n\toutis_ = Ref{Ptr{IS}}()\n\n    @chk ccall(\n               (:PCASMCreateSubdomains, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{Ptr{IS}}),\n               A, n, outis_,\n              )\n\n\toutis = unsafe_wrap(Array, outis_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn outis\nend \n\n\"\"\"\n\tPCASMDestroySubdomains(petsclib::PetscLibType,n::PetscInt, is::Vector{IS}, is_loc::Vector{IS}) \nDestroys the index sets created with\n`PCASMCreateSubdomains()`. Should be called after setting subdomains with `PCASMSetLocalSubdomains()`.\n\nCollective\n\nInput Parameters:\n- `n`        - the number of index sets\n- `is`       - the array of index sets\n- `is_local` - the array of local index sets, can be `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMCreateSubdomains()`, `PCASMSetLocalSubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMDestroySubdomains\"))\n\"\"\"\nfunction PCASMDestroySubdomains(petsclib::PetscLibType, n::PetscInt, is::Vector{IS}, is_loc::Vector{IS}) end\n\n@for_petsc function PCASMDestroySubdomains(petsclib::$UnionPetscLib, n::$PetscInt, is::Vector{IS}, is_loc::Vector{IS} )\n\tis_ = Ref(pointer(is))\n\tis_loc_ = Ref(pointer(is_loc))\n\n    @chk ccall(\n               (:PCASMDestroySubdomains, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Ptr{IS}}, Ptr{Ptr{IS}}),\n               n, is_, is_loc_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNsub::PetscInt,is::Vector{IS},is_loc::Vector{IS} = PCASMCreateSubdomains2D(petsclib::PetscLibType,m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, dof::PetscInt, overlap::PetscInt) \nCreates the index sets for the overlapping Schwarz\npreconditioner, `PCASM`, for a two-dimensional problem on a regular grid.\n\nNot Collective\n\nInput Parameters:\n- `m`       - the number of mesh points in the x direction\n- `n`       - the number of mesh points in the y direction\n- `M`       - the number of subdomains in the x direction\n- `N`       - the number of subdomains in the y direction\n- `dof`     - degrees of freedom per node\n- `overlap` - overlap in mesh lines\n\nOutput Parameters:\n- `Nsub`     - the number of subdomains created\n- `is`       - array of index sets defining overlapping (if overlap > 0) subdomains\n- `is_local` - array of index sets defining non-overlapping subdomains\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMSetLocalSubdomains()`, `PCASMGetSubKSP()`,\n`PCASMSetOverlap()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMCreateSubdomains2D\"))\n\"\"\"\nfunction PCASMCreateSubdomains2D(petsclib::PetscLibType, m::PetscInt, n::PetscInt, M::PetscInt, N::PetscInt, dof::PetscInt, overlap::PetscInt) end\n\n@for_petsc function PCASMCreateSubdomains2D(petsclib::$UnionPetscLib, m::$PetscInt, n::$PetscInt, M::$PetscInt, N::$PetscInt, dof::$PetscInt, overlap::$PetscInt )\n\tNsub_ = Ref{$PetscInt}()\n\tis_ = Ref{Ptr{IS}}()\n\tis_loc_ = Ref{Ptr{IS}}()\n\n    @chk ccall(\n               (:PCASMCreateSubdomains2D, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{IS}}, Ptr{Ptr{IS}}),\n               m, n, M, N, dof, overlap, Nsub_, is_, is_loc_,\n              )\n\n\tNsub = Nsub_[]\n\tis = unsafe_wrap(Array, is_[], VecGetLocalSize(petsclib, x); own = false)\n\tis_loc = unsafe_wrap(Array, is_loc_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nsub,is,is_loc\nend \n\n\"\"\"\n\tn::PetscInt = PCASMGetLocalSubdomains(petsclib::PetscLibType,pc::PC, is::Vector{IS}, is_loc::Vector{IS}) \nGets the local subdomains (for this processor\nonly) for the additive Schwarz preconditioner, `PCASM`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n`        - if requested, the number of subdomains for this processor (default value = 1)\n- `is`       - if requested, the index sets that define the subdomains for this processor\n- `is_local` - if requested, the index sets that define the local part of the subdomains for this processor (can be `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMSetOverlap()`, `PCASMGetSubKSP()`,\n`PCASMCreateSubdomains2D()`, `PCASMSetLocalSubdomains()`, `PCASMGetLocalSubmatrices()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMGetLocalSubdomains\"))\n\"\"\"\nfunction PCASMGetLocalSubdomains(petsclib::PetscLibType, pc::PC, is::Vector{IS}, is_loc::Vector{IS}) end\n\n@for_petsc function PCASMGetLocalSubdomains(petsclib::$UnionPetscLib, pc::PC, is::Vector{IS}, is_loc::Vector{IS} )\n\tn_ = Ref{$PetscInt}()\n\tis_ = Ref(pointer(is))\n\tis_loc_ = Ref(pointer(is_loc))\n\n    @chk ccall(\n               (:PCASMGetLocalSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{IS}}, Ptr{Ptr{IS}}),\n               pc, n_, is_, is_loc_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tn::PetscInt = PCASMGetLocalSubmatrices(petsclib::PetscLibType,pc::PC, mat::Vector{PetscMat}) \nGets the local submatrices (for this processor\nonly) for the additive Schwarz preconditioner, `PCASM`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n`   - if requested, the number of matrices for this processor (default value = 1)\n- `mat` - if requested, the matrices\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMSetOverlap()`, `PCASMGetSubKSP()`,\n`PCASMCreateSubdomains2D()`, `PCASMSetLocalSubdomains()`, `PCASMGetLocalSubdomains()`, `PCSetModifySubMatrices()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMGetLocalSubmatrices\"))\n\"\"\"\nfunction PCASMGetLocalSubmatrices(petsclib::PetscLibType, pc::PC, mat::Vector{PetscMat}) end\n\n@for_petsc function PCASMGetLocalSubmatrices(petsclib::$UnionPetscLib, pc::PC, mat::Vector{PetscMat} )\n\tn_ = Ref{$PetscInt}()\n\tmat_ = Ref(pointer(mat))\n\n    @chk ccall(\n               (:PCASMGetLocalSubmatrices, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{CMat}}),\n               pc, n_, mat_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tPCASMSetDMSubdomains(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nIndicates whether to use `DMCreateDomainDecomposition()` to define the subdomains, whenever possible.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner\n- `flg` - boolean indicating whether to use subdomains defined by the `DM`\n\nOptions Database Key:\n- `-pc_asm_dm_subdomains <bool>` - use subdomains defined by the `DM` with `DMCreateDomainDecomposition()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMGetDMSubdomains()`, `PCASMSetTotalSubdomains()`, `PCASMSetOverlap()`\n`PCASMCreateSubdomains2D()`, `PCASMSetLocalSubdomains()`, `PCASMGetLocalSubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetDMSubdomains\"))\n\"\"\"\nfunction PCASMSetDMSubdomains(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCASMSetDMSubdomains(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCASMSetDMSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCASMGetDMSubdomains(petsclib::PetscLibType,pc::PC) \nReturns flag indicating whether to use `DMCreateDomainDecomposition()` to define the subdomains, whenever possible.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner\n\nOutput Parameter:\n- `flg` - boolean indicating whether to use subdomains defined by the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetDMSubdomains()`, `PCASMSetTotalSubdomains()`, `PCASMSetOverlap()`\n`PCASMCreateSubdomains2D()`, `PCASMSetLocalSubdomains()`, `PCASMGetLocalSubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMGetDMSubdomains\"))\n\"\"\"\nfunction PCASMGetDMSubdomains(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCASMGetDMSubdomains(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCASMGetDMSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tsub_mat_type::MatType = PCASMGetSubMatType(petsclib::PetscLibType,pc::PC) \nGets the matrix type used for `PCASM` subsolves, as a string.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the `PC`\n\nOutput Parameter:\n- `sub_mat_type` - name of matrix type\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMSetSubMatType()`, `PCSetType()`, `VecSetType()`, `MatType`, `Mat`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMGetSubMatType\"))\n\"\"\"\nfunction PCASMGetSubMatType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCASMGetSubMatType(petsclib::$UnionPetscLib, pc::PC )\n\tsub_mat_type_ = Ref{MatType}()\n\n    @chk ccall(\n               (:PCASMGetSubMatType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{MatType}),\n               pc, sub_mat_type_,\n              )\n\n\tsub_mat_type = unsafe_string(sub_mat_type_[])\n\n\treturn sub_mat_type\nend \n\n\"\"\"\n\tPCASMSetSubMatType(petsclib::PetscLibType,pc::PC, sub_mat_type::MatType) \nSet the type of matrix used for `PCASM` subsolves\n\nCollective\n\nInput Parameters:\n- `pc`           - the `PC` object\n- `sub_mat_type` - the `MatType`\n\nOptions Database Key:\n- `-pc_asm_sub_mat_type  <sub_mat_type>` - Sets the matrix type used for subsolves, for example, seqaijviennacl.\nIf you specify a base name like aijviennacl, the corresponding sequential type is assumed.\n\n-seealso: [](ch_ksp), `PCASM`, `PCASMGetSubMatType()`, `PCSetType()`, `VecSetType()`, `MatType`, `Mat`\n\n# External Links\n$(_doc_external(\"Ksp/PCASMSetSubMatType\"))\n\"\"\"\nfunction PCASMSetSubMatType(petsclib::PetscLibType, pc::PC, sub_mat_type::MatType) end\n\n@for_petsc function PCASMSetSubMatType(petsclib::$UnionPetscLib, pc::PC, sub_mat_type::MatType )\n\n    @chk ccall(\n               (:PCASMSetSubMatType, $petsc_library),\n               PetscErrorCode,\n               (PC, MatType),\n               pc, sub_mat_type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMPIServerBegin(petsclib::PetscLibType) \nstarts a server that runs on the `rank != 0` MPI processes waiting to process requests for\nparallel `KSP` solves and management of parallel `KSP` objects.\n\nLogically Collective on all MPI processes except rank 0\n\nOptions Database Keys:\n- `-mpi_linear_solver_server`                   - causes the PETSc program to start in MPI linear solver server mode where only the first MPI rank runs user code\n- `-mpi_linear_solver_server_view`              - displays information about all the linear systems solved by the MPI linear solver server at the conclusion of the program\n- `-mpi_linear_solver_server_use_shared_memory` - use shared memory when communicating matrices and vectors to server processes (default where supported)\n\nLevel: developer\n\n-seealso: [](sec_pcmpi), `PCMPIServerEnd()`, `PCMPI`, `KSPCheckPCMPI()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMPIServerBegin\"))\n\"\"\"\nfunction PCMPIServerBegin(petsclib::PetscLibType) end\n\n@for_petsc function PCMPIServerBegin(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCMPIServerBegin, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMPIServerEnd(petsclib::PetscLibType) \nends a server that runs on the rank != 0 MPI processes waiting to process requests for\nparallel KSP solves and management of parallel `KSP` objects.\n\nLogically Collective on all MPI ranks except 0\n\nLevel: developer\n\n-seealso: [](sec_pcmpi), `PCMPIServerBegin()`, `PCMPI`, `KSPCheckPCMPI()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMPIServerEnd\"))\n\"\"\"\nfunction PCMPIServerEnd(petsclib::PetscLibType) end\n\n@for_petsc function PCMPIServerEnd(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCMPIServerEnd, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMPIGetKSP(petsclib::PetscLibType,pc::PC, innerksp::PetscKSP) \nGets the `KSP` created by the `PCMPI`\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `innerksp` - the inner `KSP`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `PCMPI`, `PCREDISTRIBUTE`\n\n# External Links\n$(_doc_external(\"Ksp/PCMPIGetKSP\"))\n\"\"\"\nfunction PCMPIGetKSP(petsclib::PetscLibType, pc::PC, innerksp::PetscKSP) end\n\n@for_petsc function PCMPIGetKSP(petsclib::$UnionPetscLib, pc::PC, innerksp::PetscKSP )\n\tinnerksp_ = Ref(innerksp.ptr)\n\n    @chk ccall(\n               (:PCMPIGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, innerksp_,\n              )\n\n\tinnerksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPythonSetType(petsclib::PetscLibType,pc::PC, pyname::String) \nInitialize a `PC` object implemented in Python, a `PCPYTHON`.\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioner (`PC`) context.\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOptions Database Key:\n- `-pc_python_type <pyname>`  - python class\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCSHELL`, `PCCreate()`, `PCSetType()`, `PCPYTHON`, `PetscPythonInitialize()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPythonSetType\"))\n\"\"\"\nfunction PCPythonSetType(petsclib::PetscLibType, pc::PC, pyname::String) end\n\n@for_petsc function PCPythonSetType(petsclib::$UnionPetscLib, pc::PC, pyname::String )\n\n    @chk ccall(\n               (:PCPythonSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}),\n               pc, pyname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpyname::String = PCPythonGetType(petsclib::PetscLibType,pc::PC) \nGet the type of a `PC` object implemented in Python, a `PCPYTHON`.\n\nNot Collective\n\nInput Parameter:\n- `pc`  - the preconditioner (`PC`) context.\n\nOutput Parameter:\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCSHELL`, `PCCreate()`, `PCSetType()`, `PCPYTHON`, `PetscPythonInitialize()`, `PCPythonSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPythonGetType\"))\n\"\"\"\nfunction PCPythonGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCPythonGetType(petsclib::$UnionPetscLib, pc::PC )\n\tpyname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:PCPythonGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Ptr{Cchar}}),\n               pc, pyname_,\n              )\n\n\tpyname = unsafe_wrap(Array, pyname_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pyname\nend \n\n\"\"\"\n\tPCKSPSetKSP(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \nSets the `KSP` context for a `PCKSP`.\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `ksp` - the `KSP` solver\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCKSP`, `PCKSPGetKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCKSPSetKSP\"))\n\"\"\"\nfunction PCKSPSetKSP(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCKSPSetKSP(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\n    @chk ccall(\n               (:PCKSPSetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, CKSP),\n               pc, ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCKSPGetKSP(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \nGets the `KSP` context for a `PCKSP`.\n\nNot Collective but ksp returned is parallel if pc was parallel\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `ksp` - the `KSP` solver\n\n-seealso: [](ch_ksp), `PCKSP`, `PCKSPSetKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCKSPGetKSP\"))\n\"\"\"\nfunction PCKSPGetKSP(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCKSPGetKSP(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCKSPGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGResidualDefault(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec) \nDefault routine to calculate the residual.\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `b`   - the right-hand side\n- `x`   - the approximate solution\n\nOutput Parameter:\n- `r` - location to store the residual\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetResidual()`, `PCMGSetMatResidual()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGResidualDefault\"))\n\"\"\"\nfunction PCMGResidualDefault(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec) end\n\n@for_petsc function PCMGResidualDefault(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec )\n\n    @chk ccall(\n               (:PCMGResidualDefault, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, b, x, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGResidualTransposeDefault(petsclib::PetscLibType,mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec) \nDefault routine to calculate the residual of the transposed linear system\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `b`   - the right-hand side\n- `x`   - the approximate solution\n\nOutput Parameter:\n- `r` - location to store the residual\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetResidualTranspose()`, `PCMGMatResidualTransposeDefault()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGResidualTransposeDefault\"))\n\"\"\"\nfunction PCMGResidualTransposeDefault(petsclib::PetscLibType, mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec) end\n\n@for_petsc function PCMGResidualTransposeDefault(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscVec, x::PetscVec, r::PetscVec )\n\n    @chk ccall(\n               (:PCMGResidualTransposeDefault, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec, CVec),\n               mat, b, x, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGMatResidualDefault(petsclib::PetscLibType,mat::PetscMat, b::PetscMat, x::PetscMat, r::PetscMat) \nDefault routine to calculate the residual.\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `b`   - the right-hand side\n- `x`   - the approximate solution\n\nOutput Parameter:\n- `r` - location to store the residual\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetMatResidual()`, `PCMGResidualDefault()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGMatResidualDefault\"))\n\"\"\"\nfunction PCMGMatResidualDefault(petsclib::PetscLibType, mat::PetscMat, b::PetscMat, x::PetscMat, r::PetscMat) end\n\n@for_petsc function PCMGMatResidualDefault(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscMat, x::PetscMat, r::PetscMat )\n\n    @chk ccall(\n               (:PCMGMatResidualDefault, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat),\n               mat, b, x, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGMatResidualTransposeDefault(petsclib::PetscLibType,mat::PetscMat, b::PetscMat, x::PetscMat, r::PetscMat) \nDefault routine to calculate the residual of the transposed linear system\n\nCollective\n\nInput Parameters:\n- `mat` - the matrix\n- `b`   - the right-hand side\n- `x`   - the approximate solution\n\nOutput Parameter:\n- `r` - location to store the residual\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetMatResidualTranspose()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGMatResidualTransposeDefault\"))\n\"\"\"\nfunction PCMGMatResidualTransposeDefault(petsclib::PetscLibType, mat::PetscMat, b::PetscMat, x::PetscMat, r::PetscMat) end\n\n@for_petsc function PCMGMatResidualTransposeDefault(petsclib::$UnionPetscLib, mat::PetscMat, b::PetscMat, x::PetscMat, r::PetscMat )\n\n    @chk ccall(\n               (:PCMGMatResidualTransposeDefault, $petsc_library),\n               PetscErrorCode,\n               (CMat, CMat, CMat, CMat),\n               mat, b, x, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetCoarseSolve(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \nGets the solver context to be used on the coarse grid.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the multigrid context\n\nOutput Parameter:\n- `ksp` - the coarse grid solver context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetSmootherUp()`, `PCMGGetSmootherDown()`, `PCMGGetSmoother()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetCoarseSolve\"))\n\"\"\"\nfunction PCMGGetCoarseSolve(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCMGGetCoarseSolve(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCMGGetCoarseSolve, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetResidual(petsclib::PetscLibType,pc::PC, l::PetscInt, residual::external, mat::PetscMat) \nSets the function to be used to calculate the residual on the lth level.\n\nLogically Collective\n\nInput Parameters:\n- `pc`       - the multigrid context\n- `l`        - the level (0 is coarsest) to supply\n- `residual` - function used to form residual, if none is provided the previously provide one is used, if no\nprevious one were provided then a default is used\n- `mat`      - matrix associated with residual\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGResidualDefault()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetResidual\"))\n\"\"\"\nfunction PCMGSetResidual(petsclib::PetscLibType, pc::PC, l::PetscInt, residual::external, mat::PetscMat) end\n\n@for_petsc function PCMGSetResidual(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, residual::external, mat::PetscMat )\n\n    @chk ccall(\n               (:PCMGSetResidual, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, external, CMat),\n               pc, l, residual, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetResidualTranspose(petsclib::PetscLibType,pc::PC, l::PetscInt, residualt::external, mat::PetscMat) \nSets the function to be used to calculate the residual of the transposed linear system\non the lth level.\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the multigrid context\n- `l`         - the level (0 is coarsest) to supply\n- `residualt` - function used to form transpose of residual, if none is provided the previously provide one is used, if no\nprevious one were provided then a default is used\n- `mat`       - matrix associated with residual\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGResidualTransposeDefault()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetResidualTranspose\"))\n\"\"\"\nfunction PCMGSetResidualTranspose(petsclib::PetscLibType, pc::PC, l::PetscInt, residualt::external, mat::PetscMat) end\n\n@for_petsc function PCMGSetResidualTranspose(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, residualt::external, mat::PetscMat )\n\n    @chk ccall(\n               (:PCMGSetResidualTranspose, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, external, CMat),\n               pc, l, residualt, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetInterpolation(petsclib::PetscLibType,pc::PC, l::PetscInt, mat::PetscMat) \nSets the function to be used to calculate the\ninterpolation from l-1 to the lth level\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the multigrid context\n- `mat` - the interpolation operator\n- `l`   - the level (0 is coarsest) to supply [do not supply 0]\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetRestriction()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetInterpolation\"))\n\"\"\"\nfunction PCMGSetInterpolation(petsclib::PetscLibType, pc::PC, l::PetscInt, mat::PetscMat) end\n\n@for_petsc function PCMGSetInterpolation(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, mat::PetscMat )\n\n    @chk ccall(\n               (:PCMGSetInterpolation, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CMat),\n               pc, l, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetOperators(petsclib::PetscLibType,pc::PC, l::PetscInt, Amat::PetscMat, Pmat::PetscMat) \nSets operator and matrix from which to construct a preconditioner for lth level\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the multigrid context\n- `Amat` - the operator\n- `Pmat` - the preconditioning operator\n- `l`    - the level (0 is the coarsest) to supply\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetGalerkin()`, `PCMGSetRestriction()`, `PCMGSetInterpolation()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetOperators\"))\n\"\"\"\nfunction PCMGSetOperators(petsclib::PetscLibType, pc::PC, l::PetscInt, Amat::PetscMat, Pmat::PetscMat) end\n\n@for_petsc function PCMGSetOperators(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, Amat::PetscMat, Pmat::PetscMat )\n\n    @chk ccall(\n               (:PCMGSetOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CMat, CMat),\n               pc, l, Amat, Pmat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetInterpolation(petsclib::PetscLibType,pc::PC, l::PetscInt, mat::PetscMat) \nGets the function to be used to calculate the\ninterpolation from l-1 to the lth level\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) to supply [Do not supply 0]\n\nOutput Parameter:\n- `mat` - the interpolation matrix, can be `NULL`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetRestriction()`, `PCMGSetInterpolation()`, `PCMGGetRScale()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetInterpolation\"))\n\"\"\"\nfunction PCMGGetInterpolation(petsclib::PetscLibType, pc::PC, l::PetscInt, mat::PetscMat) end\n\n@for_petsc function PCMGGetInterpolation(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:PCMGGetInterpolation, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CMat}),\n               pc, l, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetRestriction(petsclib::PetscLibType,pc::PC, l::PetscInt, mat::PetscMat) \nSets the function to be used to restrict dual vectors\nfrom level l to l-1.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the multigrid context\n- `l`   - the level (0 is coarsest) to supply [Do not supply 0]\n- `mat` - the restriction matrix\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetInterpolation()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetRestriction\"))\n\"\"\"\nfunction PCMGSetRestriction(petsclib::PetscLibType, pc::PC, l::PetscInt, mat::PetscMat) end\n\n@for_petsc function PCMGSetRestriction(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, mat::PetscMat )\n\n    @chk ccall(\n               (:PCMGSetRestriction, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CMat),\n               pc, l, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetRestriction(petsclib::PetscLibType,pc::PC, l::PetscInt, mat::PetscMat) \nGets the function to be used to restrict dual (i.e. residual) vectors\nfrom level l to l-1.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) to supply [Do not supply 0]\n\nOutput Parameter:\n- `mat` - the restriction matrix\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetInterpolation()`, `PCMGSetRestriction()`, `PCMGGetRScale()`, `PCMGGetInjection()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetRestriction\"))\n\"\"\"\nfunction PCMGGetRestriction(petsclib::PetscLibType, pc::PC, l::PetscInt, mat::PetscMat) end\n\n@for_petsc function PCMGGetRestriction(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:PCMGGetRestriction, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CMat}),\n               pc, l, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetRScale(petsclib::PetscLibType,pc::PC, l::PetscInt, rscale::PetscVec) \nSets the pointwise scaling for the restriction operator from level l to l\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the multigrid context\n- `l`      - the level (0 is coarsest) to supply [Do not supply 0]\n- `rscale` - the scaling\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetInterpolation()`, `PCMGSetRestriction()`, `PCMGGetRScale()`, `PCMGSetInjection()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetRScale\"))\n\"\"\"\nfunction PCMGSetRScale(petsclib::PetscLibType, pc::PC, l::PetscInt, rscale::PetscVec) end\n\n@for_petsc function PCMGSetRScale(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, rscale::PetscVec )\n\n    @chk ccall(\n               (:PCMGSetRScale, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CVec),\n               pc, l, rscale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetRScale(petsclib::PetscLibType,pc::PC, l::PetscInt, rscale::PetscVec) \nGets the pointwise scaling for the restriction operator from level l to l\n\nCollective\n\nInput Parameters:\n- `pc`     - the multigrid context\n- `rscale` - the scaling\n- `l`      - the level (0 is coarsest) to supply [Do not supply 0]\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetInterpolation()`, `PCMGGetRestriction()`, `PCMGGetInjection()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetRScale\"))\n\"\"\"\nfunction PCMGGetRScale(petsclib::PetscLibType, pc::PC, l::PetscInt, rscale::PetscVec) end\n\n@for_petsc function PCMGGetRScale(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, rscale::PetscVec )\n\trscale_ = Ref(rscale.ptr)\n\n    @chk ccall(\n               (:PCMGGetRScale, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CVec}),\n               pc, l, rscale_,\n              )\n\n\trscale.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetInjection(petsclib::PetscLibType,pc::PC, l::PetscInt, mat::PetscMat) \nSets the function to be used to inject primal (i.e. solution) vectors\nfrom level l to l-1.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the multigrid context\n- `l`   - the level (0 is coarsest) to supply [Do not supply 0]\n- `mat` - the injection matrix\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetRestriction()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetInjection\"))\n\"\"\"\nfunction PCMGSetInjection(petsclib::PetscLibType, pc::PC, l::PetscInt, mat::PetscMat) end\n\n@for_petsc function PCMGSetInjection(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, mat::PetscMat )\n\n    @chk ccall(\n               (:PCMGSetInjection, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CMat),\n               pc, l, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetInjection(petsclib::PetscLibType,pc::PC, l::PetscInt, mat::PetscMat) \nGets the function to be used to inject primal vectors (i.e. solutions)\nfrom level l to l-1.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) to supply [Do not supply 0]\n\nOutput Parameter:\n- `mat` - the restriction matrix (may be `NULL` if no injection is available).\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetInjection()`, `PCMGetGetRestriction()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetInjection\"))\n\"\"\"\nfunction PCMGGetInjection(petsclib::PetscLibType, pc::PC, l::PetscInt, mat::PetscMat) end\n\n@for_petsc function PCMGGetInjection(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:PCMGGetInjection, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CMat}),\n               pc, l, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetSmoother(petsclib::PetscLibType,pc::PC, l::PetscInt, ksp::PetscKSP) \nGets the `KSP` context to be used as smoother for\nboth pre- and post-smoothing.  Call both `PCMGGetSmootherUp()` and\n`PCMGGetSmootherDown()` to use different functions for pre- and\npost-smoothing.\n\nNot Collective, ksp returned is parallel if pc is\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) to supply\n\nOutput Parameter:\n- `ksp` - the smoother\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetSmootherUp()`, `PCMGGetSmootherDown()`, `PCMGGetCoarseSolve()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetSmoother\"))\n\"\"\"\nfunction PCMGGetSmoother(petsclib::PetscLibType, pc::PC, l::PetscInt, ksp::PetscKSP) end\n\n@for_petsc function PCMGGetSmoother(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCMGGetSmoother, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CKSP}),\n               pc, l, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetSmootherUp(petsclib::PetscLibType,pc::PC, l::PetscInt, ksp::PetscKSP) \nGets the KSP context to be used as smoother after\ncoarse grid correction (post-smoother).\n\nNot Collective, ksp returned is parallel if pc is\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) to supply\n\nOutput Parameter:\n- `ksp` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetSmootherDown()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetSmootherUp\"))\n\"\"\"\nfunction PCMGGetSmootherUp(petsclib::PetscLibType, pc::PC, l::PetscInt, ksp::PetscKSP) end\n\n@for_petsc function PCMGGetSmootherUp(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCMGGetSmootherUp, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CKSP}),\n               pc, l, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetSmootherDown(petsclib::PetscLibType,pc::PC, l::PetscInt, ksp::PetscKSP) \nGets the `KSP` context to be used as smoother before\ncoarse grid correction (pre-smoother).\n\nNot Collective, ksp returned is parallel if pc is\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) to supply\n\nOutput Parameter:\n- `ksp` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetSmootherUp()`, `PCMGGetSmoother()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetSmootherDown\"))\n\"\"\"\nfunction PCMGGetSmootherDown(petsclib::PetscLibType, pc::PC, l::PetscInt, ksp::PetscKSP) end\n\n@for_petsc function PCMGGetSmootherDown(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCMGGetSmootherDown, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CKSP}),\n               pc, l, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetCycleTypeOnLevel(petsclib::PetscLibType,pc::PC, l::PetscInt, c::PCMGCycleType) \nSets the type of cycle (aka cycle index) to run on the specified level.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest)\n- `c`  - either `PC_MG_CYCLE_V` or `PC_MG_CYCLE_W`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGCycleType`, `PCMGSetCycleType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetCycleTypeOnLevel\"))\n\"\"\"\nfunction PCMGSetCycleTypeOnLevel(petsclib::PetscLibType, pc::PC, l::PetscInt, c::PCMGCycleType) end\n\n@for_petsc function PCMGSetCycleTypeOnLevel(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, c::PCMGCycleType )\n\n    @chk ccall(\n               (:PCMGSetCycleTypeOnLevel, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, PCMGCycleType),\n               pc, l, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetRhs(petsclib::PetscLibType,pc::PC, l::PetscInt, c::PetscVec) \nSets the vector to be used to store the right\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) this is to be used for\n- `c`  - the Vec\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetX()`, `PCMGSetR()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetRhs\"))\n\"\"\"\nfunction PCMGSetRhs(petsclib::PetscLibType, pc::PC, l::PetscInt, c::PetscVec) end\n\n@for_petsc function PCMGSetRhs(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, c::PetscVec )\n\n    @chk ccall(\n               (:PCMGSetRhs, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CVec),\n               pc, l, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetX(petsclib::PetscLibType,pc::PC, l::PetscInt, c::PetscVec) \nSets the vector to be used to store the solution on a particular level.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) this is to be used for (do not supply the finest level)\n- `c`  - the Vec\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetRhs()`, `PCMGSetR()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetX\"))\n\"\"\"\nfunction PCMGSetX(petsclib::PetscLibType, pc::PC, l::PetscInt, c::PetscVec) end\n\n@for_petsc function PCMGSetX(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, c::PetscVec )\n\n    @chk ccall(\n               (:PCMGSetX, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CVec),\n               pc, l, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetR(petsclib::PetscLibType,pc::PC, l::PetscInt, c::PetscVec) \nSets the vector to be used to store the residual on a particular level.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `l`  - the level (0 is coarsest) this is to be used for\n- `c`  - the Vec\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetRhs()`, `PCMGSetX()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetR\"))\n\"\"\"\nfunction PCMGSetR(petsclib::PetscLibType, pc::PC, l::PetscInt, c::PetscVec) end\n\n@for_petsc function PCMGSetR(petsclib::$UnionPetscLib, pc::PC, l::$PetscInt, c::PetscVec )\n\n    @chk ccall(\n               (:PCMGSetR, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CVec),\n               pc, l, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetLevels(petsclib::PetscLibType,pc::PC, levels::PetscInt, comms::MPI_Comm) \nSets the number of levels to use with `PCMG`.\nMust be called before any other `PCMG` routine.\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `levels` - the number of levels\n- `comms`  - optional communicators for each level; this is to allow solving the coarser problems\non smaller sets of processes. For processes that are not included in the computation\nyou must pass `MPI_COMM_NULL`. Use comms = `NULL` to specify that all processes\nshould participate in each level of problem.\n\nOptions Database Key:\n- `-pc_mg_levels <levels>` - set the number of levels to use\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMGSetType()`, `PCMGGetLevels()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetLevels\"))\n\"\"\"\nfunction PCMGSetLevels(petsclib::PetscLibType, pc::PC, levels::PetscInt, comms::MPI_Comm) end\n\n@for_petsc function PCMGSetLevels(petsclib::$UnionPetscLib, pc::PC, levels::$PetscInt, comms::MPI_Comm )\n\n    @chk ccall(\n               (:PCMGSetLevels, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{MPI_Comm}),\n               pc, levels, comms,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlevels::PetscInt = PCMGGetLevels(petsclib::PetscLibType,pc::PC) \nGets the number of levels to use with `PCMG`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `levels` - the number of levels\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetLevels()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetLevels\"))\n\"\"\"\nfunction PCMGGetLevels(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCMGGetLevels(petsclib::$UnionPetscLib, pc::PC )\n\tlevels_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCMGGetLevels, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}),\n               pc, levels_,\n              )\n\n\tlevels = levels_[]\n\n\treturn levels\nend \n\n\"\"\"\n\tgc::PetscReal,oc::PetscReal = PCMGGetGridComplexity(petsclib::PetscLibType,pc::PC) \ncompute operator and grid complexity of the `PCMG` hierarchy\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `gc` - grid complexity = sum_i(n_i) / n_0\n- `oc` - operator complexity = sum_i(nnz_i) / nnz_0\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetLevels()`, `PCMGSetLevels()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetGridComplexity\"))\n\"\"\"\nfunction PCMGGetGridComplexity(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCMGGetGridComplexity(petsclib::$UnionPetscLib, pc::PC )\n\tgc_ = Ref{$PetscReal}()\n\toc_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PCMGGetGridComplexity, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               pc, gc_, oc_,\n              )\n\n\tgc = gc_[]\n\toc = oc_[]\n\n\treturn gc,oc\nend \n\n\"\"\"\n\tPCMGSetType(petsclib::PetscLibType,pc::PC, form::PCMGType) \nDetermines the form of multigrid to use, either\nmultiplicative, additive, full, or the Kaskade algorithm.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `form` - multigrid form, one of `PC_MG_MULTIPLICATIVE`, `PC_MG_ADDITIVE`, `PC_MG_FULL`, `PC_MG_KASKADE`\n\nOptions Database Key:\n- `-pc_mg_type <form>` - Sets <form>, one of multiplicative, additive, full, kaskade\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMGType`, `PCMG`, `PCMGGetLevels()`, `PCMGSetLevels()`, `PCMGGetType()`, `PCMGCycleType`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetType\"))\n\"\"\"\nfunction PCMGSetType(petsclib::PetscLibType, pc::PC, form::PCMGType) end\n\n@for_petsc function PCMGSetType(petsclib::$UnionPetscLib, pc::PC, form::PCMGType )\n\n    @chk ccall(\n               (:PCMGSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCMGType),\n               pc, form,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCMGType = PCMGGetType(petsclib::PetscLibType,pc::PC) \nFinds the form of multigrid the `PCMG` is using  multiplicative, additive, full, or the Kaskade algorithm.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - one of `PC_MG_MULTIPLICATIVE`, `PC_MG_ADDITIVE`, `PC_MG_FULL`, `PC_MG_KASKADE`, `PCMGCycleType`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMGType`, `PCMG`, `PCMGGetLevels()`, `PCMGSetLevels()`, `PCMGSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetType\"))\n\"\"\"\nfunction PCMGGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCMGGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCMGType}()\n\n    @chk ccall(\n               (:PCMGGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCMGType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCMGSetCycleType(petsclib::PetscLibType,pc::PC, n::PCMGCycleType) \nSets the type cycles to use.  Use `PCMGSetCycleTypeOnLevel()` for more\ncomplicated cycling.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `n`  - either `PC_MG_CYCLE_V` or `PC_MG_CYCLE_W`\n\nOptions Database Key:\n- `-pc_mg_cycle_type <v,w>` - provide the cycle desired\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetCycleTypeOnLevel()`, `PCMGType`, `PCMGCycleType`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetCycleType\"))\n\"\"\"\nfunction PCMGSetCycleType(petsclib::PetscLibType, pc::PC, n::PCMGCycleType) end\n\n@for_petsc function PCMGSetCycleType(petsclib::$UnionPetscLib, pc::PC, n::PCMGCycleType )\n\n    @chk ccall(\n               (:PCMGSetCycleType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCMGCycleType),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGMultiplicativeSetCycles(petsclib::PetscLibType,pc::PC, n::PetscInt) \nSets the number of cycles to use for each preconditioner step\nof multigrid when `PCMGType` is `PC_MG_MULTIPLICATIVE`\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `n`  - number of cycles (default is 1)\n\nOptions Database Key:\n- `-pc_mg_multiplicative_cycles n` - set the number of cycles\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMGSetCycleTypeOnLevel()`, `PCMGSetCycleType()`, `PCMGCycleType`, `PCMGType`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGMultiplicativeSetCycles\"))\n\"\"\"\nfunction PCMGMultiplicativeSetCycles(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCMGMultiplicativeSetCycles(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCMGMultiplicativeSetCycles, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetGalerkin(petsclib::PetscLibType,pc::PC, use::PCMGGalerkinType) \nCauses the coarser grid matrices to be computed from the\nfinest grid via the Galerkin process: A_i-1 = r_i * A_i * p_i\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the multigrid context\n- `use` - one of `PC_MG_GALERKIN_BOTH`, `PC_MG_GALERKIN_PMAT`, `PC_MG_GALERKIN_MAT`, or `PC_MG_GALERKIN_NONE`\n\nOptions Database Key:\n- `-pc_mg_galerkin <both,pmat,mat,none>` - set the matrices to form via the Galerkin process\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetGalerkin()`, `PCMGGalerkinType`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetGalerkin\"))\n\"\"\"\nfunction PCMGSetGalerkin(petsclib::PetscLibType, pc::PC, use::PCMGGalerkinType) end\n\n@for_petsc function PCMGSetGalerkin(petsclib::$UnionPetscLib, pc::PC, use::PCMGGalerkinType )\n\n    @chk ccall(\n               (:PCMGSetGalerkin, $petsc_library),\n               PetscErrorCode,\n               (PC, PCMGGalerkinType),\n               pc, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetGalerkin(petsclib::PetscLibType,pc::PC, galerkin::PCMGGalerkinType) \nChecks if Galerkin multigrid is being used, i.e. A_i\n\nNot Collective\n\nInput Parameter:\n- `pc` - the multigrid context\n\nOutput Parameter:\n- `galerkin` - one of `PC_MG_GALERKIN_BOTH`,`PC_MG_GALERKIN_PMAT`,`PC_MG_GALERKIN_MAT`, `PC_MG_GALERKIN_NONE`, or `PC_MG_GALERKIN_EXTERNAL`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetGalerkin()`, `PCMGGalerkinType`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetGalerkin\"))\n\"\"\"\nfunction PCMGGetGalerkin(petsclib::PetscLibType, pc::PC, galerkin::PCMGGalerkinType) end\n\n@for_petsc function PCMGGetGalerkin(petsclib::$UnionPetscLib, pc::PC, galerkin::PCMGGalerkinType )\n\n    @chk ccall(\n               (:PCMGGetGalerkin, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCMGGalerkinType}),\n               pc, galerkin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetAdaptCoarseSpaceType(petsclib::PetscLibType,pc::PC, ctype::PCMGCoarseSpaceType) \nSet the type of adaptive coarse space.\n\nAdapts or creates the interpolator based upon a vector space which should be accurately captured by the next coarser mesh, and thus accurately interpolated.\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the multigrid context\n- `ctype` - the type of coarse space\n\nOptions Database Keys:\n- `-pc_mg_adapt_interp_n <int>`             - The number of modes to use\n- `-pc_mg_adapt_interp_coarse_space <type>` - The type of coarse space: none, `polynomial`, `harmonic`, `eigenvector`, `generalized_eigenvector`, `gdsw`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGCoarseSpaceType`, `PCMGGetAdaptCoarseSpaceType()`, `PCMGSetGalerkin()`, `PCMGSetAdaptInterpolation()`, `DM`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetAdaptCoarseSpaceType\"))\n\"\"\"\nfunction PCMGSetAdaptCoarseSpaceType(petsclib::PetscLibType, pc::PC, ctype::PCMGCoarseSpaceType) end\n\n@for_petsc function PCMGSetAdaptCoarseSpaceType(petsclib::$UnionPetscLib, pc::PC, ctype::PCMGCoarseSpaceType )\n\n    @chk ccall(\n               (:PCMGSetAdaptCoarseSpaceType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCMGCoarseSpaceType),\n               pc, ctype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctype::PCMGCoarseSpaceType = PCMGGetAdaptCoarseSpaceType(petsclib::PetscLibType,pc::PC) \nGet the type of adaptive coarse space.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the multigrid context\n\nOutput Parameter:\n- `ctype` - the type of coarse space\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGCoarseSpaceType`, `PCMGSetAdaptCoarseSpaceType()`, `PCMGSetGalerkin()`, `PCMGSetAdaptInterpolation()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetAdaptCoarseSpaceType\"))\n\"\"\"\nfunction PCMGGetAdaptCoarseSpaceType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCMGGetAdaptCoarseSpaceType(petsclib::$UnionPetscLib, pc::PC )\n\tctype_ = Ref{PCMGCoarseSpaceType}()\n\n    @chk ccall(\n               (:PCMGGetAdaptCoarseSpaceType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCMGCoarseSpaceType}),\n               pc, ctype_,\n              )\n\n\tctype = unsafe_string(ctype_[])\n\n\treturn ctype\nend \n\n\"\"\"\n\tPCMGSetAdaptInterpolation(petsclib::PetscLibType,pc::PC, adapt::PetscBool) \nAdapt the interpolator based upon a vector space which should be accurately captured by the next coarser mesh, and thus accurately interpolated.\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the multigrid context\n- `adapt` - flag for adaptation of the interpolator\n\nOptions Database Keys:\n- `-pc_mg_adapt_interp`                     - Turn on adaptation\n- `-pc_mg_adapt_interp_n <int>`             - The number of modes to use, should be divisible by dimension\n- `-pc_mg_adapt_interp_coarse_space <type>` - The type of coarse space: polynomial, harmonic, eigenvector, generalized_eigenvector\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetAdaptInterpolation()`, `PCMGSetGalerkin()`, `PCMGGetAdaptCoarseSpaceType()`, `PCMGSetAdaptCoarseSpaceType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetAdaptInterpolation\"))\n\"\"\"\nfunction PCMGSetAdaptInterpolation(petsclib::PetscLibType, pc::PC, adapt::PetscBool) end\n\n@for_petsc function PCMGSetAdaptInterpolation(petsclib::$UnionPetscLib, pc::PC, adapt::PetscBool )\n\n    @chk ccall(\n               (:PCMGSetAdaptInterpolation, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tadapt::PetscBool = PCMGGetAdaptInterpolation(petsclib::PetscLibType,pc::PC) \nGet the flag to adapt the interpolator based upon a vector space which should be accurately captured by the next coarser mesh,\nand thus accurately interpolated.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the multigrid context\n\nOutput Parameter:\n- `adapt` - flag for adaptation of the interpolator\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetAdaptInterpolation()`, `PCMGSetGalerkin()`, `PCMGGetAdaptCoarseSpaceType()`, `PCMGSetAdaptCoarseSpaceType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetAdaptInterpolation\"))\n\"\"\"\nfunction PCMGGetAdaptInterpolation(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCMGGetAdaptInterpolation(petsclib::$UnionPetscLib, pc::PC )\n\tadapt_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCMGGetAdaptInterpolation, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, adapt_,\n              )\n\n\tadapt = adapt_[]\n\n\treturn adapt\nend \n\n\"\"\"\n\tPCMGSetAdaptCR(petsclib::PetscLibType,pc::PC, cr::PetscBool) \nMonitor the coarse space quality using an auxiliary solve with compatible relaxation.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `cr` - flag for compatible relaxation\n\nOptions Database Key:\n- `-pc_mg_adapt_cr` - Turn on compatible relaxation\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGGetAdaptCR()`, `PCMGSetAdaptInterpolation()`, `PCMGSetGalerkin()`, `PCMGGetAdaptCoarseSpaceType()`, `PCMGSetAdaptCoarseSpaceType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetAdaptCR\"))\n\"\"\"\nfunction PCMGSetAdaptCR(petsclib::PetscLibType, pc::PC, cr::PetscBool) end\n\n@for_petsc function PCMGSetAdaptCR(petsclib::$UnionPetscLib, pc::PC, cr::PetscBool )\n\n    @chk ccall(\n               (:PCMGSetAdaptCR, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, cr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcr::PetscBool = PCMGGetAdaptCR(petsclib::PetscLibType,pc::PC) \nGet the flag to monitor coarse space quality using an auxiliary solve with compatible relaxation.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the multigrid context\n\nOutput Parameter:\n- `cr` - flag for compatible relaxaion\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCMGSetAdaptCR()`, `PCMGGetAdaptInterpolation()`, `PCMGSetGalerkin()`, `PCMGGetAdaptCoarseSpaceType()`, `PCMGSetAdaptCoarseSpaceType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetAdaptCR\"))\n\"\"\"\nfunction PCMGGetAdaptCR(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCMGGetAdaptCR(petsclib::$UnionPetscLib, pc::PC )\n\tcr_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCMGGetAdaptCR, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, cr_,\n              )\n\n\tcr = cr_[]\n\n\treturn cr\nend \n\n\"\"\"\n\tPCMGSetNumberSmooth(petsclib::PetscLibType,pc::PC, n::PetscInt) \nSets the number of pre and post\non all levels.  Use `PCMGDistinctSmoothUp()` to create separate up and down smoothers if you want different numbers of\npre- and post-smoothing steps.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the multigrid context\n- `n`  - the number of smoothing steps\n\nOptions Database Key:\n- `-mg_levels_ksp_max_it <n>` - Sets number of pre and post-smoothing steps\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetDistinctSmoothUp()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetNumberSmooth\"))\n\"\"\"\nfunction PCMGSetNumberSmooth(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCMGSetNumberSmooth(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCMGSetNumberSmooth, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGSetDistinctSmoothUp(petsclib::PetscLibType,pc::PC) \nsets the up (post) smoother to be a separate `KSP` from the down (pre) smoother on all levels\nand adds the suffix _up to the options name\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOptions Database Key:\n- `-pc_mg_distinct_smoothup <bool>` - use distinct smoothing objects\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMG`, `PCMGSetNumberSmooth()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGSetDistinctSmoothUp\"))\n\"\"\"\nfunction PCMGSetDistinctSmoothUp(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCMGSetDistinctSmoothUp(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCMGSetDistinctSmoothUp, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGRegisterCoarseSpaceConstructor(petsclib::PetscLibType,name::String, fnc::PCMGCoarseSpaceConstructorFn) \nAdds a method to the `PCMG` package for coarse space construction.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `name`     - name of the constructor\n- `function` - constructor routine, see `PCMGCoarseSpaceConstructorFn`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMGCoarseSpaceConstructorFn`, `PCMG`, `PCMGGetCoarseSpaceConstructor()`, `PCRegister()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGRegisterCoarseSpaceConstructor\"))\n\"\"\"\nfunction PCMGRegisterCoarseSpaceConstructor(petsclib::PetscLibType, name::String, fnc::PCMGCoarseSpaceConstructorFn) end\n\n@for_petsc function PCMGRegisterCoarseSpaceConstructor(petsclib::$UnionPetscLib, name::String, fnc::PCMGCoarseSpaceConstructorFn )\n\n    @chk ccall(\n               (:PCMGRegisterCoarseSpaceConstructor, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PCMGCoarseSpaceConstructorFn}),\n               name, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGetCoarseSpaceConstructor(petsclib::PetscLibType,name::String, fnc::PCMGCoarseSpaceConstructorFn) \nReturns the given coarse space construction method.\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `name` - name of the constructor\n\nOutput Parameter:\n- `function` - constructor routine\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCMGCoarseSpaceConstructorFn`, `PCMG`, `PCMGRegisterCoarseSpaceConstructor()`, `PCRegister()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGetCoarseSpaceConstructor\"))\n\"\"\"\nfunction PCMGGetCoarseSpaceConstructor(petsclib::PetscLibType, name::String, fnc::PCMGCoarseSpaceConstructorFn) end\n\n@for_petsc function PCMGGetCoarseSpaceConstructor(petsclib::$UnionPetscLib, name::String, fnc::PCMGCoarseSpaceConstructorFn )\n\n    @chk ccall(\n               (:PCMGGetCoarseSpaceConstructor, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PCMGCoarseSpaceConstructorFn),\n               name, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHMGSetReuseInterpolation(petsclib::PetscLibType,pc::PC, reuse::PetscBool) \nReuse the interpolation matrices in `PCHMG` after changing the matrices numerical values\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the `PCHMG` context\n- `reuse` - `PETSC_TRUE` indicates that `PCHMG` will reuse the interpolations\n\nOptions Database Key:\n- `-pc_hmg_reuse_interpolation <true | false>` - Whether or not to reuse the interpolations. If true, it potentially save the compute time.\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `PCHMG`, `PCGAMG`, `PCHMGSetUseSubspaceCoarsening()`, `PCHMGSetCoarseningComponent()`, `PCHMGSetInnerPCType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHMGSetReuseInterpolation\"))\n\"\"\"\nfunction PCHMGSetReuseInterpolation(petsclib::PetscLibType, pc::PC, reuse::PetscBool) end\n\n@for_petsc function PCHMGSetReuseInterpolation(petsclib::$UnionPetscLib, pc::PC, reuse::PetscBool )\n\n    @chk ccall(\n               (:PCHMGSetReuseInterpolation, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, reuse,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHMGSetUseSubspaceCoarsening(petsclib::PetscLibType,pc::PC, subspace::PetscBool) \nUse subspace coarsening in `PCHMG`\n\nLogically Collective\n\nInput Parameters:\n- `pc`       - the `PCHMG` context\n- `subspace` - `PETSC_TRUE` indicates that `PCHMG` will use the subspace coarsening\n\nOptions Database Key:\n- `-pc_hmg_use_subspace_coarsening  <true | false>` - Whether or not to use subspace coarsening (that is, coarsen a submatrix).\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `PCHMG`, `PCHMGSetReuseInterpolation()`, `PCHMGSetCoarseningComponent()`, `PCHMGSetInnerPCType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHMGSetUseSubspaceCoarsening\"))\n\"\"\"\nfunction PCHMGSetUseSubspaceCoarsening(petsclib::PetscLibType, pc::PC, subspace::PetscBool) end\n\n@for_petsc function PCHMGSetUseSubspaceCoarsening(petsclib::$UnionPetscLib, pc::PC, subspace::PetscBool )\n\n    @chk ccall(\n               (:PCHMGSetUseSubspaceCoarsening, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, subspace,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHMGSetInnerPCType(petsclib::PetscLibType,pc::PC, type::PCType) \nSet an inner `PC` type to be used in the `PCHMG` preconditioner. That is the method used to compute\nthe hierarchy of restriction operators.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the `PCHMG` context\n- `type` - `PCHYPRE` or `PCGAMG` coarsening algorithm\n\nOptions Database Key:\n- `-hmg_inner_pc_type <hypre, gamg>` - What method is used to coarsen matrix\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `PCHMG`, `PCType`, `PCHMGSetReuseInterpolation()`, `PCHMGSetUseSubspaceCoarsening()`, `PCHMGSetCoarseningComponent()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHMGSetInnerPCType\"))\n\"\"\"\nfunction PCHMGSetInnerPCType(petsclib::PetscLibType, pc::PC, type::PCType) end\n\n@for_petsc function PCHMGSetInnerPCType(petsclib::$UnionPetscLib, pc::PC, type::PCType )\n\n    @chk ccall(\n               (:PCHMGSetInnerPCType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHMGSetCoarseningComponent(petsclib::PetscLibType,pc::PC, component::PetscInt) \nSet which component of the PDE is used for the subspace\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the `PCHMG` context\n- `component` - which component `PC` will coarsen\n\nOptions Database Key:\n- `-pc_hmg_coarsening_component <i>` - Which component is chosen for the subspace-based coarsening algorithm\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `PCHMG`, `PCType`, `PCGAMG`, `PCHMGSetReuseInterpolation()`, `PCHMGSetUseSubspaceCoarsening()`, `PCHMGSetInnerPCType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHMGSetCoarseningComponent\"))\n\"\"\"\nfunction PCHMGSetCoarseningComponent(petsclib::PetscLibType, pc::PC, component::PetscInt) end\n\n@for_petsc function PCHMGSetCoarseningComponent(petsclib::$UnionPetscLib, pc::PC, component::$PetscInt )\n\n    @chk ccall(\n               (:PCHMGSetCoarseningComponent, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, component,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHMGUseMatMAIJ(petsclib::PetscLibType,pc::PC, usematmaij::PetscBool) \nSet a flag that indicates if or not to use `MATMAIJ` for the interpolation matrices to save memory\n\nLogically Collective\n\nInput Parameters:\n- `pc`         - the `PCHMG` context\n- `usematmaij` - `PETSC_TRUE` (default) to use `MATMAIJ` for interpolations.\n\nOptions Database Key:\n- `-pc_hmg_use_matmaij` - <true | false >\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `PCHMG`, `PCType`, `PCGAMG`\n\n# External Links\n$(_doc_external(\"Ksp/PCHMGUseMatMAIJ\"))\n\"\"\"\nfunction PCHMGUseMatMAIJ(petsclib::PetscLibType, pc::PC, usematmaij::PetscBool) end\n\n@for_petsc function PCHMGUseMatMAIJ(petsclib::$UnionPetscLib, pc::PC, usematmaij::PetscBool )\n\n    @chk ccall(\n               (:PCHMGUseMatMAIJ, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, usematmaij,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCTelescopeGetKSP(petsclib::PetscLibType,pc::PC, subksp::PetscKSP) \nGets the `KSP` created by the telescoping `PC`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `subksp` - the `KSP` defined on the smaller set of processes\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `KSP`, `PCTELESCOPE`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeGetKSP\"))\n\"\"\"\nfunction PCTelescopeGetKSP(petsclib::PetscLibType, pc::PC, subksp::PetscKSP) end\n\n@for_petsc function PCTelescopeGetKSP(petsclib::$UnionPetscLib, pc::PC, subksp::PetscKSP )\n\tsubksp_ = Ref(subksp.ptr)\n\n    @chk ccall(\n               (:PCTelescopeGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, subksp_,\n              )\n\n\tsubksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tfact::PetscInt = PCTelescopeGetReductionFactor(petsclib::PetscLibType,pc::PC) \nGets the factor by which the original number of MPI processes has been reduced by that was set by\n`PCTelescopeSetReductionFactor()`\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `fact` - the reduction factor\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCTELESCOPE`, `PCTelescopeSetReductionFactor()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeGetReductionFactor\"))\n\"\"\"\nfunction PCTelescopeGetReductionFactor(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeGetReductionFactor(petsclib::$UnionPetscLib, pc::PC )\n\tfact_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCTelescopeGetReductionFactor, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}),\n               pc, fact_,\n              )\n\n\tfact = fact_[]\n\n\treturn fact\nend \n\n\"\"\"\n\tfact::PetscInt = PCTelescopeSetReductionFactor(petsclib::PetscLibType,pc::PC) \nSets the factor by which the original number of MPI processes will been reduced by when\nconstructing the subcommunicator to be used with the `PCTELESCOPE`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `fact` - the reduction factor\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCTELESCOPE`, `PCTelescopeGetReductionFactor()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeSetReductionFactor\"))\n\"\"\"\nfunction PCTelescopeSetReductionFactor(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeSetReductionFactor(petsclib::$UnionPetscLib, pc::PC )\n\tfact_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCTelescopeSetReductionFactor, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, fact_,\n              )\n\n\tfact = fact_[]\n\n\treturn fact\nend \n\n\"\"\"\n\tv::PetscBool = PCTelescopeGetIgnoreDM(petsclib::PetscLibType,pc::PC) \nGet the flag indicating if any `DM` attached to the `PC` will be used in constructing the `PC` on the\nreduced number of MPI processes\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `v` - the flag\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DM`, `PCTELESCOPE`, `PCTelescopeSetIgnoreDM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeGetIgnoreDM\"))\n\"\"\"\nfunction PCTelescopeGetIgnoreDM(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeGetIgnoreDM(petsclib::$UnionPetscLib, pc::PC )\n\tv_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCTelescopeGetIgnoreDM, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, v_,\n              )\n\n\tv = v_[]\n\n\treturn v\nend \n\n\"\"\"\n\tv::PetscBool = PCTelescopeSetIgnoreDM(petsclib::PetscLibType,pc::PC) \nSet a flag to ignore any `DM` attached to the `PC` when constructing the `PC` on the\nreduced number of MPI processes\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `v` - Use `PETSC_TRUE` to ignore any `DM`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DM`, `PCTELESCOPE`, `PCTelescopeGetIgnoreDM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeSetIgnoreDM\"))\n\"\"\"\nfunction PCTelescopeSetIgnoreDM(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeSetIgnoreDM(petsclib::$UnionPetscLib, pc::PC )\n\tv_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCTelescopeSetIgnoreDM, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, v_,\n              )\n\n\tv = v_[]\n\n\treturn v\nend \n\n\"\"\"\n\tv::PetscBool = PCTelescopeGetUseCoarseDM(petsclib::PetscLibType,pc::PC) \nGet the flag indicating if the coarse `DM` attached to `DM` associated with the `PC` will be used in constructing\nthe `PC` on the reduced number of MPI processes\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `v` - the flag\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DM`, `PCTELESCOPE`, `PCTelescopeSetIgnoreDM()`, `PCTelescopeSetUseCoarseDM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeGetUseCoarseDM\"))\n\"\"\"\nfunction PCTelescopeGetUseCoarseDM(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeGetUseCoarseDM(petsclib::$UnionPetscLib, pc::PC )\n\tv_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCTelescopeGetUseCoarseDM, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, v_,\n              )\n\n\tv = v_[]\n\n\treturn v\nend \n\n\"\"\"\n\tv::PetscBool = PCTelescopeSetUseCoarseDM(petsclib::PetscLibType,pc::PC) \nSet a flag to query the `DM` attached to the `PC` if it also has a coarse `DM` and utilize that `DM`\nin constructing the `PC` on the reduced number of MPI processes\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `v` - Use `PETSC_FALSE` to ignore any coarse `DM`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DM`, `PCTELESCOPE`, `PCTelescopeSetIgnoreDM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeSetUseCoarseDM\"))\n\"\"\"\nfunction PCTelescopeSetUseCoarseDM(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeSetUseCoarseDM(petsclib::$UnionPetscLib, pc::PC )\n\tv_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCTelescopeSetUseCoarseDM, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, v_,\n              )\n\n\tv = v_[]\n\n\treturn v\nend \n\n\"\"\"\n\tv::PetscBool = PCTelescopeGetIgnoreKSPComputeOperators(petsclib::PetscLibType,pc::PC) \nGet the flag indicating if `KSPComputeOperators()` will be used to construct\nthe matrix on the reduced number of MPI processes\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `v` - the flag\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCTELESCOPE`, `PCTelescopeSetIgnoreDM()`, `PCTelescopeSetUseCoarseDM()`, `PCTelescopeSetIgnoreKSPComputeOperators()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeGetIgnoreKSPComputeOperators\"))\n\"\"\"\nfunction PCTelescopeGetIgnoreKSPComputeOperators(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeGetIgnoreKSPComputeOperators(petsclib::$UnionPetscLib, pc::PC )\n\tv_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCTelescopeGetIgnoreKSPComputeOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, v_,\n              )\n\n\tv = v_[]\n\n\treturn v\nend \n\n\"\"\"\n\tv::PetscBool = PCTelescopeSetIgnoreKSPComputeOperators(petsclib::PetscLibType,pc::PC) \nSet a flag to have `PCTELESCOPE` ignore the function provided to `KSPComputeOperators()` in\nconstructint the matrix on the reduced number of MPI processes\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `v` - Use `PETSC_TRUE` to ignore the function (if defined) set via `KSPSetComputeOperators()` on `pc`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCTELESCOPE`, `PCTelescopeSetIgnoreDM()`, `PCTelescopeSetUseCoarseDM()`, `PCTelescopeGetIgnoreKSPComputeOperators()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeSetIgnoreKSPComputeOperators\"))\n\"\"\"\nfunction PCTelescopeSetIgnoreKSPComputeOperators(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeSetIgnoreKSPComputeOperators(petsclib::$UnionPetscLib, pc::PC )\n\tv_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCTelescopeSetIgnoreKSPComputeOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, v_,\n              )\n\n\tv = v_[]\n\n\treturn v\nend \n\n\"\"\"\n\tsubdm::PetscDM = PCTelescopeGetDM(petsclib::PetscLibType,pc::PC) \nGet the re\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `subdm` - The re-partitioned `DM`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DM`, `PCTELESCOPE`, `PCTelescopeSetIgnoreDM()`, `PCTelescopeSetUseCoarseDM()`, `PCTelescopeGetIgnoreKSPComputeOperators()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeGetDM\"))\n\"\"\"\nfunction PCTelescopeGetDM(petsclib::PetscLibType, pc::PC, subdm::PetscDM) end\n\n@for_petsc function PCTelescopeGetDM(petsclib::$UnionPetscLib, pc::PC, subdm::PetscDM )\n\tsubdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:PCTelescopeGetDM, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CDM}),\n               pc, subdm_,\n              )\n\n\tsubdm = PetscDM(subdm_[], petsclib)\n\n\treturn subdm\nend \n\n\"\"\"\n\tPCTelescopeSetSubcommType(petsclib::PetscLibType,pc::PC, subcommtype::PetscSubcommType) \nset subcommunicator type `PetscSubcommType` (interlaced or contiguous) to be used when\nthe subcommunicator is generated from the given `PC`\n\nLogically Collective\n\nInput Parameters:\n- `pc`          - the preconditioner context\n- `subcommtype` - the subcommunicator type (see `PetscSubcommType`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PetscSubcommType`, `PetscSubcomm`, `PCTELESCOPE`, `PCTelescopeGetSubcommType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeSetSubcommType\"))\n\"\"\"\nfunction PCTelescopeSetSubcommType(petsclib::PetscLibType, pc::PC, subcommtype::PetscSubcommType) end\n\n@for_petsc function PCTelescopeSetSubcommType(petsclib::$UnionPetscLib, pc::PC, subcommtype::PetscSubcommType )\n\n    @chk ccall(\n               (:PCTelescopeSetSubcommType, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscSubcommType),\n               pc, subcommtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsubcommtype::PetscSubcommType = PCTelescopeGetSubcommType(petsclib::PetscLibType,pc::PC) \nGet the subcommunicator type `PetscSubcommType` (interlaced or contiguous) set with `PCTelescopeSetSubcommType()`\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `subcommtype` - the subcommunicator type (see `PetscSubcommType`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PetscSubcomm`, `PetscSubcommType`, `PCTELESCOPE`, `PCTelescopeSetSubcommType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCTelescopeGetSubcommType\"))\n\"\"\"\nfunction PCTelescopeGetSubcommType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCTelescopeGetSubcommType(petsclib::$UnionPetscLib, pc::PC )\n\tsubcommtype_ = Ref{PetscSubcommType}()\n\n    @chk ccall(\n               (:PCTelescopeGetSubcommType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscSubcommType}),\n               pc, subcommtype_,\n              )\n\n\tsubcommtype = unsafe_string(subcommtype_[])\n\n\treturn subcommtype\nend \n\n\"\"\"\n\tPCShellGetContext(petsclib::PetscLibType,pc::PC, ctx::Cvoid) \nReturns the user\n\nNot Collective\n\nInput Parameter:\n- `pc` - of type `PCSHELL`\n\nOutput Parameter:\n- `ctx` - the user provided context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCSHELL`, `PCShellSetContext()`, `PCShellSetApply()`, `PCShellSetDestroy()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellGetContext\"))\n\"\"\"\nfunction PCShellGetContext(petsclib::PetscLibType, pc::PC, ctx::Cvoid) end\n\n@for_petsc function PCShellGetContext(petsclib::$UnionPetscLib, pc::PC, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCShellGetContext, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cvoid}),\n               pc, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetContext(petsclib::PetscLibType,pc::PC, ctx::Cvoid) \nsets the context for a shell `PC` that can be accessed with `PCShellGetContext()`\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the `PC` of type `PCSHELL`\n- `ctx` - the context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCShellGetContext()`, `PCSHELL`, `PCShellSetApply()`, `PCShellSetDestroy()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetContext\"))\n\"\"\"\nfunction PCShellSetContext(petsclib::PetscLibType, pc::PC, ctx::Cvoid) end\n\n@for_petsc function PCShellSetContext(petsclib::$UnionPetscLib, pc::PC, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCShellSetContext, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cvoid}),\n               pc, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetDestroy(petsclib::PetscLibType,pc::PC, destroy::external) \nSets routine to use to destroy the user\n\nLogically Collective\n\nInput Parameters:\n- `pc`      - the preconditioner context\n- `destroy` - the application-provided destroy routine\n\nCalling sequence of `destroy`:\n- `pc` - the preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApply()`, `PCShellSetContext()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetDestroy\"))\n\"\"\"\nfunction PCShellSetDestroy(petsclib::PetscLibType, pc::PC, destroy::external) end\n\n@for_petsc function PCShellSetDestroy(petsclib::$UnionPetscLib, pc::PC, destroy::external )\n\n    @chk ccall(\n               (:PCShellSetDestroy, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetSetUp(petsclib::PetscLibType,pc::PC, setup::external) \nSets routine to use to \"setup\" the preconditioner whenever the\nmatrix operator is changed.\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `setup` - the application-provided setup routine\n\nCalling sequence of `setup`:\n- `pc` - the preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApplyRichardson()`, `PCShellSetApply()`, `PCShellSetContext()`, , `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetSetUp\"))\n\"\"\"\nfunction PCShellSetSetUp(petsclib::PetscLibType, pc::PC, setup::external) end\n\n@for_petsc function PCShellSetSetUp(petsclib::$UnionPetscLib, pc::PC, setup::external )\n\n    @chk ccall(\n               (:PCShellSetSetUp, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, setup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetView(petsclib::PetscLibType,pc::PC, view::external) \nSets routine to use as viewer of a `PCSHELL` shell preconditioner\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `view` - the application-provided view routine\n\nCalling sequence of `view`:\n- `pc` - the preconditioner\n- `v`  - viewer\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCSHELL`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetContext()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetView\"))\n\"\"\"\nfunction PCShellSetView(petsclib::PetscLibType, pc::PC, view::external) end\n\n@for_petsc function PCShellSetView(petsclib::$UnionPetscLib, pc::PC, view::external )\n\n    @chk ccall(\n               (:PCShellSetView, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, view,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetApply(petsclib::PetscLibType,pc::PC, apply::external) \nSets routine to use as preconditioner.\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `apply` - the application-provided preconditioning routine\n\nCalling sequence of `apply`:\n- `pc`   - the preconditioner, get the application context with `PCShellGetContext()`\n- `xin`  - input vector\n- `xout` - output vector\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetContext()`, `PCShellSetApplyBA()`, `PCShellSetApplySymmetricRight()`, `PCShellSetApplySymmetricLeft()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetApply\"))\n\"\"\"\nfunction PCShellSetApply(petsclib::PetscLibType, pc::PC, apply::external) end\n\n@for_petsc function PCShellSetApply(petsclib::$UnionPetscLib, pc::PC, apply::external )\n\n    @chk ccall(\n               (:PCShellSetApply, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, apply,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetMatApply(petsclib::PetscLibType,pc::PC, matapply::external) \nSets routine to use as preconditioner on a block of vectors.\n\nLogically Collective\n\nInput Parameters:\n- `pc`       - the preconditioner context\n- `matapply` - the application-provided preconditioning routine\n\nCalling sequence of `matapply`:\n- `pc`   - the preconditioner\n- `Xin`  - input block of vectors represented as a dense `Mat`\n- `Xout` - output block of vectors represented as a dense `Mat`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApply()`, `PCShellSetContext()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetMatApply\"))\n\"\"\"\nfunction PCShellSetMatApply(petsclib::PetscLibType, pc::PC, matapply::external) end\n\n@for_petsc function PCShellSetMatApply(petsclib::$UnionPetscLib, pc::PC, matapply::external )\n\n    @chk ccall(\n               (:PCShellSetMatApply, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, matapply,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetApplySymmetricLeft(petsclib::PetscLibType,pc::PC, apply::external) \nSets routine to use as left preconditioner (when the `PC_SYMMETRIC` is used).\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `apply` - the application-provided left preconditioning routine\n\nCalling sequence of `apply`:\n- `pc`   - the preconditioner\n- `xin`  - input vector\n- `xout` - output vector\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApply()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetApplySymmetricLeft\"))\n\"\"\"\nfunction PCShellSetApplySymmetricLeft(petsclib::PetscLibType, pc::PC, apply::external) end\n\n@for_petsc function PCShellSetApplySymmetricLeft(petsclib::$UnionPetscLib, pc::PC, apply::external )\n\n    @chk ccall(\n               (:PCShellSetApplySymmetricLeft, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, apply,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetApplySymmetricRight(petsclib::PetscLibType,pc::PC, apply::external) \nSets routine to use as right preconditioner (when the `PC_SYMMETRIC` is used).\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `apply` - the application-provided right preconditioning routine\n\nCalling sequence of `apply`:\n- `pc`   - the preconditioner\n- `xin`  - input vector\n- `xout` - output vector\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApply()`, `PCShellSetApplySymmetricLeft()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetContext()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetApplySymmetricRight\"))\n\"\"\"\nfunction PCShellSetApplySymmetricRight(petsclib::PetscLibType, pc::PC, apply::external) end\n\n@for_petsc function PCShellSetApplySymmetricRight(petsclib::$UnionPetscLib, pc::PC, apply::external )\n\n    @chk ccall(\n               (:PCShellSetApplySymmetricRight, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, apply,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetApplyBA(petsclib::PetscLibType,pc::PC, applyBA::external) \nSets routine to use as the preconditioner times the operator.\n\nLogically Collective\n\nInput Parameters:\n- `pc`      - the preconditioner context\n- `applyBA` - the application-provided BA routine\n\nCalling sequence of `applyBA`:\n- `pc`   - the preconditioner\n- `side` - `PC_LEFT`, `PC_RIGHT`, or `PC_SYMMETRIC`\n- `xin`  - input vector\n- `xout` - output vector\n- `w`    - work vector\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetContext()`, `PCShellSetApply()`, `PCShellGetContext()`, `PCSide`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetApplyBA\"))\n\"\"\"\nfunction PCShellSetApplyBA(petsclib::PetscLibType, pc::PC, applyBA::external) end\n\n@for_petsc function PCShellSetApplyBA(petsclib::$UnionPetscLib, pc::PC, applyBA::external )\n\n    @chk ccall(\n               (:PCShellSetApplyBA, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, applyBA,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetApplyTranspose(petsclib::PetscLibType,pc::PC, applytranspose::external) \nSets routine to use as preconditioner transpose.\n\nLogically Collective\n\nInput Parameters:\n- `pc`             - the preconditioner context\n- `applytranspose` - the application-provided preconditioning transpose routine\n\nCalling sequence of `applytranspose`:\n- `pc`   - the preconditioner\n- `xin`  - input vector\n- `xout` - output vector\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApply()`, `PCShellSetContext()`, `PCShellSetApplyBA()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetApplyTranspose\"))\n\"\"\"\nfunction PCShellSetApplyTranspose(petsclib::PetscLibType, pc::PC, applytranspose::external) end\n\n@for_petsc function PCShellSetApplyTranspose(petsclib::$UnionPetscLib, pc::PC, applytranspose::external )\n\n    @chk ccall(\n               (:PCShellSetApplyTranspose, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, applytranspose,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetMatApplyTranspose(petsclib::PetscLibType,pc::PC, matapplytranspose::external) \nSets routine to use as preconditioner transpose.\n\nLogically Collective\n\nInput Parameters:\n- `pc`                - the preconditioner context\n- `matapplytranspose` - the application-provided preconditioning transpose routine\n\nCalling sequence of `matapplytranspose`:\n- `pc`   - the preconditioner\n- `xin`  - input matrix\n- `xout` - output matrix\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApply()`, `PCShellSetContext()`, `PCShellSetApplyBA()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetMatApplyTranspose\"))\n\"\"\"\nfunction PCShellSetMatApplyTranspose(petsclib::PetscLibType, pc::PC, matapplytranspose::external) end\n\n@for_petsc function PCShellSetMatApplyTranspose(petsclib::$UnionPetscLib, pc::PC, matapplytranspose::external )\n\n    @chk ccall(\n               (:PCShellSetMatApplyTranspose, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, matapplytranspose,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetPreSolve(petsclib::PetscLibType,pc::PC, presolve::PCShellPSolveFn) \nSets routine to apply to the operators/vectors before a `KSPSolve()` is\napplied. This usually does something like scale the linear system in some application\nspecific way.\n\nLogically Collective\n\nInput Parameters:\n- `pc`       - the preconditioner context\n- `presolve` - the application-provided presolve routine, see `PCShellPSolveFn`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellPSolveFn`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetPostSolve()`, `PCShellSetContext()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetPreSolve\"))\n\"\"\"\nfunction PCShellSetPreSolve(petsclib::PetscLibType, pc::PC, presolve::PCShellPSolveFn) end\n\n@for_petsc function PCShellSetPreSolve(petsclib::$UnionPetscLib, pc::PC, presolve::PCShellPSolveFn )\n\n    @chk ccall(\n               (:PCShellSetPreSolve, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCShellPSolveFn}),\n               pc, presolve,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetPostSolve(petsclib::PetscLibType,pc::PC, postsolve::PCShellPSolveFn) \nSets routine to apply to the operators/vectors after a `KSPSolve()` is\napplied. This usually does something like scale the linear system in some application\nspecific way.\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the preconditioner context\n- `postsolve` - the application-provided postsolve routine, see `PCShellPSolveFn`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellPSolveFn`, `PCShellSetApplyRichardson()`, `PCShellSetSetUp()`, `PCShellSetApplyTranspose()`, `PCShellSetPreSolve()`, `PCShellSetContext()`, `PCShellGetContext()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetPostSolve\"))\n\"\"\"\nfunction PCShellSetPostSolve(petsclib::PetscLibType, pc::PC, postsolve::PCShellPSolveFn) end\n\n@for_petsc function PCShellSetPostSolve(petsclib::$UnionPetscLib, pc::PC, postsolve::PCShellPSolveFn )\n\n    @chk ccall(\n               (:PCShellSetPostSolve, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCShellPSolveFn}),\n               pc, postsolve,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetName(petsclib::PetscLibType,pc::PC, name::String) \nSets an optional name to associate with a `PCSHELL`\npreconditioner.\n\nNot Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `name` - character string describing shell preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellGetName()`, `PetscObjectSetName()`, `PetscObjectGetName()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetName\"))\n\"\"\"\nfunction PCShellSetName(petsclib::PetscLibType, pc::PC, name::String) end\n\n@for_petsc function PCShellSetName(petsclib::$UnionPetscLib, pc::PC, name::String )\n\n    @chk ccall(\n               (:PCShellSetName, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}),\n               pc, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellGetName(petsclib::PetscLibType,pc::PC, name::String) \nGets an optional name that the user has set for a `PCSHELL` with `PCShellSetName()`\npreconditioner.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `name` - character string describing shell preconditioner (you should not free this)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetName()`, `PetscObjectSetName()`, `PetscObjectGetName()`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellGetName\"))\n\"\"\"\nfunction PCShellGetName(petsclib::PetscLibType, pc::PC, name::String) end\n\n@for_petsc function PCShellGetName(petsclib::$UnionPetscLib, pc::PC, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PCShellGetName, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Ptr{Cchar}}),\n               pc, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCShellSetApplyRichardson(petsclib::PetscLibType,pc::PC, apply::external) \nSets routine to use as preconditioner\nin Richardson iteration.\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `apply` - the application-provided preconditioning routine\n\nCalling sequence of `apply`:\n- `pc`               - the preconditioner\n- `b`                - right-hand side\n- `x`                - current iterate\n- `r`                - work space\n- `rtol`             - relative tolerance of residual norm to stop at\n- `abstol`           - absolute tolerance of residual norm to stop at\n- `dtol`             - if residual norm increases by this factor than return\n- `maxits`           - number of iterations to run\n- `zeroinitialguess` - `PETSC_TRUE` if `x` is known to be initially zero\n- `its`              - returns the number of iterations used\n- `reason`           - returns the reason the iteration has converged\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCSHELL`, `PCShellSetApply()`, `PCShellSetContext()`, `PCRichardsonConvergedReason()`, `PCShellGetContext()`, `KSPRICHARDSON`\n\n# External Links\n$(_doc_external(\"Ksp/PCShellSetApplyRichardson\"))\n\"\"\"\nfunction PCShellSetApplyRichardson(petsclib::PetscLibType, pc::PC, apply::external) end\n\n@for_petsc function PCShellSetApplyRichardson(petsclib::$UnionPetscLib, pc::PC, apply::external )\n\n    @chk ccall(\n               (:PCShellSetApplyRichardson, $petsc_library),\n               PetscErrorCode,\n               (PC, external),\n               pc, apply,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISSetUseStiffnessScaling(petsclib::PetscLibType,pc::PC, use::PetscBool) \nTells `PCIS` to construct partition of unity using\nthe local matrices' diagonal entries\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioning context\n- `use` - whether or not it should use matrix diagonal to build partition of unity.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISSetSubdomainDiagonalScaling()`, `PCISScatterArrayNToVecB()`,\n`PCISSetSubdomainScalingFactor()`,\n`PCISReset()`, `PCISInitialize()`, `PCISApplyInvSchur()`, `PCISApplySchur()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISSetUseStiffnessScaling\"))\n\"\"\"\nfunction PCISSetUseStiffnessScaling(petsclib::PetscLibType, pc::PC, use::PetscBool) end\n\n@for_petsc function PCISSetUseStiffnessScaling(petsclib::$UnionPetscLib, pc::PC, use::PetscBool )\n\n    @chk ccall(\n               (:PCISSetUseStiffnessScaling, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISSetSubdomainDiagonalScaling(petsclib::PetscLibType,pc::PC, scaling_factors::PetscVec) \nSet diagonal scaling for `PCIS`.\n\nLogically Collective\n\nInput Parameters:\n- `pc`              - the preconditioning context\n- `scaling_factors` - scaling factors for the subdomain\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISScatterArrayNToVecB()`,\n`PCISSetSubdomainScalingFactor()`, `PCISSetUseStiffnessScaling()`,\n`PCISReset()`, `PCISInitialize()`, `PCISApplyInvSchur()`, `PCISApplySchur()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISSetSubdomainDiagonalScaling\"))\n\"\"\"\nfunction PCISSetSubdomainDiagonalScaling(petsclib::PetscLibType, pc::PC, scaling_factors::PetscVec) end\n\n@for_petsc function PCISSetSubdomainDiagonalScaling(petsclib::$UnionPetscLib, pc::PC, scaling_factors::PetscVec )\n\n    @chk ccall(\n               (:PCISSetSubdomainDiagonalScaling, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec),\n               pc, scaling_factors,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISSetSubdomainScalingFactor(petsclib::PetscLibType,pc::PC, scal::PetscScalar) \nSet scaling factor for `PCIS`.\n\nNot Collective\n\nInput Parameters:\n- `pc`   - the preconditioning context\n- `scal` - scaling factor for the subdomain\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISScatterArrayNToVecB()`,\n`PCISSetSubdomainDiagonalScaling()`, `PCISSetUseStiffnessScaling()`,\n`PCISReset()`, `PCISInitialize()`, `PCISApplyInvSchur()`, `PCISApplySchur()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISSetSubdomainScalingFactor\"))\n\"\"\"\nfunction PCISSetSubdomainScalingFactor(petsclib::PetscLibType, pc::PC, scal::PetscScalar) end\n\n@for_petsc function PCISSetSubdomainScalingFactor(petsclib::$UnionPetscLib, pc::PC, scal::$PetscScalar )\n\n    @chk ccall(\n               (:PCISSetSubdomainScalingFactor, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscScalar),\n               pc, scal,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISSetUp(petsclib::PetscLibType,pc::PC, computematrices::PetscBool, computesolvers::PetscBool) \nsets up the `PC_IS` portion of `PCNN` and `PCBDDC` preconditioner context as part of their setup process\n\nInput Parameters:\n- `pc`              - the `PC` object, must be of type `PCNN` or `PCBDDC`\n- `computematrices` - Extract the blocks `A_II`, `A_BI`, `A_IB` and `A_BB` from the matrix\n- `computesolvers`  - Create the `KSP` for the local Dirichlet and Neumann problems\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISSetUseStiffnessScaling()`, `PCISSetSubdomainDiagonalScaling()`, `PCISScatterArrayNToVecB()`,\n`PCISSetSubdomainScalingFactor()`,\n`PCISReset()`, `PCISApplySchur()`, `PCISApplyInvSchur()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISSetUp\"))\n\"\"\"\nfunction PCISSetUp(petsclib::PetscLibType, pc::PC, computematrices::PetscBool, computesolvers::PetscBool) end\n\n@for_petsc function PCISSetUp(petsclib::$UnionPetscLib, pc::PC, computematrices::PetscBool, computesolvers::PetscBool )\n\n    @chk ccall(\n               (:PCISSetUp, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool, PetscBool),\n               pc, computematrices, computesolvers,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISReset(petsclib::PetscLibType,pc::PC) \nRemoves all the `PC_IS` parts of the `PC` implementation data structure\n\nInput Parameter:\n- `pc` - the `PC` object, must be of type `PCNN` or `PCBDDC`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCISSetUseStiffnessScaling()`, `PCISSetSubdomainDiagonalScaling()`, `PCISScatterArrayNToVecB()`, `PCISSetSubdomainScalingFactor()`,\n`PCISInitialize()`, `PCISApplySchur()`, `PCISApplyInvSchur()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISReset\"))\n\"\"\"\nfunction PCISReset(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCISReset(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCISReset, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISInitialize(petsclib::PetscLibType,pc::PC) \ninitializes the `PC_IS` portion of `PCNN` and `PCBDDC` preconditioner context\n\nInput Parameter:\n- `pc` - the `PC` object, must be of type `PCNN` or `PCBDDC`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISSetUseStiffnessScaling()`, `PCISSetSubdomainDiagonalScaling()`, `PCISScatterArrayNToVecB()`,\n`PCISSetSubdomainScalingFactor()`,\n`PCISReset()`, `PCISApplySchur()`, `PCISApplyInvSchur()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISInitialize\"))\n\"\"\"\nfunction PCISInitialize(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCISInitialize(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCISInitialize, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISApplySchur(petsclib::PetscLibType,pc::PC, v::PetscVec, vec1_B::PetscVec, vec2_B::PetscVec, vec1_D::PetscVec, vec2_D::PetscVec) \napplies the Schur complement arising from the `MATIS` inside the `PCNN` preconditioner\n\nInput Parameters:\n- `pc`     - preconditioner context\n- `v`      - vector to which the Schur complement is to be applied (it is NOT modified inside this function, UNLESS vec2_B is null)\n- `vec1_B` - location to store the result of Schur complement applied to chunk\n- `vec2_B` - workspace or `NULL`, `v` is used as workspace in that case\n- `vec1_D` - work space\n- `vec2_D` - work space\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISSetUseStiffnessScaling()`, `PCISSetSubdomainDiagonalScaling()`, `PCISScatterArrayNToVecB()`,\n`PCISSetSubdomainScalingFactor()`, `PCISApplyInvSchur()`,\n`PCISReset()`, `PCISInitialize()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISApplySchur\"))\n\"\"\"\nfunction PCISApplySchur(petsclib::PetscLibType, pc::PC, v::PetscVec, vec1_B::PetscVec, vec2_B::PetscVec, vec1_D::PetscVec, vec2_D::PetscVec) end\n\n@for_petsc function PCISApplySchur(petsclib::$UnionPetscLib, pc::PC, v::PetscVec, vec1_B::PetscVec, vec2_B::PetscVec, vec1_D::PetscVec, vec2_D::PetscVec )\n\n    @chk ccall(\n               (:PCISApplySchur, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec, CVec, CVec, CVec),\n               pc, v, vec1_B, vec2_B, vec1_D, vec2_D,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISScatterArrayNToVecB(petsclib::PetscLibType,pc::PC, array_N::PetscScalar, v_B::PetscVec, imode::InsertMode, smode::ScatterMode) \nScatters interface node values from a big array (of all local nodes, interior or interface,\nincluding ghosts) into an interface vector, when in `SCATTER_FORWARD` mode, or vice-versa, when in `SCATTER_REVERSE`\nmode.\n\nInput Parameters:\n- `pc`      - preconditioner context\n- `array_N` - [when in `SCATTER_FORWARD` mode] Array to be scattered into the vector otherwise output array\n- `imode`   - insert mode, `ADD_VALUES` or `INSERT_VALUES`\n- `smode`   - scatter mode, `SCATTER_FORWARD` or `SCATTER_REVERSE` mode]\n- `v_B`     - [when in `SCATTER_REVERSE` mode] Vector to be scattered into the array, otherwise output vector\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISSetUseStiffnessScaling()`, `PCISSetSubdomainDiagonalScaling()`,\n`PCISSetSubdomainScalingFactor()`, `PCISApplySchur()`, `PCISApplyInvSchur()`,\n`PCISReset()`, `PCISInitialize()`, `InsertMode`\n\n# External Links\n$(_doc_external(\"Ksp/PCISScatterArrayNToVecB\"))\n\"\"\"\nfunction PCISScatterArrayNToVecB(petsclib::PetscLibType, pc::PC, array_N::PetscScalar, v_B::PetscVec, imode::InsertMode, smode::ScatterMode) end\n\n@for_petsc function PCISScatterArrayNToVecB(petsclib::$UnionPetscLib, pc::PC, array_N::$PetscScalar, v_B::PetscVec, imode::InsertMode, smode::ScatterMode )\n\n    @chk ccall(\n               (:PCISScatterArrayNToVecB, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscScalar}, CVec, InsertMode, ScatterMode),\n               pc, array_N, v_B, imode, smode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCISApplyInvSchur(petsclib::PetscLibType,pc::PC, b::PetscVec, x::PetscVec, vec1_N::PetscVec, vec2_N::PetscVec) \nSolves the Neumann problem related to applying the inverse of the Schur complement.\n\nInput Parameters:\n- `pc`     - preconditioner context\n- `b`      - vector of local interface nodes (including ghosts)\n- `x`      - vector of local interface nodes (including ghosts); returns the application of the inverse of the Schur complement to `b`\n- `vec1_N` - vector of local nodes (interior and interface, including ghosts); used as work space\n- `vec2_N` - vector of local nodes (interior and interface, including ghosts); used as work space\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCNN`, `PCISSetUseStiffnessScaling()`, `PCISSetSubdomainDiagonalScaling()`, `PCISScatterArrayNToVecB()`,\n`PCISSetSubdomainScalingFactor()`,\n`PCISReset()`, `PCISInitialize()`\n\n# External Links\n$(_doc_external(\"Ksp/PCISApplyInvSchur\"))\n\"\"\"\nfunction PCISApplyInvSchur(petsclib::PetscLibType, pc::PC, b::PetscVec, x::PetscVec, vec1_N::PetscVec, vec2_N::PetscVec) end\n\n@for_petsc function PCISApplyInvSchur(petsclib::$UnionPetscLib, pc::PC, b::PetscVec, x::PetscVec, vec1_N::PetscVec, vec2_N::PetscVec )\n\n    @chk ccall(\n               (:PCISApplyInvSchur, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec, CVec, CVec),\n               pc, b, x, vec1_N, vec2_N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCEisenstatSetOmega(petsclib::PetscLibType,pc::PC, omega::PetscReal) \nSets the SSOR relaxation coefficient, omega,\nto use with Eisenstat's trick (where omega = 1.0 by default)\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `omega` - relaxation coefficient (0 < omega < 2)\n\nOptions Database Key:\n- `-pc_eisenstat_omega <omega>` - Sets omega\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSORSetOmega()`, `PCEISENSTAT`\n\n# External Links\n$(_doc_external(\"Ksp/PCEisenstatSetOmega\"))\n\"\"\"\nfunction PCEisenstatSetOmega(petsclib::PetscLibType, pc::PC, omega::PetscReal) end\n\n@for_petsc function PCEisenstatSetOmega(petsclib::$UnionPetscLib, pc::PC, omega::$PetscReal )\n\n    @chk ccall(\n               (:PCEisenstatSetOmega, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, omega,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCEisenstatSetNoDiagonalScaling(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nCauses the Eisenstat preconditioner, `PCEISENSTAT`\nnot to do additional diagonal preconditioning. For matrices with a constant\nalong the diagonal, this may save a small amount of work.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - `PETSC_TRUE` turns off diagonal scaling inside the algorithm\n\nOptions Database Key:\n- `-pc_eisenstat_no_diagonal_scaling` - Activates `PCEisenstatSetNoDiagonalScaling()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCEisenstatSetOmega()`, `PCEISENSTAT`\n\n# External Links\n$(_doc_external(\"Ksp/PCEisenstatSetNoDiagonalScaling\"))\n\"\"\"\nfunction PCEisenstatSetNoDiagonalScaling(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCEisenstatSetNoDiagonalScaling(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCEisenstatSetNoDiagonalScaling, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tomega::PetscReal = PCEisenstatGetOmega(petsclib::PetscLibType,pc::PC) \nGets the SSOR relaxation coefficient, omega,\nto use with Eisenstat's trick (where omega = 1.0 by default).\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `omega` - relaxation coefficient (0 < omega < 2)\n\nOptions Database Key:\n- `-pc_eisenstat_omega <omega>` - Sets omega\n\n-seealso: [](ch_ksp), `PCEISENSTAT`, `PCSORGetOmega()`, `PCEisenstatSetOmega()`\n\n# External Links\n$(_doc_external(\"Ksp/PCEisenstatGetOmega\"))\n\"\"\"\nfunction PCEisenstatGetOmega(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCEisenstatGetOmega(petsclib::$UnionPetscLib, pc::PC )\n\tomega_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PCEisenstatGetOmega, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}),\n               pc, omega_,\n              )\n\n\tomega = omega_[]\n\n\treturn omega\nend \n\n\"\"\"\n\tflg::PetscBool = PCEisenstatGetNoDiagonalScaling(petsclib::PetscLibType,pc::PC) \nTells if the Eisenstat preconditioner\nnot to do additional diagonal preconditioning. For matrices with a constant\nalong the diagonal, this may save a small amount of work.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` means there is no diagonal scaling applied\n\nOptions Database Key:\n- `-pc_eisenstat_no_diagonal_scaling` - Activates `PCEisenstatSetNoDiagonalScaling()`\n\nLevel: intermediate\n\n-seealso: , `PCEISENSTAT`, `PCEisenstatGetOmega()`\n\n# External Links\n$(_doc_external(\"Ksp/PCEisenstatGetNoDiagonalScaling\"))\n\"\"\"\nfunction PCEisenstatGetNoDiagonalScaling(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCEisenstatGetNoDiagonalScaling(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCEisenstatGetNoDiagonalScaling, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCJacobiSetUseAbs(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nCauses the Jacobi preconditioner `PCJACOBI` to use the\nabsolute values of the diagonal divisors in the preconditioner\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - whether to use absolute values or not\n\nOptions Database Key:\n- `-pc_jacobi_abs <bool>` - use absolute values\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetType()`, `PCJacobiGetUseAbs()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiSetUseAbs\"))\n\"\"\"\nfunction PCJacobiSetUseAbs(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCJacobiSetUseAbs(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCJacobiSetUseAbs, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCJacobiGetUseAbs(petsclib::PetscLibType,pc::PC) \nDetermines if the Jacobi preconditioner `PCJACOBI` uses the\nabsolute values of the diagonal divisors in the preconditioner\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - whether to use absolute values or not\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetType()`, `PCJacobiSetUseAbs()`, `PCJacobiGetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiGetUseAbs\"))\n\"\"\"\nfunction PCJacobiGetUseAbs(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCJacobiGetUseAbs(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCJacobiGetUseAbs, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCJacobiSetRowl1Scale(petsclib::PetscLibType,pc::PC, scale::PetscReal) \nSet scaling of off\nRemark 6.1 in \"Multigrid Smoothers for Ultraparallel Computing\", Baker et al, with 0.5 scaling\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `scale` - scaling\n\nOptions Database Key:\n- `-pc_jacobi_rowl1_scale <real>` - use absolute values\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetType()`, `PCJacobiGetRowl1Scale()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiSetRowl1Scale\"))\n\"\"\"\nfunction PCJacobiSetRowl1Scale(petsclib::PetscLibType, pc::PC, scale::PetscReal) end\n\n@for_petsc function PCJacobiSetRowl1Scale(petsclib::$UnionPetscLib, pc::PC, scale::$PetscReal )\n\n    @chk ccall(\n               (:PCJacobiSetRowl1Scale, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tscale::PetscReal = PCJacobiGetRowl1Scale(petsclib::PetscLibType,pc::PC) \nGet scaling of off\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `scale` - scaling\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetType()`, `PCJacobiSetRowl1Scale()`, `PCJacobiGetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiGetRowl1Scale\"))\n\"\"\"\nfunction PCJacobiGetRowl1Scale(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCJacobiGetRowl1Scale(petsclib::$UnionPetscLib, pc::PC )\n\tscale_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PCJacobiGetRowl1Scale, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}),\n               pc, scale_,\n              )\n\n\tscale = scale_[]\n\n\treturn scale\nend \n\n\"\"\"\n\tPCJacobiSetFixDiagonal(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nCheck for zero values on the diagonal and replace them with 1.0\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - the boolean flag\n\nOptions Database Key:\n- `-pc_jacobi_fixdiagonal <bool>` - check for zero values on the diagonal\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetType()`, `PCJacobiGetFixDiagonal()`, `PCJacobiSetUseAbs()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiSetFixDiagonal\"))\n\"\"\"\nfunction PCJacobiSetFixDiagonal(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCJacobiSetFixDiagonal(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCJacobiSetFixDiagonal, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCJacobiGetFixDiagonal(petsclib::PetscLibType,pc::PC) \nDetermines if the Jacobi preconditioner `PCJACOBI` checks for zero diagonal terms\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - the boolean flag\n\nOptions Database Key:\n- `-pc_jacobi_fixdiagonal <bool>` - Fix 0 terms on diagonal by using 1\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetType()`, `PCJacobiSetFixDiagonal()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiGetFixDiagonal\"))\n\"\"\"\nfunction PCJacobiGetFixDiagonal(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCJacobiGetFixDiagonal(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCJacobiGetFixDiagonal, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCJacobiGetDiagonal(petsclib::PetscLibType,pc::PC, diagonal::PetscVec, diagonal_sqrt::PetscVec) \nReturns copy of the diagonal and/or diagonal squareroot `Vec`\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `diagonal`      - Copy of `Vec` of the inverted diagonal\n- `diagonal_sqrt` - Copy of `Vec` of the inverted square root diagonal\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiGetDiagonal\"))\n\"\"\"\nfunction PCJacobiGetDiagonal(petsclib::PetscLibType, pc::PC, diagonal::PetscVec, diagonal_sqrt::PetscVec) end\n\n@for_petsc function PCJacobiGetDiagonal(petsclib::$UnionPetscLib, pc::PC, diagonal::PetscVec, diagonal_sqrt::PetscVec )\n\n    @chk ccall(\n               (:PCJacobiGetDiagonal, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec),\n               pc, diagonal, diagonal_sqrt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCJacobiSetType(petsclib::PetscLibType,pc::PC, type::PCJacobiType) \nCauses the Jacobi preconditioner to use either the diagonal, the maximum entry in each row,\nof the sum of rows entries for the diagonal preconditioner\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - `PC_JACOBI_DIAGONAL`, `PC_JACOBI_ROWL1`, `PC_JACOBI_ROWMAX`, `PC_JACOBI_ROWSUM`\n\nOptions Database Key:\n- `-pc_jacobi_type <diagonal,rowl1,rowmax,rowsum>` - the type of diagonal matrix to use for Jacobi\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetUseAbs()`, `PCJacobiGetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiSetType\"))\n\"\"\"\nfunction PCJacobiSetType(petsclib::PetscLibType, pc::PC, type::PCJacobiType) end\n\n@for_petsc function PCJacobiSetType(petsclib::$UnionPetscLib, pc::PC, type::PCJacobiType )\n\n    @chk ccall(\n               (:PCJacobiSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCJacobiType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCJacobiType = PCJacobiGetType(petsclib::PetscLibType,pc::PC) \nGets how the diagonal matrix is produced for the preconditioner\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - `PC_JACOBI_DIAGONAL`, `PC_JACOBI_ROWL1`, `PC_JACOBI_ROWMAX`, `PC_JACOBI_ROWSUM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCJACOBI`, `PCJacobiSetUseAbs()`, `PCJacobiSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCJacobiGetType\"))\n\"\"\"\nfunction PCJacobiGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCJacobiGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCJacobiType}()\n\n    @chk ccall(\n               (:PCJacobiGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCJacobiType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCGalerkinSetRestriction(petsclib::PetscLibType,pc::PC, R::PetscMat) \nSets the restriction operator for the `PCGALERKIN` preconditioner\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `R`  - the restriction operator\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCSetType()`, `PCType`, `PCGALERKIN`,\n`PCGalerkinSetInterpolation()`, `PCGalerkinGetKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGalerkinSetRestriction\"))\n\"\"\"\nfunction PCGalerkinSetRestriction(petsclib::PetscLibType, pc::PC, R::PetscMat) end\n\n@for_petsc function PCGalerkinSetRestriction(petsclib::$UnionPetscLib, pc::PC, R::PetscMat )\n\n    @chk ccall(\n               (:PCGalerkinSetRestriction, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, R,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGalerkinSetInterpolation(petsclib::PetscLibType,pc::PC, P::PetscMat) \nSets the interpolation operator for the `PCGALERKIN` preconditioner\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `P`  - the interpolation operator\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCSetType()`, `PCType`, `PCGALERKIN`,\n`PCGalerkinSetRestriction()`, `PCGalerkinGetKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGalerkinSetInterpolation\"))\n\"\"\"\nfunction PCGalerkinSetInterpolation(petsclib::PetscLibType, pc::PC, P::PetscMat) end\n\n@for_petsc function PCGalerkinSetInterpolation(petsclib::$UnionPetscLib, pc::PC, P::PetscMat )\n\n    @chk ccall(\n               (:PCGalerkinSetInterpolation, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, P,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGalerkinSetComputeSubmatrix(petsclib::PetscLibType,pc::PC, computeAsub::external, ctx::Cvoid) \nProvide a routine that will be called to compute the Galerkin submatrix\n\nLogically Collective\n\nInput Parameters:\n- `pc`          - the preconditioner context\n- `computeAsub` - routine that computes the submatrix from the global matrix\n- `ctx`         - context used by the routine, or `NULL`\n\nCalling sequence of `computeAsub`:\n- `pc`  - the `PCGALERKIN` preconditioner\n- `A`   - the matrix in the `PCGALERKIN`\n- `Ap`  - the computed submatrix from any previous computation, if `NULL` it has not previously been computed\n- `cAp` - the submatrix computed by this routine\n- `ctx` - optional user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCSetType()`, `PCType`, `PCGALERKIN`,\n`PCGalerkinSetRestriction()`, `PCGalerkinSetInterpolation()`, `PCGalerkinGetKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGalerkinSetComputeSubmatrix\"))\n\"\"\"\nfunction PCGalerkinSetComputeSubmatrix(petsclib::PetscLibType, pc::PC, computeAsub::external, ctx::Cvoid) end\n\n@for_petsc function PCGalerkinSetComputeSubmatrix(petsclib::$UnionPetscLib, pc::PC, computeAsub::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCGalerkinSetComputeSubmatrix, $petsc_library),\n               PetscErrorCode,\n               (PC, external, Ptr{Cvoid}),\n               pc, computeAsub, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGalerkinGetKSP(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \nGets the `KSP` object in the `PCGALERKIN`\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `ksp` - the `KSP` object\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PC`, `PCCreate()`, `PCSetType()`, `PCType`, `PCGALERKIN`,\n`PCGalerkinSetRestriction()`, `PCGalerkinSetInterpolation()`, `PCGalerkinSetComputeSubmatrix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGalerkinGetKSP\"))\n\"\"\"\nfunction PCGalerkinGetKSP(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCGalerkinGetKSP(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCGalerkinGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPARMSSetGlobal(petsclib::PetscLibType,pc::PC, type::PCPARMSGlobalType) \nSets the global preconditioner to be used in `PCPARMS`.\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - the global preconditioner type, one of\n-seealso: [](ch_ksp), `PCPARMS`, `PCPARMSSetLocal()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPARMSSetGlobal\"))\n\"\"\"\nfunction PCPARMSSetGlobal(petsclib::PetscLibType, pc::PC, type::PCPARMSGlobalType) end\n\n@for_petsc function PCPARMSSetGlobal(petsclib::$UnionPetscLib, pc::PC, type::PCPARMSGlobalType )\n\n    @chk ccall(\n               (:PCPARMSSetGlobal, $petsc_library),\n               PetscErrorCode,\n               (PC, PCPARMSGlobalType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPARMSSetLocal(petsclib::PetscLibType,pc::PC, type::PCPARMSLocalType) \nSets the local preconditioner to be used in `PCPARMS`.\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - the local preconditioner type, one of\n-seealso: [](ch_ksp), `PCPARMS`, `PCPARMSSetGlobal()`, `PCPARMSSetNonsymPerm()`\n\n\n# External Links\n$(_doc_external(\"Ksp/PCPARMSSetLocal\"))\n\"\"\"\nfunction PCPARMSSetLocal(petsclib::PetscLibType, pc::PC, type::PCPARMSLocalType) end\n\n@for_petsc function PCPARMSSetLocal(petsclib::$UnionPetscLib, pc::PC, type::PCPARMSLocalType )\n\n    @chk ccall(\n               (:PCPARMSSetLocal, $petsc_library),\n               PetscErrorCode,\n               (PC, PCPARMSLocalType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPARMSSetSolveTolerances(petsclib::PetscLibType,pc::PC, tol::PetscReal, maxits::PetscInt) \nSets the convergence tolerance and the maximum iterations for the\ninner GMRES solver, when the Schur global preconditioner is used.\n\nCollective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `tol`    - the convergence tolerance\n- `maxits` - the maximum number of iterations to use\n\nOptions Database Keys:\n- `-pc_parms_solve_tol` - set the tolerance for local solve\n- `-pc_parms_max_it`    - set the maximum number of inner iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCPARMS`, `PCPARMSSetSolveRestart()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPARMSSetSolveTolerances\"))\n\"\"\"\nfunction PCPARMSSetSolveTolerances(petsclib::PetscLibType, pc::PC, tol::PetscReal, maxits::PetscInt) end\n\n@for_petsc function PCPARMSSetSolveTolerances(petsclib::$UnionPetscLib, pc::PC, tol::$PetscReal, maxits::$PetscInt )\n\n    @chk ccall(\n               (:PCPARMSSetSolveTolerances, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal, $PetscInt),\n               pc, tol, maxits,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPARMSSetSolveRestart(petsclib::PetscLibType,pc::PC, restart::PetscInt) \nSets the number of iterations at which the\ninner GMRES solver restarts.\n\nCollective\n\nInput Parameters:\n- `pc`      - the preconditioner context\n- `restart` - maximum dimension of the Krylov subspace\n\nOptions Database Key:\n- `-pc_parms_max_dim` - sets the inner Krylov dimension\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCPARMS`, `PCPARMSSetSolveTolerances()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPARMSSetSolveRestart\"))\n\"\"\"\nfunction PCPARMSSetSolveRestart(petsclib::PetscLibType, pc::PC, restart::PetscInt) end\n\n@for_petsc function PCPARMSSetSolveRestart(petsclib::$UnionPetscLib, pc::PC, restart::$PetscInt )\n\n    @chk ccall(\n               (:PCPARMSSetSolveRestart, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, restart,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPARMSSetNonsymPerm(petsclib::PetscLibType,pc::PC, nonsym::PetscBool) \nSets the type of permutation for the ARMS preconditioner: the standard\nsymmetric ARMS or the non-symmetric ARMS (ARMS-ddPQ).\n\nCollective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `nonsym` - `PETSC_TRUE` indicates the non-symmetric ARMS is used;\n`PETSC_FALSE` indicates the symmetric ARMS is used\n\nOptions Database Key:\n- `-pc_parms_nonsymmetric_perm` - sets the use of nonsymmetric permutation\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCPARMS`\n\n# External Links\n$(_doc_external(\"Ksp/PCPARMSSetNonsymPerm\"))\n\"\"\"\nfunction PCPARMSSetNonsymPerm(petsclib::PetscLibType, pc::PC, nonsym::PetscBool) end\n\n@for_petsc function PCPARMSSetNonsymPerm(petsclib::$UnionPetscLib, pc::PC, nonsym::PetscBool )\n\n    @chk ccall(\n               (:PCPARMSSetNonsymPerm, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, nonsym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPARMSSetFill(petsclib::PetscLibType,pc::PC, lfil0::PetscInt, lfil1::PetscInt, lfil2::PetscInt) \nSets the fill\nConsider the original matrix A = [B F; E C] and the approximate version\nM = [LB 0; E/UB I]*[UB LB F; 0 S].\n\nCollective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `lfil0` - the level of fill-in kept in LB, UB, E/UB and LB F\n- `lfil1` - the level of fill-in kept in S\n- `lfil2` - the level of fill-in kept in the L and U parts of the LU factorization of S\n\nOptions Database Keys:\n- `-pc_parms_lfil_ilu_arms` - set the amount of fill-in for ilut, iluk and arms\n- `-pc_parms_lfil_schur`    - set the amount of fill-in for schur\n- `-pc_parms_lfil_ilut_L_U` - set the amount of fill-in for ILUT L and U\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCPARMS`\n\n# External Links\n$(_doc_external(\"Ksp/PCPARMSSetFill\"))\n\"\"\"\nfunction PCPARMSSetFill(petsclib::PetscLibType, pc::PC, lfil0::PetscInt, lfil1::PetscInt, lfil2::PetscInt) end\n\n@for_petsc function PCPARMSSetFill(petsclib::$UnionPetscLib, pc::PC, lfil0::$PetscInt, lfil1::$PetscInt, lfil2::$PetscInt )\n\n    @chk ccall(\n               (:PCPARMSSetFill, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, $PetscInt, $PetscInt),\n               pc, lfil0, lfil1, lfil2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCExoticSetType(petsclib::PetscLibType,pc::PC, type::PCExoticType) \nSets the type of coarse grid interpolation to use\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - either `PC_EXOTIC_FACE` or `PC_EXOTIC_WIREBASKET` (defaults to face)\n\nOptions Database Keys:\n- `-pc_exotic_type <face,wirebasket>` - use a coarse grid point for each face, or edge and vertex\n\n-seealso: [](ch_ksp), `PCEXOTIC`, `PCExoticType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCExoticSetType\"))\n\"\"\"\nfunction PCExoticSetType(petsclib::PetscLibType, pc::PC, type::PCExoticType) end\n\n@for_petsc function PCExoticSetType(petsclib::$UnionPetscLib, pc::PC, type::PCExoticType )\n\n    @chk ccall(\n               (:PCExoticSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCExoticType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetUpMatSolverType(petsclib::PetscLibType,pc::PC) \nCan be called after `KSPSetOperators()` or `PCSetOperators()`, causes `MatGetFactor()` to be called so then one may\nset the options for that particular factorization object.\n\nInput Parameter:\n- `pc` - the preconditioner context\n\n-seealso: [](ch_ksp), `PCCHOLESKY`, `PCLU`, `PCFactorSetMatSolverType()`, `PCFactorGetMatrix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetUpMatSolverType\"))\n\"\"\"\nfunction PCFactorSetUpMatSolverType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorSetUpMatSolverType(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCFactorSetUpMatSolverType, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetZeroPivot(petsclib::PetscLibType,pc::PC, zero::PetscReal) \nSets the size at which smaller pivots are declared to be zero\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `zero` - all pivots smaller than this will be considered zero\n\nOptions Database Key:\n- `-pc_factor_zeropivot <zero>` - Sets tolerance for what is considered a zero pivot\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCHOLESKY`, `PCLU`, `PCFactorSetShiftType()`, `PCFactorSetShiftAmount()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetZeroPivot\"))\n\"\"\"\nfunction PCFactorSetZeroPivot(petsclib::PetscLibType, pc::PC, zero::PetscReal) end\n\n@for_petsc function PCFactorSetZeroPivot(petsclib::$UnionPetscLib, pc::PC, zero::$PetscReal )\n\n    @chk ccall(\n               (:PCFactorSetZeroPivot, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, zero,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetShiftType(petsclib::PetscLibType,pc::PC, shifttype::MatFactorShiftType) \nadds a particular type of quantity to the diagonal of the matrix during\nnumerical factorization, thus the matrix has nonzero pivots\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the preconditioner context\n- `shifttype` - type of shift; one of `MAT_SHIFT_NONE`, `MAT_SHIFT_NONZERO`, `MAT_SHIFT_POSITIVE_DEFINITE`, `MAT_SHIFT_INBLOCKS`\n\nOptions Database Key:\n- `-pc_factor_shift_type <shifttype>` - Sets shift type; use '-help' for a list of available types\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCHOLESKY`, `PCLU`, `PCFactorSetZeroPivot()`, `PCFactorSetShiftAmount()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetShiftType\"))\n\"\"\"\nfunction PCFactorSetShiftType(petsclib::PetscLibType, pc::PC, shifttype::MatFactorShiftType) end\n\n@for_petsc function PCFactorSetShiftType(petsclib::$UnionPetscLib, pc::PC, shifttype::MatFactorShiftType )\n\n    @chk ccall(\n               (:PCFactorSetShiftType, $petsc_library),\n               PetscErrorCode,\n               (PC, MatFactorShiftType),\n               pc, shifttype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetShiftAmount(petsclib::PetscLibType,pc::PC, shiftamount::PetscReal) \nadds a quantity to the diagonal of the matrix during\nnumerical factorization, thus the matrix has nonzero pivots\n\nLogically Collective\n\nInput Parameters:\n- `pc`          - the preconditioner context\n- `shiftamount` - amount of shift or `PETSC_DECIDE` for the default\n\nOptions Database Key:\n- `-pc_factor_shift_amount <shiftamount>` - Sets shift amount or -1 for the default\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCHOLESKY`, `PCLU`, `PCFactorSetZeroPivot()`, `PCFactorSetShiftType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetShiftAmount\"))\n\"\"\"\nfunction PCFactorSetShiftAmount(petsclib::PetscLibType, pc::PC, shiftamount::PetscReal) end\n\n@for_petsc function PCFactorSetShiftAmount(petsclib::$UnionPetscLib, pc::PC, shiftamount::$PetscReal )\n\n    @chk ccall(\n               (:PCFactorSetShiftAmount, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, shiftamount,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetDropTolerance(petsclib::PetscLibType,pc::PC, dt::PetscReal, dtcol::PetscReal, maxrowcount::PetscInt) \nThe preconditioner will use an `PCILU`\nbased on a drop tolerance.\n\nLogically Collective\n\nInput Parameters:\n- `pc`          - the preconditioner context\n- `dt`          - the drop tolerance, try from 1.e-10 to .1\n- `dtcol`       - tolerance for column pivot, good values [0.1 to 0.01]\n- `maxrowcount` - the max number of nonzeros allowed in a row, best value\ndepends on the number of nonzeros in row of original matrix\n\nOptions Database Key:\n- `-pc_factor_drop_tolerance <dt,dtcol,maxrowcount>` - Sets drop tolerance\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCILU`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetDropTolerance\"))\n\"\"\"\nfunction PCFactorSetDropTolerance(petsclib::PetscLibType, pc::PC, dt::PetscReal, dtcol::PetscReal, maxrowcount::PetscInt) end\n\n@for_petsc function PCFactorSetDropTolerance(petsclib::$UnionPetscLib, pc::PC, dt::$PetscReal, dtcol::$PetscReal, maxrowcount::$PetscInt )\n\n    @chk ccall(\n               (:PCFactorSetDropTolerance, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal, $PetscReal, $PetscInt),\n               pc, dt, dtcol, maxrowcount,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpivot::PetscReal = PCFactorGetZeroPivot(petsclib::PetscLibType,pc::PC) \nGets the tolerance used to define a zero privot\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `pivot` - the tolerance\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCFactorSetZeroPivot()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetZeroPivot\"))\n\"\"\"\nfunction PCFactorGetZeroPivot(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorGetZeroPivot(petsclib::$UnionPetscLib, pc::PC )\n\tpivot_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PCFactorGetZeroPivot, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}),\n               pc, pivot_,\n              )\n\n\tpivot = pivot_[]\n\n\treturn pivot\nend \n\n\"\"\"\n\tshift::PetscReal = PCFactorGetShiftAmount(petsclib::PetscLibType,pc::PC) \nGets the tolerance used to define a zero privot\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `shift` - how much to shift the diagonal entry\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCFactorSetShiftAmount()`, `PCFactorSetShiftType()`, `PCFactorGetShiftType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetShiftAmount\"))\n\"\"\"\nfunction PCFactorGetShiftAmount(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorGetShiftAmount(petsclib::$UnionPetscLib, pc::PC )\n\tshift_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PCFactorGetShiftAmount, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}),\n               pc, shift_,\n              )\n\n\tshift = shift_[]\n\n\treturn shift\nend \n\n\"\"\"\n\ttype::MatFactorShiftType = PCFactorGetShiftType(petsclib::PetscLibType,pc::PC) \nGets the type of shift, if any, done when a zero pivot is detected\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - one of `MAT_SHIFT_NONE`, `MAT_SHIFT_NONZERO`, `MAT_SHIFT_POSITIVE_DEFINITE`, or `MAT_SHIFT_INBLOCKS`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCFactorSetShiftType()`, `MatFactorShiftType`, `PCFactorSetShiftAmount()`, `PCFactorGetShiftAmount()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetShiftType\"))\n\"\"\"\nfunction PCFactorGetShiftType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorGetShiftType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{MatFactorShiftType}()\n\n    @chk ccall(\n               (:PCFactorGetShiftType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{MatFactorShiftType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tlevels::PetscInt = PCFactorGetLevels(petsclib::PetscLibType,pc::PC) \nGets the number of levels of fill to use.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `levels` - number of levels of fill\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCILU`, `PCICC`, `PCFactorSetLevels()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetLevels\"))\n\"\"\"\nfunction PCFactorGetLevels(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorGetLevels(petsclib::$UnionPetscLib, pc::PC )\n\tlevels_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCFactorGetLevels, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}),\n               pc, levels_,\n              )\n\n\tlevels = levels_[]\n\n\treturn levels\nend \n\n\"\"\"\n\tPCFactorSetLevels(petsclib::PetscLibType,pc::PC, levels::PetscInt) \nSets the number of levels of fill to use.\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `levels` - number of levels of fill\n\nOptions Database Key:\n- `-pc_factor_levels <levels>` - Sets fill level\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCILU`, `PCICC`, `PCFactorGetLevels()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetLevels\"))\n\"\"\"\nfunction PCFactorSetLevels(petsclib::PetscLibType, pc::PC, levels::PetscInt) end\n\n@for_petsc function PCFactorSetLevels(petsclib::$UnionPetscLib, pc::PC, levels::$PetscInt )\n\n    @chk ccall(\n               (:PCFactorSetLevels, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, levels,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetAllowDiagonalFill(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nCauses all diagonal matrix entries to be\ntreated as level 0 fill even if there is no non-zero location.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - `PETSC_TRUE` to turn on, `PETSC_FALSE` to turn off\n\nOptions Database Key:\n- `-pc_factor_diagonal_fill <bool>` - allow the diagonal fill\n\n-seealso: [](ch_ksp), `PCILU`, `PCICC`, `PCFactorGetAllowDiagonalFill()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetAllowDiagonalFill\"))\n\"\"\"\nfunction PCFactorSetAllowDiagonalFill(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCFactorSetAllowDiagonalFill(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCFactorSetAllowDiagonalFill, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCFactorGetAllowDiagonalFill(petsclib::PetscLibType,pc::PC) \nDetermines if all diagonal matrix entries are\ntreated as level 0 fill even if there is no non-zero location.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` to turn on, `PETSC_FALSE` to turn off\n\n-seealso: [](ch_ksp), `PCILU`, `PCICC`, `PCFactorSetAllowDiagonalFill()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetAllowDiagonalFill\"))\n\"\"\"\nfunction PCFactorGetAllowDiagonalFill(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorGetAllowDiagonalFill(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCFactorGetAllowDiagonalFill, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCFactorReorderForNonzeroDiagonal(petsclib::PetscLibType,pc::PC, rtol::PetscReal) \nreorders rows/columns of matrix to remove zeros from diagonal\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `rtol` - diagonal entries smaller than this in absolute value are considered zero\n\nOptions Database Key:\n- `-pc_factor_nonzeros_along_diagonal <tol>` - perform the reordering with the given tolerance\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCILU`, `PCICC`, `PCFactorSetFill()`, `PCFactorSetShiftAmount()`, `PCFactorSetZeroPivot()`, `MatReorderForNonzeroDiagonal()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorReorderForNonzeroDiagonal\"))\n\"\"\"\nfunction PCFactorReorderForNonzeroDiagonal(petsclib::PetscLibType, pc::PC, rtol::PetscReal) end\n\n@for_petsc function PCFactorReorderForNonzeroDiagonal(petsclib::$UnionPetscLib, pc::PC, rtol::$PetscReal )\n\n    @chk ccall(\n               (:PCFactorReorderForNonzeroDiagonal, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, rtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetMatSolverType(petsclib::PetscLibType,pc::PC, stype::MatSolverType) \nsets the solver package that is used to perform the factorization\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `stype` - for example, `MATSOLVERSUPERLU`, `MATSOLVERSUPERLU_DIST`, `MATSOLVERMUMPS`\n\nOptions Database Key:\n- `-pc_factor_mat_solver_type <stype>` - petsc, superlu, superlu_dist, mumps, cusparse\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `MatGetFactor()`, `MatSolverType`, `PCFactorGetMatSolverType()`, `MatSolverTypeRegister()`,\n`MatInitializePackage()`, `MATSOLVERSUPERLU`, `MATSOLVERSUPERLU_DIST`, `MATSOLVERMUMPS`, `MatSolverTypeGet()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetMatSolverType\"))\n\"\"\"\nfunction PCFactorSetMatSolverType(petsclib::PetscLibType, pc::PC, stype::MatSolverType) end\n\n@for_petsc function PCFactorSetMatSolverType(petsclib::$UnionPetscLib, pc::PC, stype::MatSolverType )\n\n    @chk ccall(\n               (:PCFactorSetMatSolverType, $petsc_library),\n               PetscErrorCode,\n               (PC, MatSolverType),\n               pc, stype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstype::MatSolverType = PCFactorGetMatSolverType(petsclib::PetscLibType,pc::PC) \ngets the solver package that is used to perform the factorization\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `stype` - for example, `MATSOLVERSUPERLU`, `MATSOLVERSUPERLU_DIST`, `MATSOLVERMUMPS`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `MatGetFactor()`, `MatSolverType`, `MATSOLVERSUPERLU`,\n`MATSOLVERSUPERLU_DIST`, `MATSOLVERMUMPS`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetMatSolverType\"))\n\"\"\"\nfunction PCFactorGetMatSolverType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorGetMatSolverType(petsclib::$UnionPetscLib, pc::PC )\n\tstype_ = Ref{MatSolverType}()\n\n    @chk ccall(\n               (:PCFactorGetMatSolverType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{MatSolverType}),\n               pc, stype_,\n              )\n\n\tstype = unsafe_string(stype_[])\n\n\treturn stype\nend \n\n\"\"\"\n\tPCFactorSetFill(petsclib::PetscLibType,pc::PC, fill::PetscReal) \nIndicate the amount of fill you expect in the factored matrix,\nfill = number nonzeros in factor/number nonzeros in original matrix.\n\nNot Collective, each process can expect a different amount of fill\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `fill` - amount of expected fill\n\nOptions Database Key:\n- `-pc_factor_fill <fill>` - Sets fill amount\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCILU`, `PCICC`, `PCFactorSetReuseFill()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetFill\"))\n\"\"\"\nfunction PCFactorSetFill(petsclib::PetscLibType, pc::PC, fill::PetscReal) end\n\n@for_petsc function PCFactorSetFill(petsclib::$UnionPetscLib, pc::PC, fill::$PetscReal )\n\n    @chk ccall(\n               (:PCFactorSetFill, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, fill,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetUseInPlace(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nTells the preconditioner to do an in\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - `PETSC_TRUE` to enable, `PETSC_FALSE` to disable\n\nOptions Database Key:\n- `-pc_factor_in_place <true,false>` - Activate/deactivate in-place factorization\n\n-seealso: [](ch_ksp), `PC`, `Mat`, `PCLU`, `PCCHOLESKY`, `PCILU`, `PCICC`, `PCFactorGetUseInPlace()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetUseInPlace\"))\n\"\"\"\nfunction PCFactorSetUseInPlace(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCFactorSetUseInPlace(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCFactorSetUseInPlace, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCFactorGetUseInPlace(petsclib::PetscLibType,pc::PC) \nDetermines if an in\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` to enable, `PETSC_FALSE` to disable\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCILU`, `PCICC`, `PCFactorSetUseInPlace()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorGetUseInPlace\"))\n\"\"\"\nfunction PCFactorGetUseInPlace(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFactorGetUseInPlace(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCFactorGetUseInPlace, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCFactorSetMatOrderingType(petsclib::PetscLibType,pc::PC, ordering::MatOrderingType) \nSets the ordering routine (to reduce fill) to\nbe used in the `PCLU`, `PCCHOLESKY`, `PCILU`,  or `PCICC` preconditioners\n\nLogically Collective\n\nInput Parameters:\n- `pc`       - the preconditioner context\n- `ordering` - the matrix ordering name, for example, `MATORDERINGND` or `MATORDERINGRCM`\n\nOptions Database Key:\n- `-pc_factor_mat_ordering_type <nd,rcm,...,external>` - Sets ordering routine\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCILU`, `PCICC`, `MatOrderingType`, `MATORDERINGEXTERNAL`, `MATORDERINGND`, `MATORDERINGRCM`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetMatOrderingType\"))\n\"\"\"\nfunction PCFactorSetMatOrderingType(petsclib::PetscLibType, pc::PC, ordering::MatOrderingType) end\n\n@for_petsc function PCFactorSetMatOrderingType(petsclib::$UnionPetscLib, pc::PC, ordering::MatOrderingType )\n\n    @chk ccall(\n               (:PCFactorSetMatOrderingType, $petsc_library),\n               PetscErrorCode,\n               (PC, MatOrderingType),\n               pc, ordering,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetColumnPivot(petsclib::PetscLibType,pc::PC, dtcol::PetscReal) \nDetermines when column pivoting is done during matrix factorization.\nFor PETSc dense matrices column pivoting is always done, for PETSc sparse matrices\nit is never done. For the MATLAB and `MATSOLVERSUPERLU` factorization this is used.\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `dtcol` - 0.0 implies no pivoting, 1.0 complete pivoting (slower, requires more memory but more stable)\n\nOptions Database Key:\n- `-pc_factor_pivoting <dtcol>` - perform the pivoting with the given tolerance\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCILU`, `PCICC`, `PCILUSetMatOrdering()`, `PCFactorSetPivotInBlocks()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetColumnPivot\"))\n\"\"\"\nfunction PCFactorSetColumnPivot(petsclib::PetscLibType, pc::PC, dtcol::PetscReal) end\n\n@for_petsc function PCFactorSetColumnPivot(petsclib::$UnionPetscLib, pc::PC, dtcol::$PetscReal )\n\n    @chk ccall(\n               (:PCFactorSetColumnPivot, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, dtcol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetPivotInBlocks(petsclib::PetscLibType,pc::PC, pivot::PetscBool) \nDetermines if pivoting is done while factoring each block\nwith `MATBAIJ` or `MATSBAIJ` matrices\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `pivot` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n- `-pc_factor_pivot_in_blocks <true,false>` - Pivot inside matrix dense blocks for `MATBAIJ` and `MATSBAIJ`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCILU`, `PCICC`, `PCILUSetMatOrdering()`, `PCFactorSetColumnPivot()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetPivotInBlocks\"))\n\"\"\"\nfunction PCFactorSetPivotInBlocks(petsclib::PetscLibType, pc::PC, pivot::PetscBool) end\n\n@for_petsc function PCFactorSetPivotInBlocks(petsclib::$UnionPetscLib, pc::PC, pivot::PetscBool )\n\n    @chk ccall(\n               (:PCFactorSetPivotInBlocks, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, pivot,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetReuseFill(petsclib::PetscLibType,pc::PC, flag::PetscBool) \nWhen matrices with different nonzero structure are factored,\nthis causes later ones to use the fill ratio computed in the initial factorization.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `flag` - `PETSC_TRUE` to reuse else `PETSC_FALSE`\n\nOptions Database Key:\n- `-pc_factor_reuse_fill` - Activates `PCFactorSetReuseFill()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCILU`, `PCICC`, `PCFactorSetReuseOrdering()`, `PCFactorSetFill()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetReuseFill\"))\n\"\"\"\nfunction PCFactorSetReuseFill(petsclib::PetscLibType, pc::PC, flag::PetscBool) end\n\n@for_petsc function PCFactorSetReuseFill(petsclib::$UnionPetscLib, pc::PC, flag::PetscBool )\n\n    @chk ccall(\n               (:PCFactorSetReuseFill, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFactorSetReuseOrdering(petsclib::PetscLibType,pc::PC, flag::PetscBool) \nWhen similar matrices are factored, this\ncauses the ordering computed in the first factor to be used for all\nfollowing factors.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `flag` - `PETSC_TRUE` to reuse else `PETSC_FALSE`\n\nOptions Database Key:\n- `-pc_factor_reuse_ordering` - Activate `PCFactorSetReuseOrdering()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLU`, `PCCHOLESKY`, `PCFactorSetReuseFill()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFactorSetReuseOrdering\"))\n\"\"\"\nfunction PCFactorSetReuseOrdering(petsclib::PetscLibType, pc::PC, flag::PetscBool) end\n\n@for_petsc function PCFactorSetReuseOrdering(petsclib::$UnionPetscLib, pc::PC, flag::PetscBool )\n\n    @chk ccall(\n               (:PCFactorSetReuseOrdering, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCCompositeSetType(petsclib::PetscLibType,pc::PC, type::PCCompositeType) \nSets the type of composite preconditioner.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - `PC_COMPOSITE_ADDITIVE` (default), `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`\n\nOptions Database Key:\n- `-pc_composite_type <type: one of multiplicative, additive, special>` - Sets composite preconditioner type\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCCOMPOSITE`, `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PCCompositeType`,\n`PCCompositeGetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeSetType\"))\n\"\"\"\nfunction PCCompositeSetType(petsclib::PetscLibType, pc::PC, type::PCCompositeType) end\n\n@for_petsc function PCCompositeSetType(petsclib::$UnionPetscLib, pc::PC, type::PCCompositeType )\n\n    @chk ccall(\n               (:PCCompositeSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCCompositeType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCCompositeType = PCCompositeGetType(petsclib::PetscLibType,pc::PC) \nGets the type of composite preconditioner.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - `PC_COMPOSITE_ADDITIVE` (default), `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCCOMPOSITE`, `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PCCompositeType`,\n`PCCompositeSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeGetType\"))\n\"\"\"\nfunction PCCompositeGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCCompositeGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCCompositeType}()\n\n    @chk ccall(\n               (:PCCompositeGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCCompositeType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCCompositeSpecialSetAlpha(petsclib::PetscLibType,pc::PC, alpha::PetscScalar) \nSets alpha for the special composite preconditioner, `PC_COMPOSITE_SPECIAL`,\nfor \\alpha I + R + S\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `alpha` - scale on identity\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCCOMPOSITE`, `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PCCompositeType`,\n`PCCompositeSetType()`, `PCCompositeGetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeSpecialSetAlpha\"))\n\"\"\"\nfunction PCCompositeSpecialSetAlpha(petsclib::PetscLibType, pc::PC, alpha::PetscScalar) end\n\n@for_petsc function PCCompositeSpecialSetAlpha(petsclib::$UnionPetscLib, pc::PC, alpha::$PetscScalar )\n\n    @chk ccall(\n               (:PCCompositeSpecialSetAlpha, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscScalar),\n               pc, alpha,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCCompositeSpecialSetAlphaMat(petsclib::PetscLibType,pc::PC, alpha_mat::PetscMat) \n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeSpecialSetAlphaMat\"))\n\"\"\"\nfunction PCCompositeSpecialSetAlphaMat(petsclib::PetscLibType, pc::PC, alpha_mat::PetscMat) end\n\n@for_petsc function PCCompositeSpecialSetAlphaMat(petsclib::$UnionPetscLib, pc::PC, alpha_mat::PetscMat )\n\n    @chk ccall(\n               (:PCCompositeSpecialSetAlphaMat, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, alpha_mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCCompositeAddPCType(petsclib::PetscLibType,pc::PC, type::PCType) \nAdds another `PC` of the given type to the composite `PC`.\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - the type of the new preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCOMPOSITE`, `PCCompositeAddPC()`, `PCCompositeGetNumberPC()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeAddPCType\"))\n\"\"\"\nfunction PCCompositeAddPCType(petsclib::PetscLibType, pc::PC, type::PCType) end\n\n@for_petsc function PCCompositeAddPCType(petsclib::$UnionPetscLib, pc::PC, type::PCType )\n\n    @chk ccall(\n               (:PCCompositeAddPCType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCCompositeAddPC(petsclib::PetscLibType,pc::PC, subpc::PC) \nAdds another `PC` to the composite `PC`.\n\nCollective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `subpc` - the new preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCOMPOSITE`, `PCCompositeAddPCType()`, `PCCompositeGetNumberPC()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeAddPC\"))\n\"\"\"\nfunction PCCompositeAddPC(petsclib::PetscLibType, pc::PC, subpc::PC) end\n\n@for_petsc function PCCompositeAddPC(petsclib::$UnionPetscLib, pc::PC, subpc::PC )\n\n    @chk ccall(\n               (:PCCompositeAddPC, $petsc_library),\n               PetscErrorCode,\n               (PC, PC),\n               pc, subpc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum::PetscInt = PCCompositeGetNumberPC(petsclib::PetscLibType,pc::PC) \nGets the number of `PC` objects in the composite `PC`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `num` - the number of sub pcs\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCCOMPOSITE`, `PCCompositeGetPC()`, `PCCompositeAddPC()`, `PCCompositeAddPCType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeGetNumberPC\"))\n\"\"\"\nfunction PCCompositeGetNumberPC(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCCompositeGetNumberPC(petsclib::$UnionPetscLib, pc::PC )\n\tnum_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCCompositeGetNumberPC, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}),\n               pc, num_,\n              )\n\n\tnum = num_[]\n\n\treturn num\nend \n\n\"\"\"\n\tPCCompositeGetPC(petsclib::PetscLibType,pc::PC, n::PetscInt, subpc::PC) \nGets one of the `PC` objects in the composite `PC`.\n\nNot Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - the number of the pc requested\n\nOutput Parameter:\n- `subpc` - the PC requested\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCOMPOSITE`, `PCCompositeAddPCType()`, `PCCompositeGetNumberPC()`, `PCSetOperators()`\n\n# External Links\n$(_doc_external(\"Ksp/PCCompositeGetPC\"))\n\"\"\"\nfunction PCCompositeGetPC(petsclib::PetscLibType, pc::PC, n::PetscInt, subpc::PC) end\n\n@for_petsc function PCCompositeGetPC(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt, subpc::PC )\n\n    @chk ccall(\n               (:PCCompositeGetPC, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{PC}),\n               pc, n, subpc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetDiscreteGradient(petsclib::PetscLibType,pc::PC, G::PetscMat, order::PetscInt, field::PetscInt, global_::PetscBool, conforming::PetscBool) \nSets the discrete gradient to be used by the `PCBDDC` preconditioner\n\nCollective\n\nInput Parameters:\n- `pc`         - the preconditioning context\n- `G`          - the discrete gradient matrix (in `MATAIJ` format)\n- `order`      - the order of the Nedelec space (1 for the lowest order)\n- `field`      - the field id of the Nedelec dofs (not used if the fields have not been specified)\n- `global`     - the type of global ordering for the rows of `G`\n- `conforming` - whether the mesh is conforming or not\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetDofsSplitting()`, `PCBDDCSetDofsSplittingLocal()`, `MATAIJ`, `PCBDDCSetDivergenceMat()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetDiscreteGradient\"))\n\"\"\"\nfunction PCBDDCSetDiscreteGradient(petsclib::PetscLibType, pc::PC, G::PetscMat, order::PetscInt, field::PetscInt, global_::PetscBool, conforming::PetscBool) end\n\n@for_petsc function PCBDDCSetDiscreteGradient(petsclib::$UnionPetscLib, pc::PC, G::PetscMat, order::$PetscInt, field::$PetscInt, global_::PetscBool, conforming::PetscBool )\n\n    @chk ccall(\n               (:PCBDDCSetDiscreteGradient, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, $PetscInt, $PetscInt, PetscBool, PetscBool),\n               pc, G, order, field, global_, conforming,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetDivergenceMat(petsclib::PetscLibType,pc::PC, divudotp::PetscMat, trans::PetscBool, vl2l::IS) \nSets the linear operator representing .. for the `PCBDDC` preconditioner\n\nCollective\n\nInput Parameters:\n- `pc`       - the preconditioning context\n- `divudotp` - the matrix (must be of type `MATIS`)\n- `trans`    - if `PETSC_FALSE` (resp. `PETSC_TRUE`), then pressures are in the test (trial) space and velocities are in the trial (test) space.\n- `vl2l`     - optional index set describing the local (wrt the local matrix in `divudotp`) to local (wrt the local matrix\nin the matrix used to construct the preconditioner) map for the velocities\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetDiscreteGradient()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetDivergenceMat\"))\n\"\"\"\nfunction PCBDDCSetDivergenceMat(petsclib::PetscLibType, pc::PC, divudotp::PetscMat, trans::PetscBool, vl2l::IS) end\n\n@for_petsc function PCBDDCSetDivergenceMat(petsclib::$UnionPetscLib, pc::PC, divudotp::PetscMat, trans::PetscBool, vl2l::IS )\n\n    @chk ccall(\n               (:PCBDDCSetDivergenceMat, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, PetscBool, IS),\n               pc, divudotp, trans, vl2l,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetChangeOfBasisMat(petsclib::PetscLibType,pc::PC, change::PetscMat, interior::PetscBool) \nSet user defined change of basis for dofs\n\nCollective\n\nInput Parameters:\n- `pc`       - the preconditioning context\n- `change`   - the change of basis matrix\n- `interior` - whether or not the change of basis modifies interior dofs\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetChangeOfBasisMat\"))\n\"\"\"\nfunction PCBDDCSetChangeOfBasisMat(petsclib::PetscLibType, pc::PC, change::PetscMat, interior::PetscBool) end\n\n@for_petsc function PCBDDCSetChangeOfBasisMat(petsclib::$UnionPetscLib, pc::PC, change::PetscMat, interior::PetscBool )\n\n    @chk ccall(\n               (:PCBDDCSetChangeOfBasisMat, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, PetscBool),\n               pc, change, interior,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetPrimalVerticesIS(petsclib::PetscLibType,pc::PC, PrimalVertices::IS) \nSet additional user defined primal vertices in `PCBDDC`\n\nCollective\n\nInput Parameters:\n- `pc`             - the preconditioning context\n- `PrimalVertices` - index set of primal vertices in global numbering (can be empty)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCGetPrimalVerticesIS()`, `PCBDDCSetPrimalVerticesLocalIS()`, `PCBDDCGetPrimalVerticesLocalIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetPrimalVerticesIS\"))\n\"\"\"\nfunction PCBDDCSetPrimalVerticesIS(petsclib::PetscLibType, pc::PC, PrimalVertices::IS) end\n\n@for_petsc function PCBDDCSetPrimalVerticesIS(petsclib::$UnionPetscLib, pc::PC, PrimalVertices::IS )\n\n    @chk ccall(\n               (:PCBDDCSetPrimalVerticesIS, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, PrimalVertices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCGetPrimalVerticesIS(petsclib::PetscLibType,pc::PC, is::IS) \nGet user defined primal vertices set with `PCBDDCSetPrimalVerticesIS()`\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioning context\n\nOutput Parameter:\n- `is` - index set of primal vertices in global numbering (`NULL` if not set)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetPrimalVerticesIS()`, `PCBDDCSetPrimalVerticesLocalIS()`, `PCBDDCGetPrimalVerticesLocalIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCGetPrimalVerticesIS\"))\n\"\"\"\nfunction PCBDDCGetPrimalVerticesIS(petsclib::PetscLibType, pc::PC, is::IS) end\n\n@for_petsc function PCBDDCGetPrimalVerticesIS(petsclib::$UnionPetscLib, pc::PC, is::IS )\n\n    @chk ccall(\n               (:PCBDDCGetPrimalVerticesIS, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{IS}),\n               pc, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetPrimalVerticesLocalIS(petsclib::PetscLibType,pc::PC, PrimalVertices::IS) \nSet additional user defined primal vertices in `PCBDDC`\n\nCollective\n\nInput Parameters:\n- `pc`             - the preconditioning context\n- `PrimalVertices` - index set of primal vertices in local numbering (can be empty)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetPrimalVerticesIS()`, `PCBDDCGetPrimalVerticesIS()`, `PCBDDCGetPrimalVerticesLocalIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetPrimalVerticesLocalIS\"))\n\"\"\"\nfunction PCBDDCSetPrimalVerticesLocalIS(petsclib::PetscLibType, pc::PC, PrimalVertices::IS) end\n\n@for_petsc function PCBDDCSetPrimalVerticesLocalIS(petsclib::$UnionPetscLib, pc::PC, PrimalVertices::IS )\n\n    @chk ccall(\n               (:PCBDDCSetPrimalVerticesLocalIS, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, PrimalVertices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCGetPrimalVerticesLocalIS(petsclib::PetscLibType,pc::PC, is::IS) \nGet user defined primal vertices set with `PCBDDCSetPrimalVerticesLocalIS()`\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioning context\n\nOutput Parameter:\n- `is` - index set of primal vertices in local numbering (`NULL` if not set)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetPrimalVerticesIS()`, `PCBDDCGetPrimalVerticesIS()`, `PCBDDCSetPrimalVerticesLocalIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCGetPrimalVerticesLocalIS\"))\n\"\"\"\nfunction PCBDDCGetPrimalVerticesLocalIS(petsclib::PetscLibType, pc::PC, is::IS) end\n\n@for_petsc function PCBDDCGetPrimalVerticesLocalIS(petsclib::$UnionPetscLib, pc::PC, is::IS )\n\n    @chk ccall(\n               (:PCBDDCGetPrimalVerticesLocalIS, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{IS}),\n               pc, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetCoarseningRatio(petsclib::PetscLibType,pc::PC, k::PetscInt) \nSet coarsening ratio used in the multi\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioning context\n- `k`  - coarsening ratio (H/h at the coarser level)\n\nOptions Database Key:\n- `-pc_bddc_coarsening_ratio <int>` - Set the coarsening ratio used in multi-level coarsening\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetLevels()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetCoarseningRatio\"))\n\"\"\"\nfunction PCBDDCSetCoarseningRatio(petsclib::PetscLibType, pc::PC, k::PetscInt) end\n\n@for_petsc function PCBDDCSetCoarseningRatio(petsclib::$UnionPetscLib, pc::PC, k::$PetscInt )\n\n    @chk ccall(\n               (:PCBDDCSetCoarseningRatio, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, k,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetLevels(petsclib::PetscLibType,pc::PC, levels::PetscInt) \nSets the maximum number of additional levels allowed for multilevel `PCBDDC`\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the preconditioning context\n- `levels` - the maximum number of levels\n\nOptions Database Key:\n- `-pc_bddc_levels <int>` - Set maximum number of levels for multilevel\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetCoarseningRatio()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetLevels\"))\n\"\"\"\nfunction PCBDDCSetLevels(petsclib::PetscLibType, pc::PC, levels::PetscInt) end\n\n@for_petsc function PCBDDCSetLevels(petsclib::$UnionPetscLib, pc::PC, levels::$PetscInt )\n\n    @chk ccall(\n               (:PCBDDCSetLevels, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, levels,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetDirichletBoundaries(petsclib::PetscLibType,pc::PC, DirichletBoundaries::IS) \nSet the `IS` defining Dirichlet boundaries for the global problem.\n\nCollective\n\nInput Parameters:\n- `pc`                  - the preconditioning context\n- `DirichletBoundaries` - parallel `IS` defining the Dirichlet boundaries\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetDirichletBoundariesLocal()`, `MatZeroRows()`, `MatZeroRowsColumns()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetDirichletBoundaries\"))\n\"\"\"\nfunction PCBDDCSetDirichletBoundaries(petsclib::PetscLibType, pc::PC, DirichletBoundaries::IS) end\n\n@for_petsc function PCBDDCSetDirichletBoundaries(petsclib::$UnionPetscLib, pc::PC, DirichletBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCSetDirichletBoundaries, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, DirichletBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetDirichletBoundariesLocal(petsclib::PetscLibType,pc::PC, DirichletBoundaries::IS) \nSet the `IS` defining Dirichlet boundaries for the global problem in local ordering.\n\nCollective\n\nInput Parameters:\n- `pc`                  - the preconditioning context\n- `DirichletBoundaries` - parallel `IS` defining the Dirichlet boundaries (in local ordering)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetDirichletBoundaries()`, `MatZeroRows()`, `MatZeroRowsColumns()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetDirichletBoundariesLocal\"))\n\"\"\"\nfunction PCBDDCSetDirichletBoundariesLocal(petsclib::PetscLibType, pc::PC, DirichletBoundaries::IS) end\n\n@for_petsc function PCBDDCSetDirichletBoundariesLocal(petsclib::$UnionPetscLib, pc::PC, DirichletBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCSetDirichletBoundariesLocal, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, DirichletBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetNeumannBoundaries(petsclib::PetscLibType,pc::PC, NeumannBoundaries::IS) \nSet the `IS` defining Neumann boundaries for the global problem.\n\nCollective\n\nInput Parameters:\n- `pc`                - the preconditioning context\n- `NeumannBoundaries` - parallel `IS` defining the Neumann boundaries\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetNeumannBoundariesLocal()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetNeumannBoundaries\"))\n\"\"\"\nfunction PCBDDCSetNeumannBoundaries(petsclib::PetscLibType, pc::PC, NeumannBoundaries::IS) end\n\n@for_petsc function PCBDDCSetNeumannBoundaries(petsclib::$UnionPetscLib, pc::PC, NeumannBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCSetNeumannBoundaries, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, NeumannBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetNeumannBoundariesLocal(petsclib::PetscLibType,pc::PC, NeumannBoundaries::IS) \nSet the `IS` defining Neumann boundaries for the global problem in local ordering.\n\nCollective\n\nInput Parameters:\n- `pc`                - the preconditioning context\n- `NeumannBoundaries` - parallel `IS` defining the subdomain part of Neumann boundaries (in local ordering)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetNeumannBoundaries()`, `PCBDDCGetDirichletBoundaries()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetNeumannBoundariesLocal\"))\n\"\"\"\nfunction PCBDDCSetNeumannBoundariesLocal(petsclib::PetscLibType, pc::PC, NeumannBoundaries::IS) end\n\n@for_petsc function PCBDDCSetNeumannBoundariesLocal(petsclib::$UnionPetscLib, pc::PC, NeumannBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCSetNeumannBoundariesLocal, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, NeumannBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCGetDirichletBoundaries(petsclib::PetscLibType,pc::PC, DirichletBoundaries::IS) \nGet parallel `IS` for Dirichlet boundaries\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioning context\n\nOutput Parameter:\n- `DirichletBoundaries` - index set defining the Dirichlet boundaries\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetDirichletBoundaries()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCGetDirichletBoundaries\"))\n\"\"\"\nfunction PCBDDCGetDirichletBoundaries(petsclib::PetscLibType, pc::PC, DirichletBoundaries::IS) end\n\n@for_petsc function PCBDDCGetDirichletBoundaries(petsclib::$UnionPetscLib, pc::PC, DirichletBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCGetDirichletBoundaries, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{IS}),\n               pc, DirichletBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCGetDirichletBoundariesLocal(petsclib::PetscLibType,pc::PC, DirichletBoundaries::IS) \nGet parallel `IS` for Dirichlet boundaries (in local ordering)\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioning context\n\nOutput Parameter:\n- `DirichletBoundaries` - index set defining the subdomain part of Dirichlet boundaries\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCGetDirichletBoundaries()`, `PCBDDCSetDirichletBoundaries()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCGetDirichletBoundariesLocal\"))\n\"\"\"\nfunction PCBDDCGetDirichletBoundariesLocal(petsclib::PetscLibType, pc::PC, DirichletBoundaries::IS) end\n\n@for_petsc function PCBDDCGetDirichletBoundariesLocal(petsclib::$UnionPetscLib, pc::PC, DirichletBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCGetDirichletBoundariesLocal, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{IS}),\n               pc, DirichletBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCGetNeumannBoundaries(petsclib::PetscLibType,pc::PC, NeumannBoundaries::IS) \nGet parallel `IS` for Neumann boundaries\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioning context\n\nOutput Parameter:\n- `NeumannBoundaries` - index set defining the Neumann boundaries\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetNeumannBoundaries()`, `PCBDDCGetDirichletBoundaries()`, `PCBDDCSetDirichletBoundaries()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCGetNeumannBoundaries\"))\n\"\"\"\nfunction PCBDDCGetNeumannBoundaries(petsclib::PetscLibType, pc::PC, NeumannBoundaries::IS) end\n\n@for_petsc function PCBDDCGetNeumannBoundaries(petsclib::$UnionPetscLib, pc::PC, NeumannBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCGetNeumannBoundaries, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{IS}),\n               pc, NeumannBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCGetNeumannBoundariesLocal(petsclib::PetscLibType,pc::PC, NeumannBoundaries::IS) \nGet parallel `IS` for Neumann boundaries (in local ordering)\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioning context\n\nOutput Parameter:\n- `NeumannBoundaries` - index set defining the subdomain part of Neumann boundaries\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetNeumannBoundaries()`, `PCBDDCSetNeumannBoundariesLocal()`, `PCBDDCGetNeumannBoundaries()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCGetNeumannBoundariesLocal\"))\n\"\"\"\nfunction PCBDDCGetNeumannBoundariesLocal(petsclib::PetscLibType, pc::PC, NeumannBoundaries::IS) end\n\n@for_petsc function PCBDDCGetNeumannBoundariesLocal(petsclib::$UnionPetscLib, pc::PC, NeumannBoundaries::IS )\n\n    @chk ccall(\n               (:PCBDDCGetNeumannBoundariesLocal, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{IS}),\n               pc, NeumannBoundaries,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetLocalAdjacencyGraph(petsclib::PetscLibType,pc::PC, nvtxs::PetscInt, xadj::Vector{PetscInt}, adjncy::Vector{PetscInt}, copymode::PetscCopyMode) \nSet adjacency structure (CSR graph) of the local degrees of freedom.\n\nNot collective\n\nInput Parameters:\n- `pc`       - the preconditioning context.\n- `nvtxs`    - number of local vertices of the graph (i.e., the number of local dofs).\n- `xadj`     - CSR format row pointers for the connectivity of the dofs\n- `adjncy`   - CSR format column pointers for the connectivity of the dofs\n- `copymode` - supported modes are `PETSC_COPY_VALUES`, `PETSC_USE_POINTER` or `PETSC_OWN_POINTER`.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PetscCopyMode`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetLocalAdjacencyGraph\"))\n\"\"\"\nfunction PCBDDCSetLocalAdjacencyGraph(petsclib::PetscLibType, pc::PC, nvtxs::PetscInt, xadj::Vector{PetscInt}, adjncy::Vector{PetscInt}, copymode::PetscCopyMode) end\n\n@for_petsc function PCBDDCSetLocalAdjacencyGraph(petsclib::$UnionPetscLib, pc::PC, nvtxs::$PetscInt, xadj::Vector{$PetscInt}, adjncy::Vector{$PetscInt}, copymode::PetscCopyMode )\n\n    @chk ccall(\n               (:PCBDDCSetLocalAdjacencyGraph, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, PetscCopyMode),\n               pc, nvtxs, xadj, adjncy, copymode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetDofsSplittingLocal(petsclib::PetscLibType,pc::PC, n_is::PetscInt, ISForDofs::Vector{IS}) \nSet the `IS` defining fields of the local subdomain matrix\n\nCollective\n\nInput Parameters:\n- `pc`        - the preconditioning context\n- `n_is`      - number of index sets defining the fields, must be the same on all MPI processes\n- `ISForDofs` - array of `IS` describing the fields in local ordering\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetDofsSplitting()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetDofsSplittingLocal\"))\n\"\"\"\nfunction PCBDDCSetDofsSplittingLocal(petsclib::PetscLibType, pc::PC, n_is::PetscInt, ISForDofs::Vector{IS}) end\n\n@for_petsc function PCBDDCSetDofsSplittingLocal(petsclib::$UnionPetscLib, pc::PC, n_is::$PetscInt, ISForDofs::Vector{IS} )\n\n    @chk ccall(\n               (:PCBDDCSetDofsSplittingLocal, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{IS}),\n               pc, n_is, ISForDofs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCSetDofsSplitting(petsclib::PetscLibType,pc::PC, n_is::PetscInt, ISForDofs::Vector{IS}) \nSet the `IS` defining fields of the global matrix\n\nCollective\n\nInput Parameters:\n- `pc`        - the preconditioning context\n- `n_is`      - number of index sets defining the fields\n- `ISForDofs` - array of `IS` describing the fields in global ordering\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCSetDofsSplittingLocal()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCSetDofsSplitting\"))\n\"\"\"\nfunction PCBDDCSetDofsSplitting(petsclib::PetscLibType, pc::PC, n_is::PetscInt, ISForDofs::Vector{IS}) end\n\n@for_petsc function PCBDDCSetDofsSplitting(petsclib::$UnionPetscLib, pc::PC, n_is::$PetscInt, ISForDofs::Vector{IS} )\n\n    @chk ccall(\n               (:PCBDDCSetDofsSplitting, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{IS}),\n               pc, n_is, ISForDofs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCMatFETIDPGetRHS(petsclib::PetscLibType,fetidp_mat::PetscMat, standard_rhs::PetscVec, fetidp_flux_rhs::PetscVec) \nCompute the right\n\nCollective\n\nInput Parameters:\n- `fetidp_mat`   - the FETI-DP matrix object obtained by a call to `PCBDDCCreateFETIDPOperators()`\n- `standard_rhs` - the right-hand side of the original linear system\n\nOutput Parameter:\n- `fetidp_flux_rhs` - the right-hand side for the FETI-DP linear system\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCCreateFETIDPOperators()`, `PCBDDCMatFETIDPGetSolution()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCMatFETIDPGetRHS\"))\n\"\"\"\nfunction PCBDDCMatFETIDPGetRHS(petsclib::PetscLibType, fetidp_mat::PetscMat, standard_rhs::PetscVec, fetidp_flux_rhs::PetscVec) end\n\n@for_petsc function PCBDDCMatFETIDPGetRHS(petsclib::$UnionPetscLib, fetidp_mat::PetscMat, standard_rhs::PetscVec, fetidp_flux_rhs::PetscVec )\n\n    @chk ccall(\n               (:PCBDDCMatFETIDPGetRHS, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               fetidp_mat, standard_rhs, fetidp_flux_rhs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCMatFETIDPGetSolution(petsclib::PetscLibType,fetidp_mat::PetscMat, fetidp_flux_sol::PetscVec, standard_sol::PetscVec) \nCompute the physical solution using the solution of the FETI\n\nCollective\n\nInput Parameters:\n- `fetidp_mat`      - the FETI-DP matrix obtained by a call to `PCBDDCCreateFETIDPOperators()`\n- `fetidp_flux_sol` - the solution of the FETI-DP linear system`\n\nOutput Parameter:\n- `standard_sol` - the solution defined on the physical domain\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCBDDC`, `PCBDDCCreateFETIDPOperators()`, `PCBDDCMatFETIDPGetRHS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCMatFETIDPGetSolution\"))\n\"\"\"\nfunction PCBDDCMatFETIDPGetSolution(petsclib::PetscLibType, fetidp_mat::PetscMat, fetidp_flux_sol::PetscVec, standard_sol::PetscVec) end\n\n@for_petsc function PCBDDCMatFETIDPGetSolution(petsclib::$UnionPetscLib, fetidp_mat::PetscMat, fetidp_flux_sol::PetscVec, standard_sol::PetscVec )\n\n    @chk ccall(\n               (:PCBDDCMatFETIDPGetSolution, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               fetidp_mat, fetidp_flux_sol, standard_sol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfetidp_mat::PetscMat,fetidp_pc::PC = PCBDDCCreateFETIDPOperators(petsclib::PetscLibType,pc::PC, fully_redundant::PetscBool, prefix::String) \nCreate FETI\n\nCollective\n\nInput Parameters:\n- `pc`              - the `PCBDDC` preconditioning context (setup should have been called before)\n- `fully_redundant` - true for a fully redundant set of Lagrange multipliers\n- `prefix`          - optional options database prefix for the objects to be created (can be `NULL`)\n\nOutput Parameters:\n- `fetidp_mat` - shell FETI-DP matrix object\n- `fetidp_pc`  - shell Dirichlet preconditioner for FETI-DP matrix\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPFETIDP`, `PCBDDC`, `PCBDDCMatFETIDPGetRHS()`, `PCBDDCMatFETIDPGetSolution()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCCreateFETIDPOperators\"))\n\"\"\"\nfunction PCBDDCCreateFETIDPOperators(petsclib::PetscLibType, pc::PC, fully_redundant::PetscBool, prefix::String) end\n\n@for_petsc function PCBDDCCreateFETIDPOperators(petsclib::$UnionPetscLib, pc::PC, fully_redundant::PetscBool, prefix::String )\n\tfetidp_mat_ = Ref{CMat}()\n\tfetidp_pc_ = Ref{PC}()\n\n    @chk ccall(\n               (:PCBDDCCreateFETIDPOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool, Ptr{Cchar}, Ptr{CMat}, Ptr{PC}),\n               pc, fully_redundant, prefix, fetidp_mat_, fetidp_pc_,\n              )\n\n\tfetidp_mat = PetscMat(fetidp_mat_[], petsclib)\n\tfetidp_pc = fetidp_pc_[]\n\n\treturn fetidp_mat,fetidp_pc\nend \n\n\"\"\"\n\tPCBDDCInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PCBDDC` package. It is called\nfrom `PCInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscInitialize()`, `PCBDDCFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCInitializePackage\"))\n\"\"\"\nfunction PCBDDCInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCBDDCInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCBDDCInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBDDCFinalizePackage(petsclib::PetscLibType) \nThis function frees everything from the `PCBDDC` package. It is\ncalled from `PetscFinalize()` automatically.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscFinalize()`, `PCBDDCInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBDDCFinalizePackage\"))\n\"\"\"\nfunction PCBDDCFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCBDDCFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCBDDCFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHPDDMSetAuxiliaryMat(petsclib::PetscLibType,pc::PC, is::IS, A::PetscMat, setup::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMSetAuxiliaryMat\"))\n\"\"\"\nfunction PCHPDDMSetAuxiliaryMat(petsclib::PetscLibType, pc::PC, is::IS, A::PetscMat, setup::external, ctx::Cvoid) end\n\n@for_petsc function PCHPDDMSetAuxiliaryMat(petsclib::$UnionPetscLib, pc::PC, is::IS, A::PetscMat, setup::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCHPDDMSetAuxiliaryMat, $petsc_library),\n               PetscErrorCode,\n               (PC, IS, CMat, external, Ptr{Cvoid}),\n               pc, is, A, setup, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHPDDMHasNeumannMat(petsclib::PetscLibType,pc::PC, has::PetscBool) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMHasNeumannMat\"))\n\"\"\"\nfunction PCHPDDMHasNeumannMat(petsclib::PetscLibType, pc::PC, has::PetscBool) end\n\n@for_petsc function PCHPDDMHasNeumannMat(petsclib::$UnionPetscLib, pc::PC, has::PetscBool )\n\n    @chk ccall(\n               (:PCHPDDMHasNeumannMat, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, has,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHPDDMSetRHSMat(petsclib::PetscLibType,pc::PC, B::PetscMat) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMSetRHSMat\"))\n\"\"\"\nfunction PCHPDDMSetRHSMat(petsclib::PetscLibType, pc::PC, B::PetscMat) end\n\n@for_petsc function PCHPDDMSetRHSMat(petsclib::$UnionPetscLib, pc::PC, B::PetscMat )\n\n    @chk ccall(\n               (:PCHPDDMSetRHSMat, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgc::PetscReal,oc::PetscReal = PCHPDDMGetComplexities(petsclib::PetscLibType,pc::PC) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMGetComplexities\"))\n\"\"\"\nfunction PCHPDDMGetComplexities(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCHPDDMGetComplexities(petsclib::$UnionPetscLib, pc::PC )\n\tgc_ = Ref{$PetscReal}()\n\toc_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PCHPDDMGetComplexities, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               pc, gc_, oc_,\n              )\n\n\tgc = gc_[]\n\toc = oc_[]\n\n\treturn gc,oc\nend \n\n\"\"\"\n\tPCHPDDMSetCoarseCorrectionType(petsclib::PetscLibType,pc::PC, type::PCHPDDMCoarseCorrectionType) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMSetCoarseCorrectionType\"))\n\"\"\"\nfunction PCHPDDMSetCoarseCorrectionType(petsclib::PetscLibType, pc::PC, type::PCHPDDMCoarseCorrectionType) end\n\n@for_petsc function PCHPDDMSetCoarseCorrectionType(petsclib::$UnionPetscLib, pc::PC, type::PCHPDDMCoarseCorrectionType )\n\n    @chk ccall(\n               (:PCHPDDMSetCoarseCorrectionType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCHPDDMCoarseCorrectionType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCHPDDMCoarseCorrectionType = PCHPDDMGetCoarseCorrectionType(petsclib::PetscLibType,pc::PC) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMGetCoarseCorrectionType\"))\n\"\"\"\nfunction PCHPDDMGetCoarseCorrectionType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCHPDDMGetCoarseCorrectionType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCHPDDMCoarseCorrectionType}()\n\n    @chk ccall(\n               (:PCHPDDMGetCoarseCorrectionType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCHPDDMCoarseCorrectionType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCHPDDMSetSTShareSubKSP(petsclib::PetscLibType,pc::PC, share::PetscBool) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMSetSTShareSubKSP\"))\n\"\"\"\nfunction PCHPDDMSetSTShareSubKSP(petsclib::PetscLibType, pc::PC, share::PetscBool) end\n\n@for_petsc function PCHPDDMSetSTShareSubKSP(petsclib::$UnionPetscLib, pc::PC, share::PetscBool )\n\n    @chk ccall(\n               (:PCHPDDMSetSTShareSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, share,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tshare::PetscBool = PCHPDDMGetSTShareSubKSP(petsclib::PetscLibType,pc::PC) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMGetSTShareSubKSP\"))\n\"\"\"\nfunction PCHPDDMGetSTShareSubKSP(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCHPDDMGetSTShareSubKSP(petsclib::$UnionPetscLib, pc::PC )\n\tshare_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCHPDDMGetSTShareSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, share_,\n              )\n\n\tshare = share_[]\n\n\treturn share\nend \n\n\"\"\"\n\tPCHPDDMSetDeflationMat(petsclib::PetscLibType,pc::PC, is::IS, U::PetscMat) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMSetDeflationMat\"))\n\"\"\"\nfunction PCHPDDMSetDeflationMat(petsclib::PetscLibType, pc::PC, is::IS, U::PetscMat) end\n\n@for_petsc function PCHPDDMSetDeflationMat(petsclib::$UnionPetscLib, pc::PC, is::IS, U::PetscMat )\n\n    @chk ccall(\n               (:PCHPDDMSetDeflationMat, $petsc_library),\n               PetscErrorCode,\n               (PC, IS, CMat),\n               pc, is, U,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHPDDMInitializePackage(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMInitializePackage\"))\n\"\"\"\nfunction PCHPDDMInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCHPDDMInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCHPDDMInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHPDDMFinalizePackage(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Ksp/PCHPDDMFinalizePackage\"))\n\"\"\"\nfunction PCHPDDMFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCHPDDMFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCHPDDMFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPatchSetSaveOperators(petsclib::PetscLibType,pc::PC, flg::PetscBool) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetSaveOperators\"))\n\"\"\"\nfunction PCPatchSetSaveOperators(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCPatchSetSaveOperators(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCPatchSetSaveOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCPatchGetSaveOperators(petsclib::PetscLibType,pc::PC) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchGetSaveOperators\"))\n\"\"\"\nfunction PCPatchGetSaveOperators(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCPatchGetSaveOperators(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCPatchGetSaveOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCPatchSetPrecomputeElementTensors(petsclib::PetscLibType,pc::PC, flg::PetscBool) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetPrecomputeElementTensors\"))\n\"\"\"\nfunction PCPatchSetPrecomputeElementTensors(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCPatchSetPrecomputeElementTensors(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCPatchSetPrecomputeElementTensors, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCPatchGetPrecomputeElementTensors(petsclib::PetscLibType,pc::PC) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchGetPrecomputeElementTensors\"))\n\"\"\"\nfunction PCPatchGetPrecomputeElementTensors(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCPatchGetPrecomputeElementTensors(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCPatchGetPrecomputeElementTensors, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCPatchSetPartitionOfUnity(petsclib::PetscLibType,pc::PC, flg::PetscBool) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetPartitionOfUnity\"))\n\"\"\"\nfunction PCPatchSetPartitionOfUnity(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCPatchSetPartitionOfUnity(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCPatchSetPartitionOfUnity, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCPatchGetPartitionOfUnity(petsclib::PetscLibType,pc::PC) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchGetPartitionOfUnity\"))\n\"\"\"\nfunction PCPatchGetPartitionOfUnity(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCPatchGetPartitionOfUnity(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCPatchGetPartitionOfUnity, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tnpatch::PetscInt = PCPatchGetSubKSP(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchGetSubKSP\"))\n\"\"\"\nfunction PCPatchGetSubKSP(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCPatchGetSubKSP(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\tnpatch_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCPatchGetSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, CKSP),\n               pc, npatch_, ksp,\n              )\n\n\tnpatch = npatch_[]\n\n\treturn npatch\nend \n\n\"\"\"\n\tPCPatchSetSubMatType(petsclib::PetscLibType,pc::PC, sub_mat_type::MatType) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetSubMatType\"))\n\"\"\"\nfunction PCPatchSetSubMatType(petsclib::PetscLibType, pc::PC, sub_mat_type::MatType) end\n\n@for_petsc function PCPatchSetSubMatType(petsclib::$UnionPetscLib, pc::PC, sub_mat_type::MatType )\n\n    @chk ccall(\n               (:PCPatchSetSubMatType, $petsc_library),\n               PetscErrorCode,\n               (PC, MatType),\n               pc, sub_mat_type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsub_mat_type::MatType = PCPatchGetSubMatType(petsclib::PetscLibType,pc::PC) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchGetSubMatType\"))\n\"\"\"\nfunction PCPatchGetSubMatType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCPatchGetSubMatType(petsclib::$UnionPetscLib, pc::PC )\n\tsub_mat_type_ = Ref{MatType}()\n\n    @chk ccall(\n               (:PCPatchGetSubMatType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{MatType}),\n               pc, sub_mat_type_,\n              )\n\n\tsub_mat_type = unsafe_string(sub_mat_type_[])\n\n\treturn sub_mat_type\nend \n\n\"\"\"\n\tPCPatchSetCellNumbering(petsclib::PetscLibType,pc::PC, cellNumbering::PetscSection) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetCellNumbering\"))\n\"\"\"\nfunction PCPatchSetCellNumbering(petsclib::PetscLibType, pc::PC, cellNumbering::PetscSection) end\n\n@for_petsc function PCPatchSetCellNumbering(petsclib::$UnionPetscLib, pc::PC, cellNumbering::PetscSection )\n\n    @chk ccall(\n               (:PCPatchSetCellNumbering, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscSection),\n               pc, cellNumbering,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPatchGetCellNumbering(petsclib::PetscLibType,pc::PC, cellNumbering::PetscSection) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchGetCellNumbering\"))\n\"\"\"\nfunction PCPatchGetCellNumbering(petsclib::PetscLibType, pc::PC, cellNumbering::PetscSection) end\n\n@for_petsc function PCPatchGetCellNumbering(petsclib::$UnionPetscLib, pc::PC, cellNumbering::PetscSection )\n\n    @chk ccall(\n               (:PCPatchGetCellNumbering, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscSection}),\n               pc, cellNumbering,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::Cvoid = PCPatchSetConstructType(petsclib::PetscLibType,pc::PC, ctype::PCPatchConstructType, func::external) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetConstructType\"))\n\"\"\"\nfunction PCPatchSetConstructType(petsclib::PetscLibType, pc::PC, ctype::PCPatchConstructType, func::external) end\n\n@for_petsc function PCPatchSetConstructType(petsclib::$UnionPetscLib, pc::PC, ctype::PCPatchConstructType, func::external )\n\tctx_ = Ref{Cvoid}()\n\n    @chk ccall(\n               (:PCPatchSetConstructType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCPatchConstructType, external, Ptr{Cvoid}),\n               pc, ctype, func, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tbs::PetscInt,nodesPerCell::PetscInt,subspaceOffsets::PetscInt,ghostBcNodes::PetscInt,globalBcNodes::PetscInt = PCPatchSetDiscretisationInfo(petsclib::PetscLibType,pc::PC, nsubspaces::PetscInt, dms::PetscDM, cellNodeMap::PetscInt, numGhostBcs::PetscInt, numGlobalBcs::PetscInt) \n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetDiscretisationInfo\"))\n\"\"\"\nfunction PCPatchSetDiscretisationInfo(petsclib::PetscLibType, pc::PC, nsubspaces::PetscInt, dms::PetscDM, cellNodeMap::PetscInt, numGhostBcs::PetscInt, numGlobalBcs::PetscInt) end\n\n@for_petsc function PCPatchSetDiscretisationInfo(petsclib::$UnionPetscLib, pc::PC, nsubspaces::$PetscInt, dms::PetscDM, cellNodeMap::$PetscInt, numGhostBcs::$PetscInt, numGlobalBcs::$PetscInt )\n\tdms_ = Ref(dms.ptr)\n\tbs_ = Ref{$PetscInt}()\n\tnodesPerCell_ = Ref{$PetscInt}()\n\tsubspaceOffsets_ = Ref{$PetscInt}()\n\tghostBcNodes_ = Ref{$PetscInt}()\n\tglobalBcNodes_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCPatchSetDiscretisationInfo, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{CDM}, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               pc, nsubspaces, dms_, bs_, nodesPerCell_, cellNodeMap, subspaceOffsets_, numGhostBcs, ghostBcNodes_, numGlobalBcs, globalBcNodes_,\n              )\n\n\tdms.ptr = C_NULL\n\tbs = bs_[]\n\tnodesPerCell = nodesPerCell_[]\n\tsubspaceOffsets = subspaceOffsets_[]\n\tghostBcNodes = ghostBcNodes_[]\n\tglobalBcNodes = globalBcNodes_[]\n\n\treturn bs,nodesPerCell,subspaceOffsets,ghostBcNodes,globalBcNodes\nend \n\n\"\"\"\n\tPCPatchSetComputeFunction(petsclib::PetscLibType,pc::PC, func::external, ctx::Cvoid) \nSet the callback function used to compute patch residuals\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - The `PC`\n- `func` - The callback function\n- `ctx`  - The user context\n\nCalling sequence of `func`:\n- `pc`               - The `PC`\n- `point`            - The point\n- `x`                - The input solution (not used in linear problems)\n- `f`                - The patch residual vector\n- `cellIS`           - An array of the cell numbers\n- `n`                - The size of `dofsArray`\n- `dofsArray`        - The dofmap for the dofs to be solved for\n- `dofsArrayWithAll` - The dofmap for all dofs on the patch\n- `ctx`              - The user context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCPatchSetComputeOperator()`, `PCPatchGetComputeOperator()`, `PCPatchSetDiscretisationInfo()`, `PCPatchSetComputeFunctionInteriorFacets()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetComputeFunction\"))\n\"\"\"\nfunction PCPatchSetComputeFunction(petsclib::PetscLibType, pc::PC, func::external, ctx::Cvoid) end\n\n@for_petsc function PCPatchSetComputeFunction(petsclib::$UnionPetscLib, pc::PC, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCPatchSetComputeFunction, $petsc_library),\n               PetscErrorCode,\n               (PC, external, Ptr{Cvoid}),\n               pc, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPatchSetComputeFunctionInteriorFacets(petsclib::PetscLibType,pc::PC, func::external, ctx::Cvoid) \nSet the callback function used to compute facet integrals for patch residuals\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - The `PC`\n- `func` - The callback function\n- `ctx`  - The user context\n\nCalling sequence of `func`:\n- `pc`               - The `PC`\n- `point`            - The point\n- `x`                - The input solution (not used in linear problems)\n- `f`                - The patch residual vector\n- `facetIS`          - An array of the facet numbers\n- `n`                - The size of `dofsArray`\n- `dofsArray`        - The dofmap for the dofs to be solved for\n- `dofsArrayWithAll` - The dofmap for all dofs on the patch\n- `ctx`              - The user context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCPatchSetComputeOperator()`, `PCPatchGetComputeOperator()`, `PCPatchSetDiscretisationInfo()`, `PCPatchSetComputeFunction()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetComputeFunctionInteriorFacets\"))\n\"\"\"\nfunction PCPatchSetComputeFunctionInteriorFacets(petsclib::PetscLibType, pc::PC, func::external, ctx::Cvoid) end\n\n@for_petsc function PCPatchSetComputeFunctionInteriorFacets(petsclib::$UnionPetscLib, pc::PC, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCPatchSetComputeFunctionInteriorFacets, $petsc_library),\n               PetscErrorCode,\n               (PC, external, Ptr{Cvoid}),\n               pc, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPatchSetComputeOperator(petsclib::PetscLibType,pc::PC, func::external, ctx::Cvoid) \nSet the callback function used to compute patch matrices\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - The `PC`\n- `func` - The callback function\n- `ctx`  - The user context\n\nCalling sequence of `func`:\n- `pc`               - The `PC`\n- `point`            - The point\n- `x`                - The input solution (not used in linear problems)\n- `mat`              - The patch matrix\n- `facetIS`          - An array of the cell numbers\n- `n`                - The size of `dofsArray`\n- `dofsArray`        - The dofmap for the dofs to be solved for\n- `dofsArrayWithAll` - The dofmap for all dofs on the patch\n- `ctx`              - The user context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCPatchGetComputeOperator()`, `PCPatchSetComputeFunction()`, `PCPatchSetDiscretisationInfo()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetComputeOperator\"))\n\"\"\"\nfunction PCPatchSetComputeOperator(petsclib::PetscLibType, pc::PC, func::external, ctx::Cvoid) end\n\n@for_petsc function PCPatchSetComputeOperator(petsclib::$UnionPetscLib, pc::PC, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCPatchSetComputeOperator, $petsc_library),\n               PetscErrorCode,\n               (PC, external, Ptr{Cvoid}),\n               pc, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCPatchSetComputeOperatorInteriorFacets(petsclib::PetscLibType,pc::PC, func::external, ctx::Cvoid) \nSet the callback function used to compute facet integrals for patch matrices\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - The `PC`\n- `func` - The callback function\n- `ctx`  - The user context\n\nCalling sequence of `func`:\n- `pc`               - The `PC`\n- `point`            - The point\n- `x`                - The input solution (not used in linear problems)\n- `mat`              - The patch matrix\n- `facetIS`          - An array of the facet numbers\n- `n`                - The size of `dofsArray`\n- `dofsArray`        - The dofmap for the dofs to be solved for\n- `dofsArrayWithAll` - The dofmap for all dofs on the patch\n- `ctx`              - The user context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCPatchGetComputeOperator()`, `PCPatchSetComputeFunction()`, `PCPatchSetDiscretisationInfo()`\n\n# External Links\n$(_doc_external(\"Ksp/PCPatchSetComputeOperatorInteriorFacets\"))\n\"\"\"\nfunction PCPatchSetComputeOperatorInteriorFacets(petsclib::PetscLibType, pc::PC, func::external, ctx::Cvoid) end\n\n@for_petsc function PCPatchSetComputeOperatorInteriorFacets(petsclib::$UnionPetscLib, pc::PC, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCPatchSetComputeOperatorInteriorFacets, $petsc_library),\n               PetscErrorCode,\n               (PC, external, Ptr{Cvoid}),\n               pc, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn_loc::PetscInt,first_loc::PetscInt = PCBJacobiGetSubKSP(petsclib::PetscLibType,pc::PC, ksp::Vector{PetscKSP}) \nGets the local `KSP` contexts for all blocks on\nthis processor.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n_local`     - the number of blocks on this processor, or NULL\n- `first_local` - the global number of the first block on this processor, or NULL\n- `ksp`         - the array of KSP contexts\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCBJACOBI`, `PCASM`, `PCASMGetSubKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBJacobiGetSubKSP\"))\n\"\"\"\nfunction PCBJacobiGetSubKSP(petsclib::PetscLibType, pc::PC, ksp::Vector{PetscKSP}) end\n\n@for_petsc function PCBJacobiGetSubKSP(petsclib::$UnionPetscLib, pc::PC, ksp::Vector{PetscKSP} )\n\tn_loc_ = Ref{$PetscInt}()\n\tfirst_loc_ = Ref{$PetscInt}()\n\tksp_ = Ref(pointer(ksp))\n\n    @chk ccall(\n               (:PCBJacobiGetSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{CKSP}}),\n               pc, n_loc_, first_loc_, ksp_,\n              )\n\n\tn_loc = n_loc_[]\n\tfirst_loc = first_loc_[]\n\n\treturn n_loc,first_loc\nend \n\n\"\"\"\n\tPCBJacobiSetTotalBlocks(petsclib::PetscLibType,pc::PC, blocks::PetscInt, lens::Vector{PetscInt}) \nSets the global number of blocks for the block\nJacobi preconditioner.\n\nCollective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `blocks` - the number of blocks\n- `lens`   - [optional] integer array containing the size of each block\n\nOptions Database Key:\n- `-pc_bjacobi_blocks <blocks>` - Sets the number of global blocks\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBJACOBI`, `PCSetUseAmat()`, `PCBJacobiSetLocalBlocks()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBJacobiSetTotalBlocks\"))\n\"\"\"\nfunction PCBJacobiSetTotalBlocks(petsclib::PetscLibType, pc::PC, blocks::PetscInt, lens::Vector{PetscInt}) end\n\n@for_petsc function PCBJacobiSetTotalBlocks(petsclib::$UnionPetscLib, pc::PC, blocks::$PetscInt, lens::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PCBJacobiSetTotalBlocks, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{$PetscInt}),\n               pc, blocks, lens,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tblocks::PetscInt,lens::Vector{PetscInt} = PCBJacobiGetTotalBlocks(petsclib::PetscLibType,pc::PC) \nGets the global number of blocks for the block\nJacobi, `PCBJACOBI`, preconditioner.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `blocks` - the number of blocks\n- `lens`   - integer array containing the size of each block\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBJACOBI`, `PCSetUseAmat()`, `PCBJacobiGetLocalBlocks()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBJacobiGetTotalBlocks\"))\n\"\"\"\nfunction PCBJacobiGetTotalBlocks(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCBJacobiGetTotalBlocks(petsclib::$UnionPetscLib, pc::PC )\n\tblocks_ = Ref{$PetscInt}()\n\tlens_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PCBJacobiGetTotalBlocks, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               pc, blocks_, lens_,\n              )\n\n\tblocks = blocks_[]\n\tlens = unsafe_wrap(Array, lens_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn blocks,lens\nend \n\n\"\"\"\n\tPCBJacobiSetLocalBlocks(petsclib::PetscLibType,pc::PC, blocks::PetscInt, lens::Vector{PetscInt}) \nSets the local number of blocks for the block\nJacobi, `PCBJACOBI`,  preconditioner.\n\nNot Collective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `blocks` - the number of blocks\n- `lens`   - [optional] integer array containing size of each block\n\nOptions Database Key:\n- `-pc_bjacobi_local_blocks <blocks>` - Sets the number of local blocks\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBJACOBI`, `PCSetUseAmat()`, `PCBJacobiSetTotalBlocks()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBJacobiSetLocalBlocks\"))\n\"\"\"\nfunction PCBJacobiSetLocalBlocks(petsclib::PetscLibType, pc::PC, blocks::PetscInt, lens::Vector{PetscInt}) end\n\n@for_petsc function PCBJacobiSetLocalBlocks(petsclib::$UnionPetscLib, pc::PC, blocks::$PetscInt, lens::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PCBJacobiSetLocalBlocks, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{$PetscInt}),\n               pc, blocks, lens,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBJacobiGetLocalBlocks(petsclib::PetscLibType,pc::PC, blocks::PetscInt, lens::Vector{PetscInt}) \nGets the local number of blocks for the block\nJacobi, `PCBJACOBI`, preconditioner.\n\nNot Collective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `blocks` - the number of blocks\n- `lens`   - [optional] integer array containing size of each block\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCBJACOBI`, `PCSetUseAmat()`, `PCBJacobiGetTotalBlocks()`\n\n# External Links\n$(_doc_external(\"Ksp/PCBJacobiGetLocalBlocks\"))\n\"\"\"\nfunction PCBJacobiGetLocalBlocks(petsclib::PetscLibType, pc::PC, blocks::PetscInt, lens::Vector{PetscInt}) end\n\n@for_petsc function PCBJacobiGetLocalBlocks(petsclib::$UnionPetscLib, pc::PC, blocks::$PetscInt, lens::Vector{$PetscInt} )\n\tlens_ = Ref(pointer(lens))\n\n    @chk ccall(\n               (:PCBJacobiGetLocalBlocks, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               pc, blocks, lens_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBJKOKKOSSetKSP(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \n\n# External Links\n$(_doc_external(\"Ksp/PCBJKOKKOSSetKSP\"))\n\"\"\"\nfunction PCBJKOKKOSSetKSP(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCBJKOKKOSSetKSP(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\n    @chk ccall(\n               (:PCBJKOKKOSSetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, CKSP),\n               pc, ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCBJKOKKOSGetKSP(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \n\n# External Links\n$(_doc_external(\"Ksp/PCBJKOKKOSGetKSP\"))\n\"\"\"\nfunction PCBJKOKKOSGetKSP(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCBJKOKKOSGetKSP(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCBJKOKKOSGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetEpsilon(petsclib::PetscLibType,pc::PC, epsilon1::PetscReal) \n\n\nInput Parameters:\n- `pc`       - the preconditioner\n- `epsilon1` - the tolerance (default .4)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetEpsilon\"))\n\"\"\"\nfunction PCSPAISetEpsilon(petsclib::PetscLibType, pc::PC, epsilon1::PetscReal) end\n\n@for_petsc function PCSPAISetEpsilon(petsclib::$UnionPetscLib, pc::PC, epsilon1::$PetscReal )\n\n    @chk ccall(\n               (:PCSPAISetEpsilon, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, epsilon1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetNBSteps(petsclib::PetscLibType,pc::PC, nbsteps1::PetscInt) \nset maximum number of improvement steps per row in\nthe `PCSPAI` preconditioner\n\nInput Parameters:\n- `pc`       - the preconditioner\n- `nbsteps1` - number of steps (default 5)\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`, `PCSPAISetMaxNew()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetNBSteps\"))\n\"\"\"\nfunction PCSPAISetNBSteps(petsclib::PetscLibType, pc::PC, nbsteps1::PetscInt) end\n\n@for_petsc function PCSPAISetNBSteps(petsclib::$UnionPetscLib, pc::PC, nbsteps1::$PetscInt )\n\n    @chk ccall(\n               (:PCSPAISetNBSteps, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, nbsteps1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetMax(petsclib::PetscLibType,pc::PC, max1::PetscInt) \nset the size of various working buffers in the `PCSPAI` preconditioner\n\nInput Parameters:\n- `pc`   - the preconditioner\n- `max1` - size (default is 5000)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetMax\"))\n\"\"\"\nfunction PCSPAISetMax(petsclib::PetscLibType, pc::PC, max1::PetscInt) end\n\n@for_petsc function PCSPAISetMax(petsclib::$UnionPetscLib, pc::PC, max1::$PetscInt )\n\n    @chk ccall(\n               (:PCSPAISetMax, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, max1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetMaxNew(petsclib::PetscLibType,pc::PC, maxnew1::PetscInt) \nset maximum number of new nonzero candidates per step in the `PCSPAI` preconditioner\n\nInput Parameters:\n- `pc`      - the preconditioner\n- `maxnew1` - maximum number (default 5)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`, `PCSPAISetNBSteps()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetMaxNew\"))\n\"\"\"\nfunction PCSPAISetMaxNew(petsclib::PetscLibType, pc::PC, maxnew1::PetscInt) end\n\n@for_petsc function PCSPAISetMaxNew(petsclib::$UnionPetscLib, pc::PC, maxnew1::$PetscInt )\n\n    @chk ccall(\n               (:PCSPAISetMaxNew, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, maxnew1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetBlockSize(petsclib::PetscLibType,pc::PC, block_size1::PetscInt) \nset the block size for the `PCSPAI` preconditioner\n\nInput Parameters:\n- `pc`          - the preconditioner\n- `block_size1` - block size (default 1)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetBlockSize\"))\n\"\"\"\nfunction PCSPAISetBlockSize(petsclib::PetscLibType, pc::PC, block_size1::PetscInt) end\n\n@for_petsc function PCSPAISetBlockSize(petsclib::$UnionPetscLib, pc::PC, block_size1::$PetscInt )\n\n    @chk ccall(\n               (:PCSPAISetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, block_size1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetCacheSize(petsclib::PetscLibType,pc::PC, cache_size::PetscInt) \nspecify cache size in the `PCSPAI` preconditioner\n\nInput Parameters:\n- `pc`         - the preconditioner\n- `cache_size` - cache size {0,1,2,3,4,5} (default 5)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetCacheSize\"))\n\"\"\"\nfunction PCSPAISetCacheSize(petsclib::PetscLibType, pc::PC, cache_size::PetscInt) end\n\n@for_petsc function PCSPAISetCacheSize(petsclib::$UnionPetscLib, pc::PC, cache_size::$PetscInt )\n\n    @chk ccall(\n               (:PCSPAISetCacheSize, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, cache_size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetVerbose(petsclib::PetscLibType,pc::PC, verbose::PetscInt) \nverbosity level for the `PCSPAI` preconditioner\n\nInput Parameters:\n- `pc`      - the preconditioner\n- `verbose` - level (default 1)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetVerbose\"))\n\"\"\"\nfunction PCSPAISetVerbose(petsclib::PetscLibType, pc::PC, verbose::PetscInt) end\n\n@for_petsc function PCSPAISetVerbose(petsclib::$UnionPetscLib, pc::PC, verbose::$PetscInt )\n\n    @chk ccall(\n               (:PCSPAISetVerbose, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, verbose,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSPAISetSp(petsclib::PetscLibType,pc::PC, sp::PetscInt) \nspecify a symmetric matrix sparsity pattern in the `PCSPAI` preconditioner\n\nInput Parameters:\n- `pc` - the preconditioner\n- `sp` - 0 or 1\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSPAI`, `PCSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSPAISetSp\"))\n\"\"\"\nfunction PCSPAISetSp(petsclib::PetscLibType, pc::PC, sp::PetscInt) end\n\n@for_petsc function PCSPAISetSp(petsclib::$UnionPetscLib, pc::PC, sp::$PetscInt )\n\n    @chk ccall(\n               (:PCSPAISetSp, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCRedundantSetNumber(petsclib::PetscLibType,pc::PC, nredundant::PetscInt) \nSets the number of redundant preconditioner contexts.\n\nLogically Collective\n\nInput Parameters:\n- `pc`         - the preconditioner context\n- `nredundant` - number of redundant preconditioner contexts; for example if you are using 64 MPI processes and\nuse an nredundant of 4 there will be 4 parallel solves each on 16 = 64/4 processes.\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCREDUNDANT`\n\n# External Links\n$(_doc_external(\"Ksp/PCRedundantSetNumber\"))\n\"\"\"\nfunction PCRedundantSetNumber(petsclib::PetscLibType, pc::PC, nredundant::PetscInt) end\n\n@for_petsc function PCRedundantSetNumber(petsclib::$UnionPetscLib, pc::PC, nredundant::$PetscInt )\n\n    @chk ccall(\n               (:PCRedundantSetNumber, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, nredundant,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCRedundantSetScatter(petsclib::PetscLibType,pc::PC, in::VecScatter, out::VecScatter) \nSets the scatter used to copy values into the\nredundant local solve and the scatter to move them back into the global\nvector.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `in`  - the scatter to move the values in\n- `out` - the scatter to move them out\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCREDUNDANT`\n\n# External Links\n$(_doc_external(\"Ksp/PCRedundantSetScatter\"))\n\"\"\"\nfunction PCRedundantSetScatter(petsclib::PetscLibType, pc::PC, in::VecScatter, out::VecScatter) end\n\n@for_petsc function PCRedundantSetScatter(petsclib::$UnionPetscLib, pc::PC, in::VecScatter, out::VecScatter )\n\n    @chk ccall(\n               (:PCRedundantSetScatter, $petsc_library),\n               PetscErrorCode,\n               (PC, VecScatter, VecScatter),\n               pc, in, out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCRedundantGetKSP(petsclib::PetscLibType,pc::PC, innerksp::PetscKSP) \nGets the less parallel `KSP` created by the redundant `PC`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `innerksp` - the `KSP` on the smaller set of processes\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCREDUNDANT`\n\n# External Links\n$(_doc_external(\"Ksp/PCRedundantGetKSP\"))\n\"\"\"\nfunction PCRedundantGetKSP(petsclib::PetscLibType, pc::PC, innerksp::PetscKSP) end\n\n@for_petsc function PCRedundantGetKSP(petsclib::$UnionPetscLib, pc::PC, innerksp::PetscKSP )\n\tinnerksp_ = Ref(innerksp.ptr)\n\n    @chk ccall(\n               (:PCRedundantGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, innerksp_,\n              )\n\n\tinnerksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCRedundantGetOperators(petsclib::PetscLibType,pc::PC, mat::PetscMat, pmat::PetscMat) \ngets the sequential linear system matrix and matrix used to construct the preconditioner\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `mat`  - the matrix\n- `pmat` - the (possibly different) matrix used to construct the preconditioner\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCREDUNDANT`\n\n# External Links\n$(_doc_external(\"Ksp/PCRedundantGetOperators\"))\n\"\"\"\nfunction PCRedundantGetOperators(petsclib::PetscLibType, pc::PC, mat::PetscMat, pmat::PetscMat) end\n\n@for_petsc function PCRedundantGetOperators(petsclib::$UnionPetscLib, pc::PC, mat::PetscMat, pmat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\tpmat_ = Ref(pmat.ptr)\n\n    @chk ccall(\n               (:PCRedundantGetOperators, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CMat}, Ptr{CMat}),\n               pc, mat_, pmat_,\n              )\n\n\tmat.ptr = C_NULL\n\tpmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCLMVMSetUpdateVec(petsclib::PetscLibType,pc::PC, X::PetscVec) \nSet the vector to be used as solution update for the internal LMVM matrix.\n\nInput Parameters:\n- `pc` - The preconditioner\n- `X`  - Solution vector\n\nLevel: intermediate\n\n-seealso: `MatLMVMUpdate()`, `PCLMVMSetMatLMVM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCLMVMSetUpdateVec\"))\n\"\"\"\nfunction PCLMVMSetUpdateVec(petsclib::PetscLibType, pc::PC, X::PetscVec) end\n\n@for_petsc function PCLMVMSetUpdateVec(petsclib::$UnionPetscLib, pc::PC, X::PetscVec )\n\n    @chk ccall(\n               (:PCLMVMSetUpdateVec, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec),\n               pc, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCLMVMSetMatLMVM(petsclib::PetscLibType,pc::PC, B::PetscMat) \nReplaces the `MATLMVM` matrix inside the preconditioner with the one provided by the user.\n\nInput Parameters:\n- `pc` - An `PCLMVM` preconditioner\n- `B`  - An `MATLMVM` type matrix\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLMVMGetMatLMVM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCLMVMSetMatLMVM\"))\n\"\"\"\nfunction PCLMVMSetMatLMVM(petsclib::PetscLibType, pc::PC, B::PetscMat) end\n\n@for_petsc function PCLMVMSetMatLMVM(petsclib::$UnionPetscLib, pc::PC, B::PetscMat )\n\n    @chk ccall(\n               (:PCLMVMSetMatLMVM, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCLMVMGetMatLMVM(petsclib::PetscLibType,pc::PC, B::PetscMat) \nReturns a pointer to the underlying `MATLMVM` matrix.\n\nInput Parameter:\n- `pc` - An `PCLMVM` preconditioner\n\nOutput Parameter:\n- `B` - `MATLMVM` matrix used by the preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLMVMSetMatLMVM()`\n\n# External Links\n$(_doc_external(\"Ksp/PCLMVMGetMatLMVM\"))\n\"\"\"\nfunction PCLMVMGetMatLMVM(petsclib::PetscLibType, pc::PC, B::PetscMat) end\n\n@for_petsc function PCLMVMGetMatLMVM(petsclib::$UnionPetscLib, pc::PC, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:PCLMVMGetMatLMVM, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CMat}),\n               pc, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCLMVMSetIS(petsclib::PetscLibType,pc::PC, inactive::IS) \nSets the index sets that reduce the `PC` application.\n\nInput Parameters:\n- `pc`       - An `PCLMVM` preconditioner\n- `inactive` - Index set defining the variables removed from the problem\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLMVMClearIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCLMVMSetIS\"))\n\"\"\"\nfunction PCLMVMSetIS(petsclib::PetscLibType, pc::PC, inactive::IS) end\n\n@for_petsc function PCLMVMSetIS(petsclib::$UnionPetscLib, pc::PC, inactive::IS )\n\n    @chk ccall(\n               (:PCLMVMSetIS, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, inactive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCLMVMClearIS(petsclib::PetscLibType,pc::PC) \nRemoves the inactive variable index set from a `PCLMVM`\n\nInput Parameter:\n- `pc` - An `PCLMVM` preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCLMVMSetIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCLMVMClearIS\"))\n\"\"\"\nfunction PCLMVMClearIS(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCLMVMClearIS(petsclib::$UnionPetscLib, pc::PC )\n\n    @chk ccall(\n               (:PCLMVMClearIS, $petsc_library),\n               PetscErrorCode,\n               (PC,),\n               pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCRedistributeGetKSP(petsclib::PetscLibType,pc::PC, innerksp::PetscKSP) \nGets the `KSP` created by the `PCREDISTRIBUTE`\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `innerksp` - the inner `KSP`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `PCREDISTRIBUTE`\n\n# External Links\n$(_doc_external(\"Ksp/PCRedistributeGetKSP\"))\n\"\"\"\nfunction PCRedistributeGetKSP(petsclib::PetscLibType, pc::PC, innerksp::PetscKSP) end\n\n@for_petsc function PCRedistributeGetKSP(petsclib::$UnionPetscLib, pc::PC, innerksp::PetscKSP )\n\tinnerksp_ = Ref(innerksp.ptr)\n\n    @chk ccall(\n               (:PCRedistributeGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, innerksp_,\n              )\n\n\tinnerksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitRestrictIS(petsclib::PetscLibType,pc::PC, isy::IS) \nRestricts the fieldsplit `IS`s to be within a given `IS`.\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `isy` - the index set that defines the indices to which the fieldsplit is to be restricted\n\nLevel: advanced\n\n-seealso: [](sec_block_matrices), `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSetIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitRestrictIS\"))\n\"\"\"\nfunction PCFieldSplitRestrictIS(petsclib::PetscLibType, pc::PC, isy::IS) end\n\n@for_petsc function PCFieldSplitRestrictIS(petsclib::$UnionPetscLib, pc::PC, isy::IS )\n\n    @chk ccall(\n               (:PCFieldSplitRestrictIS, $petsc_library),\n               PetscErrorCode,\n               (PC, IS),\n               pc, isy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetFields(petsclib::PetscLibType,pc::PC, splitname::String, n::PetscInt, fields::Vector{PetscInt}, fields_col::Vector{PetscInt}) \nSets the fields that define one particular split in `PCFIELDSPLIT`\n\nLogically Collective\n\nInput Parameters:\n- `pc`         - the preconditioner context\n- `splitname`  - name of this split, if `NULL` the number of the split is used\n- `n`          - the number of fields in this split\n- `fields`     - the fields in this split\n- `fields_col` - generally the same as `fields`, if it does not match `fields` then the submatrix that is solved for this set of fields comes from an off-diagonal block\nof the matrix and `fields_col` provides the column indices for that block\n\nOptions Database Key:\n- `-pc_fieldsplit_%d_fields <a,b,..>` - indicates the fields to be used in the `%d`'th split\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSetBlockSize()`, `PCFieldSplitSetIS()`, `PCFieldSplitRestrictIS()`,\n`MatSetBlockSize()`, `MatCreateNest()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetFields\"))\n\"\"\"\nfunction PCFieldSplitSetFields(petsclib::PetscLibType, pc::PC, splitname::String, n::PetscInt, fields::Vector{PetscInt}, fields_col::Vector{PetscInt}) end\n\n@for_petsc function PCFieldSplitSetFields(petsclib::$UnionPetscLib, pc::PC, splitname::String, n::$PetscInt, fields::Vector{$PetscInt}, fields_col::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PCFieldSplitSetFields, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               pc, splitname, n, fields, fields_col,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetDiagUseAmat(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nset flag indicating whether to extract diagonal blocks from Amat (rather than Pmat) to build\nthe sub-matrices associated with each split. Where `KSPSetOperators`(ksp,Amat,Pmat) was used to supply the operators.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner object\n- `flg` - boolean flag indicating whether or not to use Amat to extract the diagonal blocks from\n\nOptions Database Key:\n- `-pc_fieldsplit_diag_use_amat` - use the Amat to provide the diagonal blocks\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCSetOperators()`, `KSPSetOperators()`, `PCFieldSplitGetDiagUseAmat()`, `PCFieldSplitSetOffDiagUseAmat()`, `PCFIELDSPLIT`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetDiagUseAmat\"))\n\"\"\"\nfunction PCFieldSplitSetDiagUseAmat(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCFieldSplitSetDiagUseAmat(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCFieldSplitSetDiagUseAmat, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCFieldSplitGetDiagUseAmat(petsclib::PetscLibType,pc::PC) \nget the flag indicating whether to extract diagonal blocks from Amat (rather than Pmat) to build\nthe sub-matrices associated with each split.  Where `KSPSetOperators`(ksp,Amat,Pmat) was used to supply the operators.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner object\n\nOutput Parameter:\n- `flg` - boolean flag indicating whether or not to use Amat to extract the diagonal blocks from\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCSetOperators()`, `KSPSetOperators()`, `PCFieldSplitSetDiagUseAmat()`, `PCFieldSplitGetOffDiagUseAmat()`, `PCFIELDSPLIT`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetDiagUseAmat\"))\n\"\"\"\nfunction PCFieldSplitGetDiagUseAmat(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFieldSplitGetDiagUseAmat(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCFieldSplitGetDiagUseAmat, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCFieldSplitSetOffDiagUseAmat(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nset flag indicating whether to extract off\nthe sub-matrices associated with each split.  Where `KSPSetOperators`(ksp,Amat,Pmat) was used to supply the operators.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner object\n- `flg` - boolean flag indicating whether or not to use Amat to extract the off-diagonal blocks from\n\nOptions Database Key:\n- `-pc_fieldsplit_off_diag_use_amat <bool>` - use the Amat to extract the off-diagonal blocks\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCSetOperators()`, `KSPSetOperators()`, `PCFieldSplitGetOffDiagUseAmat()`, `PCFieldSplitSetDiagUseAmat()`, `PCFIELDSPLIT`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetOffDiagUseAmat\"))\n\"\"\"\nfunction PCFieldSplitSetOffDiagUseAmat(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCFieldSplitSetOffDiagUseAmat(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCFieldSplitSetOffDiagUseAmat, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCFieldSplitGetOffDiagUseAmat(petsclib::PetscLibType,pc::PC) \nget the flag indicating whether to extract off\nthe sub-matrices associated with each split.  Where `KSPSetOperators`(ksp,Amat,Pmat) was used to supply the operators.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner object\n\nOutput Parameter:\n- `flg` - boolean flag indicating whether or not to use Amat to extract the off-diagonal blocks from\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCSetOperators()`, `KSPSetOperators()`, `PCFieldSplitSetOffDiagUseAmat()`, `PCFieldSplitGetDiagUseAmat()`, `PCFIELDSPLIT`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetOffDiagUseAmat\"))\n\"\"\"\nfunction PCFieldSplitGetOffDiagUseAmat(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFieldSplitGetOffDiagUseAmat(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCFieldSplitGetOffDiagUseAmat, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCFieldSplitSetIS(petsclib::PetscLibType,pc::PC, splitname::String, is::IS) \nSets the exact elements for a split in a `PCFIELDSPLIT`\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the preconditioner context\n- `splitname` - name of this split, if `NULL` the number of the split is used\n- `is`        - the index set that defines the elements in this split\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSetBlockSize()`, `PCFieldSplitSetFields()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetIS\"))\n\"\"\"\nfunction PCFieldSplitSetIS(petsclib::PetscLibType, pc::PC, splitname::String, is::IS) end\n\n@for_petsc function PCFieldSplitSetIS(petsclib::$UnionPetscLib, pc::PC, splitname::String, is::IS )\n\n    @chk ccall(\n               (:PCFieldSplitSetIS, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}, IS),\n               pc, splitname, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitGetIS(petsclib::PetscLibType,pc::PC, splitname::String, is::IS) \nRetrieves the elements for a split as an `IS`\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the preconditioner context\n- `splitname` - name of this split\n\nOutput Parameter:\n- `is` - the index set that defines the elements in this split, or `NULL` if the split is not found\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSetIS()`, `PCFieldSplitGetISByIndex()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetIS\"))\n\"\"\"\nfunction PCFieldSplitGetIS(petsclib::PetscLibType, pc::PC, splitname::String, is::IS) end\n\n@for_petsc function PCFieldSplitGetIS(petsclib::$UnionPetscLib, pc::PC, splitname::String, is::IS )\n\n    @chk ccall(\n               (:PCFieldSplitGetIS, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}, Ptr{IS}),\n               pc, splitname, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitGetISByIndex(petsclib::PetscLibType,pc::PC, index::PetscInt, is::IS) \nRetrieves the elements for a given split as an `IS`\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `index` - index of this split\n\nOutput Parameter:\n- `is` - the index set that defines the elements in this split\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitGetIS()`, `PCFieldSplitSetIS()`,\n\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetISByIndex\"))\n\"\"\"\nfunction PCFieldSplitGetISByIndex(petsclib::PetscLibType, pc::PC, index::PetscInt, is::IS) end\n\n@for_petsc function PCFieldSplitGetISByIndex(petsclib::$UnionPetscLib, pc::PC, index::$PetscInt, is::IS )\n\n    @chk ccall(\n               (:PCFieldSplitGetISByIndex, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{IS}),\n               pc, index, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetBlockSize(petsclib::PetscLibType,pc::PC, bs::PetscInt) \nSets the block size for defining where fields start in the\nfieldsplit preconditioner when calling `PCFieldSplitSetFields()`. If not set the matrix block size is used.\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `bs` - the block size\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSetIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetBlockSize\"))\n\"\"\"\nfunction PCFieldSplitSetBlockSize(petsclib::PetscLibType, pc::PC, bs::PetscInt) end\n\n@for_petsc function PCFieldSplitSetBlockSize(petsclib::$UnionPetscLib, pc::PC, bs::$PetscInt )\n\n    @chk ccall(\n               (:PCFieldSplitSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = PCFieldSplitGetSubKSP(petsclib::PetscLibType,pc::PC, subksp::Vector{PetscKSP}) \nGets the `KSP` contexts for all splits\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n`      - the number of splits\n- `subksp` - the array of `KSP` contexts\n\nLevel: advanced\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSetIS()`, `PCFieldSplitSchurGetSubKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetSubKSP\"))\n\"\"\"\nfunction PCFieldSplitGetSubKSP(petsclib::PetscLibType, pc::PC, subksp::Vector{PetscKSP}) end\n\n@for_petsc function PCFieldSplitGetSubKSP(petsclib::$UnionPetscLib, pc::PC, subksp::Vector{PetscKSP} )\n\tn_ = Ref{$PetscInt}()\n\tsubksp_ = Ref(pointer(subksp))\n\n    @chk ccall(\n               (:PCFieldSplitGetSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{CKSP}}),\n               pc, n_, subksp_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tn::PetscInt = PCFieldSplitSchurGetSubKSP(petsclib::PetscLibType,pc::PC, subksp::Vector{PetscKSP}) \nGets the `KSP` contexts used inside the Schur complement based `PCFIELDSPLIT`\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n`      - the number of splits\n- `subksp` - the array of `KSP` contexts\n\nLevel: advanced\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSetIS()`, `PCFieldSplitGetSubKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSchurGetSubKSP\"))\n\"\"\"\nfunction PCFieldSplitSchurGetSubKSP(petsclib::PetscLibType, pc::PC, subksp::Vector{PetscKSP}) end\n\n@for_petsc function PCFieldSplitSchurGetSubKSP(petsclib::$UnionPetscLib, pc::PC, subksp::Vector{PetscKSP} )\n\tn_ = Ref{$PetscInt}()\n\tsubksp_ = Ref(pointer(subksp))\n\n    @chk ccall(\n               (:PCFieldSplitSchurGetSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{CKSP}}),\n               pc, n_, subksp_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tPCFieldSplitSetSchurPre(petsclib::PetscLibType,pc::PC, ptype::PCFieldSplitSchurPreType, pre::PetscMat) \nIndicates from what operator the preconditioner is constructed for the Schur complement.\nThe default is the A11 matrix.\n\nCollective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `ptype` - which matrix to use for preconditioning the Schur complement: `PC_FIELDSPLIT_SCHUR_PRE_A11` (default),\n`PC_FIELDSPLIT_SCHUR_PRE_SELF`, `PC_FIELDSPLIT_SCHUR_PRE_USER`,\n`PC_FIELDSPLIT_SCHUR_PRE_SELFP`, and `PC_FIELDSPLIT_SCHUR_PRE_FULL`\n- `pre`   - matrix to use for preconditioning, or `NULL`\n\nOptions Database Keys:\n- `-pc_fieldsplit_schur_precondition <self,selfp,user,a11,full>` - default is `a11`. See notes for meaning of various arguments\n- `-fieldsplit_1_pc_type <pctype>`                               - the preconditioner algorithm that is used to construct the preconditioner from the operator\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSchurPre()`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSchurPreType`,\n`MatSchurComplementSetAinvType()`, `PCLSC`, `PCFieldSplitSetSchurFactType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetSchurPre\"))\n\"\"\"\nfunction PCFieldSplitSetSchurPre(petsclib::PetscLibType, pc::PC, ptype::PCFieldSplitSchurPreType, pre::PetscMat) end\n\n@for_petsc function PCFieldSplitSetSchurPre(petsclib::$UnionPetscLib, pc::PC, ptype::PCFieldSplitSchurPreType, pre::PetscMat )\n\n    @chk ccall(\n               (:PCFieldSplitSetSchurPre, $petsc_library),\n               PetscErrorCode,\n               (PC, PCFieldSplitSchurPreType, CMat),\n               pc, ptype, pre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitGetSchurPre(petsclib::PetscLibType,pc::PC, ptype::PCFieldSplitSchurPreType, pre::PetscMat) \nFor Schur complement fieldsplit, determine how the Schur complement will be\npreconditioned.  See `PCFieldSplitSetSchurPre()` for details.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `ptype` - which matrix to use for preconditioning the Schur complement: `PC_FIELDSPLIT_SCHUR_PRE_A11`, `PC_FIELDSPLIT_SCHUR_PRE_SELF`, `PC_FIELDSPLIT_SCHUR_PRE_USER`\n- `pre`   - matrix to use for preconditioning (with `PC_FIELDSPLIT_SCHUR_PRE_USER`), or `NULL`\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitSetSchurPre()`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSchurPreType`, `PCLSC`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetSchurPre\"))\n\"\"\"\nfunction PCFieldSplitGetSchurPre(petsclib::PetscLibType, pc::PC, ptype::PCFieldSplitSchurPreType, pre::PetscMat) end\n\n@for_petsc function PCFieldSplitGetSchurPre(petsclib::$UnionPetscLib, pc::PC, ptype::PCFieldSplitSchurPreType, pre::PetscMat )\n\tpre_ = Ref(pre.ptr)\n\n    @chk ccall(\n               (:PCFieldSplitGetSchurPre, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCFieldSplitSchurPreType}, Ptr{CMat}),\n               pc, ptype, pre_,\n              )\n\n\tpre.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSchurGetS(petsclib::PetscLibType,pc::PC, S::PetscMat) \nextract the `MATSCHURCOMPLEMENT` object used by this `PCFIELDSPLIT` in case it needs to be configured separately\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `S` - the Schur complement matrix\n\nLevel: advanced\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSchurPreType`, `PCFieldSplitSetSchurPre()`, `MATSCHURCOMPLEMENT`, `PCFieldSplitSchurRestoreS()`,\n`MatCreateSchurComplement()`, `MatSchurComplementGetKSP()`, `MatSchurComplementComputeExplicitOperator()`, `MatGetSchurComplement()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSchurGetS\"))\n\"\"\"\nfunction PCFieldSplitSchurGetS(petsclib::PetscLibType, pc::PC, S::PetscMat) end\n\n@for_petsc function PCFieldSplitSchurGetS(petsclib::$UnionPetscLib, pc::PC, S::PetscMat )\n\tS_ = Ref(S.ptr)\n\n    @chk ccall(\n               (:PCFieldSplitSchurGetS, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CMat}),\n               pc, S_,\n              )\n\n\tS.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSchurRestoreS(petsclib::PetscLibType,pc::PC, S::PetscMat) \nreturns the `MATSCHURCOMPLEMENT` matrix used by this `PC`\n\nNot Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `S`  - the Schur complement matrix\n\nLevel: advanced\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSchurPreType`, `PCFieldSplitSetSchurPre()`, `MatSchurComplement`, `PCFieldSplitSchurGetS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSchurRestoreS\"))\n\"\"\"\nfunction PCFieldSplitSchurRestoreS(petsclib::PetscLibType, pc::PC, S::PetscMat) end\n\n@for_petsc function PCFieldSplitSchurRestoreS(petsclib::$UnionPetscLib, pc::PC, S::PetscMat )\n\tS_ = Ref(S.ptr)\n\n    @chk ccall(\n               (:PCFieldSplitSchurRestoreS, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CMat}),\n               pc, S_,\n              )\n\n\tS.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetSchurFactType(petsclib::PetscLibType,pc::PC, ftype::PCFieldSplitSchurFactType) \nsets which blocks of the approximate block factorization to retain in the preconditioner {cite}`murphy2000note` and {cite}`ipsen2001note`\n\nCollective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `ftype` - which blocks of factorization to retain, `PC_FIELDSPLIT_SCHUR_FACT_FULL` is default\n\nOptions Database Key:\n- `-pc_fieldsplit_schur_fact_type <diag,lower,upper,full>` - default is `full`\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFieldSplitGetSubKSP()`, `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSchurPreType`, `PCFieldSplitSetSchurScale()`,\n[](sec_flexibleksp), `PCFieldSplitSetSchurPre()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetSchurFactType\"))\n\"\"\"\nfunction PCFieldSplitSetSchurFactType(petsclib::PetscLibType, pc::PC, ftype::PCFieldSplitSchurFactType) end\n\n@for_petsc function PCFieldSplitSetSchurFactType(petsclib::$UnionPetscLib, pc::PC, ftype::PCFieldSplitSchurFactType )\n\n    @chk ccall(\n               (:PCFieldSplitSetSchurFactType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCFieldSplitSchurFactType),\n               pc, ftype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetSchurScale(petsclib::PetscLibType,pc::PC, scale::PetscScalar) \nControls the sign flip of S for `PC_FIELDSPLIT_SCHUR_FACT_DIAG`.\n\nCollective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `scale` - scaling factor for the Schur complement\n\nOptions Database Key:\n- `-pc_fieldsplit_schur_scale <scale>` - default is -1.0\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetFields()`, `PCFieldSplitSchurFactType`, `PCFieldSplitSetSchurFactType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetSchurScale\"))\n\"\"\"\nfunction PCFieldSplitSetSchurScale(petsclib::PetscLibType, pc::PC, scale::PetscScalar) end\n\n@for_petsc function PCFieldSplitSetSchurScale(petsclib::$UnionPetscLib, pc::PC, scale::$PetscScalar )\n\n    @chk ccall(\n               (:PCFieldSplitSetSchurScale, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscScalar),\n               pc, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitGetSchurBlocks(petsclib::PetscLibType,pc::PC, A00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) \nGets all matrix blocks for the Schur complement\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `A00` - the (0,0) block\n- `A01` - the (0,1) block\n- `A10` - the (1,0) block\n- `A11` - the (1,1) block\n\nLevel: advanced\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `MatSchurComplementGetSubMatrices()`, `MatSchurComplementSetSubMatrices()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetSchurBlocks\"))\n\"\"\"\nfunction PCFieldSplitGetSchurBlocks(petsclib::PetscLibType, pc::PC, A00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat) end\n\n@for_petsc function PCFieldSplitGetSchurBlocks(petsclib::$UnionPetscLib, pc::PC, A00::PetscMat, A01::PetscMat, A10::PetscMat, A11::PetscMat )\n\tA00_ = Ref(A00.ptr)\n\tA01_ = Ref(A01.ptr)\n\tA10_ = Ref(A10.ptr)\n\tA11_ = Ref(A11.ptr)\n\n    @chk ccall(\n               (:PCFieldSplitGetSchurBlocks, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CMat}, Ptr{CMat}, Ptr{CMat}, Ptr{CMat}),\n               pc, A00_, A01_, A10_, A11_,\n              )\n\n\tA00.ptr = C_NULL\n\tA01.ptr = C_NULL\n\tA10.ptr = C_NULL\n\tA11.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetGKBTol(petsclib::PetscLibType,pc::PC, tolerance::PetscReal) \nSets the solver tolerance for the generalized Golub\n\nCollective\n\nInput Parameters:\n- `pc`        - the preconditioner context\n- `tolerance` - the solver tolerance\n\nOptions Database Key:\n- `-pc_fieldsplit_gkb_tol <tolerance>` - default is 1e-5\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetGKBDelay()`, `PCFieldSplitSetGKBNu()`, `PCFieldSplitSetGKBMaxit()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetGKBTol\"))\n\"\"\"\nfunction PCFieldSplitSetGKBTol(petsclib::PetscLibType, pc::PC, tolerance::PetscReal) end\n\n@for_petsc function PCFieldSplitSetGKBTol(petsclib::$UnionPetscLib, pc::PC, tolerance::$PetscReal )\n\n    @chk ccall(\n               (:PCFieldSplitSetGKBTol, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, tolerance,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetGKBMaxit(petsclib::PetscLibType,pc::PC, maxit::PetscInt) \nSets the maximum number of iterations for the generalized Golub\n\nCollective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `maxit` - the maximum number of iterations\n\nOptions Database Key:\n- `-pc_fieldsplit_gkb_maxit <maxit>` - default is 100\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetGKBDelay()`, `PCFieldSplitSetGKBTol()`, `PCFieldSplitSetGKBNu()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetGKBMaxit\"))\n\"\"\"\nfunction PCFieldSplitSetGKBMaxit(petsclib::PetscLibType, pc::PC, maxit::PetscInt) end\n\n@for_petsc function PCFieldSplitSetGKBMaxit(petsclib::$UnionPetscLib, pc::PC, maxit::$PetscInt )\n\n    @chk ccall(\n               (:PCFieldSplitSetGKBMaxit, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, maxit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetGKBDelay(petsclib::PetscLibType,pc::PC, delay::PetscInt) \nSets the delay in the lower bound error estimate in the generalized Golub\npreconditioner.\n\nCollective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `delay` - the delay window in the lower bound estimate\n\nOptions Database Key:\n- `-pc_fieldsplit_gkb_delay <delay>` - default is 5\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetGKBNu()`, `PCFieldSplitSetGKBTol()`, `PCFieldSplitSetGKBMaxit()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetGKBDelay\"))\n\"\"\"\nfunction PCFieldSplitSetGKBDelay(petsclib::PetscLibType, pc::PC, delay::PetscInt) end\n\n@for_petsc function PCFieldSplitSetGKBDelay(petsclib::$UnionPetscLib, pc::PC, delay::$PetscInt )\n\n    @chk ccall(\n               (:PCFieldSplitSetGKBDelay, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, delay,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetGKBNu(petsclib::PetscLibType,pc::PC, nu::PetscReal) \nSets the scalar value nu >= 0 in the transformation H = A00 + nu*A01*A01' of the (1,1) block in the\nGolub-Kahan bidiagonalization preconditioner {cite}`arioli2013` in `PCFIELDSPLIT`\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `nu` - the shift parameter\n\nOptions Database Key:\n- `-pc_fieldsplit_gkb_nu <nu>` - default is 1\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetGKBDelay()`, `PCFieldSplitSetGKBTol()`, `PCFieldSplitSetGKBMaxit()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetGKBNu\"))\n\"\"\"\nfunction PCFieldSplitSetGKBNu(petsclib::PetscLibType, pc::PC, nu::PetscReal) end\n\n@for_petsc function PCFieldSplitSetGKBNu(petsclib::$UnionPetscLib, pc::PC, nu::$PetscReal )\n\n    @chk ccall(\n               (:PCFieldSplitSetGKBNu, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, nu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCFieldSplitSetType(petsclib::PetscLibType,pc::PC, type::PCCompositeType) \nSets the type, `PCCompositeType`, of a `PCFIELDSPLIT`\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE` (default), `PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PC_COMPOSITE_SCHUR`,\n`PC_COMPOSITE_GKB`\n\nOptions Database Key:\n- `-pc_fieldsplit_type <one of multiplicative, additive, symmetric_multiplicative, special, schur>` - Sets fieldsplit preconditioner type\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCCompositeType`, `PCCompositeGetType()`, `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE`,\n`PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PC_COMPOSITE_SCHUR`, `PCFieldSplitSetSchurFactType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetType\"))\n\"\"\"\nfunction PCFieldSplitSetType(petsclib::PetscLibType, pc::PC, type::PCCompositeType) end\n\n@for_petsc function PCFieldSplitSetType(petsclib::$UnionPetscLib, pc::PC, type::PCCompositeType )\n\n    @chk ccall(\n               (:PCFieldSplitSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCCompositeType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCCompositeType = PCFieldSplitGetType(petsclib::PetscLibType,pc::PC) \nGets the type, `PCCompositeType`, of a `PCFIELDSPLIT`\n\nNot collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE` (default), `PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PC_COMPOSITE_SCHUR`\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCCompositeSetType()`, `PCFIELDSPLIT`, `PCCompositeType`, `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE`,\n`PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE`, `PC_COMPOSITE_SPECIAL`, `PC_COMPOSITE_SCHUR`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetType\"))\n\"\"\"\nfunction PCFieldSplitGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFieldSplitGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCCompositeType}()\n\n    @chk ccall(\n               (:PCFieldSplitGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCCompositeType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCFieldSplitSetDMSplits(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nFlags whether `DMCreateFieldDecomposition()` should be used to define the splits in a `PCFIELDSPLIT`, whenever possible.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - boolean indicating whether to use field splits defined by the `DM`\n\nOptions Database Key:\n- `-pc_fieldsplit_dm_splits <bool>` - use the field splits defined by the `DM`\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitGetDMSplits()`, `DMCreateFieldDecomposition()`, `PCFieldSplitSetFields()`, `PCFieldSplitSetIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetDMSplits\"))\n\"\"\"\nfunction PCFieldSplitSetDMSplits(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCFieldSplitSetDMSplits(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCFieldSplitSetDMSplits, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCFieldSplitGetDMSplits(petsclib::PetscLibType,pc::PC) \nReturns flag indicating whether `DMCreateFieldDecomposition()` should be used to define the splits in a `PCFIELDSPLIT`, whenever possible.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - boolean indicating whether to use field splits defined by the `DM`\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetDMSplits()`, `DMCreateFieldDecomposition()`, `PCFieldSplitSetFields()`, `PCFieldSplitSetIS()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetDMSplits\"))\n\"\"\"\nfunction PCFieldSplitGetDMSplits(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFieldSplitGetDMSplits(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCFieldSplitGetDMSplits, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = PCFieldSplitGetDetectSaddlePoint(petsclib::PetscLibType,pc::PC) \nReturns flag indicating whether `PCFIELDSPLIT` will attempt to automatically determine fields based on zero diagonal entries.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - boolean indicating whether to detect fields or not\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitSetDetectSaddlePoint()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitGetDetectSaddlePoint\"))\n\"\"\"\nfunction PCFieldSplitGetDetectSaddlePoint(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFieldSplitGetDetectSaddlePoint(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCFieldSplitGetDetectSaddlePoint, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = PCFieldSplitSetDetectSaddlePoint(petsclib::PetscLibType,pc::PC) \nSets flag indicating whether `PCFIELDSPLIT` will attempt to automatically determine fields based on zero diagonal entries.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flg` - boolean indicating whether to detect fields or not\n\nOptions Database Key:\n- `-pc_fieldsplit_detect_saddle_point <bool>` - detect and use the saddle point\n\nLevel: intermediate\n\n-seealso: [](sec_block_matrices), `PC`, `PCFIELDSPLIT`, `PCFieldSplitGetDetectSaddlePoint()`, `PCFieldSplitSetType()`, `PCFieldSplitSetSchurPre()`, `PC_FIELDSPLIT_SCHUR_PRE_SELF`\n\n# External Links\n$(_doc_external(\"Ksp/PCFieldSplitSetDetectSaddlePoint\"))\n\"\"\"\nfunction PCFieldSplitSetDetectSaddlePoint(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCFieldSplitSetDetectSaddlePoint(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCFieldSplitSetDetectSaddlePoint, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCGASMSetTotalSubdomains(petsclib::PetscLibType,pc::PC, N::PetscInt) \nsets the total number of subdomains to use across the communicator for `PCGASM`\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner\n- `N`  - total number of subdomains\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMSetOverlap()`\n`PCGASMCreateSubdomains2D()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMSetTotalSubdomains\"))\n\"\"\"\nfunction PCGASMSetTotalSubdomains(petsclib::PetscLibType, pc::PC, N::PetscInt) end\n\n@for_petsc function PCGASMSetTotalSubdomains(petsclib::$UnionPetscLib, pc::PC, N::$PetscInt )\n\n    @chk ccall(\n               (:PCGASMSetTotalSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGASMSetSubdomains(petsclib::PetscLibType,pc::PC, n::PetscInt, iis::Vector{IS}, ois::Vector{IS}) \nSets the subdomains for this MPI process\nfor the additive Schwarz preconditioner with multiple MPI processes per subdomain, `PCGASM`\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioner object\n- `n`   - the number of subdomains for this MPI process\n- `iis` - the index sets that define the inner subdomains (or `NULL` for PETSc to determine subdomains), the `iis` array is\ncopied so may be freed after this call.\n- `ois` - the index sets that define the outer subdomains (or `NULL` to use the same as `iis`, or to construct by expanding `iis` by\nthe requested overlap), the `ois` array is copied so may be freed after this call.\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetOverlap()`, `PCGASMGetSubKSP()`, `PCGASMDestroySubdomains()`,\n`PCGASMCreateSubdomains2D()`, `PCGASMGetSubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMSetSubdomains\"))\n\"\"\"\nfunction PCGASMSetSubdomains(petsclib::PetscLibType, pc::PC, n::PetscInt, iis::Vector{IS}, ois::Vector{IS}) end\n\n@for_petsc function PCGASMSetSubdomains(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt, iis::Vector{IS}, ois::Vector{IS} )\n\n    @chk ccall(\n               (:PCGASMSetSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{IS}, Ptr{IS}),\n               pc, n, iis, ois,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGASMSetOverlap(petsclib::PetscLibType,pc::PC, ovl::PetscInt) \nSets the overlap between a pair of subdomains for the\nadditive Schwarz preconditioner `PCGASM`.  Either all or no MPI processes in the\npc communicator must call this routine.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `ovl` - the amount of overlap between subdomains (ovl >= 0, default value = 0)\n\nOptions Database Key:\n- `-pc_gasm_overlap <overlap>` - Sets overlap\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMGetSubKSP()`,\n`PCGASMCreateSubdomains2D()`, `PCGASMGetSubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMSetOverlap\"))\n\"\"\"\nfunction PCGASMSetOverlap(petsclib::PetscLibType, pc::PC, ovl::PetscInt) end\n\n@for_petsc function PCGASMSetOverlap(petsclib::$UnionPetscLib, pc::PC, ovl::$PetscInt )\n\n    @chk ccall(\n               (:PCGASMSetOverlap, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, ovl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGASMSetType(petsclib::PetscLibType,pc::PC, type::PCGASMType) \nSets the type of restriction and interpolation used\nfor local problems in the `PCGASM` additive Schwarz method.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - variant of `PCGASM`, one of\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMGetSubKSP()`,\n`PCGASMCreateSubdomains2D()`, `PCASM`, `PCASMSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMSetType\"))\n\"\"\"\nfunction PCGASMSetType(petsclib::PetscLibType, pc::PC, type::PCGASMType) end\n\n@for_petsc function PCGASMSetType(petsclib::$UnionPetscLib, pc::PC, type::PCGASMType )\n\n    @chk ccall(\n               (:PCGASMSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCGASMType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGASMSetSortIndices(petsclib::PetscLibType,pc::PC, doSort::PetscBool) \nDetermines whether subdomain indices are sorted.\n\nLogically Collective\n\nInput Parameters:\n- `pc`     - the preconditioner context\n- `doSort` - sort the subdomain indices\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMGetSubKSP()`,\n`PCGASMCreateSubdomains2D()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMSetSortIndices\"))\n\"\"\"\nfunction PCGASMSetSortIndices(petsclib::PetscLibType, pc::PC, doSort::PetscBool) end\n\n@for_petsc function PCGASMSetSortIndices(petsclib::$UnionPetscLib, pc::PC, doSort::PetscBool )\n\n    @chk ccall(\n               (:PCGASMSetSortIndices, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, doSort,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn_loc::PetscInt,first_loc::PetscInt = PCGASMGetSubKSP(petsclib::PetscLibType,pc::PC, ksp::Vector{PetscKSP}) \nGets the local `KSP` contexts for all subdomains on this MPI process.\n\nCollective iff first_local is requested\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n_local`     - the number of blocks on this MPI process or `NULL`\n- `first_local` - the global number of the first block on this process or `NULL`, all processes must request or all must pass `NULL`\n- `ksp`         - the array of `KSP` contexts\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMSetOverlap()`,\n`PCGASMCreateSubdomains2D()`,\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMGetSubKSP\"))\n\"\"\"\nfunction PCGASMGetSubKSP(petsclib::PetscLibType, pc::PC, ksp::Vector{PetscKSP}) end\n\n@for_petsc function PCGASMGetSubKSP(petsclib::$UnionPetscLib, pc::PC, ksp::Vector{PetscKSP} )\n\tn_loc_ = Ref{$PetscInt}()\n\tfirst_loc_ = Ref{$PetscInt}()\n\tksp_ = Ref(pointer(ksp))\n\n    @chk ccall(\n               (:PCGASMGetSubKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{CKSP}}),\n               pc, n_loc_, first_loc_, ksp_,\n              )\n\n\tn_loc = n_loc_[]\n\tfirst_loc = first_loc_[]\n\n\treturn n_loc,first_loc\nend \n\n\"\"\"\n\tn::PetscInt,iis::Vector{IS} = PCGASMCreateSubdomains(petsclib::PetscLibType,A::PetscMat, N::PetscInt) \nCreates `n` index sets defining `n` nonoverlapping subdomains on this MPI process for the `PCGASM` additive\nSchwarz preconditioner for a any problem based on its matrix.\n\nCollective\n\nInput Parameters:\n- `A` - The global matrix operator\n- `N` - the number of global subdomains requested\n\nOutput Parameters:\n- `n`   - the number of subdomains created on this MPI process\n- `iis` - the array of index sets defining the local inner subdomains (on which the correction is applied)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMDestroySubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMCreateSubdomains\"))\n\"\"\"\nfunction PCGASMCreateSubdomains(petsclib::PetscLibType, A::PetscMat, N::PetscInt) end\n\n@for_petsc function PCGASMCreateSubdomains(petsclib::$UnionPetscLib, A::PetscMat, N::$PetscInt )\n\tn_ = Ref{$PetscInt}()\n\tiis_ = Ref{Ptr{IS}}()\n\n    @chk ccall(\n               (:PCGASMCreateSubdomains, $petsc_library),\n               PetscErrorCode,\n               (CMat, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{IS}}),\n               A, N, n_, iis_,\n              )\n\n\tn = n_[]\n\tiis = unsafe_wrap(Array, iis_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,iis\nend \n\n\"\"\"\n\tPCGASMDestroySubdomains(petsclib::PetscLibType,n::PetscInt, iis::Vector{IS}, ois::Vector{IS}) \nDestroys the index sets created with\n`PCGASMCreateSubdomains()` or `PCGASMCreateSubdomains2D()`. Should be\ncalled after setting subdomains with `PCGASMSetSubdomains()`.\n\nCollective\n\nInput Parameters:\n- `n`   - the number of index sets\n- `iis` - the array of inner subdomains\n- `ois` - the array of outer subdomains, can be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMCreateSubdomains()`, `PCGASMSetSubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMDestroySubdomains\"))\n\"\"\"\nfunction PCGASMDestroySubdomains(petsclib::PetscLibType, n::PetscInt, iis::Vector{IS}, ois::Vector{IS}) end\n\n@for_petsc function PCGASMDestroySubdomains(petsclib::$UnionPetscLib, n::$PetscInt, iis::Vector{IS}, ois::Vector{IS} )\n\tiis_ = Ref(pointer(iis))\n\tois_ = Ref(pointer(ois))\n\n    @chk ccall(\n               (:PCGASMDestroySubdomains, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Ptr{IS}}, Ptr{Ptr{IS}}),\n               n, iis_, ois_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnsub::PetscInt,iis::Vector{IS},ois::Vector{IS} = PCGASMCreateSubdomains2D(petsclib::PetscLibType,pc::PC, M::PetscInt, N::PetscInt, Mdomains::PetscInt, Ndomains::PetscInt, dof::PetscInt, overlap::PetscInt) \nCreates the index sets for the `PCGASM` overlapping Schwarz\npreconditioner for a two-dimensional problem on a regular grid.\n\nCollective\n\nInput Parameters:\n- `pc`       - the preconditioner context\n- `M`        - the global number of grid points in the x direction\n- `N`        - the global number of grid points in the y direction\n- `Mdomains` - the global number of subdomains in the x direction\n- `Ndomains` - the global number of subdomains in the y direction\n- `dof`      - degrees of freedom per node\n- `overlap`  - overlap in mesh lines\n\nOutput Parameters:\n- `nsub` - the number of local subdomains created\n- `iis`  - array of index sets defining inner (nonoverlapping) subdomains\n- `ois`  - array of index sets defining outer (overlapping, if overlap > 0) subdomains\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMGetSubKSP()`, `PCGASMSetOverlap()`, `PCASMCreateSubdomains2D()`,\n`PCGASMDestroySubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMCreateSubdomains2D\"))\n\"\"\"\nfunction PCGASMCreateSubdomains2D(petsclib::PetscLibType, pc::PC, M::PetscInt, N::PetscInt, Mdomains::PetscInt, Ndomains::PetscInt, dof::PetscInt, overlap::PetscInt) end\n\n@for_petsc function PCGASMCreateSubdomains2D(petsclib::$UnionPetscLib, pc::PC, M::$PetscInt, N::$PetscInt, Mdomains::$PetscInt, Ndomains::$PetscInt, dof::$PetscInt, overlap::$PetscInt )\n\tnsub_ = Ref{$PetscInt}()\n\tiis_ = Ref{Ptr{IS}}()\n\tois_ = Ref{Ptr{IS}}()\n\n    @chk ccall(\n               (:PCGASMCreateSubdomains2D, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{Ptr{IS}}, Ptr{Ptr{IS}}),\n               pc, M, N, Mdomains, Ndomains, dof, overlap, nsub_, iis_, ois_,\n              )\n\n\tnsub = nsub_[]\n\tiis = unsafe_wrap(Array, iis_[], VecGetLocalSize(petsclib, x); own = false)\n\tois = unsafe_wrap(Array, ois_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nsub,iis,ois\nend \n\n\"\"\"\n\tn::PetscInt = PCGASMGetSubdomains(petsclib::PetscLibType,pc::PC, iis::Vector{IS}, ois::Vector{IS}) \nGets the subdomains supported on this MPI process\nfor the `PCGASM` additive Schwarz preconditioner.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n`   - the number of subdomains for this MPI process (default value = 1)\n- `iis` - the index sets that define the inner subdomains (without overlap) supported on this process (can be `NULL`)\n- `ois` - the index sets that define the outer subdomains (with overlap) supported on this process (can be `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetOverlap()`, `PCGASMGetSubKSP()`, `PCGASMCreateSubdomains2D()`,\n`PCGASMSetSubdomains()`, `PCGASMGetSubmatrices()`, `PCGASMDestroySubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMGetSubdomains\"))\n\"\"\"\nfunction PCGASMGetSubdomains(petsclib::PetscLibType, pc::PC, iis::Vector{IS}, ois::Vector{IS}) end\n\n@for_petsc function PCGASMGetSubdomains(petsclib::$UnionPetscLib, pc::PC, iis::Vector{IS}, ois::Vector{IS} )\n\tn_ = Ref{$PetscInt}()\n\tiis_ = Ref(pointer(iis))\n\tois_ = Ref(pointer(ois))\n\n    @chk ccall(\n               (:PCGASMGetSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{IS}}, Ptr{Ptr{IS}}),\n               pc, n_, iis_, ois_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tn::PetscInt = PCGASMGetSubmatrices(petsclib::PetscLibType,pc::PC, mat::Vector{PetscMat}) \nGets the local submatrices (for this MPI process\nonly) for the `PCGASM` additive Schwarz preconditioner.\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n`   - the number of matrices for this MPI process (default value = 1)\n- `mat` - the matrices\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetOverlap()`, `PCGASMGetSubKSP()`,\n`PCGASMCreateSubdomains2D()`, `PCGASMSetSubdomains()`, `PCGASMGetSubdomains()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMGetSubmatrices\"))\n\"\"\"\nfunction PCGASMGetSubmatrices(petsclib::PetscLibType, pc::PC, mat::Vector{PetscMat}) end\n\n@for_petsc function PCGASMGetSubmatrices(petsclib::$UnionPetscLib, pc::PC, mat::Vector{PetscMat} )\n\tn_ = Ref{$PetscInt}()\n\tmat_ = Ref(pointer(mat))\n\n    @chk ccall(\n               (:PCGASMGetSubmatrices, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{Ptr{CMat}}),\n               pc, n_, mat_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tPCGASMSetUseDMSubdomains(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nIndicates whether to use `DMCreateDomainDecomposition()` to define the subdomains, whenever possible for `PCGASM`\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner\n- `flg` - boolean indicating whether to use subdomains defined by the `DM`\n\nOptions Database Key:\n- `-pc_gasm_dm_subdomains`    - configure subdomains\n- `-pc_gasm_overlap`          - set overlap\n- `-pc_gasm_total_subdomains` - set number of subdomains\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMGetUseDMSubdomains()`, `PCGASMSetSubdomains()`, `PCGASMSetOverlap()`\n`PCGASMCreateSubdomains2D()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMSetUseDMSubdomains\"))\n\"\"\"\nfunction PCGASMSetUseDMSubdomains(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCGASMSetUseDMSubdomains(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCGASMSetUseDMSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PCGASMGetUseDMSubdomains(petsclib::PetscLibType,pc::PC) \nReturns flag indicating whether to use `DMCreateDomainDecomposition()` to define the subdomains, whenever possible with `PCGASM`\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner\n\nOutput Parameter:\n- `flg` - boolean indicating whether to use subdomains defined by the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCGASM`, `PCGASMSetUseDMSubdomains()`, `PCGASMSetOverlap()`\n`PCGASMCreateSubdomains2D()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGASMGetUseDMSubdomains\"))\n\"\"\"\nfunction PCGASMGetUseDMSubdomains(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGASMGetUseDMSubdomains(petsclib::$UnionPetscLib, pc::PC )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PCGASMGetUseDMSubdomains, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PetscBool}),\n               pc, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPCHYPRESetDiscreteGradient(petsclib::PetscLibType,pc::PC, G::PetscMat) \nSet the discrete gradient matrix for `PCHYPRE` type of AMS or ADS\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioning context\n- `G`  - the discrete gradient\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCHYPRESetDiscreteCurl()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPRESetDiscreteGradient\"))\n\"\"\"\nfunction PCHYPRESetDiscreteGradient(petsclib::PetscLibType, pc::PC, G::PetscMat) end\n\n@for_petsc function PCHYPRESetDiscreteGradient(petsclib::$UnionPetscLib, pc::PC, G::PetscMat )\n\n    @chk ccall(\n               (:PCHYPRESetDiscreteGradient, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, G,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHYPRESetDiscreteCurl(petsclib::PetscLibType,pc::PC, C::PetscMat) \nSet the discrete curl matrix for `PCHYPRE` type of ADS\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioning context\n- `C`  - the discrete curl\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCHYPRESetDiscreteGradient()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPRESetDiscreteCurl\"))\n\"\"\"\nfunction PCHYPRESetDiscreteCurl(petsclib::PetscLibType, pc::PC, C::PetscMat) end\n\n@for_petsc function PCHYPRESetDiscreteCurl(petsclib::$UnionPetscLib, pc::PC, C::PetscMat )\n\n    @chk ccall(\n               (:PCHYPRESetDiscreteCurl, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, C,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHYPRESetInterpolations(petsclib::PetscLibType,pc::PC, dim::PetscInt, RT_PiFull::PetscMat, RT_Pi::Vector{PetscMat}, ND_PiFull::PetscMat, ND_Pi::Vector{PetscMat}) \nSet the interpolation matrices for `PCHYPRE` type of AMS or ADS\n\nCollective\n\nInput Parameters:\n- `pc`        - the preconditioning context\n- `dim`       - the dimension of the problem, only used in AMS\n- `RT_PiFull` - Raviart-Thomas interpolation matrix\n- `RT_Pi`     - x/y/z component of Raviart-Thomas interpolation matrix\n- `ND_PiFull` - Nedelec interpolation matrix\n- `ND_Pi`     - x/y/z component of Nedelec interpolation matrix\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPRESetInterpolations\"))\n\"\"\"\nfunction PCHYPRESetInterpolations(petsclib::PetscLibType, pc::PC, dim::PetscInt, RT_PiFull::PetscMat, RT_Pi::Vector{PetscMat}, ND_PiFull::PetscMat, ND_Pi::Vector{PetscMat}) end\n\n@for_petsc function PCHYPRESetInterpolations(petsclib::$UnionPetscLib, pc::PC, dim::$PetscInt, RT_PiFull::PetscMat, RT_Pi::Vector{PetscMat}, ND_PiFull::PetscMat, ND_Pi::Vector{PetscMat} )\n\n    @chk ccall(\n               (:PCHYPRESetInterpolations, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, CMat, Ptr{CMat}, CMat, Ptr{CMat}),\n               pc, dim, RT_PiFull, RT_Pi, ND_PiFull, ND_Pi,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHYPRESetAlphaPoissonMatrix(petsclib::PetscLibType,pc::PC, A::PetscMat) \nSet the vector Poisson matrix for `PCHYPRE` of type AMS\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioning context\n- `A`  - the matrix\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCHYPRESetDiscreteGradient()`, `PCHYPRESetDiscreteCurl()`, `PCHYPRESetBetaPoissonMatrix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPRESetAlphaPoissonMatrix\"))\n\"\"\"\nfunction PCHYPRESetAlphaPoissonMatrix(petsclib::PetscLibType, pc::PC, A::PetscMat) end\n\n@for_petsc function PCHYPRESetAlphaPoissonMatrix(petsclib::$UnionPetscLib, pc::PC, A::PetscMat )\n\n    @chk ccall(\n               (:PCHYPRESetAlphaPoissonMatrix, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHYPRESetBetaPoissonMatrix(petsclib::PetscLibType,pc::PC, A::PetscMat) \nSet the Poisson matrix for `PCHYPRE` of type AMS\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioning context\n- `A`  - the matrix, or `NULL` to turn it off\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCHYPRESetDiscreteGradient()`, `PCHYPRESetDiscreteCurl()`, `PCHYPRESetAlphaPoissonMatrix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPRESetBetaPoissonMatrix\"))\n\"\"\"\nfunction PCHYPRESetBetaPoissonMatrix(petsclib::PetscLibType, pc::PC, A::PetscMat) end\n\n@for_petsc function PCHYPRESetBetaPoissonMatrix(petsclib::$UnionPetscLib, pc::PC, A::PetscMat )\n\n    @chk ccall(\n               (:PCHYPRESetBetaPoissonMatrix, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, A,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHYPRESetEdgeConstantVectors(petsclib::PetscLibType,pc::PC, ozz::PetscVec, zoz::PetscVec, zzo::PetscVec) \nSet the representation of the constant vector fields in the edge element basis for `PCHYPRE` of type AMS\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioning context\n- `ozz` - vector representing (1,0,0) (or (1,0) in 2D)\n- `zoz` - vector representing (0,1,0) (or (0,1) in 2D)\n- `zzo` - vector representing (0,0,1) (use NULL in 2D)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCHYPRESetDiscreteGradient()`, `PCHYPRESetDiscreteCurl()`, `PCHYPRESetAlphaPoissonMatrix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPRESetEdgeConstantVectors\"))\n\"\"\"\nfunction PCHYPRESetEdgeConstantVectors(petsclib::PetscLibType, pc::PC, ozz::PetscVec, zoz::PetscVec, zzo::PetscVec) end\n\n@for_petsc function PCHYPRESetEdgeConstantVectors(petsclib::$UnionPetscLib, pc::PC, ozz::PetscVec, zoz::PetscVec, zzo::PetscVec )\n\n    @chk ccall(\n               (:PCHYPRESetEdgeConstantVectors, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec, CVec, CVec),\n               pc, ozz, zoz, zzo,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHYPREAMSSetInteriorNodes(petsclib::PetscLibType,pc::PC, interior::PetscVec) \nSet the list of interior nodes to a zero\n\nCollective\n\nInput Parameters:\n- `pc`       - the preconditioning context\n- `interior` - vector. node is interior if its entry in the array is 1.0.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCHYPRESetDiscreteGradient()`, `PCHYPRESetDiscreteCurl()`, `PCHYPRESetAlphaPoissonMatrix()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPREAMSSetInteriorNodes\"))\n\"\"\"\nfunction PCHYPREAMSSetInteriorNodes(petsclib::PetscLibType, pc::PC, interior::PetscVec) end\n\n@for_petsc function PCHYPREAMSSetInteriorNodes(petsclib::$UnionPetscLib, pc::PC, interior::PetscVec )\n\n    @chk ccall(\n               (:PCHYPREAMSSetInteriorNodes, $petsc_library),\n               PetscErrorCode,\n               (PC, CVec),\n               pc, interior,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCHYPRESetType(petsclib::PetscLibType,pc::PC, name::String) \nSets which hypre preconditioner you wish to use\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `name` - either euclid, ilu, pilut, parasails, boomeramg, ams, or ads\n\nOptions Database Key:\n- `pc_hypre_type` - One of euclid, ilu, pilut, parasails, boomeramg, ams, or ads\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCreate()`, `PCSetType()`, `PCType`, `PC`, `PCHYPRE`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPRESetType\"))\n\"\"\"\nfunction PCHYPRESetType(petsclib::PetscLibType, pc::PC, name::String) end\n\n@for_petsc function PCHYPRESetType(petsclib::$UnionPetscLib, pc::PC, name::String )\n\n    @chk ccall(\n               (:PCHYPRESetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}),\n               pc, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn_per_level::Vector{PetscInt} = PCHYPREGetCFMarkers(petsclib::PetscLibType,pc::PC, CFMarkers::Vector{PetscBT}) \nGets CF marker arrays for all levels (except the finest level)\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `n_per_level` - the number of nodes per level (size of `num_levels`)\n- `CFMarkers`   - the Coarse/Fine Boolean arrays (size of `num_levels` - 1)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PC`, `PCMG`, `PCMGGetRestriction()`, `PCMGSetInterpolation()`, `PCMGGetRScale()`, `PCMGGetInterpolation()`, `PCGetInterpolations()`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPREGetCFMarkers\"))\n\"\"\"\nfunction PCHYPREGetCFMarkers(petsclib::PetscLibType, pc::PC, CFMarkers::Vector{PetscBT}) end\n\n@for_petsc function PCHYPREGetCFMarkers(petsclib::$UnionPetscLib, pc::PC, CFMarkers::Vector{PetscBT} )\n\tn_per_level_ = Ref{Ptr{$PetscInt}}()\n\tCFMarkers_ = Ref(pointer(CFMarkers))\n\n    @chk ccall(\n               (:PCHYPREGetCFMarkers, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{PetscBT}}),\n               pc, n_per_level_, CFMarkers_,\n              )\n\n\tn_per_level = unsafe_wrap(Array, n_per_level_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n_per_level\nend \n\n\"\"\"\n\tname::String = PCHYPREGetType(petsclib::PetscLibType,pc::PC) \nGets which hypre preconditioner you are using\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `name` - either euclid, ilu, pilut, parasails, boomeramg, ams, or ads\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCCreate()`, `PCHYPRESetType()`, `PCType`, `PC`, `PCHYPRE`\n\n# External Links\n$(_doc_external(\"Ksp/PCHYPREGetType\"))\n\"\"\"\nfunction PCHYPREGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCHYPREGetType(petsclib::$UnionPetscLib, pc::PC )\n\tname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:PCHYPREGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Ptr{Cchar}}),\n               pc, name_,\n              )\n\n\tname = unsafe_wrap(Array, name_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn name\nend \n\n\"\"\"\n\tPCMGGalerkinSetMatProductAlgorithm(petsclib::PetscLibType,pc::PC, name::String) \nSet type of sparse matrix\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the hypre context\n- `name` - one of 'cusparse', 'hypre'\n\nOptions Database Key:\n- `-pc_mg_galerkin_mat_product_algorithm <cusparse,hypre>` - Type of sparse matrix-matrix product to use in hypre\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCMGGalerkinGetMatProductAlgorithm()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGalerkinSetMatProductAlgorithm\"))\n\"\"\"\nfunction PCMGGalerkinSetMatProductAlgorithm(petsclib::PetscLibType, pc::PC, name::String) end\n\n@for_petsc function PCMGGalerkinSetMatProductAlgorithm(petsclib::$UnionPetscLib, pc::PC, name::String )\n\n    @chk ccall(\n               (:PCMGGalerkinSetMatProductAlgorithm, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Cchar}),\n               pc, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMGGalerkinGetMatProductAlgorithm(petsclib::PetscLibType,pc::PC, name::String) \nGet type of sparse matrix\n\nNot Collective\n\nInput Parameter:\n- `pc` - the multigrid context\n\nOutput Parameter:\n- `name` - one of 'cusparse', 'hypre'\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCHYPRE`, `PCMGGalerkinSetMatProductAlgorithm()`\n\n# External Links\n$(_doc_external(\"Ksp/PCMGGalerkinGetMatProductAlgorithm\"))\n\"\"\"\nfunction PCMGGalerkinGetMatProductAlgorithm(petsclib::PetscLibType, pc::PC, name::String) end\n\n@for_petsc function PCMGGalerkinGetMatProductAlgorithm(petsclib::$UnionPetscLib, pc::PC, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PCMGGalerkinGetMatProductAlgorithm, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{Ptr{Cchar}}),\n               pc, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSORGetSymmetric(petsclib::PetscLibType,pc::PC, flag::MatSORType) \nGets the form the SOR preconditioner is using;   backward, or forward relaxation.  The local variants perform SOR on\neach processor.  By default forward relaxation is used.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `flag` - one of the following\n-seealso: [](ch_ksp), `PCSOR`, `PCEisenstatSetOmega()`, `PCSORSetIterations()`, `PCSORSetOmega()`, `PCSORSetSymmetric()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSORGetSymmetric\"))\n\"\"\"\nfunction PCSORGetSymmetric(petsclib::PetscLibType, pc::PC, flag::MatSORType) end\n\n@for_petsc function PCSORGetSymmetric(petsclib::$UnionPetscLib, pc::PC, flag::MatSORType )\n\n    @chk ccall(\n               (:PCSORGetSymmetric, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{MatSORType}),\n               pc, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tomega::PetscReal = PCSORGetOmega(petsclib::PetscLibType,pc::PC) \nGets the SOR relaxation coefficient, omega\n(where omega = 1.0 by default).\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `omega` - relaxation coefficient (0 < omega < 2).\n\nOptions Database Key:\n- `-pc_sor_omega <omega>` - Sets omega\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSOR`, `PCSORSetSymmetric()`, `PCSORSetIterations()`, `PCEisenstatSetOmega()`, `PCSORSetOmega()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSORGetOmega\"))\n\"\"\"\nfunction PCSORGetOmega(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCSORGetOmega(petsclib::$UnionPetscLib, pc::PC )\n\tomega_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PCSORGetOmega, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}),\n               pc, omega_,\n              )\n\n\tomega = omega_[]\n\n\treturn omega\nend \n\n\"\"\"\n\tits::PetscInt,lits::PetscInt = PCSORGetIterations(petsclib::PetscLibType,pc::PC) \nGets the number of inner iterations to\nbe used by the SOR preconditioner. The default is 1.\n\nLogically Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameters:\n- `lits` - number of local iterations, smoothings over just variables on processor\n- `its`  - number of parallel iterations to use; each parallel iteration has lits local iterations\n\nOptions Database Keys:\n- `-pc_sor_its <its>`   - Sets number of iterations\n- `-pc_sor_lits <lits>` - Sets number of local iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSOR`, `PCSORSetOmega()`, `PCSORSetSymmetric()`, `PCSORSetIterations()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSORGetIterations\"))\n\"\"\"\nfunction PCSORGetIterations(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCSORGetIterations(petsclib::$UnionPetscLib, pc::PC )\n\tits_ = Ref{$PetscInt}()\n\tlits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PCSORGetIterations, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               pc, its_, lits_,\n              )\n\n\tits = its_[]\n\tlits = lits_[]\n\n\treturn its,lits\nend \n\n\"\"\"\n\tPCSORSetSymmetric(petsclib::PetscLibType,pc::PC, flag::MatSORType) \nSets the SOR preconditioner to use symmetric (SSOR),\nbackward, or forward relaxation.  The local variants perform SOR on\neach processor.  By default forward relaxation is used.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `flag` - one of the following\n-seealso: [](ch_ksp), `PCSOR`, `PCEisenstatSetOmega()`, `PCSORSetIterations()`, `PCSORSetOmega()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSORSetSymmetric\"))\n\"\"\"\nfunction PCSORSetSymmetric(petsclib::PetscLibType, pc::PC, flag::MatSORType) end\n\n@for_petsc function PCSORSetSymmetric(petsclib::$UnionPetscLib, pc::PC, flag::MatSORType )\n\n    @chk ccall(\n               (:PCSORSetSymmetric, $petsc_library),\n               PetscErrorCode,\n               (PC, MatSORType),\n               pc, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSORSetOmega(petsclib::PetscLibType,pc::PC, omega::PetscReal) \nSets the SOR relaxation coefficient, omega\n(where omega = 1.0 by default).\n\nLogically Collective\n\nInput Parameters:\n- `pc`    - the preconditioner context\n- `omega` - relaxation coefficient (0 < omega < 2).\n\nOptions Database Key:\n- `-pc_sor_omega <omega>` - Sets omega\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSOR`, `PCSORSetSymmetric()`, `PCSORSetIterations()`, `PCEisenstatSetOmega()`, `MatSetOption()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSORSetOmega\"))\n\"\"\"\nfunction PCSORSetOmega(petsclib::PetscLibType, pc::PC, omega::PetscReal) end\n\n@for_petsc function PCSORSetOmega(petsclib::$UnionPetscLib, pc::PC, omega::$PetscReal )\n\n    @chk ccall(\n               (:PCSORSetOmega, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, omega,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCSORSetIterations(petsclib::PetscLibType,pc::PC, its::PetscInt, lits::PetscInt) \nSets the number of inner iterations to\nbe used by the SOR preconditioner. The default is 1.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `lits` - number of local iterations, smoothings over just variables on processor\n- `its`  - number of parallel iterations to use; each parallel iteration has lits local iterations\n\nOptions Database Keys:\n- `-pc_sor_its <its>`   - Sets number of iterations\n- `-pc_sor_lits <lits>` - Sets number of local iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCSOR`, `PCSORSetOmega()`, `PCSORSetSymmetric()`\n\n# External Links\n$(_doc_external(\"Ksp/PCSORSetIterations\"))\n\"\"\"\nfunction PCSORSetIterations(petsclib::PetscLibType, pc::PC, its::PetscInt, lits::PetscInt) end\n\n@for_petsc function PCSORSetIterations(petsclib::$UnionPetscLib, pc::PC, its::$PetscInt, lits::$PetscInt )\n\n    @chk ccall(\n               (:PCSORSetIterations, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, $PetscInt),\n               pc, its, lits,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetInitOnly(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nDo only initialization step.\nSets initial guess to the solution on the deflation space but does not apply\nthe deflation preconditioner. The additional preconditioner is still applied.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - default `PETSC_FALSE`\n\nOptions Database Key:\n- `-pc_deflation_init_only <false>` - if true computes only the special guess\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCDEFLATION`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetInitOnly\"))\n\"\"\"\nfunction PCDeflationSetInitOnly(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCDeflationSetInitOnly(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCDeflationSetInitOnly, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetLevels(petsclib::PetscLibType,pc::PC, max::PetscInt) \nSet the maximum level of deflation nesting.\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `max` - maximum deflation level\n\nOptions Database Key:\n- `-pc_deflation_max_lvl <0>` - maximum number of levels for multilevel deflation\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCDeflationSetSpaceToCompute()`, `PCDeflationSetSpace()`, `PCDEFLATION`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetLevels\"))\n\"\"\"\nfunction PCDeflationSetLevels(petsclib::PetscLibType, pc::PC, max::PetscInt) end\n\n@for_petsc function PCDeflationSetLevels(petsclib::$UnionPetscLib, pc::PC, max::$PetscInt )\n\n    @chk ccall(\n               (:PCDeflationSetLevels, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetReductionFactor(petsclib::PetscLibType,pc::PC, red::PetscInt) \nSet reduction factor for the `PCDEFLATION`\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `red` - reduction factor (or `PETSC_DETERMINE`)\n\nOptions Database Key:\n- `-pc_deflation_reduction_factor <-1>` - reduction factor on bottom level coarse problem for `PCDEFLATION`\n\n-seealso: [](ch_ksp), `PCTELESCOPE`, `PCDEFLATION`, `PCDeflationSetLevels()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetReductionFactor\"))\n\"\"\"\nfunction PCDeflationSetReductionFactor(petsclib::PetscLibType, pc::PC, red::PetscInt) end\n\n@for_petsc function PCDeflationSetReductionFactor(petsclib::$UnionPetscLib, pc::PC, red::$PetscInt )\n\n    @chk ccall(\n               (:PCDeflationSetReductionFactor, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, red,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetCorrectionFactor(petsclib::PetscLibType,pc::PC, fact::PetscScalar) \nSet coarse problem correction factor.\nThe preconditioner becomes P*M^{-1} + fact*Q.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `fact` - correction factor\n\nOptions Database Keys:\n- `-pc_deflation_correction        <false>` - if true apply coarse problem correction\n- `-pc_deflation_correction_factor <1.0>`   - sets coarse problem correction factor\n\n-seealso: [](ch_ksp), `PCDEFLATION`, `PCDeflationSetLevels()`, `PCDeflationSetReductionFactor()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetCorrectionFactor\"))\n\"\"\"\nfunction PCDeflationSetCorrectionFactor(petsclib::PetscLibType, pc::PC, fact::PetscScalar) end\n\n@for_petsc function PCDeflationSetCorrectionFactor(petsclib::$UnionPetscLib, pc::PC, fact::$PetscScalar )\n\n    @chk ccall(\n               (:PCDeflationSetCorrectionFactor, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscScalar),\n               pc, fact,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetSpaceToCompute(petsclib::PetscLibType,pc::PC, type::PCDeflationSpaceType, size::PetscInt) \nSet deflation space type and size to compute.\n\nLogically Collective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - deflation space type to compute (or `PETSC_IGNORE`)\n- `size` - size of the space to compute (or `PETSC_DEFAULT`)\n\nOptions Database Keys:\n- `-pc_deflation_compute_space      <haar>` - compute `PCDeflationSpaceType` deflation space\n- `-pc_deflation_compute_space_size <1>`    - size of the deflation space\n\n-seealso: [](ch_ksp), `PCDeflationSetLevels()`, `PCDEFLATION`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetSpaceToCompute\"))\n\"\"\"\nfunction PCDeflationSetSpaceToCompute(petsclib::PetscLibType, pc::PC, type::PCDeflationSpaceType, size::PetscInt) end\n\n@for_petsc function PCDeflationSetSpaceToCompute(petsclib::$UnionPetscLib, pc::PC, type::PCDeflationSpaceType, size::$PetscInt )\n\n    @chk ccall(\n               (:PCDeflationSetSpaceToCompute, $petsc_library),\n               PetscErrorCode,\n               (PC, PCDeflationSpaceType, $PetscInt),\n               pc, type, size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetSpace(petsclib::PetscLibType,pc::PC, W::PetscMat, transpose::PetscBool) \nSet the deflation space matrix (or its (Hermitian) transpose).\n\nLogically Collective\n\nInput Parameters:\n- `pc`        - the preconditioner context\n- `W`         - deflation matrix\n- `transpose` - indicates that W is an explicit transpose of the deflation matrix\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCDeflationSetLevels()`, `PCDEFLATION`, `PCDeflationSetProjectionNullSpaceMat()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetSpace\"))\n\"\"\"\nfunction PCDeflationSetSpace(petsclib::PetscLibType, pc::PC, W::PetscMat, transpose::PetscBool) end\n\n@for_petsc function PCDeflationSetSpace(petsclib::$UnionPetscLib, pc::PC, W::PetscMat, transpose::PetscBool )\n\n    @chk ccall(\n               (:PCDeflationSetSpace, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, PetscBool),\n               pc, W, transpose,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetProjectionNullSpaceMat(petsclib::PetscLibType,pc::PC, mat::PetscMat) \nSet the projection null space matrix (W'*A).\n\nCollective\n\nInput Parameters:\n- `pc`  - preconditioner context\n- `mat` - projection null space matrix\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCDEFLATION`, `PCDeflationSetSpace()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetProjectionNullSpaceMat\"))\n\"\"\"\nfunction PCDeflationSetProjectionNullSpaceMat(petsclib::PetscLibType, pc::PC, mat::PetscMat) end\n\n@for_petsc function PCDeflationSetProjectionNullSpaceMat(petsclib::$UnionPetscLib, pc::PC, mat::PetscMat )\n\n    @chk ccall(\n               (:PCDeflationSetProjectionNullSpaceMat, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationSetCoarseMat(petsclib::PetscLibType,pc::PC, mat::PetscMat) \nSet the coarse problem `Mat`.\n\nCollective\n\nInput Parameters:\n- `pc`  - preconditioner context\n- `mat` - coarse problem mat\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCDEFLATION`, `PCDeflationGetCoarseKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationSetCoarseMat\"))\n\"\"\"\nfunction PCDeflationSetCoarseMat(petsclib::PetscLibType, pc::PC, mat::PetscMat) end\n\n@for_petsc function PCDeflationSetCoarseMat(petsclib::$UnionPetscLib, pc::PC, mat::PetscMat )\n\n    @chk ccall(\n               (:PCDeflationSetCoarseMat, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat),\n               pc, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationGetCoarseKSP(petsclib::PetscLibType,pc::PC, ksp::PetscKSP) \nReturns the coarse problem `KSP`.\n\nNot Collective\n\nInput Parameter:\n- `pc` - preconditioner context\n\nOutput Parameter:\n- `ksp` - coarse problem `KSP` context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCDEFLATION`, `PCDeflationSetCoarseMat()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationGetCoarseKSP\"))\n\"\"\"\nfunction PCDeflationGetCoarseKSP(petsclib::PetscLibType, pc::PC, ksp::PetscKSP) end\n\n@for_petsc function PCDeflationGetCoarseKSP(petsclib::$UnionPetscLib, pc::PC, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PCDeflationGetCoarseKSP, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{CKSP}),\n               pc, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCDeflationGetPC(petsclib::PetscLibType,pc::PC, apc::PC) \nReturns the additional preconditioner M^{\n\nNot Collective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `apc` - additional preconditioner\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCDEFLATION`, `PCDeflationGetCoarseKSP()`\n\n# External Links\n$(_doc_external(\"Ksp/PCDeflationGetPC\"))\n\"\"\"\nfunction PCDeflationGetPC(petsclib::PetscLibType, pc::PC, apc::PC) end\n\n@for_petsc function PCDeflationGetPC(petsclib::$UnionPetscLib, pc::PC, apc::PC )\n\n    @chk ccall(\n               (:PCDeflationGetPC, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PC}),\n               pc, apc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetNSmooths(petsclib::PetscLibType,pc::PC, n::PetscInt) \nSet number of smoothing steps (1 is typical) used to construct the prolongation operator\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - the number of smooths\n\nOptions Database Key:\n- `-pc_gamg_agg_nsmooths <nsmooth, default=1>` - the flag\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCMG`, `PCGAMG`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetNSmooths\"))\n\"\"\"\nfunction PCGAMGSetNSmooths(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCGAMGSetNSmooths(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGSetNSmooths, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetAggressiveLevels(petsclib::PetscLibType,pc::PC, n::PetscInt) \nUse aggressive coarsening on first n levels\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - 0, 1 or more\n\nOptions Database Key:\n- `-pc_gamg_aggressive_coarsening <n,default = 1>` - the flag\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetThreshold()`, `PCGAMGMISkSetAggressive()`, `PCGAMGSetAggressiveSquareGraph()`, `PCGAMGMISkSetMinDegreeOrdering()`, `PCGAMGSetLowMemoryFilter()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetAggressiveLevels\"))\n\"\"\"\nfunction PCGAMGSetAggressiveLevels(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCGAMGSetAggressiveLevels(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGSetAggressiveLevels, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGMISkSetAggressive(petsclib::PetscLibType,pc::PC, n::PetscInt) \nNumber (k) distance in MIS coarsening (>2 is 'aggressive')\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - 1 or more (default = 2)\n\nOptions Database Key:\n- `-pc_gamg_aggressive_mis_k <n,default=2>` - the flag\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetThreshold()`, `PCGAMGSetAggressiveLevels()`, `PCGAMGSetAggressiveSquareGraph()`, `PCGAMGMISkSetMinDegreeOrdering()`, `PCGAMGSetLowMemoryFilter()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGMISkSetAggressive\"))\n\"\"\"\nfunction PCGAMGMISkSetAggressive(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCGAMGMISkSetAggressive(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGMISkSetAggressive, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetAggressiveSquareGraph(petsclib::PetscLibType,pc::PC, b::PetscBool) \nUse graph square, A^T A, for aggressive coarsening. Coarsening is slower than the alternative (MIS\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `b`  - default true\n\nOptions Database Key:\n- `-pc_gamg_aggressive_square_graph <bool,default=true>` - the flag\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetThreshold()`, `PCGAMGSetAggressiveLevels()`, `PCGAMGMISkSetAggressive()`, `PCGAMGMISkSetMinDegreeOrdering()`, `PCGAMGSetLowMemoryFilter()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetAggressiveSquareGraph\"))\n\"\"\"\nfunction PCGAMGSetAggressiveSquareGraph(petsclib::PetscLibType, pc::PC, b::PetscBool) end\n\n@for_petsc function PCGAMGSetAggressiveSquareGraph(petsclib::$UnionPetscLib, pc::PC, b::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetAggressiveSquareGraph, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGMISkSetMinDegreeOrdering(petsclib::PetscLibType,pc::PC, b::PetscBool) \nUse minimum degree ordering in greedy MIS algorithm\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `b`  - default false\n\nOptions Database Key:\n- `-pc_gamg_mis_k_minimum_degree_ordering <bool,default=false>` - the flag\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetThreshold()`, `PCGAMGSetAggressiveLevels()`, `PCGAMGMISkSetAggressive()`, `PCGAMGSetAggressiveSquareGraph()`, `PCGAMGSetLowMemoryFilter()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGMISkSetMinDegreeOrdering\"))\n\"\"\"\nfunction PCGAMGMISkSetMinDegreeOrdering(petsclib::PetscLibType, pc::PC, b::PetscBool) end\n\n@for_petsc function PCGAMGMISkSetMinDegreeOrdering(petsclib::$UnionPetscLib, pc::PC, b::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGMISkSetMinDegreeOrdering, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetLowMemoryFilter(petsclib::PetscLibType,pc::PC, b::PetscBool) \nUse low memory graph/matrix filter\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `b`  - default false\n\nOptions Database Key:\n- `-pc_gamg_low_memory_threshold_filter <bool,default=false>` - the flag\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), `PCGAMG`, `PCGAMGSetThreshold()`, `PCGAMGSetAggressiveLevels()`,\n`PCGAMGMISkSetAggressive()`, `PCGAMGSetAggressiveSquareGraph()`, `PCGAMGMISkSetMinDegreeOrdering()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetLowMemoryFilter\"))\n\"\"\"\nfunction PCGAMGSetLowMemoryFilter(petsclib::PetscLibType, pc::PC, b::PetscBool) end\n\n@for_petsc function PCGAMGSetLowMemoryFilter(petsclib::$UnionPetscLib, pc::PC, b::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetLowMemoryFilter, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetGraphSymmetrize(petsclib::PetscLibType,pc::PC, b::PetscBool) \nSymmetrize graph used for coarsening. Defaults to true, but if matrix has symmetric attribute, then not needed since the graph is already known to be symmetric\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `b`  - default true\n\nOptions Database Key:\n- `-pc_gamg_graph_symmetrize <bool,default=true>` - the flag\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), `PCGAMG`, `PCGAMGSetThreshold()`, `PCGAMGSetAggressiveLevels()`, `MatCreateGraph()`,\n`PCGAMGMISkSetAggressive()`, `PCGAMGSetAggressiveSquareGraph()`, `PCGAMGMISkSetMinDegreeOrdering()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetGraphSymmetrize\"))\n\"\"\"\nfunction PCGAMGSetGraphSymmetrize(petsclib::PetscLibType, pc::PC, b::PetscBool) end\n\n@for_petsc function PCGAMGSetGraphSymmetrize(petsclib::$UnionPetscLib, pc::PC, b::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetGraphSymmetrize, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetProcEqLim(petsclib::PetscLibType,pc::PC, n::PetscInt) \nSet number of equations to aim for per process on the coarse grids via processor reduction in `PCGAMG`\n\nLogically Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - the number of equations\n\nOptions Database Key:\n- `-pc_gamg_process_eq_limit <limit>` - set the limit\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetCoarseEqLim()`, `PCGAMGSetRankReductionFactors()`, `PCGAMGSetRepartition()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetProcEqLim\"))\n\"\"\"\nfunction PCGAMGSetProcEqLim(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCGAMGSetProcEqLim(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGSetProcEqLim, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetCoarseEqLim(petsclib::PetscLibType,pc::PC, n::PetscInt) \nSet maximum number of equations on the coarsest grid of `PCGAMG`\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - maximum number of equations to aim for\n\nOptions Database Key:\n- `-pc_gamg_coarse_eq_limit <limit>` - set the limit\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetProcEqLim()`, `PCGAMGSetRankReductionFactors()`, `PCGAMGSetRepartition()`,\n`PCGAMGSetParallelCoarseGridSolve()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetCoarseEqLim\"))\n\"\"\"\nfunction PCGAMGSetCoarseEqLim(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCGAMGSetCoarseEqLim(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGSetCoarseEqLim, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetRepartition(petsclib::PetscLibType,pc::PC, n::PetscBool) \nRepartition the degrees of freedom across the processors on the coarser grids when reducing the number of MPI ranks to use\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n- `-pc_gamg_repartition <true,false>` - turn on the repartitioning\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetProcEqLim()`, `PCGAMGSetRankReductionFactors()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetRepartition\"))\n\"\"\"\nfunction PCGAMGSetRepartition(petsclib::PetscLibType, pc::PC, n::PetscBool) end\n\n@for_petsc function PCGAMGSetRepartition(petsclib::$UnionPetscLib, pc::PC, n::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetRepartition, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetUseSAEstEig(petsclib::PetscLibType,pc::PC, b::PetscBool) \nUse the eigen estimate from smoothed aggregation for the Chebyshev smoother during the solution process\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `b`  - flag\n\nOptions Database Key:\n- `-pc_gamg_use_sa_esteig <true,false>` - use the eigen estimate\n\nLevel: advanced\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `KSPChebyshevSetEigenvalues()`, `KSPChebyshevEstEigSet()`, `PCGAMGSetRecomputeEstEig()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetUseSAEstEig\"))\n\"\"\"\nfunction PCGAMGSetUseSAEstEig(petsclib::PetscLibType, pc::PC, b::PetscBool) end\n\n@for_petsc function PCGAMGSetUseSAEstEig(petsclib::$UnionPetscLib, pc::PC, b::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetUseSAEstEig, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetRecomputeEstEig(petsclib::PetscLibType,pc::PC, b::PetscBool) \nSet flag for Chebyshev smoothers to recompute the eigen estimates when a new matrix is used\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `b`  - flag, default is `PETSC_TRUE`\n\nOptions Database Key:\n- `-pc_gamg_recompute_esteig <true>` - use the eigen estimate\n\nLevel: advanced\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `KSPChebyshevSetEigenvalues()`, `KSPChebyshevEstEigSet()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetRecomputeEstEig\"))\n\"\"\"\nfunction PCGAMGSetRecomputeEstEig(petsclib::PetscLibType, pc::PC, b::PetscBool) end\n\n@for_petsc function PCGAMGSetRecomputeEstEig(petsclib::$UnionPetscLib, pc::PC, b::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetRecomputeEstEig, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetEigenvalues(petsclib::PetscLibType,pc::PC, emax::PetscReal, emin::PetscReal) \nSet WHAT eigenvalues WHY?\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `emax` - max eigenvalue\n- `emin` - min eigenvalue\n\nOptions Database Key:\n- `-pc_gamg_eigenvalues <emin,emax>` - estimates of the eigenvalues\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetUseSAEstEig()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetEigenvalues\"))\n\"\"\"\nfunction PCGAMGSetEigenvalues(petsclib::PetscLibType, pc::PC, emax::PetscReal, emin::PetscReal) end\n\n@for_petsc function PCGAMGSetEigenvalues(petsclib::$UnionPetscLib, pc::PC, emax::$PetscReal, emin::$PetscReal )\n\n    @chk ccall(\n               (:PCGAMGSetEigenvalues, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal, $PetscReal),\n               pc, emax, emin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetReuseInterpolation(petsclib::PetscLibType,pc::PC, n::PetscBool) \nReuse prolongation when rebuilding a `PCGAMG` algebraic multigrid preconditioner\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `n`  - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n- `-pc_gamg_reuse_interpolation <true,false>` - reuse the previous interpolation\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetReuseInterpolation\"))\n\"\"\"\nfunction PCGAMGSetReuseInterpolation(petsclib::PetscLibType, pc::PC, n::PetscBool) end\n\n@for_petsc function PCGAMGSetReuseInterpolation(petsclib::$UnionPetscLib, pc::PC, n::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetReuseInterpolation, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGASMSetUseAggs(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nHave the `PCGAMG` smoother on each level use `PCASM` where the aggregates defined by the coarsening process are\nthe subdomains for the additive Schwarz preconditioner used as the smoother\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - `PETSC_TRUE` to use aggregates, `PETSC_FALSE` to not\n\nOptions Database Key:\n- `-pc_gamg_asm_use_agg <true,false>` - use aggregates to define the additive Schwarz subdomains\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCASM`, `PCSetType`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGASMSetUseAggs\"))\n\"\"\"\nfunction PCGAMGASMSetUseAggs(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCGAMGASMSetUseAggs(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGASMSetUseAggs, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetParallelCoarseGridSolve(petsclib::PetscLibType,pc::PC, flg::PetscBool) \nallow a parallel coarse grid solver\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - `PETSC_TRUE` to not force coarse grid onto one processor\n\nOptions Database Key:\n- `-pc_gamg_parallel_coarse_grid_solver` - use a parallel coarse grid solver\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetCoarseGridLayoutType()`, `PCGAMGSetCpuPinCoarseGrids()`, `PCGAMGSetRankReductionFactors()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetParallelCoarseGridSolve\"))\n\"\"\"\nfunction PCGAMGSetParallelCoarseGridSolve(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCGAMGSetParallelCoarseGridSolve(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetParallelCoarseGridSolve, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetCpuPinCoarseGrids(petsclib::PetscLibType,pc::PC, flg::PetscBool) \npin the coarse grids created in `PCGAMG` to run only on the CPU since the problems may be too small to run efficiently on the GPUs\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - `PETSC_TRUE` to pin coarse grids to the CPU\n\nOptions Database Key:\n- `-pc_gamg_cpu_pin_coarse_grids` - pin the coarse grids to the CPU\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetCoarseGridLayoutType()`, `PCGAMGSetParallelCoarseGridSolve()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetCpuPinCoarseGrids\"))\n\"\"\"\nfunction PCGAMGSetCpuPinCoarseGrids(petsclib::PetscLibType, pc::PC, flg::PetscBool) end\n\n@for_petsc function PCGAMGSetCpuPinCoarseGrids(petsclib::$UnionPetscLib, pc::PC, flg::PetscBool )\n\n    @chk ccall(\n               (:PCGAMGSetCpuPinCoarseGrids, $petsc_library),\n               PetscErrorCode,\n               (PC, PetscBool),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetCoarseGridLayoutType(petsclib::PetscLibType,pc::PC, flg::PCGAMGLayoutType) \nplace coarse grids on processors with natural order (compact type)\n\nCollective\n\nInput Parameters:\n- `pc`  - the preconditioner context\n- `flg` - `PCGAMGLayoutType` type, either `PCGAMG_LAYOUT_COMPACT` or `PCGAMG_LAYOUT_SPREAD`\n\nOptions Database Key:\n- `-pc_gamg_coarse_grid_layout_type` - place the coarse grids with natural ordering\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetParallelCoarseGridSolve()`, `PCGAMGSetCpuPinCoarseGrids()`, `PCGAMGLayoutType`, `PCGAMG_LAYOUT_COMPACT`, `PCGAMG_LAYOUT_SPREAD`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetCoarseGridLayoutType\"))\n\"\"\"\nfunction PCGAMGSetCoarseGridLayoutType(petsclib::PetscLibType, pc::PC, flg::PCGAMGLayoutType) end\n\n@for_petsc function PCGAMGSetCoarseGridLayoutType(petsclib::$UnionPetscLib, pc::PC, flg::PCGAMGLayoutType )\n\n    @chk ccall(\n               (:PCGAMGSetCoarseGridLayoutType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCGAMGLayoutType),\n               pc, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetNlevels(petsclib::PetscLibType,pc::PC, n::PetscInt) \nSets the maximum number of levels `PCGAMG` will use\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner\n- `n`  - the maximum number of levels to use\n\nOptions Database Key:\n- `-pc_mg_levels <n>` - set the maximum number of levels to allow\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetNlevels\"))\n\"\"\"\nfunction PCGAMGSetNlevels(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCGAMGSetNlevels(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGSetNlevels, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGASMSetHEM(petsclib::PetscLibType,pc::PC, n::PetscInt) \nSets the number of HEM matching passed\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner\n- `n`  - number of HEM matching passed to construct ASM subdomains\n\nOptions Database Key:\n- `-pc_gamg_asm_hem <n>` - set the number of HEM matching passed\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGASMSetHEM\"))\n\"\"\"\nfunction PCGAMGASMSetHEM(petsclib::PetscLibType, pc::PC, n::PetscInt) end\n\n@for_petsc function PCGAMGASMSetHEM(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGASMSetHEM, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt),\n               pc, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetThreshold(petsclib::PetscLibType,pc::PC, v::Vector{PetscReal}, n::PetscInt) \nRelative threshold to use for dropping edges in aggregation graph\n\nNot Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `v`  - array of threshold values for finest n levels; 0.0 means keep all nonzero entries in the graph; negative means keep even zero entries in the graph\n- `n`  - number of threshold values provided in array\n\nOptions Database Key:\n- `-pc_gamg_threshold <threshold>` - the threshold to drop edges\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetAggressiveLevels()`, `PCGAMGMISkSetAggressive()`, `PCGAMGSetMinDegreeOrderingMISk()`, `PCGAMGSetThresholdScale()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetThreshold\"))\n\"\"\"\nfunction PCGAMGSetThreshold(petsclib::PetscLibType, pc::PC, v::Vector{PetscReal}, n::PetscInt) end\n\n@for_petsc function PCGAMGSetThreshold(petsclib::$UnionPetscLib, pc::PC, v::Vector{$PetscReal}, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGSetThreshold, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscReal}, $PetscInt),\n               pc, v, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetRankReductionFactors(petsclib::PetscLibType,pc::PC, v::Vector{PetscInt}, n::PetscInt) \nSet a manual schedule for MPI rank reduction on coarse grids\n\nCollective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `v`  - array of reduction factors. 0 for first value forces a reduction to one process/device on first level in CUDA\n- `n`  - number of values provided in array\n\nOptions Database Key:\n- `-pc_gamg_rank_reduction_factors <factors>` - provide the schedule\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetProcEqLim()`, `PCGAMGSetCoarseEqLim()`, `PCGAMGSetParallelCoarseGridSolve()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetRankReductionFactors\"))\n\"\"\"\nfunction PCGAMGSetRankReductionFactors(petsclib::PetscLibType, pc::PC, v::Vector{PetscInt}, n::PetscInt) end\n\n@for_petsc function PCGAMGSetRankReductionFactors(petsclib::$UnionPetscLib, pc::PC, v::Vector{$PetscInt}, n::$PetscInt )\n\n    @chk ccall(\n               (:PCGAMGSetRankReductionFactors, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{$PetscInt}, $PetscInt),\n               pc, v, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetThresholdScale(petsclib::PetscLibType,pc::PC, v::PetscReal) \nRelative threshold reduction at each level\n\nNot Collective\n\nInput Parameters:\n- `pc` - the preconditioner context\n- `v`  - the threshold value reduction, usually < 1.0\n\nOptions Database Key:\n- `-pc_gamg_threshold_scale <v>` - set the relative threshold reduction on each level\n\nLevel: advanced\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetThreshold()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetThresholdScale\"))\n\"\"\"\nfunction PCGAMGSetThresholdScale(petsclib::PetscLibType, pc::PC, v::PetscReal) end\n\n@for_petsc function PCGAMGSetThresholdScale(petsclib::$UnionPetscLib, pc::PC, v::$PetscReal )\n\n    @chk ccall(\n               (:PCGAMGSetThresholdScale, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscReal),\n               pc, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGSetType(petsclib::PetscLibType,pc::PC, type::PCGAMGType) \nSet the type of algorithm `PCGAMG` should use\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - `PCGAMGAGG`, `PCGAMGGEO`, or `PCGAMGCLASSICAL`\n\nOptions Database Key:\n- `-pc_gamg_type <agg,geo,classical>` - type of algebraic multigrid to apply - only agg is supported\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMGGetType()`, `PCGAMG`, `PCGAMGType`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetType\"))\n\"\"\"\nfunction PCGAMGSetType(petsclib::PetscLibType, pc::PC, type::PCGAMGType) end\n\n@for_petsc function PCGAMGSetType(petsclib::$UnionPetscLib, pc::PC, type::PCGAMGType )\n\n    @chk ccall(\n               (:PCGAMGSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCGAMGType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCGAMGType = PCGAMGGetType(petsclib::PetscLibType,pc::PC) \nGet the type of algorithm `PCGAMG` will use\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - the type of algorithm used\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), [](ch_ksp), `PCGAMG`, `PCGAMGSetType()`, `PCGAMGType`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGGetType\"))\n\"\"\"\nfunction PCGAMGGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGAMGGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCGAMGType}()\n\n    @chk ccall(\n               (:PCGAMGGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCGAMGType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCGAMGSetInjectionIndex(petsclib::PetscLibType,pc::PC, n::PetscInt, idx::Vector{PetscInt}) \nArray of subset of variables per vertex to inject into coarse grid space\n\nLogically Collective\n\nInput Parameters:\n- `pc`  - the coarsen context\n- `n`   - number of indices\n- `idx` - array of indices\n\nOptions Database Key:\n- `-pc_gamg_injection_index` - array of subset of variables per vertex to use for injection coarse grid space\n\nLevel: intermediate\n\n-seealso: [the Users Manual section on PCGAMG](sec_amg), [the Users Manual section on PCMG](sec_mg), `PCGAMG`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGSetInjectionIndex\"))\n\"\"\"\nfunction PCGAMGSetInjectionIndex(petsclib::PetscLibType, pc::PC, n::PetscInt, idx::Vector{PetscInt}) end\n\n@for_petsc function PCGAMGSetInjectionIndex(petsclib::$UnionPetscLib, pc::PC, n::$PetscInt, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PCGAMGSetInjectionIndex, $petsc_library),\n               PetscErrorCode,\n               (PC, $PetscInt, Ptr{$PetscInt}),\n               pc, n, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PCGAMG` package. It is called\nfrom `PCInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGInitializePackage\"))\n\"\"\"\nfunction PCGAMGInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCGAMGInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCGAMGInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGFinalizePackage(petsclib::PetscLibType) \nThis function frees everything from the `PCGAMG` package. It is\ncalled from `PetscFinalize()` automatically.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGFinalizePackage\"))\n\"\"\"\nfunction PCGAMGFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCGAMGFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCGAMGFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCGAMGRegister(petsclib::PetscLibType,type::PCGAMGType, create::external) \nRegister a `PCGAMG` implementation.\n\nInput Parameters:\n- `type`   - string that will be used as the name of the `PCGAMG` type.\n- `create` - function for creating the gamg context.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PCGAMGType`, `PCGAMG`, `PCGAMGSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGRegister\"))\n\"\"\"\nfunction PCGAMGRegister(petsclib::PetscLibType, type::PCGAMGType, create::external) end\n\n@for_petsc function PCGAMGRegister(petsclib::$UnionPetscLib, type::PCGAMGType, create::external )\n\n    @chk ccall(\n               (:PCGAMGRegister, $petsc_library),\n               PetscErrorCode,\n               (PCGAMGType, external),\n               type, create,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tG::PetscMat = PCGAMGCreateGraph(petsclib::PetscLibType,pc::PC, A::PetscMat) \nCreates a graph that is used by the `PCGAMGType` in the coarsening process\n\nInput Parameters:\n- `pc` - the `PCGAMG`\n- `A`  - the matrix, for any level\n\nOutput Parameter:\n- `G` - the graph\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `PCGAMGType`, `PCGAMG`, `PCGAMGSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGCreateGraph\"))\n\"\"\"\nfunction PCGAMGCreateGraph(petsclib::PetscLibType, pc::PC, A::PetscMat) end\n\n@for_petsc function PCGAMGCreateGraph(petsclib::$UnionPetscLib, pc::PC, A::PetscMat )\n\tG_ = Ref{CMat}()\n\n    @chk ccall(\n               (:PCGAMGCreateGraph, $petsc_library),\n               PetscErrorCode,\n               (PC, CMat, Ptr{CMat}),\n               pc, A, G_,\n              )\n\n\tG = PetscMat(G_[], petsclib)\n\n\treturn G\nend \n\n\"\"\"\n\tPCGAMGClassicalSetType(petsclib::PetscLibType,pc::PC, type::PCGAMGClassicalType) \nSets the type of classical interpolation to use with `PCGAMG`\n\nCollective\n\nInput Parameters:\n- `pc`   - the preconditioner context\n- `type` - the interpolation to use, see `PCGAMGClassicalType()`\n\nOptions Database Key:\n- `-pc_gamg_classical_type <direct,standard>` - set type of classical AMG prolongation\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCGAMG`, `PCGAMGClassicalType`, `PCGAMGClassicalGetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGClassicalSetType\"))\n\"\"\"\nfunction PCGAMGClassicalSetType(petsclib::PetscLibType, pc::PC, type::PCGAMGClassicalType) end\n\n@for_petsc function PCGAMGClassicalSetType(petsclib::$UnionPetscLib, pc::PC, type::PCGAMGClassicalType )\n\n    @chk ccall(\n               (:PCGAMGClassicalSetType, $petsc_library),\n               PetscErrorCode,\n               (PC, PCGAMGClassicalType),\n               pc, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCGAMGClassicalType = PCGAMGClassicalGetType(petsclib::PetscLibType,pc::PC) \nGets the type of classical interpolation to use with `PCGAMG`\n\nCollective\n\nInput Parameter:\n- `pc` - the preconditioner context\n\nOutput Parameter:\n- `type` - the type used, see `PCGAMGClassicalType()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `PCGAMG`, `PCGAMGClassicalType`, `PCGAMGClassicalSetType()`\n\n# External Links\n$(_doc_external(\"Ksp/PCGAMGClassicalGetType\"))\n\"\"\"\nfunction PCGAMGClassicalGetType(petsclib::PetscLibType, pc::PC) end\n\n@for_petsc function PCGAMGClassicalGetType(petsclib::$UnionPetscLib, pc::PC )\n\ttype_ = Ref{PCGAMGClassicalType}()\n\n    @chk ccall(\n               (:PCGAMGClassicalGetType, $petsc_library),\n               PetscErrorCode,\n               (PC, Ptr{PCGAMGClassicalType}),\n               pc, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPCFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `PC` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscFinalize()`, `PCInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ksp/PCFinalizePackage\"))\n\"\"\"\nfunction PCFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PC` package. It is called\nfrom `PetscDLLibraryRegister_petscksp()` when using dynamic libraries, and on the first call to `PCCreate()`\nwhen using shared static libraries.\n\nLevel: developer\n\n-seealso: [](ch_ksp), `PetscInitialize()`, `PCFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ksp/PCInitializePackage\"))\n\"\"\"\nfunction PCInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PCInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PCInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPCMPIServerAddressesDestroy(petsclib::PetscLibType,ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Sys/PCMPIServerAddressesDestroy\"))\n\"\"\"\nfunction PCMPIServerAddressesDestroy(petsclib::PetscLibType, ctx::Cvoid) end\n\n@for_petsc function PCMPIServerAddressesDestroy(petsclib::$UnionPetscLib, ctx::Cvoid )\n\n    @chk ccall(\n               (:PCMPIServerAddressesDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cvoid,),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PF_wrappers.jl",
    "content": "# autodefined type arguments for class ------\n# -------------------------------------------------------\n\"\"\"\n\tPFSet(petsclib::PetscLibType,pf::PF, apply::external, applyvec::external, view::external, destroy::external, ctx::Cvoid) \nSets the C/C++/Fortran functions to be used by the PF function\n\nCollective\n\nInput Parameters:\n- `pf`       - the function context\n- `apply`    - function to apply to an array\n- `applyvec` - function to apply to a Vec\n- `view`     - function that prints information about the `PF`\n- `destroy`  - function to free the private function context\n- `ctx`      - private function context\n\nLevel: beginner\n\n-seealso: `PF`, `PFCreate()`, `PFDestroy()`, `PFSetType()`, `PFApply()`, `PFApplyVec()`\n\n# External Links\n$(_doc_external(\"Vec/PFSet\"))\n\"\"\"\nfunction PFSet(petsclib::PetscLibType, pf::PF, apply::external, applyvec::external, view::external, destroy::external, ctx::Cvoid) end\n\n@for_petsc function PFSet(petsclib::$UnionPetscLib, pf::PF, apply::external, applyvec::external, view::external, destroy::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PFSet, $petsc_library),\n               PetscErrorCode,\n               (CPF, external, external, external, external, Ptr{Cvoid}),\n               pf, apply, applyvec, view, destroy, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPFDestroy(petsclib::PetscLibType,pf::PF) \nDestroys `PF` context that was created with `PFCreate()`.\n\nCollective\n\nInput Parameter:\n- `pf` - the function context\n\nLevel: beginner\n\n-seealso: `PF`, `PFCreate()`, `PFSet()`, `PFSetType()`\n\n# External Links\n$(_doc_external(\"Vec/PFDestroy\"))\n\"\"\"\nfunction PFDestroy(petsclib::PetscLibType, pf::PF) end\n\n@for_petsc function PFDestroy(petsclib::$UnionPetscLib, pf::PF )\n\tpf_ = Ref(pf.ptr)\n\n    @chk ccall(\n               (:PFDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CPF},),\n               pf_,\n              )\n\n\tpf.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tpf::PF = PFCreate(petsclib::PetscLibType,comm::MPI_Comm, dimin::PetscInt, dimout::PetscInt) \nCreates a mathematical function context.\n\nCollective\n\nInput Parameters:\n- `comm`   - MPI communicator\n- `dimin`  - dimension of the space you are mapping from\n- `dimout` - dimension of the space you are mapping to\n\nOutput Parameter:\n- `pf` - the function context\n\nLevel: developer\n\n-seealso: `PF`, `PFSet()`, `PFApply()`, `PFDestroy()`, `PFApplyVec()`\n\n# External Links\n$(_doc_external(\"Vec/PFCreate\"))\n\"\"\"\nfunction PFCreate(petsclib::PetscLibType, comm::MPI_Comm, dimin::PetscInt, dimout::PetscInt) end\n\n@for_petsc function PFCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, dimin::$PetscInt, dimout::$PetscInt )\n\tpf_ = Ref{CPF}()\n\n    @chk ccall(\n               (:PFCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CPF}),\n               comm, dimin, dimout, pf_,\n              )\n\n\tpf = PF(pf_[], petsclib)\n\n\treturn pf\nend \n\n\"\"\"\n\tPFApplyVec(petsclib::PetscLibType,pf::PF, x::PetscVec, y::PetscVec) \nApplies the mathematical function to a vector\n\nCollective\n\nInput Parameters:\n- `pf` - the function context\n- `x`  - input vector (or `NULL` for the vector (0,1, .... N-1)\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: beginner\n\n-seealso: `PF`, `PFApply()`, `PFCreate()`, `PFDestroy()`, `PFSetType()`, `PFSet()`\n\n# External Links\n$(_doc_external(\"Vec/PFApplyVec\"))\n\"\"\"\nfunction PFApplyVec(petsclib::PetscLibType, pf::PF, x::PetscVec, y::PetscVec) end\n\n@for_petsc function PFApplyVec(petsclib::$UnionPetscLib, pf::PF, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:PFApplyVec, $petsc_library),\n               PetscErrorCode,\n               (CPF, CVec, CVec),\n               pf, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ty::PetscScalar = PFApply(petsclib::PetscLibType,pf::PF, n::PetscInt, x::PetscScalar) \nApplies the mathematical function to an array of values.\n\nCollective\n\nInput Parameters:\n- `pf` - the function context\n- `n`  - number of pointwise function evaluations to perform, each pointwise function evaluation\nis a function of dimin variables and computes dimout variables where dimin and dimout are defined\nin the call to `PFCreate()`\n- `x`  - input array\n\nOutput Parameter:\n- `y` - output array\n\nLevel: beginner\n\n-seealso: `PF`, `PFApplyVec()`, `PFCreate()`, `PFDestroy()`, `PFSetType()`, `PFSet()`\n\n# External Links\n$(_doc_external(\"Vec/PFApply\"))\n\"\"\"\nfunction PFApply(petsclib::PetscLibType, pf::PF, n::PetscInt, x::PetscScalar) end\n\n@for_petsc function PFApply(petsclib::$UnionPetscLib, pf::PF, n::$PetscInt, x::$PetscScalar )\n\ty_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PFApply, $petsc_library),\n               PetscErrorCode,\n               (CPF, $PetscInt, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               pf, n, x, y_,\n              )\n\n\ty = y_[]\n\n\treturn y\nend \n\n\"\"\"\n\tPFViewFromOptions(petsclib::PetscLibType,A::PF, obj::PetscObject, name::String) \nView a `PF` based on options set in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PF` context\n- `obj`  - Optional object that provides the prefix used to search the options database\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: `PF`, `PFView`, `PetscObjectViewFromOptions()`, `PFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PFViewFromOptions\"))\n\"\"\"\nfunction PFViewFromOptions(petsclib::PetscLibType, A::PF, obj::PetscObject, name::String) end\n\n@for_petsc function PFViewFromOptions(petsclib::$UnionPetscLib, A::PF, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PFViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CPF, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPFView(petsclib::PetscLibType,pf::PF, viewer::PetscViewer) \nPrints information about a mathematical function\n\nCollective unless `viewer` is `PETSC_VIEWER_STDOUT_SELF`\n\nInput Parameters:\n- `pf`     - the `PF` context\n- `viewer` - optional visualization context\n\nLevel: developer\n\n-seealso: `PF`, `PetscViewerCreate()`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Vec/PFView\"))\n\"\"\"\nfunction PFView(petsclib::PetscLibType, pf::PF, viewer::PetscViewer) end\n\n@for_petsc function PFView(petsclib::$UnionPetscLib, pf::PF, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PFView, $petsc_library),\n               PetscErrorCode,\n               (CPF, PetscViewer),\n               pf, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPFRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a method to the mathematical function package.\n\nNot Collective\n\nInput Parameters:\n- `sname`    - name of a new user-defined solver\n- `function` - routine to create method context\n\n-seealso: `PF`, `PFRegisterAll()`, `PFRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/PFRegister\"))\n\"\"\"\nfunction PFRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PFRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PFRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PFType = PFGetType(petsclib::PetscLibType,pf::PF) \nGets the `PFType` name (as a string) from the `PF`\ncontext.\n\nNot Collective\n\nInput Parameter:\n- `pf` - the function context\n\nOutput Parameter:\n- `type` - name of function\n\nLevel: intermediate\n\n-seealso: `PF`, `PFSetType()`\n\n# External Links\n$(_doc_external(\"Vec/PFGetType\"))\n\"\"\"\nfunction PFGetType(petsclib::PetscLibType, pf::PF) end\n\n@for_petsc function PFGetType(petsclib::$UnionPetscLib, pf::PF )\n\ttype_ = Ref{PFType}()\n\n    @chk ccall(\n               (:PFGetType, $petsc_library),\n               PetscErrorCode,\n               (CPF, Ptr{PFType}),\n               pf, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPFSetType(petsclib::PetscLibType,pf::PF, type::PFType, ctx::Cvoid) \nBuilds `PF` for a particular function\n\nCollective\n\nInput Parameters:\n- `pf`   - the function context.\n- `type` - a known method\n- `ctx`  - optional type dependent context\n\nOptions Database Key:\n- `-pf_type <type>` - Sets PF type\n\nLevel: intermediate\n\n-seealso: `PF`, `PFSet()`, `PFRegister()`, `PFCreate()`, `DMDACreatePF()`\n\n# External Links\n$(_doc_external(\"Vec/PFSetType\"))\n\"\"\"\nfunction PFSetType(petsclib::PetscLibType, pf::PF, type::PFType, ctx::Cvoid) end\n\n@for_petsc function PFSetType(petsclib::$UnionPetscLib, pf::PF, type::PFType, ctx::Cvoid )\n\n    @chk ccall(\n               (:PFSetType, $petsc_library),\n               PetscErrorCode,\n               (CPF, PFType, Ptr{Cvoid}),\n               pf, type, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPFSetFromOptions(petsclib::PetscLibType,pf::PF) \nSets `PF` options from the options database.\n\nCollective\n\nInput Parameters:\n- `pf` - the mathematical function context\n\nLevel: intermediate\n\n-seealso: `PF`\n\n# External Links\n$(_doc_external(\"Vec/PFSetFromOptions\"))\n\"\"\"\nfunction PFSetFromOptions(petsclib::PetscLibType, pf::PF) end\n\n@for_petsc function PFSetFromOptions(petsclib::$UnionPetscLib, pf::PF )\n\n    @chk ccall(\n               (:PFSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CPF,),\n               pf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPFFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the PETSc `PF` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PF`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Vec/PFFinalizePackage\"))\n\"\"\"\nfunction PFFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PFFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PFFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPFInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PF` package. It is called\nfrom PetscDLLibraryRegister_petscvec() when using dynamic libraries, and on the first call to `PFCreate()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PF`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Vec/PFInitializePackage\"))\n\"\"\"\nfunction PFInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PFInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PFInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPFStringSetFunction(petsclib::PetscLibType,pf::PF, string::String) \nCreates a function from a string\n\nCollective\n\nInput Parameters:\n- `pf`     - the function object\n- `string` - the string that defines the function\n\nLevel: intermediate\n\n-seealso: `PFSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Vec/PFStringSetFunction\"))\n\"\"\"\nfunction PFStringSetFunction(petsclib::PetscLibType, pf::PF, string::String) end\n\n@for_petsc function PFStringSetFunction(petsclib::$UnionPetscLib, pf::PF, string::String )\n\n    @chk ccall(\n               (:PFStringSetFunction, $petsc_library),\n               PetscErrorCode,\n               (CPF, Ptr{Cchar}),\n               pf, string,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscBag_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscBag end\nconst PetscBag = Ptr{_n_PetscBag}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\n# -------------------------------------------------------\n\"\"\"\n\tPetscBagRegisterEnum(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, list::Cchar, mdefault::PetscEnum, name::String, help::String) \nadd an enum value to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`      - the bag of values\n- `addr`     - location of enum in struct, for example `&params->dt`\n- `list`     - array of strings containing names of enum values followed by enum name followed by enum prefix\n- `mdefault` - the initial value, cast with (`PetscEnum`)\n- `name`     - the name of the item\n- `help`     - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterEnum\"))\n\"\"\"\nfunction PetscBagRegisterEnum(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, list::Cchar, mdefault::PetscEnum, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterEnum(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, list::Cchar, mdefault::PetscEnum, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterEnum, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, Cchar, PetscEnum, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, list, mdefault, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterIntArray(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, msize::PetscInt, name::String, help::String) \nadd a `PetscInt` array to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`   - the bag of values\n- `addr`  - location of integer in struct, for example `&params->i`\n- `msize` - number of entries in array\n- `name`  - name of the array\n- `help`  - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterIntArray\"))\n\"\"\"\nfunction PetscBagRegisterIntArray(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, msize::PetscInt, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterIntArray(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, msize::$PetscInt, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterIntArray, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscInt, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, msize, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterRealArray(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, msize::PetscInt, name::String, help::String) \nadd a `PetscReal` array to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`   - the bag of values\n- `addr`  - location of real array in struct, for example `&params->d`\n- `msize` - number of entries in the array\n- `name`  - name of the array\n- `help`  - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterRealArray\"))\n\"\"\"\nfunction PetscBagRegisterRealArray(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, msize::PetscInt, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterRealArray(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, msize::$PetscInt, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterRealArray, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscInt, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, msize, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterInt(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, mdefault::PetscInt, name::String, help::String) \nadd a `PetscInt` value to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`      - the bag of values\n- `addr`     - location of integer in struct, for example `&params->i`\n- `mdefault` - the initial value\n- `name`     - name of the integer\n- `help`     - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt64()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterInt\"))\n\"\"\"\nfunction PetscBagRegisterInt(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, mdefault::PetscInt, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterInt(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, mdefault::$PetscInt, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterInt, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscInt, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, mdefault, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterInt64(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, mdefault::PetscInt64, name::String, help::String) \nadd a `PetscInt64` value to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`      - the bag of values\n- `addr`     - location of integer in struct, for example `&params->i`\n- `mdefault` - the initial value\n- `name`     - name of the integer\n- `help`     - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterInt64\"))\n\"\"\"\nfunction PetscBagRegisterInt64(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, mdefault::PetscInt64, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterInt64(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, mdefault::$PetscInt64, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterInt64, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscInt64, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, mdefault, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterBoolArray(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, msize::PetscInt, name::String, help::String) \nadd a n `PetscBool` values to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`   - the bag of values\n- `addr`  - location of boolean array in struct, for example `&params->b`\n- `msize` - number of entries in array\n- `name`  - name of the boolean array\n- `help`  - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterBoolArray\"))\n\"\"\"\nfunction PetscBagRegisterBoolArray(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, msize::PetscInt, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterBoolArray(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, msize::$PetscInt, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterBoolArray, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscInt, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, msize, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterString(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, msize::PetscInt, mdefault::String, name::String, help::String) \nadd a string value to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`      - the bag of values\n- `addr`     - location of start of string in struct, for example `&params->mystring`\n- `msize`    - length of the string space in the struct\n- `mdefault` - the initial value\n- `name`     - name of the string\n- `help`     - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterString\"))\n\"\"\"\nfunction PetscBagRegisterString(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, msize::PetscInt, mdefault::String, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterString(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, msize::$PetscInt, mdefault::String, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterString, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscInt, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, msize, mdefault, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterReal(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, mdefault::PetscReal, name::String, help::String) \nadd a `PetscReal` value to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`      - the bag of values\n- `addr`     - location of `PetscReal` in struct, for example `&params->r`\n- `mdefault` - the initial value\n- `name`     - name of the variable\n- `help`     - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterReal\"))\n\"\"\"\nfunction PetscBagRegisterReal(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, mdefault::PetscReal, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterReal(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, mdefault::$PetscReal, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterReal, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscReal, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, mdefault, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterScalar(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, mdefault::PetscScalar, name::String, help::String) \nadd a `PetscScalar` value to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`      - the bag of values\n- `addr`     - location of `PetscScalar` in struct, for example `&params->c`\n- `mdefault` - the initial value\n- `name`     - name of the variable\n- `help`     - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagSetFromOptions()`,\n`PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterScalar\"))\n\"\"\"\nfunction PetscBagRegisterScalar(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, mdefault::PetscScalar, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterScalar(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, mdefault::$PetscScalar, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterScalar, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, $PetscScalar, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, mdefault, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagRegisterBool(petsclib::PetscLibType,bag::PetscBag, addr::Cvoid, mdefault::PetscBool, name::String, help::String) \nadd a `PetscBool` to a `PetscBag`\n\nLogically Collective\n\nInput Parameters:\n- `bag`      - the bag of values\n- `addr`     - location of `PetscBool` in struct, for example `&params->b`\n- `mdefault` - the initial value, either `PETSC_FALSE` or `PETSC_TRUE`\n- `name`     - name of the variable\n- `help`     - longer string with more information about the value\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterInt()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagRegisterBool\"))\n\"\"\"\nfunction PetscBagRegisterBool(petsclib::PetscLibType, bag::PetscBag, addr::Cvoid, mdefault::PetscBool, name::String, help::String) end\n\n@for_petsc function PetscBagRegisterBool(petsclib::$UnionPetscLib, bag::PetscBag, addr::Cvoid, mdefault::PetscBool, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagRegisterBool, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cvoid}, PetscBool, Ptr{Cchar}, Ptr{Cchar}),\n               bag, addr, mdefault, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagDestroy(petsclib::PetscLibType,bag::PetscBag) \nDestroys a `PetscBag`\n\nCollective\n\nInput Parameter:\n- `bag` - the bag of values\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagDestroy\"))\n\"\"\"\nfunction PetscBagDestroy(petsclib::PetscLibType, bag::PetscBag) end\n\n@for_petsc function PetscBagDestroy(petsclib::$UnionPetscLib, bag::PetscBag )\n\n    @chk ccall(\n               (:PetscBagDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBag},),\n               bag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagSetFromOptions(petsclib::PetscLibType,bag::PetscBag) \nAllows setting entries to a `PetscBag` using the options database\n\nCollective\n\nInput Parameter:\n- `bag` - the bag of values\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagDestroy()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagCreate()`, `PetscBagGetName()`, `PetscBagView()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagSetFromOptions\"))\n\"\"\"\nfunction PetscBagSetFromOptions(petsclib::PetscLibType, bag::PetscBag) end\n\n@for_petsc function PetscBagSetFromOptions(petsclib::$UnionPetscLib, bag::PetscBag )\n\n    @chk ccall(\n               (:PetscBagSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscBag,),\n               bag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagView(petsclib::PetscLibType,bag::PetscBag, view::PetscViewer) \nViews a bag of values as either ASCII text or a binary file\n\nCollective\n\nInput Parameters:\n- `bag`  - the bag of values\n- `view` - location to view the values\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagDestroy()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`, `PetscBagRegisterEnum()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagView\"))\n\"\"\"\nfunction PetscBagView(petsclib::PetscLibType, bag::PetscBag, view::PetscViewer) end\n\n@for_petsc function PetscBagView(petsclib::$UnionPetscLib, bag::PetscBag, view::PetscViewer )\n\n    @chk ccall(\n               (:PetscBagView, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, PetscViewer),\n               bag, view,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagViewFromOptions(petsclib::PetscLibType,bag::PetscBag, bobj::PetscObject, optionname::String) \nProcesses command line options to determine if/how a `PetscBag` is to be viewed.\n\nCollective\n\nInput Parameters:\n- `bag`        - the object\n- `bobj`       - optional other object that provides prefix (if `NULL` then the prefix in obj is used)\n- `optionname` - option to activate viewing\n\nLevel: intermediate\n\n-seealso: `PetscBagCreate()`, `PetscBag`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagViewFromOptions\"))\n\"\"\"\nfunction PetscBagViewFromOptions(petsclib::PetscLibType, bag::PetscBag, bobj::PetscObject, optionname::String) end\n\n@for_petsc function PetscBagViewFromOptions(petsclib::$UnionPetscLib, bag::PetscBag, bobj::PetscObject, optionname::String )\n\n    @chk ccall(\n               (:PetscBagViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, PetscObject, Ptr{Cchar}),\n               bag, bobj, optionname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagLoad(petsclib::PetscLibType,view::PetscViewer, bag::PetscBag) \nLoads a bag of values from a binary file\n\nCollective\n\nInput Parameters:\n- `view` - file to load values from\n- `bag`  - the bag of values\n\nLevel: beginner\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagDestroy()`, `PetscBagView()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagGetName()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagLoad\"))\n\"\"\"\nfunction PetscBagLoad(petsclib::PetscLibType, view::PetscViewer, bag::PetscBag) end\n\n@for_petsc function PetscBagLoad(petsclib::$UnionPetscLib, view::PetscViewer, bag::PetscBag )\n\n    @chk ccall(\n               (:PetscBagLoad, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBag),\n               view, bag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbag::PetscBag = PetscBagCreate(petsclib::PetscLibType,comm::MPI_Comm, bagsize::Csize_t) \nCreate a bag of values. A `PetscBag` is a representation of a C struct that can be saved to and read from files,\ncan have values set from the options database\n\nCollective\n\nInput Parameters:\n- `comm`    - communicator to share bag\n- `bagsize` - size of the C structure holding the values, for example `sizeof(mystruct)`\n\nOutput Parameter:\n- `bag` - the bag of values\n\nLevel: intermediate\n\n-seealso: `PetscBag`, `PetscBagGetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagDestroy()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagCreate\"))\n\"\"\"\nfunction PetscBagCreate(petsclib::PetscLibType, comm::MPI_Comm, bagsize::Csize_t) end\n\n@for_petsc function PetscBagCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, bagsize::Csize_t )\n\tbag_ = Ref{PetscBag}()\n\n    @chk ccall(\n               (:PetscBagCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Csize_t, Ptr{PetscBag}),\n               comm, bagsize, bag_,\n              )\n\n\tbag = bag_[]\n\n\treturn bag\nend \n\n\"\"\"\n\tPetscBagSetName(petsclib::PetscLibType,bag::PetscBag, name::String, help::String) \nSets the name of a bag of values\n\nNot Collective\n\nLevel: intermediate\n\nInput Parameters:\n- `bag`  - the bag of values\n- `name` - the name assigned to the bag\n- `help` - help message for bag\n\n-seealso: `PetscBag`, `PetscBagGetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagDestroy()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagSetName\"))\n\"\"\"\nfunction PetscBagSetName(petsclib::PetscLibType, bag::PetscBag, name::String, help::String) end\n\n@for_petsc function PetscBagSetName(petsclib::$UnionPetscLib, bag::PetscBag, name::String, help::String )\n\n    @chk ccall(\n               (:PetscBagSetName, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cchar}, Ptr{Cchar}),\n               bag, name, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagGetName(petsclib::PetscLibType,bag::PetscBag, name::Cchar) \nGets the name of a bag of values\n\nNot Collective\n\nLevel: intermediate\n\nInput Parameter:\n- `bag` - the bag of values\n\nOutput Parameter:\n- `name` - the name assigned to the bag\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagDestroy()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagGetName\"))\n\"\"\"\nfunction PetscBagGetName(petsclib::PetscLibType, bag::PetscBag, name::Cchar) end\n\n@for_petsc function PetscBagGetName(petsclib::$UnionPetscLib, bag::PetscBag, name::Cchar )\n\n    @chk ccall(\n               (:PetscBagGetName, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Cchar),\n               bag, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagGetData(petsclib::PetscLibType,bag::PetscBag, data::PeCtx) \nGives back the user\ncan be used for storing user-data-structure\n\nNot Collective\n\nInput Parameter:\n- `bag` - the bag of values\n\nOutput Parameter:\n- `data` - pointer to memory that will have user-data-structure, this can be cast to a pointer of the type the C struct used in\ndefining the bag\n\nLevel: intermediate\n\n-seealso: `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagDestroy()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagGetData\"))\n\"\"\"\nfunction PetscBagGetData(petsclib::PetscLibType, bag::PetscBag, data::PeCtx) end\n\n@for_petsc function PetscBagGetData(petsclib::$UnionPetscLib, bag::PetscBag, data::PeCtx )\n\n    @chk ccall(\n               (:PetscBagGetData, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, PeCtx),\n               bag, data,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagSetOptionsPrefix(petsclib::PetscLibType,bag::PetscBag, pre::String) \nSets the prefix used for searching for all\n`PetscBag` items in the options database.\n\nLogically Collective\n\nLevel: intermediate\n\nInput Parameters:\n- `bag` - the bag of values\n- `pre` - the prefix to prepend all Bag item names with.\n\n-seealso: `PetscBag`, `PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`\n`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagDestroy()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagSetOptionsPrefix\"))\n\"\"\"\nfunction PetscBagSetOptionsPrefix(petsclib::PetscLibType, bag::PetscBag, pre::String) end\n\n@for_petsc function PetscBagSetOptionsPrefix(petsclib::$UnionPetscLib, bag::PetscBag, pre::String )\n\n    @chk ccall(\n               (:PetscBagSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Cchar}),\n               bag, pre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBagGetNames(petsclib::PetscLibType,bag::PetscBag, names::String) \nGet the names of all entries in the bag\n\nNot Collective\n\nInput Parameter:\n- `bag` - the bag of values\n\nOutput Parameter:\n- `names` - pass in an array of char pointers to hold the names. The array must be as long as the number of items in the bag.\n\nLevel: intermediate\n\n-seealso: `PetscBag`, `PetscBagGetName()`, `PetscBagSetName()`, `PetscBagCreate()`, `PetscBagGetData()`\n`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`, `PetscBagRegisterEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBagGetNames\"))\n\"\"\"\nfunction PetscBagGetNames(petsclib::PetscLibType, bag::PetscBag, names::String) end\n\n@for_petsc function PetscBagGetNames(petsclib::$UnionPetscLib, bag::PetscBag, names::String )\n\tnames_ = Ref(pointer(names))\n\n    @chk ccall(\n               (:PetscBagGetNames, $petsc_library),\n               PetscErrorCode,\n               (PetscBag, Ptr{Ptr{Cchar}}),\n               bag, names_,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscBench_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscBench end\nconst PetscBench = Ptr{_n_PetscBench}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscBenchInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscBench` package.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`, `PetscBenchCreate()`, `PetscBench`, `PetscBenchType`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchInitializePackage\"))\n\"\"\"\nfunction PetscBenchInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscBenchInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscBenchInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a benchmark test, `PetscBenchType`, to the `PetscBench` package\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new benchmark\n- `function` - routine to create benchmark\n\nLevel: advanced\n\n-seealso: `PetscBenchInitializePackage()`, `PetscBenchCreate()`, `PetscBench`, `PetscBenchType`, `PetscBenchSetType()`, `PetscBenchGetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchRegister\"))\n\"\"\"\nfunction PetscBenchRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscBenchRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscBenchRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchReset(petsclib::PetscLibType,bm::PetscBench) \nremoves all the intermediate data structures in a `PetscBench`\n\nCollective\n\nInput Parameter:\n- `bm` - the `PetscBench`\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchView()`, `PetscBenchSetFromOptions()`, `PetscBenchCreate()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchReset\"))\n\"\"\"\nfunction PetscBenchReset(petsclib::PetscLibType, bm::PetscBench) end\n\n@for_petsc function PetscBenchReset(petsclib::$UnionPetscLib, bm::PetscBench )\n\n    @chk ccall(\n               (:PetscBenchReset, $petsc_library),\n               PetscErrorCode,\n               (PetscBench,),\n               bm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchDestroy(petsclib::PetscLibType,bm::PetscBench) \nDestroys a `PetscBench`\n\nCollective\n\nInput Parameter:\n- `bm` - the `PetscBench`\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchView()`, `PetscBenchSetFromOptions()`, `PetscBenchCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchDestroy\"))\n\"\"\"\nfunction PetscBenchDestroy(petsclib::PetscLibType, bm::PetscBench) end\n\n@for_petsc function PetscBenchDestroy(petsclib::$UnionPetscLib, bm::PetscBench )\n\n    @chk ccall(\n               (:PetscBenchDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBench},),\n               bm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchSetUp(petsclib::PetscLibType,bm::PetscBench) \nsets up the `PetscBench`\n\nCollective\n\nInput Parameter:\n- `bm` - the `PetscBench`\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchView()`, `PetscBenchSetFromOptions()`, `PetscBenchCreate()`, `PetscBenchDestroy()`, `PetscBenchSetType()`,\n`PetscBenchRun()`, `PetscBenchSetSize()`, `PetscBenchGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchSetUp\"))\n\"\"\"\nfunction PetscBenchSetUp(petsclib::PetscLibType, bm::PetscBench) end\n\n@for_petsc function PetscBenchSetUp(petsclib::$UnionPetscLib, bm::PetscBench )\n\n    @chk ccall(\n               (:PetscBenchSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscBench,),\n               bm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchRun(petsclib::PetscLibType,bm::PetscBench) \nruns the `PetscBench`\n\nCollective\n\nInput Parameter:\n- `bm` - the `PetscBench`\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchView()`, `PetscBenchSetFromOptions()`, `PetscBenchCreate()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetSize()`, `PetscBenchGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchRun\"))\n\"\"\"\nfunction PetscBenchRun(petsclib::PetscLibType, bm::PetscBench) end\n\n@for_petsc function PetscBenchRun(petsclib::$UnionPetscLib, bm::PetscBench )\n\n    @chk ccall(\n               (:PetscBenchRun, $petsc_library),\n               PetscErrorCode,\n               (PetscBench,),\n               bm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchSetFromOptions(petsclib::PetscLibType,bm::PetscBench) \nSets options to a `PetscBench` using the options database\n\nCollective\n\nInput Parameter:\n- `bm` - the `PetscBench`\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchView()`, `PetscBenchRun()`, `PetscBenchCreate()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetSize()`, `PetscBenchGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchSetFromOptions\"))\n\"\"\"\nfunction PetscBenchSetFromOptions(petsclib::PetscLibType, bm::PetscBench) end\n\n@for_petsc function PetscBenchSetFromOptions(petsclib::$UnionPetscLib, bm::PetscBench )\n\n    @chk ccall(\n               (:PetscBenchSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscBench,),\n               bm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchView(petsclib::PetscLibType,bm::PetscBench, viewer::PetscViewer) \nViews a PETSc benchmark `PetscBench`\n\nCollective\n\nInput Parameters:\n- `bm`     - the `PetscBench`\n- `viewer` - location to view `bm`\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchCreate()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetSize()`, `PetscBenchGetSize()`, `PetscBenchViewFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchView\"))\n\"\"\"\nfunction PetscBenchView(petsclib::PetscLibType, bm::PetscBench, viewer::PetscViewer) end\n\n@for_petsc function PetscBenchView(petsclib::$UnionPetscLib, bm::PetscBench, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscBenchView, $petsc_library),\n               PetscErrorCode,\n               (PetscBench, PetscViewer),\n               bm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchViewFromOptions(petsclib::PetscLibType,bm::PetscBench, bobj::PetscObject, optionname::String) \nProcesses command line options to determine if/how a `PetscBench` is to be viewed.\n\nCollective\n\nInput Parameters:\n- `bm`         - the object\n- `bobj`       - optional other object that provides prefix (if `NULL` then the prefix in `bm` is used)\n- `optionname` - option to activate viewing\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchCreate()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetSize()`, `PetscBenchGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchViewFromOptions\"))\n\"\"\"\nfunction PetscBenchViewFromOptions(petsclib::PetscLibType, bm::PetscBench, bobj::PetscObject, optionname::String) end\n\n@for_petsc function PetscBenchViewFromOptions(petsclib::$UnionPetscLib, bm::PetscBench, bobj::PetscObject, optionname::String )\n\n    @chk ccall(\n               (:PetscBenchViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscBench, PetscObject, Ptr{Cchar}),\n               bm, bobj, optionname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbm::PetscBench = PetscBenchCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreate a PETSc benchmark `PetscBench` object\n\nCollective\n\nInput Parameter:\n- `comm` - communicator to share the `PetscBench`\n\nOutput Parameter:\n- `bm` - the `PetscBench`\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchViewFromOptions()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetSize()`, `PetscBenchGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchCreate\"))\n\"\"\"\nfunction PetscBenchCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscBenchCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tbm_ = Ref{PetscBench}()\n\n    @chk ccall(\n               (:PetscBenchCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscBench}),\n               comm, bm_,\n              )\n\n\tbm = bm_[]\n\n\treturn bm\nend \n\n\"\"\"\n\tPetscBenchSetOptionsPrefix(petsclib::PetscLibType,bm::PetscBench, pre::String) \nSets the prefix used for searching for all `PetscBench` items in the options database.\n\nLogically Collective\n\nInput Parameters:\n- `bm`  - the `PetscBench`\n- `pre` - the prefix to prepend all `PetscBench` option names\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchViewFromOptions()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetSize()`, `PetscBenchGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchSetOptionsPrefix\"))\n\"\"\"\nfunction PetscBenchSetOptionsPrefix(petsclib::PetscLibType, bm::PetscBench, pre::String) end\n\n@for_petsc function PetscBenchSetOptionsPrefix(petsclib::$UnionPetscLib, bm::PetscBench, pre::String )\n\n    @chk ccall(\n               (:PetscBenchSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscBench, Ptr{Cchar}),\n               bm, pre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBenchSetSize(petsclib::PetscLibType,bm::PetscBench, n::PetscInt) \nSets the size of the `PetscBench` benchmark to run\n\nLogically Collective\n\nInput Parameters:\n- `bm` - the `PetscBench`\n- `n`  - the size\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchViewFromOptions()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetOptionsPrefix()`, `PetscBenchGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchSetSize\"))\n\"\"\"\nfunction PetscBenchSetSize(petsclib::PetscLibType, bm::PetscBench, n::PetscInt) end\n\n@for_petsc function PetscBenchSetSize(petsclib::$UnionPetscLib, bm::PetscBench, n::$PetscInt )\n\n    @chk ccall(\n               (:PetscBenchSetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscBench, $PetscInt),\n               bm, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = PetscBenchGetSize(petsclib::PetscLibType,bm::PetscBench) \nGets the size of the `PetscBench` benchmark to run\n\nLogically Collective\n\nInput Parameter:\n- `bm` - the `PetscBench`\n\nOutput Parameter:\n- `n` - the size\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchViewFromOptions()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchSetType()`,\n`PetscBenchSetOptionsPrefix()`, `PetscBenchSetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchGetSize\"))\n\"\"\"\nfunction PetscBenchGetSize(petsclib::PetscLibType, bm::PetscBench) end\n\n@for_petsc function PetscBenchGetSize(petsclib::$UnionPetscLib, bm::PetscBench )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscBenchGetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscBench, Ptr{$PetscInt}),\n               bm, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tPetscBenchSetType(petsclib::PetscLibType,bm::PetscBench, type::PetscBenchType) \nset the type of `PetscBench` benchmark to run\n\nCollective\n\nInput Parameters:\n- `bm`   - the `PetscBench`\n- `type` - a known method\n\nOptions Database Key:\n- `-bm_type <type>` - Sets `PetscBench` type\n\nLevel: advanced\n\n-seealso: `PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchViewFromOptions()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchGetSize()`,\n`PetscBenchSetOptionsPrefix()`, `PetscBenchSetSize()`, `PetscBenchGetType()`, `PetscBenchCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchSetType\"))\n\"\"\"\nfunction PetscBenchSetType(petsclib::PetscLibType, bm::PetscBench, type::PetscBenchType) end\n\n@for_petsc function PetscBenchSetType(petsclib::$UnionPetscLib, bm::PetscBench, type::PetscBenchType )\n\n    @chk ccall(\n               (:PetscBenchSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscBench, PetscBenchType),\n               bm, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscBenchType = PetscBenchGetType(petsclib::PetscLibType,bm::PetscBench) \nGets the `PetscBenchType` (as a string) from the `PetscBench`\ncontext.\n\nNot Collective\n\nInput Parameter:\n- `bm` - the `PetscBench`\n\nOutput Parameter:\n- `type` - name of benchmark method\n\nLevel: intermediate\n\n-seealso: `PetscBench`, `PetscBenchType`, `PetscBenchSetType()`, `PetscBenchCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBenchGetType\"))\n\"\"\"\nfunction PetscBenchGetType(petsclib::PetscLibType, bm::PetscBench) end\n\n@for_petsc function PetscBenchGetType(petsclib::$UnionPetscLib, bm::PetscBench )\n\ttype_ = Ref{PetscBenchType}()\n\n    @chk ccall(\n               (:PetscBenchGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscBench, Ptr{PetscBenchType}),\n               bm, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscContainer_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscContainer end\nconst PetscContainer = Ptr{_n_PetscContainer}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscContainerGetPointer(petsclib::PetscLibType,obj::PetscContainer, ptr::PeCtx) \nGets the pointer value contained in the container that was provided with `PetscContainerSetPointer()`\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `obj` - the object created with `PetscContainerCreate()`\n\nOutput Parameter:\n- `ptr` - the pointer value\n\nLevel: advanced\n\n-seealso: `PetscContainerCreate()`, `PetscContainerDestroy()`, `PetscObject`,\n`PetscContainerSetPointer()`, `PetscObjectContainerCompose()`, `PetscObjectContainerQuery()`\n\n# External Links\n$(_doc_external(\"Sys/PetscContainerGetPointer\"))\n\"\"\"\nfunction PetscContainerGetPointer(petsclib::PetscLibType, obj::PetscContainer, ptr::PeCtx) end\n\n@for_petsc function PetscContainerGetPointer(petsclib::$UnionPetscLib, obj::PetscContainer, ptr::PeCtx )\n\n    @chk ccall(\n               (:PetscContainerGetPointer, $petsc_library),\n               PetscErrorCode,\n               (PetscContainer, PeCtx),\n               obj, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscContainerSetPointer(petsclib::PetscLibType,obj::PetscContainer, ptr::Cvoid) \nSets the pointer value contained in the container.\n\nLogically Collective, No Fortran Support\n\nInput Parameters:\n- `obj` - the object created with `PetscContainerCreate()`\n- `ptr` - the pointer value\n\nLevel: advanced\n\n-seealso: `PetscContainerCreate()`, `PetscContainerDestroy()`, `PetscObjectCompose()`, `PetscObjectQuery()`, `PetscObject`,\n`PetscContainerGetPointer()`, `PetscObjectContainerCompose()`, `PetscObjectContainerQuery()`\n\n# External Links\n$(_doc_external(\"Sys/PetscContainerSetPointer\"))\n\"\"\"\nfunction PetscContainerSetPointer(petsclib::PetscLibType, obj::PetscContainer, ptr::Cvoid) end\n\n@for_petsc function PetscContainerSetPointer(petsclib::$UnionPetscLib, obj::PetscContainer, ptr::Cvoid )\n\n    @chk ccall(\n               (:PetscContainerSetPointer, $petsc_library),\n               PetscErrorCode,\n               (PetscContainer, Ptr{Cvoid}),\n               obj, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscContainerDestroy(petsclib::PetscLibType,obj::PetscContainer) \nDestroys a PETSc container object.\n\nCollective, No Fortran Support\n\nInput Parameter:\n- `obj` - an object that was created with `PetscContainerCreate()`\n\nLevel: advanced\n\n-seealso: `PetscContainerCreate()`, `PetscContainerSetCtxDestroy()`, `PetscObject`, `PetscObjectContainerCompose()`, `PetscObjectContainerQuery()`\n\n# External Links\n$(_doc_external(\"Sys/PetscContainerDestroy\"))\n\"\"\"\nfunction PetscContainerDestroy(petsclib::PetscLibType, obj::PetscContainer) end\n\n@for_petsc function PetscContainerDestroy(petsclib::$UnionPetscLib, obj::PetscContainer )\n\n    @chk ccall(\n               (:PetscContainerDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscContainer},),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscContainerSetCtxDestroy(petsclib::PetscLibType,obj::PetscContainer, des::PetscCtxDestroyFn) \nSets the destroy function for the data provided to the `PetscContainer` with `PetscContainerSetPointer()`\n\nLogically Collective, No Fortran Support\n\nInput Parameters:\n- `obj` - an object that was created with `PetscContainerCreate()`\n- `des` - name of the ctx destroy function, see `PetscCtxDestroyFn` for its calling sequence\n\nLevel: advanced\n\n-seealso: `PetscContainerDestroy()`, `PetscContainerUserDestroyDefault()`, `PetscMalloc()`, `PetscMalloc1()`, `PetscCalloc()`, `PetscCalloc1()`, `PetscObject`,\n`PetscObjectContainerCompose()`, `PetscObjectContainerQuery()`\n\n# External Links\n$(_doc_external(\"Sys/PetscContainerSetCtxDestroy\"))\n\"\"\"\nfunction PetscContainerSetCtxDestroy(petsclib::PetscLibType, obj::PetscContainer, des::PetscCtxDestroyFn) end\n\n@for_petsc function PetscContainerSetCtxDestroy(petsclib::$UnionPetscLib, obj::PetscContainer, des::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:PetscContainerSetCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (PetscContainer, Ptr{PetscCtxDestroyFn}),\n               obj, des,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcontainer::PetscContainer = PetscContainerCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a PETSc object that has room to hold a single pointer.\n\nCollective, No Fortran Support\n\nInput Parameter:\n- `comm` - MPI communicator that shares the object\n\nOutput Parameter:\n- `container` - the container created\n\nLevel: advanced\n\n-seealso: `PetscContainerDestroy()`, `PetscContainerSetPointer()`, `PetscContainerGetPointer()`, `PetscObjectCompose()`, `PetscObjectQuery()`,\n`PetscContainerSetCtxDestroy()`, `PetscObject`, `PetscObjectContainerCompose()`, `PetscObjectContainerQuery()`\n\n# External Links\n$(_doc_external(\"Sys/PetscContainerCreate\"))\n\"\"\"\nfunction PetscContainerCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscContainerCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tcontainer_ = Ref{PetscContainer}()\n\n    @chk ccall(\n               (:PetscContainerCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscContainer}),\n               comm, container_,\n              )\n\n\tcontainer = container_[]\n\n\treturn container\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscConvEst_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscConvEst end\nconst PetscConvEst = Ptr{_n_PetscConvEst}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscConvEstDestroy(petsclib::PetscLibType,ce::PetscConvEst) \nDestroys a PETSc convergence estimator `PetscConvEst` object\n\nCollective\n\nInput Parameter:\n- `ce` - The `PetscConvEst` object\n\nLevel: beginner\n\n-seealso: `PetscConvEst`, `PetscConvEstCreate()`, `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstDestroy\"))\n\"\"\"\nfunction PetscConvEstDestroy(petsclib::PetscLibType, ce::PetscConvEst) end\n\n@for_petsc function PetscConvEstDestroy(petsclib::$UnionPetscLib, ce::PetscConvEst )\n\n    @chk ccall(\n               (:PetscConvEstDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscConvEst},),\n               ce,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstSetFromOptions(petsclib::PetscLibType,ce::PetscConvEst) \nSets a convergence estimator `PetscConvEst` object based on values in the options database\n\nCollective\n\nInput Parameter:\n- `ce` - The `PetscConvEst` object\n\nLevel: beginner\n\n-seealso: `PetscConvEst`, `PetscConvEstCreate()`, `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstSetFromOptions\"))\n\"\"\"\nfunction PetscConvEstSetFromOptions(petsclib::PetscLibType, ce::PetscConvEst) end\n\n@for_petsc function PetscConvEstSetFromOptions(petsclib::$UnionPetscLib, ce::PetscConvEst )\n\n    @chk ccall(\n               (:PetscConvEstSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst,),\n               ce,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstView(petsclib::PetscLibType,ce::PetscConvEst, viewer::PetscViewer) \nViews a `PetscConvEst` object\n\nCollective\n\nInput Parameters:\n- `ce`     - The `PetscConvEst` object\n- `viewer` - The `PetscViewer`\n\nLevel: beginner\n\n-seealso: `PetscConvEst`, `PetscViewer`, `PetscConvEstCreate()`, `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstView\"))\n\"\"\"\nfunction PetscConvEstView(petsclib::PetscLibType, ce::PetscConvEst, viewer::PetscViewer) end\n\n@for_petsc function PetscConvEstView(petsclib::$UnionPetscLib, ce::PetscConvEst, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscConvEstView, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, PetscViewer),\n               ce, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstGetSolver(petsclib::PetscLibType,ce::PetscConvEst, solver::PetscObject) \nGets the solver used to produce discrete solutions\n\nNot Collective\n\nInput Parameter:\n- `ce` - The `PetscConvEst` object\n\nOutput Parameter:\n- `solver` - The solver\n\nLevel: intermediate\n\n-seealso: `PetscConvEst`, `PetscConvEstSetSolver()`, `PetscConvEstCreate()`, `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstGetSolver\"))\n\"\"\"\nfunction PetscConvEstGetSolver(petsclib::PetscLibType, ce::PetscConvEst, solver::PetscObject) end\n\n@for_petsc function PetscConvEstGetSolver(petsclib::$UnionPetscLib, ce::PetscConvEst, solver::PetscObject )\n\n    @chk ccall(\n               (:PetscConvEstGetSolver, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, Ptr{PetscObject}),\n               ce, solver,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstSetSolver(petsclib::PetscLibType,ce::PetscConvEst, solver::PetscObject) \nSets the solver used to produce discrete solutions\n\nNot Collective\n\nInput Parameters:\n- `ce`     - The `PetscConvEst` object\n- `solver` - The solver, must be a `KSP`, `SNES`, or `TS` object with an attached `DM`/`DS`, that can compute an exact solution\n\nLevel: intermediate\n\n-seealso: `PetscConvEst`, `PetscConvEstGetSNES()`, `PetscConvEstCreate()`, `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstSetSolver\"))\n\"\"\"\nfunction PetscConvEstSetSolver(petsclib::PetscLibType, ce::PetscConvEst, solver::PetscObject) end\n\n@for_petsc function PetscConvEstSetSolver(petsclib::$UnionPetscLib, ce::PetscConvEst, solver::PetscObject )\n\n    @chk ccall(\n               (:PetscConvEstSetSolver, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, PetscObject),\n               ce, solver,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstSetUp(petsclib::PetscLibType,ce::PetscConvEst) \nAfter the solver is specified, create data structures needed for estimating convergence\n\nCollective\n\nInput Parameter:\n- `ce` - The `PetscConvEst` object\n\nLevel: beginner\n\n-seealso: `PetscConvEst`, `PetscConvEstCreate()`, `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstSetUp\"))\n\"\"\"\nfunction PetscConvEstSetUp(petsclib::PetscLibType, ce::PetscConvEst) end\n\n@for_petsc function PetscConvEstSetUp(petsclib::$UnionPetscLib, ce::PetscConvEst )\n\n    @chk ccall(\n               (:PetscConvEstSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst,),\n               ce,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstComputeInitialGuess(petsclib::PetscLibType,ce::PetscConvEst, r::PetscInt, dm::PetscDM, u::PetscVec) \n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstComputeInitialGuess\"))\n\"\"\"\nfunction PetscConvEstComputeInitialGuess(petsclib::PetscLibType, ce::PetscConvEst, r::PetscInt, dm::PetscDM, u::PetscVec) end\n\n@for_petsc function PetscConvEstComputeInitialGuess(petsclib::$UnionPetscLib, ce::PetscConvEst, r::$PetscInt, dm::PetscDM, u::PetscVec )\n\n    @chk ccall(\n               (:PetscConvEstComputeInitialGuess, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, $PetscInt, CDM, CVec),\n               ce, r, dm, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstComputeError(petsclib::PetscLibType,ce::PetscConvEst, r::PetscInt, dm::PetscDM, u::PetscVec, errors::Vector{PetscReal}) \n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstComputeError\"))\n\"\"\"\nfunction PetscConvEstComputeError(petsclib::PetscLibType, ce::PetscConvEst, r::PetscInt, dm::PetscDM, u::PetscVec, errors::Vector{PetscReal}) end\n\n@for_petsc function PetscConvEstComputeError(petsclib::$UnionPetscLib, ce::PetscConvEst, r::$PetscInt, dm::PetscDM, u::PetscVec, errors::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscConvEstComputeError, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, $PetscInt, CDM, CVec, Ptr{$PetscReal}),\n               ce, r, dm, u, errors,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscConvEstMonitorDefault(petsclib::PetscLibType,ce::PetscConvEst, r::PetscInt) \nMonitors the convergence estimation loop\n\nCollective\n\nInput Parameters:\n- `ce` - The `PetscConvEst` object\n- `r`  - The refinement level\n\nOptions Database Key:\n- `-convest_monitor` - Activate the monitor\n\nLevel: intermediate\n\n-seealso: `PetscConvEst`, `PetscConvEstCreate()`, `PetscConvEstGetConvRate()`, `SNESSolve()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstMonitorDefault\"))\n\"\"\"\nfunction PetscConvEstMonitorDefault(petsclib::PetscLibType, ce::PetscConvEst, r::PetscInt) end\n\n@for_petsc function PetscConvEstMonitorDefault(petsclib::$UnionPetscLib, ce::PetscConvEst, r::$PetscInt )\n\n    @chk ccall(\n               (:PetscConvEstMonitorDefault, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, $PetscInt),\n               ce, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\talpha::Vector{PetscReal} = PetscConvEstGetConvRate(petsclib::PetscLibType,ce::PetscConvEst) \nReturns an estimate of the convergence rate for the discretization\n\nNot Collective\n\nInput Parameter:\n- `ce` - The `PetscConvEst` object\n\nOutput Parameter:\n- `alpha` - The convergence rate for each field\n\nOptions Database Keys:\n- `-snes_convergence_estimate` - Execute convergence estimation inside `SNESSolve()` and print out the rate\n- `-ts_convergence_estimate`   - Execute convergence estimation inside `TSSolve()` and print out the rate\n\nLevel: intermediate\n\n-seealso: `PetscConvEstSetSolver()`, `PetscConvEstCreate()`, `SNESSolve()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstGetConvRate\"))\n\"\"\"\nfunction PetscConvEstGetConvRate(petsclib::PetscLibType, ce::PetscConvEst) end\n\n@for_petsc function PetscConvEstGetConvRate(petsclib::$UnionPetscLib, ce::PetscConvEst )\n\talpha = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscConvEstGetConvRate, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, Ptr{$PetscReal}),\n               ce, alpha,\n              )\n\n\n\treturn alpha\nend \n\n\"\"\"\n\tPetscConvEstRateView(petsclib::PetscLibType,ce::PetscConvEst, alpha::Vector{PetscReal}, viewer::PetscViewer) \nDisplays the convergence rate obtained from `PetscConvEstGetConvRate()` using a `PetscViewer`\n\nCollective\n\nInput Parameters:\n- `ce`     - iterative context obtained from `SNESCreate()`\n- `alpha`  - the convergence rate for each field\n- `viewer` - the viewer to display the reason\n\nOptions Database Key:\n- `-snes_convergence_estimate` - print the convergence rate\n\nLevel: developer\n\n-seealso: `PetscConvEst`, `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstRateView\"))\n\"\"\"\nfunction PetscConvEstRateView(petsclib::PetscLibType, ce::PetscConvEst, alpha::Vector{PetscReal}, viewer::PetscViewer) end\n\n@for_petsc function PetscConvEstRateView(petsclib::$UnionPetscLib, ce::PetscConvEst, alpha::Vector{$PetscReal}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscConvEstRateView, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, Ptr{$PetscReal}, PetscViewer),\n               ce, alpha, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tce::PetscConvEst = PetscConvEstCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreate a `PetscConvEst` object. This is used to study the convergence rate of approximations on grids to a continuum solution\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscConvEst` object\n\nOutput Parameter:\n- `ce` - The `PetscConvEst` object\n\nLevel: beginner\n\n-seealso: `PetscConvEst`, `PetscConvEstDestroy()`, `PetscConvEstGetConvRate()`, `DMAdaptorCreate()`, `DMAdaptor`\n\n# External Links\n$(_doc_external(\"Snes/PetscConvEstCreate\"))\n\"\"\"\nfunction PetscConvEstCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscConvEstCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tce_ = Ref{PetscConvEst}()\n\n    @chk ccall(\n               (:PetscConvEstCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscConvEst}),\n               comm, ce_,\n              )\n\n\tce = ce_[]\n\n\treturn ce\nend \n\n\"\"\"\n\tPetscConvEstUseTS(petsclib::PetscLibType,ce::PetscConvEst, checkTemporal::PetscBool) \n\n# External Links\n$(_doc_external(\"Ts/PetscConvEstUseTS\"))\n\"\"\"\nfunction PetscConvEstUseTS(petsclib::PetscLibType, ce::PetscConvEst, checkTemporal::PetscBool) end\n\n@for_petsc function PetscConvEstUseTS(petsclib::$UnionPetscLib, ce::PetscConvEst, checkTemporal::PetscBool )\n\n    @chk ccall(\n               (:PetscConvEstUseTS, $petsc_library),\n               PetscErrorCode,\n               (PetscConvEst, PetscBool),\n               ce, checkTemporal,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscDLLibrary_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscDLLibrary end\nconst PetscDLLibrary = Ptr{_n_PetscDLLibrary}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscDLLibraryPrintPath(petsclib::PetscLibType,libs::PetscDLLibrary) \n\n# External Links\n$(_doc_external(\"Sys/PetscDLLibraryPrintPath\"))\n\"\"\"\nfunction PetscDLLibraryPrintPath(petsclib::PetscLibType, libs::PetscDLLibrary) end\n\n@for_petsc function PetscDLLibraryPrintPath(petsclib::$UnionPetscLib, libs::PetscDLLibrary )\n\n    @chk ccall(\n               (:PetscDLLibraryPrintPath, $petsc_library),\n               PetscErrorCode,\n               (PetscDLLibrary,),\n               libs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfound::PetscBool = PetscDLLibraryRetrieve(petsclib::PetscLibType,comm::MPI_Comm, libname::String, lname::String, llen::Csize_t) \nCopies a PETSc dynamic library from a remote location\n(if it is remote), then indicates if it exits and its local name.\n\nCollective\n\nInput Parameters:\n- `comm`    - MPI processes that will be opening the library\n- `libname` - name of the library, can be a relative or absolute path and be a URL\n- `llen`    - length of the `name` buffer\n\nOutput Parameters:\n- `lname` - actual name of the file on local filesystem if `found`\n- `found` - true if the file exists\n\nLevel: developer\n\n-seealso: `PetscFileRetrieve()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLLibraryRetrieve\"))\n\"\"\"\nfunction PetscDLLibraryRetrieve(petsclib::PetscLibType, comm::MPI_Comm, libname::String, lname::String, llen::Csize_t) end\n\n@for_petsc function PetscDLLibraryRetrieve(petsclib::$UnionPetscLib, comm::MPI_Comm, libname::String, lname::String, llen::Csize_t )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDLLibraryRetrieve, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t, Ptr{PetscBool}),\n               comm, libname, lname, llen, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n\"\"\"\n\tPetscDLLibraryOpen(petsclib::PetscLibType,comm::MPI_Comm, path::String, entry::PetscDLLibrary) \nOpens a PETSc dynamic link library\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm` - MPI processes that are opening the library\n- `path` - name of the library, can be a relative or absolute path\n\nOutput Parameter:\n- `entry` - a PETSc dynamic link library entry\n\nLevel: developer\n\n-seealso: `PetscDLLibrary`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryAppend()`, `PetscDLLibraryRetrieve()`, `PetscDLLibrarySym()`, `PetscDLLibraryClose()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLLibraryOpen\"))\n\"\"\"\nfunction PetscDLLibraryOpen(petsclib::PetscLibType, comm::MPI_Comm, path::String, entry::PetscDLLibrary) end\n\n@for_petsc function PetscDLLibraryOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, path::String, entry::PetscDLLibrary )\n\n    @chk ccall(\n               (:PetscDLLibraryOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{PetscDLLibrary}),\n               comm, path, entry,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLLibrarySym(petsclib::PetscLibType,comm::MPI_Comm, outlist::PetscDLLibrary, path::String, insymbol::String, value::Cvoid) \nLoad a symbol from a list of dynamic link libraries.\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm`     - the MPI communicator that will load the symbol\n- `outlist`  - list of already open libraries that may contain symbol (can be `NULL` and only the executable is searched for the function)\n- `path`     - optional complete library name (if provided it checks here before checking `outlist`)\n- `insymbol` - name of symbol\n\nOutput Parameter:\n- `value` - if symbol not found then this value is set to `NULL`\n\nLevel: developer\n\n-seealso: `PetscDLLibrary`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryAppend()`, `PetscDLLibraryRetrieve()`, `PetscDLLibraryOpen()`, `PetscDLLibraryClose()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLLibrarySym\"))\n\"\"\"\nfunction PetscDLLibrarySym(petsclib::PetscLibType, comm::MPI_Comm, outlist::PetscDLLibrary, path::String, insymbol::String, value::Cvoid) end\n\n@for_petsc function PetscDLLibrarySym(petsclib::$UnionPetscLib, comm::MPI_Comm, outlist::PetscDLLibrary, path::String, insymbol::String, value::Cvoid )\n\n    @chk ccall(\n               (:PetscDLLibrarySym, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscDLLibrary}, Ptr{Cchar}, Ptr{Cchar}, Cvoid),\n               comm, outlist, path, insymbol, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLLibraryAppend(petsclib::PetscLibType,comm::MPI_Comm, outlist::PetscDLLibrary, path::String) \nAppends another dynamic link library to the end  of the search list\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm` - MPI communicator\n- `path` - name of the library\n\nOutput Parameter:\n- `outlist` - list of libraries\n\nLevel: developer\n\n-seealso: `PetscDLLibrary`, `PetscDLLibraryOpen()`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryRetrieve()`, `PetscDLLibraryPrepend()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLLibraryAppend\"))\n\"\"\"\nfunction PetscDLLibraryAppend(petsclib::PetscLibType, comm::MPI_Comm, outlist::PetscDLLibrary, path::String) end\n\n@for_petsc function PetscDLLibraryAppend(petsclib::$UnionPetscLib, comm::MPI_Comm, outlist::PetscDLLibrary, path::String )\n\n    @chk ccall(\n               (:PetscDLLibraryAppend, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscDLLibrary}, Ptr{Cchar}),\n               comm, outlist, path,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLLibraryPrepend(petsclib::PetscLibType,comm::MPI_Comm, outlist::PetscDLLibrary, path::String) \nAdd another dynamic library to search for symbols to the beginning of the search list\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm` - MPI communicator\n- `path` - name of the library\n\nOutput Parameter:\n- `outlist` - list of libraries\n\nLevel: developer\n\n-seealso: `PetscDLLibrary`, `PetscDLLibraryOpen()`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryRetrieve()`, `PetscDLLibraryAppend()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLLibraryPrepend\"))\n\"\"\"\nfunction PetscDLLibraryPrepend(petsclib::PetscLibType, comm::MPI_Comm, outlist::PetscDLLibrary, path::String) end\n\n@for_petsc function PetscDLLibraryPrepend(petsclib::$UnionPetscLib, comm::MPI_Comm, outlist::PetscDLLibrary, path::String )\n\n    @chk ccall(\n               (:PetscDLLibraryPrepend, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscDLLibrary}, Ptr{Cchar}),\n               comm, outlist, path,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLLibraryClose(petsclib::PetscLibType,list::PetscDLLibrary) \nDestroys the search path of dynamic libraries and closes the libraries.\n\nCollective, No Fortran Support\n\nInput Parameter:\n- `list` - library list\n\nLevel: developer\n\n-seealso: `PetscDLLibrary`, `PetscDLLibraryOpen()`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryRetrieve()`, `PetscDLLibraryAppend()`,\n`PetscDLLibraryPrepend()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLLibraryClose\"))\n\"\"\"\nfunction PetscDLLibraryClose(petsclib::PetscLibType, list::PetscDLLibrary) end\n\n@for_petsc function PetscDLLibraryClose(petsclib::$UnionPetscLib, list::PetscDLLibrary )\n\n    @chk ccall(\n               (:PetscDLLibraryClose, $petsc_library),\n               PetscErrorCode,\n               (PetscDLLibrary,),\n               list,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscDS_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct PetscPoCintJacFn end\n\nmutable struct PetscRiemannFn end\n\nmutable struct PetscBdPoCintFn end\n\nmutable struct PetscBdPoCintJacFn end\n\nmutable struct PetscPoCintExactSolutionFn end\n\nmutable struct PetscPoCintBoundFn end\n\nmutable struct _n_PetscTabulation end\nconst PetscTabulation = Ptr{_n_PetscTabulation}\n\n#mutable struct _n_PetscDS end\n#const PetscDS = Ptr{_n_PetscDS}\n#\n#mutable struct _n_PetscWeakForm end\n#const PetscWeakForm = Ptr{_n_PetscWeakForm}\n#\n#mutable struct PetscPoCintFn end\n# -------------------------------------------------------\n\"\"\"\n\tPetscDSFinalizePackage(petsclib::PetscLibType) \nThis function finalizes everything in the `PetscDS` package. It is called\nfrom `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSFinalizePackage\"))\n\"\"\"\nfunction PetscDSFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscDSFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscDSFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscDS` package. It is called\nfrom `PetscDLLibraryRegister()` when using dynamic libraries, and on the first call to `PetscDSCreate()`\nwhen using static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSInitializePackage\"))\n\"\"\"\nfunction PetscDSInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscDSInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscDSInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `PetscDS` implementation\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine itself\n\n-seealso: `PetscDSType`, `PetscDS`, `PetscDSRegisterAll()`, `PetscDSRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSRegister\"))\n\"\"\"\nfunction PetscDSRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscDSRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscDSRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetType(petsclib::PetscLibType,prob::PetscDS, name::PetscDSType) \nBuilds a particular `PetscDS`\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `name` - The `PetscDSType`\n\nOptions Database Key:\n- `-petscds_type <type>` - Sets the PetscDS type; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `PetscDSType`, `PetscDS`, `PetscDSGetType()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetType\"))\n\"\"\"\nfunction PetscDSSetType(petsclib::PetscLibType, prob::PetscDS, name::PetscDSType) end\n\n@for_petsc function PetscDSSetType(petsclib::$UnionPetscLib, prob::PetscDS, name::PetscDSType )\n\n    @chk ccall(\n               (:PetscDSSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDSType),\n               prob, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscDSType = PetscDSGetType(petsclib::PetscLibType,prob::PetscDS) \nGets the `PetscDSType` name (as a string) from the `PetscDS`\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `prob` - The `PetscDS`\n\nOutput Parameter:\n- `name` - The `PetscDSType` name\n\nLevel: intermediate\n\n-seealso: `PetscDSType`, `PetscDS`, `PetscDSSetType()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetType\"))\n\"\"\"\nfunction PetscDSGetType(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetType(petsclib::$UnionPetscLib, prob::PetscDS )\n\tname_ = Ref{PetscDSType}()\n\n    @chk ccall(\n               (:PetscDSGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscDSType}),\n               prob, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\tPetscDSViewFromOptions(petsclib::PetscLibType,A::PetscDS, obj::PetscObject, name::String) \nView a `PetscDS` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscDS` object\n- `obj`  - Optional object that provides the options prefix used in the search of the options database\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: `PetscDSType`, `PetscDS`, `PetscDSView()`, `PetscObjectViewFromOptions()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSViewFromOptions\"))\n\"\"\"\nfunction PetscDSViewFromOptions(petsclib::PetscLibType, A::PetscDS, obj::PetscObject, name::String) end\n\n@for_petsc function PetscDSViewFromOptions(petsclib::$UnionPetscLib, A::PetscDS, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscDSViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSView(petsclib::PetscLibType,prob::PetscDS, v::PetscViewer) \nViews a `PetscDS`\n\nCollective\n\nInput Parameters:\n- `prob` - the `PetscDS` object to view\n- `v`    - the viewer\n\nLevel: developer\n\n-seealso: `PetscDSType`, `PetscDS`, `PetscViewer`, `PetscDSDestroy()`, `PetscDSViewFromOptions()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSView\"))\n\"\"\"\nfunction PetscDSView(petsclib::PetscLibType, prob::PetscDS, v::PetscViewer) end\n\n@for_petsc function PetscDSView(petsclib::$UnionPetscLib, prob::PetscDS, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscDSView, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscViewer),\n               prob, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetFromOptions(petsclib::PetscLibType,prob::PetscDS) \nsets parameters in a `PetscDS` from the options database\n\nCollective\n\nInput Parameter:\n- `prob` - the `PetscDS` object to set options for\n\nOptions Database Keys:\n- `-petscds_type <type>`     - Set the `PetscDS` type\n- `-petscds_view <view opt>` - View the `PetscDS`\n- `-petscds_jac_pre`         - Turn formation of a separate Jacobian preconditioner on or off\n- `-bc_<name> <ids>`         - Specify a list of label ids for a boundary condition\n- `-bc_<name>_comp <comps>`  - Specify a list of field components to constrain for a boundary condition\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSView()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetFromOptions\"))\n\"\"\"\nfunction PetscDSSetFromOptions(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSSetFromOptions(petsclib::$UnionPetscLib, prob::PetscDS )\n\n    @chk ccall(\n               (:PetscDSSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDS,),\n               prob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetUp(petsclib::PetscLibType,prob::PetscDS) \nConstruct data structures for the `PetscDS`\n\nCollective\n\nInput Parameter:\n- `prob` - the `PetscDS` object to setup\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscDSView()`, `PetscDSDestroy()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetUp\"))\n\"\"\"\nfunction PetscDSSetUp(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSSetUp(petsclib::$UnionPetscLib, prob::PetscDS )\n\n    @chk ccall(\n               (:PetscDSSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscDS,),\n               prob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSDestroy(petsclib::PetscLibType,ds::PetscDS) \nDestroys a `PetscDS` object\n\nCollective\n\nInput Parameter:\n- `ds` - the `PetscDS` object to destroy\n\nLevel: developer\n\n-seealso: `PetscDSView()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSDestroy\"))\n\"\"\"\nfunction PetscDSDestroy(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSDestroy(petsclib::$UnionPetscLib, ds::PetscDS )\n\n    @chk ccall(\n               (:PetscDSDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDS},),\n               ds,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tds::PetscDS = PetscDSCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscDS` object. The type can then be set with `PetscDSSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscDS` object\n\nOutput Parameter:\n- `ds` - The `PetscDS` object\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSSetType()`, `PETSCDSBASIC`, `PetscDSType`, `PetscDSDestroy()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSCreate\"))\n\"\"\"\nfunction PetscDSCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscDSCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tds_ = Ref{PetscDS}()\n\n    @chk ccall(\n               (:PetscDSCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscDS}),\n               comm, ds_,\n              )\n\n\tds = ds_[]\n\n\treturn ds\nend \n\n\"\"\"\n\tNf::PetscInt = PetscDSGetNumFields(petsclib::PetscLibType,prob::PetscDS) \nReturns the number of fields in the `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `Nf` - The number of fields\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetSpatialDimension()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetNumFields\"))\n\"\"\"\nfunction PetscDSGetNumFields(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetNumFields(petsclib::$UnionPetscLib, prob::PetscDS )\n\tNf_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetNumFields, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}),\n               prob, Nf_,\n              )\n\n\tNf = Nf_[]\n\n\treturn Nf\nend \n\n\"\"\"\n\tdim::PetscInt = PetscDSGetSpatialDimension(petsclib::PetscLibType,prob::PetscDS) \nReturns the spatial dimension of the `PetscDS`, meaning the topological dimension of the discretizations\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `dim` - The spatial dimension\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetCoordinateDimension()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetSpatialDimension\"))\n\"\"\"\nfunction PetscDSGetSpatialDimension(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetSpatialDimension(petsclib::$UnionPetscLib, prob::PetscDS )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetSpatialDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}),\n               prob, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tdimEmbed::PetscInt = PetscDSGetCoordinateDimension(petsclib::PetscLibType,prob::PetscDS) \nReturns the coordinate dimension of the `PetscDS`, meaning the dimension of the space into which the discretiaztions are embedded\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `dimEmbed` - The coordinate dimension\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSSetCoordinateDimension()`, `PetscDSGetSpatialDimension()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetCoordinateDimension\"))\n\"\"\"\nfunction PetscDSGetCoordinateDimension(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetCoordinateDimension(petsclib::$UnionPetscLib, prob::PetscDS )\n\tdimEmbed_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetCoordinateDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}),\n               prob, dimEmbed_,\n              )\n\n\tdimEmbed = dimEmbed_[]\n\n\treturn dimEmbed\nend \n\n\"\"\"\n\tPetscDSSetCoordinateDimension(petsclib::PetscLibType,prob::PetscDS, dimEmbed::PetscInt) \nSet the coordinate dimension of the `PetscDS`, meaning the dimension of the space into which the discretiaztions are embedded\n\nLogically Collective\n\nInput Parameters:\n- `prob`     - The `PetscDS` object\n- `dimEmbed` - The coordinate dimension\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetCoordinateDimension()`, `PetscDSGetSpatialDimension()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetCoordinateDimension\"))\n\"\"\"\nfunction PetscDSSetCoordinateDimension(petsclib::PetscLibType, prob::PetscDS, dimEmbed::PetscInt) end\n\n@for_petsc function PetscDSSetCoordinateDimension(petsclib::$UnionPetscLib, prob::PetscDS, dimEmbed::$PetscInt )\n\n    @chk ccall(\n               (:PetscDSSetCoordinateDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt),\n               prob, dimEmbed,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tforceQuad::PetscBool = PetscDSGetForceQuad(petsclib::PetscLibType,ds::PetscDS) \nReturns the flag to force matching quadratures among the field discretizations\n\nNot collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameter:\n- `forceQuad` - The flag\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSetForceQuad()`, `PetscDSGetDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetForceQuad\"))\n\"\"\"\nfunction PetscDSGetForceQuad(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSGetForceQuad(petsclib::$UnionPetscLib, ds::PetscDS )\n\tforceQuad_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSGetForceQuad, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscBool}),\n               ds, forceQuad_,\n              )\n\n\tforceQuad = forceQuad_[]\n\n\treturn forceQuad\nend \n\n\"\"\"\n\tPetscDSSetForceQuad(petsclib::PetscLibType,ds::PetscDS, forceQuad::PetscBool) \nSet the flag to force matching quadratures among the field discretizations\n\nLogically collective on ds\n\nInput Parameters:\n- `ds`        - The `PetscDS` object\n- `forceQuad` - The flag\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetForceQuad()`, `PetscDSGetDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetForceQuad\"))\n\"\"\"\nfunction PetscDSSetForceQuad(petsclib::PetscLibType, ds::PetscDS, forceQuad::PetscBool) end\n\n@for_petsc function PetscDSSetForceQuad(petsclib::$UnionPetscLib, ds::PetscDS, forceQuad::PetscBool )\n\n    @chk ccall(\n               (:PetscDSSetForceQuad, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscBool),\n               ds, forceQuad,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisCohesive::PetscBool = PetscDSIsCohesive(petsclib::PetscLibType,ds::PetscDS) \nReturns the flag indicating that this `PetscDS` is for a cohesive cell\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameter:\n- `isCohesive` - The flag\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscDSGetNumCohesive()`, `PetscDSGetCohesive()`, `PetscDSSetCohesive()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSIsCohesive\"))\n\"\"\"\nfunction PetscDSIsCohesive(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSIsCohesive(petsclib::$UnionPetscLib, ds::PetscDS )\n\tisCohesive_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSIsCohesive, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscBool}),\n               ds, isCohesive_,\n              )\n\n\tisCohesive = isCohesive_[]\n\n\treturn isCohesive\nend \n\n\"\"\"\n\tnumCohesive::PetscInt = PetscDSGetNumCohesive(petsclib::PetscLibType,ds::PetscDS) \nReturns the number of cohesive fields, meaning those defined on the interior of a cohesive cell\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameter:\n- `numCohesive` - The number of cohesive fields\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscDSSetCohesive()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetNumCohesive\"))\n\"\"\"\nfunction PetscDSGetNumCohesive(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSGetNumCohesive(petsclib::$UnionPetscLib, ds::PetscDS )\n\tnumCohesive_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetNumCohesive, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}),\n               ds, numCohesive_,\n              )\n\n\tnumCohesive = numCohesive_[]\n\n\treturn numCohesive\nend \n\n\"\"\"\n\tisCohesive::PetscBool = PetscDSGetCohesive(petsclib::PetscLibType,ds::PetscDS, f::PetscInt) \nReturns the flag indicating that a field is cohesive, meaning it is defined on the interior of a cohesive cell\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `f`  - The field index\n\nOutput Parameter:\n- `isCohesive` - The flag\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscDSSetCohesive()`, `PetscDSIsCohesive()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetCohesive\"))\n\"\"\"\nfunction PetscDSGetCohesive(petsclib::PetscLibType, ds::PetscDS, f::PetscInt) end\n\n@for_petsc function PetscDSGetCohesive(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt )\n\tisCohesive_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSGetCohesive, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscBool}),\n               ds, f, isCohesive_,\n              )\n\n\tisCohesive = isCohesive_[]\n\n\treturn isCohesive\nend \n\n\"\"\"\n\tPetscDSSetCohesive(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, isCohesive::PetscBool) \nSet the flag indicating that a field is cohesive, meaning it is defined on the interior of a cohesive cell\n\nNot Collective\n\nInput Parameters:\n- `ds`         - The `PetscDS` object\n- `f`          - The field index\n- `isCohesive` - The flag for a cohesive field\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscDSGetCohesive()`, `PetscDSIsCohesive()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetCohesive\"))\n\"\"\"\nfunction PetscDSSetCohesive(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, isCohesive::PetscBool) end\n\n@for_petsc function PetscDSSetCohesive(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, isCohesive::PetscBool )\n\n    @chk ccall(\n               (:PetscDSSetCohesive, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscBool),\n               ds, f, isCohesive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt = PetscDSGetTotalDimension(petsclib::PetscLibType,prob::PetscDS) \nReturns the total size of the approximation space for this system\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `dim` - The total problem dimension\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetTotalDimension\"))\n\"\"\"\nfunction PetscDSGetTotalDimension(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetTotalDimension(petsclib::$UnionPetscLib, prob::PetscDS )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetTotalDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}),\n               prob, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tNc::PetscInt = PetscDSGetTotalComponents(petsclib::PetscLibType,prob::PetscDS) \nReturns the total number of components in this system\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `Nc` - The total number of components\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetTotalComponents\"))\n\"\"\"\nfunction PetscDSGetTotalComponents(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetTotalComponents(petsclib::$UnionPetscLib, prob::PetscDS )\n\tNc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetTotalComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}),\n               prob, Nc_,\n              )\n\n\tNc = Nc_[]\n\n\treturn Nc\nend \n\n\"\"\"\n\tPetscDSGetDiscretization(petsclib::PetscLibType,prob::PetscDS, f::PetscInt, disc::PetscObject) \nReturns the discretization object for the given field\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `f`    - The field number\n\nOutput Parameter:\n- `disc` - The discretization object, this can be a `PetscFE` or a `PetscFV`\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscFE`, `PetscFV`, `PetscDSSetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetDiscretization\"))\n\"\"\"\nfunction PetscDSGetDiscretization(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, disc::PetscObject) end\n\n@for_petsc function PetscDSGetDiscretization(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt, disc::PetscObject )\n\n    @chk ccall(\n               (:PetscDSGetDiscretization, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscObject}),\n               prob, f, disc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetDiscretization(petsclib::PetscLibType,prob::PetscDS, f::PetscInt, disc::PetscObject) \nSets the discretization object for the given field\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `f`    - The field number\n- `disc` - The discretization object, this can be a `PetscFE` or a `PetscFV`\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscFE`, `PetscFV`, `PetscDSGetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetDiscretization\"))\n\"\"\"\nfunction PetscDSSetDiscretization(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, disc::PetscObject) end\n\n@for_petsc function PetscDSSetDiscretization(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt, disc::PetscObject )\n\n    @chk ccall(\n               (:PetscDSSetDiscretization, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscObject),\n               prob, f, disc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetWeakForm(petsclib::PetscLibType,ds::PetscDS, wf::PetscWeakForm) \nReturns the weak form object from within the `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameter:\n- `wf` - The weak form object\n\nLevel: beginner\n\n-seealso: `PetscWeakForm`, `PetscDSSetWeakForm()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetWeakForm\"))\n\"\"\"\nfunction PetscDSGetWeakForm(petsclib::PetscLibType, ds::PetscDS, wf::PetscWeakForm) end\n\n@for_petsc function PetscDSGetWeakForm(petsclib::$UnionPetscLib, ds::PetscDS, wf::PetscWeakForm )\n\n    @chk ccall(\n               (:PetscDSGetWeakForm, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscWeakForm}),\n               ds, wf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetWeakForm(petsclib::PetscLibType,ds::PetscDS, wf::PetscWeakForm) \nSets the weak form object to be used by the `PetscDS`\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `wf` - The weak form object\n\nLevel: beginner\n\n-seealso: `PetscWeakForm`, `PetscDSGetWeakForm()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetWeakForm\"))\n\"\"\"\nfunction PetscDSSetWeakForm(petsclib::PetscLibType, ds::PetscDS, wf::PetscWeakForm) end\n\n@for_petsc function PetscDSSetWeakForm(petsclib::$UnionPetscLib, ds::PetscDS, wf::PetscWeakForm )\n\n    @chk ccall(\n               (:PetscDSSetWeakForm, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscWeakForm),\n               ds, wf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSAddDiscretization(petsclib::PetscLibType,prob::PetscDS, disc::PetscObject) \nAdds a discretization object\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `disc` - The discretization object, this can be a `PetscFE` or `PetscFV`\n\nLevel: beginner\n\n-seealso: `PetscWeakForm`, `PetscFE`, `PetscFV`, `PetscDSGetDiscretization()`, `PetscDSSetDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSAddDiscretization\"))\n\"\"\"\nfunction PetscDSAddDiscretization(petsclib::PetscLibType, prob::PetscDS, disc::PetscObject) end\n\n@for_petsc function PetscDSAddDiscretization(petsclib::$UnionPetscLib, prob::PetscDS, disc::PetscObject )\n\n    @chk ccall(\n               (:PetscDSAddDiscretization, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscObject),\n               prob, disc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetQuadrature(petsclib::PetscLibType,prob::PetscDS, q::PetscQuadrature) \nReturns the quadrature, which must agree for all fields in the `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `q` - The quadrature object\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscQuadrature`, `PetscDSSetImplicit()`, `PetscDSSetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetQuadrature\"))\n\"\"\"\nfunction PetscDSGetQuadrature(petsclib::PetscLibType, prob::PetscDS, q::PetscQuadrature) end\n\n@for_petsc function PetscDSGetQuadrature(petsclib::$UnionPetscLib, prob::PetscDS, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscDSGetQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscQuadrature}),\n               prob, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\timplicit::PetscBool = PetscDSGetImplicit(petsclib::PetscLibType,prob::PetscDS, f::PetscInt) \nReturns the flag for implicit solve for this field. This is just a guide for `TSARKIMEX`\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `f`    - The field number\n\nOutput Parameter:\n- `implicit` - The flag indicating what kind of solve to use for this field\n\nLevel: developer\n\n-seealso: `TSARKIMEX`, `PetscDS`, `PetscDSSetImplicit()`, `PetscDSSetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetImplicit\"))\n\"\"\"\nfunction PetscDSGetImplicit(petsclib::PetscLibType, prob::PetscDS, f::PetscInt) end\n\n@for_petsc function PetscDSGetImplicit(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt )\n\timplicit_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSGetImplicit, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscBool}),\n               prob, f, implicit_,\n              )\n\n\timplicit = implicit_[]\n\n\treturn implicit\nend \n\n\"\"\"\n\tPetscDSSetImplicit(petsclib::PetscLibType,prob::PetscDS, f::PetscInt, implicit::PetscBool) \nSet the flag for implicit solve for this field. This is just a guide for `TSARKIMEX`\n\nNot Collective\n\nInput Parameters:\n- `prob`     - The `PetscDS` object\n- `f`        - The field number\n- `implicit` - The flag indicating what kind of solve to use for this field\n\nLevel: developer\n\n-seealso: `TSARKIMEX`, `PetscDSGetImplicit()`, `PetscDSSetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetImplicit\"))\n\"\"\"\nfunction PetscDSSetImplicit(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, implicit::PetscBool) end\n\n@for_petsc function PetscDSSetImplicit(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt, implicit::PetscBool )\n\n    @chk ccall(\n               (:PetscDSSetImplicit, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscBool),\n               prob, f, implicit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tk::PetscInt = PetscDSGetJetDegree(petsclib::PetscLibType,ds::PetscDS, f::PetscInt) \nReturns the highest derivative for this field equation, or the k\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `f`  - The field number\n\nOutput Parameter:\n- `k` - The highest derivative we need to tabulate\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscDSSetJetDegree()`, `PetscDSSetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetJetDegree\"))\n\"\"\"\nfunction PetscDSGetJetDegree(petsclib::PetscLibType, ds::PetscDS, f::PetscInt) end\n\n@for_petsc function PetscDSGetJetDegree(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt )\n\tk_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetJetDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}),\n               ds, f, k_,\n              )\n\n\tk = k_[]\n\n\treturn k\nend \n\n\"\"\"\n\tPetscDSSetJetDegree(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, k::PetscInt) \nSet the highest derivative for this field equation, or the k\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `f`  - The field number\n- `k`  - The highest derivative we need to tabulate\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscDSGetJetDegree()`, `PetscDSSetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetJetDegree\"))\n\"\"\"\nfunction PetscDSSetJetDegree(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, k::PetscInt) end\n\n@for_petsc function PetscDSSetJetDegree(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, k::$PetscInt )\n\n    @chk ccall(\n               (:PetscDSSetJetDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt),\n               ds, f, k,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetObjective(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, obj::PetscPoCintFn) \nGet the pointwise objective function for a given test field that was provided with `PetscDSSetObjective()`\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n\nOutput Parameter:\n- `obj` - integrand for the test function term, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscPointFn`, `PetscDS`, `PetscDSSetObjective()`, `PetscDSGetResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetObjective\"))\n\"\"\"\nfunction PetscDSGetObjective(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, obj::PetscPoCintFn) end\n\n@for_petsc function PetscDSGetObjective(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, obj::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSGetObjective, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintFn),\n               ds, f, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetObjective(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, obj::PetscPoCintFn) \nSet the pointwise objective function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `ds`  - The `PetscDS`\n- `f`   - The test field number\n- `obj` - integrand for the test function term, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscPointFn`, `PetscDS`, `PetscDSGetObjective()`, `PetscDSSetResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetObjective\"))\n\"\"\"\nfunction PetscDSSetObjective(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, obj::PetscPoCintFn) end\n\n@for_petsc function PetscDSSetObjective(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, obj::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSSetObjective, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintFn}),\n               ds, f, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetResidual(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) \nGet the pointwise residual function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n\nOutput Parameters:\n- `f0` - integrand for the test function term, see `PetscPointFn`\n- `f1` - integrand for the test function gradient term, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscPointFn`, `PetscDS`, `PetscDSSetResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetResidual\"))\n\"\"\"\nfunction PetscDSGetResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) end\n\n@for_petsc function PetscDSGetResidual(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSGetResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintFn, PetscPoCintFn),\n               ds, f, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetResidual(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) \nSet the pointwise residual function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `f0` - integrand for the test function term, see `PetscPointFn`\n- `f1` - integrand for the test function gradient term, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscPointFn`, `PetscDS`, `PetscDSGetResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetResidual\"))\n\"\"\"\nfunction PetscDSSetResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) end\n\n@for_petsc function PetscDSSetResidual(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSSetResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintFn}, Ptr{PetscPoCintFn}),\n               ds, f, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetRHSResidual(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) \nGet the pointwise RHS residual function for explicit timestepping for a given test field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n\nOutput Parameters:\n- `f0` - integrand for the test function term, see `PetscPointFn`\n- `f1` - integrand for the test function gradient term, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscPointFn`, `PetscDS`, `PetscDSSetRHSResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetRHSResidual\"))\n\"\"\"\nfunction PetscDSGetRHSResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) end\n\n@for_petsc function PetscDSGetRHSResidual(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSGetRHSResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintFn, PetscPoCintFn),\n               ds, f, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetRHSResidual(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) \nSet the pointwise residual function for explicit timestepping for a given test field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `f0` - integrand for the test function term, see `PetscPointFn`\n- `f1` - integrand for the test function gradient term, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetRHSResidual\"))\n\"\"\"\nfunction PetscDSSetRHSResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn) end\n\n@for_petsc function PetscDSSetRHSResidual(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, f0::PetscPoCintFn, f1::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSSetRHSResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintFn}, Ptr{PetscPoCintFn}),\n               ds, f, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasJac::PetscBool = PetscDSHasJacobian(petsclib::PetscLibType,ds::PetscDS) \nChecks that the Jacobian functions have been set\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS`\n\nOutput Parameter:\n- `hasJac` - flag that indicates the pointwise function for the Jacobian has been set\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetJacobianPreconditioner()`, `PetscDSSetJacobianPreconditioner()`, `PetscDSGetJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSHasJacobian\"))\n\"\"\"\nfunction PetscDSHasJacobian(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSHasJacobian(petsclib::$UnionPetscLib, ds::PetscDS )\n\thasJac_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSHasJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscBool}),\n               ds, hasJac_,\n              )\n\n\thasJac = hasJac_[]\n\n\treturn hasJac\nend \n\n\"\"\"\n\tPetscDSGetJacobian(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) \nGet the pointwise Jacobian function for given test and basis field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n\nOutput Parameters:\n- `g0` - integrand for the test and basis function term, see `PetscPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSetJacobian()`, `PetscPointJacFn`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetJacobian\"))\n\"\"\"\nfunction PetscDSGetJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) end\n\n@for_petsc function PetscDSGetJacobian(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSGetJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, PetscPoCintJacFn, PetscPoCintJacFn, PetscPoCintJacFn, PetscPoCintJacFn),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetJacobian(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) \nSet the pointwise Jacobian function for given test and basis fields\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n- `g0` - integrand for the test and basis function term, see `PetscPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetJacobian()`, `PetscPointJacFn`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetJacobian\"))\n\"\"\"\nfunction PetscDSSetJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) end\n\n@for_petsc function PetscDSSetJacobian(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSSetJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSUseJacobianPreconditioner(petsclib::PetscLibType,prob::PetscDS, useJacPre::PetscBool) \nSet whether to construct a Jacobian preconditioner\n\nNot Collective\n\nInput Parameters:\n- `prob`      - The `PetscDS`\n- `useJacPre` - flag that enables construction of a Jacobian preconditioner\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetJacobianPreconditioner()`, `PetscDSSetJacobianPreconditioner()`, `PetscDSGetJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSUseJacobianPreconditioner\"))\n\"\"\"\nfunction PetscDSUseJacobianPreconditioner(petsclib::PetscLibType, prob::PetscDS, useJacPre::PetscBool) end\n\n@for_petsc function PetscDSUseJacobianPreconditioner(petsclib::$UnionPetscLib, prob::PetscDS, useJacPre::PetscBool )\n\n    @chk ccall(\n               (:PetscDSUseJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscBool),\n               prob, useJacPre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasJacPre::PetscBool = PetscDSHasJacobianPreconditioner(petsclib::PetscLibType,ds::PetscDS) \nChecks if a Jacobian matrix for constructing a preconditioner has been set\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS`\n\nOutput Parameter:\n- `hasJacPre` - the flag\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetJacobianPreconditioner()`, `PetscDSSetJacobianPreconditioner()`, `PetscDSGetJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSHasJacobianPreconditioner\"))\n\"\"\"\nfunction PetscDSHasJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSHasJacobianPreconditioner(petsclib::$UnionPetscLib, ds::PetscDS )\n\thasJacPre_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSHasJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscBool}),\n               ds, hasJacPre_,\n              )\n\n\thasJacPre = hasJacPre_[]\n\n\treturn hasJacPre\nend \n\n\"\"\"\n\tPetscDSGetJacobianPreconditioner(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) \nGet the pointwise Jacobian function for given test and basis field that constructs the matrix used\nto compute the preconditioner. If this is missing, the system matrix is used to build the preconditioner.\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n\nOutput Parameters:\n- `g0` - integrand for the test and basis function term, see `PetscPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSetJacobianPreconditioner()`, `PetscDSGetJacobian()`, `PetscPointJacFn`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetJacobianPreconditioner\"))\n\"\"\"\nfunction PetscDSGetJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) end\n\n@for_petsc function PetscDSGetJacobianPreconditioner(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSGetJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, PetscPoCintJacFn, PetscPoCintJacFn, PetscPoCintJacFn, PetscPoCintJacFn),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetJacobianPreconditioner(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) \nSet the pointwise Jacobian function for given test and basis fields that constructs the matrix used\nto compute the preconditioner. If this is missing, the system matrix is used to build the preconditioner.\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n- `g0` - integrand for the test and basis function term, see `PetscPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetJacobianPreconditioner()`, `PetscDSSetJacobian()`, `PetscPointJacFn`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetJacobianPreconditioner\"))\n\"\"\"\nfunction PetscDSSetJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) end\n\n@for_petsc function PetscDSSetJacobianPreconditioner(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSSetJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasDynJac::PetscBool = PetscDSHasDynamicJacobian(petsclib::PetscLibType,ds::PetscDS) \nSignals that a dynamic Jacobian, dF/du_t, has been set\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS`\n\nOutput Parameter:\n- `hasDynJac` - flag that pointwise function for dynamic Jacobian has been set\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetDynamicJacobian()`, `PetscDSSetDynamicJacobian()`, `PetscDSGetJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSHasDynamicJacobian\"))\n\"\"\"\nfunction PetscDSHasDynamicJacobian(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSHasDynamicJacobian(petsclib::$UnionPetscLib, ds::PetscDS )\n\thasDynJac_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSHasDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscBool}),\n               ds, hasDynJac_,\n              )\n\n\thasDynJac = hasDynJac_[]\n\n\treturn hasDynJac\nend \n\n\"\"\"\n\tPetscDSGetDynamicJacobian(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) \nGet the pointwise dynamic Jacobian, dF/du_t, function for given test and basis field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n\nOutput Parameters:\n- `g0` - integrand for the test and basis function term, see `PetscPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSetJacobian()`, `PetscDSSetDynamicJacobian()`, `PetscPointJacFn`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetDynamicJacobian\"))\n\"\"\"\nfunction PetscDSGetDynamicJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) end\n\n@for_petsc function PetscDSGetDynamicJacobian(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSGetDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, PetscPoCintJacFn, PetscPoCintJacFn, PetscPoCintJacFn, PetscPoCintJacFn),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetDynamicJacobian(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) \nSet the pointwise dynamic Jacobian, dF/du_t, function for given test and basis fields\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n- `g0` - integrand for the test and basis function term, see `PetscPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetDynamicJacobian()`, `PetscDSGetJacobian()`, `PetscPointJacFn`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetDynamicJacobian\"))\n\"\"\"\nfunction PetscDSSetDynamicJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn) end\n\n@for_petsc function PetscDSSetDynamicJacobian(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscPoCintJacFn, g1::PetscPoCintJacFn, g2::PetscPoCintJacFn, g3::PetscPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSSetDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}, Ptr{PetscPoCintJacFn}),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetRiemannSolver(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, r::PetscRiemannFn) \nReturns the Riemann solver for the given field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `f`  - The field number\n\nOutput Parameter:\n- `r` - Riemann solver, see `PetscRiemannFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscRiemannFn`, `PetscDSSetRiemannSolver()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetRiemannSolver\"))\n\"\"\"\nfunction PetscDSGetRiemannSolver(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, r::PetscRiemannFn) end\n\n@for_petsc function PetscDSGetRiemannSolver(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, r::PetscRiemannFn )\n\n    @chk ccall(\n               (:PetscDSGetRiemannSolver, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscRiemannFn),\n               ds, f, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetRiemannSolver(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, r::PetscRiemannFn) \nSets the Riemann solver for the given field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `f`  - The field number\n- `r`  - Riemann solver, see `PetscRiemannFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscRiemannFn`, `PetscDSGetRiemannSolver()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetRiemannSolver\"))\n\"\"\"\nfunction PetscDSSetRiemannSolver(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, r::PetscRiemannFn) end\n\n@for_petsc function PetscDSSetRiemannSolver(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, r::PetscRiemannFn )\n\n    @chk ccall(\n               (:PetscDSSetRiemannSolver, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscRiemannFn}),\n               ds, f, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetUpdate(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, update::PetscPoCintFn) \nGet the pointwise update function for a given field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The field number\n\nOutput Parameter:\n- `update` - update function, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointFn`, `PetscDSSetUpdate()`, `PetscDSSetResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetUpdate\"))\n\"\"\"\nfunction PetscDSGetUpdate(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, update::PetscPoCintFn) end\n\n@for_petsc function PetscDSGetUpdate(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, update::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSGetUpdate, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintFn),\n               ds, f, update,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetUpdate(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, update::PetscPoCintFn) \nSet the pointwise update function for a given field\n\nNot Collective\n\nInput Parameters:\n- `ds`     - The `PetscDS`\n- `f`      - The field number\n- `update` - update function, see `PetscPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointFn`, `PetscDSGetResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetUpdate\"))\n\"\"\"\nfunction PetscDSSetUpdate(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, update::PetscPoCintFn) end\n\n@for_petsc function PetscDSSetUpdate(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, update::PetscPoCintFn )\n\n    @chk ccall(\n               (:PetscDSSetUpdate, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintFn}),\n               ds, f, update,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetContext(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, ctx::Cvoid) \nReturns the context that was passed by `PetscDSSetContext()`\n\nNot Collective\n\nInput Parameters:\n- `ds`  - The `PetscDS`\n- `f`   - The field number\n- `ctx` - the context\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointFn`, `PetscDSSetContext()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetContext\"))\n\"\"\"\nfunction PetscDSGetContext(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, ctx::Cvoid) end\n\n@for_petsc function PetscDSGetContext(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSGetContext, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{Cvoid}),\n               ds, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetContext(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, ctx::Cvoid) \nSets the context that is passed back to some of the pointwise function callbacks used by this `PetscDS`\n\nNot Collective\n\nInput Parameters:\n- `ds`  - The `PetscDS`\n- `f`   - The field number\n- `ctx` - the context\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointFn`, `PetscDSGetContext()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetContext\"))\n\"\"\"\nfunction PetscDSSetContext(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, ctx::Cvoid) end\n\n@for_petsc function PetscDSSetContext(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSSetContext, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{Cvoid}),\n               ds, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetBdResidual(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, f0::PetscBdPoCintFn, f1::PetscBdPoCintFn) \nGet the pointwise boundary residual function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The PetscDS\n- `f`  - The test field number\n\nOutput Parameters:\n- `f0` - boundary integrand for the test function term, see `PetscBdPointFn`\n- `f1` - boundary integrand for the test function gradient term, see `PetscBdPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscBdPointFn`, `PetscDSSetBdResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetBdResidual\"))\n\"\"\"\nfunction PetscDSGetBdResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::PetscBdPoCintFn, f1::PetscBdPoCintFn) end\n\n@for_petsc function PetscDSGetBdResidual(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, f0::PetscBdPoCintFn, f1::PetscBdPoCintFn )\n\n    @chk ccall(\n               (:PetscDSGetBdResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscBdPoCintFn, PetscBdPoCintFn),\n               ds, f, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetBdResidual(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, f0::PetscBdPoCintFn, f1::PetscBdPoCintFn) \nGet the pointwise boundary residual function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `f0` - boundary integrand for the test function term, see `PetscBdPointFn`\n- `f1` - boundary integrand for the test function gradient term, see `PetscBdPointFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscBdPointFn`, `PetscDSGetBdResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetBdResidual\"))\n\"\"\"\nfunction PetscDSSetBdResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::PetscBdPoCintFn, f1::PetscBdPoCintFn) end\n\n@for_petsc function PetscDSSetBdResidual(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, f0::PetscBdPoCintFn, f1::PetscBdPoCintFn )\n\n    @chk ccall(\n               (:PetscDSSetBdResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscBdPoCintFn}, Ptr{PetscBdPoCintFn}),\n               ds, f, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasBdJac::PetscBool = PetscDSHasBdJacobian(petsclib::PetscLibType,ds::PetscDS) \nIndicates that boundary Jacobian functions have been set\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS`\n\nOutput Parameter:\n- `hasBdJac` - flag that pointwise function for the boundary Jacobian has been set\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSHasJacobian()`, `PetscDSSetBdJacobian()`, `PetscDSGetBdJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSHasBdJacobian\"))\n\"\"\"\nfunction PetscDSHasBdJacobian(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSHasBdJacobian(petsclib::$UnionPetscLib, ds::PetscDS )\n\thasBdJac_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSHasBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscBool}),\n               ds, hasBdJac_,\n              )\n\n\thasBdJac = hasBdJac_[]\n\n\treturn hasBdJac\nend \n\n\"\"\"\n\tPetscDSGetBdJacobian(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) \nGet the pointwise boundary Jacobian function for given test and basis field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n\nOutput Parameters:\n- `g0` - integrand for the test and basis function term, see `PetscBdPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscBdPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscBdPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscBdPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscBdPointJacFn`, `PetscDSSetBdJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetBdJacobian\"))\n\"\"\"\nfunction PetscDSGetBdJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) end\n\n@for_petsc function PetscDSGetBdJacobian(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSGetBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, PetscBdPoCintJacFn, PetscBdPoCintJacFn, PetscBdPoCintJacFn, PetscBdPoCintJacFn),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetBdJacobian(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) \nSet the pointwise boundary Jacobian function for given test and basis field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The PetscDS\n- `f`  - The test field number\n- `g`  - The field number\n- `g0` - integrand for the test and basis function term, see `PetscBdPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscBdPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscBdPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscBdPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscBdPointJacFn`, `PetscDSGetBdJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetBdJacobian\"))\n\"\"\"\nfunction PetscDSSetBdJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) end\n\n@for_petsc function PetscDSSetBdJacobian(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSSetBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, Ptr{PetscBdPoCintJacFn}, Ptr{PetscBdPoCintJacFn}, Ptr{PetscBdPoCintJacFn}, Ptr{PetscBdPoCintJacFn}),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasBdJacPre::PetscBool = PetscDSHasBdJacobianPreconditioner(petsclib::PetscLibType,ds::PetscDS) \nSignals that boundary Jacobian preconditioner functions have been set with `PetscDSSetBdJacobianPreconditioner()`\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS`\n\nOutput Parameter:\n- `hasBdJacPre` - flag that pointwise function for the boundary Jacobian matrix to construct the preconditioner has been set\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSHasJacobian()`, `PetscDSSetBdJacobian()`, `PetscDSGetBdJacobian()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSHasBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscDSHasBdJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSHasBdJacobianPreconditioner(petsclib::$UnionPetscLib, ds::PetscDS )\n\thasBdJacPre_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDSHasBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{PetscBool}),\n               ds, hasBdJacPre_,\n              )\n\n\thasBdJacPre = hasBdJacPre_[]\n\n\treturn hasBdJacPre\nend \n\n\"\"\"\n\tPetscDSGetBdJacobianPreconditioner(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) \nGet the pointwise boundary Jacobian function for given test and basis field that constructs the\nmatrix used to construct the preconditioner\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n\nOutput Parameters:\n- `g0` - integrand for the test and basis function term, see `PetscBdPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscBdPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscBdPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscBdPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscBdPointJacFn`, `PetscDSSetBdJacobianPreconditioner()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscDSGetBdJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) end\n\n@for_petsc function PetscDSGetBdJacobianPreconditioner(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSGetBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, PetscBdPoCintJacFn, PetscBdPoCintJacFn, PetscBdPoCintJacFn, PetscBdPoCintJacFn),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetBdJacobianPreconditioner(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) \nSet the pointwise boundary Jacobian preconditioner function for given test and basis field that constructs the\nmatrix used to construct the preconditioner\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The test field number\n- `g`  - The field number\n- `g0` - integrand for the test and basis function term, see `PetscBdPointJacFn`\n- `g1` - integrand for the test function and basis function gradient term, see `PetscBdPointJacFn`\n- `g2` - integrand for the test function gradient and basis function term, see `PetscBdPointJacFn`\n- `g3` - integrand for the test function gradient and basis function gradient term, see `PetscBdPointJacFn`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscBdPointJacFn`, `PetscDSGetBdJacobianPreconditioner()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscDSSetBdJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn) end\n\n@for_petsc function PetscDSSetBdJacobianPreconditioner(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, g::$PetscInt, g0::PetscBdPoCintJacFn, g1::PetscBdPoCintJacFn, g2::PetscBdPoCintJacFn, g3::PetscBdPoCintJacFn )\n\n    @chk ccall(\n               (:PetscDSSetBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, Ptr{PetscBdPoCintJacFn}, Ptr{PetscBdPoCintJacFn}, Ptr{PetscBdPoCintJacFn}, Ptr{PetscBdPoCintJacFn}),\n               ds, f, g, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetExactSolution(petsclib::PetscLibType,prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) \nGet the pointwise exact solution function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS`\n- `f`    - The test field number\n\nOutput Parameters:\n- `sol` - exact solution function for the test field, see `PetscPointExactSolutionFn`\n- `ctx` - exact solution context\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointExactSolutionFn`, `PetscDSSetExactSolution()`, `PetscDSGetExactSolutionTimeDerivative()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetExactSolution\"))\n\"\"\"\nfunction PetscDSGetExactSolution(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSGetExactSolution(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSGetExactSolution, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintExactSolutionFn, Cvoid),\n               prob, f, sol, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetExactSolution(petsclib::PetscLibType,prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) \nSet the pointwise exact solution function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS`\n- `f`    - The test field number\n- `sol`  - solution function for the test fields, see `PetscPointExactSolutionFn`\n- `ctx`  - solution context or `NULL`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointExactSolutionFn`, `PetscDSGetExactSolution()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetExactSolution\"))\n\"\"\"\nfunction PetscDSSetExactSolution(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSSetExactSolution(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSSetExactSolution, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintExactSolutionFn}, Ptr{Cvoid}),\n               prob, f, sol, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetExactSolutionTimeDerivative(petsclib::PetscLibType,prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) \nGet the pointwise time derivative of the exact solution function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS`\n- `f`    - The test field number\n\nOutput Parameters:\n- `sol` - time derivative of the exact solution for the test field, see `PetscPointExactSolutionFn`\n- `ctx` - the exact solution context\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointExactSolutionFn`, `PetscDSSetExactSolutionTimeDerivative()`, `PetscDSGetExactSolution()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetExactSolutionTimeDerivative\"))\n\"\"\"\nfunction PetscDSGetExactSolutionTimeDerivative(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSGetExactSolutionTimeDerivative(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSGetExactSolutionTimeDerivative, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintExactSolutionFn, Cvoid),\n               prob, f, sol, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetExactSolutionTimeDerivative(petsclib::PetscLibType,prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) \nSet the pointwise time derivative of the exact solution function for a given test field\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS`\n- `f`    - The test field number\n- `sol`  - time derivative of the solution function for the test fields, see `PetscPointExactSolutionFn`\n- `ctx`  - the solution context or `NULL`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointExactSolutionFn`, `PetscDSGetExactSolutionTimeDerivative()`, `PetscDSSetExactSolution()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetExactSolutionTimeDerivative\"))\n\"\"\"\nfunction PetscDSSetExactSolutionTimeDerivative(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSSetExactSolutionTimeDerivative(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt, sol::PetscPoCintExactSolutionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSSetExactSolutionTimeDerivative, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintExactSolutionFn}, Ptr{Cvoid}),\n               prob, f, sol, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetLowerBound(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, lb::PetscPoCintBoundFn, ctx::Cvoid) \nGet the pointwise lower bound function for a given field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The PetscDS\n- `f`  - The field number\n\nOutput Parameters:\n- `lb`  - lower bound function for the field, see `PetscPointBoundFn`\n- `ctx` - lower bound context that was set with `PetscDSSetLowerBound()`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointBoundFn`, `PetscDSSetLowerBound()`, `PetscDSGetUpperBound()`, `PetscDSGetExactSolution()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetLowerBound\"))\n\"\"\"\nfunction PetscDSGetLowerBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, lb::PetscPoCintBoundFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSGetLowerBound(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, lb::PetscPoCintBoundFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSGetLowerBound, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintBoundFn, Cvoid),\n               ds, f, lb, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetLowerBound(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, lb::PetscPoCintBoundFn, ctx::Cvoid) \nSet the pointwise lower bound function for a given field\n\nNot Collective\n\nInput Parameters:\n- `ds`  - The `PetscDS`\n- `f`   - The field number\n- `lb`  - lower bound function for the test fields, see `PetscPointBoundFn`\n- `ctx` - lower bound context or `NULL` which will be passed to `lb`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointBoundFn`, `PetscDSGetLowerBound()`, `PetscDSGetUpperBound()`, `PetscDSGetExactSolution()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetLowerBound\"))\n\"\"\"\nfunction PetscDSSetLowerBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, lb::PetscPoCintBoundFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSSetLowerBound(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, lb::PetscPoCintBoundFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSSetLowerBound, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintBoundFn}, Ptr{Cvoid}),\n               ds, f, lb, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetUpperBound(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, ub::PetscPoCintBoundFn, ctx::Cvoid) \nGet the pointwise upper bound function for a given field\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS`\n- `f`  - The field number\n\nOutput Parameters:\n- `ub`  - upper bound function for the field, see `PetscPointBoundFn`\n- `ctx` - upper bound context that was set with `PetscDSSetUpperBound()`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointBoundFn`, `PetscDSSetUpperBound()`, `PetscDSGetLowerBound()`, `PetscDSGetExactSolution()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetUpperBound\"))\n\"\"\"\nfunction PetscDSGetUpperBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, ub::PetscPoCintBoundFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSGetUpperBound(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, ub::PetscPoCintBoundFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSGetUpperBound, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, PetscPoCintBoundFn, Cvoid),\n               ds, f, ub, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetUpperBound(petsclib::PetscLibType,ds::PetscDS, f::PetscInt, ub::PetscPoCintBoundFn, ctx::Cvoid) \nSet the pointwise upper bound function for a given field\n\nNot Collective\n\nInput Parameters:\n- `ds`  - The `PetscDS`\n- `f`   - The field number\n- `ub`  - upper bound function for the test fields, see `PetscPointBoundFn`\n- `ctx` - context or `NULL` that will be passed to `ub`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscPointBoundFn`, `PetscDSGetUpperBound()`, `PetscDSGetLowerBound()`, `PetscDSGetExactSolution()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetUpperBound\"))\n\"\"\"\nfunction PetscDSSetUpperBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, ub::PetscPoCintBoundFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSSetUpperBound(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt, ub::PetscPoCintBoundFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSSetUpperBound, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscPoCintBoundFn}, Ptr{Cvoid}),\n               ds, f, ub, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumConstants::PetscInt,constants::Vector{PetscScalar} = PetscDSGetConstants(petsclib::PetscLibType,ds::PetscDS) \nReturns the array of constants passed to point functions from a `PetscDS` object\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameters:\n- `numConstants` - The number of constants, or pass in `NULL` if not required\n- `constants`    - The array of constants, `NULL` if there are none\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSetConstants()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetConstants\"))\n\"\"\"\nfunction PetscDSGetConstants(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSGetConstants(petsclib::$UnionPetscLib, ds::PetscDS )\n\tnumConstants_ = Ref{$PetscInt}()\n\tconstants_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:PetscDSGetConstants, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               ds, numConstants_, constants_,\n              )\n\n\tnumConstants = numConstants_[]\n\tconstants = unsafe_wrap(Array, constants_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numConstants,constants\nend \n\n\"\"\"\n\tPetscDSSetConstants(petsclib::PetscLibType,ds::PetscDS, numConstants::PetscInt, constants::Vector{PetscScalar}) \nSet the array of constants passed to point functions from a `PetscDS`\n\nNot Collective\n\nInput Parameters:\n- `ds`           - The `PetscDS` object\n- `numConstants` - The number of constants\n- `constants`    - The array of constants, `NULL` if there are none\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSGetConstants()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetConstants\"))\n\"\"\"\nfunction PetscDSSetConstants(petsclib::PetscLibType, ds::PetscDS, numConstants::PetscInt, constants::Vector{PetscScalar}) end\n\n@for_petsc function PetscDSSetConstants(petsclib::$UnionPetscLib, ds::PetscDS, numConstants::$PetscInt, constants::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDSSetConstants, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscScalar}),\n               ds, numConstants, constants,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetIntegrationParameters(petsclib::PetscLibType,ds::PetscDS, fieldI::PetscInt, fieldJ::PetscInt) \nSet the parameters for a particular integration\n\nNot Collective\n\nInput Parameters:\n- `ds`     - The `PetscDS` object\n- `fieldI` - The test field for a given point function, or `PETSC_DETERMINE`\n- `fieldJ` - The basis field for a given point function, or `PETSC_DETERMINE`\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSetConstants()`, `PetscDSGetConstants()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetIntegrationParameters\"))\n\"\"\"\nfunction PetscDSSetIntegrationParameters(petsclib::PetscLibType, ds::PetscDS, fieldI::PetscInt, fieldJ::PetscInt) end\n\n@for_petsc function PetscDSSetIntegrationParameters(petsclib::$UnionPetscLib, ds::PetscDS, fieldI::$PetscInt, fieldJ::$PetscInt )\n\n    @chk ccall(\n               (:PetscDSSetIntegrationParameters, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt),\n               ds, fieldI, fieldJ,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSetCellParameters(petsclib::PetscLibType,ds::PetscDS, volume::PetscReal) \nSet the parameters for a particular cell\n\nNot Collective\n\nInput Parameters:\n- `ds`     - The `PetscDS` object\n- `volume` - The cell volume\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSetConstants()`, `PetscDSGetConstants()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSetCellParameters\"))\n\"\"\"\nfunction PetscDSSetCellParameters(petsclib::PetscLibType, ds::PetscDS, volume::PetscReal) end\n\n@for_petsc function PetscDSSetCellParameters(petsclib::$UnionPetscLib, ds::PetscDS, volume::$PetscReal )\n\n    @chk ccall(\n               (:PetscDSSetCellParameters, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscReal),\n               ds, volume,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tf::PetscInt = PetscDSGetFieldIndex(petsclib::PetscLibType,prob::PetscDS, disc::PetscObject) \nReturns the index of the given field\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `disc` - The discretization object\n\nOutput Parameter:\n- `f` - The field number\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscGetDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetFieldIndex\"))\n\"\"\"\nfunction PetscDSGetFieldIndex(petsclib::PetscLibType, prob::PetscDS, disc::PetscObject) end\n\n@for_petsc function PetscDSGetFieldIndex(petsclib::$UnionPetscLib, prob::PetscDS, disc::PetscObject )\n\tf_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetFieldIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscObject, Ptr{$PetscInt}),\n               prob, disc, f_,\n              )\n\n\tf = f_[]\n\n\treturn f\nend \n\n\"\"\"\n\tsize::PetscInt = PetscDSGetFieldSize(petsclib::PetscLibType,prob::PetscDS, f::PetscInt) \nReturns the size of the given field in the full space basis\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `f`    - The field number\n\nOutput Parameter:\n- `size` - The size\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetFieldOffset()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetFieldSize\"))\n\"\"\"\nfunction PetscDSGetFieldSize(petsclib::PetscLibType, prob::PetscDS, f::PetscInt) end\n\n@for_petsc function PetscDSGetFieldSize(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetFieldSize, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}),\n               prob, f, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\toff::PetscInt = PetscDSGetFieldOffset(petsclib::PetscLibType,prob::PetscDS, f::PetscInt) \nReturns the offset of the given field in the full space basis\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `f`    - The field number\n\nOutput Parameter:\n- `off` - The offset\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetFieldSize()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetFieldOffset\"))\n\"\"\"\nfunction PetscDSGetFieldOffset(petsclib::PetscLibType, prob::PetscDS, f::PetscInt) end\n\n@for_petsc function PetscDSGetFieldOffset(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt )\n\toff_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetFieldOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}),\n               prob, f, off_,\n              )\n\n\toff = off_[]\n\n\treturn off\nend \n\n\"\"\"\n\toff::PetscInt = PetscDSGetFieldOffsetCohesive(petsclib::PetscLibType,ds::PetscDS, f::PetscInt) \nReturns the offset of the given field in the full space basis on a cohesive cell\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `f`  - The field number\n\nOutput Parameter:\n- `off` - The offset\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetFieldSize()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetFieldOffsetCohesive\"))\n\"\"\"\nfunction PetscDSGetFieldOffsetCohesive(petsclib::PetscLibType, ds::PetscDS, f::PetscInt) end\n\n@for_petsc function PetscDSGetFieldOffsetCohesive(petsclib::$UnionPetscLib, ds::PetscDS, f::$PetscInt )\n\toff_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetFieldOffsetCohesive, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}),\n               ds, f, off_,\n              )\n\n\toff = off_[]\n\n\treturn off\nend \n\n\"\"\"\n\tdimensions::Vector{PetscInt} = PetscDSGetDimensions(petsclib::PetscLibType,prob::PetscDS) \nReturns the size of the approximation space for each field on an evaluation point\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `dimensions` - The number of dimensions\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetComponentOffsets()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetDimensions\"))\n\"\"\"\nfunction PetscDSGetDimensions(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetDimensions(petsclib::$UnionPetscLib, prob::PetscDS )\n\tdimensions_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDSGetDimensions, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{$PetscInt}}),\n               prob, dimensions_,\n              )\n\n\tdimensions = unsafe_wrap(Array, dimensions_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn dimensions\nend \n\n\"\"\"\n\tcomponents::Vector{PetscInt} = PetscDSGetComponents(petsclib::PetscLibType,prob::PetscDS) \nReturns the number of components for each field on an evaluation point\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `components` - The number of components\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetComponentOffsets()`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetComponents\"))\n\"\"\"\nfunction PetscDSGetComponents(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetComponents(petsclib::$UnionPetscLib, prob::PetscDS )\n\tcomponents_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDSGetComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{$PetscInt}}),\n               prob, components_,\n              )\n\n\tcomponents = unsafe_wrap(Array, components_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn components\nend \n\n\"\"\"\n\toff::PetscInt = PetscDSGetComponentOffset(petsclib::PetscLibType,prob::PetscDS, f::PetscInt) \nReturns the offset of the given field on an evaluation point\n\nNot Collective\n\nInput Parameters:\n- `prob` - The `PetscDS` object\n- `f`    - The field number\n\nOutput Parameter:\n- `off` - The offset\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetComponentOffset\"))\n\"\"\"\nfunction PetscDSGetComponentOffset(petsclib::PetscLibType, prob::PetscDS, f::PetscInt) end\n\n@for_petsc function PetscDSGetComponentOffset(petsclib::$UnionPetscLib, prob::PetscDS, f::$PetscInt )\n\toff_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetComponentOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}),\n               prob, f, off_,\n              )\n\n\toff = off_[]\n\n\treturn off\nend \n\n\"\"\"\n\toffsets::Vector{PetscInt} = PetscDSGetComponentOffsets(petsclib::PetscLibType,prob::PetscDS) \nReturns the offset of each field on an evaluation point\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `offsets` - The offsets\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetComponentOffsets\"))\n\"\"\"\nfunction PetscDSGetComponentOffsets(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetComponentOffsets(petsclib::$UnionPetscLib, prob::PetscDS )\n\toffsets_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDSGetComponentOffsets, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{$PetscInt}}),\n               prob, offsets_,\n              )\n\n\toffsets = unsafe_wrap(Array, offsets_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn offsets\nend \n\n\"\"\"\n\toffsets::Vector{PetscInt} = PetscDSGetComponentDerivativeOffsets(petsclib::PetscLibType,prob::PetscDS) \nReturns the offset of each field derivative on an evaluation point\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `offsets` - The offsets\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetComponentDerivativeOffsets\"))\n\"\"\"\nfunction PetscDSGetComponentDerivativeOffsets(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetComponentDerivativeOffsets(petsclib::$UnionPetscLib, prob::PetscDS )\n\toffsets_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDSGetComponentDerivativeOffsets, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{$PetscInt}}),\n               prob, offsets_,\n              )\n\n\toffsets = unsafe_wrap(Array, offsets_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn offsets\nend \n\n\"\"\"\n\toffsets::Vector{PetscInt} = PetscDSGetComponentOffsetsCohesive(petsclib::PetscLibType,ds::PetscDS, s::PetscInt) \nReturns the offset of each field on an evaluation point\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `s`  - The cohesive side, 0 for negative, 1 for positive, 2 for cohesive\n\nOutput Parameter:\n- `offsets` - The offsets\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetComponentOffsetsCohesive\"))\n\"\"\"\nfunction PetscDSGetComponentOffsetsCohesive(petsclib::PetscLibType, ds::PetscDS, s::PetscInt) end\n\n@for_petsc function PetscDSGetComponentOffsetsCohesive(petsclib::$UnionPetscLib, ds::PetscDS, s::$PetscInt )\n\toffsets_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDSGetComponentOffsetsCohesive, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               ds, s, offsets_,\n              )\n\n\toffsets = unsafe_wrap(Array, offsets_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn offsets\nend \n\n\"\"\"\n\toffsets::Vector{PetscInt} = PetscDSGetComponentDerivativeOffsetsCohesive(petsclib::PetscLibType,ds::PetscDS, s::PetscInt) \nReturns the offset of each field derivative on an evaluation point\n\nNot Collective\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `s`  - The cohesive side, 0 for negative, 1 for positive, 2 for cohesive\n\nOutput Parameter:\n- `offsets` - The offsets\n\nLevel: beginner\n\n-seealso: `PetscDS`, `PetscDSGetNumFields()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetComponentDerivativeOffsetsCohesive\"))\n\"\"\"\nfunction PetscDSGetComponentDerivativeOffsetsCohesive(petsclib::PetscLibType, ds::PetscDS, s::PetscInt) end\n\n@for_petsc function PetscDSGetComponentDerivativeOffsetsCohesive(petsclib::$UnionPetscLib, ds::PetscDS, s::$PetscInt )\n\toffsets_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDSGetComponentDerivativeOffsetsCohesive, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               ds, s, offsets_,\n              )\n\n\toffsets = unsafe_wrap(Array, offsets_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn offsets\nend \n\n\"\"\"\n\tPetscDSGetTabulation(petsclib::PetscLibType,prob::PetscDS, T::Vector{PetscTabulation}) \nReturn the basis tabulation at quadrature points for the volume discretization\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `T` - The basis function and derivatives tabulation at quadrature points for each field, see `PetscTabulation` for its details\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscTabulation`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetTabulation\"))\n\"\"\"\nfunction PetscDSGetTabulation(petsclib::PetscLibType, prob::PetscDS, T::Vector{PetscTabulation}) end\n\n@for_petsc function PetscDSGetTabulation(petsclib::$UnionPetscLib, prob::PetscDS, T::Vector{PetscTabulation} )\n\tT_ = Ref(pointer(T))\n\n    @chk ccall(\n               (:PetscDSGetTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{PetscTabulation}}),\n               prob, T_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetFaceTabulation(petsclib::PetscLibType,prob::PetscDS, Tf::Vector{PetscTabulation}) \nReturn the basis tabulation at quadrature points on the faces\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `Tf` - The basis function and derivative tabulation on each local face at quadrature points for each field\n\nLevel: intermediate\n\n-seealso: `PetscTabulation`, `PetscDS`, `PetscDSGetTabulation()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetFaceTabulation\"))\n\"\"\"\nfunction PetscDSGetFaceTabulation(petsclib::PetscLibType, prob::PetscDS, Tf::Vector{PetscTabulation}) end\n\n@for_petsc function PetscDSGetFaceTabulation(petsclib::$UnionPetscLib, prob::PetscDS, Tf::Vector{PetscTabulation} )\n\tTf_ = Ref(pointer(Tf))\n\n    @chk ccall(\n               (:PetscDSGetFaceTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{PetscTabulation}}),\n               prob, Tf_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tu::Vector{PetscScalar},u_t::Vector{PetscScalar},u_x::Vector{PetscScalar} = PetscDSGetEvaluationArrays(petsclib::PetscLibType,prob::PetscDS) \n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetEvaluationArrays\"))\n\"\"\"\nfunction PetscDSGetEvaluationArrays(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetEvaluationArrays(petsclib::$UnionPetscLib, prob::PetscDS )\n\tu_ = Ref{Ptr{$PetscScalar}}()\n\tu_t_ = Ref{Ptr{$PetscScalar}}()\n\tu_x_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:PetscDSGetEvaluationArrays, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               prob, u_, u_t_, u_x_,\n              )\n\n\tu = unsafe_wrap(Array, u_[], VecGetLocalSize(petsclib, x); own = false)\n\tu_t = unsafe_wrap(Array, u_t_[], VecGetLocalSize(petsclib, x); own = false)\n\tu_x = unsafe_wrap(Array, u_x_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn u,u_t,u_x\nend \n\n\"\"\"\n\tf0::Vector{PetscScalar},f1::Vector{PetscScalar},g0::Vector{PetscScalar},g1::Vector{PetscScalar},g2::Vector{PetscScalar},g3::Vector{PetscScalar} = PetscDSGetWeakFormArrays(petsclib::PetscLibType,prob::PetscDS) \n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetWeakFormArrays\"))\n\"\"\"\nfunction PetscDSGetWeakFormArrays(petsclib::PetscLibType, prob::PetscDS) end\n\n@for_petsc function PetscDSGetWeakFormArrays(petsclib::$UnionPetscLib, prob::PetscDS )\n\tf0_ = Ref{Ptr{$PetscScalar}}()\n\tf1_ = Ref{Ptr{$PetscScalar}}()\n\tg0_ = Ref{Ptr{$PetscScalar}}()\n\tg1_ = Ref{Ptr{$PetscScalar}}()\n\tg2_ = Ref{Ptr{$PetscScalar}}()\n\tg3_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:PetscDSGetWeakFormArrays, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               prob, f0_, f1_, g0_, g1_, g2_, g3_,\n              )\n\n\tf0 = unsafe_wrap(Array, f0_[], VecGetLocalSize(petsclib, x); own = false)\n\tf1 = unsafe_wrap(Array, f1_[], VecGetLocalSize(petsclib, x); own = false)\n\tg0 = unsafe_wrap(Array, g0_[], VecGetLocalSize(petsclib, x); own = false)\n\tg1 = unsafe_wrap(Array, g1_[], VecGetLocalSize(petsclib, x); own = false)\n\tg2 = unsafe_wrap(Array, g2_[], VecGetLocalSize(petsclib, x); own = false)\n\tg3 = unsafe_wrap(Array, g3_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn f0,f1,g0,g1,g2,g3\nend \n\n\"\"\"\n\tPetscDSGetWorkspace(petsclib::PetscLibType,prob::PetscDS, x::PetscReal, basisReal::PetscScalar, basisDerReal::PetscScalar, testReal::PetscScalar, testDerReal::PetscScalar) \n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetWorkspace\"))\n\"\"\"\nfunction PetscDSGetWorkspace(petsclib::PetscLibType, prob::PetscDS, x::PetscReal, basisReal::PetscScalar, basisDerReal::PetscScalar, testReal::PetscScalar, testDerReal::PetscScalar) end\n\n@for_petsc function PetscDSGetWorkspace(petsclib::$UnionPetscLib, prob::PetscDS, x::$PetscReal, basisReal::$PetscScalar, basisDerReal::$PetscScalar, testReal::$PetscScalar, testDerReal::$PetscScalar )\n\n    @chk ccall(\n               (:PetscDSGetWorkspace, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscReal, $PetscScalar, $PetscScalar, $PetscScalar, $PetscScalar),\n               prob, x, basisReal, basisDerReal, testReal, testDerReal,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbd::PetscInt = PetscDSAddBoundary(petsclib::PetscLibType,ds::PetscDS, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) \nAdd a boundary condition to the model.\n\nCollective\n\nInput Parameters:\n- `ds`       - The `PetscDS` object\n- `type`     - The type of condition, e.g. `DM_BC_ESSENTIAL`/`DM_BC_ESSENTIAL_FIELD` (Dirichlet), or `DM_BC_NATURAL` (Neumann)\n- `name`     - The name for the boundary condition\n- `label`    - The label defining constrained points\n- `Nv`       - The number of `DMLabel` values for constrained points\n- `values`   - An array of label values for constrained points\n- `field`    - The field to constrain\n- `Nc`       - The number of constrained field components (0 will constrain all fields)\n- `comps`    - An array of constrained component numbers\n- `bcFunc`   - A pointwise function giving boundary values\n- `bcFunc_t` - A pointwise function giving the time derivative of the boundary values, or `NULL`\n- `ctx`      - An optional user context for `bcFunc`\n\nOutput Parameter:\n- `bd` - The boundary number\n\nOptions Database Keys:\n- `-bc_<boundary name> <num>`      - Overrides the boundary ids\n- `-bc_<boundary name>_comp <num>` - Overrides the boundary components\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscWeakForm`, `DMLabel`, `DMBoundaryConditionType`, `PetscDSAddBoundaryByName()`, `PetscDSGetBoundary()`, `PetscDSSetResidual()`, `PetscDSSetBdResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSAddBoundary\"))\n\"\"\"\nfunction PetscDSAddBoundary(petsclib::PetscLibType, ds::PetscDS, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSAddBoundary(petsclib::$UnionPetscLib, ds::PetscDS, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::$PetscInt, values::Vector{$PetscInt}, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid )\n\tbd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSAddBoundary, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, DMBoundaryConditionType, Ptr{Cchar}, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscVoidFn}, Ptr{PetscVoidFn}, Ptr{Cvoid}, Ptr{$PetscInt}),\n               ds, type, name, label, Nv, values, field, Nc, comps, bcFunc, bcFunc_t, ctx, bd_,\n              )\n\n\tbd = bd_[]\n\n\treturn bd\nend \n\n\"\"\"\n\tbd::PetscInt = PetscDSAddBoundaryByName(petsclib::PetscLibType,ds::PetscDS, type::DMBoundaryConditionType, name::String, lname::String, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) \nAdd a boundary condition to the model.\n\nCollective\n\nInput Parameters:\n- `ds`       - The `PetscDS` object\n- `type`     - The type of condition, e.g. `DM_BC_ESSENTIAL`/`DM_BC_ESSENTIAL_FIELD` (Dirichlet), or `DM_BC_NATURAL` (Neumann)\n- `name`     - The boundary condition name\n- `lname`    - The name of the label defining constrained points\n- `Nv`       - The number of `DMLabel` values for constrained points\n- `values`   - An array of label values for constrained points\n- `field`    - The field to constrain\n- `Nc`       - The number of constrained field components (0 will constrain all fields)\n- `comps`    - An array of constrained component numbers\n- `bcFunc`   - A pointwise function giving boundary values\n- `bcFunc_t` - A pointwise function giving the time derivative of the boundary values, or `NULL`\n- `ctx`      - An optional user context for `bcFunc`\n\nOutput Parameter:\n- `bd` - The boundary number\n\nOptions Database Keys:\n- `-bc_<boundary name> <num>`      - Overrides the boundary ids\n- `-bc_<boundary name>_comp <num>` - Overrides the boundary components\n\nCalling Sequence of `bcFunc` and `bcFunc_t`:\nIf the type is `DM_BC_ESSENTIAL`\n-seealso: `PetscDS`, `PetscWeakForm`, `DMLabel`, `DMBoundaryConditionType`, `PetscDSAddBoundary()`, `PetscDSGetBoundary()`, `PetscDSSetResidual()`, `PetscDSSetBdResidual()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSAddBoundaryByName\"))\n\"\"\"\nfunction PetscDSAddBoundaryByName(petsclib::PetscLibType, ds::PetscDS, type::DMBoundaryConditionType, name::String, lname::String, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSAddBoundaryByName(petsclib::$UnionPetscLib, ds::PetscDS, type::DMBoundaryConditionType, name::String, lname::String, Nv::$PetscInt, values::Vector{$PetscInt}, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid )\n\tbd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSAddBoundaryByName, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, DMBoundaryConditionType, Ptr{Cchar}, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscVoidFn}, Ptr{PetscVoidFn}, Ptr{Cvoid}, Ptr{$PetscInt}),\n               ds, type, name, lname, Nv, values, field, Nc, comps, bcFunc, bcFunc_t, ctx, bd_,\n              )\n\n\tbd = bd_[]\n\n\treturn bd\nend \n\n\"\"\"\n\tPetscDSUpdateBoundary(petsclib::PetscLibType,ds::PetscDS, bd::PetscInt, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) \nChange a boundary condition for the model.\n\nInput Parameters:\n- `ds`       - The `PetscDS` object\n- `bd`       - The boundary condition number\n- `type`     - The type of condition, e.g. `DM_BC_ESSENTIAL`/`DM_BC_ESSENTIAL_FIELD` (Dirichlet), or `DM_BC_NATURAL` (Neumann)\n- `name`     - The boundary condition name\n- `label`    - The label defining constrained points\n- `Nv`       - The number of `DMLabel` ids for constrained points\n- `values`   - An array of ids for constrained points\n- `field`    - The field to constrain\n- `Nc`       - The number of constrained field components\n- `comps`    - An array of constrained component numbers\n- `bcFunc`   - A pointwise function giving boundary values\n- `bcFunc_t` - A pointwise function giving the time derivative of the boundary values, or `NULL`\n- `ctx`      - An optional user context for `bcFunc`\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscWeakForm`, `DMBoundaryConditionType`, `PetscDSAddBoundary()`, `PetscDSGetBoundary()`, `PetscDSGetNumBoundary()`, `DMLabel`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSUpdateBoundary\"))\n\"\"\"\nfunction PetscDSUpdateBoundary(petsclib::PetscLibType, ds::PetscDS, bd::PetscInt, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSUpdateBoundary(petsclib::$UnionPetscLib, ds::PetscDS, bd::$PetscInt, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::$PetscInt, values::Vector{$PetscInt}, field::$PetscInt, Nc::$PetscInt, comps::Vector{$PetscInt}, bcFunc::PetscVoidFn, bcFunc_t::PetscVoidFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDSUpdateBoundary, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, DMBoundaryConditionType, Ptr{Cchar}, DMLabel, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscVoidFn}, Ptr{PetscVoidFn}, Ptr{Cvoid}),\n               ds, bd, type, name, label, Nv, values, field, Nc, comps, bcFunc, bcFunc_t, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumBd::PetscInt = PetscDSGetNumBoundary(petsclib::PetscLibType,ds::PetscDS) \nGet the number of registered boundary conditions\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameter:\n- `numBd` - The number of boundary conditions\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSAddBoundary()`, `PetscDSGetBoundary()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetNumBoundary\"))\n\"\"\"\nfunction PetscDSGetNumBoundary(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSGetNumBoundary(petsclib::$UnionPetscLib, ds::PetscDS )\n\tnumBd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSGetNumBoundary, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, Ptr{$PetscInt}),\n               ds, numBd_,\n              )\n\n\tnumBd = numBd_[]\n\n\treturn numBd\nend \n\n\"\"\"\n\tNv::PetscInt,values::Vector{PetscInt},field::PetscInt,Nc::PetscInt,comps::Vector{PetscInt} = PetscDSGetBoundary(petsclib::PetscLibType,ds::PetscDS, bd::PetscInt, wf::PetscWeakForm, type::DMBoundaryConditionType, name::String, label::DMLabel, func::PetscVoidFn, func_t::PetscVoidFn, ctx::Cvoid) \nGets a boundary condition from the model\n\nInput Parameters:\n- `ds` - The `PetscDS` object\n- `bd` - The boundary condition number\n\nOutput Parameters:\n- `wf`     - The `PetscWeakForm` holding the pointwise functions\n- `type`   - The type of condition, e.g. `DM_BC_ESSENTIAL`/`DM_BC_ESSENTIAL_FIELD` (Dirichlet), or `DM_BC_NATURAL` (Neumann)\n- `name`   - The boundary condition name\n- `label`  - The label defining constrained points\n- `Nv`     - The number of `DMLabel` ids for constrained points\n- `values` - An array of ids for constrained points\n- `field`  - The field to constrain\n- `Nc`     - The number of constrained field components\n- `comps`  - An array of constrained component numbers\n- `func`   - A pointwise function giving boundary values\n- `func_t` - A pointwise function giving the time derivative of the boundary values\n- `ctx`    - An optional user context for `bcFunc`\n\nOptions Database Keys:\n- `-bc_<boundary name> <num>`      - Overrides the boundary ids\n- `-bc_<boundary name>_comp <num>` - Overrides the boundary components\n\nLevel: developer\n\n-seealso: `PetscDS`, `PetscWeakForm`, `DMBoundaryConditionType`, `PetscDSAddBoundary()`, `DMLabel`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetBoundary\"))\n\"\"\"\nfunction PetscDSGetBoundary(petsclib::PetscLibType, ds::PetscDS, bd::PetscInt, wf::PetscWeakForm, type::DMBoundaryConditionType, name::String, label::DMLabel, func::PetscVoidFn, func_t::PetscVoidFn, ctx::Cvoid) end\n\n@for_petsc function PetscDSGetBoundary(petsclib::$UnionPetscLib, ds::PetscDS, bd::$PetscInt, wf::PetscWeakForm, type::DMBoundaryConditionType, name::String, label::DMLabel, func::PetscVoidFn, func_t::PetscVoidFn, ctx::Cvoid )\n\tname_ = Ref(pointer(name))\n\tNv_ = Ref{$PetscInt}()\n\tvalues_ = Ref{Ptr{$PetscInt}}()\n\tfield_ = Ref{$PetscInt}()\n\tNc_ = Ref{$PetscInt}()\n\tcomps_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDSGetBoundary, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscWeakForm}, Ptr{DMBoundaryConditionType}, Ptr{Ptr{Cchar}}, Ptr{DMLabel}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, PetscVoidFn, PetscVoidFn, Cvoid),\n               ds, bd, wf, type, name_, label, Nv_, values_, field_, Nc_, comps_, func, func_t, ctx,\n              )\n\n\tNv = Nv_[]\n\tvalues = unsafe_wrap(Array, values_[], VecGetLocalSize(petsclib, x); own = false)\n\tfield = field_[]\n\tNc = Nc_[]\n\tcomps = unsafe_wrap(Array, comps_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn Nv,values,field,Nc,comps\nend \n\n\"\"\"\n\tPetscDSUpdateBoundaryLabels(petsclib::PetscLibType,ds::PetscDS, dm::PetscDM) \nUpdate `DMLabel` in each boundary condition using the label name and the input `DM`\n\nNot Collective\n\nInput Parameters:\n- `ds` - The source `PetscDS` object\n- `dm` - The `DM` holding labels\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `DMBoundary`, `DM`, `PetscDSCopyBoundary()`, `PetscDSCreate()`, `DMGetLabel()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSUpdateBoundaryLabels\"))\n\"\"\"\nfunction PetscDSUpdateBoundaryLabels(petsclib::PetscLibType, ds::PetscDS, dm::PetscDM) end\n\n@for_petsc function PetscDSUpdateBoundaryLabels(petsclib::$UnionPetscLib, ds::PetscDS, dm::PetscDM )\n\n    @chk ccall(\n               (:PetscDSUpdateBoundaryLabels, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, CDM),\n               ds, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSCopyBoundary(petsclib::PetscLibType,ds::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, newds::PetscDS) \nCopy all boundary condition objects to the new `PetscDS`\n\nNot Collective\n\nInput Parameters:\n- `ds`        - The source `PetscDS` object\n- `numFields` - The number of selected fields, or `PETSC_DEFAULT` for all fields\n- `fields`    - The selected fields, or `NULL` for all fields\n\nOutput Parameter:\n- `newds` - The target `PetscDS`, now with a copy of the boundary conditions\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `DMBoundary`, `PetscDSCopyEquations()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`, `PetscDSSetRiemannSolver()`, `PetscDSSetBdResidual()`, `PetscDSSetBdJacobian()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSCopyBoundary\"))\n\"\"\"\nfunction PetscDSCopyBoundary(petsclib::PetscLibType, ds::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, newds::PetscDS) end\n\n@for_petsc function PetscDSCopyBoundary(petsclib::$UnionPetscLib, ds::PetscDS, numFields::$PetscInt, fields::Vector{$PetscInt}, newds::PetscDS )\n\n    @chk ccall(\n               (:PetscDSCopyBoundary, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}, PetscDS),\n               ds, numFields, fields, newds,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSDestroyBoundary(petsclib::PetscLibType,ds::PetscDS) \nRemove all `DMBoundary` objects from the `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `DMBoundary`, `PetscDSCopyBoundary()`, `PetscDSCopyEquations()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSDestroyBoundary\"))\n\"\"\"\nfunction PetscDSDestroyBoundary(petsclib::PetscLibType, ds::PetscDS) end\n\n@for_petsc function PetscDSDestroyBoundary(petsclib::$UnionPetscLib, ds::PetscDS )\n\n    @chk ccall(\n               (:PetscDSDestroyBoundary, $petsc_library),\n               PetscErrorCode,\n               (PetscDS,),\n               ds,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSelectDiscretizations(petsclib::PetscLibType,prob::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, minDegree::PetscInt, maxDegree::PetscInt, newprob::PetscDS) \nCopy discretizations to the new `PetscDS` with different field layout\n\nNot Collective\n\nInput Parameters:\n- `prob`      - The `PetscDS` object\n- `numFields` - Number of new fields\n- `fields`    - Old field number for each new field\n- `minDegree` - Minimum degree for a discretization, or `PETSC_DETERMINE` for no limit\n- `maxDegree` - Maximum degree for a discretization, or `PETSC_DETERMINE` for no limit\n\nOutput Parameter:\n- `newprob` - The `PetscDS` copy\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSelectEquations()`, `PetscDSCopyBoundary()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`, `PetscDSSetRiemannSolver()`, `PetscDSSetBdResidual()`, `PetscDSSetBdJacobian()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSelectDiscretizations\"))\n\"\"\"\nfunction PetscDSSelectDiscretizations(petsclib::PetscLibType, prob::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, minDegree::PetscInt, maxDegree::PetscInt, newprob::PetscDS) end\n\n@for_petsc function PetscDSSelectDiscretizations(petsclib::$UnionPetscLib, prob::PetscDS, numFields::$PetscInt, fields::Vector{$PetscInt}, minDegree::$PetscInt, maxDegree::$PetscInt, newprob::PetscDS )\n\n    @chk ccall(\n               (:PetscDSSelectDiscretizations, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscInt, PetscDS),\n               prob, numFields, fields, minDegree, maxDegree, newprob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSSelectEquations(petsclib::PetscLibType,prob::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, newprob::PetscDS) \nCopy pointwise function pointers to the new `PetscDS` with different field layout\n\nNot Collective\n\nInput Parameters:\n- `prob`      - The `PetscDS` object\n- `numFields` - Number of new fields\n- `fields`    - Old field number for each new field\n\nOutput Parameter:\n- `newprob` - The `PetscDS` copy\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSSelectDiscretizations()`, `PetscDSCopyBoundary()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`, `PetscDSSetRiemannSolver()`, `PetscDSSetBdResidual()`, `PetscDSSetBdJacobian()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSSelectEquations\"))\n\"\"\"\nfunction PetscDSSelectEquations(petsclib::PetscLibType, prob::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, newprob::PetscDS) end\n\n@for_petsc function PetscDSSelectEquations(petsclib::$UnionPetscLib, prob::PetscDS, numFields::$PetscInt, fields::Vector{$PetscInt}, newprob::PetscDS )\n\n    @chk ccall(\n               (:PetscDSSelectEquations, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{$PetscInt}, PetscDS),\n               prob, numFields, fields, newprob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSCopyEquations(petsclib::PetscLibType,prob::PetscDS, newprob::PetscDS) \nCopy all pointwise function pointers to another `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `newprob` - The `PetscDS` copy\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSCopyBoundary()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`, `PetscDSSetRiemannSolver()`, `PetscDSSetBdResidual()`, `PetscDSSetBdJacobian()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSCopyEquations\"))\n\"\"\"\nfunction PetscDSCopyEquations(petsclib::PetscLibType, prob::PetscDS, newprob::PetscDS) end\n\n@for_petsc function PetscDSCopyEquations(petsclib::$UnionPetscLib, prob::PetscDS, newprob::PetscDS )\n\n    @chk ccall(\n               (:PetscDSCopyEquations, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDS),\n               prob, newprob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSCopyConstants(petsclib::PetscLibType,prob::PetscDS, newprob::PetscDS) \nCopy all constants set with `PetscDSSetConstants()` to another `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `prob` - The `PetscDS` object\n\nOutput Parameter:\n- `newprob` - The `PetscDS` copy\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSCopyBoundary()`, `PetscDSCopyEquations()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`, `PetscDSSetRiemannSolver()`, `PetscDSSetBdResidual()`, `PetscDSSetBdJacobian()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSCopyConstants\"))\n\"\"\"\nfunction PetscDSCopyConstants(petsclib::PetscLibType, prob::PetscDS, newprob::PetscDS) end\n\n@for_petsc function PetscDSCopyConstants(petsclib::$UnionPetscLib, prob::PetscDS, newprob::PetscDS )\n\n    @chk ccall(\n               (:PetscDSCopyConstants, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDS),\n               prob, newprob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSCopyExactSolutions(petsclib::PetscLibType,ds::PetscDS, newds::PetscDS) \nCopy all exact solutions set with `PetscDSSetExactSolution()` and `PetscDSSetExactSolutionTimeDerivative()` to another `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameter:\n- `newds` - The `PetscDS` copy\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSCopyBoundary()`, `PetscDSCopyEquations()`, `PetscDSCopyBounds()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`, `PetscDSSetRiemannSolver()`, `PetscDSSetBdResidual()`, `PetscDSSetBdJacobian()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSCopyExactSolutions\"))\n\"\"\"\nfunction PetscDSCopyExactSolutions(petsclib::PetscLibType, ds::PetscDS, newds::PetscDS) end\n\n@for_petsc function PetscDSCopyExactSolutions(petsclib::$UnionPetscLib, ds::PetscDS, newds::PetscDS )\n\n    @chk ccall(\n               (:PetscDSCopyExactSolutions, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDS),\n               ds, newds,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSCopyBounds(petsclib::PetscLibType,ds::PetscDS, newds::PetscDS) \nCopy lower and upper solution bounds set with `PetscDSSetLowerBound()` and `PetscDSSetLowerBound()` to another `PetscDS`\n\nNot Collective\n\nInput Parameter:\n- `ds` - The `PetscDS` object\n\nOutput Parameter:\n- `newds` - The `PetscDS` copy\n\nLevel: intermediate\n\n-seealso: `PetscDS`, `PetscDSCopyBoundary()`, `PetscDSCopyEquations()`, `PetscDSCopyExactSolutions()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`, `PetscDSSetRiemannSolver()`, `PetscDSSetBdResidual()`, `PetscDSSetBdJacobian()`, `PetscDSCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscDSCopyBounds\"))\n\"\"\"\nfunction PetscDSCopyBounds(petsclib::PetscLibType, ds::PetscDS, newds::PetscDS) end\n\n@for_petsc function PetscDSCopyBounds(petsclib::$UnionPetscLib, ds::PetscDS, newds::PetscDS )\n\n    @chk ccall(\n               (:PetscDSCopyBounds, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDS),\n               ds, newds,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSCopy(petsclib::PetscLibType,ds::PetscDS, minDegree::PetscInt, maxDegree::PetscInt, dmNew::PetscDM, dsNew::PetscDS) \n\n# External Links\n$(_doc_external(\"Dm/PetscDSCopy\"))\n\"\"\"\nfunction PetscDSCopy(petsclib::PetscLibType, ds::PetscDS, minDegree::PetscInt, maxDegree::PetscInt, dmNew::PetscDM, dsNew::PetscDS) end\n\n@for_petsc function PetscDSCopy(petsclib::$UnionPetscLib, ds::PetscDS, minDegree::$PetscInt, maxDegree::$PetscInt, dmNew::PetscDM, dsNew::PetscDS )\n\n    @chk ccall(\n               (:PetscDSCopy, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, CDM, PetscDS),\n               ds, minDegree, maxDegree, dmNew, dsNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDSGetHeightSubspace(petsclib::PetscLibType,prob::PetscDS, height::PetscInt, subprob::PetscDS) \n\n# External Links\n$(_doc_external(\"Dm/PetscDSGetHeightSubspace\"))\n\"\"\"\nfunction PetscDSGetHeightSubspace(petsclib::PetscLibType, prob::PetscDS, height::PetscInt, subprob::PetscDS) end\n\n@for_petsc function PetscDSGetHeightSubspace(petsclib::$UnionPetscLib, prob::PetscDS, height::$PetscInt, subprob::PetscDS )\n\n    @chk ccall(\n               (:PetscDSGetHeightSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{PetscDS}),\n               prob, height, subprob,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tqperm::PetscInt = PetscDSPermuteQuadPoint(petsclib::PetscLibType,ds::PetscDS, ornt::PetscInt, field::PetscInt, q::PetscInt) \n\n# External Links\n$(_doc_external(\"Dm/PetscDSPermuteQuadPoint\"))\n\"\"\"\nfunction PetscDSPermuteQuadPoint(petsclib::PetscLibType, ds::PetscDS, ornt::PetscInt, field::PetscInt, q::PetscInt) end\n\n@for_petsc function PetscDSPermuteQuadPoint(petsclib::$UnionPetscLib, ds::PetscDS, ornt::$PetscInt, field::$PetscInt, q::$PetscInt )\n\tqperm_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDSPermuteQuadPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               ds, ornt, field, q, qperm_,\n              )\n\n\tqperm = qperm_[]\n\n\treturn qperm\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscDevice_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscDevice end\nconst PetscDevice = Ptr{_n_PetscDevice}\n\nmutable struct _n_PetscDeviceContext end\nconst PetscDeviceContext = Ptr{_n_PetscDeviceContext}\n# -------------------------------------------------------\n\n\"\"\"\n\tdevice::PetscDevice = PetscDeviceCreate(petsclib::PetscLibType,type::PetscDeviceType, devid::PetscInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceCreate\"))\n\"\"\"\nfunction PetscDeviceCreate(petsclib::PetscLibType, type::PetscDeviceType, devid::PetscInt) end\n\n@for_petsc function PetscDeviceCreate(petsclib::$UnionPetscLib, type::PetscDeviceType, devid::$PetscInt )\n\tdevice_ = Ref{PetscDevice}()\n\n    @chk ccall(\n               (:PetscDeviceCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceType, $PetscInt, Ptr{PetscDevice}),\n               type, devid, device_,\n              )\n\n\tdevice = device_[]\n\n\treturn device\nend \n\n\"\"\"\n\tPetscDeviceDestroy(petsclib::PetscLibType,device::PetscDevice) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceDestroy\"))\n\"\"\"\nfunction PetscDeviceDestroy(petsclib::PetscLibType, device::PetscDevice) end\n\n@for_petsc function PetscDeviceDestroy(petsclib::$UnionPetscLib, device::PetscDevice )\n\n    @chk ccall(\n               (:PetscDeviceDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDevice},),\n               device,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceConfigure(petsclib::PetscLibType,device::PetscDevice) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceConfigure\"))\n\"\"\"\nfunction PetscDeviceConfigure(petsclib::PetscLibType, device::PetscDevice) end\n\n@for_petsc function PetscDeviceConfigure(petsclib::$UnionPetscLib, device::PetscDevice )\n\n    @chk ccall(\n               (:PetscDeviceConfigure, $petsc_library),\n               PetscErrorCode,\n               (PetscDevice,),\n               device,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceView(petsclib::PetscLibType,device::PetscDevice, viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceView\"))\n\"\"\"\nfunction PetscDeviceView(petsclib::PetscLibType, device::PetscDevice, viewer::PetscViewer) end\n\n@for_petsc function PetscDeviceView(petsclib::$UnionPetscLib, device::PetscDevice, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscDeviceView, $petsc_library),\n               PetscErrorCode,\n               (PetscDevice, PetscViewer),\n               device, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscDeviceType = PetscDeviceGetType(petsclib::PetscLibType,device::PetscDevice) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceGetType\"))\n\"\"\"\nfunction PetscDeviceGetType(petsclib::PetscLibType, device::PetscDevice) end\n\n@for_petsc function PetscDeviceGetType(petsclib::$UnionPetscLib, device::PetscDevice )\n\ttype_ = Ref{PetscDeviceType}()\n\n    @chk ccall(\n               (:PetscDeviceGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscDevice, Ptr{PetscDeviceType}),\n               device, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tid::PetscInt = PetscDeviceGetDeviceId(petsclib::PetscLibType,device::PetscDevice) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceGetDeviceId\"))\n\"\"\"\nfunction PetscDeviceGetDeviceId(petsclib::PetscLibType, device::PetscDevice) end\n\n@for_petsc function PetscDeviceGetDeviceId(petsclib::$UnionPetscLib, device::PetscDevice )\n\tid_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDeviceGetDeviceId, $petsc_library),\n               PetscErrorCode,\n               (PetscDevice, Ptr{$PetscInt}),\n               device, id_,\n              )\n\n\tid = id_[]\n\n\treturn id\nend \n\n\"\"\"\n\tPetscDeviceSetDefaultDeviceType(petsclib::PetscLibType,type::PetscDeviceType) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceSetDefaultDeviceType\"))\n\"\"\"\nfunction PetscDeviceSetDefaultDeviceType(petsclib::PetscLibType, type::PetscDeviceType) end\n\n@for_petsc function PetscDeviceSetDefaultDeviceType(petsclib::$UnionPetscLib, type::PetscDeviceType )\n\n    @chk ccall(\n               (:PetscDeviceSetDefaultDeviceType, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceType,),\n               type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceInitialize(petsclib::PetscLibType,type::PetscDeviceType) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceInitialize\"))\n\"\"\"\nfunction PetscDeviceInitialize(petsclib::PetscLibType, type::PetscDeviceType) end\n\n@for_petsc function PetscDeviceInitialize(petsclib::$UnionPetscLib, type::PetscDeviceType )\n\n    @chk ccall(\n               (:PetscDeviceInitialize, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceType,),\n               type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceMemcpy(petsclib::PetscLibType,dctx::PetscDeviceContext, dest::Cvoid, src::Cvoid, n_std::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceMemcpy\"))\n\"\"\"\nfunction PetscDeviceMemcpy(petsclib::PetscLibType, dctx::PetscDeviceContext, dest::Cvoid, src::Cvoid, n_std::Csize_t) end\n\n@for_petsc function PetscDeviceMemcpy(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, dest::Cvoid, src::Cvoid, n_std::Csize_t )\n\n    @chk ccall(\n               (:PetscDeviceMemcpy, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Ptr{Cvoid}, Ptr{Cvoid}, Csize_t),\n               dctx, dest, src, n_std,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceMemset(petsclib::PetscLibType,dctx::PetscDeviceContext, ptr::Cvoid, v::PetscInt, n_std::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceMemset\"))\n\"\"\"\nfunction PetscDeviceMemset(petsclib::PetscLibType, dctx::PetscDeviceContext, ptr::Cvoid, v::PetscInt, n_std::Csize_t) end\n\n@for_petsc function PetscDeviceMemset(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, ptr::Cvoid, v::$PetscInt, n_std::Csize_t )\n\n    @chk ccall(\n               (:PetscDeviceMemset, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Ptr{Cvoid}, $PetscInt, Csize_t),\n               dctx, ptr, v, n_std,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceFinalizePackage(petsclib::PetscLibType) \nThis function cleans up all components of the `PetscDevice`\npackage. It is called from `PetscFinalize()`.\n\n-seealso: `PetscFinalize()`, `PetscDeviceInitializePackage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceFinalizePackage\"))\n\"\"\"\nfunction PetscDeviceFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscDeviceFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscDeviceFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscDevice`\npackage. It is called on the first call to `PetscDeviceContextCreate()` or\n`PetscDeviceCreate()` when using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`, `PetscDeviceFinalizePackage()`, `PetscDeviceContextCreate()`,\n`PetscDeviceCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceInitializePackage\"))\n\"\"\"\nfunction PetscDeviceInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscDeviceInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscDeviceInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextGetCurrentContext(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextGetCurrentContext\"))\n\"\"\"\nfunction PetscDeviceContextGetCurrentContext(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextGetCurrentContext(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextGetCurrentContext, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDeviceContext},),\n               dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextSetCurrentContext(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextSetCurrentContext\"))\n\"\"\"\nfunction PetscDeviceContextSetCurrentContext(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextSetCurrentContext(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextSetCurrentContext, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext,),\n               dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdctx::PetscDeviceContext = PetscDeviceContextCreate(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextCreate\"))\n\"\"\"\nfunction PetscDeviceContextCreate(petsclib::PetscLibType) end\n\n@for_petsc function PetscDeviceContextCreate(petsclib::$UnionPetscLib)\n\tdctx_ = Ref{PetscDeviceContext}()\n\n    @chk ccall(\n               (:PetscDeviceContextCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDeviceContext},),\n               dctx_,\n              )\n\n\tdctx = dctx_[]\n\n\treturn dctx\nend \n\n\"\"\"\n\tPetscDeviceContextDestroy(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextDestroy\"))\n\"\"\"\nfunction PetscDeviceContextDestroy(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextDestroy(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDeviceContext},),\n               dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextSetStreamType(petsclib::PetscLibType,dctx::PetscDeviceContext, type::PetscStreamType) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextSetStreamType\"))\n\"\"\"\nfunction PetscDeviceContextSetStreamType(petsclib::PetscLibType, dctx::PetscDeviceContext, type::PetscStreamType) end\n\n@for_petsc function PetscDeviceContextSetStreamType(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, type::PetscStreamType )\n\n    @chk ccall(\n               (:PetscDeviceContextSetStreamType, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, PetscStreamType),\n               dctx, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscStreamType = PetscDeviceContextGetStreamType(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextGetStreamType\"))\n\"\"\"\nfunction PetscDeviceContextGetStreamType(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextGetStreamType(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\ttype_ = Ref{PetscStreamType}()\n\n    @chk ccall(\n               (:PetscDeviceContextGetStreamType, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Ptr{PetscStreamType}),\n               dctx, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscDeviceContextSetDevice(petsclib::PetscLibType,dctx::PetscDeviceContext, device::PetscDevice) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextSetDevice\"))\n\"\"\"\nfunction PetscDeviceContextSetDevice(petsclib::PetscLibType, dctx::PetscDeviceContext, device::PetscDevice) end\n\n@for_petsc function PetscDeviceContextSetDevice(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, device::PetscDevice )\n\n    @chk ccall(\n               (:PetscDeviceContextSetDevice, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, PetscDevice),\n               dctx, device,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextGetDevice(petsclib::PetscLibType,dctx::PetscDeviceContext, device::PetscDevice) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextGetDevice\"))\n\"\"\"\nfunction PetscDeviceContextGetDevice(petsclib::PetscLibType, dctx::PetscDeviceContext, device::PetscDevice) end\n\n@for_petsc function PetscDeviceContextGetDevice(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, device::PetscDevice )\n\n    @chk ccall(\n               (:PetscDeviceContextGetDevice, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Ptr{PetscDevice}),\n               dctx, device,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscDeviceType = PetscDeviceContextGetDeviceType(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextGetDeviceType\"))\n\"\"\"\nfunction PetscDeviceContextGetDeviceType(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextGetDeviceType(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\ttype_ = Ref{PetscDeviceType}()\n\n    @chk ccall(\n               (:PetscDeviceContextGetDeviceType, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Ptr{PetscDeviceType}),\n               dctx, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscDeviceContextSetUp(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextSetUp\"))\n\"\"\"\nfunction PetscDeviceContextSetUp(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextSetUp(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext,),\n               dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdctxdup::PetscDeviceContext = PetscDeviceContextDuplicate(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextDuplicate\"))\n\"\"\"\nfunction PetscDeviceContextDuplicate(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextDuplicate(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\tdctxdup_ = Ref{PetscDeviceContext}()\n\n    @chk ccall(\n               (:PetscDeviceContextDuplicate, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Ptr{PetscDeviceContext}),\n               dctx, dctxdup_,\n              )\n\n\tdctxdup = dctxdup_[]\n\n\treturn dctxdup\nend \n\n\"\"\"\n\tidle::PetscBool = PetscDeviceContextQueryIdle(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextQueryIdle\"))\n\"\"\"\nfunction PetscDeviceContextQueryIdle(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextQueryIdle(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\tidle_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDeviceContextQueryIdle, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Ptr{PetscBool}),\n               dctx, idle_,\n              )\n\n\tidle = idle_[]\n\n\treturn idle\nend \n\n\"\"\"\n\tPetscDeviceContextWaitForContext(petsclib::PetscLibType,dctxa::PetscDeviceContext, dctxb::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextWaitForContext\"))\n\"\"\"\nfunction PetscDeviceContextWaitForContext(petsclib::PetscLibType, dctxa::PetscDeviceContext, dctxb::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextWaitForContext(petsclib::$UnionPetscLib, dctxa::PetscDeviceContext, dctxb::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextWaitForContext, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, PetscDeviceContext),\n               dctxa, dctxb,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextForkWithStreamType(petsclib::PetscLibType,dctx::PetscDeviceContext, stype::PetscStreamType, n::PetscInt, dsub::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextForkWithStreamType\"))\n\"\"\"\nfunction PetscDeviceContextForkWithStreamType(petsclib::PetscLibType, dctx::PetscDeviceContext, stype::PetscStreamType, n::PetscInt, dsub::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextForkWithStreamType(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, stype::PetscStreamType, n::$PetscInt, dsub::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextForkWithStreamType, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, PetscStreamType, $PetscInt, PetscDeviceContext),\n               dctx, stype, n, dsub,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextFork(petsclib::PetscLibType,dctx::PetscDeviceContext, n::PetscInt, dsub::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextFork\"))\n\"\"\"\nfunction PetscDeviceContextFork(petsclib::PetscLibType, dctx::PetscDeviceContext, n::PetscInt, dsub::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextFork(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, n::$PetscInt, dsub::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextFork, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, $PetscInt, PetscDeviceContext),\n               dctx, n, dsub,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextJoin(petsclib::PetscLibType,dctx::PetscDeviceContext, n::PetscInt, joinMode::PetscDeviceContextJoinMode, dsub::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextJoin\"))\n\"\"\"\nfunction PetscDeviceContextJoin(petsclib::PetscLibType, dctx::PetscDeviceContext, n::PetscInt, joinMode::PetscDeviceContextJoinMode, dsub::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextJoin(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, n::$PetscInt, joinMode::PetscDeviceContextJoinMode, dsub::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextJoin, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, $PetscInt, PetscDeviceContextJoinMode, PetscDeviceContext),\n               dctx, n, joinMode, dsub,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextSynchronize(petsclib::PetscLibType,dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextSynchronize\"))\n\"\"\"\nfunction PetscDeviceContextSynchronize(petsclib::PetscLibType, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextSynchronize(petsclib::$UnionPetscLib, dctx::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextSynchronize, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext,),\n               dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextSetFromOptions(petsclib::PetscLibType,comm::MPI_Comm, dctx::PetscDeviceContext) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextSetFromOptions\"))\n\"\"\"\nfunction PetscDeviceContextSetFromOptions(petsclib::PetscLibType, comm::MPI_Comm, dctx::PetscDeviceContext) end\n\n@for_petsc function PetscDeviceContextSetFromOptions(petsclib::$UnionPetscLib, comm::MPI_Comm, dctx::PetscDeviceContext )\n\n    @chk ccall(\n               (:PetscDeviceContextSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscDeviceContext),\n               comm, dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextView(petsclib::PetscLibType,dctx::PetscDeviceContext, viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextView\"))\n\"\"\"\nfunction PetscDeviceContextView(petsclib::PetscLibType, dctx::PetscDeviceContext, viewer::PetscViewer) end\n\n@for_petsc function PetscDeviceContextView(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscDeviceContextView, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, PetscViewer),\n               dctx, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextViewFromOptions(petsclib::PetscLibType,dctx::PetscDeviceContext, obj::PetscObject, name::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextViewFromOptions\"))\n\"\"\"\nfunction PetscDeviceContextViewFromOptions(petsclib::PetscLibType, dctx::PetscDeviceContext, obj::PetscObject, name::String) end\n\n@for_petsc function PetscDeviceContextViewFromOptions(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscDeviceContextViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, PetscObject, Ptr{Cchar}),\n               dctx, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDeviceContextGetStreamHandle(petsclib::PetscLibType,dctx::PetscDeviceContext, handle::Cvoid) \n\n# External Links\n$(_doc_external(\"Sys/PetscDeviceContextGetStreamHandle\"))\n\"\"\"\nfunction PetscDeviceContextGetStreamHandle(petsclib::PetscLibType, dctx::PetscDeviceContext, handle::Cvoid) end\n\n@for_petsc function PetscDeviceContextGetStreamHandle(petsclib::$UnionPetscLib, dctx::PetscDeviceContext, handle::Cvoid )\n\n    @chk ccall(\n               (:PetscDeviceContextGetStreamHandle, $petsc_library),\n               PetscErrorCode,\n               (PetscDeviceContext, Cvoid),\n               dctx, handle,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscDraw_wrappers.jl",
    "content": "# -------------------------------------------------------\n# autodefined type arguments for class ------\n\nmutable struct _n_PetscDrawAxis end\nconst PetscDrawAxis = Ptr{_n_PetscDrawAxis}\n\nmutable struct _n_PetscDrawLG end\nconst PetscDrawLG = Ptr{_n_PetscDrawLG}\n\nmutable struct _n_PetscDrawSP end\nconst PetscDrawSP = Ptr{_n_PetscDrawSP}\n\nmutable struct _n_PetscDrawHG end\nconst PetscDrawHG = Ptr{_n_PetscDrawHG}\n\nmutable struct _n_PetscDrawBar end\nconst PetscDrawBar = Ptr{_n_PetscDrawBar}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscDrawSetSave(petsclib::PetscLibType,draw::PetscDraw, filename::String) \nSaves images produced in a `PetscDraw` into a file\n\nCollective\n\nInput Parameters:\n- `draw`     - the graphics context\n- `filename` - name of the file, if .ext then uses name of draw object plus .ext using .ext to determine the image type\n\nOptions Database Keys:\n- `-draw_save <filename>`                      - filename could be name.ext or .ext (where .ext determines the type of graphics file to save, for example .png)\n- `-draw_save_final_image [optional filename]` - saves the final image displayed in a window\n- `-draw_save_single_file`                     - saves each new image in the same file, normally each new image is saved in a new file with filename/filename_%d.ext\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawOpenX()`, `PetscDrawOpenImage()`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`, `PetscDrawDestroy()`, `PetscDrawSetSaveFinalImage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetSave\"))\n\"\"\"\nfunction PetscDrawSetSave(petsclib::PetscLibType, draw::PetscDraw, filename::String) end\n\n@for_petsc function PetscDrawSetSave(petsclib::$UnionPetscLib, draw::PetscDraw, filename::String )\n\n    @chk ccall(\n               (:PetscDrawSetSave, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cchar}),\n               draw, filename,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetSaveMovie(petsclib::PetscLibType,draw::PetscDraw, movieext::String) \nSaves a movie produced from a `PetscDraw` into a file\n\nCollective\n\nInput Parameters:\n- `draw`     - the graphics context\n- `movieext` - optional extension defining the movie format\n\nOptions Database Key:\n- `-draw_save_movie <.ext>` - saves a movie with extension .ext\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawSetSave()`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`, `PetscDrawDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetSaveMovie\"))\n\"\"\"\nfunction PetscDrawSetSaveMovie(petsclib::PetscLibType, draw::PetscDraw, movieext::String) end\n\n@for_petsc function PetscDrawSetSaveMovie(petsclib::$UnionPetscLib, draw::PetscDraw, movieext::String )\n\n    @chk ccall(\n               (:PetscDrawSetSaveMovie, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cchar}),\n               draw, movieext,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetSaveFinalImage(petsclib::PetscLibType,draw::PetscDraw, filename::String) \nSaves the final image produced in a `PetscDraw` into a file\n\nCollective\n\nInput Parameters:\n- `draw`     - the graphics context\n- `filename` - name of the file, if NULL or empty uses name set with `PetscDrawSetSave()` or the name of the draw object\n\nOptions Database Key:\n- `-draw_save_final_image  <filename>` - filename could be name.ext or .ext (where .ext determines the type of graphics file to save, for example .png)\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawSetSave()`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`, `PetscDrawDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetSaveFinalImage\"))\n\"\"\"\nfunction PetscDrawSetSaveFinalImage(petsclib::PetscLibType, draw::PetscDraw, filename::String) end\n\n@for_petsc function PetscDrawSetSaveFinalImage(petsclib::$UnionPetscLib, draw::PetscDraw, filename::String )\n\n    @chk ccall(\n               (:PetscDrawSetSaveFinalImage, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cchar}),\n               draw, filename,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSave(petsclib::PetscLibType,draw::PetscDraw) \nSaves a drawn image\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawSetSave()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSave\"))\n\"\"\"\nfunction PetscDrawSave(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawSave(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawSave, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSaveMovie(petsclib::PetscLibType,draw::PetscDraw) \nSaves a movie from previously saved images\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawSetSave()`, `PetscDrawSetSaveMovie()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSaveMovie\"))\n\"\"\"\nfunction PetscDrawSaveMovie(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawSaveMovie(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawSaveMovie, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawEllipse(petsclib::PetscLibType,draw::PetscDraw, x::PetscReal, y::PetscReal, a::PetscReal, b::PetscReal, c::Cint) \nDraws an ellipse onto a drawable.\n\nNot Collective\n\nInput Parameters:\n- `draw` - The drawing context\n- `x`    - The x coordinate of the center\n- `y`    - The y coordinate of the center\n- `a`    - The major axes length\n- `b`    - The minor axes length\n- `c`    - The color\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawRectangle()`, `PetscDrawTriangle()`, `PetscDrawMarker()`, `PetscDrawPoint()`, `PetscDrawString()`, `PetscDrawArrow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawEllipse\"))\n\"\"\"\nfunction PetscDrawEllipse(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal, a::PetscReal, b::PetscReal, c::Cint) end\n\n@for_petsc function PetscDrawEllipse(petsclib::$UnionPetscLib, draw::PetscDraw, x::$PetscReal, y::$PetscReal, a::$PetscReal, b::$PetscReal, c::Cint )\n\n    @chk ccall(\n               (:PetscDrawEllipse, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Cint),\n               draw, x, y, a, b, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawFlush(petsclib::PetscLibType,draw::PetscDraw) \nFlushes graphical output.\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawClear()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawFlush\"))\n\"\"\"\nfunction PetscDrawFlush(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawFlush(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawFlush, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tx_user::PetscReal,y_user::PetscReal,x_phys::PetscReal,y_phys::PetscReal = PetscDrawGetMouseButton(petsclib::PetscLibType,draw::PetscDraw, button::PetscDrawButton) \nReturns location of mouse and which button was\npressed. Waits for button to be pressed.\n\nCollective\n\nInput Parameter:\n- `draw` - the window to be used\n\nOutput Parameters:\n- `button` - one of `PETSC_BUTTON_LEFT`, `PETSC_BUTTON_CENTER`, `PETSC_BUTTON_RIGHT`, `PETSC_BUTTON_WHEEL_UP`, `PETSC_BUTTON_WHEEL_DOWN`\n- `x_user` - horizontal user coordinate of location (user may pass in NULL).\n- `y_user` - vertical user coordinate of location (user may pass in NULL).\n- `x_phys` - horizontal window coordinate (user may pass in NULL).\n- `y_phys` - vertical window coordinate (user may pass in NULL).\n\n-seealso: `PetscDraw`, `PetscDrawButton`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetMouseButton\"))\n\"\"\"\nfunction PetscDrawGetMouseButton(petsclib::PetscLibType, draw::PetscDraw, button::PetscDrawButton) end\n\n@for_petsc function PetscDrawGetMouseButton(petsclib::$UnionPetscLib, draw::PetscDraw, button::PetscDrawButton )\n\tx_user_ = Ref{$PetscReal}()\n\ty_user_ = Ref{$PetscReal}()\n\tx_phys_ = Ref{$PetscReal}()\n\ty_phys_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawGetMouseButton, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDrawButton}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, button, x_user_, y_user_, x_phys_, y_phys_,\n              )\n\n\tx_user = x_user_[]\n\ty_user = y_user_[]\n\tx_phys = x_phys_[]\n\ty_phys = y_phys_[]\n\n\treturn x_user,y_user,x_phys,y_phys\nend \n\n\"\"\"\n\tPetscDrawView(petsclib::PetscLibType,indraw::PetscDraw, viewer::PetscViewer) \nPrints the `PetscDraw` data structure.\n\nCollective\n\nInput Parameters:\n- `indraw` - the `PetscDraw` context\n- `viewer` - visualization context\n\nSee PetscDrawSetFromOptions() for options database keys\n\n-seealso: `PetscDraw`, `PetscViewerASCIIOpen()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawView\"))\n\"\"\"\nfunction PetscDrawView(petsclib::PetscLibType, indraw::PetscDraw, viewer::PetscViewer) end\n\n@for_petsc function PetscDrawView(petsclib::$UnionPetscLib, indraw::PetscDraw, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscDrawView, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, PetscViewer),\n               indraw, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawViewFromOptions(petsclib::PetscLibType,A::PetscDraw, obj::PetscObject, name::String) \nView a `PetscDraw` from the option database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscDraw` context\n- `obj`  - Optional object\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawView`, `PetscObjectViewFromOptions()`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawViewFromOptions\"))\n\"\"\"\nfunction PetscDrawViewFromOptions(petsclib::PetscLibType, A::PetscDraw, obj::PetscObject, name::String) end\n\n@for_petsc function PetscDrawViewFromOptions(petsclib::$UnionPetscLib, A::PetscDraw, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscDrawViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tindraw::PetscDraw = PetscDrawCreate(petsclib::PetscLibType,comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint) \nCreates a graphics context.\n\nCollective\n\nInput Parameters:\n- `comm`    - MPI communicator\n- `display` - X display when using X Windows\n- `title`   - optional title added to top of window\n- `x`       - horizonatl coordinate of lower left corner of window or `PETSC_DECIDE`\n- `y`       - vertical coordinate of lower left corner of window or `PETSC_DECIDE`\n- `w`       - width of window, `PETSC_DECIDE`, `PETSC_DRAW_HALF_SIZE`, `PETSC_DRAW_FULL_SIZE`, `PETSC_DRAW_THIRD_SIZE` or `PETSC_DRAW_QUARTER_SIZE`\n- `h`       - height of window, `PETSC_DECIDE`, `PETSC_DRAW_HALF_SIZE`, `PETSC_DRAW_FULL_SIZE`, `PETSC_DRAW_THIRD_SIZE` or `PETSC_DRAW_QUARTER_SIZE`\n\nOutput Parameter:\n- `indraw` - location to put the `PetscDraw` context\n\nLevel: beginner\n\n-seealso: `PetscDrawSetType()`, `PetscDrawSetFromOptions()`, `PetscDrawDestroy()`, `PetscDrawLGCreate()`, `PetscDrawSPCreate()`,\n`PetscDrawViewPortsCreate()`, `PetscDrawViewPortsSet()`, `PetscDrawAxisCreate()`, `PetscDrawHGCreate()`, `PetscDrawBarCreate()`,\n`PetscViewerDrawGetDraw()`, `PetscDrawSetSave()`, `PetscDrawSetSaveMovie()`, `PetscDrawSetSaveFinalImage()`,\n`PetscDrawOpenX()`, `PetscDrawOpenImage()`, `PetscDrawIsNull()`, `PetscDrawGetPopup()`, `PetscDrawCheckResizedWindow()`, `PetscDrawResizeWindow()`,\n`PetscDrawGetWindowSize()`, `PetscDrawLine()`, `PetscDrawArrow()`, `PetscDrawLineSetWidth()`, `PetscDrawLineGetWidth()`, `PetscDrawMarker()`,\n`PetscDrawPoint()`, `PetscDrawRectangle()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`, `PetscDrawString()`, `PetscDrawStringCentered()`,\n`PetscDrawStringBoxed()`, `PetscDrawStringVertical()`, `PetscDrawSetViewPort()`, `PetscDrawGetViewPort()`,\n`PetscDrawSplitViewPort()`, `PetscDrawSetTitle()`, `PetscDrawAppendTitle()`, `PetscDrawGetTitle()`, `PetscDrawSetPause()`, `PetscDrawGetPause()`,\n`PetscDrawPause()`, `PetscDrawSetDoubleBuffer()`, `PetscDrawClear()`, `PetscDrawFlush()`, `PetscDrawGetSingleton()`, `PetscDrawGetMouseButton()`,\n`PetscDrawZoom()`, `PetscDrawGetBoundingBox()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawCreate\"))\n\"\"\"\nfunction PetscDrawCreate(petsclib::PetscLibType, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint) end\n\n@for_petsc function PetscDrawCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint )\n\tindraw_ = Ref{PetscDraw}()\n\n    @chk ccall(\n               (:PetscDrawCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, Ptr{PetscDraw}),\n               comm, display, title, x, y, w, h, indraw_,\n              )\n\n\tindraw = indraw_[]\n\n\treturn indraw\nend \n\n\"\"\"\n\tPetscDrawSetType(petsclib::PetscLibType,draw::PetscDraw, type::PetscDrawType) \nBuilds graphics object for a particular implementation\n\nCollective\n\nInput Parameters:\n- `draw` - the graphics context\n- `type` - for example, `PETSC_DRAW_X`\n\nOptions Database Key:\n- `-draw_type  <type>` - Sets the type; use -help for a list of available methods (for instance, x)\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PETSC_DRAW_X`, `PETSC_DRAW_TIKZ`, `PETSC_DRAW_IMAGE`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`, `PetscDrawDestroy()`, `PetscDrawType`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetType\"))\n\"\"\"\nfunction PetscDrawSetType(petsclib::PetscLibType, draw::PetscDraw, type::PetscDrawType) end\n\n@for_petsc function PetscDrawSetType(petsclib::$UnionPetscLib, draw::PetscDraw, type::PetscDrawType )\n\n    @chk ccall(\n               (:PetscDrawSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, PetscDrawType),\n               draw, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscDrawType = PetscDrawGetType(petsclib::PetscLibType,draw::PetscDraw) \nGets the `PetscDraw` type as a string from the `PetscDraw` object.\n\nNot Collective\n\nInput Parameter:\n- `draw` - Krylov context\n\nOutput Parameter:\n- `type` - name of PetscDraw method\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawType`, `PetscDrawSetType()`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetType\"))\n\"\"\"\nfunction PetscDrawGetType(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawGetType(petsclib::$UnionPetscLib, draw::PetscDraw )\n\ttype_ = Ref{PetscDrawType}()\n\n    @chk ccall(\n               (:PetscDrawGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDrawType}),\n               draw, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscDrawRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a method to the graphics package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined graphics class\n- `function` - routine to create method context\n\nLevel: developer\n\n-seealso: `PetscDraw`, `PetscDrawRegisterAll()`, `PetscDrawRegisterDestroy()`, `PetscDrawType`, `PetscDrawSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawRegister\"))\n\"\"\"\nfunction PetscDrawRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscDrawRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscDrawRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetOptionsPrefix(petsclib::PetscLibType,draw::PetscDraw, prefix::String) \nSets the prefix used for searching for all\n`PetscDraw` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `draw`   - the draw context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetOptionsPrefix\"))\n\"\"\"\nfunction PetscDrawSetOptionsPrefix(petsclib::PetscLibType, draw::PetscDraw, prefix::String) end\n\n@for_petsc function PetscDrawSetOptionsPrefix(petsclib::$UnionPetscLib, draw::PetscDraw, prefix::String )\n\n    @chk ccall(\n               (:PetscDrawSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cchar}),\n               draw, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetFromOptions(petsclib::PetscLibType,draw::PetscDraw) \nSets the graphics type from the options database.\nDefaults to a PETSc X Windows graphics.\n\nCollective\n\nInput Parameter:\n- `draw` - the graphics context\n\nOptions Database Keys:\n- `-nox`                                       - do not use X graphics (ignore graphics calls, but run program correctly)\n- `-nox_warning`                               - when X Windows support is not installed this prevents the warning message from being printed\n- `-draw_pause <pause amount>`                 - - -1 indicates wait for mouse input, -2 indicates pause when window is to be destroyed\n- `-draw_marker_type`                          - <x,point>\n- `-draw_save [optional filename]`             - (X Windows only) saves each image before it is cleared to a file\n- `-draw_save_final_image [optional filename]` - (X Windows only) saves the final image displayed in a window\n- `-draw_save_movie`                           - converts image files to a movie  at the end of the run. See PetscDrawSetSave()\n- `-draw_save_single_file`                     - saves each new image in the same file, normally each new image is saved in a new file with 'filename/filename_%d.ext'\n- `-draw_save_on_clear`                        - saves an image on each clear, mainly for debugging\n- `-draw_save_on_flush`                        - saves an image on each flush, mainly for debugging\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawCreate()`, `PetscDrawSetType()`, `PetscDrawSetSave()`, `PetscDrawSetSaveFinalImage()`, `PetscDrawPause()`, `PetscDrawSetPause()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetFromOptions\"))\n\"\"\"\nfunction PetscDrawSetFromOptions(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawSetFromOptions(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetViewPort(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal) \nSets the portion of the window (page) to which draw\nroutines will write.\n\nCollective\n\nInput Parameters:\n- `xl`   - the horizontal coordinate of the lower left corner of the subwindow.\n- `yl`   - the vertical coordinate of the lower left corner of the subwindow.\n- `xr`   - the horizontal coordinate of the upper right corner of the subwindow.\n- `yr`   - the vertical coordinate of the upper right corner of the subwindow.\n- `draw` - the drawing context\n\nLevel: advanced\n\n-seealso: `PetscDrawGetViewPort()`, `PetscDraw`, `PetscDrawSplitViewPort()`, `PetscDrawViewPortsCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetViewPort\"))\n\"\"\"\nfunction PetscDrawSetViewPort(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal) end\n\n@for_petsc function PetscDrawSetViewPort(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, xr::$PetscReal, yr::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawSetViewPort, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               draw, xl, yl, xr, yr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\txl::PetscReal,yl::PetscReal,xr::PetscReal,yr::PetscReal = PetscDrawGetViewPort(petsclib::PetscLibType,draw::PetscDraw) \nGets the portion of the window (page) to which draw\nroutines will write.\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nOutput Parameters:\n- `xl` - the horizontal coordinate of the lower left corner of the subwindow.\n- `yl` - the vertical coordinate of the lower left corner of the subwindow.\n- `xr` - the horizontal coordinate of the upper right corner of the subwindow.\n- `yr` - the vertical coordinate of the upper right corner of the subwindow.\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawSplitViewPort()`, `PetscDrawSetViewPort()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetViewPort\"))\n\"\"\"\nfunction PetscDrawGetViewPort(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawGetViewPort(petsclib::$UnionPetscLib, draw::PetscDraw )\n\txl_ = Ref{$PetscReal}()\n\tyl_ = Ref{$PetscReal}()\n\txr_ = Ref{$PetscReal}()\n\tyr_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawGetViewPort, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, xl_, yl_, xr_, yr_,\n              )\n\n\txl = xl_[]\n\tyl = yl_[]\n\txr = xr_[]\n\tyr = yr_[]\n\n\treturn xl,yl,xr,yr\nend \n\n\"\"\"\n\tnewports::Vector{PetscDrawViewPorts} = PetscDrawViewPortsCreate(petsclib::PetscLibType,draw::PetscDraw, nports::PetscInt) \nSplits a window into smaller view ports. Each processor shares all the viewports.\n\nCollective\n\nInput Parameters:\n- `draw`   - the drawing context\n- `nports` - the number of ports\n\nOutput Parameter:\n- `newports` - a `PetscDrawViewPorts` context (C structure)\n\nOptions Database Key:\n- `-draw_ports` - display multiple fields in the same window with PetscDrawPorts() instead of in separate windows\n\nLevel: advanced\n\n-seealso: `PetscDrawSplitViewPort()`, `PetscDrawSetViewPort()`, `PetscDrawViewPortsSet()`, `PetscDrawViewPortsDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawViewPortsCreate\"))\n\"\"\"\nfunction PetscDrawViewPortsCreate(petsclib::PetscLibType, draw::PetscDraw, nports::PetscInt) end\n\n@for_petsc function PetscDrawViewPortsCreate(petsclib::$UnionPetscLib, draw::PetscDraw, nports::$PetscInt )\n\tnewports_ = Ref{Ptr{PetscDrawViewPorts}}()\n\n    @chk ccall(\n               (:PetscDrawViewPortsCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscInt, Ptr{Ptr{PetscDrawViewPorts}}),\n               draw, nports, newports_,\n              )\n\n\tnewports = unsafe_wrap(Array, newports_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn newports\nend \n\n\"\"\"\n\tnewports::Vector{PetscDrawViewPorts} = PetscDrawViewPortsCreateRect(petsclib::PetscLibType,draw::PetscDraw, nx::PetscInt, ny::PetscInt) \nSplits a window into smaller\nview ports. Each processor shares all the viewports. The number\nof views in the x- and y-directions is specified.\n\nCollective\n\nInput Parameters:\n- `draw` - the drawing context\n- `nx`   - the number of x divisions\n- `ny`   - the number of y divisions\n\nOutput Parameter:\n- `newports` - a `PetscDrawViewPorts` context (C structure)\n\nLevel: advanced\n\n-seealso: `PetscDrawSplitViewPort()`, `PetscDrawSetViewPort()`, `PetscDrawViewPortsSet()`, `PetscDrawViewPortsDestroy()`, `PetscDrawViewPorts`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawViewPortsCreateRect\"))\n\"\"\"\nfunction PetscDrawViewPortsCreateRect(petsclib::PetscLibType, draw::PetscDraw, nx::PetscInt, ny::PetscInt) end\n\n@for_petsc function PetscDrawViewPortsCreateRect(petsclib::$UnionPetscLib, draw::PetscDraw, nx::$PetscInt, ny::$PetscInt )\n\tnewports_ = Ref{Ptr{PetscDrawViewPorts}}()\n\n    @chk ccall(\n               (:PetscDrawViewPortsCreateRect, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscInt, $PetscInt, Ptr{Ptr{PetscDrawViewPorts}}),\n               draw, nx, ny, newports_,\n              )\n\n\tnewports = unsafe_wrap(Array, newports_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn newports\nend \n\n\"\"\"\n\tPetscDrawViewPortsDestroy(petsclib::PetscLibType,ports::PetscDrawViewPorts) \nfrees a `PetscDrawViewPorts` object\n\nCollective on the `PetscDraw` inside `ports`\n\nInput Parameter:\n- `ports` - the `PetscDrawViewPorts` object\n\nLevel: advanced\n\n-seealso: `PetscDrawViewPorts`, `PetscDrawSplitViewPort()`, `PetscDrawSetViewPort()`, `PetscDrawViewPortsSet()`, `PetscDrawViewPortsCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawViewPortsDestroy\"))\n\"\"\"\nfunction PetscDrawViewPortsDestroy(petsclib::PetscLibType, ports::PetscDrawViewPorts) end\n\n@for_petsc function PetscDrawViewPortsDestroy(petsclib::$UnionPetscLib, ports::PetscDrawViewPorts )\n\n    @chk ccall(\n               (:PetscDrawViewPortsDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDrawViewPorts},),\n               ports,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawViewPortsSet(petsclib::PetscLibType,ports::PetscDrawViewPorts, port::PetscInt) \nsets a draw object to use a particular subport\n\nLogically Collective on the `PetscDraw` inside `ports`\n\nInput Parameters:\n- `ports` - the `PetscDrawViewPorts` object\n- `port`  - the port number, from 0 to nports-1\n\nLevel: advanced\n\n-seealso: `PetscDrawViewPorts`, `PetscDrawSplitViewPort()`, `PetscDrawSetViewPort()`, `PetscDrawViewPortsDestroy()`, `PetscDrawViewPortsCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawViewPortsSet\"))\n\"\"\"\nfunction PetscDrawViewPortsSet(petsclib::PetscLibType, ports::PetscDrawViewPorts, port::PetscInt) end\n\n@for_petsc function PetscDrawViewPortsSet(petsclib::$UnionPetscLib, ports::PetscDrawViewPorts, port::$PetscInt )\n\n    @chk ccall(\n               (:PetscDrawViewPortsSet, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDrawViewPorts}, $PetscInt),\n               ports, port,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawString(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint, text::String) \ndraws text onto a drawable.\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xl`   - coordinate of lower left corner of text\n- `yl`   - coordinate of lower left corner of text\n- `cl`   - the color of the text\n- `text` - the text to draw\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawStringVertical()`, `PetscDrawStringCentered()`, `PetscDrawStringBoxed()`, `PetscDrawStringSetSize()`,\n`PetscDrawStringGetSize()`, `PetscDrawLine()`, `PetscDrawRectangle()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`,\n`PetscDrawMarker()`, `PetscDrawPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawString\"))\n\"\"\"\nfunction PetscDrawString(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint, text::String) end\n\n@for_petsc function PetscDrawString(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, cl::Cint, text::String )\n\n    @chk ccall(\n               (:PetscDrawString, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, Cint, Ptr{Cchar}),\n               draw, xl, yl, cl, text,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawStringVertical(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint, text::String) \ndraws text onto a drawable.\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xl`   - coordinate of upper left corner of text\n- `yl`   - coordinate of upper left corner of text\n- `cl`   - the color of the text\n- `text` - the text to draw\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawString()`, `PetscDrawStringCentered()`, `PetscDrawStringBoxed()`, `PetscDrawStringSetSize()`,\n`PetscDrawStringGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawStringVertical\"))\n\"\"\"\nfunction PetscDrawStringVertical(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint, text::String) end\n\n@for_petsc function PetscDrawStringVertical(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, cl::Cint, text::String )\n\n    @chk ccall(\n               (:PetscDrawStringVertical, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, Cint, Ptr{Cchar}),\n               draw, xl, yl, cl, text,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawStringCentered(petsclib::PetscLibType,draw::PetscDraw, xc::PetscReal, yl::PetscReal, cl::Cint, text::String) \ndraws text onto a drawable centered at a point\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xc`   - the coordinates of right-left center of text\n- `yl`   - the coordinates of lower edge of text\n- `cl`   - the color of the text\n- `text` - the text to draw\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawStringVertical()`, `PetscDrawString()`, `PetscDrawStringBoxed()`, `PetscDrawStringSetSize()`,\n`PetscDrawStringGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawStringCentered\"))\n\"\"\"\nfunction PetscDrawStringCentered(petsclib::PetscLibType, draw::PetscDraw, xc::PetscReal, yl::PetscReal, cl::Cint, text::String) end\n\n@for_petsc function PetscDrawStringCentered(petsclib::$UnionPetscLib, draw::PetscDraw, xc::$PetscReal, yl::$PetscReal, cl::Cint, text::String )\n\n    @chk ccall(\n               (:PetscDrawStringCentered, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, Cint, Ptr{Cchar}),\n               draw, xc, yl, cl, text,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tw::PetscReal,h::PetscReal = PetscDrawStringBoxed(petsclib::PetscLibType,draw::PetscDraw, sxl::PetscReal, syl::PetscReal, sc::Cint, bc::Cint, text::String) \nDraws a string with a box around it\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `sxl`  - the coordinates of center of the box\n- `syl`  - the coordinates of top line of box\n- `sc`   - the color of the text\n- `bc`   - the color of the bounding box\n- `text` - the text to draw\n\nOutput Parameters:\n- `w` - the width of the resulting box (optional)\n- `h` - the height of resulting box (optional)\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawStringVertical()`, `PetscDrawString()`, `PetscDrawStringCentered()`, `PetscDrawStringSetSize()`,\n`PetscDrawStringGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawStringBoxed\"))\n\"\"\"\nfunction PetscDrawStringBoxed(petsclib::PetscLibType, draw::PetscDraw, sxl::PetscReal, syl::PetscReal, sc::Cint, bc::Cint, text::String) end\n\n@for_petsc function PetscDrawStringBoxed(petsclib::$UnionPetscLib, draw::PetscDraw, sxl::$PetscReal, syl::$PetscReal, sc::Cint, bc::Cint, text::String )\n\tw_ = Ref{$PetscReal}()\n\th_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawStringBoxed, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, Cint, Cint, Ptr{Cchar}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, sxl, syl, sc, bc, text, w_, h_,\n              )\n\n\tw = w_[]\n\th = h_[]\n\n\treturn w,h\nend \n\n\"\"\"\n\tPetscDrawStringSetSize(petsclib::PetscLibType,draw::PetscDraw, width::PetscReal, height::PetscReal) \nSets the size for character text.\n\nNot Collective\n\nInput Parameters:\n- `draw`   - the drawing context\n- `width`  - the width in user coordinates\n- `height` - the character height in user coordinates\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawStringVertical()`, `PetscDrawString()`, `PetscDrawStringCentered()`, `PetscDrawStringBoxed()`,\n`PetscDrawStringGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawStringSetSize\"))\n\"\"\"\nfunction PetscDrawStringSetSize(petsclib::PetscLibType, draw::PetscDraw, width::PetscReal, height::PetscReal) end\n\n@for_petsc function PetscDrawStringSetSize(petsclib::$UnionPetscLib, draw::PetscDraw, width::$PetscReal, height::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawStringSetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal),\n               draw, width, height,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawStringGetSize(petsclib::PetscLibType,draw::PetscDraw, width::PetscReal, height::PetscReal) \nGets the size for character text.  The width is\nrelative to the user coordinates of the window.\n\nNot Collective\n\nInput Parameters:\n- `draw`   - the drawing context\n- `width`  - the width in user coordinates\n- `height` - the character height\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawStringVertical()`, `PetscDrawString()`, `PetscDrawStringCentered()`, `PetscDrawStringBoxed()`,\n`PetscDrawStringSetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawStringGetSize\"))\n\"\"\"\nfunction PetscDrawStringGetSize(petsclib::PetscLibType, draw::PetscDraw, width::PetscReal, height::PetscReal) end\n\n@for_petsc function PetscDrawStringGetSize(petsclib::$UnionPetscLib, draw::PetscDraw, width::$PetscReal, height::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawStringGetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, width, height,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the PETSc interface to the `PetscDraw` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscDraw`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawFinalizePackage\"))\n\"\"\"\nfunction PetscDrawFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscDrawFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscDrawFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscDraw` package. It is called\nfrom PetscDLLibraryRegister_petsc() when using dynamic libraries, and on the call to `PetscInitialize()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PetscDraw`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawInitializePackage\"))\n\"\"\"\nfunction PetscDrawInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscDrawInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscDrawInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawResizeWindow(petsclib::PetscLibType,draw::PetscDraw, w::Cint, h::Cint) \nAllows one to resize a window from a program.\n\nCollective\n\nInput Parameters:\n- `draw` - the window\n- `w`    - the new width of the window\n- `h`    - the new height of the window\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawCheckResizedWindow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawResizeWindow\"))\n\"\"\"\nfunction PetscDrawResizeWindow(petsclib::PetscLibType, draw::PetscDraw, w::Cint, h::Cint) end\n\n@for_petsc function PetscDrawResizeWindow(petsclib::$UnionPetscLib, draw::PetscDraw, w::Cint, h::Cint )\n\n    @chk ccall(\n               (:PetscDrawResizeWindow, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Cint, Cint),\n               draw, w, h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawGetWindowSize(petsclib::PetscLibType,draw::PetscDraw, w::Cint, h::Cint) \nGets the size of the window.\n\nNot Collective\n\nInput Parameter:\n- `draw` - the window\n\nOutput Parameters:\n- `w` - the window width\n- `h` - the window height\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawResizeWindow()`, `PetscDrawCheckResizedWindow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetWindowSize\"))\n\"\"\"\nfunction PetscDrawGetWindowSize(petsclib::PetscLibType, draw::PetscDraw, w::Cint, h::Cint) end\n\n@for_petsc function PetscDrawGetWindowSize(petsclib::$UnionPetscLib, draw::PetscDraw, w::Cint, h::Cint )\n\n    @chk ccall(\n               (:PetscDrawGetWindowSize, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cint}, Ptr{Cint}),\n               draw, w, h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawCheckResizedWindow(petsclib::PetscLibType,draw::PetscDraw) \nChecks if the user has resized the window.\n\nCollective\n\nInput Parameter:\n- `draw` - the window\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawResizeWindow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawCheckResizedWindow\"))\n\"\"\"\nfunction PetscDrawCheckResizedWindow(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawCheckResizedWindow(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawCheckResizedWindow, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawGetTitle(petsclib::PetscLibType,draw::PetscDraw, title::String) \nGets pointer to title of a `PetscDraw` context.\n\nNot Collective\n\nInput Parameter:\n- `draw` - the graphics context\n\nOutput Parameter:\n- `title` - the title\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawSetTitle()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetTitle\"))\n\"\"\"\nfunction PetscDrawGetTitle(petsclib::PetscLibType, draw::PetscDraw, title::String) end\n\n@for_petsc function PetscDrawGetTitle(petsclib::$UnionPetscLib, draw::PetscDraw, title::String )\n\ttitle_ = Ref(pointer(title))\n\n    @chk ccall(\n               (:PetscDrawGetTitle, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Ptr{Cchar}}),\n               draw, title_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetTitle(petsclib::PetscLibType,draw::PetscDraw, title::String) \nSets the title of a `PetscDraw` context.\n\nCollective\n\nInput Parameters:\n- `draw`  - the graphics context\n- `title` - the title\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawGetTitle()`, `PetscDrawAppendTitle()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetTitle\"))\n\"\"\"\nfunction PetscDrawSetTitle(petsclib::PetscLibType, draw::PetscDraw, title::String) end\n\n@for_petsc function PetscDrawSetTitle(petsclib::$UnionPetscLib, draw::PetscDraw, title::String )\n\n    @chk ccall(\n               (:PetscDrawSetTitle, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cchar}),\n               draw, title,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawAppendTitle(petsclib::PetscLibType,draw::PetscDraw, title::String) \nAppends to the title of a `PetscDraw` context.\n\nCollective\n\nInput Parameters:\n- `draw`  - the graphics context\n- `title` - the title\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawSetTitle()`, `PetscDrawGetTitle()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAppendTitle\"))\n\"\"\"\nfunction PetscDrawAppendTitle(petsclib::PetscLibType, draw::PetscDraw, title::String) end\n\n@for_petsc function PetscDrawAppendTitle(petsclib::$UnionPetscLib, draw::PetscDraw, title::String )\n\n    @chk ccall(\n               (:PetscDrawAppendTitle, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cchar}),\n               draw, title,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawDestroy(petsclib::PetscLibType,draw::PetscDraw) \nDeletes a draw context.\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawDestroy\"))\n\"\"\"\nfunction PetscDrawDestroy(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawDestroy(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDraw},),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawGetPopup(petsclib::PetscLibType,draw::PetscDraw, popup::PetscDraw) \nCreates a popup window associated with a `PetscDraw` window.\n\nCollective\n\nInput Parameter:\n- `draw` - the original window\n\nOutput Parameter:\n- `popup` - the new popup window\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawScalePopup()`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetPopup\"))\n\"\"\"\nfunction PetscDrawGetPopup(petsclib::PetscLibType, draw::PetscDraw, popup::PetscDraw) end\n\n@for_petsc function PetscDrawGetPopup(petsclib::$UnionPetscLib, draw::PetscDraw, popup::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawGetPopup, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDraw}),\n               draw, popup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetDisplay(petsclib::PetscLibType,draw::PetscDraw, display::String) \nSets the display where a `PetscDraw` object will be displayed\n\nInput Parameters:\n- `draw`    - the drawing context\n- `display` - the X windows display\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawOpenX()`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetDisplay\"))\n\"\"\"\nfunction PetscDrawSetDisplay(petsclib::PetscLibType, draw::PetscDraw, display::String) end\n\n@for_petsc function PetscDrawSetDisplay(petsclib::$UnionPetscLib, draw::PetscDraw, display::String )\n\n    @chk ccall(\n               (:PetscDrawSetDisplay, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{Cchar}),\n               draw, display,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetDoubleBuffer(petsclib::PetscLibType,draw::PetscDraw) \nSets a window to be double buffered.\n\nLogically Collective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawOpenX()`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetDoubleBuffer\"))\n\"\"\"\nfunction PetscDrawSetDoubleBuffer(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawSetDoubleBuffer(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawSetDoubleBuffer, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawGetSingleton(petsclib::PetscLibType,draw::PetscDraw, sdraw::PetscDraw) \nGain access to a `PetscDraw` object as if it were owned\nby the one process.\n\nCollective\n\nInput Parameter:\n- `draw` - the original window\n\nOutput Parameter:\n- `sdraw` - the singleton window\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawRestoreSingleton()`, `PetscViewerGetSingleton()`, `PetscViewerRestoreSingleton()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetSingleton\"))\n\"\"\"\nfunction PetscDrawGetSingleton(petsclib::PetscLibType, draw::PetscDraw, sdraw::PetscDraw) end\n\n@for_petsc function PetscDrawGetSingleton(petsclib::$UnionPetscLib, draw::PetscDraw, sdraw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawGetSingleton, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDraw}),\n               draw, sdraw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawRestoreSingleton(petsclib::PetscLibType,draw::PetscDraw, sdraw::PetscDraw) \nRemove access to a `PetscDraw` object obtained with `PetscDrawGetSingleton()`\nby the one process.\n\nCollective\n\nInput Parameters:\n- `draw`  - the original window\n- `sdraw` - the singleton window\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawGetSingleton()`, `PetscViewerGetSingleton()`, `PetscViewerRestoreSingleton()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawRestoreSingleton\"))\n\"\"\"\nfunction PetscDrawRestoreSingleton(petsclib::PetscLibType, draw::PetscDraw, sdraw::PetscDraw) end\n\n@for_petsc function PetscDrawRestoreSingleton(petsclib::$UnionPetscLib, draw::PetscDraw, sdraw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawRestoreSingleton, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDraw}),\n               draw, sdraw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetVisible(petsclib::PetscLibType,draw::PetscDraw, visible::PetscBool) \nSets if the drawing surface (the 'window') is visible on its display.\n\nInput Parameters:\n- `draw`    - the drawing window\n- `visible` - if the surface should be visible\n\nLevel: intermediate\n\n-seealso: `PetscDraw`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetVisible\"))\n\"\"\"\nfunction PetscDrawSetVisible(petsclib::PetscLibType, draw::PetscDraw, visible::PetscBool) end\n\n@for_petsc function PetscDrawSetVisible(petsclib::$UnionPetscLib, draw::PetscDraw, visible::PetscBool )\n\n    @chk ccall(\n               (:PetscDrawSetVisible, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, PetscBool),\n               draw, visible,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetCoordinates(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal) \nSets the application coordinates of the corners of\nthe window (or page).\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing object\n- `xl`   - the lower left x coordinate\n- `yl`   - the lower left y coordinate\n- `xr`   - the upper right x coordinate\n- `yr`   - the upper right y coordinate\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawGetCoordinates()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetCoordinates\"))\n\"\"\"\nfunction PetscDrawSetCoordinates(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal) end\n\n@for_petsc function PetscDrawSetCoordinates(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, xr::$PetscReal, yr::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawSetCoordinates, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               draw, xl, yl, xr, yr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\txl::PetscReal,yl::PetscReal,xr::PetscReal,yr::PetscReal = PetscDrawGetCoordinates(petsclib::PetscLibType,draw::PetscDraw) \nGets the application coordinates of the corners of\nthe window (or page).\n\nNot Collective\n\nInput Parameter:\n- `draw` - the drawing object\n\nOutput Parameters:\n- `xl` - the horizontal coordinate of the lower left corner of the drawing region.\n- `yl` - the vertical coordinate of the lower left corner of the drawing region.\n- `xr` - the horizontal coordinate of the upper right corner of the drawing region.\n- `yr` - the vertical coordinate of the upper right corner of the drawing region.\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawSetCoordinates()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetCoordinates\"))\n\"\"\"\nfunction PetscDrawGetCoordinates(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawGetCoordinates(petsclib::$UnionPetscLib, draw::PetscDraw )\n\txl_ = Ref{$PetscReal}()\n\tyl_ = Ref{$PetscReal}()\n\txr_ = Ref{$PetscReal}()\n\tyr_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawGetCoordinates, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, xl_, yl_, xr_, yr_,\n              )\n\n\txl = xl_[]\n\tyl = yl_[]\n\txr = xr_[]\n\tyr = yr_[]\n\n\treturn xl,yl,xr,yr\nend \n\n\"\"\"\n\txl::PetscReal,yl::PetscReal,xr::PetscReal,yr::PetscReal = PetscDrawGetBoundingBox(petsclib::PetscLibType,draw::PetscDraw) \nGets the bounding box of all `PetscDrawStringBoxed()` commands\n\nNot Collective\n\nInput Parameter:\n- `draw` - the drawing context\n\nOutput Parameters:\n- `xl` - horizontal coordinate of lower left corner of bounding box\n- `yl` - vertical coordinate of lower left corner of bounding box\n- `xr` - horizontal coordinate of upper right corner of bounding box\n- `yr` - vertical coordinate of upper right corner of bounding box\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawPushCurrentPoint()`, `PetscDrawPopCurrentPoint()`, `PetscDrawSetCurrentPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetBoundingBox\"))\n\"\"\"\nfunction PetscDrawGetBoundingBox(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawGetBoundingBox(petsclib::$UnionPetscLib, draw::PetscDraw )\n\txl_ = Ref{$PetscReal}()\n\tyl_ = Ref{$PetscReal}()\n\txr_ = Ref{$PetscReal}()\n\tyr_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawGetBoundingBox, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, xl_, yl_, xr_, yr_,\n              )\n\n\txl = xl_[]\n\tyl = yl_[]\n\txr = xr_[]\n\tyr = yr_[]\n\n\treturn xl,yl,xr,yr\nend \n\n\"\"\"\n\tx::PetscReal,y::PetscReal = PetscDrawGetCurrentPoint(petsclib::PetscLibType,draw::PetscDraw) \nGets the current draw point, some codes use this point to determine where to draw next\n\nNot Collective\n\nInput Parameter:\n- `draw` - the drawing context\n\nOutput Parameters:\n- `x` - horizontal coordinate of the current point\n- `y` - vertical coordinate of the current point\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawPushCurrentPoint()`, `PetscDrawPopCurrentPoint()`, `PetscDrawSetCurrentPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetCurrentPoint\"))\n\"\"\"\nfunction PetscDrawGetCurrentPoint(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawGetCurrentPoint(petsclib::$UnionPetscLib, draw::PetscDraw )\n\tx_ = Ref{$PetscReal}()\n\ty_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawGetCurrentPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, x_, y_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\n\treturn x,y\nend \n\n\"\"\"\n\tPetscDrawSetCurrentPoint(petsclib::PetscLibType,draw::PetscDraw, x::PetscReal, y::PetscReal) \nSets the current draw point, some codes use this point to determine where to draw next\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `x`    - horizontal coordinate of the current point\n- `y`    - vertical coordinate of the current point\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawPushCurrentPoint()`, `PetscDrawPopCurrentPoint()`, `PetscDrawGetCurrentPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetCurrentPoint\"))\n\"\"\"\nfunction PetscDrawSetCurrentPoint(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal) end\n\n@for_petsc function PetscDrawSetCurrentPoint(petsclib::$UnionPetscLib, draw::PetscDraw, x::$PetscReal, y::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawSetCurrentPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal),\n               draw, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawPushCurrentPoint(petsclib::PetscLibType,draw::PetscDraw, x::PetscReal, y::PetscReal) \nPushes a new current draw point, retaining the old one, some codes use this point to determine where to draw next\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `x`    - horizontal coordinate of the current point\n- `y`    - vertical coordinate of the current point\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawPopCurrentPoint()`, `PetscDrawGetCurrentPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawPushCurrentPoint\"))\n\"\"\"\nfunction PetscDrawPushCurrentPoint(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal) end\n\n@for_petsc function PetscDrawPushCurrentPoint(petsclib::$UnionPetscLib, draw::PetscDraw, x::$PetscReal, y::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawPushCurrentPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal),\n               draw, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawPopCurrentPoint(petsclib::PetscLibType,draw::PetscDraw) \nPops a current draw point (discarding it)\n\nNot Collective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawPushCurrentPoint()`, `PetscDrawSetCurrentPoint()`, `PetscDrawGetCurrentPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawPopCurrentPoint\"))\n\"\"\"\nfunction PetscDrawPopCurrentPoint(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawPopCurrentPoint(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawPopCurrentPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLine(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, cl::Cint) \ndraws a line onto a drawable.\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xl`   - horizontal coordinate of first end point\n- `yl`   - vertical coordinate of first end point\n- `xr`   - horizontal coordinate of second end point\n- `yr`   - vertical coordinate of second end point\n- `cl`   - the colors of the endpoints\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawArrow()`, `PetscDrawLineSetWidth()`, `PetscDrawLineGetWidth()`, `PetscDrawRectangle()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`,\n`PetscDrawMarker()`, `PetscDrawPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLine\"))\n\"\"\"\nfunction PetscDrawLine(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, cl::Cint) end\n\n@for_petsc function PetscDrawLine(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, xr::$PetscReal, yr::$PetscReal, cl::Cint )\n\n    @chk ccall(\n               (:PetscDrawLine, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Cint),\n               draw, xl, yl, xr, yr, cl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawArrow(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, cl::Cint) \ndraws a line with arrow head at end if the line is long enough\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xl`   - horizontal coordinate of first end point\n- `yl`   - vertical coordinate of first end point\n- `xr`   - horizontal coordinate of second end point\n- `yr`   - vertical coordinate of second end point\n- `cl`   - the colors of the endpoints\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawLine()`, `PetscDrawLineSetWidth()`, `PetscDrawLineGetWidth()`, `PetscDrawRectangle()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`,\n`PetscDrawMarker()`, `PetscDrawPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawArrow\"))\n\"\"\"\nfunction PetscDrawArrow(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, cl::Cint) end\n\n@for_petsc function PetscDrawArrow(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, xr::$PetscReal, yr::$PetscReal, cl::Cint )\n\n    @chk ccall(\n               (:PetscDrawArrow, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Cint),\n               draw, xl, yl, xr, yr, cl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLineSetWidth(petsclib::PetscLibType,draw::PetscDraw, width::PetscReal) \nSets the line width for future draws.  The width is\nrelative to the user coordinates of the window; 0.0 denotes the natural\nwidth; 1.0 denotes the entire viewport.\n\nNot Collective\n\nInput Parameters:\n- `draw`  - the drawing context\n- `width` - the width in user coordinates\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawLineGetWidth()`, `PetscDrawLine()`, `PetscDrawArrow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLineSetWidth\"))\n\"\"\"\nfunction PetscDrawLineSetWidth(petsclib::PetscLibType, draw::PetscDraw, width::PetscReal) end\n\n@for_petsc function PetscDrawLineSetWidth(petsclib::$UnionPetscLib, draw::PetscDraw, width::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawLineSetWidth, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal),\n               draw, width,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\twidth::PetscReal = PetscDrawLineGetWidth(petsclib::PetscLibType,draw::PetscDraw) \nGets the line width for future draws.  The width is\nrelative to the user coordinates of the window; 0.0 denotes the natural\nwidth; 1.0 denotes the interior viewport.\n\nNot Collective\n\nInput Parameter:\n- `draw` - the drawing context\n\nOutput Parameter:\n- `width` - the width in user coordinates\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawLineSetWidth()`, `PetscDrawLine()`, `PetscDrawArrow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLineGetWidth\"))\n\"\"\"\nfunction PetscDrawLineGetWidth(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawLineGetWidth(petsclib::$UnionPetscLib, draw::PetscDraw )\n\twidth_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawLineGetWidth, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{$PetscReal}),\n               draw, width_,\n              )\n\n\twidth = width_[]\n\n\treturn width\nend \n\n\"\"\"\n\tPetscDrawTriangle(petsclib::PetscLibType,draw::PetscDraw, x1::PetscReal, y_1::PetscReal, x2::PetscReal, y2::PetscReal, x3::PetscReal, y3::PetscReal, c1::Cint, c2::Cint, c3::Cint) \ndraws a triangle  onto a drawable.\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `x1`   - coordinate of the first vertex\n- `y_1`  - coordinate of the first vertex\n- `x2`   - coordinate of the second vertex\n- `y2`   - coordinate of the second vertex\n- `x3`   - coordinate of the third vertex\n- `y3`   - coordinate of the third vertex\n- `c1`   - color of the first vertex\n- `c2`   - color of the second vertex\n- `c3`   - color of the third vertext\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawLine()`, `PetscDrawRectangle()`, `PetscDrawEllipse()`, `PetscDrawMarker()`, `PetscDrawPoint()`, `PetscDrawArrow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawTriangle\"))\n\"\"\"\nfunction PetscDrawTriangle(petsclib::PetscLibType, draw::PetscDraw, x1::PetscReal, y_1::PetscReal, x2::PetscReal, y2::PetscReal, x3::PetscReal, y3::PetscReal, c1::Cint, c2::Cint, c3::Cint) end\n\n@for_petsc function PetscDrawTriangle(petsclib::$UnionPetscLib, draw::PetscDraw, x1::$PetscReal, y_1::$PetscReal, x2::$PetscReal, y2::$PetscReal, x3::$PetscReal, y3::$PetscReal, c1::Cint, c2::Cint, c3::Cint )\n\n    @chk ccall(\n               (:PetscDrawTriangle, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Cint, Cint, Cint),\n               draw, x1, y_1, x2, y2, x3, y3, c1, c2, c3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawScalePopup(petsclib::PetscLibType,popup::PetscDraw, min::PetscReal, max::PetscReal) \ndraws a contour scale window.\n\nCollective\n\nInput Parameters:\n- `popup` - the window (often a window obtained via `PetscDrawGetPopup()`\n- `min`   - minimum value being plotted\n- `max`   - maximum value being plotted\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawGetPopup()`, `PetscDrawTensorContour()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawScalePopup\"))\n\"\"\"\nfunction PetscDrawScalePopup(petsclib::PetscLibType, popup::PetscDraw, min::PetscReal, max::PetscReal) end\n\n@for_petsc function PetscDrawScalePopup(petsclib::$UnionPetscLib, popup::PetscDraw, min::$PetscReal, max::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawScalePopup, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal),\n               popup, min, max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawTensorContour(petsclib::PetscLibType,draw::PetscDraw, m::Cint, n::Cint, xi::Vector{PetscReal}, yi::Vector{PetscReal}, v::Vector{PetscReal}) \ndraws a contour plot for a two\n\nCollective, but `draw` must be sequential\n\nInput Parameters:\n- `draw` - the draw context\n- `m`    - the number of local mesh points in the x direction\n- `n`    - the number of local mesh points in the y direction\n- `xi`   - the locations of the global mesh points in the horizontal direction (optional, use `NULL` to indicate uniform spacing on [0,1])\n- `yi`   - the locations of the global mesh points in the vertical direction (optional, use `NULL` to indicate uniform spacing on [0,1])\n- `v`    - the values\n\nOptions Database Keys:\n- `-draw_x_shared_colormap` - Indicates use of private colormap\n- `-draw_contour_grid`      - draws grid contour\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawTensorContourPatch()`, `PetscDrawScalePopup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawTensorContour\"))\n\"\"\"\nfunction PetscDrawTensorContour(petsclib::PetscLibType, draw::PetscDraw, m::Cint, n::Cint, xi::Vector{PetscReal}, yi::Vector{PetscReal}, v::Vector{PetscReal}) end\n\n@for_petsc function PetscDrawTensorContour(petsclib::$UnionPetscLib, draw::PetscDraw, m::Cint, n::Cint, xi::Vector{$PetscReal}, yi::Vector{$PetscReal}, v::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscDrawTensorContour, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Cint, Cint, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, m, n, xi, yi, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawTensorContourPatch(petsclib::PetscLibType,draw::PetscDraw, m::Cint, n::Cint, x::PetscReal, y::PetscReal, min::PetscReal, max::PetscReal, v::PetscReal) \ndraws a rectangular patch of a contour plot\nfor a two-dimensional array.\n\nNot Collective\n\nInput Parameters:\n- `draw` - the draw context\n- `m`    - the number of local mesh points in the x direction\n- `n`    - the number of local mesh points in the y direction\n- `x`    - the horizontal locations of the local mesh points\n- `y`    - the vertical locations of the local mesh points\n- `min`  - the minimum value in the entire contour\n- `max`  - the maximum value in the entire contour\n- `v`    - the data\n\nOptions Database Key:\n- `-draw_x_shared_colormap` - Activates private colormap\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawTensorContour()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawTensorContourPatch\"))\n\"\"\"\nfunction PetscDrawTensorContourPatch(petsclib::PetscLibType, draw::PetscDraw, m::Cint, n::Cint, x::PetscReal, y::PetscReal, min::PetscReal, max::PetscReal, v::PetscReal) end\n\n@for_petsc function PetscDrawTensorContourPatch(petsclib::$UnionPetscLib, draw::PetscDraw, m::Cint, n::Cint, x::$PetscReal, y::$PetscReal, min::$PetscReal, max::$PetscReal, v::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawTensorContourPatch, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Cint, Cint, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal, $PetscReal, Ptr{$PetscReal}),\n               draw, m, n, x, y, min, max, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawPoint(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint) \ndraws a point onto a drawable.\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xl`   - horizatonal coordinate of the point\n- `yl`   - vertical coordinate of the point\n- `cl`   - the color of the point\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawPointPixel()`, `PetscDrawPointSetSize()`, `PetscDrawLine()`, `PetscDrawRectangle()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`,\n`PetscDrawMarker()`, `PetscDrawString()`, `PetscDrawArrow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawPoint\"))\n\"\"\"\nfunction PetscDrawPoint(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint) end\n\n@for_petsc function PetscDrawPoint(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, cl::Cint )\n\n    @chk ccall(\n               (:PetscDrawPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, Cint),\n               draw, xl, yl, cl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawPointPixel(petsclib::PetscLibType,draw::PetscDraw, x::Cint, y::Cint, c::Cint) \ndraws a point onto a drawable, in pixel coordinates\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `x`    - horizontal pixel coordinates of the point\n- `y`    - vertical pixel coordinates of the point\n- `c`    - the color of the point\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawPoint()`, `PetscDrawPointSetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawPointPixel\"))\n\"\"\"\nfunction PetscDrawPointPixel(petsclib::PetscLibType, draw::PetscDraw, x::Cint, y::Cint, c::Cint) end\n\n@for_petsc function PetscDrawPointPixel(petsclib::$UnionPetscLib, draw::PetscDraw, x::Cint, y::Cint, c::Cint )\n\n    @chk ccall(\n               (:PetscDrawPointPixel, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Cint, Cint, Cint),\n               draw, x, y, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawPointSetSize(petsclib::PetscLibType,draw::PetscDraw, width::PetscReal) \nSets the point size for future draws.  The size is\nrelative to the user coordinates of the window; 0.0 denotes the natural\nwidth, 1.0 denotes the entire viewport.\n\nNot Collective\n\nInput Parameters:\n- `draw`  - the drawing context\n- `width` - the width in user coordinates\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawPoint()`, `PetscDrawMarker()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawPointSetSize\"))\n\"\"\"\nfunction PetscDrawPointSetSize(petsclib::PetscLibType, draw::PetscDraw, width::PetscReal) end\n\n@for_petsc function PetscDrawPointSetSize(petsclib::$UnionPetscLib, draw::PetscDraw, width::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawPointSetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal),\n               draw, width,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawClear(petsclib::PetscLibType,draw::PetscDraw) \nClears graphical output. All processors must call this routine.\nDoes not return until the draw in context is clear.\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: intermediate\n\n-seealso: `PetscDrawBOP()`, `PetscDrawEOP()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawClear\"))\n\"\"\"\nfunction PetscDrawClear(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawClear(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawClear, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBOP(petsclib::PetscLibType,draw::PetscDraw) \nBegins a new page or frame on the selected graphical device.\n\nLogically Collective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: advanced\n\n-seealso: `PetscDrawEOP()`, `PetscDrawClear()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBOP\"))\n\"\"\"\nfunction PetscDrawBOP(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawBOP(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawBOP, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawEOP(petsclib::PetscLibType,draw::PetscDraw) \nEnds a page or frame on the selected graphical device.\n\nLogically Collective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: advanced\n\n-seealso: `PetscDrawBOP()`, `PetscDrawClear()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawEOP\"))\n\"\"\"\nfunction PetscDrawEOP(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawEOP(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawEOP, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawPause(petsclib::PetscLibType,draw::PetscDraw) \nWaits n seconds or until user input, depending on input\nto `PetscDrawSetPause()`.\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawSetPause()`, `PetscDrawGetPause()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawPause\"))\n\"\"\"\nfunction PetscDrawPause(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawPause(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawPause, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetPause(petsclib::PetscLibType,draw::PetscDraw, lpause::PetscReal) \nSets the amount of time that program pauses after\na `PetscDrawPause()` is called.\n\nLogically Collective\n\nInput Parameters:\n- `draw`   - the drawing object\n- `lpause` - number of seconds to pause, -1 implies until user input, -2 pauses only on the `PetscDrawDestroy()`\n\nOptions Database Key:\n- `-draw_pause value` - set the time to pause\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawGetPause()`, `PetscDrawPause()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetPause\"))\n\"\"\"\nfunction PetscDrawSetPause(petsclib::PetscLibType, draw::PetscDraw, lpause::PetscReal) end\n\n@for_petsc function PetscDrawSetPause(petsclib::$UnionPetscLib, draw::PetscDraw, lpause::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawSetPause, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal),\n               draw, lpause,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawGetPause(petsclib::PetscLibType,draw::PetscDraw, lpause::PetscReal) \nGets the amount of time that program pauses after\na `PetscDrawPause()` is called.\n\nNot Collective\n\nInput Parameters:\n- `draw`   - the drawing object\n- `lpause` - number of seconds to pause, -1 implies until user input\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawSetPause()`, `PetscDrawPause()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetPause\"))\n\"\"\"\nfunction PetscDrawGetPause(petsclib::PetscLibType, draw::PetscDraw, lpause::PetscReal) end\n\n@for_petsc function PetscDrawGetPause(petsclib::$UnionPetscLib, draw::PetscDraw, lpause::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawGetPause, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{$PetscReal}),\n               draw, lpause,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawMarker(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint) \ndraws a marker onto a drawable.\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xl`   - horizontal coordinate of the marker\n- `yl`   - vertical coordinate of the marker\n- `cl`   - the color of the marker\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawPoint()`, `PetscDrawString()`, `PetscDrawSetMarkerType()`, `PetscDrawGetMarkerType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawMarker\"))\n\"\"\"\nfunction PetscDrawMarker(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint) end\n\n@for_petsc function PetscDrawMarker(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, cl::Cint )\n\n    @chk ccall(\n               (:PetscDrawMarker, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, Cint),\n               draw, xl, yl, cl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSetMarkerType(petsclib::PetscLibType,draw::PetscDraw, mtype::PetscDrawMarkerType) \nsets the type of marker to display with `PetscDrawMarker()`\n\nNot Collective\n\nInput Parameters:\n- `draw`  - the drawing context\n- `mtype` - either `PETSC_DRAW_MARKER_CROSS` (default) or `PETSC_DRAW_MARKER_POINT`\n\nOptions Database Key:\n- `-draw_marker_type` - x or point\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawPoint()`, `PetscDrawMarker()`, `PetscDrawGetMarkerType()`, `PetscDrawMarkerType`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSetMarkerType\"))\n\"\"\"\nfunction PetscDrawSetMarkerType(petsclib::PetscLibType, draw::PetscDraw, mtype::PetscDrawMarkerType) end\n\n@for_petsc function PetscDrawSetMarkerType(petsclib::$UnionPetscLib, draw::PetscDraw, mtype::PetscDrawMarkerType )\n\n    @chk ccall(\n               (:PetscDrawSetMarkerType, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, PetscDrawMarkerType),\n               draw, mtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawGetMarkerType(petsclib::PetscLibType,draw::PetscDraw, mtype::PetscDrawMarkerType) \ngets the type of marker to display with `PetscDrawMarker()`\n\nNot Collective\n\nInput Parameters:\n- `draw`  - the drawing context\n- `mtype` - either `PETSC_DRAW_MARKER_CROSS` (default) or `PETSC_DRAW_MARKER_POINT`\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawPoint()`, `PetscDrawMarker()`, `PetscDrawSetMarkerType()`, `PetscDrawMarkerType`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawGetMarkerType\"))\n\"\"\"\nfunction PetscDrawGetMarkerType(petsclib::PetscLibType, draw::PetscDraw, mtype::PetscDrawMarkerType) end\n\n@for_petsc function PetscDrawGetMarkerType(petsclib::$UnionPetscLib, draw::PetscDraw, mtype::PetscDrawMarkerType )\n\n    @chk ccall(\n               (:PetscDrawGetMarkerType, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDrawMarkerType}),\n               draw, mtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawIndicatorFunction(petsclib::PetscLibType,draw::PetscDraw, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, c::Cint, indicator::external, ctx::Cvoid) \nDraws an indicator function (where a relationship is true) on a `PetscDraw`\n\nNot Collective\n\nInput Parameters:\n- `draw`      - a `PetscDraw`\n- `xmin`      - region to draw indicator function\n- `xmax`      - region to draw indicator function\n- `ymin`      - region to draw indicator function\n- `ymax`      - region to draw indicator function\n- `c`         - the color of the region\n- `indicator` - the indicator function\n- `ctx`       - the context to pass to the indicator function\n\nLevel: developer\n\n-seealso: `PetscDraw`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawIndicatorFunction\"))\n\"\"\"\nfunction PetscDrawIndicatorFunction(petsclib::PetscLibType, draw::PetscDraw, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, c::Cint, indicator::external, ctx::Cvoid) end\n\n@for_petsc function PetscDrawIndicatorFunction(petsclib::$UnionPetscLib, draw::PetscDraw, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal, c::Cint, indicator::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDrawIndicatorFunction, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Cint, external, Ptr{Cvoid}),\n               draw, xmin, xmax, ymin, ymax, c, indicator, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawCoordinateToPixel(petsclib::PetscLibType,draw::PetscDraw, x::PetscReal, y::PetscReal, i::Cint, j::Cint) \ngiven a coordinate in a `PetscDraw` returns the pixel location\n\nNot Collective\n\nInput Parameters:\n- `draw` - the draw where the coordinates are defined\n- `x`    - the horizontal coordinate\n- `y`    - the vertical coordinate\n\nOutput Parameters:\n- `i` - the horizontal pixel location\n- `j` - the vertical pixel location\n\nLevel: developer\n\n-seealso: `PetscDraw`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawCoordinateToPixel\"))\n\"\"\"\nfunction PetscDrawCoordinateToPixel(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal, i::Cint, j::Cint) end\n\n@for_petsc function PetscDrawCoordinateToPixel(petsclib::$UnionPetscLib, draw::PetscDraw, x::$PetscReal, y::$PetscReal, i::Cint, j::Cint )\n\n    @chk ccall(\n               (:PetscDrawCoordinateToPixel, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, Ptr{Cint}, Ptr{Cint}),\n               draw, x, y, i, j,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tx::PetscReal,y::PetscReal = PetscDrawPixelToCoordinate(petsclib::PetscLibType,draw::PetscDraw, i::Cint, j::Cint) \ngiven a pixel in a `PetscDraw` returns the coordinate\n\nNot Collective\n\nInput Parameters:\n- `draw` - the draw where the coordinates are defined\n- `i`    - the horizontal pixel location\n- `j`    - the vertical pixel location\n\nOutput Parameters:\n- `x` - the horizontal coordinate\n- `y` - the vertical coordinate\n\nLevel: developer\n\n-seealso: `PetscDraw`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawPixelToCoordinate\"))\n\"\"\"\nfunction PetscDrawPixelToCoordinate(petsclib::PetscLibType, draw::PetscDraw, i::Cint, j::Cint) end\n\n@for_petsc function PetscDrawPixelToCoordinate(petsclib::$UnionPetscLib, draw::PetscDraw, i::Cint, j::Cint )\n\tx_ = Ref{$PetscReal}()\n\ty_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDrawPixelToCoordinate, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Cint, Cint, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               draw, i, j, x_, y_,\n              )\n\n\tx = x_[]\n\ty = y_[]\n\n\treturn x,y\nend \n\n\"\"\"\n\tPetscDrawRectangle(petsclib::PetscLibType,draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, c1::Cint, c2::Cint, c3::Cint, c4::Cint) \ndraws a rectangle onto a `PetscDraw` object\n\nNot Collective\n\nInput Parameters:\n- `draw` - the drawing context\n- `xl`   - coordinates of the lower left corner\n- `yl`   - coordinates of the lower left corner\n- `xr`   - coordinate of the upper right corner\n- `yr`   - coordinate of the upper right corner\n- `c1`   - the color of the first corner\n- `c2`   - the color of the second corner\n- `c3`   - the color of the third corner\n- `c4`   - the color of the fourth corner\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PetscDrawLine()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`,\n`PetscDrawMarker()`, `PetscDrawPoint()`, `PetscDrawString()`, `PetscDrawArrow()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawRectangle\"))\n\"\"\"\nfunction PetscDrawRectangle(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, c1::Cint, c2::Cint, c3::Cint, c4::Cint) end\n\n@for_petsc function PetscDrawRectangle(petsclib::$UnionPetscLib, draw::PetscDraw, xl::$PetscReal, yl::$PetscReal, xr::$PetscReal, yr::$PetscReal, c1::Cint, c2::Cint, c3::Cint, c4::Cint )\n\n    @chk ccall(\n               (:PetscDrawRectangle, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Cint, Cint, Cint, Cint),\n               draw, xl, yl, xr, yr, c1, c2, c3, c4,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawOpenImage(petsclib::PetscLibType,comm::MPI_Comm, filename::String, w::Cint, h::Cint, draw::PetscDraw) \nOpens an image for use with the `PetscDraw` routines.\n\nCollective\n\nInput Parameters:\n- `comm`     - the communicator that will share image\n- `filename` - optional name of the file where the image will be stored\n- `w`        - the image width in pixels\n- `h`        - the image height in pixels\n\nOutput Parameter:\n- `draw` - the drawing context.\n\nLevel: beginner\n\n-seealso: `PetscDraw`, `PETSC_DRAW_IMAGE`, `PETSC_DRAW_X`, `PetscDrawSetSave()`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`, `PetscDrawDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawOpenImage\"))\n\"\"\"\nfunction PetscDrawOpenImage(petsclib::PetscLibType, comm::MPI_Comm, filename::String, w::Cint, h::Cint, draw::PetscDraw) end\n\n@for_petsc function PetscDrawOpenImage(petsclib::$UnionPetscLib, comm::MPI_Comm, filename::String, w::Cint, h::Cint, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawOpenImage, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Cint, Cint, Ptr{PetscDraw}),\n               comm, filename, w, h, draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawOpenNull(petsclib::PetscLibType,comm::MPI_Comm, win::PetscDraw) \nOpens a null drawing context. All draw commands to\nit are ignored.\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `win` - the drawing context\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawIsNull()`, `PETSC_DRAW_NULL`, `PetscDrawOpenX()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawOpenNull\"))\n\"\"\"\nfunction PetscDrawOpenNull(petsclib::PetscLibType, comm::MPI_Comm, win::PetscDraw) end\n\n@for_petsc function PetscDrawOpenNull(petsclib::$UnionPetscLib, comm::MPI_Comm, win::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawOpenNull, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscDraw}),\n               comm, win,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tyes::PetscBool = PetscDrawIsNull(petsclib::PetscLibType,draw::PetscDraw) \nReturns `PETSC_TRUE` if draw is a null draw object.\n\nNot Collective\n\nInput Parameter:\n- `draw` - the draw context\n\nOutput Parameter:\n- `yes` - `PETSC_TRUE` if it is a null draw object; otherwise `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PETSC_DRAW_NULL`, `PetscDrawOpenX()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawIsNull\"))\n\"\"\"\nfunction PetscDrawIsNull(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawIsNull(petsclib::$UnionPetscLib, draw::PetscDraw )\n\tyes_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDrawIsNull, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscBool}),\n               draw, yes_,\n              )\n\n\tyes = yes_[]\n\n\treturn yes\nend \n\n\"\"\"\n\tPetscDrawOpenX(petsclib::PetscLibType,comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint, draw::PetscDraw) \nOpens an X\n\nCollective\n\nInput Parameters:\n- `comm`    - the communicator that will share X-window\n- `display` - the X display on which to open, or `NULL` for the local machine\n- `title`   - the title to put in the title bar, or `NULL` for no title\n- `x`       - the x screen coordinates of the upper left corner of window (or `PETSC_DECIDE`)\n- `y`       - the y screen coordinates of the upper left corner of window (or `PETSC_DECIDE`)\n- `w`       - the screen width in pixels of (or `PETSC_DRAW_HALF_SIZE`, `PETSC_DRAW_FULL_SIZE`, or `PETSC_DRAW_THIRD_SIZE` or `PETSC_DRAW_QUARTER_SIZE`)\n- `h`       - the screen height in pixels of (or `PETSC_DRAW_HALF_SIZE`, `PETSC_DRAW_FULL_SIZE`, or `PETSC_DRAW_THIRD_SIZE` or `PETSC_DRAW_QUARTER_SIZE`)\n\nOutput Parameter:\n- `draw` - the drawing context.\n\nOptions Database Keys:\n- `-nox`                    - Disables all x-windows output\n- `-display <name>`         - Sets name of machine for the X display\n- `-draw_pause <pause>`     - Sets time (in seconds) that the program pauses after `PetscDrawPause()` has been called\n(0 is default, -1 implies until user input).\n- `-draw_cmap <name>`       - Sets the colormap to use.\n- `-draw_cmap_reverse`      - Reverses the colormap.\n- `-draw_cmap_brighten`     - Brighten (0 < beta < 1) or darken (-1 < beta < 0) the colormap.\n- `-draw_x_shared_colormap` - Causes PETSc to use a shared colormap. By default PETSc creates a separate color\nfor its windows, you must put the mouse into the graphics\nwindow to see  the correct colors. This options forces\nPETSc to use the default colormap which will usually result\nin bad contour plots.\n- `-draw_fast`              - Does not create colormap for contour plots.\n- `-draw_double_buffer`     - Uses double buffering for smooth animation.\n- `-geometry`               - Indicates location and size of window.\n\nLevel: beginner\n\n-seealso: `PetscDrawFlush()`, `PetscDrawDestroy()`, `PetscDrawCreate()`, `PetscDrawOpnOpenGL()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawOpenX\"))\n\"\"\"\nfunction PetscDrawOpenX(petsclib::PetscLibType, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint, draw::PetscDraw) end\n\n@for_petsc function PetscDrawOpenX(petsclib::$UnionPetscLib, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawOpenX, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, Ptr{PetscDraw}),\n               comm, display, title, x, y, w, h, draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawZoom(petsclib::PetscLibType,draw::PetscDraw, func::external, ctx::Cvoid) \nAllows one to provide a function that gets called for zooming in on a drawing using the mouse buttons\n\nCollective draw\n\nInput Parameters:\n- `draw` - the window where the graph will be made.\n- `func` - users function that draws the graphic\n- `ctx`  - pointer to any user required data\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawZoom\"))\n\"\"\"\nfunction PetscDrawZoom(petsclib::PetscLibType, draw::PetscDraw, func::external, ctx::Cvoid) end\n\n@for_petsc function PetscDrawZoom(petsclib::$UnionPetscLib, draw::PetscDraw, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscDrawZoom, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, external, Ptr{Cvoid}),\n               draw, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawUtilitySetGamma(petsclib::PetscLibType,g::PetscReal) \n\n# External Links\n$(_doc_external(\"Sys/PetscDrawUtilitySetGamma\"))\n\"\"\"\nfunction PetscDrawUtilitySetGamma(petsclib::PetscLibType, g::PetscReal) end\n\n@for_petsc function PetscDrawUtilitySetGamma(petsclib::$UnionPetscLib, g::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawUtilitySetGamma, $petsc_library),\n               PetscErrorCode,\n               ($PetscReal,),\n               g,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tPetscDrawUtilitySetCmap(petsclib::PetscLibType,colormap::String, mapsize::Cint, char::Vector{unsigned}, char::Vector{unsigned}, char::Vector{unsigned}) \n\n# External Links\n$(_doc_external(\"Sys/PetscDrawUtilitySetCmap\"))\n\"\"\"\nfunction PetscDrawUtilitySetCmap(petsclib::PetscLibType, colormap::String, mapsize::Cint, char::Vector{unsigned}, char::Vector{unsigned}, char::Vector{unsigned}) end\n\n@for_petsc function PetscDrawUtilitySetCmap(petsclib::$UnionPetscLib, colormap::String, mapsize::Cint, char::Vector{unsigned}, char::Vector{unsigned}, char::Vector{unsigned} )\n\n    @chk ccall(\n               (:PetscDrawUtilitySetCmap, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cint, Ptr{unsigned}, Ptr{unsigned}, Ptr{unsigned}),\n               colormap, mapsize, char, char, char,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\taxis::PetscDrawAxis = PetscDrawAxisCreate(petsclib::PetscLibType,draw::PetscDraw) \nGenerate the axis data structure.\n\nCollective\n\nInput Parameter:\n- `draw` - `PetscDraw` object where axis to be made\n\nOutput Parameter:\n- `axis` - the axis datastructure\n\n-seealso: `PetscDrawLGCreate()`, `PetscDrawLG`, `PetscDrawSPCreate()`, `PetscDrawSP`, `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawBarCreate()`, `PetscDrawBar`, `PetscDrawLGGetAxis()`, `PetscDrawSPGetAxis()`,\n`PetscDrawHGGetAxis()`, `PetscDrawBarGetAxis()`, `PetscDrawAxis`, `PetscDrawAxisDestroy()`, `PetscDrawAxisSetColors()`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisSetLimits()`, `PetscDrawAxisGetLimits()`, `PetscDrawAxisSetHoldLimits()`,\n`PetscDrawAxisDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisCreate\"))\n\"\"\"\nfunction PetscDrawAxisCreate(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawAxisCreate(petsclib::$UnionPetscLib, draw::PetscDraw )\n\taxis_ = Ref{PetscDrawAxis}()\n\n    @chk ccall(\n               (:PetscDrawAxisCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDrawAxis}),\n               draw, axis_,\n              )\n\n\taxis = axis_[]\n\n\treturn axis\nend \n\n\"\"\"\n\tPetscDrawAxisDestroy(petsclib::PetscLibType,axis::PetscDrawAxis) \nFrees the space used by an axis structure.\n\nCollective\n\nInput Parameter:\n- `axis` - the axis context\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawAxisCreate()`, `PetscDrawAxis`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisDestroy\"))\n\"\"\"\nfunction PetscDrawAxisDestroy(petsclib::PetscLibType, axis::PetscDrawAxis) end\n\n@for_petsc function PetscDrawAxisDestroy(petsclib::$UnionPetscLib, axis::PetscDrawAxis )\n\n    @chk ccall(\n               (:PetscDrawAxisDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDrawAxis},),\n               axis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawAxisSetColors(petsclib::PetscLibType,axis::PetscDrawAxis, ac::Cint, tc::Cint, cc::Cint) \nSets the colors to be used for the axis,\ntickmarks, and text.\n\nLogically Collective\n\nInput Parameters:\n- `axis` - the axis\n- `ac`   - the color of the axis lines\n- `tc`   - the color of the tick marks\n- `cc`   - the color of the text strings\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawAxisCreate()`, `PetscDrawAxis`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisDraw()`, `PetscDrawAxisSetLimits()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisSetColors\"))\n\"\"\"\nfunction PetscDrawAxisSetColors(petsclib::PetscLibType, axis::PetscDrawAxis, ac::Cint, tc::Cint, cc::Cint) end\n\n@for_petsc function PetscDrawAxisSetColors(petsclib::$UnionPetscLib, axis::PetscDrawAxis, ac::Cint, tc::Cint, cc::Cint )\n\n    @chk ccall(\n               (:PetscDrawAxisSetColors, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawAxis, Cint, Cint, Cint),\n               axis, ac, tc, cc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawAxisSetLabels(petsclib::PetscLibType,axis::PetscDrawAxis, top::String, xlabel::String, ylabel::String) \nSets the x and y axis labels.\n\nLogically Collective\n\nInput Parameters:\n- `axis`   - the axis\n- `top`    - the label at the top of the image\n- `xlabel` - the x axis label\n- `ylabel` - the y axis label\n\nLevel: advanced\n\n-seealso: `PetscDraw`, `PetscDrawAxisCreate()`, `PetscDrawAxis`, `PetscDrawAxisSetColors()`, `PetscDrawAxisDraw()`, `PetscDrawAxisSetLimits()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisSetLabels\"))\n\"\"\"\nfunction PetscDrawAxisSetLabels(petsclib::PetscLibType, axis::PetscDrawAxis, top::String, xlabel::String, ylabel::String) end\n\n@for_petsc function PetscDrawAxisSetLabels(petsclib::$UnionPetscLib, axis::PetscDrawAxis, top::String, xlabel::String, ylabel::String )\n\n    @chk ccall(\n               (:PetscDrawAxisSetLabels, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawAxis, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}),\n               axis, top, xlabel, ylabel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawAxisSetLimits(petsclib::PetscLibType,axis::PetscDrawAxis, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal) \nSets the limits (in user coords) of the axis\n\nLogically Collective\n\nInput Parameters:\n- `axis` - the axis\n- `xmin` - the lower x limit\n- `xmax` - the upper x limit\n- `ymin` - the lower y limit\n- `ymax` - the upper y limit\n\nOptions Database Key:\n- `-drawaxis_hold` - hold the initial set of axis limits for future plotting\n\nLevel: advanced\n\n-seealso: `PetscDrawAxisSetHoldLimits()`, `PetscDrawAxisGetLimits()`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisSetColors()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisSetLimits\"))\n\"\"\"\nfunction PetscDrawAxisSetLimits(petsclib::PetscLibType, axis::PetscDrawAxis, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal) end\n\n@for_petsc function PetscDrawAxisSetLimits(petsclib::$UnionPetscLib, axis::PetscDrawAxis, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawAxisSetLimits, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawAxis, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               axis, xmin, xmax, ymin, ymax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawAxisGetLimits(petsclib::PetscLibType,axis::PetscDrawAxis, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal) \nGets the limits (in user coords) of the axis\n\nNot Collective\n\nInput Parameters:\n- `axis` - the axis\n- `xmin` - the lower x limit\n- `xmax` - the upper x limit\n- `ymin` - the lower y limit\n- `ymax` - the upper y limit\n\nLevel: advanced\n\n-seealso: `PetscDrawAxisCreate()`, `PetscDrawAxis`, `PetscDrawAxisSetHoldLimits()`, `PetscDrawAxisSetLimits()`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisSetColors()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisGetLimits\"))\n\"\"\"\nfunction PetscDrawAxisGetLimits(petsclib::PetscLibType, axis::PetscDrawAxis, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal) end\n\n@for_petsc function PetscDrawAxisGetLimits(petsclib::$UnionPetscLib, axis::PetscDrawAxis, xmin::$PetscReal, xmax::$PetscReal, ymin::$PetscReal, ymax::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawAxisGetLimits, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawAxis, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               axis, xmin, xmax, ymin, ymax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawAxisSetHoldLimits(petsclib::PetscLibType,axis::PetscDrawAxis, hold::PetscBool) \nCauses an axis to keep the same limits until this is called\nagain\n\nLogically Collective\n\nInput Parameters:\n- `axis` - the axis\n- `hold` - `PETSC_TRUE` - hold current limits, `PETSC_FALSE` allow limits to be changed\n\nLevel: advanced\n\n-seealso: `PetscDrawAxisCreate()`, `PetscDrawAxis`, `PetscDrawAxisGetLimits()`, `PetscDrawAxisSetLimits()`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisSetColors()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisSetHoldLimits\"))\n\"\"\"\nfunction PetscDrawAxisSetHoldLimits(petsclib::PetscLibType, axis::PetscDrawAxis, hold::PetscBool) end\n\n@for_petsc function PetscDrawAxisSetHoldLimits(petsclib::$UnionPetscLib, axis::PetscDrawAxis, hold::PetscBool )\n\n    @chk ccall(\n               (:PetscDrawAxisSetHoldLimits, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawAxis, PetscBool),\n               axis, hold,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawAxisDraw(petsclib::PetscLibType,axis::PetscDrawAxis) \ndraws an axis.\n\nCollective\n\nInput Parameter:\n- `axis` - `PetscDrawAxis` structure\n\nLevel: advanced\n\n-seealso: `PetscDrawAxisCreate()`, `PetscDrawAxis`, `PetscDrawAxisGetLimits()`, `PetscDrawAxisSetLimits()`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisSetColors()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawAxisDraw\"))\n\"\"\"\nfunction PetscDrawAxisDraw(petsclib::PetscLibType, axis::PetscDrawAxis) end\n\n@for_petsc function PetscDrawAxisDraw(petsclib::$UnionPetscLib, axis::PetscDrawAxis )\n\n    @chk ccall(\n               (:PetscDrawAxisDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawAxis,),\n               axis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGGetAxis(petsclib::PetscLibType,lg::PetscDrawLG, axis::PetscDrawAxis) \nGets the axis context associated with a line graph.\nThis is useful if one wants to change some axis property, such as\nlabels, color, etc. The axis context should not be destroyed by the\napplication code.\n\nNot Collective, if lg is parallel then axis is parallel\n\nInput Parameter:\n- `lg` - the line graph context\n\nOutput Parameter:\n- `axis` - the axis context\n\nLevel: advanced\n\n-seealso: `PetscDrawLGCreate()`, `PetscDrawAxis`, `PetscDrawLG`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGGetAxis\"))\n\"\"\"\nfunction PetscDrawLGGetAxis(petsclib::PetscLibType, lg::PetscDrawLG, axis::PetscDrawAxis) end\n\n@for_petsc function PetscDrawLGGetAxis(petsclib::$UnionPetscLib, lg::PetscDrawLG, axis::PetscDrawAxis )\n\n    @chk ccall(\n               (:PetscDrawLGGetAxis, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{PetscDrawAxis}),\n               lg, axis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGGetDraw(petsclib::PetscLibType,lg::PetscDrawLG, draw::PetscDraw) \nGets the draw context associated with a line graph.\n\nNot Collective, if lg is parallel then draw is parallel\n\nInput Parameter:\n- `lg` - the line graph context\n\nOutput Parameter:\n- `draw` - the draw context\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGCreate()`, `PetscDraw`, `PetscDrawLG`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGGetDraw\"))\n\"\"\"\nfunction PetscDrawLGGetDraw(petsclib::PetscLibType, lg::PetscDrawLG, draw::PetscDraw) end\n\n@for_petsc function PetscDrawLGGetDraw(petsclib::$UnionPetscLib, lg::PetscDrawLG, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawLGGetDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{PetscDraw}),\n               lg, draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGSPDraw(petsclib::PetscLibType,lg::PetscDrawLG, spin::PetscDrawSP) \nRedraws a line graph and a scatter plot on the same `PetscDraw` they must share\n\nCollective\n\nInput Parameters:\n- `lg`   - the line graph context\n- `spin` - the scatter plot\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGDraw()`, `PetscDrawSPDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSPDraw\"))\n\"\"\"\nfunction PetscDrawLGSPDraw(petsclib::PetscLibType, lg::PetscDrawLG, spin::PetscDrawSP) end\n\n@for_petsc function PetscDrawLGSPDraw(petsclib::$UnionPetscLib, lg::PetscDrawLG, spin::PetscDrawSP )\n\n    @chk ccall(\n               (:PetscDrawLGSPDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, PetscDrawSP),\n               lg, spin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toutlg::PetscDrawLG = PetscDrawLGCreate(petsclib::PetscLibType,draw::PetscDraw, dim::PetscInt) \nCreates a line graph data structure.\n\nCollective\n\nInput Parameters:\n- `draw` - the window where the graph will be made.\n- `dim`  - the number of curves which will be drawn\n\nOutput Parameter:\n- `outlg` - the line graph context\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGDestroy()`, `PetscDrawLGAddPoint()`, `PetscDrawLGAddCommonPoint()`, `PetscDrawLGAddPoints()`, `PetscDrawLGDraw()`, `PetscDrawLGSave()`,\n`PetscDrawLGView()`, `PetscDrawLGReset()`, `PetscDrawLGSetDimension()`, `PetscDrawLGGetDimension()`, `PetscDrawLGSetLegend()`, `PetscDrawLGGetAxis()`,\n`PetscDrawLGGetDraw()`, `PetscDrawLGSetUseMarkers()`, `PetscDrawLGSetLimits()`, `PetscDrawLGSetColors()`, `PetscDrawLGSetOptionsPrefix()`, `PetscDrawLGSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGCreate\"))\n\"\"\"\nfunction PetscDrawLGCreate(petsclib::PetscLibType, draw::PetscDraw, dim::PetscInt) end\n\n@for_petsc function PetscDrawLGCreate(petsclib::$UnionPetscLib, draw::PetscDraw, dim::$PetscInt )\n\toutlg_ = Ref{PetscDrawLG}()\n\n    @chk ccall(\n               (:PetscDrawLGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, $PetscInt, Ptr{PetscDrawLG}),\n               draw, dim, outlg_,\n              )\n\n\toutlg = outlg_[]\n\n\treturn outlg\nend \n\n\"\"\"\n\tPetscDrawLGSetColors(petsclib::PetscLibType,lg::PetscDrawLG, colors::Vector{Cint}) \nSets the color of each line graph drawn\n\nLogically Collective\n\nInput Parameters:\n- `lg`     - the line graph context.\n- `colors` - the colors, an array of length the value set with `PetscDrawLGSetDimension()`\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`, `PetscDrawLGSetDimension()`, `PetscDrawLGGetDimension()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSetColors\"))\n\"\"\"\nfunction PetscDrawLGSetColors(petsclib::PetscLibType, lg::PetscDrawLG, colors::Vector{Cint}) end\n\n@for_petsc function PetscDrawLGSetColors(petsclib::$UnionPetscLib, lg::PetscDrawLG, colors::Vector{Cint} )\n\n    @chk ccall(\n               (:PetscDrawLGSetColors, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{Cint}),\n               lg, colors,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGSetLegend(petsclib::PetscLibType,lg::PetscDrawLG, names::String) \nsets the names of each curve plotted\n\nLogically Collective\n\nInput Parameters:\n- `lg`    - the line graph context.\n- `names` - the names for each curve\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGGetAxis()`, `PetscDrawAxis`, `PetscDrawAxisSetColors()`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisSetHoldLimits()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSetLegend\"))\n\"\"\"\nfunction PetscDrawLGSetLegend(petsclib::PetscLibType, lg::PetscDrawLG, names::String) end\n\n@for_petsc function PetscDrawLGSetLegend(petsclib::$UnionPetscLib, lg::PetscDrawLG, names::String )\n\tnames_ = Ref(pointer(names))\n\n    @chk ccall(\n               (:PetscDrawLGSetLegend, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{Ptr{Cchar}}),\n               lg, names_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt = PetscDrawLGGetDimension(petsclib::PetscLibType,lg::PetscDrawLG) \nGet the number of curves that are to be drawn.\n\nNot Collective\n\nInput Parameter:\n- `lg` - the line graph context.\n\nOutput Parameter:\n- `dim` - the number of curves.\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGC`, `PetscDrawLGCreate()`, `PetscDrawLGSetDimension()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGGetDimension\"))\n\"\"\"\nfunction PetscDrawLGGetDimension(petsclib::PetscLibType, lg::PetscDrawLG) end\n\n@for_petsc function PetscDrawLGGetDimension(petsclib::$UnionPetscLib, lg::PetscDrawLG )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDrawLGGetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{$PetscInt}),\n               lg, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tPetscDrawLGSetDimension(petsclib::PetscLibType,lg::PetscDrawLG, dim::PetscInt) \nChange the number of curves that are to be drawn.\n\nLogically Collective\n\nInput Parameters:\n- `lg`  - the line graph context.\n- `dim` - the number of curves.\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGCreate()`, `PetscDrawLGGetDimension()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSetDimension\"))\n\"\"\"\nfunction PetscDrawLGSetDimension(petsclib::PetscLibType, lg::PetscDrawLG, dim::PetscInt) end\n\n@for_petsc function PetscDrawLGSetDimension(petsclib::$UnionPetscLib, lg::PetscDrawLG, dim::$PetscInt )\n\n    @chk ccall(\n               (:PetscDrawLGSetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, $PetscInt),\n               lg, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt,n::PetscInt,x::Vector{PetscReal},y::Vector{PetscReal} = PetscDrawLGGetData(petsclib::PetscLibType,lg::PetscDrawLG) \nGet the data being plotted.\n\nNot Collective\n\nInput Parameter:\n- `lg` - the line graph context\n\nOutput Parameters:\n- `dim` - the number of curves\n- `n`   - the number of points on each line\n- `x`   - The x-value of each point, x[p * dim + c]\n- `y`   - The y-value of each point, y[p * dim + c]\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGC`, `PetscDrawLGCreate()`, `PetscDrawLGGetDimension()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGGetData\"))\n\"\"\"\nfunction PetscDrawLGGetData(petsclib::PetscLibType, lg::PetscDrawLG) end\n\n@for_petsc function PetscDrawLGGetData(petsclib::$UnionPetscLib, lg::PetscDrawLG )\n\tdim_ = Ref{$PetscInt}()\n\tn_ = Ref{$PetscInt}()\n\tx_ = Ref{Ptr{$PetscReal}}()\n\ty_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:PetscDrawLGGetData, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               lg, dim_, n_, x_, y_,\n              )\n\n\tdim = dim_[]\n\tn = n_[]\n\tx = unsafe_wrap(Array, x_[], VecGetLocalSize(petsclib, x); own = false)\n\ty = unsafe_wrap(Array, y_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn dim,n,x,y\nend \n\n\"\"\"\n\tPetscDrawLGSetLimits(petsclib::PetscLibType,lg::PetscDrawLG, x_min::PetscReal, x_max::PetscReal, y_min::PetscReal, y_max::PetscReal) \nSets the axis limits for a line graph. If more\npoints are added after this call, the limits will be adjusted to\ninclude those additional points.\n\nLogically Collective\n\nInput Parameters:\n- `lg`    - the line graph context\n- `x_min` - the horizontal lower limit\n- `x_max` - the horizontal upper limit\n- `y_min` - the vertical lower limit\n- `y_max` - the vertical upper limit\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGCreate()`, `PetscDrawLG`, `PetscDrawAxis`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSetLimits\"))\n\"\"\"\nfunction PetscDrawLGSetLimits(petsclib::PetscLibType, lg::PetscDrawLG, x_min::PetscReal, x_max::PetscReal, y_min::PetscReal, y_max::PetscReal) end\n\n@for_petsc function PetscDrawLGSetLimits(petsclib::$UnionPetscLib, lg::PetscDrawLG, x_min::$PetscReal, x_max::$PetscReal, y_min::$PetscReal, y_max::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawLGSetLimits, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               lg, x_min, x_max, y_min, y_max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGReset(petsclib::PetscLibType,lg::PetscDrawLG) \nClears line graph to allow for reuse with new data.\n\nLogically Collective\n\nInput Parameter:\n- `lg` - the line graph context.\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGReset\"))\n\"\"\"\nfunction PetscDrawLGReset(petsclib::PetscLibType, lg::PetscDrawLG) end\n\n@for_petsc function PetscDrawLGReset(petsclib::$UnionPetscLib, lg::PetscDrawLG )\n\n    @chk ccall(\n               (:PetscDrawLGReset, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG,),\n               lg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGDestroy(petsclib::PetscLibType,lg::PetscDrawLG) \nFrees all space taken up by line graph data structure.\n\nCollective\n\nInput Parameter:\n- `lg` - the line graph context\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGDestroy\"))\n\"\"\"\nfunction PetscDrawLGDestroy(petsclib::PetscLibType, lg::PetscDrawLG) end\n\n@for_petsc function PetscDrawLGDestroy(petsclib::$UnionPetscLib, lg::PetscDrawLG )\n\n    @chk ccall(\n               (:PetscDrawLGDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDrawLG},),\n               lg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGSetUseMarkers(petsclib::PetscLibType,lg::PetscDrawLG, flg::PetscBool) \nCauses the line graph object to draw a marker for each data\n\nLogically Collective\n\nInput Parameters:\n- `lg`  - the linegraph context\n- `flg` - should mark each data point\n\nOptions Database Key:\n- `-lg_use_markers  <true,false>` - true means it draws a marker for each point\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSetUseMarkers\"))\n\"\"\"\nfunction PetscDrawLGSetUseMarkers(petsclib::PetscLibType, lg::PetscDrawLG, flg::PetscBool) end\n\n@for_petsc function PetscDrawLGSetUseMarkers(petsclib::$UnionPetscLib, lg::PetscDrawLG, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscDrawLGSetUseMarkers, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, PetscBool),\n               lg, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGDraw(petsclib::PetscLibType,lg::PetscDrawLG) \nRedraws a line graph.\n\nCollective\n\nInput Parameter:\n- `lg` - the line graph context\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawSPDraw()`, `PetscDrawLGSPDraw()`, `PetscDrawLGReset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGDraw\"))\n\"\"\"\nfunction PetscDrawLGDraw(petsclib::PetscLibType, lg::PetscDrawLG) end\n\n@for_petsc function PetscDrawLGDraw(petsclib::$UnionPetscLib, lg::PetscDrawLG )\n\n    @chk ccall(\n               (:PetscDrawLGDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG,),\n               lg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGSave(petsclib::PetscLibType,lg::PetscDrawLG) \nSaves a drawn image\n\nCollective\n\nInput Parameter:\n- `lg` - The line graph context\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawSave()`, `PetscDrawLGCreate()`, `PetscDrawLGGetDraw()`, `PetscDrawSetSave()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSave\"))\n\"\"\"\nfunction PetscDrawLGSave(petsclib::PetscLibType, lg::PetscDrawLG) end\n\n@for_petsc function PetscDrawLGSave(petsclib::$UnionPetscLib, lg::PetscDrawLG )\n\n    @chk ccall(\n               (:PetscDrawLGSave, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG,),\n               lg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGView(petsclib::PetscLibType,lg::PetscDrawLG, viewer::PetscViewer) \nPrints a line graph.\n\nCollective\n\nInput Parameters:\n- `lg`     - the line graph context\n- `viewer` - the viewer to view it with\n\nLevel: beginner\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGView\"))\n\"\"\"\nfunction PetscDrawLGView(petsclib::PetscLibType, lg::PetscDrawLG, viewer::PetscViewer) end\n\n@for_petsc function PetscDrawLGView(petsclib::$UnionPetscLib, lg::PetscDrawLG, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscDrawLGView, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, PetscViewer),\n               lg, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGSetOptionsPrefix(petsclib::PetscLibType,lg::PetscDrawLG, prefix::String) \nSets the prefix used for searching for all\n`PetscDrawLG` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `lg`     - the line graph context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: `PetscDrawLG`, `PetscDrawLGSetFromOptions()`, `PetscDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSetOptionsPrefix\"))\n\"\"\"\nfunction PetscDrawLGSetOptionsPrefix(petsclib::PetscLibType, lg::PetscDrawLG, prefix::String) end\n\n@for_petsc function PetscDrawLGSetOptionsPrefix(petsclib::$UnionPetscLib, lg::PetscDrawLG, prefix::String )\n\n    @chk ccall(\n               (:PetscDrawLGSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{Cchar}),\n               lg, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGSetFromOptions(petsclib::PetscLibType,lg::PetscDrawLG) \nSets options related to the line graph object\n\nCollective\n\nInput Parameters:\n- `lg` - the line graph context\n\nOptions Database Key:\n- `-lg_use_markers  <true,false>` - true means it draws a marker for each point\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGDestroy()`, `PetscDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGSetFromOptions\"))\n\"\"\"\nfunction PetscDrawLGSetFromOptions(petsclib::PetscLibType, lg::PetscDrawLG) end\n\n@for_petsc function PetscDrawLGSetFromOptions(petsclib::$UnionPetscLib, lg::PetscDrawLG )\n\n    @chk ccall(\n               (:PetscDrawLGSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG,),\n               lg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGAddCommonPoint(petsclib::PetscLibType,lg::PetscDrawLG, x::PetscReal, y::PetscReal) \nAdds another point to each of the line graphs. All the points share\nthe same new X coordinate.  The new point must have an X coordinate larger than the old points.\n\nLogically Collective\n\nInput Parameters:\n- `lg` - the line graph context\n- `x`  - the common x coordinate point\n- `y`  - the new y coordinate point for each curve.\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`, `PetscDrawLGAddPoints()`, `PetscDrawLGAddPoint()`, `PetscDrawLGReset()`, `PetscDrawLGDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGAddCommonPoint\"))\n\"\"\"\nfunction PetscDrawLGAddCommonPoint(petsclib::PetscLibType, lg::PetscDrawLG, x::PetscReal, y::PetscReal) end\n\n@for_petsc function PetscDrawLGAddCommonPoint(petsclib::$UnionPetscLib, lg::PetscDrawLG, x::$PetscReal, y::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawLGAddCommonPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, $PetscReal, Ptr{$PetscReal}),\n               lg, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGAddPoint(petsclib::PetscLibType,lg::PetscDrawLG, x::PetscReal, y::PetscReal) \nAdds another point to each of the line graphs.\nThe new point must have an X coordinate larger than the old points.\n\nLogically Collective\n\nInput Parameters:\n- `lg` - the line graph context\n- `x`  - array containing the x coordinate for the point on each curve\n- `y`  - array containing the y coordinate for the point on each curve\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`, `PetscDrawLGAddPoints()`, `PetscDrawLGAddCommonPoint()`, `PetscDrawLGReset()`, `PetscDrawLGDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGAddPoint\"))\n\"\"\"\nfunction PetscDrawLGAddPoint(petsclib::PetscLibType, lg::PetscDrawLG, x::PetscReal, y::PetscReal) end\n\n@for_petsc function PetscDrawLGAddPoint(petsclib::$UnionPetscLib, lg::PetscDrawLG, x::$PetscReal, y::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawLGAddPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               lg, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawLGAddPoints(petsclib::PetscLibType,lg::PetscDrawLG, n::PetscInt, xx::Vector{PetscReal}, yy::Vector{PetscReal}) \nAdds several points to each of the line graphs.\nThe new points must have an X coordinate larger than the old points.\n\nLogically Collective\n\nInput Parameters:\n- `lg` - the line graph context\n- `xx` - array of pointers that point to arrays containing the new x coordinates for each curve.\n- `yy` - array of pointers that point to arrays containing the new y points for each curve.\n- `n`  - number of points being added\n\nLevel: intermediate\n\n-seealso: `PetscDrawLG`, `PetscDrawLGCreate()`, `PetscDrawLGAddPoint()`, `PetscDrawLGAddCommonPoint()`, `PetscDrawLGReset()`, `PetscDrawLGDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawLGAddPoints\"))\n\"\"\"\nfunction PetscDrawLGAddPoints(petsclib::PetscLibType, lg::PetscDrawLG, n::PetscInt, xx::Vector{PetscReal}, yy::Vector{PetscReal}) end\n\n@for_petsc function PetscDrawLGAddPoints(petsclib::$UnionPetscLib, lg::PetscDrawLG, n::$PetscInt, xx::Vector{$PetscReal}, yy::Vector{$PetscReal} )\n\txx_ = Ref(pointer(xx))\n\tyy_ = Ref(pointer(yy))\n\n    @chk ccall(\n               (:PetscDrawLGAddPoints, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawLG, $PetscInt, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               lg, n, xx_, yy_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSplitViewPort(petsclib::PetscLibType,draw::PetscDraw) \nSplits a window shared by several processes into smaller\nview ports. One for each process.\n\nCollective\n\nInput Parameter:\n- `draw` - the drawing context\n\nLevel: advanced\n\n-seealso: `PetscDrawDivideViewPort()`, `PetscDrawSetViewPort()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSplitViewPort\"))\n\"\"\"\nfunction PetscDrawSplitViewPort(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawSplitViewPort(petsclib::$UnionPetscLib, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawSplitViewPort, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw,),\n               draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdrawsp::PetscDrawSP = PetscDrawSPCreate(petsclib::PetscLibType,draw::PetscDraw, dim::Cint) \nCreates a scatter plot data structure.\n\nCollective\n\nInput Parameters:\n- `draw` - the window where the graph will be made.\n- `dim`  - the number of sets of points which will be drawn\n\nOutput Parameter:\n- `drawsp` - the scatter plot context\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGCreate()`, `PetscDrawLG`, `PetscDrawBarCreate()`, `PetscDrawBar`, `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawSPDestroy()`, `PetscDraw`, `PetscDrawSP`, `PetscDrawSPSetDimension()`, `PetscDrawSPReset()`,\n`PetscDrawSPAddPoint()`, `PetscDrawSPAddPoints()`, `PetscDrawSPDraw()`, `PetscDrawSPSave()`, `PetscDrawSPSetLimits()`, `PetscDrawSPGetAxis()`, `PetscDrawAxis`, `PetscDrawSPGetDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPCreate\"))\n\"\"\"\nfunction PetscDrawSPCreate(petsclib::PetscLibType, draw::PetscDraw, dim::Cint) end\n\n@for_petsc function PetscDrawSPCreate(petsclib::$UnionPetscLib, draw::PetscDraw, dim::Cint )\n\tdrawsp_ = Ref{PetscDrawSP}()\n\n    @chk ccall(\n               (:PetscDrawSPCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Cint, Ptr{PetscDrawSP}),\n               draw, dim, drawsp_,\n              )\n\n\tdrawsp = drawsp_[]\n\n\treturn drawsp\nend \n\n\"\"\"\n\tPetscDrawSPSetDimension(petsclib::PetscLibType,sp::PetscDrawSP, dim::Cint) \nChange the number of points that are added at each  `PetscDrawSPAddPoint()`\n\nNot Collective\n\nInput Parameters:\n- `sp`  - the scatter plot context.\n- `dim` - the number of point curves on this process\n\nLevel: intermediate\n\n-seealso: `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPAddPoint()`, `PetscDrawSPAddPoints()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPSetDimension\"))\n\"\"\"\nfunction PetscDrawSPSetDimension(petsclib::PetscLibType, sp::PetscDrawSP, dim::Cint) end\n\n@for_petsc function PetscDrawSPSetDimension(petsclib::$UnionPetscLib, sp::PetscDrawSP, dim::Cint )\n\n    @chk ccall(\n               (:PetscDrawSPSetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, Cint),\n               sp, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPGetDimension(petsclib::PetscLibType,sp::PetscDrawSP, dim::Cint) \nGet the number of sets of points that are to be drawn at each `PetscDrawSPAddPoint()`\n\nNot Collective\n\nInput Parameter:\n- `sp` - the scatter plot context.\n\nOutput Parameter:\n- `dim` - the number of point curves on this process\n\nLevel: intermediate\n\n-seealso: `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPAddPoint()`, `PetscDrawSPAddPoints()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPGetDimension\"))\n\"\"\"\nfunction PetscDrawSPGetDimension(petsclib::PetscLibType, sp::PetscDrawSP, dim::Cint) end\n\n@for_petsc function PetscDrawSPGetDimension(petsclib::$UnionPetscLib, sp::PetscDrawSP, dim::Cint )\n\n    @chk ccall(\n               (:PetscDrawSPGetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, Ptr{Cint}),\n               sp, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPReset(petsclib::PetscLibType,sp::PetscDrawSP) \nClears scatter plot to allow for reuse with new data.\n\nNot Collective\n\nInput Parameter:\n- `sp` - the scatter plot context.\n\nLevel: intermediate\n\n-seealso: `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPAddPoint()`, `PetscDrawSPAddPoints()`, `PetscDrawSPDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPReset\"))\n\"\"\"\nfunction PetscDrawSPReset(petsclib::PetscLibType, sp::PetscDrawSP) end\n\n@for_petsc function PetscDrawSPReset(petsclib::$UnionPetscLib, sp::PetscDrawSP )\n\n    @chk ccall(\n               (:PetscDrawSPReset, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP,),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPDestroy(petsclib::PetscLibType,sp::PetscDrawSP) \nFrees all space taken up by scatter plot data structure.\n\nCollective\n\nInput Parameter:\n- `sp` - the scatter plot context\n\nLevel: intermediate\n\n-seealso: `PetscDrawSPCreate()`, `PetscDrawSP`, `PetscDrawSPReset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPDestroy\"))\n\"\"\"\nfunction PetscDrawSPDestroy(petsclib::PetscLibType, sp::PetscDrawSP) end\n\n@for_petsc function PetscDrawSPDestroy(petsclib::$UnionPetscLib, sp::PetscDrawSP )\n\n    @chk ccall(\n               (:PetscDrawSPDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDrawSP},),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPAddPoint(petsclib::PetscLibType,sp::PetscDrawSP, x::PetscReal, y::PetscReal) \nAdds another point to each of the scatter plot point curves.\n\nNot Collective\n\nInput Parameters:\n- `sp` - the scatter plot data structure\n- `x`  - the x coordinate values (of length dim) for the points of the curve\n- `y`  - the y coordinate values (of length dim) for the points of the curve\n\nLevel: intermediate\n\n-seealso: `PetscDrawSPAddPoints()`, `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPReset()`, `PetscDrawSPDraw()`, `PetscDrawSPAddPointColorized()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPAddPoint\"))\n\"\"\"\nfunction PetscDrawSPAddPoint(petsclib::PetscLibType, sp::PetscDrawSP, x::PetscReal, y::PetscReal) end\n\n@for_petsc function PetscDrawSPAddPoint(petsclib::$UnionPetscLib, sp::PetscDrawSP, x::$PetscReal, y::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawSPAddPoint, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               sp, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPAddPoints(petsclib::PetscLibType,sp::PetscDrawSP, n::Cint, xx::Vector{PetscReal}, yy::Vector{PetscReal}) \nAdds several points to each of the scatter plot point curves.\n\nNot Collective\n\nInput Parameters:\n- `sp` - the scatter plot context\n- `xx` - array of pointers that point to arrays containing the new x coordinates for each curve.\n- `yy` - array of pointers that point to arrays containing the new y points for each curve.\n- `n`  - number of points being added, each represents a subarray of length dim where dim is the value from `PetscDrawSPGetDimension()`\n\nLevel: intermediate\n\n-seealso: `PetscDrawSPAddPoint()`, `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPReset()`, `PetscDrawSPDraw()`, `PetscDrawSPAddPointColorized()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPAddPoints\"))\n\"\"\"\nfunction PetscDrawSPAddPoints(petsclib::PetscLibType, sp::PetscDrawSP, n::Cint, xx::Vector{PetscReal}, yy::Vector{PetscReal}) end\n\n@for_petsc function PetscDrawSPAddPoints(petsclib::$UnionPetscLib, sp::PetscDrawSP, n::Cint, xx::Vector{$PetscReal}, yy::Vector{$PetscReal} )\n\txx_ = Ref(pointer(xx))\n\tyy_ = Ref(pointer(yy))\n\n    @chk ccall(\n               (:PetscDrawSPAddPoints, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, Cint, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               sp, n, xx_, yy_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPAddPointColorized(petsclib::PetscLibType,sp::PetscDrawSP, x::PetscReal, y::PetscReal, z::PetscReal) \nAdds another point to each of the scatter plots as well as a numeric value to be used to colorize the scatter point.\n\nNot Collective\n\nInput Parameters:\n- `sp` - the scatter plot data structure\n- `x`  - array of length dim containing the new x coordinate values for each of the point curves.\n- `y`  - array of length dim containing the new y coordinate values for each of the point curves.\n- `z`  - array of length dim containing the numeric values that will be mapped to [0,255] and used for scatter point colors.\n\nLevel: intermediate\n\n-seealso: `PetscDrawSPAddPoints()`, `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPReset()`, `PetscDrawSPDraw()`, `PetscDrawSPAddPoint()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPAddPointColorized\"))\n\"\"\"\nfunction PetscDrawSPAddPointColorized(petsclib::PetscLibType, sp::PetscDrawSP, x::PetscReal, y::PetscReal, z::PetscReal) end\n\n@for_petsc function PetscDrawSPAddPointColorized(petsclib::$UnionPetscLib, sp::PetscDrawSP, x::$PetscReal, y::$PetscReal, z::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawSPAddPointColorized, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               sp, x, y, z,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPDraw(petsclib::PetscLibType,sp::PetscDrawSP, clear::PetscBool) \nRedraws a scatter plot.\n\nCollective\n\nInput Parameters:\n- `sp`    - the scatter plot context\n- `clear` - clear the window before drawing the new plot\n\nLevel: intermediate\n\n-seealso: `PetscDrawLGDraw()`, `PetscDrawLGSPDraw()`, `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPReset()`, `PetscDrawSPAddPoint()`, `PetscDrawSPAddPoints()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPDraw\"))\n\"\"\"\nfunction PetscDrawSPDraw(petsclib::PetscLibType, sp::PetscDrawSP, clear::PetscBool) end\n\n@for_petsc function PetscDrawSPDraw(petsclib::$UnionPetscLib, sp::PetscDrawSP, clear::PetscBool )\n\n    @chk ccall(\n               (:PetscDrawSPDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, PetscBool),\n               sp, clear,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPSave(petsclib::PetscLibType,sp::PetscDrawSP) \nSaves a drawn image\n\nCollective\n\nInput Parameter:\n- `sp` - the scatter plot context\n\nLevel: intermediate\n\n-seealso: `PetscDrawSPCreate()`, `PetscDrawSPGetDraw()`, `PetscDrawSetSave()`, `PetscDrawSave()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPSave\"))\n\"\"\"\nfunction PetscDrawSPSave(petsclib::PetscLibType, sp::PetscDrawSP) end\n\n@for_petsc function PetscDrawSPSave(petsclib::$UnionPetscLib, sp::PetscDrawSP )\n\n    @chk ccall(\n               (:PetscDrawSPSave, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP,),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPSetLimits(petsclib::PetscLibType,sp::PetscDrawSP, x_min::PetscReal, x_max::PetscReal, y_min::PetscReal, y_max::PetscReal) \nSets the axis limits for a scatter plot. If more points are added after this call, the limits will be adjusted to include those additional points.\n\nNot Collective\n\nInput Parameters:\n- `sp`    - the line graph context\n- `x_min` - the horizontal lower limit\n- `x_max` - the horizontal upper limit\n- `y_min` - the vertical lower limit\n- `y_max` - the vertical upper limit\n\nLevel: intermediate\n\n-seealso: `PetscDrawSP`, `PetscDrawAxis`, `PetscDrawSPCreate()`, `PetscDrawSPDraw()`, `PetscDrawSPAddPoint()`, `PetscDrawSPAddPoints()`, `PetscDrawSPGetAxis()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPSetLimits\"))\n\"\"\"\nfunction PetscDrawSPSetLimits(petsclib::PetscLibType, sp::PetscDrawSP, x_min::PetscReal, x_max::PetscReal, y_min::PetscReal, y_max::PetscReal) end\n\n@for_petsc function PetscDrawSPSetLimits(petsclib::$UnionPetscLib, sp::PetscDrawSP, x_min::$PetscReal, x_max::$PetscReal, y_min::$PetscReal, y_max::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawSPSetLimits, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               sp, x_min, x_max, y_min, y_max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPGetAxis(petsclib::PetscLibType,sp::PetscDrawSP, axis::PetscDrawAxis) \nGets the axis context associated with a scatter plot\n\nNot Collective\n\nInput Parameter:\n- `sp` - the scatter plot context\n\nOutput Parameter:\n- `axis` - the axis context\n\nLevel: intermediate\n\n-seealso: `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPDraw()`, `PetscDrawSPAddPoint()`, `PetscDrawSPAddPoints()`, `PetscDrawAxis`, `PetscDrawAxisCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPGetAxis\"))\n\"\"\"\nfunction PetscDrawSPGetAxis(petsclib::PetscLibType, sp::PetscDrawSP, axis::PetscDrawAxis) end\n\n@for_petsc function PetscDrawSPGetAxis(petsclib::$UnionPetscLib, sp::PetscDrawSP, axis::PetscDrawAxis )\n\n    @chk ccall(\n               (:PetscDrawSPGetAxis, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, Ptr{PetscDrawAxis}),\n               sp, axis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawSPGetDraw(petsclib::PetscLibType,sp::PetscDrawSP, draw::PetscDraw) \nGets the draw context associated with a scatter plot\n\nNot Collective\n\nInput Parameter:\n- `sp` - the scatter plot context\n\nOutput Parameter:\n- `draw` - the draw context\n\nLevel: intermediate\n\n-seealso: `PetscDrawSP`, `PetscDrawSPCreate()`, `PetscDrawSPDraw()`, `PetscDraw`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawSPGetDraw\"))\n\"\"\"\nfunction PetscDrawSPGetDraw(petsclib::PetscLibType, sp::PetscDrawSP, draw::PetscDraw) end\n\n@for_petsc function PetscDrawSPGetDraw(petsclib::$UnionPetscLib, sp::PetscDrawSP, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawSPGetDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawSP, Ptr{PetscDraw}),\n               sp, draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thist::PetscDrawHG = PetscDrawHGCreate(petsclib::PetscLibType,draw::PetscDraw, bins::Cint) \nCreates a histogram data structure.\n\nCollective\n\nInput Parameters:\n- `draw` - The window where the graph will be made\n- `bins` - The number of bins to use\n\nOutput Parameter:\n- `hist` - The histogram context\n\nLevel: intermediate\n\n-seealso: `PetscDrawHGDestroy()`, `PetscDrawHG`, `PetscDrawBarCreate()`, `PetscDrawBar`, `PetscDrawLGCreate()`, `PetscDrawLG`, `PetscDrawSPCreate()`, `PetscDrawSP`,\n`PetscDrawHGSetNumberBins()`, `PetscDrawHGReset()`, `PetscDrawHGAddValue()`, `PetscDrawHGDraw()`, `PetscDrawHGSave()`, `PetscDrawHGView()`, `PetscDrawHGSetColor()`,\n`PetscDrawHGSetLimits()`, `PetscDrawHGCalcStats()`, `PetscDrawHGIntegerBins()`, `PetscDrawHGGetAxis()`, `PetscDrawAxis`, `PetscDrawHGGetDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGCreate\"))\n\"\"\"\nfunction PetscDrawHGCreate(petsclib::PetscLibType, draw::PetscDraw, bins::Cint) end\n\n@for_petsc function PetscDrawHGCreate(petsclib::$UnionPetscLib, draw::PetscDraw, bins::Cint )\n\thist_ = Ref{PetscDrawHG}()\n\n    @chk ccall(\n               (:PetscDrawHGCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Cint, Ptr{PetscDrawHG}),\n               draw, bins, hist_,\n              )\n\n\thist = hist_[]\n\n\treturn hist\nend \n\n\"\"\"\n\tPetscDrawHGSetNumberBins(petsclib::PetscLibType,hist::PetscDrawHG, bins::Cint) \nChange the number of bins that are to be drawn in the histogram\n\nLogically Collective\n\nInput Parameters:\n- `hist` - The histogram context.\n- `bins` - The number of bins.\n\nLevel: intermediate\n\n-seealso: `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawHGDraw()`, `PetscDrawHGIntegerBins()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGSetNumberBins\"))\n\"\"\"\nfunction PetscDrawHGSetNumberBins(petsclib::PetscLibType, hist::PetscDrawHG, bins::Cint) end\n\n@for_petsc function PetscDrawHGSetNumberBins(petsclib::$UnionPetscLib, hist::PetscDrawHG, bins::Cint )\n\n    @chk ccall(\n               (:PetscDrawHGSetNumberBins, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, Cint),\n               hist, bins,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGReset(petsclib::PetscLibType,hist::PetscDrawHG) \nClears histogram to allow for reuse with new data.\n\nLogically Collective\n\nInput Parameter:\n- `hist` - The histogram context.\n\nLevel: intermediate\n\n-seealso: `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawHGDraw()`, `PetscDrawHGAddValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGReset\"))\n\"\"\"\nfunction PetscDrawHGReset(petsclib::PetscLibType, hist::PetscDrawHG) end\n\n@for_petsc function PetscDrawHGReset(petsclib::$UnionPetscLib, hist::PetscDrawHG )\n\n    @chk ccall(\n               (:PetscDrawHGReset, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG,),\n               hist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGDestroy(petsclib::PetscLibType,hist::PetscDrawHG) \nFrees all space taken up by histogram data structure.\n\nCollective\n\nInput Parameter:\n- `hist` - The histogram context\n\nLevel: intermediate\n\n-seealso: `PetscDrawHGCreate()`, `PetscDrawHG`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGDestroy\"))\n\"\"\"\nfunction PetscDrawHGDestroy(petsclib::PetscLibType, hist::PetscDrawHG) end\n\n@for_petsc function PetscDrawHGDestroy(petsclib::$UnionPetscLib, hist::PetscDrawHG )\n\n    @chk ccall(\n               (:PetscDrawHGDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDrawHG},),\n               hist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGAddValue(petsclib::PetscLibType,hist::PetscDrawHG, value::PetscReal) \nAdds another value to the histogram.\n\nLogically Collective\n\nInput Parameters:\n- `hist`  - The histogram\n- `value` - The value\n\nLevel: intermediate\n\n-seealso: `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawHGDraw()`, `PetscDrawHGReset()`, `PetscDrawHGAddWeightedValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGAddValue\"))\n\"\"\"\nfunction PetscDrawHGAddValue(petsclib::PetscLibType, hist::PetscDrawHG, value::PetscReal) end\n\n@for_petsc function PetscDrawHGAddValue(petsclib::$UnionPetscLib, hist::PetscDrawHG, value::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawHGAddValue, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, $PetscReal),\n               hist, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGAddWeightedValue(petsclib::PetscLibType,hist::PetscDrawHG, value::PetscReal, weight::PetscReal) \nAdds another value to the histogram with a weight.\n\nLogically Collective\n\nInput Parameters:\n- `hist`   - The histogram\n- `value`  - The value\n- `weight` - The value weight\n\nLevel: intermediate\n\n-seealso: `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawHGDraw()`, `PetscDrawHGReset()`, `PetscDrawHGAddValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGAddWeightedValue\"))\n\"\"\"\nfunction PetscDrawHGAddWeightedValue(petsclib::PetscLibType, hist::PetscDrawHG, value::PetscReal, weight::PetscReal) end\n\n@for_petsc function PetscDrawHGAddWeightedValue(petsclib::$UnionPetscLib, hist::PetscDrawHG, value::$PetscReal, weight::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawHGAddWeightedValue, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, $PetscReal, $PetscReal),\n               hist, value, weight,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGDraw(petsclib::PetscLibType,hist::PetscDrawHG) \nRedraws a histogram.\n\nCollective\n\nInput Parameter:\n- `hist` - The histogram context\n\nLevel: intermediate\n\n-seealso: `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawHGAddValue()`, `PetscDrawHGReset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGDraw\"))\n\"\"\"\nfunction PetscDrawHGDraw(petsclib::PetscLibType, hist::PetscDrawHG) end\n\n@for_petsc function PetscDrawHGDraw(petsclib::$UnionPetscLib, hist::PetscDrawHG )\n\n    @chk ccall(\n               (:PetscDrawHGDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG,),\n               hist,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGSave(petsclib::PetscLibType,hg::PetscDrawHG) \nSaves a drawn image\n\nCollective\n\nInput Parameter:\n- `hg` - The histogram context\n\nLevel: intermediate\n\n-seealso: `PetscDrawSave()`, `PetscDrawHGCreate()`, `PetscDrawHGGetDraw()`, `PetscDrawSetSave()`, `PetscDrawHGDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGSave\"))\n\"\"\"\nfunction PetscDrawHGSave(petsclib::PetscLibType, hg::PetscDrawHG) end\n\n@for_petsc function PetscDrawHGSave(petsclib::$UnionPetscLib, hg::PetscDrawHG )\n\n    @chk ccall(\n               (:PetscDrawHGSave, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG,),\n               hg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGView(petsclib::PetscLibType,hist::PetscDrawHG, viewer::PetscViewer) \nPrints the histogram information to a viewer\n\nNot Collective\n\nInput Parameters:\n- `hist`   - The histogram context\n- `viewer` - The viewer to view it with\n\nLevel: beginner\n\n-seealso: `PetscDrawHG`, `PetscViewer`, `PetscDrawHGCreate()`, `PetscDrawHGGetDraw()`, `PetscDrawSetSave()`, `PetscDrawSave()`, `PetscDrawHGDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGView\"))\n\"\"\"\nfunction PetscDrawHGView(petsclib::PetscLibType, hist::PetscDrawHG, viewer::PetscViewer) end\n\n@for_petsc function PetscDrawHGView(petsclib::$UnionPetscLib, hist::PetscDrawHG, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscDrawHGView, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, PetscViewer),\n               hist, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGSetColor(petsclib::PetscLibType,hist::PetscDrawHG, color::Cint) \nSets the color the bars will be drawn with.\n\nLogically Collective\n\nInput Parameters:\n- `hist`  - The histogram context\n- `color` - one of the colors defined in petscdraw.h or `PETSC_DRAW_ROTATE` to make each bar a different color\n\nLevel: intermediate\n\n-seealso: `PetscDrawHG`, `PetscDrawHGCreate()`, `PetscDrawHGGetDraw()`, `PetscDrawSetSave()`, `PetscDrawSave()`, `PetscDrawHGDraw()`, `PetscDrawHGGetAxis()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGSetColor\"))\n\"\"\"\nfunction PetscDrawHGSetColor(petsclib::PetscLibType, hist::PetscDrawHG, color::Cint) end\n\n@for_petsc function PetscDrawHGSetColor(petsclib::$UnionPetscLib, hist::PetscDrawHG, color::Cint )\n\n    @chk ccall(\n               (:PetscDrawHGSetColor, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, Cint),\n               hist, color,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGSetLimits(petsclib::PetscLibType,hist::PetscDrawHG, x_min::PetscReal, x_max::PetscReal, y_min::Cint, y_max::Cint) \nSets the axis limits for a histogram. If more\npoints are added after this call, the limits will be adjusted to\ninclude those additional points.\n\nLogically Collective\n\nInput Parameters:\n- `hist`  - The histogram context\n- `x_min` - the horizontal lower limit\n- `x_max` - the horizontal upper limit\n- `y_min` - the vertical lower limit\n- `y_max` - the vertical upper limit\n\nLevel: intermediate\n\n-seealso: `PetscDrawHG`, `PetscDrawHGCreate()`, `PetscDrawHGGetDraw()`, `PetscDrawSetSave()`, `PetscDrawSave()`, `PetscDrawHGDraw()`, `PetscDrawHGGetAxis()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGSetLimits\"))\n\"\"\"\nfunction PetscDrawHGSetLimits(petsclib::PetscLibType, hist::PetscDrawHG, x_min::PetscReal, x_max::PetscReal, y_min::Cint, y_max::Cint) end\n\n@for_petsc function PetscDrawHGSetLimits(petsclib::$UnionPetscLib, hist::PetscDrawHG, x_min::$PetscReal, x_max::$PetscReal, y_min::Cint, y_max::Cint )\n\n    @chk ccall(\n               (:PetscDrawHGSetLimits, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, $PetscReal, $PetscReal, Cint, Cint),\n               hist, x_min, x_max, y_min, y_max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGCalcStats(petsclib::PetscLibType,hist::PetscDrawHG, calc::PetscBool) \nTurns on calculation of descriptive statistics associated with the histogram\n\nNot Collective\n\nInput Parameters:\n- `hist` - The histogram context\n- `calc` - Flag for calculation\n\nLevel: intermediate\n\n-seealso: `PetscDrawHG`, `PetscDrawHGCreate()`, `PetscDrawHGAddValue()`, `PetscDrawHGView()`, `PetscDrawHGDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGCalcStats\"))\n\"\"\"\nfunction PetscDrawHGCalcStats(petsclib::PetscLibType, hist::PetscDrawHG, calc::PetscBool) end\n\n@for_petsc function PetscDrawHGCalcStats(petsclib::$UnionPetscLib, hist::PetscDrawHG, calc::PetscBool )\n\n    @chk ccall(\n               (:PetscDrawHGCalcStats, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, PetscBool),\n               hist, calc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGIntegerBins(petsclib::PetscLibType,hist::PetscDrawHG, ints::PetscBool) \nTurns on integer width bins\n\nNot Collective\n\nInput Parameters:\n- `hist` - The histogram context\n- `ints` - Flag for integer width bins\n\nLevel: intermediate\n\n-seealso: `PetscDrawHG`, `PetscDrawHGCreate()`, `PetscDrawHGAddValue()`, `PetscDrawHGView()`, `PetscDrawHGDraw()`, `PetscDrawHGSetColor()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGIntegerBins\"))\n\"\"\"\nfunction PetscDrawHGIntegerBins(petsclib::PetscLibType, hist::PetscDrawHG, ints::PetscBool) end\n\n@for_petsc function PetscDrawHGIntegerBins(petsclib::$UnionPetscLib, hist::PetscDrawHG, ints::PetscBool )\n\n    @chk ccall(\n               (:PetscDrawHGIntegerBins, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, PetscBool),\n               hist, ints,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGGetAxis(petsclib::PetscLibType,hist::PetscDrawHG, axis::PetscDrawAxis) \nGets the axis context associated with a histogram.\nThis is useful if one wants to change some axis property, such as\nlabels, color, etc. The axis context should not be destroyed by the\napplication code.\n\nNot Collective, axis is parallel if hist is parallel\n\nInput Parameter:\n- `hist` - The histogram context\n\nOutput Parameter:\n- `axis` - The axis context\n\nLevel: intermediate\n\n-seealso: `PetscDrawHG`, `PetscDrawAxis`, `PetscDrawHGCreate()`, `PetscDrawHGAddValue()`, `PetscDrawHGView()`, `PetscDrawHGDraw()`, `PetscDrawHGSetColor()`, `PetscDrawHGSetLimits()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGGetAxis\"))\n\"\"\"\nfunction PetscDrawHGGetAxis(petsclib::PetscLibType, hist::PetscDrawHG, axis::PetscDrawAxis) end\n\n@for_petsc function PetscDrawHGGetAxis(petsclib::$UnionPetscLib, hist::PetscDrawHG, axis::PetscDrawAxis )\n\n    @chk ccall(\n               (:PetscDrawHGGetAxis, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, Ptr{PetscDrawAxis}),\n               hist, axis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawHGGetDraw(petsclib::PetscLibType,hist::PetscDrawHG, draw::PetscDraw) \nGets the draw context associated with a histogram.\n\nNot Collective, draw is parallel if hist is parallel\n\nInput Parameter:\n- `hist` - The histogram context\n\nOutput Parameter:\n- `draw` - The draw context\n\nLevel: intermediate\n\n-seealso: `PetscDraw`, `PetscDrawHG`, `PetscDrawHGCreate()`, `PetscDrawHGAddValue()`, `PetscDrawHGView()`, `PetscDrawHGDraw()`, `PetscDrawHGSetColor()`, `PetscDrawAxis`, `PetscDrawHGSetLimits()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawHGGetDraw\"))\n\"\"\"\nfunction PetscDrawHGGetDraw(petsclib::PetscLibType, hist::PetscDrawHG, draw::PetscDraw) end\n\n@for_petsc function PetscDrawHGGetDraw(petsclib::$UnionPetscLib, hist::PetscDrawHG, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawHGGetDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawHG, Ptr{PetscDraw}),\n               hist, draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbar::PetscDrawBar = PetscDrawBarCreate(petsclib::PetscLibType,draw::PetscDraw) \nCreates a bar graph data structure.\n\nCollective\n\nInput Parameter:\n- `draw` - The window where the graph will be made\n\nOutput Parameter:\n- `bar` - The bar graph context\n\n-seealso: `PetscDrawBar`, `PetscDrawLGCreate()`, `PetscDrawLG`, `PetscDrawSPCreate()`, `PetscDrawSP`, `PetscDrawHGCreate()`, `PetscDrawHG`, `PetscDrawBarDestroy()`, `PetscDrawBarSetData()`,\n`PetscDrawBarDraw()`, `PetscDrawBarSave()`, `PetscDrawBarSetColor()`, `PetscDrawBarSort()`, `PetscDrawBarSetLimits()`, `PetscDrawBarGetAxis()`, `PetscDrawAxis`,\n`PetscDrawBarGetDraw()`, `PetscDrawBarSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarCreate\"))\n\"\"\"\nfunction PetscDrawBarCreate(petsclib::PetscLibType, draw::PetscDraw) end\n\n@for_petsc function PetscDrawBarCreate(petsclib::$UnionPetscLib, draw::PetscDraw )\n\tbar_ = Ref{PetscDrawBar}()\n\n    @chk ccall(\n               (:PetscDrawBarCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscDraw, Ptr{PetscDrawBar}),\n               draw, bar_,\n              )\n\n\tbar = bar_[]\n\n\treturn bar\nend \n\n\"\"\"\n\tPetscDrawBarSetData(petsclib::PetscLibType,bar::PetscDrawBar, bins::PetscInt, data::Vector{PetscReal}, labels::String) \nSet the data for a bar graph\n\nLogically Collective\n\nInput Parameters:\n- `bar`    - The bar graph context.\n- `bins`   - number of items\n- `data`   - values of each item\n- `labels` - optional label for each bar, `NULL` terminated array of strings\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDrawBarCreate()`, `PetscDrawBarDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarSetData\"))\n\"\"\"\nfunction PetscDrawBarSetData(petsclib::PetscLibType, bar::PetscDrawBar, bins::PetscInt, data::Vector{PetscReal}, labels::String) end\n\n@for_petsc function PetscDrawBarSetData(petsclib::$UnionPetscLib, bar::PetscDrawBar, bins::$PetscInt, data::Vector{$PetscReal}, labels::String )\n\tlabels_ = Ref(pointer(labels))\n\n    @chk ccall(\n               (:PetscDrawBarSetData, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar, $PetscInt, Ptr{$PetscReal}, Ptr{Ptr{Cchar}}),\n               bar, bins, data, labels_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarDestroy(petsclib::PetscLibType,bar::PetscDrawBar) \nFrees all space taken up by bar graph data structure.\n\nCollective\n\nInput Parameter:\n- `bar` - The bar graph context\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDrawBarCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarDestroy\"))\n\"\"\"\nfunction PetscDrawBarDestroy(petsclib::PetscLibType, bar::PetscDrawBar) end\n\n@for_petsc function PetscDrawBarDestroy(petsclib::$UnionPetscLib, bar::PetscDrawBar )\n\n    @chk ccall(\n               (:PetscDrawBarDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDrawBar},),\n               bar,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarDraw(petsclib::PetscLibType,bar::PetscDrawBar) \nRedraws a bar graph.\n\nCollective\n\nInput Parameter:\n- `bar` - The bar graph context\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDrawBarCreate()`, `PetscDrawBarSetData()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarDraw\"))\n\"\"\"\nfunction PetscDrawBarDraw(petsclib::PetscLibType, bar::PetscDrawBar) end\n\n@for_petsc function PetscDrawBarDraw(petsclib::$UnionPetscLib, bar::PetscDrawBar )\n\n    @chk ccall(\n               (:PetscDrawBarDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar,),\n               bar,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarSave(petsclib::PetscLibType,bar::PetscDrawBar) \nSaves a drawn bar graph\n\nCollective\n\nInput Parameter:\n- `bar` - The bar graph context\n\nLevel: intermediate\n\n-seealso: `PetscDrawSave()`, `PetscDrawBar`, `PetscDrawBarCreate()`, `PetscDrawBarGetDraw()`, `PetscDrawSetSave()`, `PetscDrawBarSetData()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarSave\"))\n\"\"\"\nfunction PetscDrawBarSave(petsclib::PetscLibType, bar::PetscDrawBar) end\n\n@for_petsc function PetscDrawBarSave(petsclib::$UnionPetscLib, bar::PetscDrawBar )\n\n    @chk ccall(\n               (:PetscDrawBarSave, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar,),\n               bar,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarSetColor(petsclib::PetscLibType,bar::PetscDrawBar, color::Cint) \nSets the color the bars will be drawn with.\n\nLogically Collective\n\nInput Parameters:\n- `bar`   - The bar graph context\n- `color` - one of the colors defined in petscdraw.h or `PETSC_DRAW_ROTATE` to make each bar a\ndifferent color\n\nLevel: intermediate\n\n-seealso: `PetscDrawBarCreate()`, `PetscDrawBar`, `PetscDrawBarSetData()`, `PetscDrawBarDraw()`, `PetscDrawBarGetAxis()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarSetColor\"))\n\"\"\"\nfunction PetscDrawBarSetColor(petsclib::PetscLibType, bar::PetscDrawBar, color::Cint) end\n\n@for_petsc function PetscDrawBarSetColor(petsclib::$UnionPetscLib, bar::PetscDrawBar, color::Cint )\n\n    @chk ccall(\n               (:PetscDrawBarSetColor, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar, Cint),\n               bar, color,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarSort(petsclib::PetscLibType,bar::PetscDrawBar, sort::PetscBool, tolerance::PetscReal) \nSorts the values before drawing the bar chart, the bars will be in ascending order from left to right\n\nLogically Collective\n\nInput Parameters:\n- `bar`       - The bar graph context\n- `sort`      - `PETSC_TRUE` to sort the values\n- `tolerance` - discard values less than tolerance\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDrawBarCreate()`, `PetscDrawBarSetData()`, `PetscDrawBarSetColor()`, `PetscDrawBarDraw()`, `PetscDrawBarGetAxis()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarSort\"))\n\"\"\"\nfunction PetscDrawBarSort(petsclib::PetscLibType, bar::PetscDrawBar, sort::PetscBool, tolerance::PetscReal) end\n\n@for_petsc function PetscDrawBarSort(petsclib::$UnionPetscLib, bar::PetscDrawBar, sort::PetscBool, tolerance::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawBarSort, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar, PetscBool, $PetscReal),\n               bar, sort, tolerance,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarSetLimits(petsclib::PetscLibType,bar::PetscDrawBar, y_min::PetscReal, y_max::PetscReal) \nSets the axis limits for a bar graph. If more\npoints are added after this call, the limits will be adjusted to\ninclude those additional points.\n\nLogically Collective\n\nInput Parameters:\n- `bar`   - The bar graph context\n- `y_min` - The lower limit\n- `y_max` - The upper limit\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDrawBarCreate()`, `PetscDrawBarGetAxis()`, `PetscDrawBarSetData()`, `PetscDrawBarDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarSetLimits\"))\n\"\"\"\nfunction PetscDrawBarSetLimits(petsclib::PetscLibType, bar::PetscDrawBar, y_min::PetscReal, y_max::PetscReal) end\n\n@for_petsc function PetscDrawBarSetLimits(petsclib::$UnionPetscLib, bar::PetscDrawBar, y_min::$PetscReal, y_max::$PetscReal )\n\n    @chk ccall(\n               (:PetscDrawBarSetLimits, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar, $PetscReal, $PetscReal),\n               bar, y_min, y_max,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarGetAxis(petsclib::PetscLibType,bar::PetscDrawBar, axis::PetscDrawAxis) \nGets the axis context associated with a bar graph.\nThis is useful if one wants to change some axis property, such as\nlabels, color, etc. The axis context should not be destroyed by the\napplication code.\n\nNot Collective, axis is parallel if bar is parallel\n\nInput Parameter:\n- `bar` - The bar graph context\n\nOutput Parameter:\n- `axis` - The axis context\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDrawBarCreate()`, `PetscDrawAxis`, `PetscDrawAxisCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarGetAxis\"))\n\"\"\"\nfunction PetscDrawBarGetAxis(petsclib::PetscLibType, bar::PetscDrawBar, axis::PetscDrawAxis) end\n\n@for_petsc function PetscDrawBarGetAxis(petsclib::$UnionPetscLib, bar::PetscDrawBar, axis::PetscDrawAxis )\n\n    @chk ccall(\n               (:PetscDrawBarGetAxis, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar, Ptr{PetscDrawAxis}),\n               bar, axis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarGetDraw(petsclib::PetscLibType,bar::PetscDrawBar, draw::PetscDraw) \nGets the draw context associated with a bar graph.\n\nNot Collective, draw is parallel if bar is parallel\n\nInput Parameter:\n- `bar` - The bar graph context\n\nOutput Parameter:\n- `draw` - The draw context\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDraw`, `PetscDrawBarCreate()`, `PetscDrawBarDraw()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarGetDraw\"))\n\"\"\"\nfunction PetscDrawBarGetDraw(petsclib::PetscLibType, bar::PetscDrawBar, draw::PetscDraw) end\n\n@for_petsc function PetscDrawBarGetDraw(petsclib::$UnionPetscLib, bar::PetscDrawBar, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscDrawBarGetDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar, Ptr{PetscDraw}),\n               bar, draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDrawBarSetFromOptions(petsclib::PetscLibType,bar::PetscDrawBar) \nSets options related to the display of the `PetscDrawBar`\n\nCollective\n\nInput Parameter:\n- `bar` - the bar graph context\n\nOptions Database Key:\n- `-bar_sort` - sort the entries before drawing the bar graph\n\nLevel: intermediate\n\n-seealso: `PetscDrawBar`, `PetscDrawBarDestroy()`, `PetscDrawBarCreate()`, `PetscDrawBarSort()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDrawBarSetFromOptions\"))\n\"\"\"\nfunction PetscDrawBarSetFromOptions(petsclib::PetscLibType, bar::PetscDrawBar) end\n\n@for_petsc function PetscDrawBarSetFromOptions(petsclib::$UnionPetscLib, bar::PetscDrawBar )\n\n    @chk ccall(\n               (:PetscDrawBarSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDrawBar,),\n               bar,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscDualSpace_wrappers.jl",
    "content": "\"\"\"\n\tPetscDualSpaceRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `PetscDualSpaceType`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceType`, `PetscDualSpaceRegisterAll()`, `PetscDualSpaceRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceRegister\"))\n\"\"\"\nfunction PetscDualSpaceRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscDualSpaceRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscDualSpaceRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSetType(petsclib::PetscLibType,sp::PetscDualSpace, name::PetscDualSpaceType) \nBuilds a particular `PetscDualSpace` based on its `PetscDualSpaceType`\n\nCollective\n\nInput Parameters:\n- `sp`   - The `PetscDualSpace` object\n- `name` - The kind of space\n\nOptions Database Key:\n- `-petscdualspace_type <type>` - Sets the PetscDualSpace type; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceType`, `PetscDualSpaceGetType()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSetType\"))\n\"\"\"\nfunction PetscDualSpaceSetType(petsclib::PetscLibType, sp::PetscDualSpace, name::PetscDualSpaceType) end\n\n@for_petsc function PetscDualSpaceSetType(petsclib::$UnionPetscLib, sp::PetscDualSpace, name::PetscDualSpaceType )\n\n    @chk ccall(\n               (:PetscDualSpaceSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscDualSpaceType),\n               sp, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscDualSpaceType = PetscDualSpaceGetType(petsclib::PetscLibType,sp::PetscDualSpace) \nGets the `PetscDualSpaceType` name (as a string) from the object.\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `name` - The `PetscDualSpaceType` name\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceType`, `PetscDualSpaceSetType()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetType\"))\n\"\"\"\nfunction PetscDualSpaceGetType(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetType(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tname_ = Ref{PetscDualSpaceType}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscDualSpaceType}),\n               sp, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\tPetscDualSpaceViewFromOptions(petsclib::PetscLibType,A::PetscDualSpace, obj::PetscObject, name::String) \nView a `PetscDualSpace` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscDualSpace` object\n- `obj`  - Optional object, provides the options prefix\n- `name` - command line option name\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceView()`, `PetscObjectViewFromOptions()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceViewFromOptions\"))\n\"\"\"\nfunction PetscDualSpaceViewFromOptions(petsclib::PetscLibType, A::PetscDualSpace, obj::PetscObject, name::String) end\n\n@for_petsc function PetscDualSpaceViewFromOptions(petsclib::$UnionPetscLib, A::PetscDualSpace, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscDualSpaceViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceView(petsclib::PetscLibType,sp::PetscDualSpace, v::PetscViewer) \nViews a `PetscDualSpace`\n\nCollective\n\nInput Parameters:\n- `sp` - the `PetscDualSpace` object to view\n- `v`  - the viewer\n\nLevel: beginner\n\n-seealso: `PetscViewer`, `PetscDualSpaceDestroy()`, `PetscDualSpace`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceView\"))\n\"\"\"\nfunction PetscDualSpaceView(petsclib::PetscLibType, sp::PetscDualSpace, v::PetscViewer) end\n\n@for_petsc function PetscDualSpaceView(petsclib::$UnionPetscLib, sp::PetscDualSpace, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscDualSpaceView, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscViewer),\n               sp, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSetFromOptions(petsclib::PetscLibType,sp::PetscDualSpace) \nsets parameters in a `PetscDualSpace` from the options database\n\nCollective\n\nInput Parameter:\n- `sp` - the `PetscDualSpace` object to set options for\n\nOptions Database Keys:\n- `-petscdualspace_order <order>`                 - the approximation order of the space\n- `-petscdualspace_form_degree <deg>`             - the form degree, say 0 for point evaluations, or 2 for area integrals\n- `-petscdualspace_components <c>`                - the number of components, say d for a vector field\n- `-petscdualspace_refcell <celltype>`            - Reference cell type name\n- `-petscdualspace_lagrange_continuity`           - Flag for continuous element\n- `-petscdualspace_lagrange_tensor`               - Flag for tensor dual space\n- `-petscdualspace_lagrange_trimmed`              - Flag for trimmed dual space\n- `-petscdualspace_lagrange_node_type <nodetype>` - Lagrange node location type\n- `-petscdualspace_lagrange_node_endpoints`       - Flag for nodes that include endpoints\n- `-petscdualspace_lagrange_node_exponent`        - Gauss-Jacobi weight function exponent\n- `-petscdualspace_lagrange_use_moments`          - Use moments (where appropriate) for functionals\n- `-petscdualspace_lagrange_moment_order <order>` - Quadrature order for moment functionals\n\nLevel: intermediate\n\n-seealso: `PetscDualSpaceView()`, `PetscDualSpace`, `PetscObjectSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSetFromOptions\"))\n\"\"\"\nfunction PetscDualSpaceSetFromOptions(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceSetFromOptions(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscDualSpaceSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace,),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSetUp(petsclib::PetscLibType,sp::PetscDualSpace) \nConstruct a basis for a `PetscDualSpace`\n\nCollective\n\nInput Parameter:\n- `sp` - the `PetscDualSpace` object to setup\n\nLevel: intermediate\n\n-seealso: `PetscDualSpaceView()`, `PetscDualSpaceDestroy()`, `PetscDualSpace`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSetUp\"))\n\"\"\"\nfunction PetscDualSpaceSetUp(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceSetUp(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscDualSpaceSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace,),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceDestroy(petsclib::PetscLibType,sp::PetscDualSpace) \nDestroys a `PetscDualSpace` object\n\nCollective\n\nInput Parameter:\n- `sp` - the `PetscDualSpace` object to destroy\n\nLevel: beginner\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceView()`, `PetscDualSpace()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceDestroy\"))\n\"\"\"\nfunction PetscDualSpaceDestroy(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceDestroy(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscDualSpaceDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDualSpace},),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsp::PetscDualSpace = PetscDualSpaceCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscDualSpace` object. The type can then be set with `PetscDualSpaceSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscDualSpace` object\n\nOutput Parameter:\n- `sp` - The `PetscDualSpace` object\n\nLevel: beginner\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceSetType()`, `PETSCDUALSPACELAGRANGE`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceCreate\"))\n\"\"\"\nfunction PetscDualSpaceCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscDualSpaceCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tsp_ = Ref{PetscDualSpace}()\n\n    @chk ccall(\n               (:PetscDualSpaceCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscDualSpace}),\n               comm, sp_,\n              )\n\n\tsp = sp_[]\n\n\treturn sp\nend \n\n\"\"\"\n\tspNew::PetscDualSpace = PetscDualSpaceDuplicate(petsclib::PetscLibType,sp::PetscDualSpace) \nCreates a duplicate `PetscDualSpace` object that is not setup.\n\nCollective\n\nInput Parameter:\n- `sp` - The original `PetscDualSpace`\n\nOutput Parameter:\n- `spNew` - The duplicate `PetscDualSpace`\n\nLevel: beginner\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`, `PetscDualSpaceSetType()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceDuplicate\"))\n\"\"\"\nfunction PetscDualSpaceDuplicate(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceDuplicate(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tspNew_ = Ref{PetscDualSpace}()\n\n    @chk ccall(\n               (:PetscDualSpaceDuplicate, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscDualSpace}),\n               sp, spNew_,\n              )\n\n\tspNew = spNew_[]\n\n\treturn spNew\nend \n\n\"\"\"\n\tPetscDualSpaceGetDM(petsclib::PetscLibType,sp::PetscDualSpace, dm::PetscDM) \nGet the `DM` representing the reference cell of a `PetscDualSpace`\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `dm` - The reference cell, that is a `DM` that consists of a single cell\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceSetDM()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetDM\"))\n\"\"\"\nfunction PetscDualSpaceGetDM(petsclib::PetscLibType, sp::PetscDualSpace, dm::PetscDM) end\n\n@for_petsc function PetscDualSpaceGetDM(petsclib::$UnionPetscLib, sp::PetscDualSpace, dm::PetscDM )\n\tdm_ = Ref(dm.ptr)\n\n    @chk ccall(\n               (:PetscDualSpaceGetDM, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{CDM}),\n               sp, dm_,\n              )\n\n\tdm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSetDM(petsclib::PetscLibType,sp::PetscDualSpace, dm::PetscDM) \nGet the `DM` representing the reference cell\n\nNot Collective\n\nInput Parameters:\n- `sp` - The `PetscDual`Space\n- `dm` - The reference cell\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `DM`, `PetscDualSpaceGetDM()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSetDM\"))\n\"\"\"\nfunction PetscDualSpaceSetDM(petsclib::PetscLibType, sp::PetscDualSpace, dm::PetscDM) end\n\n@for_petsc function PetscDualSpaceSetDM(petsclib::$UnionPetscLib, sp::PetscDualSpace, dm::PetscDM )\n\n    @chk ccall(\n               (:PetscDualSpaceSetDM, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, CDM),\n               sp, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\torder::PetscInt = PetscDualSpaceGetOrder(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the order of the dual space\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `order` - The order\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceSetOrder()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetOrder\"))\n\"\"\"\nfunction PetscDualSpaceGetOrder(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetOrder(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\torder_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               sp, order_,\n              )\n\n\torder = order_[]\n\n\treturn order\nend \n\n\"\"\"\n\tPetscDualSpaceSetOrder(petsclib::PetscLibType,sp::PetscDualSpace, order::PetscInt) \nSet the order of the dual space\n\nNot Collective\n\nInput Parameters:\n- `sp`    - The `PetscDualSpace`\n- `order` - The order\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceGetOrder()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSetOrder\"))\n\"\"\"\nfunction PetscDualSpaceSetOrder(petsclib::PetscLibType, sp::PetscDualSpace, order::PetscInt) end\n\n@for_petsc function PetscDualSpaceSetOrder(petsclib::$UnionPetscLib, sp::PetscDualSpace, order::$PetscInt )\n\n    @chk ccall(\n               (:PetscDualSpaceSetOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt),\n               sp, order,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNc::PetscInt = PetscDualSpaceGetNumComponents(petsclib::PetscLibType,sp::PetscDualSpace) \nReturn the number of components for this space\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `Nc` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscDualSpaceSetNumComponents()`, `PetscDualSpaceGetDimension()`, `PetscDualSpaceCreate()`, `PetscDualSpace`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetNumComponents\"))\n\"\"\"\nfunction PetscDualSpaceGetNumComponents(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetNumComponents(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tNc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               sp, Nc_,\n              )\n\n\tNc = Nc_[]\n\n\treturn Nc\nend \n\n\"\"\"\n\tPetscDualSpaceSetNumComponents(petsclib::PetscLibType,sp::PetscDualSpace, Nc::PetscInt) \nSet the number of components for this space\n\nInput Parameters:\n- `sp` - The `PetscDualSpace`\n- `Nc` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscDualSpaceGetNumComponents()`, `PetscDualSpaceCreate()`, `PetscDualSpace`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSetNumComponents\"))\n\"\"\"\nfunction PetscDualSpaceSetNumComponents(petsclib::PetscLibType, sp::PetscDualSpace, Nc::PetscInt) end\n\n@for_petsc function PetscDualSpaceSetNumComponents(petsclib::$UnionPetscLib, sp::PetscDualSpace, Nc::$PetscInt )\n\n    @chk ccall(\n               (:PetscDualSpaceSetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt),\n               sp, Nc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceGetFunctional(petsclib::PetscLibType,sp::PetscDualSpace, i::PetscInt, fncal::PetscQuadrature) \nGet the i\n\nNot Collective\n\nInput Parameters:\n- `sp` - The `PetscDualSpace`\n- `i`  - The basis number\n\nOutput Parameter:\n- `functional` - The basis functional\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscQuadrature`, `PetscDualSpaceGetDimension()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetFunctional\"))\n\"\"\"\nfunction PetscDualSpaceGetFunctional(petsclib::PetscLibType, sp::PetscDualSpace, i::PetscInt, fncal::PetscQuadrature) end\n\n@for_petsc function PetscDualSpaceGetFunctional(petsclib::$UnionPetscLib, sp::PetscDualSpace, i::$PetscInt, fncal::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscDualSpaceGetFunctional, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, Ptr{PetscQuadrature}),\n               sp, i, fncal,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt = PetscDualSpaceGetDimension(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the dimension of the dual space, i.e. the number of basis functionals\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `dim` - The dimension\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceGetFunctional()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetDimension\"))\n\"\"\"\nfunction PetscDualSpaceGetDimension(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetDimension(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               sp, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tintdim::PetscInt = PetscDualSpaceGetInteriorDimension(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the interior dimension of the dual space, i.e. the number of basis functionals assigned to the interior of the reference domain\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `intdim` - The dimension\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceGetFunctional()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetInteriorDimension\"))\n\"\"\"\nfunction PetscDualSpaceGetInteriorDimension(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetInteriorDimension(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tintdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetInteriorDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               sp, intdim_,\n              )\n\n\tintdim = intdim_[]\n\n\treturn intdim\nend \n\n\"\"\"\n\tuniform::PetscBool = PetscDualSpaceGetUniform(petsclib::PetscLibType,sp::PetscDualSpace) \nWhether this dual space is uniform\n\nNot Collective\n\nInput Parameter:\n- `sp` - A dual space\n\nOutput Parameter:\n- `uniform` - `PETSC_TRUE` if (a) the dual space is the same for each point in a stratum of the reference `DMPLEX`, and\n(b) every symmetry of each point in the reference `DMPLEX` is also a symmetry of the point's dual space.\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceGetPointSubspace()`, `PetscDualSpaceGetSymmetries()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetUniform\"))\n\"\"\"\nfunction PetscDualSpaceGetUniform(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetUniform(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tuniform_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetUniform, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscBool}),\n               sp, uniform_,\n              )\n\n\tuniform = uniform_[]\n\n\treturn uniform\nend \n\n\"\"\"\n\tnumDof::Vector{PetscInt} = PetscDualSpaceGetNumDof(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the number of degrees of freedom for each spatial (topological) dimension\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `numDof` - An array of length dim+1 which holds the number of dofs for each dimension\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceGetFunctional()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetNumDof\"))\n\"\"\"\nfunction PetscDualSpaceGetNumDof(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetNumDof(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tnumDof_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetNumDof, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{Ptr{$PetscInt}}),\n               sp, numDof_,\n              )\n\n\tnumDof = unsafe_wrap(Array, numDof_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numDof\nend \n\n\"\"\"\n\tPetscDualSpaceGetSection(petsclib::PetscLibType,sp::PetscDualSpace, section::PetscSection) \nCreate a `PetscSection` over the reference cell with the layout from this space\n\nCollective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `section` - The section\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscSection`, `PetscDualSpaceCreate()`, `DMPLEX`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetSection\"))\n\"\"\"\nfunction PetscDualSpaceGetSection(petsclib::PetscLibType, sp::PetscDualSpace, section::PetscSection) end\n\n@for_petsc function PetscDualSpaceGetSection(petsclib::$UnionPetscLib, sp::PetscDualSpace, section::PetscSection )\n\n    @chk ccall(\n               (:PetscDualSpaceGetSection, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscSection}),\n               sp, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceGetInteriorSection(petsclib::PetscLibType,sp::PetscDualSpace, section::PetscSection) \nCreate a `PetscSection` over the reference cell with the layout from this space\nfor interior degrees of freedom\n\nCollective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `section` - The interior section\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscSection`, `PetscDualSpaceCreate()`, `DMPLEX`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetInteriorSection\"))\n\"\"\"\nfunction PetscDualSpaceGetInteriorSection(petsclib::PetscLibType, sp::PetscDualSpace, section::PetscSection) end\n\n@for_petsc function PetscDualSpaceGetInteriorSection(petsclib::$UnionPetscLib, sp::PetscDualSpace, section::PetscSection )\n\n    @chk ccall(\n               (:PetscDualSpaceGetInteriorSection, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscSection}),\n               sp, section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalue::PetscScalar = PetscDualSpaceApply(petsclib::PetscLibType,sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::PetscFEGeom, numComp::PetscInt, func::external, ctx::Cvoid) \nApply a functional from the dual space basis to an input function\n\nInput Parameters:\n- `sp`      - The `PetscDualSpace` object\n- `f`       - The basis functional index\n- `time`    - The time\n- `cgeom`   - A context with geometric information for this cell, we use v0 (the initial vertex) and J (the Jacobian) (or evaluated at the coordinates of the functional)\n- `numComp` - The number of components for the function\n- `func`    - The input function\n- `ctx`     - A context for the function\n\nOutput Parameter:\n- `value` - numComp output values\n\nCalling sequence:\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceApply\"))\n\"\"\"\nfunction PetscDualSpaceApply(petsclib::PetscLibType, sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::PetscFEGeom, numComp::PetscInt, func::external, ctx::Cvoid) end\n\n@for_petsc function PetscDualSpaceApply(petsclib::$UnionPetscLib, sp::PetscDualSpace, f::$PetscInt, time::$PetscReal, cgeom::PetscFEGeom, numComp::$PetscInt, func::external, ctx::Cvoid )\n\tvalue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceApply, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, $PetscReal, Ptr{PetscFEGeom}, $PetscInt, external, Ptr{Cvoid}, Ptr{$PetscScalar}),\n               sp, f, time, cgeom, numComp, func, ctx, value_,\n              )\n\n\tvalue = value_[]\n\n\treturn value\nend \n\n\"\"\"\n\tspValue::PetscScalar = PetscDualSpaceApplyAll(petsclib::PetscLibType,sp::PetscDualSpace, pointEval::PetscScalar) \nApply all functionals from the dual space basis to the result of an evaluation at the points returned by `PetscDualSpaceGetAllData()`\n\nInput Parameters:\n- `sp`        - The `PetscDualSpace` object\n- `pointEval` - Evaluation at the points returned by `PetscDualSpaceGetAllData()`\n\nOutput Parameter:\n- `spValue` - The values of all dual space functionals\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceApplyAll\"))\n\"\"\"\nfunction PetscDualSpaceApplyAll(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::PetscScalar) end\n\n@for_petsc function PetscDualSpaceApplyAll(petsclib::$UnionPetscLib, sp::PetscDualSpace, pointEval::$PetscScalar )\n\tspValue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceApplyAll, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               sp, pointEval, spValue_,\n              )\n\n\tspValue = spValue_[]\n\n\treturn spValue\nend \n\n\"\"\"\n\tspValue::PetscScalar = PetscDualSpaceApplyInterior(petsclib::PetscLibType,sp::PetscDualSpace, pointEval::PetscScalar) \nApply interior functionals from the dual space basis to the result of an evaluation at the points returned by `PetscDualSpaceGetInteriorData()`\n\nInput Parameters:\n- `sp`        - The `PetscDualSpace` object\n- `pointEval` - Evaluation at the points returned by `PetscDualSpaceGetInteriorData()`\n\nOutput Parameter:\n- `spValue` - The values of interior dual space functionals\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceApplyInterior\"))\n\"\"\"\nfunction PetscDualSpaceApplyInterior(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::PetscScalar) end\n\n@for_petsc function PetscDualSpaceApplyInterior(petsclib::$UnionPetscLib, sp::PetscDualSpace, pointEval::$PetscScalar )\n\tspValue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceApplyInterior, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               sp, pointEval, spValue_,\n              )\n\n\tspValue = spValue_[]\n\n\treturn spValue\nend \n\n\"\"\"\n\tvalue::PetscScalar = PetscDualSpaceApplyDefault(petsclib::PetscLibType,sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::PetscFEGeom, Nc::PetscInt, func::external, ctx::Cvoid) \nApply a functional from the dual space basis to an input function by assuming a point evaluation functional.\n\nInput Parameters:\n- `sp`    - The `PetscDualSpace` object\n- `f`     - The basis functional index\n- `time`  - The time\n- `cgeom` - A context with geometric information for this cell, we use v0 (the initial vertex) and J (the Jacobian)\n- `Nc`    - The number of components for the function\n- `func`  - The input function\n- `ctx`   - A context for the function\n\nOutput Parameter:\n- `value` - The output value\n\nCalling sequence:\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceApplyDefault\"))\n\"\"\"\nfunction PetscDualSpaceApplyDefault(petsclib::PetscLibType, sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::PetscFEGeom, Nc::PetscInt, func::external, ctx::Cvoid) end\n\n@for_petsc function PetscDualSpaceApplyDefault(petsclib::$UnionPetscLib, sp::PetscDualSpace, f::$PetscInt, time::$PetscReal, cgeom::PetscFEGeom, Nc::$PetscInt, func::external, ctx::Cvoid )\n\tvalue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceApplyDefault, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, $PetscReal, Ptr{PetscFEGeom}, $PetscInt, external, Ptr{Cvoid}, Ptr{$PetscScalar}),\n               sp, f, time, cgeom, Nc, func, ctx, value_,\n              )\n\n\tvalue = value_[]\n\n\treturn value\nend \n\n\"\"\"\n\tspValue::PetscScalar = PetscDualSpaceApplyAllDefault(petsclib::PetscLibType,sp::PetscDualSpace, pointEval::PetscScalar) \nApply all functionals from the dual space basis to the result of an evaluation at the points returned by `PetscDualSpaceGetAllData()`\n\nInput Parameters:\n- `sp`        - The `PetscDualSpace` object\n- `pointEval` - Evaluation at the points returned by `PetscDualSpaceGetAllData()`\n\nOutput Parameter:\n- `spValue` - The values of all dual space functionals\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceApplyAllDefault\"))\n\"\"\"\nfunction PetscDualSpaceApplyAllDefault(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::PetscScalar) end\n\n@for_petsc function PetscDualSpaceApplyAllDefault(petsclib::$UnionPetscLib, sp::PetscDualSpace, pointEval::$PetscScalar )\n\tspValue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceApplyAllDefault, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               sp, pointEval, spValue_,\n              )\n\n\tspValue = spValue_[]\n\n\treturn spValue\nend \n\n\"\"\"\n\tspValue::PetscScalar = PetscDualSpaceApplyInteriorDefault(petsclib::PetscLibType,sp::PetscDualSpace, pointEval::PetscScalar) \nApply interior functionals from the dual space basis to the result of an evaluation at the points returned by `PetscDualSpaceGetInteriorData()`\n\nInput Parameters:\n- `sp`        - The `PetscDualSpace` object\n- `pointEval` - Evaluation at the points returned by `PetscDualSpaceGetInteriorData()`\n\nOutput Parameter:\n- `spValue` - The values of interior dual space functionals\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceApplyInteriorDefault\"))\n\"\"\"\nfunction PetscDualSpaceApplyInteriorDefault(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::PetscScalar) end\n\n@for_petsc function PetscDualSpaceApplyInteriorDefault(petsclib::$UnionPetscLib, sp::PetscDualSpace, pointEval::$PetscScalar )\n\tspValue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceApplyInteriorDefault, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               sp, pointEval, spValue_,\n              )\n\n\tspValue = spValue_[]\n\n\treturn spValue\nend \n\n\"\"\"\n\tPetscDualSpaceGetAllData(petsclib::PetscLibType,sp::PetscDualSpace, allNodes::PetscQuadrature, allMat::PetscMat) \nGet all quadrature nodes from this space, and the matrix that sends quadrature node values to degree\n\nInput Parameter:\n- `sp` - The dualspace\n\nOutput Parameters:\n- `allNodes` - A `PetscQuadrature` object containing all evaluation nodes, pass `NULL` if not needed\n- `allMat`   - A `Mat` for the node-to-dof transformation, pass `NULL` if not needed\n\nLevel: advanced\n\n-seealso: `PetscQuadrature`, `PetscDualSpace`, `PetscDualSpaceCreate()`, `Mat`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetAllData\"))\n\"\"\"\nfunction PetscDualSpaceGetAllData(petsclib::PetscLibType, sp::PetscDualSpace, allNodes::PetscQuadrature, allMat::PetscMat) end\n\n@for_petsc function PetscDualSpaceGetAllData(petsclib::$UnionPetscLib, sp::PetscDualSpace, allNodes::PetscQuadrature, allMat::PetscMat )\n\tallMat_ = Ref(allMat.ptr)\n\n    @chk ccall(\n               (:PetscDualSpaceGetAllData, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscQuadrature}, Ptr{CMat}),\n               sp, allNodes, allMat_,\n              )\n\n\tallMat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tallNodes::PetscQuadrature,allMat::PetscMat = PetscDualSpaceCreateAllDataDefault(petsclib::PetscLibType,sp::PetscDualSpace) \nCreate all evaluation nodes and the node\n\nInput Parameter:\n- `sp` - The dualspace\n\nOutput Parameters:\n- `allNodes` - A `PetscQuadrature` object containing all evaluation nodes\n- `allMat`   - A `Mat` for the node-to-dof transformation\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`, `Mat`, `PetscQuadrature`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceCreateAllDataDefault\"))\n\"\"\"\nfunction PetscDualSpaceCreateAllDataDefault(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceCreateAllDataDefault(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tallNodes_ = Ref{PetscQuadrature}()\n\tallMat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:PetscDualSpaceCreateAllDataDefault, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscQuadrature}, Ptr{CMat}),\n               sp, allNodes_, allMat_,\n              )\n\n\tallNodes = allNodes_[]\n\tallMat = PetscMat(allMat_[], petsclib)\n\n\treturn allNodes,allMat\nend \n\n\"\"\"\n\tPetscDualSpaceGetInteriorData(petsclib::PetscLibType,sp::PetscDualSpace, intNodes::PetscQuadrature, intMat::PetscMat) \nGet all quadrature points necessary to compute the interior degrees of freedom from\nthis space, as well as the matrix that computes the degrees of freedom from the quadrature\nvalues.\n\nInput Parameter:\n- `sp` - The dualspace\n\nOutput Parameters:\n- `intNodes` - A `PetscQuadrature` object containing all evaluation points needed to evaluate interior degrees of freedom,\npass `NULL` if not needed\n- `intMat`   - A matrix that computes dual space values from point values: size [spdim0 x (npoints * nc)], where spdim0 is\nthe size of the constrained layout (`PetscSectionGetConstrainStorageSize()`) of the dual space section,\nnpoints is the number of points in intNodes and nc is `PetscDualSpaceGetNumComponents()`.\nPass `NULL` if not needed\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscQuadrature`, `Mat`, `PetscDualSpaceCreate()`, `PetscDualSpaceGetDimension()`, `PetscDualSpaceGetNumComponents()`, `PetscQuadratureGetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetInteriorData\"))\n\"\"\"\nfunction PetscDualSpaceGetInteriorData(petsclib::PetscLibType, sp::PetscDualSpace, intNodes::PetscQuadrature, intMat::PetscMat) end\n\n@for_petsc function PetscDualSpaceGetInteriorData(petsclib::$UnionPetscLib, sp::PetscDualSpace, intNodes::PetscQuadrature, intMat::PetscMat )\n\tintMat_ = Ref(intMat.ptr)\n\n    @chk ccall(\n               (:PetscDualSpaceGetInteriorData, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscQuadrature}, Ptr{CMat}),\n               sp, intNodes, intMat_,\n              )\n\n\tintMat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tintNodes::PetscQuadrature,intMat::PetscMat = PetscDualSpaceCreateInteriorDataDefault(petsclib::PetscLibType,sp::PetscDualSpace) \nCreate quadrature points by examining interior functionals and create the matrix mapping quadrature point values to interior dual space values\n\nInput Parameter:\n- `sp` - The dualspace\n\nOutput Parameters:\n- `intNodes` - A `PetscQuadrature` object containing all evaluation points needed to evaluate interior degrees of freedom\n- `intMat`   - A matrix that computes dual space values from point values: size [spdim0 x (npoints * nc)], where spdim0 is\nthe size of the constrained layout (`PetscSectionGetConstrainStorageSize()`) of the dual space section,\nnpoints is the number of points in allNodes and nc is `PetscDualSpaceGetNumComponents()`.\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscQuadrature`, `Mat`, `PetscDualSpaceCreate()`, `PetscDualSpaceGetInteriorData()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceCreateInteriorDataDefault\"))\n\"\"\"\nfunction PetscDualSpaceCreateInteriorDataDefault(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceCreateInteriorDataDefault(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tintNodes_ = Ref{PetscQuadrature}()\n\tintMat_ = Ref{CMat}()\n\n    @chk ccall(\n               (:PetscDualSpaceCreateInteriorDataDefault, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscQuadrature}, Ptr{CMat}),\n               sp, intNodes_, intMat_,\n              )\n\n\tintNodes = intNodes_[]\n\tintMat = PetscMat(intMat_[], petsclib)\n\n\treturn intNodes,intMat\nend \n\n\"\"\"\n\tequal::PetscBool = PetscDualSpaceEqual(petsclib::PetscLibType,A::PetscDualSpace, B::PetscDualSpace) \nDetermine if two dual spaces are equivalent\n\nInput Parameters:\n- `A` - A `PetscDualSpace` object\n- `B` - Another `PetscDualSpace` object\n\nOutput Parameter:\n- `equal` - `PETSC_TRUE` if the dual spaces are equivalent\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceEqual\"))\n\"\"\"\nfunction PetscDualSpaceEqual(petsclib::PetscLibType, A::PetscDualSpace, B::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceEqual(petsclib::$UnionPetscLib, A::PetscDualSpace, B::PetscDualSpace )\n\tequal_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceEqual, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscDualSpace, Ptr{PetscBool}),\n               A, B, equal_,\n              )\n\n\tequal = equal_[]\n\n\treturn equal\nend \n\n\"\"\"\n\tvalue::PetscScalar = PetscDualSpaceApplyFVM(petsclib::PetscLibType,sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::PetscFVCellGeom, Nc::PetscInt, func::external, ctx::Cvoid) \nApply a functional from the dual space basis to an input function by assuming a point evaluation functional at the cell centroid.\n\nInput Parameters:\n- `sp`    - The `PetscDualSpace` object\n- `f`     - The basis functional index\n- `time`  - The time\n- `cgeom` - A context with geometric information for this cell, we currently just use the centroid\n- `Nc`    - The number of components for the function\n- `func`  - The input function\n- `ctx`   - A context for the function\n\nOutput Parameter:\n- `value` - The output value (scalar)\n\nCalling sequence:\n-seealso: `PetscDualSpace`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceApplyFVM\"))\n\"\"\"\nfunction PetscDualSpaceApplyFVM(petsclib::PetscLibType, sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::PetscFVCellGeom, Nc::PetscInt, func::external, ctx::Cvoid) end\n\n@for_petsc function PetscDualSpaceApplyFVM(petsclib::$UnionPetscLib, sp::PetscDualSpace, f::$PetscInt, time::$PetscReal, cgeom::PetscFVCellGeom, Nc::$PetscInt, func::external, ctx::Cvoid )\n\tvalue_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceApplyFVM, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, $PetscReal, Ptr{PetscFVCellGeom}, $PetscInt, external, Ptr{Cvoid}, Ptr{$PetscScalar}),\n               sp, f, time, cgeom, Nc, func, ctx, value_,\n              )\n\n\tvalue = value_[]\n\n\treturn value\nend \n\n\"\"\"\n\tPetscDualSpaceGetHeightSubspace(petsclib::PetscLibType,sp::PetscDualSpace, height::PetscInt, subsp::PetscDualSpace) \nGet the subset of the dual space basis that is supported on a mesh point of a\ngiven height.  This assumes that the reference cell is symmetric over points of this height.\n\nNot Collective\n\nInput Parameters:\n- `sp`     - the `PetscDualSpace` object\n- `height` - the height of the mesh point for which the subspace is desired\n\nOutput Parameter:\n- `subsp` - the subspace.  Note that the functionals in the subspace are with respect to the intrinsic geometry of the\npoint, which will be of lesser dimension if height > 0.\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscSpaceGetHeightSubspace()`, `PetscDualSpaceGetPointSubspace()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetHeightSubspace\"))\n\"\"\"\nfunction PetscDualSpaceGetHeightSubspace(petsclib::PetscLibType, sp::PetscDualSpace, height::PetscInt, subsp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetHeightSubspace(petsclib::$UnionPetscLib, sp::PetscDualSpace, height::$PetscInt, subsp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscDualSpaceGetHeightSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, Ptr{PetscDualSpace}),\n               sp, height, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceGetPointSubspace(petsclib::PetscLibType,sp::PetscDualSpace, point::PetscInt, bdsp::PetscDualSpace) \nGet the subset of the dual space basis that is supported on a particular mesh point.\n\nNot Collective\n\nInput Parameters:\n- `sp`    - the `PetscDualSpace` object\n- `point` - the point (in the dual space's DM) for which the subspace is desired\n\nOutput Parameter:\n- `bdsp` - the subspace.\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceGetHeightSubspace()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetPointSubspace\"))\n\"\"\"\nfunction PetscDualSpaceGetPointSubspace(petsclib::PetscLibType, sp::PetscDualSpace, point::PetscInt, bdsp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetPointSubspace(petsclib::$UnionPetscLib, sp::PetscDualSpace, point::$PetscInt, bdsp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscDualSpaceGetPointSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, Ptr{PetscDualSpace}),\n               sp, point, bdsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tperms::PetscInt,flips::PetscScalar = PetscDualSpaceGetSymmetries(petsclib::PetscLibType,sp::PetscDualSpace) \nReturns a description of the symmetries of this basis\n\nNot Collective\n\nInput Parameter:\n- `sp` - the `PetscDualSpace` object\n\nOutput Parameters:\n- `perms` - Permutations of the interior degrees of freedom, parameterized by the point orientation\n- `flips` - Sign reversal of the interior degrees of freedom, parameterized by the point orientation\n\nLevel: developer\n\n-seealso: `PetscDualSpace`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetSymmetries\"))\n\"\"\"\nfunction PetscDualSpaceGetSymmetries(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetSymmetries(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tperms_ = Ref{$PetscInt}()\n\tflips_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetSymmetries, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, $PetscScalar),\n               sp, perms_, flips_,\n              )\n\n\tperms = perms_[]\n\tflips = flips_[]\n\n\treturn perms,flips\nend \n\n\"\"\"\n\tk::PetscInt = PetscDualSpaceGetFormDegree(petsclib::PetscLibType,dsp::PetscDualSpace) \nGet the form degree k for the k\ndual space's functionals.\n\nInput Parameter:\n- `dsp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `k` - The *signed* degree k of the k.  If k >= 0, this means that the degrees of freedom are k-forms, and are stored\nin lexicographic order according to the basis of k-forms constructed from the wedge product of 1-forms.  So for example,\nthe 1-form basis in 3-D is (dx, dy, dz), and the 2-form basis in 3-D is (dx wedge dy, dx wedge dz, dy wedge dz).\nIf k < 0, this means that the degrees transform as k-forms, but are stored as (N-k) forms according to the\nHodge star map.  So for example if k = -2 and N = 3, this means that the degrees of freedom transform as 2-forms\nbut are stored as 1-forms.\n\nLevel: developer\n\n-seealso: `PetscDualSpace`, `PetscDTAltV`, `PetscDualSpacePullback()`, `PetscDualSpacePushforward()`, `PetscDualSpaceTransform()`, `PetscDualSpaceTransformType`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetFormDegree\"))\n\"\"\"\nfunction PetscDualSpaceGetFormDegree(petsclib::PetscLibType, dsp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetFormDegree(petsclib::$UnionPetscLib, dsp::PetscDualSpace )\n\tk_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetFormDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               dsp, k_,\n              )\n\n\tk = k_[]\n\n\treturn k\nend \n\n\"\"\"\n\tPetscDualSpaceSetFormDegree(petsclib::PetscLibType,dsp::PetscDualSpace, k::PetscInt) \nSet the form degree k for the k\ndual space's functionals.\n\nInput Parameters:\n- `dsp` - The `PetscDualSpace`\n- `k`   - The *signed* degree k of the k.  If k >= 0, this means that the degrees of freedom are k-forms, and are stored\nin lexicographic order according to the basis of k-forms constructed from the wedge product of 1-forms.  So for example,\nthe 1-form basis in 3-D is (dx, dy, dz), and the 2-form basis in 3-D is (dx wedge dy, dx wedge dz, dy wedge dz).\nIf k < 0, this means that the degrees transform as k-forms, but are stored as (N-k) forms according to the\nHodge star map.  So for example if k = -2 and N = 3, this means that the degrees of freedom transform as 2-forms\nbut are stored as 1-forms.\n\nLevel: developer\n\n-seealso: `PetscDualSpace`, `PetscDTAltV`, `PetscDualSpacePullback()`, `PetscDualSpacePushforward()`, `PetscDualSpaceTransform()`, `PetscDualSpaceTransformType`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSetFormDegree\"))\n\"\"\"\nfunction PetscDualSpaceSetFormDegree(petsclib::PetscLibType, dsp::PetscDualSpace, k::PetscInt) end\n\n@for_petsc function PetscDualSpaceSetFormDegree(petsclib::$UnionPetscLib, dsp::PetscDualSpace, k::$PetscInt )\n\n    @chk ccall(\n               (:PetscDualSpaceSetFormDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt),\n               dsp, k,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tk::PetscInt = PetscDualSpaceGetDeRahm(petsclib::PetscLibType,dsp::PetscDualSpace) \nGet the k\n\nInput Parameter:\n- `dsp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `k` - The simplex dimension\n\nLevel: developer\n\n-seealso: `PetscDualSpace`, `PetscDualSpacePullback()`, `PetscDualSpacePushforward()`, `PetscDualSpaceTransform()`, `PetscDualSpaceTransformType`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceGetDeRahm\"))\n\"\"\"\nfunction PetscDualSpaceGetDeRahm(petsclib::PetscLibType, dsp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceGetDeRahm(petsclib::$UnionPetscLib, dsp::PetscDualSpace )\n\tk_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceGetDeRahm, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               dsp, k_,\n              )\n\n\tk = k_[]\n\n\treturn k\nend \n\n\"\"\"\n\tPetscDualSpaceTransform(petsclib::PetscLibType,dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar}) \nTransform the function values\n\nInput Parameters:\n- `dsp`       - The `PetscDualSpace`\n- `trans`     - The type of transform\n- `isInverse` - Flag to invert the transform\n- `fegeom`    - The cell geometry\n- `Nv`        - The number of function samples\n- `Nc`        - The number of function components\n- `vals`      - The function values\n\nOutput Parameter:\n- `vals` - The transformed function values\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceTransformGradient()`, `PetscDualSpaceTransformHessian()`, `PetscDualSpacePullback()`, `PetscDualSpacePushforward()`, `PetscDualSpaceTransformType`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceTransform\"))\n\"\"\"\nfunction PetscDualSpaceTransform(petsclib::PetscLibType, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar}) end\n\n@for_petsc function PetscDualSpaceTransform(petsclib::$UnionPetscLib, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::$PetscInt, Nc::$PetscInt, vals::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDualSpaceTransform, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscDualSpaceTransformType, PetscBool, Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               dsp, trans, isInverse, fegeom, Nv, Nc, vals,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceTransformGradient(petsclib::PetscLibType,dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar}) \nTransform the function gradient values\n\nInput Parameters:\n- `dsp`       - The `PetscDualSpace`\n- `trans`     - The type of transform\n- `isInverse` - Flag to invert the transform\n- `fegeom`    - The cell geometry\n- `Nv`        - The number of function gradient samples\n- `Nc`        - The number of function components\n- `vals`      - The function gradient values\n\nOutput Parameter:\n- `vals` - The transformed function gradient values\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceTransform()`, `PetscDualSpacePullback()`, `PetscDualSpacePushforward()`, `PetscDualSpaceTransformType`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceTransformGradient\"))\n\"\"\"\nfunction PetscDualSpaceTransformGradient(petsclib::PetscLibType, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar}) end\n\n@for_petsc function PetscDualSpaceTransformGradient(petsclib::$UnionPetscLib, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::$PetscInt, Nc::$PetscInt, vals::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDualSpaceTransformGradient, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscDualSpaceTransformType, PetscBool, Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               dsp, trans, isInverse, fegeom, Nv, Nc, vals,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceTransformHessian(petsclib::PetscLibType,dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar}) \nTransform the function Hessian values\n\nInput Parameters:\n- `dsp`       - The `PetscDualSpace`\n- `trans`     - The type of transform\n- `isInverse` - Flag to invert the transform\n- `fegeom`    - The cell geometry\n- `Nv`        - The number of function Hessian samples\n- `Nc`        - The number of function components\n- `vals`      - The function gradient values\n\nOutput Parameter:\n- `vals` - The transformed function Hessian values\n\nLevel: intermediate\n\n-seealso: `PetscDualSpace`, `PetscDualSpaceTransform()`, `PetscDualSpacePullback()`, `PetscDualSpacePushforward()`, `PetscDualSpaceTransformType`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceTransformHessian\"))\n\"\"\"\nfunction PetscDualSpaceTransformHessian(petsclib::PetscLibType, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar}) end\n\n@for_petsc function PetscDualSpaceTransformHessian(petsclib::$UnionPetscLib, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::PetscFEGeom, Nv::$PetscInt, Nc::$PetscInt, vals::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDualSpaceTransformHessian, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscDualSpaceTransformType, PetscBool, Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               dsp, trans, isInverse, fegeom, Nv, Nc, vals,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpacePullback(petsclib::PetscLibType,dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) \nTransform the given functional so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.\n\nInput Parameters:\n- `dsp`       - The `PetscDualSpace`\n- `fegeom`    - The geometry for this cell\n- `Nq`        - The number of function samples\n- `Nc`        - The number of function components\n- `pointEval` - The function values\n\nOutput Parameter:\n- `pointEval` - The transformed function values\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpacePushforward()`, `PetscDualSpaceTransform()`, `PetscDualSpaceGetDeRahm()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpacePullback\"))\n\"\"\"\nfunction PetscDualSpacePullback(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) end\n\n@for_petsc function PetscDualSpacePullback(petsclib::$UnionPetscLib, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::$PetscInt, Nc::$PetscInt, pointEval::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDualSpacePullback, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               dsp, fegeom, Nq, Nc, pointEval,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpacePushforward(petsclib::PetscLibType,dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) \nTransform the given function so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.\n\nInput Parameters:\n- `dsp`       - The `PetscDualSpace`\n- `fegeom`    - The geometry for this cell\n- `Nq`        - The number of function samples\n- `Nc`        - The number of function components\n- `pointEval` - The function values\n\nOutput Parameter:\n- `pointEval` - The transformed function values\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpacePullback()`, `PetscDualSpaceTransform()`, `PetscDualSpaceGetDeRahm()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpacePushforward\"))\n\"\"\"\nfunction PetscDualSpacePushforward(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) end\n\n@for_petsc function PetscDualSpacePushforward(petsclib::$UnionPetscLib, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::$PetscInt, Nc::$PetscInt, pointEval::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDualSpacePushforward, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               dsp, fegeom, Nq, Nc, pointEval,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpacePushforwardGradient(petsclib::PetscLibType,dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) \nTransform the given function gradient so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.\n\nInput Parameters:\n- `dsp`       - The `PetscDualSpace`\n- `fegeom`    - The geometry for this cell\n- `Nq`        - The number of function gradient samples\n- `Nc`        - The number of function components\n- `pointEval` - The function gradient values\n\nOutput Parameter:\n- `pointEval` - The transformed function gradient values\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpacePushforward()`, `PetscDualSpacePullback()`, `PetscDualSpaceTransform()`, `PetscDualSpaceGetDeRahm()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpacePushforwardGradient\"))\n\"\"\"\nfunction PetscDualSpacePushforwardGradient(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) end\n\n@for_petsc function PetscDualSpacePushforwardGradient(petsclib::$UnionPetscLib, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::$PetscInt, Nc::$PetscInt, pointEval::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDualSpacePushforwardGradient, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               dsp, fegeom, Nq, Nc, pointEval,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpacePushforwardHessian(petsclib::PetscLibType,dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) \nTransform the given function Hessian so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.\n\nInput Parameters:\n- `dsp`       - The `PetscDualSpace`\n- `fegeom`    - The geometry for this cell\n- `Nq`        - The number of function Hessian samples\n- `Nc`        - The number of function components\n- `pointEval` - The function gradient values\n\nOutput Parameter:\n- `pointEval` - The transformed function Hessian values\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PetscDualSpacePushforward()`, `PetscDualSpacePullback()`, `PetscDualSpaceTransform()`, `PetscDualSpaceGetDeRahm()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpacePushforwardHessian\"))\n\"\"\"\nfunction PetscDualSpacePushforwardHessian(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar}) end\n\n@for_petsc function PetscDualSpacePushforwardHessian(petsclib::$UnionPetscLib, dsp::PetscDualSpace, fegeom::PetscFEGeom, Nq::$PetscInt, Nc::$PetscInt, pointEval::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscDualSpacePushforwardHessian, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscScalar}),\n               dsp, fegeom, Nq, Nc, pointEval,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSimpleSetDimension(petsclib::PetscLibType,sp::PetscDualSpace, dim::PetscInt) \nSet the number of functionals in the dual space basis\n\nLogically Collective\n\nInput Parameters:\n- `sp`  - the `PetscDualSpace`\n- `dim` - the basis dimension\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESIMPLE`, `PetscDualSpace`, `PetscDualSpaceSimpleSetFunctional()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSimpleSetDimension\"))\n\"\"\"\nfunction PetscDualSpaceSimpleSetDimension(petsclib::PetscLibType, sp::PetscDualSpace, dim::PetscInt) end\n\n@for_petsc function PetscDualSpaceSimpleSetDimension(petsclib::$UnionPetscLib, sp::PetscDualSpace, dim::$PetscInt )\n\n    @chk ccall(\n               (:PetscDualSpaceSimpleSetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt),\n               sp, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSimpleSetFunctional(petsclib::PetscLibType,sp::PetscDualSpace, func::PetscInt, q::PetscQuadrature) \nSet the given basis functional for this dual space\n\nNot Collective\n\nInput Parameters:\n- `sp`   - the `PetscDualSpace`\n- `func` - the basis index\n- `q`    - the basis functional\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESIMPLE`, `PetscDualSpace`, `PetscDualSpaceSimpleSetDimension()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSimpleSetFunctional\"))\n\"\"\"\nfunction PetscDualSpaceSimpleSetFunctional(petsclib::PetscLibType, sp::PetscDualSpace, func::PetscInt, q::PetscQuadrature) end\n\n@for_petsc function PetscDualSpaceSimpleSetFunctional(petsclib::$UnionPetscLib, sp::PetscDualSpace, func::$PetscInt, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscDualSpaceSimpleSetFunctional, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, PetscQuadrature),\n               sp, func, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcontinuous::PetscBool = PetscDualSpaceLagrangeGetContinuity(petsclib::PetscLibType,sp::PetscDualSpace) \nRetrieves the flag for element continuity\n\nNot Collective\n\nInput Parameter:\n- `sp` - the `PetscDualSpace`\n\nOutput Parameter:\n- `continuous` - flag for element continuity\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeSetContinuity()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeGetContinuity\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeGetContinuity(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceLagrangeGetContinuity(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tcontinuous_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeGetContinuity, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscBool}),\n               sp, continuous_,\n              )\n\n\tcontinuous = continuous_[]\n\n\treturn continuous\nend \n\n\"\"\"\n\tPetscDualSpaceLagrangeSetContinuity(petsclib::PetscLibType,sp::PetscDualSpace, continuous::PetscBool) \nIndicate whether the element is continuous\n\nLogically Collective\n\nInput Parameters:\n- `sp`         - the `PetscDualSpace`\n- `continuous` - flag for element continuity\n\nOptions Database Key:\n- `-petscdualspace_lagrange_continuity <bool>` - use a continuous element\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeGetContinuity()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeSetContinuity\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeSetContinuity(petsclib::PetscLibType, sp::PetscDualSpace, continuous::PetscBool) end\n\n@for_petsc function PetscDualSpaceLagrangeSetContinuity(petsclib::$UnionPetscLib, sp::PetscDualSpace, continuous::PetscBool )\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeSetContinuity, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscBool),\n               sp, continuous,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttensor::PetscBool = PetscDualSpaceLagrangeGetTensor(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the tensor nature of the dual space\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `tensor` - Whether the dual space has tensor layout (vs. simplicial)\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeSetTensor()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeGetTensor\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeGetTensor(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceLagrangeGetTensor(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\ttensor_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeGetTensor, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscBool}),\n               sp, tensor_,\n              )\n\n\ttensor = tensor_[]\n\n\treturn tensor\nend \n\n\"\"\"\n\tPetscDualSpaceLagrangeSetTensor(petsclib::PetscLibType,sp::PetscDualSpace, tensor::PetscBool) \nSet the tensor nature of the dual space\n\nNot Collective\n\nInput Parameters:\n- `sp`     - The `PetscDualSpace`\n- `tensor` - Whether the dual space has tensor layout (vs. simplicial)\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeGetTensor()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeSetTensor\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeSetTensor(petsclib::PetscLibType, sp::PetscDualSpace, tensor::PetscBool) end\n\n@for_petsc function PetscDualSpaceLagrangeSetTensor(petsclib::$UnionPetscLib, sp::PetscDualSpace, tensor::PetscBool )\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeSetTensor, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscBool),\n               sp, tensor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttrimmed::PetscBool = PetscDualSpaceLagrangeGetTrimmed(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the trimmed nature of the dual space\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `trimmed` - Whether the dual space represents to dual basis of a trimmed polynomial space (e.g. Raviart-Thomas and higher order / other form degree variants)\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeSetTrimmed()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeGetTrimmed\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeGetTrimmed(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceLagrangeGetTrimmed(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\ttrimmed_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeGetTrimmed, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscBool}),\n               sp, trimmed_,\n              )\n\n\ttrimmed = trimmed_[]\n\n\treturn trimmed\nend \n\n\"\"\"\n\tPetscDualSpaceLagrangeSetTrimmed(petsclib::PetscLibType,sp::PetscDualSpace, trimmed::PetscBool) \nSet the trimmed nature of the dual space\n\nNot Collective\n\nInput Parameters:\n- `sp`      - The `PetscDualSpace`\n- `trimmed` - Whether the dual space represents to dual basis of a trimmed polynomial space (e.g. Raviart-Thomas and higher order / other form degree variants)\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeGetTrimmed()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeSetTrimmed\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeSetTrimmed(petsclib::PetscLibType, sp::PetscDualSpace, trimmed::PetscBool) end\n\n@for_petsc function PetscDualSpaceLagrangeSetTrimmed(petsclib::$UnionPetscLib, sp::PetscDualSpace, trimmed::PetscBool )\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeSetTrimmed, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscBool),\n               sp, trimmed,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnodeType::PetscDTNodeType,boundary::PetscBool,exponent::PetscReal = PetscDualSpaceLagrangeGetNodeType(petsclib::PetscLibType,sp::PetscDualSpace) \nGet a description of how nodes are laid out for Lagrange polynomials in this\ndual space\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameters:\n- `nodeType` - The type of nodes\n- `boundary` - Whether the node type is one that includes endpoints (if nodeType is `PETSCDTNODES_GAUSSJACOBI`, nodes that\ninclude the boundary are Gauss-Lobatto-Jacobi nodes)\n- `exponent` - If nodeType is `PETSCDTNODES_GAUSSJACOBI`, indicates the exponent used for both ends of the 1D Jacobi weight function\n'0' is Gauss-Legendre, '-0.5' is Gauss-Chebyshev of the first type, '0.5' is Gauss-Chebyshev of the second type\n\nLevel: advanced\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDTNodeType`, `PetscDualSpaceLagrangeSetNodeType()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeGetNodeType\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeGetNodeType(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceLagrangeGetNodeType(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tnodeType_ = Ref{PetscDTNodeType}()\n\tboundary_ = Ref{PetscBool}()\n\texponent_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeGetNodeType, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscDTNodeType}, Ptr{PetscBool}, Ptr{$PetscReal}),\n               sp, nodeType_, boundary_, exponent_,\n              )\n\n\tnodeType = unsafe_string(nodeType_[])\n\tboundary = boundary_[]\n\texponent = exponent_[]\n\n\treturn nodeType,boundary,exponent\nend \n\n\"\"\"\n\tPetscDualSpaceLagrangeSetNodeType(petsclib::PetscLibType,sp::PetscDualSpace, nodeType::PetscDTNodeType, boundary::PetscBool, exponent::PetscReal) \nSet a description of how nodes are laid out for Lagrange polynomials in this\ndual space\n\nLogically Collective\n\nInput Parameters:\n- `sp`       - The `PetscDualSpace`\n- `nodeType` - The type of nodes\n- `boundary` - Whether the node type is one that includes endpoints (if nodeType is `PETSCDTNODES_GAUSSJACOBI`, nodes that\ninclude the boundary are Gauss-Lobatto-Jacobi nodes)\n- `exponent` - If nodeType is `PETSCDTNODES_GAUSSJACOBI`, indicates the exponent used for both ends of the 1D Jacobi weight function\n'0' is Gauss-Legendre, '-0.5' is Gauss-Chebyshev of the first type, '0.5' is Gauss-Chebyshev of the second type\n\nLevel: advanced\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDTNodeType`, `PetscDualSpaceLagrangeGetNodeType()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeSetNodeType\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeSetNodeType(petsclib::PetscLibType, sp::PetscDualSpace, nodeType::PetscDTNodeType, boundary::PetscBool, exponent::PetscReal) end\n\n@for_petsc function PetscDualSpaceLagrangeSetNodeType(petsclib::$UnionPetscLib, sp::PetscDualSpace, nodeType::PetscDTNodeType, boundary::PetscBool, exponent::$PetscReal )\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeSetNodeType, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscDTNodeType, PetscBool, $PetscReal),\n               sp, nodeType, boundary, exponent,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuseMoments::PetscBool = PetscDualSpaceLagrangeGetUseMoments(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the flag for using moment functionals\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `useMoments` - Moment flag\n\nLevel: advanced\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeSetUseMoments()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeGetUseMoments\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeGetUseMoments(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceLagrangeGetUseMoments(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tuseMoments_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeGetUseMoments, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscBool}),\n               sp, useMoments_,\n              )\n\n\tuseMoments = useMoments_[]\n\n\treturn useMoments\nend \n\n\"\"\"\n\tPetscDualSpaceLagrangeSetUseMoments(petsclib::PetscLibType,sp::PetscDualSpace, useMoments::PetscBool) \nSet the flag for moment functionals\n\nLogically Collective\n\nInput Parameters:\n- `sp`         - The `PetscDualSpace`\n- `useMoments` - The flag for moment functionals\n\nLevel: advanced\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeGetUseMoments()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeSetUseMoments\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeSetUseMoments(petsclib::PetscLibType, sp::PetscDualSpace, useMoments::PetscBool) end\n\n@for_petsc function PetscDualSpaceLagrangeSetUseMoments(petsclib::$UnionPetscLib, sp::PetscDualSpace, useMoments::PetscBool )\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeSetUseMoments, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscBool),\n               sp, useMoments,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\torder::PetscInt = PetscDualSpaceLagrangeGetMomentOrder(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the order for moment integration\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscDualSpace`\n\nOutput Parameter:\n- `order` - Moment integration order\n\nLevel: advanced\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeSetMomentOrder()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeGetMomentOrder\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeGetMomentOrder(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceLagrangeGetMomentOrder(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\torder_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeGetMomentOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               sp, order_,\n              )\n\n\torder = order_[]\n\n\treturn order\nend \n\n\"\"\"\n\tPetscDualSpaceLagrangeSetMomentOrder(petsclib::PetscLibType,sp::PetscDualSpace, order::PetscInt) \nSet the order for moment integration\n\nLogically Collective\n\nInput Parameters:\n- `sp`    - The `PetscDualSpace`\n- `order` - The order for moment integration\n\nLevel: advanced\n\n-seealso: `PETSCDUALSPACELAGRANGE`, `PetscDualSpace`, `PetscDualSpaceLagrangeGetMomentOrder()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceLagrangeSetMomentOrder\"))\n\"\"\"\nfunction PetscDualSpaceLagrangeSetMomentOrder(petsclib::PetscLibType, sp::PetscDualSpace, order::PetscInt) end\n\n@for_petsc function PetscDualSpaceLagrangeSetMomentOrder(petsclib::$UnionPetscLib, sp::PetscDualSpace, order::$PetscInt )\n\n    @chk ccall(\n               (:PetscDualSpaceLagrangeSetMomentOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt),\n               sp, order,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumSumSpaces::PetscInt = PetscDualSpaceSumGetNumSubspaces(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the number of spaces in the sum space\n\nInput Parameter:\n- `sp` - the dual space object\n\nOutput Parameter:\n- `numSumSpaces` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESUM`, `PetscDualSpace`, `PetscDualSpaceSumSetNumSubspaces()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumGetNumSubspaces\"))\n\"\"\"\nfunction PetscDualSpaceSumGetNumSubspaces(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceSumGetNumSubspaces(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tnumSumSpaces_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDualSpaceSumGetNumSubspaces, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{$PetscInt}),\n               sp, numSumSpaces_,\n              )\n\n\tnumSumSpaces = numSumSpaces_[]\n\n\treturn numSumSpaces\nend \n\n\"\"\"\n\tPetscDualSpaceSumSetNumSubspaces(petsclib::PetscLibType,sp::PetscDualSpace, numSumSpaces::PetscInt) \nSet the number of spaces in the sum space\n\nInput Parameters:\n- `sp`           - the dual space object\n- `numSumSpaces` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESUM`, `PetscDualSpace`, `PetscDualSpaceSumGetNumSubspaces()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumSetNumSubspaces\"))\n\"\"\"\nfunction PetscDualSpaceSumSetNumSubspaces(petsclib::PetscLibType, sp::PetscDualSpace, numSumSpaces::PetscInt) end\n\n@for_petsc function PetscDualSpaceSumSetNumSubspaces(petsclib::$UnionPetscLib, sp::PetscDualSpace, numSumSpaces::$PetscInt )\n\n    @chk ccall(\n               (:PetscDualSpaceSumSetNumSubspaces, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt),\n               sp, numSumSpaces,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tconcatenate::PetscBool = PetscDualSpaceSumGetConcatenate(petsclib::PetscLibType,sp::PetscDualSpace) \nGet the concatenate flag for this space.\n\nInput Parameter:\n- `sp` - the dual space object\n\nOutput Parameter:\n- `concatenate` - flag indicating whether subspaces are concatenated.\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESUM`, `PetscDualSpace`, `PetscDualSpaceSumSetConcatenate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumGetConcatenate\"))\n\"\"\"\nfunction PetscDualSpaceSumGetConcatenate(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceSumGetConcatenate(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tconcatenate_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceSumGetConcatenate, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscBool}),\n               sp, concatenate_,\n              )\n\n\tconcatenate = concatenate_[]\n\n\treturn concatenate\nend \n\n\"\"\"\n\tPetscDualSpaceSumSetConcatenate(petsclib::PetscLibType,sp::PetscDualSpace, concatenate::PetscBool) \nSets the concatenate flag for this space.\n\nInput Parameters:\n- `sp`          - the dual space object\n- `concatenate` - are subspaces concatenated components (true) or direct summands (false)\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESUM`, `PetscDualSpace`, `PetscDualSpaceSumGetConcatenate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumSetConcatenate\"))\n\"\"\"\nfunction PetscDualSpaceSumSetConcatenate(petsclib::PetscLibType, sp::PetscDualSpace, concatenate::PetscBool) end\n\n@for_petsc function PetscDualSpaceSumSetConcatenate(petsclib::$UnionPetscLib, sp::PetscDualSpace, concatenate::PetscBool )\n\n    @chk ccall(\n               (:PetscDualSpaceSumSetConcatenate, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscBool),\n               sp, concatenate,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSumGetSubspace(petsclib::PetscLibType,sp::PetscDualSpace, s::PetscInt, subsp::PetscDualSpace) \nGet a space in the sum space\n\nInput Parameters:\n- `sp` - the dual space object\n- `s`  - The space number\n\nOutput Parameter:\n- `subsp` - the `PetscDualSpace`\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESUM`, `PetscDualSpace`, `PetscDualSpaceSumSetSubspace()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumGetSubspace\"))\n\"\"\"\nfunction PetscDualSpaceSumGetSubspace(petsclib::PetscLibType, sp::PetscDualSpace, s::PetscInt, subsp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceSumGetSubspace(petsclib::$UnionPetscLib, sp::PetscDualSpace, s::$PetscInt, subsp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscDualSpaceSumGetSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, Ptr{PetscDualSpace}),\n               sp, s, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSumSetSubspace(petsclib::PetscLibType,sp::PetscDualSpace, s::PetscInt, subsp::PetscDualSpace) \nSet a space in the sum space\n\nInput Parameters:\n- `sp`    - the dual space object\n- `s`     - The space number\n- `subsp` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACESUM`, `PetscDualSpace`, `PetscDualSpaceSumGetSubspace()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumSetSubspace\"))\n\"\"\"\nfunction PetscDualSpaceSumSetSubspace(petsclib::PetscLibType, sp::PetscDualSpace, s::PetscInt, subsp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceSumSetSubspace(petsclib::$UnionPetscLib, sp::PetscDualSpace, s::$PetscInt, subsp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscDualSpaceSumSetSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, $PetscInt, PetscDualSpace),\n               sp, s, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDualSpaceSumSetInterleave(petsclib::PetscLibType,sp::PetscDualSpace, interleave_basis::PetscBool, interleave_components::PetscBool) \nSet whether the basis functions and components of a uniform sum are interleaved\n\nLogically collective\n\nInput Parameters:\n- `sp`                    - a `PetscDualSpace` of type `PETSCDUALSPACESUM`\n- `interleave_basis`      - if `PETSC_TRUE`, the basis vectors of the subspaces are interleaved\n- `interleave_components` - if `PETSC_TRUE` and the space concatenates components (`PetscDualSpaceSumGetConcatenate()`),\ninterleave the concatenated components\n\nLevel: developer\n\n-seealso: `PetscDualSpace`, `PETSCDUALSPACESUM`, `PETSCFEVECTOR`, `PetscDualSpaceSumGetInterleave()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumSetInterleave\"))\n\"\"\"\nfunction PetscDualSpaceSumSetInterleave(petsclib::PetscLibType, sp::PetscDualSpace, interleave_basis::PetscBool, interleave_components::PetscBool) end\n\n@for_petsc function PetscDualSpaceSumSetInterleave(petsclib::$UnionPetscLib, sp::PetscDualSpace, interleave_basis::PetscBool, interleave_components::PetscBool )\n\n    @chk ccall(\n               (:PetscDualSpaceSumSetInterleave, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, PetscBool, PetscBool),\n               sp, interleave_basis, interleave_components,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tinterleave_basis::PetscBool,interleave_components::PetscBool = PetscDualSpaceSumGetInterleave(petsclib::PetscLibType,sp::PetscDualSpace) \nGet whether the basis functions and components of a uniform sum are interleaved\n\nLogically collective\n\nInput Parameter:\n- `sp` - a `PetscDualSpace` of type `PETSCDUALSPACESUM`\n\nOutput Parameters:\n- `interleave_basis`      - if `PETSC_TRUE`, the basis vectors of the subspaces are interleaved\n- `interleave_components` - if `PETSC_TRUE` and the space concatenates components (`PetscDualSpaceSumGetConcatenate()`),\ninterleave the concatenated components\n\nLevel: developer\n\n-seealso: `PetscDualSpace`, `PETSCDUALSPACESUM`, `PETSCFEVECTOR`, `PetscDualSpaceSumSetInterleave()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceSumGetInterleave\"))\n\"\"\"\nfunction PetscDualSpaceSumGetInterleave(petsclib::PetscLibType, sp::PetscDualSpace) end\n\n@for_petsc function PetscDualSpaceSumGetInterleave(petsclib::$UnionPetscLib, sp::PetscDualSpace )\n\tinterleave_basis_ = Ref{PetscBool}()\n\tinterleave_components_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDualSpaceSumGetInterleave, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscBool}, Ptr{PetscBool}),\n               sp, interleave_basis_, interleave_components_,\n              )\n\n\tinterleave_basis = interleave_basis_[]\n\tinterleave_components = interleave_components_[]\n\n\treturn interleave_basis,interleave_components\nend \n\n\"\"\"\n\tsumSpace::PetscDualSpace = PetscDualSpaceCreateSum(petsclib::PetscLibType,numSubspaces::PetscInt, subspaces::Vector{PetscDualSpace}, concatenate::PetscBool) \nCreate a finite element dual basis that is the sum of other dual bases\n\nCollective\n\nInput Parameters:\n- `numSubspaces` - the number of spaces that will be added together\n- `subspaces`    - an array of length `numSubspaces` of spaces\n- `concatenate`  - if `PETSC_FALSE`, the sum-space has the same components as the individual dual spaces (`PetscDualSpaceGetNumComponents()`); if `PETSC_TRUE`, the individual components are concatenated to create a dual space with more components\n\nOutput Parameter:\n- `sumSpace` - a `PetscDualSpace` of type `PETSCDUALSPACESUM`\n\nLevel: advanced\n\n-seealso: `PetscDualSpace`, `PETSCDUALSPACESUM`, `PETSCSPACESUM`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceCreateSum\"))\n\"\"\"\nfunction PetscDualSpaceCreateSum(petsclib::PetscLibType, numSubspaces::PetscInt, subspaces::Vector{PetscDualSpace}, concatenate::PetscBool) end\n\n@for_petsc function PetscDualSpaceCreateSum(petsclib::$UnionPetscLib, numSubspaces::$PetscInt, subspaces::Vector{PetscDualSpace}, concatenate::PetscBool )\n\tsumSpace_ = Ref{PetscDualSpace}()\n\n    @chk ccall(\n               (:PetscDualSpaceCreateSum, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{PetscDualSpace}, PetscBool, Ptr{PetscDualSpace}),\n               numSubspaces, subspaces, concatenate, sumSpace_,\n              )\n\n\tsumSpace = sumSpace_[]\n\n\treturn sumSpace\nend \n\n\"\"\"\n\tPetscDualSpaceRefinedSetCellSpaces(petsclib::PetscLibType,sp::PetscDualSpace, cellSpaces::Vector{PetscDualSpace}) \nSet the dual spaces for the closures of each of the cells\nin the multicell `DM` of a `PetscDualSpace`\n\nCollective\n\nInput Parameters:\n- `sp`         - a `PetscDualSpace`\n- `cellSpaces` - one `PetscDualSpace` for each of the cells.  The reference count of each cell space will be incremented,\nso the user is still responsible for these spaces afterwards\n\nLevel: intermediate\n\n-seealso: `PETSCDUALSPACEREFINED`, `PetscDualSpace`, `PetscFERefine()`\n\n# External Links\n$(_doc_external(\"DM/PetscDualSpaceRefinedSetCellSpaces\"))\n\"\"\"\nfunction PetscDualSpaceRefinedSetCellSpaces(petsclib::PetscLibType, sp::PetscDualSpace, cellSpaces::Vector{PetscDualSpace}) end\n\n@for_petsc function PetscDualSpaceRefinedSetCellSpaces(petsclib::$UnionPetscLib, sp::PetscDualSpace, cellSpaces::Vector{PetscDualSpace} )\n\n    @chk ccall(\n               (:PetscDualSpaceRefinedSetCellSpaces, $petsc_library),\n               PetscErrorCode,\n               (PetscDualSpace, Ptr{PetscDualSpace}),\n               sp, cellSpaces,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscFE_wrappers.jl",
    "content": "\"\"\"\n\tPetscFEFinalizePackage(petsclib::PetscLibType) \nThis function finalizes everything in the `PetscFE` package. It is called\nfrom `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEFinalizePackage\"))\n\"\"\"\nfunction PetscFEFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscFEFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscFEFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscFE` package. It is called\nfrom `PetscDLLibraryRegister()` when using dynamic libraries, and on the first call to `PetscSpaceCreate()`\nwhen using static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEInitializePackage\"))\n\"\"\"\nfunction PetscFEInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscFEInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscFEInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFERegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `PetscFEType`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\n-seealso: `PetscFE`, `PetscFEType`, `PetscFERegisterAll()`, `PetscFERegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFERegister\"))\n\"\"\"\nfunction PetscFERegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscFERegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscFERegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFESetType(petsclib::PetscLibType,fem::PetscFE, name::PetscFEType) \nBuilds a particular `PetscFE`\n\nCollective\n\nInput Parameters:\n- `fem`  - The `PetscFE` object\n- `name` - The kind of FEM space\n\nOptions Database Key:\n- `-petscfe_type <type>` - Sets the `PetscFE` type; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `PetscFEType`, `PetscFE`, `PetscFEGetType()`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetType\"))\n\"\"\"\nfunction PetscFESetType(petsclib::PetscLibType, fem::PetscFE, name::PetscFEType) end\n\n@for_petsc function PetscFESetType(petsclib::$UnionPetscLib, fem::PetscFE, name::PetscFEType )\n\n    @chk ccall(\n               (:PetscFESetType, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscFEType),\n               fem, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscFEType = PetscFEGetType(petsclib::PetscLibType,fem::PetscFE) \nGets the `PetscFEType` (as a string) from the `PetscFE` object.\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE`\n\nOutput Parameter:\n- `name` - The `PetscFEType` name\n\nLevel: intermediate\n\n-seealso: `PetscFEType`, `PetscFE`, `PetscFESetType()`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetType\"))\n\"\"\"\nfunction PetscFEGetType(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEGetType(petsclib::$UnionPetscLib, fem::PetscFE )\n\tname_ = Ref{PetscFEType}()\n\n    @chk ccall(\n               (:PetscFEGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscFEType}),\n               fem, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\tPetscFEViewFromOptions(petsclib::PetscLibType,A::PetscFE, obj::PetscObject, name::String) \nView from a `PetscFE` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscFE` object\n- `obj`  - Optional object that provides the options prefix, pass `NULL` to use the options prefix of `A`\n- `name` - command line option name\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFEView()`, `PetscObjectViewFromOptions()`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEViewFromOptions\"))\n\"\"\"\nfunction PetscFEViewFromOptions(petsclib::PetscLibType, A::PetscFE, obj::PetscObject, name::String) end\n\n@for_petsc function PetscFEViewFromOptions(petsclib::$UnionPetscLib, A::PetscFE, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscFEViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEView(petsclib::PetscLibType,fem::PetscFE, viewer::PetscViewer) \nViews a `PetscFE`\n\nCollective\n\nInput Parameters:\n- `fem`    - the `PetscFE` object to view\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: `PetscFE`, `PetscViewer`, `PetscFEDestroy()`, `PetscFEViewFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEView\"))\n\"\"\"\nfunction PetscFEView(petsclib::PetscLibType, fem::PetscFE, viewer::PetscViewer) end\n\n@for_petsc function PetscFEView(petsclib::$UnionPetscLib, fem::PetscFE, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscFEView, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscViewer),\n               fem, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFESetFromOptions(petsclib::PetscLibType,fem::PetscFE) \nsets parameters in a `PetscFE` from the options database\n\nCollective\n\nInput Parameter:\n- `fem` - the `PetscFE` object to set options for\n\nOptions Database Keys:\n- `-petscfe_num_blocks`  - the number of cell blocks to integrate concurrently\n- `-petscfe_num_batches` - the number of cell batches to integrate serially\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFEView()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetFromOptions\"))\n\"\"\"\nfunction PetscFESetFromOptions(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFESetFromOptions(petsclib::$UnionPetscLib, fem::PetscFE )\n\n    @chk ccall(\n               (:PetscFESetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscFE,),\n               fem,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFESetUp(petsclib::PetscLibType,fem::PetscFE) \nConstruct data structures for the `PetscFE` after the `PetscFEType` has been set\n\nCollective\n\nInput Parameter:\n- `fem` - the `PetscFE` object to setup\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFEView()`, `PetscFEDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetUp\"))\n\"\"\"\nfunction PetscFESetUp(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFESetUp(petsclib::$UnionPetscLib, fem::PetscFE )\n\n    @chk ccall(\n               (:PetscFESetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscFE,),\n               fem,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEDestroy(petsclib::PetscLibType,fem::PetscFE) \nDestroys a `PetscFE` object\n\nCollective\n\nInput Parameter:\n- `fem` - the `PetscFE` object to destroy\n\nLevel: beginner\n\n-seealso: `PetscFE`, `PetscFEView()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEDestroy\"))\n\"\"\"\nfunction PetscFEDestroy(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEDestroy(petsclib::$UnionPetscLib, fem::PetscFE )\n\n    @chk ccall(\n               (:PetscFEDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFE},),\n               fem,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfem::PetscFE = PetscFECreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscFE` object. The type can then be set with `PetscFESetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscFE` object\n\nOutput Parameter:\n- `fem` - The `PetscFE` object\n\nLevel: beginner\n\n-seealso: `PetscFE`, `PetscFEType`, `PetscFESetType()`, `PetscFECreateDefault()`, `PETSCFEGALERKIN`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreate\"))\n\"\"\"\nfunction PetscFECreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscFECreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tfem_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscFE}),\n               comm, fem_,\n              )\n\n\tfem = fem_[]\n\n\treturn fem\nend \n\n\"\"\"\n\tdim::PetscInt = PetscFEGetSpatialDimension(petsclib::PetscLibType,fem::PetscFE) \nReturns the spatial dimension of the element\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `dim` - The spatial dimension\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetSpatialDimension\"))\n\"\"\"\nfunction PetscFEGetSpatialDimension(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEGetSpatialDimension(petsclib::$UnionPetscLib, fem::PetscFE )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFEGetSpatialDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{$PetscInt}),\n               fem, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tPetscFESetNumComponents(petsclib::PetscLibType,fem::PetscFE, comp::PetscInt) \nSets the number of field components in the element\n\nNot Collective\n\nInput Parameters:\n- `fem`  - The `PetscFE` object\n- `comp` - The number of field components\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFECreate()`, `PetscFEGetSpatialDimension()`, `PetscFEGetNumComponents()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetNumComponents\"))\n\"\"\"\nfunction PetscFESetNumComponents(petsclib::PetscLibType, fem::PetscFE, comp::PetscInt) end\n\n@for_petsc function PetscFESetNumComponents(petsclib::$UnionPetscLib, fem::PetscFE, comp::$PetscInt )\n\n    @chk ccall(\n               (:PetscFESetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt),\n               fem, comp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcomp::PetscInt = PetscFEGetNumComponents(petsclib::PetscLibType,fem::PetscFE) \nReturns the number of components in the element\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `comp` - The number of field components\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFECreate()`, `PetscFEGetSpatialDimension()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetNumComponents\"))\n\"\"\"\nfunction PetscFEGetNumComponents(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEGetNumComponents(petsclib::$UnionPetscLib, fem::PetscFE )\n\tcomp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFEGetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{$PetscInt}),\n               fem, comp_,\n              )\n\n\tcomp = comp_[]\n\n\treturn comp\nend \n\n\"\"\"\n\tPetscFESetTileSizes(petsclib::PetscLibType,fem::PetscFE, blockSize::PetscInt, numBlocks::PetscInt, batchSize::PetscInt, numBatches::PetscInt) \nSets the tile sizes for evaluation\n\nNot Collective\n\nInput Parameters:\n- `fem`        - The `PetscFE` object\n- `blockSize`  - The number of elements in a block\n- `numBlocks`  - The number of blocks in a batch\n- `batchSize`  - The number of elements in a batch\n- `numBatches` - The number of batches in a chunk\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFECreate()`, `PetscFEGetTileSizes()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetTileSizes\"))\n\"\"\"\nfunction PetscFESetTileSizes(petsclib::PetscLibType, fem::PetscFE, blockSize::PetscInt, numBlocks::PetscInt, batchSize::PetscInt, numBatches::PetscInt) end\n\n@for_petsc function PetscFESetTileSizes(petsclib::$UnionPetscLib, fem::PetscFE, blockSize::$PetscInt, numBlocks::$PetscInt, batchSize::$PetscInt, numBatches::$PetscInt )\n\n    @chk ccall(\n               (:PetscFESetTileSizes, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, $PetscInt, $PetscInt, $PetscInt),\n               fem, blockSize, numBlocks, batchSize, numBatches,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tblockSize::PetscInt,numBlocks::PetscInt,batchSize::PetscInt,numBatches::PetscInt = PetscFEGetTileSizes(petsclib::PetscLibType,fem::PetscFE) \nReturns the tile sizes for evaluation\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameters:\n- `blockSize`  - The number of elements in a block, pass `NULL` if not needed\n- `numBlocks`  - The number of blocks in a batch, pass `NULL` if not needed\n- `batchSize`  - The number of elements in a batch, pass `NULL` if not needed\n- `numBatches` - The number of batches in a chunk, pass `NULL` if not needed\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFECreate()`, `PetscFESetTileSizes()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetTileSizes\"))\n\"\"\"\nfunction PetscFEGetTileSizes(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEGetTileSizes(petsclib::$UnionPetscLib, fem::PetscFE )\n\tblockSize_ = Ref{$PetscInt}()\n\tnumBlocks_ = Ref{$PetscInt}()\n\tbatchSize_ = Ref{$PetscInt}()\n\tnumBatches_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFEGetTileSizes, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               fem, blockSize_, numBlocks_, batchSize_, numBatches_,\n              )\n\n\tblockSize = blockSize_[]\n\tnumBlocks = numBlocks_[]\n\tbatchSize = batchSize_[]\n\tnumBatches = numBatches_[]\n\n\treturn blockSize,numBlocks,batchSize,numBatches\nend \n\n\"\"\"\n\tPetscFEGetBasisSpace(petsclib::PetscLibType,fem::PetscFE, sp::PetscSpace) \nReturns the `PetscSpace` used for the approximation of the solution for the `PetscFE`\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `sp` - The `PetscSpace` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetBasisSpace\"))\n\"\"\"\nfunction PetscFEGetBasisSpace(petsclib::PetscLibType, fem::PetscFE, sp::PetscSpace) end\n\n@for_petsc function PetscFEGetBasisSpace(petsclib::$UnionPetscLib, fem::PetscFE, sp::PetscSpace )\n\n    @chk ccall(\n               (:PetscFEGetBasisSpace, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscSpace}),\n               fem, sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFESetBasisSpace(petsclib::PetscLibType,fem::PetscFE, sp::PetscSpace) \nSets the `PetscSpace` used for the approximation of the solution\n\nNot Collective\n\nInput Parameters:\n- `fem` - The `PetscFE` object\n- `sp`  - The `PetscSpace` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscFECreate()`, `PetscFESetDualSpace()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetBasisSpace\"))\n\"\"\"\nfunction PetscFESetBasisSpace(petsclib::PetscLibType, fem::PetscFE, sp::PetscSpace) end\n\n@for_petsc function PetscFESetBasisSpace(petsclib::$UnionPetscLib, fem::PetscFE, sp::PetscSpace )\n\n    @chk ccall(\n               (:PetscFESetBasisSpace, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscSpace),\n               fem, sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGetDualSpace(petsclib::PetscLibType,fem::PetscFE, sp::PetscDualSpace) \nReturns the `PetscDualSpace` used to define the inner product for a `PetscFE`\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `sp` - The `PetscDualSpace` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetDualSpace\"))\n\"\"\"\nfunction PetscFEGetDualSpace(petsclib::PetscLibType, fem::PetscFE, sp::PetscDualSpace) end\n\n@for_petsc function PetscFEGetDualSpace(petsclib::$UnionPetscLib, fem::PetscFE, sp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscFEGetDualSpace, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscDualSpace}),\n               fem, sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFESetDualSpace(petsclib::PetscLibType,fem::PetscFE, sp::PetscDualSpace) \nSets the `PetscDualSpace` used to define the inner product\n\nNot Collective\n\nInput Parameters:\n- `fem` - The `PetscFE` object\n- `sp`  - The `PetscDualSpace` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscFECreate()`, `PetscFESetBasisSpace()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetDualSpace\"))\n\"\"\"\nfunction PetscFESetDualSpace(petsclib::PetscLibType, fem::PetscFE, sp::PetscDualSpace) end\n\n@for_petsc function PetscFESetDualSpace(petsclib::$UnionPetscLib, fem::PetscFE, sp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscFESetDualSpace, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscDualSpace),\n               fem, sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGetQuadrature(petsclib::PetscLibType,fem::PetscFE, q::PetscQuadrature) \nReturns the `PetscQuadrature` used to calculate inner products\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `q` - The `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscQuadrature`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetQuadrature\"))\n\"\"\"\nfunction PetscFEGetQuadrature(petsclib::PetscLibType, fem::PetscFE, q::PetscQuadrature) end\n\n@for_petsc function PetscFEGetQuadrature(petsclib::$UnionPetscLib, fem::PetscFE, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscFEGetQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscQuadrature}),\n               fem, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFESetQuadrature(petsclib::PetscLibType,fem::PetscFE, q::PetscQuadrature) \nSets the `PetscQuadrature` used to calculate inner products\n\nNot Collective\n\nInput Parameters:\n- `fem` - The `PetscFE` object\n- `q`   - The `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscQuadrature`, `PetscFECreate()`, `PetscFEGetFaceQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetQuadrature\"))\n\"\"\"\nfunction PetscFESetQuadrature(petsclib::PetscLibType, fem::PetscFE, q::PetscQuadrature) end\n\n@for_petsc function PetscFESetQuadrature(petsclib::$UnionPetscLib, fem::PetscFE, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscFESetQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscQuadrature),\n               fem, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGetFaceQuadrature(petsclib::PetscLibType,fem::PetscFE, q::PetscQuadrature) \nReturns the `PetscQuadrature` used to calculate inner products on faces\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `q` - The `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscQuadrature`, `PetscFECreate()`, `PetscFESetQuadrature()`, `PetscFESetFaceQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetFaceQuadrature\"))\n\"\"\"\nfunction PetscFEGetFaceQuadrature(petsclib::PetscLibType, fem::PetscFE, q::PetscQuadrature) end\n\n@for_petsc function PetscFEGetFaceQuadrature(petsclib::$UnionPetscLib, fem::PetscFE, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscFEGetFaceQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscQuadrature}),\n               fem, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFESetFaceQuadrature(petsclib::PetscLibType,fem::PetscFE, q::PetscQuadrature) \nSets the `PetscQuadrature` used to calculate inner products on faces\n\nNot Collective\n\nInput Parameters:\n- `fem` - The `PetscFE` object\n- `q`   - The `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscQuadrature`, `PetscFECreate()`, `PetscFESetQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetFaceQuadrature\"))\n\"\"\"\nfunction PetscFESetFaceQuadrature(petsclib::PetscLibType, fem::PetscFE, q::PetscQuadrature) end\n\n@for_petsc function PetscFESetFaceQuadrature(petsclib::$UnionPetscLib, fem::PetscFE, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscFESetFaceQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscQuadrature),\n               fem, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFECopyQuadrature(petsclib::PetscLibType,sfe::PetscFE, tfe::PetscFE) \nCopy both volumetric and surface quadrature to a new `PetscFE`\n\nNot Collective\n\nInput Parameters:\n- `sfe` - The `PetscFE` source for the quadratures\n- `tfe` - The `PetscFE` target for the quadratures\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscQuadrature`, `PetscFECreate()`, `PetscFESetQuadrature()`, `PetscFESetFaceQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECopyQuadrature\"))\n\"\"\"\nfunction PetscFECopyQuadrature(petsclib::PetscLibType, sfe::PetscFE, tfe::PetscFE) end\n\n@for_petsc function PetscFECopyQuadrature(petsclib::$UnionPetscLib, sfe::PetscFE, tfe::PetscFE )\n\n    @chk ccall(\n               (:PetscFECopyQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscFE),\n               sfe, tfe,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumDof::Vector{PetscInt} = PetscFEGetNumDof(petsclib::PetscLibType,fem::PetscFE) \nReturns the number of dofs (dual basis vectors) associated to mesh points on the reference cell of a given dimension\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `numDof` - Array of length `dim` with the number of dofs in each dimension\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetNumDof\"))\n\"\"\"\nfunction PetscFEGetNumDof(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEGetNumDof(petsclib::$UnionPetscLib, fem::PetscFE )\n\tnumDof_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscFEGetNumDof, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{Ptr{$PetscInt}}),\n               fem, numDof_,\n              )\n\n\tnumDof = unsafe_wrap(Array, numDof_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numDof\nend \n\n\"\"\"\n\tPetscFEGetCellTabulation(petsclib::PetscLibType,fem::PetscFE, k::PetscInt, T::PetscTabulation) \nReturns the tabulation of the basis functions at the quadrature points on the reference cell\n\nNot Collective\n\nInput Parameters:\n- `fem` - The `PetscFE` object\n- `k`   - The highest derivative we need to tabulate, very often 1\n\nOutput Parameter:\n- `T` - The basis function values and derivatives at quadrature points\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscTabulation`, `PetscFECreateTabulation()`, `PetscTabulationDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetCellTabulation\"))\n\"\"\"\nfunction PetscFEGetCellTabulation(petsclib::PetscLibType, fem::PetscFE, k::PetscInt, T::PetscTabulation) end\n\n@for_petsc function PetscFEGetCellTabulation(petsclib::$UnionPetscLib, fem::PetscFE, k::$PetscInt, T::PetscTabulation )\n\n    @chk ccall(\n               (:PetscFEGetCellTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, Ptr{PetscTabulation}),\n               fem, k, T,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEExpandFaceQuadrature(petsclib::PetscLibType,fe::PetscFE, fq::PetscQuadrature, efq::PetscQuadrature) \n\n# External Links\n$(_doc_external(\"DM/PetscFEExpandFaceQuadrature\"))\n\"\"\"\nfunction PetscFEExpandFaceQuadrature(petsclib::PetscLibType, fe::PetscFE, fq::PetscQuadrature, efq::PetscQuadrature) end\n\n@for_petsc function PetscFEExpandFaceQuadrature(petsclib::$UnionPetscLib, fe::PetscFE, fq::PetscQuadrature, efq::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscFEExpandFaceQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscQuadrature, Ptr{PetscQuadrature}),\n               fe, fq, efq,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGetFaceTabulation(petsclib::PetscLibType,fem::PetscFE, k::PetscInt, Tf::PetscTabulation) \nReturns the tabulation of the basis functions at the face quadrature points for each face of the reference cell\n\nNot Collective\n\nInput Parameters:\n- `fem` - The `PetscFE` object\n- `k`   - The highest derivative we need to tabulate, very often 1\n\nOutput Parameter:\n- `Tf` - The basis function values and derivatives at face quadrature points\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscTabulation`, `PetscFEGetCellTabulation()`, `PetscFECreateTabulation()`, `PetscTabulationDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetFaceTabulation\"))\n\"\"\"\nfunction PetscFEGetFaceTabulation(petsclib::PetscLibType, fem::PetscFE, k::PetscInt, Tf::PetscTabulation) end\n\n@for_petsc function PetscFEGetFaceTabulation(petsclib::$UnionPetscLib, fem::PetscFE, k::$PetscInt, Tf::PetscTabulation )\n\n    @chk ccall(\n               (:PetscFEGetFaceTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, Ptr{PetscTabulation}),\n               fem, k, Tf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGetFaceCentroidTabulation(petsclib::PetscLibType,fem::PetscFE, Tc::PetscTabulation) \nReturns the tabulation of the basis functions at the face centroid points\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameter:\n- `Tc` - The basis function values at face centroid points\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscTabulation`, `PetscFEGetFaceTabulation()`, `PetscFEGetCellTabulation()`, `PetscFECreateTabulation()`, `PetscTabulationDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetFaceCentroidTabulation\"))\n\"\"\"\nfunction PetscFEGetFaceCentroidTabulation(petsclib::PetscLibType, fem::PetscFE, Tc::PetscTabulation) end\n\n@for_petsc function PetscFEGetFaceCentroidTabulation(petsclib::$UnionPetscLib, fem::PetscFE, Tc::PetscTabulation )\n\n    @chk ccall(\n               (:PetscFEGetFaceCentroidTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscTabulation}),\n               fem, Tc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tT::PetscTabulation = PetscFECreateTabulation(petsclib::PetscLibType,fem::PetscFE, nrepl::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt) \nTabulates the basis functions, and perhaps derivatives, at the points provided.\n\nNot Collective\n\nInput Parameters:\n- `fem`     - The `PetscFE` object\n- `nrepl`   - The number of replicas\n- `npoints` - The number of tabulation points in a replica\n- `points`  - The tabulation point coordinates\n- `K`       - The number of derivatives calculated\n\nOutput Parameter:\n- `T` - The basis function values and derivatives at tabulation points\n\nLevel: intermediate\n\n-seealso: `PetscTabulation`, `PetscFEGetCellTabulation()`, `PetscTabulationDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateTabulation\"))\n\"\"\"\nfunction PetscFECreateTabulation(petsclib::PetscLibType, fem::PetscFE, nrepl::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt) end\n\n@for_petsc function PetscFECreateTabulation(petsclib::$UnionPetscLib, fem::PetscFE, nrepl::$PetscInt, npoints::$PetscInt, points::Vector{$PetscReal}, K::$PetscInt )\n\tT_ = Ref{PetscTabulation}()\n\n    @chk ccall(\n               (:PetscFECreateTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, $PetscInt, Ptr{$PetscReal}, $PetscInt, Ptr{PetscTabulation}),\n               fem, nrepl, npoints, points, K, T_,\n              )\n\n\tT = T_[]\n\n\treturn T\nend \n\n\"\"\"\n\tPetscFEComputeTabulation(petsclib::PetscLibType,fem::PetscFE, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt, T::PetscTabulation) \nTabulates the basis functions, and perhaps derivatives, at the points provided.\n\nNot Collective\n\nInput Parameters:\n- `fem`     - The `PetscFE` object\n- `npoints` - The number of tabulation points\n- `points`  - The tabulation point coordinates\n- `K`       - The number of derivatives calculated\n- `T`       - An existing tabulation object with enough allocated space\n\nOutput Parameter:\n- `T` - The basis function values and derivatives at tabulation points\n\nLevel: intermediate\n\n-seealso: `PetscTabulation`, `PetscFEGetCellTabulation()`, `PetscTabulationDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEComputeTabulation\"))\n\"\"\"\nfunction PetscFEComputeTabulation(petsclib::PetscLibType, fem::PetscFE, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt, T::PetscTabulation) end\n\n@for_petsc function PetscFEComputeTabulation(petsclib::$UnionPetscLib, fem::PetscFE, npoints::$PetscInt, points::Vector{$PetscReal}, K::$PetscInt, T::PetscTabulation )\n\n    @chk ccall(\n               (:PetscFEComputeTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, Ptr{$PetscReal}, $PetscInt, PetscTabulation),\n               fem, npoints, points, K, T,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttrFE::PetscFE = PetscFECreateHeightTrace(petsclib::PetscLibType,fe::PetscFE, height::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscFECreateHeightTrace\"))\n\"\"\"\nfunction PetscFECreateHeightTrace(petsclib::PetscLibType, fe::PetscFE, height::PetscInt) end\n\n@for_petsc function PetscFECreateHeightTrace(petsclib::$UnionPetscLib, fe::PetscFE, height::$PetscInt )\n\ttrFE_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateHeightTrace, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, Ptr{PetscFE}),\n               fe, height, trFE_,\n              )\n\n\ttrFE = trFE_[]\n\n\treturn trFE\nend \n\n\"\"\"\n\tdim::PetscInt = PetscFEGetDimension(petsclib::PetscLibType,fem::PetscFE) \nGet the dimension of the finite element space on a cell\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE`\n\nOutput Parameter:\n- `dim` - The dimension\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFECreate()`, `PetscSpaceGetDimension()`, `PetscDualSpaceGetDimension()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetDimension\"))\n\"\"\"\nfunction PetscFEGetDimension(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEGetDimension(petsclib::$UnionPetscLib, fem::PetscFE )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFEGetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{$PetscInt}),\n               fem, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tPetscFEPushforward(petsclib::PetscLibType,fe::PetscFE, fegeom::PetscFEGeom, Nv::PetscInt, vals::Vector{PetscScalar}) \nMap the reference element function to real space\n\nInput Parameters:\n- `fe`     - The `PetscFE`\n- `fegeom` - The cell geometry\n- `Nv`     - The number of function values\n- `vals`   - The function values\n\nOutput Parameter:\n- `vals` - The transformed function values\n\nLevel: advanced\n\n-seealso: `PetscFE`, `PetscFEGeom`, `PetscDualSpace`, `PetscDualSpacePushforward()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEPushforward\"))\n\"\"\"\nfunction PetscFEPushforward(petsclib::PetscLibType, fe::PetscFE, fegeom::PetscFEGeom, Nv::PetscInt, vals::Vector{PetscScalar}) end\n\n@for_petsc function PetscFEPushforward(petsclib::$UnionPetscLib, fe::PetscFE, fegeom::PetscFEGeom, Nv::$PetscInt, vals::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscFEPushforward, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscFEGeom}, $PetscInt, Ptr{$PetscScalar}),\n               fe, fegeom, Nv, vals,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEPushforwardGradient(petsclib::PetscLibType,fe::PetscFE, fegeom::PetscFEGeom, Nv::PetscInt, vals::Vector{PetscScalar}) \nMap the reference element function gradient to real space\n\nInput Parameters:\n- `fe`     - The `PetscFE`\n- `fegeom` - The cell geometry\n- `Nv`     - The number of function gradient values\n- `vals`   - The function gradient values\n\nOutput Parameter:\n- `vals` - The transformed function gradient values\n\nLevel: advanced\n\n-seealso: `PetscFE`, `PetscFEGeom`, `PetscDualSpace`, `PetscFEPushforward()`, `PetscDualSpacePushforwardGradient()`, `PetscDualSpacePushforward()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEPushforwardGradient\"))\n\"\"\"\nfunction PetscFEPushforwardGradient(petsclib::PetscLibType, fe::PetscFE, fegeom::PetscFEGeom, Nv::PetscInt, vals::Vector{PetscScalar}) end\n\n@for_petsc function PetscFEPushforwardGradient(petsclib::$UnionPetscLib, fe::PetscFE, fegeom::PetscFEGeom, Nv::$PetscInt, vals::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscFEPushforwardGradient, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscFEGeom}, $PetscInt, Ptr{$PetscScalar}),\n               fe, fegeom, Nv, vals,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEPushforwardHessian(petsclib::PetscLibType,fe::PetscFE, fegeom::PetscFEGeom, Nv::PetscInt, vals::Vector{PetscScalar}) \nMap the reference element function Hessian to real space\n\nInput Parameters:\n- `fe`     - The `PetscFE`\n- `fegeom` - The cell geometry\n- `Nv`     - The number of function Hessian values\n- `vals`   - The function Hessian values\n\nOutput Parameter:\n- `vals` - The transformed function Hessian values\n\nLevel: advanced\n\n-seealso: `PetscFE`, `PetscFEGeom`, `PetscDualSpace`, `PetscFEPushforward()`, `PetscDualSpacePushforwardHessian()`, `PetscDualSpacePushforward()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEPushforwardHessian\"))\n\"\"\"\nfunction PetscFEPushforwardHessian(petsclib::PetscLibType, fe::PetscFE, fegeom::PetscFEGeom, Nv::PetscInt, vals::Vector{PetscScalar}) end\n\n@for_petsc function PetscFEPushforwardHessian(petsclib::$UnionPetscLib, fe::PetscFE, fegeom::PetscFEGeom, Nv::$PetscInt, vals::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscFEPushforwardHessian, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscFEGeom}, $PetscInt, Ptr{$PetscScalar}),\n               fe, fegeom, Nv, vals,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tintegral::Vector{PetscScalar} = PetscFEIntegrate(petsclib::PetscLibType,prob::PetscDS, field::PetscInt, Ne::PetscInt, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}) \nProduce the integral for the given field for a chunk of elements by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `prob`            - The `PetscDS` specifying the discretizations and continuum functions\n- `field`           - The field being integrated\n- `Ne`              - The number of elements in the chunk\n- `cgeom`           - The cell geometry for each cell in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements\n- `probAux`         - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n\nOutput Parameter:\n- `integral` - the integral for this field\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscDS`, `PetscFEIntegrateResidual()`, `PetscFEIntegrateBd()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrate\"))\n\"\"\"\nfunction PetscFEIntegrate(petsclib::PetscLibType, prob::PetscDS, field::PetscInt, Ne::PetscInt, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}) end\n\n@for_petsc function PetscFEIntegrate(petsclib::$UnionPetscLib, prob::PetscDS, field::$PetscInt, Ne::$PetscInt, cgeom::PetscFEGeom, coefficients::Vector{$PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{$PetscScalar} )\n\tintegral = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFEIntegrate, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, $PetscInt, Ptr{PetscFEGeom}, Ptr{$PetscScalar}, PetscDS, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               prob, field, Ne, cgeom, coefficients, probAux, coefficientsAux, integral,\n              )\n\n\n\treturn integral\nend \n\n#=\n\"\"\"\n\tPetscFEIntegrateBd(petsclib::PetscLibType,prob::PetscDS, field::PetscInt, ::Cvoid(obj_func) \nProduce the integral for the given field for a chunk of elements by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `prob`            - The `PetscDS` specifying the discretizations and continuum functions\n- `field`           - The field being integrated\n- `obj_func`        - The function to be integrated\n- `Ne`              - The number of elements in the chunk\n- `geom`            - The face geometry for each face in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements\n- `probAux`         - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n\nOutput Parameter:\n- `integral` - the integral for this field\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscDS`, `PetscFEIntegrateResidual()`, `PetscFEIntegrate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrateBd\"))\n\"\"\"\nfunction PetscFEIntegrateBd(petsclib::PetscLibType, prob::PetscDS, field::PetscInt, ::Cvoid(obj_func) end\n\n@for_petsc function PetscFEIntegrateBd(petsclib::$UnionPetscLib, prob::PetscDS, field::$PetscInt, ::Cvoid(obj_func )\n\n    @chk ccall(\n               (:PetscFEIntegrateBd, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, $PetscInt, Ptr{Cvoid(obj_func}),\n               prob, field, g0,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\telemVec::Vector{PetscScalar} = PetscFEIntegrateResidual(petsclib::PetscLibType,ds::PetscDS, key::PetscFormKey, Ne::PetscInt, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal) \nProduce the element residual vector for a chunk of elements by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `ds`              - The `PetscDS` specifying the discretizations and continuum functions\n- `key`             - The (label+value, field) being integrated\n- `Ne`              - The number of elements in the chunk\n- `cgeom`           - The cell geometry for each cell in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements\n- `coefficients_t`  - The array of FEM basis time derivative coefficients for the elements\n- `probAux`         - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n- `t`               - The time\n\nOutput Parameter:\n- `elemVec` - the element residual vectors from each element\n\nLevel: intermediate\n\n-seealso: `PetscFEIntegrateBdResidual()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrateResidual\"))\n\"\"\"\nfunction PetscFEIntegrateResidual(petsclib::PetscLibType, ds::PetscDS, key::PetscFormKey, Ne::PetscInt, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal) end\n\n@for_petsc function PetscFEIntegrateResidual(petsclib::$UnionPetscLib, ds::PetscDS, key::PetscFormKey, Ne::$PetscInt, cgeom::PetscFEGeom, coefficients::Vector{$PetscScalar}, coefficients_t::Vector{$PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{$PetscScalar}, t::$PetscReal )\n\telemVec = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFEIntegrateResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscFormKey, $PetscInt, Ptr{PetscFEGeom}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, PetscDS, Ptr{$PetscScalar}, $PetscReal, Ptr{$PetscScalar}),\n               ds, key, Ne, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec,\n              )\n\n\n\treturn elemVec\nend \n\n\"\"\"\n\telemVec::Vector{PetscScalar} = PetscFEIntegrateBdResidual(petsclib::PetscLibType,ds::PetscDS, wf::PetscWeakForm, key::PetscFormKey, Ne::PetscInt, fgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal) \nProduce the element residual vector for a chunk of elements by quadrature integration over a boundary\n\nNot Collective\n\nInput Parameters:\n- `ds`              - The `PetscDS` specifying the discretizations and continuum functions\n- `wf`              - The PetscWeakForm object holding the pointwise functions\n- `key`             - The (label+value, field) being integrated\n- `Ne`              - The number of elements in the chunk\n- `fgeom`           - The face geometry for each cell in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements\n- `coefficients_t`  - The array of FEM basis time derivative coefficients for the elements\n- `probAux`         - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n- `t`               - The time\n\nOutput Parameter:\n- `elemVec` - the element residual vectors from each element\n\nLevel: intermediate\n\n-seealso: `PetscFEIntegrateResidual()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrateBdResidual\"))\n\"\"\"\nfunction PetscFEIntegrateBdResidual(petsclib::PetscLibType, ds::PetscDS, wf::PetscWeakForm, key::PetscFormKey, Ne::PetscInt, fgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal) end\n\n@for_petsc function PetscFEIntegrateBdResidual(petsclib::$UnionPetscLib, ds::PetscDS, wf::PetscWeakForm, key::PetscFormKey, Ne::$PetscInt, fgeom::PetscFEGeom, coefficients::Vector{$PetscScalar}, coefficients_t::Vector{$PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{$PetscScalar}, t::$PetscReal )\n\telemVec = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFEIntegrateBdResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscWeakForm, PetscFormKey, $PetscInt, Ptr{PetscFEGeom}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, PetscDS, Ptr{$PetscScalar}, $PetscReal, Ptr{$PetscScalar}),\n               ds, wf, key, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec,\n              )\n\n\n\treturn elemVec\nend \n\n\"\"\"\n\telemVec::Vector{PetscScalar} = PetscFEIntegrateHybridResidual(petsclib::PetscLibType,ds::PetscDS, dsIn::PetscDS, key::PetscFormKey, s::PetscInt, Ne::PetscInt, fgeom::PetscFEGeom, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal) \nProduce the element residual vector for a chunk of hybrid element faces by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `ds`              - The `PetscDS` specifying the discretizations and continuum functions\n- `dsIn`            - The `PetscDS` specifying the discretizations and continuum functions for input\n- `key`             - The (label+value, field) being integrated\n- `s`               - The side of the cell being integrated, 0 for negative and 1 for positive\n- `Ne`              - The number of elements in the chunk\n- `fgeom`           - The face geometry for each cell in the chunk\n- `cgeom`           - The cell geometry for each neighbor cell in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements\n- `coefficients_t`  - The array of FEM basis time derivative coefficients for the elements\n- `probAux`         - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n- `t`               - The time\n\nOutput Parameter:\n- `elemVec` - the element residual vectors from each element\n\nLevel: developer\n\n-seealso: `PetscFEIntegrateResidual()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrateHybridResidual\"))\n\"\"\"\nfunction PetscFEIntegrateHybridResidual(petsclib::PetscLibType, ds::PetscDS, dsIn::PetscDS, key::PetscFormKey, s::PetscInt, Ne::PetscInt, fgeom::PetscFEGeom, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal) end\n\n@for_petsc function PetscFEIntegrateHybridResidual(petsclib::$UnionPetscLib, ds::PetscDS, dsIn::PetscDS, key::PetscFormKey, s::$PetscInt, Ne::$PetscInt, fgeom::PetscFEGeom, cgeom::PetscFEGeom, coefficients::Vector{$PetscScalar}, coefficients_t::Vector{$PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{$PetscScalar}, t::$PetscReal )\n\telemVec = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFEIntegrateHybridResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDS, PetscFormKey, $PetscInt, $PetscInt, Ptr{PetscFEGeom}, Ptr{PetscFEGeom}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, PetscDS, Ptr{$PetscScalar}, $PetscReal, Ptr{$PetscScalar}),\n               ds, dsIn, key, s, Ne, fgeom, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, elemVec,\n              )\n\n\n\treturn elemVec\nend \n\n\"\"\"\n\telemMat::Vector{PetscScalar} = PetscFEIntegrateJacobian(petsclib::PetscLibType,rds::PetscDS, cds::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::PetscInt, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, dsAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal) \nProduce the element Jacobian for a chunk of elements by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `rds`             - The `PetscDS` specifying the row discretizations and continuum functions\n- `cds`             - The `PetscDS` specifying the column discretizations\n- `jtype`           - The type of matrix pointwise functions that should be used\n- `key`             - The (label+value, fieldI*Nf + fieldJ) being integrated\n- `Ne`              - The number of elements in the chunk\n- `cgeom`           - The cell geometry for each cell in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements for the Jacobian evaluation point\n- `coefficients_t`  - The array of FEM basis time derivative coefficients for the elements\n- `dsAux`           - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n- `t`               - The time\n- `u_tshift`        - A multiplier for the dF/du_t term (as opposed to the dF/du term)\n\nOutput Parameter:\n- `elemMat` - the element matrices for the Jacobian from each element\n\nLevel: intermediate\n\n-seealso: `PetscFEIntegrateResidual()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrateJacobian\"))\n\"\"\"\nfunction PetscFEIntegrateJacobian(petsclib::PetscLibType, rds::PetscDS, cds::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::PetscInt, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, dsAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal) end\n\n@for_petsc function PetscFEIntegrateJacobian(petsclib::$UnionPetscLib, rds::PetscDS, cds::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::$PetscInt, cgeom::PetscFEGeom, coefficients::Vector{$PetscScalar}, coefficients_t::Vector{$PetscScalar}, dsAux::PetscDS, coefficientsAux::Vector{$PetscScalar}, t::$PetscReal, u_tshift::$PetscReal )\n\telemMat = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFEIntegrateJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDS, PetscFEJacobianType, PetscFormKey, $PetscInt, Ptr{PetscFEGeom}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, PetscDS, Ptr{$PetscScalar}, $PetscReal, $PetscReal, Ptr{$PetscScalar}),\n               rds, cds, jtype, key, Ne, cgeom, coefficients, coefficients_t, dsAux, coefficientsAux, t, u_tshift, elemMat,\n              )\n\n\n\treturn elemMat\nend \n\n\"\"\"\n\telemMat::Vector{PetscScalar} = PetscFEIntegrateBdJacobian(petsclib::PetscLibType,ds::PetscDS, wf::PetscWeakForm, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::PetscInt, fgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal) \nProduce the boundary element Jacobian for a chunk of elements by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `ds`              - The `PetscDS` specifying the discretizations and continuum functions\n- `wf`              - The PetscWeakForm holding the pointwise functions\n- `jtype`           - The type of matrix pointwise functions that should be used\n- `key`             - The (label+value, fieldI*Nf + fieldJ) being integrated\n- `Ne`              - The number of elements in the chunk\n- `fgeom`           - The face geometry for each cell in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements for the Jacobian evaluation point\n- `coefficients_t`  - The array of FEM basis time derivative coefficients for the elements\n- `probAux`         - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n- `t`               - The time\n- `u_tshift`        - A multiplier for the dF/du_t term (as opposed to the dF/du term)\n\nOutput Parameter:\n- `elemMat` - the element matrices for the Jacobian from each element\n\nLevel: intermediate\n\n-seealso: `PetscFEIntegrateJacobian()`, `PetscFEIntegrateResidual()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrateBdJacobian\"))\n\"\"\"\nfunction PetscFEIntegrateBdJacobian(petsclib::PetscLibType, ds::PetscDS, wf::PetscWeakForm, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::PetscInt, fgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal) end\n\n@for_petsc function PetscFEIntegrateBdJacobian(petsclib::$UnionPetscLib, ds::PetscDS, wf::PetscWeakForm, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::$PetscInt, fgeom::PetscFEGeom, coefficients::Vector{$PetscScalar}, coefficients_t::Vector{$PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{$PetscScalar}, t::$PetscReal, u_tshift::$PetscReal )\n\telemMat = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFEIntegrateBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscWeakForm, PetscFEJacobianType, PetscFormKey, $PetscInt, Ptr{PetscFEGeom}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, PetscDS, Ptr{$PetscScalar}, $PetscReal, $PetscReal, Ptr{$PetscScalar}),\n               ds, wf, jtype, key, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat,\n              )\n\n\n\treturn elemMat\nend \n\n\"\"\"\n\telemMat::Vector{PetscScalar} = PetscFEIntegrateHybridJacobian(petsclib::PetscLibType,ds::PetscDS, dsIn::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, s::PetscInt, Ne::PetscInt, fgeom::PetscFEGeom, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal) \nProduce the boundary element Jacobian for a chunk of hybrid elements by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `ds`              - The `PetscDS` specifying the discretizations and continuum functions for the output\n- `dsIn`            - The `PetscDS` specifying the discretizations and continuum functions for the input\n- `jtype`           - The type of matrix pointwise functions that should be used\n- `key`             - The (label+value, fieldI*Nf + fieldJ) being integrated\n- `s`               - The side of the cell being integrated, 0 for negative and 1 for positive\n- `Ne`              - The number of elements in the chunk\n- `fgeom`           - The face geometry for each cell in the chunk\n- `cgeom`           - The cell geometry for each neighbor cell in the chunk\n- `coefficients`    - The array of FEM basis coefficients for the elements for the Jacobian evaluation point\n- `coefficients_t`  - The array of FEM basis time derivative coefficients for the elements\n- `probAux`         - The `PetscDS` specifying the auxiliary discretizations\n- `coefficientsAux` - The array of FEM auxiliary basis coefficients for the elements\n- `t`               - The time\n- `u_tshift`        - A multiplier for the dF/du_t term (as opposed to the dF/du term)\n\nOutput Parameter:\n- `elemMat` - the element matrices for the Jacobian from each element\n\nLevel: developer\n\n-seealso: `PetscFEIntegrateJacobian()`, `PetscFEIntegrateResidual()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEIntegrateHybridJacobian\"))\n\"\"\"\nfunction PetscFEIntegrateHybridJacobian(petsclib::PetscLibType, ds::PetscDS, dsIn::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, s::PetscInt, Ne::PetscInt, fgeom::PetscFEGeom, cgeom::PetscFEGeom, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal) end\n\n@for_petsc function PetscFEIntegrateHybridJacobian(petsclib::$UnionPetscLib, ds::PetscDS, dsIn::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, s::$PetscInt, Ne::$PetscInt, fgeom::PetscFEGeom, cgeom::PetscFEGeom, coefficients::Vector{$PetscScalar}, coefficients_t::Vector{$PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{$PetscScalar}, t::$PetscReal, u_tshift::$PetscReal )\n\telemMat = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFEIntegrateHybridJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscDS, PetscDS, PetscFEJacobianType, PetscFormKey, $PetscInt, $PetscInt, Ptr{PetscFEGeom}, Ptr{PetscFEGeom}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, PetscDS, Ptr{$PetscScalar}, $PetscReal, $PetscReal, Ptr{$PetscScalar}),\n               ds, dsIn, jtype, key, s, Ne, fgeom, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat,\n              )\n\n\n\treturn elemMat\nend \n\n\"\"\"\n\tPetscFEGetHeightSubspace(petsclib::PetscLibType,fe::PetscFE, height::PetscInt, subfe::PetscFE) \nGet the subspace of this space for a mesh point of a given height\n\nInput Parameters:\n- `fe`     - The finite element space\n- `height` - The height of the `DMPLEX` point\n\nOutput Parameter:\n- `subfe` - The subspace of this `PetscFE` space\n\nLevel: advanced\n\n-seealso: `PetscFECreateDefault()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGetHeightSubspace\"))\n\"\"\"\nfunction PetscFEGetHeightSubspace(petsclib::PetscLibType, fe::PetscFE, height::PetscInt, subfe::PetscFE) end\n\n@for_petsc function PetscFEGetHeightSubspace(petsclib::$UnionPetscLib, fe::PetscFE, height::$PetscInt, subfe::PetscFE )\n\n    @chk ccall(\n               (:PetscFEGetHeightSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, Ptr{PetscFE}),\n               fe, height, subfe,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFERefine(petsclib::PetscLibType,fe::PetscFE, feRef::PetscFE) \nCreate a \"refined\" `PetscFE` object that refines the reference cell into\nsmaller copies.\n\nCollective\n\nInput Parameter:\n- `fe` - The initial `PetscFE`\n\nOutput Parameter:\n- `feRef` - The refined `PetscFE`\n\nLevel: advanced\n\n-seealso: `PetscFEType`, `PetscFECreate()`, `PetscFESetType()`\n\n# External Links\n$(_doc_external(\"DM/PetscFERefine\"))\n\"\"\"\nfunction PetscFERefine(petsclib::PetscLibType, fe::PetscFE, feRef::PetscFE) end\n\n@for_petsc function PetscFERefine(petsclib::$UnionPetscLib, fe::PetscFE, feRef::PetscFE )\n\n    @chk ccall(\n               (:PetscFERefine, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscFE}),\n               fe, feRef,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfem::PetscFE = PetscFECreateFromSpaces(petsclib::PetscLibType,P::PetscSpace, Q::PetscDualSpace, q::PetscQuadrature, fq::PetscQuadrature) \nCreate a `PetscFE` from the basis and dual spaces\n\nCollective\n\nInput Parameters:\n- `P`  - The basis space\n- `Q`  - The dual space\n- `q`  - The cell quadrature\n- `fq` - The face quadrature\n\nOutput Parameter:\n- `fem` - The `PetscFE` object\n\nLevel: beginner\n\n-seealso: `PetscFE`, `PetscSpace`, `PetscDualSpace`, `PetscQuadrature`,\n`PetscFECreateLagrangeByCell()`, `PetscFECreateDefault()`, `PetscFECreateByCell()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateFromSpaces\"))\n\"\"\"\nfunction PetscFECreateFromSpaces(petsclib::PetscLibType, P::PetscSpace, Q::PetscDualSpace, q::PetscQuadrature, fq::PetscQuadrature) end\n\n@for_petsc function PetscFECreateFromSpaces(petsclib::$UnionPetscLib, P::PetscSpace, Q::PetscDualSpace, q::PetscQuadrature, fq::PetscQuadrature )\n\tfem_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateFromSpaces, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscDualSpace, PetscQuadrature, PetscQuadrature, Ptr{PetscFE}),\n               P, Q, q, fq, fem_,\n              )\n\n\tfem = fem_[]\n\n\treturn fem\nend \n\n\"\"\"\n\tfem::PetscFE = PetscFECreateDefault(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, isSimplex::PetscBool, prefix::String, qorder::PetscInt) \nCreate a `PetscFE` for basic FEM computation\n\nCollective\n\nInput Parameters:\n- `comm`      - The MPI comm\n- `dim`       - The spatial dimension\n- `Nc`        - The number of components\n- `isSimplex` - Flag for simplex reference cell, otherwise its a tensor product\n- `prefix`    - The options prefix, or `NULL`\n- `qorder`    - The quadrature order or `PETSC_DETERMINE` to use `PetscSpace` polynomial degree\n\nOutput Parameter:\n- `fem` - The `PetscFE` object\n\nLevel: beginner\n\n-seealso: `PetscFECreateLagrange()`, `PetscFECreateByCell()`, `PetscSpaceSetFromOptions()`, `PetscDualSpaceSetFromOptions()`, `PetscFESetFromOptions()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateDefault\"))\n\"\"\"\nfunction PetscFECreateDefault(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, isSimplex::PetscBool, prefix::String, qorder::PetscInt) end\n\n@for_petsc function PetscFECreateDefault(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, Nc::$PetscInt, isSimplex::PetscBool, prefix::String, qorder::$PetscInt )\n\tfem_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateDefault, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, PetscBool, Ptr{Cchar}, $PetscInt, Ptr{PetscFE}),\n               comm, dim, Nc, isSimplex, prefix, qorder, fem_,\n              )\n\n\tfem = fem_[]\n\n\treturn fem\nend \n\n\"\"\"\n\tfem::PetscFE = PetscFECreateByCell(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, ct::DMPolytopeType, prefix::String, qorder::PetscInt) \nCreate a `PetscFE` for basic FEM computation\n\nCollective\n\nInput Parameters:\n- `comm`   - The MPI comm\n- `dim`    - The spatial dimension\n- `Nc`     - The number of components\n- `ct`     - The celltype of the reference cell\n- `prefix` - The options prefix, or `NULL`\n- `qorder` - The quadrature order or `PETSC_DETERMINE` to use `PetscSpace` polynomial degree\n\nOutput Parameter:\n- `fem` - The `PetscFE` object\n\nLevel: beginner\n\n-seealso: `PetscFECreateDefault()`, `PetscFECreateLagrange()`, `PetscSpaceSetFromOptions()`, `PetscDualSpaceSetFromOptions()`, `PetscFESetFromOptions()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateByCell\"))\n\"\"\"\nfunction PetscFECreateByCell(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, ct::DMPolytopeType, prefix::String, qorder::PetscInt) end\n\n@for_petsc function PetscFECreateByCell(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, Nc::$PetscInt, ct::DMPolytopeType, prefix::String, qorder::$PetscInt )\n\tfem_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateByCell, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, DMPolytopeType, Ptr{Cchar}, $PetscInt, Ptr{PetscFE}),\n               comm, dim, Nc, ct, prefix, qorder, fem_,\n              )\n\n\tfem = fem_[]\n\n\treturn fem\nend \n\n\"\"\"\n\tfem::PetscFE = PetscFECreateLagrange(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, isSimplex::PetscBool, k::PetscInt, qorder::PetscInt) \nCreate a `PetscFE` for the basic Lagrange space of degree k\n\nCollective\n\nInput Parameters:\n- `comm`      - The MPI comm\n- `dim`       - The spatial dimension\n- `Nc`        - The number of components\n- `isSimplex` - Flag for simplex reference cell, otherwise its a tensor product\n- `k`         - The degree k of the space\n- `qorder`    - The quadrature order or `PETSC_DETERMINE` to use `PetscSpace` polynomial degree\n\nOutput Parameter:\n- `fem` - The `PetscFE` object\n\nLevel: beginner\n\n-seealso: `PetscFECreateLagrangeByCell()`, `PetscFECreateDefault()`, `PetscFECreateByCell()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateLagrange\"))\n\"\"\"\nfunction PetscFECreateLagrange(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, isSimplex::PetscBool, k::PetscInt, qorder::PetscInt) end\n\n@for_petsc function PetscFECreateLagrange(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, Nc::$PetscInt, isSimplex::PetscBool, k::$PetscInt, qorder::$PetscInt )\n\tfem_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateLagrange, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, PetscBool, $PetscInt, $PetscInt, Ptr{PetscFE}),\n               comm, dim, Nc, isSimplex, k, qorder, fem_,\n              )\n\n\tfem = fem_[]\n\n\treturn fem\nend \n\n\"\"\"\n\tfem::PetscFE = PetscFECreateLagrangeByCell(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, ct::DMPolytopeType, k::PetscInt, qorder::PetscInt) \nCreate a `PetscFE` for the basic Lagrange space of degree k\n\nCollective\n\nInput Parameters:\n- `comm`   - The MPI comm\n- `dim`    - The spatial dimension\n- `Nc`     - The number of components\n- `ct`     - The celltype of the reference cell\n- `k`      - The degree k of the space\n- `qorder` - The quadrature order or `PETSC_DETERMINE` to use `PetscSpace` polynomial degree\n\nOutput Parameter:\n- `fem` - The `PetscFE` object\n\nLevel: beginner\n\n-seealso: `PetscFECreateLagrange()`, `PetscFECreateDefault()`, `PetscFECreateByCell()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateLagrangeByCell\"))\n\"\"\"\nfunction PetscFECreateLagrangeByCell(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, ct::DMPolytopeType, k::PetscInt, qorder::PetscInt) end\n\n@for_petsc function PetscFECreateLagrangeByCell(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, Nc::$PetscInt, ct::DMPolytopeType, k::$PetscInt, qorder::$PetscInt )\n\tfem_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateLagrangeByCell, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, DMPolytopeType, $PetscInt, $PetscInt, Ptr{PetscFE}),\n               comm, dim, Nc, ct, k, qorder, fem_,\n              )\n\n\tfem = fem_[]\n\n\treturn fem\nend \n\n\"\"\"\n\tPetscFELimitDegree(petsclib::PetscLibType,fe::PetscFE, minDegree::PetscInt, maxDegree::PetscInt, newfe::PetscFE) \nCopy a `PetscFE` but limit the degree to be in the given range\n\nCollective\n\nInput Parameters:\n- `fe`        - The `PetscFE`\n- `minDegree` - The minimum degree, or `PETSC_DETERMINE` for no limit\n- `maxDegree` - The maximum degree, or `PETSC_DETERMINE` for no limit\n\nOutput Parameter:\n- `newfe` - The `PetscFE` object\n\nLevel: advanced\n\n-seealso: `PetscFECreateLagrange()`, `PetscFECreateDefault()`, `PetscFECreateByCell()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFELimitDegree\"))\n\"\"\"\nfunction PetscFELimitDegree(petsclib::PetscLibType, fe::PetscFE, minDegree::PetscInt, maxDegree::PetscInt, newfe::PetscFE) end\n\n@for_petsc function PetscFELimitDegree(petsclib::$UnionPetscLib, fe::PetscFE, minDegree::$PetscInt, maxDegree::$PetscInt, newfe::PetscFE )\n\n    @chk ccall(\n               (:PetscFELimitDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, $PetscInt, Ptr{PetscFE}),\n               fe, minDegree, maxDegree, newfe,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdgfe::PetscFE = PetscFECreateBrokenElement(petsclib::PetscLibType,cgfe::PetscFE) \nCreate a discontinuous version of the input `PetscFE`\n\nCollective\n\nInput Parameters:\n- `cgfe` - The continuous `PetscFE` object\n\nOutput Parameter:\n- `dgfe` - The discontinuous `PetscFE` object\n\nLevel: advanced\n\n-seealso: `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`, `PetscFECreateLagrange()`, `PetscFECreateLagrangeByCell()`, `PetscDualSpaceLagrangeSetContinuity()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateBrokenElement\"))\n\"\"\"\nfunction PetscFECreateBrokenElement(petsclib::PetscLibType, cgfe::PetscFE) end\n\n@for_petsc function PetscFECreateBrokenElement(petsclib::$UnionPetscLib, cgfe::PetscFE )\n\tdgfe_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateBrokenElement, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscFE}),\n               cgfe, dgfe_,\n              )\n\n\tdgfe = dgfe_[]\n\n\treturn dgfe\nend \n\n\"\"\"\n\tPetscFESetName(petsclib::PetscLibType,fe::PetscFE, name::String) \nNames the `PetscFE` and its subobjects\n\nNot Collective\n\nInput Parameters:\n- `fe`   - The `PetscFE`\n- `name` - The name\n\nLevel: intermediate\n\n-seealso: `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFESetName\"))\n\"\"\"\nfunction PetscFESetName(petsclib::PetscLibType, fe::PetscFE, name::String) end\n\n@for_petsc function PetscFESetName(petsclib::$UnionPetscLib, fe::PetscFE, name::String )\n\n    @chk ccall(\n               (:PetscFESetName, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{Cchar}),\n               fe, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcgeom::PetscFEGeom = PetscFECreateCellGeometry(petsclib::PetscLibType,fe::PetscFE, quad::PetscQuadrature) \n\n# External Links\n$(_doc_external(\"DM/PetscFECreateCellGeometry\"))\n\"\"\"\nfunction PetscFECreateCellGeometry(petsclib::PetscLibType, fe::PetscFE, quad::PetscQuadrature) end\n\n@for_petsc function PetscFECreateCellGeometry(petsclib::$UnionPetscLib, fe::PetscFE, quad::PetscQuadrature )\n\tcgeom_ = Ref{PetscFEGeom}()\n\n    @chk ccall(\n               (:PetscFECreateCellGeometry, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscQuadrature, Ptr{PetscFEGeom}),\n               fe, quad, cgeom_,\n              )\n\n\tcgeom = cgeom_[]\n\n\treturn cgeom\nend \n\n\"\"\"\n\tPetscFEDestroyCellGeometry(petsclib::PetscLibType,fe::PetscFE, cgeom::PetscFEGeom) \n\n# External Links\n$(_doc_external(\"DM/PetscFEDestroyCellGeometry\"))\n\"\"\"\nfunction PetscFEDestroyCellGeometry(petsclib::PetscLibType, fe::PetscFE, cgeom::PetscFEGeom) end\n\n@for_petsc function PetscFEDestroyCellGeometry(petsclib::$UnionPetscLib, fe::PetscFE, cgeom::PetscFEGeom )\n\n    @chk ccall(\n               (:PetscFEDestroyCellGeometry, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscFEGeom}),\n               fe, cgeom,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgeom::PetscFEGeom = PetscFEGeomCreate(petsclib::PetscLibType,quad::PetscQuadrature, numCells::PetscInt, dimEmbed::PetscInt, mode::PetscFEGeomMode) \nCreate a `PetscFEGeom` object to manage geometry for a group of cells\n\nInput Parameters:\n- `quad`     - A `PetscQuadrature` determining the tabulation\n- `numCells` - The number of cells in the group\n- `dimEmbed` - The coordinate dimension\n- `mode`     - Type of geometry data to store\n\nOutput Parameter:\n- `geom` - The `PetscFEGeom` object, which is a struct not a `PetscObject`\n\nLevel: beginner\n\n-seealso: `PetscFEGeom`, `PetscQuadrature`, `PetscFEGeomDestroy()`, `PetscFEGeomComplete()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGeomCreate\"))\n\"\"\"\nfunction PetscFEGeomCreate(petsclib::PetscLibType, quad::PetscQuadrature, numCells::PetscInt, dimEmbed::PetscInt, mode::PetscFEGeomMode) end\n\n@for_petsc function PetscFEGeomCreate(petsclib::$UnionPetscLib, quad::PetscQuadrature, numCells::$PetscInt, dimEmbed::$PetscInt, mode::PetscFEGeomMode )\n\tgeom_ = Ref{PetscFEGeom}()\n\n    @chk ccall(\n               (:PetscFEGeomCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, $PetscInt, $PetscInt, PetscFEGeomMode, PetscFEGeom),\n               quad, numCells, dimEmbed, mode, geom_,\n              )\n\n\tgeom = geom_[]\n\n\treturn geom\nend \n\n\"\"\"\n\tPetscFEGeomDestroy(petsclib::PetscLibType,geom::PetscFEGeom) \nDestroy a `PetscFEGeom` object\n\nInput Parameter:\n- `geom` - `PetscFEGeom` object\n\nLevel: beginner\n\n-seealso: `PetscFEGeom`, `PetscFEGeomCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGeomDestroy\"))\n\"\"\"\nfunction PetscFEGeomDestroy(petsclib::PetscLibType, geom::PetscFEGeom) end\n\n@for_petsc function PetscFEGeomDestroy(petsclib::$UnionPetscLib, geom::PetscFEGeom )\n\n    @chk ccall(\n               (:PetscFEGeomDestroy, $petsc_library),\n               PetscErrorCode,\n               (PetscFEGeom,),\n               geom,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGeomGetChunk(petsclib::PetscLibType,geom::PetscFEGeom, cStart::PetscInt, cEnd::PetscInt, chunkGeom::Vector{PetscFEGeom}) \nGet a chunk of cells in the group as a `PetscFEGeom`\n\nInput Parameters:\n- `geom`   - `PetscFEGeom` object\n- `cStart` - The first cell in the chunk\n- `cEnd`   - The first cell not in the chunk\n\nOutput Parameter:\n- `chunkGeom` - an array of cells of length `cEnd` - `cStart`\n\nLevel: intermediate\n\n-seealso: `PetscFEGeom`, `PetscFEGeomRestoreChunk()`, `PetscFEGeomCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGeomGetChunk\"))\n\"\"\"\nfunction PetscFEGeomGetChunk(petsclib::PetscLibType, geom::PetscFEGeom, cStart::PetscInt, cEnd::PetscInt, chunkGeom::Vector{PetscFEGeom}) end\n\n@for_petsc function PetscFEGeomGetChunk(petsclib::$UnionPetscLib, geom::PetscFEGeom, cStart::$PetscInt, cEnd::$PetscInt, chunkGeom::Vector{PetscFEGeom} )\n\tchunkGeom_ = Ref(pointer(chunkGeom))\n\n    @chk ccall(\n               (:PetscFEGeomGetChunk, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{Ptr{PetscFEGeom}}),\n               geom, cStart, cEnd, chunkGeom_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGeomRestoreChunk(petsclib::PetscLibType,geom::PetscFEGeom, cStart::PetscInt, cEnd::PetscInt, chunkGeom::PetscFEGeom) \nRestore the chunk obtained with `PetscFEGeomCreateChunk()`\n\nInput Parameters:\n- `geom`      - `PetscFEGeom` object\n- `cStart`    - The first cell in the chunk\n- `cEnd`      - The first cell not in the chunk\n- `chunkGeom` - The chunk of cells\n\nLevel: intermediate\n\n-seealso: `PetscFEGeom`, `PetscFEGeomGetChunk()`, `PetscFEGeomCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGeomRestoreChunk\"))\n\"\"\"\nfunction PetscFEGeomRestoreChunk(petsclib::PetscLibType, geom::PetscFEGeom, cStart::PetscInt, cEnd::PetscInt, chunkGeom::PetscFEGeom) end\n\n@for_petsc function PetscFEGeomRestoreChunk(petsclib::$UnionPetscLib, geom::PetscFEGeom, cStart::$PetscInt, cEnd::$PetscInt, chunkGeom::PetscFEGeom )\n\n    @chk ccall(\n               (:PetscFEGeomRestoreChunk, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFEGeom}, $PetscInt, $PetscInt, PetscFEGeom),\n               geom, cStart, cEnd, chunkGeom,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGeomGetPoint(petsclib::PetscLibType,geom::PetscFEGeom, c::PetscInt, p::PetscInt, pcoords::Vector{PetscReal}, pgeom::PetscFEGeom) \nGet the geometry for cell `c` at point `p` as a `PetscFEGeom`\n\nInput Parameters:\n- `geom`    - `PetscFEGeom` object\n- `c`       - The cell\n- `p`       - The point\n- `pcoords` - The reference coordinates of point `p`, or `NULL`\n\nOutput Parameter:\n- `pgeom` - The geometry of cell `c` at point `p`\n\nLevel: intermediate\n\n-seealso: `PetscFEGeom`, `PetscFEGeomRestoreChunk()`, `PetscFEGeomCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGeomGetPoint\"))\n\"\"\"\nfunction PetscFEGeomGetPoint(petsclib::PetscLibType, geom::PetscFEGeom, c::PetscInt, p::PetscInt, pcoords::Vector{PetscReal}, pgeom::PetscFEGeom) end\n\n@for_petsc function PetscFEGeomGetPoint(petsclib::$UnionPetscLib, geom::PetscFEGeom, c::$PetscInt, p::$PetscInt, pcoords::Vector{$PetscReal}, pgeom::PetscFEGeom )\n\n    @chk ccall(\n               (:PetscFEGeomGetPoint, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{PetscFEGeom}),\n               geom, c, p, pcoords, pgeom,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGeomGetCellPoint(petsclib::PetscLibType,geom::PetscFEGeom, c::PetscInt, p::PetscInt, pgeom::PetscFEGeom) \nGet the cell geometry for cell `c` at point `p` as a `PetscFEGeom`\n\nInput Parameters:\n- `geom` - `PetscFEGeom` object\n- `c`    - The cell\n- `p`    - The point\n\nOutput Parameter:\n- `pgeom` - The cell geometry of cell `c` at point `p`\n\nLevel: intermediate\n\n-seealso: `PetscFEGeom`, `PetscFEGeomMode`, `PetscFEGeomRestoreChunk()`, `PetscFEGeomCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGeomGetCellPoint\"))\n\"\"\"\nfunction PetscFEGeomGetCellPoint(petsclib::PetscLibType, geom::PetscFEGeom, c::PetscInt, p::PetscInt, pgeom::PetscFEGeom) end\n\n@for_petsc function PetscFEGeomGetCellPoint(petsclib::$UnionPetscLib, geom::PetscFEGeom, c::$PetscInt, p::$PetscInt, pgeom::PetscFEGeom )\n\n    @chk ccall(\n               (:PetscFEGeomGetCellPoint, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFEGeom}, $PetscInt, $PetscInt, Ptr{PetscFEGeom}),\n               geom, c, p, pgeom,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFEGeomComplete(petsclib::PetscLibType,geom::PetscFEGeom) \nCalculate derived quantities from a base geometry specification\n\nInput Parameter:\n- `geom` - `PetscFEGeom` object\n\nLevel: intermediate\n\n-seealso: `PetscFEGeom`, `PetscFEGeomCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEGeomComplete\"))\n\"\"\"\nfunction PetscFEGeomComplete(petsclib::PetscLibType, geom::PetscFEGeom) end\n\n@for_petsc function PetscFEGeomComplete(petsclib::$UnionPetscLib, geom::PetscFEGeom )\n\n    @chk ccall(\n               (:PetscFEGeomComplete, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFEGeom},),\n               geom,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumSubelements::PetscInt,v0::Vector{PetscReal},jac::Vector{PetscReal},invjac::Vector{PetscReal} = PetscFECompositeGetMapping(petsclib::PetscLibType,fem::PetscFE) \nReturns the mappings from the reference element to each subelement\n\nNot Collective\n\nInput Parameter:\n- `fem` - The `PetscFE` object\n\nOutput Parameters:\n- `numSubelements` - The number of sub elements\n- `v0`             - The affine transformation for each element, an array of length dim * Nc. Pass `NULL` to ignore.\n- `jac`            - The Jacobian for each element, an array of length dim^2 * Nc. Pass `NULL` to ignore.\n- `invjac`         - The inverse of the Jacobian, an array of length dim^2 * Nc. Pass `NULL` to ignore.\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFECreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFECompositeGetMapping\"))\n\"\"\"\nfunction PetscFECompositeGetMapping(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFECompositeGetMapping(petsclib::$UnionPetscLib, fem::PetscFE )\n\tnumSubelements_ = Ref{$PetscInt}()\n\tv0_ = Ref{Ptr{$PetscReal}}()\n\tjac_ = Ref{Ptr{$PetscReal}}()\n\tinvjac_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:PetscFECompositeGetMapping, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               fem, numSubelements_, v0_, jac_, invjac_,\n              )\n\n\tnumSubelements = numSubelements_[]\n\tv0 = unsafe_wrap(Array, v0_[], VecGetLocalSize(petsclib, x); own = false)\n\tjac = unsafe_wrap(Array, jac_[], VecGetLocalSize(petsclib, x); own = false)\n\tinvjac = unsafe_wrap(Array, invjac_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn numSubelements,v0,jac,invjac\nend \n\n\"\"\"\n\tPetscFEOpenCLSetRealType(petsclib::PetscLibType,fem::PetscFE, realType::PetscDataType) \nSet the scalar type for running on the OpenCL accelerator\n\nInput Parameters:\n- `fem`      - The `PetscFE`\n- `realType` - The scalar type\n\nLevel: developer\n\n-seealso: `PetscFE`, `PetscFEOpenCLGetRealType()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEOpenCLSetRealType\"))\n\"\"\"\nfunction PetscFEOpenCLSetRealType(petsclib::PetscLibType, fem::PetscFE, realType::PetscDataType) end\n\n@for_petsc function PetscFEOpenCLSetRealType(petsclib::$UnionPetscLib, fem::PetscFE, realType::PetscDataType )\n\n    @chk ccall(\n               (:PetscFEOpenCLSetRealType, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, PetscDataType),\n               fem, realType,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trealType::PetscDataType = PetscFEOpenCLGetRealType(petsclib::PetscLibType,fem::PetscFE) \nGet the scalar type for running on the OpenCL accelerator\n\nInput Parameter:\n- `fem` - The `PetscFE`\n\nOutput Parameter:\n- `realType` - The scalar type\n\nLevel: developer\n\n-seealso: `PetscFE`, `PetscFEOpenCLSetRealType()`\n\n# External Links\n$(_doc_external(\"DM/PetscFEOpenCLGetRealType\"))\n\"\"\"\nfunction PetscFEOpenCLGetRealType(petsclib::PetscLibType, fem::PetscFE) end\n\n@for_petsc function PetscFEOpenCLGetRealType(petsclib::$UnionPetscLib, fem::PetscFE )\n\trealType_ = Ref{PetscDataType}()\n\n    @chk ccall(\n               (:PetscFEOpenCLGetRealType, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, Ptr{PetscDataType}),\n               fem, realType_,\n              )\n\n\trealType = unsafe_string(realType_[])\n\n\treturn realType\nend \n\n\"\"\"\n\tvector_fe::PetscFE = PetscFECreateVector(petsclib::PetscLibType,scalar_fe::PetscFE, num_copies::PetscInt, interleave_basis::PetscBool, interleave_components::PetscBool) \nCreate a vector\n`PetscFE`.\n\nCollective\n\nInput Parameters:\n- `scalar_fe`             - a `PetscFE` finite element\n- `num_copies`            - a positive integer\n- `interleave_basis`      - if `PETSC_TRUE`, the first `num_copies` basis vectors\nof the output finite element will be copies of the\nfirst basis vector of `scalar_fe`, and so on for the\nother basis vectors; otherwise all of the first-copy\nbasis vectors will come first, followed by all of the\nsecond-copy, and so on.\n- `interleave_components` - if `PETSC_TRUE`, the first `num_copies` components\nof the output finite element will be copies of the\nfirst component of `scalar_fe`, and so on for the\nother components; otherwise all of the first-copy\ncomponents will come first, followed by all of the\nsecond-copy, and so on.\n\nOutput Parameter:\n- `vector_fe` - a `PetscFE` of type `PETSCFEVECTOR` that represent a discretization space with `num_copies` copies of `scalar_fe`\n\nLevel: intermediate\n\n-seealso: `PetscFE`, `PetscFEType`, `PetscFECreate()`, `PetscFESetType()`, `PETSCFEBASIC`, `PETSCFEVECTOR`\n\n# External Links\n$(_doc_external(\"DM/PetscFECreateVector\"))\n\"\"\"\nfunction PetscFECreateVector(petsclib::PetscLibType, scalar_fe::PetscFE, num_copies::PetscInt, interleave_basis::PetscBool, interleave_components::PetscBool) end\n\n@for_petsc function PetscFECreateVector(petsclib::$UnionPetscLib, scalar_fe::PetscFE, num_copies::$PetscInt, interleave_basis::PetscBool, interleave_components::PetscBool )\n\tvector_fe_ = Ref{PetscFE}()\n\n    @chk ccall(\n               (:PetscFECreateVector, $petsc_library),\n               PetscErrorCode,\n               (PetscFE, $PetscInt, PetscBool, PetscBool, Ptr{PetscFE}),\n               scalar_fe, num_copies, interleave_basis, interleave_components, vector_fe_,\n              )\n\n\tvector_fe = vector_fe_[]\n\n\treturn vector_fe\nend \n\n\"\"\"\n\tq::PetscQuadrature = PetscQuadratureCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreate a `PetscQuadrature` object\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscQuadrature` object\n\nOutput Parameter:\n- `q` - The `PetscQuadrature` object\n\nLevel: beginner\n\n-seealso: `PetscQuadrature`, `Petscquadraturedestroy()`, `PetscQuadratureGetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureCreate\"))\n\"\"\"\nfunction PetscQuadratureCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscQuadratureCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tq_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:PetscQuadratureCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscQuadrature}),\n               comm, q_,\n              )\n\n\tq = q_[]\n\n\treturn q\nend \n\n\"\"\"\n\tr::PetscQuadrature = PetscQuadratureDuplicate(petsclib::PetscLibType,q::PetscQuadrature) \nCreate a deep copy of the `PetscQuadrature` object\n\nCollective\n\nInput Parameter:\n- `q` - The `PetscQuadrature` object\n\nOutput Parameter:\n- `r` - The new `PetscQuadrature` object\n\nLevel: beginner\n\n-seealso: `PetscQuadrature`, `PetscQuadratureCreate()`, `PetscQuadratureDestroy()`, `PetscQuadratureGetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureDuplicate\"))\n\"\"\"\nfunction PetscQuadratureDuplicate(petsclib::PetscLibType, q::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureDuplicate(petsclib::$UnionPetscLib, q::PetscQuadrature )\n\tr_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:PetscQuadratureDuplicate, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, Ptr{PetscQuadrature}),\n               q, r_,\n              )\n\n\tr = r_[]\n\n\treturn r\nend \n\n\"\"\"\n\tPetscQuadratureDestroy(petsclib::PetscLibType,q::PetscQuadrature) \nDestroys a `PetscQuadrature` object\n\nCollective\n\nInput Parameter:\n- `q` - The `PetscQuadrature` object\n\nLevel: beginner\n\n-seealso: `PetscQuadrature`, `PetscQuadratureCreate()`, `PetscQuadratureGetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureDestroy\"))\n\"\"\"\nfunction PetscQuadratureDestroy(petsclib::PetscLibType, q::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureDestroy(petsclib::$UnionPetscLib, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscQuadratureDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscQuadrature},),\n               q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tct::DMPolytopeType = PetscQuadratureGetCellType(petsclib::PetscLibType,q::PetscQuadrature) \nReturn the cell type of the integration domain\n\nNot Collective\n\nInput Parameter:\n- `q` - The `PetscQuadrature` object\n\nOutput Parameter:\n- `ct` - The cell type of the integration domain\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureSetCellType()`, `PetscQuadratureGetData()`, `PetscQuadratureSetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureGetCellType\"))\n\"\"\"\nfunction PetscQuadratureGetCellType(petsclib::PetscLibType, q::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureGetCellType(petsclib::$UnionPetscLib, q::PetscQuadrature )\n\tct_ = Ref{DMPolytopeType}()\n\n    @chk ccall(\n               (:PetscQuadratureGetCellType, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, Ptr{DMPolytopeType}),\n               q, ct_,\n              )\n\n\tct = unsafe_string(ct_[])\n\n\treturn ct\nend \n\n\"\"\"\n\tPetscQuadratureSetCellType(petsclib::PetscLibType,q::PetscQuadrature, ct::DMPolytopeType) \nSet the cell type of the integration domain\n\nNot Collective\n\nInput Parameters:\n- `q`  - The `PetscQuadrature` object\n- `ct` - The cell type of the integration domain\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureGetCellType()`, `PetscQuadratureGetData()`, `PetscQuadratureSetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureSetCellType\"))\n\"\"\"\nfunction PetscQuadratureSetCellType(petsclib::PetscLibType, q::PetscQuadrature, ct::DMPolytopeType) end\n\n@for_petsc function PetscQuadratureSetCellType(petsclib::$UnionPetscLib, q::PetscQuadrature, ct::DMPolytopeType )\n\n    @chk ccall(\n               (:PetscQuadratureSetCellType, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, DMPolytopeType),\n               q, ct,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\torder::PetscInt = PetscQuadratureGetOrder(petsclib::PetscLibType,q::PetscQuadrature) \nReturn the order of the method in the `PetscQuadrature`\n\nNot Collective\n\nInput Parameter:\n- `q` - The `PetscQuadrature` object\n\nOutput Parameter:\n- `order` - The order of the quadrature, i.e. the highest degree polynomial that is exactly integrated\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureSetOrder()`, `PetscQuadratureGetData()`, `PetscQuadratureSetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureGetOrder\"))\n\"\"\"\nfunction PetscQuadratureGetOrder(petsclib::PetscLibType, q::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureGetOrder(petsclib::$UnionPetscLib, q::PetscQuadrature )\n\torder_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscQuadratureGetOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, Ptr{$PetscInt}),\n               q, order_,\n              )\n\n\torder = order_[]\n\n\treturn order\nend \n\n\"\"\"\n\tPetscQuadratureSetOrder(petsclib::PetscLibType,q::PetscQuadrature, order::PetscInt) \nSet the order of the method in the `PetscQuadrature`\n\nNot Collective\n\nInput Parameters:\n- `q`     - The `PetscQuadrature` object\n- `order` - The order of the quadrature, i.e. the highest degree polynomial that is exactly integrated\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureGetOrder()`, `PetscQuadratureGetData()`, `PetscQuadratureSetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureSetOrder\"))\n\"\"\"\nfunction PetscQuadratureSetOrder(petsclib::PetscLibType, q::PetscQuadrature, order::PetscInt) end\n\n@for_petsc function PetscQuadratureSetOrder(petsclib::$UnionPetscLib, q::PetscQuadrature, order::$PetscInt )\n\n    @chk ccall(\n               (:PetscQuadratureSetOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, $PetscInt),\n               q, order,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNc::PetscInt = PetscQuadratureGetNumComponents(petsclib::PetscLibType,q::PetscQuadrature) \nReturn the number of components for functions to be integrated\n\nNot Collective\n\nInput Parameter:\n- `q` - The `PetscQuadrature` object\n\nOutput Parameter:\n- `Nc` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureSetNumComponents()`, `PetscQuadratureGetData()`, `PetscQuadratureSetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureGetNumComponents\"))\n\"\"\"\nfunction PetscQuadratureGetNumComponents(petsclib::PetscLibType, q::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureGetNumComponents(petsclib::$UnionPetscLib, q::PetscQuadrature )\n\tNc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscQuadratureGetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, Ptr{$PetscInt}),\n               q, Nc_,\n              )\n\n\tNc = Nc_[]\n\n\treturn Nc\nend \n\n\"\"\"\n\tPetscQuadratureSetNumComponents(petsclib::PetscLibType,q::PetscQuadrature, Nc::PetscInt) \nSets the number of components for functions to be integrated\n\nNot Collective\n\nInput Parameters:\n- `q`  - The `PetscQuadrature` object\n- `Nc` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureGetNumComponents()`, `PetscQuadratureGetData()`, `PetscQuadratureSetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureSetNumComponents\"))\n\"\"\"\nfunction PetscQuadratureSetNumComponents(petsclib::PetscLibType, q::PetscQuadrature, Nc::PetscInt) end\n\n@for_petsc function PetscQuadratureSetNumComponents(petsclib::$UnionPetscLib, q::PetscQuadrature, Nc::$PetscInt )\n\n    @chk ccall(\n               (:PetscQuadratureSetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, $PetscInt),\n               q, Nc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt,Nc::PetscInt,npoints::PetscInt,points::Vector{PetscReal},weights::Vector{PetscReal} = PetscQuadratureGetData(petsclib::PetscLibType,q::PetscQuadrature) \nReturns the data defining the `PetscQuadrature`\n\nNot Collective\n\nInput Parameter:\n- `q` - The `PetscQuadrature` object\n\nOutput Parameters:\n- `dim`     - The spatial dimension\n- `Nc`      - The number of components\n- `npoints` - The number of quadrature points\n- `points`  - The coordinates of each quadrature point\n- `weights` - The weight of each quadrature point\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureCreate()`, `PetscQuadratureSetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureGetData\"))\n\"\"\"\nfunction PetscQuadratureGetData(petsclib::PetscLibType, q::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureGetData(petsclib::$UnionPetscLib, q::PetscQuadrature )\n\tdim_ = Ref{$PetscInt}()\n\tNc_ = Ref{$PetscInt}()\n\tnpoints_ = Ref{$PetscInt}()\n\tpoints_ = Ref{Ptr{$PetscReal}}()\n\tweights_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:PetscQuadratureGetData, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscReal}}),\n               q, dim_, Nc_, npoints_, points_, weights_,\n              )\n\n\tdim = dim_[]\n\tNc = Nc_[]\n\tnpoints = npoints_[]\n\tpoints = unsafe_wrap(Array, points_[], VecGetLocalSize(petsclib, x); own = false)\n\tweights = unsafe_wrap(Array, weights_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn dim,Nc,npoints,points,weights\nend \n\n\"\"\"\n\tequal::PetscBool = PetscQuadratureEqual(petsclib::PetscLibType,A::PetscQuadrature, B::PetscQuadrature) \ndetermine whether two quadratures are equivalent\n\nInput Parameters:\n- `A` - A `PetscQuadrature` object\n- `B` - Another `PetscQuadrature` object\n\nOutput Parameter:\n- `equal` - `PETSC_TRUE` if the quadratures are the same\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureEqual\"))\n\"\"\"\nfunction PetscQuadratureEqual(petsclib::PetscLibType, A::PetscQuadrature, B::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureEqual(petsclib::$UnionPetscLib, A::PetscQuadrature, B::PetscQuadrature )\n\tequal_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscQuadratureEqual, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, PetscQuadrature, Ptr{PetscBool}),\n               A, B, equal_,\n              )\n\n\tequal = equal_[]\n\n\treturn equal\nend \n\n\"\"\"\n\tPetscQuadraturePushForward(petsclib::PetscLibType,q::PetscQuadrature, imageDim::PetscInt, origin::Vector{PetscReal}, originImage::Vector{PetscReal}, J::Vector{PetscReal}, formDegree::PetscInt, Jinvstarq::PetscQuadrature) \nPush forward a quadrature functional under an affine transformation.\n\nCollective\n\nInput Parameters:\n- `q`           - the quadrature functional\n- `imageDim`    - the dimension of the image of the transformation\n- `origin`      - a point in the original space\n- `originImage` - the image of the origin under the transformation\n- `J`           - the Jacobian of the image: an [imageDim x dim] matrix in row major order\n- `formDegree`  - transform the quadrature weights as k-forms of this form degree (if the number of components is a multiple of (dim choose `formDegree`),\nit is assumed that they represent multiple k-forms) [see `PetscDTAltVPullback()` for interpretation of `formDegree`]\n\nOutput Parameter:\n- `Jinvstarq` - a quadrature rule where each point is the image of a point in the original quadrature rule, and where the k-form weights have\nbeen pulled-back by the pseudoinverse of `J` to the k-form weights in the image space.\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadraturePushForward\"))\n\"\"\"\nfunction PetscQuadraturePushForward(petsclib::PetscLibType, q::PetscQuadrature, imageDim::PetscInt, origin::Vector{PetscReal}, originImage::Vector{PetscReal}, J::Vector{PetscReal}, formDegree::PetscInt, Jinvstarq::PetscQuadrature) end\n\n@for_petsc function PetscQuadraturePushForward(petsclib::$UnionPetscLib, q::PetscQuadrature, imageDim::$PetscInt, origin::Vector{$PetscReal}, originImage::Vector{$PetscReal}, J::Vector{$PetscReal}, formDegree::$PetscInt, Jinvstarq::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscQuadraturePushForward, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, Ptr{PetscQuadrature}),\n               q, imageDim, origin, originImage, J, formDegree, Jinvstarq,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscQuadratureSetData(petsclib::PetscLibType,q::PetscQuadrature, dim::PetscInt, Nc::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, weights::Vector{PetscReal}) \nSets the data defining the quadrature\n\nNot Collective\n\nInput Parameters:\n- `q`       - The `PetscQuadrature` object\n- `dim`     - The spatial dimension\n- `Nc`      - The number of components\n- `npoints` - The number of quadrature points\n- `points`  - The coordinates of each quadrature point\n- `weights` - The weight of each quadrature point\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscQuadratureCreate()`, `PetscQuadratureGetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureSetData\"))\n\"\"\"\nfunction PetscQuadratureSetData(petsclib::PetscLibType, q::PetscQuadrature, dim::PetscInt, Nc::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, weights::Vector{PetscReal}) end\n\n@for_petsc function PetscQuadratureSetData(petsclib::$UnionPetscLib, q::PetscQuadrature, dim::$PetscInt, Nc::$PetscInt, npoints::$PetscInt, points::Vector{$PetscReal}, weights::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscQuadratureSetData, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               q, dim, Nc, npoints, points, weights,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscQuadratureView(petsclib::PetscLibType,quad::PetscQuadrature, viewer::PetscViewer) \nView a `PetscQuadrature` object\n\nCollective\n\nInput Parameters:\n- `quad`   - The `PetscQuadrature` object\n- `viewer` - The `PetscViewer` object\n\nLevel: beginner\n\n-seealso: `PetscQuadrature`, `PetscViewer`, `PetscQuadratureCreate()`, `PetscQuadratureGetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureView\"))\n\"\"\"\nfunction PetscQuadratureView(petsclib::PetscLibType, quad::PetscQuadrature, viewer::PetscViewer) end\n\n@for_petsc function PetscQuadratureView(petsclib::$UnionPetscLib, quad::PetscQuadrature, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscQuadratureView, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, PetscViewer),\n               quad, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscQuadratureExpandComposite(petsclib::PetscLibType,q::PetscQuadrature, numSubelements::PetscInt, v0::Vector{PetscReal}, jac::Vector{PetscReal}, qref::PetscQuadrature) \nReturn a quadrature over the composite element, which has the original quadrature in each subelement\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `q`              - The original `PetscQuadrature`\n- `numSubelements` - The number of subelements the original element is divided into\n- `v0`             - An array of the initial points for each subelement\n- `jac`            - An array of the Jacobian mappings from the reference to each subelement\n\nOutput Parameter:\n- `qref` - The dimension\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscFECreate()`, `PetscSpaceGetDimension()`, `PetscDualSpaceGetDimension()`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureExpandComposite\"))\n\"\"\"\nfunction PetscQuadratureExpandComposite(petsclib::PetscLibType, q::PetscQuadrature, numSubelements::PetscInt, v0::Vector{PetscReal}, jac::Vector{PetscReal}, qref::PetscQuadrature) end\n\n@for_petsc function PetscQuadratureExpandComposite(petsclib::$UnionPetscLib, q::PetscQuadrature, numSubelements::$PetscInt, v0::Vector{$PetscReal}, jac::Vector{$PetscReal}, qref::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscQuadratureExpandComposite, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{PetscQuadrature}),\n               q, numSubelements, v0, jac, qref,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNp::PetscInt = PetscQuadratureComputePermutations(petsclib::PetscLibType,quad::PetscQuadrature, perm::Vector{IS}) \nCompute permutations of quadrature points corresponding to domain orientations\n\nInput Parameter:\n- `quad` - The `PetscQuadrature`\n\nOutput Parameters:\n- `Np`   - The number of domain orientations\n- `perm` - An array of `IS` permutations, one for ech orientation,\n\nLevel: developer\n\n-seealso: `PetscQuadratureSetCellType()`, `PetscQuadrature`\n\n# External Links\n$(_doc_external(\"DM/PetscQuadratureComputePermutations\"))\n\"\"\"\nfunction PetscQuadratureComputePermutations(petsclib::PetscLibType, quad::PetscQuadrature, perm::Vector{IS}) end\n\n@for_petsc function PetscQuadratureComputePermutations(petsclib::$UnionPetscLib, quad::PetscQuadrature, perm::Vector{IS} )\n\tNp_ = Ref{$PetscInt}()\n\tperm_ = Ref(pointer(perm))\n\n    @chk ccall(\n               (:PetscQuadratureComputePermutations, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, Ptr{$PetscInt}, Ptr{Ptr{CIS}}),\n               quad, Np_, perm_,\n              )\n\n\tNp = Np_[]\n\n\treturn Np\nend \n\n\"\"\"\n\tPetscTabulationDestroy(petsclib::PetscLibType,T::PetscTabulation) \nFrees memory from the associated tabulation.\n\nNot Collective\n\nInput Parameter:\n- `T` - The tabulation\n\nLevel: intermediate\n\n-seealso: `PetscTabulation`, `PetscFECreateTabulation()`, `PetscFEGetCellTabulation()`\n\n# External Links\n$(_doc_external(\"DM/PetscTabulationDestroy\"))\n\"\"\"\nfunction PetscTabulationDestroy(petsclib::PetscLibType, T::PetscTabulation) end\n\n@for_petsc function PetscTabulationDestroy(petsclib::$UnionPetscLib, T::PetscTabulation )\n\n    @chk ccall(\n               (:PetscTabulationDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscTabulation},),\n               T,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormCopy(petsclib::PetscLibType,wf::PetscWeakForm, wfNew::PetscWeakForm) \nCopy the pointwise functions to another `PetscWeakForm`\n\nNot Collective\n\nInput Parameter:\n- `wf` - The original `PetscWeakForm`\n\nOutput Parameter:\n- `wfNew` - The copy of the `PetscWeakForm`\n\nLevel: intermediate\n\n-seealso: `PetscWeakForm`, `PetscWeakFormCreate()`, `PetscWeakFormDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormCopy\"))\n\"\"\"\nfunction PetscWeakFormCopy(petsclib::PetscLibType, wf::PetscWeakForm, wfNew::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormCopy(petsclib::$UnionPetscLib, wf::PetscWeakForm, wfNew::PetscWeakForm )\n\n    @chk ccall(\n               (:PetscWeakFormCopy, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, PetscWeakForm),\n               wf, wfNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormClear(petsclib::PetscLibType,wf::PetscWeakForm) \nClear all functions from the `PetscWeakForm`\n\nNot Collective\n\nInput Parameter:\n- `wf` - The original `PetscWeakForm`\n\nLevel: intermediate\n\n-seealso: `PetscWeakForm`, `PetscWeakFormCopy()`, `PetscWeakFormCreate()`, `PetscWeakFormDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormClear\"))\n\"\"\"\nfunction PetscWeakFormClear(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormClear(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\n    @chk ccall(\n               (:PetscWeakFormClear, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm,),\n               wf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormRewriteKeys(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}) \nChange any key on the given label to use the new set of label values\n\nNot Collective\n\nInput Parameters:\n- `wf`     - The original `PetscWeakForm`\n- `label`  - The label to change keys for\n- `Nv`     - The number of new label values\n- `values` - The set of new values to relabel keys with\n\nLevel: intermediate\n\n-seealso: `PetscWeakForm`, `DMLabel`, `PetscWeakFormReplaceLabel()`, `PetscWeakFormCreate()`, `PetscWeakFormDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormRewriteKeys\"))\n\"\"\"\nfunction PetscWeakFormRewriteKeys(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}) end\n\n@for_petsc function PetscWeakFormRewriteKeys(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, Nv::$PetscInt, values::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscWeakFormRewriteKeys, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, Ptr{$PetscInt}),\n               wf, label, Nv, values,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormReplaceLabel(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel) \nChange any key on a label of the same name to use the new label\n\nNot Collective\n\nInput Parameters:\n- `wf`    - The original `PetscWeakForm`\n- `label` - The label to change keys for\n\nLevel: intermediate\n\n-seealso: `PetscWeakForm`, `DMLabel`, `PetscWeakFormRewriteKeys()`, `PetscWeakFormCreate()`, `PetscWeakFormDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormReplaceLabel\"))\n\"\"\"\nfunction PetscWeakFormReplaceLabel(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel) end\n\n@for_petsc function PetscWeakFormReplaceLabel(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel )\n\n    @chk ccall(\n               (:PetscWeakFormReplaceLabel, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel),\n               wf, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormClearIndex(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, kind::PetscWeakFormKind, ind::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormClearIndex\"))\n\"\"\"\nfunction PetscWeakFormClearIndex(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, kind::PetscWeakFormKind, ind::PetscInt) end\n\n@for_petsc function PetscWeakFormClearIndex(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, kind::PetscWeakFormKind, ind::$PetscInt )\n\n    @chk ccall(\n               (:PetscWeakFormClearIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, PetscWeakFormKind, $PetscInt),\n               wf, label, val, f, part, kind, ind,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tn::PetscInt = PetscWeakFormGetObjective(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ::Cvoid(obj) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetObjective\"))\n\"\"\"\nfunction PetscWeakFormGetObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ::Cvoid(obj) end\n\n@for_petsc function PetscWeakFormGetObjective(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, ::Cvoid(obj )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetObjective, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid(obj),\n               wf, label, val, f, part, n_, g0,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\n\"\"\"\n\tPetscWeakFormSetObjective(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n::PetscInt, ::Cvoid(obj) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetObjective\"))\n\"\"\"\nfunction PetscWeakFormSetObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n::PetscInt, ::Cvoid(obj) end\n\n@for_petsc function PetscWeakFormSetObjective(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, n::$PetscInt, ::Cvoid(obj )\n\n    @chk ccall(\n               (:PetscWeakFormSetObjective, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid(obj),\n               wf, label, val, f, part, n, g0,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\tPetscWeakFormAddObjective(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, obj::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddObjective\"))\n\"\"\"\nfunction PetscWeakFormAddObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, obj::external) end\n\n@for_petsc function PetscWeakFormAddObjective(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, obj::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddObjective, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, external),\n               wf, label, val, f, part, obj,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tPetscWeakFormGetIndexObjective(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ind::PetscInt, ::Cvoid(obj) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetIndexObjective\"))\n\"\"\"\nfunction PetscWeakFormGetIndexObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ind::PetscInt, ::Cvoid(obj) end\n\n@for_petsc function PetscWeakFormGetIndexObjective(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, ind::$PetscInt, ::Cvoid(obj )\n\n    @chk ccall(\n               (:PetscWeakFormGetIndexObjective, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid(obj),\n               wf, label, val, f, part, ind, g0,\n              )\n\n\n\treturn nothing\nend \n=#\n\"\"\"\n\tPetscWeakFormSetIndexObjective(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ind::PetscInt, obj::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexObjective\"))\n\"\"\"\nfunction PetscWeakFormSetIndexObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ind::PetscInt, obj::external) end\n\n@for_petsc function PetscWeakFormSetIndexObjective(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, ind::$PetscInt, obj::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexObjective, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external),\n               wf, label, val, f, part, ind, obj,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tn0::PetscInt = PetscWeakFormGetResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ::Cvoid(f0) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetResidual\"))\n\"\"\"\nfunction PetscWeakFormGetResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ::Cvoid(f0) end\n\n@for_petsc function PetscWeakFormGetResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, ::Cvoid(f0 )\n\tn0_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid(f0),\n               wf, label, val, f, part, n0_, g0,\n              )\n\n\tn0 = n0_[]\n\n\treturn n0\nend \n=#\n\"\"\"\n\tPetscWeakFormAddResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, f0::external, f1::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddResidual\"))\n\"\"\"\nfunction PetscWeakFormAddResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, f0::external, f1::external) end\n\n@for_petsc function PetscWeakFormAddResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, f0::external, f1::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, external, external),\n               wf, label, val, f, part, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tPetscWeakFormSetResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n0::PetscInt, ::Cvoid(f0) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetResidual\"))\n\"\"\"\nfunction PetscWeakFormSetResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n0::PetscInt, ::Cvoid(f0) end\n\n@for_petsc function PetscWeakFormSetResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, n0::$PetscInt, ::Cvoid(f0 )\n\n    @chk ccall(\n               (:PetscWeakFormSetResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid(f0),\n               wf, label, val, f, part, n0, g0,\n              )\n\n\n\treturn nothing\nend \n=#\n\"\"\"\n\tPetscWeakFormSetIndexResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i0::PetscInt, f0::external, i1::PetscInt, f1::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexResidual\"))\n\"\"\"\nfunction PetscWeakFormSetIndexResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i0::PetscInt, f0::external, i1::PetscInt, f1::external) end\n\n@for_petsc function PetscWeakFormSetIndexResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, i0::$PetscInt, f0::external, i1::$PetscInt, f1::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, $PetscInt, external),\n               wf, label, val, f, part, i0, f0, i1, f1,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tn0::PetscInt = PetscWeakFormGetBdResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ::Cvoid(f0) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetBdResidual\"))\n\"\"\"\nfunction PetscWeakFormGetBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ::Cvoid(f0) end\n\n@for_petsc function PetscWeakFormGetBdResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, ::Cvoid(f0 )\n\tn0_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetBdResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid(f0),\n               wf, label, val, f, part, n0_, g0,\n              )\n\n\tn0 = n0_[]\n\n\treturn n0\nend \n=#\n\"\"\"\n\tPetscWeakFormAddBdResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, f0::external, f1::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddBdResidual\"))\n\"\"\"\nfunction PetscWeakFormAddBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, f0::external, f1::external) end\n\n@for_petsc function PetscWeakFormAddBdResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, f0::external, f1::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddBdResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, external, external),\n               wf, label, val, f, part, f0, f1,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tPetscWeakFormSetBdResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n0::PetscInt, ::Cvoid(f0) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetBdResidual\"))\n\"\"\"\nfunction PetscWeakFormSetBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n0::PetscInt, ::Cvoid(f0) end\n\n@for_petsc function PetscWeakFormSetBdResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, n0::$PetscInt, ::Cvoid(f0 )\n\n    @chk ccall(\n               (:PetscWeakFormSetBdResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid(f0),\n               wf, label, val, f, part, n0, g0,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\tPetscWeakFormSetIndexBdResidual(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i0::PetscInt, f0::external, i1::PetscInt, f1::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexBdResidual\"))\n\"\"\"\nfunction PetscWeakFormSetIndexBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i0::PetscInt, f0::external, i1::PetscInt, f1::external) end\n\n@for_petsc function PetscWeakFormSetIndexBdResidual(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, i0::$PetscInt, f0::external, i1::$PetscInt, f1::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexBdResidual, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, $PetscInt, external),\n               wf, label, val, f, part, i0, f0, i1, f1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasJac::PetscBool = PetscWeakFormHasJacobian(petsclib::PetscLibType,wf::PetscWeakForm) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormHasJacobian\"))\n\"\"\"\nfunction PetscWeakFormHasJacobian(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormHasJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\thasJac_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscWeakFormHasJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, Ptr{PetscBool}),\n               wf, hasJac_,\n              )\n\n\thasJac = hasJac_[]\n\n\treturn hasJac\nend \n\n#=\n\"\"\"\n\tn0::PetscInt = PetscWeakFormGetJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetJacobian\"))\n\"\"\"\nfunction PetscWeakFormGetJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormGetJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::Cvoid )\n\tn0_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid),\n               wf, label, val, f, g, part, n0_, g0,\n              )\n\n\tn0 = n0_[]\n\n\treturn n0\nend \n=#\n\n\"\"\"\n\tPetscWeakFormAddJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddJacobian\"))\n\"\"\"\nfunction PetscWeakFormAddJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) end\n\n@for_petsc function PetscWeakFormAddJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::external, g1::external, g2::external, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, external, external, external),\n               wf, label, val, f, g, part, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tPetscWeakFormSetJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetJacobian\"))\n\"\"\"\nfunction PetscWeakFormSetJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormSetJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, n0::$PetscInt, g0::Cvoid )\n\n    @chk ccall(\n               (:PetscWeakFormSetJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid),\n               wf, label, val, f, g, part, n0, g0,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\tPetscWeakFormSetIndexJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexJacobian\"))\n\"\"\"\nfunction PetscWeakFormSetIndexJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) end\n\n@for_petsc function PetscWeakFormSetIndexJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, i0::$PetscInt, g0::external, i1::$PetscInt, g1::external, i2::$PetscInt, g2::external, i3::$PetscInt, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, $PetscInt, external, $PetscInt, external, $PetscInt, external),\n               wf, label, val, f, g, part, i0, g0, i1, g1, i2, g2, i3, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasJacPre::PetscBool = PetscWeakFormHasJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormHasJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormHasJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormHasJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\thasJacPre_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscWeakFormHasJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, Ptr{PetscBool}),\n               wf, hasJacPre_,\n              )\n\n\thasJacPre = hasJacPre_[]\n\n\treturn hasJacPre\nend \n\n#=\n\"\"\"\n\tn0::PetscInt = PetscWeakFormGetJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormGetJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormGetJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::Cvoid )\n\tn0_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid),\n               wf, label, val, f, g, part, n0_, g0,\n              )\n\n\tn0 = n0_[]\n\n\treturn n0\nend \n=#\n\n\"\"\"\n\tPetscWeakFormAddJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormAddJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) end\n\n@for_petsc function PetscWeakFormAddJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::external, g1::external, g2::external, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, external, external, external),\n               wf, label, val, f, g, part, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n#=\n\"\"\"\n\tPetscWeakFormSetJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormSetJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormSetJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, n0::$PetscInt, g0::Cvoid )\n\n    @chk ccall(\n               (:PetscWeakFormSetJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid),\n               wf, label, val, f, g, part, n0, g0,\n              )\n\n\n\treturn nothing\nend \n=#\n\n\"\"\"\n\tPetscWeakFormSetIndexJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormSetIndexJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) end\n\n@for_petsc function PetscWeakFormSetIndexJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, i0::$PetscInt, g0::external, i1::$PetscInt, g1::external, i2::$PetscInt, g2::external, i3::$PetscInt, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, $PetscInt, external, $PetscInt, external, $PetscInt, external),\n               wf, label, val, f, g, part, i0, g0, i1, g1, i2, g2, i3, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasJac::PetscBool = PetscWeakFormHasBdJacobian(petsclib::PetscLibType,wf::PetscWeakForm) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormHasBdJacobian\"))\n\"\"\"\nfunction PetscWeakFormHasBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormHasBdJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\thasJac_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscWeakFormHasBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, Ptr{PetscBool}),\n               wf, hasJac_,\n              )\n\n\thasJac = hasJac_[]\n\n\treturn hasJac\nend \n\n\"\"\"\n\tn0::PetscInt = PetscWeakFormGetBdJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetBdJacobian\"))\n\"\"\"\nfunction PetscWeakFormGetBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormGetBdJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::Cvoid )\n\tn0_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid),\n               wf, label, val, f, g, part, n0_, g0\n              )\n\n\tn0 = n0_[]\n\n\treturn n0\nend \n\n\"\"\"\n\tPetscWeakFormAddBdJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddBdJacobian\"))\n\"\"\"\nfunction PetscWeakFormAddBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) end\n\n@for_petsc function PetscWeakFormAddBdJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::external, g1::external, g2::external, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, external, external, external),\n               wf, label, val, f, g, part, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormSetBdJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetBdJacobian\"))\n\"\"\"\nfunction PetscWeakFormSetBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormSetBdJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, n0::$PetscInt, g0::Cvoid )\n\n    @chk ccall(\n               (:PetscWeakFormSetBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid),\n               wf, label, val, f, g, part, n0, g0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormSetIndexBdJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexBdJacobian\"))\n\"\"\"\nfunction PetscWeakFormSetIndexBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) end\n\n@for_petsc function PetscWeakFormSetIndexBdJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, i0::$PetscInt, g0::external, i1::$PetscInt, g1::external, i2::$PetscInt, g2::external, i3::$PetscInt, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexBdJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, $PetscInt, external, $PetscInt, external, $PetscInt, external),\n               wf, label, val, f, g, part, i0, g0, i1, g1, i2, g2, i3, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasJacPre::PetscBool = PetscWeakFormHasBdJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormHasBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormHasBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormHasBdJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\thasJacPre_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscWeakFormHasBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, Ptr{PetscBool}),\n               wf, hasJacPre_,\n              )\n\n\thasJacPre = hasJacPre_[]\n\n\treturn hasJacPre\nend \n\n\"\"\"\n\tn0::PetscInt = PetscWeakFormGetBdJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormGetBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormGetBdJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::Cvoid )\n\tn0_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid),\n               wf, label, val, f, g, part, n0_, g0,\n              )\n\n\tn0 = n0_[]\n\n\treturn n0\nend \n\n\"\"\"\n\tPetscWeakFormAddBdJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormAddBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) end\n\n@for_petsc function PetscWeakFormAddBdJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::external, g1::external, g2::external, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, external, external, external),\n               wf, label, val, f, g, part, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormSetBdJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormSetBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormSetBdJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, n0::$PetscInt, g0::Cvoid )\n\n    @chk ccall(\n               (:PetscWeakFormSetBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid),\n               wf, label, val, f, g, part, n0, g0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormSetIndexBdJacobianPreconditioner(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexBdJacobianPreconditioner\"))\n\"\"\"\nfunction PetscWeakFormSetIndexBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) end\n\n@for_petsc function PetscWeakFormSetIndexBdJacobianPreconditioner(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, i0::$PetscInt, g0::external, i1::$PetscInt, g1::external, i2::$PetscInt, g2::external, i3::$PetscInt, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexBdJacobianPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, $PetscInt, external, $PetscInt, external, $PetscInt, external),\n               wf, label, val, f, g, part, i0, g0, i1, g1, i2, g2, i3, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasDynJac::PetscBool = PetscWeakFormHasDynamicJacobian(petsclib::PetscLibType,wf::PetscWeakForm) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormHasDynamicJacobian\"))\n\"\"\"\nfunction PetscWeakFormHasDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormHasDynamicJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\thasDynJac_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscWeakFormHasDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, Ptr{PetscBool}),\n               wf, hasDynJac_,\n              )\n\n\thasDynJac = hasDynJac_[]\n\n\treturn hasDynJac\nend \n\n\"\"\"\n\tn0::PetscInt = PetscWeakFormGetDynamicJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetDynamicJacobian\"))\n\"\"\"\nfunction PetscWeakFormGetDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormGetDynamicJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::Cvoid )\n\tn0_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid),\n               wf, label, val, f, g, part, n0_, g0,\n              )\n\n\tn0 = n0_[]\n\n\treturn n0\nend \n\n\"\"\"\n\tPetscWeakFormAddDynamicJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormAddDynamicJacobian\"))\n\"\"\"\nfunction PetscWeakFormAddDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external) end\n\n@for_petsc function PetscWeakFormAddDynamicJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, g0::external, g1::external, g2::external, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormAddDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, external, external, external),\n               wf, label, val, f, g, part, g0, g1, g2, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormSetDynamicJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetDynamicJacobian\"))\n\"\"\"\nfunction PetscWeakFormSetDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, g0::Cvoid) end\n\n@for_petsc function PetscWeakFormSetDynamicJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, n0::$PetscInt, g0::Cvoid )\n\n    @chk ccall(\n               (:PetscWeakFormSetDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid),\n               wf, label, val, f, g, part, n0, g0\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormSetIndexDynamicJacobian(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexDynamicJacobian\"))\n\"\"\"\nfunction PetscWeakFormSetIndexDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external) end\n\n@for_petsc function PetscWeakFormSetIndexDynamicJacobian(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, g::$PetscInt, part::$PetscInt, i0::$PetscInt, g0::external, i1::$PetscInt, g1::external, i2::$PetscInt, g2::external, i3::$PetscInt, g3::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexDynamicJacobian, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external, $PetscInt, external, $PetscInt, external, $PetscInt, external),\n               wf, label, val, f, g, part, i0, g0, i1, g1, i2, g2, i3, g3,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = PetscWeakFormGetRiemannSolver(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, r::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetRiemannSolver\"))\n\"\"\"\nfunction PetscWeakFormGetRiemannSolver(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, r::Cvoid) end\n\n@for_petsc function PetscWeakFormGetRiemannSolver(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, r::Cvoid)\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetRiemannSolver, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Cvoid),\n               wf, label, val, f, part, n_, r,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tPetscWeakFormSetRiemannSolver(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n::PetscInt, r::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetRiemannSolver\"))\n\"\"\"\nfunction PetscWeakFormSetRiemannSolver(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n::PetscInt, r::Cvoid) end\n\n@for_petsc function PetscWeakFormSetRiemannSolver(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, n::$PetscInt, r::Cvoid )\n\n    @chk ccall(\n               (:PetscWeakFormSetRiemannSolver, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Cvoid),\n               wf, label, val, f, part, n, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormSetIndexRiemannSolver(petsclib::PetscLibType,wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i::PetscInt, r::external) \n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetIndexRiemannSolver\"))\n\"\"\"\nfunction PetscWeakFormSetIndexRiemannSolver(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i::PetscInt, r::external) end\n\n@for_petsc function PetscWeakFormSetIndexRiemannSolver(petsclib::$UnionPetscLib, wf::PetscWeakForm, label::DMLabel, val::$PetscInt, f::$PetscInt, part::$PetscInt, i::$PetscInt, r::external )\n\n    @chk ccall(\n               (:PetscWeakFormSetIndexRiemannSolver, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, DMLabel, $PetscInt, $PetscInt, $PetscInt, $PetscInt, external),\n               wf, label, val, f, part, i, r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNf::PetscInt = PetscWeakFormGetNumFields(petsclib::PetscLibType,wf::PetscWeakForm) \nReturns the number of fields in a `PetscWeakForm`\n\nNot Collective\n\nInput Parameter:\n- `wf` - The `PetscWeakForm` object\n\nOutput Parameter:\n- `Nf` - The number of fields\n\nLevel: beginner\n\n-seealso: `PetscWeakForm`, `PetscWeakFormSetNumFields()`, `PetscWeakFormCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormGetNumFields\"))\n\"\"\"\nfunction PetscWeakFormGetNumFields(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormGetNumFields(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\tNf_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscWeakFormGetNumFields, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, Ptr{$PetscInt}),\n               wf, Nf_,\n              )\n\n\tNf = Nf_[]\n\n\treturn Nf\nend \n\n\"\"\"\n\tPetscWeakFormSetNumFields(petsclib::PetscLibType,wf::PetscWeakForm, Nf::PetscInt) \nSets the number of fields\n\nNot Collective\n\nInput Parameters:\n- `wf` - The `PetscWeakForm` object\n- `Nf` - The number of fields\n\nLevel: beginner\n\n-seealso: `PetscWeakForm`, `PetscWeakFormGetNumFields()`, `PetscWeakFormCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormSetNumFields\"))\n\"\"\"\nfunction PetscWeakFormSetNumFields(petsclib::PetscLibType, wf::PetscWeakForm, Nf::PetscInt) end\n\n@for_petsc function PetscWeakFormSetNumFields(petsclib::$UnionPetscLib, wf::PetscWeakForm, Nf::$PetscInt )\n\n    @chk ccall(\n               (:PetscWeakFormSetNumFields, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, $PetscInt),\n               wf, Nf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormDestroy(petsclib::PetscLibType,wf::PetscWeakForm) \nDestroys a `PetscWeakForm` object\n\nCollective\n\nInput Parameter:\n- `wf` - the `PetscWeakForm` object to destroy\n\nLevel: developer\n\n-seealso: `PetscWeakForm`, `PetscWeakFormCreate()`, `PetscWeakFormView()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormDestroy\"))\n\"\"\"\nfunction PetscWeakFormDestroy(petsclib::PetscLibType, wf::PetscWeakForm) end\n\n@for_petsc function PetscWeakFormDestroy(petsclib::$UnionPetscLib, wf::PetscWeakForm )\n\n    @chk ccall(\n               (:PetscWeakFormDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscWeakForm},),\n               wf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWeakFormView(petsclib::PetscLibType,wf::PetscWeakForm, v::PetscViewer) \nViews a `PetscWeakForm`\n\nCollective\n\nInput Parameters:\n- `wf` - the `PetscWeakForm` object to view\n- `v`  - the viewer\n\nLevel: developer\n\n-seealso: `PetscViewer`, `PetscWeakForm`, `PetscWeakFormDestroy()`, `PetscWeakFormCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormView\"))\n\"\"\"\nfunction PetscWeakFormView(petsclib::PetscLibType, wf::PetscWeakForm, v::PetscViewer) end\n\n@for_petsc function PetscWeakFormView(petsclib::$UnionPetscLib, wf::PetscWeakForm, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscWeakFormView, $petsc_library),\n               PetscErrorCode,\n               (PetscWeakForm, PetscViewer),\n               wf, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\twf::PetscWeakForm = PetscWeakFormCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscWeakForm` object.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscWeakForm` object\n\nOutput Parameter:\n- `wf` - The `PetscWeakForm` object\n\nLevel: beginner\n\n-seealso: `PetscWeakForm`, `PetscDS`, `PetscWeakFormDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscWeakFormCreate\"))\n\"\"\"\nfunction PetscWeakFormCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscWeakFormCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\twf_ = Ref{PetscWeakForm}()\n\n    @chk ccall(\n               (:PetscWeakFormCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscWeakForm}),\n               comm, wf_,\n              )\n\n\twf = wf_[]\n\n\treturn wf\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscFV_wrappers.jl",
    "content": "# -------------------------------------------------------\n\"\"\"\n\tPetscFVFinalizePackage(petsclib::PetscLibType) \nThis function finalizes everything in the `PetscFV` package. It is called\nfrom `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVFinalizePackage\"))\n\"\"\"\nfunction PetscFVFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscFVFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscFVFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscFV` package. It is called\nfrom `PetscDLLibraryRegister()` when using dynamic libraries, and on the first call to `PetscFVCreate()`\nwhen using static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVInitializePackage\"))\n\"\"\"\nfunction PetscFVInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscFVInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscFVInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `PetscFV` implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine itself\n\n-seealso: `PetscFV`, `PetscFVType`, `PetscFVRegisterAll()`, `PetscFVRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVRegister\"))\n\"\"\"\nfunction PetscFVRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscFVRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscFVRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVSetType(petsclib::PetscLibType,fvm::PetscFV, name::PetscFVType) \nBuilds a particular `PetscFV`\n\nCollective\n\nInput Parameters:\n- `fvm`  - The `PetscFV` object\n- `name` - The type of FVM space\n\nOptions Database Key:\n- `-petscfv_type <type>` - Sets the `PetscFVType`; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVType`, `PetscFVGetType()`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetType\"))\n\"\"\"\nfunction PetscFVSetType(petsclib::PetscLibType, fvm::PetscFV, name::PetscFVType) end\n\n@for_petsc function PetscFVSetType(petsclib::$UnionPetscLib, fvm::PetscFV, name::PetscFVType )\n\n    @chk ccall(\n               (:PetscFVSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscFVType),\n               fvm, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscFVType = PetscFVGetType(petsclib::PetscLibType,fvm::PetscFV) \nGets the `PetscFVType` (as a string) from a `PetscFV`.\n\nNot Collective\n\nInput Parameter:\n- `fvm` - The `PetscFV`\n\nOutput Parameter:\n- `name` - The `PetscFVType` name\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVType`, `PetscFVSetType()`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetType\"))\n\"\"\"\nfunction PetscFVGetType(petsclib::PetscLibType, fvm::PetscFV) end\n\n@for_petsc function PetscFVGetType(petsclib::$UnionPetscLib, fvm::PetscFV )\n\tname_ = Ref{PetscFVType}()\n\n    @chk ccall(\n               (:PetscFVGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscFVType}),\n               fvm, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\tPetscFVViewFromOptions(petsclib::PetscLibType,A::PetscFV, obj::PetscObject, name::String) \nView a `PetscFV` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscFV` object\n- `obj`  - Optional object that provides the options prefix\n- `name` - command line option name\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVView()`, `PetscObjectViewFromOptions()`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVViewFromOptions\"))\n\"\"\"\nfunction PetscFVViewFromOptions(petsclib::PetscLibType, A::PetscFV, obj::PetscObject, name::String) end\n\n@for_petsc function PetscFVViewFromOptions(petsclib::$UnionPetscLib, A::PetscFV, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscFVViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVView(petsclib::PetscLibType,fvm::PetscFV, v::PetscViewer) \nViews a `PetscFV`\n\nCollective\n\nInput Parameters:\n- `fvm` - the `PetscFV` object to view\n- `v`   - the viewer\n\nLevel: beginner\n\n-seealso: `PetscFV`, `PetscViewer`, `PetscFVDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVView\"))\n\"\"\"\nfunction PetscFVView(petsclib::PetscLibType, fvm::PetscFV, v::PetscViewer) end\n\n@for_petsc function PetscFVView(petsclib::$UnionPetscLib, fvm::PetscFV, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscFVView, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscViewer),\n               fvm, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVSetFromOptions(petsclib::PetscLibType,fvm::PetscFV) \nsets parameters in a `PetscFV` from the options database\n\nCollective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object to set options for\n\nOptions Database Key:\n- `-petscfv_compute_gradients <bool>` - Determines whether cell gradients are calculated\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVView()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetFromOptions\"))\n\"\"\"\nfunction PetscFVSetFromOptions(petsclib::PetscLibType, fvm::PetscFV) end\n\n@for_petsc function PetscFVSetFromOptions(petsclib::$UnionPetscLib, fvm::PetscFV )\n\n    @chk ccall(\n               (:PetscFVSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscFV,),\n               fvm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVSetUp(petsclib::PetscLibType,fvm::PetscFV) \nSetup the data structures for the `PetscFV` based on the `PetscFVType` provided by `PetscFVSetType()`\n\nCollective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object to setup\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVView()`, `PetscFVDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetUp\"))\n\"\"\"\nfunction PetscFVSetUp(petsclib::PetscLibType, fvm::PetscFV) end\n\n@for_petsc function PetscFVSetUp(petsclib::$UnionPetscLib, fvm::PetscFV )\n\n    @chk ccall(\n               (:PetscFVSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscFV,),\n               fvm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVDestroy(petsclib::PetscLibType,fvm::PetscFV) \nDestroys a `PetscFV` object\n\nCollective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object to destroy\n\nLevel: beginner\n\n-seealso: `PetscFV`, `PetscFVCreate()`, `PetscFVView()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVDestroy\"))\n\"\"\"\nfunction PetscFVDestroy(petsclib::PetscLibType, fvm::PetscFV) end\n\n@for_petsc function PetscFVDestroy(petsclib::$UnionPetscLib, fvm::PetscFV )\n\n    @chk ccall(\n               (:PetscFVDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFV},),\n               fvm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfvm::PetscFV = PetscFVCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscFV` object. The type can then be set with `PetscFVSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscFV` object\n\nOutput Parameter:\n- `fvm` - The `PetscFV` object\n\nLevel: beginner\n\n-seealso: `PetscFVSetUp()`, `PetscFVSetType()`, `PETSCFVUPWIND`, `PetscFVDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVCreate\"))\n\"\"\"\nfunction PetscFVCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscFVCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tfvm_ = Ref{PetscFV}()\n\n    @chk ccall(\n               (:PetscFVCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscFV}),\n               comm, fvm_,\n              )\n\n\tfvm = fvm_[]\n\n\treturn fvm\nend \n\n\"\"\"\n\tPetscFVSetLimiter(petsclib::PetscLibType,fvm::PetscFV, lim::PetscLimiter) \nSet the `PetscLimiter` to the `PetscFV`\n\nLogically Collective\n\nInput Parameters:\n- `fvm` - the `PetscFV` object\n- `lim` - The `PetscLimiter`\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscLimiter`, `PetscFVGetLimiter()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetLimiter\"))\n\"\"\"\nfunction PetscFVSetLimiter(petsclib::PetscLibType, fvm::PetscFV, lim::PetscLimiter) end\n\n@for_petsc function PetscFVSetLimiter(petsclib::$UnionPetscLib, fvm::PetscFV, lim::PetscLimiter )\n\n    @chk ccall(\n               (:PetscFVSetLimiter, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscLimiter),\n               fvm, lim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVGetLimiter(petsclib::PetscLibType,fvm::PetscFV, lim::PetscLimiter) \nGet the `PetscLimiter` object from the `PetscFV`\n\nNot Collective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object\n\nOutput Parameter:\n- `lim` - The `PetscLimiter`\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscLimiter`, `PetscFVSetLimiter()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetLimiter\"))\n\"\"\"\nfunction PetscFVGetLimiter(petsclib::PetscLibType, fvm::PetscFV, lim::PetscLimiter) end\n\n@for_petsc function PetscFVGetLimiter(petsclib::$UnionPetscLib, fvm::PetscFV, lim::PetscLimiter )\n\n    @chk ccall(\n               (:PetscFVGetLimiter, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscLimiter}),\n               fvm, lim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVSetNumComponents(petsclib::PetscLibType,fvm::PetscFV, comp::PetscInt) \nSet the number of field components in a `PetscFV`\n\nLogically Collective\n\nInput Parameters:\n- `fvm`  - the `PetscFV` object\n- `comp` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVGetNumComponents()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetNumComponents\"))\n\"\"\"\nfunction PetscFVSetNumComponents(petsclib::PetscLibType, fvm::PetscFV, comp::PetscInt) end\n\n@for_petsc function PetscFVSetNumComponents(petsclib::$UnionPetscLib, fvm::PetscFV, comp::$PetscInt )\n\n    @chk ccall(\n               (:PetscFVSetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, $PetscInt),\n               fvm, comp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcomp::PetscInt = PetscFVGetNumComponents(petsclib::PetscLibType,fvm::PetscFV) \nGet the number of field components in a `PetscFV`\n\nNot Collective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object\n\nOutput Parameter:\n- `comp` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVSetNumComponents()`, `PetscFVSetComponentName()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetNumComponents\"))\n\"\"\"\nfunction PetscFVGetNumComponents(petsclib::PetscLibType, fvm::PetscFV) end\n\n@for_petsc function PetscFVGetNumComponents(petsclib::$UnionPetscLib, fvm::PetscFV )\n\tcomp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFVGetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{$PetscInt}),\n               fvm, comp_,\n              )\n\n\tcomp = comp_[]\n\n\treturn comp\nend \n\n\"\"\"\n\tPetscFVSetComponentName(petsclib::PetscLibType,fvm::PetscFV, comp::PetscInt, name::String) \nSet the name of a component (used in output and viewing) in a `PetscFV`\n\nLogically Collective\n\nInput Parameters:\n- `fvm`  - the `PetscFV` object\n- `comp` - the component number\n- `name` - the component name\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVGetComponentName()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetComponentName\"))\n\"\"\"\nfunction PetscFVSetComponentName(petsclib::PetscLibType, fvm::PetscFV, comp::PetscInt, name::String) end\n\n@for_petsc function PetscFVSetComponentName(petsclib::$UnionPetscLib, fvm::PetscFV, comp::$PetscInt, name::String )\n\n    @chk ccall(\n               (:PetscFVSetComponentName, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, $PetscInt, Ptr{Cchar}),\n               fvm, comp, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVGetComponentName(petsclib::PetscLibType,fvm::PetscFV, comp::PetscInt, name::String) \nGet the name of a component (used in output and viewing) in a `PetscFV`\n\nLogically Collective\n\nInput Parameters:\n- `fvm`  - the `PetscFV` object\n- `comp` - the component number\n\nOutput Parameter:\n- `name` - the component name\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVSetComponentName()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetComponentName\"))\n\"\"\"\nfunction PetscFVGetComponentName(petsclib::PetscLibType, fvm::PetscFV, comp::PetscInt, name::String) end\n\n@for_petsc function PetscFVGetComponentName(petsclib::$UnionPetscLib, fvm::PetscFV, comp::$PetscInt, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscFVGetComponentName, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, $PetscInt, Ptr{Ptr{Cchar}}),\n               fvm, comp, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVSetSpatialDimension(petsclib::PetscLibType,fvm::PetscFV, dim::PetscInt) \nSet the spatial dimension of a `PetscFV`\n\nLogically Collective\n\nInput Parameters:\n- `fvm` - the `PetscFV` object\n- `dim` - The spatial dimension\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVGetSpatialDimension()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetSpatialDimension\"))\n\"\"\"\nfunction PetscFVSetSpatialDimension(petsclib::PetscLibType, fvm::PetscFV, dim::PetscInt) end\n\n@for_petsc function PetscFVSetSpatialDimension(petsclib::$UnionPetscLib, fvm::PetscFV, dim::$PetscInt )\n\n    @chk ccall(\n               (:PetscFVSetSpatialDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, $PetscInt),\n               fvm, dim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdim::PetscInt = PetscFVGetSpatialDimension(petsclib::PetscLibType,fvm::PetscFV) \nGet the spatial dimension of a `PetscFV`\n\nNot Collective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object\n\nOutput Parameter:\n- `dim` - The spatial dimension\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVSetSpatialDimension()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetSpatialDimension\"))\n\"\"\"\nfunction PetscFVGetSpatialDimension(petsclib::PetscLibType, fvm::PetscFV) end\n\n@for_petsc function PetscFVGetSpatialDimension(petsclib::$UnionPetscLib, fvm::PetscFV )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFVGetSpatialDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{$PetscInt}),\n               fvm, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tPetscFVSetComputeGradients(petsclib::PetscLibType,fvm::PetscFV, computeGradients::PetscBool) \nToggle computation of cell gradients on a `PetscFV`\n\nLogically Collective\n\nInput Parameters:\n- `fvm`              - the `PetscFV` object\n- `computeGradients` - Flag to compute cell gradients\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVGetComputeGradients()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetComputeGradients\"))\n\"\"\"\nfunction PetscFVSetComputeGradients(petsclib::PetscLibType, fvm::PetscFV, computeGradients::PetscBool) end\n\n@for_petsc function PetscFVSetComputeGradients(petsclib::$UnionPetscLib, fvm::PetscFV, computeGradients::PetscBool )\n\n    @chk ccall(\n               (:PetscFVSetComputeGradients, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscBool),\n               fvm, computeGradients,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcomputeGradients::PetscBool = PetscFVGetComputeGradients(petsclib::PetscLibType,fvm::PetscFV) \nReturn flag for computation of cell gradients on a `PetscFV`\n\nNot Collective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object\n\nOutput Parameter:\n- `computeGradients` - Flag to compute cell gradients\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVSetComputeGradients()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetComputeGradients\"))\n\"\"\"\nfunction PetscFVGetComputeGradients(petsclib::PetscLibType, fvm::PetscFV) end\n\n@for_petsc function PetscFVGetComputeGradients(petsclib::$UnionPetscLib, fvm::PetscFV )\n\tcomputeGradients_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscFVGetComputeGradients, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscBool}),\n               fvm, computeGradients_,\n              )\n\n\tcomputeGradients = computeGradients_[]\n\n\treturn computeGradients\nend \n\n\"\"\"\n\tPetscFVSetQuadrature(petsclib::PetscLibType,fvm::PetscFV, q::PetscQuadrature) \nSet the `PetscQuadrature` object for a `PetscFV`\n\nLogically Collective\n\nInput Parameters:\n- `fvm` - the `PetscFV` object\n- `q`   - The `PetscQuadrature`\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscFV`, `PetscFVGetQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetQuadrature\"))\n\"\"\"\nfunction PetscFVSetQuadrature(petsclib::PetscLibType, fvm::PetscFV, q::PetscQuadrature) end\n\n@for_petsc function PetscFVSetQuadrature(petsclib::$UnionPetscLib, fvm::PetscFV, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscFVSetQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscQuadrature),\n               fvm, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVGetQuadrature(petsclib::PetscLibType,fvm::PetscFV, q::PetscQuadrature) \nGet the `PetscQuadrature` from a `PetscFV`\n\nNot Collective\n\nInput Parameter:\n- `fvm` - the `PetscFV` object\n\nOutput Parameter:\n- `q` - The `PetscQuadrature`\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscFV`, `PetscFVSetQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetQuadrature\"))\n\"\"\"\nfunction PetscFVGetQuadrature(petsclib::PetscLibType, fvm::PetscFV, q::PetscQuadrature) end\n\n@for_petsc function PetscFVGetQuadrature(petsclib::$UnionPetscLib, fvm::PetscFV, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscFVGetQuadrature, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscQuadrature}),\n               fvm, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVCreateDualSpace(petsclib::PetscLibType,fvm::PetscFV, ct::DMPolytopeType) \nCreates a `PetscDualSpace` appropriate for the `PetscFV`\n\nNot Collective\n\nInput Parameters:\n- `fvm` - The `PetscFV` object\n- `ct`  - The `DMPolytopeType` for the cell\n\nLevel: intermediate\n\n-seealso: `PetscFVGetDualSpace()`, `PetscFVSetDualSpace()`, `PetscDualSpace`, `PetscFV`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVCreateDualSpace\"))\n\"\"\"\nfunction PetscFVCreateDualSpace(petsclib::PetscLibType, fvm::PetscFV, ct::DMPolytopeType) end\n\n@for_petsc function PetscFVCreateDualSpace(petsclib::$UnionPetscLib, fvm::PetscFV, ct::DMPolytopeType )\n\n    @chk ccall(\n               (:PetscFVCreateDualSpace, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, DMPolytopeType),\n               fvm, ct,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVGetDualSpace(petsclib::PetscLibType,fvm::PetscFV, sp::PetscDualSpace) \nReturns the `PetscDualSpace` used to define the inner product on a `PetscFV`\n\nNot Collective\n\nInput Parameter:\n- `fvm` - The `PetscFV` object\n\nOutput Parameter:\n- `sp` - The `PetscDualSpace` object\n\nLevel: intermediate\n\n-seealso: `PetscFVSetDualSpace()`, `PetscFVCreateDualSpace()`, `PetscDualSpace`, `PetscFV`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetDualSpace\"))\n\"\"\"\nfunction PetscFVGetDualSpace(petsclib::PetscLibType, fvm::PetscFV, sp::PetscDualSpace) end\n\n@for_petsc function PetscFVGetDualSpace(petsclib::$UnionPetscLib, fvm::PetscFV, sp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscFVGetDualSpace, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscDualSpace}),\n               fvm, sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVSetDualSpace(petsclib::PetscLibType,fvm::PetscFV, sp::PetscDualSpace) \nSets the `PetscDualSpace` used to define the inner product\n\nNot Collective\n\nInput Parameters:\n- `fvm` - The `PetscFV` object\n- `sp`  - The `PetscDualSpace` object\n\nLevel: intermediate\n\n-seealso: `PetscFVGetDualSpace()`, `PetscFVCreateDualSpace()`, `PetscDualSpace`, `PetscFV`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVSetDualSpace\"))\n\"\"\"\nfunction PetscFVSetDualSpace(petsclib::PetscLibType, fvm::PetscFV, sp::PetscDualSpace) end\n\n@for_petsc function PetscFVSetDualSpace(petsclib::$UnionPetscLib, fvm::PetscFV, sp::PetscDualSpace )\n\n    @chk ccall(\n               (:PetscFVSetDualSpace, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscDualSpace),\n               fvm, sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVGetCellTabulation(petsclib::PetscLibType,fvm::PetscFV, T::PetscTabulation) \nReturns the tabulation of the basis functions at the quadrature points\n\nNot Collective\n\nInput Parameter:\n- `fvm` - The `PetscFV` object\n\nOutput Parameter:\n- `T` - The basis function values and derivatives at quadrature points\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscTabulation`, `PetscFEGetCellTabulation()`, `PetscFVCreateTabulation()`, `PetscFVGetQuadrature()`, `PetscQuadratureGetData()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVGetCellTabulation\"))\n\"\"\"\nfunction PetscFVGetCellTabulation(petsclib::PetscLibType, fvm::PetscFV, T::PetscTabulation) end\n\n@for_petsc function PetscFVGetCellTabulation(petsclib::$UnionPetscLib, fvm::PetscFV, T::PetscTabulation )\n\n    @chk ccall(\n               (:PetscFVGetCellTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscTabulation}),\n               fvm, T,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tT::PetscTabulation = PetscFVCreateTabulation(petsclib::PetscLibType,fvm::PetscFV, nrepl::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt) \nTabulates the basis functions, and perhaps derivatives, at the points provided.\n\nNot Collective\n\nInput Parameters:\n- `fvm`     - The `PetscFV` object\n- `nrepl`   - The number of replicas\n- `npoints` - The number of tabulation points in a replica\n- `points`  - The tabulation point coordinates\n- `K`       - The order of derivative to tabulate\n\nOutput Parameter:\n- `T` - The basis function values and derivative at tabulation points\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscTabulation`, `PetscFECreateTabulation()`, `PetscTabulationDestroy()`, `PetscFEGetCellTabulation()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVCreateTabulation\"))\n\"\"\"\nfunction PetscFVCreateTabulation(petsclib::PetscLibType, fvm::PetscFV, nrepl::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt) end\n\n@for_petsc function PetscFVCreateTabulation(petsclib::$UnionPetscLib, fvm::PetscFV, nrepl::$PetscInt, npoints::$PetscInt, points::Vector{$PetscReal}, K::$PetscInt )\n\tT_ = Ref{PetscTabulation}()\n\n    @chk ccall(\n               (:PetscFVCreateTabulation, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, $PetscInt, $PetscInt, Ptr{$PetscReal}, $PetscInt, Ptr{PetscTabulation}),\n               fvm, nrepl, npoints, points, K, T_,\n              )\n\n\tT = T_[]\n\n\treturn T\nend \n\n\"\"\"\n\tgrad::Vector{PetscScalar} = PetscFVComputeGradient(petsclib::PetscLibType,fvm::PetscFV, numFaces::PetscInt, dx::Vector{PetscScalar}) \nCompute the gradient reconstruction matrix for a given cell\n\nInput Parameters:\n- `fvm`      - The `PetscFV` object\n- `numFaces` - The number of cell faces which are not constrained\n- `dx`       - The vector from the cell centroid to the neighboring cell centroid for each face\n\nOutput Parameter:\n- `grad` - the gradient\n\nLevel: advanced\n\n-seealso: `PetscFV`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVComputeGradient\"))\n\"\"\"\nfunction PetscFVComputeGradient(petsclib::PetscLibType, fvm::PetscFV, numFaces::PetscInt, dx::Vector{PetscScalar}) end\n\n@for_petsc function PetscFVComputeGradient(petsclib::$UnionPetscLib, fvm::PetscFV, numFaces::$PetscInt, dx::Vector{$PetscScalar} )\n\tgrad = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFVComputeGradient, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, $PetscInt, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               fvm, numFaces, dx, grad,\n              )\n\n\n\treturn grad\nend \n\n\"\"\"\n\tfluxL::Vector{PetscScalar},fluxR::Vector{PetscScalar} = PetscFVIntegrateRHSFunction(petsclib::PetscLibType,fvm::PetscFV, prob::PetscDS, field::PetscInt, Nf::PetscInt, fgeom::PetscFVFaceGeom, neighborVol::PetscReal, uL::Vector{PetscScalar}, uR::Vector{PetscScalar}) \nProduce the cell residual vector for a chunk of elements by quadrature integration\n\nNot Collective\n\nInput Parameters:\n- `fvm`         - The `PetscFV` object for the field being integrated\n- `prob`        - The `PetscDS` specifying the discretizations and continuum functions\n- `field`       - The field being integrated\n- `Nf`          - The number of faces in the chunk\n- `fgeom`       - The face geometry for each face in the chunk\n- `neighborVol` - The volume for each pair of cells in the chunk\n- `uL`          - The state from the cell on the left\n- `uR`          - The state from the cell on the right\n\nOutput Parameters:\n- `fluxL` - the left fluxes for each face\n- `fluxR` - the right fluxes for each face\n\nLevel: developer\n\n-seealso: `PetscFV`, `PetscDS`, `PetscFVFaceGeom`, `PetscFVCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVIntegrateRHSFunction\"))\n\"\"\"\nfunction PetscFVIntegrateRHSFunction(petsclib::PetscLibType, fvm::PetscFV, prob::PetscDS, field::PetscInt, Nf::PetscInt, fgeom::PetscFVFaceGeom, neighborVol::PetscReal, uL::Vector{PetscScalar}, uR::Vector{PetscScalar}) end\n\n@for_petsc function PetscFVIntegrateRHSFunction(petsclib::$UnionPetscLib, fvm::PetscFV, prob::PetscDS, field::$PetscInt, Nf::$PetscInt, fgeom::PetscFVFaceGeom, neighborVol::$PetscReal, uL::Vector{$PetscScalar}, uR::Vector{$PetscScalar} )\n\tfluxL = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\tfluxR = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscFVIntegrateRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, PetscDS, $PetscInt, $PetscInt, Ptr{PetscFVFaceGeom}, Ptr{$PetscReal}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               fvm, prob, field, Nf, fgeom, neighborVol, uL, uR, fluxL, fluxR,\n              )\n\n\n\treturn fluxL,fluxR\nend \n\n\"\"\"\n\tPetscFVClone(petsclib::PetscLibType,fv::PetscFV, fvNew::PetscFV) \nCreate a shallow copy of a `PetscFV` object that just references the internal objects.\n\nInput Parameter:\n- `fv` - The initial `PetscFV`\n\nOutput Parameter:\n- `fvNew` - A clone of the `PetscFV`\n\nLevel: advanced\n\n-seealso: `PetscFV`, `PetscFVType`, `PetscFVCreate()`, `PetscFVSetType()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVClone\"))\n\"\"\"\nfunction PetscFVClone(petsclib::PetscLibType, fv::PetscFV, fvNew::PetscFV) end\n\n@for_petsc function PetscFVClone(petsclib::$UnionPetscLib, fv::PetscFV, fvNew::PetscFV )\n\n    @chk ccall(\n               (:PetscFVClone, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscFV}),\n               fv, fvNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVRefine(petsclib::PetscLibType,fv::PetscFV, fvRef::PetscFV) \nCreate a \"refined\" `PetscFV` object that refines the reference cell into\nsmaller copies.\n\nInput Parameter:\n- `fv` - The initial `PetscFV`\n\nOutput Parameter:\n- `fvRef` - The refined `PetscFV`\n\nLevel: advanced\n\n-seealso: `PetscFV`, `PetscFVType`, `PetscFVCreate()`, `PetscFVSetType()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVRefine\"))\n\"\"\"\nfunction PetscFVRefine(petsclib::PetscLibType, fv::PetscFV, fvRef::PetscFV) end\n\n@for_petsc function PetscFVRefine(petsclib::$UnionPetscLib, fv::PetscFV, fvRef::PetscFV )\n\n    @chk ccall(\n               (:PetscFVRefine, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, Ptr{PetscFV}),\n               fv, fvRef,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFVLeastSquaresSetMaxFaces(petsclib::PetscLibType,fvm::PetscFV, maxFaces::PetscInt) \nSet the maximum number of cell faces for gradient reconstruction\n\nNot Collective\n\nInput Parameters:\n- `fvm`      - The `PetscFV` object\n- `maxFaces` - The maximum number of cell faces\n\nLevel: intermediate\n\n-seealso: `PetscFV`, `PetscFVCreate()`, `PETSCFVLEASTSQUARES`, `PetscFVComputeGradient()`\n\n# External Links\n$(_doc_external(\"DM/PetscFVLeastSquaresSetMaxFaces\"))\n\"\"\"\nfunction PetscFVLeastSquaresSetMaxFaces(petsclib::PetscLibType, fvm::PetscFV, maxFaces::PetscInt) end\n\n@for_petsc function PetscFVLeastSquaresSetMaxFaces(petsclib::$UnionPetscLib, fvm::PetscFV, maxFaces::$PetscInt )\n\n    @chk ccall(\n               (:PetscFVLeastSquaresSetMaxFaces, $petsc_library),\n               PetscErrorCode,\n               (PetscFV, $PetscInt),\n               fvm, maxFaces,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscFunctionList_wrappers.jl",
    "content": "\"\"\"\n\tPetscFunctionListDestroy(petsclib::PetscLibType,fl::PetscFunctionList) \nDestroys a list of registered routines.\n\nInput Parameter:\n- `fl` - pointer to list\n\nLevel: developer\n\n-seealso: `PetscFunctionListAdd()`, `PetscFunctionList`, `PetscFunctionListClear()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListDestroy\"))\n\"\"\"\nfunction PetscFunctionListDestroy(petsclib::PetscLibType, fl::PetscFunctionList) end\n\n@for_petsc function PetscFunctionListDestroy(petsclib::$UnionPetscLib, fl::PetscFunctionList )\n\n    @chk ccall(\n               (:PetscFunctionListDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscFunctionList},),\n               fl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFunctionListClear(petsclib::PetscLibType,fl::PetscFunctionList) \nClear a `PetscFunctionList`\n\nNot Collective\n\nInput Parameter:\n- `fl` - The `PetscFunctionList` to clear\n\nLevel: developer\n\n-seealso: `PetscFunctionList`, `PetscFunctionListDestroy()`, `PetscFunctionListAdd()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListClear\"))\n\"\"\"\nfunction PetscFunctionListClear(petsclib::PetscLibType, fl::PetscFunctionList) end\n\n@for_petsc function PetscFunctionListClear(petsclib::$UnionPetscLib, fl::PetscFunctionList )\n\n    @chk ccall(\n               (:PetscFunctionListClear, $petsc_library),\n               PetscErrorCode,\n               (PetscFunctionList,),\n               fl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFunctionListPrintAll(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListPrintAll\"))\n\"\"\"\nfunction PetscFunctionListPrintAll(petsclib::PetscLibType) end\n\n@for_petsc function PetscFunctionListPrintAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscFunctionListPrintAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFunctionListPrintNonEmpty(petsclib::PetscLibType,fl::PetscFunctionList) \nPrint composed names for non `NULL` function pointers\n\nLogically Collective, No Fortran Support\n\nInput Parameter:\n- `fl` - the function list\n\nLevel: developer\n\n-seealso: `PetscFunctionListAdd()`, `PetscFunctionList`, `PetscObjectQueryFunction()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListPrintNonEmpty\"))\n\"\"\"\nfunction PetscFunctionListPrintNonEmpty(petsclib::PetscLibType, fl::PetscFunctionList) end\n\n@for_petsc function PetscFunctionListPrintNonEmpty(petsclib::$UnionPetscLib, fl::PetscFunctionList )\n\n    @chk ccall(\n               (:PetscFunctionListPrintNonEmpty, $petsc_library),\n               PetscErrorCode,\n               (PetscFunctionList,),\n               fl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFunctionListView(petsclib::PetscLibType,list::PetscFunctionList, viewer::PetscViewer) \nprints out contents of a `PetscFunctionList`\n\nCollective\n\nInput Parameters:\n- `list`   - the list of functions\n- `viewer` - the `PetscViewer` used to view the `PetscFunctionList`\n\nLevel: developer\n\n-seealso: `PetscFunctionListAdd()`, `PetscFunctionListPrintTypes()`, `PetscFunctionList`\n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListView\"))\n\"\"\"\nfunction PetscFunctionListView(petsclib::PetscLibType, list::PetscFunctionList, viewer::PetscViewer) end\n\n@for_petsc function PetscFunctionListView(petsclib::$UnionPetscLib, list::PetscFunctionList, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscFunctionListView, $petsc_library),\n               PetscErrorCode,\n               (PetscFunctionList, PetscViewer),\n               list, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFunctionListGet(petsclib::PetscLibType,list::PetscFunctionList, array::Cchar, n::Cint) \nGets an array the contains the entries in `PetscFunctionList`, this is used\nby help etc.\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `list` - list of types\n\nOutput Parameters:\n- `array` - array of names\n- `n`     - length of `array`\n\nLevel: developer\n\n-seealso: `PetscFunctionListAdd()`, `PetscFunctionList`\n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListGet\"))\n\"\"\"\nfunction PetscFunctionListGet(petsclib::PetscLibType, list::PetscFunctionList, array::Cchar, n::Cint) end\n\n@for_petsc function PetscFunctionListGet(petsclib::$UnionPetscLib, list::PetscFunctionList, array::Cchar, n::Cint )\n\n    @chk ccall(\n               (:PetscFunctionListGet, $petsc_library),\n               PetscErrorCode,\n               (PetscFunctionList, Cchar, Ptr{Cint}),\n               list, array, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFunctionListPrintTypes(petsclib::PetscLibType,comm::MPI_Comm, fd::Libc.FILE, prefix::String, name::String, text::String, man::String, list::PetscFunctionList, def::String, newv::String) \nPrints the methods available in a list of functions\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm`   - the communicator (usually `MPI_COMM_WORLD`)\n- `fd`     - file to print to, usually `stdout`\n- `prefix` - prefix to prepend to name (optional)\n- `name`   - option string (for example, `-ksp_type`)\n- `text`   - short description of the object (for example, \"Krylov solvers\")\n- `man`    - name of manual page that discusses the object (for example, `KSPCreate`)\n- `list`   - list of types\n- `def`    - default (current) value\n- `newv`   - new value\n\nLevel: developer\n\n-seealso: `PetscFunctionListAdd()`, `PetscFunctionList`\n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListPrintTypes\"))\n\"\"\"\nfunction PetscFunctionListPrintTypes(petsclib::PetscLibType, comm::MPI_Comm, fd::Libc.FILE, prefix::String, name::String, text::String, man::String, list::PetscFunctionList, def::String, newv::String) end\n\n@for_petsc function PetscFunctionListPrintTypes(petsclib::$UnionPetscLib, comm::MPI_Comm, fd::Libc.FILE, prefix::String, name::String, text::String, man::String, list::PetscFunctionList, def::String, newv::String )\n\n    @chk ccall(\n               (:PetscFunctionListPrintTypes, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Libc.FILE}, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, PetscFunctionList, Ptr{Cchar}, Ptr{Cchar}),\n               comm, fd, prefix, name, text, man, list, def, newv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnl::PetscFunctionList = PetscFunctionListDuplicate(petsclib::PetscLibType,fl::PetscFunctionList) \nCreates a new list from a given function list `PetscFunctionList`.\n\nInput Parameter:\n- `fl` - pointer to list\n\nOutput Parameter:\n- `nl` - the new list (should point to `NULL` to start, otherwise appends)\n\nLevel: developer\n\n-seealso: `PetscFunctionList`, `PetscFunctionListAdd()`, `PetscFlistDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFunctionListDuplicate\"))\n\"\"\"\nfunction PetscFunctionListDuplicate(petsclib::PetscLibType, fl::PetscFunctionList) end\n\n@for_petsc function PetscFunctionListDuplicate(petsclib::$UnionPetscLib, fl::PetscFunctionList )\n\tnl_ = Ref{PetscFunctionList}()\n\n    @chk ccall(\n               (:PetscFunctionListDuplicate, $petsc_library),\n               PetscErrorCode,\n               (PetscFunctionList, Ptr{PetscFunctionList}),\n               fl, nl_,\n              )\n\n\tnl = nl_[]\n\n\treturn nl\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscGridHash_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscGridHash end\nconst PetscGridHash = Ptr{_n_PetscGridHash}\n\n# -------------------------------------------------------\n\"\"\"\n\tbox::PetscGridHash = PetscGridHashCreate(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, point::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"DM/PetscGridHashCreate\"))\n\"\"\"\nfunction PetscGridHashCreate(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, point::Vector{PetscScalar}) end\n\n@for_petsc function PetscGridHashCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, dim::$PetscInt, point::Vector{$PetscScalar} )\n\tbox_ = Ref{PetscGridHash}()\n\n    @chk ccall(\n               (:PetscGridHashCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscScalar}, Ptr{PetscGridHash}),\n               comm, dim, point, box_,\n              )\n\n\tbox = box_[]\n\n\treturn box\nend \n\n\"\"\"\n\tPetscGridHashEnlarge(petsclib::PetscLibType,box::PetscGridHash, point::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"DM/PetscGridHashEnlarge\"))\n\"\"\"\nfunction PetscGridHashEnlarge(petsclib::PetscLibType, box::PetscGridHash, point::Vector{PetscScalar}) end\n\n@for_petsc function PetscGridHashEnlarge(petsclib::$UnionPetscLib, box::PetscGridHash, point::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscGridHashEnlarge, $petsc_library),\n               PetscErrorCode,\n               (PetscGridHash, Ptr{$PetscScalar}),\n               box, point,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGridHashSetGrid(petsclib::PetscLibType,box::PetscGridHash, n::Vector{PetscInt}, h::Vector{PetscReal}) \nDivide the grid into boxes\n\nNot Collective\n\nInput Parameters:\n- `box` - The grid hash object\n- `n`   - The number of boxes in each dimension, may use `PETSC_DETERMINE` for the entries\n- `h`   - The box size in each dimension, only used if n[d] == `PETSC_DETERMINE`, if not needed you can pass in `NULL`\n\nLevel: developer\n\n-seealso: `DMPLEX`, `PetscGridHashCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscGridHashSetGrid\"))\n\"\"\"\nfunction PetscGridHashSetGrid(petsclib::PetscLibType, box::PetscGridHash, n::Vector{PetscInt}, h::Vector{PetscReal}) end\n\n@for_petsc function PetscGridHashSetGrid(petsclib::$UnionPetscLib, box::PetscGridHash, n::Vector{$PetscInt}, h::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscGridHashSetGrid, $petsc_library),\n               PetscErrorCode,\n               (PetscGridHash, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               box, n, h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdboxes::Vector{PetscInt},boxes::Vector{PetscInt} = PetscGridHashGetEnclosingBox(petsclib::PetscLibType,box::PetscGridHash, numPoints::PetscInt, points::Vector{PetscScalar}) \nFind the grid boxes containing each input point\n\nNot Collective\n\nInput Parameters:\n- `box`       - The grid hash object\n- `numPoints` - The number of input points\n- `points`    - The input point coordinates\n\nOutput Parameters:\n- `dboxes` - An array of `numPoints` x `dim` integers expressing the enclosing box as (i_0, i_1, ..., i_dim)\n- `boxes`  - An array of `numPoints` integers expressing the enclosing box as single number, or `NULL`\n\nLevel: developer\n\n-seealso: `DMPLEX`, `PetscGridHashCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscGridHashGetEnclosingBox\"))\n\"\"\"\nfunction PetscGridHashGetEnclosingBox(petsclib::PetscLibType, box::PetscGridHash, numPoints::PetscInt, points::Vector{PetscScalar}) end\n\n@for_petsc function PetscGridHashGetEnclosingBox(petsclib::$UnionPetscLib, box::PetscGridHash, numPoints::$PetscInt, points::Vector{$PetscScalar} )\n\tdboxes = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tboxes = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscGridHashGetEnclosingBox, $petsc_library),\n               PetscErrorCode,\n               (PetscGridHash, $PetscInt, Ptr{$PetscScalar}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               box, numPoints, points, dboxes, boxes,\n              )\n\n\n\treturn dboxes,boxes\nend \n\n\"\"\"\n\tPetscGridHashDestroy(petsclib::PetscLibType,box::PetscGridHash) \n\n# External Links\n$(_doc_external(\"DM/PetscGridHashDestroy\"))\n\"\"\"\nfunction PetscGridHashDestroy(petsclib::PetscLibType, box::PetscGridHash) end\n\n@for_petsc function PetscGridHashDestroy(petsclib::$UnionPetscLib, box::PetscGridHash )\n\n    @chk ccall(\n               (:PetscGridHashDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscGridHash},),\n               box,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscHeap_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscHeap end\nconst PetscHeap = Ptr{_n_PetscHeap}\n\n# -------------------------------------------------------\n\"\"\"\n\theap::PetscHeap = PetscHeapCreate(petsclib::PetscLibType,maxsize::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapCreate\"))\n\"\"\"\nfunction PetscHeapCreate(petsclib::PetscLibType, maxsize::PetscInt) end\n\n@for_petsc function PetscHeapCreate(petsclib::$UnionPetscLib, maxsize::$PetscInt )\n\theap_ = Ref{PetscHeap}()\n\n    @chk ccall(\n               (:PetscHeapCreate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{PetscHeap}),\n               maxsize, heap_,\n              )\n\n\theap = heap_[]\n\n\treturn heap\nend \n\n\"\"\"\n\tPetscHeapAdd(petsclib::PetscLibType,h::PetscHeap, id::PetscInt, val::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapAdd\"))\n\"\"\"\nfunction PetscHeapAdd(petsclib::PetscLibType, h::PetscHeap, id::PetscInt, val::PetscInt) end\n\n@for_petsc function PetscHeapAdd(petsclib::$UnionPetscLib, h::PetscHeap, id::$PetscInt, val::$PetscInt )\n\n    @chk ccall(\n               (:PetscHeapAdd, $petsc_library),\n               PetscErrorCode,\n               (PetscHeap, $PetscInt, $PetscInt),\n               h, id, val,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tid::PetscInt,val::PetscInt = PetscHeapPop(petsclib::PetscLibType,h::PetscHeap) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapPop\"))\n\"\"\"\nfunction PetscHeapPop(petsclib::PetscLibType, h::PetscHeap) end\n\n@for_petsc function PetscHeapPop(petsclib::$UnionPetscLib, h::PetscHeap )\n\tid_ = Ref{$PetscInt}()\n\tval_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscHeapPop, $petsc_library),\n               PetscErrorCode,\n               (PetscHeap, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               h, id_, val_,\n              )\n\n\tid = id_[]\n\tval = val_[]\n\n\treturn id,val\nend \n\n\"\"\"\n\tid::PetscInt,val::PetscInt = PetscHeapPeek(petsclib::PetscLibType,h::PetscHeap) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapPeek\"))\n\"\"\"\nfunction PetscHeapPeek(petsclib::PetscLibType, h::PetscHeap) end\n\n@for_petsc function PetscHeapPeek(petsclib::$UnionPetscLib, h::PetscHeap )\n\tid_ = Ref{$PetscInt}()\n\tval_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscHeapPeek, $petsc_library),\n               PetscErrorCode,\n               (PetscHeap, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               h, id_, val_,\n              )\n\n\tid = id_[]\n\tval = val_[]\n\n\treturn id,val\nend \n\n\"\"\"\n\tPetscHeapStash(petsclib::PetscLibType,h::PetscHeap, id::PetscInt, val::PetscInt) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapStash\"))\n\"\"\"\nfunction PetscHeapStash(petsclib::PetscLibType, h::PetscHeap, id::PetscInt, val::PetscInt) end\n\n@for_petsc function PetscHeapStash(petsclib::$UnionPetscLib, h::PetscHeap, id::$PetscInt, val::$PetscInt )\n\n    @chk ccall(\n               (:PetscHeapStash, $petsc_library),\n               PetscErrorCode,\n               (PetscHeap, $PetscInt, $PetscInt),\n               h, id, val,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscHeapUnstash(petsclib::PetscLibType,h::PetscHeap) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapUnstash\"))\n\"\"\"\nfunction PetscHeapUnstash(petsclib::PetscLibType, h::PetscHeap) end\n\n@for_petsc function PetscHeapUnstash(petsclib::$UnionPetscLib, h::PetscHeap )\n\n    @chk ccall(\n               (:PetscHeapUnstash, $petsc_library),\n               PetscErrorCode,\n               (PetscHeap,),\n               h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscHeapDestroy(petsclib::PetscLibType,heap::PetscHeap) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapDestroy\"))\n\"\"\"\nfunction PetscHeapDestroy(petsclib::PetscLibType, heap::PetscHeap) end\n\n@for_petsc function PetscHeapDestroy(petsclib::$UnionPetscLib, heap::PetscHeap )\n\n    @chk ccall(\n               (:PetscHeapDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscHeap},),\n               heap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscHeapView(petsclib::PetscLibType,h::PetscHeap, viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Mat/PetscHeapView\"))\n\"\"\"\nfunction PetscHeapView(petsclib::PetscLibType, h::PetscHeap, viewer::PetscViewer) end\n\n@for_petsc function PetscHeapView(petsclib::$UnionPetscLib, h::PetscHeap, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscHeapView, $petsc_library),\n               PetscErrorCode,\n               (PetscHeap, PetscViewer),\n               h, viewer,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscIntStack_wrappers.jl",
    "content": "\n\"\"\"\n\tPetscIntStackDestroy(petsclib::PetscLibType,stack::PetscIntStack) \nThis function destroys a stack.\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `stack` - The stack\n\nLevel: developer\n\n-seealso: `PetscIntStackCreate()`, `PetscIntStackEmpty()`, `PetscIntStackPush()`, `PetscIntStackPop()`, `PetscIntStackTop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntStackDestroy\"))\n\"\"\"\nfunction PetscIntStackDestroy(petsclib::PetscLibType, stack::PetscIntStack) end\n\n@for_petsc function PetscIntStackDestroy(petsclib::$UnionPetscLib, stack::$PetscIntStack )\n\n    @chk ccall(\n               (:PetscIntStackDestroy, $petsc_library),\n               PetscErrorCode,\n               ($PetscIntStack,),\n               stack,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tempty::PetscBool = PetscIntStackEmpty(petsclib::PetscLibType,stack::PetscIntStack) \nThis function determines whether any items have been pushed.\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `stack` - The stack\n\nOutput Parameter:\n- `empty` - `PETSC_TRUE` if the stack is empty\n\nLevel: developer\n\n-seealso: `PetscIntStackCreate()`, `PetscIntStackDestroy()`, `PetscIntStackPush()`, `PetscIntStackPop()`, `PetscIntStackTop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntStackEmpty\"))\n\"\"\"\nfunction PetscIntStackEmpty(petsclib::PetscLibType, stack::PetscIntStack) end\n\n@for_petsc function PetscIntStackEmpty(petsclib::$UnionPetscLib, stack::$PetscIntStack )\n\tempty_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscIntStackEmpty, $petsc_library),\n               PetscErrorCode,\n               ($PetscIntStack, Ptr{PetscBool}),\n               stack, empty_,\n              )\n\n\tempty = empty_[]\n\n\treturn empty\nend \n\n\"\"\"\n\tPetscIntStackTop(petsclib::PetscLibType,stack::PetscIntStack, top::Cint) \nThis function returns the top of the stack.\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `stack` - The stack\n\nOutput Parameter:\n- `top` - The integer on top of the stack\n\nLevel: developer\n\n-seealso: `PetscIntStackCreate()`, `PetscIntStackDestroy()`, `PetscIntStackEmpty()`, `PetscIntStackPush()`, `PetscIntStackPop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntStackTop\"))\n\"\"\"\nfunction PetscIntStackTop(petsclib::PetscLibType, stack::PetscIntStack, top::Cint) end\n\n@for_petsc function PetscIntStackTop(petsclib::$UnionPetscLib, stack::$PetscIntStack, top::Cint )\n\n    @chk ccall(\n               (:PetscIntStackTop, $petsc_library),\n               PetscErrorCode,\n               ($PetscIntStack, Ptr{Cint}),\n               stack, top,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscIntStackPush(petsclib::PetscLibType,stack::PetscIntStack, item::Cint) \nThis function pushes an integer on the stack.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `stack` - The stack\n- `item`  - The integer to push\n\nLevel: developer\n\n-seealso: `PetscIntStackCreate()`, `PetscIntStackDestroy()`, `PetscIntStackEmpty()`, `PetscIntStackPop()`, `PetscIntStackTop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntStackPush\"))\n\"\"\"\nfunction PetscIntStackPush(petsclib::PetscLibType, stack::PetscIntStack, item::Cint) end\n\n@for_petsc function PetscIntStackPush(petsclib::$UnionPetscLib, stack::$PetscIntStack, item::Cint )\n\n    @chk ccall(\n               (:PetscIntStackPush, $petsc_library),\n               PetscErrorCode,\n               ($PetscIntStack, Cint),\n               stack, item,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscIntStackPop(petsclib::PetscLibType,stack::PetscIntStack, item::Cint) \nThis function pops an integer from the stack.\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `stack` - The stack\n\nOutput Parameter:\n- `item` - The integer popped\n\nLevel: developer\n\n-seealso: `PetscIntStackCreate()`, `PetscIntStackDestroy()`, `PetscIntStackEmpty()`, `PetscIntStackPush()`, `PetscIntStackTop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntStackPop\"))\n\"\"\"\nfunction PetscIntStackPop(petsclib::PetscLibType, stack::PetscIntStack, item::Cint) end\n\n@for_petsc function PetscIntStackPop(petsclib::$UnionPetscLib, stack::$PetscIntStack, item::Cint )\n\n    @chk ccall(\n               (:PetscIntStackPop, $petsc_library),\n               PetscErrorCode,\n               ($PetscIntStack, Ptr{Cint}),\n               stack, item,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstack::PetscIntStack = PetscIntStackCreate(petsclib::PetscLibType) \nThis function creates a stack.\n\nNot Collective, No Fortran Support\n\nOutput Parameter:\n- `stack` - The stack\n\nLevel: developer\n\n-seealso: `PetscIntStackDestroy()`, `PetscIntStackEmpty()`, `PetscIntStackPush()`, `PetscIntStackPop()`, `PetscIntStackTop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntStackCreate\"))\n\"\"\"\nfunction PetscIntStackCreate(petsclib::PetscLibType) end\n\n@for_petsc function PetscIntStackCreate(petsclib::$UnionPetscLib)\n\tstack_ = Ref{$PetscIntStack}()\n\n    @chk ccall(\n               (:PetscIntStackCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscIntStack},),\n               stack_,\n              )\n\n\tstack = stack_[]\n\n\treturn stack\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscKDTree_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscKDTree end\nconst PetscKDTree = Ptr{_n_PetscKDTree}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscKDTreeDestroy(petsclib::PetscLibType,tree::PetscKDTree) \ndestroy a `PetscKDTree`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `tree` - tree to destroy\n\nLevel: advanced\n\n-seealso: `PetscKDTree`, `PetscKDTreeCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscKDTreeDestroy\"))\n\"\"\"\nfunction PetscKDTreeDestroy(petsclib::PetscLibType, tree::PetscKDTree) end\n\n@for_petsc function PetscKDTreeDestroy(petsclib::$UnionPetscLib, tree::PetscKDTree )\n\n    @chk ccall(\n               (:PetscKDTreeDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscKDTree},),\n               tree,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnew_tree::PetscKDTree = PetscKDTreeCreate(petsclib::PetscLibType,num_coords::PetscCount, dim::PetscInt, coords::Vector{PetscReal}, copy_mode::PetscCopyMode, max_bucket_size::PetscInt) \ncreate a `PetscKDTree`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `num_coords`      - number of coordinate points to build the `PetscKDTree`\n- `dim`             - the dimension of the coordinates\n- `coords`          - array of the coordinates, in point-major order\n- `copy_mode`       - behavior handling `coords`, `PETSC_COPY_VALUES` generally more performant\n- `max_bucket_size` - maximum number of points stored at each leaf\n\nOutput Parameter:\n- `new_tree` - the resulting `PetscKDTree`\n\nLevel: advanced\n\n-seealso: `PetscKDTree`, `PetscKDTreeDestroy()`, `PetscKDTreeQueryPointsNearestNeighbor()`\n\n# External Links\n$(_doc_external(\"Vec/PetscKDTreeCreate\"))\n\"\"\"\nfunction PetscKDTreeCreate(petsclib::PetscLibType, num_coords::PetscCount, dim::PetscInt, coords::Vector{PetscReal}, copy_mode::PetscCopyMode, max_bucket_size::PetscInt) end\n\n@for_petsc function PetscKDTreeCreate(petsclib::$UnionPetscLib, num_coords::PetscCount, dim::$PetscInt, coords::Vector{$PetscReal}, copy_mode::PetscCopyMode, max_bucket_size::$PetscInt )\n\tnew_tree_ = Ref{PetscKDTree}()\n\n    @chk ccall(\n               (:PetscKDTreeCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, $PetscInt, Ptr{$PetscReal}, PetscCopyMode, $PetscInt, Ptr{PetscKDTree}),\n               num_coords, dim, coords, copy_mode, max_bucket_size, new_tree_,\n              )\n\n\tnew_tree = new_tree_[]\n\n\treturn new_tree\nend \n\n\"\"\"\n\tdistances::Vector{PetscReal} = PetscKDTreeQueryPointsNearestNeighbor(petsclib::PetscLibType,tree::PetscKDTree, num_points::PetscCount, points::Vector{PetscReal}, tolerance::PetscReal, indices::Vector{PetscCount}) \nfind the nearest neighbor in a `PetscKDTree`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `tree`       - tree to query\n- `num_points` - number of points to query\n- `points`     - array of the coordinates, in point-major order\n- `tolerance`  - tolerance for nearest neighbor\n\nOutput Parameters:\n- `indices`   - indices of the nearest neighbor to the query point\n- `distances` - distance between the queried point and the nearest neighbor\n\nLevel: advanced\n\n-seealso: `PetscKDTree`, `PetscKDTreeCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscKDTreeQueryPointsNearestNeighbor\"))\n\"\"\"\nfunction PetscKDTreeQueryPointsNearestNeighbor(petsclib::PetscLibType, tree::PetscKDTree, num_points::PetscCount, points::Vector{PetscReal}, tolerance::PetscReal, indices::Vector{PetscCount}) end\n\n@for_petsc function PetscKDTreeQueryPointsNearestNeighbor(petsclib::$UnionPetscLib, tree::PetscKDTree, num_points::PetscCount, points::Vector{$PetscReal}, tolerance::$PetscReal, indices::Vector{PetscCount} )\n\tdistances = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscKDTreeQueryPointsNearestNeighbor, $petsc_library),\n               PetscErrorCode,\n               (PetscKDTree, PetscCount, Ptr{$PetscReal}, $PetscReal, Ptr{PetscCount}, Ptr{$PetscReal}),\n               tree, num_points, points, tolerance, indices, distances,\n              )\n\n\n\treturn distances\nend \n\n\"\"\"\n\tPetscKDTreeView(petsclib::PetscLibType,tree::PetscKDTree, viewer::PetscViewer) \nview a `PetscKDTree`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `tree`   - tree to view\n- `viewer` - visualization context\n\nLevel: advanced\n\n-seealso: `PetscKDTree`, `PetscKDTreeCreate()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Vec/PetscKDTreeView\"))\n\"\"\"\nfunction PetscKDTreeView(petsclib::PetscLibType, tree::PetscKDTree, viewer::PetscViewer) end\n\n@for_petsc function PetscKDTreeView(petsclib::$UnionPetscLib, tree::PetscKDTree, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscKDTreeView, $petsc_library),\n               PetscErrorCode,\n               (PetscKDTree, PetscViewer),\n               tree, viewer,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscLayout_wrappers.jl",
    "content": "# autodefined type arguments for class ------\n# -------------------------------------------------------\n\"\"\"\n\tmap::PetscLayout = PetscLayoutCreate(petsclib::PetscLibType,comm::MPI_Comm) \nAllocates `PetscLayout` object\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator\n\nOutput Parameter:\n- `map` - the new `PetscLayout`\n\nLevel: advanced\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutSetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetLocalSize()`,\n`PetscLayout`, `PetscLayoutDestroy()`,\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutSetUp()`,\n`PetscLayoutCreateFromSizes()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutCreate\"))\n\"\"\"\nfunction PetscLayoutCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscLayoutCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tmap_ = Ref{PetscLayout}()\n\n    @chk ccall(\n               (:PetscLayoutCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscLayout}),\n               comm, map_,\n              )\n\n\tmap = map_[]\n\n\treturn map\nend \n\n\"\"\"\n\tmap::PetscLayout = PetscLayoutCreateFromSizes(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt, bs::PetscInt) \nAllocates `PetscLayout` object and sets the layout sizes, and sets the layout up.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `n`    - the local size (or `PETSC_DECIDE`)\n- `N`    - the global size (or `PETSC_DECIDE`)\n- `bs`   - the block size (or `PETSC_DECIDE`)\n\nOutput Parameter:\n- `map` - the new `PetscLayout`\n\nLevel: advanced\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetLocalSize()`, `PetscLayout`, `PetscLayoutDestroy()`,\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutSetUp()`, `PetscLayoutCreateFromRanges()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutCreateFromSizes\"))\n\"\"\"\nfunction PetscLayoutCreateFromSizes(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt, bs::PetscInt) end\n\n@for_petsc function PetscLayoutCreateFromSizes(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt, bs::$PetscInt )\n\tmap_ = Ref{PetscLayout}()\n\n    @chk ccall(\n               (:PetscLayoutCreateFromSizes, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{PetscLayout}),\n               comm, n, N, bs, map_,\n              )\n\n\tmap = map_[]\n\n\treturn map\nend \n\n\"\"\"\n\tPetscLayoutDestroy(petsclib::PetscLibType,map::PetscLayout) \nFrees a `PetscLayout` object and frees its range if that exists.\n\nCollective\n\nInput Parameter:\n- `map` - the `PetscLayout`\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutSetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetLocalSize()`,\n`PetscLayout`, `PetscLayoutCreate()`,\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutDestroy\"))\n\"\"\"\nfunction PetscLayoutDestroy(petsclib::PetscLibType, map::PetscLayout) end\n\n@for_petsc function PetscLayoutDestroy(petsclib::$UnionPetscLib, map::PetscLayout )\n\n    @chk ccall(\n               (:PetscLayoutDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLayout},),\n               map,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewmap::PetscLayout = PetscLayoutCreateFromRanges(petsclib::PetscLibType,comm::MPI_Comm, range::Vector{PetscInt}, mode::PetscCopyMode, bs::PetscInt) \nCreates a new `PetscLayout` with the given ownership ranges and sets it up.\n\nCollective\n\nInput Parameters:\n- `comm`  - the MPI communicator\n- `range` - the array of ownership ranges for each rank with length commsize+1\n- `mode`  - the copy mode for range\n- `bs`    - the block size (or `PETSC_DECIDE`)\n\nOutput Parameter:\n- `newmap` - the new `PetscLayout`\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`,\n`PetscLayoutGetLocalSize()`, `PetscLayout`, `PetscLayoutDestroy()`,\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutSetUp()`, `PetscLayoutCreateFromSizes()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutCreateFromRanges\"))\n\"\"\"\nfunction PetscLayoutCreateFromRanges(petsclib::PetscLibType, comm::MPI_Comm, range::Vector{PetscInt}, mode::PetscCopyMode, bs::PetscInt) end\n\n@for_petsc function PetscLayoutCreateFromRanges(petsclib::$UnionPetscLib, comm::MPI_Comm, range::Vector{$PetscInt}, mode::PetscCopyMode, bs::$PetscInt )\n\tnewmap_ = Ref{PetscLayout}()\n\n    @chk ccall(\n               (:PetscLayoutCreateFromRanges, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{$PetscInt}, PetscCopyMode, $PetscInt, Ptr{PetscLayout}),\n               comm, range, mode, bs, newmap_,\n              )\n\n\tnewmap = newmap_[]\n\n\treturn newmap\nend \n\n\"\"\"\n\tPetscLayoutSetUp(petsclib::PetscLibType,map::PetscLayout) \ngiven a map where you have set either the global or local\nsize sets up the map so that it may be used.\n\nCollective\n\nInput Parameter:\n- `map` - pointer to the map\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutSetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetLocalSize()`,\n`PetscLayout`, `PetscLayoutDestroy()`,\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutCreate()`, `PetscSplitOwnership()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutSetUp\"))\n\"\"\"\nfunction PetscLayoutSetUp(petsclib::PetscLibType, map::PetscLayout) end\n\n@for_petsc function PetscLayoutSetUp(petsclib::$UnionPetscLib, map::PetscLayout )\n\n    @chk ccall(\n               (:PetscLayoutSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout,),\n               map,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tout::PetscLayout = PetscLayoutDuplicate(petsclib::PetscLibType,in::PetscLayout) \ncreates a new `PetscLayout` with the same information as a given one. If the `PetscLayout` already exists it is destroyed first.\n\nCollective\n\nInput Parameter:\n- `in` - input `PetscLayout` to be duplicated\n\nOutput Parameter:\n- `out` - the copy\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutDestroy()`, `PetscLayoutSetUp()`, `PetscLayoutReference()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutDuplicate\"))\n\"\"\"\nfunction PetscLayoutDuplicate(petsclib::PetscLibType, in::PetscLayout) end\n\n@for_petsc function PetscLayoutDuplicate(petsclib::$UnionPetscLib, in::PetscLayout )\n\tout_ = Ref{PetscLayout}()\n\n    @chk ccall(\n               (:PetscLayoutDuplicate, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, Ptr{PetscLayout}),\n               in, out_,\n              )\n\n\tout = out_[]\n\n\treturn out\nend \n\n\"\"\"\n\tPetscLayoutReference(petsclib::PetscLibType,in::PetscLayout, out::PetscLayout) \nCauses a PETSc `Vec` or `Mat` to share a `PetscLayout` with one that already exists.\n\nCollective\n\nInput Parameter:\n- `in` - input `PetscLayout` to be copied\n\nOutput Parameter:\n- `out` - the reference location\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutDestroy()`, `PetscLayoutSetUp()`, `PetscLayoutDuplicate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutReference\"))\n\"\"\"\nfunction PetscLayoutReference(petsclib::PetscLibType, in::PetscLayout, out::PetscLayout) end\n\n@for_petsc function PetscLayoutReference(petsclib::$UnionPetscLib, in::PetscLayout, out::PetscLayout )\n\n    @chk ccall(\n               (:PetscLayoutReference, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, Ptr{PetscLayout}),\n               in, out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLayoutSetISLocalToGlobalMapping(petsclib::PetscLibType,in::PetscLayout, ltog::ISLocalToGlobalMapping) \nsets a `ISLocalGlobalMapping` into a `PetscLayout`\n\nCollective\n\nInput Parameters:\n- `in`   - input `PetscLayout`\n- `ltog` - the local to global mapping\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutDestroy()`, `PetscLayoutSetUp()`, `PetscLayoutDuplicate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutSetISLocalToGlobalMapping\"))\n\"\"\"\nfunction PetscLayoutSetISLocalToGlobalMapping(petsclib::PetscLibType, in::PetscLayout, ltog::ISLocalToGlobalMapping) end\n\n@for_petsc function PetscLayoutSetISLocalToGlobalMapping(petsclib::$UnionPetscLib, in::PetscLayout, ltog::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:PetscLayoutSetISLocalToGlobalMapping, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, ISLocalToGlobalMapping),\n               in, ltog,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLayoutSetLocalSize(petsclib::PetscLibType,map::PetscLayout, n::PetscInt) \nSets the local size for a `PetscLayout` object.\n\nCollective\n\nInput Parameters:\n- `map` - pointer to the map\n- `n`   - the local size, pass `PETSC_DECIDE` (the default) to have this value determined by the global size set with `PetscLayoutSetSize()`\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutSetUp()`\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutSetLocalSize\"))\n\"\"\"\nfunction PetscLayoutSetLocalSize(petsclib::PetscLibType, map::PetscLayout, n::PetscInt) end\n\n@for_petsc function PetscLayoutSetLocalSize(petsclib::$UnionPetscLib, map::PetscLayout, n::$PetscInt )\n\n    @chk ccall(\n               (:PetscLayoutSetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, $PetscInt),\n               map, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = PetscLayoutGetLocalSize(petsclib::PetscLibType,map::PetscLayout) \nGets the local size for a `PetscLayout` object.\n\nNot Collective\n\nInput Parameter:\n- `map` - pointer to the map\n\nOutput Parameter:\n- `n` - the local size\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutSetUp()`\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutGetLocalSize\"))\n\"\"\"\nfunction PetscLayoutGetLocalSize(petsclib::PetscLibType, map::PetscLayout) end\n\n@for_petsc function PetscLayoutGetLocalSize(petsclib::$UnionPetscLib, map::PetscLayout )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLayoutGetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, Ptr{$PetscInt}),\n               map, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tPetscLayoutSetSize(petsclib::PetscLibType,map::PetscLayout, n::PetscInt) \nSets the global size for a `PetscLayout` object.\n\nLogically Collective\n\nInput Parameters:\n- `map` - pointer to the map\n- `n`   - the global size, use `PETSC_DETERMINE` (the default) to have this value computed as the sum of the local sizes set with `PetscLayoutSetLocalSize()`\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutGetSize()`, `PetscLayoutSetUp()`\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutSetSize\"))\n\"\"\"\nfunction PetscLayoutSetSize(petsclib::PetscLibType, map::PetscLayout, n::PetscInt) end\n\n@for_petsc function PetscLayoutSetSize(petsclib::$UnionPetscLib, map::PetscLayout, n::$PetscInt )\n\n    @chk ccall(\n               (:PetscLayoutSetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, $PetscInt),\n               map, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = PetscLayoutGetSize(petsclib::PetscLibType,map::PetscLayout) \nGets the global size for a `PetscLayout` object.\n\nNot Collective\n\nInput Parameter:\n- `map` - pointer to the map\n\nOutput Parameter:\n- `n` - the global size\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutSetUp()`\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutGetSize\"))\n\"\"\"\nfunction PetscLayoutGetSize(petsclib::PetscLibType, map::PetscLayout) end\n\n@for_petsc function PetscLayoutGetSize(petsclib::$UnionPetscLib, map::PetscLayout )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLayoutGetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, Ptr{$PetscInt}),\n               map, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tPetscLayoutSetBlockSize(petsclib::PetscLibType,map::PetscLayout, bs::PetscInt) \nSets the block size for a `PetscLayout` object.\n\nLogically Collective\n\nInput Parameters:\n- `map` - pointer to the map\n- `bs`  - the size\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutGetBlockSize()`,\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutSetBlockSize\"))\n\"\"\"\nfunction PetscLayoutSetBlockSize(petsclib::PetscLibType, map::PetscLayout, bs::PetscInt) end\n\n@for_petsc function PetscLayoutSetBlockSize(petsclib::$UnionPetscLib, map::PetscLayout, bs::$PetscInt )\n\n    @chk ccall(\n               (:PetscLayoutSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, $PetscInt),\n               map, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = PetscLayoutGetBlockSize(petsclib::PetscLibType,map::PetscLayout) \nGets the block size for a `PetscLayout` object.\n\nNot Collective\n\nInput Parameter:\n- `map` - pointer to the map\n\nOutput Parameter:\n- `bs` - the size\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutSetUp()`\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetSize()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutGetBlockSize\"))\n\"\"\"\nfunction PetscLayoutGetBlockSize(petsclib::PetscLibType, map::PetscLayout) end\n\n@for_petsc function PetscLayoutGetBlockSize(petsclib::$UnionPetscLib, map::PetscLayout )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLayoutGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, Ptr{$PetscInt}),\n               map, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\trstart::PetscInt,rend_::PetscInt = PetscLayoutGetRange(petsclib::PetscLibType,map::PetscLayout) \ngets the range of values owned by this process\n\nNot Collective\n\nInput Parameter:\n- `map` - pointer to the map\n\nOutput Parameters:\n- `rstart` - first index owned by this process\n- `rend`   - one more than the last index owned by this process\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutSetSize()`,\n`PetscLayoutGetSize()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutGetRange\"))\n\"\"\"\nfunction PetscLayoutGetRange(petsclib::PetscLibType, map::PetscLayout) end\n\n@for_petsc function PetscLayoutGetRange(petsclib::$UnionPetscLib, map::PetscLayout )\n\trstart_ = Ref{$PetscInt}()\n\trend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLayoutGetRange, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               map, rstart_, rend__,\n              )\n\n\trstart = rstart_[]\n\trend_ = rend__[]\n\n\treturn rstart,rend_\nend \n\n\"\"\"\n\trange::Vector{PetscInt} = PetscLayoutGetRanges(petsclib::PetscLibType,map::PetscLayout) \ngets the ranges of values owned by all processes\n\nNot Collective\n\nInput Parameter:\n- `map` - pointer to the map\n\nOutput Parameter:\n- `range` - start of each processors range of indices (the final entry is one more than the\nlast index on the last process). The length of the array is one more than the number of processes in the MPI\ncommunicator owned by `map`\n\nLevel: developer\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutSetSize()`,\n`PetscLayoutGetSize()`, `PetscLayoutGetRange()`, `PetscLayoutSetBlockSize()`, `PetscLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutGetRanges\"))\n\"\"\"\nfunction PetscLayoutGetRanges(petsclib::PetscLibType, map::PetscLayout) end\n\n@for_petsc function PetscLayoutGetRanges(petsclib::$UnionPetscLib, map::PetscLayout )\n\trange_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscLayoutGetRanges, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, Ptr{Ptr{$PetscInt}}),\n               map, range_,\n              )\n\n\trange = unsafe_wrap(Array, range_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn range\nend \n\n\"\"\"\n\tcongruent::PetscBool = PetscLayoutCompare(petsclib::PetscLibType,mapa::PetscLayout, mapb::PetscLayout) \nCompares two layouts\n\nNot Collective\n\nInput Parameters:\n- `mapa` - pointer to the first map\n- `mapb` - pointer to the second map\n\nOutput Parameter:\n- `congruent` - `PETSC_TRUE` if the two layouts are congruent, `PETSC_FALSE` otherwise\n\nLevel: beginner\n\n-seealso: [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutGetLocalSize()`, `PetscLayoutGetBlockSize()`,\n`PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutCompare\"))\n\"\"\"\nfunction PetscLayoutCompare(petsclib::PetscLibType, mapa::PetscLayout, mapb::PetscLayout) end\n\n@for_petsc function PetscLayoutCompare(petsclib::$UnionPetscLib, mapa::PetscLayout, mapb::PetscLayout )\n\tcongruent_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLayoutCompare, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, PetscLayout, Ptr{PetscBool}),\n               mapa, mapb, congruent_,\n              )\n\n\tcongruent = congruent_[]\n\n\treturn congruent\nend \n\n\"\"\"\n\tPetscLayoutFindOwner(petsclib::PetscLibType,map::PetscLayout, idx::PetscInt, owner::PetscMPIInt) \nFind the owning MPI process for a global index\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `map` - the layout\n- `idx` - global index to find the owner of\n\nOutput Parameter:\n- `owner` - the owning rank\n\nLevel: developer\n\n-seealso: `PetscLayout`, `PetscLayoutFindOwnerIndex()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutFindOwner\"))\n\"\"\"\nfunction PetscLayoutFindOwner(petsclib::PetscLibType, map::PetscLayout, idx::PetscInt, owner::PetscMPIInt) end\n\n@for_petsc function PetscLayoutFindOwner(petsclib::$UnionPetscLib, map::PetscLayout, idx::$PetscInt, owner::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscLayoutFindOwner, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, $PetscInt, Ptr{PetscMPIInt}),\n               map, idx, owner,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlidx::PetscInt = PetscLayoutFindOwnerIndex(petsclib::PetscLibType,map::PetscLayout, idx::PetscInt, owner::PetscMPIInt) \nFind the owning MPI process and the local index on that process for a global index\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `map` - the layout\n- `idx` - global index to find the owner of\n\nOutput Parameters:\n- `owner` - the owning rank\n- `lidx`  - local index used by the owner for `idx`\n\nLevel: developer\n\n-seealso: `PetscLayout`, `PetscLayoutFindOwner()`\n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutFindOwnerIndex\"))\n\"\"\"\nfunction PetscLayoutFindOwnerIndex(petsclib::PetscLibType, map::PetscLayout, idx::PetscInt, owner::PetscMPIInt) end\n\n@for_petsc function PetscLayoutFindOwnerIndex(petsclib::$UnionPetscLib, map::PetscLayout, idx::$PetscInt, owner::PetscMPIInt )\n\tlidx_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLayoutFindOwnerIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, $PetscInt, Ptr{PetscMPIInt}, Ptr{$PetscInt}),\n               map, idx, owner, lidx_,\n              )\n\n\tlidx = lidx_[]\n\n\treturn lidx\nend \n\n\"\"\"\n\ton::PetscInt,oidxs::Vector{PetscInt},ogidxs::Vector{PetscInt} = PetscLayoutMapLocal(petsclib::PetscLibType,map::PetscLayout, N::PetscInt, idxs::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"Vec/PetscLayoutMapLocal\"))\n\"\"\"\nfunction PetscLayoutMapLocal(petsclib::PetscLibType, map::PetscLayout, N::PetscInt, idxs::Vector{PetscInt}) end\n\n@for_petsc function PetscLayoutMapLocal(petsclib::$UnionPetscLib, map::PetscLayout, N::$PetscInt, idxs::Vector{$PetscInt} )\n\ton_ = Ref{$PetscInt}()\n\toidxs_ = Ref{Ptr{$PetscInt}}()\n\togidxs_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscLayoutMapLocal, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               map, N, idxs, on_, oidxs_, ogidxs_,\n              )\n\n\ton = on_[]\n\toidxs = unsafe_wrap(Array, oidxs_[], VecGetLocalSize(petsclib, x); own = false)\n\togidxs = unsafe_wrap(Array, ogidxs_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn on,oidxs,ogidxs\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscLimiter_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscLimiter end\nconst PetscLimiter = Ptr{_n_PetscLimiter}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscLimiterRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `PetscLimiter` implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\n-seealso: `PetscLimiter`, `PetscLimiterType`, `PetscLimiterRegisterAll()`, `PetscLimiterRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterRegister\"))\n\"\"\"\nfunction PetscLimiterRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscLimiterRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscLimiterRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLimiterSetType(petsclib::PetscLibType,lim::PetscLimiter, name::PetscLimiterType) \nBuilds a `PetscLimiter` for a given `PetscLimiterType`\n\nCollective\n\nInput Parameters:\n- `lim`  - The `PetscLimiter` object\n- `name` - The kind of limiter\n\nOptions Database Key:\n- `-petsclimiter_type <type>` - Sets the PetscLimiter type; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `PetscLimiter`, `PetscLimiterType`, `PetscLimiterGetType()`, `PetscLimiterCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterSetType\"))\n\"\"\"\nfunction PetscLimiterSetType(petsclib::PetscLibType, lim::PetscLimiter, name::PetscLimiterType) end\n\n@for_petsc function PetscLimiterSetType(petsclib::$UnionPetscLib, lim::PetscLimiter, name::PetscLimiterType )\n\n    @chk ccall(\n               (:PetscLimiterSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscLimiter, PetscLimiterType),\n               lim, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscLimiterType = PetscLimiterGetType(petsclib::PetscLibType,lim::PetscLimiter) \nGets the `PetscLimiterType` name (as a string) from the `PetscLimiter`.\n\nNot Collective\n\nInput Parameter:\n- `lim` - The `PetscLimiter`\n\nOutput Parameter:\n- `name` - The `PetscLimiterType`\n\nLevel: intermediate\n\n-seealso: `PetscLimiter`, `PetscLimiterType`, `PetscLimiterSetType()`, `PetscLimiterCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterGetType\"))\n\"\"\"\nfunction PetscLimiterGetType(petsclib::PetscLibType, lim::PetscLimiter) end\n\n@for_petsc function PetscLimiterGetType(petsclib::$UnionPetscLib, lim::PetscLimiter )\n\tname_ = Ref{PetscLimiterType}()\n\n    @chk ccall(\n               (:PetscLimiterGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscLimiter, Ptr{PetscLimiterType}),\n               lim, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\tPetscLimiterViewFromOptions(petsclib::PetscLibType,A::PetscLimiter, obj::PetscObject, name::String) \nView a `PetscLimiter` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscLimiter` object to view\n- `obj`  - Optional object that provides the options prefix to use\n- `name` - command line option name\n\nLevel: intermediate\n\n-seealso: `PetscLimiter`, `PetscLimiterView()`, `PetscObjectViewFromOptions()`, `PetscLimiterCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterViewFromOptions\"))\n\"\"\"\nfunction PetscLimiterViewFromOptions(petsclib::PetscLibType, A::PetscLimiter, obj::PetscObject, name::String) end\n\n@for_petsc function PetscLimiterViewFromOptions(petsclib::$UnionPetscLib, A::PetscLimiter, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscLimiterViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscLimiter, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLimiterView(petsclib::PetscLibType,lim::PetscLimiter, v::PetscViewer) \nViews a `PetscLimiter`\n\nCollective\n\nInput Parameters:\n- `lim` - the `PetscLimiter` object to view\n- `v`   - the viewer\n\nLevel: beginner\n\n-seealso: `PetscLimiter`, `PetscViewer`, `PetscLimiterDestroy()`, `PetscLimiterViewFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterView\"))\n\"\"\"\nfunction PetscLimiterView(petsclib::PetscLibType, lim::PetscLimiter, v::PetscViewer) end\n\n@for_petsc function PetscLimiterView(petsclib::$UnionPetscLib, lim::PetscLimiter, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscLimiterView, $petsc_library),\n               PetscErrorCode,\n               (PetscLimiter, PetscViewer),\n               lim, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLimiterSetFromOptions(petsclib::PetscLibType,lim::PetscLimiter) \nsets parameters in a `PetscLimiter` from the options database\n\nCollective\n\nInput Parameter:\n- `lim` - the `PetscLimiter` object to set options for\n\nLevel: intermediate\n\n-seealso: `PetscLimiter`, `PetscLimiterView()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterSetFromOptions\"))\n\"\"\"\nfunction PetscLimiterSetFromOptions(petsclib::PetscLibType, lim::PetscLimiter) end\n\n@for_petsc function PetscLimiterSetFromOptions(petsclib::$UnionPetscLib, lim::PetscLimiter )\n\n    @chk ccall(\n               (:PetscLimiterSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscLimiter,),\n               lim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLimiterSetUp(petsclib::PetscLibType,lim::PetscLimiter) \nConstruct data structures for the `PetscLimiter`\n\nCollective\n\nInput Parameter:\n- `lim` - the `PetscLimiter` object to setup\n\nLevel: intermediate\n\n-seealso: `PetscLimiter`, `PetscLimiterView()`, `PetscLimiterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterSetUp\"))\n\"\"\"\nfunction PetscLimiterSetUp(petsclib::PetscLibType, lim::PetscLimiter) end\n\n@for_petsc function PetscLimiterSetUp(petsclib::$UnionPetscLib, lim::PetscLimiter )\n\n    @chk ccall(\n               (:PetscLimiterSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscLimiter,),\n               lim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLimiterDestroy(petsclib::PetscLibType,lim::PetscLimiter) \nDestroys a `PetscLimiter` object\n\nCollective\n\nInput Parameter:\n- `lim` - the `PetscLimiter` object to destroy\n\nLevel: beginner\n\n-seealso: `PetscLimiter`, `PetscLimiterView()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterDestroy\"))\n\"\"\"\nfunction PetscLimiterDestroy(petsclib::PetscLibType, lim::PetscLimiter) end\n\n@for_petsc function PetscLimiterDestroy(petsclib::$UnionPetscLib, lim::PetscLimiter )\n\n    @chk ccall(\n               (:PetscLimiterDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLimiter},),\n               lim,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlim::PetscLimiter = PetscLimiterCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscLimiter` object. The type can then be set with `PetscLimiterSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscLimiter` object\n\nOutput Parameter:\n- `lim` - The `PetscLimiter` object\n\nLevel: beginner\n\n-seealso: `PetscLimiter`, `PetscLimiterType`, `PetscLimiterSetType()`, `PETSCLIMITERSIN`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterCreate\"))\n\"\"\"\nfunction PetscLimiterCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscLimiterCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tlim_ = Ref{PetscLimiter}()\n\n    @chk ccall(\n               (:PetscLimiterCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscLimiter}),\n               comm, lim_,\n              )\n\n\tlim = lim_[]\n\n\treturn lim\nend \n\n\"\"\"\n\tphi::PetscReal = PetscLimiterLimit(petsclib::PetscLibType,lim::PetscLimiter, flim::PetscReal) \nLimit the flux\n\nInput Parameters:\n- `lim`  - The `PetscLimiter`\n- `flim` - The input field\n\nOutput Parameter:\n- `phi` - The limited field\n\nLevel: beginner\n\n-seealso: `PetscLimiter`, `PetscLimiterType`, `PetscLimiterSetType()`, `PetscLimiterCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscLimiterLimit\"))\n\"\"\"\nfunction PetscLimiterLimit(petsclib::PetscLibType, lim::PetscLimiter, flim::PetscReal) end\n\n@for_petsc function PetscLimiterLimit(petsclib::$UnionPetscLib, lim::PetscLimiter, flim::$PetscReal )\n\tphi_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscLimiterLimit, $petsc_library),\n               PetscErrorCode,\n               (PetscLimiter, $PetscReal, Ptr{$PetscReal}),\n               lim, flim, phi_,\n              )\n\n\tphi = phi_[]\n\n\treturn phi\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscLog_wrappers.jl",
    "content": "\n\"\"\"\n\tPetscLogHandlerStart(petsclib::PetscLibType,h::PetscLogHandler) \nConnect a log handler to PETSc's global logging stream and state.\n\nLogically collective\n\nInput Parameters:\n- `h` - a `PetscLogHandler`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogState`, `PetscLogHandlerStop()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerStart\"))\n\"\"\"\nfunction PetscLogHandlerStart(petsclib::PetscLibType, h::PetscLogHandler) end\n\n@for_petsc function PetscLogHandlerStart(petsclib::$UnionPetscLib, h::PetscLogHandler )\n\n    @chk ccall(\n               (:PetscLogHandlerStart, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler,),\n               h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerStop(petsclib::PetscLibType,h::PetscLogHandler) \nDisconnect a log handler from PETSc's global logging stream.\n\nLogically collective\n\nInput Parameters:\n- `h` - a `PetscLogHandler`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogState`, `PetscLogHandlerStart()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerStop\"))\n\"\"\"\nfunction PetscLogHandlerStop(petsclib::PetscLibType, h::PetscLogHandler) end\n\n@for_petsc function PetscLogHandlerStop(petsclib::$UnionPetscLib, h::PetscLogHandler )\n\n    @chk ccall(\n               (:PetscLogHandlerStop, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler,),\n               h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerRegister(petsclib::PetscLibType,sname::String, fnc::external) \nRegister a new `PetscLogHandler`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerCreate()`, `PetscLogHandlerSetType()`, `PetscLogHandlerGetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerRegister\"))\n\"\"\"\nfunction PetscLogHandlerRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscLogHandlerRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscLogHandlerRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerSetType(petsclib::PetscLibType,handler::PetscLogHandler, name::PetscLogHandlerType) \nSet the type of a `PetscLogHandler`\n\nInput Parameters:\n- `handler` - the `PetscLogHandler`\n- `name`    - The kind of log handler\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerCreate()`, `PetscLogHandlerRegister()`, `PetscLogHandlerGetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerSetType\"))\n\"\"\"\nfunction PetscLogHandlerSetType(petsclib::PetscLibType, handler::PetscLogHandler, name::PetscLogHandlerType) end\n\n@for_petsc function PetscLogHandlerSetType(petsclib::$UnionPetscLib, handler::PetscLogHandler, name::PetscLogHandlerType )\n\n    @chk ccall(\n               (:PetscLogHandlerSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogHandlerType),\n               handler, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscLogHandlerType = PetscLogHandlerGetType(petsclib::PetscLibType,handler::PetscLogHandler) \nGets the `PetscLoagHandlerType` (as a string) from the `PetscLogHandler` object.\n\nNot collective\n\nInput Parameter:\n- `handler` - the `PetscLogHandler`\n\nOutput Parameter:\n- `name` - The `PetscLogHandlerType` name\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerCreate()`, `PetscLogHandlerRegister()`, `PetscLogHandlerSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerGetType\"))\n\"\"\"\nfunction PetscLogHandlerGetType(petsclib::PetscLibType, handler::PetscLogHandler) end\n\n@for_petsc function PetscLogHandlerGetType(petsclib::$UnionPetscLib, handler::PetscLogHandler )\n\tname_ = Ref{PetscLogHandlerType}()\n\n    @chk ccall(\n               (:PetscLogHandlerGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, Ptr{PetscLogHandlerType}),\n               handler, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\thandler::PetscLogHandler = PetscLogHandlerCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreate a log handler for profiling events and stages.  PETSc\nprovides several implementations of `PetscLogHandler` that interface to different ways to\nsummarize or visualize profiling data: see `PetscLogHandlerType` for a list.\n\nCollective\n\nInput Parameter:\n- `comm` - the communicator for synchronizing and viewing events with this handler\n\nOutput Parameter:\n- `handler` - the `PetscLogHandler`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerSetType()`, `PetscLogHandlerStart()`, `PetscLogHandlerStop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerCreate\"))\n\"\"\"\nfunction PetscLogHandlerCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscLogHandlerCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\thandler_ = Ref{PetscLogHandler}()\n\n    @chk ccall(\n               (:PetscLogHandlerCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscLogHandler}),\n               comm, handler_,\n              )\n\n\thandler = handler_[]\n\n\treturn handler\nend \n\n\"\"\"\n\tPetscLogHandlerDestroy(petsclib::PetscLibType,handler::PetscLogHandler) \nDestroy a `PetscLogHandler`\n\nLogically collective\n\nInput Parameter:\n- `handler` - handler to be destroyed\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerDestroy\"))\n\"\"\"\nfunction PetscLogHandlerDestroy(petsclib::PetscLibType, handler::PetscLogHandler) end\n\n@for_petsc function PetscLogHandlerDestroy(petsclib::$UnionPetscLib, handler::PetscLogHandler )\n\n    @chk ccall(\n               (:PetscLogHandlerDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogHandler},),\n               handler,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerSetState(petsclib::PetscLibType,h::PetscLogHandler, state::PetscLogState) \nSet the logging state that provides the stream of events and stages for a log handler.\n\nLogically collective\n\nInput Parameters:\n- `h`     - the `PetscLogHandler`\n- `state` - the `PetscLogState`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogState`, `PetscLogEventBegin()`, `PetscLogHandlerStart()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerSetState\"))\n\"\"\"\nfunction PetscLogHandlerSetState(petsclib::PetscLibType, h::PetscLogHandler, state::PetscLogState) end\n\n@for_petsc function PetscLogHandlerSetState(petsclib::$UnionPetscLib, h::PetscLogHandler, state::PetscLogState )\n\n    @chk ccall(\n               (:PetscLogHandlerSetState, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogState),\n               h, state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerGetState(petsclib::PetscLibType,h::PetscLogHandler, state::PetscLogState) \nGet the logging state that provides the stream of events and stages for a log handler.\n\nLogically collective\n\nInput Parameter:\n- `h` - the `PetscLogHandler`\n\nOutput Parameter:\n- `state` - the `PetscLogState`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogState`, `PetscLogEventBegin()`, `PetscLogHandlerStart()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerGetState\"))\n\"\"\"\nfunction PetscLogHandlerGetState(petsclib::PetscLibType, h::PetscLogHandler, state::PetscLogState) end\n\n@for_petsc function PetscLogHandlerGetState(petsclib::$UnionPetscLib, h::PetscLogHandler, state::PetscLogState )\n\n    @chk ccall(\n               (:PetscLogHandlerGetState, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, Ptr{PetscLogState}),\n               h, state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerEventBegin(petsclib::PetscLibType,h::PetscLogHandler, e::PetscLogEvent, o1::PetscObject, o2::PetscObject, o3::PetscObject, o4::PetscObject) \nRecord the beginning of an event in a log handler\n\nNot collective\n\nInput Parameters:\n- `h`  - the `PetscLogHandler`\n- `e`  - a registered `PetscLogEvent`\n- `o1` - `PetscObject` associated with the event (may be `NULL`)\n- `o2` - `PetscObject` associated with the event (may be `NULL`)\n- `o3` - `PetscObject` associated with the event (may be `NULL`)\n- `o4` - `PetscObject` associated with the event (may be `NULL`)\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogEventSync()`, `PetscLogHandlerEventEnd()`, `PetscLogHandlerEventSync()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerEventBegin\"))\n\"\"\"\nfunction PetscLogHandlerEventBegin(petsclib::PetscLibType, h::PetscLogHandler, e::PetscLogEvent, o1::PetscObject, o2::PetscObject, o3::PetscObject, o4::PetscObject) end\n\n@for_petsc function PetscLogHandlerEventBegin(petsclib::$UnionPetscLib, h::PetscLogHandler, e::PetscLogEvent, o1::PetscObject, o2::PetscObject, o3::PetscObject, o4::PetscObject )\n\n    @chk ccall(\n               (:PetscLogHandlerEventBegin, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject),\n               h, e, o1, o2, o3, o4,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerEventEnd(petsclib::PetscLibType,h::PetscLogHandler, e::PetscLogEvent, o1::PetscObject, o2::PetscObject, o3::PetscObject, o4::PetscObject) \nRecord the end of an event in a log handler\n\nNot collective\n\nInput Parameters:\n- `h`  - the `PetscLogHandler`\n- `e`  - a registered `PetscLogEvent`\n- `o1` - `PetscObject` associated with the event (may be `NULL`)\n- `o2` - `PetscObject` associated with the event (may be `NULL`)\n- `o3` - `PetscObject` associated with the event (may be `NULL`)\n- `o4` - `PetscObject` associated with the event (may be `NULL`)\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogEventSync()`, `PetscLogHandlerEventBegin()`, `PetscLogHandlerEventSync()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerEventEnd\"))\n\"\"\"\nfunction PetscLogHandlerEventEnd(petsclib::PetscLibType, h::PetscLogHandler, e::PetscLogEvent, o1::PetscObject, o2::PetscObject, o3::PetscObject, o4::PetscObject) end\n\n@for_petsc function PetscLogHandlerEventEnd(petsclib::$UnionPetscLib, h::PetscLogHandler, e::PetscLogEvent, o1::PetscObject, o2::PetscObject, o3::PetscObject, o4::PetscObject )\n\n    @chk ccall(\n               (:PetscLogHandlerEventEnd, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject),\n               h, e, o1, o2, o3, o4,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerEventSync(petsclib::PetscLibType,h::PetscLogHandler, e::PetscLogEvent, comm::MPI_Comm) \nSynchronize a logging event\n\nCollective\n\nInput Parameters:\n- `h`    - the `PetscLogHandler`\n- `e`    - a registered `PetscLogEvent`\n- `comm` - the communicator over which to synchronize `e`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogEventSync()`, `PetscLogHandlerEventBegin()`, `PetscLogHandlerEventEnd()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerEventSync\"))\n\"\"\"\nfunction PetscLogHandlerEventSync(petsclib::PetscLibType, h::PetscLogHandler, e::PetscLogEvent, comm::MPI_Comm) end\n\n@for_petsc function PetscLogHandlerEventSync(petsclib::$UnionPetscLib, h::PetscLogHandler, e::PetscLogEvent, comm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscLogHandlerEventSync, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogEvent, MPI_Comm),\n               h, e, comm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerObjectCreate(petsclib::PetscLibType,h::PetscLogHandler, obj::PetscObject) \nRecord the creation of an object in a log handler.\n\nNot collective\n\nInput Parameters:\n- `h`   - the `PetscLogHandler`\n- `obj` - a newly created `PetscObject`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogObjectCreate()`, `PetscLogObjectDestroy()`, `PetscLogHandlerObjectDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerObjectCreate\"))\n\"\"\"\nfunction PetscLogHandlerObjectCreate(petsclib::PetscLibType, h::PetscLogHandler, obj::PetscObject) end\n\n@for_petsc function PetscLogHandlerObjectCreate(petsclib::$UnionPetscLib, h::PetscLogHandler, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscLogHandlerObjectCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscObject),\n               h, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerObjectDestroy(petsclib::PetscLibType,h::PetscLogHandler, obj::PetscObject) \nRecord the destruction of an object in a log handler.\n\nNot collective\n\nInput Parameters:\n- `h`   - the `PetscLogHandler`\n- `obj` - a newly created `PetscObject`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogObjectCreate()`, `PetscLogObjectDestroy()`, `PetscLogHandlerObjectCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerObjectDestroy\"))\n\"\"\"\nfunction PetscLogHandlerObjectDestroy(petsclib::PetscLibType, h::PetscLogHandler, obj::PetscObject) end\n\n@for_petsc function PetscLogHandlerObjectDestroy(petsclib::$UnionPetscLib, h::PetscLogHandler, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscLogHandlerObjectDestroy, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscObject),\n               h, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerStagePush(petsclib::PetscLibType,h::PetscLogHandler, stage::PetscLogStage) \nBegin a new logging stage in a log handler.\n\nNot collective\n\nInput Parameters:\n- `h`     - the `PetscLogHandler`\n- `stage` - a registered `PetscLogStage`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogHandlerStagePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerStagePush\"))\n\"\"\"\nfunction PetscLogHandlerStagePush(petsclib::PetscLibType, h::PetscLogHandler, stage::PetscLogStage) end\n\n@for_petsc function PetscLogHandlerStagePush(petsclib::$UnionPetscLib, h::PetscLogHandler, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogHandlerStagePush, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage),\n               h, stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerStagePop(petsclib::PetscLibType,h::PetscLogHandler, stage::PetscLogStage) \nEnd the current logging stage in a log handler.\n\nNot collective\n\nInput Parameters:\n- `h`     - the `PetscLogHandler`\n- `stage` - a registered `PetscLogStage`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogHandlerStagePush()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerStagePop\"))\n\"\"\"\nfunction PetscLogHandlerStagePop(petsclib::PetscLibType, h::PetscLogHandler, stage::PetscLogStage) end\n\n@for_petsc function PetscLogHandlerStagePop(petsclib::$UnionPetscLib, h::PetscLogHandler, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogHandlerStagePop, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage),\n               h, stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerView(petsclib::PetscLibType,h::PetscLogHandler, viewer::PetscViewer) \nView the data recorded in a log handler.\n\nCollective\n\nInput Parameters:\n- `h`      - the `PetscLogHandler`\n- `viewer` - the `PetscViewer`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerView\"))\n\"\"\"\nfunction PetscLogHandlerView(petsclib::PetscLibType, h::PetscLogHandler, viewer::PetscViewer) end\n\n@for_petsc function PetscLogHandlerView(petsclib::$UnionPetscLib, h::PetscLogHandler, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscLogHandlerView, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscViewer),\n               h, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerGetEventPerfInfo(petsclib::PetscLibType,handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent, event_info::PetscEventPerfInfo) \nGet a direct reference to the `PetscEventPerfInfo` of a stage and event\n\nNot collective, No Fortran Support\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `stage`   - a `PetscLogStage` (or `PETSC_DEFAULT` for the current stage)\n- `event`   - a `PetscLogEvent`\n\nOutput Parameter:\n- `event_info` - a pointer to a performance log for `event` during `stage` (or `NULL` if this handler does not use\n`PetscEventPerfInfo` to record performance data); writing to `event_info` will change the record in\n`handler`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventGetPerfInfo()`, `PETSCLOGHANDLERDEFAULT`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerGetEventPerfInfo\"))\n\"\"\"\nfunction PetscLogHandlerGetEventPerfInfo(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent, event_info::PetscEventPerfInfo) end\n\n@for_petsc function PetscLogHandlerGetEventPerfInfo(petsclib::$UnionPetscLib, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent, event_info::PetscEventPerfInfo )\n\n    @chk ccall(\n               (:PetscLogHandlerGetEventPerfInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage, PetscLogEvent, PetscEventPerfInfo),\n               handler, stage, event, event_info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerGetStagePerfInfo(petsclib::PetscLibType,handler::PetscLogHandler, stage::PetscLogStage, stage_info::PetscEventPerfInfo) \nGet a direct reference to the `PetscEventPerfInfo` of a stage\n\nNot collective, No Fortran Support\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `stage`   - a `PetscLogStage` (or `PETSC_DEFAULT` for the current stage)\n\nOutput Parameter:\n- `stage_info` - a pointer to a performance log for `stage` (or `NULL` if this handler does not use `PetscEventPerfInfo`\nto record performance data); writing to `stage_info` will change the record in `handler`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventGetPerfInfo()`, `PETSCLOGHANDLERDEFAULT`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerGetStagePerfInfo\"))\n\"\"\"\nfunction PetscLogHandlerGetStagePerfInfo(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, stage_info::PetscEventPerfInfo) end\n\n@for_petsc function PetscLogHandlerGetStagePerfInfo(petsclib::$UnionPetscLib, handler::PetscLogHandler, stage::PetscLogStage, stage_info::PetscEventPerfInfo )\n\n    @chk ccall(\n               (:PetscLogHandlerGetStagePerfInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage, PetscEventPerfInfo),\n               handler, stage, stage_info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerSetLogActions(petsclib::PetscLibType,handler::PetscLogHandler, flag::PetscBool) \nDetermines whether actions are logged for a log handler.\n\nNot Collective\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `flag`    - `PETSC_TRUE` if actions are to be logged (ignored if `handler` does not log actions)\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogSetLogActions()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerSetLogActions\"))\n\"\"\"\nfunction PetscLogHandlerSetLogActions(petsclib::PetscLibType, handler::PetscLogHandler, flag::PetscBool) end\n\n@for_petsc function PetscLogHandlerSetLogActions(petsclib::$UnionPetscLib, handler::PetscLogHandler, flag::PetscBool )\n\n    @chk ccall(\n               (:PetscLogHandlerSetLogActions, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscBool),\n               handler, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerSetLogObjects(petsclib::PetscLibType,handler::PetscLogHandler, flag::PetscBool) \nDetermines whether objects are logged for a log handler.\n\nNot Collective\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `flag`    - `PETSC_TRUE` if objects are to be logged (ignored if `handler` does not log objects)\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogSetLogObjects()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerSetLogObjects\"))\n\"\"\"\nfunction PetscLogHandlerSetLogObjects(petsclib::PetscLibType, handler::PetscLogHandler, flag::PetscBool) end\n\n@for_petsc function PetscLogHandlerSetLogObjects(petsclib::$UnionPetscLib, handler::PetscLogHandler, flag::PetscBool )\n\n    @chk ccall(\n               (:PetscLogHandlerSetLogObjects, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscBool),\n               handler, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnum_objects::PetscInt = PetscLogHandlerGetNumObjects(petsclib::PetscLibType,handler::PetscLogHandler) \nGet the number of objects that were logged with a log handler\n\nNot Collective\n\nInput Parameter:\n- `handler` - a `PetscLogHandler`\n\nOutput Parameter:\n- `num_objects` - the number of objects whose creations and destructions were logged with `handler`\n(`PetscLogHandlerObjectCreate()` / `PetscLogHandlerObjectDestroy()`), or -1\nif the handler does not keep track of this number.\n\nLevel: developer\n\n-seealso: [](ch_profiling)\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerGetNumObjects\"))\n\"\"\"\nfunction PetscLogHandlerGetNumObjects(petsclib::PetscLibType, handler::PetscLogHandler) end\n\n@for_petsc function PetscLogHandlerGetNumObjects(petsclib::$UnionPetscLib, handler::PetscLogHandler )\n\tnum_objects_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLogHandlerGetNumObjects, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, Ptr{$PetscInt}),\n               handler, num_objects_,\n              )\n\n\tnum_objects = num_objects_[]\n\n\treturn num_objects\nend \n\n\"\"\"\n\tPetscLogHandlerEventDeactivatePush(petsclib::PetscLibType,handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent) \nTemporarily deactivate a logging event for a log handler\n\nNot collective\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `stage`   - a `PetscLogStage` (or `PETSC_DEFAULT` for the current stage)\n- `event`   - a `PetscLogEvent`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandlerEventDeactivatePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerEventDeactivatePush\"))\n\"\"\"\nfunction PetscLogHandlerEventDeactivatePush(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent) end\n\n@for_petsc function PetscLogHandlerEventDeactivatePush(petsclib::$UnionPetscLib, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogHandlerEventDeactivatePush, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage, PetscLogEvent),\n               handler, stage, event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerEventDeactivatePop(petsclib::PetscLibType,handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent) \nUndo temporary deactivation a logging event for a log handler\n\nNot collective\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `stage`   - a `PetscLogStage` (or `PETSC_DEFAULT` for the current stage)\n- `event`   - a `PetscLogEvent`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandlerEventDeactivatePush()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerEventDeactivatePop\"))\n\"\"\"\nfunction PetscLogHandlerEventDeactivatePop(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent) end\n\n@for_petsc function PetscLogHandlerEventDeactivatePop(petsclib::$UnionPetscLib, handler::PetscLogHandler, stage::PetscLogStage, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogHandlerEventDeactivatePop, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage, PetscLogEvent),\n               handler, stage, event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerEventsPause(petsclib::PetscLibType,handler::PetscLogHandler) \nPut event logging into \"paused\" mode (see `PetscLogEventsPause()` for details.) for a log handler\n\nNot collective\n\nInput Parameter:\n- `handler` - a `PetscLogHandler`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandlerEventsResume()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerEventsPause\"))\n\"\"\"\nfunction PetscLogHandlerEventsPause(petsclib::PetscLibType, handler::PetscLogHandler) end\n\n@for_petsc function PetscLogHandlerEventsPause(petsclib::$UnionPetscLib, handler::PetscLogHandler )\n\n    @chk ccall(\n               (:PetscLogHandlerEventsPause, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler,),\n               handler,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerEventsResume(petsclib::PetscLibType,handler::PetscLogHandler) \nResume event logging that had been put into \"paused\" mode (see `PetscLogEventsPause()` for details.) for a log handler\n\nNot collective\n\nInput Parameter:\n- `handler` - a `PetscLogHandler`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandlerEventsPause()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerEventsResume\"))\n\"\"\"\nfunction PetscLogHandlerEventsResume(petsclib::PetscLibType, handler::PetscLogHandler) end\n\n@for_petsc function PetscLogHandlerEventsResume(petsclib::$UnionPetscLib, handler::PetscLogHandler )\n\n    @chk ccall(\n               (:PetscLogHandlerEventsResume, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler,),\n               handler,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerDump(petsclib::PetscLibType,handler::PetscLogHandler, sname::String) \nDump the records of a log handler to file\n\nNot collective\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `sname`   - the name of the file to dump log data to\n\nLevel: developer\n\n-seealso: [](ch_profiling)\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerDump\"))\n\"\"\"\nfunction PetscLogHandlerDump(petsclib::PetscLibType, handler::PetscLogHandler, sname::String) end\n\n@for_petsc function PetscLogHandlerDump(petsclib::$UnionPetscLib, handler::PetscLogHandler, sname::String )\n\n    @chk ccall(\n               (:PetscLogHandlerDump, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, Ptr{Cchar}),\n               handler, sname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogHandlerStageSetVisible(petsclib::PetscLibType,handler::PetscLogHandler, stage::PetscLogStage, isVisible::PetscBool) \nSet the visibility of logging stage in `PetscLogHandlerView()` for a log handler\n\nNot collective\n\nInput Parameters:\n- `handler`   - a `PetscLogHandler`\n- `stage`     - a `PetscLogStage`\n- `isVisible` - the visibility flag, `PETSC_TRUE` to print, else `PETSC_FALSE` (defaults to `PETSC_TRUE`)\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandlerStageGetVisible()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerStageSetVisible\"))\n\"\"\"\nfunction PetscLogHandlerStageSetVisible(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage, isVisible::PetscBool) end\n\n@for_petsc function PetscLogHandlerStageSetVisible(petsclib::$UnionPetscLib, handler::PetscLogHandler, stage::PetscLogStage, isVisible::PetscBool )\n\n    @chk ccall(\n               (:PetscLogHandlerStageSetVisible, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage, PetscBool),\n               handler, stage, isVisible,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisVisible::PetscBool = PetscLogHandlerStageGetVisible(petsclib::PetscLibType,handler::PetscLogHandler, stage::PetscLogStage) \nGet the visibility of logging stage in `PetscLogHandlerView()` for a log handler\n\nNot collective\n\nInput Parameters:\n- `handler` - a `PetscLogHandler`\n- `stage`   - a `PetscLogStage`\n\nOutput Parameter:\n- `isVisible` - the visibility flag, `PETSC_TRUE` to print, else `PETSC_FALSE` (defaults to `PETSC_TRUE`)\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandlerStageSetVisible()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerStageGetVisible\"))\n\"\"\"\nfunction PetscLogHandlerStageGetVisible(petsclib::PetscLibType, handler::PetscLogHandler, stage::PetscLogStage) end\n\n@for_petsc function PetscLogHandlerStageGetVisible(petsclib::$UnionPetscLib, handler::PetscLogHandler, stage::PetscLogStage )\n\tisVisible_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLogHandlerStageGetVisible, $petsc_library),\n               PetscErrorCode,\n               (PetscLogHandler, PetscLogStage, Ptr{PetscBool}),\n               handler, stage, isVisible_,\n              )\n\n\tisVisible = isVisible_[]\n\n\treturn isVisible\nend \n\n\"\"\"\n\thandler::PetscLogHandler = PetscLogHandlerCreateTrace(petsclib::PetscLibType,comm::MPI_Comm, file::Libc.FILE) \nCreate a logger that traces events and stages to a given file descriptor\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm` - an MPI communicator\n- `file` - a file descriptor\n\nOutput Parameters:\n- `handler` - a `PetscLogHandler of type `PETSCLOGHANDLERTRACE`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerTraceBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerCreateTrace\"))\n\"\"\"\nfunction PetscLogHandlerCreateTrace(petsclib::PetscLibType, comm::MPI_Comm, file::Libc.FILE) end\n\n@for_petsc function PetscLogHandlerCreateTrace(petsclib::$UnionPetscLib, comm::MPI_Comm, file::Libc.FILE )\n\thandler_ = Ref{PetscLogHandler}()\n\n    @chk ccall(\n               (:PetscLogHandlerCreateTrace, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Libc.FILE}, Ptr{PetscLogHandler}),\n               comm, file, handler_,\n              )\n\n\thandler = handler_[]\n\n\treturn handler\nend \n\n\"\"\"\n\thandler::PetscLogHandler = PetscLogHandlerCreateLegacy(petsclib::PetscLibType,comm::MPI_Comm, PetscLogPLB::external, PetscLogPLE::external, PetscLogPHC::external, PetscLogPHD::external) \nCreate a `PetscLogHandler` from callbacks matching PETSc's legacy log handler callbacks\n\nCollective\n\nInput Parameters:\n- `comm`        - an MPI communicator\n- `PetscLogPLB` - a function to call during `PetscLogHandlerEventBegin()` (or `NULL`)\n- `PetscLogPLE` - a function to call during `PetscLogHandlerEventEnd()` (or `NULL`)\n- `PetscLogPHC` - a function to call during `PetscLogHandlerObjectCreate()` (or `NULL`)\n- `PetscLogPHD` - a function to call during `PetscLogHandlerObjectDestroy()` (or `NULL`)\n\nOutput Parameter:\n- `handler` - a `PetscLogHandler`\n\nCalling sequence of `PetscLogPLB`:\n- `e`  - a `PetscLogEvent` that is beginning\n- `_i` - deprecated, unused\n- `o1` - a `PetscObject` associated with `e` (or `NULL`)\n- `o2` - a `PetscObject` associated with `e` (or `NULL`)\n- `o3` - a `PetscObject` associated with `e` (or `NULL`)\n- `o4` - a `PetscObject` associated with `e` (or `NULL`)\n\nCalling sequence of `PetscLogPLE`:\n- `e`  - a `PetscLogEvent` that is beginning\n- `_i` - deprecated, unused\n- `o1` - a `PetscObject` associated with `e` (or `NULL`)\n- `o2` - a `PetscObject` associated with `e` (or `NULL`)\n- `o3` - a `PetscObject` associated with `e` (or `NULL`)\n- `o4` - a `PetscObject` associated with `e` (or `NULL`)\n\nCalling sequence of `PetscLogPHC`:\n- `o` - a `PetscObject` that has just been created\n\nCalling sequence of `PetscLogPHD`:\n- `o` - a `PetscObject` that is about to be destroyed\n\nLevel: developer\n\n-seealso: [](ch_profiling)\n\n# External Links\n$(_doc_external(\"Sys/PetscLogHandlerCreateLegacy\"))\n\"\"\"\nfunction PetscLogHandlerCreateLegacy(petsclib::PetscLibType, comm::MPI_Comm, PetscLogPLB::external, PetscLogPLE::external, PetscLogPHC::external, PetscLogPHD::external) end\n\n@for_petsc function PetscLogHandlerCreateLegacy(petsclib::$UnionPetscLib, comm::MPI_Comm, PetscLogPLB::external, PetscLogPLE::external, PetscLogPHC::external, PetscLogPHD::external )\n\thandler_ = Ref{PetscLogHandler}()\n\n    @chk ccall(\n               (:PetscLogHandlerCreateLegacy, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, external, external, external, external, Ptr{PetscLogHandler}),\n               comm, PetscLogPLB, PetscLogPLE, PetscLogPHC, PetscLogPHD, handler_,\n              )\n\n\thandler = handler_[]\n\n\treturn handler\nend \n\n\"\"\"\n\tstate::PetscLogState = PetscLogStateCreate(petsclib::PetscLibType) \nCreate a logging state.\n\nNot collective\n\nOutput Parameters:\n- `state` - a `PetscLogState`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateCreate\"))\n\"\"\"\nfunction PetscLogStateCreate(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogStateCreate(petsclib::$UnionPetscLib)\n\tstate_ = Ref{PetscLogState}()\n\n    @chk ccall(\n               (:PetscLogStateCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogState},),\n               state_,\n              )\n\n\tstate = state_[]\n\n\treturn state\nend \n\n\"\"\"\n\tPetscLogStateDestroy(petsclib::PetscLibType,state::PetscLogState) \nDestroy a logging state.\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateDestroy\"))\n\"\"\"\nfunction PetscLogStateDestroy(petsclib::PetscLibType, state::PetscLogState) end\n\n@for_petsc function PetscLogStateDestroy(petsclib::$UnionPetscLib, state::PetscLogState )\n\n    @chk ccall(\n               (:PetscLogStateDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogState},),\n               state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateStagePush(petsclib::PetscLibType,state::PetscLogState, stage::PetscLogStage) \nStart a new logging stage.\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `stage` - a registered `PetscLogStage`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateStageRegister()`, `PetscLogStateStagePop()`, `PetscLogStateGetCurrentStage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateStagePush\"))\n\"\"\"\nfunction PetscLogStateStagePush(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStateStagePush(petsclib::$UnionPetscLib, state::PetscLogState, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogStateStagePush, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogStage),\n               state, stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateStagePop(petsclib::PetscLibType,state::PetscLogState) \nEnd a running logging stage.\n\nNot collective\n\nInput Parameter:\n- `state` - a `PetscLogState`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateStageRegister()`, `PetscLogStateStagePush()`, `PetscLogStateGetCurrentStage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateStagePop\"))\n\"\"\"\nfunction PetscLogStateStagePop(petsclib::PetscLibType, state::PetscLogState) end\n\n@for_petsc function PetscLogStateStagePop(petsclib::$UnionPetscLib, state::PetscLogState )\n\n    @chk ccall(\n               (:PetscLogStateStagePop, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState,),\n               state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateGetCurrentStage(petsclib::PetscLibType,state::PetscLogState, current::PetscLogStage) \nGet the last stage that was started\n\nNot collective\n\nInput Parameter:\n- `state` - a `PetscLogState`\n\nOutput Parameter:\n- `current` - the last `PetscLogStage` started with `PetscLogStateStagePop()`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateStageRegister()`, `PetscLogStateStagePush()`, `PetscLogStateStagePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetCurrentStage\"))\n\"\"\"\nfunction PetscLogStateGetCurrentStage(petsclib::PetscLibType, state::PetscLogState, current::PetscLogStage) end\n\n@for_petsc function PetscLogStateGetCurrentStage(petsclib::$UnionPetscLib, state::PetscLogState, current::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogStateGetCurrentStage, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{PetscLogStage}),\n               state, current,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateStageRegister(petsclib::PetscLibType,state::PetscLogState, sname::String, stage::PetscLogStage) \nRegister a new stage with a logging state\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `sname` - a unique name\n\nOutput Parameter:\n- `stage` - the identifier for the registered stage\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateStagePush()`, `PetscLogStateStagePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateStageRegister\"))\n\"\"\"\nfunction PetscLogStateStageRegister(petsclib::PetscLibType, state::PetscLogState, sname::String, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStateStageRegister(petsclib::$UnionPetscLib, state::PetscLogState, sname::String, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogStateStageRegister, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{Cchar}, Ptr{PetscLogStage}),\n               state, sname, stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateEventRegister(petsclib::PetscLibType,state::PetscLogState, sname::String, id::PetscClassId, event::PetscLogEvent) \nRegister a new event with a logging state\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `sname` - a unique name\n- `id`    - the `PetscClassId` for the type of object most closely associated with this event\n\nOutput Parameter:\n- `event` - the identifier for the registered event\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStageRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateEventRegister\"))\n\"\"\"\nfunction PetscLogStateEventRegister(petsclib::PetscLibType, state::PetscLogState, sname::String, id::PetscClassId, event::PetscLogEvent) end\n\n@for_petsc function PetscLogStateEventRegister(petsclib::$UnionPetscLib, state::PetscLogState, sname::String, id::PetscClassId, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogStateEventRegister, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{Cchar}, PetscClassId, Ptr{PetscLogEvent}),\n               state, sname, id, event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateEventSetCollective(petsclib::PetscLibType,state::PetscLogState, event::PetscLogEvent, collective::PetscBool) \nSet the collective nature of a logging event\n\nLogically collective\n\nInput Parameters:\n- `state`      - a `PetscLogState`\n- `event`      - a registered `PetscLogEvent`\n- `collective` - if `PETSC_TRUE`, MPI processes synchronize during this event, and `PetscLogHandlerEventSync()` can be used to help measure the delays between when the processes begin the event\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogEventRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateEventSetCollective\"))\n\"\"\"\nfunction PetscLogStateEventSetCollective(petsclib::PetscLibType, state::PetscLogState, event::PetscLogEvent, collective::PetscBool) end\n\n@for_petsc function PetscLogStateEventSetCollective(petsclib::$UnionPetscLib, state::PetscLogState, event::PetscLogEvent, collective::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStateEventSetCollective, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogEvent, PetscBool),\n               state, event, collective,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateStageSetActive(petsclib::PetscLibType,state::PetscLogState, stage::PetscLogStage, isActive::PetscBool) \nMark a stage as active or inactive.\n\nNot collective\n\nInput Parameters:\n- `state`    - a `PetscLogState`\n- `stage`    - a registered `PetscLogStage`\n- `isActive` - if `PETSC_FALSE`, `PetscLogStateEventGetActive()` will return `PETSC_FALSE` for all events during this stage\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateEventSetActive()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateStageSetActive\"))\n\"\"\"\nfunction PetscLogStateStageSetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, isActive::PetscBool) end\n\n@for_petsc function PetscLogStateStageSetActive(petsclib::$UnionPetscLib, state::PetscLogState, stage::PetscLogStage, isActive::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStateStageSetActive, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogStage, PetscBool),\n               state, stage, isActive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisActive::PetscBool = PetscLogStateStageGetActive(petsclib::PetscLibType,state::PetscLogState, stage::PetscLogStage) \nCheck if a logging stage is active or inactive.\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `stage` - a registered `PetscLogStage`\n\nOutput Parameter:\n- `isActive` - if `PETSC_FALSE`, the state should not send logging events to log handlers during this stage.\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStageSetActive()`, `PetscLogHandler`, `PetscLogHandlerStart()`, `PetscLogHandlerEventBegin()`, `PetscLogHandlerEventEnd()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateStageGetActive\"))\n\"\"\"\nfunction PetscLogStateStageGetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStateStageGetActive(petsclib::$UnionPetscLib, state::PetscLogState, stage::PetscLogStage )\n\tisActive_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLogStateStageGetActive, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogStage, Ptr{PetscBool}),\n               state, stage, isActive_,\n              )\n\n\tisActive = isActive_[]\n\n\treturn isActive\nend \n\n\"\"\"\n\tPetscLogStateEventSetActive(petsclib::PetscLibType,state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent, isActive::PetscBool) \nSet a logging event as active or inactive during a logging stage.\n\nNot collective\n\nInput Parameters:\n- `state`    - a `PetscLogState`\n- `stage`    - a registered `PetscLogStage`, or `PETSC_DEFAULT` for the current stage\n- `event`    - a registered `PetscLogEvent`\n- `isActive` - if `PETSC_FALSE`, `PetscLogStateEventGetActive()` will return `PETSC_FALSE` for this stage and this event\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogEventGetActive()`, `PetscLogStateGetCurrentStage()`, `PetscLogEventSetActiveAll()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateEventSetActive\"))\n\"\"\"\nfunction PetscLogStateEventSetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent, isActive::PetscBool) end\n\n@for_petsc function PetscLogStateEventSetActive(petsclib::$UnionPetscLib, state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent, isActive::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStateEventSetActive, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogStage, PetscLogEvent, PetscBool),\n               state, stage, event, isActive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateEventSetActiveAll(petsclib::PetscLibType,state::PetscLogState, event::PetscLogEvent, isActive::PetscBool) \nSet logging event as active or inactive for all logging stages\n\nNot collective\n\nInput Parameters:\n- `state`    - a `PetscLogState`\n- `event`    - a registered `PetscLogEvent`\n- `isActive` - if `PETSC_FALSE`, `PetscLogStateEventGetActive()` will return `PETSC_FALSE` for all stages and all events\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogEventGetActive()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateEventSetActiveAll\"))\n\"\"\"\nfunction PetscLogStateEventSetActiveAll(petsclib::PetscLibType, state::PetscLogState, event::PetscLogEvent, isActive::PetscBool) end\n\n@for_petsc function PetscLogStateEventSetActiveAll(petsclib::$UnionPetscLib, state::PetscLogState, event::PetscLogEvent, isActive::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStateEventSetActiveAll, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogEvent, PetscBool),\n               state, event, isActive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateClassSetActive(petsclib::PetscLibType,state::PetscLogState, stage::PetscLogStage, classid::PetscClassId, isActive::PetscBool) \nSet logging events associated with an event as active or inactive during a logging stage.\n\nNot collective\n\nInput Parameters:\n- `state`    - a `PetscLogState`\n- `stage`    - a registered `PetscLogStage`, or `PETSC_DEFAULT` for the current stage\n- `classid`  - a `PetscClassId`\n- `isActive` - if `PETSC_FALSE`, `PetscLogStateEventGetActive()` will return\n`PETSC_FALSE` for this stage and all events that were associated\nwith this class when they were registered (see\n`PetscLogStateEventRegister()`).\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogEventGetActive()`, `PetscLogStateEventSetActive()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateClassSetActive\"))\n\"\"\"\nfunction PetscLogStateClassSetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, classid::PetscClassId, isActive::PetscBool) end\n\n@for_petsc function PetscLogStateClassSetActive(petsclib::$UnionPetscLib, state::PetscLogState, stage::PetscLogStage, classid::PetscClassId, isActive::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStateClassSetActive, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogStage, PetscClassId, PetscBool),\n               state, stage, classid, isActive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateClassSetActiveAll(petsclib::PetscLibType,state::PetscLogState, classid::PetscClassId, isActive::PetscBool) \nSet logging events associated with an event as active or inactive for all logging stages\n\nNot collective\n\nInput Parameters:\n- `state`    - a `PetscLogState`\n- `classid`  - a `PetscClassId`\n- `isActive` - if `PETSC_FALSE`, `PetscLogStateEventGetActive()` will return\n`PETSC_FALSE` for all events that were associated with this class when they\nwere registered (see `PetscLogStateEventRegister()`).\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogEventGetActive()`, `PetscLogStateClassSetActive()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateClassSetActiveAll\"))\n\"\"\"\nfunction PetscLogStateClassSetActiveAll(petsclib::PetscLibType, state::PetscLogState, classid::PetscClassId, isActive::PetscBool) end\n\n@for_petsc function PetscLogStateClassSetActiveAll(petsclib::$UnionPetscLib, state::PetscLogState, classid::PetscClassId, isActive::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStateClassSetActiveAll, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscClassId, PetscBool),\n               state, classid, isActive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisActive::PetscBool = PetscLogStateEventGetActive(petsclib::PetscLibType,state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent) \nCheck if a logging event is active or inactive during a logging stage.\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `stage` - a registered `PetscLogStage`, or `PETSC_DEFAULT` for the current stage\n- `event` - a registered `PetscLogEvent`\n\nOutput Parameter:\n- `isActive` - If `PETSC_FALSE`, log handlers should not be notified of the event's beginning or end.\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogEventGetActive()`, `PetscLogStateGetCurrentStage()`, `PetscLogHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateEventGetActive\"))\n\"\"\"\nfunction PetscLogStateEventGetActive(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent) end\n\n@for_petsc function PetscLogStateEventGetActive(petsclib::$UnionPetscLib, state::PetscLogState, stage::PetscLogStage, event::PetscLogEvent )\n\tisActive_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLogStateEventGetActive, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogStage, PetscLogEvent, Ptr{PetscBool}),\n               state, stage, event, isActive_,\n              )\n\n\tisActive = isActive_[]\n\n\treturn isActive\nend \n\n\"\"\"\n\tPetscLogStateGetEventFromName(petsclib::PetscLibType,state::PetscLogState, name::String, event::PetscLogEvent) \nGet a `PetscLogEvent` from the name it was registered with.\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `name`  - an event's name\n\nOutput Parameter:\n- `event` - the event's id\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateEventRegister()`, `PetscLogStateEventGetInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetEventFromName\"))\n\"\"\"\nfunction PetscLogStateGetEventFromName(petsclib::PetscLibType, state::PetscLogState, name::String, event::PetscLogEvent) end\n\n@for_petsc function PetscLogStateGetEventFromName(petsclib::$UnionPetscLib, state::PetscLogState, name::String, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogStateGetEventFromName, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{Cchar}, Ptr{PetscLogEvent}),\n               state, name, event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateGetStageFromName(petsclib::PetscLibType,state::PetscLogState, name::String, stage::PetscLogStage) \nGet a `PetscLogStage` from the name it was registered with.\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `name`  - a stage's name\n\nOutput Parameter:\n- `stage` - the stage's id\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateStageRegister()`, `PetscLogStateStageGetInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetStageFromName\"))\n\"\"\"\nfunction PetscLogStateGetStageFromName(petsclib::PetscLibType, state::PetscLogState, name::String, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStateGetStageFromName(petsclib::$UnionPetscLib, state::PetscLogState, name::String, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogStateGetStageFromName, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{Cchar}, Ptr{PetscLogStage}),\n               state, name, stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateGetClassFromName(petsclib::PetscLibType,state::PetscLogState, name::String, clss::PetscLogClass) \nGet a `PetscLogClass` from the name of the class it was registered with.\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `name`  - the name string of the class\n\nOutput Parameter:\n- `clss` - the classes's logging id\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateClassRegister()`, `PetscLogStateClassGetInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetClassFromName\"))\n\"\"\"\nfunction PetscLogStateGetClassFromName(petsclib::PetscLibType, state::PetscLogState, name::String, clss::PetscLogClass) end\n\n@for_petsc function PetscLogStateGetClassFromName(petsclib::$UnionPetscLib, state::PetscLogState, name::String, clss::PetscLogClass )\n\n    @chk ccall(\n               (:PetscLogStateGetClassFromName, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{Cchar}, Ptr{PetscLogClass}),\n               state, name, clss,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateGetClassFromClassId(petsclib::PetscLibType,state::PetscLogState, classid::PetscClassId, clss::PetscLogClass) \nGet a `PetscLogClass` from the `PetscClassId` it was registered with.\n\nNot collective\n\nInput Parameters:\n- `state`   - a `PetscLogState`\n- `classid` - a `PetscClassId`\n\nOutput Parameter:\n- `clss` - the classes's logging id\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateClassRegister()`, `PetscLogStateClassGetInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetClassFromClassId\"))\n\"\"\"\nfunction PetscLogStateGetClassFromClassId(petsclib::PetscLibType, state::PetscLogState, classid::PetscClassId, clss::PetscLogClass) end\n\n@for_petsc function PetscLogStateGetClassFromClassId(petsclib::$UnionPetscLib, state::PetscLogState, classid::PetscClassId, clss::PetscLogClass )\n\n    @chk ccall(\n               (:PetscLogStateGetClassFromClassId, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscClassId, Ptr{PetscLogClass}),\n               state, classid, clss,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumEvents::PetscInt = PetscLogStateGetNumEvents(petsclib::PetscLibType,state::PetscLogState) \nGet the number of registered events in a logging state.\n\nNot collective\n\nInput Parameter:\n- `state` - a `PetscLogState`\n\nOutput Parameter:\n- `numEvents` - the number of registered `PetscLogEvent`s\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateEventRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetNumEvents\"))\n\"\"\"\nfunction PetscLogStateGetNumEvents(petsclib::PetscLibType, state::PetscLogState) end\n\n@for_petsc function PetscLogStateGetNumEvents(petsclib::$UnionPetscLib, state::PetscLogState )\n\tnumEvents_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLogStateGetNumEvents, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{$PetscInt}),\n               state, numEvents_,\n              )\n\n\tnumEvents = numEvents_[]\n\n\treturn numEvents\nend \n\n\"\"\"\n\tnumStages::PetscInt = PetscLogStateGetNumStages(petsclib::PetscLibType,state::PetscLogState) \nGet the number of registered stages in a logging state.\n\nNot collective\n\nInput Parameter:\n- `state` - a `PetscLogState`\n\nOutput Parameter:\n- `numStages` - the number of registered `PetscLogStage`s\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateStageRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetNumStages\"))\n\"\"\"\nfunction PetscLogStateGetNumStages(petsclib::PetscLibType, state::PetscLogState) end\n\n@for_petsc function PetscLogStateGetNumStages(petsclib::$UnionPetscLib, state::PetscLogState )\n\tnumStages_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLogStateGetNumStages, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{$PetscInt}),\n               state, numStages_,\n              )\n\n\tnumStages = numStages_[]\n\n\treturn numStages\nend \n\n\"\"\"\n\tnumClasses::PetscInt = PetscLogStateGetNumClasses(petsclib::PetscLibType,state::PetscLogState) \nGet the number of registered classes in a logging state.\n\nNot collective\n\nInput Parameter:\n- `state` - a `PetscLogState`\n\nOutput Parameter:\n- `numClasses` - the number of registered `PetscLogClass`s\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateClassRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateGetNumClasses\"))\n\"\"\"\nfunction PetscLogStateGetNumClasses(petsclib::PetscLibType, state::PetscLogState) end\n\n@for_petsc function PetscLogStateGetNumClasses(petsclib::$UnionPetscLib, state::PetscLogState )\n\tnumClasses_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscLogStateGetNumClasses, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{$PetscInt}),\n               state, numClasses_,\n              )\n\n\tnumClasses = numClasses_[]\n\n\treturn numClasses\nend \n\n\"\"\"\n\tPetscLogStateEventGetInfo(petsclib::PetscLibType,state::PetscLogState, event::PetscLogEvent, info::PetscLogEventInfo) \nGet the registration information of an event\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `event` - a registered `PetscLogEvent`\n\nOutput Parameter:\n- `info` - the `PetscLogEventInfo` of the event will be copied into info\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateEventRegister()`, `PetscLogStateGetEventFromName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateEventGetInfo\"))\n\"\"\"\nfunction PetscLogStateEventGetInfo(petsclib::PetscLibType, state::PetscLogState, event::PetscLogEvent, info::PetscLogEventInfo) end\n\n@for_petsc function PetscLogStateEventGetInfo(petsclib::$UnionPetscLib, state::PetscLogState, event::PetscLogEvent, info::PetscLogEventInfo )\n\n    @chk ccall(\n               (:PetscLogStateEventGetInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogEvent, Ptr{PetscLogEventInfo}),\n               state, event, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateStageGetInfo(petsclib::PetscLibType,state::PetscLogState, stage::PetscLogStage, info::PetscLogStageInfo) \nGet the registration information of an stage\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `stage` - a registered `PetscLogStage`\n\nOutput Parameter:\n- `info` - the `PetscLogStageInfo` of the stage will be copied into info\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateStageRegister()`, `PetscLogStateGetStageFromName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateStageGetInfo\"))\n\"\"\"\nfunction PetscLogStateStageGetInfo(petsclib::PetscLibType, state::PetscLogState, stage::PetscLogStage, info::PetscLogStageInfo) end\n\n@for_petsc function PetscLogStateStageGetInfo(petsclib::$UnionPetscLib, state::PetscLogState, stage::PetscLogStage, info::PetscLogStageInfo )\n\n    @chk ccall(\n               (:PetscLogStateStageGetInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogStage, Ptr{PetscLogStageInfo}),\n               state, stage, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateClassRegister(petsclib::PetscLibType,state::PetscLogState, name::String, id::PetscClassId, logclass::PetscLogClass) \nRegister a class to with a `PetscLogState` used by `PetscLogHandler`s.\n\nLogically collective on `PETSC_COMM_WORLD`\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `name`  - the name of a class registered with `PetscClassIdRegister()`\n- `id`    - the `PetscClassId` obtained from `PetscClassIdRegister()`\n\nOutput Parameter:\n- `logclass` - a `PetscLogClass` for this class with this state\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogStateClassGetInfo()` `PetscLogStateGetClassFromName()`, `PetscLogStateGetClassFromClassId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateClassRegister\"))\n\"\"\"\nfunction PetscLogStateClassRegister(petsclib::PetscLibType, state::PetscLogState, name::String, id::PetscClassId, logclass::PetscLogClass) end\n\n@for_petsc function PetscLogStateClassRegister(petsclib::$UnionPetscLib, state::PetscLogState, name::String, id::PetscClassId, logclass::PetscLogClass )\n\n    @chk ccall(\n               (:PetscLogStateClassRegister, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, Ptr{Cchar}, PetscClassId, Ptr{PetscLogClass}),\n               state, name, id, logclass,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStateClassGetInfo(petsclib::PetscLibType,state::PetscLogState, clss::PetscLogClass, info::PetscLogClassInfo) \nGet the registration information of an class\n\nNot collective\n\nInput Parameters:\n- `state` - a `PetscLogState`\n- `clss`  - a registered `PetscLogClass`\n\nOutput Parameter:\n- `info` - the `PetscLogClassInfo` of the class will be copied into info\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`, `PetscLogStateClassRegister()`, `PetscLogStateGetClassFromName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStateClassGetInfo\"))\n\"\"\"\nfunction PetscLogStateClassGetInfo(petsclib::PetscLibType, state::PetscLogState, clss::PetscLogClass, info::PetscLogClassInfo) end\n\n@for_petsc function PetscLogStateClassGetInfo(petsclib::$UnionPetscLib, state::PetscLogState, clss::PetscLogClass, info::PetscLogClassInfo )\n\n    @chk ccall(\n               (:PetscLogStateClassGetInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscLogState, PetscLogClass, Ptr{PetscLogClassInfo}),\n               state, clss, info,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscMatlabEngine_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscMatlabEngine end\nconst PetscMatlabEngine = Ptr{_n_PetscMatlabEngine}\n# -------------------------------------------------------\n\n\"\"\"\n\tmengine::PetscMatlabEngine = PetscMatlabEngineCreate(petsclib::PetscLibType,comm::MPI_Comm, host::String) \nCreates a MATLAB engine object\n\nNot Collective\n\nInput Parameters:\n- `comm` - a separate MATLAB engine is started for each process in the communicator\n- `host` - name of machine where MATLAB engine is to be run (usually NULL)\n\nOutput Parameter:\n- `mengine` - the resulting object\n\nOptions Database Keys:\n- `-matlab_engine_graphics` - allow the MATLAB engine to display graphics\n- `-matlab_engine_host`     - hostname, machine to run the MATLAB engine on\n- `-info`                   - print out all requests to MATLAB and all if its responses (for debugging)\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineDestroy()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineGet()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEngineCreate\"))\n\"\"\"\nfunction PetscMatlabEngineCreate(petsclib::PetscLibType, comm::MPI_Comm, host::String) end\n\n@for_petsc function PetscMatlabEngineCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, host::String )\n\tmengine_ = Ref{PetscMatlabEngine}()\n\n    @chk ccall(\n               (:PetscMatlabEngineCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{PetscMatlabEngine}),\n               comm, host, mengine_,\n              )\n\n\tmengine = mengine_[]\n\n\treturn mengine\nend \n\n\"\"\"\n\tPetscMatlabEngineDestroy(petsclib::PetscLibType,v::PetscMatlabEngine) \nShuts down a MATLAB engine.\n\nCollective\n\nInput Parameter:\n- `v` - the engine\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineCreate()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineGet()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEngineDestroy\"))\n\"\"\"\nfunction PetscMatlabEngineDestroy(petsclib::PetscLibType, v::PetscMatlabEngine) end\n\n@for_petsc function PetscMatlabEngineDestroy(petsclib::$UnionPetscLib, v::PetscMatlabEngine )\n\n    @chk ccall(\n               (:PetscMatlabEngineDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscMatlabEngine},),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMatlabEngineGetOutput(petsclib::PetscLibType,mengine::PetscMatlabEngine, string::String) \nGets a string buffer where the MATLAB output is\nprinted\n\nNot Collective\n\nInput Parameter:\n- `mengine` - the MATLAB engine\n\nOutput Parameter:\n- `string` - buffer where MATLAB output is printed\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineDestroy()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineGet()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineCreate()`, `PetscMatlabEnginePrintOutput()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEngineGetOutput\"))\n\"\"\"\nfunction PetscMatlabEngineGetOutput(petsclib::PetscLibType, mengine::PetscMatlabEngine, string::String) end\n\n@for_petsc function PetscMatlabEngineGetOutput(petsclib::$UnionPetscLib, mengine::PetscMatlabEngine, string::String )\n\tstring_ = Ref(pointer(string))\n\n    @chk ccall(\n               (:PetscMatlabEngineGetOutput, $petsc_library),\n               PetscErrorCode,\n               (PetscMatlabEngine, Ptr{Ptr{Cchar}}),\n               mengine, string_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMatlabEnginePrintOutput(petsclib::PetscLibType,mengine::PetscMatlabEngine, fd::Libc.FILE) \nprints the output from MATLAB to an ASCII file\n\nCollective\n\nInput Parameters:\n- `mengine` - the MATLAB engine\n- `fd`      - the file\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineDestroy()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineGet()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEngineCreate()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEnginePrintOutput\"))\n\"\"\"\nfunction PetscMatlabEnginePrintOutput(petsclib::PetscLibType, mengine::PetscMatlabEngine, fd::Libc.FILE) end\n\n@for_petsc function PetscMatlabEnginePrintOutput(petsclib::$UnionPetscLib, mengine::PetscMatlabEngine, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscMatlabEnginePrintOutput, $petsc_library),\n               PetscErrorCode,\n               (PetscMatlabEngine, Ptr{Libc.FILE}),\n               mengine, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMatlabEnginePut(petsclib::PetscLibType,mengine::PetscMatlabEngine, obj::PetscObject) \nPuts a PETSc object, such as a `Mat` or `Vec` into the MATLAB space. For parallel objects,\neach processor's part is put in a separate  MATLAB process.\n\nCollective\n\nInput Parameters:\n- `mengine` - the MATLAB engine\n- `obj`     - the PETSc object, for example Vec\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineDestroy()`, `PetscMatlabEngineCreate()`, `PetscMatlabEngineGet()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEnginePut\"))\n\"\"\"\nfunction PetscMatlabEnginePut(petsclib::PetscLibType, mengine::PetscMatlabEngine, obj::PetscObject) end\n\n@for_petsc function PetscMatlabEnginePut(petsclib::$UnionPetscLib, mengine::PetscMatlabEngine, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscMatlabEnginePut, $petsc_library),\n               PetscErrorCode,\n               (PetscMatlabEngine, PetscObject),\n               mengine, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMatlabEngineGet(petsclib::PetscLibType,mengine::PetscMatlabEngine, obj::PetscObject) \nGets a variable from MATLAB into a PETSc object.\n\nCollective\n\nInput Parameters:\n- `mengine` - the MATLAB engine\n- `obj`     - the PETSc object, for example a `Vec`\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineDestroy()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineCreate()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEngineGet\"))\n\"\"\"\nfunction PetscMatlabEngineGet(petsclib::PetscLibType, mengine::PetscMatlabEngine, obj::PetscObject) end\n\n@for_petsc function PetscMatlabEngineGet(petsclib::$UnionPetscLib, mengine::PetscMatlabEngine, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscMatlabEngineGet, $petsc_library),\n               PetscErrorCode,\n               (PetscMatlabEngine, PetscObject),\n               mengine, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMatlabEnginePutArray(petsclib::PetscLibType,mengine::PetscMatlabEngine, m::Cint, n::Cint, array::Vector{PetscScalar}, name::String) \nPuts an array into the MATLAB space, treating it as a Fortran style (column major ordering) array. For parallel objects,\neach processors part is put in a separate  MATLAB process.\n\nCollective\n\nInput Parameters:\n- `mengine` - the MATLAB engine\n- `m`       - the x dimension of the array\n- `n`       - the y dimension of the array\n- `array`   - the array (represented in one dimension)\n- `name`    - the name of the array\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineDestroy()`, `PetscMatlabEngineCreate()`, `PetscMatlabEngineGet()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEnginePutArray\"))\n\"\"\"\nfunction PetscMatlabEnginePutArray(petsclib::PetscLibType, mengine::PetscMatlabEngine, m::Cint, n::Cint, array::Vector{PetscScalar}, name::String) end\n\n@for_petsc function PetscMatlabEnginePutArray(petsclib::$UnionPetscLib, mengine::PetscMatlabEngine, m::Cint, n::Cint, array::Vector{$PetscScalar}, name::String )\n\n    @chk ccall(\n               (:PetscMatlabEnginePutArray, $petsc_library),\n               PetscErrorCode,\n               (PetscMatlabEngine, Cint, Cint, Ptr{$PetscScalar}, Ptr{Cchar}),\n               mengine, m, n, array, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMatlabEngineGetArray(petsclib::PetscLibType,mengine::PetscMatlabEngine, m::Cint, n::Cint, array::Vector{PetscScalar}, name::String) \nGets a variable from MATLAB into an array\n\nNot Collective\n\nInput Parameters:\n- `mengine` - the MATLAB engine\n- `m`       - the x dimension of the array\n- `n`       - the y dimension of the array\n- `array`   - the array (represented in one dimension), much be large enough to hold all the data\n- `name`    - the name of the array\n\nLevel: advanced\n\n-seealso: `PetscMatlabEngineDestroy()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineCreate()`,\n`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,\n`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGet()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscMatlabEngineGetArray\"))\n\"\"\"\nfunction PetscMatlabEngineGetArray(petsclib::PetscLibType, mengine::PetscMatlabEngine, m::Cint, n::Cint, array::Vector{PetscScalar}, name::String) end\n\n@for_petsc function PetscMatlabEngineGetArray(petsclib::$UnionPetscLib, mengine::PetscMatlabEngine, m::Cint, n::Cint, array::Vector{$PetscScalar}, name::String )\n\n    @chk ccall(\n               (:PetscMatlabEngineGetArray, $petsc_library),\n               PetscErrorCode,\n               (PetscMatlabEngine, Cint, Cint, Ptr{$PetscScalar}, Ptr{Cchar}),\n               mengine, m, n, array, name,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscObject_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscOptionItems end\nconst PetscOptionItems = Ptr{_n_PetscOptionItems}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscObjectSAWsTakeAccess(petsclib::PetscLibType,obj::PetscObject) \nTake access of the data fields that have been published to SAWs\nby a `PetscObject` so their values may  be changed in the computation\n\nCollective\n\nInput Parameter:\n- `obj` - the `PetscObject` variable. This must be cast with a (`PetscObject`), for example, `PetscObjectSAWSTakeAccess`((`PetscObject`)mat);\n\nLevel: advanced\n\n-seealso: `PetscObjectSetName()`, `PetscObjectSAWsViewOff()`, `PetscObjectSAWsGrantAccess()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSAWsTakeAccess\"))\n\"\"\"\nfunction PetscObjectSAWsTakeAccess(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectSAWsTakeAccess(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectSAWsTakeAccess, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSAWsGrantAccess(petsclib::PetscLibType,obj::PetscObject) \nGrants access of the data fields that have been published to\nSAWs called when the changes made during `PetscObjectSAWsTakeAccess()` are complete.\n\nCollective\n\nInput Parameter:\n- `obj` - the `PetscObject` variable. This must be cast with a (`PetscObject`), for example, `PetscObjectSAWSRestoreAccess`((`PetscObject`)mat);\n\nLevel: advanced\n\n-seealso: `PetscObjectSetName()`, `PetscObjectSAWsViewOff()`, `PetscObjectSAWsTakeAccess()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSAWsGrantAccess\"))\n\"\"\"\nfunction PetscObjectSAWsGrantAccess(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectSAWsGrantAccess(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectSAWsGrantAccess, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSAWsBlock(petsclib::PetscLibType,obj::PetscObject) \nBlocks the object if `PetscObjectSAWsSetBlock()` has been called\n\nCollective\n\nInput Parameter:\n- `obj` - the PETSc variable\n\nLevel: advanced\n\n-seealso: `PetscObjectSetName()`, `PetscObjectSAWsViewOff()`, `PetscObjectSAWsSetBlock()`, `PetscSAWsBlock()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSAWsBlock\"))\n\"\"\"\nfunction PetscObjectSAWsBlock(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectSAWsBlock(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectSAWsBlock, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSAWsSetBlock(petsclib::PetscLibType,obj::PetscObject, flg::PetscBool) \nSets whether an object will block at `PetscObjectSAWsBlock()`\n\nCollective\n\nInput Parameters:\n- `obj` - the PETSc variable\n- `flg` - whether it should block\n\nLevel: advanced\n\n-seealso: `PetscObjectSetName()`, `PetscObjectSAWsViewOff()`, `PetscObjectSAWsBlock()`, `PetscSAWsBlock()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSAWsSetBlock\"))\n\"\"\"\nfunction PetscObjectSAWsSetBlock(petsclib::PetscLibType, obj::PetscObject, flg::PetscBool) end\n\n@for_petsc function PetscObjectSAWsSetBlock(petsclib::$UnionPetscLib, obj::PetscObject, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscObjectSAWsSetBlock, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscBool),\n               obj, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSAWsViewOff(petsclib::PetscLibType,obj::PetscObject) \n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSAWsViewOff\"))\n\"\"\"\nfunction PetscObjectSAWsViewOff(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectSAWsViewOff(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectSAWsViewOff, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectViewSAWs(petsclib::PetscLibType,obj::PetscObject, viewer::PetscViewer) \nView the base portion of any object with an SAWs viewer\n\nCollective\n\nInput Parameters:\n- `obj`    - the `PetscObject` variable. It must be cast with a (`PetscObject`), for example, `PetscObjectSetName`((`PetscObject`)mat,name);\n- `viewer` - the SAWs viewer\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscObject`, `PetscObjectSetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectViewSAWs\"))\n\"\"\"\nfunction PetscObjectViewSAWs(petsclib::PetscLibType, obj::PetscObject, viewer::PetscViewer) end\n\n@for_petsc function PetscObjectViewSAWs(petsclib::$UnionPetscLib, obj::PetscObject, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscObjectViewSAWs, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscViewer),\n               obj, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::String = PetscObjectGetType(petsclib::PetscLibType,obj::PetscObject) \nGets the object type of any `PetscObject`.\n\nNot Collective\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectGetType`((`PetscObject`)mat,&type);\n\nOutput Parameter:\n- `type` - the object type, for example, `MATSEQAIJ`\n\nLevel: advanced\n\n-seealso: `PetscObject`, `PetscClassId`, `PetscObjectGetClassName()`, `PetscObjectGetClassId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetType\"))\n\"\"\"\nfunction PetscObjectGetType(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectGetType(petsclib::$UnionPetscLib, obj::PetscObject )\n\ttype_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:PetscObjectGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Ptr{Cchar}}),\n               obj, type_,\n              )\n\n\ttype = unsafe_wrap(Array, type_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn type\nend \n\n\"\"\"\n\tPetscObjectsDump(petsclib::PetscLibType,fd::Libc.FILE, all::PetscBool) \nPrints all the currently existing objects.\n\nInput Parameters:\n- `fd`  - file pointer\n- `all` - by default only tries to display objects created explicitly by the user, if all is `PETSC_TRUE` then lists all outstanding objects\n\nOptions Database Key:\n- `-objects_dump <all>` - print information about all the objects that exist at the end of the programs run\n\nLevel: advanced\n\n-seealso: `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectsDump\"))\n\"\"\"\nfunction PetscObjectsDump(petsclib::PetscLibType, fd::Libc.FILE, all::PetscBool) end\n\n@for_petsc function PetscObjectsDump(petsclib::$UnionPetscLib, fd::Libc.FILE, all::PetscBool )\n\n    @chk ccall(\n               (:PetscObjectsDump, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Libc.FILE}, PetscBool),\n               fd, all,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectsView(petsclib::PetscLibType,viewer::PetscViewer) \nPrints the currently existing objects.\n\nLogically Collective\n\nInput Parameter:\n- `viewer` - must be an `PETSCVIEWERASCII` viewer\n\nLevel: advanced\n\n-seealso: `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectsView\"))\n\"\"\"\nfunction PetscObjectsView(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscObjectsView(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscObjectsView, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectsGetObject(petsclib::PetscLibType,name::String, obj::PetscObject, classname::String) \nGet a pointer to a named object\n\nNot Collective\n\nInput Parameter:\n- `name` - the name of an object\n\nOutput Parameters:\n- `obj`       - the object or `NULL` if there is no object, optional, pass in `NULL` if not needed\n- `classname` - the name of the class of the object, optional, pass in `NULL` if not needed\n\nLevel: advanced\n\n-seealso: `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectsGetObject\"))\n\"\"\"\nfunction PetscObjectsGetObject(petsclib::PetscLibType, name::String, obj::PetscObject, classname::String) end\n\n@for_petsc function PetscObjectsGetObject(petsclib::$UnionPetscLib, name::String, obj::PetscObject, classname::String )\n\tclassname_ = Ref(pointer(classname))\n\n    @chk ccall(\n               (:PetscObjectsGetObject, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscObject}, Ptr{Ptr{Cchar}}),\n               name, obj, classname_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSetPrintedOptions(petsclib::PetscLibType,obj::PetscObject) \nindicate 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\n\nInput Parameter:\n- `obj` - the `PetscObject`\n\nLevel: developer\n\n-seealso: `PetscOptionsInsert()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSetPrintedOptions\"))\n\"\"\"\nfunction PetscObjectSetPrintedOptions(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectSetPrintedOptions(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectSetPrintedOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectInheritPrintedOptions(petsclib::PetscLibType,pobj::PetscObject, obj::PetscObject) \nIf 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.\n\nInput Parameters:\n- `pobj` - the parent object\n- `obj`  - the `PetscObject`\n\nLevel: developer\n\n-seealso: `PetscOptionsInsert()`, `PetscObjectSetPrintedOptions()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectInheritPrintedOptions\"))\n\"\"\"\nfunction PetscObjectInheritPrintedOptions(petsclib::PetscLibType, pobj::PetscObject, obj::PetscObject) end\n\n@for_petsc function PetscObjectInheritPrintedOptions(petsclib::$UnionPetscLib, pobj::PetscObject, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectInheritPrintedOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscObject),\n               pobj, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectAddOptionsHandler(petsclib::PetscLibType,obj::PetscObject, handle::external, destroy::external, ctx::Cvoid) \nAdds an additional function to check for options when `XXXSetFromOptions()` is called.\n\nNot Collective\n\nInput Parameters:\n- `obj`     - the PETSc object\n- `handle`  - function that checks for options\n- `destroy` - function to destroy `ctx` if provided\n- `ctx`     - optional context for check function\n\nCalling sequence of `handle`:\n- `obj`                - the PETSc object\n- `PetscOptionsObject` - the `PetscOptionItems` object\n- `ctx`                - optional context for `handle`\n\nCalling sequence of `destroy`:\n- `obj` - the PETSc object\n- `ctx` - optional context for `handle`\n\nLevel: developer\n\n-seealso: `KSPSetFromOptions()`, `PCSetFromOptions()`, `SNESSetFromOptions()`, `PetscObjectProcessOptionsHandlers()`, `PetscObjectDestroyOptionsHandlers()`,\n`PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectAddOptionsHandler\"))\n\"\"\"\nfunction PetscObjectAddOptionsHandler(petsclib::PetscLibType, obj::PetscObject, handle::external, destroy::external, ctx::Cvoid) end\n\n@for_petsc function PetscObjectAddOptionsHandler(petsclib::$UnionPetscLib, obj::PetscObject, handle::external, destroy::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscObjectAddOptionsHandler, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, external, external, Ptr{Cvoid}),\n               obj, handle, destroy, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectProcessOptionsHandlers(petsclib::PetscLibType,obj::PetscObject, PetscOptionsObject::PetscOptionItems) \nCalls all the options handlers attached to an object\n\nNot Collective\n\nInput Parameters:\n- `obj`                - the PETSc object\n- `PetscOptionsObject` - the options context\n\nLevel: developer\n\n-seealso: `KSPSetFromOptions()`, `PCSetFromOptions()`, `SNESSetFromOptions()`, `PetscObjectAddOptionsHandler()`, `PetscObjectDestroyOptionsHandlers()`,\n`PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectProcessOptionsHandlers\"))\n\"\"\"\nfunction PetscObjectProcessOptionsHandlers(petsclib::PetscLibType, obj::PetscObject, PetscOptionsObject::PetscOptionItems) end\n\n@for_petsc function PetscObjectProcessOptionsHandlers(petsclib::$UnionPetscLib, obj::PetscObject, PetscOptionsObject::PetscOptionItems )\n\n    @chk ccall(\n               (:PetscObjectProcessOptionsHandlers, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscOptionItems),\n               obj, PetscOptionsObject,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectDestroyOptionsHandlers(petsclib::PetscLibType,obj::PetscObject) \nDestroys all the option handlers attached to an object\n\nNot Collective\n\nInput Parameter:\n- `obj` - the PETSc object\n\nLevel: developer\n\n-seealso: `KSPSetFromOptions()`, `PCSetFromOptions()`, `SNESSetFromOptions()`, `PetscObjectAddOptionsHandler()`, `PetscObjectProcessOptionsHandlers()`,\n`PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectDestroyOptionsHandlers\"))\n\"\"\"\nfunction PetscObjectDestroyOptionsHandlers(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectDestroyOptionsHandlers(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectDestroyOptionsHandlers, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectReference(petsclib::PetscLibType,obj::PetscObject) \nIndicates to a `PetscObject` that it is being\nreferenced by another `PetscObject`. This increases the reference\ncount for that object by one.\n\nLogically Collective\n\nInput Parameter:\n- `obj` - the PETSc object. This must be cast with (`PetscObject`), for example, `PetscObjectReference`((`PetscObject`)mat);\n\nLevel: advanced\n\n-seealso: `PetscObjectCompose()`, `PetscObjectDereference()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectReference\"))\n\"\"\"\nfunction PetscObjectReference(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectReference(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectReference, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcnt::PetscInt = PetscObjectGetReference(petsclib::PetscLibType,obj::PetscObject) \nGets the current reference count for a PETSc object.\n\nNot Collective\n\nInput Parameter:\n- `obj` - the PETSc object; this must be cast with (`PetscObject`), for example,\n`PetscObjectGetReference`((`PetscObject`)mat,&cnt); `obj` cannot be `NULL`\n\nOutput Parameter:\n- `cnt` - the reference count\n\nLevel: advanced\n\n-seealso: `PetscObjectCompose()`, `PetscObjectDereference()`, `PetscObjectReference()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetReference\"))\n\"\"\"\nfunction PetscObjectGetReference(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectGetReference(petsclib::$UnionPetscLib, obj::PetscObject )\n\tcnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscObjectGetReference, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{$PetscInt}),\n               obj, cnt_,\n              )\n\n\tcnt = cnt_[]\n\n\treturn cnt\nend \n\n\"\"\"\n\tPetscObjectDereference(petsclib::PetscLibType,obj::PetscObject) \nIndicates to any `PetscObject` that it is being\nreferenced by one less `PetscObject`. This decreases the reference\ncount for that object by one.\n\nCollective on `obj` if reference reaches 0 otherwise Logically Collective\n\nInput Parameter:\n- `obj` - the PETSc object; this must be cast with (`PetscObject`), for example,\n`PetscObjectDereference`((`PetscObject`)mat);\n\nLevel: advanced\n\n-seealso: `PetscObjectCompose()`, `PetscObjectReference()`, `PetscObjectDestroy()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectDereference\"))\n\"\"\"\nfunction PetscObjectDereference(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectDereference(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectDereference, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectRemoveReference(petsclib::PetscLibType,obj::PetscObject, name::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscObjectRemoveReference\"))\n\"\"\"\nfunction PetscObjectRemoveReference(petsclib::PetscLibType, obj::PetscObject, name::String) end\n\n@for_petsc function PetscObjectRemoveReference(petsclib::$UnionPetscLib, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscObjectRemoveReference, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}),\n               obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectCompose(petsclib::PetscLibType,obj::PetscObject, name::String, ptr::PetscObject) \nAssociates another PETSc object with a given PETSc object.\n\nNot Collective\n\nInput Parameters:\n- `obj`  - the PETSc object; this must be cast with (`PetscObject`), for example,\n`PetscObjectCompose`((`PetscObject`)mat,...);\n- `name` - name associated with the child object\n- `ptr`  - the other PETSc object to associate with the PETSc object; this must also be\ncast with (`PetscObject`)\n\nLevel: advanced\n\n-seealso: `PetscObjectQuery()`, `PetscContainerCreate()`, `PetscObjectComposeFunction()`, `PetscObjectQueryFunction()`, `PetscContainer`,\n`PetscContainerSetPointer()`, `PetscObject`, `PetscObjectContainerCompose()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectCompose\"))\n\"\"\"\nfunction PetscObjectCompose(petsclib::PetscLibType, obj::PetscObject, name::String, ptr::PetscObject) end\n\n@for_petsc function PetscObjectCompose(petsclib::$UnionPetscLib, obj::PetscObject, name::String, ptr::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectCompose, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}, PetscObject),\n               obj, name, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectQuery(petsclib::PetscLibType,obj::PetscObject, name::String, ptr::PetscObject) \nGets a PETSc object associated with a given object that was composed with `PetscObjectCompose()`\n\nNot Collective\n\nInput Parameters:\n- `obj`  - the PETSc object. It must be cast with a (`PetscObject`), for example,\n`PetscObjectCompose`((`PetscObject`)mat,...);\n- `name` - name associated with child object\n- `ptr`  - the other PETSc object associated with the PETSc object, this must be\ncast with (`PetscObject`*)\n\nLevel: advanced\n\n-seealso: `PetscObjectCompose()`, `PetscObjectComposeFunction()`, `PetscObjectQueryFunction()`, `PetscContainer`\n`PetscContainerGetPointer()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectQuery\"))\n\"\"\"\nfunction PetscObjectQuery(petsclib::PetscLibType, obj::PetscObject, name::String, ptr::PetscObject) end\n\n@for_petsc function PetscObjectQuery(petsclib::$UnionPetscLib, obj::PetscObject, name::String, ptr::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectQuery, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}, Ptr{PetscObject}),\n               obj, name, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thas::PetscBool = PetscObjectHasFunction(petsclib::PetscLibType,obj::PetscObject, name::String) \nQuery if a function is associated with a given object.\n\nLogically Collective\n\nInput Parameters:\n- `obj`  - the PETSc object\n- `name` - name associated with the child function\n\nOutput Parameter:\n- `has` - the boolean value\n\nLevel: advanced\n\n-seealso: `PetscObject`, `PetscObjectComposeFunction()`, `PetscObjectQueryFunction()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectHasFunction\"))\n\"\"\"\nfunction PetscObjectHasFunction(petsclib::PetscLibType, obj::PetscObject, name::String) end\n\n@for_petsc function PetscObjectHasFunction(petsclib::$UnionPetscLib, obj::PetscObject, name::String )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscObjectHasFunction, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}, Ptr{PetscBool}),\n               obj, name, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\tPetscObjectContainerCompose(petsclib::PetscLibType,obj::PetscObject, name::String, pointer::Cvoid, destroy::PetscCtxDestroyFn) \nCreates a `PetscContainer`, provides all of its values and composes it with a `PetscObject`\n\nCollective\n\nInput Parameters:\n- `obj`     - the `PetscObject`\n- `name`    - the name for the composed container\n- `pointer` - the pointer to the data\n- `destroy` - the routine to destroy the container's data, see `PetscCtxDestroyFn` for its calling sequence; use `PetscCtxDestroyDefault()` if a `PetscFree()` frees the data\n\nLevel: advanced\n\n-seealso: `PetscContainerCreate()`, `PetscContainerDestroy()`, `PetscContainerSetPointer()`, `PetscContainerGetPointer()`, `PetscObjectCompose()`, `PetscObjectQuery()`,\n`PetscContainerSetCtxDestroy()`, `PetscObject`, `PetscObjectContainerQuery()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectContainerCompose\"))\n\"\"\"\nfunction PetscObjectContainerCompose(petsclib::PetscLibType, obj::PetscObject, name::String, pointer::Cvoid, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function PetscObjectContainerCompose(petsclib::$UnionPetscLib, obj::PetscObject, name::String, pointer::Cvoid, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:PetscObjectContainerCompose, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               obj, name, pointer, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectContainerQuery(petsclib::PetscLibType,obj::PetscObject, name::String, pointer::PeCtx) \nAccesses the pointer in a container composed to a `PetscObject` with `PetscObjectContainerCompose()`\n\nCollective\n\nInput Parameters:\n- `obj`  - the `PetscObject`\n- `name` - the name for the composed container\n\nOutput Parameter:\n- `pointer` - the pointer to the data\n\nLevel: advanced\n\n-seealso: `PetscContainerCreate()`, `PetscContainerDestroy()`, `PetscContainerSetPointer()`, `PetscContainerGetPointer()`, `PetscObjectCompose()`, `PetscObjectQuery()`,\n`PetscContainerSetCtxDestroy()`, `PetscObject`, `PetscObjectContainerCompose()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectContainerQuery\"))\n\"\"\"\nfunction PetscObjectContainerQuery(petsclib::PetscLibType, obj::PetscObject, name::String, pointer::PeCtx) end\n\n@for_petsc function PetscObjectContainerQuery(petsclib::$UnionPetscLib, obj::PetscObject, name::String, pointer::PeCtx )\n\n    @chk ccall(\n               (:PetscObjectContainerQuery, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}, PeCtx),\n               obj, name, pointer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSetFromOptions(petsclib::PetscLibType,obj::PetscObject) \nSets generic parameters from user options.\n\nCollective\n\nInput Parameter:\n- `obj` - the `PetscObject`\n\nLevel: beginner\n\n-seealso: `PetscObjectSetOptionsPrefix()`, `PetscObjectGetOptionsPrefix()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSetFromOptions\"))\n\"\"\"\nfunction PetscObjectSetFromOptions(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectSetFromOptions(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSetUp(petsclib::PetscLibType,obj::PetscObject) \nSets up the internal data structures for later use of the object\n\nCollective\n\nInput Parameter:\n- `obj` - the `PetscObject`\n\nLevel: advanced\n\n-seealso: `PetscObjectDestroy()`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSetUp\"))\n\"\"\"\nfunction PetscObjectSetUp(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectSetUp(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectGetName(petsclib::PetscLibType,obj::PetscObject, name::String) \nGets a string name associated with a PETSc object.\n\nNot Collective unless `obj` has not yet been named\n\nInput Parameters:\n- `obj`  - the PETSc variable. It must be cast with a (`PetscObject`), for example,\n`PetscObjectGetName`((`PetscObject`)mat,&name);\n- `name` - the name associated with `obj`, do not free\n\nLevel: intermediate\n\n-seealso: `PetscObjectSetName()`, `PetscObjectName()`, `PetscObject`, `PetscObjectGetId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetName\"))\n\"\"\"\nfunction PetscObjectGetName(petsclib::PetscLibType, obj::PetscObject, name::String) end\n\n@for_petsc function PetscObjectGetName(petsclib::$UnionPetscLib, obj::PetscObject, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscObjectGetName, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Ptr{Cchar}}),\n               obj, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectDestroy(petsclib::PetscLibType,obj::PetscObject) \nDestroys a `PetscObject`, regardless of the type.\n\nCollective\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectDestroy` (`PetscObject` mat);\n\nLevel: beginner\n\n-seealso: `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectDestroy\"))\n\"\"\"\nfunction PetscObjectDestroy(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectDestroy(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscObject},),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectView(petsclib::PetscLibType,obj::PetscObject, viewer::PetscViewer) \nViews a `PetscObject` regardless of the type.\n\nCollective\n\nInput Parameters:\n- `obj`    - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectView`((`PetscObject`)mat,`viewer`);\n- `viewer` - any PETSc viewer\n\nLevel: intermediate\n\n-seealso: `PetscObject`, `PetscObjectViewFromOptions()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectView\"))\n\"\"\"\nfunction PetscObjectView(petsclib::PetscLibType, obj::PetscObject, viewer::PetscViewer) end\n\n@for_petsc function PetscObjectView(petsclib::$UnionPetscLib, obj::PetscObject, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscObjectView, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscViewer),\n               obj, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectViewFromOptions(petsclib::PetscLibType,obj::PetscObject, bobj::PetscObject, optionname::String) \nProcesses command line options to determine if/how a `PetscObject` is to be viewed.\n\nCollective\n\nInput Parameters:\n- `obj`        - the object\n- `bobj`       - optional other object that provides prefix (if `NULL` then the prefix in `obj` is used)\n- `optionname` - option string that is used to activate viewing\n\nOptions Database Key:\n- `-optionname_view [viewertype]:...` - option name and values. In actual usage this would be something like `-mat_coarse_view`\n\nLevel: developer\n\n-seealso: `PetscObject`, `PetscObjectView()`, `PetscOptionsCreateViewer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectViewFromOptions\"))\n\"\"\"\nfunction PetscObjectViewFromOptions(petsclib::PetscLibType, obj::PetscObject, bobj::PetscObject, optionname::String) end\n\n@for_petsc function PetscObjectViewFromOptions(petsclib::$UnionPetscLib, obj::PetscObject, bobj::PetscObject, optionname::String )\n\n    @chk ccall(\n               (:PetscObjectViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscObject, Ptr{Cchar}),\n               obj, bobj, optionname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsame::PetscBool = PetscObjectTypeCompare(petsclib::PetscLibType,obj::PetscObject, type_name::String) \nDetermines whether a PETSc object is of a particular type.\n\nNot Collective\n\nInput Parameters:\n- `obj`       - a PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectTypeCompare`((`PetscObject`)mat);\n- `type_name` - string containing a type name\n\nOutput Parameter:\n- `same` - `PETSC_TRUE` if the type of `obj` and `type_name` are the same or both `NULL`, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: `PetscObject`, `VecGetType()`, `KSPGetType()`, `PCGetType()`, `SNESGetType()`, `PetscObjectBaseTypeCompare()`, `PetscObjectTypeCompareAny()`, `PetscObjectBaseTypeCompareAny()`, `PetscObjectObjectTypeCompare()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectTypeCompare\"))\n\"\"\"\nfunction PetscObjectTypeCompare(petsclib::PetscLibType, obj::PetscObject, type_name::String) end\n\n@for_petsc function PetscObjectTypeCompare(petsclib::$UnionPetscLib, obj::PetscObject, type_name::String )\n\tsame_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscObjectTypeCompare, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}, Ptr{PetscBool}),\n               obj, type_name, same_,\n              )\n\n\tsame = same_[]\n\n\treturn same\nend \n\n\"\"\"\n\tsame::PetscBool = PetscObjectObjectTypeCompare(petsclib::PetscLibType,obj1::PetscObject, obj2::PetscObject) \nDetermines whether two PETSc objects are of the same type\n\nLogically Collective\n\nInput Parameters:\n- `obj1` - any PETSc object, for example a `Vec`, `Mat` or `KSP`.\n- `obj2` - another PETSc object\n\nOutput Parameter:\n- `same` - `PETSC_TRUE` if they are the same or both unset, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: `PetscObjectTypeCompare()`, `VecGetType()`, `KSPGetType()`, `PCGetType()`, `SNESGetType()`, `PetscObjectBaseTypeCompare()`, `PetscObjectTypeCompareAny()`, `PetscObjectBaseTypeCompareAny()`\n\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectObjectTypeCompare\"))\n\"\"\"\nfunction PetscObjectObjectTypeCompare(petsclib::PetscLibType, obj1::PetscObject, obj2::PetscObject) end\n\n@for_petsc function PetscObjectObjectTypeCompare(petsclib::$UnionPetscLib, obj1::PetscObject, obj2::PetscObject )\n\tsame_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscObjectObjectTypeCompare, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscObject, Ptr{PetscBool}),\n               obj1, obj2, same_,\n              )\n\n\tsame = same_[]\n\n\treturn same\nend \n\n\"\"\"\n\tsame::PetscBool = PetscObjectBaseTypeCompare(petsclib::PetscLibType,obj::PetscObject, type_name::String) \nDetermines whether a `PetscObject` is of a given base type. For example the base type of `MATSEQAIJPERM` is `MATSEQAIJ`\n\nNot Collective\n\nInput Parameters:\n- `obj`       - the object\n- `type_name` - string containing a type name\n\nOutput Parameter:\n- `same` - `PETSC_TRUE` if the object is of the same base type identified by `type_name` or both `NULL`, `PETSC_FALSE` otherwise\n\nLevel: intermediate\n\n-seealso: `PetscObject`, `PetscObjectTypeCompare()`, `PetscObjectTypeCompareAny()`, `PetscObjectBaseTypeCompareAny()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectBaseTypeCompare\"))\n\"\"\"\nfunction PetscObjectBaseTypeCompare(petsclib::PetscLibType, obj::PetscObject, type_name::String) end\n\n@for_petsc function PetscObjectBaseTypeCompare(petsclib::$UnionPetscLib, obj::PetscObject, type_name::String )\n\tsame_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscObjectBaseTypeCompare, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}, Ptr{PetscBool}),\n               obj, type_name, same_,\n              )\n\n\tsame = same_[]\n\n\treturn same\nend \n\n\"\"\"\n\tPetscObjectRegisterDestroy(petsclib::PetscLibType,obj::PetscObject) \nRegisters a PETSc object to be destroyed when\n`PetscFinalize()` is called.\n\nLogically Collective\n\nInput Parameter:\n- `obj` - a PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectRegisterDestroy`((`PetscObject`)mat);\n\nLevel: developer\n\n-seealso: `PetscObjectRegisterDestroyAll()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectRegisterDestroy\"))\n\"\"\"\nfunction PetscObjectRegisterDestroy(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectRegisterDestroy(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectRegisterDestroyAll(petsclib::PetscLibType) \nFrees all the PETSc objects that have been registered\nwith `PetscObjectRegisterDestroy()`. Called by `PetscFinalize()`\n\nLogically Collective on the individual `PetscObject`s that are being processed\n\nLevel: developer\n\n-seealso: `PetscObjectRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectRegisterDestroyAll\"))\n\"\"\"\nfunction PetscObjectRegisterDestroyAll(petsclib::PetscLibType) end\n\n@for_petsc function PetscObjectRegisterDestroyAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscObjectRegisterDestroyAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectGetId(petsclib::PetscLibType,obj::PetscObject, id::PetscObjectId) \nget a unique object ID for the `PetscObject`\n\nNot Collective\n\nInput Parameter:\n- `obj` - object\n\nOutput Parameter:\n- `id` - integer ID\n\nLevel: developer\n\n-seealso: `PetscObjectStateGet()`, `PetscObjectCompareId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetId\"))\n\"\"\"\nfunction PetscObjectGetId(petsclib::PetscLibType, obj::PetscObject, id::PetscObjectId) end\n\n@for_petsc function PetscObjectGetId(petsclib::$UnionPetscLib, obj::PetscObject, id::PetscObjectId )\n\n    @chk ccall(\n               (:PetscObjectGetId, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{PetscObjectId}),\n               obj, id,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\teq::PetscBool = PetscObjectCompareId(petsclib::PetscLibType,obj::PetscObject, id::PetscObjectId) \ncompares the objects ID with a given id\n\nNot Collective\n\nInput Parameters:\n- `obj` - object\n- `id`  - integer ID\n\nOutput Parameter:\n- `eq` - the ids are equal\n\nLevel: developer\n\n-seealso: `PetscObjectStateGet()`, `PetscObjectGetId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectCompareId\"))\n\"\"\"\nfunction PetscObjectCompareId(petsclib::PetscLibType, obj::PetscObject, id::PetscObjectId) end\n\n@for_petsc function PetscObjectCompareId(petsclib::$UnionPetscLib, obj::PetscObject, id::PetscObjectId )\n\teq_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscObjectCompareId, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscObjectId, Ptr{PetscBool}),\n               obj, id, eq_,\n              )\n\n\teq = eq_[]\n\n\treturn eq\nend \n\n\"\"\"\n\tPetscObjectGetOptions(petsclib::PetscLibType,obj::PetscObject, options::PetscOptions) \nGets the options database used by the object that has been set with `PetscObjectSetOptions()`\n\nCollective\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`.\n\nOutput Parameter:\n- `options` - the options database\n\nLevel: advanced\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`,\n`PetscObjectGetOptionsPrefix()`, `PetscObjectSetOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetOptions\"))\n\"\"\"\nfunction PetscObjectGetOptions(petsclib::PetscLibType, obj::PetscObject, options::PetscOptions) end\n\n@for_petsc function PetscObjectGetOptions(petsclib::$UnionPetscLib, obj::PetscObject, options::PetscOptions )\n\toptions_ = Ref(options.ptr)\n\n    @chk ccall(\n               (:PetscObjectGetOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{COptions}),\n               obj, options_,\n              )\n\n\toptions.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSetOptions(petsclib::PetscLibType,obj::PetscObject, options::PetscOptions) \nSets the options database used by the object. Call immediately after creating the object.\n\nCollective\n\nInput Parameters:\n- `obj`     - any PETSc object, for example a `Vec`, `Mat` or `KSP`.\n- `options` - the options database, use NULL for default\n\nLevel: advanced\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`,\n`PetscObjectGetOptionsPrefix()`, `PetscObjectGetOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSetOptions\"))\n\"\"\"\nfunction PetscObjectSetOptions(petsclib::PetscLibType, obj::PetscObject, options::PetscOptions) end\n\n@for_petsc function PetscObjectSetOptions(petsclib::$UnionPetscLib, obj::PetscObject, options::PetscOptions )\n\n    @chk ccall(\n               (:PetscObjectSetOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, COptions),\n               obj, options,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSetOptionsPrefix(petsclib::PetscLibType,obj::PetscObject, prefix::String) \nSets the prefix used for searching for all\noptions for the given object in the database.\n\nCollective\n\nInput Parameters:\n- `obj`    - any PETSc object, for example a `Vec`, `Mat` or `KSP`.\n- `prefix` - the prefix string to prepend to option requests of the object.\n\nLevel: advanced\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectAppendOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`,\n`PetscObjectGetOptionsPrefix()`, `TSSetOptionsPrefix()`, `SNESSetOptionsPrefix()`, `KSPSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSetOptionsPrefix\"))\n\"\"\"\nfunction PetscObjectSetOptionsPrefix(petsclib::PetscLibType, obj::PetscObject, prefix::String) end\n\n@for_petsc function PetscObjectSetOptionsPrefix(petsclib::$UnionPetscLib, obj::PetscObject, prefix::String )\n\n    @chk ccall(\n               (:PetscObjectSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}),\n               obj, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectAppendOptionsPrefix(petsclib::PetscLibType,obj::PetscObject, prefix::String) \nAppends to the prefix used for searching for options for the given object in the database.\n\nInput Parameters:\n- `obj`    - any PETSc object, for example a `Vec`, `Mat` or `KSP`.\n- `prefix` - the prefix string to prepend to option requests of the object.\n\nLevel: advanced\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`,\n`PetscObjectGetOptionsPrefix()`, `TSAppendOptionsPrefix()`, `SNESAppendOptionsPrefix()`, `KSPAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectAppendOptionsPrefix\"))\n\"\"\"\nfunction PetscObjectAppendOptionsPrefix(petsclib::PetscLibType, obj::PetscObject, prefix::String) end\n\n@for_petsc function PetscObjectAppendOptionsPrefix(petsclib::$UnionPetscLib, obj::PetscObject, prefix::String )\n\n    @chk ccall(\n               (:PetscObjectAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}),\n               obj, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectGetOptionsPrefix(petsclib::PetscLibType,obj::PetscObject, prefix::String) \nGets the prefix of the `PetscObject` used for searching in the options database\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`.\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used is returned\n\nLevel: advanced\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`,\n`TSGetOptionsPrefix()`, `SNESGetOptionsPrefix()`, `KSPGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetOptionsPrefix\"))\n\"\"\"\nfunction PetscObjectGetOptionsPrefix(petsclib::PetscLibType, obj::PetscObject, prefix::String) end\n\n@for_petsc function PetscObjectGetOptionsPrefix(petsclib::$UnionPetscLib, obj::PetscObject, prefix::String )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:PetscObjectGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Ptr{Cchar}}),\n               obj, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectPrependOptionsPrefix(petsclib::PetscLibType,obj::PetscObject, prefix::String) \nSets the prefix used for searching for options of for this object in the database.\n\nInput Parameters:\n- `obj`    - any PETSc object, for example a `Vec`, `Mat` or `KSP`.\n- `prefix` - the prefix string to prepend to option requests of the object.\n\nLevel: advanced\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`,\n`PetscObjectGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectPrependOptionsPrefix\"))\n\"\"\"\nfunction PetscObjectPrependOptionsPrefix(petsclib::PetscLibType, obj::PetscObject, prefix::String) end\n\n@for_petsc function PetscObjectPrependOptionsPrefix(petsclib::$UnionPetscLib, obj::PetscObject, prefix::String )\n\n    @chk ccall(\n               (:PetscObjectPrependOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}),\n               obj, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcomm::MPI_Comm = PetscObjectGetComm(petsclib::PetscLibType,obj) \nGets the MPI communicator for any `PetscObject` regardless of the type.\n\nNot Collective\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectGetComm`((`PetscObject`)mat,&comm);\n\nOutput Parameter:\n- `comm` - the MPI communicator\n\nLevel: advanced\n\n-seealso: `PetscObject`, `PetscObjectComm()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetComm\"))\n\"\"\"\nfunction PetscObjectGetComm(petsclib::PetscLibType, obj) end\n\n@for_petsc function PetscObjectGetComm(petsclib::$UnionPetscLib, obj)\n    comm = Ref(MPI_Comm())\n    @chk ccall(\n               (:PetscObjectGetComm, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{MPI_Comm}),\n               obj, comm\n              )\n\n\treturn comm[]\nend \n\n\"\"\"\n\ttab::PetscInt = PetscObjectGetTabLevel(petsclib::PetscLibType,obj::PetscObject) \nGets the number of tabs that `PETSCVIEWERASCII` output for that object uses\n\nNot Collective\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectGetTabLevel`((`PetscObject`)mat,&tab);\n\nOutput Parameter:\n- `tab` - the number of tabs\n\nLevel: developer\n\n-seealso: `PetscObjectIncrementTabLevel()`, `PetscObjectSetTabLevel()`, `PETSCVIEWERASCII`, `PetscObject`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetTabLevel\"))\n\"\"\"\nfunction PetscObjectGetTabLevel(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectGetTabLevel(petsclib::$UnionPetscLib, obj::PetscObject )\n\ttab_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscObjectGetTabLevel, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{$PetscInt}),\n               obj, tab_,\n              )\n\n\ttab = tab_[]\n\n\treturn tab\nend \n\n\"\"\"\n\tPetscObjectSetTabLevel(petsclib::PetscLibType,obj::PetscObject, tab::PetscInt) \nSets the number of tabs that `PETSCVIEWERASCII` output for that object uses\n\nNot Collective\n\nInput Parameters:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectSetTabLevel`((`PetscObject`)mat,tab;\n- `tab` - the number of tabs\n\nLevel: developer\n\n-seealso: `PetscObjectIncrementTabLevel()`, `PetscObjectGetTabLevel()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSetTabLevel\"))\n\"\"\"\nfunction PetscObjectSetTabLevel(petsclib::PetscLibType, obj::PetscObject, tab::PetscInt) end\n\n@for_petsc function PetscObjectSetTabLevel(petsclib::$UnionPetscLib, obj::PetscObject, tab::$PetscInt )\n\n    @chk ccall(\n               (:PetscObjectSetTabLevel, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, $PetscInt),\n               obj, tab,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectIncrementTabLevel(petsclib::PetscLibType,obj::PetscObject, oldobj::PetscObject, tab::PetscInt) \nIncrements the number of tabs that `PETSCVIEWERASCII` output for that object use based on\nthe tablevel of another object. This should be called immediately after the object is created.\n\nNot Collective\n\nInput Parameters:\n- `obj`    - any PETSc object where we are changing the tab\n- `oldobj` - the object providing the tab, optional pass `NULL` to use 0 as the previous tablevel for `obj`\n- `tab`    - the increment that is added to the old objects tab\n\nLevel: developer\n\n-seealso: `PETSCVIEWERASCII`, `PetscObjectSetTabLevel()`, `PetscObjectGetTabLevel()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectIncrementTabLevel\"))\n\"\"\"\nfunction PetscObjectIncrementTabLevel(petsclib::PetscLibType, obj::PetscObject, oldobj::PetscObject, tab::PetscInt) end\n\n@for_petsc function PetscObjectIncrementTabLevel(petsclib::$UnionPetscLib, obj::PetscObject, oldobj::PetscObject, tab::$PetscInt )\n\n    @chk ccall(\n               (:PetscObjectIncrementTabLevel, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscObject, $PetscInt),\n               obj, oldobj, tab,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectGetNewTag(petsclib::PetscLibType,obj::PetscObject, tag::PetscMPIInt) \nGets a unique new tag from a PETSc object. All\nprocessors that share the object MUST call this routine EXACTLY the same\nnumber of times.  This tag should only be used with the current objects\ncommunicator; do NOT use it with any other MPI communicator.\n\nCollective\n\nInput Parameter:\n- `obj` - the PETSc object; this must be cast with a (`PetscObject`), for example,\n`PetscObjectGetNewTag`((`PetscObject`)mat,&tag);\n\nOutput Parameter:\n- `tag` - the new tag\n\nLevel: developer\n\n-seealso: `PetscCommGetNewTag()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetNewTag\"))\n\"\"\"\nfunction PetscObjectGetNewTag(petsclib::PetscLibType, obj::PetscObject, tag::PetscMPIInt) end\n\n@for_petsc function PetscObjectGetNewTag(petsclib::$UnionPetscLib, obj::PetscObject, tag::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscObjectGetNewTag, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{PetscMPIInt}),\n               obj, tag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcount::PetscInt,numbering::PetscInt = PetscObjectsListGetGlobalNumbering(petsclib::PetscLibType,comm::MPI_Comm, len::PetscInt, objlist::Vector{PetscObject}) \ncomputes a global numbering\nof `PetscObject`s living on subcommunicators of a given communicator.\n\nCollective.\n\nInput Parameters:\n- `comm`    - the `MPI_Comm`\n- `len`     - local length of `objlist`\n- `objlist` - a list of PETSc objects living on subcomms of comm and containing this comm rank\n(subcomm ordering is assumed to be deadlock-free)\n\nOutput Parameters:\n- `count`     - global number of distinct subcommunicators on objlist (may be > `len`)\n- `numbering` - global numbers of objlist entries (allocated by user)\n\nLevel: developer\n\n-seealso: `PetscCommDuplicate()`, `PetscObjectDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectsListGetGlobalNumbering\"))\n\"\"\"\nfunction PetscObjectsListGetGlobalNumbering(petsclib::PetscLibType, comm::MPI_Comm, len::PetscInt, objlist::Vector{PetscObject}) end\n\n@for_petsc function PetscObjectsListGetGlobalNumbering(petsclib::$UnionPetscLib, comm::MPI_Comm, len::$PetscInt, objlist::Vector{PetscObject} )\n\tcount_ = Ref{$PetscInt}()\n\tnumbering_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscObjectsListGetGlobalNumbering, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{PetscObject}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               comm, len, objlist, count_, numbering_,\n              )\n\n\tcount = count_[]\n\tnumbering = numbering_[]\n\n\treturn count,numbering\nend \n\n\"\"\"\n\tPetscObjectGetClassId(petsclib::PetscLibType,obj::PetscObject, classid::PetscClassId) \nGets the classid for any `PetscObject`\n\nNot Collective\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectGetClassId`((`PetscObject`)mat,&classid);\n\nOutput Parameter:\n- `classid` - the classid\n\nLevel: developer\n\n-seealso: `PetscObject`, `PetscClassId`, `PetscObjectGetClassName()`, `PetscObjectGetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetClassId\"))\n\"\"\"\nfunction PetscObjectGetClassId(petsclib::PetscLibType, obj::PetscObject, classid::PetscClassId) end\n\n@for_petsc function PetscObjectGetClassId(petsclib::$UnionPetscLib, obj::PetscObject, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscObjectGetClassId, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{PetscClassId}),\n               obj, classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectGetClassName(petsclib::PetscLibType,obj::PetscObject, classname::String) \nGets the class name for any `PetscObject`\n\nNot Collective\n\nInput Parameter:\n- `obj` - any PETSc object, for example a `Vec`, `Mat` or `KSP`. It must be cast with a (`PetscObject`), for example,\n`PetscObjectGetClassName`((`PetscObject`)mat,&classname);\n\nOutput Parameter:\n- `classname` - the class name, for example \"Vec\"\n\nLevel: developer\n\n-seealso: `PetscObject`, `PetscClassId`, `PetscObjectGetType()`, `PetscObjectGetClassId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectGetClassName\"))\n\"\"\"\nfunction PetscObjectGetClassName(petsclib::PetscLibType, obj::PetscObject, classname::String) end\n\n@for_petsc function PetscObjectGetClassName(petsclib::$UnionPetscLib, obj::PetscObject, classname::String )\n\tclassname_ = Ref(pointer(classname))\n\n    @chk ccall(\n               (:PetscObjectGetClassName, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Ptr{Cchar}}),\n               obj, classname_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectSetName(petsclib::PetscLibType,obj::PetscObject, name::String) \nSets a string name for a PETSc object.\n\nNot Collective\n\nInput Parameters:\n- `obj`  - the PETSc object. It must be cast with a (`PetscObject`), for example,\n`PetscObjectSetName`((`PetscObject`)mat,name);\n- `name` - the name to give obj\n\nLevel: advanced\n\n-seealso: `PetscObjectGetName()`, `PetscObjectName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectSetName\"))\n\"\"\"\nfunction PetscObjectSetName(petsclib::PetscLibType, obj::PetscObject, name::String) end\n\n@for_petsc function PetscObjectSetName(petsclib::$UnionPetscLib, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscObjectSetName, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}),\n               obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectPrintClassNamePrefixType(petsclib::PetscLibType,obj::PetscObject, viewer::PetscViewer) \nused in the `XXXView()` methods to display information about the class, name, prefix and type of an object\n\nInput Parameters:\n- `obj`    - the PETSc object\n- `viewer` - `PETSCVIEWERASCII` viewer where the information is printed, function does nothing if the viewer is not `PETSCVIEWERASCII` type\n\nLevel: developer\n\n-seealso: `PetscObjectSetName()`, `PetscObjectName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectPrintClassNamePrefixType\"))\n\"\"\"\nfunction PetscObjectPrintClassNamePrefixType(petsclib::PetscLibType, obj::PetscObject, viewer::PetscViewer) end\n\n@for_petsc function PetscObjectPrintClassNamePrefixType(petsclib::$UnionPetscLib, obj::PetscObject, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscObjectPrintClassNamePrefixType, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, PetscViewer),\n               obj, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectName(petsclib::PetscLibType,obj::PetscObject) \nGives `obj` a name if it does not have one\n\nCollective\n\nInput Parameter:\n- `obj` - the PETSc object. It must be cast with a (`PetscObject`), for example, `PetscObjectName`((`PetscObject`)mat,name);\n\nLevel: developer\n\n-seealso: `PetscObjectGetName()`, `PetscObjectSetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscObjectName\"))\n\"\"\"\nfunction PetscObjectName(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscObjectName(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscObjectName, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscObjectChangeTypeName(petsclib::PetscLibType,obj::PetscObject, type_name::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscObjectChangeTypeName\"))\n\"\"\"\nfunction PetscObjectChangeTypeName(petsclib::PetscLibType, obj::PetscObject, type_name::String) end\n\n@for_petsc function PetscObjectChangeTypeName(petsclib::$UnionPetscLib, obj::PetscObject, type_name::String )\n\n    @chk ccall(\n               (:PetscObjectChangeTypeName, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}),\n               obj, type_name,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscOmpCtrl_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscOmpCtrl end\nconst PetscOmpCtrl = Ptr{_n_PetscOmpCtrl}\n# -------------------------------------------------------\n\"\"\"\n\tpctrl::PetscOmpCtrl = PetscOmpCtrlCreate(petsclib::PetscLibType,petsc_comm::MPI_Comm, nthreads::PetscInt) \ncreate a PETSc OpenMP controller, which manages PETSc's interaction with third party libraries that use OpenMP\n\nInput Parameters:\n- `petsc_comm` - a communicator some PETSc object (for example, a matrix) lives in\n- `nthreads`   - number of threads per MPI rank to spawn in a library using OpenMP. If nthreads = -1, let PETSc decide a suitable value\n\nOutput Parameter:\n- `pctrl` - a PETSc OpenMP controller\n\nLevel: developer\n\n-seealso: `PetscOmpCtrlDestroy()`, `PetscOmpCtrlGetOmpComms()`, `PetscOmpCtrlBarrier()`, `PetscOmpCtrlOmpRegionOnMasterBegin()`, `PetscOmpCtrlOmpRegionOnMasterEnd()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscOmpCtrlCreate\"))\n\"\"\"\nfunction PetscOmpCtrlCreate(petsclib::PetscLibType, petsc_comm::MPI_Comm, nthreads::PetscInt) end\n\n@for_petsc function PetscOmpCtrlCreate(petsclib::$UnionPetscLib, petsc_comm::MPI_Comm, nthreads::$PetscInt )\n\tpctrl_ = Ref{PetscOmpCtrl}()\n\n    @chk ccall(\n               (:PetscOmpCtrlCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{PetscOmpCtrl}),\n               petsc_comm, nthreads, pctrl_,\n              )\n\n\tpctrl = pctrl_[]\n\n\treturn pctrl\nend \n\n\"\"\"\n\tPetscOmpCtrlDestroy(petsclib::PetscLibType,pctrl::PetscOmpCtrl) \ndestroy the PETSc OpenMP controller\n\nInput Parameter:\n- `pctrl` - a PETSc OpenMP controller\n\nLevel: developer\n\n-seealso: `PetscOmpCtrlCreate()`, `PetscOmpCtrlGetOmpComms()`, `PetscOmpCtrlBarrier()`, `PetscOmpCtrlOmpRegionOnMasterBegin()`, `PetscOmpCtrlOmpRegionOnMasterEnd()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscOmpCtrlDestroy\"))\n\"\"\"\nfunction PetscOmpCtrlDestroy(petsclib::PetscLibType, pctrl::PetscOmpCtrl) end\n\n@for_petsc function PetscOmpCtrlDestroy(petsclib::$UnionPetscLib, pctrl::PetscOmpCtrl )\n\n    @chk ccall(\n               (:PetscOmpCtrlDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscOmpCtrl},),\n               pctrl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tis_omp_master::PetscBool = PetscOmpCtrlGetOmpComms(petsclib::PetscLibType,ctrl::PetscOmpCtrl, omp_comm::MPI_Comm, omp_master_comm::MPI_Comm) \nGet MPI communicators from a PETSc OMP controller\n\nInput Parameter:\n- `ctrl` - a PETSc OMP controller\n\nOutput Parameters:\n- `omp_comm`        - a communicator that includes a master rank and slave ranks where master spawns threads\n- `omp_master_comm` - on master ranks, return a communicator that include master ranks of each omp_comm;\non slave ranks, `MPI_COMM_NULL` will be return in reality.\n- `is_omp_master`   - true if the calling process is an OMP master rank.\n\n-seealso: `PetscOmpCtrlCreate()`, `PetscOmpCtrlDestroy()`, `PetscOmpCtrlBarrier()`, `PetscOmpCtrlOmpRegionOnMasterBegin()`, `PetscOmpCtrlOmpRegionOnMasterEnd()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscOmpCtrlGetOmpComms\"))\n\"\"\"\nfunction PetscOmpCtrlGetOmpComms(petsclib::PetscLibType, ctrl::PetscOmpCtrl, omp_comm::MPI_Comm, omp_master_comm::MPI_Comm) end\n\n@for_petsc function PetscOmpCtrlGetOmpComms(petsclib::$UnionPetscLib, ctrl::PetscOmpCtrl, omp_comm::MPI_Comm, omp_master_comm::MPI_Comm )\n\tis_omp_master_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOmpCtrlGetOmpComms, $petsc_library),\n               PetscErrorCode,\n               (PetscOmpCtrl, Ptr{MPI_Comm}, Ptr{MPI_Comm}, Ptr{PetscBool}),\n               ctrl, omp_comm, omp_master_comm, is_omp_master_,\n              )\n\n\tis_omp_master = is_omp_master_[]\n\n\treturn is_omp_master\nend \n\n\"\"\"\n\tPetscOmpCtrlBarrier(petsclib::PetscLibType,ctrl::PetscOmpCtrl) \nDo barrier on MPI ranks in omp_comm contained by the PETSc OMP controller (to let slave ranks free their CPU)\n\nInput Parameter:\n- `ctrl` - a PETSc OMP controller\n\n-seealso: `PetscOmpCtrlOmpRegionOnMasterBegin()`, `PetscOmpCtrlOmpRegionOnMasterEnd()`, `PetscOmpCtrlCreate()`, `PetscOmpCtrlDestroy()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscOmpCtrlBarrier\"))\n\"\"\"\nfunction PetscOmpCtrlBarrier(petsclib::PetscLibType, ctrl::PetscOmpCtrl) end\n\n@for_petsc function PetscOmpCtrlBarrier(petsclib::$UnionPetscLib, ctrl::PetscOmpCtrl )\n\n    @chk ccall(\n               (:PetscOmpCtrlBarrier, $petsc_library),\n               PetscErrorCode,\n               (PetscOmpCtrl,),\n               ctrl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOmpCtrlOmpRegionOnMasterBegin(petsclib::PetscLibType,ctrl::PetscOmpCtrl) \nMark the beginning of an OpenMP library call on master ranks\n\nInput Parameter:\n- `ctrl` - a PETSc OMP controller\n\n-seealso: `PetscOmpCtrlOmpRegionOnMasterEnd()`, `PetscOmpCtrlCreate()`, `PetscOmpCtrlDestroy()`, `PetscOmpCtrlBarrier()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOmpCtrlOmpRegionOnMasterBegin\"))\n\"\"\"\nfunction PetscOmpCtrlOmpRegionOnMasterBegin(petsclib::PetscLibType, ctrl::PetscOmpCtrl) end\n\n@for_petsc function PetscOmpCtrlOmpRegionOnMasterBegin(petsclib::$UnionPetscLib, ctrl::PetscOmpCtrl )\n\n    @chk ccall(\n               (:PetscOmpCtrlOmpRegionOnMasterBegin, $petsc_library),\n               PetscErrorCode,\n               (PetscOmpCtrl,),\n               ctrl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOmpCtrlOmpRegionOnMasterEnd(petsclib::PetscLibType,ctrl::PetscOmpCtrl) \nMark the end of an OpenMP library call on master ranks\n\nInput Parameter:\n- `ctrl` - a PETSc OMP controller\n\n-seealso: `PetscOmpCtrlOmpRegionOnMasterBegin()`, `PetscOmpCtrlCreate()`, `PetscOmpCtrlDestroy()`, `PetscOmpCtrlBarrier()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOmpCtrlOmpRegionOnMasterEnd\"))\n\"\"\"\nfunction PetscOmpCtrlOmpRegionOnMasterEnd(petsclib::PetscLibType, ctrl::PetscOmpCtrl) end\n\n@for_petsc function PetscOmpCtrlOmpRegionOnMasterEnd(petsclib::$UnionPetscLib, ctrl::PetscOmpCtrl )\n\n    @chk ccall(\n               (:PetscOmpCtrlOmpRegionOnMasterEnd, $petsc_library),\n               PetscErrorCode,\n               (PetscOmpCtrl,),\n               ctrl,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscOptions_addons_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscOptionsHelpPrCinted end\nconst PetscOptionsHelpPrCinted = Ptr{_n_PetscOptionsHelpPrCinted}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\n# -------------------------------------------------------\n# autodefined type arguments for class ------\n# -------------------------------------------------------\n\"\"\"\n\tPetscOptionsHelpPrintedDestroy(petsclib::PetscLibType,hp::PetscOptionsHelpPrCinted) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsHelpPrintedDestroy\"))\n\"\"\"\nfunction PetscOptionsHelpPrintedDestroy(petsclib::PetscLibType, hp::PetscOptionsHelpPrCinted) end\n\n@for_petsc function PetscOptionsHelpPrintedDestroy(petsclib::$UnionPetscLib, hp::PetscOptionsHelpPrCinted )\n\n    @chk ccall(\n               (:PetscOptionsHelpPrintedDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscOptionsHelpPrCinted},),\n               hp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thp::PetscOptionsHelpPrCinted = PetscOptionsHelpPrintedCreate(petsclib::PetscLibType) \nCreates an object used to manage tracking which help messages have\nbeen printed so they will not be printed again.\n\nOutput Parameter:\n- `hp` - the created object\n\nNot Collective\n\nLevel: developer\n\n-seealso: `PetscOptionsHelpPrintedCheck()`, `PetscOptionsHelpPrintChecked()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsHelpPrintedCreate\"))\n\"\"\"\nfunction PetscOptionsHelpPrintedCreate(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsHelpPrintedCreate(petsclib::$UnionPetscLib)\n\thp_ = Ref{PetscOptionsHelpPrCinted}()\n\n    @chk ccall(\n               (:PetscOptionsHelpPrintedCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscOptionsHelpPrCinted},),\n               hp_,\n              )\n\n\thp = hp_[]\n\n\treturn hp\nend \n\n\"\"\"\n\tfound::PetscBool = PetscOptionsHelpPrintedCheck(petsclib::PetscLibType,hp::PetscOptionsHelpPrCinted, pre::String, name::String) \nChecks if a particular pre, name pair has previous been entered (meaning the help message was printed)\n\nNot Collective\n\nInput Parameters:\n- `hp`   - the object used to manage tracking what help messages have been printed\n- `pre`  - the prefix part of the string, many be `NULL`\n- `name` - the string to look for (cannot be `NULL`)\n\nOutput Parameter:\n- `found` - `PETSC_TRUE` if the string was already set\n\nLevel: intermediate\n\n-seealso: `PetscOptionsHelpPrintedCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsHelpPrintedCheck\"))\n\"\"\"\nfunction PetscOptionsHelpPrintedCheck(petsclib::PetscLibType, hp::PetscOptionsHelpPrCinted, pre::String, name::String) end\n\n@for_petsc function PetscOptionsHelpPrintedCheck(petsclib::$UnionPetscLib, hp::PetscOptionsHelpPrCinted, pre::String, name::String )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsHelpPrintedCheck, $petsc_library),\n               PetscErrorCode,\n               (PetscOptionsHelpPrCinted, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               hp, pre, name, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscOptions_wrappers.jl",
    "content": "# autodefined type arguments for class ------\n# -------------------------------------------------------\n\n\"\"\"\n\tPetscOptionsPushCreateViewerOff(petsclib::PetscLibType,flg::PetscBool) \nsets if `PetscOptionsCreateViewer()`, `PetscOptionsViewer()`, and `PetscOptionsCreateViewers()` return viewers.\n\nLogically Collective\n\nInput Parameter:\n- `flg` - `PETSC_TRUE` to turn off viewer creation, `PETSC_FALSE` to turn it on.\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscOptionsCreateViewer()`, `PetscOptionsPopCreateViewerOff()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsPushCreateViewerOff\"))\n\"\"\"\nfunction PetscOptionsPushCreateViewerOff(petsclib::PetscLibType, flg::PetscBool) end\n\n@for_petsc function PetscOptionsPushCreateViewerOff(petsclib::$UnionPetscLib, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscOptionsPushCreateViewerOff, $petsc_library),\n               PetscErrorCode,\n               (PetscBool,),\n               flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsPopCreateViewerOff(petsclib::PetscLibType) \nreset whether `PetscOptionsCreateViewer()` returns a viewer.\n\nLogically Collective\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscOptionsCreateViewer()`, `PetscOptionsPushCreateViewerOff()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsPopCreateViewerOff\"))\n\"\"\"\nfunction PetscOptionsPopCreateViewerOff(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsPopCreateViewerOff(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscOptionsPopCreateViewerOff, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscOptionsGetCreateViewerOff(petsclib::PetscLibType) \ndo `PetscOptionsCreateViewer()`, `PetscOptionsViewer()`, and `PetscOptionsCreateViewers()` return viewers\n\nLogically Collective\n\nOutput Parameter:\n- `flg` - whether viewers are returned.\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscOptionsCreateViewer()`, `PetscOptionsPushCreateViewerOff()`, `PetscOptionsPopCreateViewerOff()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetCreateViewerOff\"))\n\"\"\"\nfunction PetscOptionsGetCreateViewerOff(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsGetCreateViewerOff(petsclib::$UnionPetscLib)\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetCreateViewerOff, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tviewer::PetscViewer,format::PetscViewerFormat,set::PetscBool = PetscOptionsCreateViewer(petsclib::PetscLibType,comm::MPI_Comm, options::Union{Ptr,PetscOptions}, pre::String, name::String) \nCreates a viewer appropriate for the type indicated by the user\n\nCollective\n\nInput Parameters:\n- `comm`    - the communicator to own the viewer\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the string to prepend to the name or `NULL`\n- `name`    - the options database name that will be checked for\n\nOutput Parameters:\n- `viewer` - the viewer, pass `NULL` if not needed\n- `format` - the `PetscViewerFormat` requested by the user, pass `NULL` if not needed\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewerDestroy()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsPushCreateViewerOff()`, `PetscOptionsPopCreateViewerOff()`,\n`PetscOptionsCreateViewerOff()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsCreateViewer\"))\n\"\"\"\nfunction PetscOptionsCreateViewer(petsclib::PetscLibType, comm::MPI_Comm, options::Union{Ptr,PetscOptions}, pre::String, name::String) end\n\n@for_petsc function PetscOptionsCreateViewer(petsclib::$UnionPetscLib, comm::MPI_Comm, options::Union{Ptr,PetscOptions}, pre::String, name::String)\n\tviewer_ = Ref{PetscViewer}()\n\tformat_ = Ref{PetscViewerFormat}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsCreateViewer, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscViewer}, Ptr{PetscViewerFormat}, Ptr{PetscBool}),\n               comm, options, pre, name, viewer_, format_, set_,\n              )\n\n\tviewer = viewer_[]\n\tformat = format_[]\n\tset = set_[]\n\n\treturn viewer,format,set\nend \n\n\"\"\"\n\tviewers::Vector{PetscViewer},formats::Vector{PetscViewerFormat},set::PetscBool = PetscOptionsCreateViewers(petsclib::PetscLibType,comm::MPI_Comm, options::PetscOptions, pre::String, name::String, n_max::PetscInt) \nCreate multiple viewers from a comma\n\nCollective\n\nInput Parameters:\n- `comm`    - the communicator to own the viewers\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the string to prepend to the name or `NULL`\n- `name`    - the options database name that will be checked for\n- `n_max`   - on input: the maximum number of viewers; on output: the number of viewers in the comma-separated list\n\nOutput Parameters:\n- `viewers` - an array to hold at least `n_max` `PetscViewer`s, or `NULL` if not needed; on output: if not `NULL`, the\nfirst `n_max` entries are initialized `PetscViewer`s\n- `formats` - an array to hold at least `n_max` `PetscViewerFormat`s, or `NULL` if not needed; on output: if not `NULL`, the first `n_max` entries are valid `PetscViewerFormat`s\n- `set`     - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscOptionsCreateViewer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsCreateViewers\"))\n\"\"\"\nfunction PetscOptionsCreateViewers(petsclib::PetscLibType, comm::MPI_Comm, options::PetscOptions, pre::String, name::String, n_max::PetscInt) end\n\n@for_petsc function PetscOptionsCreateViewers(petsclib::$UnionPetscLib, comm::MPI_Comm, options::PetscOptions, pre::String, name::String, n_max::$PetscInt )\n\tviewers = Vector{PetscViewer}(undef, ni);  # CHECK SIZE!!\n\tformats = Vector{PetscViewerFormat}(undef, ni);  # CHECK SIZE!!\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsCreateViewers, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{PetscViewer}, Ptr{PetscViewerFormat}, Ptr{PetscBool}),\n               comm, options, pre, name, n_max, viewers, formats, set_,\n              )\n\n\tset = set_[]\n\n\treturn viewers,formats,set\nend \n\n\"\"\"\n\tPetscOptionsInsertStringYAML(petsclib::PetscLibType,options::PetscOptions, in_str::String) \nInserts YAML\n\nLogically Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `in_str`  - YAML-formatted string options\n\nLevel: intermediate\n\n-seealso: `PetscOptionsSetValue()`, `PetscOptionsView()`, `PetscOptionsHasName()`, `PetscOptionsGetInt()`,\n`PetscOptionsGetReal()`, `PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsInsertFile()`, `PetscOptionsInsertFileYAML()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsInsertStringYAML\"))\n\"\"\"\nfunction PetscOptionsInsertStringYAML(petsclib::PetscLibType, options::PetscOptions, in_str::String) end\n\n@for_petsc function PetscOptionsInsertStringYAML(petsclib::$UnionPetscLib, options::PetscOptions, in_str::String )\n\n    @chk ccall(\n               (:PetscOptionsInsertStringYAML, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}),\n               options, in_str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsInsertFileYAML(petsclib::PetscLibType,comm::MPI_Comm, options::PetscOptions, file::String, require::PetscBool) \nInsert a YAML\n\nCollective\n\nInput Parameters:\n- `comm`    - the processes that will share the options (usually `PETSC_COMM_WORLD`)\n- `options` - options database, use `NULL` for default global database\n- `file`    - name of file\n- `require` - if `PETSC_TRUE` will generate an error if the file does not exist\n\nLevel: intermediate\n\n-seealso: `PetscOptionsSetValue()`, `PetscOptionsView()`, `PetscOptionsHasName()`, `PetscOptionsGetInt()`,\n`PetscOptionsGetReal()`, `PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsInsertFile()`, `PetscOptionsInsertStringYAML()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsInsertFileYAML\"))\n\"\"\"\nfunction PetscOptionsInsertFileYAML(petsclib::PetscLibType, comm::MPI_Comm, options::PetscOptions, file::String, require::PetscBool) end\n\n@for_petsc function PetscOptionsInsertFileYAML(petsclib::$UnionPetscLib, comm::MPI_Comm, options::PetscOptions, file::String, require::PetscBool )\n\n    @chk ccall(\n               (:PetscOptionsInsertFileYAML, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, COptions, Ptr{Cchar}, PetscBool),\n               comm, options, file, require,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toptions::PetscOptions = PetscOptionsCreate(petsclib::PetscLibType) \nCreates an empty options database.\n\nLogically Collective\n\nOutput Parameter:\n- `options` - Options database object\n\nLevel: advanced\n\n-seealso: `PetscOptionsDestroy()`, `PetscOptionsPush()`, `PetscOptionsPop()`, `PetscOptionsInsert()`, `PetscOptionsSetValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsCreate\"))\n\"\"\"\nfunction PetscOptionsCreate(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsCreate(petsclib::$UnionPetscLib)\n\toptions_ = Ref{COptions}()\n\n    @chk ccall(\n               (:PetscOptionsCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{COptions},),\n               options_,\n              )\n\n\toptions = PetscOptions(options_[], petsclib)\n\n\treturn options\nend \n\n\"\"\"\n\tPetscOptionsDestroy(petsclib::PetscLibType,options::PetscOptions) \nDestroys an option database.\n\nLogically Collective on whatever communicator was associated with the call to `PetscOptionsCreate()`\n\nInput Parameter:\n- `options` - the `PetscOptions` object\n\nLevel: advanced\n\n-seealso: `PetscOptionsInsert()`, `PetscOptionsPush()`, `PetscOptionsPop()`, `PetscOptionsSetValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsDestroy\"))\n\"\"\"\nfunction PetscOptionsDestroy(petsclib::PetscLibType, options::PetscOptions) end\n\n@for_petsc function PetscOptionsDestroy(petsclib::$UnionPetscLib, options::PetscOptions )\n\toptions_ = Ref(options.ptr)\n\n    @chk ccall(\n               (:PetscOptionsDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{COptions},),\n               options_,\n              )\n\n\toptions.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsCreateDefault(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsCreateDefault\"))\n\"\"\"\nfunction PetscOptionsCreateDefault(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsCreateDefault(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscOptionsCreateDefault, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsPush(petsclib::PetscLibType,opt::PetscOptions) \nPush a new `PetscOptions` object as the default provider of options\nAllows using different parts of a code to use different options databases\n\nLogically Collective\n\nInput Parameter:\n- `opt` - the options obtained with `PetscOptionsCreate()`\n\nLevel: advanced\n\n-seealso: `PetscOptionsPop()`, `PetscOptionsCreate()`, `PetscOptionsInsert()`, `PetscOptionsSetValue()`, `PetscOptionsLeft()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsPush\"))\n\"\"\"\nfunction PetscOptionsPush(petsclib::PetscLibType, opt::PetscOptions) end\n\n@for_petsc function PetscOptionsPush(petsclib::$UnionPetscLib, opt::PetscOptions )\n\n    @chk ccall(\n               (:PetscOptionsPush, $petsc_library),\n               PetscErrorCode,\n               (COptions,),\n               opt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsPop(petsclib::PetscLibType) \nPop the most recent `PetscOptionsPush()` to return to the previous default options\n\nLogically Collective on whatever communicator was associated with the call to `PetscOptionsCreate()`\n\nLevel: advanced\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsInsert()`, `PetscOptionsSetValue()`, `PetscOptionsLeft()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsPop\"))\n\"\"\"\nfunction PetscOptionsPop(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsPop(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscOptionsPop, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsDestroyDefault(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsDestroyDefault\"))\n\"\"\"\nfunction PetscOptionsDestroyDefault(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsDestroyDefault(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscOptionsDestroyDefault, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalid::PetscBool = PetscOptionsValidKey(petsclib::PetscLibType,key::String) \nPETSc Options database keys must begin with one or two dashes (\n\nNot Collective\n\nInput Parameter:\n- `key` - string to check if valid\n\nOutput Parameter:\n- `valid` - `PETSC_TRUE` if a valid key\n\nLevel: intermediate\n\n-seealso: `PetscOptionsCreate()`, `PetscOptionsInsert()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsValidKey\"))\n\"\"\"\nfunction PetscOptionsValidKey(petsclib::PetscLibType, key::String) end\n\n@for_petsc function PetscOptionsValidKey(petsclib::$UnionPetscLib, key::String )\n\tvalid_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsValidKey, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscBool}),\n               key, valid_,\n              )\n\n\tvalid = valid_[]\n\n\treturn valid\nend \n\n\"\"\"\n\tPetscOptionsInsertString(petsclib::PetscLibType,options::PetscOptions, in_str::String) \nInserts options into the database from a string\n\nLogically Collective\n\nInput Parameters:\n- `options` - options object\n- `in_str`  - string that contains options separated by blanks\n\nLevel: intermediate\n\nThe collectivity of this routine is complex; only the MPI processes that call this routine will\nhave the affect of these options. If some processes that create objects call this routine and others do\nnot the code may fail in complicated ways because the same parallel solvers may incorrectly use different options\non different ranks.\n\nContributed by Boyana Norris\n\n-seealso: `PetscOptionsSetValue()`, `PetscOptionsView()`, `PetscOptionsHasName()`, `PetscOptionsGetInt()`,\n`PetscOptionsGetReal()`, `PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsInsertFile()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsInsertString\"))\n\"\"\"\nfunction PetscOptionsInsertString(petsclib::PetscLibType, options::PetscOptions, in_str::String) end\n\n@for_petsc function PetscOptionsInsertString(petsclib::$UnionPetscLib, options::PetscOptions, in_str::String )\n\n    @chk ccall(\n               (:PetscOptionsInsertString, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}),\n               options, in_str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsInsertFile(petsclib::PetscLibType,comm::MPI_Comm, options::PetscOptions, file::String, require::PetscBool) \nInserts options into the database from a file.\n\nCollective\n\nInput Parameters:\n- `comm`    - the processes that will share the options (usually `PETSC_COMM_WORLD`)\n- `options` - options database, use `NULL` for default global database\n- `file`    - name of file,\n\".yml\" and \".yaml\" filename extensions are inserted as YAML options,\nappend \":yaml\" to filename to force YAML options.\n- `require` - if `PETSC_TRUE` will generate an error if the file does not exist\n\nLevel: developer\n\n-seealso: `PetscOptionsSetValue()`, `PetscOptionsView()`, `PetscOptionsHasName()`, `PetscOptionsGetInt()`,\n`PetscOptionsGetReal()`, `PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsInsertFile\"))\n\"\"\"\nfunction PetscOptionsInsertFile(petsclib::PetscLibType, comm::MPI_Comm, options::PetscOptions, file::String, require::PetscBool) end\n\n@for_petsc function PetscOptionsInsertFile(petsclib::$UnionPetscLib, comm::MPI_Comm, options::PetscOptions, file::String, require::PetscBool )\n\n    @chk ccall(\n               (:PetscOptionsInsertFile, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, COptions, Ptr{Cchar}, PetscBool),\n               comm, options, file, require,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsInsertArgs(petsclib::PetscLibType,options::PetscOptions, argc::Cint, args::String) \nInserts options into the database from a array of strings\n\nLogically Collective\n\nInput Parameters:\n- `options` - options object\n- `argc`    - the array length\n- `args`    - the string array\n\nLevel: intermediate\n\n-seealso: `PetscOptions`, `PetscOptionsInsertString()`, `PetscOptionsInsertFile()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsInsertArgs\"))\n\"\"\"\nfunction PetscOptionsInsertArgs(petsclib::PetscLibType, options::PetscOptions, argc::Cint, args::String) end\n\n@for_petsc function PetscOptionsInsertArgs(petsclib::$UnionPetscLib, options::PetscOptions, argc::Cint, args::String )\n\targs_ = Ref(pointer(args))\n\n    @chk ccall(\n               (:PetscOptionsInsertArgs, $petsc_library),\n               PetscErrorCode,\n               (COptions, Cint, Ptr{Ptr{Cchar}}),\n               options, argc, args_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsInsert(petsclib::PetscLibType,options::PetscOptions, argc::Cint, args::Cchar, file::String) \nInserts into the options database from the command line,\nthe environmental variable and a file.\n\nCollective on `PETSC_COMM_WORLD`\n\nInput Parameters:\n- `options` - options database or `NULL` for the default global database\n- `argc`    - count of number of command line arguments\n- `args`    - the command line arguments\n- `file`    - [optional] PETSc database file, append \":yaml\" to filename to specify YAML options format.\nUse `NULL` or empty string to not check for code specific file.\nAlso checks ~/.petscrc, .petscrc and petscrc.\nUse -skip_petscrc in the code specific file (or command line) to skip ~/.petscrc, .petscrc and petscrc files.\n\nOptions Database Keys:\n- `-options_file <filename>`      - read options from a file\n- `-options_file_yaml <filename>` - read options from a YAML file\n\nLevel: advanced\n\n-seealso: `PetscOptionsDestroy()`, `PetscOptionsView()`, `PetscOptionsInsertString()`, `PetscOptionsInsertFile()`,\n`PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsInsert\"))\n\"\"\"\nfunction PetscOptionsInsert(petsclib::PetscLibType, options::PetscOptions, argc::Cint, args::Cchar, file::String) end\n\n@for_petsc function PetscOptionsInsert(petsclib::$UnionPetscLib, options::PetscOptions, argc::Cint, args::Cchar, file::String )\n\n    @chk ccall(\n               (:PetscOptionsInsert, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cint}, Cchar, Ptr{Cchar}),\n               options, argc, args, file,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsView(petsclib::PetscLibType,options::PetscOptions, viewer::PetscViewerFormat) \nPrints the options that have been loaded. This is\nuseful for debugging purposes.\n\nLogically Collective, No Fortran Support\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `viewer`  - must be an `PETSCVIEWERASCII` viewer, can be `PETSC_VIEWER_DEFAULT`\n\nOptions Database Key:\n- `-options_view` - Activates `PetscOptionsView()` within `PetscFinalize()`\n\nLevel: advanced\n\n-seealso: `PetscOptionsAllUsed()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsView\"))\n\"\"\"\nfunction PetscOptionsView(petsclib::PetscLibType, options::PetscOptions, viewer::PetscViewer) end\n\n@for_petsc function PetscOptionsView(petsclib::$UnionPetscLib, options::PetscOptions, viewer::PetscViewerFormat )\n\n    @chk ccall(\n               (:PetscOptionsView, $petsc_library),\n               PetscErrorCode,\n               (COptions, PetscViewerFormat),\n               options, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsLeftError(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsLeftError\"))\n\"\"\"\nfunction PetscOptionsLeftError(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsLeftError(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscOptionsLeftError, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsPrefixPush(petsclib::PetscLibType,options::PetscOptions, prefix::String) \nDesignate a prefix to be used by all options insertions to follow.\n\nLogically Collective\n\nInput Parameters:\n- `options` - options database, or `NULL` for the default global database\n- `prefix`  - The string to append to the existing prefix\n\nOptions Database Keys:\n- `-prefix_push <some_prefix_>` - push the given prefix\n- `-prefix_pop`                 - pop the last prefix\n\nLevel: advanced\n\n-seealso: `PetscOptionsPrefixPop()`, `PetscOptionsPush()`, `PetscOptionsPop()`, `PetscOptionsCreate()`, `PetscOptionsSetValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsPrefixPush\"))\n\"\"\"\nfunction PetscOptionsPrefixPush(petsclib::PetscLibType, options::PetscOptions, prefix::String) end\n\n@for_petsc function PetscOptionsPrefixPush(petsclib::$UnionPetscLib, options::PetscOptions, prefix::String )\n\n    @chk ccall(\n               (:PetscOptionsPrefixPush, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}),\n               options, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsPrefixPop(petsclib::PetscLibType,options::PetscOptions) \nRemove the latest options prefix, see `PetscOptionsPrefixPush()` for details\n\nLogically Collective on the `MPI_Comm` used when called `PetscOptionsPrefixPush()`\n\nInput Parameter:\n- `options` - options database, or `NULL` for the default global database\n\nLevel: advanced\n\n-seealso: `PetscOptionsPrefixPush()`, `PetscOptionsPush()`, `PetscOptionsPop()`, `PetscOptionsCreate()`, `PetscOptionsSetValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsPrefixPop\"))\n\"\"\"\nfunction PetscOptionsPrefixPop(petsclib::PetscLibType, options::PetscOptions) end\n\n@for_petsc function PetscOptionsPrefixPop(petsclib::$UnionPetscLib, options::PetscOptions )\n\n    @chk ccall(\n               (:PetscOptionsPrefixPop, $petsc_library),\n               PetscErrorCode,\n               (COptions,),\n               options,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsClear(petsclib::PetscLibType,options::PetscOptions) \nRemoves all options form the database leaving it empty.\n\nLogically Collective\n\nInput Parameter:\n- `options` - options database, use `NULL` for the default global database\n\nLevel: developer\n\n-seealso: `PetscOptionsInsert()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsClear\"))\n\"\"\"\nfunction PetscOptionsClear(petsclib::PetscLibType, options::PetscOptions) end\n\n@for_petsc function PetscOptionsClear(petsclib::$UnionPetscLib, options::PetscOptions )\n\n    @chk ccall(\n               (:PetscOptionsClear, $petsc_library),\n               PetscErrorCode,\n               (COptions,),\n               options,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsSetAlias(petsclib::PetscLibType,options::PetscOptions, newname::String, oldname::String) \nMakes a key and alias for another key\n\nLogically Collective\n\nInput Parameters:\n- `options` - options database, or `NULL` for default global database\n- `newname` - the alias\n- `oldname` - the name that alias will refer to\n\nLevel: advanced\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsSetAlias\"))\n\"\"\"\nfunction PetscOptionsSetAlias(petsclib::PetscLibType, options::PetscOptions, newname::String, oldname::String) end\n\n@for_petsc function PetscOptionsSetAlias(petsclib::$UnionPetscLib, options::PetscOptions, newname::String, oldname::String )\n\n    @chk ccall(\n               (:PetscOptionsSetAlias, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}),\n               options, newname, oldname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsSetValue(petsclib::PetscLibType,options::PetscOptions, name::String, value::Union{Ptr,String}) \nSets an option name\ndatabase, overriding whatever is already present.\n\nLogically Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for the default global database\n- `name`    - name of option, this SHOULD have the - prepended\n- `value`   - the option value (not used for all options, so can be `NULL`)\n\nLevel: intermediate\n\n-seealso: `PetscOptionsInsert()`, `PetscOptionsClearValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsSetValue\"))\n\"\"\"\nfunction PetscOptionsSetValue(petsclib::PetscLibType, options::PetscOptions, name::String, value::Union{Ptr,String}) end\n\n@for_petsc function PetscOptionsSetValue(petsclib::$UnionPetscLib, options::PetscOptions, name::String, value::Union{Ptr,String} )\n\n    @chk ccall(\n               (:PetscOptionsSetValue, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}),\n               options, name, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsClearValue(petsclib::PetscLibType,options::PetscOptions, name::String) \nClears an option name\ndatabase, overriding whatever is already present.\n\nLogically Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for the default global database\n- `name`    - name of option, this SHOULD have the - prepended\n\nLevel: intermediate\n\n-seealso: `PetscOptionsInsert()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsClearValue\"))\n\"\"\"\nfunction PetscOptionsClearValue(petsclib::PetscLibType, options::PetscOptions, name::String) end\n\n@for_petsc function PetscOptionsClearValue(petsclib::$UnionPetscLib, options::PetscOptions, name::String )\n\n    @chk ccall(\n               (:PetscOptionsClearValue, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}),\n               options, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tset::PetscBool = PetscOptionsFindPair(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String, value::String) \nGets an option name\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for the default global database\n- `pre`     - the string to prepend to the name or `NULL`, this SHOULD NOT have the \"-\" prepended\n- `name`    - name of option, this SHOULD have the \"-\" prepended\n\nOutput Parameters:\n- `value` - the option value (optional, not used for all options)\n- `set`   - whether the option is set (optional)\n\nLevel: developer\n\n-seealso: `PetscOptionsSetValue()`, `PetscOptionsClearValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsFindPair\"))\n\"\"\"\nfunction PetscOptionsFindPair(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String, value::String) end\n\n@for_petsc function PetscOptionsFindPair(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String, value::String )\n\tvalue_ = Ref(pointer(value))\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsFindPair, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{Ptr{Cchar}}, Ptr{PetscBool}),\n               options, pre, name, value_, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n\"\"\"\n\tPetscOptionsReject(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String, mess::String) \nGenerates an error if a certain option is given.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the option prefix (may be `NULL`)\n- `name`    - the option name one is seeking\n- `mess`    - error message (may be `NULL`)\n\nLevel: advanced\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsReject\"))\n\"\"\"\nfunction PetscOptionsReject(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String, mess::String) end\n\n@for_petsc function PetscOptionsReject(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String, mess::String )\n\n    @chk ccall(\n               (:PetscOptionsReject, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}),\n               options, pre, name, mess,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tset::PetscBool = PetscOptionsHasHelp(petsclib::PetscLibType,options::PetscOptions) \nDetermines whether the \"\n\nNot Collective\n\nInput Parameter:\n- `options` - options database, use `NULL` for default global database\n\nOutput Parameter:\n- `set` - `PETSC_TRUE` if found else `PETSC_FALSE`.\n\nLevel: advanced\n\n-seealso: `PetscOptionsHasName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsHasHelp\"))\n\"\"\"\nfunction PetscOptionsHasHelp(petsclib::PetscLibType, options::PetscOptions) end\n\n@for_petsc function PetscOptionsHasHelp(petsclib::$UnionPetscLib, options::PetscOptions )\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsHasHelp, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{PetscBool}),\n               options, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n\"\"\"\n\tset::PetscBool = PetscOptionsHasName(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nDetermines whether a certain option is given in the database. This returns true whether the option is a number, string or Boolean, even\nif its value is set to false.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to the name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameter:\n- `set` - `PETSC_TRUE` if found else `PETSC_FALSE`.\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,\n`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsHasName\"))\n\"\"\"\nfunction PetscOptionsHasName(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsHasName(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsHasName, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               options, pre, name, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n\"\"\"\n\tPetscOptionsGetAll(petsclib::PetscLibType,options::PetscOptions, copts::String) \nLists all the options the program was run with in a single string.\n\nNot Collective\n\nInput Parameter:\n- `options` - the options database, use `NULL` for the default global database\n\nOutput Parameter:\n- `copts` - pointer where string pointer is stored\n\nLevel: advanced\n\n-seealso: `PetscOptionsAllUsed()`, `PetscOptionsView()`, `PetscOptionsPush()`, `PetscOptionsPop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetAll\"))\n\"\"\"\nfunction PetscOptionsGetAll(petsclib::PetscLibType, options::PetscOptions, copts::String) end\n\n@for_petsc function PetscOptionsGetAll(petsclib::$UnionPetscLib, options::PetscOptions, copts::String )\n\tcopts_ = Ref(pointer(copts))\n\n    @chk ccall(\n               (:PetscOptionsGetAll, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Ptr{Cchar}}),\n               options, copts_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tused::PetscBool = PetscOptionsUsed(petsclib::PetscLibType,options::PetscOptions, name::String) \nIndicates if PETSc has used a particular option set in the database\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `name`    - string name of option\n\nOutput Parameter:\n- `used` - `PETSC_TRUE` if the option was used, otherwise false, including if option was not found in options database\n\nLevel: advanced\n\n-seealso: `PetscOptionsView()`, `PetscOptionsLeft()`, `PetscOptionsAllUsed()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsUsed\"))\n\"\"\"\nfunction PetscOptionsUsed(petsclib::PetscLibType, options::PetscOptions, name::String) end\n\n@for_petsc function PetscOptionsUsed(petsclib::$UnionPetscLib, options::PetscOptions, name::String )\n\tused_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsUsed, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{PetscBool}),\n               options, name, used_,\n              )\n\n\tused = used_[]\n\n\treturn used\nend \n\n\"\"\"\n\tN::PetscInt = PetscOptionsAllUsed(petsclib::PetscLibType,options::PetscOptions) \nReturns a count of the number of options in the\ndatabase that have never been selected.\n\nNot Collective\n\nInput Parameter:\n- `options` - options database, use `NULL` for default global database\n\nOutput Parameter:\n- `N` - count of options not used\n\nLevel: advanced\n\n-seealso: `PetscOptionsView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsAllUsed\"))\n\"\"\"\nfunction PetscOptionsAllUsed(petsclib::PetscLibType, options::PetscOptions) end\n\n@for_petsc function PetscOptionsAllUsed(petsclib::$UnionPetscLib, options::PetscOptions )\n\tN_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscOptionsAllUsed, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{$PetscInt}),\n               options, N_,\n              )\n\n\tN = N_[]\n\n\treturn N\nend \n\n\"\"\"\n\tPetscOptionsLeft(petsclib::PetscLibType,options::PetscOptions) \nPrints to screen any options that were set and never used.\n\nNot Collective\n\nInput Parameter:\n- `options` - options database; use `NULL` for default global database\n\nOptions Database Key:\n- `-options_left` - activates `PetscOptionsAllUsed()` within `PetscFinalize()`\n\nLevel: advanced\n\n-seealso: `PetscOptionsAllUsed()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsLeft\"))\n\"\"\"\nfunction PetscOptionsLeft(petsclib::PetscLibType, options::PetscOptions) end\n\n@for_petsc function PetscOptionsLeft(petsclib::$UnionPetscLib, options::PetscOptions )\n\n    @chk ccall(\n               (:PetscOptionsLeft, $petsc_library),\n               PetscErrorCode,\n               (COptions,),\n               options,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscInt = PetscOptionsLeftGet(petsclib::PetscLibType,options::PetscOptions, names::String, values::String) \nReturns all options that were set and never used.\n\nNot Collective\n\nInput Parameter:\n- `options` - options database, use `NULL` for default global database\n\nOutput Parameters:\n- `N`      - count of options not used\n- `names`  - names of options not used\n- `values` - values of options not used\n\nLevel: advanced\n\n-seealso: `PetscOptionsAllUsed()`, `PetscOptionsLeft()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsLeftGet\"))\n\"\"\"\nfunction PetscOptionsLeftGet(petsclib::PetscLibType, options::PetscOptions, names::String, values::String) end\n\n@for_petsc function PetscOptionsLeftGet(petsclib::$UnionPetscLib, options::PetscOptions, names::String, values::String )\n\tN_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscOptionsLeftGet, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{$PetscInt}, Ptr{Cchar}, Ptr{Cchar}),\n               options, N_, names, values,\n              )\n\n\tN = N_[]\n\n\treturn N\nend \n\n\"\"\"\n\tPetscOptionsLeftRestore(petsclib::PetscLibType,options::PetscOptions, N::PetscInt, names::String, values::String) \nFree memory for the unused PETSc options obtained using `PetscOptionsLeftGet()`.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `N`       - count of options not used\n- `names`   - names of options not used\n- `values`  - values of options not used\n\nLevel: advanced\n\n-seealso: `PetscOptionsAllUsed()`, `PetscOptionsLeft()`, `PetscOptionsLeftGet()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsLeftRestore\"))\n\"\"\"\nfunction PetscOptionsLeftRestore(petsclib::PetscLibType, options::PetscOptions, N::PetscInt, names::String, values::String) end\n\n@for_petsc function PetscOptionsLeftRestore(petsclib::$UnionPetscLib, options::PetscOptions, N::$PetscInt, names::String, values::String )\n\n    @chk ccall(\n               (:PetscOptionsLeftRestore, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{$PetscInt}, Ptr{Cchar}, Ptr{Cchar}),\n               options, N, names, values,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsMonitorDefault(petsclib::PetscLibType,name::String, value::String, source::PetscOptionSource, ctx::Cvoid) \nPrint all options set value events using the supplied `PetscViewer`.\n\nLogically Collective\n\nInput Parameters:\n- `name`   - option name string\n- `value`  - option value string\n- `source` - The source for the option\n- `ctx`    - a `PETSCVIEWERASCII` or `NULL`\n\nLevel: intermediate\n\n-seealso: `PetscOptionsMonitorSet()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsMonitorDefault\"))\n\"\"\"\nfunction PetscOptionsMonitorDefault(petsclib::PetscLibType, name::String, value::String, source::PetscOptionSource, ctx::Cvoid) end\n\n@for_petsc function PetscOptionsMonitorDefault(petsclib::$UnionPetscLib, name::String, value::String, source::PetscOptionSource, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscOptionsMonitorDefault, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, PetscOptionSource, Ptr{Cvoid}),\n               name, value, source, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsMonitorSet(petsclib::PetscLibType,monitor::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function to be called at every method that\nmodified the PETSc options database.\n\nNot Collective\n\nInput Parameters:\n- `monitor`        - pointer to function (if this is `NULL`, it turns off monitoring\n- `mctx`           - [optional] context for private data for the monitor routine (use `NULL` if\nno context is desired)\n- `monitordestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for its calling sequence\n\nCalling sequence of `monitor`:\n- `name`   - option name string\n- `value`  - option value string, a value of `NULL` indicates the option is being removed from the database. A value\nof \"\" indicates the option is in the database but has no value.\n- `source` - option source\n- `mctx`   - optional monitoring context, as set by `PetscOptionsMonitorSet()`\n\nOptions Database Keys:\n- `-options_monitor <viewer>` - turn on default monitoring of changes to the options database\n- `-options_monitor_cancel`   - turn off any option monitors except the default monitor obtained with `-options_monitor`\n\nLevel: intermediate\n\n-seealso: `PetscOptionsMonitorDefault()`, `PetscInitialize()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsMonitorSet\"))\n\"\"\"\nfunction PetscOptionsMonitorSet(petsclib::PetscLibType, monitor::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) end\n\n@for_petsc function PetscOptionsMonitorSet(petsclib::$UnionPetscLib, monitor::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:PetscOptionsMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               monitor, mctx, monitordestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::PetscBool = PetscOptionsStringToBool(petsclib::PetscLibType,value::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsStringToBool\"))\n\"\"\"\nfunction PetscOptionsStringToBool(petsclib::PetscLibType, value::String) end\n\n@for_petsc function PetscOptionsStringToBool(petsclib::$UnionPetscLib, value::String )\n\ta_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsStringToBool, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscBool}),\n               value, a_,\n              )\n\n\ta = a_[]\n\n\treturn a\nend \n\n\"\"\"\n\ta::PetscInt = PetscOptionsStringToInt(petsclib::PetscLibType,name::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsStringToInt\"))\n\"\"\"\nfunction PetscOptionsStringToInt(petsclib::PetscLibType, name::String) end\n\n@for_petsc function PetscOptionsStringToInt(petsclib::$UnionPetscLib, name::String )\n\ta_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscOptionsStringToInt, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{$PetscInt}),\n               name, a_,\n              )\n\n\ta = a_[]\n\n\treturn a\nend \n\n\"\"\"\n\ta::PetscReal = PetscOptionsStringToReal(petsclib::PetscLibType,name::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsStringToReal\"))\n\"\"\"\nfunction PetscOptionsStringToReal(petsclib::PetscLibType, name::String) end\n\n@for_petsc function PetscOptionsStringToReal(petsclib::$UnionPetscLib, name::String )\n\ta_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscOptionsStringToReal, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{$PetscReal}),\n               name, a_,\n              )\n\n\ta = a_[]\n\n\treturn a\nend \n\n\"\"\"\n\ta::PetscScalar = PetscOptionsStringToScalar(petsclib::PetscLibType,name::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsStringToScalar\"))\n\"\"\"\nfunction PetscOptionsStringToScalar(petsclib::PetscLibType, name::String) end\n\n@for_petsc function PetscOptionsStringToScalar(petsclib::$UnionPetscLib, name::String )\n\ta_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscOptionsStringToScalar, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{$PetscScalar}),\n               name, a_,\n              )\n\n\ta = a_[]\n\n\treturn a\nend \n\n\"\"\"\n\tivalue::PetscBool,set::PetscBool = PetscOptionsGetBool(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets the Logical (true or false) value for a particular\noption in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the string to prepend to the name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `ivalue` - the logical value to return\n- `set`    - `PETSC_TRUE`  if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetBool3()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetInt()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetBool\"))\n\"\"\"\nfunction PetscOptionsGetBool(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetBool(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tivalue_ = Ref{PetscBool}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetBool, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}, Ptr{PetscBool}),\n               options, pre, name, ivalue_, set_,\n              )\n\n\tivalue = ivalue_[]\n\tset = set_[]\n\n\treturn ivalue,set\nend \n\n\"\"\"\n\tset::PetscBool = PetscOptionsGetBool3(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String, ivalue::PetscBool3) \nGets the ternary logical (true, false or unknown) value for a particular\noption in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the string to prepend to the name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `ivalue` - the ternary logical value to return\n- `set`    - `PETSC_TRUE`  if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetBool()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetInt()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetBool3\"))\n\"\"\"\nfunction PetscOptionsGetBool3(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String, ivalue::PetscBool3) end\n\n@for_petsc function PetscOptionsGetBool3(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String, ivalue::PetscBool3 )\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetBool3, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool3}, Ptr{PetscBool}),\n               options, pre, name, ivalue, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n\"\"\"\n\tvalue::PetscInt,set::PetscBool = PetscOptionsGetEList(petsclib::PetscLibType,options::PetscOptions, pre::String, opt::String, list::String, ntext::PetscInt) \nPuts a list of option values that a single one may be selected from\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the string to prepend to the name or `NULL`\n- `opt`     - option name\n- `list`    - the possible choices (one of these must be selected, anything else is invalid)\n- `ntext`   - number of choices\n\nOutput Parameters:\n- `value` - the index of the value to return (defaults to zero if the option name is given but no choice is listed)\n- `set`   - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,\n`PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetEList\"))\n\"\"\"\nfunction PetscOptionsGetEList(petsclib::PetscLibType, options::PetscOptions, pre::String, opt::String, list::String, ntext::PetscInt) end\n\n@for_petsc function PetscOptionsGetEList(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, opt::String, list::String, ntext::$PetscInt )\n\tlist_ = Ref(pointer(list))\n\tvalue_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetEList, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{Ptr{Cchar}}, $PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, opt, list_, ntext, value_, set_,\n              )\n\n\tvalue = value_[]\n\tset = set_[]\n\n\treturn value,set\nend \n\n\"\"\"\n\tset::PetscBool = PetscOptionsGetEnum(petsclib::PetscLibType,options::PetscOptions, pre::String, opt::String, list::String, value::PetscEnum) \nGets the enum value for a particular option in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - option prefix or `NULL`\n- `opt`     - option name\n- `list`    - array containing the list of choices, followed by the enum name, followed by the enum prefix, followed by a null\n\nOutput Parameters:\n- `value` - the value to return\n- `set`   - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsGetEList()`, `PetscOptionsEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetEnum\"))\n\"\"\"\nfunction PetscOptionsGetEnum(petsclib::PetscLibType, options::PetscOptions, pre::String, opt::String, list::String, value::PetscEnum) end\n\n@for_petsc function PetscOptionsGetEnum(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, opt::String, list::String, value::PetscEnum )\n\tlist_ = Ref(pointer(list))\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetEnum, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{Ptr{Cchar}}, Ptr{PetscEnum}, Ptr{PetscBool}),\n               options, pre, opt, list_, value, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n\"\"\"\n\tivalue::PetscInt,set::PetscBool = PetscOptionsGetInt(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets the integer value for a particular option in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the string to prepend to the name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `ivalue` - the integer value to return\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetInt\"))\n\"\"\"\nfunction PetscOptionsGetInt(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetInt(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tivalue_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetInt, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, name, ivalue_, set_,\n              )\n\n\tivalue = ivalue_[]\n\tset = set_[]\n\n\treturn ivalue,set\nend \n\n\"\"\"\n\tset::PetscBool = PetscOptionsGetMPIInt(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String, ivalue::PetscMPIInt) \nGets the MPI integer value for a particular option in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - the string to prepend to the name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `ivalue` - the MPI integer value to return\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetMPIInt\"))\n\"\"\"\nfunction PetscOptionsGetMPIInt(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String, ivalue::PetscMPIInt) end\n\n@for_petsc function PetscOptionsGetMPIInt(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String, ivalue::PetscMPIInt )\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetMPIInt, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscMPIInt}, Ptr{PetscBool}),\n               options, pre, name, ivalue, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n\"\"\"\n\tdvalue::PetscReal,set::PetscBool = PetscOptionsGetReal(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets the double precision value for a particular\noption in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to each name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `dvalue` - the double value to return\n- `set`    - `PETSC_TRUE` if found, `PETSC_FALSE` if not found\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetReal\"))\n\"\"\"\nfunction PetscOptionsGetReal(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetReal(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tdvalue_ = Ref{$PetscReal}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetReal, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscReal}, Ptr{PetscBool}),\n               options, pre, name, dvalue_, set_,\n              )\n\n\tdvalue = dvalue_[]\n\tset = set_[]\n\n\treturn dvalue,set\nend \n\n\"\"\"\n\tdvalue::PetscScalar,set::PetscBool = PetscOptionsGetScalar(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets the scalar value for a particular\noption in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to each name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `dvalue` - the scalar value to return\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetScalar\"))\n\"\"\"\nfunction PetscOptionsGetScalar(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetScalar(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tdvalue_ = Ref{$PetscScalar}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetScalar, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscScalar}, Ptr{PetscBool}),\n               options, pre, name, dvalue_, set_,\n              )\n\n\tdvalue = dvalue_[]\n\tset = set_[]\n\n\treturn dvalue,set\nend \n\n\"\"\"\n\tstring::Union{Bool,String} = PetscOptionsGetString(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String, string::String, len::Csize_t) \nGets the string value for a particular option in\nthe database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to name or `NULL`\n- `name`    - the option one is seeking\n- `len`     - maximum length of the string including null termination\n\nOutput Parameters:\n- `string` - returns the value of the parameter ifn set, otherwise `false`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,\n`PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetString\"))\n\"\"\"\nfunction PetscOptionsGetString(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetString(petsclib::$UnionPetscLib, options::PetscOptions, pre::Union{Ptr,String}, name::String)\n\tset_ = Ref{PetscBool}()\n    val = Vector{UInt8}(undef, 256)\n\n    @chk ccall(\n               (:PetscOptionsGetString, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Csize_t, Ptr{PetscBool}),\n               options, pre, name, val, sizeof(val), set_,\n              )\n\n\tset = set_[]\n    if set\n        val = GC.@preserve val unsafe_string(pointer(val))\n    else\n        val = false\n    end\n  \n\n\treturn val\nend \n\n\"\"\"\n\tdvalue::Vector{PetscBool},nmax::PetscInt,set::PetscBool = PetscOptionsGetBoolArray(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets an array of Logical (true or false) values for a particular\noption in the database.  The values must be separated with commas with no intervening spaces.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to each name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `dvalue` - the Boolean values to return\n- `nmax`   - On input maximum number of values to retrieve, on output the actual number of values retrieved\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetBoolArray\"))\n\"\"\"\nfunction PetscOptionsGetBoolArray(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetBoolArray(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tdvalue = Vector{PetscBool}(undef, ni);  # CHECK SIZE!!\n\tnmax_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetBoolArray, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, name, dvalue, nmax_, set_,\n              )\n\n\tnmax = nmax_[]\n\tset = set_[]\n\n\treturn dvalue,nmax,set\nend \n\n\"\"\"\n\tnmax::PetscInt,set::PetscBool = PetscOptionsGetEnumArray(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String, list::String, ivalue::Vector{PetscEnum}) \nGets an array of enum values for a particular option in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - option prefix or `NULL`\n- `name`    - option name\n- `list`    - array containing the list of choices, followed by the enum name, followed by the enum prefix, followed by a null\n\nOutput Parameters:\n- `ivalue` - the  enum values to return\n- `nmax`   - On input maximum number of values to retrieve, on output the actual number of values retrieved\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,\n`PetscOptionsGetEnum()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsName()`,\n`PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`, `PetscOptionsStringArray()`, `PetscOptionsRealArray()`,\n`PetscOptionsScalar()`, `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsGetEList()`, `PetscOptionsEnum()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetEnumArray\"))\n\"\"\"\nfunction PetscOptionsGetEnumArray(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String, list::String, ivalue::Vector{PetscEnum}) end\n\n@for_petsc function PetscOptionsGetEnumArray(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String, list::String, ivalue::Vector{PetscEnum} )\n\tlist_ = Ref(pointer(list))\n\tnmax_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetEnumArray, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{Ptr{Cchar}}, Ptr{PetscEnum}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, name, list_, ivalue, nmax_, set_,\n              )\n\n\tnmax = nmax_[]\n\tset = set_[]\n\n\treturn nmax,set\nend \n\n\"\"\"\n\tivalue::Vector{PetscInt},nmax::PetscInt,set::PetscBool = PetscOptionsGetIntArray(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets an array of integer values for a particular option in the database.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to each name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `ivalue` - the integer values to return\n- `nmax`   - On input maximum number of values to retrieve, on output the actual number of values retrieved\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetIntArray\"))\n\"\"\"\nfunction PetscOptionsGetIntArray(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetIntArray(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tivalue = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tnmax_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetIntArray, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, name, ivalue, nmax_, set_,\n              )\n\n\tnmax = nmax_[]\n\tset = set_[]\n\n\treturn ivalue,nmax,set\nend \n\n\"\"\"\n\tdvalue::Vector{PetscReal},nmax::PetscInt,set::PetscBool = PetscOptionsGetRealArray(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets an array of double precision values for a\nparticular option in the database.  The values must be separated with commas with no intervening spaces.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to each name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `dvalue` - the double values to return\n- `nmax`   - On input maximum number of values to retrieve, on output the actual number of values retrieved\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetRealArray\"))\n\"\"\"\nfunction PetscOptionsGetRealArray(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetRealArray(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tdvalue = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tnmax_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetRealArray, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscReal}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, name, dvalue, nmax_, set_,\n              )\n\n\tnmax = nmax_[]\n\tset = set_[]\n\n\treturn dvalue,nmax,set\nend \n\n\"\"\"\n\tdvalue::Vector{PetscScalar},nmax::PetscInt,set::PetscBool = PetscOptionsGetScalarArray(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String) \nGets an array of scalars for a\nparticular option in the database.  The values must be separated with commas with no intervening spaces.\n\nNot Collective\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to each name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `dvalue` - the scalar values to return\n- `nmax`   - On input maximum number of values to retrieve, on output the actual number of values retrieved\n- `set`    - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsHasName()`,\n`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetScalarArray\"))\n\"\"\"\nfunction PetscOptionsGetScalarArray(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String) end\n\n@for_petsc function PetscOptionsGetScalarArray(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String )\n\tdvalue = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\tnmax_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetScalarArray, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscScalar}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, name, dvalue, nmax_, set_,\n              )\n\n\tnmax = nmax_[]\n\tset = set_[]\n\n\treturn dvalue,nmax,set\nend \n\n\"\"\"\n\tnmax::PetscInt,set::PetscBool = PetscOptionsGetStringArray(petsclib::PetscLibType,options::PetscOptions, pre::String, name::String, strings::String) \nGets an array of string values for a particular\noption in the database. The values must be separated with commas with no intervening spaces.\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `options` - options database, use `NULL` for default global database\n- `pre`     - string to prepend to name or `NULL`\n- `name`    - the option one is seeking\n\nOutput Parameters:\n- `strings` - location to copy strings\n- `nmax`    - On input maximum number of strings, on output the actual number of strings found\n- `set`     - `PETSC_TRUE` if found, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,\n`PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetStringArray\"))\n\"\"\"\nfunction PetscOptionsGetStringArray(petsclib::PetscLibType, options::PetscOptions, pre::String, name::String, strings::String) end\n\n@for_petsc function PetscOptionsGetStringArray(petsclib::$UnionPetscLib, options::PetscOptions, pre::String, name::String, strings::String )\n\tstrings_ = Ref(pointer(strings))\n\tnmax_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetStringArray, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, Ptr{Ptr{Cchar}}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               options, pre, name, strings_, nmax_, set_,\n              )\n\n\tnmax = nmax_[]\n\tset = set_[]\n\n\treturn nmax,set\nend \n\n\"\"\"\n\tflag::PetscBool = PetscOptionsGetenv(petsclib::PetscLibType,comm::MPI_Comm, name::String, env::String, len::Csize_t) \nGets an environmental variable, broadcasts to all\nprocessors in communicator from MPI rank zero\n\nCollective\n\nInput Parameters:\n- `comm` - communicator to share variable\n- `name` - name of environmental variable\n- `len`  - amount of space allocated to hold variable\n\nOutput Parameters:\n- `flag` - if not `NULL` indicates if the variable was found\n- `env`  - value of variable\n\nLevel: advanced\n\n-seealso: `PetscOptionsHasName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsGetenv\"))\n\"\"\"\nfunction PetscOptionsGetenv(petsclib::PetscLibType, comm::MPI_Comm, name::String, env::String, len::Csize_t) end\n\n@for_petsc function PetscOptionsGetenv(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, env::String, len::Csize_t )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetenv, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t, Ptr{PetscBool}),\n               comm, name, env, len, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tset::PetscBool = PetscOptionsGetVec(petsclib::PetscLibType,options::PetscOptions, prefix::String, key::String, v::PetscVec) \n\n# External Links\n$(_doc_external(\"Vec/PetscOptionsGetVec\"))\n\"\"\"\nfunction PetscOptionsGetVec(petsclib::PetscLibType, options::PetscOptions, prefix::String, key::String, v::PetscVec) end\n\n@for_petsc function PetscOptionsGetVec(petsclib::$UnionPetscLib, options::PetscOptions, prefix::String, key::String, v::PetscVec )\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsGetVec, $petsc_library),\n               PetscErrorCode,\n               (COptions, Ptr{Cchar}, Ptr{Cchar}, CVec, Ptr{PetscBool}),\n               options, prefix, key, v, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscPartitioner_wrappers.jl",
    "content": "\"\"\"\n\tPetscPartitionerRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new PetscPartitioner implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\n-seealso: `PetscPartitionerRegisterAll()`\n\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerRegister\"))\n\"\"\"\nfunction PetscPartitionerRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscPartitionerRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscPartitionerRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerFinalizePackage(petsclib::PetscLibType) \nThis function finalizes everything in the PetscPartitioner package.\nIt is called from PetscFinalize().\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerFinalizePackage\"))\n\"\"\"\nfunction PetscPartitionerFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscPartitionerFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscPartitionerFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the PetscPartitioner package.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerInitializePackage\"))\n\"\"\"\nfunction PetscPartitionerInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscPartitionerInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscPartitionerInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerSetType(petsclib::PetscLibType,part::PetscPartitioner, name::PetscPartitionerType) \nBuilds a particular `PetscPartitioner`\n\nCollective\n\nInput Parameters:\n- `part` - The `PetscPartitioner` object\n- `name` - The kind of partitioner\n\nOptions Database Key:\n- `-petscpartitioner_type <type>` - Sets the `PetscPartitioner` type\n\nLevel: intermediate\n\n-seealso: `PetscPartitionerGetType()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerSetType\"))\n\"\"\"\nfunction PetscPartitionerSetType(petsclib::PetscLibType, part::PetscPartitioner, name::PetscPartitionerType) end\n\n@for_petsc function PetscPartitionerSetType(petsclib::$UnionPetscLib, part::PetscPartitioner, name::PetscPartitionerType )\n\n    @chk ccall(\n               (:PetscPartitionerSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, PetscPartitionerType),\n               part, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscPartitionerType = PetscPartitionerGetType(petsclib::PetscLibType,part::PetscPartitioner) \nGets the PetscPartitioner type name (as a string) from the object.\n\nNot Collective\n\nInput Parameter:\n- `part` - The PetscPartitioner\n\nOutput Parameter:\n- `name` - The PetscPartitioner type name\n\nLevel: intermediate\n\n-seealso: `PetscPartitionerSetType()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerGetType\"))\n\"\"\"\nfunction PetscPartitionerGetType(petsclib::PetscLibType, part::PetscPartitioner) end\n\n@for_petsc function PetscPartitionerGetType(petsclib::$UnionPetscLib, part::PetscPartitioner )\n\tname_ = Ref{PetscPartitionerType}()\n\n    @chk ccall(\n               (:PetscPartitionerGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, Ptr{PetscPartitionerType}),\n               part, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\tPetscPartitionerViewFromOptions(petsclib::PetscLibType,A::PetscPartitioner, obj::PetscObject, name::String) \nView a `PetscPartitioner` object based on options in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscPartitioner` object\n- `obj`  - Optional `PetscObject` that provides the options prefix\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: `PetscPartitionerView()`, `PetscObjectViewFromOptions()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerViewFromOptions\"))\n\"\"\"\nfunction PetscPartitionerViewFromOptions(petsclib::PetscLibType, A::PetscPartitioner, obj::PetscObject, name::String) end\n\n@for_petsc function PetscPartitionerViewFromOptions(petsclib::$UnionPetscLib, A::PetscPartitioner, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscPartitionerViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerView(petsclib::PetscLibType,part::PetscPartitioner, v::PetscViewer) \nViews a `PetscPartitioner`\n\nCollective\n\nInput Parameters:\n- `part` - the `PetscPartitioner` object to view\n- `v`    - the viewer\n\nLevel: developer\n\n-seealso: `PetscPartitionerDestroy()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerView\"))\n\"\"\"\nfunction PetscPartitionerView(petsclib::PetscLibType, part::PetscPartitioner, v::PetscViewer) end\n\n@for_petsc function PetscPartitionerView(petsclib::$UnionPetscLib, part::PetscPartitioner, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscPartitionerView, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, PetscViewer),\n               part, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerSetFromOptions(petsclib::PetscLibType,part::PetscPartitioner) \nsets parameters in a `PetscPartitioner` from the options database\n\nCollective\n\nInput Parameter:\n- `part` - the `PetscPartitioner` object to set options for\n\nOptions Database Keys:\n- `-petscpartitioner_type <type>`        - Sets the `PetscPartitioner` type; use -help for a list of available types\n- `-petscpartitioner_use_vertex_weights` - Uses weights associated with the graph vertices\n- `-petscpartitioner_view_graph`         - View the graph each time PetscPartitionerPartition is called. Viewer can be customized, see `PetscOptionsCreateViewer()`\n\nLevel: developer\n\n-seealso: `PetscPartitionerView()`, `PetscPartitionerSetType()`, `PetscPartitionerPartition()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerSetFromOptions\"))\n\"\"\"\nfunction PetscPartitionerSetFromOptions(petsclib::PetscLibType, part::PetscPartitioner) end\n\n@for_petsc function PetscPartitionerSetFromOptions(petsclib::$UnionPetscLib, part::PetscPartitioner )\n\n    @chk ccall(\n               (:PetscPartitionerSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner,),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerSetUp(petsclib::PetscLibType,part::PetscPartitioner) \nConstruct data structures for the `PetscPartitioner`\n\nCollective\n\nInput Parameter:\n- `part` - the `PetscPartitioner` object to setup\n\nLevel: developer\n\n-seealso: `PetscPartitionerView()`, `PetscPartitionerDestroy()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerSetUp\"))\n\"\"\"\nfunction PetscPartitionerSetUp(petsclib::PetscLibType, part::PetscPartitioner) end\n\n@for_petsc function PetscPartitionerSetUp(petsclib::$UnionPetscLib, part::PetscPartitioner )\n\n    @chk ccall(\n               (:PetscPartitionerSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner,),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerReset(petsclib::PetscLibType,part::PetscPartitioner) \nResets data structures for the `PetscPartitioner`\n\nCollective\n\nInput Parameter:\n- `part` - the `PetscPartitioner` object to reset\n\nLevel: developer\n\n-seealso: `PetscPartitionerSetUp()`, `PetscPartitionerDestroy()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerReset\"))\n\"\"\"\nfunction PetscPartitionerReset(petsclib::PetscLibType, part::PetscPartitioner) end\n\n@for_petsc function PetscPartitionerReset(petsclib::$UnionPetscLib, part::PetscPartitioner )\n\n    @chk ccall(\n               (:PetscPartitionerReset, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner,),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerDestroy(petsclib::PetscLibType,part::PetscPartitioner) \nDestroys a `PetscPartitioner` object\n\nCollective\n\nInput Parameter:\n- `part` - the `PetscPartitioner` object to destroy\n\nLevel: developer\n\n-seealso: `PetscPartitionerView()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerDestroy\"))\n\"\"\"\nfunction PetscPartitionerDestroy(petsclib::PetscLibType, part::PetscPartitioner) end\n\n@for_petsc function PetscPartitionerDestroy(petsclib::$UnionPetscLib, part::PetscPartitioner )\n\n    @chk ccall(\n               (:PetscPartitionerDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscPartitioner},),\n               part,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerPartition(petsclib::PetscLibType,part::PetscPartitioner, nparts::PetscInt, numVertices::PetscInt, start::Vector{PetscInt}, adjacency::Vector{PetscInt}, vertexSection::PetscSection, edgeSection::PetscSection, targetSection::PetscSection, partSection::PetscSection, partition::IS) \nPartition a graph\n\nCollective\n\nInput Parameters:\n- `part`          - The `PetscPartitioner`\n- `nparts`        - Number of partitions\n- `numVertices`   - Number of vertices in the local part of the graph\n- `start`         - row pointers for the local part of the graph (CSR style)\n- `adjacency`     - adjacency list (CSR style)\n- `vertexSection` - PetscSection describing the absolute weight of each local vertex (can be `NULL`)\n- `edgeSection`   - PetscSection describing the absolute weight of each local edge (can be `NULL`)\n- `targetSection` - PetscSection describing the absolute weight of each partition (can be `NULL`)\n\nOutput Parameters:\n- `partSection` - The `PetscSection` giving the division of points by partition\n- `partition`   - The list of points by partition\n\nOptions Database Keys:\n- `-petscpartitioner_view`       - View the partitioner information\n- `-petscpartitioner_view_graph` - View the graph we are partitioning\n\nLevel: developer\n\n-seealso: `PetscPartitionerCreate()`, `PetscPartitionerSetType()`, `PetscSectionCreate()`, `PetscSectionSetChart()`, `PetscSectionSetDof()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerPartition\"))\n\"\"\"\nfunction PetscPartitionerPartition(petsclib::PetscLibType, part::PetscPartitioner, nparts::PetscInt, numVertices::PetscInt, start::Vector{PetscInt}, adjacency::Vector{PetscInt}, vertexSection::PetscSection, edgeSection::PetscSection, targetSection::PetscSection, partSection::PetscSection, partition::IS) end\n\n@for_petsc function PetscPartitionerPartition(petsclib::$UnionPetscLib, part::PetscPartitioner, nparts::$PetscInt, numVertices::$PetscInt, start::Vector{$PetscInt}, adjacency::Vector{$PetscInt}, vertexSection::PetscSection, edgeSection::PetscSection, targetSection::PetscSection, partSection::PetscSection, partition::IS )\n\tpartition_ = Ref(partition.ptr)\n\n    @chk ccall(\n               (:PetscPartitionerPartition, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, PetscSection, PetscSection, PetscSection, PetscSection, Ptr{CIS}),\n               part, nparts, numVertices, start, adjacency, vertexSection, edgeSection, targetSection, partSection, partition_,\n              )\n\n\tpartition.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tpart::PetscPartitioner = PetscPartitionerCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscPartitioner` object. The type can then be set with `PetscPartitionerSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscPartitioner` object\n\nOutput Parameter:\n- `part` - The `PetscPartitioner` object\n\nLevel: beginner\n\n-seealso: `PetscPartitionerSetType()`, `PetscPartitionerDestroy()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerCreate\"))\n\"\"\"\nfunction PetscPartitionerCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscPartitionerCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tpart_ = Ref{PetscPartitioner}()\n\n    @chk ccall(\n               (:PetscPartitionerCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscPartitioner}),\n               comm, part_,\n              )\n\n\tpart = part_[]\n\n\treturn part\nend \n\n\"\"\"\n\tPetscPartitionerShellSetPartition(petsclib::PetscLibType,part::PetscPartitioner, size::PetscInt, sizes::Vector{PetscInt}, points::Vector{PetscInt}) \nSet an artificial partition for a mesh\n\nCollective\n\nInput Parameters:\n- `part`   - The `PetscPartitioner`\n- `size`   - The number of partitions\n- `sizes`  - array of length size (or `NULL`) providing the number of points in each partition\n- `points` - array of length sum(sizes) (may be `NULL` iff sizes is `NULL`), a permutation of the points that groups those assigned to each partition in order (i.e., partition 0 first, partition 1 next, etc.)\n\nLevel: developer\n\n-seealso: `DMPlexDistribute()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerShellSetPartition\"))\n\"\"\"\nfunction PetscPartitionerShellSetPartition(petsclib::PetscLibType, part::PetscPartitioner, size::PetscInt, sizes::Vector{PetscInt}, points::Vector{PetscInt}) end\n\n@for_petsc function PetscPartitionerShellSetPartition(petsclib::$UnionPetscLib, part::PetscPartitioner, size::$PetscInt, sizes::Vector{$PetscInt}, points::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscPartitionerShellSetPartition, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               part, size, sizes, points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerShellSetRandom(petsclib::PetscLibType,part::PetscPartitioner, random::PetscBool) \nSet the flag to use a random partition\n\nCollective\n\nInput Parameters:\n- `part`   - The `PetscPartitioner`\n- `random` - The flag to use a random partition\n\nLevel: intermediate\n\n-seealso: `PetscPartitionerShellGetRandom()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerShellSetRandom\"))\n\"\"\"\nfunction PetscPartitionerShellSetRandom(petsclib::PetscLibType, part::PetscPartitioner, random::PetscBool) end\n\n@for_petsc function PetscPartitionerShellSetRandom(petsclib::$UnionPetscLib, part::PetscPartitioner, random::PetscBool )\n\n    @chk ccall(\n               (:PetscPartitionerShellSetRandom, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, PetscBool),\n               part, random,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trandom::PetscBool = PetscPartitionerShellGetRandom(petsclib::PetscLibType,part::PetscPartitioner) \nget the flag to use a random partition\n\nCollective\n\nInput Parameter:\n- `part` - The `PetscPartitioner`\n\nOutput Parameter:\n- `random` - The flag to use a random partition\n\nLevel: intermediate\n\n-seealso: `PetscPartitionerShellSetRandom()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerShellGetRandom\"))\n\"\"\"\nfunction PetscPartitionerShellGetRandom(petsclib::PetscLibType, part::PetscPartitioner) end\n\n@for_petsc function PetscPartitionerShellGetRandom(petsclib::$UnionPetscLib, part::PetscPartitioner )\n\trandom_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscPartitionerShellGetRandom, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, Ptr{PetscBool}),\n               part, random_,\n              )\n\n\trandom = random_[]\n\n\treturn random\nend \n\n\"\"\"\n\tPetscPartitionerMatPartitioningGetMatPartitioning(petsclib::PetscLibType,part::PetscPartitioner, mp::MatPartitioning) \nGet a `MatPartitioning` instance wrapped by this `PetscPartitioner`.\n\nNot Collective\n\nInput Parameter:\n- `part` - The `PetscPartitioner`\n\nOutput Parameter:\n- `mp` - The `MatPartitioning`\n\nLevel: developer\n\n-seealso: `DMPlexDistribute()`, `PetscPartitionerCreate()`\n\n# External Links\n$(_doc_external(\"Mat/PetscPartitionerMatPartitioningGetMatPartitioning\"))\n\"\"\"\nfunction PetscPartitionerMatPartitioningGetMatPartitioning(petsclib::PetscLibType, part::PetscPartitioner, mp::MatPartitioning) end\n\n@for_petsc function PetscPartitionerMatPartitioningGetMatPartitioning(petsclib::$UnionPetscLib, part::PetscPartitioner, mp::MatPartitioning )\n\n    @chk ccall(\n               (:PetscPartitionerMatPartitioningGetMatPartitioning, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, Ptr{MatPartitioning}),\n               part, mp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPartitionerDMPlexPartition(petsclib::PetscLibType,part::PetscPartitioner, dm::PetscDM, targetSection::PetscSection, partSection::PetscSection, partition::IS) \nCreate a non\n\nCollective\n\nInput Parameters:\n- `part`          - The `PetscPartitioner`\n- `targetSection` - The `PetscSection` describing the absolute weight of each partition (can be `NULL`)\n- `dm`            - The mesh `DM`\n\nOutput Parameters:\n- `partSection` - The `PetscSection` giving the division of points by partition\n- `partition`   - The list of points by partition\n\nLevel: developer\n\n-seealso: [](ch_unstructured), `DM`, `DMPLEX`, `PetscPartitioner`, `PetscSection`, `DMPlexDistribute()`, `PetscPartitionerCreate()`, `PetscSectionCreate()`,\n`PetscSectionSetChart()`, `PetscPartitionerPartition()`\n\n# External Links\n$(_doc_external(\"DM/PetscPartitionerDMPlexPartition\"))\n\"\"\"\nfunction PetscPartitionerDMPlexPartition(petsclib::PetscLibType, part::PetscPartitioner, dm::PetscDM, targetSection::PetscSection, partSection::PetscSection, partition::IS) end\n\n@for_petsc function PetscPartitionerDMPlexPartition(petsclib::$UnionPetscLib, part::PetscPartitioner, dm::PetscDM, targetSection::PetscSection, partSection::PetscSection, partition::IS )\n\tpartition_ = Ref(partition.ptr)\n\n    @chk ccall(\n               (:PetscPartitionerDMPlexPartition, $petsc_library),\n               PetscErrorCode,\n               (PetscPartitioner, CDM, PetscSection, PetscSection, Ptr{CIS}),\n               part, dm, targetSection, partSection, partition_,\n              )\n\n\tpartition.ptr = C_NULL\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscRandom_wrappers.jl",
    "content": "\"\"\"\n\tPetscRandomDestroy(petsclib::PetscLibType,r::PetscRandom) \nDestroys a `PetscRandom` object that was created by `PetscRandomCreate()`.\n\nCollective\n\nInput Parameter:\n- `r` - the random number generator object\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomGetValue()`, `PetscRandomCreate()`, `VecSetRandom()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomDestroy\"))\n\"\"\"\nfunction PetscRandomDestroy(petsclib::PetscLibType, r::PetscRandom) end\n\n@for_petsc function PetscRandomDestroy(petsclib::$UnionPetscLib, r::PetscRandom )\n\n    @chk ccall(\n               (:PetscRandomDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscRandom},),\n               r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomGetSeed(petsclib::PetscLibType,r::PetscRandom, seed::PetscInt64) \nGets the random seed.\n\nNot collective\n\nInput Parameter:\n- `r` - The random number generator context\n\nOutput Parameter:\n- `seed` - The random seed\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomSetSeed()`, `PetscRandomSeed()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomGetSeed\"))\n\"\"\"\nfunction PetscRandomGetSeed(petsclib::PetscLibType, r::PetscRandom, seed::PetscInt64) end\n\n@for_petsc function PetscRandomGetSeed(petsclib::$UnionPetscLib, r::PetscRandom, seed::$PetscInt64 )\n\n    @chk ccall(\n               (:PetscRandomGetSeed, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, Ptr{$PetscInt64}),\n               r, seed,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomSetSeed(petsclib::PetscLibType,r::PetscRandom, seed::PetscInt64) \nSets the random seed. You MUST call `PetscRandomSeed()` after this call to have the new seed used.\n\nNot collective\n\nInput Parameters:\n- `r`    - The random number generator context\n- `seed` - The random seed\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomGetSeed()`, `PetscRandomSeed()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomSetSeed\"))\n\"\"\"\nfunction PetscRandomSetSeed(petsclib::PetscLibType, r::PetscRandom, seed::PetscInt64) end\n\n@for_petsc function PetscRandomSetSeed(petsclib::$UnionPetscLib, r::PetscRandom, seed::$PetscInt64 )\n\n    @chk ccall(\n               (:PetscRandomSetSeed, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, $PetscInt64),\n               r, seed,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomSetFromOptions(petsclib::PetscLibType,rnd::PetscRandom) \nConfigures the random number generator from the options database.\n\nCollective\n\nInput Parameter:\n- `rnd` - The random number generator context\n\nOptions Database Keys:\n- `-random_seed <integer>`    - provide a seed to the random number generator\n- `-random_no_imaginary_part` - makes the imaginary part of the random number zero, this is useful when you want the\nsame code to produce the same result when run with real numbers or complex numbers for regression testing purposes\n\nLevel: beginner\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomSetFromOptions\"))\n\"\"\"\nfunction PetscRandomSetFromOptions(petsclib::PetscLibType, rnd::PetscRandom) end\n\n@for_petsc function PetscRandomSetFromOptions(petsclib::$UnionPetscLib, rnd::PetscRandom )\n\n    @chk ccall(\n               (:PetscRandomSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom,),\n               rnd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomSetOptionsPrefix(petsclib::PetscLibType,r::PetscRandom, prefix::String) \nSets the prefix used for searching for all\n`PetscRandom` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `r`      - the random number generator context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: `PetscRandom`, `PetscRandomSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomSetOptionsPrefix\"))\n\"\"\"\nfunction PetscRandomSetOptionsPrefix(petsclib::PetscLibType, r::PetscRandom, prefix::String) end\n\n@for_petsc function PetscRandomSetOptionsPrefix(petsclib::$UnionPetscLib, r::PetscRandom, prefix::String )\n\n    @chk ccall(\n               (:PetscRandomSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, Ptr{Cchar}),\n               r, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomViewFromOptions(petsclib::PetscLibType,A::PetscRandom, obj::PetscObject, name::String) \nView a `PetscRandom` object based on the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the random number generator context\n- `obj`  - Optional object\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomView`, `PetscObjectViewFromOptions()`, `PetscRandomCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomViewFromOptions\"))\n\"\"\"\nfunction PetscRandomViewFromOptions(petsclib::PetscLibType, A::PetscRandom, obj::PetscObject, name::String) end\n\n@for_petsc function PetscRandomViewFromOptions(petsclib::$UnionPetscLib, A::PetscRandom, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscRandomViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomView(petsclib::PetscLibType,rnd::PetscRandom, viewer::PetscViewer) \nViews a random number generator object.\n\nCollective\n\nInput Parameters:\n- `rnd`    - The random number generator context\n- `viewer` - an optional visualization context\n\nLevel: beginner\n\n-seealso: `PetscRandom`, `PetscRealView()`, `PetscScalarView()`, `PetscIntView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomView\"))\n\"\"\"\nfunction PetscRandomView(petsclib::PetscLibType, rnd::PetscRandom, viewer::PetscViewer) end\n\n@for_petsc function PetscRandomView(petsclib::$UnionPetscLib, rnd::PetscRandom, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscRandomView, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, PetscViewer),\n               rnd, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tr::PetscRandom = PetscRandomCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an object for generating random numbers,\nand initializes the random-number generator.\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `r` - the random number generator object\n\nLevel: intermediate\n\n-seealso: `PetscRandomSetType()`, `PetscRandomGetValue()`, `PetscRandomGetValueReal()`, `PetscRandomSetInterval()`,\n`PetscRandomDestroy()`, `VecSetRandom()`, `PetscRandomType`, `PetscRandom`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomCreate\"))\n\"\"\"\nfunction PetscRandomCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscRandomCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tr_ = Ref{PetscRandom}()\n\n    @chk ccall(\n               (:PetscRandomCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscRandom}),\n               comm, r_,\n              )\n\n\tr = r_[]\n\n\treturn r\nend \n\n\"\"\"\n\tPetscRandomSeed(petsclib::PetscLibType,r::PetscRandom) \nSeed the random number generator.\n\nNot collective\n\nInput Parameter:\n- `r` - The random number generator context\n\nLevel: intermediate\n\n-seealso: `PetscRandomCreate()`, `PetscRandomGetSeed()`, `PetscRandomSetSeed()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomSeed\"))\n\"\"\"\nfunction PetscRandomSeed(petsclib::PetscLibType, r::PetscRandom) end\n\n@for_petsc function PetscRandomSeed(petsclib::$UnionPetscLib, r::PetscRandom )\n\n    @chk ccall(\n               (:PetscRandomSeed, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom,),\n               r,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomSetType(petsclib::PetscLibType,rnd::PetscRandom, type::PetscRandomType) \nBuilds a context for generating a particular type of random numbers.\n\nCollective\n\nInput Parameters:\n- `rnd`  - The random number generator context\n- `type` - The name of the random type\n\nOptions Database Key:\n- `-random_type <type>` - Sets the random type; use -help for a list\nof available types\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomType`, `PetscRandomGetType()`, `PetscRandomCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomSetType\"))\n\"\"\"\nfunction PetscRandomSetType(petsclib::PetscLibType, rnd::PetscRandom, type::PetscRandomType) end\n\n@for_petsc function PetscRandomSetType(petsclib::$UnionPetscLib, rnd::PetscRandom, type::PetscRandomType )\n\n    @chk ccall(\n               (:PetscRandomSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, PetscRandomType),\n               rnd, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscRandomType = PetscRandomGetType(petsclib::PetscLibType,rnd::PetscRandom) \nGets the type name (as a string) from the `PetscRandom`.\n\nNot Collective\n\nInput Parameter:\n- `rnd` - The random number generator context\n\nOutput Parameter:\n- `type` - The type name\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomType`, `PetscRandomSetType()`, `PetscRandomCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomGetType\"))\n\"\"\"\nfunction PetscRandomGetType(petsclib::PetscLibType, rnd::PetscRandom) end\n\n@for_petsc function PetscRandomGetType(petsclib::$UnionPetscLib, rnd::PetscRandom )\n\ttype_ = Ref{PetscRandomType}()\n\n    @chk ccall(\n               (:PetscRandomGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, Ptr{PetscRandomType}),\n               rnd, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscRandomRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `PetscRandom` implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\nLevel: advanced\n\n-seealso: `PetscRandom`, `PetscRandomRegisterAll()`, `PetscRandomRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomRegister\"))\n\"\"\"\nfunction PetscRandomRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscRandomRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscRandomRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tval::PetscScalar = PetscRandomGetValue(petsclib::PetscLibType,r::PetscRandom) \nGenerates a random number.  Call this after first calling\n`PetscRandomCreate()`.\n\nNot Collective\n\nInput Parameter:\n- `r` - the random number generator context\n\nOutput Parameter:\n- `val` - the value\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomDestroy()`, `VecSetRandom()`, `PetscRandomGetValueReal()`, `PetscRandomSetInterval()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomGetValue\"))\n\"\"\"\nfunction PetscRandomGetValue(petsclib::PetscLibType, r::PetscRandom) end\n\n@for_petsc function PetscRandomGetValue(petsclib::$UnionPetscLib, r::PetscRandom )\n\tval_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscRandomGetValue, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, Ptr{$PetscScalar}),\n               r, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tval::PetscReal = PetscRandomGetValueReal(petsclib::PetscLibType,r::PetscRandom) \nGenerates a real random number.  Call this after first calling\n`PetscRandomCreate()`.\n\nNot Collective\n\nInput Parameter:\n- `r` - the random number generator context\n\nOutput Parameter:\n- `val` - the value\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomDestroy()`, `VecSetRandom()`, `PetscRandomGetValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomGetValueReal\"))\n\"\"\"\nfunction PetscRandomGetValueReal(petsclib::PetscLibType, r::PetscRandom) end\n\n@for_petsc function PetscRandomGetValueReal(petsclib::$UnionPetscLib, r::PetscRandom )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscRandomGetValueReal, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, Ptr{$PetscReal}),\n               r, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tval::PetscScalar = PetscRandomGetValues(petsclib::PetscLibType,r::PetscRandom, n::PetscInt) \nGenerates a sequence of random numbers.  Call this after first calling\n`PetscRandomCreate()`.\n\nNot Collective\n\nInput Parameters:\n- `r` - the random number generator context\n- `n` - number of random numbers to generate\n\nOutput Parameter:\n- `val` - the array to hold the values\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomDestroy()`, `VecSetRandom()`, `PetscRandomGetValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomGetValues\"))\n\"\"\"\nfunction PetscRandomGetValues(petsclib::PetscLibType, r::PetscRandom, n::PetscInt) end\n\n@for_petsc function PetscRandomGetValues(petsclib::$UnionPetscLib, r::PetscRandom, n::$PetscInt )\n\tval_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscRandomGetValues, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, $PetscInt, Ptr{$PetscScalar}),\n               r, n, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tval::PetscReal = PetscRandomGetValuesReal(petsclib::PetscLibType,r::PetscRandom, n::PetscInt) \nGenerates a sequence of real random numbers.  Call this after first calling\n`PetscRandomCreate()`.\n\nNot Collective\n\nInput Parameters:\n- `r` - the random number generator context\n- `n` - number of random numbers to generate\n\nOutput Parameter:\n- `val` - the array to hold the values\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomDestroy()`, `VecSetRandom()`, `PetscRandomGetValues()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomGetValuesReal\"))\n\"\"\"\nfunction PetscRandomGetValuesReal(petsclib::PetscLibType, r::PetscRandom, n::PetscInt) end\n\n@for_petsc function PetscRandomGetValuesReal(petsclib::$UnionPetscLib, r::PetscRandom, n::$PetscInt )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscRandomGetValuesReal, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, $PetscInt, Ptr{$PetscReal}),\n               r, n, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tlow::PetscScalar,high::PetscScalar = PetscRandomGetInterval(petsclib::PetscLibType,r::PetscRandom) \nGets the interval over which the random numbers\nwill be distributed.  By default, this interval is [0,1).\n\nNot Collective\n\nInput Parameter:\n- `r` - the random number generator context\n\nOutput Parameters:\n- `low`  - The lower bound of the interval\n- `high` - The upper bound of the interval\n\nLevel: intermediate\n\n-seealso: `PetscRandom`, `PetscRandomCreate()`, `PetscRandomSetInterval()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomGetInterval\"))\n\"\"\"\nfunction PetscRandomGetInterval(petsclib::PetscLibType, r::PetscRandom) end\n\n@for_petsc function PetscRandomGetInterval(petsclib::$UnionPetscLib, r::PetscRandom )\n\tlow_ = Ref{$PetscScalar}()\n\thigh_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscRandomGetInterval, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               r, low_, high_,\n              )\n\n\tlow = low_[]\n\thigh = high_[]\n\n\treturn low,high\nend \n\n\"\"\"\n\tPetscRandomSetInterval(petsclib::PetscLibType,r::PetscRandom, low::PetscScalar, high::PetscScalar) \nSets the interval over which the random numbers\nwill be distributed.  By default, this interval is [0,1).\n\nNot Collective\n\nInput Parameters:\n- `r`    - the random number generator context\n- `low`  - The lower bound of the interval\n- `high` - The upper bound of the interval\n\nLevel: intermediate\n\n-seealso: `PetscRandomCreate()`, `PetscRandomGetInterval()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomSetInterval\"))\n\"\"\"\nfunction PetscRandomSetInterval(petsclib::PetscLibType, r::PetscRandom, low::PetscScalar, high::PetscScalar) end\n\n@for_petsc function PetscRandomSetInterval(petsclib::$UnionPetscLib, r::PetscRandom, low::$PetscScalar, high::$PetscScalar )\n\n    @chk ccall(\n               (:PetscRandomSetInterval, $petsc_library),\n               PetscErrorCode,\n               (PetscRandom, $PetscScalar, $PetscScalar),\n               r, low, high,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomFinalizePackage(petsclib::PetscLibType) \nThis function frees everything in the `PetscRandom` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomFinalizePackage\"))\n\"\"\"\nfunction PetscRandomFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscRandomFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscRandomFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRandomInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscRandom` package. It is called\nfrom PetscDLLibraryRegister_petsc() when using dynamic libraries, and on the first call to `PetscRandomCreate()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRandomInitializePackage\"))\n\"\"\"\nfunction PetscRandomInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscRandomInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscRandomInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscRegressor_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscRegressor end\nconst PetscRegressor = Ptr{_n_PetscRegressor}\n# -------------------------------------------------------\n\"\"\"\n\tPetscRegressorRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a method to the `PetscRegressor` package.\n\nNot collective\n\nInput Parameters:\n- `sname`    - name of a new user-defined regressor\n- `function` - routine to create method context\n\n-seealso: `PetscRegressorRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorRegister\"))\n\"\"\"\nfunction PetscRegressorRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscRegressorRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscRegressorRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewregressor::PetscRegressor = PetscRegressorCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `PetscRegressor` object.\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator that will share the `PetscRegressor` object\n\nOutput Parameter:\n- `newregressor` - the new `PetscRegressor` object\n\nLevel: beginner\n\n-seealso: `PetscRegressorFit()`, `PetscRegressorPredict()`, `PetscRegressor`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorCreate\"))\n\"\"\"\nfunction PetscRegressorCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscRegressorCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tnewregressor_ = Ref{PetscRegressor}()\n\n    @chk ccall(\n               (:PetscRegressorCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscRegressor}),\n               comm, newregressor_,\n              )\n\n\tnewregressor = newregressor_[]\n\n\treturn newregressor\nend \n\n\"\"\"\n\tPetscRegressorView(petsclib::PetscLibType,regressor::PetscRegressor, viewer::PetscViewer) \nPrints information about the `PetscRegressor` object\n\nCollective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context\n- `viewer`    - a `PetscViewer` context\n\nOptions Database Key:\n- `-regressor_view` - Calls `PetscRegressorView()` at the end of `PetscRegressorFit()`\n\nLevel: beginner\n\n-seealso: [](ch_regressor), `PetscRegressor`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorView\"))\n\"\"\"\nfunction PetscRegressorView(petsclib::PetscLibType, regressor::PetscRegressor, viewer::PetscViewer) end\n\n@for_petsc function PetscRegressorView(petsclib::$UnionPetscLib, regressor::PetscRegressor, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscRegressorView, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, PetscViewer),\n               regressor, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorViewFromOptions(petsclib::PetscLibType,A::PetscRegressor, obj::PetscObject, name::String) \nView a `PetscRegressor` object based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the  `PetscRegressor` context\n- `obj`  - Optional object that provides the prefix for the options database\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_regressor), `PetscRegressor`, `PetscRegressorView`, `PetscObjectViewFromOptions()`, `PetscRegressorCreate()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorViewFromOptions\"))\n\"\"\"\nfunction PetscRegressorViewFromOptions(petsclib::PetscLibType, A::PetscRegressor, obj::PetscObject, name::String) end\n\n@for_petsc function PetscRegressorViewFromOptions(petsclib::$UnionPetscLib, A::PetscRegressor, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscRegressorViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorSetFromOptions(petsclib::PetscLibType,regressor::PetscRegressor) \nSets `PetscRegressor` options from the options database.\n\nCollective\n\nInput Parameter:\n- `regressor` - the `PetscRegressor` context\n\nOptions Database Keys:\n- `-regressor_type <type>` - the particular type of regressor to be used; see `PetscRegressorType` for complete list\n\nLevel: beginner\n\n-seealso: `PetscRegressor`, `PetscRegressorCreate()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorSetFromOptions\"))\n\"\"\"\nfunction PetscRegressorSetFromOptions(petsclib::PetscLibType, regressor::PetscRegressor) end\n\n@for_petsc function PetscRegressorSetFromOptions(petsclib::$UnionPetscLib, regressor::PetscRegressor )\n\n    @chk ccall(\n               (:PetscRegressorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor,),\n               regressor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorSetUp(petsclib::PetscLibType,regressor::PetscRegressor) \nSets up the internal data structures for the later use of a regressor.\n\nCollective\n\nInput Parameter:\n- `regressor` - the `PetscRegressor` context\n\n-seealso: `PetscRegressorCreate()`, `PetscRegressorFit()`, `PetscRegressorDestroy()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorSetUp\"))\n\"\"\"\nfunction PetscRegressorSetUp(petsclib::PetscLibType, regressor::PetscRegressor) end\n\n@for_petsc function PetscRegressorSetUp(petsclib::$UnionPetscLib, regressor::PetscRegressor )\n\n    @chk ccall(\n               (:PetscRegressorSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor,),\n               regressor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorFit(petsclib::PetscLibType,regressor::PetscRegressor, X::PetscMat, y::PetscVec) \nFit, or train, a regressor from a training dataset\n\nCollective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context\n- `X`         - matrix of training data (of dimension [number of samples] x [number of features])\n- `y`         - vector of target values from the training dataset\n\nLevel: beginner\n\n-seealso: `PetscRegressorCreate()`, `PetscRegressorSetUp()`, `PetscRegressorDestroy()`, `PetscRegressorPredict()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorFit\"))\n\"\"\"\nfunction PetscRegressorFit(petsclib::PetscLibType, regressor::PetscRegressor, X::PetscMat, y::PetscVec) end\n\n@for_petsc function PetscRegressorFit(petsclib::$UnionPetscLib, regressor::PetscRegressor, X::PetscMat, y::PetscVec )\n\n    @chk ccall(\n               (:PetscRegressorFit, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, CMat, CVec),\n               regressor, X, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorPredict(petsclib::PetscLibType,regressor::PetscRegressor, X::PetscMat, y::PetscVec) \nCompute predictions (that is, perform inference) using a fitted regression model.\n\nCollective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context (for which `PetscRegressorFit()` must have been called)\n- `X`         - data matrix of unlabeled observations\n\nOutput Parameter:\n- `y` - vector of predicted labels\n\nLevel: beginner\n\n-seealso: `PetscRegressorFit()`, `PetscRegressorDestroy()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorPredict\"))\n\"\"\"\nfunction PetscRegressorPredict(petsclib::PetscLibType, regressor::PetscRegressor, X::PetscMat, y::PetscVec) end\n\n@for_petsc function PetscRegressorPredict(petsclib::$UnionPetscLib, regressor::PetscRegressor, X::PetscMat, y::PetscVec )\n\n    @chk ccall(\n               (:PetscRegressorPredict, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, CMat, CVec),\n               regressor, X, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorReset(petsclib::PetscLibType,regressor::PetscRegressor) \nResets a `PetscRegressor` context by removing any allocated `Vec` and `Mat`. Any options set in the object remain.\n\nCollective\n\nInput Parameter:\n- `regressor` - context obtained from `PetscRegressorCreate()`\n\nLevel: intermediate\n\n-seealso: `PetscRegressorCreate()`, `PetscRegressorSetUp()`, `PetscRegressorFit()`, `PetscRegressorPredict()`, `PetscRegressorDestroy()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorReset\"))\n\"\"\"\nfunction PetscRegressorReset(petsclib::PetscLibType, regressor::PetscRegressor) end\n\n@for_petsc function PetscRegressorReset(petsclib::$UnionPetscLib, regressor::PetscRegressor )\n\n    @chk ccall(\n               (:PetscRegressorReset, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor,),\n               regressor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorDestroy(petsclib::PetscLibType,regressor::PetscRegressor) \nDestroys the regressor context that was created with `PetscRegressorCreate()`.\n\nCollective\n\nInput Parameter:\n- `regressor` - the `PetscRegressor` context\n\nLevel: beginner\n\n-seealso: `PetscRegressorCreate()`, `PetscRegressorSetUp()`, `PetscRegressorReset()`, `PetscRegressor`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorDestroy\"))\n\"\"\"\nfunction PetscRegressorDestroy(petsclib::PetscLibType, regressor::PetscRegressor) end\n\n@for_petsc function PetscRegressorDestroy(petsclib::$UnionPetscLib, regressor::PetscRegressor )\n\n    @chk ccall(\n               (:PetscRegressorDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscRegressor},),\n               regressor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorSetType(petsclib::PetscLibType,regressor::PetscRegressor, type::PetscRegressorType) \nSets the type for the regressor.\n\nCollective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context\n- `type`      - a known regression method\n\nOptions Database Key:\n- `-regressor_type <type>` - Sets the type of regressor; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `PetscRegressorType`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorSetType\"))\n\"\"\"\nfunction PetscRegressorSetType(petsclib::PetscLibType, regressor::PetscRegressor, type::PetscRegressorType) end\n\n@for_petsc function PetscRegressorSetType(petsclib::$UnionPetscLib, regressor::PetscRegressor, type::PetscRegressorType )\n\n    @chk ccall(\n               (:PetscRegressorSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, PetscRegressorType),\n               regressor, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscRegressorType = PetscRegressorGetType(petsclib::PetscLibType,regressor::PetscRegressor) \nGets the current `PetscRegressorType` being used in the `PetscRegressor` object\n\nNot Collective\n\nInput Parameter:\n- `regressor` - the `PetscRegressor` solver context\n\nOutput Parameter:\n- `type` - the `PetscRegressorType`\n\nLevel: intermediate\n\n-seealso: [](ch_regressor), `PetscRegressor`, `PetscRegressorType`, `PetscRegressorSetType()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorGetType\"))\n\"\"\"\nfunction PetscRegressorGetType(petsclib::PetscLibType, regressor::PetscRegressor) end\n\n@for_petsc function PetscRegressorGetType(petsclib::$UnionPetscLib, regressor::PetscRegressor )\n\ttype_ = Ref{PetscRegressorType}()\n\n    @chk ccall(\n               (:PetscRegressorGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, Ptr{PetscRegressorType}),\n               regressor, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscRegressorSetRegularizerWeight(petsclib::PetscLibType,regressor::PetscRegressor, weight::PetscReal) \nSets the weight to be used for the regularizer for a `PetscRegressor` context\n\nLogically Collective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context\n- `weight`    - the regularizer weight\n\nOptions Database Key:\n- `regressor_regularizer_weight <weight>` - sets the regularizer's weight\n\nLevel: beginner\n\n-seealso: `PetscRegressorSetType`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorSetRegularizerWeight\"))\n\"\"\"\nfunction PetscRegressorSetRegularizerWeight(petsclib::PetscLibType, regressor::PetscRegressor, weight::PetscReal) end\n\n@for_petsc function PetscRegressorSetRegularizerWeight(petsclib::$UnionPetscLib, regressor::PetscRegressor, weight::$PetscReal )\n\n    @chk ccall(\n               (:PetscRegressorSetRegularizerWeight, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, $PetscReal),\n               regressor, weight,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorGetTao(petsclib::PetscLibType,regressor::PetscRegressor, tao::Tao) \nReturns the `Tao` context for a `PetscRegressor` object.\n\nNot Collective, but if the `PetscRegressor` is parallel, then the `Tao` object is parallel\n\nInput Parameter:\n- `regressor` - the regressor context\n\nOutput Parameter:\n- `tao` - the `Tao` context\n\nLevel: beginner\n\n-seealso: `PetscRegressorLinearGetKSP()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorGetTao\"))\n\"\"\"\nfunction PetscRegressorGetTao(petsclib::PetscLibType, regressor::PetscRegressor, tao::Tao) end\n\n@for_petsc function PetscRegressorGetTao(petsclib::$UnionPetscLib, regressor::PetscRegressor, tao::Tao )\n\n    @chk ccall(\n               (:PetscRegressorGetTao, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, Ptr{Tao}),\n               regressor, tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorSetOptionsPrefix(petsclib::PetscLibType,regressor::PetscRegressor, p::String) \nSets the prefix used for searching for all\nPetscRegressor options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context\n- `p`         - the prefix string to prepend to all PetscRegressor option requests\n\nLevel: advanced\n\n-seealso: [](ch_regressor), `PetscRegressor`, `PetscRegressorSetFromOptions()`, `PetscRegressorAppendOptionsPrefix()`, `PetscRegressorGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorSetOptionsPrefix\"))\n\"\"\"\nfunction PetscRegressorSetOptionsPrefix(petsclib::PetscLibType, regressor::PetscRegressor, p::String) end\n\n@for_petsc function PetscRegressorSetOptionsPrefix(petsclib::$UnionPetscLib, regressor::PetscRegressor, p::String )\n\n    @chk ccall(\n               (:PetscRegressorSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, Ptr{Cchar}),\n               regressor, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorAppendOptionsPrefix(petsclib::PetscLibType,regressor::PetscRegressor, p::String) \nAppends to the prefix used for searching for all PetscRegressor options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` solver context\n- `p`         - the prefix string to prepend to all `PetscRegressor` option requests\n\nLevel: advanced\n\n-seealso: [](ch_regressor), `PetscRegressor`, `PetscRegressorSetFromOptions()`, `PetscRegressorSetOptionsPrefix()`, `PetscRegressorGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorAppendOptionsPrefix\"))\n\"\"\"\nfunction PetscRegressorAppendOptionsPrefix(petsclib::PetscLibType, regressor::PetscRegressor, p::String) end\n\n@for_petsc function PetscRegressorAppendOptionsPrefix(petsclib::$UnionPetscLib, regressor::PetscRegressor, p::String )\n\n    @chk ccall(\n               (:PetscRegressorAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, Ptr{Cchar}),\n               regressor, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorGetOptionsPrefix(petsclib::PetscLibType,regressor::PetscRegressor, p::String) \nGets the prefix used for searching for all\nPetscRegressor options in the database\n\nNot Collective\n\nInput Parameter:\n- `regressor` - the `PetscRegressor` context\n\nOutput Parameter:\n- `p` - pointer to the prefix string used is returned\n\n-seealso: [](ch_regressor), `PetscRegressor`, `PetscRegressorSetFromOptions()`, `PetscRegressorSetOptionsPrefix()`, `PetscRegressorAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorGetOptionsPrefix\"))\n\"\"\"\nfunction PetscRegressorGetOptionsPrefix(petsclib::PetscLibType, regressor::PetscRegressor, p::String) end\n\n@for_petsc function PetscRegressorGetOptionsPrefix(petsclib::$UnionPetscLib, regressor::PetscRegressor, p::String )\n\tp_ = Ref(pointer(p))\n\n    @chk ccall(\n               (:PetscRegressorGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, Ptr{Ptr{Cchar}}),\n               regressor, p_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorInitializePackage(petsclib::PetscLibType) \nInitialize `PetscRegressor` package\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `PetscRegressorFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorInitializePackage\"))\n\"\"\"\nfunction PetscRegressorInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscRegressorInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscRegressorInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorFinalizePackage(petsclib::PetscLibType) \nFinalize `PetscRegressor` package; it is called from `PetscFinalize()`\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `PetscRegressorInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorFinalizePackage\"))\n\"\"\"\nfunction PetscRegressorFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscRegressorFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscRegressorFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorLinearSetFitIntercept(petsclib::PetscLibType,regressor::PetscRegressor, flg::PetscBool) \nSet a flag to indicate that the intercept (also known as the \"bias\" or \"offset\") should\nbe calculated; data are assumed to be mean-centered if false.\n\nLogically Collective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context\n- `flg`       - `PETSC_TRUE` to calculate the intercept, `PETSC_FALSE` to assume mean-centered data (default is `PETSC_TRUE`)\n\nLevel: intermediate\n\nOptions Database Key:\n- `regressor_linear_fit_intercept <true,false>` - fit the intercept\n\n-seealso: `PetscRegressor`, `PetscRegressorFit()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorLinearSetFitIntercept\"))\n\"\"\"\nfunction PetscRegressorLinearSetFitIntercept(petsclib::PetscLibType, regressor::PetscRegressor, flg::PetscBool) end\n\n@for_petsc function PetscRegressorLinearSetFitIntercept(petsclib::$UnionPetscLib, regressor::PetscRegressor, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscRegressorLinearSetFitIntercept, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, PetscBool),\n               regressor, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorLinearSetUseKSP(petsclib::PetscLibType,regressor::PetscRegressor, flg::PetscBool) \nSet a flag to indicate that a `KSP` object, instead of a `Tao` one, should be used\nto fit the linear regressor\n\nLogically Collective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context\n- `flg`       - `PETSC_TRUE` to use a `KSP`, `PETSC_FALSE` to use a `Tao` object (default is false)\n\nOptions Database Key:\n- `regressor_linear_use_ksp <true,false>` - use `KSP`\n\nLevel: intermediate\n\n-seealso: `PetscRegressor`, `PetscRegressorLinearGetKSP()`, `KSPLSQR`, `PCQR`, `MATSOLVERSPQR`, `MatSolverType`, `MATSEQDENSE`, `PCSVD`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorLinearSetUseKSP\"))\n\"\"\"\nfunction PetscRegressorLinearSetUseKSP(petsclib::PetscLibType, regressor::PetscRegressor, flg::PetscBool) end\n\n@for_petsc function PetscRegressorLinearSetUseKSP(petsclib::$UnionPetscLib, regressor::PetscRegressor, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscRegressorLinearSetUseKSP, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, PetscBool),\n               regressor, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorLinearGetKSP(petsclib::PetscLibType,regressor::PetscRegressor, ksp::PetscKSP) \nReturns the `KSP` context for a `PETSCREGRESSORLINEAR` object.\n\nNot Collective, but if the `PetscRegressor` is parallel, then the `KSP` object is parallel\n\nInput Parameter:\n- `regressor` - the `PetscRegressor` context\n\nOutput Parameter:\n- `ksp` - the `KSP` context\n\nLevel: beginner\n\n-seealso: `PetscRegressorGetTao()`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorLinearGetKSP\"))\n\"\"\"\nfunction PetscRegressorLinearGetKSP(petsclib::PetscLibType, regressor::PetscRegressor, ksp::PetscKSP) end\n\n@for_petsc function PetscRegressorLinearGetKSP(petsclib::$UnionPetscLib, regressor::PetscRegressor, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:PetscRegressorLinearGetKSP, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, Ptr{CKSP}),\n               regressor, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegressorLinearSetType(petsclib::PetscLibType,regressor::PetscRegressor, type::PetscRegressorLinearType) \nSets the type of linear regression to be performed\n\nLogically Collective\n\nInput Parameters:\n- `regressor` - the `PetscRegressor` context (should be of type `PETSCREGRESSORLINEAR`)\n- `type`      - a known linear regression method\n\nOptions Database Key:\n- `-regressor_linear_type` - Sets the linear regression method; use -help for a list of available methods\n(for instance \"-regressor_linear_type ols\" or \"-regressor_linear_type lasso\")\n\nLevel: intermediate\n\n-seealso: `PetscRegressorLinearGetType()`, `PetscRegressorLinearType`, `PetscRegressorSetType()`, `REGRESSOR_LINEAR_OLS`,\n`REGRESSOR_LINEAR_LASSO`, `REGRESSOR_LINEAR_RIDGE`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorLinearSetType\"))\n\"\"\"\nfunction PetscRegressorLinearSetType(petsclib::PetscLibType, regressor::PetscRegressor, type::PetscRegressorLinearType) end\n\n@for_petsc function PetscRegressorLinearSetType(petsclib::$UnionPetscLib, regressor::PetscRegressor, type::PetscRegressorLinearType )\n\n    @chk ccall(\n               (:PetscRegressorLinearSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, PetscRegressorLinearType),\n               regressor, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscRegressorLinearType = PetscRegressorLinearGetType(petsclib::PetscLibType,regressor::PetscRegressor) \nReturn the type for the `PETSCREGRESSORLINEAR` solver\n\nInput Parameter:\n- `regressor` - the `PetscRegressor` solver context\n\nOutput Parameter:\n- `type` - `PETSCREGRESSORLINEAR` type\n\nLevel: advanced\n\n-seealso: `PetscRegressor`, `PETSCREGRESSORLINEAR`, `PetscRegressorLinearSetType()`, `PetscRegressorLinearType`\n\n# External Links\n$(_doc_external(\"Ml/PetscRegressorLinearGetType\"))\n\"\"\"\nfunction PetscRegressorLinearGetType(petsclib::PetscLibType, regressor::PetscRegressor) end\n\n@for_petsc function PetscRegressorLinearGetType(petsclib::$UnionPetscLib, regressor::PetscRegressor )\n\ttype_ = Ref{PetscRegressorLinearType}()\n\n    @chk ccall(\n               (:PetscRegressorLinearGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscRegressor, Ptr{PetscRegressorLinearType}),\n               regressor, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscSF_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_MPI_Group end\nconst MPI_Group = Ptr{_n_MPI_Group}\n\n\n\n\"\"\"\n\tsf::PetscSF = PetscSFCreate(petsclib::PetscLibType,comm::MPI_Comm) \ncreate a star forest communication context\n\nCollective\n\nInput Parameter:\n- `comm` - communicator on which the star forest will operate\n\nOutput Parameter:\n- `sf` - new star forest context\n\nOptions Database Key:\n- `-sf_type basic`                 - Use MPI persistent Isend/Irecv for communication (Default)\n- `-sf_type window`                - Use MPI-3 one-sided window for communication\n- `-sf_type neighbor`              - Use MPI-3 neighborhood collectives for communication\n- `-sf_neighbor_persistent <bool>` - If true, use MPI-4 persistent neighborhood collectives for communication (used along with -sf_type neighbor)\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFSetType`, `PetscSFSetGraph()`, `PetscSFSetGraphWithPattern()`, `PetscSFDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreate\"))\n\"\"\"\nfunction PetscSFCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscSFCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tsf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscSF}),\n               comm, sf_,\n              )\n\n\tsf = sf_[]\n\n\treturn sf\nend \n\n\"\"\"\n\tPetscSFReset(petsclib::PetscLibType,sf::PetscSF) \nReset a star forest so that different sizes or neighbors can be used\n\nCollective\n\nInput Parameter:\n- `sf` - star forest\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFCreate()`, `PetscSFSetGraph()`, `PetscSFDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFReset\"))\n\"\"\"\nfunction PetscSFReset(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFReset(petsclib::$UnionPetscLib, sf::PetscSF )\n\n    @chk ccall(\n               (:PetscSFReset, $petsc_library),\n               PetscErrorCode,\n               (PetscSF,),\n               sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFSetType(petsclib::PetscLibType,sf::PetscSF, type::PetscSFType) \nSet the `PetscSF` communication implementation\n\nCollective\n\nInput Parameters:\n- `sf`   - the `PetscSF` context\n- `type` - a known method\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetType\"))\n\"\"\"\nfunction PetscSFSetType(petsclib::PetscLibType, sf::PetscSF, type::PetscSFType) end\n\n@for_petsc function PetscSFSetType(petsclib::$UnionPetscLib, sf::PetscSF, type::PetscSFType )\n\n    @chk ccall(\n               (:PetscSFSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSFType),\n               sf, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscSFType = PetscSFGetType(petsclib::PetscLibType,sf::PetscSF) \nGet the `PetscSF` communication implementation\n\nNot Collective\n\nInput Parameter:\n- `sf` - the `PetscSF` context\n\nOutput Parameter:\n- `type` - the `PetscSF` type name\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFSetType()`, `PetscSFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetType\"))\n\"\"\"\nfunction PetscSFGetType(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFGetType(petsclib::$UnionPetscLib, sf::PetscSF )\n\ttype_ = Ref{PetscSFType}()\n\n    @chk ccall(\n               (:PetscSFGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscSFType}),\n               sf, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscSFDestroy(petsclib::PetscLibType,sf::PetscSF) \ndestroy a star forest\n\nCollective\n\nInput Parameter:\n- `sf` - address of star forest\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFCreate()`, `PetscSFReset()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFDestroy\"))\n\"\"\"\nfunction PetscSFDestroy(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFDestroy(petsclib::$UnionPetscLib, sf::PetscSF )\n\n    sf_ = Ref{PetscSF}(sf)\n\n    @chk ccall(\n               (:PetscSFDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSF},),\n               sf_,\n              )\n\n\n    return nothing\nend \n\n@for_petsc function PetscSFDestroy(petsclib::$UnionPetscLib, sf::Ref{PetscSF} )\n\n    @chk ccall(\n               (:PetscSFDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSF},),\n               sf,\n              )\n\n\n    return nothing\nend \n\n\"\"\"\n\tPetscSFSetUp(petsclib::PetscLibType,sf::PetscSF) \nset up communication structures for a `PetscSF`, after this is done it may be used to perform communication\n\nCollective\n\nInput Parameter:\n- `sf` - star forest communication object\n\nLevel: beginner\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFSetFromOptions()`, `PetscSFSetType()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetUp\"))\n\"\"\"\nfunction PetscSFSetUp(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFSetUp(petsclib::$UnionPetscLib, sf::PetscSF )\n\n    @chk ccall(\n               (:PetscSFSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscSF,),\n               sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFSetFromOptions(petsclib::PetscLibType,sf::PetscSF) \nset `PetscSF` options using the options database\n\nLogically Collective\n\nInput Parameter:\n- `sf` - star forest\n\nOptions Database Keys:\n- `-sf_type`                      - implementation type, see `PetscSFSetType()`\n- `-sf_rank_order`                - sort composite points for gathers and scatters in rank order, gathers are non-deterministic otherwise\n- `-sf_use_default_stream`        - Assume callers of `PetscSF` computed the input root/leafdata with the default CUDA stream. `PetscSF` will also\nuse the default stream to process data. Therefore, no stream synchronization is needed between `PetscSF` and its caller (default: true).\nIf true, this option only works with `-use_gpu_aware_mpi 1`.\n- `-sf_use_stream_aware_mpi`      - Assume the underlying MPI is CUDA-stream aware and `PetscSF` won't sync streams for send/recv buffers passed to MPI (default: false).\nIf true, this option only works with `-use_gpu_aware_mpi 1`.\n\n- `-sf_backend <cuda,hip,kokkos>` - Select the device backend`PetscSF` uses. Currently `PetscSF` has these backends: cuda - hip and Kokkos.\nOn CUDA (HIP) devices, one can choose cuda (hip) or kokkos with the default being kokkos. On other devices,\nthe only available is kokkos.\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFCreate()`, `PetscSFSetType()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetFromOptions\"))\n\"\"\"\nfunction PetscSFSetFromOptions(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFSetFromOptions(petsclib::$UnionPetscLib, sf::PetscSF )\n\n    @chk ccall(\n               (:PetscSFSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscSF,),\n               sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFSetRankOrder(petsclib::PetscLibType,sf::PetscSF, flg::PetscBool) \nsort multi\n\nLogically Collective\n\nInput Parameters:\n- `sf`  - star forest\n- `flg` - `PETSC_TRUE` to sort, `PETSC_FALSE` to skip sorting (lower setup cost, but non-deterministic)\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFGatherBegin()`, `PetscSFScatterBegin()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetRankOrder\"))\n\"\"\"\nfunction PetscSFSetRankOrder(petsclib::PetscLibType, sf::PetscSF, flg::PetscBool) end\n\n@for_petsc function PetscSFSetRankOrder(petsclib::$UnionPetscLib, sf::PetscSF, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscSFSetRankOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscBool),\n               sf, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFSetGraph(petsclib::PetscLibType,sf::PetscSF, nroots::PetscInt, nleaves::PetscInt, iloc::Vector{PetscInt}, locmode::PetscCopyMode, iremote::Vector{PetscSFNode}, remotemode::PetscCopyMode) \nSet a parallel star forest\n\nCollective\n\nInput Parameters:\n- `sf`         - star forest\n- `nroots`     - number of root vertices on the current process (these are possible targets for other process to attach leaves)\n- `nleaves`    - number of leaf vertices on the current process, each of these references a root on any process\n- `ilocal`     - locations of leaves in leafdata buffers, pass `NULL` for contiguous storage (locations must be >= 0, enforced\nduring setup in debug mode)\n- `localmode`  - copy mode for `ilocal`\n- `iremote`    - remote locations of root vertices for each leaf on the current process, length is 2 `nleaves'\n(locations must be >= 0, enforced during setup in debug mode)\n- `remotemode` - copy mode for `iremote`\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFCreate()`, `PetscSFView()`, `PetscSFGetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetGraph\"))\n\"\"\"\nfunction PetscSFSetGraph(petsclib::PetscLibType, sf::PetscSF, nroots::PetscInt, nleaves::PetscInt, iloc::Vector{PetscInt}, locmode::PetscCopyMode, iremote::Vector{PetscSFNode}, remotemode::PetscCopyMode) end\n\n@for_petsc function PetscSFSetGraph(petsclib::$UnionPetscLib, sf::PetscSF, nroots::$PetscInt, nleaves::$PetscInt, iloc::Vector{$PetscInt}, locmode::PetscCopyMode, iremote::Vector{PetscSFNode}, remotemode::PetscCopyMode )\n\n    @chk ccall(\n               (:PetscSFSetGraph, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, $PetscInt, $PetscInt, Ptr{$PetscInt}, PetscCopyMode, Ptr{PetscSFNode}, PetscCopyMode),\n               sf, nroots, nleaves, iloc, locmode, iremote, remotemode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFSetGraphWithPattern(petsclib::PetscLibType,sf::PetscSF, map::PetscLayout, pattern::PetscSFPattern) \nSets the graph of a `PetscSF` with a specific pattern\n\nCollective\n\nInput Parameters:\n- `sf`      - The `PetscSF`\n- `map`     - Layout of roots over all processes (insignificant when pattern is `PETSCSF_PATTERN_ALLTOALL`)\n- `pattern` - One of `PETSCSF_PATTERN_ALLGATHER`, `PETSCSF_PATTERN_GATHER`, `PETSCSF_PATTERN_ALLTOALL`\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFCreate()`, `PetscSFView()`, `PetscSFGetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetGraphWithPattern\"))\n\"\"\"\nfunction PetscSFSetGraphWithPattern(petsclib::PetscLibType, sf::PetscSF, map::PetscLayout, pattern::PetscSFPattern) end\n\n@for_petsc function PetscSFSetGraphWithPattern(petsclib::$UnionPetscLib, sf::PetscSF, map::PetscLayout, pattern::PetscSFPattern )\n\n    @chk ccall(\n               (:PetscSFSetGraphWithPattern, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscLayout, PetscSFPattern),\n               sf, map, pattern,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisf::PetscSF = PetscSFCreateInverseSF(petsclib::PetscLibType,sf::PetscSF) \ngiven a `PetscSF` in which all vertices have degree 1, creates the inverse map\n\nCollective\n\nInput Parameter:\n- `sf` - star forest to invert\n\nOutput Parameter:\n- `isf` - inverse of `sf`\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFSetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateInverseSF\"))\n\"\"\"\nfunction PetscSFCreateInverseSF(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFCreateInverseSF(petsclib::$UnionPetscLib, sf::PetscSF )\n\tisf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateInverseSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscSF}),\n               sf, isf_,\n              )\n\n\tisf = isf_[]\n\n\treturn isf\nend \n\n\"\"\"\n\tnewsf::PetscSF = PetscSFDuplicate(petsclib::PetscLibType,sf::PetscSF, opt::PetscSFDuplicateOption) \nduplicate a `PetscSF`, optionally preserving rank connectivity and graph\n\nCollective\n\nInput Parameters:\n- `sf`  - communication object to duplicate\n- `opt` - `PETSCSF_DUPLICATE_CONFONLY`, `PETSCSF_DUPLICATE_RANKS`, or `PETSCSF_DUPLICATE_GRAPH` (see `PetscSFDuplicateOption`)\n\nOutput Parameter:\n- `newsf` - new communication object\n\nLevel: beginner\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFCreate()`, `PetscSFSetType()`, `PetscSFSetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFDuplicate\"))\n\"\"\"\nfunction PetscSFDuplicate(petsclib::PetscLibType, sf::PetscSF, opt::PetscSFDuplicateOption) end\n\n@for_petsc function PetscSFDuplicate(petsclib::$UnionPetscLib, sf::PetscSF, opt::PetscSFDuplicateOption )\n\tnewsf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFDuplicate, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSFDuplicateOption, Ptr{PetscSF}),\n               sf, opt, newsf_,\n              )\n\n\tnewsf = newsf_[]\n\n\treturn newsf\nend \n\n\"\"\"\n\tnroots::PetscInt,nleaves::PetscInt,iloc::Vector{PetscInt} = PetscSFGetGraph(petsclib::PetscLibType,sf::PetscSF, iremote::Vector{PetscSFNode}) \nGet the graph specifying a parallel star forest\n\nNot Collective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameters:\n- `nroots`  - number of root vertices on the current process (these are possible targets for other process to attach leaves)\n- `nleaves` - number of leaf vertices on the current process, each of these references a root on any process\n- `ilocal`  - locations of leaves in leafdata buffers (if returned value is `NULL`, it means leaves are in contiguous storage)\n- `iremote` - remote locations of root vertices for each leaf on the current process\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFCreate()`, `PetscSFView()`, `PetscSFSetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetGraph\"))\n\"\"\"\nfunction PetscSFGetGraph(petsclib::PetscLibType, sf::PetscSF, iremote::Vector{PetscSFNode}) end\n\n@for_petsc function PetscSFGetGraph(petsclib::$UnionPetscLib, sf::PetscSF, iremote::Vector{PetscSFNode} )\n\tnroots_ = Ref{$PetscInt}()\n\tnleaves_ = Ref{$PetscInt}()\n\tiloc_ = Ref{Ptr{$PetscInt}}()\n\tiremote_ = Ref(pointer(iremote))\n\n    @chk ccall(\n               (:PetscSFGetGraph, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{PetscSFNode}}),\n               sf, nroots_, nleaves_, iloc_, iremote_,\n              )\n\n\tnroots = nroots_[]\n\tnleaves = nleaves_[]\n\tiloc = unsafe_wrap(Array, iloc_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nroots,nleaves,iloc\nend \n\n\"\"\"\n\tminleaf::PetscInt,maxleaf::PetscInt = PetscSFGetLeafRange(petsclib::PetscLibType,sf::PetscSF) \nGet the active leaf ranges\n\nNot Collective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameters:\n- `minleaf` - minimum active leaf on this process. Returns 0 if there are no leaves.\n- `maxleaf` - maximum active leaf on this process. Returns -1 if there are no leaves.\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFCreate()`, `PetscSFView()`, `PetscSFSetGraph()`, `PetscSFGetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetLeafRange\"))\n\"\"\"\nfunction PetscSFGetLeafRange(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFGetLeafRange(petsclib::$UnionPetscLib, sf::PetscSF )\n\tminleaf_ = Ref{$PetscInt}()\n\tmaxleaf_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSFGetLeafRange, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               sf, minleaf_, maxleaf_,\n              )\n\n\tminleaf = minleaf_[]\n\tmaxleaf = maxleaf_[]\n\n\treturn minleaf,maxleaf\nend \n\n\"\"\"\n\tPetscSFViewFromOptions(petsclib::PetscLibType,A::PetscSF, obj::PetscObject, name::String) \nView a `PetscSF` based on arguments in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the star forest\n- `obj`  - Optional object that provides the prefix for the option names\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFView`, `PetscObjectViewFromOptions()`, `PetscSFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFViewFromOptions\"))\n\"\"\"\nfunction PetscSFViewFromOptions(petsclib::PetscLibType, A::PetscSF, obj::PetscObject, name::String) end\n\n@for_petsc function PetscSFViewFromOptions(petsclib::$UnionPetscLib, A::PetscSF, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscSFViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFView(petsclib::PetscLibType,sf::PetscSF, viewer::PetscViewer) \nview a star forest\n\nCollective\n\nInput Parameters:\n- `sf`     - star forest\n- `viewer` - viewer to display graph, for example `PETSC_VIEWER_STDOUT_WORLD`\n\nLevel: beginner\n\n-seealso: `PetscSF`, `PetscViewer`, `PetscSFCreate()`, `PetscSFSetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFView\"))\n\"\"\"\nfunction PetscSFView(petsclib::PetscLibType, sf::PetscSF, viewer::PetscViewer) end\n\n@for_petsc function PetscSFView(petsclib::$UnionPetscLib, sf::PetscSF, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscSFView, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscViewer),\n               sf, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\troffset::Vector{PetscInt},rmine::Vector{PetscInt},rremote::Vector{PetscInt} = PetscSFGetRootRanks(petsclib::PetscLibType,sf::PetscSF, nranks::PetscMPIInt, ranks::Vector{PetscMPIInt}) \nGet root ranks and number of vertices referenced by leaves on this process\n\nNot Collective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameters:\n- `nranks`  - number of ranks referenced by local part\n- `ranks`   - [`nranks`] array of ranks\n- `roffset` - [`nranks`+1] offset in `rmine`/`rremote` for each rank\n- `rmine`   - [`roffset`[`nranks`]] concatenated array holding local indices referencing each remote rank, or `NULL`\n- `rremote` - [`roffset`[`nranks`]] concatenated array holding remote indices referenced for each remote rank, or `NULL`\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFGetLeafRanks()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetRootRanks\"))\n\"\"\"\nfunction PetscSFGetRootRanks(petsclib::PetscLibType, sf::PetscSF, nranks::PetscMPIInt, ranks::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscSFGetRootRanks(petsclib::$UnionPetscLib, sf::PetscSF, nranks::PetscMPIInt, ranks::Vector{PetscMPIInt} )\n\tranks_ = Ref(pointer(ranks))\n\troffset_ = Ref{Ptr{$PetscInt}}()\n\trmine_ = Ref{Ptr{$PetscInt}}()\n\trremote_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFGetRootRanks, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscMPIInt}, Ptr{Ptr{PetscMPIInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               sf, nranks, ranks_, roffset_, rmine_, rremote_,\n              )\n\n\troffset = unsafe_wrap(Array, roffset_[], VecGetLocalSize(petsclib, x); own = false)\n\trmine = unsafe_wrap(Array, rmine_[], VecGetLocalSize(petsclib, x); own = false)\n\trremote = unsafe_wrap(Array, rremote_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn roffset,rmine,rremote\nend \n\n\"\"\"\n\tioffset::Vector{PetscInt},irootloc::Vector{PetscInt} = PetscSFGetLeafRanks(petsclib::PetscLibType,sf::PetscSF, niranks::PetscMPIInt, iranks::Vector{PetscMPIInt}) \nGet leaf ranks referencing roots on this process\n\nNot Collective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameters:\n- `niranks`  - number of leaf ranks referencing roots on this process\n- `iranks`   - [`niranks`] array of ranks\n- `ioffset`  - [`niranks`+1] offset in `irootloc` for each rank\n- `irootloc` - [`ioffset`[`niranks`]] concatenated array holding local indices of roots referenced by each leaf rank\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFGetRootRanks()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetLeafRanks\"))\n\"\"\"\nfunction PetscSFGetLeafRanks(petsclib::PetscLibType, sf::PetscSF, niranks::PetscMPIInt, iranks::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscSFGetLeafRanks(petsclib::$UnionPetscLib, sf::PetscSF, niranks::PetscMPIInt, iranks::Vector{PetscMPIInt} )\n\tiranks_ = Ref(pointer(iranks))\n\tioffset_ = Ref{Ptr{$PetscInt}}()\n\tirootloc_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFGetLeafRanks, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscMPIInt}, Ptr{Ptr{PetscMPIInt}}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               sf, niranks, iranks_, ioffset_, irootloc_,\n              )\n\n\tioffset = unsafe_wrap(Array, ioffset_[], VecGetLocalSize(petsclib, x); own = false)\n\tirootloc = unsafe_wrap(Array, irootloc_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn ioffset,irootloc\nend \n\n\"\"\"\n\tPetscSFSetUpRanks(petsclib::PetscLibType,sf::PetscSF, dgroup::MPI_Group) \nSet up data structures associated with ranks; this is for internal use by `PetscSF` implementations.\n\nCollective\n\nInput Parameters:\n- `sf`     - `PetscSF` to set up; `PetscSFSetGraph()` must have been called\n- `dgroup` - `MPI_Group` of ranks to be distinguished (e.g., for self or shared memory exchange)\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFGetRootRanks()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetUpRanks\"))\n\"\"\"\nfunction PetscSFSetUpRanks(petsclib::PetscLibType, sf::PetscSF, dgroup::MPI_Group) end\n\n@for_petsc function PetscSFSetUpRanks(petsclib::$UnionPetscLib, sf::PetscSF, dgroup::MPI_Group )\n\n    @chk ccall(\n               (:PetscSFSetUpRanks, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, MPI_Group),\n               sf, dgroup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFGetGroups(petsclib::PetscLibType,sf::PetscSF, incoming::MPI_Group, outgoing::MPI_Group) \ngets incoming and outgoing process groups\n\nCollective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameters:\n- `incoming` - group of origin processes for incoming edges (leaves that reference my roots)\n- `outgoing` - group of destination processes for outgoing edges (roots that I reference)\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFGetWindow()`, `PetscSFRestoreWindow()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetGroups\"))\n\"\"\"\nfunction PetscSFGetGroups(petsclib::PetscLibType, sf::PetscSF, incoming::MPI_Group, outgoing::MPI_Group) end\n\n@for_petsc function PetscSFGetGroups(petsclib::$UnionPetscLib, sf::PetscSF, incoming::MPI_Group, outgoing::MPI_Group )\n\n    @chk ccall(\n               (:PetscSFGetGroups, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{MPI_Group}, Ptr{MPI_Group}),\n               sf, incoming, outgoing,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFGetRanksSF(petsclib::PetscLibType,sf::PetscSF, rsf::PetscSF) \ngets the `PetscSF` to perform communications with root ranks\n\nCollective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameter:\n- `rsf` - the star forest with a single root per process to perform communications\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFSetGraph()`, `PetscSFGetRootRanks()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetRanksSF\"))\n\"\"\"\nfunction PetscSFGetRanksSF(petsclib::PetscLibType, sf::PetscSF, rsf::PetscSF) end\n\n@for_petsc function PetscSFGetRanksSF(petsclib::$UnionPetscLib, sf::PetscSF, rsf::PetscSF )\n\n    @chk ccall(\n               (:PetscSFGetRanksSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscSF}),\n               sf, rsf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFGetMultiSF(petsclib::PetscLibType,sf::PetscSF, multi::PetscSF) \ngets the inner `PetscSF` implementing gathers and scatters\n\nCollective\n\nInput Parameter:\n- `sf` - star forest that may contain roots with 0 or with more than 1 vertex\n\nOutput Parameter:\n- `multi` - star forest with split roots, such that each root has degree exactly 1\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFSetGraph()`, `PetscSFGatherBegin()`, `PetscSFScatterBegin()`, `PetscSFComputeMultiRootOriginalNumbering()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetMultiSF\"))\n\"\"\"\nfunction PetscSFGetMultiSF(petsclib::PetscLibType, sf::PetscSF, multi::PetscSF) end\n\n@for_petsc function PetscSFGetMultiSF(petsclib::$UnionPetscLib, sf::PetscSF, multi::PetscSF )\n\n    @chk ccall(\n               (:PetscSFGetMultiSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscSF}),\n               sf, multi,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tesf::PetscSF = PetscSFCreateEmbeddedRootSF(petsclib::PetscLibType,sf::PetscSF, nselected::PetscInt, selected::PetscInt) \nremoves edges from all but the selected roots of a `PetscSF`, does not remap indices\n\nCollective\n\nInput Parameters:\n- `sf`        - original star forest\n- `nselected` - number of selected roots on this process\n- `selected`  - indices of the selected roots on this process\n\nOutput Parameter:\n- `esf` - new star forest\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFSetGraph()`, `PetscSFGetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateEmbeddedRootSF\"))\n\"\"\"\nfunction PetscSFCreateEmbeddedRootSF(petsclib::PetscLibType, sf::PetscSF, nselected::PetscInt, selected::PetscInt) end\n\n@for_petsc function PetscSFCreateEmbeddedRootSF(petsclib::$UnionPetscLib, sf::PetscSF, nselected::$PetscInt, selected::$PetscInt )\n\tesf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateEmbeddedRootSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, $PetscInt, Ptr{$PetscInt}, Ptr{PetscSF}),\n               sf, nselected, selected, esf_,\n              )\n\n\tesf = esf_[]\n\n\treturn esf\nend \n\n\"\"\"\n\tnewsf::PetscSF = PetscSFCreateEmbeddedLeafSF(petsclib::PetscLibType,sf::PetscSF, nselected::PetscInt, selected::PetscInt) \nremoves edges from all but the selected leaves of a `PetscSF`, does not remap indices\n\nCollective\n\nInput Parameters:\n- `sf`        - original star forest\n- `nselected` - number of selected leaves on this process\n- `selected`  - indices of the selected leaves on this process\n\nOutput Parameter:\n- `newsf` - new star forest\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFCreateEmbeddedRootSF()`, `PetscSFSetGraph()`, `PetscSFGetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateEmbeddedLeafSF\"))\n\"\"\"\nfunction PetscSFCreateEmbeddedLeafSF(petsclib::PetscLibType, sf::PetscSF, nselected::PetscInt, selected::PetscInt) end\n\n@for_petsc function PetscSFCreateEmbeddedLeafSF(petsclib::$UnionPetscLib, sf::PetscSF, nselected::$PetscInt, selected::$PetscInt )\n\tnewsf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateEmbeddedLeafSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, $PetscInt, Ptr{$PetscInt}, Ptr{PetscSF}),\n               sf, nselected, selected, newsf_,\n              )\n\n\tnewsf = newsf_[]\n\n\treturn newsf\nend \n\n\"\"\"\n\tdegree::Vector{PetscInt} = PetscSFComputeDegreeBegin(petsclib::PetscLibType,sf::PetscSF) \nbegin computation of degree for each root vertex, to be completed with `PetscSFComputeDegreeEnd()`\n\nCollective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameter:\n- `degree` - degree of each root vertex\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFGatherBegin()`, `PetscSFComputeDegreeEnd()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFComputeDegreeBegin\"))\n\"\"\"\nfunction PetscSFComputeDegreeBegin(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFComputeDegreeBegin(petsclib::$UnionPetscLib, sf::PetscSF )\n\tdegree_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFComputeDegreeBegin, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{Ptr{$PetscInt}}),\n               sf, degree_,\n              )\n\n\tdegree = unsafe_wrap(Array, degree_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn degree\nend \n\n\"\"\"\n\tdegree::Vector{PetscInt} = PetscSFComputeDegreeEnd(petsclib::PetscLibType,sf::PetscSF) \ncomplete computation of degree for each root vertex, started with `PetscSFComputeDegreeBegin()`\n\nCollective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameter:\n- `degree` - degree of each root vertex\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFGatherBegin()`, `PetscSFComputeDegreeBegin()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFComputeDegreeEnd\"))\n\"\"\"\nfunction PetscSFComputeDegreeEnd(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFComputeDegreeEnd(petsclib::$UnionPetscLib, sf::PetscSF )\n\tdegree_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFComputeDegreeEnd, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{Ptr{$PetscInt}}),\n               sf, degree_,\n              )\n\n\tdegree = unsafe_wrap(Array, degree_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn degree\nend \n\n\"\"\"\n\tnMultiRoots::PetscInt,multiRootsOrigNumbering::Vector{PetscInt} = PetscSFComputeMultiRootOriginalNumbering(petsclib::PetscLibType,sf::PetscSF, degree::Vector{PetscInt}) \nReturns original numbering of multi\nEach multi-root is assigned index of the corresponding original root.\n\nCollective\n\nInput Parameters:\n- `sf`     - star forest\n- `degree` - degree of each root vertex, computed with `PetscSFComputeDegreeBegin()`/`PetscSFComputeDegreeEnd()`\n\nOutput Parameters:\n- `nMultiRoots`             - (optional) number of multi-roots (roots of multi-`PetscSF`)\n- `multiRootsOrigNumbering` - original indices of multi-roots; length of this array is `nMultiRoots`\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFComputeDegreeBegin()`, `PetscSFComputeDegreeEnd()`, `PetscSFGetMultiSF()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFComputeMultiRootOriginalNumbering\"))\n\"\"\"\nfunction PetscSFComputeMultiRootOriginalNumbering(petsclib::PetscLibType, sf::PetscSF, degree::Vector{PetscInt}) end\n\n@for_petsc function PetscSFComputeMultiRootOriginalNumbering(petsclib::$UnionPetscLib, sf::PetscSF, degree::Vector{$PetscInt} )\n\tnMultiRoots_ = Ref{$PetscInt}()\n\tmultiRootsOrigNumbering_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFComputeMultiRootOriginalNumbering, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}),\n               sf, degree, nMultiRoots_, multiRootsOrigNumbering_,\n              )\n\n\tnMultiRoots = nMultiRoots_[]\n\tmultiRootsOrigNumbering = unsafe_wrap(Array, multiRootsOrigNumbering_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nMultiRoots,multiRootsOrigNumbering\nend \n\n\"\"\"\n\tPetscSFCompose(petsclib::PetscLibType,sfA::PetscSF, sfB::PetscSF, sfBA::PetscSF) \nCompose a new `PetscSF` by putting the second `PetscSF` under the first one in a top (roots) down (leaves) view\n\nInput Parameters:\n- `sfA` - The first `PetscSF`\n- `sfB` - The second `PetscSF`\n\nOutput Parameter:\n- `sfBA` - The composite `PetscSF`\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFComposeInverse()`, `PetscSFGetGraph()`, `PetscSFSetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCompose\"))\n\"\"\"\nfunction PetscSFCompose(petsclib::PetscLibType, sfA::PetscSF, sfB::PetscSF, sfBA::PetscSF) end\n\n@for_petsc function PetscSFCompose(petsclib::$UnionPetscLib, sfA::PetscSF, sfB::PetscSF, sfBA::PetscSF )\n\n    @chk ccall(\n               (:PetscSFCompose, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSF, Ptr{PetscSF}),\n               sfA, sfB, sfBA,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFComposeInverse(petsclib::PetscLibType,sfA::PetscSF, sfB::PetscSF, sfBA::PetscSF) \nCompose a new `PetscSF` by putting the inverse of the second `PetscSF` under the first one\n\nInput Parameters:\n- `sfA` - The first `PetscSF`\n- `sfB` - The second `PetscSF`\n\nOutput Parameter:\n- `sfBA` - The composite `PetscSF`.\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFCompose()`, `PetscSFGetGraph()`, `PetscSFSetGraph()`, `PetscSFCreateInverseSF()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFComposeInverse\"))\n\"\"\"\nfunction PetscSFComposeInverse(petsclib::PetscLibType, sfA::PetscSF, sfB::PetscSF, sfBA::PetscSF) end\n\n@for_petsc function PetscSFComposeInverse(petsclib::$UnionPetscLib, sfA::PetscSF, sfB::PetscSF, sfBA::PetscSF )\n\n    @chk ccall(\n               (:PetscSFComposeInverse, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSF, Ptr{PetscSF}),\n               sfA, sfB, sfBA,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFConcatenate(petsclib::PetscLibType,comm::MPI_Comm, nsfs::PetscInt, sfs::Vector{PetscSF}, rootMode::PetscSFConcatenateRootMode, leafOffsets::Vector{PetscInt}, newsf::PetscSF) \nconcatenate multiple `PetscSF` into one\n\nInput Parameters:\n- `comm`        - the communicator\n- `nsfs`        - the number of input `PetscSF`\n- `sfs`         - the array of input `PetscSF`\n- `rootMode`    - the root mode specifying how roots are handled\n- `leafOffsets` - the array of local leaf offsets, one for each input `PetscSF`, or `NULL` for contiguous storage\n\nOutput Parameter:\n- `newsf` - The resulting `PetscSF`\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFCompose()`, `PetscSFGetGraph()`, `PetscSFSetGraph()`, `PetscSFConcatenateRootMode`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFConcatenate\"))\n\"\"\"\nfunction PetscSFConcatenate(petsclib::PetscLibType, comm::MPI_Comm, nsfs::PetscInt, sfs::Vector{PetscSF}, rootMode::PetscSFConcatenateRootMode, leafOffsets::Vector{PetscInt}, newsf::PetscSF) end\n\n@for_petsc function PetscSFConcatenate(petsclib::$UnionPetscLib, comm::MPI_Comm, nsfs::$PetscInt, sfs::Vector{PetscSF}, rootMode::PetscSFConcatenateRootMode, leafOffsets::Vector{$PetscInt}, newsf::PetscSF )\n\n    @chk ccall(\n               (:PetscSFConcatenate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{PetscSF}, PetscSFConcatenateRootMode, Ptr{$PetscInt}, Ptr{PetscSF}),\n               comm, nsfs, sfs, rootMode, leafOffsets, newsf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFRegister(petsclib::PetscLibType,name::String, create::external) \nAdds an implementation of the `PetscSF` communication protocol.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `name`   - name of a new user-defined implementation\n- `create` - routine to create method context\n\n-seealso: `PetscSF`, `PetscSFType`, `PetscSFRegisterAll()`, `PetscSFInitializePackage()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFRegister\"))\n\"\"\"\nfunction PetscSFRegister(petsclib::PetscLibType, name::String, create::external) end\n\n@for_petsc function PetscSFRegister(petsclib::$UnionPetscLib, name::String, create::external )\n\n    @chk ccall(\n               (:PetscSFRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               name, create,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFInitializePackage(petsclib::PetscLibType) \nInitialize `PetscSF` package\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFInitializePackage\"))\n\"\"\"\nfunction PetscSFInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscSFInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscSFInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFFinalizePackage(petsclib::PetscLibType) \nFinalize `PetscSF` package, it is called from `PetscFinalize()`\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFInitializePackage()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFFinalizePackage\"))\n\"\"\"\nfunction PetscSFFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscSFFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscSFFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFWindowSetFlavorType(petsclib::PetscLibType,sf::PetscSF, flavor::PetscSFWindowFlavorType) \nSet flavor type for `MPI_Win` creation\n\nLogically Collective\n\nInput Parameters:\n- `sf`     - star forest for communication of type `PETSCSFWINDOW`\n- `flavor` - flavor type\n\nOptions Database Key:\n- `-sf_window_flavor <flavor>` - sets the flavor type CREATE, DYNAMIC, ALLOCATE or SHARED (see `PetscSFWindowFlavorType`)\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PETSCSFWINDOW`, `PetscSFSetFromOptions()`, `PetscSFWindowGetFlavorType()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFWindowSetFlavorType\"))\n\"\"\"\nfunction PetscSFWindowSetFlavorType(petsclib::PetscLibType, sf::PetscSF, flavor::PetscSFWindowFlavorType) end\n\n@for_petsc function PetscSFWindowSetFlavorType(petsclib::$UnionPetscLib, sf::PetscSF, flavor::PetscSFWindowFlavorType )\n\n    @chk ccall(\n               (:PetscSFWindowSetFlavorType, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSFWindowFlavorType),\n               sf, flavor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflavor::PetscSFWindowFlavorType = PetscSFWindowGetFlavorType(petsclib::PetscLibType,sf::PetscSF) \nGet  `PETSCSFWINDOW` flavor type for `PetscSF` communication\n\nLogically Collective\n\nInput Parameter:\n- `sf` - star forest for communication of type `PETSCSFWINDOW`\n\nOutput Parameter:\n- `flavor` - flavor type\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PETSCSFWINDOW`, `PetscSFSetFromOptions()`, `PetscSFWindowSetFlavorType()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFWindowGetFlavorType\"))\n\"\"\"\nfunction PetscSFWindowGetFlavorType(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFWindowGetFlavorType(petsclib::$UnionPetscLib, sf::PetscSF )\n\tflavor_ = Ref{PetscSFWindowFlavorType}()\n\n    @chk ccall(\n               (:PetscSFWindowGetFlavorType, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscSFWindowFlavorType}),\n               sf, flavor_,\n              )\n\n\tflavor = unsafe_string(flavor_[])\n\n\treturn flavor\nend \n\n\"\"\"\n\tPetscSFWindowSetSyncType(petsclib::PetscLibType,sf::PetscSF, sync::PetscSFWindowSyncType) \nSet synchronization type for `PetscSF` communication of type  `PETSCSFWINDOW`\n\nLogically Collective\n\nInput Parameters:\n- `sf`   - star forest for communication\n- `sync` - synchronization type\n\nOptions Database Key:\n- `-sf_window_sync <sync>` - sets the synchronization type FENCE, LOCK, or ACTIVE (see `PetscSFWindowSyncType`)\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PETSCSFWINDOW`, `PetscSFSetFromOptions()`, `PetscSFWindowGetSyncType()`, `PetscSFWindowSyncType`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFWindowSetSyncType\"))\n\"\"\"\nfunction PetscSFWindowSetSyncType(petsclib::PetscLibType, sf::PetscSF, sync::PetscSFWindowSyncType) end\n\n@for_petsc function PetscSFWindowSetSyncType(petsclib::$UnionPetscLib, sf::PetscSF, sync::PetscSFWindowSyncType )\n\n    @chk ccall(\n               (:PetscSFWindowSetSyncType, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSFWindowSyncType),\n               sf, sync,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsync::PetscSFWindowSyncType = PetscSFWindowGetSyncType(petsclib::PetscLibType,sf::PetscSF) \nGet synchronization type for `PetscSF` communication of type `PETSCSFWINDOW`\n\nLogically Collective\n\nInput Parameter:\n- `sf` - star forest for communication\n\nOutput Parameter:\n- `sync` - synchronization type\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PETSCSFWINDOW`, `PetscSFSetFromOptions()`, `PetscSFWindowSetSyncType()`, `PetscSFWindowSyncType`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFWindowGetSyncType\"))\n\"\"\"\nfunction PetscSFWindowGetSyncType(petsclib::PetscLibType, sf::PetscSF) end\n\n@for_petsc function PetscSFWindowGetSyncType(petsclib::$UnionPetscLib, sf::PetscSF )\n\tsync_ = Ref{PetscSFWindowSyncType}()\n\n    @chk ccall(\n               (:PetscSFWindowGetSyncType, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscSFWindowSyncType}),\n               sf, sync_,\n              )\n\n\tsync = unsafe_string(sync_[])\n\n\treturn sync\nend \n\n\"\"\"\n\tPetscSFWindowSetInfo(petsclib::PetscLibType,sf::PetscSF, info::MPI_Info) \nSet the `MPI_Info` handle that will be used for subsequent windows allocation\n\nLogically Collective\n\nInput Parameters:\n- `sf`   - star forest for communication\n- `info` - `MPI_Info` handle\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PETSCSFWINDOW`, `PetscSFSetFromOptions()`, `PetscSFWindowGetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFWindowSetInfo\"))\n\"\"\"\nfunction PetscSFWindowSetInfo(petsclib::PetscLibType, sf::PetscSF, info::MPI_Info) end\n\n@for_petsc function PetscSFWindowSetInfo(petsclib::$UnionPetscLib, sf::PetscSF, info::MPI_Info )\n\n    @chk ccall(\n               (:PetscSFWindowSetInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, MPI_Info),\n               sf, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFWindowGetInfo(petsclib::PetscLibType,sf::PetscSF, info::MPI_Info) \nGet the `MPI_Info` handle used for windows allocation\n\nLogically Collective\n\nInput Parameter:\n- `sf` - star forest for communication\n\nOutput Parameter:\n- `info` - `MPI_Info` handle\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PETSCSFWINDOW`, `PetscSFSetFromOptions()`, `PetscSFWindowSetInfo()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFWindowGetInfo\"))\n\"\"\"\nfunction PetscSFWindowGetInfo(petsclib::PetscLibType, sf::PetscSF, info::MPI_Info) end\n\n@for_petsc function PetscSFWindowGetInfo(petsclib::$UnionPetscLib, sf::PetscSF, info::MPI_Info )\n\n    @chk ccall(\n               (:PetscSFWindowGetInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{MPI_Info}),\n               sf, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFSetGraphFromCoordinates(petsclib::PetscLibType,sf::PetscSF, nroots::PetscInt, nleaves::PetscInt, dim::PetscInt, tol::PetscReal, rootcoords::PetscReal, leafcoords::PetscReal) \nCreate SF by fuzzy matching leaf coordinates to root coordinates\n\nCollective\n\nInput Parameters:\n- `sf`         - PetscSF to set graph on\n- `nroots`     - number of root coordinates\n- `nleaves`    - number of leaf coordinates\n- `dim`        - spatial dimension of coordinates\n- `tol`        - positive tolerance for matching\n- `rootcoords` - array of root coordinates in which root i component d is [i*dim+d]\n- `leafcoords` - array of root coordinates in which leaf i component d is [i*dim+d]\n\n-seealso: `PetscSFCreate()`, `PetscSFSetGraph()`, `PetscSFCreateByMatchingIndices()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetGraphFromCoordinates\"))\n\"\"\"\nfunction PetscSFSetGraphFromCoordinates(petsclib::PetscLibType, sf::PetscSF, nroots::PetscInt, nleaves::PetscInt, dim::PetscInt, tol::PetscReal, rootcoords::PetscReal, leafcoords::PetscReal) end\n\n@for_petsc function PetscSFSetGraphFromCoordinates(petsclib::$UnionPetscLib, sf::PetscSF, nroots::$PetscInt, nleaves::$PetscInt, dim::$PetscInt, tol::$PetscReal, rootcoords::$PetscReal, leafcoords::$PetscReal )\n\n    @chk ccall(\n               (:PetscSFSetGraphFromCoordinates, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, $PetscInt, $PetscInt, $PetscInt, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               sf, nroots, nleaves, dim, tol, rootcoords, leafcoords,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tiloc::PetscInt = PetscSFSetGraphLayout(petsclib::PetscLibType,sf::PetscSF, layout::PetscLayout, nleaves::PetscInt, locmode::PetscCopyMode, gremote::PetscInt) \nSet a parallel star forest via global indices and a `PetscLayout`\n\nCollective\n\nInput Parameters:\n- `sf`        - star forest\n- `layout`    - `PetscLayout` defining the global space for roots\n- `nleaves`   - number of leaf vertices on the current process, each of these references a root on any process\n- `ilocal`    - locations of leaves in leafdata buffers, pass NULL for contiguous storage\n- `localmode` - copy mode for ilocal\n- `gremote`   - root vertices in global numbering corresponding to leaves in ilocal\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFGetGraphLayout()`, `PetscSFCreate()`, `PetscSFView()`, `PetscSFSetGraph()`, `PetscSFGetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetGraphLayout\"))\n\"\"\"\nfunction PetscSFSetGraphLayout(petsclib::PetscLibType, sf::PetscSF, layout::PetscLayout, nleaves::PetscInt, locmode::PetscCopyMode, gremote::PetscInt) end\n\n@for_petsc function PetscSFSetGraphLayout(petsclib::$UnionPetscLib, sf::PetscSF, layout::PetscLayout, nleaves::$PetscInt, locmode::PetscCopyMode, gremote::$PetscInt )\n\tiloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSFSetGraphLayout, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscLayout, $PetscInt, Ptr{$PetscInt}, PetscCopyMode, Ptr{$PetscInt}),\n               sf, layout, nleaves, iloc_, locmode, gremote,\n              )\n\n\tiloc = iloc_[]\n\n\treturn iloc\nend \n\n\"\"\"\n\tnleaves::PetscInt,iloc::Vector{PetscInt},gremote::Vector{PetscInt} = PetscSFGetGraphLayout(petsclib::PetscLibType,sf::PetscSF, layout::PetscLayout) \nGet the global indices and `PetscLayout` that describe this star forest\n\nCollective\n\nInput Parameter:\n- `sf` - star forest\n\nOutput Parameters:\n- `layout`  - `PetscLayout` defining the global space for roots\n- `nleaves` - number of leaf vertices on the current process, each of these references a root on any process\n- `ilocal`  - locations of leaves in leafdata buffers, or `NULL` for contiguous storage\n- `gremote` - root vertices in global numbering corresponding to leaves in ilocal\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFSetGraphLayout()`, `PetscSFCreate()`, `PetscSFView()`, `PetscSFSetGraph()`, `PetscSFGetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetGraphLayout\"))\n\"\"\"\nfunction PetscSFGetGraphLayout(petsclib::PetscLibType, sf::PetscSF, layout::PetscLayout) end\n\n@for_petsc function PetscSFGetGraphLayout(petsclib::$UnionPetscLib, sf::PetscSF, layout::PetscLayout )\n\tnleaves_ = Ref{$PetscInt}()\n\tiloc_ = Ref{Ptr{$PetscInt}}()\n\tgremote_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFGetGraphLayout, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscLayout}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               sf, layout, nleaves_, iloc_, gremote_,\n              )\n\n\tnleaves = nleaves_[]\n\tiloc = unsafe_wrap(Array, iloc_[], VecGetLocalSize(petsclib, x); own = false)\n\tgremote = unsafe_wrap(Array, gremote_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nleaves,iloc,gremote\nend \n\n\"\"\"\n\tPetscSFSetGraphSection(petsclib::PetscLibType,sf::PetscSF, locSection::PetscSection, globSection::PetscSection) \nSets the `PetscSF` graph encoding the parallel dof overlap based upon the `PetscSection` describing the data layout.\n\nInput Parameters:\n- `sf`            - The `PetscSF`\n- `localSection`  - `PetscSection` describing the local data layout\n- `globalSection` - `PetscSection` describing the global data layout\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFSetGraph()`, `PetscSFSetGraphLayout()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFSetGraphSection\"))\n\"\"\"\nfunction PetscSFSetGraphSection(petsclib::PetscLibType, sf::PetscSF, locSection::PetscSection, globSection::PetscSection) end\n\n@for_petsc function PetscSFSetGraphSection(petsclib::$UnionPetscLib, sf::PetscSF, locSection::PetscSection, globSection::PetscSection )\n\n    @chk ccall(\n               (:PetscSFSetGraphSection, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSection, PetscSection),\n               sf, locSection, globSection,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tremoteOffsets::Vector{PetscInt} = PetscSFDistributeSection(petsclib::PetscLibType,sf::PetscSF, rootSection::PetscSection, leafSection::PetscSection) \nCreate a new `PetscSection` reorganized, moving from the root to the leaves of the `PetscSF`\n\nCollective\n\nInput Parameters:\n- `sf`          - The `PetscSF`\n- `rootSection` - Section defined on root space\n\nOutput Parameters:\n- `remoteOffsets` - root offsets in leaf storage, or `NULL`, its length will be the size of the chart of `leafSection`\n- `leafSection`   - Section defined on the leaf space\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFDistributeSection\"))\n\"\"\"\nfunction PetscSFDistributeSection(petsclib::PetscLibType, sf::PetscSF, rootSection::PetscSection, leafSection::PetscSection) end\n\n@for_petsc function PetscSFDistributeSection(petsclib::$UnionPetscLib, sf::PetscSF, rootSection::PetscSection, leafSection::PetscSection )\n\tremoteOffsets_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFDistributeSection, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSection, Ptr{Ptr{$PetscInt}}, PetscSection),\n               sf, rootSection, remoteOffsets_, leafSection,\n              )\n\n\tremoteOffsets = unsafe_wrap(Array, remoteOffsets_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn remoteOffsets\nend \n\n\"\"\"\n\tremoteOffsets::Vector{PetscInt} = PetscSFCreateRemoteOffsets(petsclib::PetscLibType,sf::PetscSF, rootSection::PetscSection, leafSection::PetscSection) \nCreate offsets for point data on remote processes\n\nCollective\n\nInput Parameters:\n- `sf`          - The `PetscSF`\n- `rootSection` - Data layout of remote points for outgoing data (this is layout for roots)\n- `leafSection` - Data layout of local points for incoming data  (this is layout for leaves)\n\nOutput Parameter:\n- `remoteOffsets` - Offsets for point data on remote processes (these are offsets from the root section), or `NULL`\n\nLevel: developer\n\n-seealso: `PetscSF`, `PetscSFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateRemoteOffsets\"))\n\"\"\"\nfunction PetscSFCreateRemoteOffsets(petsclib::PetscLibType, sf::PetscSF, rootSection::PetscSection, leafSection::PetscSection) end\n\n@for_petsc function PetscSFCreateRemoteOffsets(petsclib::$UnionPetscLib, sf::PetscSF, rootSection::PetscSection, leafSection::PetscSection )\n\tremoteOffsets_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSFCreateRemoteOffsets, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSection, PetscSection, Ptr{Ptr{$PetscInt}}),\n               sf, rootSection, leafSection, remoteOffsets_,\n              )\n\n\tremoteOffsets = unsafe_wrap(Array, remoteOffsets_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn remoteOffsets\nend \n\n\"\"\"\n\tsectionSF::PetscSF = PetscSFCreateSectionSF(petsclib::PetscLibType,sf::PetscSF, rootSection::PetscSection, remoteOffsets::Vector{PetscInt}, leafSection::PetscSection) \nCreate an expanded `PetscSF` of dofs, assuming the input `PetscSF` relates points\n\nCollective\n\nInput Parameters:\n- `sf`            - The `PetscSF`\n- `rootSection`   - Data layout of remote points for outgoing data (this is usually the serial section)\n- `remoteOffsets` - Offsets for point data on remote processes (these are offsets from the root section), or NULL\n- `leafSection`   - Data layout of local points for incoming data  (this is the distributed section)\n\nOutput Parameter:\n- `sectionSF` - The new `PetscSF`\n\nLevel: advanced\n\n-seealso: `PetscSF`, `PetscSFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateSectionSF\"))\n\"\"\"\nfunction PetscSFCreateSectionSF(petsclib::PetscLibType, sf::PetscSF, rootSection::PetscSection, remoteOffsets::Vector{PetscInt}, leafSection::PetscSection) end\n\n@for_petsc function PetscSFCreateSectionSF(petsclib::$UnionPetscLib, sf::PetscSF, rootSection::PetscSection, remoteOffsets::Vector{$PetscInt}, leafSection::PetscSection )\n\tsectionSF_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateSectionSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSection, Ptr{$PetscInt}, PetscSection, Ptr{PetscSF}),\n               sf, rootSection, remoteOffsets, leafSection, sectionSF_,\n              )\n\n\tsectionSF = sectionSF_[]\n\n\treturn sectionSF\nend \n\n\"\"\"\n\tsf::PetscSF = PetscSFCreateFromLayouts(petsclib::PetscLibType,rmap::PetscLayout, lmap::PetscLayout) \nCreates a parallel star forest mapping two `PetscLayout` objects\n\nCollective\n\nInput Parameters:\n- `rmap` - `PetscLayout` defining the global root space\n- `lmap` - `PetscLayout` defining the global leaf space\n\nOutput Parameter:\n- `sf` - The parallel star forest\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFCreate()`, `PetscLayoutCreate()`, `PetscSFSetGraphLayout()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateFromLayouts\"))\n\"\"\"\nfunction PetscSFCreateFromLayouts(petsclib::PetscLibType, rmap::PetscLayout, lmap::PetscLayout) end\n\n@for_petsc function PetscSFCreateFromLayouts(petsclib::$UnionPetscLib, rmap::PetscLayout, lmap::PetscLayout )\n\tsf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateFromLayouts, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, PetscLayout, Ptr{PetscSF}),\n               rmap, lmap, sf_,\n              )\n\n\tsf = sf_[]\n\n\treturn sf\nend \n\n\"\"\"\n\tsfA::PetscSF,sf::PetscSF = PetscSFCreateByMatchingIndices(petsclib::PetscLibType,layout::PetscLayout, numRootIndices::PetscInt, rootIndices::PetscInt, rootLocalIndices::PetscInt, rootLocalOffset::PetscInt, numLeafIndices::PetscInt, leafIndices::PetscInt, leafLocalIndices::PetscInt, leafLocalOffset::PetscInt) \nCreate `PetscSF` by matching root and leaf indices\n\nCollective\n\nInput Parameters:\n- `layout`           - `PetscLayout` defining the global index space and the rank that brokers each index\n- `numRootIndices`   - size of rootIndices\n- `rootIndices`      - `PetscInt` array of global indices of which this process requests ownership\n- `rootLocalIndices` - root local index permutation (NULL if no permutation)\n- `rootLocalOffset`  - offset to be added to root local indices\n- `numLeafIndices`   - size of leafIndices\n- `leafIndices`      - `PetscInt` array of global indices with which this process requires data associated\n- `leafLocalIndices` - leaf local index permutation (NULL if no permutation)\n- `leafLocalOffset`  - offset to be added to leaf local indices\n\nOutput Parameters:\n- `sfA` - star forest representing the communication pattern from the layout space to the leaf space (NULL if not needed)\n- `sf`  - star forest representing the communication pattern from the root space to the leaf space\n\nLevel: advanced\n\nExample 1:\n-seealso: `PetscSF`, `PetscSFCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateByMatchingIndices\"))\n\"\"\"\nfunction PetscSFCreateByMatchingIndices(petsclib::PetscLibType, layout::PetscLayout, numRootIndices::PetscInt, rootIndices::PetscInt, rootLocalIndices::PetscInt, rootLocalOffset::PetscInt, numLeafIndices::PetscInt, leafIndices::PetscInt, leafLocalIndices::PetscInt, leafLocalOffset::PetscInt) end\n\n@for_petsc function PetscSFCreateByMatchingIndices(petsclib::$UnionPetscLib, layout::PetscLayout, numRootIndices::$PetscInt, rootIndices::$PetscInt, rootLocalIndices::$PetscInt, rootLocalOffset::$PetscInt, numLeafIndices::$PetscInt, leafIndices::$PetscInt, leafLocalIndices::$PetscInt, leafLocalOffset::$PetscInt )\n\tsfA_ = Ref{PetscSF}()\n\tsf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateByMatchingIndices, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, Ptr{PetscSF}, Ptr{PetscSF}),\n               layout, numRootIndices, rootIndices, rootLocalIndices, rootLocalOffset, numLeafIndices, leafIndices, leafLocalIndices, leafLocalOffset, sfA_, sf_,\n              )\n\n\tsfA = sfA_[]\n\tsf = sf_[]\n\n\treturn sfA,sf\nend \n\n\"\"\"\n\tPetscSFMerge(petsclib::PetscLibType,sfa::PetscSF, sfb::PetscSF, merged::PetscSF) \nappend/merge indices of `sfb` into `sfa`, with preference for `sfb`\n\nCollective\n\nInput Parameters:\n- `sfa` - default `PetscSF`\n- `sfb` - additional edges to add/replace edges in sfa\n\nOutput Parameter:\n- `merged` - new `PetscSF` with combined edges\n\nLevel: intermediate\n\n-seealso: `PetscSFCompose()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFMerge\"))\n\"\"\"\nfunction PetscSFMerge(petsclib::PetscLibType, sfa::PetscSF, sfb::PetscSF, merged::PetscSF) end\n\n@for_petsc function PetscSFMerge(petsclib::$UnionPetscLib, sfa::PetscSF, sfb::PetscSF, merged::PetscSF )\n\n    @chk ccall(\n               (:PetscSFMerge, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, PetscSF, Ptr{PetscSF}),\n               sfa, sfb, merged,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvsf::PetscSF = PetscSFCreateStridedSF(petsclib::PetscLibType,sf::PetscSF, bs::PetscInt, ldr::PetscInt, ldl::PetscInt) \nCreate an `PetscSF` to communicate interleaved blocks of data\n\nCollective\n\nInput Parameters:\n- `sf`  - star forest\n- `bs`  - stride\n- `ldr` - leading dimension of root space\n- `ldl` - leading dimension of leaf space\n\nOutput Parameter:\n- `vsf` - the new `PetscSF`\n\nLevel: intermediate\n\n-seealso: `PetscSF`, `PetscSFCreate()`, `PetscSFSetGraph()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateStridedSF\"))\n\"\"\"\nfunction PetscSFCreateStridedSF(petsclib::PetscLibType, sf::PetscSF, bs::PetscInt, ldr::PetscInt, ldl::PetscInt) end\n\n@for_petsc function PetscSFCreateStridedSF(petsclib::$UnionPetscLib, sf::PetscSF, bs::$PetscInt, ldr::$PetscInt, ldl::$PetscInt )\n\tvsf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateStridedSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, $PetscInt, $PetscInt, $PetscInt, Ptr{PetscSF}),\n               sf, bs, ldr, ldl, vsf_,\n              )\n\n\tvsf = vsf_[]\n\n\treturn vsf\nend \n\n\"\"\"\n\tPetscSFGetSubSF(petsclib::PetscLibType,mainsf::PetscSF, map::ISLocalToGlobalMapping, subSF::PetscSF) \nReturns an `PetscSF` for a specific subset of points. Leaves are re\n\nCollective\n\nInput Parameters:\n- `mainsf` - `PetscSF` structure\n- `map`    - a `ISLocalToGlobalMapping` that contains the subset of points\n\nOutput Parameter:\n- `subSF` - a subset of the `mainSF` for the desired subset.\n\nLevel: intermediate\n\n-seealso: `PetscSF`\n\n# External Links\n$(_doc_external(\"DM/PetscSFGetSubSF\"))\n\"\"\"\nfunction PetscSFGetSubSF(petsclib::PetscLibType, mainsf::PetscSF, map::ISLocalToGlobalMapping, subSF::PetscSF) end\n\n@for_petsc function PetscSFGetSubSF(petsclib::$UnionPetscLib, mainsf::PetscSF, map::ISLocalToGlobalMapping, subSF::PetscSF )\n\n    @chk ccall(\n               (:PetscSFGetSubSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, ISLocalToGlobalMapping, Ptr{PetscSF}),\n               mainsf, map, subSF,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSFGetRanks(petsclib::PetscLibType,sf::PetscSF, nranks::PetscMPIInt, ranks::PetscMPIInt, roffset::PetscInt, rmine::PetscInt, rremote::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/PetscSFGetRanks\"))\n\"\"\"\nfunction PetscSFGetRanks(petsclib::PetscLibType, sf::PetscSF, nranks::PetscMPIInt, ranks::PetscMPIInt, roffset::PetscInt, rmine::PetscInt, rremote::PetscInt) end\n\n@for_petsc function PetscSFGetRanks(petsclib::$UnionPetscLib, sf::PetscSF, nranks::PetscMPIInt, ranks::PetscMPIInt, roffset::$PetscInt, rmine::$PetscInt, rremote::$PetscInt )\n\n    @chk ccall(\n               (:PetscSFGetRanks, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, Ptr{PetscMPIInt}, PetscMPIInt, $PetscInt, $PetscInt, $PetscInt),\n               sf, nranks, ranks, roffset, rmine, rremote,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tselected::PetscInt,esf::PetscSF = PetscSFCreateEmbeddedSF(petsclib::PetscLibType,sf::PetscSF, nselected::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/PetscSFCreateEmbeddedSF\"))\n\"\"\"\nfunction PetscSFCreateEmbeddedSF(petsclib::PetscLibType, sf::PetscSF, nselected::PetscInt) end\n\n@for_petsc function PetscSFCreateEmbeddedSF(petsclib::$UnionPetscLib, sf::PetscSF, nselected::$PetscInt )\n\tselected_ = Ref{$PetscInt}()\n\tesf_ = Ref{PetscSF}()\n\n    @chk ccall(\n               (:PetscSFCreateEmbeddedSF, $petsc_library),\n               PetscErrorCode,\n               (PetscSF, $PetscInt, Ptr{$PetscInt}, Ptr{PetscSF}),\n               sf, nselected, selected_, esf_,\n              )\n\n\tselected = selected_[]\n\tesf = esf_[]\n\n\treturn selected,esf\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscSection_wrappers.jl",
    "content": "mutable struct _p_PetscSectionSym end\nconst PetscSectionSym = Ptr{_p_PetscSectionSym}\n\n\n\"\"\"\n\tPetscSectionCreate(petsclib::PetscLibType,comm::MPI_Comm, s::PetscSection) \nAllocates a `PetscSection` and sets the map contents to the default.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `s`    - pointer to the section\n\nLevel: beginner\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetChart()`, `PetscSectionDestroy()`, `PetscSectionCreateGlobalSection()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreate\"))\n\"\"\"\nfunction PetscSectionCreate(petsclib::PetscLibType, comm::MPI_Comm, s::PetscSection) end\n\n# Convenience method: accept a Ref so callers can pass `Ref{PetscSection}()` directly\n@for_petsc function PetscSectionCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, s::Ref{PetscSection} )\n\n    @chk ccall(\n               (:PetscSectionCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscSection}),\n               comm, s,\n              )\n\n\n\treturn nothing\nend\n\n@for_petsc function PetscSectionCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, s::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscSection}),\n               comm, s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionCopy(petsclib::PetscLibType,section::PetscSection, newSection::PetscSection) \nCreates a shallow (if possible) copy of the `PetscSection`\n\nCollective\n\nInput Parameter:\n- `section` - the `PetscSection`\n\nOutput Parameter:\n- `newSection` - the copy\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCopy\"))\n\"\"\"\nfunction PetscSectionCopy(petsclib::PetscLibType, section::PetscSection, newSection::PetscSection) end\n\n@for_petsc function PetscSectionCopy(petsclib::$UnionPetscLib, section::PetscSection, newSection::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionCopy, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscSection),\n               section, newSection,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionClone(petsclib::PetscLibType,section::PetscSection, newSection::PetscSection) \nCreates a shallow (if possible) copy of the `PetscSection`\n\nCollective\n\nInput Parameter:\n- `section` - the `PetscSection`\n\nOutput Parameter:\n- `newSection` - the copy\n\nLevel: beginner\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionDestroy()`, `PetscSectionCopy()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionClone\"))\n\"\"\"\nfunction PetscSectionClone(petsclib::PetscLibType, section::PetscSection, newSection::PetscSection) end\n\n@for_petsc function PetscSectionClone(petsclib::$UnionPetscLib, section::PetscSection, newSection::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionClone, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{PetscSection}),\n               section, newSection,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetFromOptions(petsclib::PetscLibType,s::PetscSection) \nsets parameters in a `PetscSection` from the options database\n\nCollective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOptions Database Key:\n- `-petscsection_point_major` - `PETSC_TRUE` for point-major order\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFromOptions\"))\n\"\"\"\nfunction PetscSectionSetFromOptions(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionSetFromOptions(petsclib::$UnionPetscLib, s::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscSection,),\n               s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcongruent::PetscBool = PetscSectionCompare(petsclib::PetscLibType,s1::PetscSection, s2::PetscSection) \nCompares two sections\n\nCollective\n\nInput Parameters:\n- `s1` - the first `PetscSection`\n- `s2` - the second `PetscSection`\n\nOutput Parameter:\n- `congruent` - `PETSC_TRUE` if the two sections are congruent, `PETSC_FALSE` otherwise\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionCopy()`, `PetscSectionClone()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCompare\"))\n\"\"\"\nfunction PetscSectionCompare(petsclib::PetscLibType, s1::PetscSection, s2::PetscSection) end\n\n@for_petsc function PetscSectionCompare(petsclib::$UnionPetscLib, s1::PetscSection, s2::PetscSection )\n\tcongruent_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSectionCompare, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscSection, Ptr{PetscBool}),\n               s1, s2, congruent_,\n              )\n\n\tcongruent = congruent_[]\n\n\treturn congruent\nend \n\n\"\"\"\n\tnumFields::PetscInt = PetscSectionGetNumFields(petsclib::PetscLibType,s::PetscSection) \nReturns the number of fields in a `PetscSection`, or 0 if no fields were defined.\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `numFields` - the number of fields defined, or 0 if none were defined\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetNumFields()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetNumFields\"))\n\"\"\"\nfunction PetscSectionGetNumFields(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetNumFields(petsclib::$UnionPetscLib, s::PetscSection )\n\tnumFields_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetNumFields, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{$PetscInt}),\n               s, numFields_,\n              )\n\n\tnumFields = numFields_[]\n\n\treturn numFields\nend \n\n\"\"\"\n\tPetscSectionSetNumFields(petsclib::PetscLibType,s::PetscSection, numFields::PetscInt) \nSets the number of fields in a `PetscSection`\n\nNot Collective\n\nInput Parameters:\n- `s`         - the `PetscSection`\n- `numFields` - the number of fields\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetNumFields()`, `PetscSectionSetChart()`, `PetscSectionReset()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetNumFields\"))\n\"\"\"\nfunction PetscSectionSetNumFields(petsclib::PetscLibType, s::PetscSection, numFields::PetscInt) end\n\n@for_petsc function PetscSectionSetNumFields(petsclib::$UnionPetscLib, s::PetscSection, numFields::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetNumFields, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt),\n               s, numFields,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetFieldName(petsclib::PetscLibType,s::PetscSection, field::PetscInt, fieldName::String) \nReturns the name of a field in the `PetscSection`\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `field` - the field number\n\nOutput Parameter:\n- `fieldName` - the field name\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetFieldName()`, `PetscSectionSetNumFields()`, `PetscSectionGetNumFields()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldName\"))\n\"\"\"\nfunction PetscSectionGetFieldName(petsclib::PetscLibType, s::PetscSection, field::PetscInt, fieldName::String) end\n\n@for_petsc function PetscSectionGetFieldName(petsclib::$UnionPetscLib, s::PetscSection, field::$PetscInt, fieldName::String )\n\tfieldName_ = Ref(pointer(fieldName))\n\n    @chk ccall(\n               (:PetscSectionGetFieldName, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{Ptr{Cchar}}),\n               s, field, fieldName_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetFieldName(petsclib::PetscLibType,s::PetscSection, field::PetscInt, fieldName::String) \nSets the name of a field in the `PetscSection`\n\nNot Collective\n\nInput Parameters:\n- `s`         - the `PetscSection`\n- `field`     - the field number\n- `fieldName` - the field name\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionGetFieldName()`, `PetscSectionSetNumFields()`, `PetscSectionGetNumFields()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFieldName\"))\n\"\"\"\nfunction PetscSectionSetFieldName(petsclib::PetscLibType, s::PetscSection, field::PetscInt, fieldName::String) end\n\n@for_petsc function PetscSectionSetFieldName(petsclib::$UnionPetscLib, s::PetscSection, field::$PetscInt, fieldName::String )\n\n    @chk ccall(\n               (:PetscSectionSetFieldName, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{Cchar}),\n               s, field, fieldName,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetComponentName(petsclib::PetscLibType,s::PetscSection, field::PetscInt, comp::PetscInt, compName::String) \nGets the name of a field component in the `PetscSection`\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `field` - the field number\n- `comp`  - the component number\n\nOutput Parameter:\n- `compName` - the component name\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetFieldName()`, `PetscSectionSetNumFields()`, `PetscSectionGetNumFields()`,\n`PetscSectionSetComponentName()`, `PetscSectionSetFieldName()`, `PetscSectionGetFieldComponents()`, `PetscSectionSetFieldComponents()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetComponentName\"))\n\"\"\"\nfunction PetscSectionGetComponentName(petsclib::PetscLibType, s::PetscSection, field::PetscInt, comp::PetscInt, compName::String) end\n\n@for_petsc function PetscSectionGetComponentName(petsclib::$UnionPetscLib, s::PetscSection, field::$PetscInt, comp::$PetscInt, compName::String )\n\tcompName_ = Ref(pointer(compName))\n\n    @chk ccall(\n               (:PetscSectionGetComponentName, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{Ptr{Cchar}}),\n               s, field, comp, compName_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetComponentName(petsclib::PetscLibType,s::PetscSection, field::PetscInt, comp::PetscInt, compName::String) \nSets the name of a field component in the `PetscSection`\n\nNot Collective\n\nInput Parameters:\n- `s`        - the `PetscSection`\n- `field`    - the field number\n- `comp`     - the component number\n- `compName` - the component name\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetComponentName()`, `PetscSectionSetNumFields()`, `PetscSectionGetNumFields()`,\n`PetscSectionSetFieldName()`, `PetscSectionGetFieldComponents()`, `PetscSectionSetFieldComponents()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetComponentName\"))\n\"\"\"\nfunction PetscSectionSetComponentName(petsclib::PetscLibType, s::PetscSection, field::PetscInt, comp::PetscInt, compName::String) end\n\n@for_petsc function PetscSectionSetComponentName(petsclib::$UnionPetscLib, s::PetscSection, field::$PetscInt, comp::$PetscInt, compName::String )\n\n    @chk ccall(\n               (:PetscSectionSetComponentName, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{Cchar}),\n               s, field, comp, compName,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumComp::PetscInt = PetscSectionGetFieldComponents(petsclib::PetscLibType,s::PetscSection, field::PetscInt) \nReturns the number of field components for the given field.\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `field` - the field number\n\nOutput Parameter:\n- `numComp` - the number of field components\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetFieldComponents()`, `PetscSectionGetNumFields()`,\n`PetscSectionSetComponentName()`, `PetscSectionGetComponentName()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldComponents\"))\n\"\"\"\nfunction PetscSectionGetFieldComponents(petsclib::PetscLibType, s::PetscSection, field::PetscInt) end\n\n@for_petsc function PetscSectionGetFieldComponents(petsclib::$UnionPetscLib, s::PetscSection, field::$PetscInt )\n\tnumComp_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetFieldComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}),\n               s, field, numComp_,\n              )\n\n\tnumComp = numComp_[]\n\n\treturn numComp\nend \n\n\"\"\"\n\tPetscSectionSetFieldComponents(petsclib::PetscLibType,s::PetscSection, field::PetscInt, numComp::PetscInt) \nSets the number of field components for the given field.\n\nNot Collective\n\nInput Parameters:\n- `s`       - the `PetscSection`\n- `field`   - the field number\n- `numComp` - the number of field components\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetFieldComponents()`, `PetscSectionSetComponentName()`,\n`PetscSectionGetComponentName()`, `PetscSectionGetNumFields()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFieldComponents\"))\n\"\"\"\nfunction PetscSectionSetFieldComponents(petsclib::PetscLibType, s::PetscSection, field::PetscInt, numComp::PetscInt) end\n\n@for_petsc function PetscSectionSetFieldComponents(petsclib::$UnionPetscLib, s::PetscSection, field::$PetscInt, numComp::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetFieldComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt),\n               s, field, numComp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpStart::PetscInt,pEnd::PetscInt = PetscSectionGetChart(petsclib::PetscLibType,s::PetscSection) \nReturns the range [`pStart`, `pEnd`) in which points (indices) lie for this `PetscSection` on this MPI process\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameters:\n- `pStart` - the first point\n- `pEnd`   - one past the last point\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetChart()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetChart\"))\n\"\"\"\nfunction PetscSectionGetChart(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetChart(petsclib::$UnionPetscLib, s::PetscSection )\n\tpStart_ = Ref{$PetscInt}()\n\tpEnd_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetChart, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               s, pStart_, pEnd_,\n              )\n\n\tpStart = pStart_[]\n\tpEnd = pEnd_[]\n\n\treturn pStart,pEnd\nend \n\n\"\"\"\n\tPetscSectionSetChart(petsclib::PetscLibType,s::PetscSection, pStart::PetscInt, pEnd::PetscInt) \nSets the range [`pStart`, `pEnd`) in which points (indices) lie for this `PetscSection` on this MPI process\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `pStart` - the first point\n- `pEnd`   - one past the last point, `pStart`  ≤  `pEnd`\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetChart()`, `PetscSectionCreate()`, `PetscSectionSetNumFields()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetChart\"))\n\"\"\"\nfunction PetscSectionSetChart(petsclib::PetscLibType, s::PetscSection, pStart::PetscInt, pEnd::PetscInt) end\n\n@for_petsc function PetscSectionSetChart(petsclib::$UnionPetscLib, s::PetscSection, pStart::$PetscInt, pEnd::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetChart, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt),\n               s, pStart, pEnd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetPermutation(petsclib::PetscLibType,s::PetscSection, perm::IS) \nReturns the permutation of [0, `pEnd`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `perm` - The permutation as an `IS`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `PetscSection`, `PetscSectionSetPermutation()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetPermutation\"))\n\"\"\"\nfunction PetscSectionGetPermutation(petsclib::PetscLibType, s::PetscSection, perm::IS) end\n\n@for_petsc function PetscSectionGetPermutation(petsclib::$UnionPetscLib, s::PetscSection, perm::IS )\n\tperm_ = Ref(perm.ptr)\n\n    @chk ccall(\n               (:PetscSectionGetPermutation, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{CIS}),\n               s, perm_,\n              )\n\n\tperm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetPermutation(petsclib::PetscLibType,s::PetscSection, perm::IS) \nSets a permutation of the chart for this section, [0, `pEnd`\n\nNot Collective\n\nInput Parameters:\n- `s`    - the `PetscSection`\n- `perm` - the permutation of points\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `PetscSection`, `PetscSectionSetUp()`, `PetscSectionGetPermutation()`, `PetscSectionPermute()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetPermutation\"))\n\"\"\"\nfunction PetscSectionSetPermutation(petsclib::PetscLibType, s::PetscSection, perm::IS) end\n\n@for_petsc function PetscSectionSetPermutation(petsclib::$UnionPetscLib, s::PetscSection, perm::IS )\n\n    @chk ccall(\n               (:PetscSectionSetPermutation, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, CIS),\n               s, perm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetBlockStarts(petsclib::PetscLibType,s::PetscSection, blockStarts::PetscBT) \nReturns a table indicating which points start new blocks\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `blockStarts` - The `PetscBT` with a 1 for each point that begins a block\n\n-seealso: [](sec_scatter), `IS`, `PetscSection`, `PetscSectionSetBlockStarts()`, `PetscSectionCreate()`, `DMCreateMatrix()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetBlockStarts\"))\n\"\"\"\nfunction PetscSectionGetBlockStarts(petsclib::PetscLibType, s::PetscSection, blockStarts::PetscBT) end\n\n@for_petsc function PetscSectionGetBlockStarts(petsclib::$UnionPetscLib, s::PetscSection, blockStarts::PetscBT )\n\n    @chk ccall(\n               (:PetscSectionGetBlockStarts, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{PetscBT}),\n               s, blockStarts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetBlockStarts(petsclib::PetscLibType,s::PetscSection, blockStarts::PetscBT) \nSets a table indicating which points start new blocks\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `s`           - the `PetscSection`\n- `blockStarts` - The `PetscBT` with a 1 for each point that begins a block\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `IS`, `PetscSection`, `PetscSectionGetBlockStarts()`, `PetscSectionCreate()`, `DMCreateMatrix()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetBlockStarts\"))\n\"\"\"\nfunction PetscSectionSetBlockStarts(petsclib::PetscLibType, s::PetscSection, blockStarts::PetscBT) end\n\n@for_petsc function PetscSectionSetBlockStarts(petsclib::$UnionPetscLib, s::PetscSection, blockStarts::PetscBT )\n\n    @chk ccall(\n               (:PetscSectionSetBlockStarts, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscBT),\n               s, blockStarts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpm::PetscBool = PetscSectionGetPointMajor(petsclib::PetscLibType,s::PetscSection) \nReturns the flag for dof ordering, `PETSC_TRUE` if it is point major, `PETSC_FALSE` if it is field major\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `pm` - the flag for point major ordering\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetPointMajor()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetPointMajor\"))\n\"\"\"\nfunction PetscSectionGetPointMajor(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetPointMajor(petsclib::$UnionPetscLib, s::PetscSection )\n\tpm_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSectionGetPointMajor, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{PetscBool}),\n               s, pm_,\n              )\n\n\tpm = pm_[]\n\n\treturn pm\nend \n\n\"\"\"\n\tPetscSectionSetPointMajor(petsclib::PetscLibType,s::PetscSection, pm::PetscBool) \nSets the flag for dof ordering, `PETSC_TRUE` for point major, otherwise it will be field major\n\nNot Collective\n\nInput Parameters:\n- `s`  - the `PetscSection`\n- `pm` - the flag for point major ordering\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetPointMajor()`, `PetscSectionSetPermutation()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetPointMajor\"))\n\"\"\"\nfunction PetscSectionSetPointMajor(petsclib::PetscLibType, s::PetscSection, pm::PetscBool) end\n\n@for_petsc function PetscSectionSetPointMajor(petsclib::$UnionPetscLib, s::PetscSection, pm::PetscBool )\n\n    @chk ccall(\n               (:PetscSectionSetPointMajor, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscBool),\n               s, pm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tincludesConstraints::PetscBool = PetscSectionGetIncludesConstraints(petsclib::PetscLibType,s::PetscSection) \nReturns the flag indicating if constrained dofs were included when computing offsets in the `PetscSection`.\nThe value is set with `PetscSectionSetIncludesConstraints()`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `includesConstraints` - the flag indicating if constrained dofs were included when computing offsets\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetIncludesConstraints()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetIncludesConstraints\"))\n\"\"\"\nfunction PetscSectionGetIncludesConstraints(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetIncludesConstraints(petsclib::$UnionPetscLib, s::PetscSection )\n\tincludesConstraints_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSectionGetIncludesConstraints, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{PetscBool}),\n               s, includesConstraints_,\n              )\n\n\tincludesConstraints = includesConstraints_[]\n\n\treturn includesConstraints\nend \n\n\"\"\"\n\tPetscSectionSetIncludesConstraints(petsclib::PetscLibType,s::PetscSection, includesConstraints::PetscBool) \nSets the flag indicating if constrained dofs are to be included when computing offsets\n\nNot Collective\n\nInput Parameters:\n- `s`                   - the `PetscSection`\n- `includesConstraints` - the flag indicating if constrained dofs are to be included when computing offsets\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetIncludesConstraints()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetIncludesConstraints\"))\n\"\"\"\nfunction PetscSectionSetIncludesConstraints(petsclib::PetscLibType, s::PetscSection, includesConstraints::PetscBool) end\n\n@for_petsc function PetscSectionSetIncludesConstraints(petsclib::$UnionPetscLib, s::PetscSection, includesConstraints::PetscBool )\n\n    @chk ccall(\n               (:PetscSectionSetIncludesConstraints, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscBool),\n               s, includesConstraints,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumDof::PetscInt = PetscSectionGetDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt) \nReturn the total number of degrees of freedom associated with a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `point` - the point\n\nOutput Parameter:\n- `numDof` - the number of dof\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetDof\"))\n\"\"\"\nfunction PetscSectionGetDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt) end\n\n@for_petsc function PetscSectionGetDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt )\n\tnumDof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}),\n               s, point, numDof_,\n              )\n\n\tnumDof = numDof_[]\n\n\treturn numDof\nend \n\n\"\"\"\n\tPetscSectionSetDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, numDof::PetscInt) \nSets the total number of degrees of freedom associated with a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `numDof` - the number of dof, these values may be negative -(dof+1) to indicate they are off process\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetDof()`, `PetscSectionAddDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetDof\"))\n\"\"\"\nfunction PetscSectionSetDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionSetDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt),\n               s, point, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionAddDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, numDof::PetscInt) \nAdds to the total number of degrees of freedom associated with a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `numDof` - the number of additional dof\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetDof()`, `PetscSectionSetDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionAddDof\"))\n\"\"\"\nfunction PetscSectionAddDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionAddDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionAddDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt),\n               s, point, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumDof::PetscInt = PetscSectionGetFieldDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt) \nReturn the number of degrees of freedom associated with a field on a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `point` - the point\n- `field` - the field\n\nOutput Parameter:\n- `numDof` - the number of dof\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetFieldDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldDof\"))\n\"\"\"\nfunction PetscSectionGetFieldDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt) end\n\n@for_petsc function PetscSectionGetFieldDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt )\n\tnumDof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetFieldDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               s, point, field, numDof_,\n              )\n\n\tnumDof = numDof_[]\n\n\treturn numDof\nend \n\n\"\"\"\n\tPetscSectionSetFieldDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) \nSets the number of degrees of freedom associated with a field on a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `field`  - the field\n- `numDof` - the number of dof, these values may be negative -(dof+1) to indicate they are off process\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetFieldDof()`, `PetscSectionCreate()`, `PetscSectionAddDof()`, `PetscSectionSetDof()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFieldDof\"))\n\"\"\"\nfunction PetscSectionSetFieldDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionSetFieldDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetFieldDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, $PetscInt),\n               s, point, field, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionAddFieldDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) \nAdds a number of degrees of freedom associated with a field on a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `field`  - the field\n- `numDof` - the number of dof\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetFieldDof()`, `PetscSectionGetFieldDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionAddFieldDof\"))\n\"\"\"\nfunction PetscSectionAddFieldDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionAddFieldDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionAddFieldDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, $PetscInt),\n               s, point, field, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumDof::PetscInt = PetscSectionGetConstraintDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt) \nReturn the number of constrained degrees of freedom associated with a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `point` - the point\n\nOutput Parameter:\n- `numDof` - the number of dof which are fixed by constraints\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetDof()`, `PetscSectionSetConstraintDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetConstraintDof\"))\n\"\"\"\nfunction PetscSectionGetConstraintDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt) end\n\n@for_petsc function PetscSectionGetConstraintDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt )\n\tnumDof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetConstraintDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}),\n               s, point, numDof_,\n              )\n\n\tnumDof = numDof_[]\n\n\treturn numDof\nend \n\n\"\"\"\n\tPetscSectionSetConstraintDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, numDof::PetscInt) \nSet the number of constrained degrees of freedom associated with a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `numDof` - the number of dof which are fixed by constraints\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetDof()`, `PetscSectionGetConstraintDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetConstraintDof\"))\n\"\"\"\nfunction PetscSectionSetConstraintDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionSetConstraintDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetConstraintDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt),\n               s, point, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionAddConstraintDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, numDof::PetscInt) \nIncrement the number of constrained degrees of freedom associated with a given point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `numDof` - the number of additional dof which are fixed by constraints\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionAddDof()`, `PetscSectionGetConstraintDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionAddConstraintDof\"))\n\"\"\"\nfunction PetscSectionAddConstraintDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionAddConstraintDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionAddConstraintDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt),\n               s, point, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumDof::PetscInt = PetscSectionGetFieldConstraintDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt) \nReturn the number of constrained degrees of freedom associated with a given field on a point.\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `point` - the point\n- `field` - the field\n\nOutput Parameter:\n- `numDof` - the number of dof which are fixed by constraints\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetDof()`, `PetscSectionSetFieldConstraintDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldConstraintDof\"))\n\"\"\"\nfunction PetscSectionGetFieldConstraintDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt) end\n\n@for_petsc function PetscSectionGetFieldConstraintDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt )\n\tnumDof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetFieldConstraintDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               s, point, field, numDof_,\n              )\n\n\tnumDof = numDof_[]\n\n\treturn numDof\nend \n\n\"\"\"\n\tPetscSectionSetFieldConstraintDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) \nSet the number of constrained degrees of freedom associated with a given field on a point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `field`  - the field\n- `numDof` - the number of dof which are fixed by constraints\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetDof()`, `PetscSectionGetFieldConstraintDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFieldConstraintDof\"))\n\"\"\"\nfunction PetscSectionSetFieldConstraintDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionSetFieldConstraintDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetFieldConstraintDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, $PetscInt),\n               s, point, field, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionAddFieldConstraintDof(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) \nIncrement the number of constrained degrees of freedom associated with a given field on a point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `field`  - the field\n- `numDof` - the number of additional dof which are fixed by constraints\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionAddDof()`, `PetscSectionGetFieldConstraintDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionAddFieldConstraintDof\"))\n\"\"\"\nfunction PetscSectionAddFieldConstraintDof(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt, numDof::PetscInt) end\n\n@for_petsc function PetscSectionAddFieldConstraintDof(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt, numDof::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionAddFieldConstraintDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, $PetscInt),\n               s, point, field, numDof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetUpBC(petsclib::PetscLibType,s::PetscSection) \nSetup the subsections describing boundary conditions.\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSetUp()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetUpBC\"))\n\"\"\"\nfunction PetscSectionSetUpBC(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionSetUpBC(petsclib::$UnionPetscLib, s::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionSetUpBC, $petsc_library),\n               PetscErrorCode,\n               (PetscSection,),\n               s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetUp(petsclib::PetscLibType,s::PetscSection) \nCalculate offsets based upon the number of degrees of freedom for each point in preparation for use of the `PetscSection`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionSetPermutation()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetUp\"))\n\"\"\"\nfunction PetscSectionSetUp(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionSetUp(petsclib::$UnionPetscLib, s::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscSection,),\n               s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxDof::PetscInt = PetscSectionGetMaxDof(petsclib::PetscLibType,s::PetscSection) \nReturn the maximum number of degrees of freedom on any point in the `PetscSection`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `maxDof` - the maximum dof\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetDof()`, `PetscSectionSetDof()`, `PetscSectionAddDof()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetMaxDof\"))\n\"\"\"\nfunction PetscSectionGetMaxDof(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetMaxDof(petsclib::$UnionPetscLib, s::PetscSection )\n\tmaxDof_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetMaxDof, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{$PetscInt}),\n               s, maxDof_,\n              )\n\n\tmaxDof = maxDof_[]\n\n\treturn maxDof\nend \n\n\"\"\"\n\tsize::PetscInt = PetscSectionGetStorageSize(petsclib::PetscLibType,s::PetscSection) \nReturn the size of an array or local `Vec` capable of holding all the degrees of freedom defined in a `PetscSection`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `size` - the size of an array which can hold all the dofs\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetOffset()`, `PetscSectionGetConstrainedStorageSize()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetStorageSize\"))\n\"\"\"\nfunction PetscSectionGetStorageSize(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetStorageSize(petsclib::$UnionPetscLib, s::PetscSection )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetStorageSize, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{$PetscInt}),\n               s, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tsize::PetscInt = PetscSectionGetConstrainedStorageSize(petsclib::PetscLibType,s::PetscSection) \nReturn the size of an array or local `Vec` capable of holding all unconstrained degrees of freedom in a `PetscSection`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameter:\n- `size` - the size of an array which can hold all unconstrained dofs\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetStorageSize()`, `PetscSectionGetOffset()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetConstrainedStorageSize\"))\n\"\"\"\nfunction PetscSectionGetConstrainedStorageSize(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetConstrainedStorageSize(petsclib::$UnionPetscLib, s::PetscSection )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetConstrainedStorageSize, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{$PetscInt}),\n               s, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tgsection::PetscSection = PetscSectionCreateGlobalSection(petsclib::PetscLibType,s::PetscSection, sf::PetscSF, usePermutation::PetscBool, includeConstraints::PetscBool, locOffsets::PetscBool) \nCreate a parallel section describing the global layout using\na local (sequential) `PetscSection` on each MPI process and a `PetscSF` describing the section point overlap.\n\nInput Parameters:\n- `s`                  - The `PetscSection` for the local field layout\n- `sf`                 - The `PetscSF` describing parallel layout of the section points (leaves are unowned local points)\n- `usePermutation`     - By default this is `PETSC_TRUE`, meaning any permutation of the local section is transferred to the global section\n- `includeConstraints` - By default this is `PETSC_FALSE`, meaning that the global field vector will not possess constrained dofs\n- `localOffsets`       - If `PETSC_TRUE`, use local rather than global offsets for the points\n\nOutput Parameter:\n- `gsection` - The `PetscSection` for the global field layout\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionCreateGlobalSectionCensored()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreateGlobalSection\"))\n\"\"\"\nfunction PetscSectionCreateGlobalSection(petsclib::PetscLibType, s::PetscSection, sf::PetscSF, usePermutation::PetscBool, includeConstraints::PetscBool, locOffsets::PetscBool) end\n\n@for_petsc function PetscSectionCreateGlobalSection(petsclib::$UnionPetscLib, s::PetscSection, sf::PetscSF, usePermutation::PetscBool, includeConstraints::PetscBool, locOffsets::PetscBool )\n\tgsection_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateGlobalSection, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscSF, PetscBool, PetscBool, PetscBool, Ptr{PetscSection}),\n               s, sf, usePermutation, includeConstraints, locOffsets, gsection_,\n              )\n\n\tgsection = gsection_[]\n\n\treturn gsection\nend \n\n\"\"\"\n\tgsection::PetscSection = PetscSectionCreateGlobalSectionCensored(petsclib::PetscLibType,s::PetscSection, sf::PetscSF, includeConstraints::PetscBool, numExcludes::PetscInt, excludes::Vector{PetscInt}) \nCreate a `PetscSection` describing the globallayout using\na local (sequential) `PetscSection` on each MPI process and an `PetscSF` describing the section point overlap.\n\nInput Parameters:\n- `s`                  - The `PetscSection` for the local field layout\n- `sf`                 - The `PetscSF` describing parallel layout of the section points\n- `includeConstraints` - By default this is `PETSC_FALSE`, meaning that the global vector will not possess constrained dofs\n- `numExcludes`        - The number of exclusion ranges, this must have the same value on all MPI processes\n- `excludes`           - An array [start_0, end_0, start_1, end_1, ...] where there are `numExcludes` pairs and must have the same values on all MPI processes\n\nOutput Parameter:\n- `gsection` - The `PetscSection` for the global field layout\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreateGlobalSectionCensored\"))\n\"\"\"\nfunction PetscSectionCreateGlobalSectionCensored(petsclib::PetscLibType, s::PetscSection, sf::PetscSF, includeConstraints::PetscBool, numExcludes::PetscInt, excludes::Vector{PetscInt}) end\n\n@for_petsc function PetscSectionCreateGlobalSectionCensored(petsclib::$UnionPetscLib, s::PetscSection, sf::PetscSF, includeConstraints::PetscBool, numExcludes::$PetscInt, excludes::Vector{$PetscInt} )\n\tgsection_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateGlobalSectionCensored, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscSF, PetscBool, $PetscInt, Ptr{$PetscInt}, Ptr{PetscSection}),\n               s, sf, includeConstraints, numExcludes, excludes, gsection_,\n              )\n\n\tgsection = gsection_[]\n\n\treturn gsection\nend \n\n\"\"\"\n\tPetscSectionGetPointLayout(petsclib::PetscLibType,comm::MPI_Comm, s::PetscSection, layout::PetscLayout) \nGet a `PetscLayout` for the points with nonzero dof counts of the unnamed default field within this `PetscSection`s local chart\n\nCollective\n\nInput Parameters:\n- `comm` - The `MPI_Comm`\n- `s`    - The `PetscSection`\n\nOutput Parameter:\n- `layout` - The point layout for the data that defines the section\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetValueLayout()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetPointLayout\"))\n\"\"\"\nfunction PetscSectionGetPointLayout(petsclib::PetscLibType, comm::MPI_Comm, s::PetscSection, layout::PetscLayout) end\n\n@for_petsc function PetscSectionGetPointLayout(petsclib::$UnionPetscLib, comm::MPI_Comm, s::PetscSection, layout::PetscLayout )\n\n    @chk ccall(\n               (:PetscSectionGetPointLayout, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscSection, Ptr{PetscLayout}),\n               comm, s, layout,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetValueLayout(petsclib::PetscLibType,comm::MPI_Comm, s::PetscSection, layout::PetscLayout) \nGet the `PetscLayout` associated with the section dofs of a `PetscSection`\n\nCollective\n\nInput Parameters:\n- `comm` - The `MPI_Comm`\n- `s`    - The `PetscSection`\n\nOutput Parameter:\n- `layout` - The dof layout for the section\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetPointLayout()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetValueLayout\"))\n\"\"\"\nfunction PetscSectionGetValueLayout(petsclib::PetscLibType, comm::MPI_Comm, s::PetscSection, layout::PetscLayout) end\n\n@for_petsc function PetscSectionGetValueLayout(petsclib::$UnionPetscLib, comm::MPI_Comm, s::PetscSection, layout::PetscLayout )\n\n    @chk ccall(\n               (:PetscSectionGetValueLayout, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscSection, Ptr{PetscLayout}),\n               comm, s, layout,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toffset::PetscInt = PetscSectionGetOffset(petsclib::PetscLibType,s::PetscSection, point::PetscInt) \nReturn the offset into an array or `Vec` for the dof associated with the given point.\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `point` - the point\n\nOutput Parameter:\n- `offset` - the offset\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetFieldOffset()`, `PetscSectionCreate()`, `PetscSectionSetPointMajor()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetOffset\"))\n\"\"\"\nfunction PetscSectionGetOffset(petsclib::PetscLibType, s::PetscSection, point::PetscInt) end\n\n@for_petsc function PetscSectionGetOffset(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt )\n\toffset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}),\n               s, point, offset_,\n              )\n\n\toffset = offset_[]\n\n\treturn offset\nend \n\n\"\"\"\n\tPetscSectionSetOffset(petsclib::PetscLibType,s::PetscSection, point::PetscInt, offset::PetscInt) \nSet the offset into an array or `Vec` for the dof associated with the given point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `offset` - the offset, these values may be negative indicating the values are off process\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetFieldOffset()`, `PetscSectionCreate()`, `PetscSectionSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetOffset\"))\n\"\"\"\nfunction PetscSectionSetOffset(petsclib::PetscLibType, s::PetscSection, point::PetscInt, offset::PetscInt) end\n\n@for_petsc function PetscSectionSetOffset(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, offset::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt),\n               s, point, offset,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toffset::PetscInt = PetscSectionGetFieldOffset(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt) \nReturn the offset into an array or `Vec` for the field dof associated with the given point.\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `point` - the point\n- `field` - the field\n\nOutput Parameter:\n- `offset` - the offset\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetOffset()`, `PetscSectionCreate()`, `PetscSectionGetFieldPointOffset()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldOffset\"))\n\"\"\"\nfunction PetscSectionGetFieldOffset(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt) end\n\n@for_petsc function PetscSectionGetFieldOffset(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt )\n\toffset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetFieldOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               s, point, field, offset_,\n              )\n\n\toffset = offset_[]\n\n\treturn offset\nend \n\n\"\"\"\n\tPetscSectionSetFieldOffset(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt, offset::PetscInt) \nSet the offset into an array or `Vec` for the dof associated with the given field at a point.\n\nNot Collective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `point`  - the point\n- `field`  - the field\n- `offset` - the offset, these values may be negative indicating the values are off process\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetFieldOffset()`, `PetscSectionSetOffset()`, `PetscSectionCreate()`, `PetscSectionSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFieldOffset\"))\n\"\"\"\nfunction PetscSectionSetFieldOffset(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt, offset::PetscInt) end\n\n@for_petsc function PetscSectionSetFieldOffset(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt, offset::$PetscInt )\n\n    @chk ccall(\n               (:PetscSectionSetFieldOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, $PetscInt),\n               s, point, field, offset,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toffset::PetscInt = PetscSectionGetFieldPointOffset(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt) \nReturn the offset for the first field dof associated with the given point relative to the offset for that point for the\nunnamed default field's first dof\n\nNot Collective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `point` - the point\n- `field` - the field\n\nOutput Parameter:\n- `offset` - the offset\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetOffset()`, `PetscSectionCreate()`, `PetscSectionGetFieldOffset()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldPointOffset\"))\n\"\"\"\nfunction PetscSectionGetFieldPointOffset(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt) end\n\n@for_petsc function PetscSectionGetFieldPointOffset(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt )\n\toffset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetFieldPointOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               s, point, field, offset_,\n              )\n\n\toffset = offset_[]\n\n\treturn offset\nend \n\n\"\"\"\n\tstart::PetscInt,end_::PetscInt = PetscSectionGetOffsetRange(petsclib::PetscLibType,s::PetscSection) \nReturn the full range of offsets [`start`, `end`) for a `PetscSection`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nOutput Parameters:\n- `start` - the minimum offset\n- `end`   - one more than the maximum offset\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetOffset()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetOffsetRange\"))\n\"\"\"\nfunction PetscSectionGetOffsetRange(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetOffsetRange(petsclib::$UnionPetscLib, s::PetscSection )\n\tstart_ = Ref{$PetscInt}()\n\tend__ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSectionGetOffsetRange, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               s, start_, end__,\n              )\n\n\tstart = start_[]\n\tend_ = end__[]\n\n\treturn start,end_\nend \n\n\"\"\"\n\tsubs::PetscSection = PetscSectionCreateSubsection(petsclib::PetscLibType,s::PetscSection, len::PetscInt, fields::Vector{PetscInt}) \nCreate a new, smaller `PetscSection` composed of only selected fields\n\nCollective\n\nInput Parameters:\n- `s`      - the `PetscSection`\n- `len`    - the number of subfields\n- `fields` - the subfield numbers\n\nOutput Parameter:\n- `subs` - the subsection\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreateSupersection()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreateSubsection\"))\n\"\"\"\nfunction PetscSectionCreateSubsection(petsclib::PetscLibType, s::PetscSection, len::PetscInt, fields::Vector{PetscInt}) end\n\n@for_petsc function PetscSectionCreateSubsection(petsclib::$UnionPetscLib, s::PetscSection, len::$PetscInt, fields::Vector{$PetscInt} )\n\tsubs_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateSubsection, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}, Ptr{PetscSection}),\n               s, len, fields, subs_,\n              )\n\n\tsubs = subs_[]\n\n\treturn subs\nend \n\n\"\"\"\n\tsubs::PetscSection = PetscSectionCreateComponentSubsection(petsclib::PetscLibType,s::PetscSection, len::PetscInt, comps::Vector{PetscInt}) \nCreate a new, smaller `PetscSection` composed of only selected components\n\nCollective\n\nInput Parameters:\n- `s`     - the `PetscSection`\n- `len`   - the number of components\n- `comps` - the component numbers\n\nOutput Parameter:\n- `subs` - the subsection\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreateSupersection()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreateComponentSubsection\"))\n\"\"\"\nfunction PetscSectionCreateComponentSubsection(petsclib::PetscLibType, s::PetscSection, len::PetscInt, comps::Vector{PetscInt}) end\n\n@for_petsc function PetscSectionCreateComponentSubsection(petsclib::$UnionPetscLib, s::PetscSection, len::$PetscInt, comps::Vector{$PetscInt} )\n\tsubs_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateComponentSubsection, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}, Ptr{PetscSection}),\n               s, len, comps, subs_,\n              )\n\n\tsubs = subs_[]\n\n\treturn subs\nend \n\n\"\"\"\n\tsupers::PetscSection = PetscSectionCreateSupersection(petsclib::PetscLibType,s::Vector{PetscSection}, len::PetscInt) \nCreate a new, larger section composed of multiple `PetscSection`s\n\nCollective\n\nInput Parameters:\n- `s`   - the input sections\n- `len` - the number of input sections\n\nOutput Parameter:\n- `supers` - the supersection\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreateSubsection()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreateSupersection\"))\n\"\"\"\nfunction PetscSectionCreateSupersection(petsclib::PetscLibType, s::Vector{PetscSection}, len::PetscInt) end\n\n@for_petsc function PetscSectionCreateSupersection(petsclib::$UnionPetscLib, s::Vector{PetscSection}, len::$PetscInt )\n\tsupers_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateSupersection, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSection}, $PetscInt, Ptr{PetscSection}),\n               s, len, supers_,\n              )\n\n\tsupers = supers_[]\n\n\treturn supers\nend \n\n\"\"\"\n\tsubs::PetscSection = PetscSectionCreateSubmeshSection(petsclib::PetscLibType,s::PetscSection, subpointIS::IS) \nCreate a new, smaller section with support on the submesh\n\nCollective\n\nInput Parameters:\n- `s`          - the `PetscSection`\n- `subpointIS` - a sorted list of points in the original mesh which are in the submesh\n\nOutput Parameter:\n- `subs` - the subsection\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreateSubdomainSection()`, `PetscSectionCreateSubsection()`, `DMPlexGetSubpointMap()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreateSubmeshSection\"))\n\"\"\"\nfunction PetscSectionCreateSubmeshSection(petsclib::PetscLibType, s::PetscSection, subpointIS::IS) end\n\n@for_petsc function PetscSectionCreateSubmeshSection(petsclib::$UnionPetscLib, s::PetscSection, subpointIS::IS )\n\tsubs_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateSubmeshSection, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, CIS, Ptr{PetscSection}),\n               s, subpointIS, subs_,\n              )\n\n\tsubs = subs_[]\n\n\treturn subs\nend \n\n\"\"\"\n\tsubs::PetscSection = PetscSectionCreateSubdomainSection(petsclib::PetscLibType,s::PetscSection, subpointMap::IS) \nCreate a new, smaller section with support on a subdomain of the mesh\n\nCollective\n\nInput Parameters:\n- `s`           - the `PetscSection`\n- `subpointMap` - a sorted list of points in the original mesh which are in the subdomain\n\nOutput Parameter:\n- `subs` - the subsection\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreateSubmeshSection()`, `PetscSectionCreateSubsection()`, `DMPlexGetSubpointMap()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionCreateSubdomainSection\"))\n\"\"\"\nfunction PetscSectionCreateSubdomainSection(petsclib::PetscLibType, s::PetscSection, subpointMap::IS) end\n\n@for_petsc function PetscSectionCreateSubdomainSection(petsclib::$UnionPetscLib, s::PetscSection, subpointMap::IS )\n\tsubs_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateSubdomainSection, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, CIS, Ptr{PetscSection}),\n               s, subpointMap, subs_,\n              )\n\n\tsubs = subs_[]\n\n\treturn subs\nend \n\n\"\"\"\n\tPetscSectionViewFromOptions(petsclib::PetscLibType,A::PetscSection, obj::PetscObject, name::String) \nView the `PetscSection` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscSection` object to view\n- `obj`  - Optional object that provides the options prefix used for the options\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionView`, `PetscObjectViewFromOptions()`, `PetscSectionCreate()`, `PetscSectionView()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionViewFromOptions\"))\n\"\"\"\nfunction PetscSectionViewFromOptions(petsclib::PetscLibType, A::PetscSection, obj::PetscObject, name::String) end\n\n@for_petsc function PetscSectionViewFromOptions(petsclib::$UnionPetscLib, A::PetscSection, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscSectionViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionView(petsclib::PetscLibType,s::PetscSection, viewer::PetscViewer) \nViews a `PetscSection`\n\nCollective\n\nInput Parameters:\n- `s`      - the `PetscSection` object to view\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionDestroy()`, `PetscSectionLoad()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionView\"))\n\"\"\"\nfunction PetscSectionView(petsclib::PetscLibType, s::PetscSection, viewer::PetscViewer) end\n\n@for_petsc function PetscSectionView(petsclib::$UnionPetscLib, s::PetscSection, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscSectionView, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscViewer),\n               s, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionLoad(petsclib::PetscLibType,s::PetscSection, viewer::PetscViewer) \nLoads a `PetscSection`\n\nCollective\n\nInput Parameters:\n- `s`      - the `PetscSection` object to load\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionDestroy()`, `PetscSectionView()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionLoad\"))\n\"\"\"\nfunction PetscSectionLoad(petsclib::PetscLibType, s::PetscSection, viewer::PetscViewer) end\n\n@for_petsc function PetscSectionLoad(petsclib::$UnionPetscLib, s::PetscSection, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscSectionLoad, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscViewer),\n               s, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionArrayView(petsclib::PetscLibType,s::PetscSection, array::Cvoid, data_type::PetscDataType, viewer::PetscViewer) \nView an array, using the section to structure the values\n\nCollective\n\nInput Parameters:\n- `s`         - the organizing `PetscSection`\n- `array`     - the array of values\n- `data_type` - the `PetscDataType` of the array\n- `viewer`    - the `PetscViewer`\n\nLevel: developer\n\n-seealso: `PetscSection`, `PetscViewer`, `PetscSectionCreate()`, `VecSetValuesSection()`, `PetscSectionVecView()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionArrayView\"))\n\"\"\"\nfunction PetscSectionArrayView(petsclib::PetscLibType, s::PetscSection, array::Cvoid, data_type::PetscDataType, viewer::PetscViewer) end\n\n@for_petsc function PetscSectionArrayView(petsclib::$UnionPetscLib, s::PetscSection, array::Cvoid, data_type::PetscDataType, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscSectionArrayView, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{Cvoid}, PetscDataType, PetscViewer),\n               s, array, data_type, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionResetClosurePermutation(petsclib::PetscLibType,section::PetscSection) \nRemove any existing closure permutation\n\nInput Parameter:\n- `section` - The `PetscSection`\n\nLevel: intermediate\n\n-seealso: `PetscSectionSetClosurePermutation()`, `PetscSectionSetClosureIndex()`, `PetscSectionReset()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionResetClosurePermutation\"))\n\"\"\"\nfunction PetscSectionResetClosurePermutation(petsclib::PetscLibType, section::PetscSection) end\n\n@for_petsc function PetscSectionResetClosurePermutation(petsclib::$UnionPetscLib, section::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionResetClosurePermutation, $petsc_library),\n               PetscErrorCode,\n               (PetscSection,),\n               section,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionReset(petsclib::PetscLibType,s::PetscSection) \nFrees all section data, the section is then as if `PetscSectionCreate()` had just been called.\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nLevel: beginner\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionReset\"))\n\"\"\"\nfunction PetscSectionReset(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionReset(petsclib::$UnionPetscLib, s::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionReset, $petsc_library),\n               PetscErrorCode,\n               (PetscSection,),\n               s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionDestroy(petsclib::PetscLibType,s::PetscSection) \nFrees a `PetscSection`\n\nNot Collective\n\nInput Parameter:\n- `s` - the `PetscSection`\n\nLevel: beginner\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionCreate()`, `PetscSectionReset()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionDestroy\"))\n\"\"\"\nfunction PetscSectionDestroy(petsclib::PetscLibType, s::PetscSection) end\n\n# Accept a Ref{PetscSection} (pointer-to-pointer) so callers can pass a Ref directly\n@for_petsc function PetscSectionDestroy(petsclib::$UnionPetscLib, s::Ref{PetscSection} )\n\n    @chk ccall(\n               (:PetscSectionDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSection},),\n               s,\n              )\n\n\n\treturn nothing\nend\n\n@for_petsc function PetscSectionDestroy(petsclib::$UnionPetscLib, s::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSection},),\n               s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thasConstraints::PetscBool = PetscSectionHasConstraints(petsclib::PetscLibType,s::PetscSection) \nDetermine whether a `PetscSection` has constrained dofs\n\nNot Collective\n\nInput Parameter:\n- `s` - The `PetscSection`\n\nOutput Parameter:\n- `hasConstraints` - flag indicating that the section has constrained dofs\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSetConstraintIndices()`, `PetscSectionGetConstraintDof()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionHasConstraints\"))\n\"\"\"\nfunction PetscSectionHasConstraints(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionHasConstraints(petsclib::$UnionPetscLib, s::PetscSection )\n\thasConstraints_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSectionHasConstraints, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{PetscBool}),\n               s, hasConstraints_,\n              )\n\n\thasConstraints = hasConstraints_[]\n\n\treturn hasConstraints\nend \n\n\"\"\"\n\tindices::Vector{PetscInt} = PetscSectionGetConstraintIndices(petsclib::PetscLibType,s::PetscSection, point::PetscInt) \nGet the point dof numbers, in [0, dof), which are constrained for a given point\n\nNot Collective\n\nInput Parameters:\n- `s`     - The `PetscSection`\n- `point` - The point\n\nOutput Parameter:\n- `indices` - The constrained dofs\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSetConstraintIndices()`, `PetscSectionGetConstraintDof()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetConstraintIndices\"))\n\"\"\"\nfunction PetscSectionGetConstraintIndices(petsclib::PetscLibType, s::PetscSection, point::PetscInt) end\n\n@for_petsc function PetscSectionGetConstraintIndices(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt )\n\tindices_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSectionGetConstraintIndices, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               s, point, indices_,\n              )\n\n\tindices = unsafe_wrap(Array, indices_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn indices\nend \n\n\"\"\"\n\tPetscSectionSetConstraintIndices(petsclib::PetscLibType,s::PetscSection, point::PetscInt, indices::Vector{PetscInt}) \nSet the point dof numbers, in [0, dof), which are constrained\n\nNot Collective\n\nInput Parameters:\n- `s`       - The `PetscSection`\n- `point`   - The point\n- `indices` - The constrained dofs\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionGetConstraintIndices()`, `PetscSectionGetConstraintDof()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetConstraintIndices\"))\n\"\"\"\nfunction PetscSectionSetConstraintIndices(petsclib::PetscLibType, s::PetscSection, point::PetscInt, indices::Vector{PetscInt}) end\n\n@for_petsc function PetscSectionSetConstraintIndices(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, indices::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSectionSetConstraintIndices, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}),\n               s, point, indices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tindices::Vector{PetscInt} = PetscSectionGetFieldConstraintIndices(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt) \nGet the field dof numbers, in [0, fdof), which are constrained\n\nNot Collective\n\nInput Parameters:\n- `s`     - The `PetscSection`\n- `field` - The field number\n- `point` - The point\n\nOutput Parameter:\n- `indices` - The constrained dofs sorted in ascending order, the length is returned by `PetscSectionGetConstraintDof()`.\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSetFieldConstraintIndices()`, `PetscSectionGetConstraintIndices()`, `PetscSectionGetConstraintDof()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldConstraintIndices\"))\n\"\"\"\nfunction PetscSectionGetFieldConstraintIndices(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt) end\n\n@for_petsc function PetscSectionGetFieldConstraintIndices(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt )\n\tindices_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscSectionGetFieldConstraintIndices, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{Ptr{$PetscInt}}),\n               s, point, field, indices_,\n              )\n\n\tindices = unsafe_wrap(Array, indices_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn indices\nend \n\n\"\"\"\n\tPetscSectionSetFieldConstraintIndices(petsclib::PetscLibType,s::PetscSection, point::PetscInt, field::PetscInt, indices::Vector{PetscInt}) \nSet the field dof numbers, in [0, fdof), which are constrained\n\nNot Collective\n\nInput Parameters:\n- `s`       - The `PetscSection`\n- `point`   - The point\n- `field`   - The field number\n- `indices` - The constrained dofs\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSetConstraintIndices()`, `PetscSectionGetFieldConstraintIndices()`, `PetscSectionGetConstraintDof()`, `PetscSection`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFieldConstraintIndices\"))\n\"\"\"\nfunction PetscSectionSetFieldConstraintIndices(petsclib::PetscLibType, s::PetscSection, point::PetscInt, field::PetscInt, indices::Vector{PetscInt}) end\n\n@for_petsc function PetscSectionSetFieldConstraintIndices(petsclib::$UnionPetscLib, s::PetscSection, point::$PetscInt, field::$PetscInt, indices::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSectionSetFieldConstraintIndices, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               s, point, field, indices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionPermute(petsclib::PetscLibType,section::PetscSection, permutation::IS, sectionNew::PetscSection) \nReorder the section according to the input point permutation\n\nCollective\n\nInput Parameters:\n- `section`     - The `PetscSection` object\n- `permutation` - The point permutation, old point p becomes new point perm[p]\n\nOutput Parameter:\n- `sectionNew` - The permuted `PetscSection`\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `IS`, `PetscSection`, `MatPermute()`, `PetscSectionSetPermutation()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionPermute\"))\n\"\"\"\nfunction PetscSectionPermute(petsclib::PetscLibType, section::PetscSection, permutation::IS, sectionNew::PetscSection) end\n\n@for_petsc function PetscSectionPermute(petsclib::$UnionPetscLib, section::PetscSection, permutation::IS, sectionNew::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionPermute, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, CIS, Ptr{PetscSection}),\n               section, permutation, sectionNew,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetClosureIndex(petsclib::PetscLibType,section::PetscSection, obj::PetscObject, clSection::PetscSection, clPoints::IS) \nCreate an internal data structure to speed up closure queries.\n\nCollective\n\nInput Parameters:\n- `section`   - The `PetscSection`\n- `obj`       - A `PetscObject` which serves as the key for this index\n- `clSection` - `PetscSection` giving the size of the closure of each point\n- `clPoints`  - `IS` giving the points in each closure\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionGetClosureIndex()`, `DMPlexCreateClosureIndex()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetClosureIndex\"))\n\"\"\"\nfunction PetscSectionSetClosureIndex(petsclib::PetscLibType, section::PetscSection, obj::PetscObject, clSection::PetscSection, clPoints::IS) end\n\n@for_petsc function PetscSectionSetClosureIndex(petsclib::$UnionPetscLib, section::PetscSection, obj::PetscObject, clSection::PetscSection, clPoints::IS )\n\n    @chk ccall(\n               (:PetscSectionSetClosureIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscObject, PetscSection, CIS),\n               section, obj, clSection, clPoints,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetClosureIndex(petsclib::PetscLibType,section::PetscSection, obj::PetscObject, clSection::PetscSection, clPoints::IS) \nGet the cache of points in the closure of each point in the section set with `PetscSectionSetClosureIndex()`\n\nCollective\n\nInput Parameters:\n- `section` - The `PetscSection`\n- `obj`     - A `PetscObject` which serves as the key for this index\n\nOutput Parameters:\n- `clSection` - `PetscSection` giving the size of the closure of each point\n- `clPoints`  - `IS` giving the points in each closure\n\nLevel: advanced\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSetClosureIndex()`, `DMPlexCreateClosureIndex()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetClosureIndex\"))\n\"\"\"\nfunction PetscSectionGetClosureIndex(petsclib::PetscLibType, section::PetscSection, obj::PetscObject, clSection::PetscSection, clPoints::IS) end\n\n@for_petsc function PetscSectionGetClosureIndex(petsclib::$UnionPetscLib, section::PetscSection, obj::PetscObject, clSection::PetscSection, clPoints::IS )\n\tclPoints_ = Ref(clPoints.ptr)\n\n    @chk ccall(\n               (:PetscSectionGetClosureIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscObject, Ptr{PetscSection}, Ptr{CIS}),\n               section, obj, clSection, clPoints_,\n              )\n\n\tclPoints.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetClosurePermutation(petsclib::PetscLibType,section::PetscSection, obj::PetscObject, depth::PetscInt, perm::IS) \nSet the dof permutation for the closure of each cell in the section, meaning clPerm[newIndex] = oldIndex.\n\nNot Collective\n\nInput Parameters:\n- `section` - The `PetscSection`\n- `obj`     - A `PetscObject` which serves as the key for this index (usually a `DM`)\n- `depth`   - Depth of points on which to apply the given permutation\n- `perm`    - Permutation of the cell dof closure\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `IS`, `PetscSectionGetClosurePermutation()`, `PetscSectionGetClosureIndex()`, `DMPlexCreateClosureIndex()`, `PetscCopyMode`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetClosurePermutation\"))\n\"\"\"\nfunction PetscSectionSetClosurePermutation(petsclib::PetscLibType, section::PetscSection, obj::PetscObject, depth::PetscInt, perm::IS) end\n\n@for_petsc function PetscSectionSetClosurePermutation(petsclib::$UnionPetscLib, section::PetscSection, obj::PetscObject, depth::$PetscInt, perm::IS )\n\n    @chk ccall(\n               (:PetscSectionSetClosurePermutation, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscObject, $PetscInt, CIS),\n               section, obj, depth, perm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetClosurePermutation(petsclib::PetscLibType,section::PetscSection, obj::PetscObject, depth::PetscInt, clSize::PetscInt, perm::IS) \nGet the dof permutation for the closure of each cell in the section, meaning clPerm[newIndex] = oldIndex.\n\nNot Collective\n\nInput Parameters:\n- `section` - The `PetscSection`\n- `obj`     - A `PetscObject` which serves as the key for this index (usually a DM)\n- `depth`   - Depth stratum on which to obtain closure permutation\n- `clSize`  - Closure size to be permuted (e.g., may vary with element topology and degree)\n\nOutput Parameter:\n- `perm` - The dof closure permutation\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `IS`, `PetscSectionSetClosurePermutation()`, `PetscSectionGetClosureInversePermutation()`, `PetscSectionGetClosureIndex()`, `PetscSectionSetClosureIndex()`, `DMPlexCreateClosureIndex()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetClosurePermutation\"))\n\"\"\"\nfunction PetscSectionGetClosurePermutation(petsclib::PetscLibType, section::PetscSection, obj::PetscObject, depth::PetscInt, clSize::PetscInt, perm::IS) end\n\n@for_petsc function PetscSectionGetClosurePermutation(petsclib::$UnionPetscLib, section::PetscSection, obj::PetscObject, depth::$PetscInt, clSize::$PetscInt, perm::IS )\n\tperm_ = Ref(perm.ptr)\n\n    @chk ccall(\n               (:PetscSectionGetClosurePermutation, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscObject, $PetscInt, $PetscInt, Ptr{CIS}),\n               section, obj, depth, clSize, perm_,\n              )\n\n\tperm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetClosureInversePermutation(petsclib::PetscLibType,section::PetscSection, obj::PetscObject, depth::PetscInt, clSize::PetscInt, perm::IS) \nGet the inverse dof permutation for the closure of each cell in the section, meaning clPerm[oldIndex] = newIndex.\n\nNot Collective\n\nInput Parameters:\n- `section` - The `PetscSection`\n- `obj`     - A `PetscObject` which serves as the key for this index (usually a `DM`)\n- `depth`   - Depth stratum on which to obtain closure permutation\n- `clSize`  - Closure size to be permuted (e.g., may vary with element topology and degree)\n\nOutput Parameter:\n- `perm` - The dof closure permutation\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `IS`, `PetscSectionSetClosurePermutation()`, `PetscSectionGetClosureIndex()`, `PetscSectionSetClosureIndex()`, `DMPlexCreateClosureIndex()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetClosureInversePermutation\"))\n\"\"\"\nfunction PetscSectionGetClosureInversePermutation(petsclib::PetscLibType, section::PetscSection, obj::PetscObject, depth::PetscInt, clSize::PetscInt, perm::IS) end\n\n@for_petsc function PetscSectionGetClosureInversePermutation(petsclib::$UnionPetscLib, section::PetscSection, obj::PetscObject, depth::$PetscInt, clSize::$PetscInt, perm::IS )\n\tperm_ = Ref(perm.ptr)\n\n    @chk ccall(\n               (:PetscSectionGetClosureInversePermutation, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscObject, $PetscInt, $PetscInt, Ptr{CIS}),\n               section, obj, depth, clSize, perm_,\n              )\n\n\tperm.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetField(petsclib::PetscLibType,s::PetscSection, field::PetscInt, subs::PetscSection) \nGet the `PetscSection` associated with a single field\n\nInput Parameters:\n- `s`     - The `PetscSection`\n- `field` - The field number\n\nOutput Parameter:\n- `subs` - The `PetscSection` for the given field, note the chart of `subs` is not set\n\nLevel: intermediate\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `IS`, `PetscSectionSetNumFields()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetField\"))\n\"\"\"\nfunction PetscSectionGetField(petsclib::PetscLibType, s::PetscSection, field::PetscInt, subs::PetscSection) end\n\n@for_petsc function PetscSectionGetField(petsclib::$UnionPetscLib, s::PetscSection, field::$PetscInt, subs::PetscSection )\n\n    @chk ccall(\n               (:PetscSectionGetField, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{PetscSection}),\n               s, field, subs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetSym(petsclib::PetscLibType,section::PetscSection, sym::PetscSectionSym) \nSet the symmetries for the data referred to by the section\n\nCollective\n\nInput Parameters:\n- `section` - the section describing data layout\n- `sym`     - the symmetry describing the affect of orientation on the access of the data\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionGetSym()`, `PetscSectionSymCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetSym\"))\n\"\"\"\nfunction PetscSectionSetSym(petsclib::PetscLibType, section::PetscSection, sym::PetscSectionSym) end\n\n@for_petsc function PetscSectionSetSym(petsclib::$UnionPetscLib, section::PetscSection, sym::PetscSectionSym )\n\n    @chk ccall(\n               (:PetscSectionSetSym, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscSectionSym),\n               section, sym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetSym(petsclib::PetscLibType,section::PetscSection, sym::PetscSectionSym) \nGet the symmetries for the data referred to by the section\n\nNot Collective\n\nInput Parameter:\n- `section` - the section describing data layout\n\nOutput Parameter:\n- `sym` - the symmetry describing the affect of orientation on the access of the data, provided previously by `PetscSectionSetSym()`\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSetSym()`, `PetscSectionSymCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetSym\"))\n\"\"\"\nfunction PetscSectionGetSym(petsclib::PetscLibType, section::PetscSection, sym::PetscSectionSym) end\n\n@for_petsc function PetscSectionGetSym(petsclib::$UnionPetscLib, section::PetscSection, sym::PetscSectionSym )\n\n    @chk ccall(\n               (:PetscSectionGetSym, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{PetscSectionSym}),\n               section, sym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSetFieldSym(petsclib::PetscLibType,section::PetscSection, field::PetscInt, sym::PetscSectionSym) \nSet the symmetries for the data referred to by a field of the section\n\nCollective\n\nInput Parameters:\n- `section` - the section describing data layout\n- `field`   - the field number\n- `sym`     - the symmetry describing the affect of orientation on the access of the data\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionGetFieldSym()`, `PetscSectionSymCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetFieldSym\"))\n\"\"\"\nfunction PetscSectionSetFieldSym(petsclib::PetscLibType, section::PetscSection, field::PetscInt, sym::PetscSectionSym) end\n\n@for_petsc function PetscSectionSetFieldSym(petsclib::$UnionPetscLib, section::PetscSection, field::$PetscInt, sym::PetscSectionSym )\n\n    @chk ccall(\n               (:PetscSectionSetFieldSym, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, PetscSectionSym),\n               section, field, sym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionGetFieldSym(petsclib::PetscLibType,section::PetscSection, field::PetscInt, sym::PetscSectionSym) \nGet the symmetries for the data referred to by a field of the section\n\nCollective\n\nInput Parameters:\n- `section` - the section describing data layout\n- `field`   - the field number\n\nOutput Parameter:\n- `sym` - the symmetry describing the affect of orientation on the access of the data\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSetFieldSym()`, `PetscSectionSymCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldSym\"))\n\"\"\"\nfunction PetscSectionGetFieldSym(petsclib::PetscLibType, section::PetscSection, field::PetscInt, sym::PetscSectionSym) end\n\n@for_petsc function PetscSectionGetFieldSym(petsclib::$UnionPetscLib, section::PetscSection, field::$PetscInt, sym::PetscSectionSym )\n\n    @chk ccall(\n               (:PetscSectionGetFieldSym, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{PetscSectionSym}),\n               section, field, sym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tperms::PetscInt,rots::PetscScalar = PetscSectionGetPointSyms(petsclib::PetscLibType,section::PetscSection, numPoints::PetscInt, points::PetscInt) \nGet the symmetries for a set of points in a `PetscSection` under specific orientations.\n\nNot Collective\n\nInput Parameters:\n- `section`   - the section\n- `numPoints` - the number of points\n- `points`    - an array of size 2 * `numPoints`, containing a list of (point, orientation) pairs. (An orientation is an\narbitrary integer: its interpretation is up to sym.  Orientations are used by `DM`: for their interpretation in that\ncontext, see `DMPlexGetConeOrientation()`).\n\nOutput Parameters:\n- `perms` - The permutations for the given orientations (or `NULL` if there is no symmetry or the permutation is the identity).\n- `rots`  - The field rotations symmetries for the given orientations (or `NULL` if there is no symmetry or the rotations are all\nidentity).\n\nExample of usage, gathering dofs into a local array (lArray) from a section array (sArray):\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionRestorePointSyms()`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetPointSyms\"))\n\"\"\"\nfunction PetscSectionGetPointSyms(petsclib::PetscLibType, section::PetscSection, numPoints::PetscInt, points::PetscInt) end\n\n@for_petsc function PetscSectionGetPointSyms(petsclib::$UnionPetscLib, section::PetscSection, numPoints::$PetscInt, points::$PetscInt )\n\tperms_ = Ref{$PetscInt}()\n\trots_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscSectionGetPointSyms, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscScalar),\n               section, numPoints, points, perms_, rots_,\n              )\n\n\tperms = perms_[]\n\trots = rots_[]\n\n\treturn perms,rots\nend \n\n\"\"\"\n\tPetscSectionRestorePointSyms(petsclib::PetscLibType,section::PetscSection, numPoints::PetscInt, points::PetscInt, perms::PetscInt, rots::PetscScalar) \nRestore the symmetries returned by `PetscSectionGetPointSyms()`\n\nNot Collective\n\nInput Parameters:\n- `section`   - the section\n- `numPoints` - the number of points\n- `points`    - an array of size 2 * `numPoints`, containing a list of (point, orientation) pairs. (An orientation is an\narbitrary integer: its interpretation is up to sym.  Orientations are used by `DM`: for their interpretation in that\ncontext, see `DMPlexGetConeOrientation()`).\n- `perms`     - The permutations for the given orientations: set to `NULL` at conclusion\n- `rots`      - The field rotations symmetries for the given orientations: set to `NULL` at conclusion\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionGetPointSyms()`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionRestorePointSyms\"))\n\"\"\"\nfunction PetscSectionRestorePointSyms(petsclib::PetscLibType, section::PetscSection, numPoints::PetscInt, points::PetscInt, perms::PetscInt, rots::PetscScalar) end\n\n@for_petsc function PetscSectionRestorePointSyms(petsclib::$UnionPetscLib, section::PetscSection, numPoints::$PetscInt, points::$PetscInt, perms::$PetscInt, rots::$PetscScalar )\n\n    @chk ccall(\n               (:PetscSectionRestorePointSyms, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscScalar),\n               section, numPoints, points, perms, rots,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tperms::PetscInt,rots::PetscScalar = PetscSectionGetFieldPointSyms(petsclib::PetscLibType,section::PetscSection, field::PetscInt, numPoints::PetscInt, points::PetscInt) \nGet the symmetries for a set of points in a field of a `PetscSection` under specific orientations.\n\nNot Collective\n\nInput Parameters:\n- `section`   - the section\n- `field`     - the field of the section\n- `numPoints` - the number of points\n- `points`    - an array of size 2 * `numPoints`, containing a list of (point, orientation) pairs. (An orientation is an\narbitrary integer: its interpretation is up to sym.  Orientations are used by `DM`: for their interpretation in that\ncontext, see `DMPlexGetConeOrientation()`).\n\nOutput Parameters:\n- `perms` - The permutations for the given orientations (or `NULL` if there is no symmetry or the permutation is the identity).\n- `rots`  - The field rotations symmetries for the given orientations (or `NULL` if there is no symmetry or the rotations are all\nidentity).\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionGetPointSyms()`, `PetscSectionRestoreFieldPointSyms()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetFieldPointSyms\"))\n\"\"\"\nfunction PetscSectionGetFieldPointSyms(petsclib::PetscLibType, section::PetscSection, field::PetscInt, numPoints::PetscInt, points::PetscInt) end\n\n@for_petsc function PetscSectionGetFieldPointSyms(petsclib::$UnionPetscLib, section::PetscSection, field::$PetscInt, numPoints::$PetscInt, points::$PetscInt )\n\tperms_ = Ref{$PetscInt}()\n\trots_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscSectionGetFieldPointSyms, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscScalar),\n               section, field, numPoints, points, perms_, rots_,\n              )\n\n\tperms = perms_[]\n\trots = rots_[]\n\n\treturn perms,rots\nend \n\n\"\"\"\n\tPetscSectionRestoreFieldPointSyms(petsclib::PetscLibType,section::PetscSection, field::PetscInt, numPoints::PetscInt, points::PetscInt, perms::PetscInt, rots::PetscScalar) \nRestore the symmetries returned by `PetscSectionGetFieldPointSyms()`\n\nNot Collective\n\nInput Parameters:\n- `section`   - the section\n- `field`     - the field number\n- `numPoints` - the number of points\n- `points`    - an array of size 2 * `numPoints`, containing a list of (point, orientation) pairs. (An orientation is an\narbitrary integer: its interpretation is up to sym.  Orientations are used by `DM`: for their interpretation in that\ncontext, see `DMPlexGetConeOrientation()`).\n- `perms`     - The permutations for the given orientations: set to NULL at conclusion\n- `rots`      - The field rotations symmetries for the given orientations: set to NULL at conclusion\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionRestorePointSyms()`, `petscSectionGetFieldPointSyms()`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionRestoreFieldPointSyms\"))\n\"\"\"\nfunction PetscSectionRestoreFieldPointSyms(petsclib::PetscLibType, section::PetscSection, field::PetscInt, numPoints::PetscInt, points::PetscInt, perms::PetscInt, rots::PetscScalar) end\n\n@for_petsc function PetscSectionRestoreFieldPointSyms(petsclib::$UnionPetscLib, section::PetscSection, field::$PetscInt, numPoints::$PetscInt, points::$PetscInt, perms::$PetscInt, rots::$PetscScalar )\n\n    @chk ccall(\n               (:PetscSectionRestoreFieldPointSyms, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, $PetscInt, $PetscInt, Ptr{$PetscInt}, $PetscInt, $PetscScalar),\n               section, field, numPoints, points, perms, rots,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscSectionGetUseFieldOffsets(petsclib::PetscLibType,s::PetscSection) \nGet the flag indicating if field offsets are used directly in a global section, rather than just the point offset\n\nNot Collective\n\nInput Parameter:\n- `s` - the global `PetscSection`\n\nOutput Parameter:\n- `flg` - the flag\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSetChart()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionGetUseFieldOffsets\"))\n\"\"\"\nfunction PetscSectionGetUseFieldOffsets(petsclib::PetscLibType, s::PetscSection) end\n\n@for_petsc function PetscSectionGetUseFieldOffsets(petsclib::$UnionPetscLib, s::PetscSection )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSectionGetUseFieldOffsets, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, Ptr{PetscBool}),\n               s, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscSectionSetUseFieldOffsets(petsclib::PetscLibType,s::PetscSection, flg::PetscBool) \nSet the flag to use field offsets directly in a global section, rather than just the point offset\n\nNot Collective\n\nInput Parameters:\n- `s`   - the global `PetscSection`\n- `flg` - the flag\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionGetUseFieldOffsets()`, `PetscSectionSetChart()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSetUseFieldOffsets\"))\n\"\"\"\nfunction PetscSectionSetUseFieldOffsets(petsclib::PetscLibType, s::PetscSection, flg::PetscBool) end\n\n@for_petsc function PetscSectionSetUseFieldOffsets(petsclib::$UnionPetscLib, s::PetscSection, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscSectionSetUseFieldOffsets, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscBool),\n               s, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionVecView(petsclib::PetscLibType,s::PetscSection, v::PetscVec, viewer::PetscViewer) \nView a vector, using the section to structure the values\n\nCollective\n\nInput Parameters:\n- `s`      - the organizing `PetscSection`\n- `v`      - the `Vec`\n- `viewer` - the `PetscViewer`\n\nLevel: developer\n\n-seealso: `PetscSection`, `PetscViewer`, `PetscSectionCreate()`, `VecSetValuesSection()`, `PetscSectionArrayView()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionVecView\"))\n\"\"\"\nfunction PetscSectionVecView(petsclib::PetscLibType, s::PetscSection, v::PetscVec, viewer::PetscViewer) end\n\n@for_petsc function PetscSectionVecView(petsclib::$UnionPetscLib, s::PetscSection, v::PetscVec, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscSectionVecView, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, CVec, PetscViewer),\n               s, v, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tval::Vector{PetscReal} = PetscSectionVecNorm(petsclib::PetscLibType,s::PetscSection, gs::PetscSection, x::PetscVec, type::NormType) \nComputes the vector norm of each field\n\nInput Parameters:\n- `s`    - the local Section\n- `gs`   - the global section\n- `x`    - the vector\n- `type` - one of `NORM_1`, `NORM_2`, `NORM_INFINITY`.\n\nOutput Parameter:\n- `val` - the array of norms\n\nLevel: intermediate\n\n-seealso: `VecNorm()`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionVecNorm\"))\n\"\"\"\nfunction PetscSectionVecNorm(petsclib::PetscLibType, s::PetscSection, gs::PetscSection, x::PetscVec, type::NormType) end\n\n@for_petsc function PetscSectionVecNorm(petsclib::$UnionPetscLib, s::PetscSection, gs::PetscSection, x::PetscVec, type::NormType )\n\tval = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscSectionVecNorm, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscSection, CVec, NormType, Ptr{$PetscReal}),\n               s, gs, x, type, val,\n              )\n\n\n\treturn val\nend \n\n\"\"\"\n\tgsection::PetscSection = PetscSectionCreateGlobalSectionLabel(petsclib::PetscLibType,s::PetscSection, sf::PetscSF, includeConstraints::PetscBool, label::DMLabel, labelValue::PetscInt) \nCreate a section describing the global field layout using\nthe local section and an `PetscSF` describing the section point overlap.\n\nCollective\n\nInput Parameters:\n- `s`                  - The `PetscSection` for the local field layout\n- `sf`                 - The `PetscSF` describing parallel layout of the section points\n- `includeConstraints` - By default this is `PETSC_FALSE`, meaning that the global field vector will not possess constrained dofs\n- `label`              - The label specifying the points\n- `labelValue`         - The label stratum specifying the points\n\nOutput Parameter:\n- `gsection` - The `PetscSection` for the global field layout\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `PetscSectionCreate()`\n\n# External Links\n$(_doc_external(\"Dm/PetscSectionCreateGlobalSectionLabel\"))\n\"\"\"\nfunction PetscSectionCreateGlobalSectionLabel(petsclib::PetscLibType, s::PetscSection, sf::PetscSF, includeConstraints::PetscBool, label::DMLabel, labelValue::PetscInt) end\n\n@for_petsc function PetscSectionCreateGlobalSectionLabel(petsclib::$UnionPetscLib, s::PetscSection, sf::PetscSF, includeConstraints::PetscBool, label::DMLabel, labelValue::$PetscInt )\n\tgsection_ = Ref{PetscSection}()\n\n    @chk ccall(\n               (:PetscSectionCreateGlobalSectionLabel, $petsc_library),\n               PetscErrorCode,\n               (PetscSection, PetscSF, PetscBool, DMLabel, $PetscInt, Ptr{PetscSection}),\n               s, sf, includeConstraints, label, labelValue, gsection_,\n              )\n\n\tgsection = gsection_[]\n\n\treturn gsection\nend \n\n\"\"\"\n\tsym::PetscSectionSym = PetscSectionSymCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscSectionSym` object.\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator\n\nOutput Parameter:\n- `sym` - pointer to the new set of symmetries\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSym`, `PetscSectionSymDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymCreate\"))\n\"\"\"\nfunction PetscSectionSymCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscSectionSymCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tsym_ = Ref{PetscSectionSym}()\n\n    @chk ccall(\n               (:PetscSectionSymCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscSectionSym}),\n               comm, sym_,\n              )\n\n\tsym = sym_[]\n\n\treturn sym\nend \n\n\"\"\"\n\tPetscSectionSymSetType(petsclib::PetscLibType,sym::PetscSectionSym, method::PetscSectionSymType) \nBuilds a `PetscSectionSym`, for a particular implementation.\n\nCollective\n\nInput Parameters:\n- `sym`    - The section symmetry object\n- `method` - The name of the section symmetry type\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSymType`, `PetscSectionSymGetType()`, `PetscSectionSymCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymSetType\"))\n\"\"\"\nfunction PetscSectionSymSetType(petsclib::PetscLibType, sym::PetscSectionSym, method::PetscSectionSymType) end\n\n@for_petsc function PetscSectionSymSetType(petsclib::$UnionPetscLib, sym::PetscSectionSym, method::PetscSectionSymType )\n\n    @chk ccall(\n               (:PetscSectionSymSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, PetscSectionSymType),\n               sym, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscSectionSymType = PetscSectionSymGetType(petsclib::PetscLibType,sym::PetscSectionSym) \nGets the section symmetry type name (as a string) from the `PetscSectionSym`.\n\nNot Collective\n\nInput Parameter:\n- `sym` - The section symmetry\n\nOutput Parameter:\n- `type` - The index set type name\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSymType`, `PetscSectionSymSetType()`, `PetscSectionSymCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymGetType\"))\n\"\"\"\nfunction PetscSectionSymGetType(petsclib::PetscLibType, sym::PetscSectionSym) end\n\n@for_petsc function PetscSectionSymGetType(petsclib::$UnionPetscLib, sym::PetscSectionSym )\n\ttype_ = Ref{PetscSectionSymType}()\n\n    @chk ccall(\n               (:PetscSectionSymGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, Ptr{PetscSectionSymType}),\n               sym, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscSectionSymRegister(petsclib::PetscLibType,sname::String, fnc::external) \nRegisters a new section symmetry implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine itself\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSymType`, `PetscSectionSymCreate()`, `PetscSectionSymSetType()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymRegister\"))\n\"\"\"\nfunction PetscSectionSymRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscSectionSymRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscSectionSymRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSymDestroy(petsclib::PetscLibType,sym::PetscSectionSym) \nDestroys a section symmetry.\n\nCollective\n\nInput Parameter:\n- `sym` - the section symmetry\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSymCreate()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymDestroy\"))\n\"\"\"\nfunction PetscSectionSymDestroy(petsclib::PetscLibType, sym::PetscSectionSym) end\n\n@for_petsc function PetscSectionSymDestroy(petsclib::$UnionPetscLib, sym::PetscSectionSym )\n\n    @chk ccall(\n               (:PetscSectionSymDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSectionSym},),\n               sym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSymView(petsclib::PetscLibType,sym::PetscSectionSym, viewer::PetscViewer) \nDisplays a section symmetry\n\nCollective\n\nInput Parameters:\n- `sym`    - the index set\n- `viewer` - viewer used to display the set, for example `PETSC_VIEWER_STDOUT_SELF`.\n\nLevel: developer\n\n-seealso: `PetscSectionSym`, `PetscViewer`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymView\"))\n\"\"\"\nfunction PetscSectionSymView(petsclib::PetscLibType, sym::PetscSectionSym, viewer::PetscViewer) end\n\n@for_petsc function PetscSectionSymView(petsclib::$UnionPetscLib, sym::PetscSectionSym, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscSectionSymView, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, PetscViewer),\n               sym, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSymCopy(petsclib::PetscLibType,sym::PetscSectionSym, nsym::PetscSectionSym) \nCopy the symmetries, assuming that the point structure is compatible\n\nNot Collective\n\nInput Parameter:\n- `sym` - the `PetscSectionSym`\n\nOutput Parameter:\n- `nsym` - the equivalent symmetries\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`, `PetscSectionSymLabelSetStratum()`, `PetscSectionGetPointSyms()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymCopy\"))\n\"\"\"\nfunction PetscSectionSymCopy(petsclib::PetscLibType, sym::PetscSectionSym, nsym::PetscSectionSym) end\n\n@for_petsc function PetscSectionSymCopy(petsclib::$UnionPetscLib, sym::PetscSectionSym, nsym::PetscSectionSym )\n\n    @chk ccall(\n               (:PetscSectionSymCopy, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, PetscSectionSym),\n               sym, nsym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSymDistribute(petsclib::PetscLibType,sym::PetscSectionSym, migrationSF::PetscSF, dsym::PetscSectionSym) \nDistribute the symmetries in accordance with the input `PetscSF`\n\nCollective\n\nInput Parameters:\n- `sym`         - the `PetscSectionSym`\n- `migrationSF` - the distribution map from roots to leaves\n\nOutput Parameter:\n- `dsym` - the redistributed symmetries\n\nLevel: developer\n\n-seealso: [PetscSection](ch_petscsection), `PetscSectionSym`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`, `PetscSectionSymLabelSetStratum()`, `PetscSectionGetPointSyms()`\n\n# External Links\n$(_doc_external(\"Vec/PetscSectionSymDistribute\"))\n\"\"\"\nfunction PetscSectionSymDistribute(petsclib::PetscLibType, sym::PetscSectionSym, migrationSF::PetscSF, dsym::PetscSectionSym) end\n\n@for_petsc function PetscSectionSymDistribute(petsclib::$UnionPetscLib, sym::PetscSectionSym, migrationSF::PetscSF, dsym::PetscSectionSym )\n\n    @chk ccall(\n               (:PetscSectionSymDistribute, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, PetscSF, Ptr{PetscSectionSym}),\n               sym, migrationSF, dsym,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSectionSymLabelSetLabel(petsclib::PetscLibType,sym::PetscSectionSym, label::DMLabel) \nset the label whose strata will define the points that receive symmetries\n\nLogically\n\nInput Parameters:\n- `sym`   - the section symmetries\n- `label` - the `DMLabel` describing the types of points\n\nLevel: developer:\n\n-seealso: `DMLabel`, `DM`, `PetscSectionSymLabelSetStratum()`, `PetscSectionSymCreateLabel()`, `PetscSectionGetPointSyms()`\n\n# External Links\n$(_doc_external(\"Dm/PetscSectionSymLabelSetLabel\"))\n\"\"\"\nfunction PetscSectionSymLabelSetLabel(petsclib::PetscLibType, sym::PetscSectionSym, label::DMLabel) end\n\n@for_petsc function PetscSectionSymLabelSetLabel(petsclib::$UnionPetscLib, sym::PetscSectionSym, label::DMLabel )\n\n    @chk ccall(\n               (:PetscSectionSymLabelSetLabel, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, DMLabel),\n               sym, label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt,minOrient::PetscInt,maxOrient::PetscInt,perms::PetscInt,rots::PetscScalar = PetscSectionSymLabelGetStratum(petsclib::PetscLibType,sym::PetscSectionSym, stratum::PetscInt) \nget the symmetries for the orientations of a stratum\n\nLogically Collective\n\nInput Parameters:\n- `sym`     - the section symmetries\n- `stratum` - the stratum value in the label that we are assigning symmetries for\n\nOutput Parameters:\n- `size`      - the number of dofs for points in the `stratum` of the label\n- `minOrient` - the smallest orientation for a point in this `stratum`\n- `maxOrient` - one greater than the largest orientation for a ppoint in this `stratum` (i.e., orientations are in the range [`minOrient`, `maxOrient`))\n- `perms`     - `NULL` if there are no permutations, or (`maxOrient` - `minOrient`) permutations, one for each orientation.  A `NULL` permutation is the identity\n- `rots`      - `NULL` if there are no rotations, or (`maxOrient` - `minOrient`) sets of rotations, one for each orientation.  A `NULL` set of orientations is the identity\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `PetscSectionSymLabelSetStratum()`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetPointSyms()`, `PetscSectionSymCreateLabel()`\n\n# External Links\n$(_doc_external(\"Dm/PetscSectionSymLabelGetStratum\"))\n\"\"\"\nfunction PetscSectionSymLabelGetStratum(petsclib::PetscLibType, sym::PetscSectionSym, stratum::PetscInt) end\n\n@for_petsc function PetscSectionSymLabelGetStratum(petsclib::$UnionPetscLib, sym::PetscSectionSym, stratum::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\tminOrient_ = Ref{$PetscInt}()\n\tmaxOrient_ = Ref{$PetscInt}()\n\tperms_ = Ref{$PetscInt}()\n\trots_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:PetscSectionSymLabelGetStratum, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, $PetscScalar),\n               sym, stratum, size_, minOrient_, maxOrient_, perms_, rots_,\n              )\n\n\tsize = size_[]\n\tminOrient = minOrient_[]\n\tmaxOrient = maxOrient_[]\n\tperms = perms_[]\n\trots = rots_[]\n\n\treturn size,minOrient,maxOrient,perms,rots\nend \n\n\"\"\"\n\tPetscSectionSymLabelSetStratum(petsclib::PetscLibType,sym::PetscSectionSym, stratum::PetscInt, size::PetscInt, minOrient::PetscInt, maxOrient::PetscInt, mode::PetscCopyMode, perms::PetscInt, rots::PetscScalar) \nset the symmetries for the orientations of a stratum\n\nLogically\n\nInput Parameters:\n- `sym`       - the section symmetries\n- `stratum`   - the stratum value in the label that we are assigning symmetries for\n- `size`      - the number of dofs for points in the `stratum` of the label\n- `minOrient` - the smallest orientation for a point in this `stratum`\n- `maxOrient` - one greater than the largest orientation for a point in this `stratum` (i.e., orientations are in the range [`minOrient`, `maxOrient`))\n- `mode`      - how `sym` should copy the `perms` and `rots` arrays\n- `perms`     - `NULL` if there are no permutations, or (`maxOrient` - `minOrient`) permutations, one for each orientation.  A `NULL` permutation is the identity\n- `rots`      - `NULL` if there are no rotations, or (`maxOrient` - `minOrient`) sets of rotations, one for each orientation.  A `NULL` set of orientations is the identity\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `PetscSectionSymLabelGetStratum()`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetPointSyms()`, `PetscSectionSymCreateLabel()`\n\n# External Links\n$(_doc_external(\"Dm/PetscSectionSymLabelSetStratum\"))\n\"\"\"\nfunction PetscSectionSymLabelSetStratum(petsclib::PetscLibType, sym::PetscSectionSym, stratum::PetscInt, size::PetscInt, minOrient::PetscInt, maxOrient::PetscInt, mode::PetscCopyMode, perms::PetscInt, rots::PetscScalar) end\n\n@for_petsc function PetscSectionSymLabelSetStratum(petsclib::$UnionPetscLib, sym::PetscSectionSym, stratum::$PetscInt, size::$PetscInt, minOrient::$PetscInt, maxOrient::$PetscInt, mode::PetscCopyMode, perms::$PetscInt, rots::$PetscScalar )\n\n    @chk ccall(\n               (:PetscSectionSymLabelSetStratum, $petsc_library),\n               PetscErrorCode,\n               (PetscSectionSym, $PetscInt, $PetscInt, $PetscInt, $PetscInt, PetscCopyMode, $PetscInt, $PetscScalar),\n               sym, stratum, size, minOrient, maxOrient, mode, perms, rots,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsym::PetscSectionSym = PetscSectionSymCreateLabel(petsclib::PetscLibType,comm::MPI_Comm, label::DMLabel) \nCreate a section symmetry that assigns one symmetry to each stratum of a label\n\nCollective\n\nInput Parameters:\n- `comm`  - the MPI communicator for the new symmetry\n- `label` - the label defining the strata\n\nOutput Parameter:\n- `sym` - the section symmetries\n\nLevel: developer\n\n-seealso: `DMLabel`, `DM`, `PetscSectionSymCreate()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`, `PetscSectionSymLabelSetStratum()`, `PetscSectionGetPointSyms()`\n\n# External Links\n$(_doc_external(\"Dm/PetscSectionSymCreateLabel\"))\n\"\"\"\nfunction PetscSectionSymCreateLabel(petsclib::PetscLibType, comm::MPI_Comm, label::DMLabel) end\n\n@for_petsc function PetscSectionSymCreateLabel(petsclib::$UnionPetscLib, comm::MPI_Comm, label::DMLabel )\n\tsym_ = Ref{PetscSectionSym}()\n\n    @chk ccall(\n               (:PetscSectionSymCreateLabel, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, DMLabel, Ptr{PetscSectionSym}),\n               comm, label, sym_,\n              )\n\n\tsym = sym_[]\n\n\treturn sym\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscSegBuffer_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscSegBuffer end\nconst PetscSegBuffer = Ptr{_n_PetscSegBuffer}\n# -------------------------------------------------------\n\"\"\"\n\tseg::PetscSegBuffer = PetscSegBufferCreate(petsclib::PetscLibType,unitbytes::Csize_t, expected::PetscCount) \ncreate a segmented buffer\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `unitbytes` - number of bytes that each entry will contain\n- `expected`  - expected/typical number of entries\n\nOutput Parameter:\n- `seg` - `PetscSegBuffer` object\n\nLevel: developer\n\n-seealso: `PetscSegBufferGet()`, `PetscSegBufferExtractAlloc()`, `PetscSegBufferExtractTo()`, `PetscSegBufferExtractInPlace()`, `PetscSegBufferDestroy()`,\n`PetscSegBuffer`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferCreate\"))\n\"\"\"\nfunction PetscSegBufferCreate(petsclib::PetscLibType, unitbytes::Csize_t, expected::PetscCount) end\n\n@for_petsc function PetscSegBufferCreate(petsclib::$UnionPetscLib, unitbytes::Csize_t, expected::PetscCount )\n\tseg_ = Ref{PetscSegBuffer}()\n\n    @chk ccall(\n               (:PetscSegBufferCreate, $petsc_library),\n               PetscErrorCode,\n               (Csize_t, PetscCount, Ptr{PetscSegBuffer}),\n               unitbytes, expected, seg_,\n              )\n\n\tseg = seg_[]\n\n\treturn seg\nend \n\n\"\"\"\n\tPetscSegBufferGet(petsclib::PetscLibType,seg::PetscSegBuffer, count::PetscCount, buf::Cvoid) \nget new buffer space from a segmented buffer\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `seg`   - `PetscSegBuffer` buffer\n- `count` - number of entries needed\n\nOutput Parameter:\n- `buf` - address of new buffer for contiguous data\n\nLevel: developer\n\n-seealso: `PetscSegBufferCreate()`, `PetscSegBufferExtractAlloc()`, `PetscSegBufferExtractTo()`, `PetscSegBufferExtractInPlace()`, `PetscSegBufferDestroy()`,\n`PetscSegBuffer`, `PetscSegBufferGetInts()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferGet\"))\n\"\"\"\nfunction PetscSegBufferGet(petsclib::PetscLibType, seg::PetscSegBuffer, count::PetscCount, buf::Cvoid) end\n\n@for_petsc function PetscSegBufferGet(petsclib::$UnionPetscLib, seg::PetscSegBuffer, count::PetscCount, buf::Cvoid )\n\n    @chk ccall(\n               (:PetscSegBufferGet, $petsc_library),\n               PetscErrorCode,\n               (PetscSegBuffer, PetscCount, Ptr{Cvoid}),\n               seg, count, buf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSegBufferDestroy(petsclib::PetscLibType,seg::PetscSegBuffer) \ndestroy segmented buffer\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `seg` - address of segmented buffer object\n\nLevel: developer\n\n-seealso: `PetscSegBuffer`, `PetscSegBufferCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferDestroy\"))\n\"\"\"\nfunction PetscSegBufferDestroy(petsclib::PetscLibType, seg::PetscSegBuffer) end\n\n@for_petsc function PetscSegBufferDestroy(petsclib::$UnionPetscLib, seg::PetscSegBuffer )\n\n    @chk ccall(\n               (:PetscSegBufferDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSegBuffer},),\n               seg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSegBufferExtractTo(petsclib::PetscLibType,seg::PetscSegBuffer, contig::Cvoid) \nextract contiguous data to provided buffer and reset segmented buffer\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `seg`    - segmented buffer\n- `contig` - allocated buffer to hold contiguous data\n\nLevel: developer\n\n-seealso: `PetscSegBufferCreate()`, `PetscSegBufferGet()`, `PetscSegBufferDestroy()`, `PetscSegBufferExtractAlloc()`, `PetscSegBufferExtractInPlace()`,\n`PetscSegBuffer`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferExtractTo\"))\n\"\"\"\nfunction PetscSegBufferExtractTo(petsclib::PetscLibType, seg::PetscSegBuffer, contig::Cvoid) end\n\n@for_petsc function PetscSegBufferExtractTo(petsclib::$UnionPetscLib, seg::PetscSegBuffer, contig::Cvoid )\n\n    @chk ccall(\n               (:PetscSegBufferExtractTo, $petsc_library),\n               PetscErrorCode,\n               (PetscSegBuffer, Ptr{Cvoid}),\n               seg, contig,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSegBufferExtractAlloc(petsclib::PetscLibType,seg::PetscSegBuffer, contiguous::Cvoid) \nextract contiguous data to new allocation and reset segmented buffer\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `seg` - `PetscSegBuffer` buffer\n\nOutput Parameter:\n- `contiguous` - address of new array containing contiguous data, caller frees with `PetscFree()`\n\nLevel: developer\n\n-seealso: `PetscSegBufferCreate()`, `PetscSegBufferGet()`, `PetscSegBufferDestroy()`, `PetscSegBufferExtractTo()`, `PetscSegBufferExtractInPlace()`,\n`PetscSegBuffer`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferExtractAlloc\"))\n\"\"\"\nfunction PetscSegBufferExtractAlloc(petsclib::PetscLibType, seg::PetscSegBuffer, contiguous::Cvoid) end\n\n@for_petsc function PetscSegBufferExtractAlloc(petsclib::$UnionPetscLib, seg::PetscSegBuffer, contiguous::Cvoid )\n\n    @chk ccall(\n               (:PetscSegBufferExtractAlloc, $petsc_library),\n               PetscErrorCode,\n               (PetscSegBuffer, Ptr{Cvoid}),\n               seg, contiguous,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSegBufferExtractInPlace(petsclib::PetscLibType,seg::PetscSegBuffer, contig::Cvoid) \nextract in\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `seg` - `PetscSegBuffer` object\n\nOutput Parameter:\n- `contig` - address of pointer to contiguous memory, may be `NULL`\n\nLevel: developer\n\n-seealso: `PetscSegBuffer`, `PetscSegBufferExtractAlloc()`, `PetscSegBufferExtractTo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferExtractInPlace\"))\n\"\"\"\nfunction PetscSegBufferExtractInPlace(petsclib::PetscLibType, seg::PetscSegBuffer, contig::Cvoid) end\n\n@for_petsc function PetscSegBufferExtractInPlace(petsclib::$UnionPetscLib, seg::PetscSegBuffer, contig::Cvoid )\n\n    @chk ccall(\n               (:PetscSegBufferExtractInPlace, $petsc_library),\n               PetscErrorCode,\n               (PetscSegBuffer, Ptr{Cvoid}),\n               seg, contig,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSegBufferGetSize(petsclib::PetscLibType,seg::PetscSegBuffer, usedsize::PetscCount) \nget currently used number of entries of a `PetscSegBuffer`\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `seg` - `PetscSegBuffer` object\n\nOutput Parameter:\n- `usedsize` - number of used units\n\nLevel: developer\n\n-seealso: `PetscSegBuffer`, `PetscSegBufferExtractAlloc()`, `PetscSegBufferExtractTo()`, `PetscSegBufferCreate()`, `PetscSegBufferGet()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferGetSize\"))\n\"\"\"\nfunction PetscSegBufferGetSize(petsclib::PetscLibType, seg::PetscSegBuffer, usedsize::PetscCount) end\n\n@for_petsc function PetscSegBufferGetSize(petsclib::$UnionPetscLib, seg::PetscSegBuffer, usedsize::PetscCount )\n\n    @chk ccall(\n               (:PetscSegBufferGetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscSegBuffer, Ptr{PetscCount}),\n               seg, usedsize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSegBufferUnuse(petsclib::PetscLibType,seg::PetscSegBuffer, unused::PetscCount) \nreturn some unused entries obtained with an overzealous `PetscSegBufferGet()`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `seg`    - `PetscSegBuffer` object\n- `unused` - number of unused units to return\n\nLevel: developer\n\n-seealso: `PetscSegBuffer`, `PetscSegBufferCreate()`, `PetscSegBufferGet()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferUnuse\"))\n\"\"\"\nfunction PetscSegBufferUnuse(petsclib::PetscLibType, seg::PetscSegBuffer, unused::PetscCount) end\n\n@for_petsc function PetscSegBufferUnuse(petsclib::$UnionPetscLib, seg::PetscSegBuffer, unused::PetscCount )\n\n    @chk ccall(\n               (:PetscSegBufferUnuse, $petsc_library),\n               PetscErrorCode,\n               (PetscSegBuffer, PetscCount),\n               seg, unused,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSegBufferGetInts(petsclib::PetscLibType,seg::PetscSegBuffer, count::PetscCount, slot::PetscInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscSegBufferGetInts\"))\n\"\"\"\nfunction PetscSegBufferGetInts(petsclib::PetscLibType, seg::PetscSegBuffer, count::PetscCount, slot::PetscInt) end\n\n@for_petsc function PetscSegBufferGetInts(petsclib::$UnionPetscLib, seg::PetscSegBuffer, count::PetscCount, slot::$PetscInt )\n\n    @chk ccall(\n               (:PetscSegBufferGetInts, $petsc_library),\n               PetscErrorCode,\n               (PetscSegBuffer, PetscCount, $PetscInt),\n               seg, count, slot,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscSpace_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscSpace end\nconst PetscSpace = Ptr{_n_PetscSpace}\n\nmutable struct _n_PetscDualSpace end\nconst PetscDualSpace = Ptr{_n_PetscDualSpace}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscSpaceRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a new `PetscSpace` implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine for the implementation type\n\n-seealso: `PetscSpace`, `PetscSpaceRegisterAll()`, `PetscSpaceRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceRegister\"))\n\"\"\"\nfunction PetscSpaceRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscSpaceRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscSpaceRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceSetType(petsclib::PetscLibType,sp::PetscSpace, name::PetscSpaceType) \nBuilds a particular `PetscSpace`\n\nCollective\n\nInput Parameters:\n- `sp`   - The `PetscSpace` object\n- `name` - The kind of space\n\nOptions Database Key:\n- `-petscspace_type <type>` - Sets the `PetscSpace` type; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceType`, `PetscSpaceGetType()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSetType\"))\n\"\"\"\nfunction PetscSpaceSetType(petsclib::PetscLibType, sp::PetscSpace, name::PetscSpaceType) end\n\n@for_petsc function PetscSpaceSetType(petsclib::$UnionPetscLib, sp::PetscSpace, name::PetscSpaceType )\n\n    @chk ccall(\n               (:PetscSpaceSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscSpaceType),\n               sp, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tname::PetscSpaceType = PetscSpaceGetType(petsclib::PetscLibType,sp::PetscSpace) \nGets the `PetscSpaceType` (as a string) from the object.\n\nNot Collective\n\nInput Parameter:\n- `sp` - The `PetscSpace`\n\nOutput Parameter:\n- `name` - The `PetscSpace` type name\n\nLevel: intermediate\n\n-seealso: `PetscSpaceType`, `PetscSpace`, `PetscSpaceSetType()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceGetType\"))\n\"\"\"\nfunction PetscSpaceGetType(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceGetType(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tname_ = Ref{PetscSpaceType}()\n\n    @chk ccall(\n               (:PetscSpaceGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{PetscSpaceType}),\n               sp, name_,\n              )\n\n\tname = unsafe_string(name_[])\n\n\treturn name\nend \n\n\"\"\"\n\tPetscSpaceViewFromOptions(petsclib::PetscLibType,A::PetscSpace, obj::PetscObject, name::String) \nView a `PetscSpace` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscSpace` object\n- `obj`  - Optional object that provides the options name prefix\n- `name` - command line option name\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceView()`, `PetscObjectViewFromOptions()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceViewFromOptions\"))\n\"\"\"\nfunction PetscSpaceViewFromOptions(petsclib::PetscLibType, A::PetscSpace, obj::PetscObject, name::String) end\n\n@for_petsc function PetscSpaceViewFromOptions(petsclib::$UnionPetscLib, A::PetscSpace, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscSpaceViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceView(petsclib::PetscLibType,sp::PetscSpace, v::PetscViewer) \nViews a `PetscSpace`\n\nCollective\n\nInput Parameters:\n- `sp` - the `PetscSpace` object to view\n- `v`  - the viewer\n\nLevel: beginner\n\n-seealso: `PetscSpace`, `PetscViewer`, `PetscSpaceViewFromOptions()`, `PetscSpaceDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceView\"))\n\"\"\"\nfunction PetscSpaceView(petsclib::PetscLibType, sp::PetscSpace, v::PetscViewer) end\n\n@for_petsc function PetscSpaceView(petsclib::$UnionPetscLib, sp::PetscSpace, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscSpaceView, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscViewer),\n               sp, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceSetFromOptions(petsclib::PetscLibType,sp::PetscSpace) \nsets parameters in a `PetscSpace` from the options database\n\nCollective\n\nInput Parameter:\n- `sp` - the `PetscSpace` object to set options for\n\nOptions Database Keys:\n- `-petscspace_degree <deg>`   - the approximation order of the space\n- `-petscspace_variables <n>`  - the number of different variables, e.g. x and y\n- `-petscspace_components <c>` - the number of components, say d for a vector field\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceView()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSetFromOptions\"))\n\"\"\"\nfunction PetscSpaceSetFromOptions(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceSetFromOptions(petsclib::$UnionPetscLib, sp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace,),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceSetUp(petsclib::PetscLibType,sp::PetscSpace) \nConstruct data structures for the `PetscSpace`\n\nCollective\n\nInput Parameter:\n- `sp` - the `PetscSpace` object to setup\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceView()`, `PetscSpaceDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSetUp\"))\n\"\"\"\nfunction PetscSpaceSetUp(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceSetUp(petsclib::$UnionPetscLib, sp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace,),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceDestroy(petsclib::PetscLibType,sp::PetscSpace) \nDestroys a `PetscSpace` object\n\nCollective\n\nInput Parameter:\n- `sp` - the `PetscSpace` object to destroy\n\nLevel: beginner\n\n-seealso: `PetscSpace`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceDestroy\"))\n\"\"\"\nfunction PetscSpaceDestroy(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceDestroy(petsclib::$UnionPetscLib, sp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSpace},),\n               sp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsp::PetscSpace = PetscSpaceCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty `PetscSpace` object. The type can then be set with `PetscSpaceSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the `PetscSpace` object\n\nOutput Parameter:\n- `sp` - The `PetscSpace` object\n\nLevel: beginner\n\n-seealso: `PetscSpace`, `PetscSpaceSetType()`, `PETSCSPACEPOLYNOMIAL`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceCreate\"))\n\"\"\"\nfunction PetscSpaceCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscSpaceCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tsp_ = Ref{PetscSpace}()\n\n    @chk ccall(\n               (:PetscSpaceCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscSpace}),\n               comm, sp_,\n              )\n\n\tsp = sp_[]\n\n\treturn sp\nend \n\n\"\"\"\n\tdim::PetscInt = PetscSpaceGetDimension(petsclib::PetscLibType,sp::PetscSpace) \nReturn the dimension of this space, i.e. the number of basis vectors\n\nInput Parameter:\n- `sp` - The `PetscSpace`\n\nOutput Parameter:\n- `dim` - The dimension\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceGetDegree()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceGetDimension\"))\n\"\"\"\nfunction PetscSpaceGetDimension(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceGetDimension(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tdim_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSpaceGetDimension, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{$PetscInt}),\n               sp, dim_,\n              )\n\n\tdim = dim_[]\n\n\treturn dim\nend \n\n\"\"\"\n\tminDegree::PetscInt,maxDegree::PetscInt = PetscSpaceGetDegree(petsclib::PetscLibType,sp::PetscSpace) \nReturn the polynomial degrees that characterize this space\n\nInput Parameter:\n- `sp` - The `PetscSpace`\n\nOutput Parameters:\n- `minDegree` - The degree of the largest polynomial space contained in the space, pass `NULL` if not needed\n- `maxDegree` - The degree of the smallest polynomial space containing the space, pass `NULL` if not needed\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceSetDegree()`, `PetscSpaceGetDimension()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceGetDegree\"))\n\"\"\"\nfunction PetscSpaceGetDegree(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceGetDegree(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tminDegree_ = Ref{$PetscInt}()\n\tmaxDegree_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSpaceGetDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               sp, minDegree_, maxDegree_,\n              )\n\n\tminDegree = minDegree_[]\n\tmaxDegree = maxDegree_[]\n\n\treturn minDegree,maxDegree\nend \n\n\"\"\"\n\tPetscSpaceSetDegree(petsclib::PetscLibType,sp::PetscSpace, degree::PetscInt, maxDegree::PetscInt) \nSet the degree of approximation for this space.\n\nInput Parameters:\n- `sp`        - The `PetscSpace`\n- `degree`    - The degree of the largest polynomial space contained in the space\n- `maxDegree` - The degree of the largest polynomial space containing the space.  One of degree and maxDegree can be `PETSC_DETERMINE`.\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceGetDegree()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSetDegree\"))\n\"\"\"\nfunction PetscSpaceSetDegree(petsclib::PetscLibType, sp::PetscSpace, degree::PetscInt, maxDegree::PetscInt) end\n\n@for_petsc function PetscSpaceSetDegree(petsclib::$UnionPetscLib, sp::PetscSpace, degree::$PetscInt, maxDegree::$PetscInt )\n\n    @chk ccall(\n               (:PetscSpaceSetDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt, $PetscInt),\n               sp, degree, maxDegree,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tNc::PetscInt = PetscSpaceGetNumComponents(petsclib::PetscLibType,sp::PetscSpace) \nReturn the number of components for this space\n\nInput Parameter:\n- `sp` - The `PetscSpace`\n\nOutput Parameter:\n- `Nc` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceSetNumComponents()`, `PetscSpaceGetNumVariables()`, `PetscSpaceGetDimension()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceGetNumComponents\"))\n\"\"\"\nfunction PetscSpaceGetNumComponents(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceGetNumComponents(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tNc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSpaceGetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{$PetscInt}),\n               sp, Nc_,\n              )\n\n\tNc = Nc_[]\n\n\treturn Nc\nend \n\n\"\"\"\n\tPetscSpaceSetNumComponents(petsclib::PetscLibType,sp::PetscSpace, Nc::PetscInt) \nSet the number of components for this space\n\nInput Parameters:\n- `sp` - The `PetscSpace`\n- `Nc` - The number of components\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceGetNumComponents()`, `PetscSpaceSetNumVariables()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSetNumComponents\"))\n\"\"\"\nfunction PetscSpaceSetNumComponents(petsclib::PetscLibType, sp::PetscSpace, Nc::PetscInt) end\n\n@for_petsc function PetscSpaceSetNumComponents(petsclib::$UnionPetscLib, sp::PetscSpace, Nc::$PetscInt )\n\n    @chk ccall(\n               (:PetscSpaceSetNumComponents, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt),\n               sp, Nc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceSetNumVariables(petsclib::PetscLibType,sp::PetscSpace, n::PetscInt) \nSet the number of variables for this space\n\nInput Parameters:\n- `sp` - The `PetscSpace`\n- `n`  - The number of variables, e.g. x, y, z...\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceGetNumVariables()`, `PetscSpaceSetNumComponents()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSetNumVariables\"))\n\"\"\"\nfunction PetscSpaceSetNumVariables(petsclib::PetscLibType, sp::PetscSpace, n::PetscInt) end\n\n@for_petsc function PetscSpaceSetNumVariables(petsclib::$UnionPetscLib, sp::PetscSpace, n::$PetscInt )\n\n    @chk ccall(\n               (:PetscSpaceSetNumVariables, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt),\n               sp, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = PetscSpaceGetNumVariables(petsclib::PetscLibType,sp::PetscSpace) \nReturn the number of variables for this space\n\nInput Parameter:\n- `sp` - The `PetscSpace`\n\nOutput Parameter:\n- `n` - The number of variables, e.g. x, y, z...\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpaceSetNumVariables()`, `PetscSpaceGetNumComponents()`, `PetscSpaceGetDimension()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceGetNumVariables\"))\n\"\"\"\nfunction PetscSpaceGetNumVariables(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceGetNumVariables(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSpaceGetNumVariables, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{$PetscInt}),\n               sp, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tB::Vector{PetscReal},D::Vector{PetscReal},H::Vector{PetscReal} = PetscSpaceEvaluate(petsclib::PetscLibType,sp::PetscSpace, npoints::PetscInt, points::Vector{PetscReal}) \nEvaluate the basis functions and their derivatives (jet) at each point\n\nInput Parameters:\n- `sp`      - The `PetscSpace`\n- `npoints` - The number of evaluation points, in reference coordinates\n- `points`  - The point coordinates\n\nOutput Parameters:\n- `B` - The function evaluations in a `npoints` x `nfuncs` array\n- `D` - The derivative evaluations in a `npoints` x `nfuncs` x `dim` array\n- `H` - The second derivative evaluations in a `npoints` x `nfuncs` x `dim` x `dim` array\n\nLevel: beginner\n\n-seealso: `PetscSpace`, `PetscFECreateTabulation()`, `PetscFEGetCellTabulation()`, `PetscSpaceCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceEvaluate\"))\n\"\"\"\nfunction PetscSpaceEvaluate(petsclib::PetscLibType, sp::PetscSpace, npoints::PetscInt, points::Vector{PetscReal}) end\n\n@for_petsc function PetscSpaceEvaluate(petsclib::$UnionPetscLib, sp::PetscSpace, npoints::$PetscInt, points::Vector{$PetscReal} )\n\tB = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tD = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tH = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscSpaceEvaluate, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               sp, npoints, points, B, D, H,\n              )\n\n\n\treturn B,D,H\nend \n\n\"\"\"\n\tPetscSpaceGetHeightSubspace(petsclib::PetscLibType,sp::PetscSpace, height::PetscInt, subsp::PetscSpace) \nGet the subset of the primal space basis that is supported on a mesh point of a given height.\n\nNot Collective\n\nInput Parameters:\n- `sp`     - the `PetscSpace` object\n- `height` - the height of the mesh point for which the subspace is desired\n\nOutput Parameter:\n- `subsp` - the subspace\n\nLevel: advanced\n\n-seealso: `PetscDualSpaceGetHeightSubspace()`, `PetscSpace`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceGetHeightSubspace\"))\n\"\"\"\nfunction PetscSpaceGetHeightSubspace(petsclib::PetscLibType, sp::PetscSpace, height::PetscInt, subsp::PetscSpace) end\n\n@for_petsc function PetscSpaceGetHeightSubspace(petsclib::$UnionPetscLib, sp::PetscSpace, height::$PetscInt, subsp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceGetHeightSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt, Ptr{PetscSpace}),\n               sp, height, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsubspace::PetscSpace = PetscSpaceCreateSubspace(petsclib::PetscLibType,origSpace::PetscSpace, dualSubspace::PetscDualSpace, x::PetscReal, Jx::PetscReal, u::PetscReal, Ju::PetscReal, copymode::PetscCopyMode) \ncreates a subspace from a an `origSpace` and its dual `dualSubspace`\n\nInput Parameters:\n- `origSpace`    - the original `PetscSpace`\n- `dualSubspace` - no idea\n- `x`            - no idea\n- `Jx`           - no idea\n- `u`            - no idea\n- `Ju`           - no idea\n- `copymode`     - whether to copy, borrow, or own some of the input arrays I guess\n\nOutput Parameter:\n- `subspace` - the subspace\n\nLevel: advanced\n\n-seealso: `PetscSpace`, `PetscDualSpace`, `PetscCopyMode`, `PetscSpaceType`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceCreateSubspace\"))\n\"\"\"\nfunction PetscSpaceCreateSubspace(petsclib::PetscLibType, origSpace::PetscSpace, dualSubspace::PetscDualSpace, x::PetscReal, Jx::PetscReal, u::PetscReal, Ju::PetscReal, copymode::PetscCopyMode) end\n\n@for_petsc function PetscSpaceCreateSubspace(petsclib::$UnionPetscLib, origSpace::PetscSpace, dualSubspace::PetscDualSpace, x::$PetscReal, Jx::$PetscReal, u::$PetscReal, Ju::$PetscReal, copymode::PetscCopyMode )\n\tsubspace_ = Ref{PetscSpace}()\n\n    @chk ccall(\n               (:PetscSpaceCreateSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscDualSpace, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, PetscCopyMode, Ptr{PetscSpace}),\n               origSpace, dualSubspace, x, Jx, u, Ju, copymode, subspace_,\n              )\n\n\tsubspace = subspace_[]\n\n\treturn subspace\nend \n\n\"\"\"\n\tPetscSpacePointSetPoints(petsclib::PetscLibType,sp::PetscSpace, q::PetscQuadrature) \nSets the evaluation points for the space to coincide with the points of a quadrature rule\n\nLogically Collective\n\nInput Parameters:\n- `sp` - The `PetscSpace`\n- `q`  - The `PetscQuadrature` defining the points\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscQuadrature`, `PetscSpaceCreate()`, `PetscSpaceSetType()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpacePointSetPoints\"))\n\"\"\"\nfunction PetscSpacePointSetPoints(petsclib::PetscLibType, sp::PetscSpace, q::PetscQuadrature) end\n\n@for_petsc function PetscSpacePointSetPoints(petsclib::$UnionPetscLib, sp::PetscSpace, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscSpacePointSetPoints, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscQuadrature),\n               sp, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpacePointGetPoints(petsclib::PetscLibType,sp::PetscSpace, q::PetscQuadrature) \nGets the evaluation points for the space as the points of a quadrature rule\n\nLogically Collective\n\nInput Parameter:\n- `sp` - The `PetscSpace`\n\nOutput Parameter:\n- `q` - The `PetscQuadrature` defining the points\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscQuadrature`, `PetscSpaceCreate()`, `PetscSpaceSetType()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpacePointGetPoints\"))\n\"\"\"\nfunction PetscSpacePointGetPoints(petsclib::PetscLibType, sp::PetscSpace, q::PetscQuadrature) end\n\n@for_petsc function PetscSpacePointGetPoints(petsclib::$UnionPetscLib, sp::PetscSpace, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscSpacePointGetPoints, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{PetscQuadrature}),\n               sp, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumSumSpaces::PetscInt = PetscSpaceSumGetNumSubspaces(petsclib::PetscLibType,sp::PetscSpace) \nGet the number of spaces in the sum space\n\nInput Parameter:\n- `sp` - the function space object\n\nOutput Parameter:\n- `numSumSpaces` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumSetNumSubspaces()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumGetNumSubspaces\"))\n\"\"\"\nfunction PetscSpaceSumGetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceSumGetNumSubspaces(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tnumSumSpaces_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSpaceSumGetNumSubspaces, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{$PetscInt}),\n               sp, numSumSpaces_,\n              )\n\n\tnumSumSpaces = numSumSpaces_[]\n\n\treturn numSumSpaces\nend \n\n\"\"\"\n\tPetscSpaceSumSetNumSubspaces(petsclib::PetscLibType,sp::PetscSpace, numSumSpaces::PetscInt) \nSet the number of spaces in the sum space\n\nInput Parameters:\n- `sp`           - the function space object\n- `numSumSpaces` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumGetNumSubspaces()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumSetNumSubspaces\"))\n\"\"\"\nfunction PetscSpaceSumSetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace, numSumSpaces::PetscInt) end\n\n@for_petsc function PetscSpaceSumSetNumSubspaces(petsclib::$UnionPetscLib, sp::PetscSpace, numSumSpaces::$PetscInt )\n\n    @chk ccall(\n               (:PetscSpaceSumSetNumSubspaces, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt),\n               sp, numSumSpaces,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tconcatenate::PetscBool = PetscSpaceSumGetConcatenate(petsclib::PetscLibType,sp::PetscSpace) \nGet the concatenate flag for this space.\n\nInput Parameter:\n- `sp` - the function space object\n\nOutput Parameter:\n- `concatenate` - flag indicating whether subspaces are concatenated.\n\nLevel: intermediate\n\n-seealso: `PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumSetConcatenate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumGetConcatenate\"))\n\"\"\"\nfunction PetscSpaceSumGetConcatenate(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceSumGetConcatenate(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tconcatenate_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSpaceSumGetConcatenate, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{PetscBool}),\n               sp, concatenate_,\n              )\n\n\tconcatenate = concatenate_[]\n\n\treturn concatenate\nend \n\n\"\"\"\n\tPetscSpaceSumSetConcatenate(petsclib::PetscLibType,sp::PetscSpace, concatenate::PetscBool) \nSets the concatenate flag for this space.\n\nInput Parameters:\n- `sp`          - the function space object\n- `concatenate` - are subspaces concatenated components (true) or direct summands (false)\n\nLevel: intermediate\n\n-seealso: `PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumGetConcatenate()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumSetConcatenate\"))\n\"\"\"\nfunction PetscSpaceSumSetConcatenate(petsclib::PetscLibType, sp::PetscSpace, concatenate::PetscBool) end\n\n@for_petsc function PetscSpaceSumSetConcatenate(petsclib::$UnionPetscLib, sp::PetscSpace, concatenate::PetscBool )\n\n    @chk ccall(\n               (:PetscSpaceSumSetConcatenate, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscBool),\n               sp, concatenate,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceSumGetSubspace(petsclib::PetscLibType,sp::PetscSpace, s::PetscInt, subsp::PetscSpace) \nGet a space in the sum space\n\nInput Parameters:\n- `sp` - the function space object\n- `s`  - The space number\n\nOutput Parameter:\n- `subsp` - the `PetscSpace`\n\nLevel: intermediate\n\n-seealso: `PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumSetSubspace()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumGetSubspace\"))\n\"\"\"\nfunction PetscSpaceSumGetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt, subsp::PetscSpace) end\n\n@for_petsc function PetscSpaceSumGetSubspace(petsclib::$UnionPetscLib, sp::PetscSpace, s::$PetscInt, subsp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceSumGetSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt, Ptr{PetscSpace}),\n               sp, s, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceSumSetSubspace(petsclib::PetscLibType,sp::PetscSpace, s::PetscInt, subsp::PetscSpace) \nSet a space in the sum space\n\nInput Parameters:\n- `sp`    - the function space object\n- `s`     - The space number\n- `subsp` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumGetSubspace()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumSetSubspace\"))\n\"\"\"\nfunction PetscSpaceSumSetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt, subsp::PetscSpace) end\n\n@for_petsc function PetscSpaceSumSetSubspace(petsclib::$UnionPetscLib, sp::PetscSpace, s::$PetscInt, subsp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceSumSetSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt, PetscSpace),\n               sp, s, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceSumSetInterleave(petsclib::PetscLibType,sp::PetscSpace, interleave_basis::PetscBool, interleave_components::PetscBool) \nSet whether the basis functions and components of a uniform sum are interleaved\n\nLogically collective\n\nInput Parameters:\n- `sp`                    - a `PetscSpace` of type `PETSCSPACESUM`\n- `interleave_basis`      - if `PETSC_TRUE`, the basis vectors of the subspaces are interleaved\n- `interleave_components` - if `PETSC_TRUE` and the space concatenates components (`PetscSpaceSumGetConcatenate()`),\ninterleave the concatenated components\n\nLevel: developer\n\n-seealso: `PetscSpace`, `PETSCSPACESUM`, `PETSCFEVECTOR`, `PetscSpaceSumGetInterleave()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumSetInterleave\"))\n\"\"\"\nfunction PetscSpaceSumSetInterleave(petsclib::PetscLibType, sp::PetscSpace, interleave_basis::PetscBool, interleave_components::PetscBool) end\n\n@for_petsc function PetscSpaceSumSetInterleave(petsclib::$UnionPetscLib, sp::PetscSpace, interleave_basis::PetscBool, interleave_components::PetscBool )\n\n    @chk ccall(\n               (:PetscSpaceSumSetInterleave, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscBool, PetscBool),\n               sp, interleave_basis, interleave_components,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tinterleave_basis::PetscBool,interleave_components::PetscBool = PetscSpaceSumGetInterleave(petsclib::PetscLibType,sp::PetscSpace) \nGet whether the basis functions and components of a uniform sum are interleaved\n\nLogically collective\n\nInput Parameter:\n- `sp` - a `PetscSpace` of type `PETSCSPACESUM`\n\nOutput Parameters:\n- `interleave_basis`      - if `PETSC_TRUE`, the basis vectors of the subspaces are interleaved\n- `interleave_components` - if `PETSC_TRUE` and the space concatenates components (`PetscSpaceSumGetConcatenate()`),\ninterleave the concatenated components\n\nLevel: developer\n\n-seealso: `PetscSpace`, `PETSCSPACESUM`, `PETSCFEVECTOR`, `PetscSpaceSumSetInterleave()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceSumGetInterleave\"))\n\"\"\"\nfunction PetscSpaceSumGetInterleave(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceSumGetInterleave(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tinterleave_basis_ = Ref{PetscBool}()\n\tinterleave_components_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSpaceSumGetInterleave, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{PetscBool}, Ptr{PetscBool}),\n               sp, interleave_basis_, interleave_components_,\n              )\n\n\tinterleave_basis = interleave_basis_[]\n\tinterleave_components = interleave_components_[]\n\n\treturn interleave_basis,interleave_components\nend \n\n\"\"\"\n\tPetscSpaceTensorSetNumSubspaces(petsclib::PetscLibType,sp::PetscSpace, numTensSpaces::PetscInt) \nSet the number of spaces in the tensor product space\n\nInput Parameters:\n- `sp`            - the function space object\n- `numTensSpaces` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCSPACETENSOR`, `PetscSpace`, `PetscSpaceTensorGetNumSubspaces()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceTensorSetNumSubspaces\"))\n\"\"\"\nfunction PetscSpaceTensorSetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace, numTensSpaces::PetscInt) end\n\n@for_petsc function PetscSpaceTensorSetNumSubspaces(petsclib::$UnionPetscLib, sp::PetscSpace, numTensSpaces::$PetscInt )\n\n    @chk ccall(\n               (:PetscSpaceTensorSetNumSubspaces, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt),\n               sp, numTensSpaces,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumTensSpaces::PetscInt = PetscSpaceTensorGetNumSubspaces(petsclib::PetscLibType,sp::PetscSpace) \nGet the number of spaces in the tensor product space\n\nInput Parameter:\n- `sp` - the function space object\n\nOutput Parameter:\n- `numTensSpaces` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCSPACETENSOR`, `PetscSpace`, `PetscSpaceTensorSetNumSubspaces()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceTensorGetNumSubspaces\"))\n\"\"\"\nfunction PetscSpaceTensorGetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpaceTensorGetNumSubspaces(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tnumTensSpaces_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSpaceTensorGetNumSubspaces, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{$PetscInt}),\n               sp, numTensSpaces_,\n              )\n\n\tnumTensSpaces = numTensSpaces_[]\n\n\treturn numTensSpaces\nend \n\n\"\"\"\n\tPetscSpaceTensorSetSubspace(petsclib::PetscLibType,sp::PetscSpace, s::PetscInt, subsp::PetscSpace) \nSet a space in the tensor product space\n\nInput Parameters:\n- `sp`    - the function space object\n- `s`     - The space number\n- `subsp` - the number of spaces\n\nLevel: intermediate\n\n-seealso: `PETSCSPACETENSOR`, `PetscSpace`, `PetscSpaceTensorGetSubspace()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceTensorSetSubspace\"))\n\"\"\"\nfunction PetscSpaceTensorSetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt, subsp::PetscSpace) end\n\n@for_petsc function PetscSpaceTensorSetSubspace(petsclib::$UnionPetscLib, sp::PetscSpace, s::$PetscInt, subsp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceTensorSetSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt, PetscSpace),\n               sp, s, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpaceTensorGetSubspace(petsclib::PetscLibType,sp::PetscSpace, s::PetscInt, subsp::PetscSpace) \nGet a space in the tensor product space\n\nInput Parameters:\n- `sp` - the function space object\n- `s`  - The space number\n\nOutput Parameter:\n- `subsp` - the `PetscSpace`\n\nLevel: intermediate\n\n-seealso: `PETSCSPACETENSOR`, `PetscSpace`, `PetscSpaceTensorSetSubspace()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpaceTensorGetSubspace\"))\n\"\"\"\nfunction PetscSpaceTensorGetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt, subsp::PetscSpace) end\n\n@for_petsc function PetscSpaceTensorGetSubspace(petsclib::$UnionPetscLib, sp::PetscSpace, s::$PetscInt, subsp::PetscSpace )\n\n    @chk ccall(\n               (:PetscSpaceTensorGetSubspace, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt, Ptr{PetscSpace}),\n               sp, s, subsp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSpacePTrimmedSetFormDegree(petsclib::PetscLibType,sp::PetscSpace, formDegree::PetscInt) \nSet the form degree of the trimmed polynomials.\n\nInput Parameters:\n- `sp`         - the function space object\n- `formDegree` - the form degree\n\nOptions Database Key:\n- `-petscspace_ptrimmed_form_degree <int>` - The trimmed polynomial form degree\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscDTAltV`, `PetscDTPTrimmedEvalJet()`, `PetscSpacePTrimmedGetFormDegree()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpacePTrimmedSetFormDegree\"))\n\"\"\"\nfunction PetscSpacePTrimmedSetFormDegree(petsclib::PetscLibType, sp::PetscSpace, formDegree::PetscInt) end\n\n@for_petsc function PetscSpacePTrimmedSetFormDegree(petsclib::$UnionPetscLib, sp::PetscSpace, formDegree::$PetscInt )\n\n    @chk ccall(\n               (:PetscSpacePTrimmedSetFormDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, $PetscInt),\n               sp, formDegree,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tformDegree::PetscInt = PetscSpacePTrimmedGetFormDegree(petsclib::PetscLibType,sp::PetscSpace) \nGet the form degree of the trimmed polynomials.\n\nInput Parameter:\n- `sp` - the function space object\n\nOutput Parameter:\n- `formDegree` - the form degree\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscDTAltV`, `PetscDTPTrimmedEvalJet()`, `PetscSpacePTrimmedSetFormDegree()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpacePTrimmedGetFormDegree\"))\n\"\"\"\nfunction PetscSpacePTrimmedGetFormDegree(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpacePTrimmedGetFormDegree(petsclib::$UnionPetscLib, sp::PetscSpace )\n\tformDegree_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscSpacePTrimmedGetFormDegree, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{$PetscInt}),\n               sp, formDegree_,\n              )\n\n\tformDegree = formDegree_[]\n\n\treturn formDegree\nend \n\n\"\"\"\n\tPetscSpacePolynomialSetTensor(petsclib::PetscLibType,sp::PetscSpace, tensor::PetscBool) \nSet whether a function space is a space of tensor polynomials.\n\nInput Parameters:\n- `sp`     - the function space object\n- `tensor` - `PETSC_TRUE` for a tensor polynomial space, `PETSC_FALSE` for a polynomial space\n\nOptions Database Key:\n- `-petscspace_poly_tensor <bool>` - Whether to use tensor product polynomials in higher dimension\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpacePolynomialGetTensor()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpacePolynomialSetTensor\"))\n\"\"\"\nfunction PetscSpacePolynomialSetTensor(petsclib::PetscLibType, sp::PetscSpace, tensor::PetscBool) end\n\n@for_petsc function PetscSpacePolynomialSetTensor(petsclib::$UnionPetscLib, sp::PetscSpace, tensor::PetscBool )\n\n    @chk ccall(\n               (:PetscSpacePolynomialSetTensor, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, PetscBool),\n               sp, tensor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttensor::PetscBool = PetscSpacePolynomialGetTensor(petsclib::PetscLibType,sp::PetscSpace) \nGet whether a function space is a space of tensor\npolynomials.\n\nInput Parameter:\n- `sp` - the function space object\n\nOutput Parameter:\n- `tensor` - `PETSC_TRUE` for a tensor polynomial space, `PETSC_FALSE` for a polynomial space\n\nLevel: intermediate\n\n-seealso: `PetscSpace`, `PetscSpacePolynomialSetTensor()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`\n\n# External Links\n$(_doc_external(\"DM/PetscSpacePolynomialGetTensor\"))\n\"\"\"\nfunction PetscSpacePolynomialGetTensor(petsclib::PetscLibType, sp::PetscSpace) end\n\n@for_petsc function PetscSpacePolynomialGetTensor(petsclib::$UnionPetscLib, sp::PetscSpace )\n\ttensor_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSpacePolynomialGetTensor, $petsc_library),\n               PetscErrorCode,\n               (PetscSpace, Ptr{PetscBool}),\n               sp, tensor_,\n              )\n\n\ttensor = tensor_[]\n\n\treturn tensor\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscToken_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscToken end\nconst PetscToken = Ptr{_n_PetscToken}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscTokenFind(petsclib::PetscLibType,a::PetscToken, result::String) \nLocates next \"token\" in a `PetscToken`\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `a` - pointer to token\n\nOutput Parameter:\n- `result` - location of occurrence, `NULL` if not found\n\nLevel: intermediate\n\n-seealso: `PetscToken`, `PetscTokenCreate()`, `PetscTokenDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscTokenFind\"))\n\"\"\"\nfunction PetscTokenFind(petsclib::PetscLibType, a::PetscToken, result::String) end\n\n@for_petsc function PetscTokenFind(petsclib::$UnionPetscLib, a::PetscToken, result::String )\n\tresult_ = Ref(pointer(result))\n\n    @chk ccall(\n               (:PetscTokenFind, $petsc_library),\n               PetscErrorCode,\n               (PetscToken, Ptr{Ptr{Cchar}}),\n               a, result_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tt::PetscToken = PetscTokenCreate(petsclib::PetscLibType,a::String, b::Cchar) \nCreates a `PetscToken` used to find tokens in a string\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `a` - the string to look in\n- `b` - the separator character\n\nOutput Parameter:\n- `t` - the token object\n\nLevel: intermediate\n\n-seealso: `PetscToken`, `PetscTokenFind()`, `PetscTokenDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscTokenCreate\"))\n\"\"\"\nfunction PetscTokenCreate(petsclib::PetscLibType, a::String, b::Cchar) end\n\n@for_petsc function PetscTokenCreate(petsclib::$UnionPetscLib, a::String, b::Cchar )\n\tt_ = Ref{PetscToken}()\n\n    @chk ccall(\n               (:PetscTokenCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar, Ptr{PetscToken}),\n               a, b, t_,\n              )\n\n\tt = t_[]\n\n\treturn t\nend \n\n\"\"\"\n\tPetscTokenDestroy(petsclib::PetscLibType,a::PetscToken) \nDestroys a `PetscToken`\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `a` - pointer to token\n\nLevel: intermediate\n\n-seealso: `PetscToken`, `PetscTokenCreate()`, `PetscTokenFind()`\n\n# External Links\n$(_doc_external(\"Sys/PetscTokenDestroy\"))\n\"\"\"\nfunction PetscTokenDestroy(petsclib::PetscLibType, a::PetscToken) end\n\n@for_petsc function PetscTokenDestroy(petsclib::$UnionPetscLib, a::PetscToken )\n\n    @chk ccall(\n               (:PetscTokenDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscToken},),\n               a,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/PetscViennaCLIndices_wrappers.jl",
    "content": "# autodefined type arguments for class ------\n# -------------------------------------------------------\n"
  },
  {
    "path": "src/autowrapped/PetscViewer_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_DMPlexStorageVersion end\nconst DMPlexStorageVersion = Ptr{_n_DMPlexStorageVersion}\n\nmutable struct _n_PetscViewers end\nconst PetscViewers = Ptr{_n_PetscViewers}\n# -------------------------------------------------------\n\n\"\"\"\n\tinviewer::PetscViewer = PetscViewerCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a viewing context. A `PetscViewer` represents a file, a graphical window, a Unix socket or a variety of other ways\nof viewing a PETSc object\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `inviewer` - location to put the `PetscViewer` context\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerType`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCreate\"))\n\"\"\"\nfunction PetscViewerCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscViewerCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tinviewer_ = Ref{PetscViewer}()\n\n    @chk ccall(\n               (:PetscViewerCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscViewer}),\n               comm, inviewer_,\n              )\n\n\tinviewer = inviewer_[]\n\n\treturn inviewer\nend \n\n\"\"\"\n\tPetscViewerRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a viewer to those available for use with `PetscViewerSetType()`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined viewer\n- `function` - routine to create method context\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscViewerRegisterAll()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerRegister\"))\n\"\"\"\nfunction PetscViewerRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function PetscViewerRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:PetscViewerRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmcnt::PetscInt,cnt::PetscInt = PetscViewerFlowControlStart(petsclib::PetscLibType,viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFlowControlStart\"))\n\"\"\"\nfunction PetscViewerFlowControlStart(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerFlowControlStart(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tmcnt_ = Ref{$PetscInt}()\n\tcnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerFlowControlStart, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               viewer, mcnt_, cnt_,\n              )\n\n\tmcnt = mcnt_[]\n\tcnt = cnt_[]\n\n\treturn mcnt,cnt\nend \n\n\"\"\"\n\tmcnt::PetscInt = PetscViewerFlowControlStepMain(petsclib::PetscLibType,viewer::PetscViewer, i::PetscInt, cnt::PetscInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFlowControlStepMain\"))\n\"\"\"\nfunction PetscViewerFlowControlStepMain(petsclib::PetscLibType, viewer::PetscViewer, i::PetscInt, cnt::PetscInt) end\n\n@for_petsc function PetscViewerFlowControlStepMain(petsclib::$UnionPetscLib, viewer::PetscViewer, i::$PetscInt, cnt::$PetscInt )\n\tmcnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerFlowControlStepMain, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt, Ptr{$PetscInt}, $PetscInt),\n               viewer, i, mcnt_, cnt,\n              )\n\n\tmcnt = mcnt_[]\n\n\treturn mcnt\nend \n\n\"\"\"\n\tmcnt::PetscInt = PetscViewerFlowControlEndMain(petsclib::PetscLibType,viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFlowControlEndMain\"))\n\"\"\"\nfunction PetscViewerFlowControlEndMain(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerFlowControlEndMain(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tmcnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerFlowControlEndMain, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}),\n               viewer, mcnt_,\n              )\n\n\tmcnt = mcnt_[]\n\n\treturn mcnt\nend \n\n\"\"\"\n\tmcnt::PetscInt = PetscViewerFlowControlStepWorker(petsclib::PetscLibType,viewer::PetscViewer, rank::PetscMPIInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFlowControlStepWorker\"))\n\"\"\"\nfunction PetscViewerFlowControlStepWorker(petsclib::PetscLibType, viewer::PetscViewer, rank::PetscMPIInt) end\n\n@for_petsc function PetscViewerFlowControlStepWorker(petsclib::$UnionPetscLib, viewer::PetscViewer, rank::PetscMPIInt )\n\tmcnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerFlowControlStepWorker, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscMPIInt, Ptr{$PetscInt}),\n               viewer, rank, mcnt_,\n              )\n\n\tmcnt = mcnt_[]\n\n\treturn mcnt\nend \n\n\"\"\"\n\tmcnt::PetscInt = PetscViewerFlowControlEndWorker(petsclib::PetscLibType,viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFlowControlEndWorker\"))\n\"\"\"\nfunction PetscViewerFlowControlEndWorker(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerFlowControlEndWorker(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tmcnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerFlowControlEndWorker, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}),\n               viewer, mcnt_,\n              )\n\n\tmcnt = mcnt_[]\n\n\treturn mcnt\nend \n\n\"\"\"\n\tPetscViewerFlush(petsclib::PetscLibType,viewer::PetscViewer) \nFlushes a `PetscViewer` (i.e. tries to dump all the\ndata that has been printed through a `PetscViewer`).\n\nCollective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` to be flushed\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerWriteable()`, `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`, `PetscViewerCreate()`, `PetscViewerDestroy()`,\n`PetscViewerSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFlush\"))\n\"\"\"\nfunction PetscViewerFlush(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerFlush(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerFlush, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerPushFormat(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat) \nSets the format for a `PetscViewer`.\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`\n- `format` - the format\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerFormat`, `PetscViewerASCIIOpen()`, `PetscViewerBinaryOpen()`, `MatView()`, `VecView()`,\n`PetscViewerSetFormat()`, `PetscViewerPopFormat()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerPushFormat\"))\n\"\"\"\nfunction PetscViewerPushFormat(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat) end\n\n@for_petsc function PetscViewerPushFormat(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat )\n\n    @chk ccall(\n               (:PetscViewerPushFormat, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat),\n               viewer, format,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerPopFormat(petsclib::PetscLibType,viewer::PetscViewer) \nResets the format for a `PetscViewer` to the value it had before the previous call to `PetscViewerPushFormat()`\n\nLogically Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerFormat`, `PetscViewerASCIIOpen()`, `PetscViewerBinaryOpen()`, `MatView()`, `VecView()`,\n`PetscViewerSetFormat()`, `PetscViewerPushFormat()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerPopFormat\"))\n\"\"\"\nfunction PetscViewerPopFormat(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerPopFormat(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerPopFormat, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerGetFormat(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat) \nGets the current format for `PetscViewer`.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nOutput Parameter:\n- `format` - the format\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerASCIIOpen()`, `PetscViewerBinaryOpen()`, `MatView()`, `VecView()`, `PetscViewerType`,\n`PetscViewerPushFormat()`, `PetscViewerPopFormat()`, `PetscViewerDrawOpen()`, `PetscViewerSocketOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGetFormat\"))\n\"\"\"\nfunction PetscViewerGetFormat(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat) end\n\n@for_petsc function PetscViewerGetFormat(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat )\n\n    @chk ccall(\n               (:PetscViewerGetFormat, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscViewerFormat}),\n               viewer, format,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerGetSubViewer(petsclib::PetscLibType,viewer::PetscViewer, comm::MPI_Comm, outviewer::PetscViewer) \nCreates a new `PetscViewer` (same type as the old)\nthat lives on a subcommunicator of the original viewer's communicator\n\nCollective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` to be reproduced\n- `comm`   - the sub communicator to use\n\nOutput Parameter:\n- `outviewer` - new `PetscViewer`\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`,\n`PetscViewerFlush()`, `PetscViewerRestoreSubViewer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGetSubViewer\"))\n\"\"\"\nfunction PetscViewerGetSubViewer(petsclib::PetscLibType, viewer::PetscViewer, comm::MPI_Comm, outviewer::PetscViewer) end\n\n@for_petsc function PetscViewerGetSubViewer(petsclib::$UnionPetscLib, viewer::PetscViewer, comm::MPI_Comm, outviewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerGetSubViewer, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, MPI_Comm, Ptr{PetscViewer}),\n               viewer, comm, outviewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerRestoreSubViewer(petsclib::PetscLibType,viewer::PetscViewer, comm::MPI_Comm, outviewer::PetscViewer) \nRestores a  `PetscViewer` obtained with `PetscViewerGetSubViewer()`.\n\nCollective\n\nInput Parameters:\n- `viewer`    - the `PetscViewer` that was reproduced\n- `comm`      - the sub communicator\n- `outviewer` - the subviewer to be returned\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`, `PetscViewerGetSubViewer()`,\n`PetscViewerFlush()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerRestoreSubViewer\"))\n\"\"\"\nfunction PetscViewerRestoreSubViewer(petsclib::PetscLibType, viewer::PetscViewer, comm::MPI_Comm, outviewer::PetscViewer) end\n\n@for_petsc function PetscViewerRestoreSubViewer(petsclib::$UnionPetscLib, viewer::PetscViewer, comm::MPI_Comm, outviewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerRestoreSubViewer, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, MPI_Comm, Ptr{PetscViewer}),\n               viewer, comm, outviewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerFinalizePackage(petsclib::PetscLibType) \nThis function destroys any global objects created in PETSc viewers. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscFinalize()`, `PetscViewerInitializePackage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFinalizePackage\"))\n\"\"\"\nfunction PetscViewerFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscViewerFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscViewerFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `PetscViewer` package.\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscInitialize()`, `PetscViewerFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerInitializePackage\"))\n\"\"\"\nfunction PetscViewerInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscViewerInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscViewerInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDestroy(petsclib::PetscLibType,viewer::PetscViewer) \nDestroys a `PetscViewer`.\n\nCollective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` to be destroyed.\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerCreate()`, `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDestroy\"))\n\"\"\"\nfunction PetscViewerDestroy(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerDestroy(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscViewer},),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvf::PetscViewerAndFormat = PetscViewerAndFormatCreate(petsclib::PetscLibType,viewer::PetscViewer, format::PetscViewerFormat) \nCreates a `PetscViewerAndFormat` struct.\n\nCollective\n\nInput Parameters:\n- `viewer` - the viewer\n- `format` - the format\n\nOutput Parameter:\n- `vf` - viewer and format object\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerAndFormat`, `PetscViewerFormat`, `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerCreate()`,\n`PetscViewerDrawOpen()`, `PetscViewerAndFormatDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerAndFormatCreate\"))\n\"\"\"\nfunction PetscViewerAndFormatCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat) end\n\n@for_petsc function PetscViewerAndFormatCreate(petsclib::$UnionPetscLib, viewer::PetscViewer, format::PetscViewerFormat )\n\tvf_ = Ref{PetscViewerAndFormat}()\n\n    @chk ccall(\n               (:PetscViewerAndFormatCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerFormat, PetscViewerAndFormat),\n               viewer, format, vf_,\n              )\n\n\tvf = vf_[]\n\n\treturn vf\nend \n\n\"\"\"\n\tPetscViewerAndFormatDestroy(petsclib::PetscLibType,vf::PetscViewerAndFormat) \nDestroys a `PetscViewerAndFormat` struct created with `PetscViewerAndFormatCreate()`\n\nCollective\n\nInput Parameter:\n- `vf` - the `PetscViewerAndFormat` to be destroyed.\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerAndFormat`, `PetscViewerFormat`, `PetscViewerAndFormatCreate()`, `PetscViewerSocketOpen()`,\n`PetscViewerASCIIOpen()`, `PetscViewerCreate()`, `PetscViewerDrawOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerAndFormatDestroy\"))\n\"\"\"\nfunction PetscViewerAndFormatDestroy(petsclib::PetscLibType, vf::PetscViewerAndFormat) end\n\n@for_petsc function PetscViewerAndFormatDestroy(petsclib::$UnionPetscLib, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:PetscViewerAndFormatDestroy, $petsc_library),\n               PetscErrorCode,\n               (PetscViewerAndFormat,),\n               vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscViewerType = PetscViewerGetType(petsclib::PetscLibType,viewer::PetscViewer) \nReturns the type of a `PetscViewer`.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nOutput Parameter:\n- `type` - `PetscViewerType`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewerType`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGetType\"))\n\"\"\"\nfunction PetscViewerGetType(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerGetType(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\ttype_ = Ref{PetscViewerType}()\n\n    @chk ccall(\n               (:PetscViewerGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscViewerType}),\n               viewer, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscViewerAppendOptionsPrefix(petsclib::PetscLibType,viewer::PetscViewer, prefix::String) \nAppends to the prefix used for searching for\n`PetscViewer` options in the database during `PetscViewerSetFromOptions()`.\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerGetOptionsPrefix()`, `PetscViewerSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerAppendOptionsPrefix\"))\n\"\"\"\nfunction PetscViewerAppendOptionsPrefix(petsclib::PetscLibType, viewer::PetscViewer, prefix::String) end\n\n@for_petsc function PetscViewerAppendOptionsPrefix(petsclib::$UnionPetscLib, viewer::PetscViewer, prefix::String )\n\n    @chk ccall(\n               (:PetscViewerAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerGetOptionsPrefix(petsclib::PetscLibType,viewer::PetscViewer, prefix::String) \nGets the prefix used for searching for\n`PetscViewer` options in the database during `PetscViewerSetFromOptions()`.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` context\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerAppendOptionsPrefix()`, `PetscViewerSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGetOptionsPrefix\"))\n\"\"\"\nfunction PetscViewerGetOptionsPrefix(petsclib::PetscLibType, viewer::PetscViewer, prefix::String) end\n\n@for_petsc function PetscViewerGetOptionsPrefix(petsclib::$UnionPetscLib, viewer::PetscViewer, prefix::String )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:PetscViewerGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               viewer, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerViewFromOptions(petsclib::PetscLibType,A::PetscViewer, obj::PetscObject, name::String) \nView from the viewer based on options in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `PetscViewer` context\n- `obj`  - Optional object that provides the prefix for the option names\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerView`, `PetscObjectViewFromOptions()`, `PetscViewerCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerViewFromOptions\"))\n\"\"\"\nfunction PetscViewerViewFromOptions(petsclib::PetscLibType, A::PetscViewer, obj::PetscObject, name::String) end\n\n@for_petsc function PetscViewerViewFromOptions(petsclib::$UnionPetscLib, A::PetscViewer, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:PetscViewerViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerView(petsclib::PetscLibType,v::PetscViewer, viewer::PetscViewer) \nVisualizes a viewer object.\n\nCollective\n\nInput Parameters:\n- `v`      - the viewer to be viewed\n- `viewer` - visualization context\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerPushFormat()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`,\n`PetscViewerSocketOpen()`, `PetscViewerBinaryOpen()`, `PetscViewerLoad()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerView\"))\n\"\"\"\nfunction PetscViewerView(petsclib::PetscLibType, v::PetscViewer, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerView(petsclib::$UnionPetscLib, v::PetscViewer, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerView, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewer),\n               v, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcount::PetscInt = PetscViewerRead(petsclib::PetscLibType,viewer::PetscViewer, data::Cvoid, num::PetscInt, dtype::PetscDataType) \nReads data from a `PetscViewer`\n\nCollective\n\nInput Parameters:\n- `viewer` - The viewer\n- `data`   - Location to write the data, treated as an array of the type defined by `datatype`\n- `num`    - Number of items of data to read\n- `dtype`  - Type of data to read\n\nOutput Parameter:\n- `count` - number of items of data actually read, or `NULL`\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`PetscViewerReadable()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerRead\"))\n\"\"\"\nfunction PetscViewerRead(petsclib::PetscLibType, viewer::PetscViewer, data::Cvoid, num::PetscInt, dtype::PetscDataType) end\n\n@for_petsc function PetscViewerRead(petsclib::$UnionPetscLib, viewer::PetscViewer, data::Cvoid, num::$PetscInt, dtype::PetscDataType )\n\tcount_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerRead, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cvoid}, $PetscInt, Ptr{$PetscInt}, PetscDataType),\n               viewer, data, num, count_, dtype,\n              )\n\n\tcount = count_[]\n\n\treturn count\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerReadable(petsclib::PetscLibType,viewer::PetscViewer) \nReturn a flag whether the viewer can be read from with `PetscViewerRead()`\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the viewer is readable, `PETSC_FALSE` otherwise\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewerRead()`, `PetscViewer`, `PetscViewerWritable()`, `PetscViewerCheckReadable()`, `PetscViewerCreate()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerReadable\"))\n\"\"\"\nfunction PetscViewerReadable(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerReadable(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerReadable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerWritable(petsclib::PetscLibType,viewer::PetscViewer) \nReturn a flag whether the viewer can be written to with `PetscViewerWrite()`\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the viewer is writable, `PETSC_FALSE` otherwise\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerReadable()`, `PetscViewerCheckWritable()`, `PetscViewerCreate()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerWritable\"))\n\"\"\"\nfunction PetscViewerWritable(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerWritable(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerWritable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscViewerCheckReadable(petsclib::PetscLibType,viewer::PetscViewer) \nCheck whether the viewer can be read from, generates an error if not\n\nCollective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` context\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerReadable()`, `PetscViewerCheckWritable()`, `PetscViewerCreate()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCheckReadable\"))\n\"\"\"\nfunction PetscViewerCheckReadable(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerCheckReadable(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerCheckReadable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerCheckWritable(petsclib::PetscLibType,viewer::PetscViewer) \nCheck whether the viewer can be written to, generates an error if not\n\nCollective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` context\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerWritable()`, `PetscViewerCheckReadable()`, `PetscViewerCreate()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCheckWritable\"))\n\"\"\"\nfunction PetscViewerCheckWritable(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerCheckWritable(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerCheckWritable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIGetPointer(petsclib::PetscLibType,viewer::PetscViewer, fd::Libc.FILE) \nExtracts the file pointer from an ASCII `PetscViewer`.\n\nNot Collective, depending on the viewer the value may be meaningless except for process 0 of the viewer; No Fortran Support\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerASCIIOpen()`\n\nOutput Parameter:\n- `fd` - file pointer\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERASCII`, `PetscViewerASCIIOpen()`, `PetscViewerDestroy()`, `PetscViewerSetType()`,\n`PetscViewerCreate()`, `PetscViewerASCIIPrintf()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerFlush()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIGetPointer\"))\n\"\"\"\nfunction PetscViewerASCIIGetPointer(petsclib::PetscLibType, viewer::PetscViewer, fd::Libc.FILE) end\n\n@for_petsc function PetscViewerASCIIGetPointer(petsclib::$UnionPetscLib, viewer::PetscViewer, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscViewerASCIIGetPointer, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Libc.FILE),\n               viewer, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIISetTab(petsclib::PetscLibType,viewer::PetscViewer, tabs::PetscInt) \nCauses `PetscViewer` to tab in a number of times before printing\n\nNot Collective, but only first processor in set has any effect; No Fortran Support\n\nInput Parameters:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n- `tabs`   - number of tabs\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PETSCVIEWERASCII`, `PetscPrintf()`, `PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIIGetTab()`,\n`PetscViewerASCIIPopTab()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerASCIIGetPointer()`,\n`PetscViewerASCIIPushTab()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIISetTab\"))\n\"\"\"\nfunction PetscViewerASCIISetTab(petsclib::PetscLibType, viewer::PetscViewer, tabs::PetscInt) end\n\n@for_petsc function PetscViewerASCIISetTab(petsclib::$UnionPetscLib, viewer::PetscViewer, tabs::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerASCIISetTab, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, tabs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttabs::PetscInt = PetscViewerASCIIGetTab(petsclib::PetscLibType,viewer::PetscViewer) \nReturn the number of tabs used by `PetscViewer`.\n\nNot Collective, meaningful on first processor only; No Fortran Support\n\nInput Parameter:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n\nOutput Parameter:\n- `tabs` - number of tabs\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PETSCVIEWERASCII`, `PetscPrintf()`, `PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIISetTab()`,\n`PetscViewerASCIIPopTab()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerASCIIGetPointer()`, `PetscViewerASCIIPushTab()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIGetTab\"))\n\"\"\"\nfunction PetscViewerASCIIGetTab(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIGetTab(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\ttabs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerASCIIGetTab, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}),\n               viewer, tabs_,\n              )\n\n\ttabs = tabs_[]\n\n\treturn tabs\nend \n\n\"\"\"\n\tPetscViewerASCIIAddTab(petsclib::PetscLibType,viewer::PetscViewer, tabs::PetscInt) \nAdd to the number of times a `PETSCVIEWERASCII` viewer tabs before printing\n\nNot Collective, but only first processor in set has any effect; No Fortran Support\n\nInput Parameters:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n- `tabs`   - number of tabs\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PETSCVIEWERASCII`, `PetscPrintf()`, `PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIIPopTab()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerASCIIGetPointer()`, `PetscViewerASCIIPushTab()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIAddTab\"))\n\"\"\"\nfunction PetscViewerASCIIAddTab(petsclib::PetscLibType, viewer::PetscViewer, tabs::PetscInt) end\n\n@for_petsc function PetscViewerASCIIAddTab(petsclib::$UnionPetscLib, viewer::PetscViewer, tabs::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerASCIIAddTab, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, tabs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIISubtractTab(petsclib::PetscLibType,viewer::PetscViewer, tabs::PetscInt) \nSubtracts from the number of times a `PETSCVIEWERASCII` viewer tabs before printing\n\nNot Collective, but only first processor in set has any effect; No Fortran Support\n\nInput Parameters:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n- `tabs`   - number of tabs\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PETSCVIEWERASCII`, `PetscPrintf()`, `PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIIPopTab()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerASCIIGetPointer()`,\n`PetscViewerASCIIPushTab()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIISubtractTab\"))\n\"\"\"\nfunction PetscViewerASCIISubtractTab(petsclib::PetscLibType, viewer::PetscViewer, tabs::PetscInt) end\n\n@for_petsc function PetscViewerASCIISubtractTab(petsclib::$UnionPetscLib, viewer::PetscViewer, tabs::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerASCIISubtractTab, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, tabs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIPushSynchronized(petsclib::PetscLibType,viewer::PetscViewer) \nAllows calls to `PetscViewerASCIISynchronizedPrintf()` for this viewer\n\nCollective\n\nInput Parameter:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerFlush()`, `PetscViewerASCIIPopSynchronized()`,\n`PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIPushSynchronized\"))\n\"\"\"\nfunction PetscViewerASCIIPushSynchronized(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIPushSynchronized(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIPushSynchronized, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIPopSynchronized(petsclib::PetscLibType,viewer::PetscViewer) \nUndoes most recent `PetscViewerASCIIPushSynchronized()` for this viewer\n\nCollective\n\nInput Parameter:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewerASCIIPushSynchronized()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerFlush()`,\n`PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIPopSynchronized\"))\n\"\"\"\nfunction PetscViewerASCIIPopSynchronized(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIPopSynchronized(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIPopSynchronized, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIPushTab(petsclib::PetscLibType,viewer::PetscViewer) \nAdds one more tab to the amount that `PetscViewerASCIIPrintf()`\nlines are tabbed.\n\nNot Collective, but only first MPI rank in the viewer has any effect; No Fortran Support\n\nInput Parameter:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscPrintf()`, `PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIIPopTab()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerASCIIGetPointer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIPushTab\"))\n\"\"\"\nfunction PetscViewerASCIIPushTab(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIPushTab(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIPushTab, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIPopTab(petsclib::PetscLibType,viewer::PetscViewer) \nRemoves one tab from the amount that `PetscViewerASCIIPrintf()` lines are tabbed that was provided by\n`PetscViewerASCIIPushTab()`\n\nNot Collective, but only first MPI rank in the viewer has any effect; No Fortran Support\n\nInput Parameter:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscPrintf()`, `PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIIPushTab()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerASCIIGetPointer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIPopTab\"))\n\"\"\"\nfunction PetscViewerASCIIPopTab(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIPopTab(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIPopTab, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIUseTabs(petsclib::PetscLibType,viewer::PetscViewer, flg::PetscBool) \nTurns on or off the use of tabs with the `PETSCVIEWERASCII` `PetscViewer`\n\nNot Collective, but only first MPI rank in the viewer has any effect; No Fortran Support\n\nInput Parameters:\n- `viewer` - obtained with `PetscViewerASCIIOpen()`\n- `flg`    - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscPrintf()`, `PetscSynchronizedPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIIPopTab()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIPushTab()`, `PetscViewerASCIIOpen()`,\n`PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerSetType()`, `PetscViewerASCIIGetPointer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIUseTabs\"))\n\"\"\"\nfunction PetscViewerASCIIUseTabs(petsclib::PetscLibType, viewer::PetscViewer, flg::PetscBool) end\n\n@for_petsc function PetscViewerASCIIUseTabs(petsclib::$UnionPetscLib, viewer::PetscViewer, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerASCIIUseTabs, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIGetStdout(petsclib::PetscLibType,comm::MPI_Comm, viewer::PetscViewer) \nCreates a `PETSCVIEWERASCII` `PetscViewer` shared by all processes\nin a communicator that prints to `stdout`. Error returning version of `PETSC_VIEWER_STDOUT_()`\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator to share the `PetscViewer`\n\nOutput Parameter:\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PetscViewerASCIIGetStderr()`, `PETSC_VIEWER_DRAW_()`, `PetscViewerASCIIOpen()`, `PETSC_VIEWER_STDERR_`, `PETSC_VIEWER_STDOUT_WORLD`,\n`PETSC_VIEWER_STDOUT_SELF`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIGetStdout\"))\n\"\"\"\nfunction PetscViewerASCIIGetStdout(petsclib::PetscLibType, comm::MPI_Comm, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIGetStdout(petsclib::$UnionPetscLib, comm::MPI_Comm, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIGetStdout, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscViewer}),\n               comm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tviewer::PetscViewer = PETSC_VIEWER_STDOUT_SELF(petsclib::PetscLibType)\n\nGet the default PETSc `STDOUT` viewer for `MPI.COMM_SELF`\n\nNot Collective\n\nInput Parameter:\n- `petsclib` - the PETSc library instance\n\nOutput Parameter:\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: `PETSC_VIEWER_STDOUT_WORLD`, `PetscViewerASCIIGetStdout()`\n\"\"\"\nfunction PETSC_VIEWER_STDOUT_SELF(petsclib::PetscLibType) end\n\n@for_petsc function PETSC_VIEWER_STDOUT_SELF(petsclib::$UnionPetscLib)\n\tviewer_ref = Ref{PetscViewer}()\n\t@chk ccall(\n\t\t(:PetscViewerASCIIGetStdout, $petsc_library),\n\t\tPetscErrorCode,\n\t\t(MPI_Comm, Ptr{PetscViewer}),\n\t\tMPI.COMM_SELF, viewer_ref,\n\t)\n\treturn viewer_ref[]\nend\n\n\"\"\"\n\tviewer::PetscViewer = PETSC_VIEWER_STDOUT_WORLD(petsclib::PetscLibType)\n\nGet the default PETSc `STDOUT` viewer for `MPI.COMM_WORLD`\n\nCollective on `MPI.COMM_WORLD`\n\nInput Parameter:\n- `petsclib` - the PETSc library instance\n\nOutput Parameter:\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: `PETSC_VIEWER_STDOUT_SELF`, `PetscViewerASCIIGetStdout()`\n\"\"\"\nfunction PETSC_VIEWER_STDOUT_WORLD(petsclib::PetscLibType) end\n\n@for_petsc function PETSC_VIEWER_STDOUT_WORLD(petsclib::$UnionPetscLib)\n\tviewer_ref = Ref{PetscViewer}()\n\t@chk ccall(\n\t\t(:PetscViewerASCIIGetStdout, $petsc_library),\n\t\tPetscErrorCode,\n\t\t(MPI_Comm, Ptr{PetscViewer}),\n\t\tMPI.COMM_WORLD, viewer_ref,\n\t)\n\treturn viewer_ref[]\nend\n\n\"\"\"\n\tviewer::PetscViewer = PETSC_VIEWER_STDERR_SELF(petsclib::PetscLibType)\n\nGet the default PETSc `STDERR` viewer for `MPI.COMM_SELF`\n\nNot Collective\n\nInput Parameter:\n- `petsclib` - the PETSc library instance\n\nOutput Parameter:\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: `PETSC_VIEWER_STDERR_WORLD`, `PetscViewerASCIIGetStderr()`\n\"\"\"\nfunction PETSC_VIEWER_STDERR_SELF(petsclib::PetscLibType) end\n\n@for_petsc function PETSC_VIEWER_STDERR_SELF(petsclib::$UnionPetscLib)\n\tviewer_ref = Ref{PetscViewer}()\n\t@chk ccall(\n\t\t(:PetscViewerASCIIGetStderr, $petsc_library),\n\t\tPetscErrorCode,\n\t\t(MPI_Comm, Ptr{PetscViewer}),\n\t\tMPI.COMM_SELF, viewer_ref,\n\t)\n\treturn viewer_ref[]\nend\n\n\"\"\"\n\tviewer::PetscViewer = PETSC_VIEWER_STDERR_WORLD(petsclib::PetscLibType)\n\nGet the default PETSc `STDERR` viewer for `MPI.COMM_WORLD`\n\nCollective on `MPI.COMM_WORLD`\n\nInput Parameter:\n- `petsclib` - the PETSc library instance\n\nOutput Parameter:\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: `PETSC_VIEWER_STDERR_SELF`, `PetscViewerASCIIGetStderr()`\n\"\"\"\nfunction PETSC_VIEWER_STDERR_WORLD(petsclib::PetscLibType) end\n\n@for_petsc function PETSC_VIEWER_STDERR_WORLD(petsclib::$UnionPetscLib)\n\tviewer_ref = Ref{PetscViewer}()\n\t@chk ccall(\n\t\t(:PetscViewerASCIIGetStderr, $petsc_library),\n\t\tPetscErrorCode,\n\t\t(MPI_Comm, Ptr{PetscViewer}),\n\t\tMPI.COMM_WORLD, viewer_ref,\n\t)\n\treturn viewer_ref[]\nend\n\n\"\"\"\n\tPetscViewerFileSetName(petsclib::PetscLibType,viewer::PetscViewer, name::String) \nSets the name of the file the `PetscViewer` should use.\n\nCollective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`; for example, of type `PETSCVIEWERASCII` or `PETSCVIEWERBINARY`\n- `name`   - the name of the file it should use\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerASCIIOpen()`, `PetscViewerBinaryOpen()`, `PetscViewerDestroy()`,\n`PetscViewerASCIIGetPointer()`, `PetscViewerASCIIPrintf()`, `PetscViewerASCIISynchronizedPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFileSetName\"))\n\"\"\"\nfunction PetscViewerFileSetName(petsclib::PetscLibType, viewer::PetscViewer, name::String) end\n\n@for_petsc function PetscViewerFileSetName(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String )\n\n    @chk ccall(\n               (:PetscViewerFileSetName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerFileGetName(petsclib::PetscLibType,viewer::PetscViewer, name::String) \nGets the name of the file the `PetscViewer` is using\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nOutput Parameter:\n- `name` - the name of the file it is using\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerASCIIOpen()`, `PetscViewerBinaryOpen()`, `PetscViewerFileSetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFileGetName\"))\n\"\"\"\nfunction PetscViewerFileGetName(petsclib::PetscLibType, viewer::PetscViewer, name::String) end\n\n@for_petsc function PetscViewerFileGetName(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscViewerFileGetName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               viewer, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcount::PetscInt = PetscViewerASCIIRead(petsclib::PetscLibType,viewer::PetscViewer, data::Cvoid, num::PetscInt, dtype::PetscDataType) \nReads from a `PETSCVIEWERASCII` file\n\nOnly MPI rank 0 in the `PetscViewer` may call this\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWERASCII` viewer\n- `data`   - location to write the data, treated as an array of type indicated by `datatype`\n- `num`    - number of items of data to read\n- `dtype`  - type of data to read\n\nOutput Parameter:\n- `count` - number of items of data actually read, or `NULL`\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`, `PetscViewerCreate()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetName()`\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`, `PetscViewer`, `PetscViewerBinaryRead()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIRead\"))\n\"\"\"\nfunction PetscViewerASCIIRead(petsclib::PetscLibType, viewer::PetscViewer, data::Cvoid, num::PetscInt, dtype::PetscDataType) end\n\n@for_petsc function PetscViewerASCIIRead(petsclib::$UnionPetscLib, viewer::PetscViewer, data::Cvoid, num::$PetscInt, dtype::PetscDataType )\n\tcount_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerASCIIRead, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cvoid}, $PetscInt, Ptr{$PetscInt}, PetscDataType),\n               viewer, data, num, count_, dtype,\n              )\n\n\tcount = count_[]\n\n\treturn count\nend \n\n\"\"\"\n\tPetscViewerASCIIGetStderr(petsclib::PetscLibType,comm::MPI_Comm, viewer::PetscViewer) \nCreates a `PETSCVIEWERASCII` `PetscViewer` shared by all MPI processes\nin a communicator that prints to `stderr`. Error returning version of `PETSC_VIEWER_STDERR_()`\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator to share the `PetscViewer`\n\nOutput Parameter:\n- `viewer` - the viewer\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PetscViewerASCIIGetStdout()`, `PETSC_VIEWER_DRAW_()`, `PetscViewerASCIIOpen()`, `PETSC_VIEWER_STDERR_`, `PETSC_VIEWER_STDERR_WORLD`,\n`PETSC_VIEWER_STDERR_SELF`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIGetStderr\"))\n\"\"\"\nfunction PetscViewerASCIIGetStderr(petsclib::PetscLibType, comm::MPI_Comm, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIGetStderr(petsclib::$UnionPetscLib, comm::MPI_Comm, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIGetStderr, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscViewer}),\n               comm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIOpen(petsclib::PetscLibType,comm::MPI_Comm, name::String, viewer::PetscViewer) \nOpens an ASCII file for writing as a `PETSCVIEWERASCII` `PetscViewer`.\n\nCollective\n\nInput Parameters:\n- `comm` - the communicator\n- `name` - the file name\n\nOutput Parameter:\n- `viewer` - the `PetscViewer` to use with the specified file\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `MatView()`, `VecView()`, `PetscViewerDestroy()`, `PetscViewerBinaryOpen()`, `PetscViewerASCIIRead()`, `PETSCVIEWERASCII`\n`PetscViewerASCIIGetPointer()`, `PetscViewerPushFormat()`, `PETSC_VIEWER_STDOUT_`, `PETSC_VIEWER_STDERR_`,\n`PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF`, `PetscViewerASCIIGetStdout()`, `PetscViewerASCIIGetStderr()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIOpen\"))\n\"\"\"\nfunction PetscViewerASCIIOpen(petsclib::PetscLibType, comm::MPI_Comm, name::String, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{PetscViewer}),\n               comm, name, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIIOpenWithFILE(petsclib::PetscLibType,comm::MPI_Comm, fd::Libc.FILE, viewer::PetscViewer) \nGiven an open file creates an `PETSCVIEWERASCII` viewer that prints to it.\n\nCollective\n\nInput Parameters:\n- `comm` - the communicator\n- `fd`   - the `FILE` pointer\n\nOutput Parameter:\n- `viewer` - the `PetscViewer` to use with the specified file\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `MatView()`, `VecView()`, `PetscViewerDestroy()`, `PetscViewerBinaryOpen()`, `PetscViewerASCIIOpenWithFileUnit()`,\n`PetscViewerASCIIGetPointer()`, `PetscViewerPushFormat()`, `PETSC_VIEWER_STDOUT_`, `PETSC_VIEWER_STDERR_`,\n`PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF`, `PetscViewerASCIIOpen()`, `PetscViewerASCIISetFILE()`, `PETSCVIEWERASCII`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIIOpenWithFILE\"))\n\"\"\"\nfunction PetscViewerASCIIOpenWithFILE(petsclib::PetscLibType, comm::MPI_Comm, fd::Libc.FILE, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerASCIIOpenWithFILE(petsclib::$UnionPetscLib, comm::MPI_Comm, fd::Libc.FILE, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerASCIIOpenWithFILE, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Libc.FILE}, Ptr{PetscViewer}),\n               comm, fd, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerASCIISetFILE(petsclib::PetscLibType,viewer::PetscViewer, fd::Libc.FILE) \nGiven an open file sets the `PETSCVIEWERASCII` viewer to use the file for output\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` to use with the specified file\n- `fd`     - the `FILE` pointer\n\nLevel: beginner\n\n-seealso: `MatView()`, `VecView()`, `PetscViewerDestroy()`, `PetscViewerBinaryOpen()`, `PetscViewerASCIISetFileUnit()`,\n`PetscViewerASCIIGetPointer()`, `PetscViewerPushFormat()`, `PETSC_VIEWER_STDOUT_`, `PETSC_VIEWER_STDERR_`,\n`PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF`, `PetscViewerASCIIOpen()`, `PetscViewerASCIIOpenWithFILE()`, `PETSCVIEWERASCII`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerASCIISetFILE\"))\n\"\"\"\nfunction PetscViewerASCIISetFILE(petsclib::PetscLibType, viewer::PetscViewer, fd::Libc.FILE) end\n\n@for_petsc function PetscViewerASCIISetFILE(petsclib::$UnionPetscLib, viewer::PetscViewer, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscViewerASCIISetFILE, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Libc.FILE}),\n               viewer, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerVUGetPointer(petsclib::PetscLibType,viewer::PetscViewer, fd::Libc.FILE) \nExtracts the file pointer from a `PETSCVIEWERVU` `PetscViewer`.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - The `PetscViewer`\n\nOutput Parameter:\n- `fd` - The file pointer\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERVU`, `PetscViewerASCIIGetPointer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerVUGetPointer\"))\n\"\"\"\nfunction PetscViewerVUGetPointer(petsclib::PetscLibType, viewer::PetscViewer, fd::Libc.FILE) end\n\n@for_petsc function PetscViewerVUGetPointer(petsclib::$UnionPetscLib, viewer::PetscViewer, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscViewerVUGetPointer, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Libc.FILE),\n               viewer, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerVUSetVecSeen(petsclib::PetscLibType,viewer::PetscViewer, vecSeen::PetscBool) \nSets the flag which indicates whether we have viewed\na vector. This is usually called internally rather than by a user.\n\nNot Collective\n\nInput Parameters:\n- `viewer`  - The `PETSCVIEWERVU` `PetscViewer`\n- `vecSeen` - The flag which indicates whether we have viewed a vector\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PETSCVIEWERVU`, `PetscViewerVUGetVecSeen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerVUSetVecSeen\"))\n\"\"\"\nfunction PetscViewerVUSetVecSeen(petsclib::PetscLibType, viewer::PetscViewer, vecSeen::PetscBool) end\n\n@for_petsc function PetscViewerVUSetVecSeen(petsclib::$UnionPetscLib, viewer::PetscViewer, vecSeen::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerVUSetVecSeen, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, vecSeen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvecSeen::PetscBool = PetscViewerVUGetVecSeen(petsclib::PetscLibType,viewer::PetscViewer) \nGets the flag which indicates whether we have viewed\na vector. This is usually called internally rather than by a user.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - The `PETSCVIEWERVU` `PetscViewer`\n\nOutput Parameter:\n- `vecSeen` - The flag which indicates whether we have viewed a vector\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERVU`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerVUGetVecSeen\"))\n\"\"\"\nfunction PetscViewerVUGetVecSeen(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerVUGetVecSeen(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tvecSeen_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerVUGetVecSeen, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, vecSeen_,\n              )\n\n\tvecSeen = vecSeen_[]\n\n\treturn vecSeen\nend \n\n\"\"\"\n\tPetscViewerVUFlushDeferred(petsclib::PetscLibType,viewer::PetscViewer) \nFlushes the deferred write cache to the file.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - The `PETSCVIEWERVU` `PetscViewer`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERVU`, `PetscViewerVUPrintDeferred()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerVUFlushDeferred\"))\n\"\"\"\nfunction PetscViewerVUFlushDeferred(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerVUFlushDeferred(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerVUFlushDeferred, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerPythonSetType(petsclib::PetscLibType,viewer::PetscViewer, pyname::String) \nInitialize a `PetscViewer` object implemented in Python.\n\nCollective\n\nInput Parameters:\n- `viewer`  - the viewer object.\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOptions Database Key:\n- `-viewer_python_type <pyname>`  - python class\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerType`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PETSCVIEWERPYTHON`, `PetscPythonInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerPythonSetType\"))\n\"\"\"\nfunction PetscViewerPythonSetType(petsclib::PetscLibType, viewer::PetscViewer, pyname::String) end\n\n@for_petsc function PetscViewerPythonSetType(petsclib::$UnionPetscLib, viewer::PetscViewer, pyname::String )\n\n    @chk ccall(\n               (:PetscViewerPythonSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, pyname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpyname::String = PetscViewerPythonGetType(petsclib::PetscLibType,viewer::PetscViewer) \nGet the Python name of a `PetscViewer` object implemented in Python.\n\nNot Collective\n\nInput Parameter:\n- `viewer`  - the viewer\n\nOutput Parameter:\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerType`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PETSCVIEWERPYTHON`, `PetscPythonInitialize()`, `PetscViewerPythonSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerPythonGetType\"))\n\"\"\"\nfunction PetscViewerPythonGetType(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerPythonGetType(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tpyname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:PetscViewerPythonGetType, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               viewer, pyname_,\n              )\n\n\tpyname = unsafe_wrap(Array, pyname_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pyname\nend \n\n\"\"\"\n\tPetscViewerPythonViewObject(petsclib::PetscLibType,viewer::PetscViewer, obj::PetscObject) \nView a `PetscObject`.\n\nCollective\n\nInput Parameters:\n- `viewer`  - the viewer object.\n- `obj`  - the object to be viewed.\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerPythonCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerPythonViewObject\"))\n\"\"\"\nfunction PetscViewerPythonViewObject(petsclib::PetscLibType, viewer::PetscViewer, obj::PetscObject) end\n\n@for_petsc function PetscViewerPythonViewObject(petsclib::$UnionPetscLib, viewer::PetscViewer, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscViewerPythonViewObject, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscObject),\n               viewer, obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tviewer::PetscViewer = PetscViewerPythonCreate(petsclib::PetscLibType,comm::MPI_Comm, pyname::String) \nCreate a `PetscViewer` object implemented in Python.\n\nCollective\n\nInput Parameters:\n- `comm`  - MPI communicator\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOutput Parameter:\n- `viewer`  - the viewer\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerType`, `PETSCVIEWERPYTHON`, `PetscViewerPythonSetType()`, `PetscPythonInitialize()`, `PetscViewerPythonViewObject()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerPythonCreate\"))\n\"\"\"\nfunction PetscViewerPythonCreate(petsclib::PetscLibType, comm::MPI_Comm, pyname::String) end\n\n@for_petsc function PetscViewerPythonCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, pyname::String )\n\tviewer_ = Ref{PetscViewer}()\n\n    @chk ccall(\n               (:PetscViewerPythonCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{PetscViewer}),\n               comm, pyname, viewer_,\n              )\n\n\tviewer = viewer_[]\n\n\treturn viewer\nend \n\n\"\"\"\n\tPetscViewerHDF5GetGroup(petsclib::PetscLibType,viewer::PetscViewer, path::String, abspath::String) \nGet the current HDF5 group name (full path), set with `PetscViewerHDF5PushGroup()`/`PetscViewerHDF5PopGroup()`.\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n- `path`   - (Optional) The path relative to the pushed group\n\nOutput Parameter:\n- `abspath` - The absolute HDF5 path (group)\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5OpenGroup()`, `PetscViewerHDF5WriteGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetGroup\"))\n\"\"\"\nfunction PetscViewerHDF5GetGroup(petsclib::PetscLibType, viewer::PetscViewer, path::String, abspath::String) end\n\n@for_petsc function PetscViewerHDF5GetGroup(petsclib::$UnionPetscLib, viewer::PetscViewer, path::String, abspath::String )\n\tabspath_ = Ref(pointer(abspath))\n\n    @chk ccall(\n               (:PetscViewerHDF5GetGroup, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Ptr{Cchar}}),\n               viewer, path, abspath_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5SetBaseDimension2(petsclib::PetscLibType,viewer::PetscViewer, flg::PetscBool) \nVectors of 1 dimension (i.e. bs/dof is 1) will be saved in the HDF5 file with a\ndimension of 2.\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`; if it is a `PETSCVIEWERHDF5` then this command is ignored\n- `flg`    - if `PETSC_TRUE` the vector will always have at least a dimension of 2 even if that first dimension is of size 1\n\nOptions Database Key:\n- `-viewer_hdf5_base_dimension2` - turns on (true) or off (false) using a dimension of 2 in the HDF5 file even if the bs/dof of the vector is 1\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5SetBaseDimension2\"))\n\"\"\"\nfunction PetscViewerHDF5SetBaseDimension2(petsclib::PetscLibType, viewer::PetscViewer, flg::PetscBool) end\n\n@for_petsc function PetscViewerHDF5SetBaseDimension2(petsclib::$UnionPetscLib, viewer::PetscViewer, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetBaseDimension2, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerHDF5GetBaseDimension2(petsclib::PetscLibType,viewer::PetscViewer) \nVectors of 1 dimension (i.e. bs/dof is 1) will be saved in the HDF5 file with a\ndimension of 2.\n\nLogically Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`, must be `PETSCVIEWERHDF5`\n\nOutput Parameter:\n- `flg` - if `PETSC_TRUE` the vector will always have at least a dimension of 2 even if that first dimension is of size 1\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetBaseDimension2\"))\n\"\"\"\nfunction PetscViewerHDF5GetBaseDimension2(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5GetBaseDimension2(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5GetBaseDimension2, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscViewerHDF5SetSPOutput(petsclib::PetscLibType,viewer::PetscViewer, flg::PetscBool) \nData is written to disk in single precision even if PETSc is\ncompiled with double precision `PetscReal`.\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the PetscViewer; if it is a `PETSCVIEWERHDF5` then this command is ignored\n- `flg`    - if `PETSC_TRUE` the data will be written to disk with single precision\n\nOptions Database Key:\n- `-viewer_hdf5_sp_output` - turns on (true) or off (false) output in single precision\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`,\n`PetscReal`, `PetscViewerHDF5GetSPOutput()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5SetSPOutput\"))\n\"\"\"\nfunction PetscViewerHDF5SetSPOutput(petsclib::PetscLibType, viewer::PetscViewer, flg::PetscBool) end\n\n@for_petsc function PetscViewerHDF5SetSPOutput(petsclib::$UnionPetscLib, viewer::PetscViewer, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetSPOutput, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerHDF5GetSPOutput(petsclib::PetscLibType,viewer::PetscViewer) \nData is written to disk in single precision even if PETSc is\ncompiled with double precision `PetscReal`.\n\nLogically Collective\n\nInput Parameter:\n- `viewer` - the PetscViewer, must be of type `PETSCVIEWERHDF5`\n\nOutput Parameter:\n- `flg` - if `PETSC_TRUE` the data will be written to disk with single precision\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`,\n`PetscReal`, `PetscViewerHDF5SetSPOutput()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetSPOutput\"))\n\"\"\"\nfunction PetscViewerHDF5GetSPOutput(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5GetSPOutput(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5GetSPOutput, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscViewerHDF5SetCollective(petsclib::PetscLibType,viewer::PetscViewer, flg::PetscBool) \nUse collective MPI\n\nLogically Collective; flg must contain common value\n\nInput Parameters:\n- `viewer` - the `PetscViewer`; if it is not `PETSCVIEWERHDF5` then this command is ignored\n- `flg`    - `PETSC_TRUE` for collective mode; `PETSC_FALSE` for independent mode (default)\n\nOptions Database Key:\n- `-viewer_hdf5_collective` - turns on (true) or off (false) collective transfers\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5GetCollective()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerHDF5Open()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5SetCollective\"))\n\"\"\"\nfunction PetscViewerHDF5SetCollective(petsclib::PetscLibType, viewer::PetscViewer, flg::PetscBool) end\n\n@for_petsc function PetscViewerHDF5SetCollective(petsclib::$UnionPetscLib, viewer::PetscViewer, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetCollective, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerHDF5GetCollective(petsclib::PetscLibType,viewer::PetscViewer) \nReturn flag whether collective MPI\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PETSCVIEWERHDF5` `PetscViewer`\n\nOutput Parameter:\n- `flg` - the flag\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5SetCollective()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerHDF5Open()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetCollective\"))\n\"\"\"\nfunction PetscViewerHDF5GetCollective(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5GetCollective(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5GetCollective, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscViewerHDF5SetDefaultTimestepping(petsclib::PetscLibType,viewer::PetscViewer, flg::PetscBool) \nSet the flag for default timestepping\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`; if it is not `PETSCVIEWERHDF5` then this command is ignored\n- `flg`    - if `PETSC_TRUE` we will assume that timestepping is on\n\nOptions Database Key:\n- `-viewer_hdf5_default_timestepping` - turns on (true) or off (false) default timestepping\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5GetDefaultTimestepping()`, `PetscViewerHDF5PushTimestepping()`, `PetscViewerHDF5GetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5SetDefaultTimestepping\"))\n\"\"\"\nfunction PetscViewerHDF5SetDefaultTimestepping(petsclib::PetscLibType, viewer::PetscViewer, flg::PetscBool) end\n\n@for_petsc function PetscViewerHDF5SetDefaultTimestepping(petsclib::$UnionPetscLib, viewer::PetscViewer, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetDefaultTimestepping, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerHDF5GetDefaultTimestepping(petsclib::PetscLibType,viewer::PetscViewer) \nGet the flag for default timestepping\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nOutput Parameter:\n- `flg` - if `PETSC_TRUE` we will assume that timestepping is on\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5SetDefaultTimestepping()`, `PetscViewerHDF5PushTimestepping()`, `PetscViewerHDF5GetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetDefaultTimestepping\"))\n\"\"\"\nfunction PetscViewerHDF5GetDefaultTimestepping(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5GetDefaultTimestepping(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5GetDefaultTimestepping, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscViewerHDF5SetCompress(petsclib::PetscLibType,viewer::PetscViewer, flg::PetscBool) \nSet the flag for compression\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`; if it is not `PETSCVIEWERHDF5` then this command is ignored\n- `flg`    - if `PETSC_TRUE` we will turn on compression\n\nOptions Database Key:\n- `-viewer_hdf5_compress` - turns on (true) or off (false) compression\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5GetCompress()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5SetCompress\"))\n\"\"\"\nfunction PetscViewerHDF5SetCompress(petsclib::PetscLibType, viewer::PetscViewer, flg::PetscBool) end\n\n@for_petsc function PetscViewerHDF5SetCompress(petsclib::$UnionPetscLib, viewer::PetscViewer, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetCompress, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerHDF5GetCompress(petsclib::PetscLibType,viewer::PetscViewer) \nGet the flag for compression\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nOutput Parameter:\n- `flg` - if `PETSC_TRUE` we will turn on compression\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5SetCompress()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetCompress\"))\n\"\"\"\nfunction PetscViewerHDF5GetCompress(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5GetCompress(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5GetCompress, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscViewerHDF5Open(petsclib::PetscLibType,comm::MPI_Comm, name::String, type::PetscFileMode, hdf5v::PetscViewer) \nOpens a file for HDF5 input/output as a `PETSCVIEWERHDF5` `PetscViewer`\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `name` - name of file\n- `type` - type of file\n\nOutput Parameter:\n- `hdf5v` - `PetscViewer` for HDF5 input/output to use with the specified file\n\nOptions Database Keys:\n- `-viewer_hdf5_base_dimension2` - turns on (true) or off (false) using a dimension of 2 in the HDF5 file even if the bs/dof of the vector is 1\n- `-viewer_hdf5_sp_output`       - forces (if true) the viewer to write data in single precision independent on the precision of PetscReal\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`, `PetscViewerHDF5SetBaseDimension2()`,\n`PetscViewerHDF5SetSPOutput()`, `PetscViewerHDF5GetBaseDimension2()`, `VecView()`, `MatView()`, `VecLoad()`,\n`MatLoad()`, `PetscFileMode`, `PetscViewer`, `PetscViewerSetType()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5Open\"))\n\"\"\"\nfunction PetscViewerHDF5Open(petsclib::PetscLibType, comm::MPI_Comm, name::String, type::PetscFileMode, hdf5v::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5Open(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, type::PetscFileMode, hdf5v::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerHDF5Open, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscFileMode, Ptr{PetscViewer}),\n               comm, name, type, hdf5v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5GetFileId(petsclib::PetscLibType,viewer::PetscViewer, file_id::hid_t) \nRetrieve the file id, this file ID then can be used in direct HDF5 calls\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nOutput Parameter:\n- `file_id` - The file id\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetFileId\"))\n\"\"\"\nfunction PetscViewerHDF5GetFileId(petsclib::PetscLibType, viewer::PetscViewer, file_id::hid_t) end\n\n@for_petsc function PetscViewerHDF5GetFileId(petsclib::$UnionPetscLib, viewer::PetscViewer, file_id::hid_t )\n\n    @chk ccall(\n               (:PetscViewerHDF5GetFileId, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{hid_t}),\n               viewer, file_id,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5PushGroup(petsclib::PetscLibType,viewer::PetscViewer, name::String) \nSet the current HDF5 group for output\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n- `name`   - The group name\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5OpenGroup()`, `PetscViewerHDF5WriteGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5PushGroup\"))\n\"\"\"\nfunction PetscViewerHDF5PushGroup(petsclib::PetscLibType, viewer::PetscViewer, name::String) end\n\n@for_petsc function PetscViewerHDF5PushGroup(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String )\n\n    @chk ccall(\n               (:PetscViewerHDF5PushGroup, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5PopGroup(petsclib::PetscLibType,viewer::PetscViewer) \nReturn the current HDF5 group for output to the previous value\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5OpenGroup()`, `PetscViewerHDF5WriteGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5PopGroup\"))\n\"\"\"\nfunction PetscViewerHDF5PopGroup(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5PopGroup(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerHDF5PopGroup, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5OpenGroup(petsclib::PetscLibType,viewer::PetscViewer, path::String, fileId::hid_t, groupId::hid_t) \nOpen the HDF5 group with the name (full path) returned by `PetscViewerHDF5GetGroup()`,\nand return this group's ID and file ID.\nIf `PetscViewerHDF5GetGroup()` yields NULL, then group ID is file ID.\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n- `path`   - (Optional) The path relative to the pushed group\n\nOutput Parameters:\n- `fileId`  - The HDF5 file ID\n- `groupId` - The HDF5 group ID\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5WriteGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5OpenGroup\"))\n\"\"\"\nfunction PetscViewerHDF5OpenGroup(petsclib::PetscLibType, viewer::PetscViewer, path::String, fileId::hid_t, groupId::hid_t) end\n\n@for_petsc function PetscViewerHDF5OpenGroup(petsclib::$UnionPetscLib, viewer::PetscViewer, path::String, fileId::hid_t, groupId::hid_t )\n\n    @chk ccall(\n               (:PetscViewerHDF5OpenGroup, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{hid_t}, Ptr{hid_t}),\n               viewer, path, fileId, groupId,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5WriteGroup(petsclib::PetscLibType,viewer::PetscViewer, path::String) \nEnsure the HDF5 group exists in the HDF5 file\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n- `path`   - (Optional) The path relative to the pushed group\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5OpenGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5WriteGroup\"))\n\"\"\"\nfunction PetscViewerHDF5WriteGroup(petsclib::PetscLibType, viewer::PetscViewer, path::String) end\n\n@for_petsc function PetscViewerHDF5WriteGroup(petsclib::$UnionPetscLib, viewer::PetscViewer, path::String )\n\n    @chk ccall(\n               (:PetscViewerHDF5WriteGroup, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, path,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5PushTimestepping(petsclib::PetscLibType,viewer::PetscViewer) \nActivate timestepping mode for subsequent HDF5 reading and writing.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PopTimestepping()`, `PetscViewerHDF5IsTimestepping()`, `PetscViewerHDF5SetTimestep()`, `PetscViewerHDF5IncrementTimestep()`, `PetscViewerHDF5GetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5PushTimestepping\"))\n\"\"\"\nfunction PetscViewerHDF5PushTimestepping(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5PushTimestepping(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerHDF5PushTimestepping, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5PopTimestepping(petsclib::PetscLibType,viewer::PetscViewer) \nDeactivate timestepping mode for subsequent HDF5 reading and writing.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushTimestepping()`, `PetscViewerHDF5IsTimestepping()`, `PetscViewerHDF5SetTimestep()`, `PetscViewerHDF5IncrementTimestep()`, `PetscViewerHDF5GetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5PopTimestepping\"))\n\"\"\"\nfunction PetscViewerHDF5PopTimestepping(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5PopTimestepping(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerHDF5PopTimestepping, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscViewerHDF5IsTimestepping(petsclib::PetscLibType,viewer::PetscViewer) \nAsk the viewer whether it is in timestepping mode currently.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nOutput Parameter:\n- `flg` - is timestepping active?\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushTimestepping()`, `PetscViewerHDF5PopTimestepping()`, `PetscViewerHDF5SetTimestep()`, `PetscViewerHDF5IncrementTimestep()`, `PetscViewerHDF5GetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5IsTimestepping\"))\n\"\"\"\nfunction PetscViewerHDF5IsTimestepping(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5IsTimestepping(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5IsTimestepping, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscViewerHDF5IncrementTimestep(petsclib::PetscLibType,viewer::PetscViewer) \nIncrements current timestep for the HDF5 output. Fields are stacked in time.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushTimestepping()`, `PetscViewerHDF5SetTimestep()`, `PetscViewerHDF5GetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5IncrementTimestep\"))\n\"\"\"\nfunction PetscViewerHDF5IncrementTimestep(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5IncrementTimestep(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerHDF5IncrementTimestep, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5SetTimestep(petsclib::PetscLibType,viewer::PetscViewer, timestep::PetscInt) \nSet the current timestep for the HDF5 output. Fields are stacked in time.\n\nLogically Collective\n\nInput Parameters:\n- `viewer`   - the `PetscViewer` of type `PETSCVIEWERHDF5`\n- `timestep` - The timestep\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushTimestepping()`, `PetscViewerHDF5IncrementTimestep()`, `PetscViewerHDF5GetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5SetTimestep\"))\n\"\"\"\nfunction PetscViewerHDF5SetTimestep(petsclib::PetscLibType, viewer::PetscViewer, timestep::PetscInt) end\n\n@for_petsc function PetscViewerHDF5SetTimestep(petsclib::$UnionPetscLib, viewer::PetscViewer, timestep::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetTimestep, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, timestep,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttimestep::PetscInt = PetscViewerHDF5GetTimestep(petsclib::PetscLibType,viewer::PetscViewer) \nGet the current timestep for the HDF5 output. Fields are stacked in time.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERHDF5`\n\nOutput Parameter:\n- `timestep` - The timestep\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushTimestepping()`, `PetscViewerHDF5IncrementTimestep()`, `PetscViewerHDF5SetTimestep()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5GetTimestep\"))\n\"\"\"\nfunction PetscViewerHDF5GetTimestep(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerHDF5GetTimestep(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\ttimestep_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerHDF5GetTimestep, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}),\n               viewer, timestep_,\n              )\n\n\ttimestep = timestep_[]\n\n\treturn timestep\nend \n\n\"\"\"\n\tPetscViewerHDF5WriteAttribute(petsclib::PetscLibType,viewer::PetscViewer, parent::String, name::String, datatype::PetscDataType, value::Cvoid) \nWrite an attribute\n\nCollective\n\nInput Parameters:\n- `viewer`   - The `PETSCVIEWERHDF5` viewer\n- `parent`   - The parent dataset/group name\n- `name`     - The attribute name\n- `datatype` - The attribute type\n- `value`    - The attribute value\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5WriteObjectAttribute()`, `PetscViewerHDF5ReadAttribute()`, `PetscViewerHDF5HasAttribute()`,\n`PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5WriteAttribute\"))\n\"\"\"\nfunction PetscViewerHDF5WriteAttribute(petsclib::PetscLibType, viewer::PetscViewer, parent::String, name::String, datatype::PetscDataType, value::Cvoid) end\n\n@for_petsc function PetscViewerHDF5WriteAttribute(petsclib::$UnionPetscLib, viewer::PetscViewer, parent::String, name::String, datatype::PetscDataType, value::Cvoid )\n\n    @chk ccall(\n               (:PetscViewerHDF5WriteAttribute, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Cchar}, PetscDataType, Ptr{Cvoid}),\n               viewer, parent, name, datatype, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5WriteObjectAttribute(petsclib::PetscLibType,viewer::PetscViewer, obj::PetscObject, name::String, datatype::PetscDataType, value::Cvoid) \nWrite an attribute to the dataset matching the given `PetscObject` by name\n\nCollective\n\nInput Parameters:\n- `viewer`   - The `PETSCVIEWERHDF5` viewer\n- `obj`      - The object whose name is used to lookup the parent dataset, relative to the current group.\n- `name`     - The attribute name\n- `datatype` - The attribute type\n- `value`    - The attribute value\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5WriteAttribute()`, `PetscViewerHDF5ReadObjectAttribute()`, `PetscViewerHDF5HasObjectAttribute()`,\n`PetscViewerHDF5HasObject()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5WriteObjectAttribute\"))\n\"\"\"\nfunction PetscViewerHDF5WriteObjectAttribute(petsclib::PetscLibType, viewer::PetscViewer, obj::PetscObject, name::String, datatype::PetscDataType, value::Cvoid) end\n\n@for_petsc function PetscViewerHDF5WriteObjectAttribute(petsclib::$UnionPetscLib, viewer::PetscViewer, obj::PetscObject, name::String, datatype::PetscDataType, value::Cvoid )\n\n    @chk ccall(\n               (:PetscViewerHDF5WriteObjectAttribute, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscObject, Ptr{Cchar}, PetscDataType, Ptr{Cvoid}),\n               viewer, obj, name, datatype, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5ReadAttribute(petsclib::PetscLibType,viewer::PetscViewer, parent::String, name::String, datatype::PetscDataType, defaultValue::Cvoid, value::Cvoid) \nRead an attribute\n\nCollective\n\nInput Parameters:\n- `viewer`       - The `PETSCVIEWERHDF5` viewer\n- `parent`       - The parent dataset/group name\n- `name`         - The attribute name\n- `datatype`     - The attribute type\n- `defaultValue` - The pointer to the default value\n\nOutput Parameter:\n- `value` - The pointer to the read HDF5 attribute value\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5ReadObjectAttribute()`, `PetscViewerHDF5WriteAttribute()`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5HasObject()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5ReadAttribute\"))\n\"\"\"\nfunction PetscViewerHDF5ReadAttribute(petsclib::PetscLibType, viewer::PetscViewer, parent::String, name::String, datatype::PetscDataType, defaultValue::Cvoid, value::Cvoid) end\n\n@for_petsc function PetscViewerHDF5ReadAttribute(petsclib::$UnionPetscLib, viewer::PetscViewer, parent::String, name::String, datatype::PetscDataType, defaultValue::Cvoid, value::Cvoid )\n\n    @chk ccall(\n               (:PetscViewerHDF5ReadAttribute, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Cchar}, PetscDataType, Ptr{Cvoid}, Ptr{Cvoid}),\n               viewer, parent, name, datatype, defaultValue, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5ReadObjectAttribute(petsclib::PetscLibType,viewer::PetscViewer, obj::PetscObject, name::String, datatype::PetscDataType, defaultValue::Cvoid, value::Cvoid) \nRead an attribute from the dataset matching the given `PetscObject` by name\n\nCollective\n\nInput Parameters:\n- `viewer`       - The `PETSCVIEWERHDF5` viewer\n- `obj`          - The object whose name is used to lookup the parent dataset, relative to the current group.\n- `name`         - The attribute name\n- `datatype`     - The attribute type\n- `defaultValue` - The default attribute value\n\nOutput Parameter:\n- `value` - The attribute value\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5ReadAttribute()` `PetscViewerHDF5WriteObjectAttribute()`, `PetscViewerHDF5HasObjectAttribute()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5ReadObjectAttribute\"))\n\"\"\"\nfunction PetscViewerHDF5ReadObjectAttribute(petsclib::PetscLibType, viewer::PetscViewer, obj::PetscObject, name::String, datatype::PetscDataType, defaultValue::Cvoid, value::Cvoid) end\n\n@for_petsc function PetscViewerHDF5ReadObjectAttribute(petsclib::$UnionPetscLib, viewer::PetscViewer, obj::PetscObject, name::String, datatype::PetscDataType, defaultValue::Cvoid, value::Cvoid )\n\n    @chk ccall(\n               (:PetscViewerHDF5ReadObjectAttribute, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscObject, Ptr{Cchar}, PetscDataType, Ptr{Cvoid}, Ptr{Cvoid}),\n               viewer, obj, name, datatype, defaultValue, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thas::PetscBool = PetscViewerHDF5HasGroup(petsclib::PetscLibType,viewer::PetscViewer, path::String) \nCheck whether the current (pushed) group exists in the HDF5 file\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PETSCVIEWERHDF5` viewer\n- `path`   - (Optional) The path relative to the pushed group\n\nOutput Parameter:\n- `has` - Flag for group existence\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5HasDataset()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5OpenGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5HasGroup\"))\n\"\"\"\nfunction PetscViewerHDF5HasGroup(petsclib::PetscLibType, viewer::PetscViewer, path::String) end\n\n@for_petsc function PetscViewerHDF5HasGroup(petsclib::$UnionPetscLib, viewer::PetscViewer, path::String )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5HasGroup, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{PetscBool}),\n               viewer, path, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\thas::PetscBool = PetscViewerHDF5HasDataset(petsclib::PetscLibType,viewer::PetscViewer, path::String) \nCheck whether a given dataset exists in the HDF5 file\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PETSCVIEWERHDF5` viewer\n- `path`   - The dataset path\n\nOutput Parameter:\n- `has` - Flag whether dataset exists\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5HasObject()`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5HasGroup()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5HasDataset\"))\n\"\"\"\nfunction PetscViewerHDF5HasDataset(petsclib::PetscLibType, viewer::PetscViewer, path::String) end\n\n@for_petsc function PetscViewerHDF5HasDataset(petsclib::$UnionPetscLib, viewer::PetscViewer, path::String )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5HasDataset, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{PetscBool}),\n               viewer, path, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\thas::PetscBool = PetscViewerHDF5HasObject(petsclib::PetscLibType,viewer::PetscViewer, obj::PetscObject) \nCheck whether a dataset with the same name as given object exists in the HDF5 file under current group\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PETSCVIEWERHDF5` viewer\n- `obj`    - The named object\n\nOutput Parameter:\n- `has` - Flag for dataset existence\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5HasDataset()`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5HasObject\"))\n\"\"\"\nfunction PetscViewerHDF5HasObject(petsclib::PetscLibType, viewer::PetscViewer, obj::PetscObject) end\n\n@for_petsc function PetscViewerHDF5HasObject(petsclib::$UnionPetscLib, viewer::PetscViewer, obj::PetscObject )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5HasObject, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscObject, Ptr{PetscBool}),\n               viewer, obj, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\thas::PetscBool = PetscViewerHDF5HasAttribute(petsclib::PetscLibType,viewer::PetscViewer, parent::String, name::String) \nCheck whether an attribute exists\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PETSCVIEWERHDF5` viewer\n- `parent` - The parent dataset/group name\n- `name`   - The attribute name\n\nOutput Parameter:\n- `has` - Flag for attribute existence\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5HasObjectAttribute()`, `PetscViewerHDF5WriteAttribute()`, `PetscViewerHDF5ReadAttribute()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5HasAttribute\"))\n\"\"\"\nfunction PetscViewerHDF5HasAttribute(petsclib::PetscLibType, viewer::PetscViewer, parent::String, name::String) end\n\n@for_petsc function PetscViewerHDF5HasAttribute(petsclib::$UnionPetscLib, viewer::PetscViewer, parent::String, name::String )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5HasAttribute, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               viewer, parent, name, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\thas::PetscBool = PetscViewerHDF5HasObjectAttribute(petsclib::PetscLibType,viewer::PetscViewer, obj::PetscObject, name::String) \nCheck whether an attribute is attached to the dataset matching the given `PetscObject` by name\n\nCollective\n\nInput Parameters:\n- `viewer` - The `PETSCVIEWERHDF5` viewer\n- `obj`    - The object whose name is used to lookup the parent dataset, relative to the current group.\n- `name`   - The attribute name\n\nOutput Parameter:\n- `has` - Flag for attribute existence\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5WriteObjectAttribute()`, `PetscViewerHDF5ReadObjectAttribute()`, `PetscViewerHDF5HasObject()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5HasObjectAttribute\"))\n\"\"\"\nfunction PetscViewerHDF5HasObjectAttribute(petsclib::PetscLibType, viewer::PetscViewer, obj::PetscObject, name::String) end\n\n@for_petsc function PetscViewerHDF5HasObjectAttribute(petsclib::$UnionPetscLib, viewer::PetscViewer, obj::PetscObject, name::String )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5HasObjectAttribute, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscObject, Ptr{Cchar}, Ptr{PetscBool}),\n               viewer, obj, name, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\tPetscViewerCGNSOpen(petsclib::PetscLibType,comm::MPI_Comm, name::String, type::PetscFileMode, viewer::PetscViewer) \nOpens a file for CGNS input/output.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `name` - name of file\n- `type` - type of file\n-seealso: `PETSCVIEWERCGNS`, `PetscViewer`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`DMLoad()`, `PetscFileMode`, `PetscViewerSetType()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCGNSOpen\"))\n\"\"\"\nfunction PetscViewerCGNSOpen(petsclib::PetscLibType, comm::MPI_Comm, name::String, type::PetscFileMode, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerCGNSOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, type::PetscFileMode, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerCGNSOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscFileMode, Ptr{PetscViewer}),\n               comm, name, type, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerCGNSSetSolutionIndex(petsclib::PetscLibType,viewer::PetscViewer, solution_id::PetscInt) \nSet index of solution\n\nNot Collective\n\nInput Parameters:\n- `viewer`      - `PETSCVIEWERCGNS` `PetscViewer` for CGNS input/output to use with the specified file\n- `solution_id` - Index of the solution id, or `-1` for the last solution on the file\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERCGNS`, `PetscViewerCGNSGetSolutionIndex()`, `PetscViewerCGNSGetSolutionInfo()`\n\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCGNSSetSolutionIndex\"))\n\"\"\"\nfunction PetscViewerCGNSSetSolutionIndex(petsclib::PetscLibType, viewer::PetscViewer, solution_id::PetscInt) end\n\n@for_petsc function PetscViewerCGNSSetSolutionIndex(petsclib::$UnionPetscLib, viewer::PetscViewer, solution_id::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerCGNSSetSolutionIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, solution_id,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsolution_id::PetscInt = PetscViewerCGNSGetSolutionIndex(petsclib::PetscLibType,viewer::PetscViewer) \nGet index of solution\n\nNot Collective\n\nInput Parameter:\n- `viewer` - `PETSCVIEWERCGNS` `PetscViewer` for CGNS input/output to use with the specified file\n\nOutput Parameter:\n- `solution_id` - Index of the solution id\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERCGNS`, `PetscViewerCGNSSetSolutionIndex()`, `PetscViewerCGNSGetSolutionInfo()`\n\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCGNSGetSolutionIndex\"))\n\"\"\"\nfunction PetscViewerCGNSGetSolutionIndex(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerCGNSGetSolutionIndex(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tsolution_id_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerCGNSGetSolutionIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}),\n               viewer, solution_id_,\n              )\n\n\tsolution_id = solution_id_[]\n\n\treturn solution_id\nend \n\n\"\"\"\n\ttime::PetscReal,set::PetscBool = PetscViewerCGNSGetSolutionTime(petsclib::PetscLibType,viewer::PetscViewer) \nGets the solution time for the FlowSolution of the viewer\n\nCollective\n\nInput Parameter:\n- `viewer` - `PETSCVIEWERCGNS` `PetscViewer` for CGNS input/output to use with the specified file\n\nOutput Parameters:\n- `time` - Solution time of the FlowSolution_t node\n- `set`  - Whether the time data is in the file\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERCGNS`, `PetscViewer`, `PetscViewerCGNSGetSolutionIteration()`, `PetscViewerCGNSSetSolutionIndex()`, `PetscViewerCGNSGetSolutionIndex()`, `PetscViewerCGNSGetSolutionName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCGNSGetSolutionTime\"))\n\"\"\"\nfunction PetscViewerCGNSGetSolutionTime(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerCGNSGetSolutionTime(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\ttime_ = Ref{$PetscReal}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerCGNSGetSolutionTime, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscReal}, Ptr{PetscBool}),\n               viewer, time_, set_,\n              )\n\n\ttime = time_[]\n\tset = set_[]\n\n\treturn time,set\nend \n\n\"\"\"\n\titeration::PetscInt,set::PetscBool = PetscViewerCGNSGetSolutionIteration(petsclib::PetscLibType,viewer::PetscViewer) \nGets the solution iteration for the FlowSolution of the viewer\n\nCollective\n\nInput Parameter:\n- `viewer` - `PETSCVIEWERCGNS` `PetscViewer` for CGNS input/output to use with the specified file\n\nOutput Parameters:\n- `iteration` - Solution iteration of the FlowSolution_t node\n- `set`       - Whether the time data is in the file\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERCGNS`, `PetscViewer`, `PetscViewerCGNSGetSolutionTime()`, `PetscViewerCGNSSetSolutionIndex()`, `PetscViewerCGNSGetSolutionIndex()`, `PetscViewerCGNSGetSolutionName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCGNSGetSolutionIteration\"))\n\"\"\"\nfunction PetscViewerCGNSGetSolutionIteration(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerCGNSGetSolutionIteration(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\titeration_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerCGNSGetSolutionIteration, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}, Ptr{PetscBool}),\n               viewer, iteration_, set_,\n              )\n\n\titeration = iteration_[]\n\tset = set_[]\n\n\treturn iteration,set\nend \n\n\"\"\"\n\tPetscViewerCGNSGetSolutionName(petsclib::PetscLibType,viewer::PetscViewer, name::String) \nGets name of FlowSolution of the viewer\n\nCollective\n\nInput Parameter:\n- `viewer` - `PETSCVIEWERCGNS` `PetscViewer` for CGNS input/output to use with the specified file\n\nOutput Parameter:\n- `name` - Name of the FlowSolution_t node corresponding to the solution index\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERCGNS`, `PetscViewer`, `PetscViewerCGNSSetSolutionIndex()`, `PetscViewerCGNSGetSolutionIndex()`, `PetscViewerCGNSGetSolutionTime()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerCGNSGetSolutionName\"))\n\"\"\"\nfunction PetscViewerCGNSGetSolutionName(petsclib::PetscLibType, viewer::PetscViewer, name::String) end\n\n@for_petsc function PetscViewerCGNSGetSolutionName(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscViewerCGNSGetSolutionName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               viewer, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMathematicaFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the PETSc interface to Mathematica. It is\ncalled from PetscFinalize().\n\nLevel: developer\n\n-seealso: `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaFinalizePackage\"))\n\"\"\"\nfunction PetscViewerMathematicaFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscViewerMathematicaFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscViewerMathematicaFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMathematicaInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the PETSc interface to Mathematica. It is\ncalled from `PetscViewerInitializePackage()`.\n\nLevel: developer\n\n-seealso: `PetscSysInitializePackage()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaInitializePackage\"))\n\"\"\"\nfunction PetscViewerMathematicaInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscViewerMathematicaInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscViewerMathematicaInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMathematicaOpen(petsclib::PetscLibType,comm::MPI_Comm, port::Cint, machine::String, mode::String, v::PetscViewer) \nCommunicates with Mathemtica using MathLink.\n\nCollective\n\nInput Parameters:\n- `comm`    - The MPI communicator\n- `port`    - [optional] The port to connect on, or PETSC_DECIDE\n- `machine` - [optional] The machine to run Mathematica on, or NULL\n- `mode`    - [optional] The connection mode, or NULL\n\nOutput Parameter:\n- `v` - The Mathematica viewer\n\nOptions Database Keys:\n- `-viewer_math_linkhost <machine>` - The host machine for the kernel\n- `-viewer_math_linkname <name>`    - The full link name for the connection\n- `-viewer_math_linkport <port>`    - The port for the connection\n- `-viewer_math_mode <mode>`        - The mode, e.g. Launch, Connect\n- `-viewer_math_type <type>`        - The plot type, e.g. Triangulation, Vector\n- `-viewer_math_graphics <output>`  - The output type, e.g. Motif, PS, PSFile\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERMATHEMATICA`, `MatView()`, `VecView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaOpen\"))\n\"\"\"\nfunction PetscViewerMathematicaOpen(petsclib::PetscLibType, comm::MPI_Comm, port::Cint, machine::String, mode::String, v::PetscViewer) end\n\n@for_petsc function PetscViewerMathematicaOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, port::Cint, machine::String, mode::String, v::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerMathematicaOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Cint, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscViewer}),\n               comm, port, machine, mode, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMathematicaSkipPackets(petsclib::PetscLibType,viewer::PetscViewer, type::Cint) \nDiscard packets sent by Mathematica until a certain packet type is received\n\nInput Parameters:\n- `viewer` - The Mathematica viewer\n- `type`   - The packet type to search for, e.g RETURNPKT\n\nLevel: advanced\n\n-seealso: `PetscViewerMathematicaSetName()`, `PetscViewerMathematicaGetVector()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaSkipPackets\"))\n\"\"\"\nfunction PetscViewerMathematicaSkipPackets(petsclib::PetscLibType, viewer::PetscViewer, type::Cint) end\n\n@for_petsc function PetscViewerMathematicaSkipPackets(petsclib::$UnionPetscLib, viewer::PetscViewer, type::Cint )\n\n    @chk ccall(\n               (:PetscViewerMathematicaSkipPackets, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cint),\n               viewer, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMathematicaGetName(petsclib::PetscLibType,viewer::PetscViewer, name::Cchar) \nRetrieve the default name for objects communicated to Mathematica via `PETSCVIEWERMATHEMATICA`\n\nInput Parameter:\n- `viewer` - The Mathematica viewer\n\nOutput Parameter:\n- `name` - The name for new objects created in Mathematica\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERMATHEMATICA`, `PetscViewerMathematicaSetName()`, `PetscViewerMathematicaClearName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaGetName\"))\n\"\"\"\nfunction PetscViewerMathematicaGetName(petsclib::PetscLibType, viewer::PetscViewer, name::Cchar) end\n\n@for_petsc function PetscViewerMathematicaGetName(petsclib::$UnionPetscLib, viewer::PetscViewer, name::Cchar )\n\n    @chk ccall(\n               (:PetscViewerMathematicaGetName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cchar),\n               viewer, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMathematicaSetName(petsclib::PetscLibType,viewer::PetscViewer, name::String) \nOverride the default name for objects communicated to Mathematica via `PETSCVIEWERMATHEMATICA`\n\nInput Parameters:\n- `viewer` - The Mathematica viewer\n- `name`   - The name for new objects created in Mathematica\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERMATHEMATICA`, `PetscViewerMathematicaClearName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaSetName\"))\n\"\"\"\nfunction PetscViewerMathematicaSetName(petsclib::PetscLibType, viewer::PetscViewer, name::String) end\n\n@for_petsc function PetscViewerMathematicaSetName(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String )\n\n    @chk ccall(\n               (:PetscViewerMathematicaSetName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMathematicaClearName(petsclib::PetscLibType,viewer::PetscViewer) \nUse the default name for objects communicated to Mathematica\n\nInput Parameter:\n- `viewer` - The Mathematica viewer\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWERMATHEMATICA`, `PetscViewerMathematicaGetName()`, `PetscViewerMathematicaSetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaClearName\"))\n\"\"\"\nfunction PetscViewerMathematicaClearName(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerMathematicaClearName(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerMathematicaClearName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::PetscReal = PetscViewerMathematicaPutMatrix(petsclib::PetscLibType,viewer::PetscViewer, m::Cint, n::Cint) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaPutMatrix\"))\n\"\"\"\nfunction PetscViewerMathematicaPutMatrix(petsclib::PetscLibType, viewer::PetscViewer, m::Cint, n::Cint) end\n\n@for_petsc function PetscViewerMathematicaPutMatrix(petsclib::$UnionPetscLib, viewer::PetscViewer, m::Cint, n::Cint )\n\ta_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscViewerMathematicaPutMatrix, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cint, Cint, Ptr{$PetscReal}),\n               viewer, m, n, a_,\n              )\n\n\ta = a_[]\n\n\treturn a\nend \n\n\"\"\"\n\ta::PetscReal = PetscViewerMathematicaPutCSRMatrix(petsclib::PetscLibType,viewer::PetscViewer, m::Cint, n::Cint, i::Cint, j::Cint) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMathematicaPutCSRMatrix\"))\n\"\"\"\nfunction PetscViewerMathematicaPutCSRMatrix(petsclib::PetscLibType, viewer::PetscViewer, m::Cint, n::Cint, i::Cint, j::Cint) end\n\n@for_petsc function PetscViewerMathematicaPutCSRMatrix(petsclib::$UnionPetscLib, viewer::PetscViewer, m::Cint, n::Cint, i::Cint, j::Cint )\n\ta_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscViewerMathematicaPutCSRMatrix, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cint, Cint, Ptr{Cint}, Ptr{Cint}, Ptr{$PetscReal}),\n               viewer, m, n, i, j, a_,\n              )\n\n\ta = a_[]\n\n\treturn a\nend \n\n\"\"\"\n\tPetscViewerVTKAddField(petsclib::PetscLibType,viewer::PetscViewer, dm::PetscObject, PetscViewerVTKWriteFunction::external, fieldnum::PetscInt, fieldtype::PetscViewerVTKFieldType, checkdm::PetscBool, vec::PetscObject) \nAdd a field to the viewer\n\nCollective\n\nInput Parameters:\n- `viewer`                      - `PETSCVIEWERVTK`\n- `dm`                          - `DM` on which `Vec` lives\n- `PetscViewerVTKWriteFunction` - function to write this `Vec`\n- `fieldnum`                    - which field of the `DM` to write (`PETSC_DEFAULT` if the whole vector should be written)\n- `fieldtype`                   - Either `PETSC_VTK_POINT_FIELD` or `PETSC_VTK_CELL_FIELD`\n- `checkdm`                     - whether to check for identical dm arguments as fields are added\n- `vec`                         - `Vec` from which to write\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PETSCVIEWERVTK`, `PetscViewerVTKOpen()`, `DMDAVTKWriteAll()`, `PetscViewerVTKWriteFunction`, `PetscViewerVTKGetDM()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerVTKAddField\"))\n\"\"\"\nfunction PetscViewerVTKAddField(petsclib::PetscLibType, viewer::PetscViewer, dm::PetscObject, PetscViewerVTKWriteFunction::external, fieldnum::PetscInt, fieldtype::PetscViewerVTKFieldType, checkdm::PetscBool, vec::PetscObject) end\n\n@for_petsc function PetscViewerVTKAddField(petsclib::$UnionPetscLib, viewer::PetscViewer, dm::PetscObject, PetscViewerVTKWriteFunction::external, fieldnum::$PetscInt, fieldtype::PetscViewerVTKFieldType, checkdm::PetscBool, vec::PetscObject )\n\n    @chk ccall(\n               (:PetscViewerVTKAddField, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscObject, external, $PetscInt, PetscViewerVTKFieldType, PetscBool, PetscObject),\n               viewer, dm, PetscViewerVTKWriteFunction, fieldnum, fieldtype, checkdm, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerVTKGetDM(petsclib::PetscLibType,viewer::PetscViewer, dm::PetscObject) \nget the `DM` associated with the `PETSCVIEWERVTK` viewer\n\nCollective\n\nInput Parameters:\n- `viewer` - `PETSCVIEWERVTK` viewer\n- `dm`     - `DM` associated with the viewer (as a `PetscObject`)\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PETSCVIEWERVTK`, `PetscViewerVTKOpen()`, `DMDAVTKWriteAll()`, `PetscViewerVTKWriteFunction`, `PetscViewerVTKAddField()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerVTKGetDM\"))\n\"\"\"\nfunction PetscViewerVTKGetDM(petsclib::PetscLibType, viewer::PetscViewer, dm::PetscObject) end\n\n@for_petsc function PetscViewerVTKGetDM(petsclib::$UnionPetscLib, viewer::PetscViewer, dm::PetscObject )\n\n    @chk ccall(\n               (:PetscViewerVTKGetDM, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscObject}),\n               viewer, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerVTKOpen(petsclib::PetscLibType,comm::MPI_Comm, name::String, type::PetscFileMode, vtk::PetscViewer) \nOpens a `PETSCVIEWERVTK` viewer file.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `name` - name of file\n- `type` - type of file\n-seealso: [](sec_viewers), `PETSCVIEWERVTK`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`,\n`PetscFileMode`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerVTKOpen\"))\n\"\"\"\nfunction PetscViewerVTKOpen(petsclib::PetscLibType, comm::MPI_Comm, name::String, type::PetscFileMode, vtk::PetscViewer) end\n\n@for_petsc function PetscViewerVTKOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, type::PetscFileMode, vtk::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerVTKOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscFileMode, Ptr{PetscViewer}),\n               comm, name, type, vtk,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMatlabPutArray(petsclib::PetscLibType,mfile::PetscViewer, m::Cint, n::Cint, array::PetscScalar, name::String) \nPuts an array into the `PETSCVIEWERMATLAB` viewer.\n\nNot Collective, only processor zero saves `array`\n\nInput Parameters:\n- `mfile` - the viewer\n- `m`     - the first dimensions of `array`\n- `n`     - the second dimensions of `array`\n- `array` - the array (represented in one dimension)\n- `name`  - the MATLAB name of `array`\n\nLevel: advanced\n\n-seealso: `PETSCVIEWERMATLAB`, `PetscViewerMatlabGetArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMatlabPutArray\"))\n\"\"\"\nfunction PetscViewerMatlabPutArray(petsclib::PetscLibType, mfile::PetscViewer, m::Cint, n::Cint, array::PetscScalar, name::String) end\n\n@for_petsc function PetscViewerMatlabPutArray(petsclib::$UnionPetscLib, mfile::PetscViewer, m::Cint, n::Cint, array::$PetscScalar, name::String )\n\n    @chk ccall(\n               (:PetscViewerMatlabPutArray, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cint, Cint, Ptr{$PetscScalar}, Ptr{Cchar}),\n               mfile, m, n, array, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMatlabPutVariable(petsclib::PetscLibType,viewer::PetscViewer, name::String, mat::Cvoid) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMatlabPutVariable\"))\n\"\"\"\nfunction PetscViewerMatlabPutVariable(petsclib::PetscLibType, viewer::PetscViewer, name::String, mat::Cvoid) end\n\n@for_petsc function PetscViewerMatlabPutVariable(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String, mat::Cvoid )\n\n    @chk ccall(\n               (:PetscViewerMatlabPutVariable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Cvoid}),\n               viewer, name, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMatlabGetArray(petsclib::PetscLibType,mfile::PetscViewer, m::Cint, n::Cint, array::Vector{PetscScalar}, name::String) \nGets a variable from a `PETSCVIEWERMATLAB` viewer into an array\n\nNot Collective; only processor zero reads in the array\n\nInput Parameters:\n- `mfile` - the MATLAB file viewer\n- `m`     - the first dimensions of `array`\n- `n`     - the second dimensions of `array`\n- `array` - the array (represented in one dimension), must of be length `m` * `n`\n- `name`  - the MATLAB name of `array`\n\nLevel: advanced\n\n-seealso: `PETSCVIEWERMATLAB`, `PetscViewerMatlabPutArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMatlabGetArray\"))\n\"\"\"\nfunction PetscViewerMatlabGetArray(petsclib::PetscLibType, mfile::PetscViewer, m::Cint, n::Cint, array::Vector{PetscScalar}, name::String) end\n\n@for_petsc function PetscViewerMatlabGetArray(petsclib::$UnionPetscLib, mfile::PetscViewer, m::Cint, n::Cint, array::Vector{$PetscScalar}, name::String )\n\n    @chk ccall(\n               (:PetscViewerMatlabGetArray, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cint, Cint, Ptr{$PetscScalar}, Ptr{Cchar}),\n               mfile, m, n, array, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerMatlabOpen(petsclib::PetscLibType,comm::MPI_Comm, name::String, type::PetscFileMode, binv::PetscViewer) \nOpens a MATLAB .mat file for output\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `name` - name of file\n- `type` - type of file\n-seealso: `PETSCVIEWERMATLAB`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`, `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMatlabOpen\"))\n\"\"\"\nfunction PetscViewerMatlabOpen(petsclib::PetscLibType, comm::MPI_Comm, name::String, type::PetscFileMode, binv::PetscViewer) end\n\n@for_petsc function PetscViewerMatlabOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, type::PetscFileMode, binv::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerMatlabOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscFileMode, Ptr{PetscViewer}),\n               comm, name, type, binv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerGLVisSetPrecision(petsclib::PetscLibType,viewer::PetscViewer, prec::PetscInt) \nSet the number of digits for floating point values to be displayed\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERGLVIS`\n- `prec`   - the number of digits required\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PETSCVIEWERGLVIS`, `PetscViewerGLVisOpen()`, `PetscViewerGLVisSetFields()`, `PetscViewerCreate()`, `PetscViewerSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGLVisSetPrecision\"))\n\"\"\"\nfunction PetscViewerGLVisSetPrecision(petsclib::PetscLibType, viewer::PetscViewer, prec::PetscInt) end\n\n@for_petsc function PetscViewerGLVisSetPrecision(petsclib::$UnionPetscLib, viewer::PetscViewer, prec::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerGLVisSetPrecision, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, prec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerGLVisSetSnapId(petsclib::PetscLibType,viewer::PetscViewer, id::PetscInt) \nSet the snapshot id. Only relevant when the `PetscViewerGLVisType` is `PETSC_VIEWER_GLVIS_DUMP`\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` of type `PETSCVIEWERGLVIS`\n- `id`     - the current snapshot id in a time-dependent simulation\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PETSCVIEWERGLVIS`, `PetscViewerGLVisOpen()`, `PetscViewerGLVisSetFields()`, `PetscViewerCreate()`, `PetscViewerSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGLVisSetSnapId\"))\n\"\"\"\nfunction PetscViewerGLVisSetSnapId(petsclib::PetscLibType, viewer::PetscViewer, id::PetscInt) end\n\n@for_petsc function PetscViewerGLVisSetSnapId(petsclib::$UnionPetscLib, viewer::PetscViewer, id::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerGLVisSetSnapId, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, id,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerGLVisSetFields(petsclib::PetscLibType,viewer::PetscViewer, nf::PetscInt, fec_type::String, dim::Vector{PetscInt}, g2l::external, Vfield::Vector{PetscObject}, ctx::Cvoid, destroyctx::external) \nSets the required information to visualize different fields from a vector.\n\nLogically Collective\n\nInput Parameters:\n- `viewer`     - the `PetscViewer` of type `PETSCVIEWERGLVIS`\n- `nf`         - number of fields to be visualized\n- `fec_type`   - the type of finite element to be used to visualize the data (see FiniteElementCollection::Name() in MFEM)\n- `dim`        - array of space dimension for field vectors (used to initialize the scene)\n- `g2l`        - User routine to compute the local field vectors to be visualized; PetscObject is used in place of Vec on the prototype\n- `Vfield`     - array of work vectors, one for each field\n- `ctx`        - User context to store the relevant data to apply g2lfields\n- `destroyctx` - Destroy function for userctx\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERGLVIS`, `PetscViewerGLVisOpen()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscObjectSetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGLVisSetFields\"))\n\"\"\"\nfunction PetscViewerGLVisSetFields(petsclib::PetscLibType, viewer::PetscViewer, nf::PetscInt, fec_type::String, dim::Vector{PetscInt}, g2l::external, Vfield::Vector{PetscObject}, ctx::Cvoid, destroyctx::external) end\n\n@for_petsc function PetscViewerGLVisSetFields(petsclib::$UnionPetscLib, viewer::PetscViewer, nf::$PetscInt, fec_type::String, dim::Vector{$PetscInt}, g2l::external, Vfield::Vector{PetscObject}, ctx::Cvoid, destroyctx::external )\n\tfec_type_ = Ref(pointer(fec_type))\n\n    @chk ccall(\n               (:PetscViewerGLVisSetFields, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt, Ptr{Ptr{Cchar}}, Ptr{$PetscInt}, external, Ptr{PetscObject}, Ptr{Cvoid}, external),\n               viewer, nf, fec_type_, dim, g2l, Vfield, ctx, destroyctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerGLVisOpen(petsclib::PetscLibType,comm::MPI_Comm, type::PetscViewerGLVisType, name::String, port::PetscInt, viewer::PetscViewer) \nOpens a `PETSCVIEWERGLVIS` `PetscViewer`\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `type` - the viewer type: `PETSC_VIEWER_GLVIS_SOCKET` for real-time visualization or `PETSC_VIEWER_GLVIS_DUMP` for dumping to a file\n- `name` - either the hostname where the GLVis server is running or the base filename for dumping the data for subsequent visualizations\n- `port` - socket port where the GLVis server is listening. Not referenced when type is `PETSC_VIEWER_GLVIS_DUMP`\n\nOutput Parameter:\n- `viewer` - the `PetscViewer` object\n\nOptions Database Keys:\n- `-glvis_precision <precision>` - Sets number of digits for floating point values\n- `-glvis_size <width,height>`   - Sets the window size (in pixels)\n- `-glvis_pause <pause>`         - Sets time (in seconds) that the program pauses after each visualization\n(0 is default, -1 implies every visualization)\n- `-glvis_keys`                  - Additional keys to configure visualization\n- `-glvis_exec`                  - Additional commands to configure visualization\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PETSCVIEWERGLVIS`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerGLVisType`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerGLVisOpen\"))\n\"\"\"\nfunction PetscViewerGLVisOpen(petsclib::PetscLibType, comm::MPI_Comm, type::PetscViewerGLVisType, name::String, port::PetscInt, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerGLVisOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, type::PetscViewerGLVisType, name::String, port::$PetscInt, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerGLVisOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscViewerGLVisType, Ptr{Cchar}, $PetscInt, Ptr{PetscViewer}),\n               comm, type, name, port, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryGetMPIIOOffset(petsclib::PetscLibType,viewer::PetscViewer, off::MPI_Offset) \nGets the current global offset that should be passed to `MPI_File_set_view()` or `MPI_File_{write|read}_at[_all]()`\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `off` - the current global offset\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`, `PetscViewerBinaryGetUseMPIIO()`, `PetscViewerBinarySetUseMPIIO()`, `PetscViewerBinaryAddMPIIOOffset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetMPIIOOffset\"))\n\"\"\"\nfunction PetscViewerBinaryGetMPIIOOffset(petsclib::PetscLibType, viewer::PetscViewer, off::MPI_Offset) end\n\n@for_petsc function PetscViewerBinaryGetMPIIOOffset(petsclib::$UnionPetscLib, viewer::PetscViewer, off::MPI_Offset )\n\n    @chk ccall(\n               (:PetscViewerBinaryGetMPIIOOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{MPI_Offset}),\n               viewer, off,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryAddMPIIOOffset(petsclib::PetscLibType,viewer::PetscViewer, off::MPI_Offset) \nAdds to the current global offset\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n- `off`    - the addition to the global offset\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`, `PetscViewerBinaryGetUseMPIIO()`, `PetscViewerBinarySetUseMPIIO()`, `PetscViewerBinaryGetMPIIOOffset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryAddMPIIOOffset\"))\n\"\"\"\nfunction PetscViewerBinaryAddMPIIOOffset(petsclib::PetscLibType, viewer::PetscViewer, off::MPI_Offset) end\n\n@for_petsc function PetscViewerBinaryAddMPIIOOffset(petsclib::$UnionPetscLib, viewer::PetscViewer, off::MPI_Offset )\n\n    @chk ccall(\n               (:PetscViewerBinaryAddMPIIOOffset, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, MPI_Offset),\n               viewer, off,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryGetMPIIODescriptor(petsclib::PetscLibType,viewer::PetscViewer, fdes::MPI_File) \nExtracts the MPI IO file descriptor from a `PetscViewer`.\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `fdes` - file descriptor\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`, `PetscViewerBinaryGetUseMPIIO()`, `PetscViewerBinarySetUseMPIIO()`, `PetscViewerBinaryGetMPIIOOffset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetMPIIODescriptor\"))\n\"\"\"\nfunction PetscViewerBinaryGetMPIIODescriptor(petsclib::PetscLibType, viewer::PetscViewer, fdes::MPI_File) end\n\n@for_petsc function PetscViewerBinaryGetMPIIODescriptor(petsclib::$UnionPetscLib, viewer::PetscViewer, fdes::MPI_File )\n\n    @chk ccall(\n               (:PetscViewerBinaryGetMPIIODescriptor, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{MPI_File}),\n               viewer, fdes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinarySetUseMPIIO(petsclib::PetscLibType,viewer::PetscViewer, use::PetscBool) \nSets a binary viewer to use MPI\nbefore `PetscViewerFileSetName()`\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`; must be a `PETSCVIEWERBINARY`\n- `use`    - `PETSC_TRUE` means MPI-IO will be used\n\nOptions Database Key:\n- `-viewer_binary_mpiio` - <true or false> flag for using MPI-IO\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`,\n`PetscViewerBinaryGetUseMPIIO()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinarySetUseMPIIO\"))\n\"\"\"\nfunction PetscViewerBinarySetUseMPIIO(petsclib::PetscLibType, viewer::PetscViewer, use::PetscBool) end\n\n@for_petsc function PetscViewerBinarySetUseMPIIO(petsclib::$UnionPetscLib, viewer::PetscViewer, use::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerBinarySetUseMPIIO, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuse::PetscBool = PetscViewerBinaryGetUseMPIIO(petsclib::PetscLibType,viewer::PetscViewer) \nReturns `PETSC_TRUE` if the binary viewer uses MPI\n\nNot Collective\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`; must be a `PETSCVIEWERBINARY`\n\nOutput Parameter:\n- `use` - `PETSC_TRUE` if MPI-IO is being used\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`, `PetscViewerBinarySetUseMPIIO()`, `PetscViewerBinaryGetMPIIOOffset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetUseMPIIO\"))\n\"\"\"\nfunction PetscViewerBinaryGetUseMPIIO(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerBinaryGetUseMPIIO(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tuse_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerBinaryGetUseMPIIO, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, use_,\n              )\n\n\tuse = use_[]\n\n\treturn use\nend \n\n\"\"\"\n\tPetscViewerBinarySetFlowControl(petsclib::PetscLibType,viewer::PetscViewer, fc::PetscInt) \nSets how many messages are allowed to be outstanding at the same time during parallel IO reads/writes\n\nNot Collective\n\nInput Parameters:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n- `fc`     - the number of messages, defaults to 256 if this function was not called\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`, `PetscViewerBinaryGetFlowControl()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinarySetFlowControl\"))\n\"\"\"\nfunction PetscViewerBinarySetFlowControl(petsclib::PetscLibType, viewer::PetscViewer, fc::PetscInt) end\n\n@for_petsc function PetscViewerBinarySetFlowControl(petsclib::$UnionPetscLib, viewer::PetscViewer, fc::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerBinarySetFlowControl, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, fc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfc::PetscInt = PetscViewerBinaryGetFlowControl(petsclib::PetscLibType,viewer::PetscViewer) \nReturns how many messages are allowed to be outstanding at the same time during parallel IO reads/writes\n\nNot Collective\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `fc` - the number of messages\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`, `PetscViewerBinarySetFlowControl()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetFlowControl\"))\n\"\"\"\nfunction PetscViewerBinaryGetFlowControl(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerBinaryGetFlowControl(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tfc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerBinaryGetFlowControl, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}),\n               viewer, fc_,\n              )\n\n\tfc = fc_[]\n\n\treturn fc\nend \n\n\"\"\"\n\tPetscViewerBinaryGetDescriptor(petsclib::PetscLibType,viewer::PetscViewer, fdes::Cint) \nExtracts the file descriptor from a `PetscViewer` of `PetscViewerType` `PETSCVIEWERBINARY`.\n\nCollective because it may trigger a `PetscViewerSetUp()` call; No Fortran Support\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `fdes` - file descriptor\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetInfoPointer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetDescriptor\"))\n\"\"\"\nfunction PetscViewerBinaryGetDescriptor(petsclib::PetscLibType, viewer::PetscViewer, fdes::Cint) end\n\n@for_petsc function PetscViewerBinaryGetDescriptor(petsclib::$UnionPetscLib, viewer::PetscViewer, fdes::Cint )\n\n    @chk ccall(\n               (:PetscViewerBinaryGetDescriptor, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cint}),\n               viewer, fdes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinarySkipInfo(petsclib::PetscLibType,viewer::PetscViewer) \nBinary file will not have `.info` file created with it\n\nNot Collective\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerCreate()`\n\nOptions Database Key:\n- `-viewer_binary_skip_info` - true indicates do not generate `.info` file\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinarySetSkipOptions()`,\n`PetscViewerBinaryGetSkipOptions()`, `PetscViewerBinaryGetSkipInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinarySkipInfo\"))\n\"\"\"\nfunction PetscViewerBinarySkipInfo(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerBinarySkipInfo(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerBinarySkipInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinarySetSkipInfo(petsclib::PetscLibType,viewer::PetscViewer, skip::PetscBool) \nBinary file will not have `.info` file created with it\n\nNot Collective\n\nInput Parameters:\n- `viewer` - PetscViewer context, obtained from `PetscViewerCreate()`\n- `skip`   - `PETSC_TRUE` implies the `.info` file will not be generated\n\nOptions Database Key:\n- `-viewer_binary_skip_info` - true indicates do not generate `.info` file\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinarySetSkipOptions()`,\n`PetscViewerBinaryGetSkipOptions()`, `PetscViewerBinaryGetSkipInfo()`, `PetscViewerBinaryGetInfoPointer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinarySetSkipInfo\"))\n\"\"\"\nfunction PetscViewerBinarySetSkipInfo(petsclib::PetscLibType, viewer::PetscViewer, skip::PetscBool) end\n\n@for_petsc function PetscViewerBinarySetSkipInfo(petsclib::$UnionPetscLib, viewer::PetscViewer, skip::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerBinarySetSkipInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, skip,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tskip::PetscBool = PetscViewerBinaryGetSkipInfo(petsclib::PetscLibType,viewer::PetscViewer) \ncheck if viewer wrote a `.info` file\n\nNot Collective\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `skip` - `PETSC_TRUE` implies the `.info` file was not generated\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscViewerBinarySetSkipOptions()`, `PetscViewerBinarySetSkipInfo()`, `PetscViewerBinaryGetInfoPointer()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetSkipInfo\"))\n\"\"\"\nfunction PetscViewerBinaryGetSkipInfo(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerBinaryGetSkipInfo(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tskip_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerBinaryGetSkipInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, skip_,\n              )\n\n\tskip = skip_[]\n\n\treturn skip\nend \n\n\"\"\"\n\tPetscViewerBinarySetSkipOptions(petsclib::PetscLibType,viewer::PetscViewer, skip::PetscBool) \ndo not use values in the PETSc options database when loading objects\n\nNot Collective\n\nInput Parameters:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n- `skip`   - `PETSC_TRUE` means do not use the options from the options database\n\nOptions Database Key:\n- `-viewer_binary_skip_options <true or false>` - true means do not use the options from the options database\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinarySkipInfo()`,\n`PetscViewerBinaryGetSkipOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinarySetSkipOptions\"))\n\"\"\"\nfunction PetscViewerBinarySetSkipOptions(petsclib::PetscLibType, viewer::PetscViewer, skip::PetscBool) end\n\n@for_petsc function PetscViewerBinarySetSkipOptions(petsclib::$UnionPetscLib, viewer::PetscViewer, skip::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerBinarySetSkipOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, skip,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tskip::PetscBool = PetscViewerBinaryGetSkipOptions(petsclib::PetscLibType,viewer::PetscViewer) \nchecks if viewer uses the PETSc options database when loading objects\n\nNot Collective\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `skip` - `PETSC_TRUE` means do not use\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinarySkipInfo()`,\n`PetscViewerBinarySetSkipOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetSkipOptions\"))\n\"\"\"\nfunction PetscViewerBinaryGetSkipOptions(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerBinaryGetSkipOptions(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tskip_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerBinaryGetSkipOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, skip_,\n              )\n\n\tskip = skip_[]\n\n\treturn skip\nend \n\n\"\"\"\n\tPetscViewerBinarySetSkipHeader(petsclib::PetscLibType,viewer::PetscViewer, skip::PetscBool) \ndo not write a header with size information on output, just raw data\n\nNot Collective\n\nInput Parameters:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n- `skip`   - `PETSC_TRUE` means do not write header\n\nOptions Database Key:\n- `-viewer_binary_skip_header <true or false>` - true means do not write header\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinarySkipInfo()`,\n`PetscViewerBinaryGetSkipHeader()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinarySetSkipHeader\"))\n\"\"\"\nfunction PetscViewerBinarySetSkipHeader(petsclib::PetscLibType, viewer::PetscViewer, skip::PetscBool) end\n\n@for_petsc function PetscViewerBinarySetSkipHeader(petsclib::$UnionPetscLib, viewer::PetscViewer, skip::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerBinarySetSkipHeader, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, skip,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tskip::PetscBool = PetscViewerBinaryGetSkipHeader(petsclib::PetscLibType,viewer::PetscViewer) \nchecks whether to write a header with size information on output, or just raw data\n\nNot Collective\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `skip` - `PETSC_TRUE` means do not write header\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinarySkipInfo()`,\n`PetscViewerBinarySetSkipHeader()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetSkipHeader\"))\n\"\"\"\nfunction PetscViewerBinaryGetSkipHeader(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerBinaryGetSkipHeader(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tskip_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerBinaryGetSkipHeader, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, skip_,\n              )\n\n\tskip = skip_[]\n\n\treturn skip\nend \n\n\"\"\"\n\tPetscViewerBinaryGetInfoPointer(petsclib::PetscLibType,viewer::PetscViewer, file::Libc.FILE) \nExtracts the file pointer for the ASCII\n`.info` file associated with a binary file.\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `viewer` - `PetscViewer` context, obtained from `PetscViewerBinaryOpen()`\n\nOutput Parameter:\n- `file` - file pointer  Always returns `NULL` if not a binary viewer\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinaryGetSkipInfo()`,\n`PetscViewerBinarySetSkipInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryGetInfoPointer\"))\n\"\"\"\nfunction PetscViewerBinaryGetInfoPointer(petsclib::PetscLibType, viewer::PetscViewer, file::Libc.FILE) end\n\n@for_petsc function PetscViewerBinaryGetInfoPointer(petsclib::$UnionPetscLib, viewer::PetscViewer, file::Libc.FILE )\n\n    @chk ccall(\n               (:PetscViewerBinaryGetInfoPointer, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Libc.FILE),\n               viewer, file,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryOpen(petsclib::PetscLibType,comm::MPI_Comm, name::String, mode::PetscFileMode, viewer::PetscViewer) \nOpens a file for binary input/output.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `name` - name of file\n- `mode` - open mode of file\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`, `PetscViewer`, `PetscViewerBinaryRead()`, `PetscViewerBinarySetUseMPIIO()`,\n`PetscViewerBinaryGetUseMPIIO()`, `PetscViewerBinaryGetMPIIOOffset()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryOpen\"))\n\"\"\"\nfunction PetscViewerBinaryOpen(petsclib::PetscLibType, comm::MPI_Comm, name::String, mode::PetscFileMode, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerBinaryOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, mode::PetscFileMode, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerBinaryOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscFileMode, Ptr{PetscViewer}),\n               comm, name, mode, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcount::PetscInt = PetscViewerBinaryRead(petsclib::PetscLibType,viewer::PetscViewer, data::Cvoid, num::PetscInt, dtype::PetscDataType) \nReads from a binary file, all processors get the same result\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWERBINARY` viewer\n- `num`    - number of items of data to read\n- `dtype`  - type of data to read\n\nOutput Parameters:\n- `data`  - location of the read data, treated as an array of the type indicated by `dtype`\n- `count` - number of items of data actually read, or `NULL`.\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryRead\"))\n\"\"\"\nfunction PetscViewerBinaryRead(petsclib::PetscLibType, viewer::PetscViewer, data::Cvoid, num::PetscInt, dtype::PetscDataType) end\n\n@for_petsc function PetscViewerBinaryRead(petsclib::$UnionPetscLib, viewer::PetscViewer, data::Cvoid, num::$PetscInt, dtype::PetscDataType )\n\tcount_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerBinaryRead, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cvoid}, $PetscInt, Ptr{$PetscInt}, PetscDataType),\n               viewer, data, num, count_, dtype,\n              )\n\n\tcount = count_[]\n\n\treturn count\nend \n\n\"\"\"\n\tPetscViewerBinaryWrite(petsclib::PetscLibType,viewer::PetscViewer, data::Cvoid, count::PetscInt, dtype::PetscDataType) \nwrites to a binary file, only from the first MPI rank\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWERBINARY` viewer\n- `data`   - location of data, treated as an array of the type indicated by `dtype`\n- `count`  - number of items of data to write\n- `dtype`  - type of data to write\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`, `PetscViewerBinaryGetDescriptor()`, `PetscDataType`\n`PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`, `PetscViewer`, `PetscViewerBinaryRead()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryWrite\"))\n\"\"\"\nfunction PetscViewerBinaryWrite(petsclib::PetscLibType, viewer::PetscViewer, data::Cvoid, count::PetscInt, dtype::PetscDataType) end\n\n@for_petsc function PetscViewerBinaryWrite(petsclib::$UnionPetscLib, viewer::PetscViewer, data::Cvoid, count::$PetscInt, dtype::PetscDataType )\n\n    @chk ccall(\n               (:PetscViewerBinaryWrite, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cvoid}, $PetscInt, PetscDataType),\n               viewer, data, count, dtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryReadAll(petsclib::PetscLibType,viewer::PetscViewer, data::Cvoid, count::PetscCount, start::PetscCount, total::PetscCount, dtype::PetscDataType) \nreads from a binary file from all MPI processes, each rank receives its own portion of the data\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWERBINARY` viewer\n- `count`  - local number of items of data to read\n- `start`  - local start, can be `PETSC_DETERMINE`\n- `total`  - global number of items of data to read, can be `PETSC_DETERMINE`\n- `dtype`  - type of data to read\n\nOutput Parameter:\n- `data` - location of data, treated as an array of type indicated by `dtype`\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinarySetUseMPIIO()`, `PetscViewerBinaryRead()`, `PetscViewerBinaryWriteAll()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryReadAll\"))\n\"\"\"\nfunction PetscViewerBinaryReadAll(petsclib::PetscLibType, viewer::PetscViewer, data::Cvoid, count::PetscCount, start::PetscCount, total::PetscCount, dtype::PetscDataType) end\n\n@for_petsc function PetscViewerBinaryReadAll(petsclib::$UnionPetscLib, viewer::PetscViewer, data::Cvoid, count::PetscCount, start::PetscCount, total::PetscCount, dtype::PetscDataType )\n\n    @chk ccall(\n               (:PetscViewerBinaryReadAll, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cvoid}, PetscCount, PetscCount, PetscCount, PetscDataType),\n               viewer, data, count, start, total, dtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryWriteAll(petsclib::PetscLibType,viewer::PetscViewer, data::Cvoid, count::PetscCount, start::PetscCount, total::PetscCount, dtype::PetscDataType) \nwrites to a binary file from all MPI processes, each rank writes its own portion of the data\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWERBINARY` viewer\n- `data`   - location of data\n- `count`  - local number of items of data to write, treated as an array of type indicated by `dtype`\n- `start`  - local start, can be `PETSC_DETERMINE`\n- `total`  - global number of items of data to write, can be `PETSC_DETERMINE`\n- `dtype`  - type of data to write\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerBinaryOpen()`, `PetscViewerBinarySetUseMPIIO()`, `PetscViewerBinaryReadAll()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryWriteAll\"))\n\"\"\"\nfunction PetscViewerBinaryWriteAll(petsclib::PetscLibType, viewer::PetscViewer, data::Cvoid, count::PetscCount, start::PetscCount, total::PetscCount, dtype::PetscDataType) end\n\n@for_petsc function PetscViewerBinaryWriteAll(petsclib::$UnionPetscLib, viewer::PetscViewer, data::Cvoid, count::PetscCount, start::PetscCount, total::PetscCount, dtype::PetscDataType )\n\n    @chk ccall(\n               (:PetscViewerBinaryWriteAll, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cvoid}, PetscCount, PetscCount, PetscCount, PetscDataType),\n               viewer, data, count, start, total, dtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryWriteStringArray(petsclib::PetscLibType,viewer::PetscViewer, data::String) \nwrites to a binary file, only from the first MPI rank, an array of strings\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWERBINARY` viewer\n- `data`   - location of the array of strings\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`, `PetscViewer`, `PetscViewerBinaryRead()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryWriteStringArray\"))\n\"\"\"\nfunction PetscViewerBinaryWriteStringArray(petsclib::PetscLibType, viewer::PetscViewer, data::String) end\n\n@for_petsc function PetscViewerBinaryWriteStringArray(petsclib::$UnionPetscLib, viewer::PetscViewer, data::String )\n\tdata_ = Ref(pointer(data))\n\n    @chk ccall(\n               (:PetscViewerBinaryWriteStringArray, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               viewer, data_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerBinaryReadStringArray(petsclib::PetscLibType,viewer::PetscViewer, data::Cchar) \nreads a binary file an array of strings to all MPI processes\n\nCollective; No Fortran Support\n\nInput Parameter:\n- `viewer` - the `PETSCVIEWERBINARY` viewer\n\nOutput Parameter:\n- `data` - location of the array of strings\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`, `PetscViewer`, `PetscViewerBinaryRead()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerBinaryReadStringArray\"))\n\"\"\"\nfunction PetscViewerBinaryReadStringArray(petsclib::PetscLibType, viewer::PetscViewer, data::Cchar) end\n\n@for_petsc function PetscViewerBinaryReadStringArray(petsclib::$UnionPetscLib, viewer::PetscViewer, data::Cchar )\n\n    @chk ccall(\n               (:PetscViewerBinaryReadStringArray, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cchar),\n               viewer, data,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerFileSetMode(petsclib::PetscLibType,viewer::PetscViewer, mode::PetscFileMode) \nSets the open mode of file\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`; must be a `PETSCVIEWERBINARY`, `PETSCVIEWERMATLAB`, `PETSCVIEWERHDF5`, or `PETSCVIEWERASCII`  `PetscViewer`\n- `mode`   - open mode of file\n-seealso: [](sec_viewers), `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFileSetMode\"))\n\"\"\"\nfunction PetscViewerFileSetMode(petsclib::PetscLibType, viewer::PetscViewer, mode::PetscFileMode) end\n\n@for_petsc function PetscViewerFileSetMode(petsclib::$UnionPetscLib, viewer::PetscViewer, mode::PetscFileMode )\n\n    @chk ccall(\n               (:PetscViewerFileSetMode, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscFileMode),\n               viewer, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerFileGetMode(petsclib::PetscLibType,viewer::PetscViewer, mode::PetscFileMode) \nGets the open mode of a file associated with a `PetscViewer`\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`; must be a `PETSCVIEWERBINARY`, `PETSCVIEWERMATLAB`, `PETSCVIEWERHDF5`, or `PETSCVIEWERASCII`  `PetscViewer`\n\nOutput Parameter:\n- `mode` - open mode of file\n-seealso: [](sec_viewers), `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerFileGetMode\"))\n\"\"\"\nfunction PetscViewerFileGetMode(petsclib::PetscLibType, viewer::PetscViewer, mode::PetscFileMode) end\n\n@for_petsc function PetscViewerFileGetMode(petsclib::$UnionPetscLib, viewer::PetscViewer, mode::PetscFileMode )\n\n    @chk ccall(\n               (:PetscViewerFileGetMode, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscFileMode}),\n               viewer, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawBaseAdd(petsclib::PetscLibType,viewer::PetscViewer, windownumber::PetscInt) \nadd to the base integer that is added to the `windownumber` passed to `PetscViewerDrawGetDraw()`\n\nLogically Collective\n\nInput Parameters:\n- `viewer`       - the `PetscViewer` (created with `PetscViewerDrawOpen()`)\n- `windownumber` - how much to add to the base\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscViewerDrawGetLG()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`, `PetscViewerDrawGetDraw()`, `PetscViewerDrawBaseSet()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawBaseAdd\"))\n\"\"\"\nfunction PetscViewerDrawBaseAdd(petsclib::PetscLibType, viewer::PetscViewer, windownumber::PetscInt) end\n\n@for_petsc function PetscViewerDrawBaseAdd(petsclib::$UnionPetscLib, viewer::PetscViewer, windownumber::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerDrawBaseAdd, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, windownumber,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawBaseSet(petsclib::PetscLibType,viewer::PetscViewer, windownumber::PetscInt) \nsets the base integer that is added to the `windownumber` passed to `PetscViewerDrawGetDraw()`\n\nLogically Collective\n\nInput Parameters:\n- `viewer`       - the `PetscViewer` (created with `PetscViewerDrawOpen()`)\n- `windownumber` - value to set the base\n\nLevel: developer\n\n-seealso: [](sec_viewers), `PetscViewerDrawGetLG()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`, `PetscViewerDrawGetDraw()`, `PetscViewerDrawBaseAdd()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawBaseSet\"))\n\"\"\"\nfunction PetscViewerDrawBaseSet(petsclib::PetscLibType, viewer::PetscViewer, windownumber::PetscInt) end\n\n@for_petsc function PetscViewerDrawBaseSet(petsclib::$UnionPetscLib, viewer::PetscViewer, windownumber::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerDrawBaseSet, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, windownumber,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawResize(petsclib::PetscLibType,v::PetscViewer, w::Cint, h::Cint) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawResize\"))\n\"\"\"\nfunction PetscViewerDrawResize(petsclib::PetscLibType, v::PetscViewer, w::Cint, h::Cint) end\n\n@for_petsc function PetscViewerDrawResize(petsclib::$UnionPetscLib, v::PetscViewer, w::Cint, h::Cint )\n\n    @chk ccall(\n               (:PetscViewerDrawResize, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Cint, Cint),\n               v, w, h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawSetInfo(petsclib::PetscLibType,v::PetscViewer, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawSetInfo\"))\n\"\"\"\nfunction PetscViewerDrawSetInfo(petsclib::PetscLibType, v::PetscViewer, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint) end\n\n@for_petsc function PetscViewerDrawSetInfo(petsclib::$UnionPetscLib, v::PetscViewer, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint )\n\n    @chk ccall(\n               (:PetscViewerDrawSetInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint),\n               v, display, title, x, y, w, h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawSetTitle(petsclib::PetscLibType,v::PetscViewer, title::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawSetTitle\"))\n\"\"\"\nfunction PetscViewerDrawSetTitle(petsclib::PetscLibType, v::PetscViewer, title::String) end\n\n@for_petsc function PetscViewerDrawSetTitle(petsclib::$UnionPetscLib, v::PetscViewer, title::String )\n\n    @chk ccall(\n               (:PetscViewerDrawSetTitle, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               v, title,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawGetTitle(petsclib::PetscLibType,v::PetscViewer, title::String) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetTitle\"))\n\"\"\"\nfunction PetscViewerDrawGetTitle(petsclib::PetscLibType, v::PetscViewer, title::String) end\n\n@for_petsc function PetscViewerDrawGetTitle(petsclib::$UnionPetscLib, v::PetscViewer, title::String )\n\ttitle_ = Ref(pointer(title))\n\n    @chk ccall(\n               (:PetscViewerDrawGetTitle, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               v, title_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawOpen(petsclib::PetscLibType,comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint, viewer::PetscViewer) \nOpens a `PetscDraw` window for use as a `PetscViewer` with type\n`PETSCVIEWERDRAW`.\n\nCollective\n\nInput Parameters:\n- `comm`    - communicator that will share window\n- `display` - the X display on which to open, or `NULL` for the local machine\n- `title`   - the title to put in the title bar, or `NULL` for no title\n- `x`       - horizontal screen coordinate of the upper left corner of window, or use `PETSC_DECIDE`\n- `y`       - vertical screen coordinate of the upper left corner of window, or use `PETSC_DECIDE`\n- `w`       - window width in pixels, or may use `PETSC_DECIDE` or `PETSC_DRAW_FULL_SIZE`, `PETSC_DRAW_HALF_SIZE`,`PETSC_DRAW_THIRD_SIZE`, `PETSC_DRAW_QUARTER_SIZE`\n- `h`       - window height in pixels, or may use `PETSC_DECIDE` or `PETSC_DRAW_FULL_SIZE`, `PETSC_DRAW_HALF_SIZE`,`PETSC_DRAW_THIRD_SIZE`, `PETSC_DRAW_QUARTER_SIZE`\n\nOutput Parameter:\n- `viewer` - the `PetscViewer`\n\nOptions Database Keys:\n- `-draw_type`          - use x or null\n- `-nox`                - Disables all x-windows output\n- `-display <name>`     - Specifies name of machine for the X display\n- `-geometry <x,y,w,h>` - allows setting the window location and size\n- `-draw_pause <pause>` - Sets time (in seconds) that the\nprogram pauses after `PetscDrawPause()` has been called\n(0 is default, -1 implies until user input).\n\nLevel: beginner\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscDrawCreate()`, `PetscViewerDestroy()`, `PetscViewerDrawGetDraw()`, `PetscViewerCreate()`, `PETSC_VIEWER_DRAW_`,\n`PETSC_VIEWER_DRAW_WORLD`, `PETSC_VIEWER_DRAW_SELF`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawOpen\"))\n\"\"\"\nfunction PetscViewerDrawOpen(petsclib::PetscLibType, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerDrawOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerDrawOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, Ptr{PetscViewer}),\n               comm, display, title, x, y, w, h, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawClear(petsclib::PetscLibType,viewer::PetscViewer) \nClears a `PetscDraw` graphic associated with a `PetscViewer`.\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawOpen()`, `PetscViewerDrawGetDraw()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawClear\"))\n\"\"\"\nfunction PetscViewerDrawClear(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerDrawClear(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerDrawClear, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpause::PetscReal = PetscViewerDrawGetPause(petsclib::PetscLibType,viewer::PetscViewer) \nGets the pause value (how long to pause before an image is changed)  in the `PETSCVIEWERDRAW` `PetscViewer`\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nOutput Parameter:\n- `pause` - the pause value\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawOpen()`, `PetscViewerDrawGetDraw()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetPause\"))\n\"\"\"\nfunction PetscViewerDrawGetPause(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerDrawGetPause(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tpause_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscViewerDrawGetPause, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscReal}),\n               viewer, pause_,\n              )\n\n\tpause = pause_[]\n\n\treturn pause\nend \n\n\"\"\"\n\tPetscViewerDrawSetPause(petsclib::PetscLibType,viewer::PetscViewer, pause::PetscReal) \nSets a pause for each `PetscDraw` in the `PETSCVIEWERDRAW` `PetscViewer`\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`\n- `pause`  - the pause value\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawOpen()`, `PetscViewerDrawGetDraw()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawSetPause\"))\n\"\"\"\nfunction PetscViewerDrawSetPause(petsclib::PetscLibType, viewer::PetscViewer, pause::PetscReal) end\n\n@for_petsc function PetscViewerDrawSetPause(petsclib::$UnionPetscLib, viewer::PetscViewer, pause::$PetscReal )\n\n    @chk ccall(\n               (:PetscViewerDrawSetPause, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscReal),\n               viewer, pause,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawSetHold(petsclib::PetscLibType,viewer::PetscViewer, hold::PetscBool) \nHolds previous image when drawing new image in a `PETSCVIEWERDRAW`\n\nNot Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer`\n- `hold`   - `PETSC_TRUE` indicates to hold the previous image\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawOpen()`, `PetscViewerDrawGetDraw()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawSetHold\"))\n\"\"\"\nfunction PetscViewerDrawSetHold(petsclib::PetscLibType, viewer::PetscViewer, hold::PetscBool) end\n\n@for_petsc function PetscViewerDrawSetHold(petsclib::$UnionPetscLib, viewer::PetscViewer, hold::PetscBool )\n\n    @chk ccall(\n               (:PetscViewerDrawSetHold, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool),\n               viewer, hold,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thold::PetscBool = PetscViewerDrawGetHold(petsclib::PetscLibType,viewer::PetscViewer) \nChecks if the `PETSCVIEWERDRAW` `PetscViewer` holds previous image when drawing new image\n\nNot Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nOutput Parameter:\n- `hold` - indicates to hold or not\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawOpen()`, `PetscViewerDrawGetDraw()`,\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetHold\"))\n\"\"\"\nfunction PetscViewerDrawGetHold(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerDrawGetHold(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\thold_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerDrawGetHold, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscBool}),\n               viewer, hold_,\n              )\n\n\thold = hold_[]\n\n\treturn hold\nend \n\n\"\"\"\n\tPetscViewerDrawSetBounds(petsclib::PetscLibType,viewer::PetscViewer, nbounds::PetscInt, bounds::PetscReal) \nsets the upper and lower bounds to be used in plotting in a `PETSCVIEWERDRAW` `PetscViewer`\n\nCollective\n\nInput Parameters:\n- `viewer`  - the `PetscViewer` (created with `PetscViewerDrawOpen()`)\n- `nbounds` - number of plots that can be made with this viewer, for example the dof passed to `DMDACreate()`\n- `bounds`  - the actual bounds, the size of this is 2*`nbounds`, the values are stored in the order min F_0, max F_0, min F_1, max F_1, .....\n\nOptions Database Key:\n- `-draw_bounds  minF0,maxF0,minF1,maxF1` - the lower left and upper right bounds\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawGetLG()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawSetBounds\"))\n\"\"\"\nfunction PetscViewerDrawSetBounds(petsclib::PetscLibType, viewer::PetscViewer, nbounds::PetscInt, bounds::PetscReal) end\n\n@for_petsc function PetscViewerDrawSetBounds(petsclib::$UnionPetscLib, viewer::PetscViewer, nbounds::$PetscInt, bounds::$PetscReal )\n\n    @chk ccall(\n               (:PetscViewerDrawSetBounds, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt, Ptr{$PetscReal}),\n               viewer, nbounds, bounds,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnbounds::PetscInt,bounds::Vector{PetscReal} = PetscViewerDrawGetBounds(petsclib::PetscLibType,viewer::PetscViewer) \ngets the upper and lower bounds to be used in plotting set with `PetscViewerDrawSetBounds()`\n\nCollective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` (created with `PetscViewerDrawOpen()`)\n\nOutput Parameters:\n- `nbounds` - number of plots that can be made with this viewer, for example the dof passed to `DMDACreate()`\n- `bounds`  - the actual bounds, the size of this is 2*`nbounds`, the values are stored in the order min F_0, max F_0, min F_1, max F_1, .....\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawGetLG()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`, `PetscViewerDrawSetBounds()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetBounds\"))\n\"\"\"\nfunction PetscViewerDrawGetBounds(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerDrawGetBounds(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\tnbounds_ = Ref{$PetscInt}()\n\tbounds_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:PetscViewerDrawGetBounds, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}),\n               viewer, nbounds_, bounds_,\n              )\n\n\tnbounds = nbounds_[]\n\tbounds = unsafe_wrap(Array, bounds_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nbounds,bounds\nend \n\n\"\"\"\n\tPetscViewerMonitorLGSetUp(petsclib::PetscLibType,viewer::PetscViewer, host::String, title::String, metric::String, l::PetscInt, names::String, x::Cint, y::Cint, m::Cint, n::Cint) \nsets up a viewer to be used by line graph monitoring routines such as `KSPMonitorResidualDrawLG()`\n\nCollective\n\nInput Parameters:\n- `viewer` - the viewer in which to display the line graphs, it not a `PETSCVIEWERDRAW` it will set to that `PetscViewerType`\n- `host`   - the host to open the window on, 'NULL' indicates the local host\n- `title`  - the title at the top of the window\n- `metric` - the label above the graph\n- `l`      - the number of curves\n- `names`  - the names of each curve to be used in displaying the legend. May be 'NULL'\n- `x`      - horizontal screen coordinate of the upper left corner of window, or use `PETSC_DECIDE`\n- `y`      - vertical screen coordinate of the upper left corner of window, or use `PETSC_DECIDE`\n- `m`      - window width in pixels, or may use `PETSC_DECIDE` or `PETSC_DRAW_FULL_SIZE`, `PETSC_DRAW_HALF_SIZE`,`PETSC_DRAW_THIRD_SIZE`, `PETSC_DRAW_QUARTER_SIZE`\n- `n`      - window height in pixels, or may use `PETSC_DECIDE` or `PETSC_DRAW_FULL_SIZE`, `PETSC_DRAW_HALF_SIZE`,`PETSC_DRAW_THIRD_SIZE`, `PETSC_DRAW_QUARTER_SIZE`\n\nLevel: developer\n\n-seealso: `PetscViewer()`, `PETSCVIEWERDRAW`, `PetscViewerDrawGetDrawLG()`, `PetscViewerDrawOpen()`, `PetscViewerDrawSetInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerMonitorLGSetUp\"))\n\"\"\"\nfunction PetscViewerMonitorLGSetUp(petsclib::PetscLibType, viewer::PetscViewer, host::String, title::String, metric::String, l::PetscInt, names::String, x::Cint, y::Cint, m::Cint, n::Cint) end\n\n@for_petsc function PetscViewerMonitorLGSetUp(petsclib::$UnionPetscLib, viewer::PetscViewer, host::String, title::String, metric::String, l::$PetscInt, names::String, x::Cint, y::Cint, m::Cint, n::Cint )\n\tnames_ = Ref(pointer(names))\n\n    @chk ccall(\n               (:PetscViewerMonitorLGSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, $PetscInt, Ptr{Ptr{Cchar}}, Cint, Cint, Cint, Cint),\n               viewer, host, title, metric, l, names_, x, y, m, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawGetDraw(petsclib::PetscLibType,viewer::PetscViewer, windownumber::PetscInt, draw::PetscDraw) \nReturns `PetscDraw` object from `PETSCVIEWERDRAW` `PetscViewer` object.\nThis `PetscDraw` object may then be used to perform graphics using `PetscDraw` commands.\n\nCollective\n\nInput Parameters:\n- `viewer`       - the `PetscViewer` (created with `PetscViewerDrawOpen()` of type `PETSCVIEWERDRAW`)\n- `windownumber` - indicates which subwindow (usually 0) to obtain\n\nOutput Parameter:\n- `draw` - the draw object\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawGetLG()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetDraw\"))\n\"\"\"\nfunction PetscViewerDrawGetDraw(petsclib::PetscLibType, viewer::PetscViewer, windownumber::PetscInt, draw::PetscDraw) end\n\n@for_petsc function PetscViewerDrawGetDraw(petsclib::$UnionPetscLib, viewer::PetscViewer, windownumber::$PetscInt, draw::PetscDraw )\n\n    @chk ccall(\n               (:PetscViewerDrawGetDraw, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt, Ptr{PetscDraw}),\n               viewer, windownumber, draw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawGetDrawLG(petsclib::PetscLibType,viewer::PetscViewer, windownumber::PetscInt, drawlg::PetscDrawLG) \nReturns a `PetscDrawLG` object from `PetscViewer` object of type `PETSCVIEWERDRAW`.\nThis `PetscDrawLG` object may then be used to perform graphics using `PetscDrawLG` commands.\n\nCollective\n\nInput Parameters:\n- `viewer`       - the `PetscViewer` (created with `PetscViewerDrawOpen()`)\n- `windownumber` - indicates which subwindow (usually 0)\n\nOutput Parameter:\n- `drawlg` - the draw line graph object\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscDrawLG`, `PetscViewerDrawGetDraw()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetDrawLG\"))\n\"\"\"\nfunction PetscViewerDrawGetDrawLG(petsclib::PetscLibType, viewer::PetscViewer, windownumber::PetscInt, drawlg::PetscDrawLG) end\n\n@for_petsc function PetscViewerDrawGetDrawLG(petsclib::$UnionPetscLib, viewer::PetscViewer, windownumber::$PetscInt, drawlg::PetscDrawLG )\n\n    @chk ccall(\n               (:PetscViewerDrawGetDrawLG, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt, Ptr{PetscDrawLG}),\n               viewer, windownumber, drawlg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawGetDrawAxis(petsclib::PetscLibType,viewer::PetscViewer, windownumber::PetscInt, drawaxis::PetscDrawAxis) \nReturns a `PetscDrawAxis` object from a `PetscViewer` object of type `PETSCVIEWERDRAW`.\nThis `PetscDrawAxis` object may then be used to perform graphics using `PetscDrawAxis` commands.\n\nCollective\n\nInput Parameters:\n- `viewer`       - the `PetscViewer` (created with `PetscViewerDrawOpen()`)\n- `windownumber` - indicates which subwindow (usually 0)\n\nOutput Parameter:\n- `drawaxis` - the draw axis object\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewerDrawGetDraw()`, `PetscViewerDrawGetLG()`, `PetscViewerDrawOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetDrawAxis\"))\n\"\"\"\nfunction PetscViewerDrawGetDrawAxis(petsclib::PetscLibType, viewer::PetscViewer, windownumber::PetscInt, drawaxis::PetscDrawAxis) end\n\n@for_petsc function PetscViewerDrawGetDrawAxis(petsclib::$UnionPetscLib, viewer::PetscViewer, windownumber::$PetscInt, drawaxis::PetscDrawAxis )\n\n    @chk ccall(\n               (:PetscViewerDrawGetDrawAxis, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt, Ptr{PetscDrawAxis}),\n               viewer, windownumber, drawaxis,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerDrawSetDrawType(petsclib::PetscLibType,v::PetscViewer, drawtype::PetscDrawType) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawSetDrawType\"))\n\"\"\"\nfunction PetscViewerDrawSetDrawType(petsclib::PetscLibType, v::PetscViewer, drawtype::PetscDrawType) end\n\n@for_petsc function PetscViewerDrawSetDrawType(petsclib::$UnionPetscLib, v::PetscViewer, drawtype::PetscDrawType )\n\n    @chk ccall(\n               (:PetscViewerDrawSetDrawType, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscDrawType),\n               v, drawtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdrawtype::PetscDrawType = PetscViewerDrawGetDrawType(petsclib::PetscLibType,v::PetscViewer) \n\n# External Links\n$(_doc_external(\"Sys/PetscViewerDrawGetDrawType\"))\n\"\"\"\nfunction PetscViewerDrawGetDrawType(petsclib::PetscLibType, v::PetscViewer) end\n\n@for_petsc function PetscViewerDrawGetDrawType(petsclib::$UnionPetscLib, v::PetscViewer )\n\tdrawtype_ = Ref{PetscDrawType}()\n\n    @chk ccall(\n               (:PetscViewerDrawGetDrawType, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscDrawType}),\n               v, drawtype_,\n              )\n\n\tdrawtype = unsafe_string(drawtype_[])\n\n\treturn drawtype\nend \n\n\"\"\"\n\tPetscViewerADIOSOpen(petsclib::PetscLibType,comm::MPI_Comm, name::String, type::PetscFileMode, adiosv::PetscViewer) \nOpens a file for ADIOS input/output.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `name` - name of file\n- `type` - type of file\n-seealso: `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`, `PetscViewerHDF5Open()`,\n`VecView()`, `MatView()`, `VecLoad()`, `PetscViewerSetType()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetName()`\n`MatLoad()`, `PetscFileMode`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerADIOSOpen\"))\n\"\"\"\nfunction PetscViewerADIOSOpen(petsclib::PetscLibType, comm::MPI_Comm, name::String, type::PetscFileMode, adiosv::PetscViewer) end\n\n@for_petsc function PetscViewerADIOSOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, type::PetscFileMode, adiosv::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerADIOSOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscFileMode, Ptr{PetscViewer}),\n               comm, name, type, adiosv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5Load(petsclib::PetscLibType,viewer::PetscViewer, name::String, map::PetscLayout, datatype::hid_t, newarr::Cvoid) \nRead a raw array from the `PETSCVIEWERHDF5` dataset in parallel\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer`   - The `PETSCVIEWERHDF5` viewer\n- `name`     - The dataset name\n- `datatype` - The HDF5 datatype of the items in the dataset\n\nInput/Output Parameter:\n- `map` - The layout which specifies array partitioning, on output the\nset up layout (with global size and blocksize according to dataset)\n\nOutput Parameter:\n- `newarr` - The partitioned array, a memory image of the given dataset\n\nLevel: developer\n\n-seealso: `PetscViewer`, `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5OpenGroup()`, `PetscViewerHDF5ReadSizes()`,\n`VecLoad()`, `ISLoad()`, `PetscLayout`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5Load\"))\n\"\"\"\nfunction PetscViewerHDF5Load(petsclib::PetscLibType, viewer::PetscViewer, name::String, map::PetscLayout, datatype::hid_t, newarr::Cvoid) end\n\n@for_petsc function PetscViewerHDF5Load(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String, map::PetscLayout, datatype::hid_t, newarr::Cvoid )\n\n    @chk ccall(\n               (:PetscViewerHDF5Load, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, PetscLayout, hid_t, Cvoid),\n               viewer, name, map, datatype, newarr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt,N::PetscInt = PetscViewerHDF5ReadSizes(petsclib::PetscLibType,viewer::PetscViewer, name::String) \nRead block size and global size of a `Vec` or `IS` stored in an HDF5 file.\n\nInput Parameters:\n- `viewer` - The `PETSCVIEWERHDF5` viewer\n- `name`   - The dataset name\n\nOutput Parameters:\n- `bs` - block size\n- `N`  - global size\n\nLevel: advanced\n\n-seealso: `PetscViewer`, `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `VecLoad()`, `ISLoad()`, `VecGetSize()`, `ISGetSize()`, `PetscViewerHDF5SetBaseDimension2()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerHDF5ReadSizes\"))\n\"\"\"\nfunction PetscViewerHDF5ReadSizes(petsclib::PetscLibType, viewer::PetscViewer, name::String) end\n\n@for_petsc function PetscViewerHDF5ReadSizes(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String )\n\tbs_ = Ref{$PetscInt}()\n\tN_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscViewerHDF5ReadSizes, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               viewer, name, bs_, N_,\n              )\n\n\tbs = bs_[]\n\tN = N_[]\n\n\treturn bs,N\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetId(petsclib::PetscLibType,viewer::PetscViewer, exoid::Cint) \nGet the file id of the `PETSCVIEWEREXODUSII` file\n\nLogically Collective\n\nInput Parameter:\n- `viewer` - the `PetscViewer`\n\nOutput Parameter:\n- `exoid` - The ExodusII file id\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetId\"))\n\"\"\"\nfunction PetscViewerExodusIIGetId(petsclib::PetscLibType, viewer::PetscViewer, exoid::Cint) end\n\n@for_petsc function PetscViewerExodusIIGetId(petsclib::$UnionPetscLib, viewer::PetscViewer, exoid::Cint )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetId, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cint}),\n               viewer, exoid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIISetOrder(petsclib::PetscLibType,viewer::PetscViewer, order::PetscInt) \nSet the elements order in the ExodusII file.\n\nCollective\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWEREXODUSII` viewer\n- `order`  - elements order\n\nOutput Parameter:\n\nLevel: beginner\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerExodusIIGetId()`, `PetscViewerExodusIIGetOrder()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIISetOrder\"))\n\"\"\"\nfunction PetscViewerExodusIISetOrder(petsclib::PetscLibType, viewer::PetscViewer, order::PetscInt) end\n\n@for_petsc function PetscViewerExodusIISetOrder(petsclib::$UnionPetscLib, viewer::PetscViewer, order::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerExodusIISetOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, $PetscInt),\n               viewer, order,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetOrder(petsclib::PetscLibType,viewer::PetscViewer, order::PetscInt) \nGet the elements order in the ExodusII file.\n\nCollective\n\nInput Parameters:\n- `viewer` - the `PETSCVIEWEREXODUSII` viewer\n- `order`  - elements order\n\nOutput Parameter:\n\nLevel: beginner\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerExodusIIGetId()`, `PetscViewerExodusIISetOrder()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetOrder\"))\n\"\"\"\nfunction PetscViewerExodusIIGetOrder(petsclib::PetscLibType, viewer::PetscViewer, order::PetscInt) end\n\n@for_petsc function PetscViewerExodusIIGetOrder(petsclib::$UnionPetscLib, viewer::PetscViewer, order::$PetscInt )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetOrder, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{$PetscInt}),\n               viewer, order,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIOpen(petsclib::PetscLibType,comm::MPI_Comm, name::String, type::PetscFileMode, exo::PetscViewer) \nOpens a file for ExodusII input/output.\n\nCollective\n\nInput Parameters:\n- `comm` - MPI communicator\n- `name` - name of file\n- `type` - type of file\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`,\n`DMLoad()`, `PetscFileMode`, `PetscViewerSetType()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetName()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIOpen\"))\n\"\"\"\nfunction PetscViewerExodusIIOpen(petsclib::PetscLibType, comm::MPI_Comm, name::String, type::PetscFileMode, exo::PetscViewer) end\n\n@for_petsc function PetscViewerExodusIIOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::String, type::PetscFileMode, exo::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerExodusIIOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, PetscFileMode, Ptr{PetscViewer}),\n               comm, name, type, exo,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5SetDMPlexStorageVersionWriting(petsclib::PetscLibType,viewer::PetscViewer, version::DMPlexStorageVersion) \nSet the storage version for writing\n\nLogically collective\n\nInput Parameters:\n- `viewer`  - The `PetscViewer`\n- `version` - The storage format version\n\nLevel: advanced\n\nNote:\nThe version has major, minor, and subminor integers. Parallel operations are only available for version 3.0.0.\n\nSee also: \n=== \n`DM`, `PetscViewerHDF5GetDMPlexStorageVersionWriting()`, `PetscViewerHDF5GetDMPlexStorageVersionReading()`, `PetscViewerHDF5SetDMPlexStorageVersionReading()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerHDF5SetDMPlexStorageVersionWriting\"))\n\"\"\"\nfunction PetscViewerHDF5SetDMPlexStorageVersionWriting(petsclib::PetscLibType, viewer::PetscViewer, version::DMPlexStorageVersion) end\n\n@for_petsc function PetscViewerHDF5SetDMPlexStorageVersionWriting(petsclib::$UnionPetscLib, viewer::PetscViewer, version::DMPlexStorageVersion )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetDMPlexStorageVersionWriting, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, DMPlexStorageVersion),\n               viewer, version,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5GetDMPlexStorageVersionWriting(petsclib::PetscLibType,viewer::PetscViewer, version::DMPlexStorageVersion) \nGet the storage version for writing\n\nLogically collective\n\nInput Parameter:\n- `viewer` - The `PetscViewer`\n\nOutput Parameter:\n- `version` - The storage format version\n\nOptions Database Keys:\n- `-dm_plex_view_hdf5_storage_version <num>` - Overrides the storage format version\n\nLevel: advanced\n\nNote:\nThe version has major, minor, and subminor integers. Parallel operations are only available for version 3.0.0.\n\nSee also: \n=== \n`DM`, `PetscViewerHDF5SetDMPlexStorageVersionWriting()`, `PetscViewerHDF5GetDMPlexStorageVersionReading()`, `PetscViewerHDF5SetDMPlexStorageVersionReading()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerHDF5GetDMPlexStorageVersionWriting\"))\n\"\"\"\nfunction PetscViewerHDF5GetDMPlexStorageVersionWriting(petsclib::PetscLibType, viewer::PetscViewer, version::DMPlexStorageVersion) end\n\n@for_petsc function PetscViewerHDF5GetDMPlexStorageVersionWriting(petsclib::$UnionPetscLib, viewer::PetscViewer, version::DMPlexStorageVersion )\n\n    @chk ccall(\n               (:PetscViewerHDF5GetDMPlexStorageVersionWriting, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{DMPlexStorageVersion}),\n               viewer, version,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5SetDMPlexStorageVersionReading(petsclib::PetscLibType,viewer::PetscViewer, version::DMPlexStorageVersion) \nSet the storage version for reading\n\nLogically collective\n\nInput Parameters:\n- `viewer`  - The `PetscViewer`\n- `version` - The storage format version\n\nLevel: advanced\n\nNote:\nThe version has major, minor, and subminor integers. Parallel operations are only available for version 3.0.0.\n\nSee also: \n=== \n`DM`, `PetscViewerHDF5GetDMPlexStorageVersionReading()`, `PetscViewerHDF5GetDMPlexStorageVersionWriting()`, `PetscViewerHDF5SetDMPlexStorageVersionWriting()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerHDF5SetDMPlexStorageVersionReading\"))\n\"\"\"\nfunction PetscViewerHDF5SetDMPlexStorageVersionReading(petsclib::PetscLibType, viewer::PetscViewer, version::DMPlexStorageVersion) end\n\n@for_petsc function PetscViewerHDF5SetDMPlexStorageVersionReading(petsclib::$UnionPetscLib, viewer::PetscViewer, version::DMPlexStorageVersion )\n\n    @chk ccall(\n               (:PetscViewerHDF5SetDMPlexStorageVersionReading, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, DMPlexStorageVersion),\n               viewer, version,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerHDF5GetDMPlexStorageVersionReading(petsclib::PetscLibType,viewer::PetscViewer, version::DMPlexStorageVersion) \nGet the storage version for reading\n\nLogically collective\n\nInput Parameter:\n- `viewer` - The `PetscViewer`\n\nOutput Parameter:\n- `version` - The storage format version\n\nOptions Database Keys:\n- `-dm_plex_view_hdf5_storage_version <num>` - Overrides the storage format version\n\nLevel: advanced\n\nNote:\nThe version has major, minor, and subminor integers. Parallel operations are only available for version 3.0.0.\n\nSee also: \n=== \n`DM`, `PetscViewerHDF5SetDMPlexStorageVersionReading()`, `PetscViewerHDF5GetDMPlexStorageVersionWriting()`, `PetscViewerHDF5SetDMPlexStorageVersionWriting()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerHDF5GetDMPlexStorageVersionReading\"))\n\"\"\"\nfunction PetscViewerHDF5GetDMPlexStorageVersionReading(petsclib::PetscLibType, viewer::PetscViewer, version::DMPlexStorageVersion) end\n\n@for_petsc function PetscViewerHDF5GetDMPlexStorageVersionReading(petsclib::$UnionPetscLib, viewer::PetscViewer, version::DMPlexStorageVersion )\n\n    @chk ccall(\n               (:PetscViewerHDF5GetDMPlexStorageVersionReading, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{DMPlexStorageVersion}),\n               viewer, version,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIISetZonalVariable(petsclib::PetscLibType,viewer::PetscViewer, num::PetscExodusIIInt) \nSets the number of zonal variables in an ExodusII file\n\nCollective;\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `num`    - the number of zonal variables in the ExodusII file\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIGetZonalVariable()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIISetZonalVariable\"))\n\"\"\"\nfunction PetscViewerExodusIISetZonalVariable(petsclib::PetscLibType, viewer::PetscViewer, num::PetscExodusIIInt) end\n\n@for_petsc function PetscViewerExodusIISetZonalVariable(petsclib::$UnionPetscLib, viewer::PetscViewer, num::PetscExodusIIInt )\n\n    @chk ccall(\n               (:PetscViewerExodusIISetZonalVariable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscExodusIIInt),\n               viewer, num,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIISetNodalVariable(petsclib::PetscLibType,viewer::PetscViewer, num::PetscExodusIIInt) \nSets the number of nodal variables in an ExodusII file\n\nCollective;\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `num`    - the number of nodal variables in the ExodusII file\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIGetNodalVariable()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIISetNodalVariable\"))\n\"\"\"\nfunction PetscViewerExodusIISetNodalVariable(petsclib::PetscLibType, viewer::PetscViewer, num::PetscExodusIIInt) end\n\n@for_petsc function PetscViewerExodusIISetNodalVariable(petsclib::$UnionPetscLib, viewer::PetscViewer, num::PetscExodusIIInt )\n\n    @chk ccall(\n               (:PetscViewerExodusIISetNodalVariable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscExodusIIInt),\n               viewer, num,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetZonalVariable(petsclib::PetscLibType,viewer::PetscViewer, num::PetscExodusIIInt) \nGets the number of zonal variables in an ExodusII file\n\nCollective\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n\nOutput Parameter:\n- `num` - the number variables in the ExodusII file\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIsetZonalVariable()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetZonalVariable\"))\n\"\"\"\nfunction PetscViewerExodusIIGetZonalVariable(petsclib::PetscLibType, viewer::PetscViewer, num::PetscExodusIIInt) end\n\n@for_petsc function PetscViewerExodusIIGetZonalVariable(petsclib::$UnionPetscLib, viewer::PetscViewer, num::PetscExodusIIInt )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetZonalVariable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscExodusIIInt}),\n               viewer, num,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetNodalVariable(petsclib::PetscLibType,viewer::PetscViewer, num::PetscExodusIIInt) \nGets the number of nodal variables in an ExodusII file\n\nCollective\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n\nOutput Parameter:\n- `num` - the number variables in the ExodusII file\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIISetNodalVariable()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetNodalVariable\"))\n\"\"\"\nfunction PetscViewerExodusIIGetNodalVariable(petsclib::PetscLibType, viewer::PetscViewer, num::PetscExodusIIInt) end\n\n@for_petsc function PetscViewerExodusIIGetNodalVariable(petsclib::$UnionPetscLib, viewer::PetscViewer, num::PetscExodusIIInt )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetNodalVariable, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscExodusIIInt}),\n               viewer, num,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIISetZonalVariableName(petsclib::PetscLibType,viewer::PetscViewer, idx::PetscExodusIIInt, name::String) \nSets the name of a zonal variable.\n\nCollective;\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `idx`    - the index for which you want to save the name\n- `name`   - string containing the name characters\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIGetZonalVariableName()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIISetZonalVariableName\"))\n\"\"\"\nfunction PetscViewerExodusIISetZonalVariableName(petsclib::PetscLibType, viewer::PetscViewer, idx::PetscExodusIIInt, name::String) end\n\n@for_petsc function PetscViewerExodusIISetZonalVariableName(petsclib::$UnionPetscLib, viewer::PetscViewer, idx::PetscExodusIIInt, name::String )\n\n    @chk ccall(\n               (:PetscViewerExodusIISetZonalVariableName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscExodusIIInt, Ptr{Cchar}),\n               viewer, idx, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIISetNodalVariableName(petsclib::PetscLibType,viewer::PetscViewer, idx::PetscExodusIIInt, name::String) \nSets the name of a nodal variable.\n\nCollective;\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `idx`    - the index for which you want to save the name\n- `name`   - string containing the name characters\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIGetNodalVariableName()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIISetNodalVariableName\"))\n\"\"\"\nfunction PetscViewerExodusIISetNodalVariableName(petsclib::PetscLibType, viewer::PetscViewer, idx::PetscExodusIIInt, name::String) end\n\n@for_petsc function PetscViewerExodusIISetNodalVariableName(petsclib::$UnionPetscLib, viewer::PetscViewer, idx::PetscExodusIIInt, name::String )\n\n    @chk ccall(\n               (:PetscViewerExodusIISetNodalVariableName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscExodusIIInt, Ptr{Cchar}),\n               viewer, idx, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetZonalVariableName(petsclib::PetscLibType,viewer::PetscViewer, idx::PetscExodusIIInt, name::String) \nGets the name of a zonal variable.\n\nCollective;\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `idx`    - the index for which you want to get the name\n\nOutput Parameter:\n- `name` - pointer to the string containing the name characters\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIISetZonalVariableName()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetZonalVariableName\"))\n\"\"\"\nfunction PetscViewerExodusIIGetZonalVariableName(petsclib::PetscLibType, viewer::PetscViewer, idx::PetscExodusIIInt, name::String) end\n\n@for_petsc function PetscViewerExodusIIGetZonalVariableName(petsclib::$UnionPetscLib, viewer::PetscViewer, idx::PetscExodusIIInt, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetZonalVariableName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscExodusIIInt, Ptr{Ptr{Cchar}}),\n               viewer, idx, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetNodalVariableName(petsclib::PetscLibType,viewer::PetscViewer, idx::PetscExodusIIInt, name::String) \nGets the name of a nodal variable.\n\nCollective;\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `idx`    - the index for which you want to save the name\n\nOutput Parameter:\n- `name` - string array containing name characters\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIISetNodalVariableName()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetNodalVariableName\"))\n\"\"\"\nfunction PetscViewerExodusIIGetNodalVariableName(petsclib::PetscLibType, viewer::PetscViewer, idx::PetscExodusIIInt, name::String) end\n\n@for_petsc function PetscViewerExodusIIGetNodalVariableName(petsclib::$UnionPetscLib, viewer::PetscViewer, idx::PetscExodusIIInt, name::String )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetNodalVariableName, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscExodusIIInt, Ptr{Ptr{Cchar}}),\n               viewer, idx, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIISetZonalVariableNames(petsclib::PetscLibType,viewer::PetscViewer, names::String) \nSets the names of all nodal variables\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `names`  - an array of string names to be set, the strings are copied into the `PetscViewer`\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIGetZonalVariableNames()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIISetZonalVariableNames\"))\n\"\"\"\nfunction PetscViewerExodusIISetZonalVariableNames(petsclib::PetscLibType, viewer::PetscViewer, names::String) end\n\n@for_petsc function PetscViewerExodusIISetZonalVariableNames(petsclib::$UnionPetscLib, viewer::PetscViewer, names::String )\n\tnames_ = Ref(pointer(names))\n\n    @chk ccall(\n               (:PetscViewerExodusIISetZonalVariableNames, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               viewer, names_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIISetNodalVariableNames(petsclib::PetscLibType,viewer::PetscViewer, names::String) \nSets the names of all nodal variables.\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `names`  - an array of string names to be set, the strings are copied into the `PetscViewer`\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIGetNodalVariableNames()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIISetNodalVariableNames\"))\n\"\"\"\nfunction PetscViewerExodusIISetNodalVariableNames(petsclib::PetscLibType, viewer::PetscViewer, names::String) end\n\n@for_petsc function PetscViewerExodusIISetNodalVariableNames(petsclib::$UnionPetscLib, viewer::PetscViewer, names::String )\n\tnames_ = Ref(pointer(names))\n\n    @chk ccall(\n               (:PetscViewerExodusIISetNodalVariableNames, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}),\n               viewer, names_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetZonalVariableNames(petsclib::PetscLibType,viewer::PetscViewer, numVars::PetscExodusIIInt, varNames::String) \nGets the names of all zonal variables.\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer`  - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `numVars` - the number of zonal variable names to retrieve\n\nOutput Parameter:\n- `varNames` - returns an array of char pointers where the zonal variable names are\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIISetZonalVariableNames()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetZonalVariableNames\"))\n\"\"\"\nfunction PetscViewerExodusIIGetZonalVariableNames(petsclib::PetscLibType, viewer::PetscViewer, numVars::PetscExodusIIInt, varNames::String) end\n\n@for_petsc function PetscViewerExodusIIGetZonalVariableNames(petsclib::$UnionPetscLib, viewer::PetscViewer, numVars::PetscExodusIIInt, varNames::String )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetZonalVariableNames, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscExodusIIInt}, Ptr{Cchar}),\n               viewer, numVars, varNames,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetNodalVariableNames(petsclib::PetscLibType,viewer::PetscViewer, numVars::PetscExodusIIInt, varNames::String) \nGets the names of all nodal variables.\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `viewer`  - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `numVars` - the number of nodal variable names to retrieve\n\nOutput Parameter:\n- `varNames` - returns an array of char pointers where the nodal variable names are\n\nLevel: intermediate\n\n-seealso: `PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIISetNodalVariableNames()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetNodalVariableNames\"))\n\"\"\"\nfunction PetscViewerExodusIIGetNodalVariableNames(petsclib::PetscLibType, viewer::PetscViewer, numVars::PetscExodusIIInt, varNames::String) end\n\n@for_petsc function PetscViewerExodusIIGetNodalVariableNames(petsclib::$UnionPetscLib, viewer::PetscViewer, numVars::PetscExodusIIInt, varNames::String )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetNodalVariableNames, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{PetscExodusIIInt}, Ptr{Cchar}),\n               viewer, numVars, varNames,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetNodalVariableIndex(petsclib::PetscLibType,viewer::PetscViewer, name::String, varIndex::PetscExodusIIInt) \nreturn the location of a nodal variable in an ExodusII file given its name\n\nCollective\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `name`   - the name of the result\n\nOutput Parameter:\n- `varIndex` - the location of the variable in the exodus file or -1 if the variable is not found\n\nLevel: beginner\n\n-seealso: `PetscViewerExodusIISetNodalVariable()`, `PetscViewerExodusIIGetNodalVariable()`, `PetscViewerExodusIISetNodalVariableName()`, `PetscViewerExodusIISetNodalVariableNames()`, `PetscViewerExodusIIGetNodalVariableName()`, `PetscViewerExodusIIGetNodalVariableNames()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetNodalVariableIndex\"))\n\"\"\"\nfunction PetscViewerExodusIIGetNodalVariableIndex(petsclib::PetscLibType, viewer::PetscViewer, name::String, varIndex::PetscExodusIIInt) end\n\n@for_petsc function PetscViewerExodusIIGetNodalVariableIndex(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String, varIndex::PetscExodusIIInt )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetNodalVariableIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{PetscExodusIIInt}),\n               viewer, name, varIndex,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerExodusIIGetZonalVariableIndex(petsclib::PetscLibType,viewer::PetscViewer, name::String, varIndex::Cint) \nreturn the location of a zonal variable in an ExodusII file given its name\n\nCollective\n\nInput Parameters:\n- `viewer` - a `PetscViewer` of type `PETSCVIEWEREXODUSII`\n- `name`   - the name of the result\n\nOutput Parameter:\n- `varIndex` - the location of the variable in the exodus file or -1 if the variable is not found\n\nLevel: beginner\n\n-seealso: `PetscViewerExodusIISetNodalVariable()`, `PetscViewerExodusIIGetNodalVariable()`, `PetscViewerExodusIISetNodalVariableName()`, `PetscViewerExodusIISetNodalVariableNames()`, `PetscViewerExodusIIGetNodalVariableName()`, `PetscViewerExodusIIGetNodalVariableNames()`\n\n# External Links\n$(_doc_external(\"DM/PetscViewerExodusIIGetZonalVariableIndex\"))\n\"\"\"\nfunction PetscViewerExodusIIGetZonalVariableIndex(petsclib::PetscLibType, viewer::PetscViewer, name::String, varIndex::Cint) end\n\n@for_petsc function PetscViewerExodusIIGetZonalVariableIndex(petsclib::$UnionPetscLib, viewer::PetscViewer, name::String, varIndex::Cint )\n\n    @chk ccall(\n               (:PetscViewerExodusIIGetZonalVariableIndex, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Ptr{Cint}),\n               viewer, name, varIndex,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thas::PetscBool = PetscViewerHDF5PathIsRelative(petsclib::PetscLibType,path::String, emptyIsRelative::PetscBool) \n\n# External Links\n$(_doc_external(\"Viewer/PetscViewerHDF5PathIsRelative\"))\n\"\"\"\nfunction PetscViewerHDF5PathIsRelative(petsclib::PetscLibType, path::String, emptyIsRelative::PetscBool) end\n\n@for_petsc function PetscViewerHDF5PathIsRelative(petsclib::$UnionPetscLib, path::String, emptyIsRelative::PetscBool )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscViewerHDF5PathIsRelative, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PetscBool, Ptr{PetscBool}),\n               path, emptyIsRelative, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\tPetscViewerSetType(petsclib::PetscLibType,viewer::PetscViewer, type::PetscViewerType) \nBuilds `PetscViewer` for a particular implementation.\n\nCollective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` context obtained with `PetscViewerCreate()`\n- `type`   - for example, `PETSCVIEWERASCII`\n\nOptions Database Key:\n- `-viewer_type  <type>` - Sets the type; use -help for a list of available methods (for instance, ascii)\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerCreate()`, `PetscViewerGetType()`, `PetscViewerType`, `PetscViewerPushFormat()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerSetType\"))\n\"\"\"\nfunction PetscViewerSetType(petsclib::PetscLibType, viewer::PetscViewer, type::PetscViewerType) end\n\n@for_petsc function PetscViewerSetType(petsclib::$UnionPetscLib, viewer::PetscViewer, type::PetscViewerType )\n\n    @chk ccall(\n               (:PetscViewerSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscViewerType),\n               viewer, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerSetFromOptions(petsclib::PetscLibType,viewer::PetscViewer) \nSets various options for a viewer based on values in the options database.\n\nCollective\n\nInput Parameter:\n- `viewer` - the viewer context\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerType`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerSetFromOptions\"))\n\"\"\"\nfunction PetscViewerSetFromOptions(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerSetFromOptions(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerSetOptionsPrefix(petsclib::PetscLibType,viewer::PetscViewer, prefix::String) \nSets the prefix used for searching for\n`PetscViewer` options in the database during `PetscViewerSetFromOptions()`.\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - the `PetscViewer` context\n- `prefix` - the prefix to prepend to all option names\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerSetFromOptions()`, `PetscViewerAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerSetOptionsPrefix\"))\n\"\"\"\nfunction PetscViewerSetOptionsPrefix(petsclib::PetscLibType, viewer::PetscViewer, prefix::String) end\n\n@for_petsc function PetscViewerSetOptionsPrefix(petsclib::$UnionPetscLib, viewer::PetscViewer, prefix::String )\n\n    @chk ccall(\n               (:PetscViewerSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerSetUp(petsclib::PetscLibType,viewer::PetscViewer) \nSets up the internal viewer data structures for the later use.\n\nCollective\n\nInput Parameter:\n- `viewer` - the `PetscViewer` context\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerSetUp\"))\n\"\"\"\nfunction PetscViewerSetUp(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerSetUp(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerSetUp, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewersDestroy(petsclib::PetscLibType,v::PetscViewers) \nDestroys a set of `PetscViewer`s created with `PetscViewersCreate()`.\n\nCollective\n\nInput Parameter:\n- `v` - the `PetscViewers` to be destroyed.\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewerDestroy()`, `PetscViewers`, `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerCreate()`, `PetscViewerDrawOpen()`, `PetscViewersCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewersDestroy\"))\n\"\"\"\nfunction PetscViewersDestroy(petsclib::PetscLibType, v::PetscViewers) end\n\n@for_petsc function PetscViewersDestroy(petsclib::$UnionPetscLib, v::PetscViewers )\n\n    @chk ccall(\n               (:PetscViewersDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscViewers},),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tv::PetscViewers = PetscViewersCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a container to hold a set of `PetscViewer`'s. The container is essentially a sparse, growable in length array of `PetscViewer`s\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator\n\nOutput Parameter:\n- `v` - the collection of `PetscViewers`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewers`, `PetscViewerCreate()`, `PetscViewersDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewersCreate\"))\n\"\"\"\nfunction PetscViewersCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscViewersCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tv_ = Ref{PetscViewers}()\n\n    @chk ccall(\n               (:PetscViewersCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscViewers}),\n               comm, v_,\n              )\n\n\tv = v_[]\n\n\treturn v\nend \n\n\"\"\"\n\tPetscViewersGetViewer(petsclib::PetscLibType,viewers::PetscViewers, n::PetscInt, viewer::PetscViewer) \nGets a `PetscViewer` from a `PetscViewers` collection\n\nCollective if the viewer has not previously be obtained.\n\nInput Parameters:\n- `viewers` - object created with `PetscViewersCreate()`\n- `n`       - number of `PetscViewer` you want\n\nOutput Parameter:\n- `viewer` - the `PetscViewer`\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PetscViewer`, `PetscViewers`, `PetscViewersCreate()`, `PetscViewersDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewersGetViewer\"))\n\"\"\"\nfunction PetscViewersGetViewer(petsclib::PetscLibType, viewers::PetscViewers, n::PetscInt, viewer::PetscViewer) end\n\n@for_petsc function PetscViewersGetViewer(petsclib::$UnionPetscLib, viewers::PetscViewers, n::$PetscInt, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewersGetViewer, $petsc_library),\n               PetscErrorCode,\n               (PetscViewers, $PetscInt, Ptr{PetscViewer}),\n               viewers, n, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerSAWsOpen(petsclib::PetscLibType,comm::MPI_Comm, lab::PetscViewer) \nOpens an SAWs `PetscViewer`.\n\nCollective; No Fortran Support\n\nInput Parameter:\n- `comm` - the MPI communicator\n\nOutput Parameter:\n- `lab` - the `PetscViewer`\n\nOptions Database Keys:\n- `-saws_port <port number>` - port number where you are running SAWs client\n- `-xxx_view saws`           - publish the object xxx\n- `-xxx_saws_block`          - blocks the program at the end of a critical point (for `KSP` and `SNES` it is the end of a solve) until\nthe user unblocks the problem with an external tool that access the object with SAWS\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewerDestroy()`, `PetscViewerStringSPrintf()`, `PETSC_VIEWER_SAWS_()`, `PetscObjectSAWsBlock()`,\n`PetscObjectSAWsViewOff()`, `PetscObjectSAWsTakeAccess()`, `PetscObjectSAWsGrantAccess()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerSAWsOpen\"))\n\"\"\"\nfunction PetscViewerSAWsOpen(petsclib::PetscLibType, comm::MPI_Comm, lab::PetscViewer) end\n\n@for_petsc function PetscViewerSAWsOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, lab::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerSAWsOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscViewer}),\n               comm, lab,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerStringOpen(petsclib::PetscLibType,comm::MPI_Comm, string::String, len::Csize_t, lab::PetscViewer) \nOpens a string as a `PETSCVIEWERSTRING` `PetscViewer`. This is a very\nsimple `PetscViewer`; information on the object is simply stored into\nthe string in a fairly nice way.\n\nCollective; No Fortran Support\n\nInput Parameters:\n- `comm`   - the communicator\n- `string` - the string to use\n- `len`    - the string length\n\nOutput Parameter:\n- `lab` - the `PetscViewer`\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERSTRING`, `PetscViewerDestroy()`, `PetscViewerStringSPrintf()`, `PetscViewerStringGetStringRead()`, `PetscViewerStringSetString()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerStringOpen\"))\n\"\"\"\nfunction PetscViewerStringOpen(petsclib::PetscLibType, comm::MPI_Comm, string::String, len::Csize_t, lab::PetscViewer) end\n\n@for_petsc function PetscViewerStringOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, string::String, len::Csize_t, lab::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerStringOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Csize_t, Ptr{PetscViewer}),\n               comm, string, len, lab,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerStringGetStringRead(petsclib::PetscLibType,viewer::PetscViewer, string::String, len::Csize_t) \nReturns the string that a `PETSCVIEWERSTRING` uses\n\nLogically Collective\n\nInput Parameter:\n- `viewer` - `PETSCVIEWERSTRING` viewer\n\nOutput Parameters:\n- `string` - the string, optional use `NULL` if you do not need\n- `len`    - the length of the string, optional use `NULL` if you do not need it\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewerStringOpen()`, `PETSCVIEWERSTRING`, `PetscViewerStringSetString()`, `PetscViewerStringSPrintf()`,\n`PetscViewerStringSetOwnString()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerStringGetStringRead\"))\n\"\"\"\nfunction PetscViewerStringGetStringRead(petsclib::PetscLibType, viewer::PetscViewer, string::String, len::Csize_t) end\n\n@for_petsc function PetscViewerStringGetStringRead(petsclib::$UnionPetscLib, viewer::PetscViewer, string::String, len::Csize_t )\n\tstring_ = Ref(pointer(string))\n\n    @chk ccall(\n               (:PetscViewerStringGetStringRead, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Ptr{Cchar}}, Ptr{Csize_t}),\n               viewer, string_, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerStringSetString(petsclib::PetscLibType,viewer::PetscViewer, string::String, len::Csize_t) \nsets the string that a string viewer will print to\n\nLogically Collective\n\nInput Parameters:\n- `viewer` - string viewer you wish to attach string to\n- `string` - the string to print data into\n- `len`    - the length of the string\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewerStringOpen()`, `PETSCVIEWERSTRING`, `PetscViewerStringGetStringRead()`, `PetscViewerStringSPrintf()`,\n`PetscViewerStringSetOwnString()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerStringSetString\"))\n\"\"\"\nfunction PetscViewerStringSetString(petsclib::PetscLibType, viewer::PetscViewer, string::String, len::Csize_t) end\n\n@for_petsc function PetscViewerStringSetString(petsclib::$UnionPetscLib, viewer::PetscViewer, string::String, len::Csize_t )\n\n    @chk ccall(\n               (:PetscViewerStringSetString, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Csize_t),\n               viewer, string, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerStringSetOwnString(petsclib::PetscLibType,viewer::PetscViewer) \ntells the viewer that it now owns the string and is responsible for freeing it with `PetscFree()`\n\nLogically Collective\n\nInput Parameter:\n- `viewer` - string viewer\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscViewerStringOpen()`, `PETSCVIEWERSTRING`, `PetscViewerStringGetStringRead()`, `PetscViewerStringSPrintf()`,\n`PetscViewerStringSetString()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerStringSetOwnString\"))\n\"\"\"\nfunction PetscViewerStringSetOwnString(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscViewerStringSetOwnString(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerStringSetOwnString, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerSocketOpen(petsclib::PetscLibType,comm::MPI_Comm, machine::String, port::Cint, lab::PetscViewer) \nOpens a connection to a MATLAB or other socket based server.\n\nCollective\n\nInput Parameters:\n- `comm`    - the MPI communicator\n- `machine` - the machine the server is running on, use `NULL` for the local machine, use \"server\" to passively wait for\na connection from elsewhere\n- `port`    - the port to connect to, use `PETSC_DEFAULT` for the default\n\nOutput Parameter:\n- `lab` - a context to use when communicating with the server\n\nOptions Database Keys:\nFor use with  `PETSC_VIEWER_SOCKET_WORLD`, `PETSC_VIEWER_SOCKET_SELF`,\n`PETSC_VIEWER_SOCKET_()` or if\n`NULL` is passed for machine or PETSC_DEFAULT is passed for port\n- `-viewer_socket_machine <machine>` - the machine where the socket is available\n- `-viewer_socket_port <port>`       - the socket to connect to\n\nEnvironmental variables:\n- `PETSC_VIEWER_SOCKET_MACHINE`   - machine name\n- `PETSC_VIEWER_SOCKET_PORT`   - portnumber\n\nLevel: intermediate\n\n-seealso: [](sec_viewers), `PETSCVIEWERBINARY`, `PETSCVIEWERSOCKET`, `MatView()`, `VecView()`, `PetscViewerDestroy()`, `PetscViewerCreate()`, `PetscViewerSetType()`,\n`PetscViewerSocketSetConnection()`, `PETSC_VIEWER_SOCKET_`, `PETSC_VIEWER_SOCKET_WORLD`,\n`PETSC_VIEWER_SOCKET_SELF`, `PetscViewerBinaryWrite()`, `PetscViewerBinaryRead()`, `PetscViewerBinaryWriteStringArray()`,\n`PetscBinaryViewerGetDescriptor()`, `PetscMatlabEngineCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerSocketOpen\"))\n\"\"\"\nfunction PetscViewerSocketOpen(petsclib::PetscLibType, comm::MPI_Comm, machine::String, port::Cint, lab::PetscViewer) end\n\n@for_petsc function PetscViewerSocketOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, machine::String, port::Cint, lab::PetscViewer )\n\n    @chk ccall(\n               (:PetscViewerSocketOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Cint, Ptr{PetscViewer}),\n               comm, machine, port, lab,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscViewerSocketSetConnection(petsclib::PetscLibType,v::PetscViewer, machine::String, port::Cint) \nSets the machine and port that a PETSc socket\nviewer is to use\n\nLogically Collective\n\nInput Parameters:\n- `v`       - viewer to connect\n- `machine` - host to connect to, use `NULL` for the local machine,use \"server\" to passively wait for\na connection from elsewhere\n- `port`    - the port on the machine one is connecting to, use `PETSC_DEFAULT` for default\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PETSCVIEWERMATLAB`, `PETSCVIEWERSOCKET`, `PetscViewerSocketOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscViewerSocketSetConnection\"))\n\"\"\"\nfunction PetscViewerSocketSetConnection(petsclib::PetscLibType, v::PetscViewer, machine::String, port::Cint) end\n\n@for_petsc function PetscViewerSocketSetConnection(petsclib::$UnionPetscLib, v::PetscViewer, machine::String, port::Cint )\n\n    @chk ccall(\n               (:PetscViewerSocketSetConnection, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}, Cint),\n               v, machine, port,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/Petsccomm_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_PetscSubcomm end\nconst PetscSubcomm = Ptr{_n_PetscSubcomm}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_PetscShmComm end\nconst PetscShmComm = Ptr{_n_PetscShmComm}\n# -------------------------------------------------------\n\n\"\"\"\n\tPetscSubcommSetFromOptions(petsclib::PetscLibType,psubcomm::PetscSubcomm) \nAllows setting options for a `PetscSubcomm`\n\nCollective\n\nInput Parameter:\n- `psubcomm` - `PetscSubcomm` context\n\nLevel: beginner\n\n-seealso: `PetscSubcomm`, `PetscSubcommCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommSetFromOptions\"))\n\"\"\"\nfunction PetscSubcommSetFromOptions(petsclib::PetscLibType, psubcomm::PetscSubcomm) end\n\n@for_petsc function PetscSubcommSetFromOptions(petsclib::$UnionPetscLib, psubcomm::PetscSubcomm )\n\n    @chk ccall(\n               (:PetscSubcommSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm,),\n               psubcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommSetOptionsPrefix(petsclib::PetscLibType,psubcomm::PetscSubcomm, pre::String) \nSets the prefix used for searching for options in the options database for this object\n\nLogically Collective\n\nLevel: intermediate\n\nInput Parameters:\n- `psubcomm` - `PetscSubcomm` context\n- `pre`      - the prefix to prepend all `PetscSubcomm` item names with.\n\n-seealso: `PetscSubcomm`, `PetscSubcommCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommSetOptionsPrefix\"))\n\"\"\"\nfunction PetscSubcommSetOptionsPrefix(petsclib::PetscLibType, psubcomm::PetscSubcomm, pre::String) end\n\n@for_petsc function PetscSubcommSetOptionsPrefix(petsclib::$UnionPetscLib, psubcomm::PetscSubcomm, pre::String )\n\n    @chk ccall(\n               (:PetscSubcommSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, Ptr{Cchar}),\n               psubcomm, pre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommView(petsclib::PetscLibType,psubcomm::PetscSubcomm, viewer::PetscViewer) \nViews a `PetscSubcomm`\n\nCollective\n\nInput Parameters:\n- `psubcomm` - `PetscSubcomm` context\n- `viewer`   - `PetscViewer` to display the information\n\nLevel: beginner\n\n-seealso: `PetscSubcomm`, `PetscSubcommCreate()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommView\"))\n\"\"\"\nfunction PetscSubcommView(petsclib::PetscLibType, psubcomm::PetscSubcomm, viewer::PetscViewer) end\n\n@for_petsc function PetscSubcommView(petsclib::$UnionPetscLib, psubcomm::PetscSubcomm, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscSubcommView, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, PetscViewer),\n               psubcomm, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommSetNumber(petsclib::PetscLibType,psubcomm::PetscSubcomm, nsubcomm::PetscInt) \nSet total number of subcommunicators desired in the given `PetscSubcomm`\n\nCollective\n\nInput Parameters:\n- `psubcomm` - `PetscSubcomm` context\n- `nsubcomm` - the total number of subcommunicators in psubcomm\n\nLevel: advanced\n\n-seealso: `PetscSubcomm`, `PetscSubcommCreate()`, `PetscSubcommDestroy()`, `PetscSubcommSetType()`, `PetscSubcommSetTypeGeneral()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommSetNumber\"))\n\"\"\"\nfunction PetscSubcommSetNumber(petsclib::PetscLibType, psubcomm::PetscSubcomm, nsubcomm::PetscInt) end\n\n@for_petsc function PetscSubcommSetNumber(petsclib::$UnionPetscLib, psubcomm::PetscSubcomm, nsubcomm::$PetscInt )\n\n    @chk ccall(\n               (:PetscSubcommSetNumber, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, $PetscInt),\n               psubcomm, nsubcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommSetType(petsclib::PetscLibType,psubcomm::PetscSubcomm, subcommtype::PetscSubcommType) \nSet the way the original MPI communicator is divided up in the `PetscSubcomm`\n\nCollective\n\nInput Parameters:\n- `psubcomm`    - `PetscSubcomm` context\n- `subcommtype` - `PetscSubcommType` `PETSC_SUBCOMM_CONTIGUOUS` or `PETSC_SUBCOMM_INTERLACED`\n\nLevel: advanced\n\n-seealso: `PetscSubcommType`, `PETSC_SUBCOMM_CONTIGUOUS`, `PETSC_SUBCOMM_INTERLACED`,\n`PetscSubcommCreate()`, `PetscSubcommDestroy()`, `PetscSubcommSetNumber()`, `PetscSubcommSetTypeGeneral()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommSetType\"))\n\"\"\"\nfunction PetscSubcommSetType(petsclib::PetscLibType, psubcomm::PetscSubcomm, subcommtype::PetscSubcommType) end\n\n@for_petsc function PetscSubcommSetType(petsclib::$UnionPetscLib, psubcomm::PetscSubcomm, subcommtype::PetscSubcommType )\n\n    @chk ccall(\n               (:PetscSubcommSetType, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, PetscSubcommType),\n               psubcomm, subcommtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommSetTypeGeneral(petsclib::PetscLibType,psubcomm::PetscSubcomm, color::PetscMPIInt, subrank::PetscMPIInt) \nDivides up a communicator based on a specific user's specification\n\nCollective\n\nInput Parameters:\n- `psubcomm` - `PetscSubcomm` context\n- `color`    - control of subset assignment (nonnegative integer). Processes with the same color are in the same subcommunicator.\n- `subrank`  - rank in the subcommunicator\n\nLevel: advanced\n\n-seealso: `PetscSubcommType`, `PETSC_SUBCOMM_CONTIGUOUS`, `PETSC_SUBCOMM_INTERLACED`, `PetscSubcommCreate()`, `PetscSubcommDestroy()`, `PetscSubcommSetNumber()`, `PetscSubcommSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommSetTypeGeneral\"))\n\"\"\"\nfunction PetscSubcommSetTypeGeneral(petsclib::PetscLibType, psubcomm::PetscSubcomm, color::PetscMPIInt, subrank::PetscMPIInt) end\n\n@for_petsc function PetscSubcommSetTypeGeneral(petsclib::$UnionPetscLib, psubcomm::PetscSubcomm, color::PetscMPIInt, subrank::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscSubcommSetTypeGeneral, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, PetscMPIInt, PetscMPIInt),\n               psubcomm, color, subrank,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommDestroy(petsclib::PetscLibType,psubcomm::PetscSubcomm) \nDestroys a `PetscSubcomm` object\n\nCollective\n\nInput Parameter:\n- `psubcomm` - the `PetscSubcomm` context\n\nLevel: advanced\n\n-seealso: `PetscSubcommCreate()`, `PetscSubcommSetType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommDestroy\"))\n\"\"\"\nfunction PetscSubcommDestroy(petsclib::PetscLibType, psubcomm::PetscSubcomm) end\n\n@for_petsc function PetscSubcommDestroy(petsclib::$UnionPetscLib, psubcomm::PetscSubcomm )\n\n    @chk ccall(\n               (:PetscSubcommDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscSubcomm},),\n               psubcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpsubcomm::PetscSubcomm = PetscSubcommCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreate a `PetscSubcomm` context. This object is used to manage the division of a `MPI_Comm` into subcommunicators\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `psubcomm` - location to store the `PetscSubcomm` context\n\nLevel: advanced\n\n-seealso: `PetscSubcomm`, `PetscSubcommDestroy()`, `PetscSubcommSetTypeGeneral()`, `PetscSubcommSetFromOptions()`, `PetscSubcommSetType()`,\n`PetscSubcommSetNumber()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommCreate\"))\n\"\"\"\nfunction PetscSubcommCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscSubcommCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tpsubcomm_ = Ref{PetscSubcomm}()\n\n    @chk ccall(\n               (:PetscSubcommCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscSubcomm}),\n               comm, psubcomm_,\n              )\n\n\tpsubcomm = psubcomm_[]\n\n\treturn psubcomm\nend \n\n\"\"\"\n\tPetscSubcommGetParent(petsclib::PetscLibType,scomm::PetscSubcomm, pcomm::MPI_Comm) \nGets the communicator that was used to create the `PetscSubcomm`\n\nCollective\n\nInput Parameter:\n- `scomm` - the `PetscSubcomm`\n\nOutput Parameter:\n- `pcomm` - location to store the parent communicator\n\nLevel: intermediate\n\n-seealso: `PetscSubcommDestroy()`, `PetscSubcommSetTypeGeneral()`, `PetscSubcommSetFromOptions()`, `PetscSubcommSetType()`,\n`PetscSubcommSetNumber()`, `PetscSubcommGetChild()`, `PetscSubcommContiguousParent()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommGetParent\"))\n\"\"\"\nfunction PetscSubcommGetParent(petsclib::PetscLibType, scomm::PetscSubcomm, pcomm::MPI_Comm) end\n\n@for_petsc function PetscSubcommGetParent(petsclib::$UnionPetscLib, scomm::PetscSubcomm, pcomm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscSubcommGetParent, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, Ptr{MPI_Comm}),\n               scomm, pcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommGetContiguousParent(petsclib::PetscLibType,scomm::PetscSubcomm, pcomm::MPI_Comm) \nGets a communicator that is a duplicate of the parent but has the ranks\nreordered by the order they are in the children\n\nCollective\n\nInput Parameter:\n- `scomm` - the `PetscSubcomm`\n\nOutput Parameter:\n- `pcomm` - location to store the parent communicator\n\nLevel: intermediate\n\n-seealso: `PetscSubcommDestroy()`, `PetscSubcommSetTypeGeneral()`, `PetscSubcommSetFromOptions()`, `PetscSubcommSetType()`,\n`PetscSubcommSetNumber()`, `PetscSubcommGetChild()`, `PetscSubcommContiguousParent()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommGetContiguousParent\"))\n\"\"\"\nfunction PetscSubcommGetContiguousParent(petsclib::PetscLibType, scomm::PetscSubcomm, pcomm::MPI_Comm) end\n\n@for_petsc function PetscSubcommGetContiguousParent(petsclib::$UnionPetscLib, scomm::PetscSubcomm, pcomm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscSubcommGetContiguousParent, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, Ptr{MPI_Comm}),\n               scomm, pcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSubcommGetChild(petsclib::PetscLibType,scomm::PetscSubcomm, ccomm::MPI_Comm) \nGets the communicator created by the `PetscSubcomm`. This is part of one of the subcommunicators created by the `PetscSubcomm`\n\nCollective\n\nInput Parameter:\n- `scomm` - the `PetscSubcomm`\n\nOutput Parameter:\n- `ccomm` - location to store the child communicator\n\nLevel: intermediate\n\n-seealso: `PetscSubcommDestroy()`, `PetscSubcommSetTypeGeneral()`, `PetscSubcommSetFromOptions()`, `PetscSubcommSetType()`,\n`PetscSubcommSetNumber()`, `PetscSubcommGetParent()`, `PetscSubcommContiguousParent()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSubcommGetChild\"))\n\"\"\"\nfunction PetscSubcommGetChild(petsclib::PetscLibType, scomm::PetscSubcomm, ccomm::MPI_Comm) end\n\n@for_petsc function PetscSubcommGetChild(petsclib::$UnionPetscLib, scomm::PetscSubcomm, ccomm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscSubcommGetChild, $petsc_library),\n               PetscErrorCode,\n               (PetscSubcomm, Ptr{MPI_Comm}),\n               scomm, ccomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmCommGet(petsclib::PetscLibType,globcomm::MPI_Comm, pshmcomm::PetscShmComm) \nReturns a sub\n\nCollective.\n\nInput Parameter:\n- `globcomm` - `MPI_Comm`, which can be a user `MPI_Comm` or a PETSc inner `MPI_Comm`\n\nOutput Parameter:\n- `pshmcomm` - the PETSc shared memory communicator object\n\nLevel: developer\n\n-seealso: `PetscShmCommGlobalToLocal()`, `PetscShmCommLocalToGlobal()`, `PetscShmCommGetMpiShmComm()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmCommGet\"))\n\"\"\"\nfunction PetscShmCommGet(petsclib::PetscLibType, globcomm::MPI_Comm, pshmcomm::PetscShmComm) end\n\n@for_petsc function PetscShmCommGet(petsclib::$UnionPetscLib, globcomm::MPI_Comm, pshmcomm::PetscShmComm )\n\n    @chk ccall(\n               (:PetscShmCommGet, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscShmComm}),\n               globcomm, pshmcomm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmCommGlobalToLocal(petsclib::PetscLibType,pshmcomm::PetscShmComm, grank::PetscMPIInt, lrank::PetscMPIInt) \nGiven a global rank returns the local rank in the shared memory communicator\n\nInput Parameters:\n- `pshmcomm` - the shared memory communicator object\n- `grank`    - the global rank\n\nOutput Parameter:\n- `lrank` - the local rank, or `MPI_PROC_NULL` if it does not exist\n\nLevel: developer\n\n-seealso: `PetscShmCommGet()`, `PetscShmCommLocalToGlobal()`, `PetscShmCommGetMpiShmComm()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmCommGlobalToLocal\"))\n\"\"\"\nfunction PetscShmCommGlobalToLocal(petsclib::PetscLibType, pshmcomm::PetscShmComm, grank::PetscMPIInt, lrank::PetscMPIInt) end\n\n@for_petsc function PetscShmCommGlobalToLocal(petsclib::$UnionPetscLib, pshmcomm::PetscShmComm, grank::PetscMPIInt, lrank::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscShmCommGlobalToLocal, $petsc_library),\n               PetscErrorCode,\n               (PetscShmComm, PetscMPIInt, Ptr{PetscMPIInt}),\n               pshmcomm, grank, lrank,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmCommLocalToGlobal(petsclib::PetscLibType,pshmcomm::PetscShmComm, lrank::PetscMPIInt, grank::PetscMPIInt) \nGiven a local rank in the shared memory communicator returns the global rank\n\nInput Parameters:\n- `pshmcomm` - the shared memory communicator object\n- `lrank`    - the local rank in the shared memory communicator\n\nOutput Parameter:\n- `grank` - the global rank in the global communicator where the shared memory communicator is built\n\nLevel: developer\n\n-seealso: `PetscShmCommGlobalToLocal()`, `PetscShmCommGet()`, `PetscShmCommGetMpiShmComm()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmCommLocalToGlobal\"))\n\"\"\"\nfunction PetscShmCommLocalToGlobal(petsclib::PetscLibType, pshmcomm::PetscShmComm, lrank::PetscMPIInt, grank::PetscMPIInt) end\n\n@for_petsc function PetscShmCommLocalToGlobal(petsclib::$UnionPetscLib, pshmcomm::PetscShmComm, lrank::PetscMPIInt, grank::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscShmCommLocalToGlobal, $petsc_library),\n               PetscErrorCode,\n               (PetscShmComm, PetscMPIInt, Ptr{PetscMPIInt}),\n               pshmcomm, lrank, grank,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmCommGetMpiShmComm(petsclib::PetscLibType,pshmcomm::PetscShmComm, comm::MPI_Comm) \nReturns the MPI communicator that represents all processes with common shared memory\n\nInput Parameter:\n- `pshmcomm` - PetscShmComm object obtained with PetscShmCommGet()\n\nOutput Parameter:\n- `comm` - the MPI communicator\n\nLevel: developer\n\n-seealso: `PetscShmCommGlobalToLocal()`, `PetscShmCommGet()`, `PetscShmCommLocalToGlobal()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmCommGetMpiShmComm\"))\n\"\"\"\nfunction PetscShmCommGetMpiShmComm(petsclib::PetscLibType, pshmcomm::PetscShmComm, comm::MPI_Comm) end\n\n@for_petsc function PetscShmCommGetMpiShmComm(petsclib::$UnionPetscLib, pshmcomm::PetscShmComm, comm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscShmCommGetMpiShmComm, $petsc_library),\n               PetscErrorCode,\n               (PetscShmComm, Ptr{MPI_Comm}),\n               pshmcomm, comm,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/SNESLineSearch_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct SNESLineSearchVIProjectFn end\n\nmutable struct SNESLineSearchVINormFn end\n\nmutable struct SNESLineSearchVIDirDerivFn end\n\nmutable struct SNESLineSearchShellApplyFn end\n\n#mutable struct _n_SNESLineSearch end\n#const SNESLineSearch = Ptr{_n_SNESLineSearch}\n\n# -------------------------------------------------------\n\"\"\"\n\tSNESLineSearchMonitorCancel(petsclib::PetscLibType,ls::SNESLineSearch) \nClears all the monitor functions for a `SNESLineSearch` object.\n\nLogically Collective\n\nInput Parameter:\n- `ls` - the `SNESLineSearch` context\n\nOptions Database Key:\n- `-snes_linesearch_monitor_cancel` - cancels all monitors that have been hardwired\ninto a code by calls to `SNESLineSearchMonitorSet()`, but does not cancel those\nset via the options database\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchMonitorDefault()`, `SNESLineSearchMonitorSet()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchMonitorCancel\"))\n\"\"\"\nfunction SNESLineSearchMonitorCancel(petsclib::PetscLibType, ls::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchMonitorCancel(petsclib::$UnionPetscLib, ls::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESLineSearchMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch,),\n               ls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchMonitor(petsclib::PetscLibType,ls::SNESLineSearch) \nruns the user provided monitor routines, if they exist\n\nCollective\n\nInput Parameter:\n- `ls` - the linesearch object\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchMonitorSet()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchMonitor\"))\n\"\"\"\nfunction SNESLineSearchMonitor(petsclib::PetscLibType, ls::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchMonitor(petsclib::$UnionPetscLib, ls::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESLineSearchMonitor, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch,),\n               ls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchMonitorSet(petsclib::PetscLibType,ls::SNESLineSearch, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function that is to be used at every\niteration of the nonlinear solver to display the iteration's\nprogress.\n\nLogically Collective\n\nInput Parameters:\n- `ls`             - the `SNESLineSearch` context\n- `f`              - the monitor function\n- `mctx`           - [optional] user-defined context for private data for the monitor routine (use `NULL` if no context is desired)\n- `monitordestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence\n\nCalling sequence of `f`:\n- `ls`   - the `SNESLineSearch` context\n- `mctx` - [optional] user-defined context for private data for the monitor routine\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchMonitorDefault()`, `SNESLineSearchMonitorCancel()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchMonitorSet\"))\n\"\"\"\nfunction SNESLineSearchMonitorSet(petsclib::PetscLibType, ls::SNESLineSearch, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) end\n\n@for_petsc function SNESLineSearchMonitorSet(petsclib::$UnionPetscLib, ls::SNESLineSearch, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:SNESLineSearchMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ls, f, mctx, monitordestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchMonitorSolutionUpdate(petsclib::PetscLibType,ls::SNESLineSearch, vf::PetscViewerAndFormat) \nMonitors each update of the function value the linesearch tries\n\nCollective\n\nInput Parameters:\n- `ls` - the `SNESLineSearch` object\n- `vf` - the context for the monitor, in this case it is an `PetscViewerAndFormat`\n\nOptions Database Key:\n- `-snes_linesearch_monitor_solution_update [viewer:filename:format]` - view each update tried by line search routine\n\nLevel: developer\n\nThis is not normally called directly but is passed to `SNESLineSearchMonitorSet()`\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchMonitorSet()`, `SNESMonitorSolution()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchMonitorSolutionUpdate\"))\n\"\"\"\nfunction SNESLineSearchMonitorSolutionUpdate(petsclib::PetscLibType, ls::SNESLineSearch, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESLineSearchMonitorSolutionUpdate(petsclib::$UnionPetscLib, ls::SNESLineSearch, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESLineSearchMonitorSolutionUpdate, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{PetscViewerAndFormat}),\n               ls, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toutlinesearch::SNESLineSearch = SNESLineSearchCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `SNESLineSearch` context.\n\nLogically Collective\n\nInput Parameter:\n- `comm` - MPI communicator for the line search (typically from the associated `SNES` context).\n\nOutput Parameter:\n- `outlinesearch` - the new line search context\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `LineSearchDestroy()`, `SNESGetLineSearch()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchCreate\"))\n\"\"\"\nfunction SNESLineSearchCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function SNESLineSearchCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\toutlinesearch_ = Ref{SNESLineSearch}()\n\n    @chk ccall(\n               (:SNESLineSearchCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{SNESLineSearch}),\n               comm, outlinesearch_,\n              )\n\n\toutlinesearch = outlinesearch_[]\n\n\treturn outlinesearch\nend \n\n\"\"\"\n\tSNESLineSearchSetUp(petsclib::PetscLibType,linesearch::SNESLineSearch) \nPrepares the line search for being applied by allocating\nany required vectors.\n\nCollective\n\nInput Parameter:\n- `linesearch` - The `SNESLineSearch` instance.\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchReset()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetUp\"))\n\"\"\"\nfunction SNESLineSearchSetUp(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchSetUp(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESLineSearchSetUp, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch,),\n               linesearch,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchReset(petsclib::PetscLibType,linesearch::SNESLineSearch) \nUndoes the `SNESLineSearchSetUp()` and deletes any `Vec`s or `Mat`s allocated by the line search.\n\nCollective\n\nInput Parameter:\n- `linesearch` - The `SNESLineSearch` instance.\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchSetUp()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchReset\"))\n\"\"\"\nfunction SNESLineSearchReset(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchReset(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESLineSearchReset, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch,),\n               linesearch,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetFunction(petsclib::PetscLibType,linesearch::SNESLineSearch, func::external) \nSets the function evaluation used by the `SNES` line search\n`\n\nInput Parameters:\n- `linesearch` - the `SNESLineSearch` context\n- `func`       - function evaluation routine, this is usually the function provided with `SNESSetFunction()`\n\nCalling sequence of `func`:\n- `snes` - the `SNES` with which the `SNESLineSearch` context is associated with\n- `x`    - the input vector\n- `f`    - the computed value of the function\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESSetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetFunction\"))\n\"\"\"\nfunction SNESLineSearchSetFunction(petsclib::PetscLibType, linesearch::SNESLineSearch, func::external) end\n\n@for_petsc function SNESLineSearchSetFunction(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, func::external )\n\n    @chk ccall(\n               (:SNESLineSearchSetFunction, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, external),\n               linesearch, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetPreCheck(petsclib::PetscLibType,linesearch::SNESLineSearch, func::external, ctx::Cvoid) \nSets a function that is called after the initial search direction has been computed but\nbefore the line search routine has been applied. Allows adjusting the result of (usually a linear solve) that\ndetermined the search direction.\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - the `SNESLineSearch` context\n- `func`       - [optional] function evaluation routine\n- `ctx`        - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `ls`        - the `SNESLineSearch` context\n- `x`         - the current solution\n- `d`         - the current search direction\n- `changed_d` - indicates if the search direction has been changed\n- `ctx`       - the context passed to `SNESLineSearchSetPreCheck()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetLineSearch()`, `SNESLineSearchPreCheck()`, `SNESLineSearchSetPostCheck()`, `SNESLineSearchGetPostCheck()`, `SNESLineSearchGetPreCheck()`,\n`SNESVISetVariableBounds()`, `SNESVISetComputeVariableBounds()`, `SNESSetFunctionDomainError()`, `SNESSetJacobianDomainError()`\n\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetPreCheck\"))\n\"\"\"\nfunction SNESLineSearchSetPreCheck(petsclib::PetscLibType, linesearch::SNESLineSearch, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESLineSearchSetPreCheck(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESLineSearchSetPreCheck, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, external, Ptr{Cvoid}),\n               linesearch, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetPostCheck(petsclib::PetscLibType,linesearch::SNESLineSearch, func::external, ctx::Cvoid) \nSets a user function that is called after the line search has been applied to determine the step\ndirection and length. Allows the user a chance to change or override the decision of the line search routine\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - the `SNESLineSearch` context\n- `func`       - [optional] function evaluation routine\n- `ctx`        - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `ls`        - the `SNESLineSearch` context\n- `x`         - the current solution\n- `d`         - the current search direction\n- `w`         -  w = x + lambda*d  for some lambda\n- `changed_d` - indicates if the search direction `d` has been changed\n- `changed_w` - indicates `w` has been changed\n- `ctx`       - the context passed to `SNESLineSearchSetPreCheck()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchPostCheck()`, `SNESLineSearchSetPreCheck()`, `SNESLineSearchGetPreCheck()`, `SNESLineSearchGetPostCheck()`,\n`SNESVISetVariableBounds()`, `SNESVISetComputeVariableBounds()`, `SNESSetFunctionDomainError()`, `SNESSetJacobianDomainError()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetPostCheck\"))\n\"\"\"\nfunction SNESLineSearchSetPostCheck(petsclib::PetscLibType, linesearch::SNESLineSearch, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESLineSearchSetPostCheck(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESLineSearchSetPostCheck, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, external, Ptr{Cvoid}),\n               linesearch, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tchanged::PetscBool = SNESLineSearchPreCheck(petsclib::PetscLibType,linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec) \nPrepares the line search for being applied.\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - The linesearch instance.\n- `X`          - The current solution\n- `Y`          - The step direction\n\nOutput Parameter:\n- `changed` - Indicator that the precheck routine has changed `Y`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchPostCheck()`, `SNESLineSearchSetPreCheck()`, `SNESLineSearchGetPreCheck()`, `SNESLineSearchSetPostCheck()`,\n`SNESLineSearchGetPostCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchPreCheck\"))\n\"\"\"\nfunction SNESLineSearchPreCheck(petsclib::PetscLibType, linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec) end\n\n@for_petsc function SNESLineSearchPreCheck(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec )\n\tchanged_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESLineSearchPreCheck, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, CVec, CVec, Ptr{PetscBool}),\n               linesearch, X, Y, changed_,\n              )\n\n\tchanged = changed_[]\n\n\treturn changed\nend \n\n\"\"\"\n\tchanged_Y::PetscBool,changed_W::PetscBool = SNESLineSearchPostCheck(petsclib::PetscLibType,linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec, W::PetscVec) \nHook to modify step direction or updated solution after a successful linesearch\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - The line search context\n- `X`          - The last solution\n- `Y`          - The step direction\n- `W`          - The updated solution, `W = X - lambda * Y` for some lambda\n\nOutput Parameters:\n- `changed_Y` - Indicator if the direction `Y` has been changed.\n- `changed_W` - Indicator if the new candidate solution `W` has been changed.\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESGetLineSearch()`, `SNESLineSearchPreCheck()`, `SNESLineSearchSetPostCheck()`, `SNESLineSearchGetPostCheck()`, `SNESLineSearchSetPrecheck()`, `SNESLineSearchGetPrecheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchPostCheck\"))\n\"\"\"\nfunction SNESLineSearchPostCheck(petsclib::PetscLibType, linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec, W::PetscVec) end\n\n@for_petsc function SNESLineSearchPostCheck(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec, W::PetscVec )\n\tchanged_Y_ = Ref{PetscBool}()\n\tchanged_W_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESLineSearchPostCheck, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, CVec, CVec, CVec, Ptr{PetscBool}, Ptr{PetscBool}),\n               linesearch, X, Y, W, changed_Y_, changed_W_,\n              )\n\n\tchanged_Y = changed_Y_[]\n\tchanged_W = changed_W_[]\n\n\treturn changed_Y,changed_W\nend \n\n\"\"\"\n\tchanged::PetscBool = SNESLineSearchPreCheckPicard(petsclib::PetscLibType,linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec, ctx::Cvoid) \nImplements a correction that is sometimes useful to improve the convergence rate of Picard iteration {cite}`hindmarsh1996time`\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - the line search context\n- `X`          - base state for this step\n- `ctx`        - context for this function\n\nInput/Output Parameter:\n- `Y` - correction, possibly modified\n\nOutput Parameter:\n- `changed` - flag indicating that `Y` was modified\n\nOptions Database Keys:\n- `-snes_linesearch_precheck_picard`       - activate this routine\n- `-snes_linesearch_precheck_picard_angle` - angle\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESSetPicard()`, `SNESGetLineSearch()`, `SNESLineSearchSetPreCheck()`, `SNESLineSearchSetPostCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchPreCheckPicard\"))\n\"\"\"\nfunction SNESLineSearchPreCheckPicard(petsclib::PetscLibType, linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec, ctx::Cvoid) end\n\n@for_petsc function SNESLineSearchPreCheckPicard(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, X::PetscVec, Y::PetscVec, ctx::Cvoid )\n\tchanged_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESLineSearchPreCheckPicard, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, CVec, CVec, Ptr{PetscBool}, Ptr{Cvoid}),\n               linesearch, X, Y, changed_, ctx,\n              )\n\n\tchanged = changed_[]\n\n\treturn changed\nend \n\n\"\"\"\n\tfnorm::PetscReal = SNESLineSearchApply(petsclib::PetscLibType,linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec) \nComputes the line\n\nCollective\n\nInput Parameter:\n- `linesearch` - The line search context\n\nInput/Output Parameters:\n- `X`     - The current solution, on output the new solution\n- `F`     - The current function value, on output the new function value at the solution value `X`\n- `fnorm` - The current norm of `F`, on output the new norm of `F`\n- `Y`     - The current search direction, on output the direction determined by the linesearch, i.e. `Xnew = Xold - lambda*Y`\n\nOptions Database Keys:\n- `-snes_linesearch_type`                - basic (or equivalently none), bt, secant, cp, nleqerr, bisection, shell\n- `-snes_linesearch_monitor [:filename]` - Print progress of line searches\n- `-snes_linesearch_damping`             - The linesearch damping parameter, default is 1.0 (no damping)\n- `-snes_linesearch_norms`               - Turn on/off the linesearch norms computation (SNESLineSearchSetComputeNorms())\n- `-snes_linesearch_keeplambda`          - Keep the previous `lambda` as the initial guess\n- `-snes_linesearch_max_it`              - The number of iterations for iterative line searches\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchCreate()`, `SNESLineSearchGetLambda()`, `SNESLineSearchPreCheck()`, `SNESLineSearchPostCheck()`, `SNESSolve()`, `SNESComputeFunction()`, `SNESLineSearchSetComputeNorms()`,\n`SNESLineSearchType`, `SNESLineSearchSetType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchApply\"))\n\"\"\"\nfunction SNESLineSearchApply(petsclib::PetscLibType, linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec) end\n\n@for_petsc function SNESLineSearchApply(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec )\n\tfnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESLineSearchApply, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, CVec, CVec, Ptr{$PetscReal}, CVec),\n               linesearch, X, F, fnorm_, Y,\n              )\n\n\tfnorm = fnorm_[]\n\n\treturn fnorm\nend \n\n\"\"\"\n\tSNESLineSearchDestroy(petsclib::PetscLibType,linesearch::SNESLineSearch) \nDestroys the line search instance.\n\nCollective\n\nInput Parameter:\n- `linesearch` - The line search context\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchCreate()`, `SNESLineSearchReset()`, `SNESDestroy()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchDestroy\"))\n\"\"\"\nfunction SNESLineSearchDestroy(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchDestroy(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESLineSearchDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{SNESLineSearch},),\n               linesearch,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetDefaultMonitor(petsclib::PetscLibType,linesearch::SNESLineSearch, viewer::PetscViewer) \nTurns on/off printing useful information and debugging output about the line search.\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - the linesearch object\n- `viewer`     - an `PETSCVIEWERASCII` `PetscViewer` or `NULL` to turn off monitor\n\nOptions Database Key:\n- `-snes_linesearch_monitor [:filename]` - enables the monitor\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `PETSCVIEWERASCII`, `SNESGetLineSearch()`, `SNESLineSearchGetDefaultMonitor()`, `PetscViewer`, `SNESLineSearchSetMonitor()`,\n`SNESLineSearchMonitorSetFromOptions()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetDefaultMonitor\"))\n\"\"\"\nfunction SNESLineSearchSetDefaultMonitor(petsclib::PetscLibType, linesearch::SNESLineSearch, viewer::PetscViewer) end\n\n@for_petsc function SNESLineSearchSetDefaultMonitor(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, viewer::PetscViewer )\n\n    @chk ccall(\n               (:SNESLineSearchSetDefaultMonitor, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, PetscViewer),\n               linesearch, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchGetDefaultMonitor(petsclib::PetscLibType,linesearch::SNESLineSearch, monitor::PetscViewer) \nGets the `PetscViewer` instance for the default line search monitor that is turned on with `SNESLineSearchSetDefaultMonitor()`\n\nLogically Collective\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameter:\n- `monitor` - monitor context\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchSetDefaultMonitor()`, `PetscViewer`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetDefaultMonitor\"))\n\"\"\"\nfunction SNESLineSearchGetDefaultMonitor(petsclib::PetscLibType, linesearch::SNESLineSearch, monitor::PetscViewer) end\n\n@for_petsc function SNESLineSearchGetDefaultMonitor(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, monitor::PetscViewer )\n\n    @chk ccall(\n               (:SNESLineSearchGetDefaultMonitor, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{PetscViewer}),\n               linesearch, monitor,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchMonitorSetFromOptions(petsclib::PetscLibType,ls::SNESLineSearch, name::String, help::String, manual::String, monitor::external, monitorsetup::external) \nSets a monitor function and viewer appropriate for the type indicated in the options database\n\nCollective\n\nInput Parameters:\n- `ls`           - `SNESLineSearch` object to monitor\n- `name`         - the monitor type\n- `help`         - message indicating what monitoring is done\n- `manual`       - manual page for the monitor\n- `monitor`      - the monitor function, must use `PetscViewerAndFormat` as its context\n- `monitorsetup` - a function that is called once ONLY if the user selected this monitor that may set additional features of the `SNESLineSearch` or `PetscViewer`\n\nCalling sequence of `monitor`:\n- `ls` - `SNESLineSearch` object being monitored\n- `vf` - a `PetscViewerAndFormat` struct that provides the `PetscViewer` and `PetscViewerFormat` being used\n\nCalling sequence of `monitorsetup`:\n- `ls` - `SNESLineSearch` object being monitored\n- `vf` - a `PetscViewerAndFormat` struct that provides the `PetscViewer` and `PetscViewerFormat` being used\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetMonitor()`, `PetscOptionsCreateViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchMonitorSetFromOptions\"))\n\"\"\"\nfunction SNESLineSearchMonitorSetFromOptions(petsclib::PetscLibType, ls::SNESLineSearch, name::String, help::String, manual::String, monitor::external, monitorsetup::external) end\n\n@for_petsc function SNESLineSearchMonitorSetFromOptions(petsclib::$UnionPetscLib, ls::SNESLineSearch, name::String, help::String, manual::String, monitor::external, monitorsetup::external )\n\n    @chk ccall(\n               (:SNESLineSearchMonitorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, external, external),\n               ls, name, help, manual, monitor, monitorsetup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetFromOptions(petsclib::PetscLibType,linesearch::SNESLineSearch) \nSets options for the line search\n\nLogically Collective\n\nInput Parameter:\n- `linesearch` - a `SNESLineSearch` line search context\n\nOptions Database Keys:\n- `-snes_linesearch_type <type>`                                      - basic (or equivalently none), `bt`, `secant`, `cp`, `nleqerr`, `bisection`, `shell`\n- `-snes_linesearch_order <order>`                                    - 1, 2, 3.  Most types only support certain orders (`bt` supports 1, 2 or 3)\n- `-snes_linesearch_norms`                                            - Turn on/off the linesearch norms for the basic linesearch typem (`SNESLineSearchSetComputeNorms()`)\n- `-snes_linesearch_minlambda`                                        - The minimum `lambda`\n- `-snes_linesearch_maxlambda`                                        - The maximum `lambda`\n- `-snes_linesearch_rtol`                                             - Relative tolerance for iterative line searches\n- `-snes_linesearch_atol`                                             - Absolute tolerance for iterative line searches\n- `-snes_linesearch_ltol`                                             - Change in `lambda` tolerance for iterative line searches\n- `-snes_linesearch_max_it`                                           - The number of iterations for iterative line searches\n- `-snes_linesearch_monitor [:filename]`                              - Print progress of line searches\n- `-snes_linesearch_monitor_solution_update [viewer:filename:format]` - view each update tried by line search routine\n- `-snes_linesearch_damping`                                          - The linesearch damping parameter\n- `-snes_linesearch_keeplambda`                                       - Keep the previous `lambda` as the initial guess.\n- `-snes_linesearch_precheck_picard`                                  - Use precheck that speeds up convergence of picard method\n- `-snes_linesearch_precheck_picard_angle`                            - Angle used in Picard precheck method\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`, `SNESLineSearchCreate()`, `SNESLineSearchSetOrder()`, `SNESLineSearchSetType()`, `SNESLineSearchSetTolerances()`, `SNESLineSearchSetDamping()`, `SNESLineSearchPreCheckPicard()`,\n`SNESLineSearchType`, `SNESLineSearchSetComputeNorms()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetFromOptions\"))\n\"\"\"\nfunction SNESLineSearchSetFromOptions(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchSetFromOptions(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESLineSearchSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch,),\n               linesearch,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchView(petsclib::PetscLibType,linesearch::SNESLineSearch, viewer::PetscViewer) \nPrints useful information about the line search\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - line search context\n- `viewer`     - the `PetscViewer` to display the line search information to\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `PetscViewer`, `SNESLineSearchCreate()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchView\"))\n\"\"\"\nfunction SNESLineSearchView(petsclib::PetscLibType, linesearch::SNESLineSearch, viewer::PetscViewer) end\n\n@for_petsc function SNESLineSearchView(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, viewer::PetscViewer )\n\n    @chk ccall(\n               (:SNESLineSearchView, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, PetscViewer),\n               linesearch, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::SNESLineSearchType = SNESLineSearchGetType(petsclib::PetscLibType,linesearch::SNESLineSearch) \nGets the `SNESLinesearchType` of a `SNESLineSearch`\n\nLogically Collective\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameter:\n- `type` - The type of line search, or `NULL` if not set\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchType`, `SNESLineSearchCreate()`, `SNESLineSearchSetFromOptions()`, `SNESLineSearchSetType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetType\"))\n\"\"\"\nfunction SNESLineSearchGetType(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchGetType(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\ttype_ = Ref{SNESLineSearchType}()\n\n    @chk ccall(\n               (:SNESLineSearchGetType, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{SNESLineSearchType}),\n               linesearch, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tSNESLineSearchSetType(petsclib::PetscLibType,linesearch::SNESLineSearch, type::SNESLineSearchType) \nSets the `SNESLinesearchType` of a `SNESLineSearch` object to indicate the line search algorithm that should be used by a given `SNES` solver\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - the line search context\n- `type`       - The type of line search to be used, see `SNESLineSearchType`\n\nOptions Database Key:\n- `-snes_linesearch_type <type>` - basic (or equivalently none), bt, secant, cp, nleqerr, bisection, shell\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchType`, `SNESLineSearchCreate()`, `SNESLineSearchSetFromOptions()`, `SNESLineSearchGetType()`,\n`SNESGetLineSearch()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetType\"))\n\"\"\"\nfunction SNESLineSearchSetType(petsclib::PetscLibType, linesearch::SNESLineSearch, type::SNESLineSearchType) end\n\n@for_petsc function SNESLineSearchSetType(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, type::SNESLineSearchType )\n\n    @chk ccall(\n               (:SNESLineSearchSetType, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, SNESLineSearchType),\n               linesearch, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetSNES(petsclib::PetscLibType,linesearch::SNESLineSearch, snes::PetscSNES) \nSets the `SNES` for the linesearch for function evaluation.\n\nInput Parameters:\n- `linesearch` - the line search context\n- `snes`       - The `SNES` instance\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetSNES()`, `SNESLineSearchSetVecs()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetSNES\"))\n\"\"\"\nfunction SNESLineSearchSetSNES(petsclib::PetscLibType, linesearch::SNESLineSearch, snes::PetscSNES) end\n\n@for_petsc function SNESLineSearchSetSNES(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESLineSearchSetSNES, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, CSNES),\n               linesearch, snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchGetSNES(petsclib::PetscLibType,linesearch::SNESLineSearch, snes::PetscSNES) \nGets the `SNES` instance associated with the line search.\n\nNot Collective\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameter:\n- `snes` - The `SNES` instance\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESType`, `SNESLineSearchSetVecs()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetSNES\"))\n\"\"\"\nfunction SNESLineSearchGetSNES(petsclib::PetscLibType, linesearch::SNESLineSearch, snes::PetscSNES) end\n\n@for_petsc function SNESLineSearchGetSNES(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, snes::PetscSNES )\n\tsnes_ = Ref(snes.ptr)\n\n    @chk ccall(\n               (:SNESLineSearchGetSNES, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{CSNES}),\n               linesearch, snes_,\n              )\n\n\tsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tlambda::PetscReal = SNESLineSearchGetLambda(petsclib::PetscLibType,linesearch::SNESLineSearch) \nGets the last line search `lambda` used\n\nNot Collective\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameter:\n- `lambda` - The last `lambda` (scaling of the solution update) computed during `SNESLineSearchApply()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetLambda()`, `SNESLineSearchGetDamping()`, `SNESLineSearchApply()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetLambda\"))\n\"\"\"\nfunction SNESLineSearchGetLambda(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchGetLambda(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\tlambda_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESLineSearchGetLambda, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{$PetscReal}),\n               linesearch, lambda_,\n              )\n\n\tlambda = lambda_[]\n\n\treturn lambda\nend \n\n\"\"\"\n\tSNESLineSearchSetLambda(petsclib::PetscLibType,linesearch::SNESLineSearch, lambda::PetscReal) \nSets the line search `lambda` (scaling of the solution update)\n\nInput Parameters:\n- `linesearch` - line search context\n- `lambda`     - The `lambda` to use\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetLambda()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetLambda\"))\n\"\"\"\nfunction SNESLineSearchSetLambda(petsclib::PetscLibType, linesearch::SNESLineSearch, lambda::PetscReal) end\n\n@for_petsc function SNESLineSearchSetLambda(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, lambda::$PetscReal )\n\n    @chk ccall(\n               (:SNESLineSearchSetLambda, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, $PetscReal),\n               linesearch, lambda,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tminlambda::PetscReal,maxlambda::PetscReal,rtol::PetscReal,atol::PetscReal,ltol::PetscReal,max_it::PetscInt = SNESLineSearchGetTolerances(petsclib::PetscLibType,linesearch::SNESLineSearch) \nGets the tolerances for the line search.\n\nNot Collective\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameters:\n- `minlambda` - The minimum `lambda` allowed\n- `maxlambda` - The maximum `lambda` allowed\n- `rtol`      - The relative tolerance for iterative line searches\n- `atol`      - The absolute tolerance for iterative line searches\n- `ltol`      - The change in `lambda` tolerance for iterative line searches\n- `max_it`    - The maximum number of iterations of the line search\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetTolerances()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetTolerances\"))\n\"\"\"\nfunction SNESLineSearchGetTolerances(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchGetTolerances(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\tminlambda_ = Ref{$PetscReal}()\n\tmaxlambda_ = Ref{$PetscReal}()\n\trtol_ = Ref{$PetscReal}()\n\tatol_ = Ref{$PetscReal}()\n\tltol_ = Ref{$PetscReal}()\n\tmax_it_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESLineSearchGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               linesearch, minlambda_, maxlambda_, rtol_, atol_, ltol_, max_it_,\n              )\n\n\tminlambda = minlambda_[]\n\tmaxlambda = maxlambda_[]\n\trtol = rtol_[]\n\tatol = atol_[]\n\tltol = ltol_[]\n\tmax_it = max_it_[]\n\n\treturn minlambda,maxlambda,rtol,atol,ltol,max_it\nend \n\n\"\"\"\n\tSNESLineSearchSetTolerances(petsclib::PetscLibType,linesearch::SNESLineSearch, minlambda::PetscReal, maxlambda::PetscReal, rtol::PetscReal, atol::PetscReal, ltol::PetscReal, max_it::PetscInt) \nSets the tolerances for the linesearch.\n\nCollective\n\nInput Parameters:\n- `linesearch` - the line search context\n- `minlambda`  - The minimum `lambda` allowed\n- `maxlambda`  - The maximum `lambda` allowed\n- `rtol`       - The relative tolerance for iterative line searches\n- `atol`       - The absolute tolerance for iterative line searches\n- `ltol`       - The change in `lambda` tolerance for iterative line searches\n- `max_it`     - The maximum number of iterations of the line search\n\nOptions Database Keys:\n- `-snes_linesearch_minlambda` - The minimum `lambda` allowed\n- `-snes_linesearch_maxlambda` - The maximum `lambda` allowed\n- `-snes_linesearch_rtol`      - Relative tolerance for iterative line searches\n- `-snes_linesearch_atol`      - Absolute tolerance for iterative line searches\n- `-snes_linesearch_ltol`      - Change in `lambda` tolerance for iterative line searches\n- `-snes_linesearch_max_it`    - The number of iterations for iterative line searches\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetTolerances()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetTolerances\"))\n\"\"\"\nfunction SNESLineSearchSetTolerances(petsclib::PetscLibType, linesearch::SNESLineSearch, minlambda::PetscReal, maxlambda::PetscReal, rtol::PetscReal, atol::PetscReal, ltol::PetscReal, max_it::PetscInt) end\n\n@for_petsc function SNESLineSearchSetTolerances(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, minlambda::$PetscReal, maxlambda::$PetscReal, rtol::$PetscReal, atol::$PetscReal, ltol::$PetscReal, max_it::$PetscInt )\n\n    @chk ccall(\n               (:SNESLineSearchSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscInt),\n               linesearch, minlambda, maxlambda, rtol, atol, ltol, max_it,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdamping::PetscReal = SNESLineSearchGetDamping(petsclib::PetscLibType,linesearch::SNESLineSearch) \nGets the line search damping parameter.\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameter:\n- `damping` - The damping parameter\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearchGetStepTolerance()`, `SNESQN`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetDamping\"))\n\"\"\"\nfunction SNESLineSearchGetDamping(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchGetDamping(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\tdamping_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESLineSearchGetDamping, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{$PetscReal}),\n               linesearch, damping_,\n              )\n\n\tdamping = damping_[]\n\n\treturn damping\nend \n\n\"\"\"\n\tSNESLineSearchSetDamping(petsclib::PetscLibType,linesearch::SNESLineSearch, damping::PetscReal) \nSets the line search damping parameter.\n\nInput Parameters:\n- `linesearch` - the line search context\n- `damping`    - The damping parameter\n\nOptions Database Key:\n- `-snes_linesearch_damping <damping>` - the damping value\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetDamping()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetDamping\"))\n\"\"\"\nfunction SNESLineSearchSetDamping(petsclib::PetscLibType, linesearch::SNESLineSearch, damping::PetscReal) end\n\n@for_petsc function SNESLineSearchSetDamping(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, damping::$PetscReal )\n\n    @chk ccall(\n               (:SNESLineSearchSetDamping, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, $PetscReal),\n               linesearch, damping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\torder::PetscInt = SNESLineSearchGetOrder(petsclib::PetscLibType,linesearch::SNESLineSearch) \nGets the line search approximation order.\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameter:\n- `order` - The order\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetOrder()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetOrder\"))\n\"\"\"\nfunction SNESLineSearchGetOrder(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchGetOrder(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\torder_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESLineSearchGetOrder, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{$PetscInt}),\n               linesearch, order_,\n              )\n\n\torder = order_[]\n\n\treturn order\nend \n\n\"\"\"\n\tSNESLineSearchSetOrder(petsclib::PetscLibType,linesearch::SNESLineSearch, order::PetscInt) \nSets the maximum order of the polynomial fit used in the line search\n\nInput Parameters:\n- `linesearch` - the line search context\n- `order`      - The order\n\nLevel: intermediate\n\nValues for `order`:\n- `1 or `SNES_LINESEARCH_ORDER_LINEAR`  - linear order\n- `2 or `SNES_LINESEARCH_ORDER_QUADRATIC`  - quadratic order\n- `3 or `SNES_LINESEARCH_ORDER_CUBIC`  - cubic order\n\nOptions Database Key:\n- `-snes_linesearch_order <order>` - 1, 2, 3.  Most types only support certain orders (`SNESLINESEARCHBT` supports 2 or 3)\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetOrder()`, `SNESLineSearchSetDamping()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetOrder\"))\n\"\"\"\nfunction SNESLineSearchSetOrder(petsclib::PetscLibType, linesearch::SNESLineSearch, order::PetscInt) end\n\n@for_petsc function SNESLineSearchSetOrder(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, order::$PetscInt )\n\n    @chk ccall(\n               (:SNESLineSearchSetOrder, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, $PetscInt),\n               linesearch, order,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\txnorm::PetscReal,fnorm::PetscReal,ynorm::PetscReal = SNESLineSearchGetNorms(petsclib::PetscLibType,linesearch::SNESLineSearch) \nGets the norms for the current solution `X`, the current update `Y`, and the current function value `F`.\n\nNot Collective\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameters:\n- `xnorm` - The norm of the current solution\n- `fnorm` - The norm of the current function, this is the `norm(function(X))` where `X` is the current solution.\n- `ynorm` - The norm of the current update (after scaling by the linesearch computed `lambda`)\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetNorms()`, `SNESLineSearchGetVecs()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetNorms\"))\n\"\"\"\nfunction SNESLineSearchGetNorms(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchGetNorms(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\txnorm_ = Ref{$PetscReal}()\n\tfnorm_ = Ref{$PetscReal}()\n\tynorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESLineSearchGetNorms, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               linesearch, xnorm_, fnorm_, ynorm_,\n              )\n\n\txnorm = xnorm_[]\n\tfnorm = fnorm_[]\n\tynorm = ynorm_[]\n\n\treturn xnorm,fnorm,ynorm\nend \n\n\"\"\"\n\tSNESLineSearchSetNorms(petsclib::PetscLibType,linesearch::SNESLineSearch, xnorm::PetscReal, fnorm::PetscReal, ynorm::PetscReal) \nSets the computed norms for the current solution `X`, the current update `Y`, and the current function value `F`.\n\nCollective\n\nInput Parameters:\n- `linesearch` - the line search context\n- `xnorm`      - The norm of the current solution\n- `fnorm`      - The norm of the current function, this is the `norm(function(X))` where `X` is the current solution\n- `ynorm`      - The norm of the current update (after scaling by the linesearch computed `lambda`)\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetNorms()`, `SNESLineSearchSetVecs()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetNorms\"))\n\"\"\"\nfunction SNESLineSearchSetNorms(petsclib::PetscLibType, linesearch::SNESLineSearch, xnorm::PetscReal, fnorm::PetscReal, ynorm::PetscReal) end\n\n@for_petsc function SNESLineSearchSetNorms(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, xnorm::$PetscReal, fnorm::$PetscReal, ynorm::$PetscReal )\n\n    @chk ccall(\n               (:SNESLineSearchSetNorms, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, $PetscReal, $PetscReal, $PetscReal),\n               linesearch, xnorm, fnorm, ynorm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchComputeNorms(petsclib::PetscLibType,linesearch::SNESLineSearch) \nExplicitly computes the norms of the current solution `X`, the current update `Y`, and the current function value `F`.\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOptions Database Key:\n- `-snes_linesearch_norms` - turn norm computation on or off\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetNorms`, `SNESLineSearchSetNorms()`, `SNESLineSearchSetComputeNorms()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchComputeNorms\"))\n\"\"\"\nfunction SNESLineSearchComputeNorms(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchComputeNorms(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESLineSearchComputeNorms, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch,),\n               linesearch,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetComputeNorms(petsclib::PetscLibType,linesearch::SNESLineSearch, flg::PetscBool) \nTurns on or off the computation of final norms in the line search.\n\nInput Parameters:\n- `linesearch` - the line search context\n- `flg`        - indicates whether or not to compute norms\n\nOptions Database Key:\n- `-snes_linesearch_norms <true>` - Turns on/off computation of the norms for basic (none) `SNESLINESEARCHBASIC` line search\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetNorms()`, `SNESLineSearchSetNorms()`, `SNESLineSearchComputeNorms()`, `SNESLINESEARCHBASIC`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetComputeNorms\"))\n\"\"\"\nfunction SNESLineSearchSetComputeNorms(petsclib::PetscLibType, linesearch::SNESLineSearch, flg::PetscBool) end\n\n@for_petsc function SNESLineSearchSetComputeNorms(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESLineSearchSetComputeNorms, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, PetscBool),\n               linesearch, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchGetVecs(petsclib::PetscLibType,linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec, W::PetscVec, G::PetscVec) \nGets the vectors from the `SNESLineSearch` context\n\nNot Collective but the vectors are parallel\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameters:\n- `X` - Solution vector\n- `F` - Function vector\n- `Y` - Search direction vector\n- `W` - Solution work vector\n- `G` - Function work vector\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetNorms()`, `SNESLineSearchSetVecs()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetVecs\"))\n\"\"\"\nfunction SNESLineSearchGetVecs(petsclib::PetscLibType, linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec, W::PetscVec, G::PetscVec) end\n\n@for_petsc function SNESLineSearchGetVecs(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec, W::PetscVec, G::PetscVec )\n\tX_ = Ref(X.ptr)\n\tF_ = Ref(F.ptr)\n\tY_ = Ref(Y.ptr)\n\tW_ = Ref(W.ptr)\n\tG_ = Ref(G.ptr)\n\n    @chk ccall(\n               (:SNESLineSearchGetVecs, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{CVec}, Ptr{CVec}, Ptr{CVec}, Ptr{CVec}, Ptr{CVec}),\n               linesearch, X_, F_, Y_, W_, G_,\n              )\n\n\tX.ptr = C_NULL\n\tF.ptr = C_NULL\n\tY.ptr = C_NULL\n\tW.ptr = C_NULL\n\tG.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetVecs(petsclib::PetscLibType,linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec, W::PetscVec, G::PetscVec) \nSets the vectors on the `SNESLineSearch` context\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - the line search context\n- `X`          - Solution vector\n- `F`          - Function vector\n- `Y`          - Search direction vector\n- `W`          - Solution work vector\n- `G`          - Function work vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetNorms()`, `SNESLineSearchGetVecs()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetVecs\"))\n\"\"\"\nfunction SNESLineSearchSetVecs(petsclib::PetscLibType, linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec, W::PetscVec, G::PetscVec) end\n\n@for_petsc function SNESLineSearchSetVecs(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, X::PetscVec, F::PetscVec, Y::PetscVec, W::PetscVec, G::PetscVec )\n\n    @chk ccall(\n               (:SNESLineSearchSetVecs, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, CVec, CVec, CVec, CVec, CVec),\n               linesearch, X, F, Y, W, G,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchAppendOptionsPrefix(petsclib::PetscLibType,linesearch::SNESLineSearch, prefix::String) \nAppends to the prefix used for searching for all\n`SNESLineSearch` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `linesearch` - the `SNESLineSearch` context\n- `prefix`     - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch()`, `SNESLineSearchSetFromOptions()`, `SNESGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchAppendOptionsPrefix\"))\n\"\"\"\nfunction SNESLineSearchAppendOptionsPrefix(petsclib::PetscLibType, linesearch::SNESLineSearch, prefix::String) end\n\n@for_petsc function SNESLineSearchAppendOptionsPrefix(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, prefix::String )\n\n    @chk ccall(\n               (:SNESLineSearchAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{Cchar}),\n               linesearch, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchGetOptionsPrefix(petsclib::PetscLibType,linesearch::SNESLineSearch, prefix::String) \nGets the prefix used for searching for all\nSNESLineSearch options in the database.\n\nNot Collective\n\nInput Parameter:\n- `linesearch` - the `SNESLineSearch` context\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetOptionsPrefix\"))\n\"\"\"\nfunction SNESLineSearchGetOptionsPrefix(petsclib::PetscLibType, linesearch::SNESLineSearch, prefix::String) end\n\n@for_petsc function SNESLineSearchGetOptionsPrefix(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, prefix::String )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:SNESLineSearchGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{Ptr{Cchar}}),\n               linesearch, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetWorkVecs(petsclib::PetscLibType,linesearch::SNESLineSearch, nwork::PetscInt) \nSets work vectors for the line search.\n\nInput Parameters:\n- `linesearch` - the `SNESLineSearch` context\n- `nwork`      - the number of work vectors\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESSetWorkVecs()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetWorkVecs\"))\n\"\"\"\nfunction SNESLineSearchSetWorkVecs(petsclib::PetscLibType, linesearch::SNESLineSearch, nwork::PetscInt) end\n\n@for_petsc function SNESLineSearchSetWorkVecs(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, nwork::$PetscInt )\n\n    @chk ccall(\n               (:SNESLineSearchSetWorkVecs, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, $PetscInt),\n               linesearch, nwork,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchGetReason(petsclib::PetscLibType,linesearch::SNESLineSearch, result::SNESLineSearchReason) \nGets the success/failure status of the last line search application\n\nInput Parameter:\n- `linesearch` - the line search context\n\nOutput Parameter:\n- `result` - The success or failure status\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetReason()`, `SNESLineSearchReason`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetReason\"))\n\"\"\"\nfunction SNESLineSearchGetReason(petsclib::PetscLibType, linesearch::SNESLineSearch, result::SNESLineSearchReason) end\n\n@for_petsc function SNESLineSearchGetReason(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, result::SNESLineSearchReason )\n\n    @chk ccall(\n               (:SNESLineSearchGetReason, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{SNESLineSearchReason}),\n               linesearch, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetReason(petsclib::PetscLibType,linesearch::SNESLineSearch, result::SNESLineSearchReason) \nSets the success/failure status of the line search application\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `linesearch` - the line search context\n- `result`     - The success or failure status\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchReason`, `SNESLineSearchGetSResult()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetReason\"))\n\"\"\"\nfunction SNESLineSearchSetReason(petsclib::PetscLibType, linesearch::SNESLineSearch, result::SNESLineSearchReason) end\n\n@for_petsc function SNESLineSearchSetReason(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, result::SNESLineSearchReason )\n\n    @chk ccall(\n               (:SNESLineSearchSetReason, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, SNESLineSearchReason),\n               linesearch, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchSetVIFunctions(petsclib::PetscLibType,linesearch::SNESLineSearch, projectfunc::SNESLineSearchVIProjectFn, normfunc::SNESLineSearchVINormFn, dirderivfunc::SNESLineSearchVIDirDerivFn) \nSets VI\n\nLogically Collective\n\nInput Parameters:\n- `linesearch`   - the linesearch object\n- `projectfunc`  - function for projecting the function to the bounds, see `SNESLineSearchVIProjectFn` for calling sequence\n- `normfunc`     - function for computing the norm of an active set, see `SNESLineSearchVINormFn` for calling sequence\n- `dirderivfunc` - function for computing the directional derivative of an active set, see `SNESLineSearchVIDirDerivFn` for calling sequence\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchGetVIFunctions()`, `SNESLineSearchSetPostCheck()`, `SNESLineSearchSetPreCheck()`,\n`SNESLineSearchVIProjectFn`, `SNESLineSearchVINormFn`, `SNESLineSearchVIDirDerivFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchSetVIFunctions\"))\n\"\"\"\nfunction SNESLineSearchSetVIFunctions(petsclib::PetscLibType, linesearch::SNESLineSearch, projectfunc::SNESLineSearchVIProjectFn, normfunc::SNESLineSearchVINormFn, dirderivfunc::SNESLineSearchVIDirDerivFn) end\n\n@for_petsc function SNESLineSearchSetVIFunctions(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, projectfunc::SNESLineSearchVIProjectFn, normfunc::SNESLineSearchVINormFn, dirderivfunc::SNESLineSearchVIDirDerivFn )\n\n    @chk ccall(\n               (:SNESLineSearchSetVIFunctions, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{SNESLineSearchVIProjectFn}, Ptr{SNESLineSearchVINormFn}, Ptr{SNESLineSearchVIDirDerivFn}),\n               linesearch, projectfunc, normfunc, dirderivfunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchGetVIFunctions(petsclib::PetscLibType,linesearch::SNESLineSearch, projectfunc::SNESLineSearchVIProjectFn, normfunc::SNESLineSearchVINormFn, dirderivfunc::SNESLineSearchVIDirDerivFn) \nSets VI\n\nNot Collective\n\nInput Parameter:\n- `linesearch` - the line search context, obtain with `SNESGetLineSearch()`\n\nOutput Parameters:\n- `projectfunc`  - function for projecting the function to the bounds, see `SNESLineSearchVIProjectFn` for calling sequence\n- `normfunc`     - function for computing the norm of an active set, see `SNESLineSearchVINormFn ` for calling sequence\n- `dirderivfunc` - function for computing the directional derivative of an active set, see `SNESLineSearchVIDirDerivFn` for calling sequence\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchSetVIFunctions()`, `SNESLineSearchGetPostCheck()`, `SNESLineSearchGetPreCheck()`,\n`SNESLineSearchVIProjectFn`, `SNESLineSearchVINormFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchGetVIFunctions\"))\n\"\"\"\nfunction SNESLineSearchGetVIFunctions(petsclib::PetscLibType, linesearch::SNESLineSearch, projectfunc::SNESLineSearchVIProjectFn, normfunc::SNESLineSearchVINormFn, dirderivfunc::SNESLineSearchVIDirDerivFn) end\n\n@for_petsc function SNESLineSearchGetVIFunctions(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, projectfunc::SNESLineSearchVIProjectFn, normfunc::SNESLineSearchVINormFn, dirderivfunc::SNESLineSearchVIDirDerivFn )\n\n    @chk ccall(\n               (:SNESLineSearchGetVIFunctions, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, SNESLineSearchVIProjectFn, SNESLineSearchVINormFn, SNESLineSearchVIDirDerivFn),\n               linesearch, projectfunc, normfunc, dirderivfunc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchRegister(petsclib::PetscLibType,sname::String, fnc::external) \nregister a line search type `SNESLineSearchType`\n\nLogically Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of the `SNESLineSearchType()`\n- `function` - the creation function for that type\n\nCalling sequence of `function`:\n- `ls` - the line search context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchType`, `SNESLineSearchSetType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchRegister\"))\n\"\"\"\nfunction SNESLineSearchRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function SNESLineSearchRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:SNESLineSearchRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchShellSetApply(petsclib::PetscLibType,linesearch::SNESLineSearch, func::SNESLineSearchShellApplyFn, ctx::Cvoid) \nSets the apply function for the `SNESLINESEARCHSHELL` implementation.\n\nNot Collective\n\nInput Parameters:\n- `linesearch` - `SNESLineSearch` context\n- `func`       - function implementing the linesearch shell, see `SNESLineSearchShellApplyFn` for calling sequence\n- `ctx`        - context for func\n\nUsage:\n-seealso: [](ch_snes), `SNESLineSearchShellGetApply()`, `SNESLINESEARCHSHELL`, `SNESLineSearchType`, `SNESLineSearch`,\n`SNESLineSearchShellApplyFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchShellSetApply\"))\n\"\"\"\nfunction SNESLineSearchShellSetApply(petsclib::PetscLibType, linesearch::SNESLineSearch, func::SNESLineSearchShellApplyFn, ctx::Cvoid) end\n\n@for_petsc function SNESLineSearchShellSetApply(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, func::SNESLineSearchShellApplyFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESLineSearchShellSetApply, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{SNESLineSearchShellApplyFn}, Ptr{Cvoid}),\n               linesearch, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchShellGetApply(petsclib::PetscLibType,linesearch::SNESLineSearch, func::SNESLineSearchShellApplyFn, ctx::Cvoid) \nGets the apply function and context for the `SNESLINESEARCHSHELL`\n\nNot Collective\n\nInput Parameter:\n- `linesearch` - the line search object\n\nOutput Parameters:\n- `func` - the user function; can be `NULL` if it is not needed, see `SNESLineSearchShellApplyFn` for calling sequence\n- `ctx`  - the user function context; can be `NULL` if it is not needed\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESLineSearchShellSetApply()`, `SNESLINESEARCHSHELL`, `SNESLineSearchType`, `SNESLineSearch`,\n`SNESLineSearchShellApplyFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchShellGetApply\"))\n\"\"\"\nfunction SNESLineSearchShellGetApply(petsclib::PetscLibType, linesearch::SNESLineSearch, func::SNESLineSearchShellApplyFn, ctx::Cvoid) end\n\n@for_petsc function SNESLineSearchShellGetApply(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, func::SNESLineSearchShellApplyFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESLineSearchShellGetApply, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, SNESLineSearchShellApplyFn, Cvoid),\n               linesearch, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESLineSearchBTSetAlpha(petsclib::PetscLibType,linesearch::SNESLineSearch, alpha::PetscReal) \nSets the descent parameter, `alpha`, in the `SNESLINESEARCHBT` `SNESLineSearch` variant.\n\nInput Parameters:\n- `linesearch` - linesearch context\n- `alpha`      - The descent parameter\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESLineSearch`, `SNESLineSearchSetLambda()`, `SNESLineSearchGetTolerances()`, `SNESLINESEARCHBT`, `SNESLineSearchBTGetAlpha()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchBTSetAlpha\"))\n\"\"\"\nfunction SNESLineSearchBTSetAlpha(petsclib::PetscLibType, linesearch::SNESLineSearch, alpha::PetscReal) end\n\n@for_petsc function SNESLineSearchBTSetAlpha(petsclib::$UnionPetscLib, linesearch::SNESLineSearch, alpha::$PetscReal )\n\n    @chk ccall(\n               (:SNESLineSearchBTSetAlpha, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, $PetscReal),\n               linesearch, alpha,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\talpha::PetscReal = SNESLineSearchBTGetAlpha(petsclib::PetscLibType,linesearch::SNESLineSearch) \nGets the descent parameter, `alpha`, in the `SNESLINESEARCHBT` variant that was set with `SNESLineSearchBTSetAlpha()`\n\nInput Parameter:\n- `linesearch` - linesearch context\n\nOutput Parameter:\n- `alpha` - The descent parameter\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESLineSearch`, `SNESLineSearchGetLambda()`, `SNESLineSearchGetTolerances()`, `SNESLINESEARCHBT`, `SNESLineSearchBTSetAlpha()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLineSearchBTGetAlpha\"))\n\"\"\"\nfunction SNESLineSearchBTGetAlpha(petsclib::PetscLibType, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESLineSearchBTGetAlpha(petsclib::$UnionPetscLib, linesearch::SNESLineSearch )\n\talpha_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESLineSearchBTGetAlpha, $petsc_library),\n               PetscErrorCode,\n               (SNESLineSearch, Ptr{$PetscReal}),\n               linesearch, alpha_,\n              )\n\n\talpha = alpha_[]\n\n\treturn alpha\nend \n\n"
  },
  {
    "path": "src/autowrapped/SNES_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct SNESFunctionFn end\n\nmutable struct SNESNGSFn end\n\nmutable struct SNESJacobianFn end\n\nmutable struct SNESInitialGuessFn end\n\nmutable struct SNESUpdateFn end\n\nmutable struct _n_SNESLineSearch end\nconst SNESLineSearch = Ptr{_n_SNESLineSearch}\n\nmutable struct SNESObjectiveFn end\n\n# -------------------------------------------------------\n\"\"\"\n\tSNESMonitorSolution(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors progress of a `SNES` `SNESSolve()` by calling\n`VecView()` for the approximate solution at each iteration.\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual\n- `vf`     - a viewer\n\nOptions Database Key:\n- `-snes_monitor_solution [ascii binary draw][:filename][:viewer format]` - plots solution at each iteration\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESMonitorSet()`, `SNESMonitorDefault()`, `VecView()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorSolution\"))\n\"\"\"\nfunction SNESMonitorSolution(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorSolution(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorSolution, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorResidual(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors progress of a `SNESSolve()` by calling\n`VecView()` for the residual at each iteration.\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual\n- `vf`     - a viewer\n\nOptions Database Key:\n- `-snes_monitor_residual [ascii binary draw][:filename][:viewer format]` - plots residual (not its norm) at each iteration\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESMonitorSet()`, `SNESMonitorDefault()`, `VecView()`, `SNESMonitor()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorResidual\"))\n\"\"\"\nfunction SNESMonitorResidual(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorResidual(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorResidual, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorSolutionUpdate(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors progress of a `SNESSolve()` by calling\n`VecView()` for the UPDATE to the solution at each iteration.\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual\n- `vf`     - a viewer\n\nOptions Database Key:\n- `-snes_monitor_solution_update [ascii binary draw][:filename][:viewer format]` - plots update to solution at each iteration\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNESMonitorDefault()`, `VecView()`, `SNESMonitor()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorSolutionUpdate\"))\n\"\"\"\nfunction SNESMonitorSolutionUpdate(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorSolutionUpdate(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorSolutionUpdate, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorDefaultSetUp(petsclib::PetscLibType,snes::PetscSNES, vf::PetscViewerAndFormat) \n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorDefaultSetUp\"))\n\"\"\"\nfunction SNESMonitorDefaultSetUp(petsclib::PetscLibType, snes::PetscSNES, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorDefaultSetUp(petsclib::$UnionPetscLib, snes::PetscSNES, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorDefaultSetUp, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscViewerAndFormat}),\n               snes, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorDefault(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors progress of a `SNESSolve()` (default).\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual\n- `vf`     - viewer and format structure\n\nOptions Database Key:\n- `-snes_monitor` - use this function to monitor the convergence of the nonlinear solver\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNESMonitorSolution()`, `SNESMonitorFunction()`, `SNESMonitorResidual()`,\n`SNESMonitorSolutionUpdate()`, `SNESMonitorScaling()`, `SNESMonitorRange()`, `SNESMonitorRatio()`,\n`SNESMonitorDefaultField()`, `PetscViewerFormat`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorDefault\"))\n\"\"\"\nfunction SNESMonitorDefault(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorDefault(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorDefault, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorScaling(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors the largest value in each row of the Jacobian of a `SNESSolve()`\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual\n- `vf`     - viewer and format structure\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNESMonitorSolution()`, `SNESMonitorRange()`, `SNESMonitorJacUpdateSpectrum()`,\n`PetscViewerFormat`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorScaling\"))\n\"\"\"\nfunction SNESMonitorScaling(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorScaling(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorScaling, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorJacUpdateSpectrum(petsclib::PetscLibType,snes::PetscSNES, it::PetscInt, fnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors the spectrun of the change in the Jacobian from the last Jacobian evaluation of a `SNESSolve()`\n\nCollective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `it`    - iteration number\n- `fnorm` - 2-norm of residual\n- `vf`    - viewer and format structure\n\nOptions Database Key:\n- `-snes_monitor_jacupdate_spectrum` - activates this monitor\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNESMonitorSolution()`, `SNESMonitorRange()`, `PetscViewerFormat`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorJacUpdateSpectrum\"))\n\"\"\"\nfunction SNESMonitorJacUpdateSpectrum(petsclib::PetscLibType, snes::PetscSNES, it::PetscInt, fnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorJacUpdateSpectrum(petsclib::$UnionPetscLib, snes::PetscSNES, it::$PetscInt, fnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorJacUpdateSpectrum, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, it, fnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorRange(petsclib::PetscLibType,snes::PetscSNES, it::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) \nPrints the percentage of residual elements that are more than 10 percent of the maximum entry in the residual in each iteration of a `SNESSolve()`\n\nCollective\n\nInput Parameters:\n- `snes`  - `SNES` iterative context\n- `it`    - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - unused monitor context\n\nOptions Database Key:\n- `-snes_monitor_range` - Activates `SNESMonitorRange()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNESMonitorDefault()`, `SNESMonitorLGCreate()`, `SNESMonitorScaling()`, `PetscViewerFormat`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorRange\"))\n\"\"\"\nfunction SNESMonitorRange(petsclib::PetscLibType, snes::PetscSNES, it::PetscInt, rnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorRange(petsclib::$UnionPetscLib, snes::PetscSNES, it::$PetscInt, rnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorRange, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, it, rnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorRatio(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors progress of a `SNESSolve()` by printing the ratio of residual norm at each iteration to the previous.\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual (or gradient)\n- `vf`     - context of monitor\n\nOptions Database Key:\n- `-snes_monitor_ratio` - activate this monitor\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorRationSetUp()`, `SNESMonitorSet()`, `SNESMonitorSolution()`, `SNESMonitorDefault()`, `PetscViewerFormat`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorRatio\"))\n\"\"\"\nfunction SNESMonitorRatio(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorRatio(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorRatio, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorRatioSetUp(petsclib::PetscLibType,snes::PetscSNES, vf::PetscViewerAndFormat) \nInsures the `SNES` object is saving its history since this monitor needs access to it\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `vf`   - `PetscViewerAndFormat` (ignored)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNESMonitorSolution()`, `SNESMonitorDefault()`, `SNESMonitorRatio()`, `PetscViewerFormat`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorRatioSetUp\"))\n\"\"\"\nfunction SNESMonitorRatioSetUp(petsclib::PetscLibType, snes::PetscSNES, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorRatioSetUp(petsclib::$UnionPetscLib, snes::PetscSNES, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorRatioSetUp, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscViewerAndFormat}),\n               snes, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorDefaultShort(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorDefaultShort\"))\n\"\"\"\nfunction SNESMonitorDefaultShort(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorDefaultShort(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorDefaultShort, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorDefaultField(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors progress of a `SNESSolve()`, separated into fields.\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual\n- `vf`     - the PetscViewer\n\nOptions Database Key:\n- `-snes_monitor_field` - activate this monitor\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNESMonitorSolution()`, `SNESMonitorDefault()`, `PetscViewerFormat`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorDefaultField\"))\n\"\"\"\nfunction SNESMonitorDefaultField(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorDefaultField(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorDefaultField, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESConvergedDefault(petsclib::PetscLibType,snes::PetscSNES, it::PetscInt, xnorm::PetscReal, snorm::PetscReal, fnorm::PetscReal, reason::SNESConvergedReason, dummy::Cvoid) \nDefault convergence test for `SNESSolve()`.\n\nCollective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `it`    - the iteration (0 indicates before any Newton steps)\n- `xnorm` - 2-norm of current iterate\n- `snorm` - 2-norm of current step\n- `fnorm` - 2-norm of function at current iterate\n- `dummy` - unused context\n\nOutput Parameter:\n- `reason` - converged reason, see `SNESConvergedReason`\n\nOptions Database Keys:\n- `-snes_convergence_test default`      - see `SNESSetFromOptions()`\n- `-snes_stol`                          - convergence tolerance in terms of the norm of the change in the solution between steps\n- `-snes_atol <abstol>`                 - absolute tolerance of residual norm\n- `-snes_rtol <rtol>`                   - relative decrease in tolerance norm from the initial 2-norm of the solution\n- `-snes_divergence_tolerance <divtol>` - if the residual goes above divtol*rnorm0, exit with divergence\n- `-snes_max_funcs <max_funcs>`         - maximum number of function evaluations, use `unlimited` for no maximum\n- `-snes_max_fail <max_fail>`           - maximum number of line search failures allowed before stopping, default is none\n- `-snes_max_linear_solve_fail`         - number of linear solver failures before `SNESSolve()` stops\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetConvergenceTest()`, `SNESConvergedSkip()`, `SNESSetTolerances()`, `SNESSetDivergenceTolerance()`,\n`SNESConvergedReason`\n\n# External Links\n$(_doc_external(\"SNES/SNESConvergedDefault\"))\n\"\"\"\nfunction SNESConvergedDefault(petsclib::PetscLibType, snes::PetscSNES, it::PetscInt, xnorm::PetscReal, snorm::PetscReal, fnorm::PetscReal, reason::SNESConvergedReason, dummy::Cvoid) end\n\n@for_petsc function SNESConvergedDefault(petsclib::$UnionPetscLib, snes::PetscSNES, it::$PetscInt, xnorm::$PetscReal, snorm::$PetscReal, fnorm::$PetscReal, reason::SNESConvergedReason, dummy::Cvoid )\n\n    @chk ccall(\n               (:SNESConvergedDefault, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, $PetscReal, $PetscReal, Ptr{SNESConvergedReason}, Ptr{Cvoid}),\n               snes, it, xnorm, snorm, fnorm, reason, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESConvergedSkip(petsclib::PetscLibType,snes::PetscSNES, it::PetscInt, xnorm::PetscReal, snorm::PetscReal, fnorm::PetscReal, reason::SNESConvergedReason, dummy::Cvoid) \nConvergence test for `SNES` that NEVER returns as\nconverged, UNLESS the maximum number of iteration have been reached.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `it`    - the iteration (0 indicates before any Newton steps)\n- `xnorm` - 2-norm of current iterate\n- `snorm` - 2-norm of current step\n- `fnorm` - 2-norm of function at current iterate\n- `dummy` - unused context\n\nOutput Parameter:\n- `reason` - `SNES_CONVERGED_ITERATING`, `SNES_CONVERGED_ITS`, or `SNES_DIVERGED_FNORM_NAN`\n\nOptions Database Key:\n- `-snes_convergence_test skip` - see `SNESSetFromOptions()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESConvergedDefault()`, `SNESSetConvergenceTest()`, `SNESConvergedReason`\n\n# External Links\n$(_doc_external(\"SNES/SNESConvergedSkip\"))\n\"\"\"\nfunction SNESConvergedSkip(petsclib::PetscLibType, snes::PetscSNES, it::PetscInt, xnorm::PetscReal, snorm::PetscReal, fnorm::PetscReal, reason::SNESConvergedReason, dummy::Cvoid) end\n\n@for_petsc function SNESConvergedSkip(petsclib::$UnionPetscLib, snes::PetscSNES, it::$PetscInt, xnorm::$PetscReal, snorm::$PetscReal, fnorm::$PetscReal, reason::SNESConvergedReason, dummy::Cvoid )\n\n    @chk ccall(\n               (:SNESConvergedSkip, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, $PetscReal, $PetscReal, Ptr{SNESConvergedReason}, Ptr{Cvoid}),\n               snes, it, xnorm, snorm, fnorm, reason, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetWorkVecs(petsclib::PetscLibType,snes::PetscSNES, nw::PetscInt) \nAllocates a number of work vectors to be used internally by the `SNES` solver\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `nw`   - number of work vectors to allocate\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetWorkVecs\"))\n\"\"\"\nfunction SNESSetWorkVecs(petsclib::PetscLibType, snes::PetscSNES, nw::PetscInt) end\n\n@for_petsc function SNESSetWorkVecs(petsclib::$UnionPetscLib, snes::PetscSNES, nw::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetWorkVecs, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, nw,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the PETSc interface to the `SNES` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFinalizePackage\"))\n\"\"\"\nfunction SNESFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function SNESFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:SNESFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `SNES` package. It is called\nfrom PetscDLLibraryRegister_petscsnes() when using dynamic libraries, and on the first call to `SNESCreate()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"SNES/SNESInitializePackage\"))\n\"\"\"\nfunction SNESInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function SNESInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:SNESInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetErrorIfNotConverged(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \nCauses `SNESSolve()` to generate an error immediately if the solver has not converged.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - iterative context obtained from `SNESCreate()`\n- `flg`  - `PETSC_TRUE` indicates you want the error generated\n\nOptions Database Key:\n- `-snes_error_if_not_converged <true,false>` - cause an immediate error condition and stop the program if the solver does not converge\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetErrorIfNotConverged()`, `KSPGetErrorIfNotConverged()`, `KSPSetErrorIfNotConverged()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetErrorIfNotConverged\"))\n\"\"\"\nfunction SNESSetErrorIfNotConverged(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESSetErrorIfNotConverged(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESSetErrorIfNotConverged, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = SNESGetErrorIfNotConverged(petsclib::PetscLibType,snes::PetscSNES) \nIndicates if `SNESSolve()` will generate an error if the solver does not converge?\n\nNot Collective\n\nInput Parameter:\n- `snes` - iterative context obtained from `SNESCreate()`\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` if it will generate an error, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetErrorIfNotConverged()`, `KSPGetErrorIfNotConverged()`, `KSPSetErrorIfNotConverged()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetErrorIfNotConverged\"))\n\"\"\"\nfunction SNESGetErrorIfNotConverged(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetErrorIfNotConverged(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESGetErrorIfNotConverged, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tSNESSetAlwaysComputesFinalResidual(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \ntells the `SNES` to always compute the residual (nonlinear function value) at the final solution\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the shell `SNES`\n- `flg`  - `PETSC_TRUE` to always compute the residual\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESSolve()`, `SNESGetAlwaysComputesFinalResidual()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetAlwaysComputesFinalResidual\"))\n\"\"\"\nfunction SNESSetAlwaysComputesFinalResidual(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESSetAlwaysComputesFinalResidual(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESSetAlwaysComputesFinalResidual, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = SNESGetAlwaysComputesFinalResidual(petsclib::PetscLibType,snes::PetscSNES) \nchecks if the `SNES` always computes the residual at the final solution\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the residual is computed\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESSolve()`, `SNESSetAlwaysComputesFinalResidual()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetAlwaysComputesFinalResidual\"))\n\"\"\"\nfunction SNESGetAlwaysComputesFinalResidual(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetAlwaysComputesFinalResidual(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESGetAlwaysComputesFinalResidual, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tSNESSetFunctionDomainError(petsclib::PetscLibType,snes::PetscSNES) \ntells `SNES` that the input vector, a proposed new solution, to your function you provided to `SNESSetFunction()` is not\nin the functions domain. For example, a step with negative pressure.\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESCreate()`, `SNESSetFunction()`, `SNESFunctionFn`, `SNESSetJacobianDomainError()`, `SNESVISetVariableBounds()`,\n`SNESVISetComputeVariableBounds()`, `SNESLineSearchSetPreCheck()`, `SNESLineSearchSetPostCheck()`, `SNESConvergedReason`, `SNESGetConvergedReason()`,\n`SNES_DIVERGED_FUNCTION_DOMAIN`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetFunctionDomainError\"))\n\"\"\"\nfunction SNESSetFunctionDomainError(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESSetFunctionDomainError(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESSetFunctionDomainError, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetJacobianDomainError(petsclib::PetscLibType,snes::PetscSNES) \ntells `SNES` that the function you provided to `SNESSetJacobian()` at the proposed step. For example there is a negative element transformation.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESCreate()`, `SNESSetFunction()`, `SNESFunctionFn`, `SNESSetFunctionDomainError()`, `SNESVISetVariableBounds()`,\n`SNESVISetComputeVariableBounds()`, `SNESLineSearchSetPreCheck()`, `SNESLineSearchSetPostCheck()`, `SNESConvergedReason`, `SNESGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetJacobianDomainError\"))\n\"\"\"\nfunction SNESSetJacobianDomainError(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESSetJacobianDomainError(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESSetJacobianDomainError, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetCheckJacobianDomainError(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \ntells `SNESSolve()` whether to check if the user called `SNESSetJacobianDomainError()` Jacobian domain error after\neach Jacobian evaluation. By default, it checks for the Jacobian domain error in the debug mode, and does not check it in the optimized mode.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `flg`  - indicates if or not to check Jacobian domain error after each Jacobian evaluation\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESConvergedReason`, `SNESCreate()`, `SNESSetFunction()`, `SNESFunctionFn`, `SNESSetFunctionDomainError()`, `SNESGetCheckJacobianDomainError()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetCheckJacobianDomainError\"))\n\"\"\"\nfunction SNESSetCheckJacobianDomainError(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESSetCheckJacobianDomainError(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESSetCheckJacobianDomainError, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = SNESGetCheckJacobianDomainError(petsclib::PetscLibType,snes::PetscSNES) \nGet an indicator whether or not `SNES` is checking Jacobian domain errors after each Jacobian evaluation.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `flg` - `PETSC_FALSE` indicates that it is not checking Jacobian domain errors after each Jacobian evaluation\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESCreate()`, `SNESSetFunction()`, `SNESFunctionFn`, `SNESSetFunctionDomainError()`, `SNESSetCheckJacobianDomainError()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetCheckJacobianDomainError\"))\n\"\"\"\nfunction SNESGetCheckJacobianDomainError(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetCheckJacobianDomainError(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESGetCheckJacobianDomainError, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tdomainerror::PetscBool = SNESGetFunctionDomainError(petsclib::PetscLibType,snes::PetscSNES) \nGets the status of the domain error after a call to `SNESComputeFunction()`\n\nNot Collective, different MPI processes may return different values\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `domainerror` - Set to `PETSC_TRUE` if there's a domain error; `PETSC_FALSE` otherwise.\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetFunctionDomainError()`, `SNESComputeFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetFunctionDomainError\"))\n\"\"\"\nfunction SNESGetFunctionDomainError(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetFunctionDomainError(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tdomainerror_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESGetFunctionDomainError, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, domainerror_,\n              )\n\n\tdomainerror = domainerror_[]\n\n\treturn domainerror\nend \n\n\"\"\"\n\tdomainerror::PetscBool = SNESGetJacobianDomainError(petsclib::PetscLibType,snes::PetscSNES) \nGets the status of the Jacobian domain error after a call to `SNESComputeJacobian()`\n\nNot Collective, different MPI processes may return different values\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `domainerror` - Set to `PETSC_TRUE` if there's a Jacobian domain error; `PETSC_FALSE` otherwise.\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSetFunctionDomainError()`, `SNESComputeFunction()`, `SNESGetFunctionDomainError()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetJacobianDomainError\"))\n\"\"\"\nfunction SNESGetJacobianDomainError(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetJacobianDomainError(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tdomainerror_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESGetJacobianDomainError, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, domainerror_,\n              )\n\n\tdomainerror = domainerror_[]\n\n\treturn domainerror\nend \n\n\"\"\"\n\tSNESLoad(petsclib::PetscLibType,snes::PetscSNES, viewer::PetscViewer) \nLoads a `SNES` that has been stored in `PETSCVIEWERBINARY` with `SNESView()`.\n\nCollective\n\nInput Parameters:\n- `snes`   - the newly loaded `SNES`, this needs to have been created with `SNESCreate()` or\nsome related function before a call to `SNESLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `PetscViewer`, `SNESCreate()`, `SNESType`, `PetscViewerBinaryOpen()`, `SNESView()`, `MatLoad()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"SNES/SNESLoad\"))\n\"\"\"\nfunction SNESLoad(petsclib::PetscLibType, snes::PetscSNES, viewer::PetscViewer) end\n\n@for_petsc function SNESLoad(petsclib::$UnionPetscLib, snes::PetscSNES, viewer::PetscViewer )\n\n    @chk ccall(\n               (:SNESLoad, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscViewer),\n               snes, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESViewFromOptions(petsclib::PetscLibType,A::PetscSNES, obj::PetscObject, name::String) \nView a `SNES` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `SNES` context\n- `obj`  - Optional object that provides the options prefix for the checks\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESView`, `PetscObjectViewFromOptions()`, `SNESCreate()`\n\n# External Links\n$(_doc_external(\"SNES/SNESViewFromOptions\"))\n\"\"\"\nfunction SNESViewFromOptions(petsclib::PetscLibType, A::PetscSNES, obj::PetscObject, name::String) end\n\n@for_petsc function SNESViewFromOptions(petsclib::$UnionPetscLib, A::PetscSNES, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:SNESViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESView(petsclib::PetscLibType,snes::PetscSNES, viewer::PetscViewer) \nPrints or visualizes the `SNES` data structure.\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `viewer` - the `PetscViewer`\n\nOptions Database Key:\n- `-snes_view` - Calls `SNESView()` at end of `SNESSolve()`\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `SNESLoad()`, `SNESCreate()`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"SNES/SNESView\"))\n\"\"\"\nfunction SNESView(petsclib::PetscLibType, snes::PetscSNES, viewer::PetscViewer) end\n\n@for_petsc function SNESView(petsclib::$UnionPetscLib, snes::PetscSNES, viewer::PetscViewer )\n\n    @chk ccall(\n               (:SNESView, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscViewer),\n               snes, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESAddOptionsChecker(petsclib::PetscLibType,snescheck::external) \nAdds an additional function to check for `SNES` options.\n\nNot Collective\n\nInput Parameter:\n- `snescheck` - function that checks for options\n\nCalling sequence of `snescheck`:\n- `snes` - the `SNES` object for which it is checking options\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetFromOptions()`\n\n# External Links\n$(_doc_external(\"SNES/SNESAddOptionsChecker\"))\n\"\"\"\nfunction SNESAddOptionsChecker(petsclib::PetscLibType, snescheck::external) end\n\n@for_petsc function SNESAddOptionsChecker(petsclib::$UnionPetscLib, snescheck::external )\n\n    @chk ccall(\n               (:SNESAddOptionsChecker, $petsc_library),\n               PetscErrorCode,\n               (external,),\n               snescheck,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetUpMatrices(petsclib::PetscLibType,snes::PetscSNES) \nensures that matrices are available for `SNES` Newton\n\nCollective\n\nInput Parameter:\n- `snes` - `SNES` object to configure\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetUp()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetUpMatrices\"))\n\"\"\"\nfunction SNESSetUpMatrices(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESSetUpMatrices(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESSetUpMatrices, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorSetFromOptions(petsclib::PetscLibType,snes::PetscSNES, name::String, help::String, manual::String, monitor::external, monitorsetup::external) \nSets a monitor function and viewer appropriate for the type indicated by the user\n\nCollective\n\nInput Parameters:\n- `snes`         - `SNES` object you wish to monitor\n- `name`         - the monitor type one is seeking\n- `help`         - message indicating what monitoring is done\n- `manual`       - manual page for the monitor\n- `monitor`      - the monitor function, this must use a `PetscViewerFormat` as its context\n- `monitorsetup` - a function that is called once ONLY if the user selected this monitor that may set additional features of the `SNES` or `PetscViewer` objects\n\nCalling sequence of `monitor`:\n- `snes` - the nonlinear solver context\n- `it`   - the current iteration\n- `r`    - the current function norm\n- `vf`   - a `PetscViewerAndFormat` struct that contains the `PetscViewer` and `PetscViewerFormat` to use\n\nCalling sequence of `monitorsetup`:\n- `snes` - the nonlinear solver context\n- `vf`   - a `PetscViewerAndFormat` struct that contains the `PetscViewer` and `PetscViewerFormat` to use\n\nOptions Database Key:\n- `-name` - trigger the use of this monitor in `SNESSetFromOptions()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `PetscOptionsCreateViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorSetFromOptions\"))\n\"\"\"\nfunction SNESMonitorSetFromOptions(petsclib::PetscLibType, snes::PetscSNES, name::String, help::String, manual::String, monitor::external, monitorsetup::external) end\n\n@for_petsc function SNESMonitorSetFromOptions(petsclib::$UnionPetscLib, snes::PetscSNES, name::String, help::String, manual::String, monitor::external, monitorsetup::external )\n\n    @chk ccall(\n               (:SNESMonitorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, external, external),\n               snes, name, help, manual, monitor, monitorsetup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetFromOptions(petsclib::PetscLibType,snes::PetscSNES) \nSets various `SNES` and `KSP` parameters from user options.\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOptions Database Keys:\n- `-snes_type <type>`                                                            - newtonls, newtontr, ngmres, ncg, nrichardson, qn, vi, fas, `SNESType` for complete list\n- `-snes_rtol <rtol>`                                                            - relative decrease in tolerance norm from initial\n- `-snes_atol <abstol>`                                                          - absolute tolerance of residual norm\n- `-snes_stol <stol>`                                                            - convergence tolerance in terms of the norm of the change in the solution between steps\n- `-snes_divergence_tolerance <divtol>`                                          - if the residual goes above divtol*rnorm0, exit with divergence\n- `-snes_max_it <max_it>`                                                        - maximum number of iterations\n- `-snes_max_funcs <max_funcs>`                                                  - maximum number of function evaluations\n- `-snes_force_iteration <force>`                                                - force `SNESSolve()` to take at least one iteration\n- `-snes_max_fail <max_fail>`                                                    - maximum number of line search failures allowed before stopping, default is none\n- `-snes_max_linear_solve_fail`                                                  - number of linear solver failures before SNESSolve() stops\n- `-snes_lag_preconditioner <lag>`                                               - how often preconditioner is rebuilt (use -1 to never rebuild)\n- `-snes_lag_preconditioner_persists <true,false>`                               - retains the -snes_lag_preconditioner information across multiple SNESSolve()\n- `-snes_lag_jacobian <lag>`                                                     - how often Jacobian is rebuilt (use -1 to never rebuild)\n- `-snes_lag_jacobian_persists <true,false>`                                     - retains the -snes_lag_jacobian information across multiple SNESSolve()\n- `-snes_convergence_test <default,skip,correct_pressure>`                       - convergence test in nonlinear solver. default `SNESConvergedDefault()`. skip `SNESConvergedSkip()` means continue iterating until max_it or some other criterion is reached, saving expense of convergence test. correct_pressure `SNESConvergedCorrectPressure()` has special handling of a pressure null space.\n- `-snes_monitor [ascii][:filename][:viewer format]`                             - prints residual norm at each iteration. if no filename given prints to stdout\n- `-snes_monitor_solution [ascii binary draw][:filename][:viewer format]`        - plots solution at each iteration\n- `-snes_monitor_residual [ascii binary draw][:filename][:viewer format]`        - plots residual (not its norm) at each iteration\n- `-snes_monitor_solution_update [ascii binary draw][:filename][:viewer format]` - plots update to solution at each iteration\n- `-snes_monitor_lg_residualnorm`                                                - plots residual norm at each iteration\n- `-snes_monitor_lg_range`                                                       - plots residual norm at each iteration\n- `-snes_monitor_pause_final`                                                    - Pauses all monitor drawing after the solver ends\n- `-snes_fd`                                                                     - use finite differences to compute Jacobian; very slow, only for testing\n- `-snes_fd_color`                                                               - use finite differences with coloring to compute Jacobian\n- `-snes_mf_ksp_monitor`                                                         - if using matrix-free multiply then print h at each `KSP` iteration\n- `-snes_converged_reason`                                                       - print the reason for convergence/divergence after each solve\n- `-npc_snes_type <type>`                                                        - the `SNES` type to use as a nonlinear preconditioner\n- `-snes_test_jacobian <optional threshold>`                                     - compare the user provided Jacobian with one computed via finite differences to check for errors.  If a threshold is given, display only those entries whose difference is greater than the threshold.\n- `-snes_test_jacobian_view`                                                     - display the user provided Jacobian, the finite difference Jacobian and the difference between them to help users detect the location of errors in the user provided Jacobian.\n\nOptions Database Keys for Eisenstat-Walker method:\n- `-snes_ksp_ew`                       - use Eisenstat-Walker method for determining linear system convergence\n- `-snes_ksp_ew_version ver`           - version of  Eisenstat-Walker method\n- `-snes_ksp_ew_rtol0 <rtol0>`         - Sets rtol0\n- `-snes_ksp_ew_rtolmax <rtolmax>`     - Sets rtolmax\n- `-snes_ksp_ew_gamma <gamma>`         - Sets gamma\n- `-snes_ksp_ew_alpha <alpha>`         - Sets alpha\n- `-snes_ksp_ew_alpha2 <alpha2>`       - Sets alpha2\n- `-snes_ksp_ew_threshold <threshold>` - Sets threshold\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNESType`, `SNESSetOptionsPrefix()`, `SNESResetFromOptions()`, `SNES`, `SNESCreate()`, `MatCreateSNESMF()`, `MatFDColoring`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetFromOptions\"))\n\"\"\"\nfunction SNESSetFromOptions(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESSetFromOptions(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESResetFromOptions(petsclib::PetscLibType,snes::PetscSNES) \nSets various `SNES` and `KSP` parameters from user options ONLY if the `SNESSetFromOptions()` was previously called\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSetFromOptions()`, `SNESSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"SNES/SNESResetFromOptions\"))\n\"\"\"\nfunction SNESResetFromOptions(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESResetFromOptions(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESResetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetComputeApplicationContext(petsclib::PetscLibType,snes::PetscSNES, compute::external, destroy::PetscCtxDestroyFn) \nSets an optional function to compute a user\nthe nonlinear solvers.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `snes`    - the `SNES` context\n- `compute` - function to compute the context\n- `destroy` - function to destroy the context, see `PetscCtxDestroyFn` for the calling sequence\n\nCalling sequence of `compute`:\n- `snes` - the `SNES` context\n- `ctx`  - context to be computed\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESGetApplicationContext()`, `SNESSetApplicationContext()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetComputeApplicationContext\"))\n\"\"\"\nfunction SNESSetComputeApplicationContext(petsclib::PetscLibType, snes::PetscSNES, compute::external, destroy::PetscCtxDestroyFn) end\n\n@for_petsc function SNESSetComputeApplicationContext(petsclib::$UnionPetscLib, snes::PetscSNES, compute::external, destroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:SNESSetComputeApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{PetscCtxDestroyFn}),\n               snes, compute, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetApplicationContext(petsclib::PetscLibType,snes::PetscSNES, ctx::Cvoid) \nSets the optional user\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `ctx`  - the user context\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetComputeApplicationContext()`, `SNESGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetApplicationContext\"))\n\"\"\"\nfunction SNESSetApplicationContext(petsclib::PetscLibType, snes::PetscSNES, ctx::Cvoid) end\n\n@for_petsc function SNESSetApplicationContext(petsclib::$UnionPetscLib, snes::PetscSNES, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESSetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cvoid}),\n               snes, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetApplicationContext(petsclib::PetscLibType,snes::PetscSNES, ctx::PeCtx) \nGets the user\nnonlinear solvers set with `SNESGetApplicationContext()` or `SNESSetComputeApplicationContext()`\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `ctx` - user context\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSetApplicationContext()`, `SNESSetComputeApplicationContext()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetApplicationContext\"))\n\"\"\"\nfunction SNESGetApplicationContext(petsclib::PetscLibType, snes::PetscSNES, ctx::PeCtx) end\n\n@for_petsc function SNESGetApplicationContext(petsclib::$UnionPetscLib, snes::PetscSNES, ctx::PeCtx )\n\n    @chk ccall(\n               (:SNESGetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PeCtx),\n               snes, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetUseMatrixFree(petsclib::PetscLibType,snes::PetscSNES, mf_operator::PetscBool, mf::PetscBool) \nindicates that `SNES` should use matrix\n\nLogically Collective\n\nInput Parameters:\n- `snes`        - `SNES` context\n- `mf_operator` - use matrix-free only for the Amat used by `SNESSetJacobian()`, this means the user provided Pmat will continue to be used\n- `mf`          - use matrix-free for both the Amat and Pmat used by `SNESSetJacobian()`, both the Amat and Pmat set in `SNESSetJacobian()` will be ignored. With\nthis option no matrix-element based preconditioners can be used in the linear solve since the matrix won't be explicitly available\n\nOptions Database Keys:\n- `-snes_mf_operator` - use matrix-free only for the mat operator\n- `-snes_mf`          - use matrix-free for both the mat and pmat operator\n- `-snes_fd_color`    - compute the Jacobian via coloring and finite differences.\n- `-snes_fd`          - compute the Jacobian via finite differences (slow)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetUseMatrixFree()`, `MatCreateSNESMF()`, `SNESComputeJacobianDefaultColor()`, `MatFDColoring`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetUseMatrixFree\"))\n\"\"\"\nfunction SNESSetUseMatrixFree(petsclib::PetscLibType, snes::PetscSNES, mf_operator::PetscBool, mf::PetscBool) end\n\n@for_petsc function SNESSetUseMatrixFree(petsclib::$UnionPetscLib, snes::PetscSNES, mf_operator::PetscBool, mf::PetscBool )\n\n    @chk ccall(\n               (:SNESSetUseMatrixFree, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool, PetscBool),\n               snes, mf_operator, mf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmf_operator::PetscBool,mf::PetscBool = SNESGetUseMatrixFree(petsclib::PetscLibType,snes::PetscSNES) \nindicates if the `SNES` uses matrix\n\nNot Collective, but the resulting flags will be the same on all MPI processes\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameters:\n- `mf_operator` - use matrix-free only for the Amat used by `SNESSetJacobian()`, this means the user provided Pmat will continue to be used\n- `mf`          - use matrix-free for both the Amat and Pmat used by `SNESSetJacobian()`, both the Amat and Pmat set in `SNESSetJacobian()` will be ignored\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetUseMatrixFree()`, `MatCreateSNESMF()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetUseMatrixFree\"))\n\"\"\"\nfunction SNESGetUseMatrixFree(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetUseMatrixFree(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tmf_operator_ = Ref{PetscBool}()\n\tmf_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESGetUseMatrixFree, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}, Ptr{PetscBool}),\n               snes, mf_operator_, mf_,\n              )\n\n\tmf_operator = mf_operator_[]\n\tmf = mf_[]\n\n\treturn mf_operator,mf\nend \n\n\"\"\"\n\titer::PetscInt = SNESGetIterationNumber(petsclib::PetscLibType,snes::PetscSNES) \nGets the number of nonlinear iterations completed in the current or most recent `SNESSolve()`\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `iter` - iteration number\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetLagJacobian()`, `SNESGetLinearSolveIterations()`, `SNESSetMonitor()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetIterationNumber\"))\n\"\"\"\nfunction SNESGetIterationNumber(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetIterationNumber(petsclib::$UnionPetscLib, snes::PetscSNES )\n\titer_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetIterationNumber, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, iter_,\n              )\n\n\titer = iter_[]\n\n\treturn iter\nend \n\n\"\"\"\n\tSNESSetIterationNumber(petsclib::PetscLibType,snes::PetscSNES, iter::PetscInt) \nSets the current iteration number.\n\nNot Collective\n\nInput Parameters:\n- `snes` - `SNES` context\n- `iter` - iteration number\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESGetLinearSolveIterations()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetIterationNumber\"))\n\"\"\"\nfunction SNESSetIterationNumber(petsclib::PetscLibType, snes::PetscSNES, iter::PetscInt) end\n\n@for_petsc function SNESSetIterationNumber(petsclib::$UnionPetscLib, snes::PetscSNES, iter::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetIterationNumber, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, iter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnfails::PetscInt = SNESGetNonlinearStepFailures(petsclib::PetscLibType,snes::PetscSNES) \nGets the number of unsuccessful steps\nattempted by the nonlinear solver in the current or most recent `SNESSolve()` .\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `nfails` - number of unsuccessful steps attempted\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetMaxLinearSolveFailures()`, `SNESGetLinearSolveIterations()`, `SNESSetMaxLinearSolveFailures()`, `SNESGetLinearSolveFailures()`,\n`SNESSetMaxNonlinearStepFailures()`, `SNESGetMaxNonlinearStepFailures()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetNonlinearStepFailures\"))\n\"\"\"\nfunction SNESGetNonlinearStepFailures(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetNonlinearStepFailures(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tnfails_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetNonlinearStepFailures, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, nfails_,\n              )\n\n\tnfails = nfails_[]\n\n\treturn nfails\nend \n\n\"\"\"\n\tSNESSetMaxNonlinearStepFailures(petsclib::PetscLibType,snes::PetscSNES, maxFails::PetscInt) \nSets the maximum number of unsuccessful steps\nattempted by the nonlinear solver before it gives up and returns unconverged or generates an error\n\nNot Collective\n\nInput Parameters:\n- `snes`     - `SNES` context\n- `maxFails` - maximum of unsuccessful steps allowed, use `PETSC_UNLIMITED` to have no limit on the number of failures\n\nOptions Database Key:\n- `-snes_max_fail <n>` - maximum number of unsuccessful steps allowed\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSetErrorIfNotConverged()`, `SNESGetMaxLinearSolveFailures()`, `SNESGetLinearSolveIterations()`, `SNESSetMaxLinearSolveFailures()`, `SNESGetLinearSolveFailures()`,\n`SNESGetMaxNonlinearStepFailures()`, `SNESGetNonlinearStepFailures()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetMaxNonlinearStepFailures\"))\n\"\"\"\nfunction SNESSetMaxNonlinearStepFailures(petsclib::PetscLibType, snes::PetscSNES, maxFails::PetscInt) end\n\n@for_petsc function SNESSetMaxNonlinearStepFailures(petsclib::$UnionPetscLib, snes::PetscSNES, maxFails::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetMaxNonlinearStepFailures, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, maxFails,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxFails::PetscInt = SNESGetMaxNonlinearStepFailures(petsclib::PetscLibType,snes::PetscSNES) \nGets the maximum number of unsuccessful steps\nattempted by the nonlinear solver before it gives up and returns unconverged or generates an error\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `maxFails` - maximum of unsuccessful steps\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSetErrorIfNotConverged()`, `SNESGetMaxLinearSolveFailures()`, `SNESGetLinearSolveIterations()`, `SNESSetMaxLinearSolveFailures()`, `SNESGetLinearSolveFailures()`,\n`SNESSetMaxNonlinearStepFailures()`, `SNESGetNonlinearStepFailures()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetMaxNonlinearStepFailures\"))\n\"\"\"\nfunction SNESGetMaxNonlinearStepFailures(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetMaxNonlinearStepFailures(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tmaxFails_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetMaxNonlinearStepFailures, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, maxFails_,\n              )\n\n\tmaxFails = maxFails_[]\n\n\treturn maxFails\nend \n\n\"\"\"\n\tnfuncs::PetscInt = SNESGetNumberFunctionEvals(petsclib::PetscLibType,snes::PetscSNES) \nGets the number of user provided function evaluations\ndone by the `SNES` object in the current or most recent `SNESSolve()`\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `nfuncs` - number of evaluations\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetMaxLinearSolveFailures()`, `SNESGetLinearSolveIterations()`, `SNESSetMaxLinearSolveFailures()`, `SNESGetLinearSolveFailures()`, `SNESSetCountersReset()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetNumberFunctionEvals\"))\n\"\"\"\nfunction SNESGetNumberFunctionEvals(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetNumberFunctionEvals(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tnfuncs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetNumberFunctionEvals, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, nfuncs_,\n              )\n\n\tnfuncs = nfuncs_[]\n\n\treturn nfuncs\nend \n\n\"\"\"\n\tnfails::PetscInt = SNESGetLinearSolveFailures(petsclib::PetscLibType,snes::PetscSNES) \nGets the number of failed (non\nlinear solvers in the current or most recent `SNESSolve()`\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `nfails` - number of failed solves\n\nOptions Database Key:\n- `-snes_max_linear_solve_fail <num>` - The number of failures before the solve is terminated\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESGetMaxLinearSolveFailures()`, `SNESGetLinearSolveIterations()`, `SNESSetMaxLinearSolveFailures()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetLinearSolveFailures\"))\n\"\"\"\nfunction SNESGetLinearSolveFailures(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetLinearSolveFailures(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tnfails_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetLinearSolveFailures, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, nfails_,\n              )\n\n\tnfails = nfails_[]\n\n\treturn nfails\nend \n\n\"\"\"\n\tSNESSetMaxLinearSolveFailures(petsclib::PetscLibType,snes::PetscSNES, maxFails::PetscInt) \nthe number of failed linear solve attempts\nallowed before `SNES` returns with a diverged reason of `SNES_DIVERGED_LINEAR_SOLVE`\n\nLogically Collective\n\nInput Parameters:\n- `snes`     - `SNES` context\n- `maxFails` - maximum allowed linear solve failures, use `PETSC_UNLIMITED` to have no limit on the number of failures\n\nOptions Database Key:\n- `-snes_max_linear_solve_fail <num>` - The number of failures before the solve is terminated\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSetErrorIfNotConverged()`, `SNESGetLinearSolveFailures()`, `SNESGetMaxLinearSolveFailures()`, `SNESGetLinearSolveIterations()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetMaxLinearSolveFailures\"))\n\"\"\"\nfunction SNESSetMaxLinearSolveFailures(petsclib::PetscLibType, snes::PetscSNES, maxFails::PetscInt) end\n\n@for_petsc function SNESSetMaxLinearSolveFailures(petsclib::$UnionPetscLib, snes::PetscSNES, maxFails::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetMaxLinearSolveFailures, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, maxFails,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxFails::PetscInt = SNESGetMaxLinearSolveFailures(petsclib::PetscLibType,snes::PetscSNES) \ngets the maximum number of linear solve failures that\nare allowed before `SNES` returns as unsuccessful\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `maxFails` - maximum of unsuccessful solves allowed\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSetErrorIfNotConverged()`, `SNESGetLinearSolveFailures()`, `SNESGetLinearSolveIterations()`, `SNESSetMaxLinearSolveFailures()`,\n\n# External Links\n$(_doc_external(\"SNES/SNESGetMaxLinearSolveFailures\"))\n\"\"\"\nfunction SNESGetMaxLinearSolveFailures(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetMaxLinearSolveFailures(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tmaxFails_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetMaxLinearSolveFailures, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, maxFails_,\n              )\n\n\tmaxFails = maxFails_[]\n\n\treturn maxFails\nend \n\n\"\"\"\n\tlits::PetscInt = SNESGetLinearSolveIterations(petsclib::PetscLibType,snes::PetscSNES) \nGets the total number of linear iterations\nused by the nonlinear solver in the most recent `SNESSolve()`\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `lits` - number of linear iterations\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetIterationNumber()`, `SNESGetLinearSolveFailures()`, `SNESGetMaxLinearSolveFailures()`, `SNESSetCountersReset()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetLinearSolveIterations\"))\n\"\"\"\nfunction SNESGetLinearSolveIterations(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetLinearSolveIterations(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tlits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetLinearSolveIterations, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, lits_,\n              )\n\n\tlits = lits_[]\n\n\treturn lits\nend \n\n\"\"\"\n\tSNESSetCountersReset(petsclib::PetscLibType,snes::PetscSNES, reset::PetscBool) \nSets whether or not the counters for linear iterations and function evaluations\nare reset every time `SNESSolve()` is called.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - `SNES` context\n- `reset` - whether to reset the counters or not, defaults to `PETSC_TRUE`\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESGetNumberFunctionEvals()`, `SNESGetLinearSolveIterations()`, `SNESGetNPC()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetCountersReset\"))\n\"\"\"\nfunction SNESSetCountersReset(petsclib::PetscLibType, snes::PetscSNES, reset::PetscBool) end\n\n@for_petsc function SNESSetCountersReset(petsclib::$UnionPetscLib, snes::PetscSNES, reset::PetscBool )\n\n    @chk ccall(\n               (:SNESSetCountersReset, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, reset,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESResetCounters(petsclib::PetscLibType,snes::PetscSNES) \nReset counters for linear iterations and function evaluations.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - `SNES` context\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESGetNumberFunctionEvals()`, `SNESGetLinearSolveIterations()`, `SNESGetNPC()`\n\n# External Links\n$(_doc_external(\"SNES/SNESResetCounters\"))\n\"\"\"\nfunction SNESResetCounters(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESResetCounters(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESResetCounters, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetKSP(petsclib::PetscLibType,snes::PetscSNES, ksp::PetscKSP) \nSets a `KSP` context for the `SNES` object to use\n\nNot Collective, but the `SNES` and `KSP` objects must live on the same `MPI_Comm`\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `ksp`  - the `KSP` context\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `KSP`, `KSPGetPC()`, `SNESCreate()`, `KSPCreate()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetKSP\"))\n\"\"\"\nfunction SNESSetKSP(petsclib::PetscLibType, snes::PetscSNES, ksp::PetscKSP) end\n\n@for_petsc function SNESSetKSP(petsclib::$UnionPetscLib, snes::PetscSNES, ksp::PetscKSP )\n\n    @chk ccall(\n               (:SNESSetKSP, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CKSP),\n               snes, ksp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESParametersInitialize(petsclib::PetscLibType,snes::PetscSNES) \nSets all the parameters in `snes` to their default value (when `SNESCreate()` was called) if they\ncurrently contain default values\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` object\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESDestroy()`, `SNESSetLagPreconditioner()`, `SNESSetLagJacobian()`,\n`PetscObjectParameterSetDefault()`\n\n# External Links\n$(_doc_external(\"SNES/SNESParametersInitialize\"))\n\"\"\"\nfunction SNESParametersInitialize(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESParametersInitialize(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESParametersInitialize, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\toutsnes::PetscSNES = SNESCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a nonlinear solver context used to manage a set of nonlinear solves\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `outsnes` - the new `SNES` context\n\nOptions Database Keys:\n- `-snes_mf`          - Activates default matrix-free Jacobian-vector products, and no matrix to construct a preconditioner\n- `-snes_mf_operator` - Activates default matrix-free Jacobian-vector products, and a user-provided matrix as set by `SNESSetJacobian()`\n- `-snes_fd_coloring` - uses a relative fast computation of the Jacobian using finite differences and a graph coloring\n- `-snes_fd`          - Uses (slow!) finite differences to compute Jacobian\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESDestroy()`, `SNESSetLagPreconditioner()`, `SNESSetLagJacobian()`\n\n# External Links\n$(_doc_external(\"SNES/SNESCreate\"))\n\"\"\"\nfunction SNESCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function SNESCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\toutsnes_ = Ref{CSNES}()\n\n    @chk ccall(\n               (:SNESCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CSNES}),\n               comm, outsnes_,\n              )\n\n\toutsnes = PetscSNES(outsnes_[], petsclib)\n\n\treturn outsnes\nend \n\n\"\"\"\n\tSNESSetFunction(petsclib::PetscLibType,snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, ctx::Cvoid) \nSets the function evaluation routine and function\nvector for use by the `SNES` routines in solving systems of nonlinear\nequations.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `r`    - vector to store function values, may be `NULL`\n- `f`    - function evaluation routine;  for calling sequence see `SNESFunctionFn`\n- `ctx`  - [optional] user-defined context for private data for the\nfunction evaluation routine (may be `NULL`)\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `SNESGetFunction()`, `SNESComputeFunction()`, `SNESSetJacobian()`, `SNESSetPicard()`, `SNESFunctionFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetFunction\"))\n\"\"\"\nfunction SNESSetFunction(petsclib::PetscLibType, snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, ctx::Cvoid) end\n\n@for_petsc function SNESSetFunction(petsclib::$UnionPetscLib, snes::PetscSNES, r::PetscVec, f::Union{SNESFunctionFn, Ptr}, ctx::Union{Cvoid, Ptr}    )\n\n    @chk ccall(\n               (:SNESSetFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, Ptr{SNESFunctionFn}, Ptr{Cvoid}),\n               snes, r, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetInitialFunction(petsclib::PetscLibType,snes::PetscSNES, f::PetscVec) \nSet an already computed function evaluation at the initial guess to be reused by `SNESSolve()`.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `f`    - vector to store function value\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESSetFunction()`, `SNESComputeFunction()`, `SNESSetInitialFunctionNorm()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetInitialFunction\"))\n\"\"\"\nfunction SNESSetInitialFunction(petsclib::PetscLibType, snes::PetscSNES, f::PetscVec) end\n\n@for_petsc function SNESSetInitialFunction(petsclib::$UnionPetscLib, snes::PetscSNES, f::PetscVec )\n\n    @chk ccall(\n               (:SNESSetInitialFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec),\n               snes, f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetNormSchedule(petsclib::PetscLibType,snes::PetscSNES, normschedule::SNESNormSchedule) \nSets the `SNESNormSchedule` used in convergence and monitoring\nof the `SNES` method, when norms are computed in the solving process\n\nLogically Collective\n\nInput Parameters:\n- `snes`         - the `SNES` context\n- `normschedule` - the frequency of norm computation\n\nOptions Database Key:\n- `-snes_norm_schedule <none, always, initialonly, finalonly, initialfinalonly>` - set the schedule\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESNormSchedule`, `SNESGetNormSchedule()`, `SNESComputeFunction()`, `VecNorm()`, `SNESSetFunction()`, `SNESSetInitialFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetNormSchedule\"))\n\"\"\"\nfunction SNESSetNormSchedule(petsclib::PetscLibType, snes::PetscSNES, normschedule::SNESNormSchedule) end\n\n@for_petsc function SNESSetNormSchedule(petsclib::$UnionPetscLib, snes::PetscSNES, normschedule::SNESNormSchedule )\n\n    @chk ccall(\n               (:SNESSetNormSchedule, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNormSchedule),\n               snes, normschedule,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetNormSchedule(petsclib::PetscLibType,snes::PetscSNES, normschedule::SNESNormSchedule) \nGets the `SNESNormSchedule` used in convergence and monitoring\nof the `SNES` method.\n\nLogically Collective\n\nInput Parameters:\n- `snes`         - the `SNES` context\n- `normschedule` - the type of the norm used\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSetNormSchedule()`, `SNESComputeFunction()`, `VecNorm()`, `SNESSetFunction()`, `SNESSetInitialFunction()`, `SNESNormSchedule`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetNormSchedule\"))\n\"\"\"\nfunction SNESGetNormSchedule(petsclib::PetscLibType, snes::PetscSNES, normschedule::SNESNormSchedule) end\n\n@for_petsc function SNESGetNormSchedule(petsclib::$UnionPetscLib, snes::PetscSNES, normschedule::SNESNormSchedule )\n\n    @chk ccall(\n               (:SNESGetNormSchedule, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESNormSchedule}),\n               snes, normschedule,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetFunctionNorm(petsclib::PetscLibType,snes::PetscSNES, norm::PetscReal) \nSets the last computed residual norm.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `norm` - the value of the norm\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESGetNormSchedule()`, `SNESComputeFunction()`, `VecNorm()`, `SNESSetFunction()`, `SNESSetInitialFunction()`, `SNESNormSchedule`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetFunctionNorm\"))\n\"\"\"\nfunction SNESSetFunctionNorm(petsclib::PetscLibType, snes::PetscSNES, norm::PetscReal) end\n\n@for_petsc function SNESSetFunctionNorm(petsclib::$UnionPetscLib, snes::PetscSNES, norm::$PetscReal )\n\n    @chk ccall(\n               (:SNESSetFunctionNorm, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal),\n               snes, norm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnorm::PetscReal = SNESGetFunctionNorm(petsclib::PetscLibType,snes::PetscSNES) \nGets the last computed norm of the residual\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `norm` - the last computed residual norm\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetNormSchedule()`, `SNESComputeFunction()`, `VecNorm()`, `SNESSetFunction()`, `SNESSetInitialFunction()`, `SNESNormSchedule`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetFunctionNorm\"))\n\"\"\"\nfunction SNESGetFunctionNorm(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetFunctionNorm(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESGetFunctionNorm, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}),\n               snes, norm_,\n              )\n\n\tnorm = norm_[]\n\n\treturn norm\nend \n\n\"\"\"\n\tynorm::PetscReal = SNESGetUpdateNorm(petsclib::PetscLibType,snes::PetscSNES) \nGets the last computed norm of the solution update\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `ynorm` - the last computed update norm\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetNormSchedule()`, `SNESComputeFunction()`, `SNESGetFunctionNorm()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetUpdateNorm\"))\n\"\"\"\nfunction SNESGetUpdateNorm(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetUpdateNorm(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tynorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESGetUpdateNorm, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}),\n               snes, ynorm_,\n              )\n\n\tynorm = ynorm_[]\n\n\treturn ynorm\nend \n\n\"\"\"\n\txnorm::PetscReal = SNESGetSolutionNorm(petsclib::PetscLibType,snes::PetscSNES) \nGets the last computed norm of the solution\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `xnorm` - the last computed solution norm\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetNormSchedule()`, `SNESComputeFunction()`, `SNESGetFunctionNorm()`, `SNESGetUpdateNorm()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetSolutionNorm\"))\n\"\"\"\nfunction SNESGetSolutionNorm(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetSolutionNorm(petsclib::$UnionPetscLib, snes::PetscSNES )\n\txnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESGetSolutionNorm, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}),\n               snes, xnorm_,\n              )\n\n\txnorm = xnorm_[]\n\n\treturn xnorm\nend \n\n\"\"\"\n\tSNESSetFunctionType(petsclib::PetscLibType,snes::PetscSNES, type::SNESFunctionType) \nSets the `SNESFunctionType`\nof the `SNES` method.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `type` - the function type\n\nLevel: developer\n\nValues of the function type:\n- `SNES_FUNCTION_DEFAULT`           - the default for the given `SNESType`\n- `SNES_FUNCTION_UNPRECONDITIONED`  - an unpreconditioned function evaluation (this is the function provided with `SNESSetFunction()`\n- `SNES_FUNCTION_PRECONDITIONED`    - a transformation of the function provided with `SNESSetFunction()`\n\n-seealso: [](ch_snes), `SNES`, `SNESFunctionType`, `SNESGetNormSchedule()`, `SNESComputeFunction()`, `VecNorm()`, `SNESSetFunction()`, `SNESSetInitialFunction()`, `SNESNormSchedule`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetFunctionType\"))\n\"\"\"\nfunction SNESSetFunctionType(petsclib::PetscLibType, snes::PetscSNES, type::SNESFunctionType) end\n\n@for_petsc function SNESSetFunctionType(petsclib::$UnionPetscLib, snes::PetscSNES, type::SNESFunctionType )\n\n    @chk ccall(\n               (:SNESSetFunctionType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESFunctionType),\n               snes, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetFunctionType(petsclib::PetscLibType,snes::PetscSNES, type::SNESFunctionType) \nGets the `SNESFunctionType` used in convergence and monitoring set with `SNESSetFunctionType()`\nof the SNES method.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `type` - the type of the function evaluation, see `SNESSetFunctionType()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESSetFunctionType()`, `SNESFunctionType`, `SNESSetNormSchedule()`, `SNESComputeFunction()`, `VecNorm()`, `SNESSetFunction()`, `SNESSetInitialFunction()`, `SNESNormSchedule`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetFunctionType\"))\n\"\"\"\nfunction SNESGetFunctionType(petsclib::PetscLibType, snes::PetscSNES, type::SNESFunctionType) end\n\n@for_petsc function SNESGetFunctionType(petsclib::$UnionPetscLib, snes::PetscSNES, type::SNESFunctionType )\n\n    @chk ccall(\n               (:SNESGetFunctionType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESFunctionType}),\n               snes, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetNGS(petsclib::PetscLibType,snes::PetscSNES, f::SNESNGSFn, ctx::Cvoid) \nSets the user nonlinear Gauss\nuse with composed nonlinear solvers.\n\nInput Parameters:\n- `snes` - the `SNES` context, usually of the `SNESType` `SNESNGS`\n- `f`    - function evaluation routine to apply Gauss-Seidel, see `SNESNGSFn` for calling sequence\n- `ctx`  - [optional] user-defined context for private data for the smoother evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNGS`, `SNESGetNGS()`, `SNESNCG`, `SNESGetFunction()`, `SNESComputeNGS()`, `SNESNGSFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetNGS\"))\n\"\"\"\nfunction SNESSetNGS(petsclib::PetscLibType, snes::PetscSNES, f::SNESNGSFn, ctx::Cvoid) end\n\n@for_petsc function SNESSetNGS(petsclib::$UnionPetscLib, snes::PetscSNES, f::SNESNGSFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESSetNGS, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESNGSFn}, Ptr{Cvoid}),\n               snes, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESPicardComputeMFFunction(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec, f::PetscVec, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"SNES/SNESPicardComputeMFFunction\"))\n\"\"\"\nfunction SNESPicardComputeMFFunction(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec, f::PetscVec, ctx::Cvoid) end\n\n@for_petsc function SNESPicardComputeMFFunction(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec, f::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESPicardComputeMFFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{Cvoid}),\n               snes, x, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESPicardComputeFunction(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec, f::PetscVec, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"SNES/SNESPicardComputeFunction\"))\n\"\"\"\nfunction SNESPicardComputeFunction(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec, f::PetscVec, ctx::Cvoid) end\n\n@for_petsc function SNESPicardComputeFunction(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec, f::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESPicardComputeFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{Cvoid}),\n               snes, x, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESPicardComputeJacobian(petsclib::PetscLibType,snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"SNES/SNESPicardComputeJacobian\"))\n\"\"\"\nfunction SNESPicardComputeJacobian(petsclib::PetscLibType, snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function SNESPicardComputeJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESPicardComputeJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CMat, CMat, Ptr{Cvoid}),\n               snes, x1, J, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetPicard(petsclib::PetscLibType,snes::PetscSNES, r::PetscVec, bp::SNESFunctionFn, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid) \nUse `SNES` to solve the system A(x) x = bp(x) + b  via a Picard type iteration (Picard linearization)\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `r`    - vector to store function values, may be `NULL`\n- `bp`   - function evaluation routine, may be `NULL`, for the calling sequence see `SNESFunctionFn`\n- `Amat` - matrix with which A(x) x - bp(x) - b is to be computed\n- `Pmat` - matrix from which preconditioner is computed (usually the same as `Amat`)\n- `J`    - function to compute matrix values, for the calling sequence see `SNESJacobianFn`\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetFunction()`, `SNESSetFunction()`, `SNESComputeFunction()`, `SNESSetJacobian()`, `SNESGetPicard()`, `SNESLineSearchPreCheckPicard()`,\n`SNESFunctionFn`, `SNESJacobianFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetPicard\"))\n\"\"\"\nfunction SNESSetPicard(petsclib::PetscLibType, snes::PetscSNES, r::PetscVec, bp::SNESFunctionFn, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid) end\n\n@for_petsc function SNESSetPicard(petsclib::$UnionPetscLib, snes::PetscSNES, r::PetscVec, bp::SNESFunctionFn, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESSetPicard, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, Ptr{SNESFunctionFn}, CMat, CMat, Ptr{SNESJacobianFn}, Ptr{Cvoid}),\n               snes, r, bp, Amat, Pmat, J, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetPicard(petsclib::PetscLibType,snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid) \nReturns the context for the Picard iteration\n\nNot Collective, but `Vec` is parallel if `SNES` is parallel. Collective if `Vec` is requested, but has not been created yet.\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `r`    - the function (or `NULL`)\n- `f`    - the function (or `NULL`);  for calling sequence see `SNESFunctionFn`\n- `Amat` - the matrix used to defined the operation A(x) x - b(x) (or `NULL`)\n- `Pmat` - the matrix from which the preconditioner will be constructed (or `NULL`)\n- `J`    - the function for matrix evaluation (or `NULL`);  for calling sequence see `SNESJacobianFn`\n- `ctx`  - the function context (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESSetFunction()`, `SNESSetPicard()`, `SNESGetFunction()`, `SNESGetJacobian()`, `SNESGetDM()`, `SNESFunctionFn`, `SNESJacobianFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetPicard\"))\n\"\"\"\nfunction SNESGetPicard(petsclib::PetscLibType, snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid) end\n\n@for_petsc function SNESGetPicard(petsclib::$UnionPetscLib, snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid )\n\tr_ = Ref(r.ptr)\n\tAmat_ = Ref(Amat.ptr)\n\tPmat_ = Ref(Pmat.ptr)\n\n    @chk ccall(\n               (:SNESGetPicard, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}, SNESFunctionFn, Ptr{CMat}, Ptr{CMat}, SNESJacobianFn, Cvoid),\n               snes, r_, f, Amat_, Pmat_, J, ctx,\n              )\n\n\tr.ptr = C_NULL\n\tAmat.ptr = C_NULL\n\tPmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetComputeInitialGuess(petsclib::PetscLibType,snes::PetscSNES, func::SNESInitialGuessFn, ctx::Cvoid) \nSets a routine used to compute an initial guess for the nonlinear problem\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `func` - function evaluation routine, see `SNESInitialGuessFn` for the calling sequence\n- `ctx`  - [optional] user-defined context for private data for the\nfunction evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetFunction()`, `SNESGetFunction()`, `SNESComputeFunction()`, `SNESSetJacobian()`, `SNESInitialGuessFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetComputeInitialGuess\"))\n\"\"\"\nfunction SNESSetComputeInitialGuess(petsclib::PetscLibType, snes::PetscSNES, func::SNESInitialGuessFn, ctx::Cvoid) end\n\n@for_petsc function SNESSetComputeInitialGuess(petsclib::$UnionPetscLib, snes::PetscSNES, func::SNESInitialGuessFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESSetComputeInitialGuess, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESInitialGuessFn}, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetRhs(petsclib::PetscLibType,snes::PetscSNES, rhs::PetscVec) \nGets the vector for solving F(x) = `rhs`. If `rhs` is not set\nit assumes a zero right-hand side.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `rhs` - the right-hand side vector or `NULL` if there is no right-hand side vector\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetSolution()`, `SNESGetFunction()`, `SNESComputeFunction()`, `SNESSetJacobian()`, `SNESSetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetRhs\"))\n\"\"\"\nfunction SNESGetRhs(petsclib::PetscLibType, snes::PetscSNES, rhs::PetscVec) end\n\n@for_petsc function SNESGetRhs(petsclib::$UnionPetscLib, snes::PetscSNES, rhs::PetscVec )\n\trhs_ = Ref(rhs.ptr)\n\n    @chk ccall(\n               (:SNESGetRhs, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}),\n               snes, rhs_,\n              )\n\n\trhs.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESComputeFunction(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec, y::PetscVec) \nCalls the function that has been set with `SNESSetFunction()`.\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `x`    - input vector\n\nOutput Parameter:\n- `y` - function vector, as set by `SNESSetFunction()`\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetFunction()`, `SNESGetFunction()`, `SNESComputeMFFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESComputeFunction\"))\n\"\"\"\nfunction SNESComputeFunction(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec, y::PetscVec) end\n\n@for_petsc function SNESComputeFunction(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:SNESComputeFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               snes, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESComputeMFFunction(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec, y::PetscVec) \nCalls the function that has been set with `DMSNESSetMFFunction()`.\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `x`    - input vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetFunction()`, `SNESGetFunction()`, `SNESComputeFunction()`, `MatCreateSNESMF()`, `DMSNESSetMFFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESComputeMFFunction\"))\n\"\"\"\nfunction SNESComputeMFFunction(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec, y::PetscVec) end\n\n@for_petsc function SNESComputeMFFunction(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:SNESComputeMFFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               snes, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESComputeNGS(petsclib::PetscLibType,snes::PetscSNES, b::PetscVec, x::PetscVec) \nCalls the Gauss\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `x`    - input vector\n- `b`    - rhs vector\n\nOutput Parameter:\n- `x` - new solution vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESNGSFn`, `SNESSetNGS()`, `SNESComputeFunction()`, `SNESNGS`\n\n# External Links\n$(_doc_external(\"SNES/SNESComputeNGS\"))\n\"\"\"\nfunction SNESComputeNGS(petsclib::PetscLibType, snes::PetscSNES, b::PetscVec, x::PetscVec) end\n\n@for_petsc function SNESComputeNGS(petsclib::$UnionPetscLib, snes::PetscSNES, b::PetscVec, x::PetscVec )\n\n    @chk ccall(\n               (:SNESComputeNGS, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               snes, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESTestFunction(petsclib::PetscLibType,snes::PetscSNES) \nComputes the difference between the computed and finite\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOptions Database Keys:\n- `-snes_test_function`      - compare the user provided function with one compute via finite differences to check for errors.\n- `-snes_test_function_view` - display the user provided function, the finite difference function and the difference\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESTestJacobian()`, `SNESSetFunction()`, `SNESComputeFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESTestFunction\"))\n\"\"\"\nfunction SNESTestFunction(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESTestFunction(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESTestFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tJnorm::PetscReal,diffNorm::PetscReal = SNESTestJacobian(petsclib::PetscLibType,snes::PetscSNES) \nComputes the difference between the computed and finite\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `Jnorm`    - the Frobenius norm of the computed Jacobian, or `NULL`\n- `diffNorm` - the Frobenius norm of the difference of the computed and finite-difference Jacobians, or `NULL`\n\nOptions Database Keys:\n- `-snes_test_jacobian <optional threshold>` - compare the user provided Jacobian with one compute via finite differences to check for errors.  If a threshold is given, display only those entries whose difference is greater than the threshold.\n- `-snes_test_jacobian_view`                 - display the user provided Jacobian, the finite difference Jacobian and the difference\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESTestFunction()`, `SNESSetJacobian()`, `SNESComputeJacobian()`\n\n# External Links\n$(_doc_external(\"SNES/SNESTestJacobian\"))\n\"\"\"\nfunction SNESTestJacobian(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESTestJacobian(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tJnorm_ = Ref{$PetscReal}()\n\tdiffNorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESTestJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               snes, Jnorm_, diffNorm_,\n              )\n\n\tJnorm = Jnorm_[]\n\tdiffNorm = diffNorm_[]\n\n\treturn Jnorm,diffNorm\nend \n\n\"\"\"\n\tSNESComputeJacobian(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, A::PetscMat, B::PetscMat) \nComputes the Jacobian matrix that has been set with `SNESSetJacobian()`.\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `X`    - input vector\n\nOutput Parameters:\n- `A` - Jacobian matrix\n- `B` - optional matrix for building the preconditioner, usually the same as `A`\n\nOptions Database Keys:\n- `-snes_lag_preconditioner <lag>`           - how often to rebuild preconditioner\n- `-snes_lag_jacobian <lag>`                 - how often to rebuild Jacobian\n- `-snes_test_jacobian <optional threshold>` - compare the user provided Jacobian with one compute via finite differences to check for errors.  If a threshold is given, display only those entries whose difference is greater than the threshold.\n- `-snes_test_jacobian_view`                 - display the user provided Jacobian, the finite difference Jacobian and the difference between them to help users detect the location of errors in the user provided Jacobian\n- `-snes_compare_explicit`                   - Compare the computed Jacobian to the finite difference Jacobian and output the differences\n- `-snes_compare_explicit_draw`              - Compare the computed Jacobian to the finite difference Jacobian and draw the result\n- `-snes_compare_explicit_contour`           - Compare the computed Jacobian to the finite difference Jacobian and draw a contour plot with the result\n- `-snes_compare_operator`                   - Make the comparison options above use the operator instead of the matrix used to construct the preconditioner\n- `-snes_compare_coloring`                   - Compute the finite difference Jacobian using coloring and display norms of difference\n- `-snes_compare_coloring_display`           - Compute the finite difference Jacobian using coloring and display verbose differences\n- `-snes_compare_coloring_threshold`         - Display only those matrix entries that differ by more than a given threshold\n- `-snes_compare_coloring_threshold_atol`    - Absolute tolerance for difference in matrix entries to be displayed by `-snes_compare_coloring_threshold`\n- `-snes_compare_coloring_threshold_rtol`    - Relative tolerance for difference in matrix entries to be displayed by `-snes_compare_coloring_threshold`\n- `-snes_compare_coloring_draw`              - Compute the finite difference Jacobian using coloring and draw differences\n- `-snes_compare_coloring_draw_contour`      - Compute the finite difference Jacobian using coloring and show contours of matrices and differences\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESSetJacobian()`, `KSPSetOperators()`, `MatStructure`, `SNESSetLagPreconditioner()`, `SNESSetLagJacobian()`\n\n# External Links\n$(_doc_external(\"SNES/SNESComputeJacobian\"))\n\"\"\"\nfunction SNESComputeJacobian(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, A::PetscMat, B::PetscMat) end\n\n@for_petsc function SNESComputeJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, A::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:SNESComputeJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CMat, CMat),\n               snes, X, A, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetJacobian(petsclib::PetscLibType,snes::PetscSNES, Amat::PetscMat, Pmat::PetscMat, J::Union{SNESJacobianFn,Ptr}, ctx::Union{Cvoid,Ptr}) \nSets the function to compute Jacobian as well as the\nlocation to store the matrix.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `Amat` - the matrix that defines the (approximate) Jacobian\n- `Pmat` - the matrix to be used in constructing the preconditioner, usually the same as `Amat`.\n- `J`    - Jacobian evaluation routine (if `NULL` then `SNES` retains any previously set value), see `SNESJacobianFn` for details\n- `ctx`  - [optional] user-defined context for private data for the\nJacobian evaluation routine (may be `NULL`) (if `NULL` then `SNES` retains any previously set value)\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `KSPSetOperators()`, `SNESSetFunction()`, `MatMFFDComputeJacobian()`, `SNESComputeJacobianDefaultColor()`, `MatStructure`,\n`SNESSetPicard()`, `SNESJacobianFn`, `SNESFunctionFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetJacobian\"))\n\"\"\"\nfunction SNESSetJacobian(petsclib::PetscLibType, snes::PetscSNES, Amat::PetscMat, Pmat::PetscMat, J::Union{SNESJacobianFn,Ptr}, ctx::Union{Cvoid,Ptr}) end\n\n@for_petsc function SNESSetJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, Amat::PetscMat, Pmat::PetscMat, J::Union{Ptr,SNESJacobianFn}, ctx::Union{Cvoid,Ptr} )\n\n    @chk ccall(\n               (:SNESSetJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CMat, CMat, Ptr{SNESJacobianFn}, Ptr{Cvoid}),\n               snes, Amat, Pmat, J, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetJacobian(petsclib::PetscLibType,snes::PetscSNES, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid) \nReturns the Jacobian matrix and optionally the user\nprovided context for evaluating the Jacobian.\n\nNot Collective, but `Mat` object will be parallel if `SNES` is\n\nInput Parameter:\n- `snes` - the nonlinear solver context\n\nOutput Parameters:\n- `Amat` - location to stash (approximate) Jacobian matrix (or `NULL`)\n- `Pmat` - location to stash matrix used to compute the preconditioner (or `NULL`)\n- `J`    - location to put Jacobian function (or `NULL`), for calling sequence see `SNESJacobianFn`\n- `ctx`  - location to stash Jacobian ctx (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `Mat`, `SNESSetJacobian()`, `SNESComputeJacobian()`, `SNESJacobianFn`, `SNESGetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetJacobian\"))\n\"\"\"\nfunction SNESGetJacobian(petsclib::PetscLibType, snes::PetscSNES, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid) end\n\n@for_petsc function SNESGetJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, Amat::PetscMat, Pmat::PetscMat, J::SNESJacobianFn, ctx::Cvoid )\n\tAmat_ = Ref(Amat.ptr)\n\tPmat_ = Ref(Pmat.ptr)\n\n    @chk ccall(\n               (:SNESGetJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CMat}, Ptr{CMat}, SNESJacobianFn, Cvoid),\n               snes, Amat_, Pmat_, J, ctx,\n              )\n\n\tAmat.ptr = C_NULL\n\tPmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetUp(petsclib::PetscLibType,snes::PetscSNES) \nSets up the internal data structures for the later use\nof a nonlinear solver `SNESSolve()`.\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESCreate()`, `SNESSolve()`, `SNESDestroy()`, `SNESSetFromOptions()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetUp\"))\n\"\"\"\nfunction SNESSetUp(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESSetUp(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESSetUp, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESReset(petsclib::PetscLibType,snes::PetscSNES) \nResets a `SNES` context to the state it was in before `SNESSetUp()` was called and removes any allocated `Vec` and `Mat` from its data structures\n\nCollective\n\nInput Parameter:\n- `snes` - the nonlinear iterative solver context obtained from `SNESCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESDestroy()`, `SNESCreate()`, `SNESSetUp()`, `SNESSolve()`\n\n# External Links\n$(_doc_external(\"SNES/SNESReset\"))\n\"\"\"\nfunction SNESReset(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESReset(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESReset, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESConvergedReasonViewCancel(petsclib::PetscLibType,snes::PetscSNES) \nClears all the reason view functions for a `SNES` object provided with `SNESConvergedReasonViewSet()` also\nremoves the default viewer.\n\nCollective\n\nInput Parameter:\n- `snes` - the nonlinear iterative solver context obtained from `SNESCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESCreate()`, `SNESDestroy()`, `SNESReset()`, `SNESConvergedReasonViewSet()`\n\n# External Links\n$(_doc_external(\"SNES/SNESConvergedReasonViewCancel\"))\n\"\"\"\nfunction SNESConvergedReasonViewCancel(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESConvergedReasonViewCancel(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESConvergedReasonViewCancel, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESDestroy(petsclib::PetscLibType,snes::PetscSNES) \nDestroys the nonlinear solver context that was created\nwith `SNESCreate()`.\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `SNESCreate()`, `SNESSolve()`\n\n# External Links\n$(_doc_external(\"SNES/SNESDestroy\"))\n\"\"\"\nfunction SNESDestroy(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESDestroy(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tsnes_ = Ref(snes.ptr)\n\n    @chk ccall(\n               (:SNESDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CSNES},),\n               snes_,\n              )\n\n\tsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetLagPreconditioner(petsclib::PetscLibType,snes::PetscSNES, lag::PetscInt) \nSets when the preconditioner is rebuilt in the nonlinear solve `SNESSolve()`.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `lag`  - 1 means rebuild every time the Jacobian is computed within a single nonlinear solve, 2 means every second time\nthe Jacobian is built etc. -2 indicates rebuild preconditioner at next chance but then never rebuild after that\n\nOptions Database Keys:\n- `-snes_lag_jacobian_persists <true,false>`       - sets the persistence through multiple `SNESSolve()`\n- `-snes_lag_jacobian <-2,1,2,...>`                - sets the lag\n- `-snes_lag_preconditioner_persists <true,false>` - sets the persistence through multiple `SNESSolve()`\n- `-snes_lag_preconditioner <-2,1,2,...>`          - sets the lag\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESGetLagPreconditioner()`, `SNESSetLagJacobian()`, `SNESGetLagJacobian()`, `SNESSetLagPreconditionerPersists()`,\n`SNESSetLagJacobianPersists()`, `SNES`, `SNESSolve()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetLagPreconditioner\"))\n\"\"\"\nfunction SNESSetLagPreconditioner(petsclib::PetscLibType, snes::PetscSNES, lag::PetscInt) end\n\n@for_petsc function SNESSetLagPreconditioner(petsclib::$UnionPetscLib, snes::PetscSNES, lag::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetLagPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, lag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetGridSequence(petsclib::PetscLibType,snes::PetscSNES, steps::PetscInt) \nsets the number of steps of grid sequencing that `SNES` will do\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `steps` - the number of refinements to do, defaults to 0\n\nOptions Database Key:\n- `-snes_grid_sequence <steps>` - Use grid sequencing to generate initial guess\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetLagPreconditioner()`, `SNESSetLagJacobian()`, `SNESGetLagJacobian()`, `SNESGetGridSequence()`,\n`SNESSetDM()`, `SNESSolve()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetGridSequence\"))\n\"\"\"\nfunction SNESSetGridSequence(petsclib::PetscLibType, snes::PetscSNES, steps::PetscInt) end\n\n@for_petsc function SNESSetGridSequence(petsclib::$UnionPetscLib, snes::PetscSNES, steps::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetGridSequence, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, steps,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsteps::PetscInt = SNESGetGridSequence(petsclib::PetscLibType,snes::PetscSNES) \ngets the number of steps of grid sequencing that `SNES` will do\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `steps` - the number of refinements to do, defaults to 0\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESGetLagPreconditioner()`, `SNESSetLagJacobian()`, `SNESGetLagJacobian()`, `SNESSetGridSequence()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetGridSequence\"))\n\"\"\"\nfunction SNESGetGridSequence(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetGridSequence(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tsteps_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetGridSequence, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, steps_,\n              )\n\n\tsteps = steps_[]\n\n\treturn steps\nend \n\n\"\"\"\n\tlag::PetscInt = SNESGetLagPreconditioner(petsclib::PetscLibType,snes::PetscSNES) \nReturn how often the preconditioner is rebuilt\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `lag` - -1 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within a single nonlinear solve, 2 means every second time\nthe Jacobian is built etc. -2 indicates rebuild preconditioner at next chance but then never rebuild after that\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetLagPreconditioner()`, `SNESSetLagJacobianPersists()`, `SNESSetLagPreconditionerPersists()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetLagPreconditioner\"))\n\"\"\"\nfunction SNESGetLagPreconditioner(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetLagPreconditioner(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tlag_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetLagPreconditioner, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, lag_,\n              )\n\n\tlag = lag_[]\n\n\treturn lag\nend \n\n\"\"\"\n\tSNESSetLagJacobian(petsclib::PetscLibType,snes::PetscSNES, lag::PetscInt) \nSet when the Jacobian is rebuilt in the nonlinear solve. See `SNESSetLagPreconditioner()` for determining how\noften the preconditioner is rebuilt.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `lag`  - -1 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within a single nonlinear solve, 2 means every second time\nthe Jacobian is built etc. -2 means rebuild at next chance but then never again\n\nOptions Database Keys:\n- `-snes_lag_jacobian_persists <true,false>`       - sets the persistence through multiple SNES solves\n- `-snes_lag_jacobian <-2,1,2,...>`                - sets the lag\n- `-snes_lag_preconditioner_persists <true,false>` - sets the persistence through multiple SNES solves\n- `-snes_lag_preconditioner <-2,1,2,...>`          - sets the lag.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESGetLagPreconditioner()`, `SNESSetLagPreconditioner()`, `SNESGetLagJacobianPersists()`, `SNESSetLagPreconditionerPersists()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetLagJacobian\"))\n\"\"\"\nfunction SNESSetLagJacobian(petsclib::PetscLibType, snes::PetscSNES, lag::PetscInt) end\n\n@for_petsc function SNESSetLagJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, lag::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetLagJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, lag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlag::PetscInt = SNESGetLagJacobian(petsclib::PetscLibType,snes::PetscSNES) \nGet how often the Jacobian is rebuilt. See `SNESGetLagPreconditioner()` to determine when the preconditioner is rebuilt\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `lag` - -1 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within a single nonlinear solve, 2 means every second time\nthe Jacobian is built etc.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetLagJacobian()`, `SNESSetLagPreconditioner()`, `SNESGetLagPreconditioner()`, `SNESSetLagJacobianPersists()`, `SNESSetLagPreconditionerPersists()`\n\n\n# External Links\n$(_doc_external(\"SNES/SNESGetLagJacobian\"))\n\"\"\"\nfunction SNESGetLagJacobian(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetLagJacobian(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tlag_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetLagJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, lag_,\n              )\n\n\tlag = lag_[]\n\n\treturn lag\nend \n\n\"\"\"\n\tSNESSetLagJacobianPersists(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \nSet whether or not the Jacobian lagging persists through multiple nonlinear solves\n\nLogically collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `flg`  - jacobian lagging persists if true\n\nOptions Database Keys:\n- `-snes_lag_jacobian_persists <true,false>`       - sets the persistence through multiple SNES solves\n- `-snes_lag_jacobian <-2,1,2,...>`                - sets the lag\n- `-snes_lag_preconditioner_persists <true,false>` - sets the persistence through multiple SNES solves\n- `-snes_lag_preconditioner <-2,1,2,...>`          - sets the lag\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSetLagPreconditionerPersists()`, `SNESSetLagJacobian()`, `SNESGetLagJacobian()`, `SNESGetNPC()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetLagJacobianPersists\"))\n\"\"\"\nfunction SNESSetLagJacobianPersists(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESSetLagJacobianPersists(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESSetLagJacobianPersists, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetLagPreconditionerPersists(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \nSet whether or not the preconditioner lagging persists through multiple nonlinear solves\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `flg`  - preconditioner lagging persists if true\n\nOptions Database Keys:\n- `-snes_lag_jacobian_persists <true,false>`       - sets the persistence through multiple SNES solves\n- `-snes_lag_jacobian <-2,1,2,...>`                - sets the lag\n- `-snes_lag_preconditioner_persists <true,false>` - sets the persistence through multiple SNES solves\n- `-snes_lag_preconditioner <-2,1,2,...>`          - sets the lag\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSetLagJacobianPersists()`, `SNESSetLagJacobian()`, `SNESGetLagJacobian()`, `SNESGetNPC()`, `SNESSetLagPreconditioner()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetLagPreconditionerPersists\"))\n\"\"\"\nfunction SNESSetLagPreconditionerPersists(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESSetLagPreconditionerPersists(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESSetLagPreconditionerPersists, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetForceIteration(petsclib::PetscLibType,snes::PetscSNES, force::PetscBool) \nforce `SNESSolve()` to take at least one iteration regardless of the initial residual norm\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `force` - `PETSC_TRUE` require at least one iteration\n\nOptions Database Key:\n- `-snes_force_iteration <force>` - Sets forcing an iteration\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `TS`, `SNESSetDivergenceTolerance()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetForceIteration\"))\n\"\"\"\nfunction SNESSetForceIteration(petsclib::PetscLibType, snes::PetscSNES, force::PetscBool) end\n\n@for_petsc function SNESSetForceIteration(petsclib::$UnionPetscLib, snes::PetscSNES, force::PetscBool )\n\n    @chk ccall(\n               (:SNESSetForceIteration, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, force,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tforce::PetscBool = SNESGetForceIteration(petsclib::PetscLibType,snes::PetscSNES) \nCheck whether or not `SNESSolve()` take at least one iteration regardless of the initial residual norm\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `force` - `PETSC_TRUE` requires at least one iteration.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetForceIteration()`, `SNESSetDivergenceTolerance()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetForceIteration\"))\n\"\"\"\nfunction SNESGetForceIteration(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetForceIteration(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tforce_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESGetForceIteration, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, force_,\n              )\n\n\tforce = force_[]\n\n\treturn force\nend \n\n\"\"\"\n\tSNESSetTolerances(petsclib::PetscLibType,snes::PetscSNES, abstol::PetscReal, rtol::PetscReal, stol::PetscReal, maxit::PetscInt, maxf::PetscInt) \nSets various parameters used in `SNES` convergence tests.\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `abstol` - the absolute convergence tolerance,  F(x^n) ≤ abstol \n- `rtol`   - the relative convergence tolerance,  F(x^n) ≤ reltol * F(x^0) \n- `stol`   - convergence tolerance in terms of the norm of the change in the solution between steps,  || delta x || < stol*|| x ||\n- `maxit`  - the maximum number of iterations allowed in the solver, default 50.\n- `maxf`   - the maximum number of function evaluations allowed in the solver (use `PETSC_UNLIMITED` indicates no limit), default 10,000\n\nOptions Database Keys:\n- `-snes_atol <abstol>`    - Sets `abstol`\n- `-snes_rtol <rtol>`      - Sets `rtol`\n- `-snes_stol <stol>`      - Sets `stol`\n- `-snes_max_it <maxit>`   - Sets `maxit`\n- `-snes_max_funcs <maxf>` - Sets `maxf` (use `unlimited` to have no maximum)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSolve()`, `SNES`, `SNESSetDivergenceTolerance()`, `SNESSetForceIteration()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetTolerances\"))\n\"\"\"\nfunction SNESSetTolerances(petsclib::PetscLibType, snes::PetscSNES, abstol::PetscReal, rtol::PetscReal, stol::PetscReal, maxit::PetscInt, maxf::PetscInt) end\n\n@for_petsc function SNESSetTolerances(petsclib::$UnionPetscLib, snes::PetscSNES, abstol::$PetscReal, rtol::$PetscReal, stol::$PetscReal, maxit::$PetscInt, maxf::$PetscInt )\n\n    @chk ccall(\n               (:SNESSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal, $PetscReal, $PetscReal, $PetscInt, $PetscInt),\n               snes, abstol, rtol, stol, maxit, maxf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetDivergenceTolerance(petsclib::PetscLibType,snes::PetscSNES, divtol::PetscReal) \nSets the divergence tolerance used for the `SNES` divergence test.\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `divtol` - the divergence tolerance. Use `PETSC_UNLIMITED` to deactivate the test. If the residual norm  F(x^n) ≥ divtol * F(x^0)  the solver\nis stopped due to divergence.\n\nOptions Database Key:\n- `-snes_divergence_tolerance <divtol>` - Sets `divtol`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetTolerances()`, `SNESGetDivergenceTolerance()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetDivergenceTolerance\"))\n\"\"\"\nfunction SNESSetDivergenceTolerance(petsclib::PetscLibType, snes::PetscSNES, divtol::PetscReal) end\n\n@for_petsc function SNESSetDivergenceTolerance(petsclib::$UnionPetscLib, snes::PetscSNES, divtol::$PetscReal )\n\n    @chk ccall(\n               (:SNESSetDivergenceTolerance, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal),\n               snes, divtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tatol::PetscReal,rtol::PetscReal,stol::PetscReal,maxit::PetscInt,maxf::PetscInt = SNESGetTolerances(petsclib::PetscLibType,snes::PetscSNES) \nGets various parameters used in `SNES` convergence tests.\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `atol`  - the absolute convergence tolerance\n- `rtol`  - the relative convergence tolerance\n- `stol`  - convergence tolerance in terms of the norm of the change in the solution between steps\n- `maxit` - the maximum number of iterations allowed\n- `maxf`  - the maximum number of function evaluations allowed, `PETSC_UNLIMITED` indicates no bound\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetTolerances()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetTolerances\"))\n\"\"\"\nfunction SNESGetTolerances(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetTolerances(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tatol_ = Ref{$PetscReal}()\n\trtol_ = Ref{$PetscReal}()\n\tstol_ = Ref{$PetscReal}()\n\tmaxit_ = Ref{$PetscInt}()\n\tmaxf_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               snes, atol_, rtol_, stol_, maxit_, maxf_,\n              )\n\n\tatol = atol_[]\n\trtol = rtol_[]\n\tstol = stol_[]\n\tmaxit = maxit_[]\n\tmaxf = maxf_[]\n\n\treturn atol,rtol,stol,maxit,maxf\nend \n\n\"\"\"\n\tSNESGetDivergenceTolerance(petsclib::PetscLibType,snes::PetscSNES, divtol::PetscReal) \nGets divergence tolerance used in divergence test.\n\nNot Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `divtol` - divergence tolerance\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetDivergenceTolerance()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetDivergenceTolerance\"))\n\"\"\"\nfunction SNESGetDivergenceTolerance(petsclib::PetscLibType, snes::PetscSNES, divtol::PetscReal) end\n\n@for_petsc function SNESGetDivergenceTolerance(petsclib::$UnionPetscLib, snes::PetscSNES, divtol::$PetscReal )\n\n    @chk ccall(\n               (:SNESGetDivergenceTolerance, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}),\n               snes, divtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorLGRange(petsclib::PetscLibType,snes::PetscSNES, n::PetscInt, rnorm::PetscReal, monctx::Cvoid) \n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorLGRange\"))\n\"\"\"\nfunction SNESMonitorLGRange(petsclib::PetscLibType, snes::PetscSNES, n::PetscInt, rnorm::PetscReal, monctx::Cvoid) end\n\n@for_petsc function SNESMonitorLGRange(petsclib::$UnionPetscLib, snes::PetscSNES, n::$PetscInt, rnorm::$PetscReal, monctx::Cvoid )\n\n    @chk ccall(\n               (:SNESMonitorLGRange, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               snes, n, rnorm, monctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESConverged(petsclib::PetscLibType,snes::PetscSNES, it::PetscInt, xnorm::PetscReal, snorm::PetscReal, fnorm::PetscReal) \nRun the convergence test and update the `SNESConvergedReason`.\n\nCollective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `it`    - current iteration\n- `xnorm` - 2-norm of current iterate\n- `snorm` - 2-norm of current step\n- `fnorm` - 2-norm of function\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve`, `SNESSetConvergenceTest()`\n\n# External Links\n$(_doc_external(\"SNES/SNESConverged\"))\n\"\"\"\nfunction SNESConverged(petsclib::PetscLibType, snes::PetscSNES, it::PetscInt, xnorm::PetscReal, snorm::PetscReal, fnorm::PetscReal) end\n\n@for_petsc function SNESConverged(petsclib::$UnionPetscLib, snes::PetscSNES, it::$PetscInt, xnorm::$PetscReal, snorm::$PetscReal, fnorm::$PetscReal )\n\n    @chk ccall(\n               (:SNESConverged, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, $PetscReal, $PetscReal),\n               snes, it, xnorm, snorm, fnorm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitor(petsclib::PetscLibType,snes::PetscSNES, iter::PetscInt, rnorm::PetscReal) \nruns any `SNES` monitor routines provided with `SNESMonitor()` or the options database\n\nCollective\n\nInput Parameters:\n- `snes`  - nonlinear solver context obtained from `SNESCreate()`\n- `iter`  - current iteration number\n- `rnorm` - current relative norm of the residual\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESMonitorSet()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitor\"))\n\"\"\"\nfunction SNESMonitor(petsclib::PetscLibType, snes::PetscSNES, iter::PetscInt, rnorm::PetscReal) end\n\n@for_petsc function SNESMonitor(petsclib::$UnionPetscLib, snes::PetscSNES, iter::$PetscInt, rnorm::$PetscReal )\n\n    @chk ccall(\n               (:SNESMonitor, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal),\n               snes, iter, rnorm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorSet(petsclib::PetscLibType,snes::PetscSNES, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function that is to be used at every\niteration of the `SNES` nonlinear solver to display the iteration's\nprogress.\n\nLogically Collective\n\nInput Parameters:\n- `snes`           - the `SNES` context\n- `f`              - the monitor function,  for the calling sequence see `SNESMonitorFunction`\n- `mctx`           - [optional] user-defined context for private data for the monitor routine (use `NULL` if no context is desired)\n- `monitordestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence\n\nOptions Database Keys:\n- `-snes_monitor`               - sets `SNESMonitorDefault()`\n- `-snes_monitor draw::draw_lg` - sets line graph monitor,\n- `-snes_monitor_cancel`        - cancels all monitors that have been hardwired into a code by calls to `SNESMonitorSet()`, but does not cancel those set via\nthe options database.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESMonitorDefault()`, `SNESMonitorCancel()`, `SNESMonitorFunction`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorSet\"))\n\"\"\"\nfunction SNESMonitorSet(petsclib::PetscLibType, snes::PetscSNES, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn) end\n\n@for_petsc function SNESMonitorSet(petsclib::$UnionPetscLib, snes::PetscSNES, f::external, mctx::Cvoid, monitordestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:SNESMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               snes, f, mctx, monitordestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorCancel(petsclib::PetscLibType,snes::PetscSNES) \nClears all the monitor functions for a `SNES` object.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOptions Database Key:\n- `-snes_monitor_cancel` - cancels all monitors that have been hardwired\ninto a code by calls to `SNESMonitorSet()`, but does not cancel those\nset via the options database\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESMonitorDefault()`, `SNESMonitorSet()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorCancel\"))\n\"\"\"\nfunction SNESMonitorCancel(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESMonitorCancel(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetConvergenceTest(petsclib::PetscLibType,snes::PetscSNES, SNESConvergenceTestFunction::external, cctx::Cvoid, destroy::external) \nSets the function that is to be used\nto test for convergence of the nonlinear iterative solution.\n\nLogically Collective\n\nInput Parameters:\n- `snes`                        - the `SNES` context\n- `SNESConvergenceTestFunction` - routine to test for convergence\n- `cctx`                        - [optional] context for private data for the convergence routine  (may be `NULL`)\n- `destroy`                     - [optional] destructor for the context (may be `NULL`; `PETSC_NULL_FUNCTION` in Fortran)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESConvergedDefault()`, `SNESConvergedSkip()`, `SNESConvergenceTestFunction`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetConvergenceTest\"))\n\"\"\"\nfunction SNESSetConvergenceTest(petsclib::PetscLibType, snes::PetscSNES, SNESConvergenceTestFunction::external, cctx::Cvoid, destroy::external) end\n\n@for_petsc function SNESSetConvergenceTest(petsclib::$UnionPetscLib, snes::PetscSNES, SNESConvergenceTestFunction::external, cctx::Cvoid, destroy::external )\n\n    @chk ccall(\n               (:SNESSetConvergenceTest, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}, external),\n               snes, SNESConvergenceTestFunction, cctx, destroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetConvergedReason(petsclib::PetscLibType,snes::PetscSNES, reason::SNESConvergedReason) \nGets the reason the `SNES` iteration was stopped, which may be due to convergence, divergence, or stagnation\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `reason` - negative value indicates diverged, positive value converged, see `SNESConvergedReason` for the individual convergence tests for complete lists\n\nOptions Database Key:\n- `-snes_converged_reason` - prints the reason to standard out\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSolve()`, `SNESSetConvergenceTest()`, `SNESSetConvergedReason()`, `SNESConvergedReason`, `SNESGetConvergedReasonString()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetConvergedReason\"))\n\"\"\"\nfunction SNESGetConvergedReason(petsclib::PetscLibType, snes::PetscSNES, reason::SNESConvergedReason) end\n\n\n@for_petsc function SNESGetConvergedReason(petsclib::$UnionPetscLib, snes::PetscSNES)\n    reason = Ref{SNESConvergedReason}()\n    @chk ccall(\n               (:SNESGetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESConvergedReason}),\n               snes, reason,\n              )\n    return reason[]\nend\n\n@for_petsc function SNESGetConvergedReason(petsclib::$UnionPetscLib, snes::PetscSNES, reason::SNESConvergedReason )\n\n    @chk ccall(\n               (:SNESGetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESConvergedReason}),\n               snes, reason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetConvergedReasonString(petsclib::PetscLibType,snes::PetscSNES, strreason::Cchar) \nReturn a human readable string for `SNESConvergedReason`\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `strreason` - a human readable string that describes `SNES` converged reason\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `SNESGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetConvergedReasonString\"))\n\"\"\"\nfunction SNESGetConvergedReasonString(petsclib::PetscLibType, snes::PetscSNES, strreason::Cchar) end\n\n@for_petsc function SNESGetConvergedReasonString(petsclib::$UnionPetscLib, snes::PetscSNES, strreason::Cchar )\n\n    @chk ccall(\n               (:SNESGetConvergedReasonString, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Cchar),\n               snes, strreason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetConvergedReason(petsclib::PetscLibType,snes::PetscSNES, reason::SNESConvergedReason) \nSets the reason the `SNES` iteration was stopped.\n\nNot Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `reason` - negative value indicates diverged, positive value converged, see `SNESConvergedReason` or the\nmanual pages for the individual convergence tests for complete lists\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESGetConvergedReason()`, `SNESSetConvergenceTest()`, `SNESConvergedReason`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetConvergedReason\"))\n\"\"\"\nfunction SNESSetConvergedReason(petsclib::PetscLibType, snes::PetscSNES, reason::SNESConvergedReason) end\n\n@for_petsc function SNESSetConvergedReason(petsclib::$UnionPetscLib, snes::PetscSNES, reason::SNESConvergedReason )\n\n    @chk ccall(\n               (:SNESSetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESConvergedReason),\n               snes, reason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetConvergenceHistory(petsclib::PetscLibType,snes::PetscSNES, a::Vector{PetscReal}, its::Vector{PetscInt}, na::PetscInt, reset::PetscBool) \nSets the arrays used to hold the convergence history.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - iterative context obtained from `SNESCreate()`\n- `a`     - array to hold history, this array will contain the function norms computed at each step\n- `its`   - integer array holds the number of linear iterations for each solve.\n- `na`    - size of `a` and `its`\n- `reset` - `PETSC_TRUE` indicates each new nonlinear solve resets the history counter to zero,\nelse it continues storing new values for new nonlinear solves after the old ones\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESGetConvergenceHistory()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetConvergenceHistory\"))\n\"\"\"\nfunction SNESSetConvergenceHistory(petsclib::PetscLibType, snes::PetscSNES, a::Vector{PetscReal}, its::Vector{PetscInt}, na::PetscInt, reset::PetscBool) end\n\n@for_petsc function SNESSetConvergenceHistory(petsclib::$UnionPetscLib, snes::PetscSNES, a::Vector{$PetscReal}, its::Vector{$PetscInt}, na::$PetscInt, reset::PetscBool )\n\n    @chk ccall(\n               (:SNESSetConvergenceHistory, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}, Ptr{$PetscInt}, $PetscInt, PetscBool),\n               snes, a, its, na, reset,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscReal},its::Vector{PetscInt},na::PetscInt = SNESGetConvergenceHistory(petsclib::PetscLibType,snes::PetscSNES) \nGets the arrays used to hold the convergence history.\n\nNot Collective\n\nInput Parameter:\n- `snes` - iterative context obtained from `SNESCreate()`\n\nOutput Parameters:\n- `a`   - array to hold history, usually was set with `SNESSetConvergenceHistory()`\n- `its` - integer array holds the number of linear iterations (or\nnegative if not converged) for each solve.\n- `na`  - size of `a` and `its`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetConvergenceHistory()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetConvergenceHistory\"))\n\"\"\"\nfunction SNESGetConvergenceHistory(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetConvergenceHistory(petsclib::$UnionPetscLib, snes::PetscSNES )\n\ta_ = Ref{Ptr{$PetscReal}}()\n\tits_ = Ref{Ptr{$PetscInt}}()\n\tna_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESGetConvergenceHistory, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{$PetscInt}}, Ptr{$PetscInt}),\n               snes, a_, its_, na_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\tits = unsafe_wrap(Array, its_[], VecGetLocalSize(petsclib, x); own = false)\n\tna = na_[]\n\n\treturn a,its,na\nend \n\n\"\"\"\n\tSNESSetUpdate(petsclib::PetscLibType,snes::PetscSNES, func::SNESUpdateFn) \nSets the general\nat the beginning of every iteration of the nonlinear solve. Specifically\nit is called just before the Jacobian is \"evaluated\" and after the function\nevaluation.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - The nonlinear solver context\n- `func` - The update function; for calling sequence see `SNESUpdateFn`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetJacobian()`, `SNESLineSearchSetPreCheck()`, `SNESLineSearchSetPostCheck()`, `SNESNewtonTRSetPreCheck()`, `SNESNewtonTRSetPostCheck()`,\n`SNESMonitorSet()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetUpdate\"))\n\"\"\"\nfunction SNESSetUpdate(petsclib::PetscLibType, snes::PetscSNES, func::SNESUpdateFn) end\n\n@for_petsc function SNESSetUpdate(petsclib::$UnionPetscLib, snes::PetscSNES, func::SNESUpdateFn )\n\n    @chk ccall(\n               (:SNESSetUpdate, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESUpdateFn}),\n               snes, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESConvergedReasonView(petsclib::PetscLibType,snes::PetscSNES, viewer::PetscViewer) \nDisplays the reason a `SNES` solve converged or diverged to a viewer\n\nCollective\n\nInput Parameters:\n- `snes`   - iterative context obtained from `SNESCreate()`\n- `viewer` - the viewer to display the reason\n\nOptions Database Keys:\n- `-snes_converged_reason`          - print reason for converged or diverged, also prints number of iterations\n- `-snes_converged_reason ::failed` - only print reason and number of iterations when diverged\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNESConvergedReason`, `PetscViewer`, `SNES`,\n`SNESCreate()`, `SNESSetUp()`, `SNESDestroy()`, `SNESSetTolerances()`, `SNESConvergedDefault()`, `SNESGetConvergedReason()`,\n`SNESConvergedReasonViewFromOptions()`,\n`PetscViewerPushFormat()`, `PetscViewerPopFormat()`\n\n# External Links\n$(_doc_external(\"SNES/SNESConvergedReasonView\"))\n\"\"\"\nfunction SNESConvergedReasonView(petsclib::PetscLibType, snes::PetscSNES, viewer::PetscViewer) end\n\n@for_petsc function SNESConvergedReasonView(petsclib::$UnionPetscLib, snes::PetscSNES, viewer::PetscViewer )\n\n    @chk ccall(\n               (:SNESConvergedReasonView, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscViewer),\n               snes, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESConvergedReasonViewSet(petsclib::PetscLibType,snes::PetscSNES, f::external, vctx::Cvoid, reasonviewdestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function that is to be used at the\nend of the nonlinear solver to display the convergence reason of the nonlinear solver.\n\nLogically Collective\n\nInput Parameters:\n- `snes`              - the `SNES` context\n- `f`                 - the `SNESConvergedReason` view function\n- `vctx`              - [optional] user-defined context for private data for the `SNESConvergedReason` view function (use `NULL` if no context is desired)\n- `reasonviewdestroy` - [optional] routine that frees the context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence\n\nCalling sequence of `f`:\n- `snes` - the `SNES` context\n- `vctx` - [optional] context for private data for the function\n\nOptions Database Keys:\n- `-snes_converged_reason`             - sets a default `SNESConvergedReasonView()`\n- `-snes_converged_reason_view_cancel` - cancels all converged reason viewers that have been hardwired into a code by\ncalls to `SNESConvergedReasonViewSet()`, but does not cancel those set via the options database.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESConvergedReason`, `SNESGetConvergedReason()`, `SNESConvergedReasonView()`, `SNESConvergedReasonViewCancel()`,\n`PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESConvergedReasonViewSet\"))\n\"\"\"\nfunction SNESConvergedReasonViewSet(petsclib::PetscLibType, snes::PetscSNES, f::external, vctx::Cvoid, reasonviewdestroy::PetscCtxDestroyFn) end\n\n@for_petsc function SNESConvergedReasonViewSet(petsclib::$UnionPetscLib, snes::PetscSNES, f::external, vctx::Cvoid, reasonviewdestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:SNESConvergedReasonViewSet, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               snes, f, vctx, reasonviewdestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESConvergedReasonViewFromOptions(petsclib::PetscLibType,snes::PetscSNES) \nProcesses command line options to determine if/how a `SNESConvergedReason` is to be viewed at the end of `SNESSolve()`\nAll the user-provided viewer routines set with `SNESConvergedReasonViewSet()` will be called, if they exist.\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` object\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESConvergedReason`, `SNESConvergedReasonViewSet()`, `SNESCreate()`, `SNESSetUp()`, `SNESDestroy()`,\n`SNESSetTolerances()`, `SNESConvergedDefault()`, `SNESGetConvergedReason()`, `SNESConvergedReasonView()`\n\n# External Links\n$(_doc_external(\"SNES/SNESConvergedReasonViewFromOptions\"))\n\"\"\"\nfunction SNESConvergedReasonViewFromOptions(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESConvergedReasonViewFromOptions(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESConvergedReasonViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSolve(petsclib::PetscLibType,snes::PetscSNES, b::Union{PetscVec,Ptr}, x::PetscVec) \nSolves a nonlinear system F(x) = b  associated with a `SNES` object\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `b`    - the constant part of the equation F(x) = b, or `NULL` to use zero.\n- `x`    - the solution vector.\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `SNESCreate()`, `SNESDestroy()`, `SNESSetFunction()`, `SNESSetJacobian()`, `SNESSetGridSequence()`, `SNESGetSolution()`,\n`SNESNewtonTRSetPreCheck()`, `SNESNewtonTRGetPreCheck()`, `SNESNewtonTRSetPostCheck()`, `SNESNewtonTRGetPostCheck()`,\n`SNESLineSearchSetPostCheck()`, `SNESLineSearchGetPostCheck()`, `SNESLineSearchSetPreCheck()`, `SNESLineSearchGetPreCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSolve\"))\n\"\"\"\nfunction SNESSolve(petsclib::PetscLibType, snes::PetscSNES, b::Union{PetscVec,Ptr}, x::PetscVec) end\n\n@for_petsc function SNESSolve(petsclib::$UnionPetscLib, snes::PetscSNES, b::Union{PetscVec,Ptr}, x::PetscVec )\n\n    @chk ccall(\n               (:SNESSolve, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               snes, b, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetType(petsclib::PetscLibType,snes::PetscSNES, type::SNESType) \nSets the algorithm/method to be used to solve the nonlinear system with the given `SNES`\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `type` - a known method\n\nOptions Database Key:\n- `-snes_type <type>` - Sets the method; use -help for a list\nof available methods (for instance, newtonls or newtontr)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESType`, `SNESCreate()`, `SNESDestroy()`, `SNESGetType()`, `SNESSetFromOptions()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetType\"))\n\"\"\"\nfunction SNESSetType(petsclib::PetscLibType, snes::PetscSNES, type::SNESType) end\n\n@for_petsc function SNESSetType(petsclib::$UnionPetscLib, snes::PetscSNES, type::SNESType )\n\n    @chk ccall(\n               (:SNESSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESType),\n               snes, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::SNESType = SNESGetType(petsclib::PetscLibType,snes::PetscSNES) \nGets the `SNES` method type and name (as a string).\n\nNot Collective\n\nInput Parameter:\n- `snes` - nonlinear solver context\n\nOutput Parameter:\n- `type` - `SNES` method (a character string)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSetType()`, `SNESType`, `SNESSetFromOptions()`, `SNES`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetType\"))\n\"\"\"\nfunction SNESGetType(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetType(petsclib::$UnionPetscLib, snes::PetscSNES )\n\ttype_ = Ref{SNESType}()\n\n    @chk ccall(\n               (:SNESGetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESType}),\n               snes, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tSNESSetSolution(petsclib::PetscLibType,snes::PetscSNES, u::PetscVec) \nSets the solution vector for use by the `SNES` routines.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context obtained from `SNESCreate()`\n- `u`    - the solution vector\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESGetSolution()`, `Vec`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetSolution\"))\n\"\"\"\nfunction SNESSetSolution(petsclib::PetscLibType, snes::PetscSNES, u::PetscVec) end\n\n@for_petsc function SNESSetSolution(petsclib::$UnionPetscLib, snes::PetscSNES, u::PetscVec )\n\n    @chk ccall(\n               (:SNESSetSolution, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec),\n               snes, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetSolution(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec) \nReturns the vector where the approximate solution is\nstored. This is the fine grid solution when using `SNESSetGridSequence()`.\n\nNot Collective, but `x` is parallel if `snes` is parallel\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `x` - the solution\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESSetSolution()`, `SNESSolve()`, `SNES`, `SNESGetSolutionUpdate()`, `SNESGetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetSolution\"))\n\"\"\"\nfunction SNESGetSolution(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec) end\n\n@for_petsc function SNESGetSolution(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec )\n\tx_ = Ref(x.ptr)\n\n    @chk ccall(\n               (:SNESGetSolution, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}),\n               snes, x_,\n              )\n\n\tx.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetSolutionUpdate(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec) \nReturns the vector where the solution update is\nstored.\n\nNot Collective, but `x` is parallel if `snes` is parallel\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `x` - the solution update\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESGetSolution()`, `SNESGetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetSolutionUpdate\"))\n\"\"\"\nfunction SNESGetSolutionUpdate(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec) end\n\n@for_petsc function SNESGetSolutionUpdate(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec )\n\tx_ = Ref(x.ptr)\n\n    @chk ccall(\n               (:SNESGetSolutionUpdate, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}),\n               snes, x_,\n              )\n\n\tx.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetFunction(petsclib::PetscLibType,snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, ctx::Cvoid) \nReturns the function that defines the nonlinear system set with `SNESSetFunction()`\n\nNot Collective, but `r` is parallel if `snes` is parallel. Collective if `r` is requested, but has not been created yet.\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `r`   - the vector that is used to store residuals (or `NULL` if you don't want it)\n- `f`   - the function (or `NULL` if you don't want it);  for calling sequence see `SNESFunctionFn`\n- `ctx` - the function context (or `NULL` if you don't want it)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetFunction()`, `SNESGetSolution()`, `SNESFunctionFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetFunction\"))\n\"\"\"\nfunction SNESGetFunction(petsclib::PetscLibType, snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, ctx::Cvoid) end\n\n@for_petsc function SNESGetFunction(petsclib::$UnionPetscLib, snes::PetscSNES, r::PetscVec, f::SNESFunctionFn, ctx::Cvoid )\n\tr_ = Ref(r.ptr)\n\n    @chk ccall(\n               (:SNESGetFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}, SNESFunctionFn, Cvoid),\n               snes, r_, f, ctx,\n              )\n\n\tr.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetNGS(petsclib::PetscLibType,snes::PetscSNES, f::SNESNGSFn, ctx::Cvoid) \nReturns the function and context set with `SNESSetNGS()`\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `f`   - the function (or `NULL`) see `SNESNGSFn` for calling sequence\n- `ctx` - the function context (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESSetNGS()`, `SNESGetFunction()`, `SNESNGSFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetNGS\"))\n\"\"\"\nfunction SNESGetNGS(petsclib::PetscLibType, snes::PetscSNES, f::SNESNGSFn, ctx::Cvoid) end\n\n@for_petsc function SNESGetNGS(petsclib::$UnionPetscLib, snes::PetscSNES, f::SNESNGSFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESGetNGS, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNGSFn, Cvoid),\n               snes, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetOptionsPrefix(petsclib::PetscLibType,snes::PetscSNES, prefix::String) \nSets the prefix used for searching for all\n`SNES` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSetFromOptions()`, `SNESAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetOptionsPrefix\"))\n\"\"\"\nfunction SNESSetOptionsPrefix(petsclib::PetscLibType, snes::PetscSNES, prefix::String) end\n\n@for_petsc function SNESSetOptionsPrefix(petsclib::$UnionPetscLib, snes::PetscSNES, prefix::String )\n\n    @chk ccall(\n               (:SNESSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cchar}),\n               snes, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESAppendOptionsPrefix(petsclib::PetscLibType,snes::PetscSNES, prefix::String) \nAppends to the prefix used for searching for all\n`SNES` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESGetOptionsPrefix()`, `SNESSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"SNES/SNESAppendOptionsPrefix\"))\n\"\"\"\nfunction SNESAppendOptionsPrefix(petsclib::PetscLibType, snes::PetscSNES, prefix::String) end\n\n@for_petsc function SNESAppendOptionsPrefix(petsclib::$UnionPetscLib, snes::PetscSNES, prefix::String )\n\n    @chk ccall(\n               (:SNESAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cchar}),\n               snes, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetOptionsPrefix(petsclib::PetscLibType,snes::PetscSNES, prefix::String) \nGets the prefix used for searching for all\n`SNES` options in the database.\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSetOptionsPrefix()`, `SNESAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetOptionsPrefix\"))\n\"\"\"\nfunction SNESGetOptionsPrefix(petsclib::PetscLibType, snes::PetscSNES, prefix::String) end\n\n@for_petsc function SNESGetOptionsPrefix(petsclib::$UnionPetscLib, snes::PetscSNES, prefix::String )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:SNESGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Ptr{Cchar}}),\n               snes, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a method to the nonlinear solver package.\n\nNot Collective\n\nInput Parameters:\n- `sname`    - name of a new user-defined solver\n- `function` - routine to create method context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESRegisterAll()`, `SNESRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"SNES/SNESRegister\"))\n\"\"\"\nfunction SNESRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function SNESRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:SNESRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESTestLocalMin(petsclib::PetscLibType,snes::PetscSNES) \n\n# External Links\n$(_doc_external(\"SNES/SNESTestLocalMin\"))\n\"\"\"\nfunction SNESTestLocalMin(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESTestLocalMin(petsclib::$UnionPetscLib, snes::PetscSNES )\n\n    @chk ccall(\n               (:SNESTestLocalMin, $petsc_library),\n               PetscErrorCode,\n               (CSNES,),\n               snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESKSPSetUseEW(petsclib::PetscLibType,snes::PetscSNES, flag::PetscBool) \nSets `SNES` to the use Eisenstat\ncomputing relative tolerance for linear solvers within an inexact\nNewton method.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - `SNES` context\n- `flag` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Keys:\n- `-snes_ksp_ew`                       - use Eisenstat-Walker method for determining linear system convergence\n- `-snes_ksp_ew_version ver`           - version of  Eisenstat-Walker method\n- `-snes_ksp_ew_rtol0 <rtol0>`         - Sets rtol0\n- `-snes_ksp_ew_rtolmax <rtolmax>`     - Sets rtolmax\n- `-snes_ksp_ew_gamma <gamma>`         - Sets gamma\n- `-snes_ksp_ew_alpha <alpha>`         - Sets alpha\n- `-snes_ksp_ew_alpha2 <alpha2>`       - Sets alpha2\n- `-snes_ksp_ew_threshold <threshold>` - Sets threshold\n\nLevel: advanced\n\n-seealso: [](ch_snes), `KSP`, `SNES`, `SNESKSPGetUseEW()`, `SNESKSPGetParametersEW()`, `SNESKSPSetParametersEW()`\n\n# External Links\n$(_doc_external(\"SNES/SNESKSPSetUseEW\"))\n\"\"\"\nfunction SNESKSPSetUseEW(petsclib::PetscLibType, snes::PetscSNES, flag::PetscBool) end\n\n@for_petsc function SNESKSPSetUseEW(petsclib::$UnionPetscLib, snes::PetscSNES, flag::PetscBool )\n\n    @chk ccall(\n               (:SNESKSPSetUseEW, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflag::PetscBool = SNESKSPGetUseEW(petsclib::PetscLibType,snes::PetscSNES) \nGets if `SNES` is using Eisenstat\nfor computing relative tolerance for linear solvers within an\ninexact Newton method.\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameter:\n- `flag` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESKSPSetUseEW()`, `SNESKSPGetParametersEW()`, `SNESKSPSetParametersEW()`\n\n# External Links\n$(_doc_external(\"SNES/SNESKSPGetUseEW\"))\n\"\"\"\nfunction SNESKSPGetUseEW(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESKSPGetUseEW(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESKSPGetUseEW, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, flag_,\n              )\n\n\tflag = flag_[]\n\n\treturn flag\nend \n\n\"\"\"\n\tSNESKSPSetParametersEW(petsclib::PetscLibType,snes::PetscSNES, version::PetscInt, rtol_0::PetscReal, rtol_max::PetscReal, gamma::PetscReal, alpha::PetscReal, alpha2::PetscReal, threshold::PetscReal) \nSets parameters for Eisenstat\nconvergence criteria for the linear solvers within an inexact\nNewton method.\n\nLogically Collective\n\nInput Parameters:\n- `snes`      - `SNES` context\n- `version`   - version 1, 2 (default is 2), 3 or 4\n- `rtol_0`    - initial relative tolerance (0 <= rtol_0 < 1)\n- `rtol_max`  - maximum relative tolerance (0 <= rtol_max < 1)\n- `gamma`     - multiplicative factor for version 2 rtol computation\n(0 <= gamma2 <= 1)\n- `alpha`     - power for version 2 rtol computation (1 < alpha <= 2)\n- `alpha2`    - power for safeguard\n- `threshold` - threshold for imposing safeguard (0 < threshold < 1)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESKSPSetUseEW()`, `SNESKSPGetUseEW()`, `SNESKSPGetParametersEW()`\n\n# External Links\n$(_doc_external(\"SNES/SNESKSPSetParametersEW\"))\n\"\"\"\nfunction SNESKSPSetParametersEW(petsclib::PetscLibType, snes::PetscSNES, version::PetscInt, rtol_0::PetscReal, rtol_max::PetscReal, gamma::PetscReal, alpha::PetscReal, alpha2::PetscReal, threshold::PetscReal) end\n\n@for_petsc function SNESKSPSetParametersEW(petsclib::$UnionPetscLib, snes::PetscSNES, version::$PetscInt, rtol_0::$PetscReal, rtol_max::$PetscReal, gamma::$PetscReal, alpha::$PetscReal, alpha2::$PetscReal, threshold::$PetscReal )\n\n    @chk ccall(\n               (:SNESKSPSetParametersEW, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               snes, version, rtol_0, rtol_max, gamma, alpha, alpha2, threshold,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tversion::PetscInt,rtol_0::PetscReal,rtol_max::PetscReal,gamma::PetscReal,alpha::PetscReal,alpha2::PetscReal,threshold::PetscReal = SNESKSPGetParametersEW(petsclib::PetscLibType,snes::PetscSNES) \nGets parameters for Eisenstat\nconvergence criteria for the linear solvers within an inexact\nNewton method.\n\nNot Collective\n\nInput Parameter:\n- `snes` - `SNES` context\n\nOutput Parameters:\n- `version`   - version 1, 2 (default is 2), 3 or 4\n- `rtol_0`    - initial relative tolerance (0 <= rtol_0 < 1)\n- `rtol_max`  - maximum relative tolerance (0 <= rtol_max < 1)\n- `gamma`     - multiplicative factor for version 2 rtol computation (0 <= gamma2 <= 1)\n- `alpha`     - power for version 2 rtol computation (1 < alpha <= 2)\n- `alpha2`    - power for safeguard\n- `threshold` - threshold for imposing safeguard (0 < threshold < 1)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESKSPSetUseEW()`, `SNESKSPGetUseEW()`, `SNESKSPSetParametersEW()`\n\n# External Links\n$(_doc_external(\"SNES/SNESKSPGetParametersEW\"))\n\"\"\"\nfunction SNESKSPGetParametersEW(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESKSPGetParametersEW(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tversion_ = Ref{$PetscInt}()\n\trtol_0_ = Ref{$PetscReal}()\n\trtol_max_ = Ref{$PetscReal}()\n\tgamma_ = Ref{$PetscReal}()\n\talpha_ = Ref{$PetscReal}()\n\talpha2_ = Ref{$PetscReal}()\n\tthreshold_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESKSPGetParametersEW, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               snes, version_, rtol_0_, rtol_max_, gamma_, alpha_, alpha2_, threshold_,\n              )\n\n\tversion = version_[]\n\trtol_0 = rtol_0_[]\n\trtol_max = rtol_max_[]\n\tgamma = gamma_[]\n\talpha = alpha_[]\n\talpha2 = alpha2_[]\n\tthreshold = threshold_[]\n\n\treturn version,rtol_0,rtol_max,gamma,alpha,alpha2,threshold\nend \n\n\"\"\"\n\tSNESGetKSP(petsclib::PetscLibType,snes::PetscSNES, ksp::PetscKSP) \nReturns the `KSP` context for a `SNES` solver.\n\nNot Collective, but if `snes` is parallel, then `ksp` is parallel\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `ksp` - the `KSP` context\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNES`, `KSP`, `PC`, `KSPGetPC()`, `SNESCreate()`, `KSPCreate()`, `SNESSetKSP()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetKSP\"))\n\"\"\"\nfunction SNESGetKSP(petsclib::PetscLibType, snes::PetscSNES, ksp::PetscKSP) end\n\n@for_petsc function SNESGetKSP(petsclib::$UnionPetscLib, snes::PetscSNES, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:SNESGetKSP, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CKSP}),\n               snes, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetDM(petsclib::PetscLibType,snes::PetscSNES, dm::PetscDM) \nSets the `DM` that may be used by some `SNES` nonlinear solvers or their underlying preconditioners\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the nonlinear solver context\n- `dm`   - the `DM`, cannot be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `DM`, `SNES`, `SNESGetDM()`, `KSPSetDM()`, `KSPGetDM()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetDM\"))\n\"\"\"\nfunction SNESSetDM(petsclib::PetscLibType, snes::PetscSNES, dm::PetscDM) end\n\n@for_petsc function SNESSetDM(petsclib::$UnionPetscLib, snes::PetscSNES, dm::PetscDM )\n\n    @chk ccall(\n               (:SNESSetDM, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CDM),\n               snes, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = SNESGetDM(petsclib::PetscLibType,snes::PetscSNES) \nGets the `DM` that may be used by some `SNES` nonlinear solvers/preconditioners\n\nNot Collective but `dm` obtained is parallel on `snes`\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `dm` - the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `DM`, `SNES`, `SNESSetDM()`, `KSPSetDM()`, `KSPGetDM()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetDM\"))\n\"\"\"\nfunction SNESGetDM(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESGetDM(petsclib::$UnionPetscLib, snes::PetscSNES)\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:SNESGetDM, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CDM}),\n               snes, dm_,\n              )\n\n\tdm = PetscDM(dm_[], petsclib)\n\n\treturn dm\nend \n\n\"\"\"\n\tSNESSetNPC(petsclib::PetscLibType,snes::PetscSNES, npc::PetscSNES) \nSets the nonlinear preconditioner to be used.\n\nCollective\n\nInput Parameters:\n- `snes` - iterative context obtained from `SNESCreate()`\n- `npc`  - the `SNES` nonlinear preconditioner object\n\nOptions Database Key:\n- `-npc_snes_type <type>` - set the type of the `SNES` to use as the nonlinear preconditioner\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESNGS`, `SNESFAS`, `SNESGetNPC()`, `SNESHasNPC()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetNPC\"))\n\"\"\"\nfunction SNESSetNPC(petsclib::PetscLibType, snes::PetscSNES, npc::PetscSNES) end\n\n@for_petsc function SNESSetNPC(petsclib::$UnionPetscLib, snes::PetscSNES, npc::PetscSNES )\n\n    @chk ccall(\n               (:SNESSetNPC, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CSNES),\n               snes, npc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetNPC(petsclib::PetscLibType,snes::PetscSNES, pc::PetscSNES) \nGets a nonlinear preconditioning solver SNES` to be used to precondition the original nonlinear solver.\n\nNot Collective; but any changes to the obtained the `pc` object must be applied collectively\n\nInput Parameter:\n- `snes` - iterative context obtained from `SNESCreate()`\n\nOutput Parameter:\n- `pc` - the `SNES` preconditioner context\n\nOptions Database Key:\n- `-npc_snes_type <type>` - set the type of the `SNES` to use as the nonlinear preconditioner\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESSetNPC()`, `SNESHasNPC()`, `SNES`, `SNESCreate()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetNPC\"))\n\"\"\"\nfunction SNESGetNPC(petsclib::PetscLibType, snes::PetscSNES, pc::PetscSNES) end\n\n@for_petsc function SNESGetNPC(petsclib::$UnionPetscLib, snes::PetscSNES, pc::PetscSNES )\n\tpc_ = Ref(pc.ptr)\n\n    @chk ccall(\n               (:SNESGetNPC, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CSNES}),\n               snes, pc_,\n              )\n\n\tpc.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\thas_npc::PetscBool = SNESHasNPC(petsclib::PetscLibType,snes::PetscSNES) \nReturns whether a nonlinear preconditioner is associated with the given `SNES`\n\nNot Collective\n\nInput Parameter:\n- `snes` - iterative context obtained from `SNESCreate()`\n\nOutput Parameter:\n- `has_npc` - whether the `SNES` has a nonlinear preconditioner or not\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESSetNPC()`, `SNESGetNPC()`\n\n# External Links\n$(_doc_external(\"SNES/SNESHasNPC\"))\n\"\"\"\nfunction SNESHasNPC(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESHasNPC(petsclib::$UnionPetscLib, snes::PetscSNES )\n\thas_npc_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESHasNPC, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, has_npc_,\n              )\n\n\thas_npc = has_npc_[]\n\n\treturn has_npc\nend \n\n\"\"\"\n\tSNESSetNPCSide(petsclib::PetscLibType,snes::PetscSNES, side::PCSide) \nSets the nonlinear preconditioning side used by the nonlinear preconditioner inside `SNES`.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - iterative context obtained from `SNESCreate()`\n\nOutput Parameter:\n- `side` - the preconditioning side, where side is one of\n-seealso: [](ch_snes), `SNES`, `SNESGetNPC()`, `SNESNRICHARDSON`, `SNESNCG`, `SNESType`, `SNESGetNPCSide()`, `KSPSetPCSide()`, `PC_LEFT`, `PC_RIGHT`, `PCSide`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetNPCSide\"))\n\"\"\"\nfunction SNESSetNPCSide(petsclib::PetscLibType, snes::PetscSNES, side::PCSide) end\n\n@for_petsc function SNESSetNPCSide(petsclib::$UnionPetscLib, snes::PetscSNES, side::PCSide )\n\n    @chk ccall(\n               (:SNESSetNPCSide, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PCSide),\n               snes, side,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetNPCSide(petsclib::PetscLibType,snes::PetscSNES, side::PCSide) \nGets the preconditioning side used by the nonlinear preconditioner inside `SNES`.\n\nNot Collective\n\nInput Parameter:\n- `snes` - iterative context obtained from `SNESCreate()`\n\nOutput Parameter:\n- `side` - the preconditioning side, where side is one of\n-seealso: [](ch_snes), `SNES`, `SNESGetNPC()`, `SNESSetNPCSide()`, `KSPGetPCSide()`, `PC_LEFT`, `PC_RIGHT`, `PCSide`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetNPCSide\"))\n\"\"\"\nfunction SNESGetNPCSide(petsclib::PetscLibType, snes::PetscSNES, side::PCSide) end\n\n@for_petsc function SNESGetNPCSide(petsclib::$UnionPetscLib, snes::PetscSNES, side::PCSide )\n\n    @chk ccall(\n               (:SNESGetNPCSide, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PCSide}),\n               snes, side,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESSetLineSearch(petsclib::PetscLibType,snes::PetscSNES, linesearch::SNESLineSearch) \nSets the `SNESLineSearch` to be used for a given `SNES`\n\nCollective\n\nInput Parameters:\n- `snes`       - iterative context obtained from `SNESCreate()`\n- `linesearch` - the linesearch object\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESGetLineSearch()`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetLineSearch\"))\n\"\"\"\nfunction SNESSetLineSearch(petsclib::PetscLibType, snes::PetscSNES, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESSetLineSearch(petsclib::$UnionPetscLib, snes::PetscSNES, linesearch::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESSetLineSearch, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESLineSearch),\n               snes, linesearch,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetLineSearch(petsclib::PetscLibType,snes::PetscSNES, linesearch::SNESLineSearch) \nReturns the line search associated with the `SNES`.\n\nNot Collective\n\nInput Parameter:\n- `snes` - iterative context obtained from `SNESCreate()`\n\nOutput Parameter:\n- `linesearch` - linesearch context\n\nLevel: beginner\n\n-seealso: [](ch_snes), `SNESLineSearch`, `SNESSetLineSearch()`, `SNESLineSearchCreate()`, `SNESLineSearchSetFromOptions()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetLineSearch\"))\n\"\"\"\nfunction SNESGetLineSearch(petsclib::PetscLibType, snes::PetscSNES, linesearch::SNESLineSearch) end\n\n@for_petsc function SNESGetLineSearch(petsclib::$UnionPetscLib, snes::PetscSNES, linesearch::SNESLineSearch )\n\n    @chk ccall(\n               (:SNESGetLineSearch, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESLineSearch}),\n               snes, linesearch,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESComputeJacobianDefault(petsclib::PetscLibType,snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid) \nComputes the Jacobian using finite differences.\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `x1`   - compute Jacobian at this point\n- `ctx`  - application's function context, as set with `SNESSetFunction()`\n\nOutput Parameters:\n- `J` - Jacobian matrix (not altered in this routine)\n- `B` - newly computed Jacobian matrix to use with preconditioner (generally the same as `J`)\n\nOptions Database Keys:\n- `-snes_fd`          - Activates `SNESComputeJacobianDefault()`\n- `-snes_fd_coloring` - Activates a faster computation that uses a graph coloring of the matrix\n- `-snes_test_err`    - Square root of function error tolerance, default square root of machine\nepsilon (1.e-8 in double, 3.e-4 in single)\n- `-mat_fd_type`      - Either wp or ds (see `MATMFFD_WP` or `MATMFFD_DS`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESSetJacobian()`, `SNESComputeJacobianDefaultColor()`, `MatCreateSNESMF()`\n\n# External Links\n$(_doc_external(\"SNES/SNESComputeJacobianDefault\"))\n\"\"\"\nfunction SNESComputeJacobianDefault(petsclib::PetscLibType, snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function SNESComputeJacobianDefault(petsclib::$UnionPetscLib, snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESComputeJacobianDefault, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CMat, CMat, Ptr{Cvoid}),\n               snes, x1, J, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESApplyNPC(petsclib::PetscLibType,snes::PetscSNES, x::PetscVec, f::PetscVec, y::PetscVec) \nCalls `SNESSolve()` on the preconditioner for the `SNES`\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `x`    - input vector\n- `f`    - optional; the function evaluation on `x`\n\nOutput Parameter:\n- `y` - function vector, as set by `SNESSetFunction()`\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESGetNPC()`, `SNESSetNPC()`, `SNESComputeFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESApplyNPC\"))\n\"\"\"\nfunction SNESApplyNPC(petsclib::PetscLibType, snes::PetscSNES, x::PetscVec, f::PetscVec, y::PetscVec) end\n\n@for_petsc function SNESApplyNPC(petsclib::$UnionPetscLib, snes::PetscSNES, x::PetscVec, f::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:SNESApplyNPC, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, CVec),\n               snes, x, f, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESComputeFunctionDefaultNPC(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, F::PetscVec) \n\n# External Links\n$(_doc_external(\"SNES/SNESComputeFunctionDefaultNPC\"))\n\"\"\"\nfunction SNESComputeFunctionDefaultNPC(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, F::PetscVec) end\n\n@for_petsc function SNESComputeFunctionDefaultNPC(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, F::PetscVec )\n\n    @chk ccall(\n               (:SNESComputeFunctionDefaultNPC, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               snes, X, F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfnorm::PetscReal = SNESGetNPCFunction(petsclib::PetscLibType,snes::PetscSNES, F::PetscVec) \nGets the current function value and its norm from a nonlinear preconditioner after `SNESSolve()` has been called on that `SNES`\n\nCollective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `F`     - function vector\n- `fnorm` - the norm of `F`\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESGetNPC()`, `SNESSetNPC()`, `SNESComputeFunction()`, `SNESApplyNPC()`, `SNESSolve()`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetNPCFunction\"))\n\"\"\"\nfunction SNESGetNPCFunction(petsclib::PetscLibType, snes::PetscSNES, F::PetscVec) end\n\n@for_petsc function SNESGetNPCFunction(petsclib::$UnionPetscLib, snes::PetscSNES, F::PetscVec )\n\tfnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESGetNPCFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, Ptr{$PetscReal}),\n               snes, F, fnorm_,\n              )\n\n\tfnorm = fnorm_[]\n\n\treturn fnorm\nend \n\n\"\"\"\n\tSNESSetObjective(petsclib::PetscLibType,snes::PetscSNES, obj::SNESObjectiveFn, ctx::Cvoid) \nSets the objective function minimized by some of the `SNES` linesearch methods, used instead of the 2\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `obj`  - objective evaluation routine; see `SNESObjectiveFn` for the calling sequence\n- `ctx`  - [optional] user-defined context for private data for the objective evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESLineSearch()`, `SNESGetObjective()`, `SNESComputeObjective()`, `SNESSetFunction()`, `SNESSetJacobian()`,\n`SNESObjectiveFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetObjective\"))\n\"\"\"\nfunction SNESSetObjective(petsclib::PetscLibType, snes::PetscSNES, obj::SNESObjectiveFn, ctx::Cvoid) end\n\n@for_petsc function SNESSetObjective(petsclib::$UnionPetscLib, snes::PetscSNES, obj::SNESObjectiveFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESSetObjective, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESObjectiveFn}, Ptr{Cvoid}),\n               snes, obj, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESGetObjective(petsclib::PetscLibType,snes::PetscSNES, obj::SNESObjectiveFn, ctx::Cvoid) \nReturns the objective function set with `SNESSetObjective()`\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `obj` - objective evaluation routine (or `NULL`); see `SNESObjectiveFn` for the calling sequence\n- `ctx` - the function context (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSetObjective()`, `SNESGetSolution()`, `SNESObjectiveFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetObjective\"))\n\"\"\"\nfunction SNESGetObjective(petsclib::PetscLibType, snes::PetscSNES, obj::SNESObjectiveFn, ctx::Cvoid) end\n\n@for_petsc function SNESGetObjective(petsclib::$UnionPetscLib, snes::PetscSNES, obj::SNESObjectiveFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESGetObjective, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESObjectiveFn, Cvoid),\n               snes, obj, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tob::PetscReal = SNESComputeObjective(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec) \nComputes the objective function that has been provided by `SNESSetObjective()`\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `X`    - the state vector\n\nOutput Parameter:\n- `ob` - the objective value\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESLineSearch`, `SNES`, `SNESSetObjective()`, `SNESGetSolution()`\n\n# External Links\n$(_doc_external(\"SNES/SNESComputeObjective\"))\n\"\"\"\nfunction SNESComputeObjective(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec) end\n\n@for_petsc function SNESComputeObjective(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec )\n\tob_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESComputeObjective, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, Ptr{$PetscReal}),\n               snes, X, ob_,\n              )\n\n\tob = ob_[]\n\n\treturn ob\nend \n\n\"\"\"\n\tSNESObjectiveComputeFunctionDefaultFD(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, F::PetscVec, ctx::Cvoid) \nComputes the gradient of a user provided objective function\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `X`    - the state vector\n- `ctx`  - the (ignored) function context\n\nOutput Parameter:\n- `F` - the function value\n\nOptions Database Keys:\n- `-snes_fd_function_eps` - Tolerance for including non-zero entries into the gradient, default is 1.e-6\n- `-snes_fd_function`     - Computes function from user provided objective function (set with `SNESSetObjective()`) with finite difference\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESSetObjective()`, `SNESSetFunction()`, `SNESComputeObjective()`, `SNESComputeJacobianDefault()`, `SNESObjectiveFn`\n\n# External Links\n$(_doc_external(\"SNES/SNESObjectiveComputeFunctionDefaultFD\"))\n\"\"\"\nfunction SNESObjectiveComputeFunctionDefaultFD(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, F::PetscVec, ctx::Cvoid) end\n\n@for_petsc function SNESObjectiveComputeFunctionDefaultFD(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, F::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESObjectiveComputeFunctionDefaultFD, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{Cvoid}),\n               snes, X, F, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESComputeJacobianDefaultColor(petsclib::PetscLibType,snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid) \nComputes the Jacobian using\nfinite differences and coloring to exploit matrix sparsity.\n\nCollective\n\nInput Parameters:\n- `snes` - nonlinear solver object\n- `x1`   - location at which to evaluate Jacobian\n- `ctx`  - `MatFDColoring` context or `NULL`\n\nOutput Parameters:\n- `J` - Jacobian matrix (not altered in this routine)\n- `B` - newly computed Jacobian matrix to use with preconditioner (generally the same as `J`)\n\nOptions Database Keys:\n- `-snes_fd_color_use_mat`       - use a matrix coloring from the explicit matrix nonzero pattern instead of from the `DM` providing the matrix\n- `-snes_fd_color`               - Activates `SNESComputeJacobianDefaultColor()` in `SNESSetFromOptions()`\n- `-mat_fd_coloring_err <err>`   - Sets <err> (square root of relative error in the function)\n- `-mat_fd_coloring_umin <umin>` - Sets umin, the minimum allowable u-value magnitude\n- `-mat_fd_type`                 - Either wp or ds (see `MATMFFD_WP` or `MATMFFD_DS`)\n- `-snes_mf_operator`            - Use matrix-free application of Jacobian\n- `-snes_mf`                     - Use matrix-free Jacobian with no explicit Jacobian representation\n\n-seealso: [](ch_snes), `SNES`, `SNESSetJacobian()`, `SNESTestJacobian()`, `SNESComputeJacobianDefault()`, `SNESSetUseMatrixFree()`,\n`MatFDColoringCreate()`, `MatFDColoringSetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESComputeJacobianDefaultColor\"))\n\"\"\"\nfunction SNESComputeJacobianDefaultColor(petsclib::PetscLibType, snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function SNESComputeJacobianDefaultColor(petsclib::$UnionPetscLib, snes::PetscSNES, x1::PetscVec, J::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESComputeJacobianDefaultColor, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CMat, CMat, Ptr{Cvoid}),\n               snes, x1, J, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESPruneJacobianColor(petsclib::PetscLibType,snes::PetscSNES, J::PetscMat, B::PetscMat) \nRemove nondiagonal zeros in the Jacobian matrix and update the `MatMFFD` coloring information based on the new nonzero structure\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `J`    - Jacobian matrix (not altered in this routine)\n- `B`    - newly computed Jacobian matrix to use with preconditioner (generally the same as `J`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESComputeJacobianDefaultColor()`, `MatEliminateZeros()`, `MatFDColoringCreate()`, `MatFDColoringSetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESPruneJacobianColor\"))\n\"\"\"\nfunction SNESPruneJacobianColor(petsclib::PetscLibType, snes::PetscSNES, J::PetscMat, B::PetscMat) end\n\n@for_petsc function SNESPruneJacobianColor(petsclib::$UnionPetscLib, snes::PetscSNES, J::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:SNESPruneJacobianColor, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CMat, CMat),\n               snes, J, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::Cvoid = SNESMonitorSAWsCreate(petsclib::PetscLibType,snes::PetscSNES) \ncreate an SAWs monitor context for `SNES`\n\nCollective\n\nInput Parameter:\n- `snes` - `SNES` to monitor\n\nOutput Parameter:\n- `ctx` - context for monitor\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESMonitorSet()`, `SNES`, `SNESMonitorSAWs()`, `SNESMonitorSAWsDestroy()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorSAWsCreate\"))\n\"\"\"\nfunction SNESMonitorSAWsCreate(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESMonitorSAWsCreate(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tctx_ = Ref{Cvoid}()\n\n    @chk ccall(\n               (:SNESMonitorSAWsCreate, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Cvoid),\n               snes, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tSNESMonitorSAWsDestroy(petsclib::PetscLibType,ctx::Cvoid) \ndestroy a monitor context created with `SNESMonitorSAWsCreate()`\n\nCollective\n\nInput Parameter:\n- `ctx` - monitor context\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESMonitorSAWsCreate()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorSAWsDestroy\"))\n\"\"\"\nfunction SNESMonitorSAWsDestroy(petsclib::PetscLibType, ctx::Cvoid) end\n\n@for_petsc function SNESMonitorSAWsDestroy(petsclib::$UnionPetscLib, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESMonitorSAWsDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cvoid,),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorSAWs(petsclib::PetscLibType,snes::PetscSNES, n::PetscInt, rnorm::PetscReal, ctx::Cvoid) \nmonitor solution process of `SNES` using SAWs\n\nCollective\n\nInput Parameters:\n- `snes`  - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `ctx`   - `PetscViewer` of type `PETSCVIEWERSAWS`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `PetscViewerSAWsOpen()`, `SNESMonitorSAWsDestroy()`, `SNESMonitorSAWsCreate()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorSAWs\"))\n\"\"\"\nfunction SNESMonitorSAWs(petsclib::PetscLibType, snes::PetscSNES, n::PetscInt, rnorm::PetscReal, ctx::Cvoid) end\n\n@for_petsc function SNESMonitorSAWs(petsclib::$UnionPetscLib, snes::PetscSNES, n::$PetscInt, rnorm::$PetscReal, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESMonitorSAWs, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{Cvoid}),\n               snes, n, rnorm, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNGMRESSetRestartFmRise(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \nIncrease the restart count if the step x_M increases the residual F_M inside a `SNESNGMRES` solve\n\nInput Parameters:\n- `snes` - the `SNES` context.\n- `flg`  - boolean value deciding whether to use the option or not, default is `PETSC_FALSE`\n\nOptions Database Key:\n- `-snes_ngmres_restart_fm_rise` - Increase the restart count if the step x_M increases the residual F_M\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNES_NGMRES_RESTART_DIFFERENCE`, `SNESNGMRES`, `SNESNGMRESRestartType`, `SNESNGMRESSetRestartType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNGMRESSetRestartFmRise\"))\n\"\"\"\nfunction SNESNGMRESSetRestartFmRise(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESNGMRESSetRestartFmRise(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESNGMRESSetRestartFmRise, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = SNESNGMRESGetRestartFmRise(petsclib::PetscLibType,snes::PetscSNES) \n\n# External Links\n$(_doc_external(\"SNES/SNESNGMRESGetRestartFmRise\"))\n\"\"\"\nfunction SNESNGMRESGetRestartFmRise(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNGMRESGetRestartFmRise(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESNGMRESGetRestartFmRise, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tSNESNGMRESSetRestartType(petsclib::PetscLibType,snes::PetscSNES, rtype::SNESNGMRESRestartType) \nSets the restart type for `SNESNGMRES`.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the iterative context\n- `rtype` - restart type, see `SNESNGMRESRestartType`\n\nOptions Database Keys:\n- `-snes_ngmres_restart_type<difference,periodic,none>` - set the restart type\n- `-snes_ngmres_restart <30>`                           - sets the number of iterations before restart for periodic\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNES_NGMRES_RESTART_DIFFERENCE`, `SNESNGMRES`, `SNESNGMRESRestartType`, `SNESNGMRESSetRestartFmRise()`,\n`SNESNGMRESSetSelectType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNGMRESSetRestartType\"))\n\"\"\"\nfunction SNESNGMRESSetRestartType(petsclib::PetscLibType, snes::PetscSNES, rtype::SNESNGMRESRestartType) end\n\n@for_petsc function SNESNGMRESSetRestartType(petsclib::$UnionPetscLib, snes::PetscSNES, rtype::SNESNGMRESRestartType )\n\n    @chk ccall(\n               (:SNESNGMRESSetRestartType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNGMRESRestartType),\n               snes, rtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNGMRESSetSelectType(petsclib::PetscLibType,snes::PetscSNES, stype::SNESNGMRESSelectType) \nSets the selection type for `SNESNGMRES`.  This determines how the candidate solution and\ncombined solution are used to create the next iterate.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the iterative context\n- `stype` - selection type, see `SNESNGMRESSelectType`\n\nOptions Database Key:\n- `-snes_ngmres_select_type<difference,none,linesearch>` - select type\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNGMRES`, `SNESNGMRESSelectType`, `SNES_NGMRES_SELECT_NONE`, `SNES_NGMRES_SELECT_DIFFERENCE`, `SNES_NGMRES_SELECT_LINESEARCH`,\n`SNESNGMRESSetRestartType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNGMRESSetSelectType\"))\n\"\"\"\nfunction SNESNGMRESSetSelectType(petsclib::PetscLibType, snes::PetscSNES, stype::SNESNGMRESSelectType) end\n\n@for_petsc function SNESNGMRESSetSelectType(petsclib::$UnionPetscLib, snes::PetscSNES, stype::SNESNGMRESSelectType )\n\n    @chk ccall(\n               (:SNESNGMRESSetSelectType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNGMRESSelectType),\n               snes, stype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESVISetComputeVariableBounds(petsclib::PetscLibType,snes::PetscSNES, compute::external) \nSets a function that is called to compute the bounds on variable for\n(differential) variable inequalities.\n\nInput Parameters:\n- `snes`    - the `SNES` context\n- `compute` - function that computes the bounds\n\nCalling sequence of `compute`:\n- `snes`   - the `SNES` context\n- `lower`  - vector to hold lower bounds\n- `higher` - vector to hold upper bounds\n\nLevel: advanced\n\n-seealso: [](sec_vi), `SNES`, `SNESVISetVariableBounds()`, `DMSetVariableBounds()`, `SNESSetFunctionDomainError()`, `SNESSetJacobianDomainError()`, `SNESVINEWTONRSLS`, `SNESVINEWTONSSLS`,\n`SNESSetType()`, `PETSC_NINFINITY`, `PETSC_INFINITY`\n\n# External Links\n$(_doc_external(\"SNES/SNESVISetComputeVariableBounds\"))\n\"\"\"\nfunction SNESVISetComputeVariableBounds(petsclib::PetscLibType, snes::PetscSNES, compute::external) end\n\n@for_petsc function SNESVISetComputeVariableBounds(petsclib::$UnionPetscLib, snes::PetscSNES, compute::external )\n\n    @chk ccall(\n               (:SNESVISetComputeVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external),\n               snes, compute,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESVIGetActiveSetIS(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, F::PetscVec, ISact::IS) \nGets the global indices for the active set variables\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `X`    - the `snes` solution vector\n- `F`    - the nonlinear function vector\n\nOutput Parameter:\n- `ISact` - active set index set\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONRSLS`, `SNESVINEWTONSSLS`\n\n# External Links\n$(_doc_external(\"SNES/SNESVIGetActiveSetIS\"))\n\"\"\"\nfunction SNESVIGetActiveSetIS(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, F::PetscVec, ISact::IS) end\n\n@for_petsc function SNESVIGetActiveSetIS(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, F::PetscVec, ISact::IS )\n\n    @chk ccall(\n               (:SNESVIGetActiveSetIS, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{CIS}),\n               snes, X, F, ISact,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfnorm::PetscReal = SNESVIComputeInactiveSetFnorm(petsclib::PetscLibType,snes::PetscSNES, F::PetscVec, X::PetscVec) \nComputes the function norm for variational inequalities on the inactive set\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `F`    - the nonlinear function vector\n- `X`    - the `SNES` solution vector\n\nOutput Parameter:\n- `fnorm` - the function norm\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONRSLS`, `SNESVINEWTONSSLS`, `SNESLineSearchSetVIFunctions()`\n\n# External Links\n$(_doc_external(\"SNES/SNESVIComputeInactiveSetFnorm\"))\n\"\"\"\nfunction SNESVIComputeInactiveSetFnorm(petsclib::PetscLibType, snes::PetscSNES, F::PetscVec, X::PetscVec) end\n\n@for_petsc function SNESVIComputeInactiveSetFnorm(petsclib::$UnionPetscLib, snes::PetscSNES, F::PetscVec, X::PetscVec )\n\tfnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESVIComputeInactiveSetFnorm, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{$PetscReal}),\n               snes, F, X, fnorm_,\n              )\n\n\tfnorm = fnorm_[]\n\n\treturn fnorm\nend \n\n\"\"\"\n\tfty::PetscScalar = SNESVIComputeInactiveSetFtY(petsclib::PetscLibType,snes::PetscSNES, F::PetscVec, X::PetscVec, Y::PetscVec) \nComputes the directional derivative for variational inequalities on the inactive set,\nassuming that there exists some G(x) for which the `SNESFunctionFn` F(x) = grad G(x) (relevant for some line search algorithms)\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `F`    - the nonlinear function vector\n- `X`    - the `SNES` solution vector\n- `Y`    - the direction vector\n\nOutput Parameter:\n- `fty` - the directional derivative\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONRSLS`, `SNESVINEWTONSSLS`\n\n# External Links\n$(_doc_external(\"SNES/SNESVIComputeInactiveSetFtY\"))\n\"\"\"\nfunction SNESVIComputeInactiveSetFtY(petsclib::PetscLibType, snes::PetscSNES, F::PetscVec, X::PetscVec, Y::PetscVec) end\n\n@for_petsc function SNESVIComputeInactiveSetFtY(petsclib::$UnionPetscLib, snes::PetscSNES, F::PetscVec, X::PetscVec, Y::PetscVec )\n\tfty_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:SNESVIComputeInactiveSetFtY, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, CVec, Ptr{$PetscScalar}),\n               snes, F, X, Y, fty_,\n              )\n\n\tfty = fty_[]\n\n\treturn fty\nend \n\n\"\"\"\n\tSNESVISetVariableBounds(petsclib::PetscLibType,snes::PetscSNES, xl::PetscVec, xu::PetscVec) \nSets the lower and upper bounds for the solution vector. `xl` <= x <= `xu`. This allows solving\n(differential) variable inequalities.\n\nInput Parameters:\n- `snes` - the `SNES` context.\n- `xl`   - lower bound.\n- `xu`   - upper bound.\n\nLevel: advanced\n\n-seealso: [](sec_vi), `SNES`, `SNESVIGetVariableBounds()`, `SNESVISetComputeVariableBounds()`, `SNESSetFunctionDomainError()`, `SNESSetJacobianDomainError()`, `SNESVINEWTONRSLS`, `SNESVINEWTONSSLS`, `SNESSetType()`, `PETSC_NINFINITY`, `PETSC_INFINITY`\n\n# External Links\n$(_doc_external(\"SNES/SNESVISetVariableBounds\"))\n\"\"\"\nfunction SNESVISetVariableBounds(petsclib::PetscLibType, snes::PetscSNES, xl::PetscVec, xu::PetscVec) end\n\n@for_petsc function SNESVISetVariableBounds(petsclib::$UnionPetscLib, snes::PetscSNES, xl::PetscVec, xu::PetscVec )\n\n    @chk ccall(\n               (:SNESVISetVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               snes, xl, xu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESVIGetVariableBounds(petsclib::PetscLibType,snes::PetscSNES, xl::PetscVec, xu::PetscVec) \nGets the lower and upper bounds for the solution vector. `xl` <= x <= `xu`. These are used in solving\n(differential) variable inequalities.\n\nInput Parameters:\n- `snes` - the `SNES` context.\n- `xl`   - lower bound (may be `NULL`)\n- `xu`   - upper bound (may be `NULL`)\n\nLevel: advanced\n\n-seealso: [](sec_vi), `SNES`, `SNESVISetVariableBounds()`, `SNESVISetComputeVariableBounds()`, `SNESSetFunctionDomainError()`, `SNESSetJacobianDomainError()`, `SNESVINEWTONRSLS`, `SNESVINEWTONSSLS`, `SNESSetType()`, `PETSC_NINFINITY`, `PETSC_INFINITY`\n\n# External Links\n$(_doc_external(\"SNES/SNESVIGetVariableBounds\"))\n\"\"\"\nfunction SNESVIGetVariableBounds(petsclib::PetscLibType, snes::PetscSNES, xl::PetscVec, xu::PetscVec) end\n\n@for_petsc function SNESVIGetVariableBounds(petsclib::$UnionPetscLib, snes::PetscSNES, xl::PetscVec, xu::PetscVec )\n\txl_ = Ref(xl.ptr)\n\txu_ = Ref(xu.ptr)\n\n    @chk ccall(\n               (:SNESVIGetVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}, Ptr{CVec}),\n               snes, xl_, xu_,\n              )\n\n\txl.ptr = C_NULL\n\txu.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESVIGetInactiveSet(petsclib::PetscLibType,snes::PetscSNES, inact::IS) \nGets the global indices for the inactive set variables (these correspond to the degrees of freedom the linear\nsystem is solved on)\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `inact` - inactive set index set\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONRSLS`\n\n# External Links\n$(_doc_external(\"SNES/SNESVIGetInactiveSet\"))\n\"\"\"\nfunction SNESVIGetInactiveSet(petsclib::PetscLibType, snes::PetscSNES, inact::IS) end\n\n@for_petsc function SNESVIGetInactiveSet(petsclib::$UnionPetscLib, snes::PetscSNES, inact::IS )\n\n    @chk ccall(\n               (:SNESVIGetInactiveSet, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CIS}),\n               snes, inact,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESVISetRedundancyCheck(petsclib::PetscLibType,snes::PetscSNES, func::external, ctx::Cvoid) \nProvide a function to check for any redundancy in the VI active set\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNESVINEWTONRSLS` context\n- `func` - the function to check of redundancies\n- `ctx`  - optional context used by the function\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONRSLS`, `SNESVIGetInactiveSet()`, `DMSetVI()`\n\n# External Links\n$(_doc_external(\"SNES/SNESVISetRedundancyCheck\"))\n\"\"\"\nfunction SNESVISetRedundancyCheck(petsclib::PetscLibType, snes::PetscSNES, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESVISetRedundancyCheck(petsclib::$UnionPetscLib, snes::PetscSNES, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESVISetRedundancyCheck, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmerit::PetscReal,phinorm::PetscReal = SNESVIComputeMeritFunction(petsclib::PetscLibType,phi::PetscVec) \nEvaluates the merit function for the mixed complementarity problem.\n\nInput Parameter:\n- `phi` - the `Vec` holding the evaluation of the semismooth function\n\nOutput Parameters:\n- `merit`   - the merit function 1/2 ||phi||^2\n- `phinorm` - the two-norm of the vector, ||phi||\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONSSLS`, `SNESVIComputeFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESVIComputeMeritFunction\"))\n\"\"\"\nfunction SNESVIComputeMeritFunction(petsclib::PetscLibType, phi::PetscVec) end\n\n@for_petsc function SNESVIComputeMeritFunction(petsclib::$UnionPetscLib, phi::PetscVec )\n\tmerit_ = Ref{$PetscReal}()\n\tphinorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESVIComputeMeritFunction, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               phi, merit_, phinorm_,\n              )\n\n\tmerit = merit_[]\n\tphinorm = phinorm_[]\n\n\treturn merit,phinorm\nend \n\n\"\"\"\n\tSNESVIComputeFunction(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, phi::PetscVec, functx::Cvoid) \nProvides the function that reformulates a system of nonlinear equations in mixed complementarity form to a system of nonlinear\nequations in semismooth form.\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `X`      - current iterate\n- `functx` - user defined function context\n\nOutput Parameter:\n- `phi` - the evaluation of semismooth function at `X`\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESVINEWTONSSLS`, `SNESVIComputeMeritFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESVIComputeFunction\"))\n\"\"\"\nfunction SNESVIComputeFunction(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, phi::PetscVec, functx::Cvoid) end\n\n@for_petsc function SNESVIComputeFunction(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, phi::PetscVec, functx::Cvoid )\n\n    @chk ccall(\n               (:SNESVIComputeFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{Cvoid}),\n               snes, X, phi, functx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMSRegisterAll(petsclib::PetscLibType) \nRegisters all of the multi\n\nLogically Collective\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESMS`, `SNESMSRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSRegisterAll\"))\n\"\"\"\nfunction SNESMSRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function SNESMSRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:SNESMSRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMSRegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `SNESMSRegister()`.\n\nLogically Collective\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESMS`, `SNESMSRegister()`, `SNESMSRegisterAll()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSRegisterDestroy\"))\n\"\"\"\nfunction SNESMSRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function SNESMSRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:SNESMSRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMSInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `SNESMS` package. It is called\nfrom `SNESInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESMS`, `SNESMSRegister()`, `SNESMSRegisterAll()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSInitializePackage\"))\n\"\"\"\nfunction SNESMSInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function SNESMSInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:SNESMSInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMSFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `SNESMS` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESMS`, `SNESMSRegister()`, `SNESMSRegisterAll()`, `SNESMSInitializePackage()`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSFinalizePackage\"))\n\"\"\"\nfunction SNESMSFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function SNESMSFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:SNESMSFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMSRegister(petsclib::PetscLibType,name::SNESMSType, nstages::PetscInt, nregisters::PetscInt, stability::PetscReal, gamma::Vector{PetscReal}, delta::Vector{PetscReal}, betasub::Vector{PetscReal}) \nregister a multistage scheme for `SNESMS`\n\nLogically Collective, No Fortran Support\n\nInput Parameters:\n- `name`       - identifier for method\n- `nstages`    - number of stages\n- `nregisters` - number of registers used by low-storage implementation\n- `stability`  - scaled stability region\n- `gamma`      - coefficients, see Ketcheson's paper {cite}`ketcheson2010runge`\n- `delta`      - coefficients, see Ketcheson's paper {cite}`ketcheson2010runge`\n- `betasub`    - subdiagonal of Shu-Osher form\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESMS`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSRegister\"))\n\"\"\"\nfunction SNESMSRegister(petsclib::PetscLibType, name::SNESMSType, nstages::PetscInt, nregisters::PetscInt, stability::PetscReal, gamma::Vector{PetscReal}, delta::Vector{PetscReal}, betasub::Vector{PetscReal}) end\n\n@for_petsc function SNESMSRegister(petsclib::$UnionPetscLib, name::SNESMSType, nstages::$PetscInt, nregisters::$PetscInt, stability::$PetscReal, gamma::Vector{$PetscReal}, delta::Vector{$PetscReal}, betasub::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:SNESMSRegister, $petsc_library),\n               PetscErrorCode,\n               (SNESMSType, $PetscInt, $PetscInt, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               name, nstages, nregisters, stability, gamma, delta, betasub,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmstype::SNESMSType = SNESMSGetType(petsclib::PetscLibType,snes::PetscSNES) \nGet the type of multistage smoother `SNESMS`\n\nNot Collective\n\nInput Parameter:\n- `snes` - nonlinear solver context\n\nOutput Parameter:\n- `mstype` - type of multistage method\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESMS`, `SNESMSSetType()`, `SNESMSType`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSGetType\"))\n\"\"\"\nfunction SNESMSGetType(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESMSGetType(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tmstype_ = Ref{SNESMSType}()\n\n    @chk ccall(\n               (:SNESMSGetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESMSType}),\n               snes, mstype_,\n              )\n\n\tmstype = unsafe_string(mstype_[])\n\n\treturn mstype\nend \n\n\"\"\"\n\tSNESMSSetType(petsclib::PetscLibType,snes::PetscSNES, mstype::SNESMSType) \nSet the type of multistage smoother `SNESMS`\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - nonlinear solver context\n- `mstype` - type of multistage method\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESMS`, `SNESMSGetType()`, `SNESMSType`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSSetType\"))\n\"\"\"\nfunction SNESMSSetType(petsclib::PetscLibType, snes::PetscSNES, mstype::SNESMSType) end\n\n@for_petsc function SNESMSSetType(petsclib::$UnionPetscLib, snes::PetscSNES, mstype::SNESMSType )\n\n    @chk ccall(\n               (:SNESMSSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESMSType),\n               snes, mstype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdamping::PetscReal = SNESMSGetDamping(petsclib::PetscLibType,snes::PetscSNES) \nGet the damping parameter of `SNESMS` multistage scheme\n\nNot Collective\n\nInput Parameter:\n- `snes` - nonlinear solver context\n\nOutput Parameter:\n- `damping` - damping parameter\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESMSSetDamping()`, `SNESMS`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSGetDamping\"))\n\"\"\"\nfunction SNESMSGetDamping(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESMSGetDamping(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tdamping_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESMSGetDamping, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}),\n               snes, damping_,\n              )\n\n\tdamping = damping_[]\n\n\treturn damping\nend \n\n\"\"\"\n\tSNESMSSetDamping(petsclib::PetscLibType,snes::PetscSNES, damping::PetscReal) \nSet the damping parameter for a `SNESMS` multistage scheme\n\nLogically Collective\n\nInput Parameters:\n- `snes`    - nonlinear solver context\n- `damping` - damping parameter\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNESMSGetDamping()`, `SNESMS`\n\n# External Links\n$(_doc_external(\"SNES/SNESMSSetDamping\"))\n\"\"\"\nfunction SNESMSSetDamping(petsclib::PetscLibType, snes::PetscSNES, damping::PetscReal) end\n\n@for_petsc function SNESMSSetDamping(petsclib::$UnionPetscLib, snes::PetscSNES, damping::$PetscReal )\n\n    @chk ccall(\n               (:SNESMSSetDamping, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal),\n               snes, damping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNGSSetTolerances(petsclib::PetscLibType,snes::PetscSNES, abstol::PetscReal, rtol::PetscReal, stol::PetscReal, maxit::PetscInt) \nSets various parameters used in convergence tests for nonlinear Gauss\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `abstol` - absolute convergence tolerance\n- `rtol`   - relative convergence tolerance\n- `stol`   - convergence tolerance in terms of the norm of the change in the solution between steps,  || delta x || < stol*|| x ||\n- `maxit`  - maximum number of iterations\n\nOptions Database Keys:\n- `-snes_ngs_atol <abstol>` - Sets abstol\n- `-snes_ngs_rtol <rtol>`   - Sets rtol\n- `-snes_ngs_stol <stol>`   - Sets stol\n- `-snes_max_it <maxit>`    - Sets maxit\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNCG`\n\n# External Links\n$(_doc_external(\"SNES/SNESNGSSetTolerances\"))\n\"\"\"\nfunction SNESNGSSetTolerances(petsclib::PetscLibType, snes::PetscSNES, abstol::PetscReal, rtol::PetscReal, stol::PetscReal, maxit::PetscInt) end\n\n@for_petsc function SNESNGSSetTolerances(petsclib::$UnionPetscLib, snes::PetscSNES, abstol::$PetscReal, rtol::$PetscReal, stol::$PetscReal, maxit::$PetscInt )\n\n    @chk ccall(\n               (:SNESNGSSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal, $PetscReal, $PetscReal, $PetscInt),\n               snes, abstol, rtol, stol, maxit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNGSGetTolerances(petsclib::PetscLibType,snes::PetscSNES, atol::PetscReal, rtol::PetscReal, stol::PetscReal, maxit::PetscInt) \nGets various parameters used in convergence tests for nonlinear Gauss\n\nNot Collective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `atol`  - absolute convergence tolerance\n- `rtol`  - relative convergence tolerance\n- `stol`  - convergence tolerance in terms of the norm\nof the change in the solution between steps\n- `maxit` - maximum number of iterations\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNCG`, `SNESSetTolerances()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNGSGetTolerances\"))\n\"\"\"\nfunction SNESNGSGetTolerances(petsclib::PetscLibType, snes::PetscSNES, atol::PetscReal, rtol::PetscReal, stol::PetscReal, maxit::PetscInt) end\n\n@for_petsc function SNESNGSGetTolerances(petsclib::$UnionPetscLib, snes::PetscSNES, atol::$PetscReal, rtol::$PetscReal, stol::$PetscReal, maxit::$PetscInt )\n\n    @chk ccall(\n               (:SNESNGSGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               snes, atol, rtol, stol, maxit,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNGSSetSweeps(petsclib::PetscLibType,snes::PetscSNES, sweeps::PetscInt) \nSets the number of sweeps of nonlinear GS to use in `SNESNCG`\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `sweeps` - the number of sweeps of nonlinear GS to perform.\n\nOptions Database Key:\n- `-snes_ngs_sweeps <n>` - Number of sweeps of nonlinear GS to apply\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNCG`, `SNESSetNGS()`, `SNESGetNGS()`, `SNESSetNPC()`, `SNESNGSGetSweeps()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNGSSetSweeps\"))\n\"\"\"\nfunction SNESNGSSetSweeps(petsclib::PetscLibType, snes::PetscSNES, sweeps::PetscInt) end\n\n@for_petsc function SNESNGSSetSweeps(petsclib::$UnionPetscLib, snes::PetscSNES, sweeps::$PetscInt )\n\n    @chk ccall(\n               (:SNESNGSSetSweeps, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, sweeps,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsweeps::PetscInt = SNESNGSGetSweeps(petsclib::PetscLibType,snes::PetscSNES) \nGets the number of sweeps nonlinear GS will use in `SNESNCG`\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `sweeps` - the number of sweeps of nonlinear GS to perform.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNCG`, `SNESSetNGS()`, `SNESGetNGS()`, `SNESSetNPC()`, `SNESNGSSetSweeps()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNGSGetSweeps\"))\n\"\"\"\nfunction SNESNGSGetSweeps(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNGSGetSweeps(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tsweeps_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESNGSGetSweeps, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, sweeps_,\n              )\n\n\tsweeps = sweeps_[]\n\n\treturn sweeps\nend \n\n\"\"\"\n\tSNESNewtonALSetCorrectionType(petsclib::PetscLibType,snes::PetscSNES, ctype::SNESNewtonALCorrectionType) \nSet the type of correction to use in the arc\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the nonlinear solver object\n- `ctype` - the type of correction to use\n\nOptions Database Key:\n- `-snes_newtonal_correction_type <type>` - Set the type of correction to use; use -help for a list of available types\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONAL`, `SNESNewtonALCorrectionType`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonALSetCorrectionType\"))\n\"\"\"\nfunction SNESNewtonALSetCorrectionType(petsclib::PetscLibType, snes::PetscSNES, ctype::SNESNewtonALCorrectionType) end\n\n@for_petsc function SNESNewtonALSetCorrectionType(petsclib::$UnionPetscLib, snes::PetscSNES, ctype::SNESNewtonALCorrectionType )\n\n    @chk ccall(\n               (:SNESNewtonALSetCorrectionType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNewtonALCorrectionType),\n               snes, ctype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNewtonALSetFunction(petsclib::PetscLibType,snes::PetscSNES, func::SNESFunctionFn, ctx::Cvoid) \nSets a user function that is called at each function evaluation to\ncompute the tangent load vector for the arc-length continuation method.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `func` - [optional] tangent load function evaluation routine, see `SNESFunctionFn` for the calling sequence. `U` is the current solution vector, `Q` is the output tangent load vector\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONAL`, `SNESNewtonALGetFunction()`, `SNESNewtonALGetLoadParameter()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonALSetFunction\"))\n\"\"\"\nfunction SNESNewtonALSetFunction(petsclib::PetscLibType, snes::PetscSNES, func::SNESFunctionFn, ctx::Cvoid) end\n\n@for_petsc function SNESNewtonALSetFunction(petsclib::$UnionPetscLib, snes::PetscSNES, func::SNESFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESNewtonALSetFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESFunctionFn}, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNewtonALGetFunction(petsclib::PetscLibType,snes::PetscSNES, func::SNESFunctionFn, ctx::Cvoid) \nGet the user function and context set with `SNESNewtonALSetFunction`\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `func` - [optional] tangent load function evaluation routine, see `SNESNewtonALSetFunction()` for the call sequence\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONAL`, `SNESNewtonALSetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonALGetFunction\"))\n\"\"\"\nfunction SNESNewtonALGetFunction(petsclib::PetscLibType, snes::PetscSNES, func::SNESFunctionFn, ctx::Cvoid) end\n\n@for_petsc function SNESNewtonALGetFunction(petsclib::$UnionPetscLib, snes::PetscSNES, func::SNESFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESNewtonALGetFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESFunctionFn, Cvoid),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlambda::PetscReal = SNESNewtonALGetLoadParameter(petsclib::PetscLibType,snes::PetscSNES) \nGet the value of the load parameter `lambda` for the arc\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the nonlinear solver object\n\nOutput Parameter:\n- `lambda` - the arc-length parameter\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONAL`, `SNESNewtonALSetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonALGetLoadParameter\"))\n\"\"\"\nfunction SNESNewtonALGetLoadParameter(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNewtonALGetLoadParameter(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tlambda_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESNewtonALGetLoadParameter, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}),\n               snes, lambda_,\n              )\n\n\tlambda = lambda_[]\n\n\treturn lambda\nend \n\n\"\"\"\n\tSNESNewtonALComputeFunction(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, Q::PetscVec) \nCalls the function that has been set with `SNESNewtonALSetFunction()`.\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `X`    - input vector\n\nOutput Parameter:\n- `Q` - tangent load vector, as set by `SNESNewtonALSetFunction()`\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESNewtonALSetFunction()`, `SNESNewtonALGetFunction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonALComputeFunction\"))\n\"\"\"\nfunction SNESNewtonALComputeFunction(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, Q::PetscVec) end\n\n@for_petsc function SNESNewtonALComputeFunction(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, Q::PetscVec )\n\n    @chk ccall(\n               (:SNESNewtonALComputeFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               snes, X, Q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESPythonSetType(petsclib::PetscLibType,snes::PetscSNES, pyname::String) \nInitialize a `SNES` object implemented in Python.\n\nCollective\n\nInput Parameters:\n- `snes`  - the nonlinear solver (`SNES`) context.\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOptions Database Key:\n- `-snes_python_type <pyname>`  - python class\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESCreate()`, `SNESSetType()`, `SNESPYTHON`, `PetscPythonInitialize()`, `SNESPythonGetType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESPythonSetType\"))\n\"\"\"\nfunction SNESPythonSetType(petsclib::PetscLibType, snes::PetscSNES, pyname::String) end\n\n@for_petsc function SNESPythonSetType(petsclib::$UnionPetscLib, snes::PetscSNES, pyname::String )\n\n    @chk ccall(\n               (:SNESPythonSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cchar}),\n               snes, pyname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpyname::String = SNESPythonGetType(petsclib::PetscLibType,snes::PetscSNES) \nGet the type of a `SNES` object implemented in Python set with `SNESPythonSetType()`\n\nNot Collective\n\nInput Parameter:\n- `snes`  - the nonlinear solver (`SNES`) context.\n\nOutput Parameter:\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESCreate()`, `SNESSetType()`, `SNESPYTHON`, `PetscPythonInitialize()`, `SNESPythonSetType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESPythonGetType\"))\n\"\"\"\nfunction SNESPythonGetType(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESPythonGetType(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tpyname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:SNESPythonGetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Ptr{Cchar}}),\n               snes, pyname_,\n              )\n\n\tpyname = unsafe_wrap(Array, pyname_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pyname\nend \n\n\"\"\"\n\tSNESShellSetSolve(petsclib::PetscLibType,snes::PetscSNES, solve::external) \nSets routine to apply as solver to a `SNESSHELL` `SNES` object\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the `SNES` nonlinear solver context\n- `solve` - the application-provided solver routine\n\nCalling sequence of `apply`:\n- `snes` - the preconditioner, get the application context with `SNESShellGetContext()` provided with `SNESShellSetContext()`\n- `xout` - solution vector\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSHELL`, `SNESShellSetContext()`, `SNESShellGetContext()`\n\n# External Links\n$(_doc_external(\"SNES/SNESShellSetSolve\"))\n\"\"\"\nfunction SNESShellSetSolve(petsclib::PetscLibType, snes::PetscSNES, solve::external) end\n\n@for_petsc function SNESShellSetSolve(petsclib::$UnionPetscLib, snes::PetscSNES, solve::external )\n\n    @chk ccall(\n               (:SNESShellSetSolve, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external),\n               snes, solve,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESShellGetContext(petsclib::PetscLibType,snes::PetscSNES, ctx::Cvoid) \nReturns the user\n\nNot Collective\n\nInput Parameter:\n- `snes` - should have been created with `SNESSetType`(snes,`SNESSHELL`);\n\nOutput Parameter:\n- `ctx` - the user provided context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSHELL`, `SNESCreateShell()`, `SNESShellSetContext()`\n\n# External Links\n$(_doc_external(\"SNES/SNESShellGetContext\"))\n\"\"\"\nfunction SNESShellGetContext(petsclib::PetscLibType, snes::PetscSNES, ctx::Cvoid) end\n\n@for_petsc function SNESShellGetContext(petsclib::$UnionPetscLib, snes::PetscSNES, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESShellGetContext, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cvoid}),\n               snes, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESShellSetContext(petsclib::PetscLibType,snes::PetscSNES, ctx::Cvoid) \nsets the context for a `SNESSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNESSHELL`\n- `ctx`  - the context\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESSHELL`, `SNESCreateShell()`, `SNESShellGetContext()`\n\n# External Links\n$(_doc_external(\"SNES/SNESShellSetContext\"))\n\"\"\"\nfunction SNESShellSetContext(petsclib::PetscLibType, snes::PetscSNES, ctx::Cvoid) end\n\n@for_petsc function SNESShellSetContext(petsclib::$UnionPetscLib, snes::PetscSNES, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESShellSetContext, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cvoid}),\n               snes, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNASMSetType(petsclib::PetscLibType,snes::PetscSNES, type::PCASMType) \nSet the type of subdomain update used for the nonlinear additive Schwarz solver `SNESNASM`\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `type` - the type of update, `PC_ASM_BASIC` or `PC_ASM_RESTRICT`\n\nOptions Database Key:\n- `-snes_nasm_type <basic,restrict>` - type of subdomain update used\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMGetType()`, `PCASMSetType()`, `PC_ASM_BASIC`, `PC_ASM_RESTRICT`, `PCASMType`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMSetType\"))\n\"\"\"\nfunction SNESNASMSetType(petsclib::PetscLibType, snes::PetscSNES, type::PCASMType) end\n\n@for_petsc function SNESNASMSetType(petsclib::$UnionPetscLib, snes::PetscSNES, type::PCASMType )\n\n    @chk ccall(\n               (:SNESNASMSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PCASMType),\n               snes, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PCASMType = SNESNASMGetType(petsclib::PetscLibType,snes::PetscSNES) \nGet the type of subdomain update used for the nonlinear additive Schwarz solver `SNESNASM`\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `type` - the type of update\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMSetType()`, `PCASMGetType()`, `PC_ASM_BASIC`, `PC_ASM_RESTRICT`, `PCASMType`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMGetType\"))\n\"\"\"\nfunction SNESNASMGetType(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNASMGetType(petsclib::$UnionPetscLib, snes::PetscSNES )\n\ttype_ = Ref{PCASMType}()\n\n    @chk ccall(\n               (:SNESNASMGetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PCASMType}),\n               snes, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tSNESNASMSetSubdomains(petsclib::PetscLibType,snes::PetscSNES, n::PetscInt, subsnes::Vector{PetscSNES}, iscatter::Vector{VecScatter}, oscatter::Vector{VecScatter}, gscatter::Vector{VecScatter}) \nManually Set the context required to restrict and solve subdomain problems in the nonlinear additive Schwarz solver\n\nLogically Collective\n\nInput Parameters:\n- `snes`     - the `SNES` context\n- `n`        - the number of local subdomains\n- `subsnes`  - solvers defined on the local subdomains\n- `iscatter` - scatters into the nonoverlapping portions of the local subdomains\n- `oscatter` - scatters into the overlapping portions of the local subdomains\n- `gscatter` - scatters into the (ghosted) local vector of the local subdomain\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMGetSubdomains()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMSetSubdomains\"))\n\"\"\"\nfunction SNESNASMSetSubdomains(petsclib::PetscLibType, snes::PetscSNES, n::PetscInt, subsnes::Vector{PetscSNES}, iscatter::Vector{VecScatter}, oscatter::Vector{VecScatter}, gscatter::Vector{VecScatter}) end\n\n@for_petsc function SNESNASMSetSubdomains(petsclib::$UnionPetscLib, snes::PetscSNES, n::$PetscInt, subsnes::Vector{PetscSNES}, iscatter::Vector{VecScatter}, oscatter::Vector{VecScatter}, gscatter::Vector{VecScatter} )\n\n    @chk ccall(\n               (:SNESNASMSetSubdomains, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CSNES}, Ptr{VecScatter}, Ptr{VecScatter}, Ptr{VecScatter}),\n               snes, n, subsnes, iscatter, oscatter, gscatter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = SNESNASMGetSubdomains(petsclib::PetscLibType,snes::PetscSNES, subsnes::Vector{PetscSNES}, iscatter::Vector{VecScatter}, oscatter::Vector{VecScatter}, gscatter::Vector{VecScatter}) \nGet the local subdomain contexts for the nonlinear additive Schwarz solver\n\nNot Collective but some of the objects returned will be parallel\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `n`        - the number of local subdomains\n- `subsnes`  - solvers defined on the local subdomains\n- `iscatter` - scatters into the nonoverlapping portions of the local subdomains\n- `oscatter` - scatters into the overlapping portions of the local subdomains\n- `gscatter` - scatters into the (ghosted) local vector of the local subdomain\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMSetSubdomains()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMGetSubdomains\"))\n\"\"\"\nfunction SNESNASMGetSubdomains(petsclib::PetscLibType, snes::PetscSNES, subsnes::Vector{PetscSNES}, iscatter::Vector{VecScatter}, oscatter::Vector{VecScatter}, gscatter::Vector{VecScatter}) end\n\n@for_petsc function SNESNASMGetSubdomains(petsclib::$UnionPetscLib, snes::PetscSNES, subsnes::Vector{PetscSNES}, iscatter::Vector{VecScatter}, oscatter::Vector{VecScatter}, gscatter::Vector{VecScatter} )\n\tn_ = Ref{$PetscInt}()\n\tsubsnes_ = Ref(pointer(subsnes))\n\tiscatter_ = Ref(pointer(iscatter))\n\toscatter_ = Ref(pointer(oscatter))\n\tgscatter_ = Ref(pointer(gscatter))\n\n    @chk ccall(\n               (:SNESNASMGetSubdomains, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}, Ptr{Ptr{CSNES}}, Ptr{Ptr{VecScatter}}, Ptr{Ptr{VecScatter}}, Ptr{Ptr{VecScatter}}),\n               snes, n_, subsnes_, iscatter_, oscatter_, gscatter_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tn::PetscInt = SNESNASMGetSubdomainVecs(petsclib::PetscLibType,snes::PetscSNES, x::Vector{PetscVec}, y::Vector{PetscVec}, b::Vector{PetscVec}, xl::Vector{PetscVec}) \nGet the processor\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `n`  - the number of local subdomains\n- `x`  - The subdomain solution vector\n- `y`  - The subdomain step vector\n- `b`  - The subdomain RHS vector\n- `xl` - The subdomain local vectors (ghosted)\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMGetSubdomains()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMGetSubdomainVecs\"))\n\"\"\"\nfunction SNESNASMGetSubdomainVecs(petsclib::PetscLibType, snes::PetscSNES, x::Vector{PetscVec}, y::Vector{PetscVec}, b::Vector{PetscVec}, xl::Vector{PetscVec}) end\n\n@for_petsc function SNESNASMGetSubdomainVecs(petsclib::$UnionPetscLib, snes::PetscSNES, x::Vector{PetscVec}, y::Vector{PetscVec}, b::Vector{PetscVec}, xl::Vector{PetscVec} )\n\tn_ = Ref{$PetscInt}()\n\tx_ = Ref(pointer(x))\n\ty_ = Ref(pointer(y))\n\tb_ = Ref(pointer(b))\n\txl_ = Ref(pointer(xl))\n\n    @chk ccall(\n               (:SNESNASMGetSubdomainVecs, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}, Ptr{Ptr{CVec}}, Ptr{Ptr{CVec}}, Ptr{Ptr{CVec}}, Ptr{Ptr{CVec}}),\n               snes, n_, x_, y_, b_, xl_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tSNESNASMSetComputeFinalJacobian(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \nSchedules the computation of the global and subdomain Jacobians upon convergence for the\nnonlinear additive Schwarz solver\n\nCollective\n\nInput Parameters:\n- `snes` - the SNES context\n- `flg`  - `PETSC_TRUE` to compute the Jacobians\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMGetSubdomains()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMSetComputeFinalJacobian\"))\n\"\"\"\nfunction SNESNASMSetComputeFinalJacobian(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESNASMSetComputeFinalJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESNASMSetComputeFinalJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNASMSetDamping(petsclib::PetscLibType,snes::PetscSNES, dmp::PetscReal) \nSets the update damping for `SNESNASM` the nonlinear additive Schwarz solver\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `dmp`  - damping\n\nOptions Database Key:\n- `-snes_nasm_damping <dmp>` - the new solution is obtained as old solution plus `dmp` times (sum of the solutions on the subdomains)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMGetDamping()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMSetDamping\"))\n\"\"\"\nfunction SNESNASMSetDamping(petsclib::PetscLibType, snes::PetscSNES, dmp::PetscReal) end\n\n@for_petsc function SNESNASMSetDamping(petsclib::$UnionPetscLib, snes::PetscSNES, dmp::$PetscReal )\n\n    @chk ccall(\n               (:SNESNASMSetDamping, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal),\n               snes, dmp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdmp::PetscReal = SNESNASMGetDamping(petsclib::PetscLibType,snes::PetscSNES) \nGets the update damping for `SNESNASM` the nonlinear additive Schwarz solver\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `dmp` - damping\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNASM`, `SNESNASMSetDamping()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMGetDamping\"))\n\"\"\"\nfunction SNESNASMGetDamping(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNASMGetDamping(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tdmp_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESNASMGetDamping, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}),\n               snes, dmp_,\n              )\n\n\tdmp = dmp_[]\n\n\treturn dmp\nend \n\n\"\"\"\n\tSNESNASMGetSNES(petsclib::PetscLibType,snes::PetscSNES, i::PetscInt, subsnes::PetscSNES) \nGets a subsolver\n\nNot Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `i`    - the number of the subsnes to get\n\nOutput Parameter:\n- `subsnes` - the subsolver context\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNASM`, `SNESNASMGetNumber()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMGetSNES\"))\n\"\"\"\nfunction SNESNASMGetSNES(petsclib::PetscLibType, snes::PetscSNES, i::PetscInt, subsnes::PetscSNES) end\n\n@for_petsc function SNESNASMGetSNES(petsclib::$UnionPetscLib, snes::PetscSNES, i::$PetscInt, subsnes::PetscSNES )\n\tsubsnes_ = Ref(subsnes.ptr)\n\n    @chk ccall(\n               (:SNESNASMGetSNES, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CSNES}),\n               snes, i, subsnes_,\n              )\n\n\tsubsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = SNESNASMGetNumber(petsclib::PetscLibType,snes::PetscSNES) \nGets number of subsolvers\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `n` - the number of subsolvers\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNASM`, `SNESNASMGetSNES()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMGetNumber\"))\n\"\"\"\nfunction SNESNASMGetNumber(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNASMGetNumber(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESNASMGetNumber, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tSNESNASMSetWeight(petsclib::PetscLibType,snes::PetscSNES, weight::PetscVec) \nSets weight to use when adding overlapping updates\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context\n- `weight` - the weights to use (typically 1/N for each dof, where N is the number of patches it appears in)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNASM`\n\n# External Links\n$(_doc_external(\"SNES/SNESNASMSetWeight\"))\n\"\"\"\nfunction SNESNASMSetWeight(petsclib::PetscLibType, snes::PetscSNES, weight::PetscVec) end\n\n@for_petsc function SNESNASMSetWeight(petsclib::$UnionPetscLib, snes::PetscSNES, weight::PetscVec )\n\n    @chk ccall(\n               (:SNESNASMSetWeight, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec),\n               snes, weight,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESQNSetRestartType(petsclib::PetscLibType,snes::PetscSNES, rtype::SNESQNRestartType) \nSets the restart type for `SNESQN`.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the iterative context\n- `rtype` - restart type, see `SNESQNRestartType`\n\nOptions Database Keys:\n- `-snes_qn_restart_type <powell,periodic,none>` - set the restart type\n- `-snes_qn_m <m>`                               - sets the number of stored updates and the restart period for periodic\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESQN`, `SNESQNRestartType`, `SNES_QN_RESTART_NONE`, `SNES_QN_RESTART_POWELL`, `SNES_QN_RESTART_PERIODIC`,\n`SNESQNType`, `SNESQNScaleType`\n\n# External Links\n$(_doc_external(\"SNES/SNESQNSetRestartType\"))\n\"\"\"\nfunction SNESQNSetRestartType(petsclib::PetscLibType, snes::PetscSNES, rtype::SNESQNRestartType) end\n\n@for_petsc function SNESQNSetRestartType(petsclib::$UnionPetscLib, snes::PetscSNES, rtype::SNESQNRestartType )\n\n    @chk ccall(\n               (:SNESQNSetRestartType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESQNRestartType),\n               snes, rtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESQNSetScaleType(petsclib::PetscLibType,snes::PetscSNES, stype::SNESQNScaleType) \nSets the scaling type for the inner inverse Jacobian in `SNESQN`.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the nonlinear solver context\n- `stype` - scale type, see `SNESQNScaleType`\n\nOptions Database Key:\n- `-snes_qn_scale_type <diagonal,none,scalar,jacobian>` - Scaling type\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESQN`, `SNESLineSearch`, `SNESQNScaleType`, `SNESSetJacobian()`, `SNESQNType`, `SNESQNRestartType`\n\n# External Links\n$(_doc_external(\"SNES/SNESQNSetScaleType\"))\n\"\"\"\nfunction SNESQNSetScaleType(petsclib::PetscLibType, snes::PetscSNES, stype::SNESQNScaleType) end\n\n@for_petsc function SNESQNSetScaleType(petsclib::$UnionPetscLib, snes::PetscSNES, stype::SNESQNScaleType )\n\n    @chk ccall(\n               (:SNESQNSetScaleType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESQNScaleType),\n               snes, stype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESQNSetType(petsclib::PetscLibType,snes::PetscSNES, qtype::SNESQNType) \nSets the quasi\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the iterative context\n- `qtype` - variant type, see `SNESQNType`\n\nOptions Database Key:\n- `-snes_qn_type <lbfgs,broyden,badbroyden>` - quasi-Newton type\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESQN`, `SNES_QN_LBFGS`, `SNES_QN_BROYDEN`, `SNES_QN_BADBROYDEN`, `SNESQNType`,  `SNESQNScaleType`, `TAOLMVM`, `TAOBLMVM`\n\n# External Links\n$(_doc_external(\"SNES/SNESQNSetType\"))\n\"\"\"\nfunction SNESQNSetType(petsclib::PetscLibType, snes::PetscSNES, qtype::SNESQNType) end\n\n@for_petsc function SNESQNSetType(petsclib::$UnionPetscLib, snes::PetscSNES, qtype::SNESQNType )\n\n    @chk ccall(\n               (:SNESQNSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESQNType),\n               snes, qtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESCompositeSetType(petsclib::PetscLibType,snes::PetscSNES, type::SNESCompositeType) \nSets the type of composite preconditioner.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the preconditioner context\n- `type` - `SNES_COMPOSITE_ADDITIVE` (default), `SNES_COMPOSITE_MULTIPLICATIVE`, or `SNES_COMPOSITE_ADDITIVEOPTIMAL`\n\nOptions Database Key:\n- `-snes_composite_type <type: one of multiplicative, additive, additiveoptimal>` - Sets composite preconditioner type\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES_COMPOSITE_ADDITIVE`, `SNES_COMPOSITE_MULTIPLICATIVE`, `SNESCompositeType`, `SNESCOMPOSITE`, `SNES_COMPOSITE_ADDITIVEOPTIMAL`,\n`PCCompositeType`\n\n# External Links\n$(_doc_external(\"SNES/SNESCompositeSetType\"))\n\"\"\"\nfunction SNESCompositeSetType(petsclib::PetscLibType, snes::PetscSNES, type::SNESCompositeType) end\n\n@for_petsc function SNESCompositeSetType(petsclib::$UnionPetscLib, snes::PetscSNES, type::SNESCompositeType )\n\n    @chk ccall(\n               (:SNESCompositeSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESCompositeType),\n               snes, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESCompositeAddSNES(petsclib::PetscLibType,snes::PetscSNES, type::SNESType) \nAdds another `SNES` to the `SNESCOMPOSITE`\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNES` context of type `SNESCOMPOSITE`\n- `type` - the `SNESType` of the new solver\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESCOMPOSITE`, `SNESCompositeGetSNES()`\n\n# External Links\n$(_doc_external(\"SNES/SNESCompositeAddSNES\"))\n\"\"\"\nfunction SNESCompositeAddSNES(petsclib::PetscLibType, snes::PetscSNES, type::SNESType) end\n\n@for_petsc function SNESCompositeAddSNES(petsclib::$UnionPetscLib, snes::PetscSNES, type::SNESType )\n\n    @chk ccall(\n               (:SNESCompositeAddSNES, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESType),\n               snes, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESCompositeGetSNES(petsclib::PetscLibType,snes::PetscSNES, n::PetscInt, subsnes::PetscSNES) \nGets one of the `SNES` objects in the `SNES` of `SNESType` `SNESCOMPOSITE`\n\nNot Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `n`    - the number of the composed `SNES` requested\n\nOutput Parameter:\n- `subsnes` - the `SNES` requested\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESCOMPOSITE`, `SNESCompositeAddSNES()`, `SNESCompositeGetNumber()`\n\n# External Links\n$(_doc_external(\"SNES/SNESCompositeGetSNES\"))\n\"\"\"\nfunction SNESCompositeGetSNES(petsclib::PetscLibType, snes::PetscSNES, n::PetscInt, subsnes::PetscSNES) end\n\n@for_petsc function SNESCompositeGetSNES(petsclib::$UnionPetscLib, snes::PetscSNES, n::$PetscInt, subsnes::PetscSNES )\n\tsubsnes_ = Ref(subsnes.ptr)\n\n    @chk ccall(\n               (:SNESCompositeGetSNES, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CSNES}),\n               snes, n, subsnes_,\n              )\n\n\tsubsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = SNESCompositeGetNumber(petsclib::PetscLibType,snes::PetscSNES) \nGet the number of subsolvers in the `SNESCOMPOSITE`\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameter:\n- `n` - the number of subsolvers\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESCOMPOSITE`, `SNESCompositeAddSNES()`, `SNESCompositeGetSNES()`\n\n# External Links\n$(_doc_external(\"SNES/SNESCompositeGetNumber\"))\n\"\"\"\nfunction SNESCompositeGetNumber(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESCompositeGetNumber(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESCompositeGetNumber, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, n_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tSNESCompositeSetDamping(petsclib::PetscLibType,snes::PetscSNES, n::PetscInt, dmp::PetscReal) \nSets the damping of a subsolver when using `SNES_COMPOSITE_ADDITIVE` with a `SNES` of `SNESType` `SNESCOMPOSITE`\n\nNot Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `n`    - the number of the sub-`SNES` object requested\n- `dmp`  - the damping\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESCOMPOSITE`, `SNESCompositeAddSNES()`, `SNESCompositeGetSNES()`,\n`SNES_COMPOSITE_ADDITIVE`, `SNES_COMPOSITE_MULTIPLICATIVE`, `SNESCompositeType`, `SNESCompositeSetType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESCompositeSetDamping\"))\n\"\"\"\nfunction SNESCompositeSetDamping(petsclib::PetscLibType, snes::PetscSNES, n::PetscInt, dmp::PetscReal) end\n\n@for_petsc function SNESCompositeSetDamping(petsclib::$UnionPetscLib, snes::PetscSNES, n::$PetscInt, dmp::$PetscReal )\n\n    @chk ccall(\n               (:SNESCompositeSetDamping, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal),\n               snes, n, dmp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trho_flag::PetscBool = SNESNewtonTRDCGetRhoFlag(petsclib::PetscLibType,snes::PetscSNES) \nGet whether the current solution update is within the trust\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the nonlinear solver object\n\nOutput Parameter:\n- `rho_flag` - `PETSC_FALSE` or `PETSC_TRUE`\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONTRDC`, `SNESNewtonTRDCPreCheck()`, `SNESNewtonTRDCGetPreCheck()`, `SNESNewtonTRDCSetPreCheck()`,\n`SNESNewtonTRDCSetPostCheck()`, `SNESNewtonTRDCGetPostCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRDCGetRhoFlag\"))\n\"\"\"\nfunction SNESNewtonTRDCGetRhoFlag(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNewtonTRDCGetRhoFlag(petsclib::$UnionPetscLib, snes::PetscSNES )\n\trho_flag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESNewtonTRDCGetRhoFlag, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, rho_flag_,\n              )\n\n\trho_flag = rho_flag_[]\n\n\treturn rho_flag\nend \n\n\"\"\"\n\tSNESNewtonTRDCSetPreCheck(petsclib::PetscLibType,snes::PetscSNES, func::external, ctx::Cvoid) \nSets a user function that is called before the search step has been determined.\nAllows the user a chance to change or override the trust region decision.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `func` - [optional] function evaluation routine, for the calling sequence see `SNESNewtonTRDCPreCheck()`\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONTRDC`, `SNESNewtonTRDCPreCheck()`, `SNESNewtonTRDCGetPreCheck()`, `SNESNewtonTRDCSetPostCheck()`, `SNESNewtonTRDCGetPostCheck()`,\n`SNESNewtonTRDCGetRhoFlag()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRDCSetPreCheck\"))\n\"\"\"\nfunction SNESNewtonTRDCSetPreCheck(petsclib::PetscLibType, snes::PetscSNES, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESNewtonTRDCSetPreCheck(petsclib::$UnionPetscLib, snes::PetscSNES, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESNewtonTRDCSetPreCheck, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNewtonTRDCSetPostCheck(petsclib::PetscLibType,snes::PetscSNES, func::external, ctx::Cvoid) \nSets a user function that is called after the search step has been determined but before the next\nfunction evaluation. Allows the user a chance to change or override the decision of the line search routine\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `func` - [optional] function evaluation routine, for the calling sequence see `SNESNewtonTRDCPostCheck()`\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONTRDC`, `SNESNewtonTRDCPostCheck()`, `SNESNewtonTRDCGetPostCheck()`, `SNESNewtonTRDCSetPreCheck()`, `SNESNewtonTRDCGetPreCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRDCSetPostCheck\"))\n\"\"\"\nfunction SNESNewtonTRDCSetPostCheck(petsclib::PetscLibType, snes::PetscSNES, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESNewtonTRDCSetPostCheck(petsclib::$UnionPetscLib, snes::PetscSNES, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESNewtonTRDCSetPostCheck, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt,nodesPerCell::PetscInt,subspaceOffsets::PetscInt,ghostBcNodes::PetscInt,globalBcNodes::PetscInt = SNESPatchSetDiscretisationInfo(petsclib::PetscLibType,snes::PetscSNES, nsubspaces::PetscInt, dms::PetscDM, cellNodeMap::PetscInt, numGhostBcs::PetscInt, numGlobalBcs::PetscInt) \n\n# External Links\n$(_doc_external(\"SNES/SNESPatchSetDiscretisationInfo\"))\n\"\"\"\nfunction SNESPatchSetDiscretisationInfo(petsclib::PetscLibType, snes::PetscSNES, nsubspaces::PetscInt, dms::PetscDM, cellNodeMap::PetscInt, numGhostBcs::PetscInt, numGlobalBcs::PetscInt) end\n\n@for_petsc function SNESPatchSetDiscretisationInfo(petsclib::$UnionPetscLib, snes::PetscSNES, nsubspaces::$PetscInt, dms::PetscDM, cellNodeMap::$PetscInt, numGhostBcs::$PetscInt, numGlobalBcs::$PetscInt )\n\tdms_ = Ref(dms.ptr)\n\tbs_ = Ref{$PetscInt}()\n\tnodesPerCell_ = Ref{$PetscInt}()\n\tsubspaceOffsets_ = Ref{$PetscInt}()\n\tghostBcNodes_ = Ref{$PetscInt}()\n\tglobalBcNodes_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESPatchSetDiscretisationInfo, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CDM}, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}),\n               snes, nsubspaces, dms_, bs_, nodesPerCell_, cellNodeMap, subspaceOffsets_, numGhostBcs, ghostBcNodes_, numGlobalBcs, globalBcNodes_,\n              )\n\n\tdms.ptr = C_NULL\n\tbs = bs_[]\n\tnodesPerCell = nodesPerCell_[]\n\tsubspaceOffsets = subspaceOffsets_[]\n\tghostBcNodes = ghostBcNodes_[]\n\tglobalBcNodes = globalBcNodes_[]\n\n\treturn bs,nodesPerCell,subspaceOffsets,ghostBcNodes,globalBcNodes\nend \n\n\"\"\"\n\tSNESPatchSetComputeOperator(petsclib::PetscLibType,snes::PetscSNES, func::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"SNES/SNESPatchSetComputeOperator\"))\n\"\"\"\nfunction SNESPatchSetComputeOperator(petsclib::PetscLibType, snes::PetscSNES, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESPatchSetComputeOperator(petsclib::$UnionPetscLib, snes::PetscSNES, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESPatchSetComputeOperator, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESPatchSetComputeFunction(petsclib::PetscLibType,snes::PetscSNES, func::external, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"SNES/SNESPatchSetComputeFunction\"))\n\"\"\"\nfunction SNESPatchSetComputeFunction(petsclib::PetscLibType, snes::PetscSNES, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESPatchSetComputeFunction(petsclib::$UnionPetscLib, snes::PetscSNES, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESPatchSetComputeFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::Cvoid = SNESPatchSetConstructType(petsclib::PetscLibType,snes::PetscSNES, ctype::PCPatchConstructType, func::external) \n\n# External Links\n$(_doc_external(\"SNES/SNESPatchSetConstructType\"))\n\"\"\"\nfunction SNESPatchSetConstructType(petsclib::PetscLibType, snes::PetscSNES, ctype::PCPatchConstructType, func::external) end\n\n@for_petsc function SNESPatchSetConstructType(petsclib::$UnionPetscLib, snes::PetscSNES, ctype::PCPatchConstructType, func::external )\n\tctx_ = Ref{Cvoid}()\n\n    @chk ccall(\n               (:SNESPatchSetConstructType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PCPatchConstructType, external, Ptr{Cvoid}),\n               snes, ctype, func, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tSNESPatchSetCellNumbering(petsclib::PetscLibType,snes::PetscSNES, cellNumbering::PetscSection) \n\n# External Links\n$(_doc_external(\"SNES/SNESPatchSetCellNumbering\"))\n\"\"\"\nfunction SNESPatchSetCellNumbering(petsclib::PetscLibType, snes::PetscSNES, cellNumbering::PetscSection) end\n\n@for_petsc function SNESPatchSetCellNumbering(petsclib::$UnionPetscLib, snes::PetscSNES, cellNumbering::PetscSection )\n\n    @chk ccall(\n               (:SNESPatchSetCellNumbering, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscSection),\n               snes, cellNumbering,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMultiblockSetFields(petsclib::PetscLibType,snes::PetscSNES, name::String, n::PetscInt, fields::PetscInt) \nSets the fields for one particular block in a `SNESMULTIBLOCK` solver\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the solver\n- `name`   - name of this block, if `NULL` the number of the block is used\n- `n`      - the number of fields in this block\n- `fields` - the fields in this block\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESMULTIBLOCK`, `SNESMultiblockGetSubSNES()`, `SNESMultiblockSetBlockSize()`, `SNESMultiblockSetIS()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMultiblockSetFields\"))\n\"\"\"\nfunction SNESMultiblockSetFields(petsclib::PetscLibType, snes::PetscSNES, name::String, n::PetscInt, fields::PetscInt) end\n\n@for_petsc function SNESMultiblockSetFields(petsclib::$UnionPetscLib, snes::PetscSNES, name::String, n::$PetscInt, fields::$PetscInt )\n\n    @chk ccall(\n               (:SNESMultiblockSetFields, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}),\n               snes, name, n, fields,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMultiblockSetIS(petsclib::PetscLibType,snes::PetscSNES, name::String, is::IS) \nSets the global row indices for one particular block in a `SNESMULTIBLOCK` solver\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the solver context\n- `name` - name of this block, if `NULL` the number of the block is used\n- `is`   - the index set that defines the global row indices in this block\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESMULTIBLOCK`, `SNESMultiblockGetSubSNES()`, `SNESMultiblockSetBlockSize()`, `SNESMultiblockSetFields()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMultiblockSetIS\"))\n\"\"\"\nfunction SNESMultiblockSetIS(petsclib::PetscLibType, snes::PetscSNES, name::String, is::IS) end\n\n@for_petsc function SNESMultiblockSetIS(petsclib::$UnionPetscLib, snes::PetscSNES, name::String, is::IS )\n\n    @chk ccall(\n               (:SNESMultiblockSetIS, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{Cchar}, CIS),\n               snes, name, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMultiblockSetType(petsclib::PetscLibType,snes::PetscSNES, type::PCCompositeType) \nSets the type of block combination used for a `SNESMULTIBLOCK` solver\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the solver context\n- `type` - `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE` (default), `PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE`\n\nOptions Database Key:\n- `-snes_multiblock_type <type: one of multiplicative, additive, symmetric_multiplicative>` - Sets block combination type\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESMULTIBLOCK`, `PCCompositeSetType()`, `PC_COMPOSITE_ADDITIVE`, `PC_COMPOSITE_MULTIPLICATIVE`, `PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE`,\n`PCCompositeType`, `SNESCOMPOSITE`, `SNESCompositeSetType()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMultiblockSetType\"))\n\"\"\"\nfunction SNESMultiblockSetType(petsclib::PetscLibType, snes::PetscSNES, type::PCCompositeType) end\n\n@for_petsc function SNESMultiblockSetType(petsclib::$UnionPetscLib, snes::PetscSNES, type::PCCompositeType )\n\n    @chk ccall(\n               (:SNESMultiblockSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PCCompositeType),\n               snes, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMultiblockSetBlockSize(petsclib::PetscLibType,snes::PetscSNES, bs::PetscInt) \nSets the block size for structured block division in a `SNESMULTIBLOCK` solver. If not set the matrix block size is used.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the solver context\n- `bs`   - the block size\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESMULTIBLOCK`, `SNESMultiblockGetSubSNES()`, `SNESMultiblockSetFields()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMultiblockSetBlockSize\"))\n\"\"\"\nfunction SNESMultiblockSetBlockSize(petsclib::PetscLibType, snes::PetscSNES, bs::PetscInt) end\n\n@for_petsc function SNESMultiblockSetBlockSize(petsclib::$UnionPetscLib, snes::PetscSNES, bs::$PetscInt )\n\n    @chk ccall(\n               (:SNESMultiblockSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = SNESMultiblockGetSubSNES(petsclib::PetscLibType,snes::PetscSNES, subsnes::Vector{PetscSNES}) \nGets the `SNES` contexts for all blocks in a `SNESMULTIBLOCK` solver.\n\nNot Collective but each `SNES` obtained is parallel\n\nInput Parameter:\n- `snes` - the solver context\n\nOutput Parameters:\n- `n`       - the number of blocks\n- `subsnes` - the array of `SNES` contexts\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESMULTIBLOCK`, `SNESMultiblockSetIS()`, `SNESMultiblockSetFields()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMultiblockGetSubSNES\"))\n\"\"\"\nfunction SNESMultiblockGetSubSNES(petsclib::PetscLibType, snes::PetscSNES, subsnes::Vector{PetscSNES}) end\n\n@for_petsc function SNESMultiblockGetSubSNES(petsclib::$UnionPetscLib, snes::PetscSNES, subsnes::Vector{PetscSNES} )\n\tn_ = Ref{$PetscInt}()\n\tsubsnes_ = Ref(pointer(subsnes))\n\n    @chk ccall(\n               (:SNESMultiblockGetSubSNES, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}, Ptr{Ptr{CSNES}}),\n               snes, n_, subsnes_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tSNESNCGSetType(petsclib::PetscLibType,snes::PetscSNES, btype::SNESNCGType) \nSets the conjugate update type for nonlinear CG `SNESNCG`.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the iterative context\n- `btype` - update type, see `SNESNCGType`\n\nOptions Database Key:\n- `-snes_ncg_type <prp,fr,hs,dy,cd>` - strategy for selecting algorithm for computing beta\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNCG`, `SNESNCGType`, `SNES_NCG_FR`, `SNES_NCG_PRP`, `SNES_NCG_HS`, `SNES_NCG_DY`, `SNES_NCG_CD`\n\n# External Links\n$(_doc_external(\"SNES/SNESNCGSetType\"))\n\"\"\"\nfunction SNESNCGSetType(petsclib::PetscLibType, snes::PetscSNES, btype::SNESNCGType) end\n\n@for_petsc function SNESNCGSetType(petsclib::$UnionPetscLib, snes::PetscSNES, btype::SNESNCGType )\n\n    @chk ccall(\n               (:SNESNCGSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNCGType),\n               snes, btype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tXcoarse::PetscVec = SNESFASCreateCoarseVec(petsclib::PetscLibType,snes::PetscSNES) \ncreate a `Vec` corresponding to a state vector on one level coarser than the current level\n\nCollective\n\nInput Parameter:\n- `snes` - `SNESFAS` object\n\nOutput Parameter:\n- `Xcoarse` - vector on level one coarser than the current level\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNESFASSetRestriction()`, `SNESFASRestrict()`, `SNESFAS`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCreateCoarseVec\"))\n\"\"\"\nfunction SNESFASCreateCoarseVec(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESFASCreateCoarseVec(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tXcoarse_ = Ref{CVec}()\n\n    @chk ccall(\n               (:SNESFASCreateCoarseVec, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}),\n               snes, Xcoarse_,\n              )\n\n\tXcoarse = PetscVec(Xcoarse_[], petsclib)\n\n\treturn Xcoarse\nend \n\n\"\"\"\n\tSNESFASRestrict(petsclib::PetscLibType,fine::PetscSNES, Xfine::PetscVec, Xcoarse::PetscVec) \nrestrict a `Vec` to the next coarser level\n\nCollective\n\nInput Parameters:\n- `fine`  - `SNES` from which to restrict\n- `Xfine` - vector to restrict\n\nOutput Parameter:\n- `Xcoarse` - result of restriction\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetRestriction()`, `SNESFASSetInjection()`, `SNESFASCreateCoarseVec()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASRestrict\"))\n\"\"\"\nfunction SNESFASRestrict(petsclib::PetscLibType, fine::PetscSNES, Xfine::PetscVec, Xcoarse::PetscVec) end\n\n@for_petsc function SNESFASRestrict(petsclib::$UnionPetscLib, fine::PetscSNES, Xfine::PetscVec, Xcoarse::PetscVec )\n\n    @chk ccall(\n               (:SNESFASRestrict, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec),\n               fine, Xfine, Xcoarse,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = SNESFASGetGalerkin(petsclib::PetscLibType,snes::PetscSNES) \nGets if the coarse problems are formed by projection to the fine problem\n\nNot Collective but the result would be the same on all MPI processes\n\nInput Parameter:\n- `snes` - the `SNESFAS` nonlinear solver context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the coarse problem is formed by projection\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetLevels()`, `SNESFASSetGalerkin()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetGalerkin\"))\n\"\"\"\nfunction SNESFASGetGalerkin(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESFASGetGalerkin(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESFASGetGalerkin, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tSNESFASSetGalerkin(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \nSets coarse problems as formed by projection to the fine problem\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNESFAS` nonlinear solver context\n- `flg`  - `PETSC_TRUE` to use the projection process\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetLevels()`, `SNESFASGetGalerkin()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetGalerkin\"))\n\"\"\"\nfunction SNESFASSetGalerkin(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESFASSetGalerkin(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESFASSetGalerkin, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGalerkinFunctionDefault(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, F::PetscVec, ctx::Cvoid) \nComputes the Galerkin FAS function\n\nCollective\n\nInput Parameters:\n- `snes` - the `SNESFAS` nonlinear solver context\n- `X`    - input vector\n- `ctx`  - the application context\n\nOutput Parameter:\n- `F` - output vector\n\nLevel: developer\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASGetGalerkin()`, `SNESFASSetGalerkin()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGalerkinFunctionDefault\"))\n\"\"\"\nfunction SNESFASGalerkinFunctionDefault(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, F::PetscVec, ctx::Cvoid) end\n\n@for_petsc function SNESFASGalerkinFunctionDefault(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, F::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESFASGalerkinFunctionDefault, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{Cvoid}),\n               snes, X, F, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetType(petsclib::PetscLibType,snes::PetscSNES, fastype::SNESFASType) \nSets the update and correction type used for `SNESFAS`.\n\nLogically Collective\n\nInput Parameters:\n- `snes`    - `SNESFAS` context\n- `fastype` - `SNES_FAS_ADDITIVE`, `SNES_FAS_MULTIPLICATIVE`, `SNES_FAS_FULL`, or `SNES_FAS_KASKADE`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `PCMGSetType()`, `SNESFASGetType()`, `SNES_FAS_ADDITIVE`, `SNES_FAS_MULTIPLICATIVE`, `SNES_FAS_FULL`, `SNES_FAS_KASKADE`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetType\"))\n\"\"\"\nfunction SNESFASSetType(petsclib::PetscLibType, snes::PetscSNES, fastype::SNESFASType) end\n\n@for_petsc function SNESFASSetType(petsclib::$UnionPetscLib, snes::PetscSNES, fastype::SNESFASType )\n\n    @chk ccall(\n               (:SNESFASSetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESFASType),\n               snes, fastype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfastype::SNESFASType = SNESFASGetType(petsclib::PetscLibType,snes::PetscSNES) \nGets the update and correction type used for `SNESFAS`.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - `SNESFAS` context\n\nOutput Parameter:\n- `fastype` - `SNES_FAS_ADDITIVE`, `SNES_FAS_MULTIPLICATIVE`, `SNES_FAS_FULL`, or `SNES_FAS_KASKADE`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `PCMGSetType()`, `SNESFASSetType()`, `SNES_FAS_ADDITIVE`, `SNES_FAS_MULTIPLICATIVE`, `SNES_FAS_FULL`, `SNES_FAS_KASKADE`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetType\"))\n\"\"\"\nfunction SNESFASGetType(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESFASGetType(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tfastype_ = Ref{SNESFASType}()\n\n    @chk ccall(\n               (:SNESFASGetType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{SNESFASType}),\n               snes, fastype_,\n              )\n\n\tfastype = unsafe_string(fastype_[])\n\n\treturn fastype\nend \n\n\"\"\"\n\tSNESFASSetLevels(petsclib::PetscLibType,snes::PetscSNES, levels::PetscInt, comms::MPI_Comm) \nSets the number of levels to use with `SNESFAS`.\nMust be called before any other `SNESFAS` routine.\n\nInput Parameters:\n- `snes`   - the `SNES` context of `SNESType` `SNESFAS`\n- `levels` - the number of levels\n- `comms`  - optional communicators for each level; this is to allow solving the coarser\nproblems on smaller sets of processors.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASGetLevels()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetLevels\"))\n\"\"\"\nfunction SNESFASSetLevels(petsclib::PetscLibType, snes::PetscSNES, levels::PetscInt, comms::MPI_Comm) end\n\n@for_petsc function SNESFASSetLevels(petsclib::$UnionPetscLib, snes::PetscSNES, levels::$PetscInt, comms::MPI_Comm )\n\n    @chk ccall(\n               (:SNESFASSetLevels, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{MPI_Comm}),\n               snes, levels, comms,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlevels::PetscInt = SNESFASGetLevels(petsclib::PetscLibType,snes::PetscSNES) \nGets the number of levels in a `SNESFAS`, including fine and coarse grids\n\nInput Parameter:\n- `snes` - the `SNES` nonlinear solver context of `SNESType` `SNESFAS`\n\nOutput Parameter:\n- `levels` - the number of levels\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetLevels()`, `PCMGGetLevels()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetLevels\"))\n\"\"\"\nfunction SNESFASGetLevels(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESFASGetLevels(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tlevels_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:SNESFASGetLevels, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscInt}),\n               snes, levels_,\n              )\n\n\tlevels = levels_[]\n\n\treturn levels\nend \n\n\"\"\"\n\tSNESFASGetCycleSNES(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, lsnes::PetscSNES) \nGets the `SNES` corresponding to a particular level of the `SNESFAS` hierarchy\n\nInput Parameters:\n- `snes`  - the `SNES` nonlinear multigrid context\n- `level` - the level to get\n\nOutput Parameter:\n- `lsnes` - the `SNES` for the requested level\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetLevels()`, `SNESFASGetLevels()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetCycleSNES\"))\n\"\"\"\nfunction SNESFASGetCycleSNES(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, lsnes::PetscSNES) end\n\n@for_petsc function SNESFASGetCycleSNES(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, lsnes::PetscSNES )\n\tlsnes_ = Ref(lsnes.ptr)\n\n    @chk ccall(\n               (:SNESFASGetCycleSNES, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CSNES}),\n               snes, level, lsnes_,\n              )\n\n\tlsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetNumberSmoothUp(petsclib::PetscLibType,snes::PetscSNES, n::PetscInt) \nSets the number of post\nuse on all levels.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` nonlinear multigrid context\n- `n`    - the number of smoothing steps to use\n\nOptions Database Key:\n- `-snes_fas_smoothup <n>` - Sets number of pre-smoothing steps\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetNumberSmoothDown()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetNumberSmoothUp\"))\n\"\"\"\nfunction SNESFASSetNumberSmoothUp(petsclib::PetscLibType, snes::PetscSNES, n::PetscInt) end\n\n@for_petsc function SNESFASSetNumberSmoothUp(petsclib::$UnionPetscLib, snes::PetscSNES, n::$PetscInt )\n\n    @chk ccall(\n               (:SNESFASSetNumberSmoothUp, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetNumberSmoothDown(petsclib::PetscLibType,snes::PetscSNES, n::PetscInt) \nSets the number of pre\nuse on all levels.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNESFAS` nonlinear multigrid context\n- `n`    - the number of smoothing steps to use\n\nOptions Database Key:\n- `-snes_fas_smoothdown <n>` - Sets number of pre-smoothing steps\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetNumberSmoothUp()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetNumberSmoothDown\"))\n\"\"\"\nfunction SNESFASSetNumberSmoothDown(petsclib::PetscLibType, snes::PetscSNES, n::PetscInt) end\n\n@for_petsc function SNESFASSetNumberSmoothDown(petsclib::$UnionPetscLib, snes::PetscSNES, n::$PetscInt )\n\n    @chk ccall(\n               (:SNESFASSetNumberSmoothDown, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetContinuation(petsclib::PetscLibType,snes::PetscSNES, continuation::PetscBool) \nSets the `SNESFAS` cycle to default to using exact Newton solves on the upsweep\n\nLogically Collective\n\nInput Parameters:\n- `snes`         - the `SNESFAS` nonlinear multigrid context\n- `continuation` - whether to use continuation\n\nOptions Database Key:\n- `-snes_fas_continuation` - sets continuation to true\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetNumberSmoothUp()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetContinuation\"))\n\"\"\"\nfunction SNESFASSetContinuation(petsclib::PetscLibType, snes::PetscSNES, continuation::PetscBool) end\n\n@for_petsc function SNESFASSetContinuation(petsclib::$UnionPetscLib, snes::PetscSNES, continuation::PetscBool )\n\n    @chk ccall(\n               (:SNESFASSetContinuation, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, continuation,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetCycles(petsclib::PetscLibType,snes::PetscSNES, cycles::PetscInt) \nSets the number of `SNESFAS` multigrid cycles to use each time a grid is visited.  Use `SNESFASSetCyclesOnLevel()` for more\ncomplicated cycling.\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNESFAS` nonlinear multigrid context\n- `cycles` - the number of cycles -- 1 for V-cycle, 2 for W-cycle\n\nOptions Database Key:\n- `-snes_fas_cycles <1,2>` - 1 for V-cycle, 2 for W-cycle\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetCyclesOnLevel()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetCycles\"))\n\"\"\"\nfunction SNESFASSetCycles(petsclib::PetscLibType, snes::PetscSNES, cycles::PetscInt) end\n\n@for_petsc function SNESFASSetCycles(petsclib::$UnionPetscLib, snes::PetscSNES, cycles::$PetscInt )\n\n    @chk ccall(\n               (:SNESFASSetCycles, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, cycles,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetMonitor(petsclib::PetscLibType,snes::PetscSNES, vf::PetscViewerAndFormat, flg::PetscBool) \nSets the method\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNESFAS` context\n- `vf`   - viewer and format structure (may be `NULL` if `flg` is `PETSC_FALSE`)\n- `flg`  - monitor or not\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESMonitorSet()`, `SNESFASSetCyclesOnLevel()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetMonitor\"))\n\"\"\"\nfunction SNESFASSetMonitor(petsclib::PetscLibType, snes::PetscSNES, vf::PetscViewerAndFormat, flg::PetscBool) end\n\n@for_petsc function SNESFASSetMonitor(petsclib::$UnionPetscLib, snes::PetscSNES, vf::PetscViewerAndFormat, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESFASSetMonitor, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscViewerAndFormat}, PetscBool),\n               snes, vf, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetLog(petsclib::PetscLibType,snes::PetscSNES, flg::PetscBool) \nSets or unsets time logging for various `SNESFAS` stages on all levels\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNESFAS` context\n- `flg`  - whether to log or not\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetMonitor()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetLog\"))\n\"\"\"\nfunction SNESFASSetLog(petsclib::PetscLibType, snes::PetscSNES, flg::PetscBool) end\n\n@for_petsc function SNESFASSetLog(petsclib::$UnionPetscLib, snes::PetscSNES, flg::PetscBool )\n\n    @chk ccall(\n               (:SNESFASSetLog, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleSetCycles(petsclib::PetscLibType,snes::PetscSNES, cycles::PetscInt) \nSets the number of cycles for all levels in a `SNESFAS`\n\nLogically Collective\n\nInput Parameters:\n- `snes`   - the `SNESFAS` nonlinear multigrid context\n- `cycles` - the number of cycles -- 1 for V-cycle, 2 for W-cycle\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetCycles()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleSetCycles\"))\n\"\"\"\nfunction SNESFASCycleSetCycles(petsclib::PetscLibType, snes::PetscSNES, cycles::PetscInt) end\n\n@for_petsc function SNESFASCycleSetCycles(petsclib::$UnionPetscLib, snes::PetscSNES, cycles::$PetscInt )\n\n    @chk ccall(\n               (:SNESFASCycleSetCycles, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt),\n               snes, cycles,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetSmoother(petsclib::PetscLibType,snes::PetscSNES, smooth::PetscSNES) \nGets the smoother on a particular cycle level.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `smooth` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASCycleGetSmootherUp()`, `SNESFASCycleGetSmootherDown()`, `SNESFASGetCycleSNES()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetSmoother\"))\n\"\"\"\nfunction SNESFASCycleGetSmoother(petsclib::PetscLibType, snes::PetscSNES, smooth::PetscSNES) end\n\n@for_petsc function SNESFASCycleGetSmoother(petsclib::$UnionPetscLib, snes::PetscSNES, smooth::PetscSNES )\n\tsmooth_ = Ref(smooth.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetSmoother, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CSNES}),\n               snes, smooth_,\n              )\n\n\tsmooth.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetSmootherUp(petsclib::PetscLibType,snes::PetscSNES, smoothu::PetscSNES) \nGets the up smoother on a particular cycle level.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `smoothu` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASCycleGetSmoother()`, `SNESFASCycleGetSmootherDown()`, `SNESFASGetCycleSNES()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetSmootherUp\"))\n\"\"\"\nfunction SNESFASCycleGetSmootherUp(petsclib::PetscLibType, snes::PetscSNES, smoothu::PetscSNES) end\n\n@for_petsc function SNESFASCycleGetSmootherUp(petsclib::$UnionPetscLib, snes::PetscSNES, smoothu::PetscSNES )\n\tsmoothu_ = Ref(smoothu.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetSmootherUp, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CSNES}),\n               snes, smoothu_,\n              )\n\n\tsmoothu.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetSmootherDown(petsclib::PetscLibType,snes::PetscSNES, smoothd::PetscSNES) \nGets the down smoother on a particular cycle level.\n\nLogically Collective\n\nInput Parameter:\n- `snes` - `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `smoothd` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASCycleGetSmootherUp()`, `SNESFASCycleGetSmoother()`, `SNESFASGetCycleSNES()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetSmootherDown\"))\n\"\"\"\nfunction SNESFASCycleGetSmootherDown(petsclib::PetscLibType, snes::PetscSNES, smoothd::PetscSNES) end\n\n@for_petsc function SNESFASCycleGetSmootherDown(petsclib::$UnionPetscLib, snes::PetscSNES, smoothd::PetscSNES )\n\tsmoothd_ = Ref(smoothd.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetSmootherDown, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CSNES}),\n               snes, smoothd_,\n              )\n\n\tsmoothd.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetCorrection(petsclib::PetscLibType,snes::PetscSNES, correction::PetscSNES) \nGets the coarse correction `SNESFAS` context for this level\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `correction` - the coarse correction solve on this level\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS` `SNESFASCycleGetSmootherUp()`, `SNESFASCycleGetSmoother()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetCorrection\"))\n\"\"\"\nfunction SNESFASCycleGetCorrection(petsclib::PetscLibType, snes::PetscSNES, correction::PetscSNES) end\n\n@for_petsc function SNESFASCycleGetCorrection(petsclib::$UnionPetscLib, snes::PetscSNES, correction::PetscSNES )\n\tcorrection_ = Ref(correction.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetCorrection, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CSNES}),\n               snes, correction_,\n              )\n\n\tcorrection.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetInterpolation(petsclib::PetscLibType,snes::PetscSNES, mat::PetscMat) \nGets the interpolation on a level\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `mat` - the interpolation operator on this level\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASCycleGetSmootherUp()`, `SNESFASCycleGetSmoother()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetInterpolation\"))\n\"\"\"\nfunction SNESFASCycleGetInterpolation(petsclib::PetscLibType, snes::PetscSNES, mat::PetscMat) end\n\n@for_petsc function SNESFASCycleGetInterpolation(petsclib::$UnionPetscLib, snes::PetscSNES, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetInterpolation, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CMat}),\n               snes, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetRestriction(petsclib::PetscLibType,snes::PetscSNES, mat::PetscMat) \nGets the restriction on a level\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `mat` - the restriction operator on this level\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASGetRestriction()`, `SNESFASCycleGetInterpolation()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetRestriction\"))\n\"\"\"\nfunction SNESFASCycleGetRestriction(petsclib::PetscLibType, snes::PetscSNES, mat::PetscMat) end\n\n@for_petsc function SNESFASCycleGetRestriction(petsclib::$UnionPetscLib, snes::PetscSNES, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetRestriction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CMat}),\n               snes, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetInjection(petsclib::PetscLibType,snes::PetscSNES, mat::PetscMat) \nGets the injection on a level\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `mat` - the restriction operator on this level\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASGetInjection()`, `SNESFASCycleGetRestriction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetInjection\"))\n\"\"\"\nfunction SNESFASCycleGetInjection(petsclib::PetscLibType, snes::PetscSNES, mat::PetscMat) end\n\n@for_petsc function SNESFASCycleGetInjection(petsclib::$UnionPetscLib, snes::PetscSNES, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetInjection, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CMat}),\n               snes, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASCycleGetRScale(petsclib::PetscLibType,snes::PetscSNES, vec::PetscVec) \nGets the injection scale\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the  `SNESFAS` obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `vec` - the restriction operator on this level\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASCycleGetRestriction()`, `SNESFASGetRScale()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleGetRScale\"))\n\"\"\"\nfunction SNESFASCycleGetRScale(petsclib::PetscLibType, snes::PetscSNES, vec::PetscVec) end\n\n@for_petsc function SNESFASCycleGetRScale(petsclib::$UnionPetscLib, snes::PetscSNES, vec::PetscVec )\n\tvec_ = Ref(vec.ptr)\n\n    @chk ccall(\n               (:SNESFASCycleGetRScale, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CVec}),\n               snes, vec_,\n              )\n\n\tvec.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = SNESFASCycleIsFine(petsclib::PetscLibType,snes::PetscSNES) \nDetermines if a given `SNES` is the finest level in a `SNESFAS`\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` context obtained with `SNESFASGetCycleSNES()`\n\nOutput Parameter:\n- `flg` - indicates if this is the fine level or not\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetLevels()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASCycleIsFine\"))\n\"\"\"\nfunction SNESFASCycleIsFine(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESFASCycleIsFine(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESFASCycleIsFine, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tSNESFASSetInterpolation(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, mat::PetscMat) \nSets the `Mat` to be used to apply the\ninterpolation from l-1 to the lth level\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `mat`   - the interpolation operator\n- `level` - the level (0 is coarsest) to supply [do not supply 0]\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInjection()`, `SNESFASSetRestriction()`, `SNESFASSetRScale()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetInterpolation\"))\n\"\"\"\nfunction SNESFASSetInterpolation(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, mat::PetscMat) end\n\n@for_petsc function SNESFASSetInterpolation(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, mat::PetscMat )\n\n    @chk ccall(\n               (:SNESFASSetInterpolation, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, CMat),\n               snes, level, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGetInterpolation(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, mat::PetscMat) \nGets the matrix used to calculate the\ninterpolation from l-1 to the lth level\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `level` - the level (0 is coarsest) to supply [do not supply 0]\n\nOutput Parameter:\n- `mat` - the interpolation operator\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInterpolation()`, `SNESFASGetInjection()`, `SNESFASGetRestriction()`, `SNESFASGetRScale()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetInterpolation\"))\n\"\"\"\nfunction SNESFASGetInterpolation(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, mat::PetscMat) end\n\n@for_petsc function SNESFASGetInterpolation(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:SNESFASGetInterpolation, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CMat}),\n               snes, level, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetRestriction(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, mat::PetscMat) \nSets the matrix to be used to restrict the defect\nfrom level l to l-1.\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `mat`   - the restriction matrix\n- `level` - the level (0 is coarsest) to supply [Do not supply 0]\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInterpolation()`, `SNESFASSetInjection()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetRestriction\"))\n\"\"\"\nfunction SNESFASSetRestriction(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, mat::PetscMat) end\n\n@for_petsc function SNESFASSetRestriction(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, mat::PetscMat )\n\n    @chk ccall(\n               (:SNESFASSetRestriction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, CMat),\n               snes, level, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGetRestriction(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, mat::PetscMat) \nGets the matrix used to calculate the\nrestriction from l to the l-1th level\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `level` - the level (0 is coarsest) to supply [do not supply 0]\n\nOutput Parameter:\n- `mat` - the interpolation operator\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetRestriction()`, `SNESFASGetInjection()`, `SNESFASGetInterpolation()`, `SNESFASGetRScale()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetRestriction\"))\n\"\"\"\nfunction SNESFASGetRestriction(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, mat::PetscMat) end\n\n@for_petsc function SNESFASGetRestriction(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:SNESFASGetRestriction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CMat}),\n               snes, level, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetInjection(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, mat::PetscMat) \nSets the matrix to be used to inject the solution\nfrom `level` to `level-1`.\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `mat`   - the injection matrix\n- `level` - the level (0 is coarsest) to supply [Do not supply 0]\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInterpolation()`, `SNESFASSetRestriction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetInjection\"))\n\"\"\"\nfunction SNESFASSetInjection(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, mat::PetscMat) end\n\n@for_petsc function SNESFASSetInjection(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, mat::PetscMat )\n\n    @chk ccall(\n               (:SNESFASSetInjection, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, CMat),\n               snes, level, mat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGetInjection(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, mat::PetscMat) \nGets the matrix used to calculate the\ninjection from l-1 to the lth level\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `level` - the level (0 is coarsest) to supply [do not supply 0]\n\nOutput Parameter:\n- `mat` - the injection operator\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInjection()`, `SNESFASGetRestriction()`, `SNESFASGetInterpolation()`, `SNESFASGetRScale()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetInjection\"))\n\"\"\"\nfunction SNESFASGetInjection(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, mat::PetscMat) end\n\n@for_petsc function SNESFASGetInjection(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, mat::PetscMat )\n\tmat_ = Ref(mat.ptr)\n\n    @chk ccall(\n               (:SNESFASGetInjection, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CMat}),\n               snes, level, mat_,\n              )\n\n\tmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASSetRScale(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, rscale::PetscVec) \nSets the scaling factor of the restriction\noperator from level l to l-1.\n\nInput Parameters:\n- `snes`   - the `SNESFAS` nonlinear multigrid context\n- `rscale` - the restriction scaling\n- `level`  - the level (0 is coarsest) to supply [Do not supply 0]\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInjection()`, `SNESFASSetRestriction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASSetRScale\"))\n\"\"\"\nfunction SNESFASSetRScale(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, rscale::PetscVec) end\n\n@for_petsc function SNESFASSetRScale(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, rscale::PetscVec )\n\n    @chk ccall(\n               (:SNESFASSetRScale, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, CVec),\n               snes, level, rscale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGetSmoother(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, smooth::PetscSNES) \nGets the default smoother on a level.\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `level` - the level (0 is coarsest) to supply\n\nOutput Parameter:\n- `smooth` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInjection()`, `SNESFASSetRestriction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetSmoother\"))\n\"\"\"\nfunction SNESFASGetSmoother(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, smooth::PetscSNES) end\n\n@for_petsc function SNESFASGetSmoother(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, smooth::PetscSNES )\n\tsmooth_ = Ref(smooth.ptr)\n\n    @chk ccall(\n               (:SNESFASGetSmoother, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CSNES}),\n               snes, level, smooth_,\n              )\n\n\tsmooth.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGetSmootherDown(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, smooth::PetscSNES) \nGets the downsmoother on a level.\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `level` - the level (0 is coarsest) to supply\n\nOutput Parameter:\n- `smooth` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInjection()`, `SNESFASSetRestriction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetSmootherDown\"))\n\"\"\"\nfunction SNESFASGetSmootherDown(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, smooth::PetscSNES) end\n\n@for_petsc function SNESFASGetSmootherDown(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, smooth::PetscSNES )\n\tsmooth_ = Ref(smooth.ptr)\n\n    @chk ccall(\n               (:SNESFASGetSmootherDown, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CSNES}),\n               snes, level, smooth_,\n              )\n\n\tsmooth.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGetSmootherUp(petsclib::PetscLibType,snes::PetscSNES, level::PetscInt, smooth::PetscSNES) \nGets the upsmoother on a level.\n\nInput Parameters:\n- `snes`  - the `SNESFAS` nonlinear multigrid context\n- `level` - the level (0 is coarsest)\n\nOutput Parameter:\n- `smooth` - the smoother\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInjection()`, `SNESFASSetRestriction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetSmootherUp\"))\n\"\"\"\nfunction SNESFASGetSmootherUp(petsclib::PetscLibType, snes::PetscSNES, level::PetscInt, smooth::PetscSNES) end\n\n@for_petsc function SNESFASGetSmootherUp(petsclib::$UnionPetscLib, snes::PetscSNES, level::$PetscInt, smooth::PetscSNES )\n\tsmooth_ = Ref(smooth.ptr)\n\n    @chk ccall(\n               (:SNESFASGetSmootherUp, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, Ptr{CSNES}),\n               snes, level, smooth_,\n              )\n\n\tsmooth.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASGetCoarseSolve(petsclib::PetscLibType,snes::PetscSNES, coarse::PetscSNES) \nGets the coarsest level solver.\n\nInput Parameter:\n- `snes` - the `SNESFAS` nonlinear multigrid context\n\nOutput Parameter:\n- `coarse` - the coarse-level solver\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetInjection()`, `SNESFASSetRestriction()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASGetCoarseSolve\"))\n\"\"\"\nfunction SNESFASGetCoarseSolve(petsclib::PetscLibType, snes::PetscSNES, coarse::PetscSNES) end\n\n@for_petsc function SNESFASGetCoarseSolve(petsclib::$UnionPetscLib, snes::PetscSNES, coarse::PetscSNES )\n\tcoarse_ = Ref(coarse.ptr)\n\n    @chk ccall(\n               (:SNESFASGetCoarseSolve, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{CSNES}),\n               snes, coarse_,\n              )\n\n\tcoarse.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASFullSetDownSweep(petsclib::PetscLibType,snes::PetscSNES, swp::PetscBool) \nSmooth during the initial downsweep for `SNESFAS`\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNESFAS` nonlinear multigrid context\n- `swp`  - whether to downsweep or not\n\nOptions Database Key:\n- `-snes_fas_full_downsweep` - Sets whether to smooth on the initial downsweep\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetNumberSmoothUp()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASFullSetDownSweep\"))\n\"\"\"\nfunction SNESFASFullSetDownSweep(petsclib::PetscLibType, snes::PetscSNES, swp::PetscBool) end\n\n@for_petsc function SNESFASFullSetDownSweep(petsclib::$UnionPetscLib, snes::PetscSNES, swp::PetscBool )\n\n    @chk ccall(\n               (:SNESFASFullSetDownSweep, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, swp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESFASFullSetTotal(petsclib::PetscLibType,snes::PetscSNES, total::PetscBool) \nUse total residual restriction and total interpolation on the initial down and up sweep of full `SNESFAS` cycles\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the `SNESFAS`  nonlinear multigrid context\n- `total` - whether to use total restriction / interpolatiaon or not (the alternative is defect restriction and correction interpolation)\n\nOptions Database Key:\n- `-snes_fas_full_total` - Use total restriction and interpolation on the initial down and up sweeps for the full `SNESFAS` cycle\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetNumberSmoothUp()`, `DMInterpolateSolution()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASFullSetTotal\"))\n\"\"\"\nfunction SNESFASFullSetTotal(petsclib::PetscLibType, snes::PetscSNES, total::PetscBool) end\n\n@for_petsc function SNESFASFullSetTotal(petsclib::$UnionPetscLib, snes::PetscSNES, total::PetscBool )\n\n    @chk ccall(\n               (:SNESFASFullSetTotal, $petsc_library),\n               PetscErrorCode,\n               (CSNES, PetscBool),\n               snes, total,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttotal::PetscBool = SNESFASFullGetTotal(petsclib::PetscLibType,snes::PetscSNES) \nUse total residual restriction and total interpolation on the initial down and up sweep of full FAS cycles\n\nLogically Collective\n\nInput Parameter:\n- `snes` - the `SNESFAS` nonlinear multigrid context\n\nOutput Parameter:\n- `total` - whether to use total restriction / interpolatiaon or not (the alternative is defect restriction and correction interpolation)\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `SNESFAS`, `SNESFASSetNumberSmoothUp()`, `DMInterpolateSolution()`, `SNESFullSetTotal()`\n\n# External Links\n$(_doc_external(\"SNES/SNESFASFullGetTotal\"))\n\"\"\"\nfunction SNESFASFullGetTotal(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESFASFullGetTotal(petsclib::$UnionPetscLib, snes::PetscSNES )\n\ttotal_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESFASFullGetTotal, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{PetscBool}),\n               snes, total_,\n              )\n\n\ttotal = total_[]\n\n\treturn total\nend \n\n\"\"\"\n\tSNESNewtonTRSetNormType(petsclib::PetscLibType,snes::PetscSNES, norm::NormType) \nSpecify the type of norm to use for the computation of the trust region.\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `norm` - the norm type\n\nLevel: intermediate\n\n-seealso: `SNESNEWTONTR`, `NormType`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRSetNormType\"))\n\"\"\"\nfunction SNESNewtonTRSetNormType(petsclib::PetscLibType, snes::PetscSNES, norm::NormType) end\n\n@for_petsc function SNESNewtonTRSetNormType(petsclib::$UnionPetscLib, snes::PetscSNES, norm::NormType )\n\n    @chk ccall(\n               (:SNESNewtonTRSetNormType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, NormType),\n               snes, norm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNewtonTRSetQNType(petsclib::PetscLibType,snes::PetscSNES, use::SNESNewtonTRQNType) \nSpecify to use a quasi\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `use`  - the type of approximations to be used\n\nLevel: intermediate\n\n-seealso: `SNESNEWTONTR`, `SNESNewtonTRQNType`, `MATLMVM`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRSetQNType\"))\n\"\"\"\nfunction SNESNewtonTRSetQNType(petsclib::PetscLibType, snes::PetscSNES, use::SNESNewtonTRQNType) end\n\n@for_petsc function SNESNewtonTRSetQNType(petsclib::$UnionPetscLib, snes::PetscSNES, use::SNESNewtonTRQNType )\n\n    @chk ccall(\n               (:SNESNewtonTRSetQNType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNewtonTRQNType),\n               snes, use,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNewtonTRSetFallbackType(petsclib::PetscLibType,snes::PetscSNES, ftype::SNESNewtonTRFallbackType) \nSet the type of fallback to use if the solution of the trust region subproblem is outside the radius\n\nInput Parameters:\n- `snes`  - the nonlinear solver object\n- `ftype` - the fallback type, see `SNESNewtonTRFallbackType`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNEWTONTR`, `SNESNewtonTRPreCheck()`, `SNESNewtonTRGetPreCheck()`, `SNESNewtonTRSetPreCheck()`,\n`SNESNewtonTRSetPostCheck()`, `SNESNewtonTRGetPostCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRSetFallbackType\"))\n\"\"\"\nfunction SNESNewtonTRSetFallbackType(petsclib::PetscLibType, snes::PetscSNES, ftype::SNESNewtonTRFallbackType) end\n\n@for_petsc function SNESNewtonTRSetFallbackType(petsclib::$UnionPetscLib, snes::PetscSNES, ftype::SNESNewtonTRFallbackType )\n\n    @chk ccall(\n               (:SNESNewtonTRSetFallbackType, $petsc_library),\n               PetscErrorCode,\n               (CSNES, SNESNewtonTRFallbackType),\n               snes, ftype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNewtonTRSetPreCheck(petsclib::PetscLibType,snes::PetscSNES, func::external, ctx::Cvoid) \nSets a user function that is called before the search step has been determined.\nAllows the user a chance to change or override the trust region decision.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `func` - [optional] function evaluation routine, for the calling sequence see `SNESNewtonTRPreCheck()`\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNEWTONTR`, `SNESNewtonTRPreCheck()`, `SNESNewtonTRGetPreCheck()`, `SNESNewtonTRSetPostCheck()`, `SNESNewtonTRGetPostCheck()`,\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRSetPreCheck\"))\n\"\"\"\nfunction SNESNewtonTRSetPreCheck(petsclib::PetscLibType, snes::PetscSNES, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESNewtonTRSetPreCheck(petsclib::$UnionPetscLib, snes::PetscSNES, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESNewtonTRSetPreCheck, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESNewtonTRSetPostCheck(petsclib::PetscLibType,snes::PetscSNES, func::external, ctx::Cvoid) \nSets a user function that is called after the search step has been determined but before the next\nfunction evaluation. Allows the user a chance to change or override the internal decision of the solver\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the nonlinear solver object\n- `func` - [optional] function evaluation routine, for the calling sequence see `SNESNewtonTRPostCheck()`\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNEWTONTR`, `SNESNewtonTRPostCheck()`, `SNESNewtonTRGetPostCheck()`, `SNESNewtonTRSetPreCheck()`, `SNESNewtonTRGetPreCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRSetPostCheck\"))\n\"\"\"\nfunction SNESNewtonTRSetPostCheck(petsclib::PetscLibType, snes::PetscSNES, func::external, ctx::Cvoid) end\n\n@for_petsc function SNESNewtonTRSetPostCheck(petsclib::$UnionPetscLib, snes::PetscSNES, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESNewtonTRSetPostCheck, $petsc_library),\n               PetscErrorCode,\n               (CSNES, external, Ptr{Cvoid}),\n               snes, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tchanged_Y::PetscBool = SNESNewtonTRPreCheck(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, Y::PetscVec) \nRuns the precheck routine\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the solver\n- `X`    - The last solution\n- `Y`    - The step direction\n\nOutput Parameter:\n- `changed_Y` - Indicator that the step direction `Y` has been changed.\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNESNEWTONTR`, `SNESNewtonTRSetPreCheck()`, `SNESNewtonTRGetPreCheck()`, `SNESNewtonTRPostCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRPreCheck\"))\n\"\"\"\nfunction SNESNewtonTRPreCheck(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, Y::PetscVec) end\n\n@for_petsc function SNESNewtonTRPreCheck(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, Y::PetscVec )\n\tchanged_Y_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESNewtonTRPreCheck, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{PetscBool}),\n               snes, X, Y, changed_Y_,\n              )\n\n\tchanged_Y = changed_Y_[]\n\n\treturn changed_Y\nend \n\n\"\"\"\n\tchanged_Y::PetscBool,changed_W::PetscBool = SNESNewtonTRPostCheck(petsclib::PetscLibType,snes::PetscSNES, X::PetscVec, Y::PetscVec, W::PetscVec) \nRuns the postcheck routine\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the solver\n- `X`    - The last solution\n- `Y`    - The full step direction\n- `W`    - The updated solution, W = X - Y\n\nOutput Parameters:\n- `changed_Y` - indicator if step has been changed\n- `changed_W` - Indicator if the new candidate solution W has been changed.\n\n-seealso: [](ch_snes), `SNESNEWTONTR`, `SNESNewtonTRSetPostCheck()`, `SNESNewtonTRGetPostCheck()`, `SNESNewtonTRPreCheck()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRPostCheck\"))\n\"\"\"\nfunction SNESNewtonTRPostCheck(petsclib::PetscLibType, snes::PetscSNES, X::PetscVec, Y::PetscVec, W::PetscVec) end\n\n@for_petsc function SNESNewtonTRPostCheck(petsclib::$UnionPetscLib, snes::PetscSNES, X::PetscVec, Y::PetscVec, W::PetscVec )\n\tchanged_Y_ = Ref{PetscBool}()\n\tchanged_W_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:SNESNewtonTRPostCheck, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, CVec, Ptr{PetscBool}, Ptr{PetscBool}),\n               snes, X, Y, W, changed_Y_, changed_W_,\n              )\n\n\tchanged_Y = changed_Y_[]\n\tchanged_W = changed_W_[]\n\n\treturn changed_Y,changed_W\nend \n\n\"\"\"\n\tSNESNewtonTRSetTolerances(petsclib::PetscLibType,snes::PetscSNES, delta_min::PetscReal, delta_max::PetscReal, delta_0::PetscReal) \nSets the trust region parameter tolerances.\n\nLogically Collective\n\nInput Parameters:\n- `snes`      - the `SNES` context\n- `delta_min` - minimum allowed trust region size\n- `delta_max` - maximum allowed trust region size\n- `delta_0`   - initial trust region size\n\nOptions Database Key:\n- `-snes_tr_deltamin <tol>` - Set minimum size\n- `-snes_tr_deltamax <tol>` - Set maximum size\n- `-snes_tr_delta0   <tol>` - Set initial size\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONTR`, `SNESNewtonTRGetTolerances()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRSetTolerances\"))\n\"\"\"\nfunction SNESNewtonTRSetTolerances(petsclib::PetscLibType, snes::PetscSNES, delta_min::PetscReal, delta_max::PetscReal, delta_0::PetscReal) end\n\n@for_petsc function SNESNewtonTRSetTolerances(petsclib::$UnionPetscLib, snes::PetscSNES, delta_min::$PetscReal, delta_max::$PetscReal, delta_0::$PetscReal )\n\n    @chk ccall(\n               (:SNESNewtonTRSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal, $PetscReal, $PetscReal),\n               snes, delta_min, delta_max, delta_0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdelta_min::PetscReal,delta_max::PetscReal,delta_0::PetscReal = SNESNewtonTRGetTolerances(petsclib::PetscLibType,snes::PetscSNES) \nGets the trust region parameter tolerances.\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `delta_min` - minimum allowed trust region size or `NULL`\n- `delta_max` - maximum allowed trust region size or `NULL`\n- `delta_0`   - initial trust region size or `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONTR`, `SNESNewtonTRSetTolerances()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRGetTolerances\"))\n\"\"\"\nfunction SNESNewtonTRGetTolerances(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNewtonTRGetTolerances(petsclib::$UnionPetscLib, snes::PetscSNES )\n\tdelta_min_ = Ref{$PetscReal}()\n\tdelta_max_ = Ref{$PetscReal}()\n\tdelta_0_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESNewtonTRGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               snes, delta_min_, delta_max_, delta_0_,\n              )\n\n\tdelta_min = delta_min_[]\n\tdelta_max = delta_max_[]\n\tdelta_0 = delta_0_[]\n\n\treturn delta_min,delta_max,delta_0\nend \n\n\"\"\"\n\tSNESNewtonTRSetUpdateParameters(petsclib::PetscLibType,snes::PetscSNES, eta1::PetscReal, eta2::PetscReal, eta3::PetscReal, t1::PetscReal, t2::PetscReal) \nSets the trust region update parameters.\n\nLogically Collective\n\nInput Parameters:\n- `snes` - the `SNES` context\n- `eta1` - acceptance tolerance\n- `eta2` - shrinking tolerance\n- `eta3` - enlarging tolerance\n- `t1`   - shrink factor\n- `t2`   - enlarge factor\n\nOptions Database Key:\n- `-snes_tr_eta1 <tol>` - Set `eta1`\n- `-snes_tr_eta2 <tol>` - Set `eta2`\n- `-snes_tr_eta3 <tol>` - Set `eta3`\n- `-snes_tr_t1   <tol>` - Set `t1`\n- `-snes_tr_t2   <tol>` - Set `t2`\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONTR`, `SNESSetObjective()`, `SNESNewtonTRGetUpdateParameters()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRSetUpdateParameters\"))\n\"\"\"\nfunction SNESNewtonTRSetUpdateParameters(petsclib::PetscLibType, snes::PetscSNES, eta1::PetscReal, eta2::PetscReal, eta3::PetscReal, t1::PetscReal, t2::PetscReal) end\n\n@for_petsc function SNESNewtonTRSetUpdateParameters(petsclib::$UnionPetscLib, snes::PetscSNES, eta1::$PetscReal, eta2::$PetscReal, eta3::$PetscReal, t1::$PetscReal, t2::$PetscReal )\n\n    @chk ccall(\n               (:SNESNewtonTRSetUpdateParameters, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               snes, eta1, eta2, eta3, t1, t2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\teta1::PetscReal,eta2::PetscReal,eta3::PetscReal,t1::PetscReal,t2::PetscReal = SNESNewtonTRGetUpdateParameters(petsclib::PetscLibType,snes::PetscSNES) \nGets the trust region update parameters.\n\nNot Collective\n\nInput Parameter:\n- `snes` - the `SNES` context\n\nOutput Parameters:\n- `eta1` - acceptance tolerance\n- `eta2` - shrinking tolerance\n- `eta3` - enlarging tolerance\n- `t1`   - shrink factor\n- `t2`   - enlarge factor\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESNEWTONTR`, `SNESNewtonTRSetUpdateParameters()`\n\n# External Links\n$(_doc_external(\"SNES/SNESNewtonTRGetUpdateParameters\"))\n\"\"\"\nfunction SNESNewtonTRGetUpdateParameters(petsclib::PetscLibType, snes::PetscSNES) end\n\n@for_petsc function SNESNewtonTRGetUpdateParameters(petsclib::$UnionPetscLib, snes::PetscSNES )\n\teta1_ = Ref{$PetscReal}()\n\teta2_ = Ref{$PetscReal}()\n\teta3_ = Ref{$PetscReal}()\n\tt1_ = Ref{$PetscReal}()\n\tt2_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:SNESNewtonTRGetUpdateParameters, $petsc_library),\n               PetscErrorCode,\n               (CSNES, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               snes, eta1_, eta2_, eta3_, t1_, t2_,\n              )\n\n\teta1 = eta1_[]\n\teta2 = eta2_[]\n\teta3 = eta3_[]\n\tt1 = t1_[]\n\tt2 = t2_[]\n\n\treturn eta1,eta2,eta3,t1,t2\nend \n\n\"\"\"\n\tSNESConvergedCorrectPressure(petsclib::PetscLibType,snes::PetscSNES, it::PetscInt, xnorm::PetscReal, gnorm::PetscReal, f::PetscReal, reason::SNESConvergedReason, ctx::Cvoid) \nThe regular `SNES` convergence test that, up on convergence, adds a vector in the nullspace\nto make the continuum integral of the pressure field equal to zero.\n\nLogically Collective\n\nInput Parameters:\n- `snes`  - the `SNES` context\n- `it`    - the iteration (0 indicates before any Newton steps)\n- `xnorm` - 2-norm of current iterate\n- `gnorm` - 2-norm of current step\n- `f`     - 2-norm of function at current iterate\n- `ctx`   - Optional user context\n\nOutput Parameter:\n- `reason` - `SNES_CONVERGED_ITERATING`, `SNES_CONVERGED_ITS`, or `SNES_DIVERGED_FNORM_NAN`\n\nOptions Database Key:\n- `-snes_convergence_test correct_pressure` - see `SNESSetFromOptions()`\n\nLevel: advanced\n\n-seealso: [](ch_snes), `SNES`, `DM`, `SNESConvergedDefault()`, `SNESSetConvergenceTest()`, `DMSetNullSpaceConstructor()`\n\n# External Links\n$(_doc_external(\"SNES/SNESConvergedCorrectPressure\"))\n\"\"\"\nfunction SNESConvergedCorrectPressure(petsclib::PetscLibType, snes::PetscSNES, it::PetscInt, xnorm::PetscReal, gnorm::PetscReal, f::PetscReal, reason::SNESConvergedReason, ctx::Cvoid) end\n\n@for_petsc function SNESConvergedCorrectPressure(petsclib::$UnionPetscLib, snes::PetscSNES, it::$PetscInt, xnorm::$PetscReal, gnorm::$PetscReal, f::$PetscReal, reason::SNESConvergedReason, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESConvergedCorrectPressure, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, $PetscReal, $PetscReal, Ptr{SNESConvergedReason}, Ptr{Cvoid}),\n               snes, it, xnorm, gnorm, f, reason, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESMonitorFields(petsclib::PetscLibType,snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) \nMonitors the residual for each field separately\n\nCollective\n\nInput Parameters:\n- `snes`   - the `SNES` context, must have an attached `DM`\n- `its`    - iteration number\n- `fgnorm` - 2-norm of residual\n- `vf`     - `PetscViewerAndFormat` of `PetscViewerType` `PETSCVIEWERASCII`\n\nLevel: intermediate\n\n-seealso: [](ch_snes), `SNES`, `SNESMonitorSet()`, `SNESMonitorDefault()`\n\n# External Links\n$(_doc_external(\"SNES/SNESMonitorFields\"))\n\"\"\"\nfunction SNESMonitorFields(petsclib::PetscLibType, snes::PetscSNES, its::PetscInt, fgnorm::PetscReal, vf::PetscViewerAndFormat) end\n\n@for_petsc function SNESMonitorFields(petsclib::$UnionPetscLib, snes::PetscSNES, its::$PetscInt, fgnorm::$PetscReal, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:SNESMonitorFields, $petsc_library),\n               PetscErrorCode,\n               (CSNES, $PetscInt, $PetscReal, Ptr{PetscViewerAndFormat}),\n               snes, its, fgnorm, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESTSFormFunction(petsclib::PetscLibType,snes::PetscSNES, U::PetscVec, F::PetscVec, ctx::Cvoid) \nFunction to evaluate nonlinear residual defined by an ODE solver algorithm implemented within `TS`\n\nLogically Collective\n\nInput Parameters:\n- `snes` - nonlinear solver\n- `U`    - the current state at which to evaluate the residual\n- `ctx`  - user context, must be a `TS`\n\nOutput Parameter:\n- `F` - the nonlinear residual\n\nLevel: developer\n\n-seealso: [](ch_ts), `SNESSetFunction()`, `MatFDColoringSetFunction()`\n\n# External Links\n$(_doc_external(\"Ts/SNESTSFormFunction\"))\n\"\"\"\nfunction SNESTSFormFunction(petsclib::PetscLibType, snes::PetscSNES, U::PetscVec, F::PetscVec, ctx::Cvoid) end\n\n@for_petsc function SNESTSFormFunction(petsclib::$UnionPetscLib, snes::PetscSNES, U::PetscVec, F::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESTSFormFunction, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CVec, Ptr{Cvoid}),\n               snes, U, F, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tSNESTSFormJacobian(petsclib::PetscLibType,snes::PetscSNES, U::PetscVec, A::PetscMat, B::PetscMat, ctx::Cvoid) \nFunction to evaluate the Jacobian defined by an ODE solver algorithm implemented within `TS`\n\nCollective\n\nInput Parameters:\n- `snes` - nonlinear solver\n- `U`    - the current state at which to evaluate the residual\n- `ctx`  - user context, must be a `TS`\n\nOutput Parameters:\n- `A` - the Jacobian\n- `B` - the matrix used to construct the preconditioner (often the same as `A`)\n\nLevel: developer\n\n-seealso: [](ch_ts), `SNESSetJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/SNESTSFormJacobian\"))\n\"\"\"\nfunction SNESTSFormJacobian(petsclib::PetscLibType, snes::PetscSNES, U::PetscVec, A::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function SNESTSFormJacobian(petsclib::$UnionPetscLib, snes::PetscSNES, U::PetscVec, A::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:SNESTSFormJacobian, $petsc_library),\n               PetscErrorCode,\n               (CSNES, CVec, CMat, CMat, Ptr{Cvoid}),\n               snes, U, A, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/Sys_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_SSL_CTX end\nconst SSL_CTX = Ptr{_n_SSL_CTX}\n\nmutable struct _n_SSL end\nconst SSL = Ptr{_n_SSL}\n\nmutable struct _n_hid_t end\nconst hid_t = Ptr{_n_hid_t}\n\nmutable struct _n_MPI_Request end\nconst MPI_Request = Ptr{_n_MPI_Request}\n\nconst PetscDLHandle = Ptr{Cvoid}\n\n#mutable struct _n_PetscClassId end\n#const PetscClassId = Ptr{_n_PetscClassId}\n\n#mutable struct _n_PetscInfoCommFlag end\n#const PetscInfoCommFlag = Ptr{_n_PetscInfoCommFlag}\n\n#mutable struct _n_PetscDLMode end\n#const PetscDLMode = Ptr{_n_PetscDLMode}\n\n#mutable struct _n_PetscFPTrap end\n#const PetscFPTrap = Ptr{_n_PetscFPTrap}\n\nmutable struct _n_PetscLogHandler end\nconst PetscLogHandler = Ptr{_n_PetscLogHandler}\n\n#mutable struct _n_PetscLogState end\n#const PetscLogState = Ptr{_n_PetscLogState}\n\n#mutable struct _n_PetscLogStage end\n#const PetscLogStage = Ptr{_n_PetscLogStage}\n\n#mutable struct _n_PetscLogEvent end\n#const PetscLogEvent = Ptr{_n_PetscLogEvent}\n\n#mutable struct _n_PetscEventPerfInfo end\n#const PetscEventPerfInfo = Ptr{_n_PetscEventPerfInfo}\n\nmutable struct _n_PetscLayout end\nconst PetscLayout = Ptr{_n_PetscLayout}\n\nmutable struct _n_PetscQuadrature end\nconst PetscQuadrature = Ptr{_n_PetscQuadrature}\n\n#mutable struct _n_PetscDTSimplexQuadratureType end\n#const PetscDTSimplexQuadratureType = Ptr{_n_PetscDTSimplexQuadratureType}\n\n#mutable struct _n_DMPolytopeType end\n#const DMPolytopeType = Ptr{_n_DMPolytopeType}\n\n#mutable struct _n_LandauStaticData end\n#const LandauStaticData = Ptr{_n_LandauStaticData}\n\nmutable struct _n_P4estVertexMaps end\nconst P4estVertexMaps = Ptr{_n_P4estVertexMaps}\n\nmutable struct _n_pointInterpolationP4est end\nconst pointInterpolationP4est = Ptr{_n_pointInterpolationP4est}\n\nmutable struct _n_hCsize_t end\nconst hCsize_t = Ptr{_n_hCsize_t}\n\nmutable struct _n_MPIU_Count end\nconst MPIU_Count = Ptr{_n_MPIU_Count}\n\nmutable struct _n_PetscBLASInt end\nconst PetscBLASInt = Ptr{_n_PetscBLASInt}\n\n#mutable struct _n_PetscCuBLASInt end\n#const PetscCuBLASInt = Ptr{_n_PetscCuBLASInt}\n\n#mutable struct _n_PetscHipBLASInt end\n#const PetscHipBLASInt = Ptr{_n_PetscHipBLASInt}\n\n#mutable struct _n_PetscBool3 end\n#const PetscBool3 = Ptr{_n_PetscBool3}\n\n# -------------------------------------------------------\n\"\"\"\n\tPetscGlobusAuthorize(petsclib::PetscLibType,comm::MPI_Comm, access_token::Vector{Cchar}, tokensize::Csize_t) \nGet an access token allowing PETSc applications to make Globus file transfer requests\n\nNot Collective, only the first process in `MPI_Comm` does anything\n\nInput Parameters:\n- `comm`      - the MPI communicator\n- `tokensize` - size of the token array\n\nOutput Parameter:\n- `access_token` - can be used with `PetscGlobusUpLoad()` for 30 days\n\nLevel: intermediate\n\n-seealso: `PetscGoogleDriveRefresh()`, `PetscGoogleDriveUpload()`, `PetscGlobusUpload()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGlobusAuthorize\"))\n\"\"\"\nfunction PetscGlobusAuthorize(petsclib::PetscLibType, comm::MPI_Comm, access_token::Vector{Cchar}, tokensize::Csize_t) end\n\n@for_petsc function PetscGlobusAuthorize(petsclib::$UnionPetscLib, comm::MPI_Comm, access_token::Vector{Cchar}, tokensize::Csize_t )\n\n    @chk ccall(\n               (:PetscGlobusAuthorize, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Csize_t),\n               comm, access_token, tokensize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGlobusGetTransfers(petsclib::PetscLibType,comm::MPI_Comm, access_token::Vector{Cchar}, buff::Vector{Cchar}, buffsize::Csize_t) \nGet a record of current transfers requested from Globus\n\nNot Collective, only the first process in `MPI_Comm` does anything\n\nInput Parameters:\n- `comm`         - the MPI communicator\n- `access_token` - Globus access token, if `NULL` will check in options database for -globus_access_token XXX otherwise\nwill call `PetscGlobusAuthorize()`.\n- `buffsize`     - size of the buffer\n\nOutput Parameter:\n- `buff` - location to put Globus information\n\nLevel: intermediate\n\n-seealso: `PetscGoogleDriveRefresh()`, `PetscGoogleDriveUpload()`, `PetscGlobusUpload()`, `PetscGlobusAuthorize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGlobusGetTransfers\"))\n\"\"\"\nfunction PetscGlobusGetTransfers(petsclib::PetscLibType, comm::MPI_Comm, access_token::Vector{Cchar}, buff::Vector{Cchar}, buffsize::Csize_t) end\n\n@for_petsc function PetscGlobusGetTransfers(petsclib::$UnionPetscLib, comm::MPI_Comm, access_token::Vector{Cchar}, buff::Vector{Cchar}, buffsize::Csize_t )\n\n    @chk ccall(\n               (:PetscGlobusGetTransfers, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               comm, access_token, buff, buffsize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGlobusUpload(petsclib::PetscLibType,comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar}) \nLoads a file to Globus\n\nNot Collective, only the first process in the `MPI_Comm` uploads the file\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `access_token` - obtained with `PetscGlobusAuthorize()`, pass `NULL` to use `-globus_access_token XXX` from the PETSc database\n- `filename`     - file to upload\n\nOptions Database Key:\n- `-globus_access_token XXX` - the Globus token\n\nLevel: intermediate\n\n-seealso: `PetscGoogleDriveAuthorize()`, `PetscGoogleDriveRefresh()`, `PetscGlobusAuthorize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGlobusUpload\"))\n\"\"\"\nfunction PetscGlobusUpload(petsclib::PetscLibType, comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar}) end\n\n@for_petsc function PetscGlobusUpload(petsclib::$UnionPetscLib, comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscGlobusUpload, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}),\n               comm, access_token, filename,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGoogleDriveRefresh(petsclib::PetscLibType,comm::MPI_Comm, refresh_token::Vector{Cchar}, access_token::Vector{Cchar}, tokensize::Csize_t) \nGet a new authorization token for accessing Google drive from PETSc from a refresh token\n\nNot Collective, only the first process in the `MPI_Comm` does anything\n\nInput Parameters:\n- `comm`          - MPI communicator\n- `refresh_token` - obtained with `PetscGoogleDriveAuthorize()`, if NULL PETSc will first look for one in the options data\nif not found it will call `PetscGoogleDriveAuthorize()`\n- `tokensize`     - size of the output string access_token\n\nOutput Parameter:\n- `access_token` - token that can be passed to `PetscGoogleDriveUpload()`\n\nOptions Database Key:\n- `-google_refresh_token XXX` - where XXX was obtained from `PetscGoogleDriveAuthorize()`\n\nLevel: intermediate\n\n-seealso: `PetscGoogleDriveAuthorize()`, `PetscGoogleDriveUpload()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGoogleDriveRefresh\"))\n\"\"\"\nfunction PetscGoogleDriveRefresh(petsclib::PetscLibType, comm::MPI_Comm, refresh_token::Vector{Cchar}, access_token::Vector{Cchar}, tokensize::Csize_t) end\n\n@for_petsc function PetscGoogleDriveRefresh(petsclib::$UnionPetscLib, comm::MPI_Comm, refresh_token::Vector{Cchar}, access_token::Vector{Cchar}, tokensize::Csize_t )\n\n    @chk ccall(\n               (:PetscGoogleDriveRefresh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               comm, refresh_token, access_token, tokensize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGoogleDriveUpload(petsclib::PetscLibType,comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar}) \nLoads a file to the Google Drive\n\nNot Collective, only the first process in the `MPI_Comm` uploads the file\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `access_token` - obtained with PetscGoogleDriveRefresh(), pass `NULL` to have PETSc generate one\n- `filename`     - file to upload; if you upload multiple times it will have different names each time on Google Drive\n\nOptions Database Key:\n- `-google_refresh_token XXX` - pass the access token for the operation\n\n-seealso: `PetscGoogleDriveAuthorize()`, `PetscGoogleDriveRefresh()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGoogleDriveUpload\"))\n\"\"\"\nfunction PetscGoogleDriveUpload(petsclib::PetscLibType, comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar}) end\n\n@for_petsc function PetscGoogleDriveUpload(petsclib::$UnionPetscLib, comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscGoogleDriveUpload, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}),\n               comm, access_token, filename,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGoogleDriveAuthorize(petsclib::PetscLibType,comm::MPI_Comm, access_token::Vector{Cchar}, refresh_token::Vector{Cchar}, tokensize::Csize_t) \nGet authorization and refresh token for accessing Google drive from PETSc\n\nNot Collective, only the first process in `MPI_Comm` does anything\n\nInput Parameters:\n- `comm`      - the MPI communicator\n- `tokensize` - size of the token arrays\n\nOutput Parameters:\n- `access_token`  - can be used with `PetscGoogleDriveUpload()` for this one session\n- `refresh_token` - can be used for ever to obtain new access_tokens with `PetscGoogleDriveRefresh()`, guard this like a password\nit gives access to your Google Drive\n\nLevel: intermediate\n\n-seealso: `PetscGoogleDriveRefresh()`, `PetscGoogleDriveUpload()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGoogleDriveAuthorize\"))\n\"\"\"\nfunction PetscGoogleDriveAuthorize(petsclib::PetscLibType, comm::MPI_Comm, access_token::Vector{Cchar}, refresh_token::Vector{Cchar}, tokensize::Csize_t) end\n\n@for_petsc function PetscGoogleDriveAuthorize(petsclib::$UnionPetscLib, comm::MPI_Comm, access_token::Vector{Cchar}, refresh_token::Vector{Cchar}, tokensize::Csize_t )\n\n    @chk ccall(\n               (:PetscGoogleDriveAuthorize, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               comm, access_token, refresh_token, tokensize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSSLInitializeContext(petsclib::PetscLibType,octx::SSL_CTX) \nSet up an SSL context suitable for initiating HTTPS requests.\n\nOutput Parameter:\n- `octx` - the SSL_CTX to be passed to `PetscHTTPSConnect90`\n\nLevel: advanced\n\nIf PETSc was ./configure -with-ssl-certificate requires the user have created a self-signed certificate with\n-seealso: `PetscSSLDestroyContext()`, `PetscHTTPSConnect()`, `PetscHTTPSRequest()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSSLInitializeContext\"))\n\"\"\"\nfunction PetscSSLInitializeContext(petsclib::PetscLibType, octx::SSL_CTX) end\n\n@for_petsc function PetscSSLInitializeContext(petsclib::$UnionPetscLib, octx::SSL_CTX )\n\n    @chk ccall(\n               (:PetscSSLInitializeContext, $petsc_library),\n               PetscErrorCode,\n               (SSL_CTX,),\n               octx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSSLDestroyContext(petsclib::PetscLibType,ctx::SSL_CTX) \nfrees a `SSL_CTX` obtained with `PetscSSLInitializeContext()`\n\nInput Parameter:\n- `ctx` - the `SSL_CTX`\n\nLevel: advanced\n\n-seealso: `PetscSSLInitializeContext()`, `PetscHTTPSConnect()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSSLDestroyContext\"))\n\"\"\"\nfunction PetscSSLDestroyContext(petsclib::PetscLibType, ctx::SSL_CTX) end\n\n@for_petsc function PetscSSLDestroyContext(petsclib::$UnionPetscLib, ctx::SSL_CTX )\n\n    @chk ccall(\n               (:PetscSSLDestroyContext, $petsc_library),\n               PetscErrorCode,\n               (Ptr{SSL_CTX},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscHTTPSRequest(petsclib::PetscLibType,type::Vector{Cchar}, url::Vector{Cchar}, header::Vector{Cchar}, ctype::Vector{Cchar}, body::Vector{Cchar}, ssl::SSL, buff::Vector{Cchar}, buffsize::Csize_t) \nSend a request to an HTTPS server\n\nInput Parameters:\n- `type`     - either \"POST\" or \"GET\"\n- `url`      - URL of request host/path\n- `header`   - additional header information, may be `NULL`\n- `ctype`    - data type of body, for example application/json\n- `body`     - data to send to server\n- `ssl`      - obtained with `PetscHTTPSConnect()`\n- `buffsize` - size of buffer\n\nOutput Parameter:\n- `buff` - everything returned from server\n\nLevel: advanced\n\n-seealso: `PetscHTTPRequest()`, `PetscHTTPSConnect()`, `PetscSSLInitializeContext()`, `PetscSSLDestroyContext()`, `PetscPullJSONValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscHTTPSRequest\"))\n\"\"\"\nfunction PetscHTTPSRequest(petsclib::PetscLibType, type::Vector{Cchar}, url::Vector{Cchar}, header::Vector{Cchar}, ctype::Vector{Cchar}, body::Vector{Cchar}, ssl::SSL, buff::Vector{Cchar}, buffsize::Csize_t) end\n\n@for_petsc function PetscHTTPSRequest(petsclib::$UnionPetscLib, type::Vector{Cchar}, url::Vector{Cchar}, header::Vector{Cchar}, ctype::Vector{Cchar}, body::Vector{Cchar}, ssl::SSL, buff::Vector{Cchar}, buffsize::Csize_t )\n\n    @chk ccall(\n               (:PetscHTTPSRequest, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{SSL}, Ptr{Cchar}, Csize_t),\n               type, url, header, ctype, body, ssl, buff, buffsize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscHTTPRequest(petsclib::PetscLibType,type::Vector{Cchar}, url::Vector{Cchar}, header::Vector{Cchar}, ctype::Vector{Cchar}, body::Vector{Cchar}, sock::Cint, buff::Vector{Cchar}, buffsize::Csize_t) \nSend a request to an HTTP server\n\nInput Parameters:\n- `type`     - either \"POST\" or \"GET\"\n- `url`      - URL of request host/path\n- `header`   - additional header information, may be `NULL`\n- `ctype`    - data type of body, for example application/json\n- `body`     - data to send to server\n- `sock`     - obtained with `PetscOpenSocket()`\n- `buffsize` - size of buffer\n\nOutput Parameter:\n- `buff` - everything returned from server\n\nLevel: advanced\n\n-seealso: `PetscHTTPSRequest()`, `PetscOpenSocket()`, `PetscHTTPSConnect()`, `PetscPullJSONValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscHTTPRequest\"))\n\"\"\"\nfunction PetscHTTPRequest(petsclib::PetscLibType, type::Vector{Cchar}, url::Vector{Cchar}, header::Vector{Cchar}, ctype::Vector{Cchar}, body::Vector{Cchar}, sock::Cint, buff::Vector{Cchar}, buffsize::Csize_t) end\n\n@for_petsc function PetscHTTPRequest(petsclib::$UnionPetscLib, type::Vector{Cchar}, url::Vector{Cchar}, header::Vector{Cchar}, ctype::Vector{Cchar}, body::Vector{Cchar}, sock::Cint, buff::Vector{Cchar}, buffsize::Csize_t )\n\n    @chk ccall(\n               (:PetscHTTPRequest, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Cint, Ptr{Cchar}, Csize_t),\n               type, url, header, ctype, body, sock, buff, buffsize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscHTTPSConnect(petsclib::PetscLibType,host::Vector{Cchar}, port::Cint, ctx::SSL_CTX, sock::Cint, ssl::SSL) \nconnect to a HTTPS server\n\nInput Parameters:\n- `host` - the name of the machine hosting the HTTPS server\n- `port` - the port number where the server is hosting, usually 443\n- `ctx`  - value obtained with `PetscSSLInitializeContext()`\n\nOutput Parameters:\n- `sock` - socket to connect\n- `ssl`  - the argument passed to `PetscHTTPSRequest()`\n\nLevel: advanced\n\n-seealso: `PetscOpenSocket()`, `PetscHTTPSRequest()`, `PetscSSLInitializeContext()`\n\n# External Links\n$(_doc_external(\"Sys/PetscHTTPSConnect\"))\n\"\"\"\nfunction PetscHTTPSConnect(petsclib::PetscLibType, host::Vector{Cchar}, port::Cint, ctx::SSL_CTX, sock::Cint, ssl::SSL) end\n\n@for_petsc function PetscHTTPSConnect(petsclib::$UnionPetscLib, host::Vector{Cchar}, port::Cint, ctx::SSL_CTX, sock::Cint, ssl::SSL )\n\n    @chk ccall(\n               (:PetscHTTPSConnect, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cint, Ptr{SSL_CTX}, Ptr{Cint}, SSL),\n               host, port, ctx, sock, ssl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfound::PetscBool = PetscPullJSONValue(petsclib::PetscLibType,buff::Vector{Cchar}, key::Vector{Cchar}, value::Vector{Cchar}, valuelen::Csize_t) \nGiven a JSON response containing the substring with \"key\" : \"value\"  where there may or not be spaces around the : returns the value.\n\nInput Parameters:\n- `buff`     - the char array containing the possible values\n- `key`      - the key of the requested value\n- `valuelen` - the length of the array to contain the value associated with the key\n\nOutput Parameters:\n- `value` - the value obtained\n- `found` - flag indicating if the value was found in the buff\n\nLevel: advanced\n\n-seealso: `PetscOpenSocket()`, `PetscHTTPSRequest()`, `PetscSSLInitializeContext()`, `PetscPushJSONValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPullJSONValue\"))\n\"\"\"\nfunction PetscPullJSONValue(petsclib::PetscLibType, buff::Vector{Cchar}, key::Vector{Cchar}, value::Vector{Cchar}, valuelen::Csize_t) end\n\n@for_petsc function PetscPullJSONValue(petsclib::$UnionPetscLib, buff::Vector{Cchar}, key::Vector{Cchar}, value::Vector{Cchar}, valuelen::Csize_t )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscPullJSONValue, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Csize_t, Ptr{PetscBool}),\n               buff, key, value, valuelen, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n\"\"\"\n\tPetscPushJSONValue(petsclib::PetscLibType,buff::Vector{Cchar}, key::Vector{Cchar}, value::Vector{Cchar}, bufflen::Csize_t) \nPuts a \"key\" : \"value\" pair onto a string\n\nInput Parameters:\n- `buff`    - the char array where the value will be put\n- `key`     - the key value to be set\n- `value`   - the value associated with the key\n- `bufflen` - the size of the buffer (currently ignored)\n\nLevel: advanced\n\n-seealso: `PetscOpenSocket()`, `PetscHTTPSRequest()`, `PetscSSLInitializeContext()`, `PetscPullJSONValue()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPushJSONValue\"))\n\"\"\"\nfunction PetscPushJSONValue(petsclib::PetscLibType, buff::Vector{Cchar}, key::Vector{Cchar}, value::Vector{Cchar}, bufflen::Csize_t) end\n\n@for_petsc function PetscPushJSONValue(petsclib::$UnionPetscLib, buff::Vector{Cchar}, key::Vector{Cchar}, value::Vector{Cchar}, bufflen::Csize_t )\n\n    @chk ccall(\n               (:PetscPushJSONValue, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               buff, key, value, bufflen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBoxAuthorize(petsclib::PetscLibType,comm::MPI_Comm, access_token::Vector{Cchar}, refresh_token::Vector{Cchar}, tokensize::Csize_t) \nGet authorization and refresh token for accessing Box drive from PETSc\n\nNot Collective, only the first rank in `MPI_Comm` does anything\n\nInput Parameters:\n- `comm`      - the MPI communicator\n- `tokensize` - size of the token arrays\n\nOutput Parameters:\n- `access_token`  - can be used with `PetscBoxUpload()` for this one session\n- `refresh_token` - can be used for ever to obtain new access_tokens with `PetscBoxRefresh()`,\nguard this like a password  it gives access to your Box Drive\n\nLevel: intermediate\n\n-seealso: `PetscBoxRefresh()`, `PetscBoxUpload()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBoxAuthorize\"))\n\"\"\"\nfunction PetscBoxAuthorize(petsclib::PetscLibType, comm::MPI_Comm, access_token::Vector{Cchar}, refresh_token::Vector{Cchar}, tokensize::Csize_t) end\n\n@for_petsc function PetscBoxAuthorize(petsclib::$UnionPetscLib, comm::MPI_Comm, access_token::Vector{Cchar}, refresh_token::Vector{Cchar}, tokensize::Csize_t )\n\n    @chk ccall(\n               (:PetscBoxAuthorize, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               comm, access_token, refresh_token, tokensize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBoxRefresh(petsclib::PetscLibType,comm::MPI_Comm, refresh_token::Vector{Cchar}, access_token::Vector{Cchar}, new_refresh_token::Vector{Cchar}, tokensize::Csize_t) \nGet a new authorization token for accessing Box drive from PETSc from a refresh token\n\nNot Collective, only the first process in the `MPI_Comm` does anything\n\nInput Parameters:\n- `comm`          - MPI communicator\n- `refresh_token` - obtained with `PetscBoxAuthorize()`, if `NULL` PETSc will first look for one in the options data\nif not found it will call `PetscBoxAuthorize()`\n- `tokensize`     - size of the output string access_token\n\nOutput Parameters:\n- `access_token`      - token that can be passed to `PetscBoxUpload()`\n- `new_refresh_token` - the old refresh token is no longer valid, not this is different than Google where the same refresh_token is used forever\n\nLevel: intermediate\n\n-seealso: `PetscBoxAuthorize()`, `PetscBoxUpload()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBoxRefresh\"))\n\"\"\"\nfunction PetscBoxRefresh(petsclib::PetscLibType, comm::MPI_Comm, refresh_token::Vector{Cchar}, access_token::Vector{Cchar}, new_refresh_token::Vector{Cchar}, tokensize::Csize_t) end\n\n@for_petsc function PetscBoxRefresh(petsclib::$UnionPetscLib, comm::MPI_Comm, refresh_token::Vector{Cchar}, access_token::Vector{Cchar}, new_refresh_token::Vector{Cchar}, tokensize::Csize_t )\n\n    @chk ccall(\n               (:PetscBoxRefresh, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               comm, refresh_token, access_token, new_refresh_token, tokensize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBoxUpload(petsclib::PetscLibType,comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar}) \nLoads a file to the Box Drive\n\nThis routine has not yet been written; it is just copied from Google Drive\n\nNot collective, only the first process in the `MPI_Comm` uploads the file\n\nInput Parameters:\n- `comm`         - MPI communicator\n- `access_token` - obtained with `PetscBoxRefresh()`, pass `NULL` to have PETSc generate one\n- `filename`     - file to upload; if you upload multiple times it will have different names each time on Box Drive\n\nOptions Database Key:\n- `-box_refresh_token XXX` - the token value\n\n-seealso: `PetscBoxAuthorize()`, `PetscBoxRefresh()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBoxUpload\"))\n\"\"\"\nfunction PetscBoxUpload(petsclib::PetscLibType, comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar}) end\n\n@for_petsc function PetscBoxUpload(petsclib::$UnionPetscLib, comm::MPI_Comm, access_token::Vector{Cchar}, filename::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscBoxUpload, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}),\n               comm, access_token, filename,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSAWsBlock(petsclib::PetscLibType) \nBlocks on SAWs until a client (person using the web browser) unblocks it\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `PetscObjectSetName()`, `PetscObjectSAWsViewOff()`, `PetscObjectSAWsSetBlock()`, `PetscObjectSAWsBlock()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSAWsBlock\"))\n\"\"\"\nfunction PetscSAWsBlock(petsclib::PetscLibType) end\n\n@for_petsc function PetscSAWsBlock(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscSAWsBlock, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMemoryGetCurrentUsage(petsclib::PetscLibType,mem::PetscLogDouble) \nReturns the current resident set size (memory used)\nfor the program.\n\nNot Collective\n\nOutput Parameter:\n- `mem` - memory usage in bytes\n\nOptions Database Key:\n- `-memory_view`     - Print memory usage at end of run\n- `-log_view_memory` - Display memory information for each logged event\n- `-malloc_view`     - Print usage of `PetscMalloc()` in `PetscFinalize()`\n\nLevel: intermediate\n\n-seealso: `PetscMallocGetMaximumUsage()`, `PetscMemoryGetMaximumUsage()`, `PetscMallocGetCurrentUsage()`, `PetscMemorySetGetMaximumUsage()`, `PetscMemoryView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMemoryGetCurrentUsage\"))\n\"\"\"\nfunction PetscMemoryGetCurrentUsage(petsclib::PetscLibType, mem::PetscLogDouble) end\n\n@for_petsc function PetscMemoryGetCurrentUsage(petsclib::$UnionPetscLib, mem::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscMemoryGetCurrentUsage, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               mem,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMemoryGetMaximumUsage(petsclib::PetscLibType,mem::PetscLogDouble) \nReturns the maximum resident set size (memory used)\nfor the program since it started (the high water mark).\n\nNot Collective\n\nOutput Parameter:\n- `mem` - memory usage in bytes\n\nOptions Database Key:\n- `-memory_view`     - Print memory usage at end of run\n- `-log_view_memory` - Print memory information per event\n- `-malloc_view`     - Print usage of `PetscMalloc()` in `PetscFinalize()`\n\nLevel: intermediate\n\n-seealso: `PetscMallocGetMaximumUsage()`, `PetscMemoryGetCurrentUsage()`, `PetscMallocGetCurrentUsage()`,\n`PetscMemorySetGetMaximumUsage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMemoryGetMaximumUsage\"))\n\"\"\"\nfunction PetscMemoryGetMaximumUsage(petsclib::PetscLibType, mem::PetscLogDouble) end\n\n@for_petsc function PetscMemoryGetMaximumUsage(petsclib::$UnionPetscLib, mem::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscMemoryGetMaximumUsage, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               mem,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMemorySetGetMaximumUsage(petsclib::PetscLibType) \nTells PETSc to monitor the maximum memory usage so that\n`PetscMemoryGetMaximumUsage()` will work.\n\nNot Collective\n\nOptions Database Key:\n- `-memory_view`     - Print memory usage at end of run\n- `-log_view_memory` - Print memory information per event\n- `-malloc_view`     - Print usage of `PetscMalloc()` in `PetscFinalize()`\n\nLevel: intermediate\n\n-seealso: `PetscMallocGetMaximumUsage()`, `PetscMemoryGetCurrentUsage()`, `PetscMallocGetCurrentUsage()`,\n`PetscMemoryGetMaximumUsage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMemorySetGetMaximumUsage\"))\n\"\"\"\nfunction PetscMemorySetGetMaximumUsage(petsclib::PetscLibType) end\n\n@for_petsc function PetscMemorySetGetMaximumUsage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscMemorySetGetMaximumUsage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocValidate(petsclib::PetscLibType,line::Cint, fnc::Vector{Cchar}, file::Vector{Cchar}) \nTest the memory for corruption.  This can be called at any time between `PetscInitialize()` and `PetscFinalize()`\n\nInput Parameters:\n- `line`     - line number where call originated.\n- `function` - name of function calling\n- `file`     - file where function is\n\nOptions Database Keys:\n- `-malloc_test`  - turns this feature on when PETSc was not configured with `--with-debugging=0`\n- `-malloc_debug` - turns this feature on anytime\n\nLevel: advanced\n\n-seealso: `CHKMEMQ`, `PetscMalloc()`, `PetscFree()`, `PetscMallocSetDebug()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocValidate\"))\n\"\"\"\nfunction PetscMallocValidate(petsclib::PetscLibType, line::Cint, fnc::Vector{Cchar}, file::Vector{Cchar}) end\n\n@for_petsc function PetscMallocValidate(petsclib::$UnionPetscLib, line::Cint, fnc::Vector{Cchar}, file::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscMallocValidate, $petsc_library),\n               PetscErrorCode,\n               (Cint, Ptr{Cchar}, Ptr{Cchar}),\n               line, fnc, file,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMemoryView(petsclib::PetscLibType,viewer::PetscViewer, message::Vector{Cchar}) \nShows the amount of memory currently being used in a communicator.\n\nCollective\n\nInput Parameters:\n- `viewer`  - the viewer to output the information on\n- `message` - string printed before values\n\nOptions Database Keys:\n- `-malloc_debug`    - have PETSc track how much memory it has allocated\n- `-log_view_memory` - print memory usage per event when `-log_view` is used\n- `-memory_view`     - during `PetscFinalize()` have this routine called\n\nLevel: intermediate\n\n-seealso: `PetscMallocDump()`, `PetscMemoryGetCurrentUsage()`, `PetscMemorySetGetMaximumUsage()`, `PetscMallocView()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMemoryView\"))\n\"\"\"\nfunction PetscMemoryView(petsclib::PetscLibType, viewer::PetscViewer, message::Vector{Cchar}) end\n\n@for_petsc function PetscMemoryView(petsclib::$UnionPetscLib, viewer::PetscViewer, message::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscMemoryView, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, Ptr{Cchar}),\n               viewer, message,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocGetCurrentUsage(petsclib::PetscLibType,space::PetscLogDouble) \ngets the current amount of memory used that was allocated with `PetscMalloc()`\n\nNot Collective\n\nOutput Parameter:\n- `space` - number of bytes currently allocated\n\nLevel: intermediate\n\n-seealso: `PetscMallocDump()`, `PetscMallocGetMaximumUsage()`, `PetscMemoryGetCurrentUsage()`, `PetscMalloc()`, `PetscFree()`,\n`PetscMemoryGetMaximumUsage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocGetCurrentUsage\"))\n\"\"\"\nfunction PetscMallocGetCurrentUsage(petsclib::PetscLibType, space::PetscLogDouble) end\n\n@for_petsc function PetscMallocGetCurrentUsage(petsclib::$UnionPetscLib, space::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscMallocGetCurrentUsage, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               space,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocGetMaximumUsage(petsclib::PetscLibType,space::PetscLogDouble) \ngets the maximum amount of memory used that was obtained with `PetscMalloc()` at any time\nduring this run, the high water mark.\n\nNot Collective\n\nOutput Parameter:\n- `space` - maximum number of bytes ever allocated at one time\n\nLevel: intermediate\n\n-seealso: `PetscMallocDump()`, `PetscMallocView()`, `PetscMemoryGetCurrentUsage()`, `PetscMalloc()`, `PetscFree()`,\n`PetscMallocPushMaximumUsage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocGetMaximumUsage\"))\n\"\"\"\nfunction PetscMallocGetMaximumUsage(petsclib::PetscLibType, space::PetscLogDouble) end\n\n@for_petsc function PetscMallocGetMaximumUsage(petsclib::$UnionPetscLib, space::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscMallocGetMaximumUsage, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               space,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocPushMaximumUsage(petsclib::PetscLibType,event::Cint) \nAdds another event to collect the maximum memory usage over an event\n\nNot Collective\n\nInput Parameter:\n- `event` - an event id; this is just for error checking\n\nLevel: developer\n\n-seealso: `PetscMallocDump()`, `PetscMallocView()`, `PetscMallocGetMaximumUsage()`, `PetscMemoryGetCurrentUsage()`, `PetscMalloc()`, `PetscFree()`,\n`PetscMallocPopMaximumUsage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocPushMaximumUsage\"))\n\"\"\"\nfunction PetscMallocPushMaximumUsage(petsclib::PetscLibType, event::Cint) end\n\n@for_petsc function PetscMallocPushMaximumUsage(petsclib::$UnionPetscLib, event::Cint )\n\n    @chk ccall(\n               (:PetscMallocPushMaximumUsage, $petsc_library),\n               PetscErrorCode,\n               (Cint,),\n               event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocPopMaximumUsage(petsclib::PetscLibType,event::Cint, mu::PetscLogDouble) \ncollect the maximum memory usage over an event\n\nNot Collective\n\nInput Parameter:\n- `event` - an event id; this is just for error checking\n\nOutput Parameter:\n- `mu` - maximum amount of memory malloced during this event; high water mark relative to the beginning of the event\n\nLevel: developer\n\n-seealso: `PetscMallocDump()`, `PetscMallocView()`, `PetscMallocGetMaximumUsage()`, `PetscMemoryGetCurrentUsage()`, `PetscMalloc()`, `PetscFree()`,\n`PetscMallocPushMaximumUsage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocPopMaximumUsage\"))\n\"\"\"\nfunction PetscMallocPopMaximumUsage(petsclib::PetscLibType, event::Cint, mu::PetscLogDouble) end\n\n@for_petsc function PetscMallocPopMaximumUsage(petsclib::$UnionPetscLib, event::Cint, mu::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscMallocPopMaximumUsage, $petsc_library),\n               PetscErrorCode,\n               (Cint, Ptr{PetscLogDouble}),\n               event, mu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocDump(petsclib::PetscLibType,fp::Libc.FILE) \nDumps the currently allocated memory blocks to a file. The information\nprinted is: size of space (in bytes), address of space, id of space,\nfile in which space was allocated, and line number at which it was\nallocated.\n\nNot Collective\n\nInput Parameter:\n- `fp` - file pointer.  If `fp` is `NULL`, `stdout` is assumed.\n\nOptions Database Key:\n- `-malloc_dump <optional filename>` - Print summary of unfreed memory during call to `PetscFinalize()`, writing to filename if given\n\nLevel: intermediate\n\n-seealso: `PetscMallocGetCurrentUsage()`, `PetscMallocView()`, `PetscMallocViewSet()`, `PetscMallocValidate()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocDump\"))\n\"\"\"\nfunction PetscMallocDump(petsclib::PetscLibType, fp::Libc.FILE) end\n\n@for_petsc function PetscMallocDump(petsclib::$UnionPetscLib, fp::Libc.FILE )\n\n    @chk ccall(\n               (:PetscMallocDump, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Libc.FILE},),\n               fp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocViewSet(petsclib::PetscLibType,logmin::PetscLogDouble) \nActivates logging of all calls to `PetscMalloc()` with a minimum size to view\n\nNot Collective\n\nInput Parameter:\n- `logmin` - minimum allocation size to log, or `PETSC_DEFAULT` to log all memory allocations\n\nOptions Database Keys:\n- `-malloc_view <optional filename>` - Activates `PetscMallocView()` in `PetscFinalize()`\n- `-malloc_view_threshold <min>`     - Sets a minimum size if `-malloc_view` is used\n- `-log_view_memory`                 - view the memory usage also with the -log_view option\n\nLevel: advanced\n\n-seealso: `PetscMallocViewGet()`, `PetscMallocDump()`, `PetscMallocView()`, `PetscMallocTraceSet()`, `PetscMallocValidate()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocViewSet\"))\n\"\"\"\nfunction PetscMallocViewSet(petsclib::PetscLibType, logmin::PetscLogDouble) end\n\n@for_petsc function PetscMallocViewSet(petsclib::$UnionPetscLib, logmin::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscMallocViewSet, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               logmin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlogging::PetscBool = PetscMallocViewGet(petsclib::PetscLibType) \nDetermine whether calls to `PetscMalloc()` are being logged\n\nNot Collective\n\nOutput Parameter:\n- `logging` - `PETSC_TRUE` if logging is active\n\nOptions Database Key:\n- `-malloc_view <optional filename>` - Activates `PetscMallocView()`\n\nLevel: advanced\n\n-seealso: `PetscMallocViewSet()`, `PetscMallocDump()`, `PetscMallocView()`, `PetscMallocTraceGet()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocViewGet\"))\n\"\"\"\nfunction PetscMallocViewGet(petsclib::PetscLibType) end\n\n@for_petsc function PetscMallocViewGet(petsclib::$UnionPetscLib)\n\tlogging_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscMallocViewGet, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               logging_,\n              )\n\n\tlogging = logging_[]\n\n\treturn logging\nend \n\n\"\"\"\n\tPetscMallocTraceSet(petsclib::PetscLibType,viewer::PetscViewer, active::PetscBool, logmin::PetscLogDouble) \nTrace all calls to `PetscMalloc()`. That is print each `PetscMalloc()` and `PetscFree()` call to a viewer.\n\nNot Collective\n\nInput Parameters:\n- `viewer` - The viewer to use for tracing, or `NULL` to use `PETSC_VIEWER_STDOUT_SELF`\n- `active` - Flag to activate or deactivate tracing\n- `logmin` - The smallest memory size that will be logged\n\nLevel: advanced\n\n-seealso: `PetscMallocTraceGet()`, `PetscMallocViewGet()`, `PetscMallocDump()`, `PetscMallocView()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocTraceSet\"))\n\"\"\"\nfunction PetscMallocTraceSet(petsclib::PetscLibType, viewer::PetscViewer, active::PetscBool, logmin::PetscLogDouble) end\n\n@for_petsc function PetscMallocTraceSet(petsclib::$UnionPetscLib, viewer::PetscViewer, active::PetscBool, logmin::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscMallocTraceSet, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer, PetscBool, PetscLogDouble),\n               viewer, active, logmin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlogging::PetscBool = PetscMallocTraceGet(petsclib::PetscLibType) \nDetermine whether all calls to `PetscMalloc()` are being traced\n\nNot Collective\n\nOutput Parameter:\n- `logging` - `PETSC_TRUE` if logging is active\n\nOptions Database Key:\n- `-malloc_view <optional filename>` - Activates `PetscMallocView()`\n\nLevel: advanced\n\nThis only does anything if `-malloc_debug` (or `-malloc_test` if PETSc was configured with debugging) has been used\n\n-seealso: `PetscMallocTraceSet()`, `PetscMallocViewGet()`, `PetscMallocDump()`, `PetscMallocView()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocTraceGet\"))\n\"\"\"\nfunction PetscMallocTraceGet(petsclib::PetscLibType) end\n\n@for_petsc function PetscMallocTraceGet(petsclib::$UnionPetscLib)\n\tlogging_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscMallocTraceGet, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               logging_,\n              )\n\n\tlogging = logging_[]\n\n\treturn logging\nend \n\n\"\"\"\n\tPetscMallocView(petsclib::PetscLibType,fp::Libc.FILE) \nSaves the log of all calls to `PetscMalloc()`; also calls `PetscMemoryGetMaximumUsage()`\n\nNot Collective\n\nInput Parameter:\n- `fp` - file pointer; or `NULL`\n\nOptions Database Key:\n- `-malloc_view <optional filename>` - Activates `PetscMallocView()` in `PetscFinalize()`\n\nLevel: advanced\n\n-seealso: `PetscMallocGetCurrentUsage()`, `PetscMallocDump()`, `PetscMallocViewSet()`, `PetscMemoryView()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocView\"))\n\"\"\"\nfunction PetscMallocView(petsclib::PetscLibType, fp::Libc.FILE) end\n\n@for_petsc function PetscMallocView(petsclib::$UnionPetscLib, fp::Libc.FILE )\n\n    @chk ccall(\n               (:PetscMallocView, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Libc.FILE},),\n               fp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocSetDebug(petsclib::PetscLibType,eachcall::PetscBool, initializenan::PetscBool) \nSet's PETSc memory debugging\n\nNot Collective\n\nInput Parameters:\n- `eachcall`      - checks the entire heap of allocated memory for issues on each call to `PetscMalloc()` and `PetscFree()`, slow\n- `initializenan` - initializes all memory with `NaN` to catch use of uninitialized floating point arrays\n\nOptions Database Keys:\n- `-malloc_debug <true or false>` - turns on or off debugging\n- `-malloc_test`                  - turns on all debugging if PETSc was configured with debugging including `-malloc_dump`, otherwise ignored\n- `-malloc_view_threshold t`      - log only allocations larger than t\n- `-malloc_dump <filename>`       - print a list of all memory that has not been freed, in `PetscFinalize()`\n\nLevel: developer\n\n-seealso: `CHKMEMQ`, `PetscMallocValidate()`, `PetscMallocGetDebug()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocSetDebug\"))\n\"\"\"\nfunction PetscMallocSetDebug(petsclib::PetscLibType, eachcall::PetscBool, initializenan::PetscBool) end\n\n@for_petsc function PetscMallocSetDebug(petsclib::$UnionPetscLib, eachcall::PetscBool, initializenan::PetscBool )\n\n    @chk ccall(\n               (:PetscMallocSetDebug, $petsc_library),\n               PetscErrorCode,\n               (PetscBool, PetscBool),\n               eachcall, initializenan,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbasic::PetscBool,eachcall::PetscBool,initializenan::PetscBool = PetscMallocGetDebug(petsclib::PetscLibType) \nIndicates what PETSc memory debugging it is doing.\n\nNot Collective\n\nOutput Parameters:\n- `basic`         - doing basic debugging\n- `eachcall`      - checks the entire memory heap at each `PetscMalloc()`/`PetscFree()`\n- `initializenan` - initializes memory with `NaN`\n\nLevel: intermediate\n\n-seealso: `CHKMEMQ`, `PetscMallocValidate()`, `PetscMallocSetDebug()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocGetDebug\"))\n\"\"\"\nfunction PetscMallocGetDebug(petsclib::PetscLibType) end\n\n@for_petsc function PetscMallocGetDebug(petsclib::$UnionPetscLib)\n\tbasic_ = Ref{PetscBool}()\n\teachcall_ = Ref{PetscBool}()\n\tinitializenan_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscMallocGetDebug, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool}, Ptr{PetscBool}, Ptr{PetscBool}),\n               basic_, eachcall_, initializenan_,\n              )\n\n\tbasic = basic_[]\n\teachcall = eachcall_[]\n\tinitializenan = initializenan_[]\n\n\treturn basic,eachcall,initializenan\nend \n\n\"\"\"\n\tPetscMallocLogRequestedSizeSet(petsclib::PetscLibType,flg::PetscBool) \nWhether to log the requested or aligned memory size\n\nNot Collective\n\nInput Parameter:\n- `flg` - `PETSC_TRUE` to log the requested memory size\n\nOptions Database Key:\n- `-malloc_requested_size <bool>` - Sets this flag\n\nLevel: developer\n\n-seealso: `PetscMallocLogRequestedSizeGet()`, `PetscMallocViewSet()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocLogRequestedSizeSet\"))\n\"\"\"\nfunction PetscMallocLogRequestedSizeSet(petsclib::PetscLibType, flg::PetscBool) end\n\n@for_petsc function PetscMallocLogRequestedSizeSet(petsclib::$UnionPetscLib, flg::PetscBool )\n\n    @chk ccall(\n               (:PetscMallocLogRequestedSizeSet, $petsc_library),\n               PetscErrorCode,\n               (PetscBool,),\n               flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscMallocLogRequestedSizeGet(petsclib::PetscLibType) \nWhether to log the requested or aligned memory size\n\nNot Collective\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if we log the requested memory size\n\nLevel: developer\n\n-seealso: `PetscMallocLogRequestedSizeSet()`, `PetscMallocViewSet()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocLogRequestedSizeGet\"))\n\"\"\"\nfunction PetscMallocLogRequestedSizeGet(petsclib::PetscLibType) end\n\n@for_petsc function PetscMallocLogRequestedSizeGet(petsclib::$UnionPetscLib)\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscMallocLogRequestedSizeGet, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscMallocSet(petsclib::PetscLibType,imalloc::external, ifree::external, iralloc::external) \nSets the underlying allocation routines used by `PetscMalloc()` and `PetscFree()`\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `imalloc` - the routine that provides the `malloc()` implementation (also provides `calloc()`, which is used depending on the second argument)\n- `ifree`   - the routine that provides the `free()` implementation\n- `iralloc` - the routine that provides the `realloc()` implementation\n\nLevel: developer\n\n-seealso: `PetscMallocClear()`, `PetscInitialize()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocSet\"))\n\"\"\"\nfunction PetscMallocSet(petsclib::PetscLibType, imalloc::external, ifree::external, iralloc::external) end\n\n@for_petsc function PetscMallocSet(petsclib::$UnionPetscLib, imalloc::external, ifree::external, iralloc::external )\n\n    @chk ccall(\n               (:PetscMallocSet, $petsc_library),\n               PetscErrorCode,\n               (external, external, external),\n               imalloc, ifree, iralloc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocClear(petsclib::PetscLibType) \nResets the routines used by `PetscMalloc()` and `PetscFree()`\n\nNot Collective\n\nLevel: developer\n\n-seealso: `PetscMallocSet()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocClear\"))\n\"\"\"\nfunction PetscMallocClear(petsclib::PetscLibType) end\n\n@for_petsc function PetscMallocClear(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscMallocClear, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMemoryTrace(petsclib::PetscLibType,label::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscMemoryTrace\"))\n\"\"\"\nfunction PetscMemoryTrace(petsclib::PetscLibType, label::Vector{Cchar}) end\n\n@for_petsc function PetscMemoryTrace(petsclib::$UnionPetscLib, label::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscMemoryTrace, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               label,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocSetDRAM(petsclib::PetscLibType) \nSet `PetscMalloc()` to use DRAM.\nIf memkind is available, change the memkind type. Otherwise, switch the\ncurrent malloc and free routines to the `PetscMallocAlign()` and\n`PetscFreeAlign()` (PETSc default).\n\nNot Collective\n\nLevel: developer\n\n-seealso: `PetscMallocReset()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocSetDRAM\"))\n\"\"\"\nfunction PetscMallocSetDRAM(petsclib::PetscLibType) end\n\n@for_petsc function PetscMallocSetDRAM(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscMallocSetDRAM, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocResetDRAM(petsclib::PetscLibType) \nReset the changes made by `PetscMallocSetDRAM()`\n\nNot Collective\n\nLevel: developer\n\n-seealso: `PetscMallocSetDRAM()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocResetDRAM\"))\n\"\"\"\nfunction PetscMallocResetDRAM(petsclib::PetscLibType) end\n\n@for_petsc function PetscMallocResetDRAM(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscMallocResetDRAM, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMallocSetCoalesce(petsclib::PetscLibType,coalesce::PetscBool) \nUse coalesced `PetscMalloc()` when allocating groups of objects, that is when using `PetscMallocN()`\n\nNot Collective\n\nInput Parameter:\n- `coalesce` - `PETSC_TRUE` to use coalesced malloc for multi-memory allocation.\n\nOptions Database Key:\n- `-malloc_coalesce` - turn coalesced `PetscMallocN()` on or off\n\nLevel: developer\n\n-seealso: `PetscMallocA()`, `PetscMalloc()`, `PetscFree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMallocSetCoalesce\"))\n\"\"\"\nfunction PetscMallocSetCoalesce(petsclib::PetscLibType, coalesce::PetscBool) end\n\n@for_petsc function PetscMallocSetCoalesce(petsclib::$UnionPetscLib, coalesce::PetscBool )\n\n    @chk ccall(\n               (:PetscMallocSetCoalesce, $petsc_library),\n               PetscErrorCode,\n               (PetscBool,),\n               coalesce,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscTestFile(petsclib::PetscLibType,fname::Vector{Cchar}, mode::Cchar) \nchecks for the existence of a file\n\nNot Collective\n\nInput Parameters:\n- `fname` - the filename\n- `mode`  - either 'r', 'w', 'x' or '\\0'\n\nOutput Parameter:\n- `flg` - the file exists and satisfies the mode\n\nLevel: intermediate\n\n-seealso: `PetscTestDirectory()`, `PetscLs()`\n\n# External Links\n$(_doc_external(\"Sys/PetscTestFile\"))\n\"\"\"\nfunction PetscTestFile(petsclib::PetscLibType, fname::Vector{Cchar}, mode::Cchar) end\n\n@for_petsc function PetscTestFile(petsclib::$UnionPetscLib, fname::Vector{Cchar}, mode::Cchar )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscTestFile, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar, Ptr{PetscBool}),\n               fname, mode, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = PetscTestDirectory(petsclib::PetscLibType,dirname::Vector{Cchar}, mode::Cchar) \nchecks for the existence of a directory\n\nNot Collective\n\nInput Parameters:\n- `dirname` - the directory name\n- `mode`    - either 'r', 'w', or 'x'\n\nOutput Parameter:\n- `flg` - the directory exists and satisfies the mode\n\nLevel: intermediate\n\n-seealso: `PetscTestFile()`, `PetscLs()`, `PetscRMTree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscTestDirectory\"))\n\"\"\"\nfunction PetscTestDirectory(petsclib::PetscLibType, dirname::Vector{Cchar}, mode::Cchar) end\n\n@for_petsc function PetscTestDirectory(petsclib::$UnionPetscLib, dirname::Vector{Cchar}, mode::Cchar )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscTestDirectory, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar, Ptr{PetscBool}),\n               dirname, mode, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = PetscLs(petsclib::PetscLibType,comm::MPI_Comm, dirname::Vector{Cchar}, found::Vector{Cchar}, tlen::Csize_t) \nproduce a listing of the files in a directory\n\nCollective\n\nInput Parameters:\n- `comm`    - the MPI communicator\n- `dirname` - the directory name\n- `tlen`    - the length of the buffer `found`\n\nOutput Parameters:\n- `found` - listing of files\n- `flg`   - the directory exists\n\nLevel: intermediate\n\n-seealso: `PetscTestFile()`, `PetscRMTree()`, `PetscTestDirectory()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLs\"))\n\"\"\"\nfunction PetscLs(petsclib::PetscLibType, comm::MPI_Comm, dirname::Vector{Cchar}, found::Vector{Cchar}, tlen::Csize_t) end\n\n@for_petsc function PetscLs(petsclib::$UnionPetscLib, comm::MPI_Comm, dirname::Vector{Cchar}, found::Vector{Cchar}, tlen::Csize_t )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLs, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t, Ptr{PetscBool}),\n               comm, dirname, found, tlen, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscGetRealPath(petsclib::PetscLibType,path::Vector{Cchar}, rpath::Vector{Cchar}) \nGet the path without symbolic links etc. in absolute form.\n\nNot Collective\n\nInput Parameter:\n- `path` - path to resolve\n\nOutput Parameter:\n- `rpath` - resolved path\n\nLevel: developer\n\n-seealso: `PetscGetFullPath()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetRealPath\"))\n\"\"\"\nfunction PetscGetRealPath(petsclib::PetscLibType, path::Vector{Cchar}, rpath::Vector{Cchar}) end\n\n@for_petsc function PetscGetRealPath(petsclib::$UnionPetscLib, path::Vector{Cchar}, rpath::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscGetRealPath, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}),\n               path, rpath,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetTmp(petsclib::PetscLibType,comm::MPI_Comm, dir::Vector{Cchar}, len::Csize_t) \nGets the name of the \"tmp\" directory, often this is `/tmp`\n\nCollective\n\nInput Parameters:\n- `comm` - MPI_Communicator that may share tmp\n- `len`  - length of string to hold name\n\nOutput Parameter:\n- `dir` - directory name\n\nOptions Database Keys:\n- `-shared_tmp`     - indicates the directory is known to be shared among the MPI processes\n- `-not_shared_tmp` - indicates the directory is known to be not shared among the MPI processes\n- `-tmp tmpdir`     - name of the directory you wish to use as tmp\n\nEnvironmental Variables:\n- `PETSC_SHARED_TMP`     - indicates the directory is known to be shared among the MPI processes\n- `PETSC_NOT_SHARED_TMP` - indicates the directory is known to be not shared among the MPI processes\n- `PETSC_TMP`            - name of the directory you wish to use as tmp\n\nLevel: developer\n\n-seealso: `PetscSharedTmp()`, `PetscSharedWorkingDirectory()`, `PetscGetWorkingDirectory()`, `PetscGetHomeDirectory()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetTmp\"))\n\"\"\"\nfunction PetscGetTmp(petsclib::PetscLibType, comm::MPI_Comm, dir::Vector{Cchar}, len::Csize_t) end\n\n@for_petsc function PetscGetTmp(petsclib::$UnionPetscLib, comm::MPI_Comm, dir::Vector{Cchar}, len::Csize_t )\n\n    @chk ccall(\n               (:PetscGetTmp, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Csize_t),\n               comm, dir, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tshared::PetscBool = PetscSharedTmp(petsclib::PetscLibType,comm::MPI_Comm) \nDetermines if all processors in a communicator share a\ntmp directory or have different ones.\n\nCollective\n\nInput Parameter:\n- `comm` - MPI_Communicator that may share tmp\n\nOutput Parameter:\n- `shared` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Keys:\n- `-shared_tmp`     - indicates the directory is known to be shared among the MPI processes\n- `-not_shared_tmp` - indicates the directory is known to be not shared among the MPI processes\n- `-tmp tmpdir`     - name of the directory you wish to use as tmp\n\nEnvironmental Variables:\n- `PETSC_SHARED_TMP`     - indicates the directory is known to be shared among the MPI processes\n- `PETSC_NOT_SHARED_TMP` - indicates the directory is known to be not shared among the MPI processes\n- `PETSC_TMP`            - name of the directory you wish to use as tmp\n\nLevel: developer\n\n-seealso: `PetscGetTmp()`, `PetscSharedWorkingDirectory()`, `PetscGetWorkingDirectory()`, `PetscGetHomeDirectory()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSharedTmp\"))\n\"\"\"\nfunction PetscSharedTmp(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscSharedTmp(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tshared_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSharedTmp, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscBool}),\n               comm, shared_,\n              )\n\n\tshared = shared_[]\n\n\treturn shared\nend \n\n\"\"\"\n\tshared::PetscBool = PetscSharedWorkingDirectory(petsclib::PetscLibType,comm::MPI_Comm) \nDetermines if all processors in a communicator share a working directory or have different ones.\n\nCollective\n\nInput Parameter:\n- `comm` - MPI_Communicator that may share working directory\n\nOutput Parameter:\n- `shared` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Keys:\n- `-shared_working_directory`     - indicates the directory is known to be shared among the MPI processes\n- `-not_shared_working_directory` - indicates the directory is known to be not shared among the MPI processes\n\nEnvironmental Variables:\n- `PETSC_SHARED_WORKING_DIRECTORY`     - indicates the directory is known to be shared among the MPI processes\n- `PETSC_NOT_SHARED_WORKING_DIRECTORY` - indicates the directory is known to be not shared among the MPI processes\n\nLevel: developer\n\n-seealso: `PetscGetTmp()`, `PetscSharedTmp()`, `PetscGetWorkingDirectory()`, `PetscGetHomeDirectory()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSharedWorkingDirectory\"))\n\"\"\"\nfunction PetscSharedWorkingDirectory(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscSharedWorkingDirectory(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tshared_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSharedWorkingDirectory, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscBool}),\n               comm, shared_,\n              )\n\n\tshared = shared_[]\n\n\treturn shared\nend \n\n\"\"\"\n\tfound::PetscBool = PetscFileRetrieve(petsclib::PetscLibType,comm::MPI_Comm, url::Vector{Cchar}, locname::Vector{Cchar}, llen::Csize_t) \nObtains a file from a URL or a compressed file\nand copies into local disk space as uncompressed.\n\nCollective\n\nInput Parameters:\n- `comm` - processors accessing the file\n- `url`  - name of file, including entire URL (with or without .gz)\n- `llen` - length of `localname`\n\nOutput Parameters:\n- `localname` - name of local copy of file - valid on only process zero\n- `found`     - if found or retrieved the file - valid on all processes\n\nLevel: developer\n\n-seealso: `PetscDLLibraryRetrieve()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFileRetrieve\"))\n\"\"\"\nfunction PetscFileRetrieve(petsclib::PetscLibType, comm::MPI_Comm, url::Vector{Cchar}, locname::Vector{Cchar}, llen::Csize_t) end\n\n@for_petsc function PetscFileRetrieve(petsclib::$UnionPetscLib, comm::MPI_Comm, url::Vector{Cchar}, locname::Vector{Cchar}, llen::Csize_t )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscFileRetrieve, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t, Ptr{PetscBool}),\n               comm, url, locname, llen, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n\"\"\"\n\tPetscGetFullPath(petsclib::PetscLibType,path::Vector{Cchar}, fullpath::Vector{Cchar}, flen::Csize_t) \nGiven a filename, returns the fully qualified file name.\n\nNot Collective\n\nInput Parameters:\n- `path` - pathname to qualify\n- `flen` - size of `fullpath`\n\nOutput Parameter:\n- `fullpath` - buffer to hold the full pathname\n\nLevel: developer\n\n-seealso: `PetscGetRelativePath()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetFullPath\"))\n\"\"\"\nfunction PetscGetFullPath(petsclib::PetscLibType, path::Vector{Cchar}, fullpath::Vector{Cchar}, flen::Csize_t) end\n\n@for_petsc function PetscGetFullPath(petsclib::$UnionPetscLib, path::Vector{Cchar}, fullpath::Vector{Cchar}, flen::Csize_t )\n\n    @chk ccall(\n               (:PetscGetFullPath, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               path, fullpath, flen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscByteSwap(petsclib::PetscLibType,data::Cvoid, pdtype::PetscDataType, count::PetscCount) \n\n# External Links\n$(_doc_external(\"Sys/PetscByteSwap\"))\n\"\"\"\nfunction PetscByteSwap(petsclib::PetscLibType, data::Cvoid, pdtype::PetscDataType, count::PetscCount) end\n\n@for_petsc function PetscByteSwap(petsclib::$UnionPetscLib, data::Cvoid, pdtype::PetscDataType, count::PetscCount )\n\n    @chk ccall(\n               (:PetscByteSwap, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, PetscDataType, PetscCount),\n               data, pdtype, count,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcount::PetscInt = PetscBinaryRead(petsclib::PetscLibType,fd::Cint, data::Cvoid, num::PetscCount, type::PetscDataType) \nReads from a binary file.\n\nNot Collective\n\nInput Parameters:\n- `fd`   - the file descriptor\n- `num`  - the maximum number of items to read\n- `type` - the type of items to read (`PETSC_INT`, `PETSC_REAL`, `PETSC_SCALAR`, etc.)\n\nOutput Parameters:\n- `data`  - the buffer, this is an array of the type that matches the value in `type`\n- `count` - the number of items read, optional\n\nLevel: developer\n\n-seealso: `PetscBinaryWrite()`, `PetscBinaryOpen()`, `PetscBinaryClose()`, `PetscViewerBinaryGetDescriptor()`, `PetscBinarySynchronizedWrite()`,\n`PetscBinarySynchronizedRead()`, `PetscBinarySynchronizedSeek()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBinaryRead\"))\n\"\"\"\nfunction PetscBinaryRead(petsclib::PetscLibType, fd::Cint, data::Cvoid, num::PetscCount, type::PetscDataType) end\n\n@for_petsc function PetscBinaryRead(petsclib::$UnionPetscLib, fd::Cint, data::Cvoid, num::PetscCount, type::PetscDataType )\n\tcount_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscBinaryRead, $petsc_library),\n               PetscErrorCode,\n               (Cint, Ptr{Cvoid}, PetscCount, Ptr{$PetscInt}, PetscDataType),\n               fd, data, num, count_, type,\n              )\n\n\tcount = count_[]\n\n\treturn count\nend \n\n\"\"\"\n\tPetscBinaryWrite(petsclib::PetscLibType,fd::Cint, p::Cvoid, n::PetscCount, type::PetscDataType) \nWrites to a binary file.\n\nNot Collective\n\nInput Parameters:\n- `fd`   - the file\n- `p`    - the buffer, an array of the type that matches the value in `type`\n- `n`    - the number of items to write\n- `type` - the type of items to read (`PETSC_INT`, `PETSC_REAL` or `PETSC_SCALAR`)\n\nLevel: advanced\n\n-seealso: `PetscBinaryRead()`, `PetscBinaryOpen()`, `PetscBinaryClose()`, `PetscViewerBinaryGetDescriptor()`, `PetscBinarySynchronizedWrite()`,\n`PetscBinarySynchronizedRead()`, `PetscBinarySynchronizedSeek()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBinaryWrite\"))\n\"\"\"\nfunction PetscBinaryWrite(petsclib::PetscLibType, fd::Cint, p::Cvoid, n::PetscCount, type::PetscDataType) end\n\n@for_petsc function PetscBinaryWrite(petsclib::$UnionPetscLib, fd::Cint, p::Cvoid, n::PetscCount, type::PetscDataType )\n\n    @chk ccall(\n               (:PetscBinaryWrite, $petsc_library),\n               PetscErrorCode,\n               (Cint, Ptr{Cvoid}, PetscCount, PetscDataType),\n               fd, p, n, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBinaryOpen(petsclib::PetscLibType,name::Vector{Cchar}, mode::PetscFileMode, fd::Cint) \nOpens a PETSc binary file.\n\nNot Collective\n\nInput Parameters:\n- `name` - filename\n- `mode` - open mode of binary file, one of `FILE_MODE_READ`, `FILE_MODE_WRITE`, `FILE_MODE_APPEND`\n\nOutput Parameter:\n- `fd` - the file\n\nLevel: advanced\n\n-seealso: `PetscBinaryRead()`, `PetscBinaryWrite()`, `PetscFileMode`, `PetscViewerFileSetMode()`, `PetscViewerBinaryGetDescriptor()`,\n`PetscBinarySynchronizedWrite()`, `PetscBinarySynchronizedRead()`, `PetscBinarySynchronizedSeek()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBinaryOpen\"))\n\"\"\"\nfunction PetscBinaryOpen(petsclib::PetscLibType, name::Vector{Cchar}, mode::PetscFileMode, fd::Cint) end\n\n@for_petsc function PetscBinaryOpen(petsclib::$UnionPetscLib, name::Vector{Cchar}, mode::PetscFileMode, fd::Cint )\n\n    @chk ccall(\n               (:PetscBinaryOpen, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PetscFileMode, Ptr{Cint}),\n               name, mode, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBinaryClose(petsclib::PetscLibType,fd::Cint) \nCloses a PETSc binary file.\n\nNot Collective\n\nOutput Parameter:\n- `fd` - the file\n\nLevel: advanced\n\n-seealso: `PetscBinaryRead()`, `PetscBinaryWrite()`, `PetscBinaryOpen()`, `PetscBinarySynchronizedWrite()`, `PetscBinarySynchronizedRead()`,\n`PetscBinarySynchronizedSeek()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBinaryClose\"))\n\"\"\"\nfunction PetscBinaryClose(petsclib::PetscLibType, fd::Cint) end\n\n@for_petsc function PetscBinaryClose(petsclib::$UnionPetscLib, fd::Cint )\n\n    @chk ccall(\n               (:PetscBinaryClose, $petsc_library),\n               PetscErrorCode,\n               (Cint,),\n               fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcount::PetscInt = PetscBinarySynchronizedRead(petsclib::PetscLibType,comm::MPI_Comm, fd::Cint, data::Cvoid, num::PetscInt, type::PetscDataType) \nReads from a binary file, all MPI processes get the same values\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `fd`   - the file descriptor\n- `num`  - the maximum number of items to read\n- `type` - the type of items to read (`PETSC_INT`, `PETSC_REAL`, `PETSC_SCALAR`, etc.)\n\nOutput Parameters:\n- `data`  - the buffer, an array of the type that matches the value in `type`\n- `count` - the number of items read, optional\n\nLevel: developer\n\n-seealso: `PetscBinaryWrite()`, `PetscBinaryOpen()`, `PetscBinaryClose()`, `PetscBinaryRead()`, `PetscBinarySynchronizedWrite()`,\n`PetscBinarySynchronizedSeek()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBinarySynchronizedRead\"))\n\"\"\"\nfunction PetscBinarySynchronizedRead(petsclib::PetscLibType, comm::MPI_Comm, fd::Cint, data::Cvoid, num::PetscInt, type::PetscDataType) end\n\n@for_petsc function PetscBinarySynchronizedRead(petsclib::$UnionPetscLib, comm::MPI_Comm, fd::Cint, data::Cvoid, num::$PetscInt, type::PetscDataType )\n\tcount_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscBinarySynchronizedRead, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Cint, Ptr{Cvoid}, $PetscInt, Ptr{$PetscInt}, PetscDataType),\n               comm, fd, data, num, count_, type,\n              )\n\n\tcount = count_[]\n\n\treturn count\nend \n\n\"\"\"\n\tPetscBinarySynchronizedWrite(petsclib::PetscLibType,comm::MPI_Comm, fd::Cint, p::Cvoid, n::PetscInt, type::PetscDataType) \nwrites to a binary file.\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `fd`   - the file\n- `n`    - the number of items to write\n- `p`    - the buffer, an array of the type that matches the value in `type`\n- `type` - the type of items to write (`PETSC_INT`, `PETSC_REAL` or `PETSC_SCALAR`)\n\nLevel: developer\n\n-seealso: `PetscBinaryWrite()`, `PetscBinaryOpen()`, `PetscBinaryClose()`, `PetscBinaryRead()`, `PetscBinarySynchronizedRead()`,\n`PetscBinarySynchronizedSeek()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBinarySynchronizedWrite\"))\n\"\"\"\nfunction PetscBinarySynchronizedWrite(petsclib::PetscLibType, comm::MPI_Comm, fd::Cint, p::Cvoid, n::PetscInt, type::PetscDataType) end\n\n@for_petsc function PetscBinarySynchronizedWrite(petsclib::$UnionPetscLib, comm::MPI_Comm, fd::Cint, p::Cvoid, n::$PetscInt, type::PetscDataType )\n\n    @chk ccall(\n               (:PetscBinarySynchronizedWrite, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Cint, Ptr{Cvoid}, $PetscInt, PetscDataType),\n               comm, fd, p, n, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStartMatlab(petsclib::PetscLibType,comm::MPI_Comm, machine::Vector{Cchar}, script::Vector{Cchar}, fp::Libc.FILE) \nstarts up MATLAB with a MATLAB script\n\nLogically Collective, but only MPI rank 0 in the communicator does anything\n\nInput Parameters:\n- `comm`    - MPI communicator\n- `machine` - optional machine to run MATLAB on\n- `script`  - name of script (without the .m)\n\nOutput Parameter:\n- `fp` - a file pointer returned from `PetscPOpen()`\n\nLevel: intermediate\n\n-seealso: `PetscPOpen()`, `PetscPClose()`, `PetscMatlabEngine`\n\n# External Links\n$(_doc_external(\"Sys/PetscStartMatlab\"))\n\"\"\"\nfunction PetscStartMatlab(petsclib::PetscLibType, comm::MPI_Comm, machine::Vector{Cchar}, script::Vector{Cchar}, fp::Libc.FILE) end\n\n@for_petsc function PetscStartMatlab(petsclib::$UnionPetscLib, comm::MPI_Comm, machine::Vector{Cchar}, script::Vector{Cchar}, fp::Libc.FILE )\n\n    @chk ccall(\n               (:PetscStartMatlab, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Libc.FILE),\n               comm, machine, script, fp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFOpen(petsclib::PetscLibType,comm::MPI_Comm, name::Vector{Cchar}, mode::Vector{Cchar}, fp::Libc.FILE) \nHas the first process in the MPI communicator open a file;\nall others do nothing.\n\nLogically Collective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `name` - the filename\n- `mode` - the mode for `fopen()`, usually \"w\"\n\nOutput Parameter:\n- `fp` - the file pointer\n\nLevel: developer\n\n-seealso: `PetscFClose()`, `PetscSynchronizedFGets()`, `PetscSynchronizedPrintf()`, `PetscSynchronizedFlush()`,\n`PetscFPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFOpen\"))\n\"\"\"\nfunction PetscFOpen(petsclib::PetscLibType, comm::MPI_Comm, name::Vector{Cchar}, mode::Vector{Cchar}, fp::Libc.FILE) end\n\n@for_petsc function PetscFOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, name::Vector{Cchar}, mode::Vector{Cchar}, fp::Libc.FILE )\n\n    @chk ccall(\n               (:PetscFOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Libc.FILE),\n               comm, name, mode, fp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFClose(petsclib::PetscLibType,comm::MPI_Comm, fd::Libc.FILE) \nHas MPI rank 0 in the communicator close a\nfile (usually obtained with `PetscFOpen()`; all others do nothing.\n\nLogically Collective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `fd`   - the file, opened with `PetscFOpen()`\n\nLevel: developer\n\n-seealso: `PetscFOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFClose\"))\n\"\"\"\nfunction PetscFClose(petsclib::PetscLibType, comm::MPI_Comm, fd::Libc.FILE) end\n\n@for_petsc function PetscFClose(petsclib::$UnionPetscLib, comm::MPI_Comm, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscFClose, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Libc.FILE}),\n               comm, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPClose(petsclib::PetscLibType,comm::MPI_Comm, fd::Libc.FILE) \nCloses (ends) a program on MPI rank 0 run with `PetscPOpen()`\n\nCollective, but only MPI rank 0 does anything\n\nInput Parameters:\n- `comm` - MPI communicator, only rank 0 performs the close\n- `fd`   - the file pointer where program input or output may be read or `NULL` if don't care\n\nLevel: intermediate\n\n-seealso: `PetscFOpen()`, `PetscFClose()`, `PetscPOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPClose\"))\n\"\"\"\nfunction PetscPClose(petsclib::PetscLibType, comm::MPI_Comm, fd::Libc.FILE) end\n\n@for_petsc function PetscPClose(petsclib::$UnionPetscLib, comm::MPI_Comm, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscPClose, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Libc.FILE}),\n               comm, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPOpen(petsclib::PetscLibType,comm::MPI_Comm, machine::Vector{Cchar}, program::Vector{Cchar}, mode::Vector{Cchar}, fp::Libc.FILE) \nRuns a program on MPI rank 0 and sends either its input or output to\na file.\n\nLogically Collective, but only MPI rank 0 runs the command\n\nInput Parameters:\n- `comm`    - MPI communicator, only processor zero runs the program\n- `machine` - machine to run command on or `NULL`, or a string with 0 in first location\n- `program` - name of program to run\n- `mode`    - either \"r\" or \"w\"\n\nOutput Parameter:\n- `fp` - the file pointer where program input or output may be read or `NULL` if results are not needed\n\nLevel: intermediate\n\n-seealso: `PetscFOpen()`, `PetscFClose()`, `PetscPClose()`, `PetscPOpenSetMachine()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPOpen\"))\n\"\"\"\nfunction PetscPOpen(petsclib::PetscLibType, comm::MPI_Comm, machine::Vector{Cchar}, program::Vector{Cchar}, mode::Vector{Cchar}, fp::Libc.FILE) end\n\n@for_petsc function PetscPOpen(petsclib::$UnionPetscLib, comm::MPI_Comm, machine::Vector{Cchar}, program::Vector{Cchar}, mode::Vector{Cchar}, fp::Libc.FILE )\n\n    @chk ccall(\n               (:PetscPOpen, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Libc.FILE),\n               comm, machine, program, mode, fp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPOpenSetMachine(petsclib::PetscLibType,machine::Vector{Cchar}) \nSets the name of the default machine to run `PetscPOpen()` calls on\n\nLogically Collective, but only the MPI process with rank 0 runs the command\n\nInput Parameter:\n- `machine` - machine to run command on or `NULL` for the current machine\n\nOptions Database Key:\n- `-popen_machine <machine>` - run the process on this machine\n\nLevel: intermediate\n\n-seealso: `PetscFOpen()`, `PetscFClose()`, `PetscPClose()`, `PetscPOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPOpenSetMachine\"))\n\"\"\"\nfunction PetscPOpenSetMachine(petsclib::PetscLibType, machine::Vector{Cchar}) end\n\n@for_petsc function PetscPOpenSetMachine(petsclib::$UnionPetscLib, machine::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscPOpenSetMachine, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               machine,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetWorkingDirectory(petsclib::PetscLibType,path::Vector{Cchar}, len::Csize_t) \nGets the current working directory.\n\nNot Collective\n\nInput Parameter:\n- `len` - maximum length of `path`\n\nOutput Parameter:\n- `path` - holds the result value. The string should be long enough to hold the path, for example, `PETSC_MAX_PATH_LEN`\n\nLevel: developer\n\n-seealso: `PetscGetTmp()`, `PetscSharedTmp()`, `PetscSharedWorkingDirectory()`, `PetscGetHomeDirectory()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetWorkingDirectory\"))\n\"\"\"\nfunction PetscGetWorkingDirectory(petsclib::PetscLibType, path::Vector{Cchar}, len::Csize_t) end\n\n@for_petsc function PetscGetWorkingDirectory(petsclib::$UnionPetscLib, path::Vector{Cchar}, len::Csize_t )\n\n    @chk ccall(\n               (:PetscGetWorkingDirectory, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               path, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetHomeDirectory(petsclib::PetscLibType,dir::Vector{Cchar}, maxlen::Csize_t) \nReturns the name of the user's home directory\n\nNot Collective\n\nInput Parameter:\n- `maxlen` - maximum length allowed\n\nOutput Parameter:\n- `dir` - contains the home directory. Must be long enough to hold the name.\n\nLevel: developer\n\n-seealso: `PetscGetTmp()`, `PetscSharedTmp()`, `PetscGetWorkingDirectory()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetHomeDirectory\"))\n\"\"\"\nfunction PetscGetHomeDirectory(petsclib::PetscLibType, dir::Vector{Cchar}, maxlen::Csize_t) end\n\n@for_petsc function PetscGetHomeDirectory(petsclib::$UnionPetscLib, dir::Vector{Cchar}, maxlen::Csize_t )\n\n    @chk ccall(\n               (:PetscGetHomeDirectory, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               dir, maxlen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFixFilename(petsclib::PetscLibType,filein::Vector{Cchar}, fileout::Vector{Cchar}) \nFixes a file name so that it is correct for both Unix and\nMicrosoft Windows by using the correct `/` or `\\` to separate directories.\n\nNot Collective\n\nInput Parameter:\n- `filein` - name of file to be fixed\n\nOutput Parameter:\n- `fileout` - the fixed name. Should long enough to hold the filename.\n\nLevel: developer\n\n-seealso: `PetscFOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFixFilename\"))\n\"\"\"\nfunction PetscFixFilename(petsclib::PetscLibType, filein::Vector{Cchar}, fileout::Vector{Cchar}) end\n\n@for_petsc function PetscFixFilename(petsclib::$UnionPetscLib, filein::Vector{Cchar}, fileout::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscFixFilename, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}),\n               filein, fileout,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetRelativePath(petsclib::PetscLibType,fullpath::Vector{Cchar}, path::Vector{Cchar}, flen::Csize_t) \nGiven a filename, returns the relative path (removes\nall directory specifiers).\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `fullpath` - full pathname\n- `flen`     - size of `path`\n\nOutput Parameter:\n- `path` - buffer that holds relative pathname\n\nLevel: developer\n\n-seealso: `PetscGetFullPath()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetRelativePath\"))\n\"\"\"\nfunction PetscGetRelativePath(petsclib::PetscLibType, fullpath::Vector{Cchar}, path::Vector{Cchar}, flen::Csize_t) end\n\n@for_petsc function PetscGetRelativePath(petsclib::$UnionPetscLib, fullpath::Vector{Cchar}, path::Vector{Cchar}, flen::Csize_t )\n\n    @chk ccall(\n               (:PetscGetRelativePath, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               fullpath, path, flen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFormatConvertGetSize(petsclib::PetscLibType,format::Vector{Cchar}, size::Csize_t) \nGets the length of a string needed to hold data converted with `PetscFormatConvert()` based on the format\n\nNo Fortran Support\n\nInput Parameter:\n- `format` - the PETSc format string\n\nOutput Parameter:\n- `size` - the needed length of the new format\n\nLevel: developer\n\n-seealso: `PetscFormatConvert()`, `PetscVSNPrintf()`, `PetscVFPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFormatConvertGetSize\"))\n\"\"\"\nfunction PetscFormatConvertGetSize(petsclib::PetscLibType, format::Vector{Cchar}, size::Csize_t) end\n\n@for_petsc function PetscFormatConvertGetSize(petsclib::$UnionPetscLib, format::Vector{Cchar}, size::Csize_t )\n\n    @chk ccall(\n               (:PetscFormatConvertGetSize, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Csize_t}),\n               format, size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFormatConvert(petsclib::PetscLibType,format::Vector{Cchar}, newformat::Vector{Cchar}) \nconverts %g to [|%g|] so that `PetscVSNPrintf()` can ensure all %g formatted numbers have a decimal point when printed.\n\nNo Fortran Support\n\nInput Parameter:\n- `format` - the PETSc format string\n\nOutput Parameter:\n- `newformat` - the formatted string, must be long enough to hold result\n\nLevel: developer\n\n-seealso: `PetscFormatConvertGetSize()`, `PetscVSNPrintf()`, `PetscVFPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFormatConvert\"))\n\"\"\"\nfunction PetscFormatConvert(petsclib::PetscLibType, format::Vector{Cchar}, newformat::Vector{Cchar}) end\n\n@for_petsc function PetscFormatConvert(petsclib::$UnionPetscLib, format::Vector{Cchar}, newformat::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscFormatConvert, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}),\n               format, newformat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFFlush(petsclib::PetscLibType,fd::Libc.FILE) \nFlush a file stream\n\nInput Parameter:\n- `fd` - The file stream handle\n\nLevel: intermediate\n\n-seealso: `PetscPrintf()`, `PetscFPrintf()`, `PetscVFPrintf()`, `PetscVSNPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFFlush\"))\n\"\"\"\nfunction PetscFFlush(petsclib::PetscLibType, fd::Libc.FILE) end\n\n@for_petsc function PetscFFlush(petsclib::$UnionPetscLib, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscFFlush, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Libc.FILE},),\n               fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSynchronizedFlush(petsclib::PetscLibType,comm::MPI_Comm, fd::Libc.FILE) \nFlushes to the screen output from all processors\ninvolved in previous `PetscSynchronizedPrintf()`/`PetscSynchronizedFPrintf()` calls.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `fd`   - the file pointer (valid on MPI rank 0 of the communicator), `PETSC_STDOUT` or value obtained from `PetscFOpen()`\n\nLevel: intermediate\n\n-seealso: `PetscSynchronizedPrintf()`, `PetscFPrintf()`, `PetscPrintf()`, `PetscViewerASCIIPrintf()`,\n`PetscViewerASCIISynchronizedPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSynchronizedFlush\"))\n\"\"\"\nfunction PetscSynchronizedFlush(petsclib::PetscLibType, comm::MPI_Comm, fd::Libc.FILE) end\n\n@for_petsc function PetscSynchronizedFlush(petsclib::$UnionPetscLib, comm::MPI_Comm, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscSynchronizedFlush, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Libc.FILE}),\n               comm, fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSynchronizedFGets(petsclib::PetscLibType,comm::MPI_Comm, fp::Libc.FILE, len::Csize_t, string::Vector{Cchar}) \nMultiple MPI processes all get the same line from a file.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `fp`   - the file pointer\n- `len`  - the length of `string`\n\nOutput Parameter:\n- `string` - the line read from the file, at end of file `string`[0] == 0\n\nLevel: intermediate\n\n-seealso: `PetscSynchronizedPrintf()`, `PetscSynchronizedFlush()`,\n`PetscFOpen()`, `PetscViewerASCIISynchronizedPrintf()`, `PetscViewerASCIIPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSynchronizedFGets\"))\n\"\"\"\nfunction PetscSynchronizedFGets(petsclib::PetscLibType, comm::MPI_Comm, fp::Libc.FILE, len::Csize_t, string::Vector{Cchar}) end\n\n@for_petsc function PetscSynchronizedFGets(petsclib::$UnionPetscLib, comm::MPI_Comm, fp::Libc.FILE, len::Csize_t, string::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscSynchronizedFGets, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Libc.FILE}, Csize_t, Ptr{Cchar}),\n               comm, fp, len, string,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFormatRealArray(petsclib::PetscLibType,buf::Vector{Cchar}, len::Csize_t, fmt::Vector{Cchar}, n::PetscInt, x::Vector{PetscReal}) \n\n# External Links\n$(_doc_external(\"Sys/PetscFormatRealArray\"))\n\"\"\"\nfunction PetscFormatRealArray(petsclib::PetscLibType, buf::Vector{Cchar}, len::Csize_t, fmt::Vector{Cchar}, n::PetscInt, x::Vector{PetscReal}) end\n\n@for_petsc function PetscFormatRealArray(petsclib::$UnionPetscLib, buf::Vector{Cchar}, len::Csize_t, fmt::Vector{Cchar}, n::$PetscInt, x::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscFormatRealArray, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t, Ptr{Cchar}, $PetscInt, Ptr{$PetscReal}),\n               buf, len, fmt, n, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMkdir(petsclib::PetscLibType,dir::Vector{Cchar}) \nCreate a directory\n\nNot Collective\n\nInput Parameter:\n- `dir` - the directory name\n\nLevel: advanced\n\n-seealso: `PetscMkdtemp()`, `PetscRMTree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMkdir\"))\n\"\"\"\nfunction PetscMkdir(petsclib::PetscLibType, dir::Vector{Cchar}) end\n\n@for_petsc function PetscMkdir(petsclib::$UnionPetscLib, dir::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscMkdir, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               dir,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMkdtemp(petsclib::PetscLibType,dir::Vector{Cchar}) \nCreate a directory with a unique name given a name template.\n\nInput Parameter:\n- `dir` - file name template, the last six characters must be 'XXXXXX', and they will be modified upon return\n\nLevel: advanced\n\n-seealso: `PetscMkdir()`, `PetscRMTree()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMkdtemp\"))\n\"\"\"\nfunction PetscMkdtemp(petsclib::PetscLibType, dir::Vector{Cchar}) end\n\n@for_petsc function PetscMkdtemp(petsclib::$UnionPetscLib, dir::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscMkdtemp, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               dir,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRMTree(petsclib::PetscLibType,dir::Vector{Cchar}) \ndelete a directory and all of its children\n\nInput Parameter:\n- `dir` - the name of the directory\n\nLevel: advanced\n\n-seealso: `PetscMkdtemp()`, `PetscMkdir()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRMTree\"))\n\"\"\"\nfunction PetscRMTree(petsclib::PetscLibType, dir::Vector{Cchar}) end\n\n@for_petsc function PetscRMTree(petsclib::$UnionPetscLib, dir::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscRMTree, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               dir,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPythonFinalize(petsclib::PetscLibType) \nFinalize PETSc for use with Python.\n\nLevel: intermediate\n\n-seealso: `PetscPythonInitialize()`, `PetscPythonPrintError()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPythonFinalize\"))\n\"\"\"\nfunction PetscPythonFinalize(petsclib::PetscLibType) end\n\n@for_petsc function PetscPythonFinalize(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscPythonFinalize, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPythonInitialize(petsclib::PetscLibType,pyexe::Vector{Cchar}, pylib::Vector{Cchar}) \nInitialize Python for use with PETSc and import petsc4py.\n\nInput Parameters:\n- `pyexe`  - path to the Python interpreter executable, or `NULL`.\n- `pylib`  - full path to the Python dynamic library, or `NULL`.\n\nOptions Database Key:\n- `-python <exe>` - Initializes Python, and optionally takes a Python executable name\n\nLevel: intermediate\n\n-seealso: `PetscPythonFinalize()`, `PetscPythonPrintError()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPythonInitialize\"))\n\"\"\"\nfunction PetscPythonInitialize(petsclib::PetscLibType, pyexe::Vector{Cchar}, pylib::Vector{Cchar}) end\n\n@for_petsc function PetscPythonInitialize(petsclib::$UnionPetscLib, pyexe::Vector{Cchar}, pylib::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscPythonInitialize, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}),\n               pyexe, pylib,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPythonPrintError(petsclib::PetscLibType) \nPrint any current Python errors.\n\nLevel: developer\n\n-seealso: `PetscPythonInitialize()`, `PetscPythonFinalize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPythonPrintError\"))\n\"\"\"\nfunction PetscPythonPrintError(petsclib::PetscLibType) end\n\n@for_petsc function PetscPythonPrintError(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscPythonPrintError, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPythonMonitorSet(petsclib::PetscLibType,obj::PetscObject, url::Vector{Cchar}) \nSet a Python monitor for a `PetscObject`\n\nLevel: developer\n\n-seealso: `PetscPythonInitialize()`, `PetscPythonFinalize()`, `PetscPythonPrintError()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPythonMonitorSet\"))\n\"\"\"\nfunction PetscPythonMonitorSet(petsclib::PetscLibType, obj::PetscObject, url::Vector{Cchar}) end\n\n@for_petsc function PetscPythonMonitorSet(petsclib::$UnionPetscLib, obj::PetscObject, url::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscPythonMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (PetscObject, Ptr{Cchar}),\n               obj, url,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSysFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the system library portion of PETSc.\nIt is called from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `PetscSysInitializePackage()`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSysFinalizePackage\"))\n\"\"\"\nfunction PetscSysFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscSysFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscSysFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSysInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the system library portion of PETSc. It is called\nfrom `PetscDLLibraryRegister_petsc()` when using dynamic libraries, and in the call to `PetscInitialize()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PetscSysFinalizePackage()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSysInitializePackage\"))\n\"\"\"\nfunction PetscSysInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscSysInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscSysInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tidentical::PetscBool = PetscMonitorCompare(petsclib::PetscLibType,nmon::external, nmctx::Cvoid, nmdestroy::PetscCtxDestroyFn, mon::external, mctx::Cvoid, mdestroy::PetscCtxDestroyFn) \nChecks if two monitors are identical; if they are then it destroys the new one\n\nNot Collective\n\nInput Parameters:\n- `nmon`      - The new monitor\n- `nmctx`     - The new monitor context, or `NULL`\n- `nmdestroy` - The new monitor context destroy function, or `NULL`, see `PetscCtxDestroyFn` for its calling sequence\n- `mon`       - The old monitor\n- `mctx`      - The old monitor context, or `NULL`\n- `mdestroy`  - The old monitor context destroy function, or `NULL`, see `PetscCtxDestroyFn` for its calling sequence\n\nOutput Parameter:\n- `identical` - `PETSC_TRUE` if the monitors are the same\n\nLevel: developer\n\n-seealso: [](sec_viewers), `DMMonitorSetFromOptions()`, `KSPMonitorSetFromOptions()`, `SNESMonitorSetFromOptions()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Sys/PetscMonitorCompare\"))\n\"\"\"\nfunction PetscMonitorCompare(petsclib::PetscLibType, nmon::external, nmctx::Cvoid, nmdestroy::PetscCtxDestroyFn, mon::external, mctx::Cvoid, mdestroy::PetscCtxDestroyFn) end\n\n@for_petsc function PetscMonitorCompare(petsclib::$UnionPetscLib, nmon::external, nmctx::Cvoid, nmdestroy::PetscCtxDestroyFn, mon::external, mctx::Cvoid, mdestroy::PetscCtxDestroyFn )\n\tidentical_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscMonitorCompare, $petsc_library),\n               PetscErrorCode,\n               (external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}, Ptr{PetscBool}),\n               nmon, nmctx, nmdestroy, mon, mctx, mdestroy, identical_,\n              )\n\n\tidentical = identical_[]\n\n\treturn identical\nend \n\n\"\"\"\n\thtype::hid_t = PetscDataTypeToHDF5DataType(petsclib::PetscLibType,ptype::PetscDataType) \nConverts the PETSc name of a datatype to its HDF5 name.\n\nNot Collective\n\nInput Parameter:\n- `ptype` - the PETSc datatype name (for example `PETSC_DOUBLE`)\n\nOutput Parameter:\n- `htype` - the HDF5  datatype\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscDataType`, `PetscHDF5DataTypeToPetscDataType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDataTypeToHDF5DataType\"))\n\"\"\"\nfunction PetscDataTypeToHDF5DataType(petsclib::PetscLibType, ptype::PetscDataType) end\n\n@for_petsc function PetscDataTypeToHDF5DataType(petsclib::$UnionPetscLib, ptype::PetscDataType )\n\thtype_ = Ref{hid_t}()\n\n    @chk ccall(\n               (:PetscDataTypeToHDF5DataType, $petsc_library),\n               PetscErrorCode,\n               (PetscDataType, Ptr{hid_t}),\n               ptype, htype_,\n              )\n\n\thtype = htype_[]\n\n\treturn htype\nend \n\n\"\"\"\n\tptype::PetscDataType = PetscHDF5DataTypeToPetscDataType(petsclib::PetscLibType,htype::hid_t) \nFinds the PETSc name of a datatype from its HDF5 name\n\nNot Collective\n\nInput Parameter:\n- `htype` - the HDF5 datatype (for example `H5T_NATIVE_DOUBLE`, ...)\n\nOutput Parameter:\n- `ptype` - the PETSc datatype name (for example `PETSC_DOUBLE`)\n\nLevel: advanced\n\n-seealso: [](sec_viewers), `PetscDataType`\n\n# External Links\n$(_doc_external(\"Sys/PetscHDF5DataTypeToPetscDataType\"))\n\"\"\"\nfunction PetscHDF5DataTypeToPetscDataType(petsclib::PetscLibType, htype::hid_t) end\n\n@for_petsc function PetscHDF5DataTypeToPetscDataType(petsclib::$UnionPetscLib, htype::hid_t )\n\tptype_ = Ref{PetscDataType}()\n\n    @chk ccall(\n               (:PetscHDF5DataTypeToPetscDataType, $petsc_library),\n               PetscErrorCode,\n               (hid_t, Ptr{PetscDataType}),\n               htype, ptype_,\n              )\n\n\tptype = unsafe_string(ptype_[])\n\n\treturn ptype\nend \n\n\"\"\"\n\tPetscOpenSocket(petsclib::PetscLibType,hostname::Vector{Cchar}, portnum::Cint, t::Cint) \nhandles connected to an open port where someone is waiting.\n\nInput Parameters:\n- `hostname` - for example www.mcs.anl.gov\n- `portnum`  - for example 80\n\nOutput Parameter:\n- `t` - the socket number\n\n-seealso: `PetscSocketListen()`, `PetscSocketEstablish()`, `PetscHTTPRequest()`, `PetscHTTPSConnect()`\n\n# External Links\n$(_doc_external(\"Sys/PetscOpenSocket\"))\n\"\"\"\nfunction PetscOpenSocket(petsclib::PetscLibType, hostname::Vector{Cchar}, portnum::Cint, t::Cint) end\n\n@for_petsc function PetscOpenSocket(petsclib::$UnionPetscLib, hostname::Vector{Cchar}, portnum::Cint, t::Cint )\n\n    @chk ccall(\n               (:PetscOpenSocket, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cint, Ptr{Cint}),\n               hostname, portnum, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBTView(petsclib::PetscLibType,m::PetscCount, bt::PetscBT, viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTView\"))\n\"\"\"\nfunction PetscBTView(petsclib::PetscLibType, m::PetscCount, bt::PetscBT, viewer::PetscViewer) end\n\n@for_petsc function PetscBTView(petsclib::$UnionPetscLib, m::PetscCount, bt::PetscBT, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscBTView, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, PetscBT, PetscViewer),\n               m, bt, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegisterFinalize(petsclib::PetscLibType,f::external) \nRegisters a function that is to be called in `PetscFinalize()`\n\nNot Collective\n\nInput Parameter:\n- `f` - function to be called\n\nLevel: developer\n\n-seealso: `PetscRegisterFinalizeAll()`, `PetscObjectRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRegisterFinalize\"))\n\"\"\"\nfunction PetscRegisterFinalize(petsclib::PetscLibType, f::external) end\n\n@for_petsc function PetscRegisterFinalize(petsclib::$UnionPetscLib, f::external )\n\n    @chk ccall(\n               (:PetscRegisterFinalize, $petsc_library),\n               PetscErrorCode,\n               (external,),\n               f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRegisterFinalizeAll(petsclib::PetscLibType) \nRuns all the finalize functions set with `PetscRegisterFinalize()`\n\nNot Collective unless registered functions are collective\n\nLevel: developer\n\n-seealso: `PetscRegisterFinalize()`, `PetscObjectRegisterDestroyAll()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRegisterFinalizeAll\"))\n\"\"\"\nfunction PetscRegisterFinalizeAll(petsclib::PetscLibType) end\n\n@for_petsc function PetscRegisterFinalizeAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscRegisterFinalizeAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thas::PetscBool = PetscHasExternalPackage(petsclib::PetscLibType,pkg::Vector{Cchar}) \nDetermine whether PETSc has been configured with the given package\n\nNot Collective\n\nInput Parameter:\n- `pkg` - external package name\n\nOutput Parameter:\n- `has` - `PETSC_TRUE` if PETSc is configured with the given package, else `PETSC_FALSE`.\n\nLevel: intermediate\n\n-seealso: `PetscViewerType`, `MatPartitioningType`, `MatSolverType`\n\n# External Links\n$(_doc_external(\"Sys/PetscHasExternalPackage\"))\n\"\"\"\nfunction PetscHasExternalPackage(petsclib::PetscLibType, pkg::Vector{Cchar}) end\n\n@for_petsc function PetscHasExternalPackage(petsclib::$UnionPetscLib, pkg::Vector{Cchar} )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscHasExternalPackage, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscBool}),\n               pkg, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\tPetscInitializeNoPointers(petsclib::PetscLibType,argc::Cint, args::Cchar, filename::Vector{Cchar}, help::Vector{Cchar}) \nCalls PetscInitialize() from C/C++ without the pointers to argc and args\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `argc`     - number of args\n- `args`     - array of command line arguments\n- `filename` - optional name of the program file, pass `NULL` to ignore\n- `help`     - optional help, pass `NULL` to ignore\n\nLevel: advanced\n\n-seealso: `PetscInitialize()`, `PetscInitializeFortran()`, `PetscInitializeNoArguments()`\n*/\nPetscErrorCode PetscInitializeNoPointers(int argc, char **args, const char *filename, const char *help)\n{\nint    myargc = argc;\nchar **myargs = args;\n\nPetscFunctionBegin;\nPetscCall(PetscInitialize(&myargc, &myargs, filename, help));\nPetscCall(PetscPopSignalHandler());\nPetscBeganMPI = PETSC_FALSE;\nPetscFunctionReturn(PETSC_SUCCESS);\n}\n\n/*@C\nPetscInitializeNoArguments - Calls `PetscInitialize()` from C/C++ without\nthe command line arguments.\n\nCollective\n\nLevel: advanced\n\n-seealso: `PetscInitialize()`, `PetscInitializeFortran()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInitializeNoPointers\"))\n\"\"\"\nfunction PetscInitializeNoPointers(petsclib::PetscLibType, argc::Cint, args::Cchar, filename::Vector{Cchar}, help::Vector{Cchar}) end\n\n@for_petsc function PetscInitializeNoPointers(petsclib::$UnionPetscLib, argc::Cint, args::Cchar, filename::Vector{Cchar}, help::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscInitializeNoPointers, $petsc_library),\n               PetscErrorCode,\n               (Cint, Cchar, Ptr{Cchar}, Ptr{Cchar}),\n               argc, args, filename, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInitializeNoArguments(petsclib::PetscLibType) \nCalls `PetscInitialize()` from C/C++ without\nthe command line arguments.\n\nCollective\n\nLevel: advanced\n\n-seealso: `PetscInitialize()`, `PetscInitializeFortran()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInitializeNoArguments\"))\n\"\"\"\nfunction PetscInitializeNoArguments(petsclib::PetscLibType) end\n\n@for_petsc function PetscInitializeNoArguments(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscInitializeNoArguments, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisInitialized::PetscBool = PetscInitialized(petsclib::PetscLibType) \nDetermine whether PETSc is initialized.\n\nOutput Parameter:\n- `isInitialized` - `PETSC_TRUE` if PETSc is initialized, `PETSC_FALSE` otherwise\n\nLevel: beginner\n\n-seealso: `PetscInitialize()`, `PetscInitializeNoArguments()`, `PetscInitializeFortran()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInitialized\"))\n\"\"\"\nfunction PetscInitialized(petsclib::PetscLibType) end\n\n@for_petsc function PetscInitialized(petsclib::$UnionPetscLib)\n\tisInitialized_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscInitialized, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               isInitialized_,\n              )\n\n\tisInitialized = isInitialized_[]\n\n\treturn isInitialized\nend \n\n\"\"\"\n\tisFinalized::PetscBool = PetscFinalized(petsclib::PetscLibType) \nDetermine whether `PetscFinalize()` has been called yet\n\nOutput Parameter:\n- `isFinalized` - `PETSC_TRUE` if PETSc is finalized, `PETSC_FALSE` otherwise\n\nLevel: developer\n\n-seealso: `PetscInitialize()`, `PetscInitializeNoArguments()`, `PetscInitializeFortran()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFinalized\"))\n\"\"\"\nfunction PetscFinalized(petsclib::PetscLibType) end\n\n@for_petsc function PetscFinalized(petsclib::$UnionPetscLib)\n\tisFinalized_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscFinalized, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               isFinalized_,\n              )\n\n\tisFinalized = isFinalized_[]\n\n\treturn isFinalized\nend \n\n\"\"\"\n\tmax::PetscInt,sum::PetscInt = PetscMaxSum(petsclib::PetscLibType,comm::MPI_Comm, array::Vector{PetscInt}) \nReturns the max of the first entry over all MPI processes and the sum of the second entry.\n\nCollective\n\nInput Parameters:\n- `comm`  - the communicator\n- `array` - an arry of length 2 times `size`, the number of MPI processes\n\nOutput Parameters:\n- `max` - the maximum of `array[2*rank]` over all MPI processes\n- `sum` - the sum of the `array[2*rank + 1]` over all MPI processes\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMaxSum\"))\n\"\"\"\nfunction PetscMaxSum(petsclib::PetscLibType, comm::MPI_Comm, array::Vector{PetscInt}) end\n\n@for_petsc function PetscMaxSum(petsclib::$UnionPetscLib, comm::MPI_Comm, array::Vector{$PetscInt} )\n\tmax_ = Ref{$PetscInt}()\n\tsum_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscMaxSum, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               comm, array, max_, sum_,\n              )\n\n\tmax = max_[]\n\tsum = sum_[]\n\n\treturn max,sum\nend \n\n\"\"\"\n\tPetscSetProgramName(petsclib::PetscLibType,name::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscSetProgramName\"))\n\"\"\"\nfunction PetscSetProgramName(petsclib::PetscLibType, name::Vector{Cchar}) end\n\n@for_petsc function PetscSetProgramName(petsclib::$UnionPetscLib, name::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscSetProgramName, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetProgramName(petsclib::PetscLibType,name::Vector{Cchar}, len::Csize_t) \nGets the name of the running program.\n\nNot Collective\n\nInput Parameter:\n- `len` - length of the string name\n\nOutput Parameter:\n- `name` - the name of the running program, provide a string of length `PETSC_MAX_PATH_LEN`\n\nLevel: advanced\n\n-seealso: `PetscFinalize()`, `PetscInitializeFortran()`, `PetscGetArguments()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetProgramName\"))\n\"\"\"\nfunction PetscGetProgramName(petsclib::PetscLibType, name::Vector{Cchar}, len::Csize_t) end\n\n@for_petsc function PetscGetProgramName(petsclib::$UnionPetscLib, name::Vector{Cchar}, len::Csize_t )\n\n    @chk ccall(\n               (:PetscGetProgramName, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               name, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetArgs(petsclib::PetscLibType,argc::Cint, args::Cchar) \nAllows you to access the raw command line arguments anywhere\nafter `PetscInitialize()` is called but before `PetscFinalize()`.\n\nNot Collective, No Fortran Support\n\nOutput Parameters:\n- `argc` - count of the number of command line arguments\n- `args` - the command line arguments\n\nLevel: intermediate\n\n-seealso: `PetscFinalize()`, `PetscInitializeFortran()`, `PetscGetArguments()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetArgs\"))\n\"\"\"\nfunction PetscGetArgs(petsclib::PetscLibType, argc::Cint, args::Cchar) end\n\n@for_petsc function PetscGetArgs(petsclib::$UnionPetscLib, argc::Cint, args::Cchar )\n\n    @chk ccall(\n               (:PetscGetArgs, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cint}, Cchar),\n               argc, args,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetArguments(petsclib::PetscLibType,args::Cchar) \nAllows you to access the command line arguments anywhere\nafter `PetscInitialize()` is called but before `PetscFinalize()`.\n\nNot Collective, No Fortran Support\n\nOutput Parameter:\n- `args` - the command line arguments\n\nLevel: intermediate\n\n-seealso: `PetscFinalize()`, `PetscInitializeFortran()`, `PetscGetArgs()`, `PetscFreeArguments()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetArguments\"))\n\"\"\"\nfunction PetscGetArguments(petsclib::PetscLibType, args::Cchar) end\n\n@for_petsc function PetscGetArguments(petsclib::$UnionPetscLib, args::Cchar )\n\n    @chk ccall(\n               (:PetscGetArguments, $petsc_library),\n               PetscErrorCode,\n               (Cchar,),\n               args,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFreeArguments(petsclib::PetscLibType,args::Cchar) \nFrees the memory obtained with `PetscGetArguments()`\n\nNot Collective, No Fortran Support\n\nOutput Parameter:\n- `args` - the command line arguments\n\nLevel: intermediate\n\n-seealso: `PetscFinalize()`, `PetscInitializeFortran()`, `PetscGetArgs()`, `PetscGetArguments()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFreeArguments\"))\n\"\"\"\nfunction PetscFreeArguments(petsclib::PetscLibType, args::Cchar) end\n\n@for_petsc function PetscFreeArguments(petsclib::$UnionPetscLib, args::Cchar )\n\n    @chk ccall(\n               (:PetscFreeArguments, $petsc_library),\n               PetscErrorCode,\n               (Cchar,),\n               args,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInitialize(petsclib::PetscLibType,argc::Cint, args::Cchar, file::Vector{Cchar}, help::Vector{Cchar}) \nInitializes the PETSc database and MPI.\n`PetscInitialize()` calls MPI_Init() if that has yet to be called, so this routine should always be called near the beginning of your program -- usually the very first line!\n\nCollective on `MPI_COMM_WORLD` or `PETSC_COMM_WORLD` if it has been set\n\nInput Parameters:\n- `argc` - count of number of command line arguments\n- `args` - the command line arguments\n- `file` - [optional] PETSc database file, append \":yaml\" to filename to specify YAML options format. Use `NULL` or empty string to not check for code specific file. Also checks `~/.petscrc`, `.petscrc` and `petscrc`. Use `-skip_petscrc` in the code specific file (or command line) to skip `~/.petscrc`, `.petscrc` and `petscrc` files.\n- `help` - [optional] Help message to print, use `NULL` for no message\n\nIf you wish PETSc code to run ONLY on a subcommunicator of `MPI_COMM_WORLD`, create that\ncommunicator first and assign it to `PETSC_COMM_WORLD` BEFORE calling `PetscInitialize()`.\nthen do this. If ALL processes in the job are using `PetscInitialize()` and `PetscFinalize()` then you don't need to do this, even\nif different subcommunicators of the job are doing different things with PETSc.\n\nOptions Database Keys:\n- `-help [intro]`                                       - prints help method for each option; if `intro` is given the program stops after printing the introductory help message\n- `-start_in_debugger [noxterm,dbx,xdb,gdb,...]`        - Starts program in debugger\n- `-on_error_attach_debugger [noxterm,dbx,xdb,gdb,...]` - Starts debugger when error detected\n- `-on_error_emacs <machinename>`                       - causes `emacsclient` to jump to error file if an error is detected\n- `-on_error_abort`                                     - calls `abort()` when error detected (no traceback)\n- `-on_error_mpiabort`                                  - calls `MPI_abort()` when error detected\n- `-error_output_stdout`                                - prints PETSc error messages to `stdout` instead of the default `stderr`\n- `-error_output_none`                                  - does not print the error messages (but handles errors in the same way as if this was not called)\n- `-debugger_ranks [rank1,rank2,...]`                   - Indicates MPI ranks to start in debugger\n- `-debugger_pause [sleeptime] (in seconds)`            - Pauses debugger, use if it takes a long time for the debugger to start up on your system\n- `-stop_for_debugger`                                  - Print message on how to attach debugger manually to process and wait (`-debugger_pause`) seconds for attachment\n- `-malloc_dump`                                        - prints a list of all unfreed memory at the end of the run\n- `-malloc_test`                                        - like `-malloc_dump` `-malloc_debug`, only active for debugging build, ignored in optimized build. Often set in `PETSC_OPTIONS` environmental variable\n- `-malloc_view`                                        - show a list of all allocated memory during `PetscFinalize()`\n- `-malloc_view_threshold <t>`                          - only list memory allocations of size greater than t with `-malloc_view`\n- `-malloc_requested_size`                              - malloc logging will record the requested size rather than (possibly large) size after alignment\n- `-fp_trap`                                            - Stops on floating point exceptions\n- `-no_signal_handler`                                  - Indicates not to trap error signals\n- `-shared_tmp`                                         - indicates `/tmp` directory is known to be shared by all processors\n- `-not_shared_tmp`                                     - indicates each processor has own `/tmp`\n- `-tmp`                                                - alternative directory to use instead of `/tmp`\n- `-python <exe>`                                       - Initializes Python, and optionally takes a Python executable name\n- `-mpiuni-allow-multiprocess-launch`                   - allow `mpiexec` to launch multiple independent MPI-Uni jobs, otherwise a sanity check error is invoked to prevent misuse of MPI-Uni\n\nOptions Database Keys for Option Database:\n- `-skip_petscrc`           - skip the default option files `~/.petscrc`, `.petscrc`, `petscrc`\n- `-options_monitor`        - monitor all set options to standard output for the whole program run\n- `-options_monitor_cancel` - cancel options monitoring hard-wired using `PetscOptionsMonitorSet()`\n\nOptions -options_monitor_{all,cancel} are\nposition-independent and apply to all options set since the PETSc start.\nThey can be used also in option files.\n\nSee `PetscOptionsMonitorSet()` to do monitoring programmatically.\n\nOptions Database Keys for Profiling:\nSee Users-Manual: ch_profiling for details.\n- `-info [filename][:[~]<list,of,classnames>[:[~]self]]` - Prints verbose information. See `PetscInfo()`.\n- `-log_sync`                                            - Enable barrier synchronization for all events. This option is useful to debug imbalance within each event, however it slows things down and gives a distorted view of the overall runtime.\n- `-log_trace [filename]`                                - Print traces of all PETSc calls to the screen (useful to determine where a program hangs without running in the debugger).  See `PetscLogTraceBegin()`.\n- `-log_view [:filename:format][,[:filename:format]...]` - Prints summary of flop and timing information to screen or file, see `PetscLogView()` (up to 4 viewers)\n- `-log_view_memory`                                     - Includes in the summary from -log_view the memory used in each event, see `PetscLogView()`.\n- `-log_view_gpu_time`                                   - Includes in the summary from -log_view the time used in each GPU kernel, see `PetscLogView().\n- `-log_exclude: <vec,mat,pc,ksp,snes>`                  - excludes subset of object classes from logging\n- `-log [filename]`                                      - Logs profiling information in a dump file, see `PetscLogDump()`.\n- `-log_all [filename]`                                  - Same as `-log`.\n- `-log_mpe [filename]`                                  - Creates a logfile viewable by the utility Jumpshot (in MPICH distribution)\n- `-log_perfstubs`                                       - Starts a log handler with the perfstubs interface (which is used by TAU)\n- `-log_nvtx`                                            - Starts an nvtx log handler for use with Nsight\n- `-log_roctx`                                           - Starts an roctx log handler for use with rocprof on AMD GPUs\n- `-viewfromoptions on,off`                              - Enable or disable `XXXSetFromOptions()` calls, for applications with many small solves turn this off\n- `-get_total_flops`                                     - Returns total flops done by all processors\n- `-memory_view`                                         - Print memory usage at end of run\n- `-check_pointer_intensity 0,1,2`                       - if pointers are checked for validity (debug version only), using 0 will result in faster code\n\nOptions Database Keys for SAWs:\n- `-saws_port <portnumber>`        - port number to publish SAWs data, default is 8080\n- `-saws_port_auto_select`         - have SAWs select a new unique port number where it publishes the data, the URL is printed to the screen this is useful when you are running many jobs that utilize SAWs at the same time\n- `-saws_log <filename>`           - save a log of all SAWs communication\n- `-saws_https <certificate file>` - have SAWs use HTTPS instead of HTTP\n- `-saws_root <directory>`         - allow SAWs to have access to the given directory to search for requested resources and files\n\nEnvironmental Variables:\n- `PETSC_TMP`                     - alternative directory to use instead of `/tmp`\n- `PETSC_SHARED_TMP`              - `/tmp` is shared by all processes\n- `PETSC_NOT_SHARED_TMP`          - each process has its own private `/tmp`\n- `PETSC_OPTIONS`                 - a string containing additional options for PETSc in the form of command line \"-key value\" pairs\n- `PETSC_OPTIONS_YAML`            - (requires configuring PETSc to use libyaml with `--download-yaml`) a string containing additional options for PETSc in the form of a YAML document\n- `PETSC_VIEWER_SOCKET_PORT`      - socket number to use for socket viewer\n- `PETSC_VIEWER_SOCKET_MACHINE`   - machine to use for socket viewer to connect to\n\nLevel: beginner\n\n-seealso: `PetscFinalize()`, `PetscInitializeFortran()`, `PetscGetArgs()`, `PetscInitializeNoArguments()`, `PetscLogGpuTime()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInitialize\"))\n\"\"\"\nfunction PetscInitialize(petsclib::PetscLibType, argc::Ptr{Cint}, args::Ptr{Ptr{Cchar}}, file::Ptr{Cchar}, help::Ptr{Cchar}) end\n\n@for_petsc function PetscInitialize(petsclib::$UnionPetscLib, argc::Ptr{Cint}, args::Ptr{Ptr{Cchar}}, file::Ptr{Cchar}, help::Ptr{Cchar} )\n\n    @chk ccall(\n               (:PetscInitialize, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cint}, Ptr{Ptr{Cchar}}, Ptr{Cchar}, Ptr{Cchar}),\n               argc, args, file, help,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFinalize(petsclib::PetscLibType) \nChecks for options to be called at the conclusion of a PETSc program and frees any remaining PETSc objects and data structures.\nof the program. Automatically calls `MPI_Finalize()` if the user had not called `MPI_Init()` before calling `PetscInitialize()`.\n\nCollective on `PETSC_COMM_WORLD`\n\nOptions Database Keys:\n- `-options_view`                    - Calls `PetscOptionsView()`\n- `-options_left`                    - Prints unused options that remain in the database\n- `-objects_dump [all]`              - Prints list of objects allocated by the user that have not been freed, the option all cause all outstanding objects to be listed\n- `-mpidump`                         - Calls PetscMPIDump()\n- `-malloc_dump <optional filename>` - Calls `PetscMallocDump()`, displays all memory allocated that has not been freed\n- `-memory_view`                     - Prints total memory usage\n- `-malloc_view <optional filename>` - Prints list of all memory allocated and in what functions\n\nLevel: beginner\n\n-seealso: `PetscInitialize()`, `PetscOptionsView()`, `PetscMallocDump()`, `PetscMPIDump()`, `PetscEnd()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFinalize\"))\n\"\"\"\nfunction PetscFinalize(petsclib::PetscLibType) end\n\n@for_petsc function PetscFinalize(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscFinalize, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscEnd(petsclib::PetscLibType) \nCalls `PetscFinalize()` and then ends the program. This is useful if one\nwishes a clean exit somewhere deep in the program.\n\nCollective on `PETSC_COMM_WORLD`\n\nLevel: advanced\n\n-seealso: `PetscInitialize()`, `PetscOptionsView()`, `PetscMallocDump()`, `PetscMPIDump()`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscEnd\"))\n\"\"\"\nfunction PetscEnd(petsclib::PetscLibType) end\n\n@for_petsc function PetscEnd(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscEnd, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSetHelpVersionFunctions(petsclib::PetscLibType,help::external, version::external) \nSets functions that print help and version information\nbefore the PETSc help and version information is printed.\n\nNo Fortran Support\n\nInput Parameters:\n- `help`    - the help function (may be `NULL`)\n- `version` - the version function (may be `NULL`)\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSetHelpVersionFunctions\"))\n\"\"\"\nfunction PetscSetHelpVersionFunctions(petsclib::PetscLibType, help::external, version::external) end\n\n@for_petsc function PetscSetHelpVersionFunctions(petsclib::$UnionPetscLib, help::external, version::external )\n\n    @chk ccall(\n               (:PetscSetHelpVersionFunctions, $petsc_library),\n               PetscErrorCode,\n               (external, external),\n               help, version,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInitializeFortran(petsclib::PetscLibType) \nRoutine that should be called soon AFTER\nthe call to `PetscInitialize()` if one is using a C main program\nthat calls Fortran routines that in turn call PETSc routines.\n\nCollective on `PETSC_COMM_WORLD`\n\nLevel: beginner\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInitializeFortran\"))\n\"\"\"\nfunction PetscInitializeFortran(petsclib::PetscLibType) end\n\n@for_petsc function PetscInitializeFortran(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscInitializeFortran, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscCommGetNewTag(petsclib::PetscLibType,comm::MPI_Comm, tag::PetscMPIInt) \nGets a unique new tag from a PETSc communicator\n\nCollective\n\nInput Parameter:\n- `comm` - the MPI communicator\n\nOutput Parameter:\n- `tag` - the new tag\n\nLevel: developer\n\n-seealso: `PetscObjectGetNewTag()`, `PetscCommDuplicate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscCommGetNewTag\"))\n\"\"\"\nfunction PetscCommGetNewTag(petsclib::PetscLibType, comm::MPI_Comm, tag::PetscMPIInt) end\n\n@for_petsc function PetscCommGetNewTag(petsclib::$UnionPetscLib, comm::MPI_Comm, tag::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscCommGetNewTag, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscMPIInt}),\n               comm, tag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscCommGetComm(petsclib::PetscLibType,comm_in::MPI_Comm, comm_out::MPI_Comm) \nget a new MPI communicator from a PETSc communicator that can be passed off to another package\n\nCollective\n\nInput Parameter:\n- `comm_in` - Input communicator\n\nOutput Parameter:\n- `comm_out` - Output communicator\n\nLevel: developer\n\n-seealso: `PetscObjectGetNewTag()`, `PetscCommGetNewTag()`, `PetscCommDestroy()`, `PetscCommRestoreComm()`\n\n# External Links\n$(_doc_external(\"Sys/PetscCommGetComm\"))\n\"\"\"\nfunction PetscCommGetComm(petsclib::PetscLibType, comm_in::MPI_Comm, comm_out::MPI_Comm) end\n\n@for_petsc function PetscCommGetComm(petsclib::$UnionPetscLib, comm_in::MPI_Comm, comm_out::MPI_Comm )\n\n    @chk ccall(\n               (:PetscCommGetComm, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{MPI_Comm}),\n               comm_in, comm_out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscCommRestoreComm(petsclib::PetscLibType,comm_in::MPI_Comm, comm_out::MPI_Comm) \nrestores an MPI communicator that was obtained with `PetscCommGetComm()`\n\nCollective\n\nInput Parameters:\n- `comm_in`  - Input communicator\n- `comm_out` - returned communicator\n\nLevel: developer\n\n-seealso: `PetscObjectGetNewTag()`, `PetscCommGetNewTag()`, `PetscCommDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscCommRestoreComm\"))\n\"\"\"\nfunction PetscCommRestoreComm(petsclib::PetscLibType, comm_in::MPI_Comm, comm_out::MPI_Comm) end\n\n@for_petsc function PetscCommRestoreComm(petsclib::$UnionPetscLib, comm_in::MPI_Comm, comm_out::MPI_Comm )\n\n    @chk ccall(\n               (:PetscCommRestoreComm, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{MPI_Comm}),\n               comm_in, comm_out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcomm_out::MPI_Comm,first_tag::PetscMPIInt = PetscCommDuplicate(petsclib::PetscLibType,comm_in::MPI_Comm) \nDuplicates the communicator only if it is not already a PETSc communicator.\n\nCollective\n\nInput Parameter:\n- `comm_in` - Input communicator\n\nOutput Parameters:\n- `comm_out`  - Output communicator.  May be `comm_in`.\n- `first_tag` - Tag available that has not already been used with this communicator (you may pass in `NULL` if you do not need a tag)\n\nLevel: developer\n\n-seealso: `PetscObjectGetNewTag()`, `PetscCommGetNewTag()`, `PetscCommDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscCommDuplicate\"))\n\"\"\"\nfunction PetscCommDuplicate(petsclib::PetscLibType, comm_in::MPI_Comm) end\n\n@for_petsc function PetscCommDuplicate(petsclib::$UnionPetscLib, comm_in::MPI_Comm )\n\tcomm_out_ = Ref{MPI_Comm}()\n\tfirst_tag_ = Ref{PetscMPIInt}()\n\n    @chk ccall(\n               (:PetscCommDuplicate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{MPI_Comm}, Ptr{PetscMPIInt}),\n               comm_in, comm_out_, first_tag_,\n              )\n\n\tcomm_out = comm_out_[]\n\tfirst_tag = first_tag_[]\n\n\treturn comm_out,first_tag\nend \n\n\"\"\"\n\tPetscCommDestroy(petsclib::PetscLibType,comm::MPI_Comm) \nFrees communicator obtained with `PetscCommDuplicate()`.\n\nCollective\n\nInput Parameter:\n- `comm` - the communicator to free\n\nLevel: developer\n\n-seealso: `PetscCommDuplicate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscCommDestroy\"))\n\"\"\"\nfunction PetscCommDestroy(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscCommDestroy(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscCommDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{MPI_Comm},),\n               comm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetVersion(petsclib::PetscLibType,version::Vector{Cchar}, len::Csize_t) \nGets the PETSc version information in a string.\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `len` - length of the string\n\nOutput Parameter:\n- `version` - version string\n\nLevel: developer\n\n-seealso: `PetscGetProgramName()`, `PetscGetVersionNumber()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetVersion\"))\n\"\"\"\nfunction PetscGetVersion(petsclib::PetscLibType, version::Vector{Cchar}, len::Csize_t) end\n\n@for_petsc function PetscGetVersion(petsclib::$UnionPetscLib, version::Vector{Cchar}, len::Csize_t )\n\n    @chk ccall(\n               (:PetscGetVersion, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               version, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmajor::PetscInt,minor::PetscInt,subminor::PetscInt,release::PetscInt = PetscGetVersionNumber(petsclib::PetscLibType) \nGets the PETSc version information from the library\n\nNot Collective\n\nOutput Parameters:\n- `major`    - the major version (optional, pass `NULL` if not requested)\n- `minor`    - the minor version (optional, pass `NULL` if not requested)\n- `subminor` - the subminor version (patch number)  (optional, pass `NULL` if not requested)\n- `release`  - indicates the library is from a release, not random git repository  (optional, pass `NULL` if not requested)\n\nLevel: developer\n\n-seealso: `PetscGetProgramName()`, `PetscGetVersion()`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetVersionNumber\"))\n\"\"\"\nfunction PetscGetVersionNumber(petsclib::PetscLibType) end\n\n@for_petsc function PetscGetVersionNumber(petsclib::$UnionPetscLib)\n\tmajor_ = Ref{$PetscInt}()\n\tminor_ = Ref{$PetscInt}()\n\tsubminor_ = Ref{$PetscInt}()\n\trelease_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscGetVersionNumber, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               major_, minor_, subminor_, release_,\n              )\n\n\tmajor = major_[]\n\tminor = minor_[]\n\tsubminor = subminor_[]\n\trelease = release_[]\n\n\treturn major,minor,subminor,release\nend \n\n\"\"\"\n\tPetscBLASSetNumThreads(petsclib::PetscLibType,nt::PetscInt) \nset the number of threads for calls to BLAS to use\n\nInput Parameter:\n- `nt` - the number of threads\n\nOptions Database Key:\n- `-blas_num_threads <nt>` - set the number of threads when PETSc is initialized\n\nLevel: intermediate\n\n-seealso: `PetscInitialize()`, `PetscBLASGetNumThreads()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBLASSetNumThreads\"))\n\"\"\"\nfunction PetscBLASSetNumThreads(petsclib::PetscLibType, nt::PetscInt) end\n\n@for_petsc function PetscBLASSetNumThreads(petsclib::$UnionPetscLib, nt::$PetscInt )\n\n    @chk ccall(\n               (:PetscBLASSetNumThreads, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt,),\n               nt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnt::PetscInt = PetscBLASGetNumThreads(petsclib::PetscLibType) \nget the number of threads for calls to BLAS to use\n\nOutput Parameter:\n- `nt` - the number of threads\n\nLevel: intermediate\n\n-seealso: `PetscInitialize()`, `PetscBLASSetNumThreads()`\n\n# External Links\n$(_doc_external(\"Sys/PetscBLASGetNumThreads\"))\n\"\"\"\nfunction PetscBLASGetNumThreads(petsclib::PetscLibType) end\n\n@for_petsc function PetscBLASGetNumThreads(petsclib::$UnionPetscLib)\n\tnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscBLASGetNumThreads, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscInt},),\n               nt_,\n              )\n\n\tnt = nt_[]\n\n\treturn nt\nend \n\n\"\"\"\n\tsize::Csize_t = PetscDataTypeGetSize(petsclib::PetscLibType,ptype::PetscDataType) \nGets the size (in bytes) of a PETSc datatype\n\nNot Collective\n\nInput Parameter:\n- `ptype` - the PETSc datatype name (for example `PETSC_DOUBLE`)\n\nOutput Parameter:\n- `size` - the size in bytes (for example the size of `PETSC_DOUBLE` is 8)\n\nLevel: advanced\n\n-seealso: `PetscDataType`, `PetscDataTypeToMPIDataType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDataTypeGetSize\"))\n\"\"\"\nfunction PetscDataTypeGetSize(petsclib::PetscLibType, ptype::PetscDataType) end\n\n@for_petsc function PetscDataTypeGetSize(petsclib::$UnionPetscLib, ptype::PetscDataType )\n\tsize_ = Ref{Csize_t}()\n\n    @chk ccall(\n               (:PetscDataTypeGetSize, $petsc_library),\n               PetscErrorCode,\n               (PetscDataType, Ptr{Csize_t}),\n               ptype, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tptype::PetscDataType,found::PetscBool = PetscDataTypeFromString(petsclib::PetscLibType,name::Vector{Cchar}) \nGets the enum value of a PETSc datatype represented as a string\n\nNot Collective\n\nInput Parameter:\n- `name` - the PETSc datatype name (for example, \"double\" or \"real\")\n\nOutput Parameters:\n- `ptype` - the enum value, only valid if found is `PETSC_TRUE`\n- `found` - the string matches one of the data types\n\nLevel: advanced\n\n-seealso: `PetscDataType`, `PetscDataTypeToMPIDataType()`, `PetscDataTypeGetSize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDataTypeFromString\"))\n\"\"\"\nfunction PetscDataTypeFromString(petsclib::PetscLibType, name::Vector{Cchar}) end\n\n@for_petsc function PetscDataTypeFromString(petsclib::$UnionPetscLib, name::Vector{Cchar} )\n\tptype_ = Ref{PetscDataType}()\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDataTypeFromString, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscDataType}, Ptr{PetscBool}),\n               name, ptype_, found_,\n              )\n\n\tptype = unsafe_string(ptype_[])\n\tfound = found_[]\n\n\treturn ptype,found\nend \n\n\"\"\"\n\tPetscKokkosInitializeCheck(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscKokkosInitializeCheck\"))\n\"\"\"\nfunction PetscKokkosInitializeCheck(petsclib::PetscLibType) end\n\n@for_petsc function PetscKokkosInitializeCheck(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscKokkosInitializeCheck, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscElementalInitializePackage(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscElementalInitializePackage\"))\n\"\"\"\nfunction PetscElementalInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscElementalInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscElementalInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisInitialized::PetscBool = PetscElementalInitialized(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscElementalInitialized\"))\n\"\"\"\nfunction PetscElementalInitialized(petsclib::PetscLibType) end\n\n@for_petsc function PetscElementalInitialized(petsclib::$UnionPetscLib)\n\tisInitialized_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscElementalInitialized, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               isInitialized_,\n              )\n\n\tisInitialized = isInitialized_[]\n\n\treturn isInitialized\nend \n\n\"\"\"\n\tPetscElementalFinalizePackage(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscElementalFinalizePackage\"))\n\"\"\"\nfunction PetscElementalFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function PetscElementalFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscElementalFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::PetscMemType = PetscGetMemType(petsclib::PetscLibType,ptr::Cvoid) \nQuery the `PetscMemType` of a pointer\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `ptr` - The pointer to query (may be `NULL`)\n\nOutput Parameter:\n- `type` - The `PetscMemType` of the pointer\n\n-seealso: `PetscMemType`, `PetscDeviceMalloc()`, `PetscDeviceCalloc()`, `PetscDeviceFree()`,\n`PetscDeviceArrayCopy()`, `PetscDeviceArrayZero()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetMemType\"))\n\"\"\"\nfunction PetscGetMemType(petsclib::PetscLibType, ptr::Cvoid) end\n\n@for_petsc function PetscGetMemType(petsclib::$UnionPetscLib, ptr::Cvoid )\n\ttype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:PetscGetMemType, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, Ptr{PetscMemType}),\n               ptr, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tPetscTimSort(petsclib::PetscLibType,n::PetscInt, arr::Cvoid, size::Csize_t, cmp::external, ctx::Cvoid) \nSorts an array in place in increasing order using Tim Peters <https://bugs.python.org/file4451/timsort.txt> adaptive sorting algorithm.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `n`    - number of values\n- `arr`  - array to be sorted\n- `size` - size in bytes of the datatype held in arr\n- `cmp`  - function pointer to comparison function\n- `ctx`  - optional context to be passed to comparison function, NULL if not needed\n\nOutput Parameter:\n- `arr` - sorted array\n\nLevel: developer\n\n-seealso: `PetscTimSortWithArray()`, `PetscIntSortSemiOrdered()`, `PetscRealSortSemiOrdered()`, `PetscMPIIntSortSemiOrdered()`\n\n# External Links\n$(_doc_external(\"Sys/PetscTimSort\"))\n\"\"\"\nfunction PetscTimSort(petsclib::PetscLibType, n::PetscInt, arr::Cvoid, size::Csize_t, cmp::external, ctx::Cvoid) end\n\n@for_petsc function PetscTimSort(petsclib::$UnionPetscLib, n::$PetscInt, arr::Cvoid, size::Csize_t, cmp::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscTimSort, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Cvoid}, Csize_t, external, Ptr{Cvoid}),\n               n, arr, size, cmp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscTimSortWithArray(petsclib::PetscLibType,n::PetscInt, arr::Cvoid, asize::Csize_t, barr::Cvoid, bsize::Csize_t, cmp::external, ctx::Cvoid) \nSorts an array in place in increasing order using Tim Peters <https://bugs.python.org/file4451/timsort.txt> adaptive sorting algorithm and\nreorders a second array to match the first. The arrays need not be the same type.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `n`     - number of values\n- `asize` - size in bytes of the datatype held in arr\n- `bsize` - size in bytes of the datatype held in barr\n- `cmp`   - function pointer to comparison function\n- `ctx`   - optional context to be passed to comparison function, NULL if not needed\n\nInput/Output Parameters:\n- `arr`  - array to be sorted, on output it is sorted\n- `barr` - array to be reordered, on output it is reordered\n\nLevel: developer\n\n-seealso: `PetscTimSort()`, `PetscIntSortSemiOrderedWithArray()`, `PetscRealSortSemiOrderedWithArrayInt()`, `PetscMPIIntSortSemiOrderedWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscTimSortWithArray\"))\n\"\"\"\nfunction PetscTimSortWithArray(petsclib::PetscLibType, n::PetscInt, arr::Cvoid, asize::Csize_t, barr::Cvoid, bsize::Csize_t, cmp::external, ctx::Cvoid) end\n\n@for_petsc function PetscTimSortWithArray(petsclib::$UnionPetscLib, n::$PetscInt, arr::Cvoid, asize::Csize_t, barr::Cvoid, bsize::Csize_t, cmp::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscTimSortWithArray, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Cvoid}, Csize_t, Ptr{Cvoid}, Csize_t, external, Ptr{Cvoid}),\n               n, arr, asize, barr, bsize, cmp, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscIntSortSemiOrdered(petsclib::PetscLibType,n::PetscInt, arr::Vector{PetscInt}) \nSorts an array of `PetscInt` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n`   - number of values\n- `arr` - array of integers\n\nOutput Parameter:\n- `arr` - sorted array of integers\n\nLevel: intermediate\n\n-seealso: `PetscTimSort()`, `PetscSortInt()`, `PetscSortIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntSortSemiOrdered\"))\n\"\"\"\nfunction PetscIntSortSemiOrdered(petsclib::PetscLibType, n::PetscInt, arr::Vector{PetscInt}) end\n\n@for_petsc function PetscIntSortSemiOrdered(petsclib::$UnionPetscLib, n::$PetscInt, arr::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscIntSortSemiOrdered, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}),\n               n, arr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscIntSortSemiOrderedWithArray(petsclib::PetscLibType,n::PetscInt, arr1::Vector{PetscInt}, arr2::Vector{PetscInt}) \nSorts an array of `PetscInt` in place in increasing order and reorders a second\n`PetscInt` array to match the first.\n\nNot Collective\n\nInput Parameter:\n- `n` - number of values\n\nInput/Output Parameters:\n- `arr1` - array of integers to be sorted, modified on output\n- `arr2` - array of integers to be reordered, modified on output\n\nLevel: intermediate\n\n-seealso: `PetscTimSortWithArray()`, `PetscSortIntWithArray()`, `PetscSortIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntSortSemiOrderedWithArray\"))\n\"\"\"\nfunction PetscIntSortSemiOrderedWithArray(petsclib::PetscLibType, n::PetscInt, arr1::Vector{PetscInt}, arr2::Vector{PetscInt}) end\n\n@for_petsc function PetscIntSortSemiOrderedWithArray(petsclib::$UnionPetscLib, n::$PetscInt, arr1::Vector{$PetscInt}, arr2::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscIntSortSemiOrderedWithArray, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               n, arr1, arr2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMPIIntSortSemiOrdered(petsclib::PetscLibType,n::PetscInt, arr::Vector{PetscMPIInt}) \nSorts an array of `PetscMPIInt` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n`   - number of values\n- `arr` - array of `PetscMPIInt`\n\nOutput Parameter:\n- `arr` - sorted array of integers\n\nLevel: intermediate\n\n-seealso: `PetscTimSort()`, `PetscSortMPIInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMPIIntSortSemiOrdered\"))\n\"\"\"\nfunction PetscMPIIntSortSemiOrdered(petsclib::PetscLibType, n::PetscInt, arr::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscMPIIntSortSemiOrdered(petsclib::$UnionPetscLib, n::$PetscInt, arr::Vector{PetscMPIInt} )\n\n    @chk ccall(\n               (:PetscMPIIntSortSemiOrdered, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{PetscMPIInt}),\n               n, arr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMPIIntSortSemiOrderedWithArray(petsclib::PetscLibType,n::PetscInt, arr1::Vector{PetscMPIInt}, arr2::Vector{PetscMPIInt}) \nSorts an array of `PetscMPIInt` in place in increasing order and reorders a second `PetscMPIInt`\narray to match the first.\n\nNot Collective\n\nInput Parameter:\n- `n` - number of values\n\nInput/Output Parameters:\n- `arr1` - array of integers to be sorted, modified on output\n- `arr2` - array of integers to be reordered, modified on output\n\nLevel: intermediate\n\n-seealso: `PetscTimSortWithArray()`, `PetscSortMPIIntWithArray()`, `PetscSortMPIIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMPIIntSortSemiOrderedWithArray\"))\n\"\"\"\nfunction PetscMPIIntSortSemiOrderedWithArray(petsclib::PetscLibType, n::PetscInt, arr1::Vector{PetscMPIInt}, arr2::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscMPIIntSortSemiOrderedWithArray(petsclib::$UnionPetscLib, n::$PetscInt, arr1::Vector{PetscMPIInt}, arr2::Vector{PetscMPIInt} )\n\n    @chk ccall(\n               (:PetscMPIIntSortSemiOrderedWithArray, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{PetscMPIInt}, Ptr{PetscMPIInt}),\n               n, arr1, arr2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRealSortSemiOrdered(petsclib::PetscLibType,n::PetscInt, arr::Vector{PetscReal}) \nSorts an array of `PetscReal` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n`   - number of values\n- `arr` - array of `PetscReal`\n\nOutput Parameter:\n- `arr` - sorted array of integers\n\nLevel: intermediate\n\n-seealso: `PetscTimSort()`, `PetscSortReal()`, `PetscSortRealWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRealSortSemiOrdered\"))\n\"\"\"\nfunction PetscRealSortSemiOrdered(petsclib::PetscLibType, n::PetscInt, arr::Vector{PetscReal}) end\n\n@for_petsc function PetscRealSortSemiOrdered(petsclib::$UnionPetscLib, n::$PetscInt, arr::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscRealSortSemiOrdered, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}),\n               n, arr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRealSortSemiOrderedWithArrayInt(petsclib::PetscLibType,n::PetscInt, arr1::Vector{PetscReal}, arr2::Vector{PetscInt}) \nSorts an array of `PetscReal` in place in increasing order and reorders a second\narray of `PetscInt` to match the first.\n\nNot Collective\n\nInput Parameter:\n- `n` - number of values\n\nInput/Output Parameters:\n- `arr1` - array of `PetscReal` to be sorted, modified on output\n- `arr2` - array of `PetscInt` to be reordered, modified on output\n\nLevel: intermediate\n\n-seealso: `PetscTimSortWithArray()`, `PetscSortRealWithArrayInt()`, `PetscSortRealWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRealSortSemiOrderedWithArrayInt\"))\n\"\"\"\nfunction PetscRealSortSemiOrderedWithArrayInt(petsclib::PetscLibType, n::PetscInt, arr1::Vector{PetscReal}, arr2::Vector{PetscInt}) end\n\n@for_petsc function PetscRealSortSemiOrderedWithArrayInt(petsclib::$UnionPetscLib, n::$PetscInt, arr1::Vector{$PetscReal}, arr2::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscRealSortSemiOrderedWithArrayInt, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               n, arr1, arr2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tslope::PetscReal,intercept::PetscReal = PetscLinearRegression(petsclib::PetscLibType,n::PetscInt, x::Vector{PetscReal}, y::Vector{PetscReal}) \nGives the best least\n\nInput Parameters:\n- `n` - The number of points\n- `x` - The x-values\n- `y` - The y-values\n\nOutput Parameters:\n- `slope`     - The slope of the best-fit line\n- `intercept` - The y-intercept of the best-fit line\n\nLevel: intermediate\n\n-seealso: `PetscConvEstGetConvRate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLinearRegression\"))\n\"\"\"\nfunction PetscLinearRegression(petsclib::PetscLibType, n::PetscInt, x::Vector{PetscReal}, y::Vector{PetscReal}) end\n\n@for_petsc function PetscLinearRegression(petsclib::$UnionPetscLib, n::$PetscInt, x::Vector{$PetscReal}, y::Vector{$PetscReal} )\n\tslope_ = Ref{$PetscReal}()\n\tintercept_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscLinearRegression, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               n, x, y, slope_, intercept_,\n              )\n\n\tslope = slope_[]\n\tintercept = intercept_[]\n\n\treturn slope,intercept\nend \n\n\"\"\"\n\tsorted::PetscBool = PetscSortedInt(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}) \nDetermines whether the `PetscInt` array is sorted.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n\nOutput Parameter:\n- `sorted` - flag whether the array is sorted\n\nLevel: intermediate\n\n-seealso: `PetscSortInt()`, `PetscSortedMPIInt()`, `PetscSortedReal()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortedInt\"))\n\"\"\"\nfunction PetscSortedInt(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}) end\n\n@for_petsc function PetscSortedInt(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt} )\n\tsorted_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSortedInt, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{PetscBool}),\n               n, X, sorted_,\n              )\n\n\tsorted = sorted_[]\n\n\treturn sorted\nend \n\n\"\"\"\n\tsorted::PetscBool = PetscSortedInt64(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt64}) \nDetermines whether the `PetscInt64` array is sorted.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt64`\n\nOutput Parameter:\n- `sorted` - flag whether the array is sorted\n\nLevel: intermediate\n\n-seealso: `PetscSortInt64()`, `PetscSortInt()`, `PetscSortedMPIInt()`, `PetscSortedReal()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortedInt64\"))\n\"\"\"\nfunction PetscSortedInt64(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt64}) end\n\n@for_petsc function PetscSortedInt64(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt64} )\n\tsorted_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSortedInt64, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt64}, Ptr{PetscBool}),\n               n, X, sorted_,\n              )\n\n\tsorted = sorted_[]\n\n\treturn sorted\nend \n\n\"\"\"\n\tPetscSortInt(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}) \nSorts an array of `PetscInt` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n\n-seealso: `PetscIntSortSemiOrdered()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortInt\"))\n\"\"\"\nfunction PetscSortInt(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}) end\n\n@for_petsc function PetscSortInt(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortInt, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortInt64(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt64}) \nSorts an array of `PetscInt64` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt64`\n\n-seealso: `PetscSortInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortInt64\"))\n\"\"\"\nfunction PetscSortInt64(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt64}) end\n\n@for_petsc function PetscSortInt64(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt64} )\n\n    @chk ccall(\n               (:PetscSortInt64, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt64}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortCount(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscCount}) \nSorts an array of `PetscCount` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscCount`\n\n-seealso: `PetscSortInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortCount\"))\n\"\"\"\nfunction PetscSortCount(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscCount}) end\n\n@for_petsc function PetscSortCount(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{PetscCount} )\n\n    @chk ccall(\n               (:PetscSortCount, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{PetscCount}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortReverseInt(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}) \nSorts an array of `PetscInt` in place in decreasing order.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n\nLevel: intermediate\n\n-seealso: `PetscIntSortSemiOrdered()`, `PetscSortInt()`, `PetscSortIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortReverseInt\"))\n\"\"\"\nfunction PetscSortReverseInt(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}) end\n\n@for_petsc function PetscSortReverseInt(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortReverseInt, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortedRemoveDupsInt(petsclib::PetscLibType,n::PetscInt, X::Vector{PetscInt}) \nRemoves all duplicate entries of a sorted `PetscInt` array\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - sorted array of `PetscInt`\n\nOutput Parameter:\n- `n` - number of non-redundant values\n\nLevel: intermediate\n\n-seealso: `PetscSortInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortedRemoveDupsInt\"))\n\"\"\"\nfunction PetscSortedRemoveDupsInt(petsclib::PetscLibType, n::PetscInt, X::Vector{PetscInt}) end\n\n@for_petsc function PetscSortedRemoveDupsInt(petsclib::$UnionPetscLib, n::$PetscInt, X::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortedRemoveDupsInt, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscInt}, Ptr{$PetscInt}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscSortedCheckDupsInt(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}) \nChecks if a sorted `PetscInt` array has duplicates\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - sorted array of `PetscInt`\n\nOutput Parameter:\n- `flg` - True if the array has duplications, otherwise false\n\nLevel: intermediate\n\n-seealso: `PetscSortInt()`, `PetscCheckDupsInt()`, `PetscSortRemoveDupsInt()`, `PetscSortedRemoveDupsInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortedCheckDupsInt\"))\n\"\"\"\nfunction PetscSortedCheckDupsInt(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}) end\n\n@for_petsc function PetscSortedCheckDupsInt(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt} )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSortedCheckDupsInt, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{PetscBool}),\n               n, X, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = PetscSortedCheckDupsCount(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscCount}) \nChecks if a sorted `PetscCount` array has duplicates\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - sorted array of `PetscCount`\n\nOutput Parameter:\n- `flg` - True if the array has duplications, otherwise false\n\nLevel: intermediate\n\n-seealso: `PetscCount`, `PetscSortCount()`, `PetscSortedCheckDupsInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortedCheckDupsCount\"))\n\"\"\"\nfunction PetscSortedCheckDupsCount(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscCount}) end\n\n@for_petsc function PetscSortedCheckDupsCount(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{PetscCount} )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSortedCheckDupsCount, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{PetscCount}, Ptr{PetscBool}),\n               n, X, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscSortRemoveDupsInt(petsclib::PetscLibType,n::PetscInt, X::Vector{PetscInt}) \nSorts an array of `PetscInt` in place in increasing order removes all duplicate entries\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n\nOutput Parameter:\n- `n` - number of non-redundant values\n\nLevel: intermediate\n\n-seealso: `PetscIntSortSemiOrdered()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortedRemoveDupsInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortRemoveDupsInt\"))\n\"\"\"\nfunction PetscSortRemoveDupsInt(petsclib::PetscLibType, n::PetscInt, X::Vector{PetscInt}) end\n\n@for_petsc function PetscSortRemoveDupsInt(petsclib::$UnionPetscLib, n::$PetscInt, X::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortRemoveDupsInt, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscInt}, Ptr{$PetscInt}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tloc::PetscInt = PetscFindInt(petsclib::PetscLibType,key::PetscInt, n::PetscCount, X::Vector{PetscInt}) \nFinds the location of a `PetscInt` key in a sorted array of `PetscInt`\n\nNot Collective\n\nInput Parameters:\n- `key` - the `PetscInt` key to locate\n- `n`   - number of values in the array\n- `X`   - array of `PetscInt`\n\nOutput Parameter:\n- `loc` - the location if found, otherwise -(slot+1) where slot is the place the value would go\n\nLevel: intermediate\n\n-seealso: `PetscIntSortSemiOrdered()`, `PetscSortInt()`, `PetscSortIntWithArray()`, `PetscSortRemoveDupsInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFindInt\"))\n\"\"\"\nfunction PetscFindInt(petsclib::PetscLibType, key::PetscInt, n::PetscCount, X::Vector{PetscInt}) end\n\n@for_petsc function PetscFindInt(petsclib::$UnionPetscLib, key::$PetscInt, n::PetscCount, X::Vector{$PetscInt} )\n\tloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFindInt, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, PetscCount, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               key, n, X, loc_,\n              )\n\n\tloc = loc_[]\n\n\treturn loc\nend \n\n\"\"\"\n\tPetscFindCount(petsclib::PetscLibType,key::PetscCount, n::PetscCount, X::Vector{PetscCount}, loc::PetscCount) \nFinds the location of a `PetscCount` key in a sorted array of `PetscCount`\n\nNot Collective\n\nInput Parameters:\n- `key` - the `PetscCount` key to locate\n- `n`   - number of values in the array\n- `X`   - array of `PetscCount`\n\nOutput Parameter:\n- `loc` - the location if found, otherwise -(slot+1) where slot is the place the value would go\n\nLevel: intermediate\n\n-seealso: `PetscCount`, `PetscSortCount()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFindCount\"))\n\"\"\"\nfunction PetscFindCount(petsclib::PetscLibType, key::PetscCount, n::PetscCount, X::Vector{PetscCount}, loc::PetscCount) end\n\n@for_petsc function PetscFindCount(petsclib::$UnionPetscLib, key::PetscCount, n::PetscCount, X::Vector{PetscCount}, loc::PetscCount )\n\n    @chk ccall(\n               (:PetscFindCount, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, PetscCount, Ptr{PetscCount}, Ptr{PetscCount}),\n               key, n, X, loc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdups::PetscBool = PetscCheckDupsInt(petsclib::PetscLibType,n::PetscInt, X::Vector{PetscInt}) \nChecks if an `PetscInt` array has duplicates\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values in the array\n- `X` - array of `PetscInt`\n\nOutput Parameter:\n- `dups` - True if the array has dups, otherwise false\n\nLevel: intermediate\n\n-seealso: `PetscSortRemoveDupsInt()`, `PetscSortedCheckDupsInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscCheckDupsInt\"))\n\"\"\"\nfunction PetscCheckDupsInt(petsclib::PetscLibType, n::PetscInt, X::Vector{PetscInt}) end\n\n@for_petsc function PetscCheckDupsInt(petsclib::$UnionPetscLib, n::$PetscInt, X::Vector{$PetscInt} )\n\tdups_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscCheckDupsInt, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}),\n               n, X, dups_,\n              )\n\n\tdups = dups_[]\n\n\treturn dups\nend \n\n\"\"\"\n\tloc::PetscInt = PetscFindMPIInt(petsclib::PetscLibType,key::PetscMPIInt, n::PetscCount, X::Vector{PetscMPIInt}) \nFinds `PetscMPIInt` in a sorted array of `PetscMPIInt`\n\nNot Collective\n\nInput Parameters:\n- `key` - the integer to locate\n- `n`   - number of values in the array\n- `X`   - array of `PetscMPIInt`\n\nOutput Parameter:\n- `loc` - the location if found, otherwise -(slot+1) where slot is the place the value would go\n\nLevel: intermediate\n\n-seealso: `PetscMPIIntSortSemiOrdered()`, `PetscSortInt()`, `PetscSortIntWithArray()`, `PetscSortRemoveDupsInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFindMPIInt\"))\n\"\"\"\nfunction PetscFindMPIInt(petsclib::PetscLibType, key::PetscMPIInt, n::PetscCount, X::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscFindMPIInt(petsclib::$UnionPetscLib, key::PetscMPIInt, n::PetscCount, X::Vector{PetscMPIInt} )\n\tloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFindMPIInt, $petsc_library),\n               PetscErrorCode,\n               (PetscMPIInt, PetscCount, Ptr{PetscMPIInt}, Ptr{$PetscInt}),\n               key, n, X, loc_,\n              )\n\n\tloc = loc_[]\n\n\treturn loc\nend \n\n\"\"\"\n\tPetscSortIntWithArray(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscInt}) \nSorts an array of `PetscInt` in place in increasing order;\nchanges a second array of `PetscInt` to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n- `Y` - second array of `PetscInt`\n\nLevel: intermediate\n\n-seealso: `PetscIntSortSemiOrderedWithArray()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithCountArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithArray\"))\n\"\"\"\nfunction PetscSortIntWithArray(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscInt}) end\n\n@for_petsc function PetscSortIntWithArray(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt}, Y::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortIntWithArray, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               n, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortIntWithArrayPair(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscInt}, Z::Vector{PetscInt}) \nSorts an array of `PetscInt` in place in increasing order;\nchanges a pair of `PetscInt` arrays to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PestcInt`\n- `Y` - second array of `PestcInt` (first array of the pair)\n- `Z` - third array of `PestcInt` (second array of the pair)\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortIntWithArray()`, `PetscIntSortSemiOrdered()`, `PetscSortIntWithIntCountArrayPair()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithArrayPair\"))\n\"\"\"\nfunction PetscSortIntWithArrayPair(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscInt}, Z::Vector{PetscInt}) end\n\n@for_petsc function PetscSortIntWithArrayPair(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt}, Y::Vector{$PetscInt}, Z::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortIntWithArrayPair, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               n, X, Y, Z,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortIntWithMPIIntArray(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscMPIInt}) \nSorts an array of `PetscInt` in place in increasing order;\nchanges a second array of `PetscMPI` to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n- `Y` - second array of `PetscMPIInt`\n\nLevel: intermediate\n\n-seealso: `PetscIntSortSemiOrderedWithArray()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithMPIIntArray\"))\n\"\"\"\nfunction PetscSortIntWithMPIIntArray(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscSortIntWithMPIIntArray(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt}, Y::Vector{PetscMPIInt} )\n\n    @chk ccall(\n               (:PetscSortIntWithMPIIntArray, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{PetscMPIInt}),\n               n, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortIntWithCountArray(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscCount}) \nSorts an array of `PetscInt` in place in increasing order;\nchanges a second array of `PetscCount` to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n- `Y` - second array of `PetscCount`\n\nLevel: intermediate\n\n-seealso: `PetscIntSortSemiOrderedWithArray()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithCountArray\"))\n\"\"\"\nfunction PetscSortIntWithCountArray(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscCount}) end\n\n@for_petsc function PetscSortIntWithCountArray(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt}, Y::Vector{PetscCount} )\n\n    @chk ccall(\n               (:PetscSortIntWithCountArray, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{PetscCount}),\n               n, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortIntWithIntCountArrayPair(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscInt}, Z::Vector{PetscCount}) \nSorts an array of `PetscInt` in place in increasing order;\nchanges a `PetscInt`  array and a `PetscCount` array to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n- `Y` - second array of `PetscInt` (first array of the pair)\n- `Z` - third array of `PetscCount` (second array of the pair)\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortIntWithArray()`, `PetscIntSortSemiOrdered()`, `PetscSortIntWithArrayPair()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithIntCountArrayPair\"))\n\"\"\"\nfunction PetscSortIntWithIntCountArrayPair(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscInt}, Z::Vector{PetscCount}) end\n\n@for_petsc function PetscSortIntWithIntCountArrayPair(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt}, Y::Vector{$PetscInt}, Z::Vector{PetscCount} )\n\n    @chk ccall(\n               (:PetscSortIntWithIntCountArrayPair, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{PetscCount}),\n               n, X, Y, Z,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsorted::PetscBool = PetscSortedMPIInt(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscMPIInt}) \nDetermines whether the `PetscMPIInt` array is sorted.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscMPIInt`\n\nOutput Parameter:\n- `sorted` - flag whether the array is sorted\n\nLevel: intermediate\n\n-seealso: `PetscMPIIntSortSemiOrdered()`, `PetscSortMPIInt()`, `PetscSortedInt()`, `PetscSortedReal()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortedMPIInt\"))\n\"\"\"\nfunction PetscSortedMPIInt(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscSortedMPIInt(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{PetscMPIInt} )\n\tsorted_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSortedMPIInt, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{PetscMPIInt}, Ptr{PetscBool}),\n               n, X, sorted_,\n              )\n\n\tsorted = sorted_[]\n\n\treturn sorted\nend \n\n\"\"\"\n\tPetscSortMPIInt(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscMPIInt}) \nSorts an array of `PetscMPIInt` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscMPIInt`\n\nLevel: intermediate\n\n-seealso: `PetscMPIIntSortSemiOrdered()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortMPIInt\"))\n\"\"\"\nfunction PetscSortMPIInt(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscSortMPIInt(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{PetscMPIInt} )\n\n    @chk ccall(\n               (:PetscSortMPIInt, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{PetscMPIInt}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortRemoveDupsMPIInt(petsclib::PetscLibType,n::PetscInt, X::Vector{PetscMPIInt}) \nSorts an array of `PetscMPIInt` in place in increasing order removes all duplicate entries\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscMPIInt`\n\nOutput Parameter:\n- `n` - number of non-redundant values\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortRemoveDupsMPIInt\"))\n\"\"\"\nfunction PetscSortRemoveDupsMPIInt(petsclib::PetscLibType, n::PetscInt, X::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscSortRemoveDupsMPIInt(petsclib::$UnionPetscLib, n::$PetscInt, X::Vector{PetscMPIInt} )\n\n    @chk ccall(\n               (:PetscSortRemoveDupsMPIInt, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscInt}, Ptr{PetscMPIInt}),\n               n, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortMPIIntWithArray(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscMPIInt}, Y::Vector{PetscMPIInt}) \nSorts an array of `PetscMPIInt` in place in increasing order;\nchanges a second `PetscMPIInt` array to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscMPIInt`\n- `Y` - second array of `PetscMPIInt`\n\nLevel: intermediate\n\n-seealso: `PetscMPIIntSortSemiOrderedWithArray()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortMPIIntWithArray\"))\n\"\"\"\nfunction PetscSortMPIIntWithArray(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscMPIInt}, Y::Vector{PetscMPIInt}) end\n\n@for_petsc function PetscSortMPIIntWithArray(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{PetscMPIInt}, Y::Vector{PetscMPIInt} )\n\n    @chk ccall(\n               (:PetscSortMPIIntWithArray, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{PetscMPIInt}, Ptr{PetscMPIInt}),\n               n, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortMPIIntWithIntArray(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscMPIInt}, Y::Vector{PetscInt}) \nSorts an array of `PetscMPIInt` in place in increasing order;\nchanges a second array of `PetscInt` to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscMPIInt`\n- `Y` - second array of `PetscInt`\n\nLevel: intermediate\n\n-seealso: `PetscSortMPIIntWithArray()`, `PetscIntSortSemiOrderedWithArray()`, `PetscTimSortWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortMPIIntWithIntArray\"))\n\"\"\"\nfunction PetscSortMPIIntWithIntArray(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscMPIInt}, Y::Vector{PetscInt}) end\n\n@for_petsc function PetscSortMPIIntWithIntArray(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{PetscMPIInt}, Y::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortMPIIntWithIntArray, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{PetscMPIInt}, Ptr{$PetscInt}),\n               n, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortIntWithScalarArray(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscScalar}) \nSorts an array of `PetscInt` in place in increasing order;\nchanges a second `PetscScalar` array to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of `PetscInt`\n- `Y` - second array of `PetscScalar`\n\nLevel: intermediate\n\n-seealso: `PetscTimSortWithArray()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithScalarArray\"))\n\"\"\"\nfunction PetscSortIntWithScalarArray(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}, Y::Vector{PetscScalar}) end\n\n@for_petsc function PetscSortIntWithScalarArray(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt}, Y::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:PetscSortIntWithScalarArray, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               n, X, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortIntWithDataArray(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscInt}, Y::Cvoid, size::Csize_t, t2::Cvoid) \nSorts an array of `PetscInt` in place in increasing order;\nchanges a second array to match the sorted first INTEGER array.  Unlike other sort routines, the user must\nprovide workspace (the size of an element in the data array) to use when sorting.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `n`    - number of values\n- `X`    - array of `PetscInt`\n- `Y`    - second array of data\n- `size` - sizeof elements in the data array in bytes\n- `t2`   - workspace of \"size\" bytes used when sorting\n\nLevel: intermediate\n\n-seealso: `PetscTimSortWithArray()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithDataArray\"))\n\"\"\"\nfunction PetscSortIntWithDataArray(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscInt}, Y::Cvoid, size::Csize_t, t2::Cvoid) end\n\n@for_petsc function PetscSortIntWithDataArray(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscInt}, Y::Cvoid, size::Csize_t, t2::Cvoid )\n\n    @chk ccall(\n               (:PetscSortIntWithDataArray, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscInt}, Ptr{Cvoid}, Csize_t, Ptr{Cvoid}),\n               n, X, Y, size, t2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt,L::PetscInt = PetscMergeIntArray(petsclib::PetscLibType,an::PetscInt, aI::Vector{PetscInt}, bn::PetscInt, bI::Vector{PetscInt}) \nMerges two SORTED `PetscInt` arrays, removes duplicate elements.\n\nNot Collective\n\nInput Parameters:\n- `an` - number of values in the first array\n- `aI` - first sorted array of `PetscInt`\n- `bn` - number of values in the second array\n- `bI` - second array of `PetscInt`\n\nOutput Parameters:\n- `n` - number of values in the merged array\n- `L` - merged sorted array, this is allocated if an array is not provided\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMergeIntArray\"))\n\"\"\"\nfunction PetscMergeIntArray(petsclib::PetscLibType, an::PetscInt, aI::Vector{PetscInt}, bn::PetscInt, bI::Vector{PetscInt}) end\n\n@for_petsc function PetscMergeIntArray(petsclib::$UnionPetscLib, an::$PetscInt, aI::Vector{$PetscInt}, bn::$PetscInt, bI::Vector{$PetscInt} )\n\tn_ = Ref{$PetscInt}()\n\tL_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscMergeIntArray, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt),\n               an, aI, bn, bI, n_, L_,\n              )\n\n\tn = n_[]\n\tL = L_[]\n\n\treturn n,L\nend \n\n\"\"\"\n\tn::PetscInt,L::Vector{PetscInt},J::Vector{PetscInt} = PetscMergeIntArrayPair(petsclib::PetscLibType,an::PetscInt, aI::Vector{PetscInt}, aJ::Vector{PetscInt}, bn::PetscInt, bI::Vector{PetscInt}, bJ::Vector{PetscInt}) \nMerges two SORTED `PetscInt` arrays that share NO common values along with an additional array of `PetscInt`.\nThe additional arrays are the same length as sorted arrays and are merged\nin the order determined by the merging of the sorted pair.\n\nNot Collective\n\nInput Parameters:\n- `an` - number of values in the first array\n- `aI` - first sorted array of `PetscInt`\n- `aJ` - first additional array of `PetscInt`\n- `bn` - number of values in the second array\n- `bI` - second array of `PetscInt`\n- `bJ` - second additional of `PetscInt`\n\nOutput Parameters:\n- `n` - number of values in the merged array (== an + bn)\n- `L` - merged sorted array\n- `J` - merged additional array\n\n-seealso: `PetscIntSortSemiOrdered()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMergeIntArrayPair\"))\n\"\"\"\nfunction PetscMergeIntArrayPair(petsclib::PetscLibType, an::PetscInt, aI::Vector{PetscInt}, aJ::Vector{PetscInt}, bn::PetscInt, bI::Vector{PetscInt}, bJ::Vector{PetscInt}) end\n\n@for_petsc function PetscMergeIntArrayPair(petsclib::$UnionPetscLib, an::$PetscInt, aI::Vector{$PetscInt}, aJ::Vector{$PetscInt}, bn::$PetscInt, bI::Vector{$PetscInt}, bJ::Vector{$PetscInt} )\n\tn_ = Ref{$PetscInt}()\n\tL_ = Ref{Ptr{$PetscInt}}()\n\tJ_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:PetscMergeIntArrayPair, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{Ptr{$PetscInt}}, Ptr{Ptr{$PetscInt}}),\n               an, aI, aJ, bn, bI, bJ, n_, L_, J_,\n              )\n\n\tn = n_[]\n\tL = unsafe_wrap(Array, L_[], VecGetLocalSize(petsclib, x); own = false)\n\tJ = unsafe_wrap(Array, J_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,L,J\nend \n\n\"\"\"\n\tn::PetscInt = PetscMergeMPIIntArray(petsclib::PetscLibType,an::PetscInt, aI::Vector{PetscMPIInt}, bn::PetscInt, bI::Vector{PetscMPIInt}, L::PetscMPIInt) \nMerges two SORTED `PetscMPIInt` arrays.\n\nNot Collective\n\nInput Parameters:\n- `an` - number of values in the first array\n- `aI` - first sorted array of `PetscMPIInt`\n- `bn` - number of values in the second array\n- `bI` - second array of `PetscMPIInt`\n\nOutput Parameters:\n- `n` - number of values in the merged array (<= an + bn)\n- `L` - merged sorted array, allocated if address of NULL pointer is passed\n\nLevel: intermediate\n\n-seealso: `PetscIntSortSemiOrdered()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMergeMPIIntArray\"))\n\"\"\"\nfunction PetscMergeMPIIntArray(petsclib::PetscLibType, an::PetscInt, aI::Vector{PetscMPIInt}, bn::PetscInt, bI::Vector{PetscMPIInt}, L::PetscMPIInt) end\n\n@for_petsc function PetscMergeMPIIntArray(petsclib::$UnionPetscLib, an::$PetscInt, aI::Vector{PetscMPIInt}, bn::$PetscInt, bI::Vector{PetscMPIInt}, L::PetscMPIInt )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscMergeMPIIntArray, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{PetscMPIInt}, $PetscInt, Ptr{PetscMPIInt}, Ptr{$PetscInt}, PetscMPIInt),\n               an, aI, bn, bI, n_, L,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tNlevels::PetscInt,Level::PetscInt,Levelcnt::PetscInt,Idbylevel::PetscInt,Column::PetscInt = PetscProcessTree(petsclib::PetscLibType,n::PetscInt, mask::Vector{PetscBool}, parentid::Vector{PetscInt}) \nPrepares tree data to be displayed graphically\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `n`        - number of values\n- `mask`     - indicates those entries in the tree, location 0 is always masked\n- `parentid` - indicates the parent of each entry\n\nOutput Parameters:\n- `Nlevels`   - the number of levels\n- `Level`     - for each node tells its level\n- `Levelcnt`  - the number of nodes on each level\n- `Idbylevel` - a list of ids on each of the levels, first level followed by second etc\n- `Column`    - for each id tells its column index\n\nLevel: developer\n\n-seealso: `PetscSortReal()`, `PetscSortIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscProcessTree\"))\n\"\"\"\nfunction PetscProcessTree(petsclib::PetscLibType, n::PetscInt, mask::Vector{PetscBool}, parentid::Vector{PetscInt}) end\n\n@for_petsc function PetscProcessTree(petsclib::$UnionPetscLib, n::$PetscInt, mask::Vector{PetscBool}, parentid::Vector{$PetscInt} )\n\tNlevels_ = Ref{$PetscInt}()\n\tLevel_ = Ref{$PetscInt}()\n\tLevelcnt_ = Ref{$PetscInt}()\n\tIdbylevel_ = Ref{$PetscInt}()\n\tColumn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscProcessTree, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{PetscBool}, Ptr{$PetscInt}, Ptr{$PetscInt}, $PetscInt, $PetscInt, $PetscInt, $PetscInt),\n               n, mask, parentid, Nlevels_, Level_, Levelcnt_, Idbylevel_, Column_,\n              )\n\n\tNlevels = Nlevels_[]\n\tLevel = Level_[]\n\tLevelcnt = Levelcnt_[]\n\tIdbylevel = Idbylevel_[]\n\tColumn = Column_[]\n\n\treturn Nlevels,Level,Levelcnt,Idbylevel,Column\nend \n\n\"\"\"\n\tis_sorted::PetscBool = PetscParallelSortedInt(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, keys::Vector{PetscInt}) \nCheck whether a `PetscInt` array, distributed over a communicator, is globally sorted.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator\n- `n`    - the local number of `PetscInt`\n- `keys` - the local array of `PetscInt`\n\nOutput Parameters:\n- `is_sorted` - whether the array is globally sorted\n\nLevel: developer\n\n-seealso: `PetscParallelSortInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscParallelSortedInt\"))\n\"\"\"\nfunction PetscParallelSortedInt(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, keys::Vector{PetscInt}) end\n\n@for_petsc function PetscParallelSortedInt(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, keys::Vector{$PetscInt} )\n\tis_sorted_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscParallelSortedInt, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}),\n               comm, n, keys, is_sorted_,\n              )\n\n\tis_sorted = is_sorted_[]\n\n\treturn is_sorted\nend \n\n\"\"\"\n\tPetscCommBuildTwoSidedSetType(petsclib::PetscLibType,comm::MPI_Comm, twosided::PetscBuildTwoSidedType) \nset algorithm to use when building two\n\nLogically Collective\n\nInput Parameters:\n- `comm`     - `PETSC_COMM_WORLD`\n- `twosided` - algorithm to use in subsequent calls to `PetscCommBuildTwoSided()`\n\nLevel: developer\n\n-seealso: `PetscCommBuildTwoSided()`, `PetscCommBuildTwoSidedGetType()`, `PetscBuildTwoSidedType`\n\n# External Links\n$(_doc_external(\"Sys/PetscCommBuildTwoSidedSetType\"))\n\"\"\"\nfunction PetscCommBuildTwoSidedSetType(petsclib::PetscLibType, comm::MPI_Comm, twosided::PetscBuildTwoSidedType) end\n\n@for_petsc function PetscCommBuildTwoSidedSetType(petsclib::$UnionPetscLib, comm::MPI_Comm, twosided::PetscBuildTwoSidedType )\n\n    @chk ccall(\n               (:PetscCommBuildTwoSidedSetType, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscBuildTwoSidedType),\n               comm, twosided,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcomm::MPI_Comm,twosided::PetscBuildTwoSidedType = PetscCommBuildTwoSidedGetType(petsclib::PetscLibType) \nget algorithm used when building two\n\nLogically Collective\n\nOutput Parameters:\n- `comm`     - communicator on which to query algorithm\n- `twosided` - algorithm to use for `PetscCommBuildTwoSided()`\n\nLevel: developer\n\n-seealso: `PetscCommBuildTwoSided()`, `PetscCommBuildTwoSidedSetType()`, `PetscBuildTwoSidedType`\n\n# External Links\n$(_doc_external(\"Sys/PetscCommBuildTwoSidedGetType\"))\n\"\"\"\nfunction PetscCommBuildTwoSidedGetType(petsclib::PetscLibType) end\n\n@for_petsc function PetscCommBuildTwoSidedGetType(petsclib::$UnionPetscLib)\n\tcomm_ = Ref{MPI_Comm}()\n\ttwosided_ = Ref{PetscBuildTwoSidedType}()\n\n    @chk ccall(\n               (:PetscCommBuildTwoSidedGetType, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscBuildTwoSidedType}),\n               comm_, twosided_,\n              )\n\n\tcomm = comm_[]\n\ttwosided = unsafe_string(twosided_[])\n\n\treturn comm,twosided\nend \n\n\"\"\"\n\tPetscSplitOwnershipBlock(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt) \nGiven a global (or local) length determines a local\n(or global) length via a simple formula. Splits so each processors local size\nis divisible by the block size.\n\nCollective (if `N` is `PETSC_DECIDE`)\n\nInput Parameters:\n- `comm` - MPI communicator that shares the object being divided\n- `bs`   - block size\n- `n`    - local length (or `PETSC_DECIDE` to have it set)\n- `N`    - global length (or `PETSC_DECIDE`)\n\nLevel: developer\n\n-seealso: `PetscSplitOwnership()`, `PetscSplitOwnershipEqual()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSplitOwnershipBlock\"))\n\"\"\"\nfunction PetscSplitOwnershipBlock(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt) end\n\n@for_petsc function PetscSplitOwnershipBlock(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, N::$PetscInt )\n\n    @chk ccall(\n               (:PetscSplitOwnershipBlock, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               comm, bs, n, N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSplitOwnership(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nGiven a global (or local) length determines a local\n(or global) length via a simple formula\n\nCollective (if `n` or `N` is `PETSC_DECIDE` or `PETSC_DETERMINE`)\n\nInput Parameters:\n- `comm` - MPI communicator that shares the object being divided\n- `n`    - local length (or `PETSC_DECIDE` to have it set)\n- `N`    - global length (or `PETSC_DETERMINE` to have it set)\n\nLevel: developer\n\n-seealso: `PetscSplitOwnershipBlock()`, `PetscSplitOwnershipEqual()`, `PETSC_DECIDE`, `PETSC_DETERMINE`\n\n# External Links\n$(_doc_external(\"Sys/PetscSplitOwnership\"))\n\"\"\"\nfunction PetscSplitOwnership(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function PetscSplitOwnership(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\n    @chk ccall(\n               (:PetscSplitOwnership, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               comm, n, N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSplitOwnershipEqual(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nGiven a global (or local) length determines a local\n(or global) length via a simple formula, trying to have all local lengths equal\n\nCollective (if `n` or `N` is `PETSC_DECIDE`)\n\nInput Parameters:\n- `comm` - MPI communicator that shares the object being divided\n- `n`    - local length (or `PETSC_DECIDE` to have it set)\n- `N`    - global length (or `PETSC_DECIDE`)\n\nLevel: developer\n\n-seealso: `PetscSplitOwnership()`, `PetscSplitOwnershipBlock()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSplitOwnershipEqual\"))\n\"\"\"\nfunction PetscSplitOwnershipEqual(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function PetscSplitOwnershipEqual(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\n    @chk ccall(\n               (:PetscSplitOwnershipEqual, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               comm, n, N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrToArray(petsclib::PetscLibType,s::Vector{Cchar}, sp::Cchar, argc::Cint, args::Cchar) \nSeparates a string by a character (for example ' ' or '\\n') and creates an array of strings\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `s`  - pointer to string\n- `sp` - separator character\n\nOutput Parameters:\n- `argc` - the number of entries in `args`\n- `args` - an array of the entries with a `NULL` at the end\n\nLevel: intermediate\n\n-seealso: `PetscStrToArrayDestroy()`, `PetscToken`, `PetscTokenCreate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrToArray\"))\n\"\"\"\nfunction PetscStrToArray(petsclib::PetscLibType, s::Vector{Cchar}, sp::Cchar, argc::Cint, args::Cchar) end\n\n@for_petsc function PetscStrToArray(petsclib::$UnionPetscLib, s::Vector{Cchar}, sp::Cchar, argc::Cint, args::Cchar )\n\n    @chk ccall(\n               (:PetscStrToArray, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar, Ptr{Cint}, Cchar),\n               s, sp, argc, args,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrToArrayDestroy(petsclib::PetscLibType,argc::Cint, args::Cchar) \nFrees array created with `PetscStrToArray()`.\n\nNot Collective; No Fortran Support\n\nOutput Parameters:\n- `argc` - the number of arguments\n- `args` - the array of arguments\n\nLevel: intermediate\n\n-seealso: `PetscStrToArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrToArrayDestroy\"))\n\"\"\"\nfunction PetscStrToArrayDestroy(petsclib::PetscLibType, argc::Cint, args::Cchar) end\n\n@for_petsc function PetscStrToArrayDestroy(petsclib::$UnionPetscLib, argc::Cint, args::Cchar )\n\n    @chk ccall(\n               (:PetscStrToArrayDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cint, Cchar),\n               argc, args,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrArrayallocpy(petsclib::PetscLibType,list::Cchar, t::Cchar) \nAllocates space to hold a copy of an array of strings then copies the strings\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `list` - pointer to array of strings (final string is a `NULL`)\n\nOutput Parameter:\n- `t` - the copied array string\n\nLevel: intermediate\n\n-seealso: `PetscStrallocpy()`, `PetscStrArrayDestroy()`, `PetscStrNArrayallocpy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrArrayallocpy\"))\n\"\"\"\nfunction PetscStrArrayallocpy(petsclib::PetscLibType, list::Cchar, t::Cchar) end\n\n@for_petsc function PetscStrArrayallocpy(petsclib::$UnionPetscLib, list::Cchar, t::Cchar )\n\n    @chk ccall(\n               (:PetscStrArrayallocpy, $petsc_library),\n               PetscErrorCode,\n               (Cchar, Cchar),\n               list, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrArrayDestroy(petsclib::PetscLibType,list::Cchar) \nFrees array of strings created with `PetscStrArrayallocpy()`.\n\nNot Collective; No Fortran Support\n\nOutput Parameter:\n- `list` - array of strings\n\nLevel: intermediate\n\n-seealso: `PetscStrArrayallocpy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrArrayDestroy\"))\n\"\"\"\nfunction PetscStrArrayDestroy(petsclib::PetscLibType, list::Cchar) end\n\n@for_petsc function PetscStrArrayDestroy(petsclib::$UnionPetscLib, list::Cchar )\n\n    @chk ccall(\n               (:PetscStrArrayDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cchar,),\n               list,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrNArrayallocpy(petsclib::PetscLibType,n::PetscInt, list::Cchar, t::Cchar) \nAllocates space to hold a copy of an array of strings then copies the strings\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `n`    - the number of string entries\n- `list` - pointer to array of strings\n\nOutput Parameter:\n- `t` - the copied array string\n\nLevel: intermediate\n\n-seealso: `PetscStrallocpy()`, `PetscStrArrayallocpy()`, `PetscStrNArrayDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrNArrayallocpy\"))\n\"\"\"\nfunction PetscStrNArrayallocpy(petsclib::PetscLibType, n::PetscInt, list::Cchar, t::Cchar) end\n\n@for_petsc function PetscStrNArrayallocpy(petsclib::$UnionPetscLib, n::$PetscInt, list::Cchar, t::Cchar )\n\n    @chk ccall(\n               (:PetscStrNArrayallocpy, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Cchar, Cchar),\n               n, list, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = PetscStrNArrayDestroy(petsclib::PetscLibType,list::Cchar) \nFrees array of strings created with `PetscStrNArrayallocpy()`.\n\nNot Collective; No Fortran Support\n\nOutput Parameters:\n- `n`    - number of string entries\n- `list` - array of strings\n\nLevel: intermediate\n\n-seealso: `PetscStrNArrayallocpy()`, `PetscStrArrayallocpy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrNArrayDestroy\"))\n\"\"\"\nfunction PetscStrNArrayDestroy(petsclib::PetscLibType, list::Cchar) end\n\n@for_petsc function PetscStrNArrayDestroy(petsclib::$UnionPetscLib, list::Cchar )\n\tn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscStrNArrayDestroy, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Cchar),\n               n_, list,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tt::PetscBool = PetscStrcasecmp(petsclib::PetscLibType,a::Vector{Cchar}, b::Vector{Cchar}) \nReturns true if the two strings are the same\nexcept possibly for case.\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `a` - pointer to first string\n- `b` - pointer to second string\n\nOutput Parameter:\n- `t` - if the two strings are the same\n\nLevel: intermediate\n\n-seealso: `PetscStrcmp()`, `PetscStrncmp()`, `PetscStrgrt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrcasecmp\"))\n\"\"\"\nfunction PetscStrcasecmp(petsclib::PetscLibType, a::Vector{Cchar}, b::Vector{Cchar}) end\n\n@for_petsc function PetscStrcasecmp(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Vector{Cchar} )\n\tt_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscStrcasecmp, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               a, b, t_,\n              )\n\n\tt = t_[]\n\n\treturn t\nend \n\n\"\"\"\n\tcnt::PetscInt = PetscStrendswithwhich(petsclib::PetscLibType,a::Vector{Cchar}, bs::Cchar) \nDetermines if a string ends with one of several possible strings\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `a`  - pointer to string\n- `bs` - strings to end with (last entry must be `NULL`)\n\nOutput Parameter:\n- `cnt` - the index of the string it ends with or the index of `NULL`\n\nLevel: intermediate\n\n-seealso: `PetscStrbeginswithwhich()`, `PetscStrendswith()`, `PetscStrtoupper`, `PetscStrtolower()`, `PetscStrrchr()`, `PetscStrchr()`,\n`PetscStrncmp()`, `PetscStrlen()`, `PetscStrcmp()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrendswithwhich\"))\n\"\"\"\nfunction PetscStrendswithwhich(petsclib::PetscLibType, a::Vector{Cchar}, bs::Cchar) end\n\n@for_petsc function PetscStrendswithwhich(petsclib::$UnionPetscLib, a::Vector{Cchar}, bs::Cchar )\n\tcnt_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscStrendswithwhich, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar, Ptr{$PetscInt}),\n               a, bs, cnt_,\n              )\n\n\tcnt = cnt_[]\n\n\treturn cnt\nend \n\n\"\"\"\n\tfound::PetscBool = PetscStrInList(petsclib::PetscLibType,str::Vector{Cchar}, list::Vector{Cchar}, sep::Cchar) \nsearch for a string in character\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `str`  - the string to look for\n- `list` - the list to search in\n- `sep`  - the separator character\n\nOutput Parameter:\n- `found` - whether `str` is in `list`\n\nLevel: intermediate\n\n-seealso: `PetscTokenCreate()`, `PetscTokenFind()`, `PetscStrcmp()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrInList\"))\n\"\"\"\nfunction PetscStrInList(petsclib::PetscLibType, str::Vector{Cchar}, list::Vector{Cchar}, sep::Cchar) end\n\n@for_petsc function PetscStrInList(petsclib::$UnionPetscLib, str::Vector{Cchar}, list::Vector{Cchar}, sep::Cchar )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscStrInList, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Cchar, Ptr{PetscBool}),\n               str, list, sep, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n\"\"\"\n\tPetscGetPetscDir(petsclib::PetscLibType,dir::Vector{Cchar}) \nGets the directory PETSc is installed in\n\nNot Collective; No Fortran Support\n\nOutput Parameter:\n- `dir` - the directory\n\nLevel: developer\n\n-seealso: `PetscGetArchType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetPetscDir\"))\n\"\"\"\nfunction PetscGetPetscDir(petsclib::PetscLibType, dir::Vector{Cchar}) end\n\n@for_petsc function PetscGetPetscDir(petsclib::$UnionPetscLib, dir::Vector{Cchar} )\n\tdir_ = Ref(pointer(dir))\n\n    @chk ccall(\n               (:PetscGetPetscDir, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Ptr{Cchar}},),\n               dir_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrreplace(petsclib::PetscLibType,comm::MPI_Comm, aa::Vector{Cchar}, b::Vector{Cchar}, len::Csize_t) \nReplaces substrings in string with other substrings\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `comm` - `MPI_Comm` of processors that are processing the string\n- `aa`   - the string to look in\n- `b`    - the resulting copy of a with replaced strings (`b` can be the same as `a`)\n- `len`  - the length of `b`\n\nLevel: developer\n\n-seealso: `PetscStrcmp()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrreplace\"))\n\"\"\"\nfunction PetscStrreplace(petsclib::PetscLibType, comm::MPI_Comm, aa::Vector{Cchar}, b::Vector{Cchar}, len::Csize_t) end\n\n@for_petsc function PetscStrreplace(petsclib::$UnionPetscLib, comm::MPI_Comm, aa::Vector{Cchar}, b::Vector{Cchar}, len::Csize_t )\n\n    @chk ccall(\n               (:PetscStrreplace, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               comm, aa, b, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalue::PetscInt,found::PetscBool = PetscEListFind(petsclib::PetscLibType,n::PetscInt, list::Cchar, str::Vector{Cchar}) \nsearches list of strings for given string, using case insensitive matching\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `n`    - number of strings in\n- `list` - list of strings to search\n- `str`  - string to look for, empty string \"\" accepts default (first entry in list)\n\nOutput Parameters:\n- `value` - index of matching string (if found)\n- `found` - boolean indicating whether string was found (can be `NULL`)\n\nLevel: developer\n\n-seealso: `PetscEnumFind()`\n\n# External Links\n$(_doc_external(\"Sys/PetscEListFind\"))\n\"\"\"\nfunction PetscEListFind(petsclib::PetscLibType, n::PetscInt, list::Cchar, str::Vector{Cchar}) end\n\n@for_petsc function PetscEListFind(petsclib::$UnionPetscLib, n::$PetscInt, list::Cchar, str::Vector{Cchar} )\n\tvalue_ = Ref{$PetscInt}()\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscEListFind, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Cchar, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               n, list, str, value_, found_,\n              )\n\n\tvalue = value_[]\n\tfound = found_[]\n\n\treturn value,found\nend \n\n\"\"\"\n\tfound::PetscBool = PetscEnumFind(petsclib::PetscLibType,enumlist::Cchar, str::Vector{Cchar}, value::PetscEnum) \nsearches enum list of strings for given string, using case insensitive matching\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `enumlist` - list of strings to search, followed by enum name, then enum prefix, then `NULL`\n- `str`      - string to look for\n\nOutput Parameters:\n- `value` - index of matching string (if found)\n- `found` - boolean indicating whether string was found (can be `NULL`)\n\nLevel: advanced\n\n-seealso: `PetscEListFind()`\n\n# External Links\n$(_doc_external(\"Sys/PetscEnumFind\"))\n\"\"\"\nfunction PetscEnumFind(petsclib::PetscLibType, enumlist::Cchar, str::Vector{Cchar}, value::PetscEnum) end\n\n@for_petsc function PetscEnumFind(petsclib::$UnionPetscLib, enumlist::Cchar, str::Vector{Cchar}, value::PetscEnum )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscEnumFind, $petsc_library),\n               PetscErrorCode,\n               (Cchar, Ptr{Cchar}, Ptr{PetscEnum}, Ptr{PetscBool}),\n               enumlist, str, value, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n\"\"\"\n\tPetscStrcat(petsclib::PetscLibType,s::Vector{Cchar}, t::Vector{Cchar}) \nConcatenates a string onto a given string\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `s` - string to be added to\n- `t` - pointer to string to be added to end\n\nLevel: deprecated (since 3.18.5)\n\n-seealso: `PetscStrlcat()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrcat\"))\n\"\"\"\nfunction PetscStrcat(petsclib::PetscLibType, s::Vector{Cchar}, t::Vector{Cchar}) end\n\n@for_petsc function PetscStrcat(petsclib::$UnionPetscLib, s::Vector{Cchar}, t::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscStrcat, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}),\n               s, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrcpy(petsclib::PetscLibType,s::Vector{Cchar}, t::Vector{Cchar}) \nCopies a string\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `t` - pointer to string\n\nOutput Parameter:\n- `s` - the copied string\n\nLevel: deprecated (since 3.18.5)\n\n-seealso: `PetscStrncpy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStrcpy\"))\n\"\"\"\nfunction PetscStrcpy(petsclib::PetscLibType, s::Vector{Cchar}, t::Vector{Cchar}) end\n\n@for_petsc function PetscStrcpy(petsclib::$UnionPetscLib, s::Vector{Cchar}, t::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscStrcpy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}),\n               s, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstr::Vector{Cchar} = PetscGetArchType(petsclib::PetscLibType,slen::Csize_t) \nReturns the PETSC_ARCH that was used for this configuration of PETSc\n\nNot Collective\n\nInput Parameter:\n- `slen` - length of string buffer\n\nOutput Parameter:\n- `str` - string area to contain architecture name, should be at least 10 characters long. Name is truncated if string is not long enough.\n\nLevel: developer\n\n-seealso: `PetscGetUserName()`, `PetscGetHostName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetArchType\"))\n\"\"\"\nfunction PetscGetArchType(petsclib::PetscLibType, slen::Csize_t) end\n\n@for_petsc function PetscGetArchType(petsclib::$UnionPetscLib, slen::Csize_t )\n\tstr = Vector{Cchar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscGetArchType, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               str, slen,\n              )\n\n\n\treturn str\nend \n\n\"\"\"\n\tPetscSetDisplay(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscSetDisplay\"))\n\"\"\"\nfunction PetscSetDisplay(petsclib::PetscLibType) end\n\n@for_petsc function PetscSetDisplay(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscSetDisplay, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetDisplay(petsclib::PetscLibType,display::Vector{Cchar}, n::Csize_t) \nGets the X windows display variable for all processors.\n\nInput Parameter:\n- `n` - length of string display\n\nOutput Parameter:\n- `display` - the display string\n\nOptions Database Keys:\n- `-display <display>` - sets the display to use\n- `-x_virtual`         - forces use of a X virtual display Xvfb that will not display anything but -draw_save will still work. Xvfb is automatically\nstarted up in PetscSetDisplay() with this option\n\nLevel: advanced\n\n-seealso: `PETSC_DRAW_X`, `PetscDrawOpenX()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetDisplay\"))\n\"\"\"\nfunction PetscGetDisplay(petsclib::PetscLibType, display::Vector{Cchar}, n::Csize_t) end\n\n@for_petsc function PetscGetDisplay(petsclib::$UnionPetscLib, display::Vector{Cchar}, n::Csize_t )\n\n    @chk ccall(\n               (:PetscGetDisplay, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               display, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetHostName(petsclib::PetscLibType,name::Vector{Cchar}, nlen::Csize_t) \nReturns the name of the host. This attempts to\nreturn the entire Internet name. It may not return the same name\nas `MPI_Get_processor_name()`.\n\nNot Collective\n\nInput Parameter:\n- `nlen` - length of name\n\nOutput Parameter:\n- `name` - contains host name.  Must be long enough to hold the name\nThis is the fully qualified name, including the domain.\n\nLevel: developer\n\n-seealso: `PetscGetUserName()`, `PetscGetArchType()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetHostName\"))\n\"\"\"\nfunction PetscGetHostName(petsclib::PetscLibType, name::Vector{Cchar}, nlen::Csize_t) end\n\n@for_petsc function PetscGetHostName(petsclib::$UnionPetscLib, name::Vector{Cchar}, nlen::Csize_t )\n\n    @chk ccall(\n               (:PetscGetHostName, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               name, nlen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsorted::PetscBool = PetscSortedReal(petsclib::PetscLibType,n::PetscCount, X::Vector{PetscReal}) \nDetermines whether the array of `PetscReal` is sorted.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `X` - array of integers\n\nOutput Parameter:\n- `sorted` - flag whether the array is sorted\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`, `PetscSortedInt()`, `PetscSortedMPIInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortedReal\"))\n\"\"\"\nfunction PetscSortedReal(petsclib::PetscLibType, n::PetscCount, X::Vector{PetscReal}) end\n\n@for_petsc function PetscSortedReal(petsclib::$UnionPetscLib, n::PetscCount, X::Vector{$PetscReal} )\n\tsorted_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscSortedReal, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscReal}, Ptr{PetscBool}),\n               n, X, sorted_,\n              )\n\n\tsorted = sorted_[]\n\n\treturn sorted\nend \n\n\"\"\"\n\tPetscSortReal(petsclib::PetscLibType,n::PetscCount, v::Vector{PetscReal}) \nSorts an array of `PetscReal` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n` - number of values\n- `v` - array of doubles\n\nLevel: intermediate\n\n-seealso: `PetscRealSortSemiOrdered()`, `PetscSortInt()`, `PetscSortRealWithPermutation()`, `PetscSortRealWithArrayInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortReal\"))\n\"\"\"\nfunction PetscSortReal(petsclib::PetscLibType, n::PetscCount, v::Vector{PetscReal}) end\n\n@for_petsc function PetscSortReal(petsclib::$UnionPetscLib, n::PetscCount, v::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscSortReal, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscReal}),\n               n, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortRealWithArrayInt(petsclib::PetscLibType,n::PetscCount, r::Vector{PetscReal}, Ii::Vector{PetscInt}) \nSorts an array of `PetscReal` in place in increasing order;\nchanges a second `PetscInt` array to match the sorted first array.\n\nNot Collective\n\nInput Parameters:\n- `n`  - number of values\n- `Ii` - array of integers\n- `r`  - second array of integers\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortRealWithArrayInt\"))\n\"\"\"\nfunction PetscSortRealWithArrayInt(petsclib::PetscLibType, n::PetscCount, r::Vector{PetscReal}, Ii::Vector{PetscInt}) end\n\n@for_petsc function PetscSortRealWithArrayInt(petsclib::$UnionPetscLib, n::PetscCount, r::Vector{$PetscReal}, Ii::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortRealWithArrayInt, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               n, r, Ii,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tloc::PetscInt = PetscFindReal(petsclib::PetscLibType,key::PetscReal, n::PetscCount, t::Vector{PetscReal}, eps::PetscReal) \nFinds a `PetscReal` in a sorted array of `PetscReal`s\n\nNot Collective\n\nInput Parameters:\n- `key` - the value to locate\n- `n`   - number of values in the array\n- `t`   - array of values\n- `eps` - tolerance used to compare\n\nOutput Parameter:\n- `loc` - the location if found, otherwise -(slot+1) where slot is the place the value would go\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`, `PetscSortRealWithArrayInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFindReal\"))\n\"\"\"\nfunction PetscFindReal(petsclib::PetscLibType, key::PetscReal, n::PetscCount, t::Vector{PetscReal}, eps::PetscReal) end\n\n@for_petsc function PetscFindReal(petsclib::$UnionPetscLib, key::$PetscReal, n::PetscCount, t::Vector{$PetscReal}, eps::$PetscReal )\n\tloc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscFindReal, $petsc_library),\n               PetscErrorCode,\n               ($PetscReal, PetscCount, Ptr{$PetscReal}, $PetscReal, Ptr{$PetscInt}),\n               key, n, t, eps, loc_,\n              )\n\n\tloc = loc_[]\n\n\treturn loc\nend \n\n\"\"\"\n\tPetscSortRemoveDupsReal(petsclib::PetscLibType,n::PetscInt, v::Vector{PetscReal}) \nSorts an array of `PetscReal` in place in increasing order and removes all duplicate entries\n\nNot Collective\n\nInput Parameters:\n- `n` - initial number of values\n- `v` - array of values\n\n-seealso: `PetscSortReal()`, `PetscSortRemoveDupsInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortRemoveDupsReal\"))\n\"\"\"\nfunction PetscSortRemoveDupsReal(petsclib::PetscLibType, n::PetscInt, v::Vector{PetscReal}) end\n\n@for_petsc function PetscSortRemoveDupsReal(petsclib::$UnionPetscLib, n::$PetscInt, v::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:PetscSortRemoveDupsReal, $petsc_library),\n               PetscErrorCode,\n               (Ptr{$PetscInt}, Ptr{$PetscReal}),\n               n, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortSplit(petsclib::PetscLibType,ncut::PetscInt, n::PetscInt, a::Vector{PetscScalar}, idx::Vector{PetscInt}) \nQuick\n\nNot Collective\n\nInput Parameters:\n- `ncut` - splitting index\n- `n`    - number of values to sort\n\nInput/Output Parameters:\n- `a`   - array of values, on output the values are permuted such that its elements satisfy:\nabs(a[i]) >= abs(a[ncut-1]) for i < ncut and\nabs(a[i]) <= abs(a[ncut-1]) for i >= ncut\n- `idx` - index for array a, on output permuted accordingly\n\nLevel: intermediate\n\n-seealso: `PetscSortInt()`, `PetscSortRealWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortSplit\"))\n\"\"\"\nfunction PetscSortSplit(petsclib::PetscLibType, ncut::PetscInt, n::PetscInt, a::Vector{PetscScalar}, idx::Vector{PetscInt}) end\n\n@for_petsc function PetscSortSplit(petsclib::$UnionPetscLib, ncut::$PetscInt, n::$PetscInt, a::Vector{$PetscScalar}, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortSplit, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{$PetscInt}),\n               ncut, n, a, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortSplitReal(petsclib::PetscLibType,ncut::PetscInt, n::PetscInt, a::Vector{PetscReal}, idx::Vector{PetscInt}) \nQuick\n\nNot Collective\n\nInput Parameters:\n- `ncut` - splitting index\n- `n`    - number of values to sort\n\nInput/Output Parameters:\n- `a`   - array of values, on output the values are permuted such that its elements satisfy:\nabs(a[i]) >= abs(a[ncut-1]) for i < ncut and\nabs(a[i]) <= abs(a[ncut-1]) for i >= ncut\n- `idx` - index for array a, on output permuted accordingly\n\nLevel: intermediate\n\n-seealso: `PetscSortInt()`, `PetscSortRealWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortSplitReal\"))\n\"\"\"\nfunction PetscSortSplitReal(petsclib::PetscLibType, ncut::PetscInt, n::PetscInt, a::Vector{PetscReal}, idx::Vector{PetscInt}) end\n\n@for_petsc function PetscSortSplitReal(petsclib::$UnionPetscLib, ncut::$PetscInt, n::$PetscInt, a::Vector{$PetscReal}, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortSplitReal, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               ncut, n, a, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGatherNumberOfMessages(petsclib::PetscLibType,comm::MPI_Comm, iflags::Vector{PetscMPIInt}, ilengths::Vector{PetscMPIInt}, nrecvs::PetscMPIInt) \nComputes the number of messages an MPI rank expects to receive during a neighbor communication\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm`     - Communicator\n- `iflags`   - an array of integers of length sizeof(comm). A '1' in `ilengths`[i] represent a\nmessage from current node to ith node. Optionally `NULL`\n- `ilengths` - Non zero ilengths[i] represent a message to i of length `ilengths`[i].\nOptionally `NULL`.\n\nOutput Parameter:\n- `nrecvs` - number of messages received\n\nLevel: developer\n\n-seealso: `PetscGatherMessageLengths()`, `PetscGatherMessageLengths2()`, `PetscCommBuildTwoSided()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGatherNumberOfMessages\"))\n\"\"\"\nfunction PetscGatherNumberOfMessages(petsclib::PetscLibType, comm::MPI_Comm, iflags::Vector{PetscMPIInt}, ilengths::Vector{PetscMPIInt}, nrecvs::PetscMPIInt) end\n\n@for_petsc function PetscGatherNumberOfMessages(petsclib::$UnionPetscLib, comm::MPI_Comm, iflags::Vector{PetscMPIInt}, ilengths::Vector{PetscMPIInt}, nrecvs::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscGatherNumberOfMessages, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{PetscMPIInt}, Ptr{PetscMPIInt}, Ptr{PetscMPIInt}),\n               comm, iflags, ilengths, nrecvs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGatherMessageLengths(petsclib::PetscLibType,comm::MPI_Comm, nsends::PetscMPIInt, nrecvs::PetscMPIInt, ilengths::Vector{PetscMPIInt}, onodes::PetscMPIInt, olengths::PetscMPIInt) \nComputes information about messages that an MPI rank will receive,\nincluding (from-id,length) pairs for each message.\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm`     - Communicator\n- `nsends`   - number of messages that are to be sent.\n- `nrecvs`   - number of messages being received\n- `ilengths` - an array of integers of length sizeof(comm)\na non zero `ilengths`[i] represent a message to i of length `ilengths`[i]\n\nOutput Parameters:\n- `onodes`   - list of ranks from which messages are expected\n- `olengths` - corresponding message lengths\n\nLevel: developer\n\n-seealso: `PetscGatherNumberOfMessages()`, `PetscGatherMessageLengths2()`, `PetscCommBuildTwoSided()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGatherMessageLengths\"))\n\"\"\"\nfunction PetscGatherMessageLengths(petsclib::PetscLibType, comm::MPI_Comm, nsends::PetscMPIInt, nrecvs::PetscMPIInt, ilengths::Vector{PetscMPIInt}, onodes::PetscMPIInt, olengths::PetscMPIInt) end\n\n@for_petsc function PetscGatherMessageLengths(petsclib::$UnionPetscLib, comm::MPI_Comm, nsends::PetscMPIInt, nrecvs::PetscMPIInt, ilengths::Vector{PetscMPIInt}, onodes::PetscMPIInt, olengths::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscGatherMessageLengths, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscMPIInt, PetscMPIInt, Ptr{PetscMPIInt}, PetscMPIInt, PetscMPIInt),\n               comm, nsends, nrecvs, ilengths, onodes, olengths,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGatherMessageLengths2(petsclib::PetscLibType,comm::MPI_Comm, nsends::PetscMPIInt, nrecvs::PetscMPIInt, ilengths1::Vector{PetscMPIInt}, ilengths2::Vector{PetscMPIInt}, onodes::PetscMPIInt, olengths1::PetscMPIInt, olengths2::PetscMPIInt) \nComputes info about messages that a MPI rank will receive,\nincluding (from-id,length) pairs for each message. Same functionality as `PetscGatherMessageLengths()`\nexcept it takes TWO ilenths and output TWO olengths.\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `comm`      - Communicator\n- `nsends`    - number of messages that are to be sent.\n- `nrecvs`    - number of messages being received\n- `ilengths1` - first array of integers of length sizeof(comm)\n- `ilengths2` - second array of integers of length sizeof(comm)\n\nOutput Parameters:\n- `onodes`    - list of ranks from which messages are expected\n- `olengths1` - first corresponding message lengths\n- `olengths2` - second  message lengths\n\nLevel: developer\n\n-seealso: `PetscGatherMessageLengths()`, `PetscGatherNumberOfMessages()`, `PetscCommBuildTwoSided()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGatherMessageLengths2\"))\n\"\"\"\nfunction PetscGatherMessageLengths2(petsclib::PetscLibType, comm::MPI_Comm, nsends::PetscMPIInt, nrecvs::PetscMPIInt, ilengths1::Vector{PetscMPIInt}, ilengths2::Vector{PetscMPIInt}, onodes::PetscMPIInt, olengths1::PetscMPIInt, olengths2::PetscMPIInt) end\n\n@for_petsc function PetscGatherMessageLengths2(petsclib::$UnionPetscLib, comm::MPI_Comm, nsends::PetscMPIInt, nrecvs::PetscMPIInt, ilengths1::Vector{PetscMPIInt}, ilengths2::Vector{PetscMPIInt}, onodes::PetscMPIInt, olengths1::PetscMPIInt, olengths2::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscGatherMessageLengths2, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscMPIInt, PetscMPIInt, Ptr{PetscMPIInt}, Ptr{PetscMPIInt}, PetscMPIInt, PetscMPIInt, PetscMPIInt),\n               comm, nsends, nrecvs, ilengths1, ilengths2, onodes, olengths1, olengths2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPostIrecvInt(petsclib::PetscLibType,comm::MPI_Comm, tag::PetscMPIInt, nrecvs::PetscMPIInt, onodes::Vector{PetscMPIInt}, olengths::Vector{PetscMPIInt}, rbuf::PetscInt, r_waits::MPI_Request) \n\n# External Links\n$(_doc_external(\"Sys/PetscPostIrecvInt\"))\n\"\"\"\nfunction PetscPostIrecvInt(petsclib::PetscLibType, comm::MPI_Comm, tag::PetscMPIInt, nrecvs::PetscMPIInt, onodes::Vector{PetscMPIInt}, olengths::Vector{PetscMPIInt}, rbuf::PetscInt, r_waits::MPI_Request) end\n\n@for_petsc function PetscPostIrecvInt(petsclib::$UnionPetscLib, comm::MPI_Comm, tag::PetscMPIInt, nrecvs::PetscMPIInt, onodes::Vector{PetscMPIInt}, olengths::Vector{PetscMPIInt}, rbuf::$PetscInt, r_waits::MPI_Request )\n\n    @chk ccall(\n               (:PetscPostIrecvInt, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscMPIInt, PetscMPIInt, Ptr{PetscMPIInt}, Ptr{PetscMPIInt}, $PetscInt, MPI_Request),\n               comm, tag, nrecvs, onodes, olengths, rbuf, r_waits,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPostIrecvScalar(petsclib::PetscLibType,comm::MPI_Comm, tag::PetscMPIInt, nrecvs::PetscMPIInt, onodes::Vector{PetscMPIInt}, olengths::Vector{PetscMPIInt}, rbuf::PetscScalar, r_waits::MPI_Request) \n\n# External Links\n$(_doc_external(\"Sys/PetscPostIrecvScalar\"))\n\"\"\"\nfunction PetscPostIrecvScalar(petsclib::PetscLibType, comm::MPI_Comm, tag::PetscMPIInt, nrecvs::PetscMPIInt, onodes::Vector{PetscMPIInt}, olengths::Vector{PetscMPIInt}, rbuf::PetscScalar, r_waits::MPI_Request) end\n\n@for_petsc function PetscPostIrecvScalar(petsclib::$UnionPetscLib, comm::MPI_Comm, tag::PetscMPIInt, nrecvs::PetscMPIInt, onodes::Vector{PetscMPIInt}, olengths::Vector{PetscMPIInt}, rbuf::$PetscScalar, r_waits::MPI_Request )\n\n    @chk ccall(\n               (:PetscPostIrecvScalar, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, PetscMPIInt, PetscMPIInt, Ptr{PetscMPIInt}, Ptr{PetscMPIInt}, $PetscScalar, MPI_Request),\n               comm, tag, nrecvs, onodes, olengths, rbuf, r_waits,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmgetAddressesFinalize(petsclib::PetscLibType) \nfrees any shared memory that was allocated by `PetscShmgetAllocateArray()` but\nnot deallocated with `PetscShmgetDeallocateArray()`\n\nLevel: developer\n\n-seealso: `PetscShmgetAllocateArray()`, `PetscShmgetDeallocateArray()`, `PetscShmgetUnmapAddresses()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmgetAddressesFinalize\"))\n\"\"\"\nfunction PetscShmgetAddressesFinalize(petsclib::PetscLibType) end\n\n@for_petsc function PetscShmgetAddressesFinalize(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscShmgetAddressesFinalize, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmgetMapAddresses(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, baseaddres::Cvoid, addres::Cvoid) \ngiven shared address on the first MPI process determines the\naddresses on the other MPI processes that map to the same physical memory\n\nInput Parameters:\n- `comm`       - the `MPI_Comm` to scatter the address\n- `n`          - the number of addresses, each obtained on MPI process zero by `PetscShmgetAllocateArray()`\n- `baseaddres` - the addresses on the first MPI process, ignored on all but first process\n\nOutput Parameter:\n- `addres` - the addresses on each MPI process, the array of void * must already be allocated\n\nLevel: developer\n\n-seealso: `PetscShmgetDeallocateArray()`, `PetscShmgetAllocateArray()`, `PetscShmgetUnmapAddresses()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmgetMapAddresses\"))\n\"\"\"\nfunction PetscShmgetMapAddresses(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, baseaddres::Cvoid, addres::Cvoid) end\n\n@for_petsc function PetscShmgetMapAddresses(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, baseaddres::Cvoid, addres::Cvoid )\n\n    @chk ccall(\n               (:PetscShmgetMapAddresses, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Cvoid, Cvoid),\n               comm, n, baseaddres, addres,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmgetUnmapAddresses(petsclib::PetscLibType,n::PetscInt, addres::Cvoid) \ngiven shared addresses on a MPI process unlink it\n\nInput Parameters:\n- `n`      - the number of addresses, each obtained on MPI process zero by `PetscShmgetAllocateArray()`\n- `addres` - the addresses\n\nLevel: developer\n\n-seealso: `PetscShmgetDeallocateArray()`, `PetscShmgetAllocateArray()`, `PetscShmgetMapAddresses()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmgetUnmapAddresses\"))\n\"\"\"\nfunction PetscShmgetUnmapAddresses(petsclib::PetscLibType, n::PetscInt, addres::Cvoid) end\n\n@for_petsc function PetscShmgetUnmapAddresses(petsclib::$UnionPetscLib, n::$PetscInt, addres::Cvoid )\n\n    @chk ccall(\n               (:PetscShmgetUnmapAddresses, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Cvoid),\n               n, addres,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmgetAllocateArray(petsclib::PetscLibType,sz::Csize_t, asz::Csize_t, addr::Vector{Cvoid}) \nallocates shared memory accessible by all MPI processes in the server\n\nNot Collective, only called on the first MPI process\n\nInput Parameters:\n- `sz`  - the number of elements in the array\n- `asz` - the size of an entry in the array, for example `sizeof(PetscScalar)`\n\nOutput Parameters:\n- `addr` - the address of the array\n\nLevel: developer\n\n-seealso: [](sec_pcmpi), `PCMPIServerBegin()`, `PCMPI`, `KSPCheckPCMPI()`, `PetscShmgetDeallocateArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmgetAllocateArray\"))\n\"\"\"\nfunction PetscShmgetAllocateArray(petsclib::PetscLibType, sz::Csize_t, asz::Csize_t, addr::Vector{Cvoid}) end\n\n@for_petsc function PetscShmgetAllocateArray(petsclib::$UnionPetscLib, sz::Csize_t, asz::Csize_t, addr::Vector{Cvoid} )\n\taddr_ = Ref(pointer(addr))\n\n    @chk ccall(\n               (:PetscShmgetAllocateArray, $petsc_library),\n               PetscErrorCode,\n               (Csize_t, Csize_t, Ptr{Ptr{Cvoid}}),\n               sz, asz, addr_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscShmgetDeallocateArray(petsclib::PetscLibType,addr::Vector{Cvoid}) \ndeallocates shared memory accessible by all MPI processes in the server\n\nNot Collective, only called on the first MPI process\n\nInput Parameter:\n- `addr` - the address of array\n\nLevel: developer\n\n-seealso: [](sec_pcmpi), `PCMPIServerBegin()`, `PCMPI`, `KSPCheckPCMPI()`, `PetscShmgetAllocateArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscShmgetDeallocateArray\"))\n\"\"\"\nfunction PetscShmgetDeallocateArray(petsclib::PetscLibType, addr::Vector{Cvoid}) end\n\n@for_petsc function PetscShmgetDeallocateArray(petsclib::$UnionPetscLib, addr::Vector{Cvoid} )\n\taddr_ = Ref(pointer(addr))\n\n    @chk ccall(\n               (:PetscShmgetDeallocateArray, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Ptr{Cvoid}},),\n               addr_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMPIDump(petsclib::PetscLibType,fd::Libc.FILE) \nDumps a listing of incomplete MPI operations, such as sends that\nhave never been received, etc.\n\nCollective on `PETSC_COMM_WORLD`\n\nInput Parameter:\n- `fd` - file pointer.  If fp is `NULL`, `stdout` is assumed.\n\nOptions Database Key:\n- `-mpidump` - Dumps MPI incompleteness during call to PetscFinalize()\n\nLevel: developer\n\n-seealso: `PetscMallocDump()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMPIDump\"))\n\"\"\"\nfunction PetscMPIDump(petsclib::PetscLibType, fd::Libc.FILE) end\n\n@for_petsc function PetscMPIDump(petsclib::$UnionPetscLib, fd::Libc.FILE )\n\n    @chk ccall(\n               (:PetscMPIDump, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Libc.FILE},),\n               fd,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortIntWithPermutation(petsclib::PetscLibType,n::PetscInt, i::Vector{PetscInt}, idx::Vector{PetscInt}) \nComputes the permutation of `PetscInt` that gives\na sorted sequence.\n\nNot Collective\n\nInput Parameters:\n- `n`   - number of values to sort\n- `i`   - values to sort\n- `idx` - permutation array. Must be initialized to 0:`n`-1 on input.\n\nLevel: intermediate\n\n-seealso: `PetscSortInt()`, `PetscSortRealWithPermutation()`, `PetscSortIntWithArray()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortIntWithPermutation\"))\n\"\"\"\nfunction PetscSortIntWithPermutation(petsclib::PetscLibType, n::PetscInt, i::Vector{PetscInt}, idx::Vector{PetscInt}) end\n\n@for_petsc function PetscSortIntWithPermutation(petsclib::$UnionPetscLib, n::$PetscInt, i::Vector{$PetscInt}, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortIntWithPermutation, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               n, i, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortRealWithPermutation(petsclib::PetscLibType,n::PetscInt, i::Vector{PetscReal}, idx::Vector{PetscInt}) \nComputes the permutation of `PetscReal` that gives\na sorted sequence.\n\nNot Collective\n\nInput Parameters:\n- `n`   - number of values to sort\n- `i`   - values to sort\n- `idx` - permutation array. Must be initialized to 0:`n`-1 on input.\n\nLevel: intermediate\n\n-seealso: `PetscSortReal()`, `PetscSortIntWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortRealWithPermutation\"))\n\"\"\"\nfunction PetscSortRealWithPermutation(petsclib::PetscLibType, n::PetscInt, i::Vector{PetscReal}, idx::Vector{PetscInt}) end\n\n@for_petsc function PetscSortRealWithPermutation(petsclib::$UnionPetscLib, n::$PetscInt, i::Vector{$PetscReal}, idx::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:PetscSortRealWithPermutation, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               n, i, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSortStrWithPermutation(petsclib::PetscLibType,n::PetscInt, i::Vector{Cchar}, idx::Vector{PetscInt}) \nComputes the permutation of strings that gives\na sorted sequence.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `n`   - number of values to sort\n- `i`   - values to sort\n- `idx` - permutation array. Must be initialized to 0:`n`-1 on input.\n\nLevel: intermediate\n\n-seealso: `PetscSortInt()`, `PetscSortRealWithPermutation()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSortStrWithPermutation\"))\n\"\"\"\nfunction PetscSortStrWithPermutation(petsclib::PetscLibType, n::PetscInt, i::Vector{Cchar}, idx::Vector{PetscInt}) end\n\n@for_petsc function PetscSortStrWithPermutation(petsclib::$UnionPetscLib, n::$PetscInt, i::Vector{Cchar}, idx::Vector{$PetscInt} )\n\ti_ = Ref(pointer(i))\n\n    @chk ccall(\n               (:PetscSortStrWithPermutation, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Ptr{Cchar}}, Ptr{$PetscInt}),\n               n, i_, idx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSleep(petsclib::PetscLibType,s::PetscReal) \nSleeps some number of seconds.\n\nNot Collective\n\nInput Parameter:\n- `s` - number of seconds to sleep\n\nLevel: intermediate\n\n-seealso: `PetscTime()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSleep\"))\n\"\"\"\nfunction PetscSleep(petsclib::PetscLibType, s::PetscReal) end\n\n@for_petsc function PetscSleep(petsclib::$UnionPetscLib, s::$PetscReal )\n\n    @chk ccall(\n               (:PetscSleep, $petsc_library),\n               PetscErrorCode,\n               ($PetscReal,),\n               s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBarrier(petsclib::PetscLibType,obj::PetscObject) \nBlocks until this routine is executed by all processors owning the object `obj`.\n\nInput Parameter:\n- `obj` - PETSc object  (`Mat`, `Vec`, `IS`, `SNES` etc...)\n\nLevel: intermediate\n\n-seealso: `PetscObject`, `MPI_Comm`, `MPI_Barrier`\n\n# External Links\n$(_doc_external(\"Sys/PetscBarrier\"))\n\"\"\"\nfunction PetscBarrier(petsclib::PetscLibType, obj::PetscObject) end\n\n@for_petsc function PetscBarrier(petsclib::$UnionPetscLib, obj::PetscObject )\n\n    @chk ccall(\n               (:PetscBarrier, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               obj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSequentialPhaseBegin(petsclib::PetscLibType,comm::MPI_Comm, ng::Cint) \nBegins a sequential section of code.\n\nCollective\n\nInput Parameters:\n- `comm` - Communicator to sequentialize over\n- `ng`   - Number in processor group.  This many processes are allowed to execute\nat the same time (usually 1)\n\nLevel: intermediate\n\n-seealso: `PetscSequentialPhaseEnd()`, `PetscSynchronizedPrintf()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSequentialPhaseBegin\"))\n\"\"\"\nfunction PetscSequentialPhaseBegin(petsclib::PetscLibType, comm::MPI_Comm, ng::Cint) end\n\n@for_petsc function PetscSequentialPhaseBegin(petsclib::$UnionPetscLib, comm::MPI_Comm, ng::Cint )\n\n    @chk ccall(\n               (:PetscSequentialPhaseBegin, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Cint),\n               comm, ng,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSequentialPhaseEnd(petsclib::PetscLibType,comm::MPI_Comm, ng::Cint) \nEnds a sequential section of code.\n\nCollective\n\nInput Parameters:\n- `comm` - Communicator to sequentialize.\n- `ng`   - Number in processor group.  This many processes are allowed to execute\nat the same time (usually 1)\n\nLevel: intermediate\n\n-seealso: `PetscSequentialPhaseBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSequentialPhaseEnd\"))\n\"\"\"\nfunction PetscSequentialPhaseEnd(petsclib::PetscLibType, comm::MPI_Comm, ng::Cint) end\n\n@for_petsc function PetscSequentialPhaseEnd(petsclib::$UnionPetscLib, comm::MPI_Comm, ng::Cint )\n\n    @chk ccall(\n               (:PetscSequentialPhaseEnd, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Cint),\n               comm, ng,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tminMaxValGlobal::Vector{PetscInt} = PetscGlobalMinMaxInt(petsclib::PetscLibType,comm::MPI_Comm, minMaxVal::Vector{PetscInt}) \nGet the global min/max from local min/max input\n\nCollective\n\nInput Parameters:\n- `comm`      - The MPI communicator to reduce with\n- `minMaxVal` - An array with the local min and max\n\nOutput Parameter:\n- `minMaxValGlobal` - An array with the global min and max\n\nLevel: beginner\n\n-seealso: `PetscSplitOwnership()`, `PetscGlobalMinMaxReal()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGlobalMinMaxInt\"))\n\"\"\"\nfunction PetscGlobalMinMaxInt(petsclib::PetscLibType, comm::MPI_Comm, minMaxVal::Vector{PetscInt}) end\n\n@for_petsc function PetscGlobalMinMaxInt(petsclib::$UnionPetscLib, comm::MPI_Comm, minMaxVal::Vector{$PetscInt} )\n\tminMaxValGlobal = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscGlobalMinMaxInt, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               comm, minMaxVal, minMaxValGlobal,\n              )\n\n\n\treturn minMaxValGlobal\nend \n\n\"\"\"\n\tminMaxValGlobal::Vector{PetscReal} = PetscGlobalMinMaxReal(petsclib::PetscLibType,comm::MPI_Comm, minMaxVal::Vector{PetscReal}) \nGet the global min/max from local min/max input\n\nCollective\n\nInput Parameters:\n- `comm`      - The MPI communicator to reduce with\n- `minMaxVal` - An array with the local min and max\n\nOutput Parameter:\n- `minMaxValGlobal` - An array with the global min and max\n\nLevel: beginner\n\n-seealso: `PetscSplitOwnership()`, `PetscGlobalMinMaxInt()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGlobalMinMaxReal\"))\n\"\"\"\nfunction PetscGlobalMinMaxReal(petsclib::PetscLibType, comm::MPI_Comm, minMaxVal::Vector{PetscReal}) end\n\n@for_petsc function PetscGlobalMinMaxReal(petsclib::$UnionPetscLib, comm::MPI_Comm, minMaxVal::Vector{$PetscReal} )\n\tminMaxValGlobal = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscGlobalMinMaxReal, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               comm, minMaxVal, minMaxValGlobal,\n              )\n\n\n\treturn minMaxValGlobal\nend \n\n\"\"\"\n\te::PetscBool = PetscMemcmp(petsclib::PetscLibType,str1::Cvoid, str2::Cvoid, len::Csize_t) \nCompares two byte streams in memory.\n\nNot Collective\n\nInput Parameters:\n- `str1` - Pointer to the first byte stream\n- `str2` - Pointer to the second byte stream\n- `len`  - The length of the byte stream\n(both str1 and str2 are assumed to be of length len)\n\nOutput Parameter:\n- `e` - `PETSC_TRUE` if equal else `PETSC_FALSE`.\n\nLevel: intermediate\n\n-seealso: `PetscMemcpy()`, `PetscArrayzero()`, `PetscMemzero()`, `PetscArraycmp()`, `PetscArraycpy()`, `PetscStrallocpy()`,\n`PetscArraymove()`\n\n# External Links\n$(_doc_external(\"Sys/PetscMemcmp\"))\n\"\"\"\nfunction PetscMemcmp(petsclib::PetscLibType, str1::Cvoid, str2::Cvoid, len::Csize_t) end\n\n@for_petsc function PetscMemcmp(petsclib::$UnionPetscLib, str1::Cvoid, str2::Cvoid, len::Csize_t )\n\te_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscMemcmp, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t, Ptr{PetscBool}),\n               str1, str2, len, e_,\n              )\n\n\te = e_[]\n\n\treturn e\nend \n\n\"\"\"\n\tPetscProcessPlacementView(petsclib::PetscLibType,viewer::PetscViewer) \ndisplay the MPI rank placement by core\n\nInput Parameter:\n- `viewer` - `PETSCVIEWERASCII` to display the results on\n\nLevel: intermediate\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Sys/PetscProcessPlacementView\"))\n\"\"\"\nfunction PetscProcessPlacementView(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscProcessPlacementView(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscProcessPlacementView, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetUserName(petsclib::PetscLibType,name::Vector{Cchar}, nlen::Csize_t) \nReturns the name of the user.\n\nNot Collective\n\nInput Parameter:\n- `nlen` - length of name\n\nOutput Parameter:\n- `name` - contains user name. Must be long enough to hold the name\n\nLevel: developer\n\n-seealso: `PetscGetHostName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetUserName\"))\n\"\"\"\nfunction PetscGetUserName(petsclib::PetscLibType, name::Vector{Cchar}, nlen::Csize_t) end\n\n@for_petsc function PetscGetUserName(petsclib::$UnionPetscLib, name::Vector{Cchar}, nlen::Csize_t )\n\n    @chk ccall(\n               (:PetscGetUserName, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               name, nlen,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetDate(petsclib::PetscLibType,date::Vector{Cchar}, len::Csize_t) \nGets the current date.\n\nNot Collective\n\nInput Parameter:\n- `len` - length of string to hold date\n\nOutput Parameter:\n- `date` - the date\n\nLevel: beginner\n\n-seealso: `PetscGetHostName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetDate\"))\n\"\"\"\nfunction PetscGetDate(petsclib::PetscLibType, date::Vector{Cchar}, len::Csize_t) end\n\n@for_petsc function PetscGetDate(petsclib::$UnionPetscLib, date::Vector{Cchar}, len::Csize_t )\n\n    @chk ccall(\n               (:PetscGetDate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Csize_t),\n               date, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetCPUTime(petsclib::PetscLibType,t::PetscLogDouble) \nReturns the CPU time in seconds used by the process.\n\nNot Collective\n\nOutput Parameter:\n- `t`   - Time in seconds charged to the process.\n\nExample:\n-seealso: `PetscTime()`, `PetscLogView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetCPUTime\"))\n\"\"\"\nfunction PetscGetCPUTime(petsclib::PetscLibType, t::PetscLogDouble) end\n\n@for_petsc function PetscGetCPUTime(petsclib::$UnionPetscLib, t::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscGetCPUTime, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tenabled::PetscBool = PetscInfoEnabled(petsclib::PetscLibType,classid::PetscClassId) \nChecks whether a given `PetscClassid` is allowed to print using `PetscInfo()`\n\nNot Collective\n\nInput Parameter:\n- `classid` - `PetscClassid` retrieved from a `PetscObject` e.g. `VEC_CLASSID`\n\nOutput Parameter:\n- `enabled` - `PetscBool` indicating whether this classid is allowed to print\n\nLevel: advanced\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoAllow()`, `PetscInfoGetInfo()`, `PetscObjectGetClassid()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoEnabled\"))\n\"\"\"\nfunction PetscInfoEnabled(petsclib::PetscLibType, classid::PetscClassId) end\n\n@for_petsc function PetscInfoEnabled(petsclib::$UnionPetscLib, classid::PetscClassId )\n\tenabled_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscInfoEnabled, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId, Ptr{PetscBool}),\n               classid, enabled_,\n              )\n\n\tenabled = enabled_[]\n\n\treturn enabled\nend \n\n\"\"\"\n\tPetscInfoAllow(petsclib::PetscLibType,flag::PetscBool) \nEnables/disables `PetscInfo()` messages\n\nNot Collective\n\nInput Parameter:\n- `flag` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoEnabled()`, `PetscInfoGetInfo()`, `PetscInfoSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoAllow\"))\n\"\"\"\nfunction PetscInfoAllow(petsclib::PetscLibType, flag::PetscBool) end\n\n@for_petsc function PetscInfoAllow(petsclib::$UnionPetscLib, flag::PetscBool )\n\n    @chk ccall(\n               (:PetscInfoAllow, $petsc_library),\n               PetscErrorCode,\n               (PetscBool,),\n               flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoSetFile(petsclib::PetscLibType,filename::Vector{Cchar}, mode::Vector{Cchar}) \nSets the printing destination for all `PetscInfo()` calls\n\nNot Collective\n\nInput Parameters:\n- `filename` - Name of the file where `PetscInfo()` will print to, use `NULL` to write to `PETSC_STDOUT`.\n- `mode`     - Write mode passed to `PetscFOpen()`\n\nLevel: advanced\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoGetFile()`, `PetscInfoSetFromOptions()`, `PetscFOpen()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoSetFile\"))\n\"\"\"\nfunction PetscInfoSetFile(petsclib::PetscLibType, filename::Vector{Cchar}, mode::Vector{Cchar}) end\n\n@for_petsc function PetscInfoSetFile(petsclib::$UnionPetscLib, filename::Vector{Cchar}, mode::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscInfoSetFile, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}),\n               filename, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoGetFile(petsclib::PetscLibType,filename::Vector{Cchar}, InfoFile::Libc.FILE) \nGets the `filename` and `FILE` pointer of the file where `PetscInfo()` prints to\n\nNot Collective; No Fortran Support\n\nOutput Parameters:\n- `filename` - The name of the output file\n- `InfoFile` - The `FILE` pointer for the output file\n\nLevel: advanced\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoSetFile()`, `PetscInfoSetFromOptions()`, `PetscInfoDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoGetFile\"))\n\"\"\"\nfunction PetscInfoGetFile(petsclib::PetscLibType, filename::Vector{Cchar}, InfoFile::Libc.FILE) end\n\n@for_petsc function PetscInfoGetFile(petsclib::$UnionPetscLib, filename::Vector{Cchar}, InfoFile::Libc.FILE )\n\tfilename_ = Ref(pointer(filename))\n\n    @chk ccall(\n               (:PetscInfoGetFile, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Ptr{Cchar}}, Libc.FILE),\n               filename_, InfoFile,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoSetClasses(petsclib::PetscLibType,exclude::PetscBool, n::PetscInt, classnames::Cchar) \nSets the classes which `PetscInfo()` is filtered for/against\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `exclude`    - Whether or not to invert the filter, i.e. if exclude is true, `PetscInfo()` will print from every class that\nis NOT one of the classes specified\n- `n`          - Number of classes to filter for (size of `classnames`)\n- `classnames` - String array containing the names of classes to filter for, e.g. \"vec\"\n\nLevel: developer\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoGetClass()`, `PetscInfoProcessClass()`, `PetscInfoSetFromOptions()`, `PetscStrToArray()`, `PetscObjectGetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoSetClasses\"))\n\"\"\"\nfunction PetscInfoSetClasses(petsclib::PetscLibType, exclude::PetscBool, n::PetscInt, classnames::Cchar) end\n\n@for_petsc function PetscInfoSetClasses(petsclib::$UnionPetscLib, exclude::PetscBool, n::$PetscInt, classnames::Cchar )\n\n    @chk ccall(\n               (:PetscInfoSetClasses, $petsc_library),\n               PetscErrorCode,\n               (PetscBool, $PetscInt, Cchar),\n               exclude, n, classnames,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfound::PetscBool = PetscInfoGetClass(petsclib::PetscLibType,classname::Vector{Cchar}) \nIndicates whether the provided `classname` is marked as a filter in `PetscInfo()` as set by `PetscInfoSetClasses()`\n\nNot Collective\n\nInput Parameter:\n- `classname` - Name of the class to search for\n\nOutput Parameter:\n- `found` - `PetscBool` indicating whether the classname was found\n\nLevel: developer\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoSetClasses()`, `PetscInfoSetFromOptions()`, `PetscObjectGetName()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoGetClass\"))\n\"\"\"\nfunction PetscInfoGetClass(petsclib::PetscLibType, classname::Vector{Cchar}) end\n\n@for_petsc function PetscInfoGetClass(petsclib::$UnionPetscLib, classname::Vector{Cchar} )\n\tfound_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscInfoGetClass, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscBool}),\n               classname, found_,\n              )\n\n\tfound = found_[]\n\n\treturn found\nend \n\n\"\"\"\n\tinfoEnabled::PetscBool,classesSet::PetscBool,exclude::PetscBool,locked::PetscBool = PetscInfoGetInfo(petsclib::PetscLibType,commSelfFlag::PetscInfoCommFlag) \nReturns the current state of several flags for `PetscInfo()`\n\nNot Collective\n\nOutput Parameters:\n- `infoEnabled`  - `PETSC_TRUE` if `PetscInfoAllow`(`PETSC_TRUE`) has been called\n- `classesSet`   - `PETSC_TRUE` if the list of classes to filter for has been set\n- `exclude`      - `PETSC_TRUE` if the class filtering for `PetscInfo()` is inverted\n- `locked`       - `PETSC_TRUE` if the list of classes to filter for has been locked\n- `commSelfFlag` - Enum indicating whether `PetscInfo()` will print for communicators of size 1, any size != 1, or all\ncommunicators\n\nLevel: developer\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoAllow()`, `PetscInfoSetFilterCommSelf`, `PetscInfoSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoGetInfo\"))\n\"\"\"\nfunction PetscInfoGetInfo(petsclib::PetscLibType, commSelfFlag::PetscInfoCommFlag) end\n\n@for_petsc function PetscInfoGetInfo(petsclib::$UnionPetscLib, commSelfFlag::PetscInfoCommFlag )\n\tinfoEnabled_ = Ref{PetscBool}()\n\tclassesSet_ = Ref{PetscBool}()\n\texclude_ = Ref{PetscBool}()\n\tlocked_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscInfoGetInfo, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool}, Ptr{PetscBool}, Ptr{PetscBool}, Ptr{PetscBool}, Ptr{PetscInfoCommFlag}),\n               infoEnabled_, classesSet_, exclude_, locked_, commSelfFlag,\n              )\n\n\tinfoEnabled = infoEnabled_[]\n\tclassesSet = classesSet_[]\n\texclude = exclude_[]\n\tlocked = locked_[]\n\n\treturn infoEnabled,classesSet,exclude,locked\nend \n\n\"\"\"\n\tPetscInfoProcessClass(petsclib::PetscLibType,classname::Vector{Cchar}, numClassID::PetscInt, classIDs::Vector{PetscClassId}) \nActivates or deactivates a class based on the filtering status of `PetscInfo()`\n\nNot Collective\n\nInput Parameters:\n- `classname`  - Name of the class to activate/deactivate `PetscInfo()` for\n- `numClassID` - Number of entries in `classIDs`\n- `classIDs`   - Array containing all of the `PetscClassId`s associated with `classname`\n\nOptions Database Key:\n- `-info [filename][:[~]<list,of,classnames>[:[~]self]]` - specify which informative messages are printed, see `PetscInfo()`.\n\nLevel: developer\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoActivateClass()`, `PetscInfoDeactivateClass()`, `PetscInfoSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoProcessClass\"))\n\"\"\"\nfunction PetscInfoProcessClass(petsclib::PetscLibType, classname::Vector{Cchar}, numClassID::PetscInt, classIDs::Vector{PetscClassId}) end\n\n@for_petsc function PetscInfoProcessClass(petsclib::$UnionPetscLib, classname::Vector{Cchar}, numClassID::$PetscInt, classIDs::Vector{PetscClassId} )\n\n    @chk ccall(\n               (:PetscInfoProcessClass, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, $PetscInt, Ptr{PetscClassId}),\n               classname, numClassID, classIDs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoSetFilterCommSelf(petsclib::PetscLibType,commSelfFlag::PetscInfoCommFlag) \nSets `PetscInfoCommFlag` enum to determine communicator filtering for `PetscInfo()`\n\nNot Collective\n\nInput Parameter:\n- `commSelfFlag` - Enum value indicating method with which to filter `PetscInfo()` based on the size of the communicator of the object calling `PetscInfo()`\n\nOptions Database Key:\n- `-info [filename][:[~]<list,of,classnames>[:[~]self]]` - specify which informative messages are printed, See `PetscInfo()`.\n\nLevel: advanced\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoGetInfo()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoSetFilterCommSelf\"))\n\"\"\"\nfunction PetscInfoSetFilterCommSelf(petsclib::PetscLibType, commSelfFlag::PetscInfoCommFlag) end\n\n@for_petsc function PetscInfoSetFilterCommSelf(petsclib::$UnionPetscLib, commSelfFlag::PetscInfoCommFlag )\n\n    @chk ccall(\n               (:PetscInfoSetFilterCommSelf, $petsc_library),\n               PetscErrorCode,\n               (PetscInfoCommFlag,),\n               commSelfFlag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoSetFromOptions(petsclib::PetscLibType,options::PetscOptions) \nConfigure `PetscInfo()` using command line options, enabling or disabling various calls to `PetscInfo()`\n\nNot Collective\n\nInput Parameter:\n- `options` - Options database, use `NULL` for default global database\n\nOptions Database Key:\n- `-info [filename][:[~]<list,of,classnames>[:[~]self]]` - specify which informative messages are printed, See `PetscInfo()`.\n\nLevel: advanced\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoAllow()`, `PetscInfoSetFile()`, `PetscInfoSetClasses()`, `PetscInfoSetFilterCommSelf()`, `PetscInfoDestroy()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoSetFromOptions\"))\n\"\"\"\nfunction PetscInfoSetFromOptions(petsclib::PetscLibType, options::PetscOptions) end\n\n@for_petsc function PetscInfoSetFromOptions(petsclib::$UnionPetscLib, options::PetscOptions )\n\n    @chk ccall(\n               (:PetscInfoSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (COptions,),\n               options,\n              )\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoDestroy(petsclib::PetscLibType) \nDestroys and resets internal `PetscInfo()` data structures.\n\nNot Collective\n\nLevel: developer\n\n-seealso: [](sec_PetscInfo), `PetscInfo()`, `PetscInfoSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoDestroy\"))\n\"\"\"\nfunction PetscInfoDestroy(petsclib::PetscLibType) end\n\n@for_petsc function PetscInfoDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscInfoDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoDeactivateClass(petsclib::PetscLibType,classid::PetscClassId) \nDeactivates `PetscInfo()` messages for a PETSc object class.\n\nNot Collective\n\nInput Parameter:\n- `classid` - The object class,  e.g., `MAT_CLASSID`, `SNES_CLASSID`, etc.\n\nOptions Database Key:\n- `-info [filename][:[~]<list,of,classnames>[:[~]self]]` - specify which informative messages are printed, See `PetscInfo()`.\n\nLevel: developer\n\n-seealso: [](sec_PetscInfo), `PetscInfoActivateClass()`, `PetscInfo()`, `PetscInfoAllow()`, `PetscInfoSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoDeactivateClass\"))\n\"\"\"\nfunction PetscInfoDeactivateClass(petsclib::PetscLibType, classid::PetscClassId) end\n\n@for_petsc function PetscInfoDeactivateClass(petsclib::$UnionPetscLib, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscInfoDeactivateClass, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId,),\n               classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscInfoActivateClass(petsclib::PetscLibType,classid::PetscClassId) \nActivates `PetscInfo()` messages for a PETSc object class.\n\nNot Collective\n\nInput Parameter:\n- `classid` - The object class, e.g., `MAT_CLASSID`, `SNES_CLASSID`, etc.\n\nOptions Database Key:\n- `-info [filename][:[~]<list,of,classnames>[:[~]self]]` - specify which informative messages are printed, See `PetscInfo()`.\n\nLevel: developer\n\n-seealso: [](sec_PetscInfo), `PetscInfoDeactivateClass()`, `PetscInfo()`, `PetscInfoAllow()`, `PetscInfoSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Sys/PetscInfoActivateClass\"))\n\"\"\"\nfunction PetscInfoActivateClass(petsclib::PetscLibType, classid::PetscClassId) end\n\n@for_petsc function PetscInfoActivateClass(petsclib::$UnionPetscLib, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscInfoActivateClass, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId,),\n               classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLOpen(petsclib::PetscLibType,name::Vector{Cchar}, mode::PetscDLMode, handle::PetscDLHandle) \nopens a dynamic library\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `name` - name of library\n- `mode` - options on how to open library\n\nOutput Parameter:\n- `handle` - opaque pointer to be used with `PetscDLSym()`\n\nLevel: developer\n\n-seealso: `PetscDLClose()`, `PetscDLSym()`, `PetscDLAddr()`, `PetscDLLibrary`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryAppend()`,\n`PetscDLLibraryRetrieve()`, `PetscDLLibraryOpen()`, `PetscDLLibraryClose()`, `PetscDLLibrarySym()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLOpen\"))\n\"\"\"\nfunction PetscDLOpen(petsclib::PetscLibType, name::Vector{Cchar}, mode::PetscDLMode, handle::PetscDLHandle) end\n\n@for_petsc function PetscDLOpen(petsclib::$UnionPetscLib, name::Vector{Cchar}, mode::PetscDLMode, handle::PetscDLHandle )\n\n    @chk ccall(\n               (:PetscDLOpen, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PetscDLMode, Ptr{PetscDLHandle}),\n               name, mode, handle,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLClose(petsclib::PetscLibType,handle::PetscDLHandle) \ncloses a dynamic library\n\nNot Collective, No Fortran Support\n\nInput Parameter:\n- `handle` - the handle for the library obtained with `PetscDLOpen()`\n\nLevel: developer\n\n-seealso: `PetscDLOpen()`, `PetscDLSym()`, `PetscDLAddr()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLClose\"))\n\"\"\"\nfunction PetscDLClose(petsclib::PetscLibType, handle::PetscDLHandle) end\n\n@for_petsc function PetscDLClose(petsclib::$UnionPetscLib, handle::PetscDLHandle )\n\n    @chk ccall(\n               (:PetscDLClose, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscDLHandle},),\n               handle,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLSym(petsclib::PetscLibType,handle::PetscDLHandle, symbol::Vector{Cchar}, value::Cvoid) \nfinds a symbol in a dynamic library\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `handle` - obtained with `PetscDLOpen()` or `NULL`\n- `symbol` - name of symbol\n\nOutput Parameter:\n- `value` - pointer to the function, `NULL` if not found\n\nLevel: developer\n\n-seealso: `PetscDLClose()`, `PetscDLOpen()`, `PetscDLAddr()`, `PetscDLLibrary`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryAppend()`,\n`PetscDLLibraryRetrieve()`, `PetscDLLibraryOpen()`, `PetscDLLibraryClose()`, `PetscDLLibrarySym()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLSym\"))\n\"\"\"\nfunction PetscDLSym(petsclib::PetscLibType, handle::PetscDLHandle, symbol::Vector{Cchar}, value::Cvoid) end\n\n@for_petsc function PetscDLSym(petsclib::$UnionPetscLib, handle::PetscDLHandle, symbol::Vector{Cchar}, value::Cvoid )\n\n    @chk ccall(\n               (:PetscDLSym, $petsc_library),\n               PetscErrorCode,\n               (PetscDLHandle, Ptr{Cchar}, Cvoid),\n               handle, symbol, value,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDLAddr(petsclib::PetscLibType,func::PetscVoidFn, name::Vector{Cchar}) \nfind the name of a symbol in a dynamic library\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `func` - pointer to the function, `NULL` if not found\n\nOutput Parameter:\n- `name` - name of symbol, or `NULL` if name lookup is not supported.\n\nLevel: developer\n\n-seealso: `PetscDLClose()`, `PetscDLSym()`, `PetscDLOpen()`, `PetscDLLibrary`, `PetscLoadDynamicLibrary()`, `PetscDLLibraryAppend()`,\n`PetscDLLibraryRetrieve()`, `PetscDLLibraryOpen()`, `PetscDLLibraryClose()`, `PetscDLLibrarySym()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDLAddr\"))\n\"\"\"\nfunction PetscDLAddr(petsclib::PetscLibType, func::PetscVoidFn, name::Vector{Cchar}) end\n\n@for_petsc function PetscDLAddr(petsclib::$UnionPetscLib, func::PetscVoidFn, name::Vector{Cchar} )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscDLAddr, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscVoidFn}, Ptr{Ptr{Cchar}}),\n               func, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDemangleSymbol(petsclib::PetscLibType,mangledName::Vector{Cchar}, name::Cchar) \n\n# External Links\n$(_doc_external(\"Sys/PetscDemangleSymbol\"))\n\"\"\"\nfunction PetscDemangleSymbol(petsclib::PetscLibType, mangledName::Vector{Cchar}, name::Cchar) end\n\n@for_petsc function PetscDemangleSymbol(petsclib::$UnionPetscLib, mangledName::Vector{Cchar}, name::Cchar )\n\n    @chk ccall(\n               (:PetscDemangleSymbol, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar),\n               mangledName, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscErrorPrintfInitialize(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscErrorPrintfInitialize\"))\n\"\"\"\nfunction PetscErrorPrintfInitialize(petsclib::PetscLibType) end\n\n@for_petsc function PetscErrorPrintfInitialize(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscErrorPrintfInitialize, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFPTrapPush(petsclib::PetscLibType,trap::PetscFPTrap) \npush a floating point trapping mode, restored using `PetscFPTrapPop()`\n\nNot Collective\n\nInput Parameter:\n- `trap` - `PETSC_FP_TRAP_ON` or `PETSC_FP_TRAP_OFF` or any of the values passable to `PetscSetFPTrap()`\n\nLevel: advanced\n\n-seealso: `PetscFPTrapPop()`, `PetscSetFPTrap()`, `PetscDetermineInitialFPTrap()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFPTrapPush\"))\n\"\"\"\nfunction PetscFPTrapPush(petsclib::PetscLibType, trap::PetscFPTrap) end\n\n@for_petsc function PetscFPTrapPush(petsclib::$UnionPetscLib, trap::PetscFPTrap )\n\n    @chk ccall(\n               (:PetscFPTrapPush, $petsc_library),\n               PetscErrorCode,\n               (PetscFPTrap,),\n               trap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscFPTrapPop(petsclib::PetscLibType) \npush a floating point trapping mode, to be restored using `PetscFPTrapPop()`\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `PetscFPTrapPush()`, `PetscSetFPTrap()`, `PetscDetermineInitialFPTrap()`\n\n# External Links\n$(_doc_external(\"Sys/PetscFPTrapPop\"))\n\"\"\"\nfunction PetscFPTrapPop(petsclib::PetscLibType) end\n\n@for_petsc function PetscFPTrapPop(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscFPTrapPop, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSetFPTrap(petsclib::PetscLibType,flag::PetscFPTrap) \nEnables traps/exceptions on common floating point errors. This option may not work on certain systems or only a\nsubset of exceptions may be trapable.\n\nNot Collective\n\nInput Parameter:\n- `flag`  - values are\n-seealso: `PetscFPTrapPush()`, `PetscFPTrapPop()`, `PetscDetermineInitialFPTrap()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSetFPTrap\"))\n\"\"\"\nfunction PetscSetFPTrap(petsclib::PetscLibType, flag::PetscFPTrap) end\n\n@for_petsc function PetscSetFPTrap(petsclib::$UnionPetscLib, flag::PetscFPTrap )\n\n    @chk ccall(\n               (:PetscSetFPTrap, $petsc_library),\n               PetscErrorCode,\n               (PetscFPTrap,),\n               flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDetermineInitialFPTrap(petsclib::PetscLibType) \nAttempts to determine the floating point trapping that exists when `PetscInitialize()` is called\n\nNot Collective\n\n-seealso: `PetscFPTrapPush()`, `PetscFPTrapPop()`, `PetscDetermineInitialFPTrap()`\n\n# External Links\n$(_doc_external(\"Sys/PetscDetermineInitialFPTrap\"))\n\"\"\"\nfunction PetscDetermineInitialFPTrap(petsclib::PetscLibType) end\n\n@for_petsc function PetscDetermineInitialFPTrap(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscDetermineInitialFPTrap, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscCheckPointerSetIntensity(petsclib::PetscLibType,intensity::PetscInt) \nSet the intensity of debug pointer checks\n\nNot Collective\n\nInput Parameter:\n- `intensity` - how much to check pointers for validity\n\nOptions Database Key:\n- `-check_pointer_intensity` - intensity (0, 1, or 2)\n\nLevel: advanced\n\n-seealso: `PetscCheckPointer()`, `PetscFunctionBeginHot()`\n\n# External Links\n$(_doc_external(\"Sys/PetscCheckPointerSetIntensity\"))\n\"\"\"\nfunction PetscCheckPointerSetIntensity(petsclib::PetscLibType, intensity::PetscInt) end\n\n@for_petsc function PetscCheckPointerSetIntensity(petsclib::$UnionPetscLib, intensity::$PetscInt )\n\n    @chk ccall(\n               (:PetscCheckPointerSetIntensity, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt,),\n               intensity,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSetDebugTerminal(petsclib::PetscLibType,terminal::Vector{Cchar}) \nSets the terminal to use for debugging.\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `terminal` - name of terminal and any flags required to execute a program.\nFor example \"xterm\", \"urxvt -e\", \"gnome-terminal -x\".\nOn Apple macOS you can use \"Terminal\" (note the capital T)\n\nOptions Database Key:\n- `-debug_terminal terminal` - use this terminal instead of the default\n\nLevel: developer\n\n-seealso: `PetscSetDebugger()`, `PetscAttachDebugger()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSetDebugTerminal\"))\n\"\"\"\nfunction PetscSetDebugTerminal(petsclib::PetscLibType, terminal::Vector{Cchar}) end\n\n@for_petsc function PetscSetDebugTerminal(petsclib::$UnionPetscLib, terminal::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscSetDebugTerminal, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               terminal,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSetDebugger(petsclib::PetscLibType,debugger::Vector{Cchar}, usedebugterminal::PetscBool) \nSets options associated with the debugger.\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `debugger`         - name of debugger, which should be in your path,\nusually \"lldb\", \"dbx\", \"gdb\", \"cuda-gdb\", \"idb\", \"xxgdb\", \"kdgb\" or \"ddd\". Also, HP-UX\nsupports \"xdb\", and IBM rs6000 supports \"xldb\".\n\n- `usedebugterminal` - flag to indicate debugger window, set to either `PETSC_TRUE` (to indicate\ndebugger should be started in a new terminal window) or `PETSC_FALSE` (to start debugger\nin initial window (the option `PETSC_FALSE` makes no sense when using more\nthan one MPI process.)\n\nLevel: developer\n\n-seealso: `PetscAttachDebugger()`, `PetscAttachDebuggerErrorHandler()`, `PetscSetDebugTerminal()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSetDebugger\"))\n\"\"\"\nfunction PetscSetDebugger(petsclib::PetscLibType, debugger::Vector{Cchar}, usedebugterminal::PetscBool) end\n\n@for_petsc function PetscSetDebugger(petsclib::$UnionPetscLib, debugger::Vector{Cchar}, usedebugterminal::PetscBool )\n\n    @chk ccall(\n               (:PetscSetDebugger, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PetscBool),\n               debugger, usedebugterminal,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSetDefaultDebugger(petsclib::PetscLibType) \nCauses PETSc to use its default debugger and output terminal\n\nNot Collective, No Fortran Support\n\nLevel: developer\n\n-seealso: `PetscSetDebugger()`, `PetscSetDebuggerFromString()`, `PetscAttachDebugger()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSetDefaultDebugger\"))\n\"\"\"\nfunction PetscSetDefaultDebugger(petsclib::PetscLibType) end\n\n@for_petsc function PetscSetDefaultDebugger(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscSetDefaultDebugger, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSetDebuggerFromString(petsclib::PetscLibType,string::Vector{Cchar}) \nSet the complete path for the\ndebugger for PETSc to use.\n\nNot Collective\n\nInput Parameter:\n- `string` - the name of the debugger, for example \"gdb\"\n\nLevel: developer\n\n-seealso: `PetscSetDebugger()`, `PetscSetDefaultDebugger()`, `PetscAttachDebugger()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSetDebuggerFromString\"))\n\"\"\"\nfunction PetscSetDebuggerFromString(petsclib::PetscLibType, string::Vector{Cchar}) end\n\n@for_petsc function PetscSetDebuggerFromString(petsclib::$UnionPetscLib, string::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscSetDebuggerFromString, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               string,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscWaitOnError(petsclib::PetscLibType) \nIf an error is detected and the process would normally exit the main program with `MPI_Abort()` sleep instead\nof exiting.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `PetscSetDebugger()`, `PetscAttachDebugger()`\n\n# External Links\n$(_doc_external(\"Sys/PetscWaitOnError\"))\n\"\"\"\nfunction PetscWaitOnError(petsclib::PetscLibType) end\n\n@for_petsc function PetscWaitOnError(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscWaitOnError, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscAttachDebugger(petsclib::PetscLibType) \nAttaches the debugger to the running process.\n\nNot Collective\n\nOptions Database Keys:\n- `-start_in_debugger [noxterm,lldb or gdb]` - Set debugger debug_terminal xterm or Terminal (for Apple)\n- `-display name`                            - XDisplay to open xterm in\n- `-debugger_ranks m,n`                      - Which MPI ranks on which to start the debugger, defaults to all\n- `-stop_for_debugger`                       - Print a message on how to attach the process with a debugger and then wait for the user to attach\n- `-debugger_pause <secs>`                   - Wait <secs> before attaching the debugger. This is useful for slow connections\nthat take a long time for the Terminal window or xterm to start up.\n\nLevel: advanced\n\n-seealso: `PetscSetDebugger()`, `PetscSetDefaultDebugger()`, `PetscSetDebugTerminal()`, `PetscAttachDebuggerErrorHandler()`, `PetscStopForDebugger()`\n\n# External Links\n$(_doc_external(\"Sys/PetscAttachDebugger\"))\n\"\"\"\nfunction PetscAttachDebugger(petsclib::PetscLibType) end\n\n@for_petsc function PetscAttachDebugger(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscAttachDebugger, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStopForDebugger(petsclib::PetscLibType) \nPrints a message to the screen indicating how to\nattach to the process with the debugger and then waits for the\ndebugger to attach.\n\nNot Collective, No Fortran Support\n\nOptions Database Key:\n- `-stop_for_debugger` - will stop for you to attach the debugger when `PetscInitialize()` is called\n\nLevel: developer\n\n-seealso: `PetscSetDebugger()`, `PetscAttachDebugger()`\n\n# External Links\n$(_doc_external(\"Sys/PetscStopForDebugger\"))\n\"\"\"\nfunction PetscStopForDebugger(petsclib::PetscLibType) end\n\n@for_petsc function PetscStopForDebugger(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscStopForDebugger, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPushErrorHandler(petsclib::PetscLibType,handler::external, ctx::Cvoid) \nSets a routine to be called on detection of errors.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `handler` - error handler routine\n- `ctx`     - optional handler context that contains information needed by the handler (for\nexample file pointers for error messages etc.)\n\nCalling sequence of `handler`:\n- `comm` - communicator over which error occurred\n- `line` - the line number of the error (usually indicated by `__LINE__` in the calling routine)\n- `file` - the file in which the error was detected (usually indicated by `__FILE__` in the calling routine)\n- `fun`  - the function name of the calling routine\n- `n`    - the generic error number (see list defined in include/petscerror.h)\n- `p`    - `PETSC_ERROR_INITIAL` if error just detected, otherwise `PETSC_ERROR_REPEAT`\n- `mess` - an error text string, usually just printed to the screen\n- `ctx`  - the error handler context\n\nOptions Database Keys:\n- `-on_error_attach_debugger <noxterm,lldb or gdb>` - starts up the debugger if an error occurs\n- `-on_error_abort`                                 - aborts the program if an error occurs\n\nLevel: intermediate\n\n-seealso: `PetscPopErrorHandler()`, `PetscAttachDebuggerErrorHandler()`, `PetscAbortErrorHandler()`, `PetscTraceBackErrorHandler()`, `PetscPushSignalHandler()`,\n`PetscErrorType`, `PETSC_ERROR_INITIAL`, `PETSC_ERROR_REPEAT`, `PetscErrorCode`\n\n# External Links\n$(_doc_external(\"Sys/PetscPushErrorHandler\"))\n\"\"\"\nfunction PetscPushErrorHandler(petsclib::PetscLibType, handler::external, ctx::Cvoid) end\n\n@for_petsc function PetscPushErrorHandler(petsclib::$UnionPetscLib, handler::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscPushErrorHandler, $petsc_library),\n               PetscErrorCode,\n               (external, Ptr{Cvoid}),\n               handler, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPopErrorHandler(petsclib::PetscLibType) \nRemoves the latest error handler that was\npushed with `PetscPushErrorHandler()`.\n\nNot Collective\n\nLevel: intermediate\n\n-seealso: `PetscPushErrorHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPopErrorHandler\"))\n\"\"\"\nfunction PetscPopErrorHandler(petsclib::PetscLibType) end\n\n@for_petsc function PetscPopErrorHandler(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscPopErrorHandler, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscIntViewNumColumns(petsclib::PetscLibType,N::PetscInt, Ncol::PetscInt, idx::Vector{PetscInt}, viewer::PetscViewer) \nPrints an array of integers; useful for debugging.\n\nCollective\n\nInput Parameters:\n- `N`      - number of integers in array\n- `Ncol`   - number of integers to print per row\n- `idx`    - array of integers\n- `viewer` - location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0\n\nLevel: intermediate\n\n-seealso: `PetscViewer`, `PetscIntView()`, `PetscRealView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntViewNumColumns\"))\n\"\"\"\nfunction PetscIntViewNumColumns(petsclib::PetscLibType, N::PetscInt, Ncol::PetscInt, idx::Vector{PetscInt}, viewer::PetscViewer) end\n\n@for_petsc function PetscIntViewNumColumns(petsclib::$UnionPetscLib, N::$PetscInt, Ncol::$PetscInt, idx::Vector{$PetscInt}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscIntViewNumColumns, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}, PetscViewer),\n               N, Ncol, idx, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRealViewNumColumns(petsclib::PetscLibType,N::PetscInt, Ncol::PetscInt, idx::Vector{PetscReal}, viewer::PetscViewer) \nPrints an array of doubles; useful for debugging.\n\nCollective\n\nInput Parameters:\n- `N`      - number of `PetscReal` in array\n- `Ncol`   - number of `PetscReal` to print per row\n- `idx`    - array of `PetscReal`\n- `viewer` - location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0\n\nLevel: intermediate\n\n-seealso: `PetscViewer`, `PetscRealView()`, `PetscIntView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRealViewNumColumns\"))\n\"\"\"\nfunction PetscRealViewNumColumns(petsclib::PetscLibType, N::PetscInt, Ncol::PetscInt, idx::Vector{PetscReal}, viewer::PetscViewer) end\n\n@for_petsc function PetscRealViewNumColumns(petsclib::$UnionPetscLib, N::$PetscInt, Ncol::$PetscInt, idx::Vector{$PetscReal}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscRealViewNumColumns, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, PetscViewer),\n               N, Ncol, idx, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscScalarViewNumColumns(petsclib::PetscLibType,N::PetscInt, Ncol::PetscInt, idx::Vector{PetscScalar}, viewer::PetscViewer) \nPrints an array of doubles; useful for debugging.\n\nCollective\n\nInput Parameters:\n- `N`      - number of `PetscScalar` in array\n- `Ncol`   - number of `PetscScalar` to print per row\n- `idx`    - array of `PetscScalar`\n- `viewer` - location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0\n\nLevel: intermediate\n\n-seealso: `PetscViewer`, `PetscRealView()`, `PetscScalarView()`, `PetscIntView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscScalarViewNumColumns\"))\n\"\"\"\nfunction PetscScalarViewNumColumns(petsclib::PetscLibType, N::PetscInt, Ncol::PetscInt, idx::Vector{PetscScalar}, viewer::PetscViewer) end\n\n@for_petsc function PetscScalarViewNumColumns(petsclib::$UnionPetscLib, N::$PetscInt, Ncol::$PetscInt, idx::Vector{$PetscScalar}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscScalarViewNumColumns, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscScalar}, PetscViewer),\n               N, Ncol, idx, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscIntView(petsclib::PetscLibType,N::PetscInt, idx::Vector{PetscInt}, viewer::PetscViewer) \nPrints an array of integers; useful for debugging.\n\nCollective\n\nInput Parameters:\n- `N`      - number of integers in array\n- `idx`    - array of integers\n- `viewer` - location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0\n\nLevel: intermediate\n\n-seealso: `PetscViewer`, `PetscIntViewNumColumns()`, `PetscRealView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscIntView\"))\n\"\"\"\nfunction PetscIntView(petsclib::PetscLibType, N::PetscInt, idx::Vector{PetscInt}, viewer::PetscViewer) end\n\n@for_petsc function PetscIntView(petsclib::$UnionPetscLib, N::$PetscInt, idx::Vector{$PetscInt}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscIntView, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, PetscViewer),\n               N, idx, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscRealView(petsclib::PetscLibType,N::PetscInt, idx::Vector{PetscReal}, viewer::PetscViewer) \nPrints an array of doubles; useful for debugging.\n\nCollective\n\nInput Parameters:\n- `N`      - number of `PetscReal` in array\n- `idx`    - array of `PetscReal`\n- `viewer` - location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0\n\nLevel: intermediate\n\n-seealso: `PetscViewer`, `PetscIntView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscRealView\"))\n\"\"\"\nfunction PetscRealView(petsclib::PetscLibType, N::PetscInt, idx::Vector{PetscReal}, viewer::PetscViewer) end\n\n@for_petsc function PetscRealView(petsclib::$UnionPetscLib, N::$PetscInt, idx::Vector{$PetscReal}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscRealView, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, PetscViewer),\n               N, idx, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscScalarView(petsclib::PetscLibType,N::PetscInt, idx::Vector{PetscScalar}, viewer::PetscViewer) \nPrints an array of `PetscScalar`; useful for debugging.\n\nCollective\n\nInput Parameters:\n- `N`      - number of scalars in array\n- `idx`    - array of scalars\n- `viewer` - location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0\n\nLevel: intermediate\n\n-seealso: `PetscViewer`, `PetscIntView()`, `PetscRealView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscScalarView\"))\n\"\"\"\nfunction PetscScalarView(petsclib::PetscLibType, N::PetscInt, idx::Vector{PetscScalar}, viewer::PetscViewer) end\n\n@for_petsc function PetscScalarView(petsclib::$UnionPetscLib, N::$PetscInt, idx::Vector{$PetscScalar}, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscScalarView, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscScalar}, PetscViewer),\n               N, idx, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscSignalHandlerDefault(petsclib::PetscLibType,sig::Cint, ptr::Cvoid) \nDefault signal handler.\n\nNot Collective\n\nInput Parameters:\n- `sig` - signal value\n- `ptr` - unused pointer\n\nLevel: advanced\n\n-seealso: [](sec_errors), `PetscPushSignalHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscSignalHandlerDefault\"))\n\"\"\"\nfunction PetscSignalHandlerDefault(petsclib::PetscLibType, sig::Cint, ptr::Cvoid) end\n\n@for_petsc function PetscSignalHandlerDefault(petsclib::$UnionPetscLib, sig::Cint, ptr::Cvoid )\n\n    @chk ccall(\n               (:PetscSignalHandlerDefault, $petsc_library),\n               PetscErrorCode,\n               (Cint, Ptr{Cvoid}),\n               sig, ptr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPushSignalHandler(petsclib::PetscLibType,routine::external, ctx::Cvoid) \nCatches the usual fatal errors and\ncalls a user-provided routine.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `routine` - routine to call when a signal is received\n- `ctx`     - optional context needed by the routine\n\nLevel: developer\n\n-seealso: [](sec_errors), `PetscPopSignalHandler()`, `PetscSignalHandlerDefault()`, `PetscPushErrorHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPushSignalHandler\"))\n\"\"\"\nfunction PetscPushSignalHandler(petsclib::PetscLibType, routine::external, ctx::Cvoid) end\n\n@for_petsc function PetscPushSignalHandler(petsclib::$UnionPetscLib, routine::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:PetscPushSignalHandler, $petsc_library),\n               PetscErrorCode,\n               (external, Ptr{Cvoid}),\n               routine, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscPopSignalHandler(petsclib::PetscLibType) \nRemoves the last signal handler that was pushed.\nIf no signal handlers are left on the stack it will remove the PETSc signal handler.\n(That is PETSc will no longer catch signals).\n\nNot Collective\n\nLevel: developer\n\n-seealso: [](sec_errors), `PetscPushSignalHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscPopSignalHandler\"))\n\"\"\"\nfunction PetscPopSignalHandler(petsclib::PetscLibType) end\n\n@for_petsc function PetscPopSignalHandler(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscPopSignalHandler, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscAddLogDouble(petsclib::PetscLibType,tot::PetscLogDouble, tot_th::PetscLogDouble, tmp::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscAddLogDouble\"))\n\"\"\"\nfunction PetscAddLogDouble(petsclib::PetscLibType, tot::PetscLogDouble, tot_th::PetscLogDouble, tmp::PetscLogDouble) end\n\n@for_petsc function PetscAddLogDouble(petsclib::$UnionPetscLib, tot::PetscLogDouble, tot_th::PetscLogDouble, tmp::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscAddLogDouble, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble}, Ptr{PetscLogDouble}, PetscLogDouble),\n               tot, tot_th, tmp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscAddLogDoubleCnt(petsclib::PetscLibType,cnt::PetscLogDouble, tot::PetscLogDouble, cnt_th::PetscLogDouble, tot_th::PetscLogDouble, tmp::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscAddLogDoubleCnt\"))\n\"\"\"\nfunction PetscAddLogDoubleCnt(petsclib::PetscLibType, cnt::PetscLogDouble, tot::PetscLogDouble, cnt_th::PetscLogDouble, tot_th::PetscLogDouble, tmp::PetscLogDouble) end\n\n@for_petsc function PetscAddLogDoubleCnt(petsclib::$UnionPetscLib, cnt::PetscLogDouble, tot::PetscLogDouble, cnt_th::PetscLogDouble, tot_th::PetscLogDouble, tmp::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscAddLogDoubleCnt, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble}, Ptr{PetscLogDouble}, Ptr{PetscLogDouble}, Ptr{PetscLogDouble}, PetscLogDouble),\n               cnt, tot, cnt_th, tot_th, tmp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGetDefaultHandler(petsclib::PetscLibType,handler::PetscLogHandler) \nGet the default log handler if it is running.\n\nNot collective\n\nOutput Parameter:\n- `handler` - the default `PetscLogHandler`, or `NULL` if it is not running.\n\nLevel: developer\n\n-seealso: [](ch_profiling)\n\n# External Links\n$(_doc_external(\"Sys/PetscLogGetDefaultHandler\"))\n\"\"\"\nfunction PetscLogGetDefaultHandler(petsclib::PetscLibType, handler::PetscLogHandler) end\n\n@for_petsc function PetscLogGetDefaultHandler(petsclib::$UnionPetscLib, handler::PetscLogHandler )\n\n    @chk ccall(\n               (:PetscLogGetDefaultHandler, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogHandler},),\n               handler,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGetState(petsclib::PetscLibType,state::PetscLogState) \nGet the `PetscLogState` for PETSc's global logging, used\nby all default log handlers (`PetscLogDefaultBegin()`,\n`PetscLogNestedBegin()`, `PetscLogTraceBegin()`, `PetscLogMPEBegin()`,\n`PetscLogPerfstubsBegin()`).\n\nCollective on `PETSC_COMM_WORLD`\n\nOutput Parameter:\n- `state` - The `PetscLogState` changed by registrations (such as\n`PetscLogEventRegister()`) and actions (such as `PetscLogEventBegin()` or\n`PetscLogStagePush()`), or `NULL` if logging is not active\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogState`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogGetState\"))\n\"\"\"\nfunction PetscLogGetState(petsclib::PetscLibType, state::PetscLogState) end\n\n@for_petsc function PetscLogGetState(petsclib::$UnionPetscLib, state::PetscLogState )\n\n    @chk ccall(\n               (:PetscLogGetState, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogState},),\n               state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisActive::PetscBool = PetscLogIsActive(petsclib::PetscLibType) \nCheck if logging (profiling) is currently in progress.\n\nNot Collective\n\nOutput Parameter:\n- `isActive` - `PETSC_TRUE` if logging is in progress, `PETSC_FALSE` otherwise\n\nLevel: beginner\n\n-seealso: [](ch_profiling), `PetscLogDefaultBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogIsActive\"))\n\"\"\"\nfunction PetscLogIsActive(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogIsActive(petsclib::$UnionPetscLib)\n\tisActive_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLogIsActive, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBool},),\n               isActive_,\n              )\n\n\tisActive = isActive_[]\n\n\treturn isActive\nend \n\n\"\"\"\n\tPetscLogDefaultBegin(petsclib::PetscLibType) \nTurns on logging (profiling) of PETSc code using the default log handler (profiler). This logs time, flop\nrates, and object creation and should not slow programs down too much.\n\nLogically Collective on `PETSC_COMM_WORLD`\n\nOptions Database Key:\n- `-log_view [viewertype:filename:viewerformat]` - Prints summary of flop and timing (profiling) information to the\nscreen (for PETSc configured with `--with-log=1` (which is the default)).\nThis option must be provided before `PetscInitialize()`.\n\n-seealso: [](ch_profiling), `PetscLogDump()`, `PetscLogView()`, `PetscLogTraceBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogDefaultBegin\"))\n\"\"\"\nfunction PetscLogDefaultBegin(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogDefaultBegin(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogDefaultBegin, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogTraceBegin(petsclib::PetscLibType,file::Libc.FILE) \nBegins trace logging.  Every time a PETSc event\nbegins or ends, the event name is printed.\n\nLogically Collective on `PETSC_COMM_WORLD`, No Fortran Support\n\nInput Parameter:\n- `file` - The file to print trace in (e.g. stdout)\n\nOptions Database Key:\n- `-log_trace [filename]` - Begins `PetscLogTraceBegin()`\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogDump()`, `PetscLogView()`, `PetscLogDefaultBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogTraceBegin\"))\n\"\"\"\nfunction PetscLogTraceBegin(petsclib::PetscLibType, file::Libc.FILE) end\n\n@for_petsc function PetscLogTraceBegin(petsclib::$UnionPetscLib, file::Libc.FILE )\n\n    @chk ccall(\n               (:PetscLogTraceBegin, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Libc.FILE},),\n               file,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogNestedBegin(petsclib::PetscLibType) \nTurns on nested logging of objects and events. This logs flop\nrates and object creation and should not slow programs down too much.\n\nLogically Collective on `PETSC_COMM_WORLD`, No Fortran Support\n\nOptions Database Keys:\n- `-log_view :filename.xml:ascii_xml` - Prints an XML summary of flop and timing information to the file\n\n-seealso: `PetscLogDump()`, `PetscLogView()`, `PetscLogTraceBegin()`, `PetscLogDefaultBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogNestedBegin\"))\n\"\"\"\nfunction PetscLogNestedBegin(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogNestedBegin(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogNestedBegin, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogLegacyCallbacksBegin(petsclib::PetscLibType,PetscLogPLB::external, PetscLogPLE::external, PetscLogPHC::external, PetscLogPHD::external) \nCreate and start a log handler from callbacks\nmatching the now deprecated function pointers `PetscLogPLB`, `PetscLogPLE`,\n`PetscLogPHC`, `PetscLogPHD`.\n\nLogically Collective on `PETSC_COMM_WORLD`\n\nInput Parameters:\n- `PetscLogPLB` - A callback that will be executed by `PetscLogEventBegin()` (or `NULL`)\n- `PetscLogPLE` - A callback that will be executed by `PetscLogEventEnd()` (or `NULL`)\n- `PetscLogPHC` - A callback that will be executed by `PetscLogObjectCreate()` (or `NULL`)\n- `PetscLogPHD` - A callback that will be executed by `PetscLogObjectCreate()` (or `NULL`)\n\nCalling sequence of `PetscLogPLB`:\n- `e`  - a `PetscLogEvent` that is beginning\n- `_i` - deprecated, unused\n- `o1` - a `PetscObject` associated with `e` (or `NULL`)\n- `o2` - a `PetscObject` associated with `e` (or `NULL`)\n- `o3` - a `PetscObject` associated with `e` (or `NULL`)\n- `o4` - a `PetscObject` associated with `e` (or `NULL`)\n\nCalling sequence of `PetscLogPLE`:\n- `e`  - a `PetscLogEvent` that is beginning\n- `_i` - deprecated, unused\n- `o1` - a `PetscObject` associated with `e` (or `NULL`)\n- `o2` - a `PetscObject` associated with `e` (or `NULL`)\n- `o3` - a `PetscObject` associated with `e` (or `NULL`)\n- `o4` - a `PetscObject` associated with `e` (or `NULL`)\n\nCalling sequence of `PetscLogPHC`:\n- `o` - a `PetscObject` that has just been created\n\nCalling sequence of `PetscLogPHD`:\n- `o` - a `PetscObject` that is about to be destroyed\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogHandler`, `PetscLogHandlerStart()`, `PetscLogState`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogLegacyCallbacksBegin\"))\n\"\"\"\nfunction PetscLogLegacyCallbacksBegin(petsclib::PetscLibType, PetscLogPLB::external, PetscLogPLE::external, PetscLogPHC::external, PetscLogPHD::external) end\n\n@for_petsc function PetscLogLegacyCallbacksBegin(petsclib::$UnionPetscLib, PetscLogPLB::external, PetscLogPLE::external, PetscLogPHC::external, PetscLogPHD::external )\n\n    @chk ccall(\n               (:PetscLogLegacyCallbacksBegin, $petsc_library),\n               PetscErrorCode,\n               (external, external, external, external),\n               PetscLogPLB, PetscLogPLE, PetscLogPHC, PetscLogPHD,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogMPEBegin(petsclib::PetscLibType) \nTurns on MPE logging of events. This creates large log files and slows the\nprogram down.\n\nCollective on `PETSC_COMM_WORLD`, No Fortran Support\n\nOptions Database Key:\n- `-log_mpe` - Prints extensive log information\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogDump()`, `PetscLogDefaultBegin()`, `PetscLogEventActivate()`,\n`PetscLogEventDeactivate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogMPEBegin\"))\n\"\"\"\nfunction PetscLogMPEBegin(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogMPEBegin(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogMPEBegin, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogPerfstubsBegin(petsclib::PetscLibType) \nTurns on logging of events using the perfstubs interface.\n\nCollective on `PETSC_COMM_WORLD`, No Fortran Support\n\nOptions Database Key:\n- `-log_perfstubs` - use an external log handler through the perfstubs interface\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogDefaultBegin()`, `PetscLogEventActivate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogPerfstubsBegin\"))\n\"\"\"\nfunction PetscLogPerfstubsBegin(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogPerfstubsBegin(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogPerfstubsBegin, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogActions(petsclib::PetscLibType,flag::PetscBool) \nDetermines whether actions are logged for the default log handler.\n\nNot Collective\n\nInput Parameter:\n- `flag` - `PETSC_TRUE` if actions are to be logged\n\nOptions Database Key:\n- `-log_exclude_actions` - (deprecated) Does nothing\n- `-log_include_actions` - Turn on action logging\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogActions\"))\n\"\"\"\nfunction PetscLogActions(petsclib::PetscLibType, flag::PetscBool) end\n\n@for_petsc function PetscLogActions(petsclib::$UnionPetscLib, flag::PetscBool )\n\n    @chk ccall(\n               (:PetscLogActions, $petsc_library),\n               PetscErrorCode,\n               (PetscBool,),\n               flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogObjects(petsclib::PetscLibType,flag::PetscBool) \nDetermines whether objects are logged for the graphical viewer.\n\nNot Collective\n\nInput Parameter:\n- `flag` - `PETSC_TRUE` if objects are to be logged\n\nOptions Database Key:\n- `-log_exclude_objects` - (deprecated) Does nothing\n- `-log_include_objects` - Turns on object logging\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogObjects\"))\n\"\"\"\nfunction PetscLogObjects(petsclib::PetscLibType, flag::PetscBool) end\n\n@for_petsc function PetscLogObjects(petsclib::$UnionPetscLib, flag::PetscBool )\n\n    @chk ccall(\n               (:PetscLogObjects, $petsc_library),\n               PetscErrorCode,\n               (PetscBool,),\n               flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStageRegister(petsclib::PetscLibType,sname::Vector{Cchar}, stage::PetscLogStage) \nAttaches a character string name to a logging stage.\n\nNot Collective\n\nInput Parameter:\n- `sname` - The name to associate with that stage\n\nOutput Parameter:\n- `stage` - The stage number or -1 if logging is not active (`PetscLogIsActive()`).\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStagePush()`, `PetscLogStagePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageRegister\"))\n\"\"\"\nfunction PetscLogStageRegister(petsclib::PetscLibType, sname::Vector{Cchar}, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStageRegister(petsclib::$UnionPetscLib, sname::Vector{Cchar}, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogStageRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscLogStage}),\n               sname, stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStagePush(petsclib::PetscLibType,stage::PetscLogStage) \nThis function pushes a stage on the logging stack. Events started and stopped until `PetscLogStagePop()` will be associated with the stage\n\nNot Collective\n\nInput Parameter:\n- `stage` - The stage on which to log\n\n-seealso: [](ch_profiling), `PetscLogStagePop()`, `PetscLogStageRegister()`, `PetscBarrier()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStagePush\"))\n\"\"\"\nfunction PetscLogStagePush(petsclib::PetscLibType, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStagePush(petsclib::$UnionPetscLib, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogStagePush, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage,),\n               stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStagePop(petsclib::PetscLibType) \nThis function pops a stage from the logging stack that was pushed with `PetscLogStagePush()`\n\nNot Collective\n\n-seealso: [](ch_profiling), `PetscLogStagePush()`, `PetscLogStageRegister()`, `PetscBarrier()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStagePop\"))\n\"\"\"\nfunction PetscLogStagePop(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogStagePop(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogStagePop, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStageSetActive(petsclib::PetscLibType,stage::PetscLogStage, isActive::PetscBool) \nSets if a stage is used for `PetscLogEventBegin()` and `PetscLogEventEnd()`.\n\nNot Collective\n\nInput Parameters:\n- `stage`    - The stage\n- `isActive` - The activity flag, `PETSC_TRUE` for logging, else `PETSC_FALSE` (defaults to `PETSC_TRUE`)\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscPreLoadBegin()`, `PetscPreLoadEnd()`, `PetscPreLoadStage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageSetActive\"))\n\"\"\"\nfunction PetscLogStageSetActive(petsclib::PetscLibType, stage::PetscLogStage, isActive::PetscBool) end\n\n@for_petsc function PetscLogStageSetActive(petsclib::$UnionPetscLib, stage::PetscLogStage, isActive::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStageSetActive, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage, PetscBool),\n               stage, isActive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisActive::PetscBool = PetscLogStageGetActive(petsclib::PetscLibType,stage::PetscLogStage) \nChecks if a stage is used for `PetscLogEventBegin()` and `PetscLogEventEnd()`.\n\nNot Collective\n\nInput Parameter:\n- `stage` - The stage\n\nOutput Parameter:\n- `isActive` - The activity flag, `PETSC_TRUE` for logging, else `PETSC_FALSE` (defaults to `PETSC_TRUE`)\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscPreLoadBegin()`, `PetscPreLoadEnd()`, `PetscPreLoadStage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageGetActive\"))\n\"\"\"\nfunction PetscLogStageGetActive(petsclib::PetscLibType, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStageGetActive(petsclib::$UnionPetscLib, stage::PetscLogStage )\n\tisActive_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLogStageGetActive, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage, Ptr{PetscBool}),\n               stage, isActive_,\n              )\n\n\tisActive = isActive_[]\n\n\treturn isActive\nend \n\n\"\"\"\n\tPetscLogStageSetVisible(petsclib::PetscLibType,stage::PetscLogStage, isVisible::PetscBool) \nDetermines stage visibility in `PetscLogView()`\n\nNot Collective\n\nInput Parameters:\n- `stage`     - The stage\n- `isVisible` - The visibility flag, `PETSC_TRUE` to print, else `PETSC_FALSE` (defaults to `PETSC_TRUE`)\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStageGetVisible()`, `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogView()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageSetVisible\"))\n\"\"\"\nfunction PetscLogStageSetVisible(petsclib::PetscLibType, stage::PetscLogStage, isVisible::PetscBool) end\n\n@for_petsc function PetscLogStageSetVisible(petsclib::$UnionPetscLib, stage::PetscLogStage, isVisible::PetscBool )\n\n    @chk ccall(\n               (:PetscLogStageSetVisible, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage, PetscBool),\n               stage, isVisible,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tisVisible::PetscBool = PetscLogStageGetVisible(petsclib::PetscLibType,stage::PetscLogStage) \nReturns stage visibility in `PetscLogView()`\n\nNot Collective\n\nInput Parameter:\n- `stage` - The stage\n\nOutput Parameter:\n- `isVisible` - The visibility flag, `PETSC_TRUE` to print, else `PETSC_FALSE` (defaults to `PETSC_TRUE`)\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStageSetVisible()`, `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogView()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageGetVisible\"))\n\"\"\"\nfunction PetscLogStageGetVisible(petsclib::PetscLibType, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStageGetVisible(petsclib::$UnionPetscLib, stage::PetscLogStage )\n\tisVisible_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscLogStageGetVisible, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage, Ptr{PetscBool}),\n               stage, isVisible_,\n              )\n\n\tisVisible = isVisible_[]\n\n\treturn isVisible\nend \n\n\"\"\"\n\tPetscLogStageGetId(petsclib::PetscLibType,name::Vector{Cchar}, stage::PetscLogStage) \nReturns the stage id when given the stage name.\n\nNot Collective\n\nInput Parameter:\n- `name` - The stage name\n\nOutput Parameter:\n- `stage` - The stage, , or -1 if no stage with that name exists\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscPreLoadBegin()`, `PetscPreLoadEnd()`, `PetscPreLoadStage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageGetId\"))\n\"\"\"\nfunction PetscLogStageGetId(petsclib::PetscLibType, name::Vector{Cchar}, stage::PetscLogStage) end\n\n@for_petsc function PetscLogStageGetId(petsclib::$UnionPetscLib, name::Vector{Cchar}, stage::PetscLogStage )\n\n    @chk ccall(\n               (:PetscLogStageGetId, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscLogStage}),\n               name, stage,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStageGetName(petsclib::PetscLibType,stage::PetscLogStage, name::Vector{Cchar}) \nReturns the stage name when given the stage id.\n\nNot Collective\n\nInput Parameter:\n- `stage` - The stage\n\nOutput Parameter:\n- `name` - The stage name\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscPreLoadBegin()`, `PetscPreLoadEnd()`, `PetscPreLoadStage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageGetName\"))\n\"\"\"\nfunction PetscLogStageGetName(petsclib::PetscLibType, stage::PetscLogStage, name::Vector{Cchar}) end\n\n@for_petsc function PetscLogStageGetName(petsclib::$UnionPetscLib, stage::PetscLogStage, name::Vector{Cchar} )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscLogStageGetName, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage, Ptr{Ptr{Cchar}}),\n               stage, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventRegister(petsclib::PetscLibType,name::Vector{Cchar}, classid::PetscClassId, event::PetscLogEvent) \nRegisters an event name for logging operations\n\nNot Collective\n\nInput Parameters:\n- `name`    - The name associated with the event\n- `classid` - The classid associated to the class for this event, obtain either with\n`PetscClassIdRegister()` or use a predefined one such as `KSP_CLASSID`, `SNES_CLASSID`, the predefined ones\nare only available in C code\n\nOutput Parameter:\n- `event` - The event id for use with `PetscLogEventBegin()` and `PetscLogEventEnd()`.\n\n-seealso: [](ch_profiling), `PetscLogStageRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogFlops()`,\n`PetscLogEventActivate()`, `PetscLogEventDeactivate()`, `PetscClassIdRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventRegister\"))\n\"\"\"\nfunction PetscLogEventRegister(petsclib::PetscLibType, name::Vector{Cchar}, classid::PetscClassId, event::PetscLogEvent) end\n\n@for_petsc function PetscLogEventRegister(petsclib::$UnionPetscLib, name::Vector{Cchar}, classid::PetscClassId, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogEventRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, PetscClassId, Ptr{PetscLogEvent}),\n               name, classid, event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventSetCollective(petsclib::PetscLibType,event::PetscLogEvent, collective::PetscBool) \nIndicates that a particular event is collective.\n\nLogically Collective\n\nInput Parameters:\n- `event`      - The event id\n- `collective` - `PetscBool` indicating whether a particular event is collective\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogEventRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventSetCollective\"))\n\"\"\"\nfunction PetscLogEventSetCollective(petsclib::PetscLibType, event::PetscLogEvent, collective::PetscBool) end\n\n@for_petsc function PetscLogEventSetCollective(petsclib::$UnionPetscLib, event::PetscLogEvent, collective::PetscBool )\n\n    @chk ccall(\n               (:PetscLogEventSetCollective, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent, PetscBool),\n               event, collective,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventIncludeClass(petsclib::PetscLibType,classid::PetscClassId) \nActivates event logging for a PETSc object class in every stage.\n\nNot Collective\n\nInput Parameter:\n- `classid` - The object class, for example `MAT_CLASSID`, `SNES_CLASSID`, etc.\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventActivateClass()`, `PetscLogEventDeactivateClass()`, `PetscLogEventActivate()`, `PetscLogEventDeactivate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventIncludeClass\"))\n\"\"\"\nfunction PetscLogEventIncludeClass(petsclib::PetscLibType, classid::PetscClassId) end\n\n@for_petsc function PetscLogEventIncludeClass(petsclib::$UnionPetscLib, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscLogEventIncludeClass, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId,),\n               classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventExcludeClass(petsclib::PetscLibType,classid::PetscClassId) \nDeactivates event logging for a PETSc object class in every stage.\n\nNot Collective\n\nInput Parameter:\n- `classid` - The object class, for example `MAT_CLASSID`, `SNES_CLASSID`, etc.\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventDeactivateClass()`, `PetscLogEventActivateClass()`, `PetscLogEventDeactivate()`, `PetscLogEventActivate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventExcludeClass\"))\n\"\"\"\nfunction PetscLogEventExcludeClass(petsclib::PetscLibType, classid::PetscClassId) end\n\n@for_petsc function PetscLogEventExcludeClass(petsclib::$UnionPetscLib, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscLogEventExcludeClass, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId,),\n               classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventActivate(petsclib::PetscLibType,event::PetscLogEvent) \nIndicates that a particular event should be logged.\n\nNot Collective\n\nInput Parameter:\n- `event` - The event id\n\n-seealso: [](ch_profiling), `PetscLogEventDeactivate()`, `PetscLogEventDeactivatePush()`, `PetscLogEventDeactivatePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventActivate\"))\n\"\"\"\nfunction PetscLogEventActivate(petsclib::PetscLibType, event::PetscLogEvent) end\n\n@for_petsc function PetscLogEventActivate(petsclib::$UnionPetscLib, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogEventActivate, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent,),\n               event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventDeactivate(petsclib::PetscLibType,event::PetscLogEvent) \nIndicates that a particular event should not be logged.\n\nNot Collective\n\nInput Parameter:\n- `event` - The event id\n\n-seealso: [](ch_profiling), `PetscLogEventActivate()`, `PetscLogEventDeactivatePush()`, `PetscLogEventDeactivatePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventDeactivate\"))\n\"\"\"\nfunction PetscLogEventDeactivate(petsclib::PetscLibType, event::PetscLogEvent) end\n\n@for_petsc function PetscLogEventDeactivate(petsclib::$UnionPetscLib, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogEventDeactivate, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent,),\n               event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventDeactivatePush(petsclib::PetscLibType,event::PetscLogEvent) \nIndicates that a particular event should not be logged until `PetscLogEventDeactivatePop()` is called\n\nNot Collective\n\nInput Parameter:\n- `event` - The event id\n\n-seealso: [](ch_profiling), `PetscLogEventActivate()`, `PetscLogEventDeactivate()`, `PetscLogEventDeactivatePop()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventDeactivatePush\"))\n\"\"\"\nfunction PetscLogEventDeactivatePush(petsclib::PetscLibType, event::PetscLogEvent) end\n\n@for_petsc function PetscLogEventDeactivatePush(petsclib::$UnionPetscLib, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogEventDeactivatePush, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent,),\n               event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventDeactivatePop(petsclib::PetscLibType,event::PetscLogEvent) \nIndicates that a particular event should again be logged after the logging was turned off with `PetscLogEventDeactivatePush()`\n\nNot Collective\n\nInput Parameter:\n- `event` - The event id\n\n-seealso: [](ch_profiling), `PetscLogEventActivate()`, `PetscLogEventDeactivatePush()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventDeactivatePop\"))\n\"\"\"\nfunction PetscLogEventDeactivatePop(petsclib::PetscLibType, event::PetscLogEvent) end\n\n@for_petsc function PetscLogEventDeactivatePop(petsclib::$UnionPetscLib, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogEventDeactivatePop, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent,),\n               event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventSetActiveAll(petsclib::PetscLibType,event::PetscLogEvent, isActive::PetscBool) \nTurns on logging of all events\n\nNot Collective\n\nInput Parameters:\n- `event`    - The event id\n- `isActive` - The activity flag determining whether the event is logged\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogEventActivate()`, `PetscLogEventDeactivate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventSetActiveAll\"))\n\"\"\"\nfunction PetscLogEventSetActiveAll(petsclib::PetscLibType, event::PetscLogEvent, isActive::PetscBool) end\n\n@for_petsc function PetscLogEventSetActiveAll(petsclib::$UnionPetscLib, event::PetscLogEvent, isActive::PetscBool )\n\n    @chk ccall(\n               (:PetscLogEventSetActiveAll, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent, PetscBool),\n               event, isActive,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventActivateClass(petsclib::PetscLibType,classid::PetscClassId) \nActivates event logging for a PETSc object class for the current stage\n\nNot Collective\n\nInput Parameter:\n- `classid` - The event class, for example `MAT_CLASSID`, `SNES_CLASSID`, etc.\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventIncludeClass()`, `PetscLogEventExcludeClass()`, `PetscLogEventDeactivateClass()`, `PetscLogEventActivate()`, `PetscLogEventDeactivate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventActivateClass\"))\n\"\"\"\nfunction PetscLogEventActivateClass(petsclib::PetscLibType, classid::PetscClassId) end\n\n@for_petsc function PetscLogEventActivateClass(petsclib::$UnionPetscLib, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscLogEventActivateClass, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId,),\n               classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventDeactivateClass(petsclib::PetscLibType,classid::PetscClassId) \nDeactivates event logging for a PETSc object class for the current stage\n\nNot Collective\n\nInput Parameter:\n- `classid` - The event class, for example `MAT_CLASSID`, `SNES_CLASSID`, etc.\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventIncludeClass()`, `PetscLogEventExcludeClass()`, `PetscLogEventActivateClass()`, `PetscLogEventActivate()`, `PetscLogEventDeactivate()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventDeactivateClass\"))\n\"\"\"\nfunction PetscLogEventDeactivateClass(petsclib::PetscLibType, classid::PetscClassId) end\n\n@for_petsc function PetscLogEventDeactivateClass(petsclib::$UnionPetscLib, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscLogEventDeactivateClass, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId,),\n               classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventSync(petsclib::PetscLibType,e::PetscLogEvent, comm::MPI_Comm) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventSync\"))\n\"\"\"\nfunction PetscLogEventSync(petsclib::PetscLibType, e::PetscLogEvent, comm::MPI_Comm) end\n\n@for_petsc function PetscLogEventSync(petsclib::$UnionPetscLib, e::PetscLogEvent, comm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscLogEventSync, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent, MPI_Comm),\n               e, comm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogStageGetPerfInfo(petsclib::PetscLibType,stage::PetscLogStage, info::PetscEventPerfInfo) \nReturn the performance information about the given stage\n\nNo Fortran Support\n\nInput Parameters:\n- `stage` - The stage number or `PETSC_DETERMINE` for the current stage\n\nOutput Parameter:\n- `info` - This structure is filled with the performance information\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogStageGetPerfInfo\"))\n\"\"\"\nfunction PetscLogStageGetPerfInfo(petsclib::PetscLibType, stage::PetscLogStage, info::PetscEventPerfInfo) end\n\n@for_petsc function PetscLogStageGetPerfInfo(petsclib::$UnionPetscLib, stage::PetscLogStage, info::PetscEventPerfInfo )\n\n    @chk ccall(\n               (:PetscLogStageGetPerfInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage, Ptr{PetscEventPerfInfo}),\n               stage, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventGetPerfInfo(petsclib::PetscLibType,stage::PetscLogStage, event::PetscLogEvent, info::PetscEventPerfInfo) \nReturn the performance information about the given event in the given stage\n\nNo Fortran Support\n\nInput Parameters:\n- `stage` - The stage number or `PETSC_DETERMINE` for the current stage\n- `event` - The event number\n\nOutput Parameter:\n- `info` - This structure is filled with the performance information\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventGetPerfInfo\"))\n\"\"\"\nfunction PetscLogEventGetPerfInfo(petsclib::PetscLibType, stage::PetscLogStage, event::PetscLogEvent, info::PetscEventPerfInfo) end\n\n@for_petsc function PetscLogEventGetPerfInfo(petsclib::$UnionPetscLib, stage::PetscLogStage, event::PetscLogEvent, info::PetscEventPerfInfo )\n\n    @chk ccall(\n               (:PetscLogEventGetPerfInfo, $petsc_library),\n               PetscErrorCode,\n               (PetscLogStage, PetscLogEvent, Ptr{PetscEventPerfInfo}),\n               stage, event, info,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventSetDof(petsclib::PetscLibType,event::PetscLogEvent, n::PetscInt, dof::PetscLogDouble) \nSet the nth number of degrees of freedom of a numerical problem associated with this event\n\nNot Collective\n\nInput Parameters:\n- `event` - The event id to log\n- `n`     - The dof index, in [0, 8)\n- `dof`   - The number of dofs\n\nOptions Database Key:\n- `-log_view` - Activates log summary\n\nLevel: developer\n\n-seealso: `PetscLogEventSetError()`, `PetscLogEventRegister()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventSetDof\"))\n\"\"\"\nfunction PetscLogEventSetDof(petsclib::PetscLibType, event::PetscLogEvent, n::PetscInt, dof::PetscLogDouble) end\n\n@for_petsc function PetscLogEventSetDof(petsclib::$UnionPetscLib, event::PetscLogEvent, n::$PetscInt, dof::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogEventSetDof, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent, $PetscInt, PetscLogDouble),\n               event, n, dof,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventSetError(petsclib::PetscLibType,event::PetscLogEvent, n::PetscInt, error::PetscLogDouble) \nSet the nth error associated with a numerical problem associated with this event\n\nNot Collective\n\nInput Parameters:\n- `event` - The event id to log\n- `n`     - The error index, in [0, 8)\n- `error` - The error\n\nOptions Database Key:\n- `-log_view` - Activates log summary\n\nLevel: developer\n\n-seealso: `PetscLogEventSetDof()`, `PetscLogEventRegister()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventSetError\"))\n\"\"\"\nfunction PetscLogEventSetError(petsclib::PetscLibType, event::PetscLogEvent, n::PetscInt, error::PetscLogDouble) end\n\n@for_petsc function PetscLogEventSetError(petsclib::$UnionPetscLib, event::PetscLogEvent, n::$PetscInt, error::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogEventSetError, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent, $PetscInt, PetscLogDouble),\n               event, n, error,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventGetId(petsclib::PetscLibType,name::Vector{Cchar}, event::PetscLogEvent) \nReturns the event id when given the event name.\n\nNot Collective\n\nInput Parameter:\n- `name` - The event name\n\nOutput Parameter:\n- `event` - The event, or -1 if no event with that name exists\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogStageGetId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventGetId\"))\n\"\"\"\nfunction PetscLogEventGetId(petsclib::PetscLibType, name::Vector{Cchar}, event::PetscLogEvent) end\n\n@for_petsc function PetscLogEventGetId(petsclib::$UnionPetscLib, name::Vector{Cchar}, event::PetscLogEvent )\n\n    @chk ccall(\n               (:PetscLogEventGetId, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscLogEvent}),\n               name, event,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventGetName(petsclib::PetscLibType,event::PetscLogEvent, name::Vector{Cchar}) \nReturns the event name when given the event id.\n\nNot Collective\n\nInput Parameter:\n- `event` - The event\n\nOutput Parameter:\n- `name` - The event name\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscPreLoadBegin()`, `PetscPreLoadEnd()`, `PetscPreLoadStage()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventGetName\"))\n\"\"\"\nfunction PetscLogEventGetName(petsclib::PetscLibType, event::PetscLogEvent, name::Vector{Cchar}) end\n\n@for_petsc function PetscLogEventGetName(petsclib::$UnionPetscLib, event::PetscLogEvent, name::Vector{Cchar} )\n\tname_ = Ref(pointer(name))\n\n    @chk ccall(\n               (:PetscLogEventGetName, $petsc_library),\n               PetscErrorCode,\n               (PetscLogEvent, Ptr{Ptr{Cchar}}),\n               event, name_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventsPause(petsclib::PetscLibType) \nPut event logging into \"paused\" mode: timers and counters for in\n\nNot collective\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogEventDeactivatePush()`, `PetscLogEventDeactivatePop()`, `PetscLogEventsResume()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventsPause\"))\n\"\"\"\nfunction PetscLogEventsPause(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogEventsPause(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogEventsPause, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogEventsResume(petsclib::PetscLibType) \nReturn logging to normal behavior after it was paused with `PetscLogEventsPause()`.\n\nNot collective\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogEventDeactivatePush()`, `PetscLogEventDeactivatePop()`, `PetscLogEventsPause()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogEventsResume\"))\n\"\"\"\nfunction PetscLogEventsResume(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogEventsResume(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogEventsResume, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogObjectCreate(petsclib::PetscLibType,h::PetscObject) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogObjectCreate\"))\n\"\"\"\nfunction PetscLogObjectCreate(petsclib::PetscLibType, h::PetscObject) end\n\n@for_petsc function PetscLogObjectCreate(petsclib::$UnionPetscLib, h::PetscObject )\n\n    @chk ccall(\n               (:PetscLogObjectCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogObjectDestroy(petsclib::PetscLibType,h::PetscObject) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogObjectDestroy\"))\n\"\"\"\nfunction PetscLogObjectDestroy(petsclib::PetscLibType, h::PetscObject) end\n\n@for_petsc function PetscLogObjectDestroy(petsclib::$UnionPetscLib, h::PetscObject )\n\n    @chk ccall(\n               (:PetscLogObjectDestroy, $petsc_library),\n               PetscErrorCode,\n               (PetscObject,),\n               h,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogClassGetClassId(petsclib::PetscLibType,name::Vector{Cchar}, classid::PetscClassId) \nReturns the `PetscClassId` when given the class name.\n\nNot Collective\n\nInput Parameter:\n- `name` - The class name\n\nOutput Parameter:\n- `classid` - The `PetscClassId` id, or -1 if no class with that name exists\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogStageGetId()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogClassGetClassId\"))\n\"\"\"\nfunction PetscLogClassGetClassId(petsclib::PetscLibType, name::Vector{Cchar}, classid::PetscClassId) end\n\n@for_petsc function PetscLogClassGetClassId(petsclib::$UnionPetscLib, name::Vector{Cchar}, classid::PetscClassId )\n\n    @chk ccall(\n               (:PetscLogClassGetClassId, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscClassId}),\n               name, classid,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogClassIdGetName(petsclib::PetscLibType,classid::PetscClassId, name::Cchar) \nReturns a `PetscClassId`'s name.\n\nNot Collective\n\nInput Parameter:\n- `classid` - A `PetscClassId`\n\nOutput Parameter:\n- `name` - The class name\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogClassRegister()`, `PetscLogClassBegin()`, `PetscLogClassEnd()`, `PetscPreLoadBegin()`, `PetscPreLoadEnd()`, `PetscPreLoadClass()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogClassIdGetName\"))\n\"\"\"\nfunction PetscLogClassIdGetName(petsclib::PetscLibType, classid::PetscClassId, name::Cchar) end\n\n@for_petsc function PetscLogClassIdGetName(petsclib::$UnionPetscLib, classid::PetscClassId, name::Cchar )\n\n    @chk ccall(\n               (:PetscLogClassIdGetName, $petsc_library),\n               PetscErrorCode,\n               (PetscClassId, Cchar),\n               classid, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogDump(petsclib::PetscLibType,sname::Vector{Cchar}) \nDumps logs of objects to a file. This file is intended to\nbe read by bin/petscview. This program no longer exists.\n\nCollective on `PETSC_COMM_WORLD`\n\nInput Parameter:\n- `sname` - an optional file name\n\n-seealso: [](ch_profiling), `PetscLogDefaultBegin()`, `PetscLogView()`, `PetscLogGetDefaultHandler()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogDump\"))\n\"\"\"\nfunction PetscLogDump(petsclib::PetscLibType, sname::Vector{Cchar}) end\n\n@for_petsc function PetscLogDump(petsclib::$UnionPetscLib, sname::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscLogDump, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               sname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogMPEDump(petsclib::PetscLibType,sname::Vector{Cchar}) \nDumps the MPE logging info to file for later use with Jumpshot.\n\nCollective on `PETSC_COMM_WORLD`\n\nInput Parameter:\n- `sname` - filename for the MPE logfile\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogDump()`, `PetscLogMPEBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogMPEDump\"))\n\"\"\"\nfunction PetscLogMPEDump(petsclib::PetscLibType, sname::Vector{Cchar}) end\n\n@for_petsc function PetscLogMPEDump(petsclib::$UnionPetscLib, sname::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscLogMPEDump, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               sname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogView(petsclib::PetscLibType,viewer::PetscViewer) \nPrints a summary of the logging.\n\nCollective\n\nInput Parameter:\n- `viewer` - an ASCII viewer\n\nOptions Database Keys:\n- `-log_view [:filename]`                    - Prints summary of log information\n- `-log_view :filename.py:ascii_info_detail` - Saves logging information from each process as a Python file\n- `-log_view :filename.xml:ascii_xml`        - Saves a summary of the logging information in a nested format (see below for how to view it)\n- `-log_view :filename.txt:ascii_flamegraph` - Saves logging information in a format suitable for visualising as a Flame Graph (see below for how to view it)\n- `-log_view_memory`                         - Also display memory usage in each event\n- `-log_view_gpu_time`                       - Also display time in each event for GPU kernels (Note this may slow the computation)\n- `-log_all`                                 - Saves a file Log.rank for each MPI rank with details of each step of the computation\n- `-log_trace [filename]`                    - Displays a trace of what each process is doing\n\nLevel: beginner\n\n-seealso: [](ch_profiling), `PetscLogDefaultBegin()`, `PetscLogDump()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogView\"))\n\"\"\"\nfunction PetscLogView(petsclib::PetscLibType, viewer::PetscViewer) end\n\n@for_petsc function PetscLogView(petsclib::$UnionPetscLib, viewer::PetscViewer )\n\n    @chk ccall(\n               (:PetscLogView, $petsc_library),\n               PetscErrorCode,\n               (PetscViewer,),\n               viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogViewFromOptions(petsclib::PetscLibType) \nProcesses command line options to determine if/how a `PetscLog` is to be viewed.\n\nCollective on `PETSC_COMM_WORLD`\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogView()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogViewFromOptions\"))\n\"\"\"\nfunction PetscLogViewFromOptions(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogViewFromOptions(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogSetThreshold(petsclib::PetscLibType,newThresh::PetscLogDouble, oldThresh::PetscLogDouble) \nSet the threshold time for logging the events; this is a percentage out of 100, so 1. means any event\nthat takes 1 or more percent of the time.\n\nLogically Collective on `PETSC_COMM_WORLD`\n\nInput Parameter:\n- `newThresh` - the threshold to use\n\nOutput Parameter:\n- `oldThresh` - the previously set threshold value\n\nOptions Database Keys:\n- `-log_view :filename.xml:ascii_xml` - Prints an XML summary of flop and timing information to the file\n\n-seealso: `PetscLogDump()`, `PetscLogView()`, `PetscLogTraceBegin()`, `PetscLogDefaultBegin()`,\n`PetscLogNestedBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogSetThreshold\"))\n\"\"\"\nfunction PetscLogSetThreshold(petsclib::PetscLibType, newThresh::PetscLogDouble, oldThresh::PetscLogDouble) end\n\n@for_petsc function PetscLogSetThreshold(petsclib::$UnionPetscLib, newThresh::PetscLogDouble, oldThresh::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogSetThreshold, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble, Ptr{PetscLogDouble}),\n               newThresh, oldThresh,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscGetFlops(petsclib::PetscLibType,flops::PetscLogDouble) \nReturns the number of flops used on this processor\nsince the program began.\n\nNot Collective\n\nOutput Parameter:\n- `flops` - number of floating point operations\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogGpuFlops()`, `PetscTime()`, `PetscLogFlops()`\n\n# External Links\n$(_doc_external(\"Sys/PetscGetFlops\"))\n\"\"\"\nfunction PetscGetFlops(petsclib::PetscLibType, flops::PetscLogDouble) end\n\n@for_petsc function PetscGetFlops(petsclib::$UnionPetscLib, flops::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscGetFlops, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               flops,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogFlops(petsclib::PetscLibType,f::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogFlops\"))\n\"\"\"\nfunction PetscLogFlops(petsclib::PetscLibType, f::PetscLogDouble) end\n\n@for_petsc function PetscLogFlops(petsclib::$UnionPetscLib, f::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogFlops, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               f,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGpuTime(petsclib::PetscLibType) \nturn on the logging of GPU time for GPU kernels\n\nOptions Database Key:\n- `-log_view_gpu_time` - provide the GPU times for all events in the `-log_view` output\n\nLevel: advanced\n\n-seealso: [](ch_profiling), `PetscLogView()`, `PetscLogGpuFlops()`, `PetscLogGpuTimeEnd()`, `PetscLogGpuTimeBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogGpuTime\"))\n\"\"\"\nfunction PetscLogGpuTime(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogGpuTime(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogGpuTime, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGpuTimeBegin(petsclib::PetscLibType) \nStart timer for device\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogView()`, `PetscLogGpuFlops()`, `PetscLogGpuTimeEnd()`, `PetscLogGpuTime()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogGpuTimeBegin\"))\n\"\"\"\nfunction PetscLogGpuTimeBegin(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogGpuTimeBegin(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogGpuTimeBegin, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGpuTimeEnd(petsclib::PetscLibType) \nStop timer for device\n\nLevel: intermediate\n\n-seealso: [](ch_profiling), `PetscLogView()`, `PetscLogGpuFlops()`, `PetscLogGpuTimeBegin()`\n\n# External Links\n$(_doc_external(\"Sys/PetscLogGpuTimeEnd\"))\n\"\"\"\nfunction PetscLogGpuTimeEnd(petsclib::PetscLibType) end\n\n@for_petsc function PetscLogGpuTimeEnd(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscLogGpuTimeEnd, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscClassIdRegister(petsclib::PetscLibType,name::Vector{Cchar}, oclass::PetscClassId) \nRegisters a new class name for objects and logging operations in an application code.\n\nNot Collective\n\nInput Parameter:\n- `name` - The class name\n\nOutput Parameter:\n- `oclass` - The class id or classid\n\nLevel: developer\n\n-seealso: [](ch_profiling), `PetscLogEventRegister()`\n\n# External Links\n$(_doc_external(\"Sys/PetscClassIdRegister\"))\n\"\"\"\nfunction PetscClassIdRegister(petsclib::PetscLibType, name::Vector{Cchar}, oclass::PetscClassId) end\n\n@for_petsc function PetscClassIdRegister(petsclib::$UnionPetscLib, name::Vector{Cchar}, oclass::PetscClassId )\n\n    @chk ccall(\n               (:PetscClassIdRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscClassId}),\n               name, oclass,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tkeysout::Vector{PetscInt} = PetscParallelSortInt(petsclib::PetscLibType,mapin::PetscLayout, mapout::PetscLayout, keysin::Vector{PetscInt}) \nGlobally sort a distributed array of integers\n\nCollective\n\nInput Parameters:\n- `mapin`  - `PetscLayout` describing the distribution of the input keys\n- `mapout` - `PetscLayout` describing the desired distribution of the output keys\n- `keysin` - the pre-sorted array of integers\n\nOutput Parameter:\n- `keysout` - the array in which the sorted integers will be stored.  If `mapin` == `mapout`, then `keysin` may be equal to `keysout`.\n\nLevel: developer\n\n-seealso: `PetscSortInt()`, `PetscParallelSortedInt()`\n\n# External Links\n$(_doc_external(\"Vec/PetscParallelSortInt\"))\n\"\"\"\nfunction PetscParallelSortInt(petsclib::PetscLibType, mapin::PetscLayout, mapout::PetscLayout, keysin::Vector{PetscInt}) end\n\n@for_petsc function PetscParallelSortInt(petsclib::$UnionPetscLib, mapin::PetscLayout, mapout::PetscLayout, keysin::Vector{$PetscInt} )\n\tkeysout = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscParallelSortInt, $petsc_library),\n               PetscErrorCode,\n               (PetscLayout, PetscLayout, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               mapin, mapout, keysin, keysout,\n              )\n\n\n\treturn keysout\nend \n\n\"\"\"\n\tPetscCommSplitReductionBegin(petsclib::PetscLibType,comm::MPI_Comm) \nBegin an asynchronous split\n\nCollective but not synchronizing\n\nInput Parameter:\n- `comm` - communicator on which split reduction has been queued\n\nLevel: advanced\n\n-seealso: `VecNormBegin()`, `VecNormEnd()`, `VecDotBegin()`, `VecDotEnd()`, `VecTDotBegin()`, `VecTDotEnd()`, `VecMDotBegin()`, `VecMDotEnd()`, `VecMTDotBegin()`, `VecMTDotEnd()`\n\n# External Links\n$(_doc_external(\"Vec/PetscCommSplitReductionBegin\"))\n\"\"\"\nfunction PetscCommSplitReductionBegin(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function PetscCommSplitReductionBegin(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\n    @chk ccall(\n               (:PetscCommSplitReductionBegin, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm,),\n               comm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\twv::PetscReal = PetscDTAltVApply(petsclib::PetscLibType,N::PetscInt, k::PetscInt, w::PetscReal, v::PetscReal) \nApply an a k\n\nInput Parameters:\n- `N` - the dimension of the vector space, N >= 0\n- `k` - the degree k of the k-form w, 0 <= k <= N\n- `w` - a k-form, size [N choose k] (each degree of freedom of a k-form is associated with a subset of k coordinates of the N-dimensional vectors.\nThe degrees of freedom are ordered lexicographically by their associated subsets)\n- `v` - a set of k vectors of size N, size [k x N], each vector stored contiguously\n\nOutput Parameter:\n- `wv` \n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVApply\"))\n\"\"\"\nfunction PetscDTAltVApply(petsclib::PetscLibType, N::PetscInt, k::PetscInt, w::PetscReal, v::PetscReal) end\n\n@for_petsc function PetscDTAltVApply(petsclib::$UnionPetscLib, N::$PetscInt, k::$PetscInt, w::$PetscReal, v::$PetscReal )\n\twv_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVApply, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               N, k, w, v, wv_,\n              )\n\n\twv = wv_[]\n\n\treturn wv\nend \n\n\"\"\"\n\tawedgeb::PetscReal = PetscDTAltVWedge(petsclib::PetscLibType,N::PetscInt, j::PetscInt, k::PetscInt, a::PetscReal, b::PetscReal) \nCompute the wedge product of a j\n\nInput Parameters:\n- `N` - the dimension of the vector space, N >= 0\n- `j` - the degree j of the j-form a, 0 <= j <= N\n- `k` - the degree k of the k-form b, 0 <= k <= N and 0 <= j+k <= N\n- `a` - a j-form, size [N choose j]\n- `b` - a k-form, size [N choose k]\n\nOutput Parameter:\n- `awedgeb` - \nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVWedgeMatrix()`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVWedge\"))\n\"\"\"\nfunction PetscDTAltVWedge(petsclib::PetscLibType, N::PetscInt, j::PetscInt, k::PetscInt, a::PetscReal, b::PetscReal) end\n\n@for_petsc function PetscDTAltVWedge(petsclib::$UnionPetscLib, N::$PetscInt, j::$PetscInt, k::$PetscInt, a::$PetscReal, b::$PetscReal )\n\tawedgeb_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVWedge, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               N, j, k, a, b, awedgeb_,\n              )\n\n\tawedgeb = awedgeb_[]\n\n\treturn awedgeb\nend \n\n\"\"\"\n\tawedgeMat::PetscReal = PetscDTAltVWedgeMatrix(petsclib::PetscLibType,N::PetscInt, j::PetscInt, k::PetscInt, a::PetscReal) \nCompute the matrix defined by the wedge product with a given j\n\nInput Parameters:\n- `N` - the dimension of the vector space, N >= 0\n- `j` - the degree j of the j-form a, 0 <= j <= N\n- `k` - the degree k of the k-forms that (a wedge) will be applied to, 0 <= k <= N and 0 <= j+k <= N\n- `a` - a j-form, size [N choose j]\n\nOutput Parameter:\n- `awedgeMat` - (a wedge), an [(N choose j+k) x (N choose k)] matrix in row-major order, such that (a wedge) * b = a wedge b\n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVWedgeMatrix\"))\n\"\"\"\nfunction PetscDTAltVWedgeMatrix(petsclib::PetscLibType, N::PetscInt, j::PetscInt, k::PetscInt, a::PetscReal) end\n\n@for_petsc function PetscDTAltVWedgeMatrix(petsclib::$UnionPetscLib, N::$PetscInt, j::$PetscInt, k::$PetscInt, a::$PetscReal )\n\tawedgeMat_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVWedgeMatrix, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               N, j, k, a, awedgeMat_,\n              )\n\n\tawedgeMat = awedgeMat_[]\n\n\treturn awedgeMat\nend \n\n\"\"\"\n\tLstarw::PetscReal = PetscDTAltVPullback(petsclib::PetscLibType,N::PetscInt, M::PetscInt, L::PetscReal, k::PetscInt, w::PetscReal) \nCompute the pullback of a k\n\nInput Parameters:\n- `N` - the dimension of the origin vector space of the linear transformation, M >= 0\n- `M` - the dimension of the image vector space of the linear transformation, N >= 0\n- `L` - a linear transformation, an [M x N] matrix in row-major format\n- `k` - the *signed* degree k of the |k|-form w, -(min(M,N)) <= k <= min(M,N).  A negative form degree indicates that the pullback should be conjugated by\nthe Hodge star operator (see note).\n- `w` - a |k|-form in the image space, size [M choose |k|]\n\nOutput Parameter:\n- `Lstarw` - the pullback of w to a |k|-form in the origin space, size [N choose |k|]: (Lstarw)(v_1,...v_k) = w(L*v_1,...,L*v_k).\n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVPullbackMatrix()`, `PetscDTAltVStar()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVPullback\"))\n\"\"\"\nfunction PetscDTAltVPullback(petsclib::PetscLibType, N::PetscInt, M::PetscInt, L::PetscReal, k::PetscInt, w::PetscReal) end\n\n@for_petsc function PetscDTAltVPullback(petsclib::$UnionPetscLib, N::$PetscInt, M::$PetscInt, L::$PetscReal, k::$PetscInt, w::$PetscReal )\n\tLstarw_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVPullback, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               N, M, L, k, w, Lstarw_,\n              )\n\n\tLstarw = Lstarw_[]\n\n\treturn Lstarw\nend \n\n\"\"\"\n\tLstar::PetscReal = PetscDTAltVPullbackMatrix(petsclib::PetscLibType,N::PetscInt, M::PetscInt, L::PetscReal, k::PetscInt) \nCompute the pullback matrix for k\n\nInput Parameters:\n- `N` - the dimension of the origin vector space of the linear transformation, N >= 0\n- `M` - the dimension of the image vector space of the linear transformation, M >= 0\n- `L` - a linear transformation, an [M x N] matrix in row-major format\n- `k` - the *signed* degree k of the |k|-forms on which Lstar acts, -(min(M,N)) <= k <= min(M,N).\nA negative form degree indicates that the pullback should be conjugated by the Hodge star operator (see note in `PetscDTAltvPullback()`)\n\nOutput Parameter:\n- `Lstar` - the pullback matrix, an [(N choose |k|) x (M choose |k|)] matrix in row-major format such that Lstar * w = L^* w\n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVPullback()`, `PetscDTAltVStar()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVPullbackMatrix\"))\n\"\"\"\nfunction PetscDTAltVPullbackMatrix(petsclib::PetscLibType, N::PetscInt, M::PetscInt, L::PetscReal, k::PetscInt) end\n\n@for_petsc function PetscDTAltVPullbackMatrix(petsclib::$UnionPetscLib, N::$PetscInt, M::$PetscInt, L::$PetscReal, k::$PetscInt )\n\tLstar_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVPullbackMatrix, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}),\n               N, M, L, k, Lstar_,\n              )\n\n\tLstar = Lstar_[]\n\n\treturn Lstar\nend \n\n\"\"\"\n\twIntv::PetscReal = PetscDTAltVInterior(petsclib::PetscLibType,N::PetscInt, k::PetscInt, w::PetscReal, v::PetscReal) \nCompute the interior product of a k\n\nInput Parameters:\n- `N` - the dimension of the vector space, N >= 0\n- `k` - the degree k of the k-form w, 0 <= k <= N\n- `w` - a k-form, size [N choose k]\n- `v` - an N dimensional vector\n\nOutput Parameter:\n- `wIntv` - the (k-1)-form (w int v), size [N choose (k-1)]: (w int v) is defined by its action on (k-1) vectors {v_1, ..., v_{k-1}} as (w inv v)(v_1, ..., v_{k-1}) = w(v, v_1, ..., v_{k-1}).\n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVInteriorMatrix()`, `PetscDTAltVInteriorPattern()`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVInterior\"))\n\"\"\"\nfunction PetscDTAltVInterior(petsclib::PetscLibType, N::PetscInt, k::PetscInt, w::PetscReal, v::PetscReal) end\n\n@for_petsc function PetscDTAltVInterior(petsclib::$UnionPetscLib, N::$PetscInt, k::$PetscInt, w::$PetscReal, v::$PetscReal )\n\twIntv_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVInterior, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               N, k, w, v, wIntv_,\n              )\n\n\twIntv = wIntv_[]\n\n\treturn wIntv\nend \n\n\"\"\"\n\tintvMat::PetscReal = PetscDTAltVInteriorMatrix(petsclib::PetscLibType,N::PetscInt, k::PetscInt, v::PetscReal) \nCompute the matrix of the linear transformation induced on a k\n\nInput Parameters:\n- `N` - the dimension of the vector space, N >= 0\n- `k` - the degree k of the k-forms on which intvMat acts, 0 <= k <= N\n- `v` - an N dimensional vector\n\nOutput Parameter:\n- `intvMat` - an [(N choose (k-1)) x (N choose k)] matrix, row-major: (intvMat) * w = (w int v)\n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVInterior()`, `PetscDTAltVInteriorPattern()`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVInteriorMatrix\"))\n\"\"\"\nfunction PetscDTAltVInteriorMatrix(petsclib::PetscLibType, N::PetscInt, k::PetscInt, v::PetscReal) end\n\n@for_petsc function PetscDTAltVInteriorMatrix(petsclib::$UnionPetscLib, N::$PetscInt, k::$PetscInt, v::$PetscReal )\n\tintvMat_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVInteriorMatrix, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               N, k, v, intvMat_,\n              )\n\n\tintvMat = intvMat_[]\n\n\treturn intvMat\nend \n\n\"\"\"\n\tPetscDTAltVInteriorPattern(petsclib::PetscLibType,N::PetscInt, k::PetscInt, ::PetscInt(indices) \ncompute the sparsity and sign pattern of the interior product matrix computed in `PetscDTAltVInteriorMatrix()`\n\nInput Parameters:\n- `N` - the dimension of the vector space, N >= 0\n- `k` - the degree of the k-forms on which `intvMat` from `PetscDTAltVInteriorMatrix()` acts,  0 le k le N .\n\nOutput Parameter:\n- `indices` - The interior product matrix `intvMat` has dimensions [(N choose (k-1)) x (N choose k)] and has (N choose k) * k\nnon-zeros.  indices[i][0] and indices[i][1] are the row and column of a non-zero, and its value is equal to the vector\ncoordinate v[j] if indices[i][2] = j, or -v[j] if indices[i][2] = -(j+1)\n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVInterior()`, `PetscDTAltVInteriorMatrix()`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVInteriorPattern\"))\n\"\"\"\nfunction PetscDTAltVInteriorPattern(petsclib::PetscLibType, N::PetscInt, k::PetscInt, indices::Vector{PetscInt}) end\n\n@for_petsc function PetscDTAltVInteriorPattern(petsclib::$UnionPetscLib, N::$PetscInt, k::$PetscInt, indices::Vector{PetscInt})\n\n    @chk ccall(\n               (:PetscDTAltVInteriorPattern, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}),\n               N, k, indices,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstarw::PetscReal = PetscDTAltVStar(petsclib::PetscLibType,N::PetscInt, k::PetscInt, pow::PetscInt, w::PetscReal) \nApply a power of the Hodge star operator, which maps k\n\nInput Parameters:\n- `N`   - the dimension of the vector space, N >= 0\n- `k`   - the degree k of the k-form w, 0 <= k <= N\n- `pow` - the number of times to apply the Hodge star operator: pow < 0 indicates that the inverse of the Hodge star operator should be applied |pow| times.\n- `w`   - a k-form, size [N choose k]\n\nOutput Parameter:\n- `starw` - (star)^pow w\n\nLevel: intermediate\n\n-seealso: `PetscDTAltV`, `PetscDTAltVPullback()`, `PetscDTAltVPullbackMatrix()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTAltVStar\"))\n\"\"\"\nfunction PetscDTAltVStar(petsclib::PetscLibType, N::PetscInt, k::PetscInt, pow::PetscInt, w::PetscReal) end\n\n@for_petsc function PetscDTAltVStar(petsclib::$UnionPetscLib, N::$PetscInt, k::$PetscInt, pow::$PetscInt, w::$PetscReal )\n\tstarw_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTAltVStar, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               N, k, pow, w, starw_,\n              )\n\n\tstarw = starw_[]\n\n\treturn starw\nend \n\n\"\"\"\n\tpdf::PetscProbFn,cdf::PetscProbFn,sampler::PetscProbFn = PetscProbCreateFromOptions(petsclib::PetscLibType,dim::PetscInt, prefix::Vector{Cchar}, name::Vector{Cchar}) \nReturn the probability distribution specified by the arguments and options\n\nNot Collective\n\nInput Parameters:\n- `dim`    - The dimension of sample points\n- `prefix` - The options prefix, or `NULL`\n- `name`   - The options database name for the probability distribution type\n\nOutput Parameters:\n- `pdf`     - The PDF of this type, or `NULL`\n- `cdf`     - The CDF of this type, or `NULL`\n- `sampler` - The PDF sampler of this type, or `NULL`\n\nLevel: intermediate\n\n-seealso: `PetscProbFn`, `PetscPDFMaxwellBoltzmann1D()`, `PetscPDFGaussian1D()`, `PetscPDFConstant1D()`\n\n# External Links\n$(_doc_external(\"DM/PetscProbCreateFromOptions\"))\n\"\"\"\nfunction PetscProbCreateFromOptions(petsclib::PetscLibType, dim::PetscInt, prefix::Vector{Cchar}, name::Vector{Cchar}) end\n\n@for_petsc function PetscProbCreateFromOptions(petsclib::$UnionPetscLib, dim::$PetscInt, prefix::Vector{Cchar}, name::Vector{Cchar} )\n\tpdf_ = Ref{PetscProbFn}()\n\tcdf_ = Ref{PetscProbFn}()\n\tsampler_ = Ref{PetscProbFn}()\n\n    @chk ccall(\n               (:PetscProbCreateFromOptions, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Cchar}, Ptr{Cchar}, PetscProbFn, PetscProbFn, PetscProbFn),\n               dim, prefix, name, pdf_, cdf_, sampler_,\n              )\n\n\tpdf = pdf_[]\n\tcdf = cdf_[]\n\tsampler = sampler_[]\n\n\treturn pdf,cdf,sampler\nend \n\n\"\"\"\n\talpha::PetscReal = PetscProbComputeKSStatistic(petsclib::PetscLibType,v::PetscVec, cdf::PetscProbFn) \nCompute the Kolmogorov\n\nCollective\n\nInput Parameters:\n- `v`   - The data vector, blocksize is the sample dimension\n- `cdf` - The analytic CDF\n\nOutput Parameter:\n- `alpha` - The KS statistic\n\nLevel: advanced\n\n-seealso: `PetscProbComputeKSStatisticWeighted()`, `PetscProbComputeKSStatisticMagnitude()`, `PetscProbFn`\n\n# External Links\n$(_doc_external(\"DM/PetscProbComputeKSStatistic\"))\n\"\"\"\nfunction PetscProbComputeKSStatistic(petsclib::PetscLibType, v::PetscVec, cdf::PetscProbFn) end\n\n@for_petsc function PetscProbComputeKSStatistic(petsclib::$UnionPetscLib, v::PetscVec, cdf::PetscProbFn )\n\talpha_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscProbComputeKSStatistic, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{PetscProbFn}, Ptr{$PetscReal}),\n               v, cdf, alpha_,\n              )\n\n\talpha = alpha_[]\n\n\treturn alpha\nend \n\n\"\"\"\n\talpha::PetscReal = PetscProbComputeKSStatisticWeighted(petsclib::PetscLibType,v::PetscVec, w::PetscVec, cdf::PetscProbFn) \nCompute the Kolmogorov\n\nCollective\n\nInput Parameters:\n- `v`   - The data vector, blocksize is the sample dimension\n- `w`   - The vector of weights for each sample, instead of the default 1/n\n- `cdf` - The analytic CDF\n\nOutput Parameter:\n- `alpha` - The KS statistic\n\nLevel: advanced\n\n-seealso: `PetscProbComputeKSStatistic()`, `PetscProbComputeKSStatisticMagnitude()`, `PetscProbFn`\n\n# External Links\n$(_doc_external(\"DM/PetscProbComputeKSStatisticWeighted\"))\n\"\"\"\nfunction PetscProbComputeKSStatisticWeighted(petsclib::PetscLibType, v::PetscVec, w::PetscVec, cdf::PetscProbFn) end\n\n@for_petsc function PetscProbComputeKSStatisticWeighted(petsclib::$UnionPetscLib, v::PetscVec, w::PetscVec, cdf::PetscProbFn )\n\talpha_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscProbComputeKSStatisticWeighted, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{PetscProbFn}, Ptr{$PetscReal}),\n               v, w, cdf, alpha_,\n              )\n\n\talpha = alpha_[]\n\n\treturn alpha\nend \n\n\"\"\"\n\talpha::PetscReal = PetscProbComputeKSStatisticMagnitude(petsclib::PetscLibType,v::PetscVec, cdf::PetscProbFn) \nCompute the Kolmogorov\n\nCollective\n\nInput Parameters:\n- `v`   - The data vector, blocksize is the sample dimension\n- `cdf` - The analytic CDF\n\nOutput Parameter:\n- `alpha` - The KS statistic\n\nLevel: advanced\n\n-seealso: `PetscProbComputeKSStatistic()`, `PetscProbComputeKSStatisticWeighted()`, `PetscProbFn`\n\n# External Links\n$(_doc_external(\"DM/PetscProbComputeKSStatisticMagnitude\"))\n\"\"\"\nfunction PetscProbComputeKSStatisticMagnitude(petsclib::PetscLibType, v::PetscVec, cdf::PetscProbFn) end\n\n@for_petsc function PetscProbComputeKSStatisticMagnitude(petsclib::$UnionPetscLib, v::PetscVec, cdf::PetscProbFn )\n\talpha_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscProbComputeKSStatisticMagnitude, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{PetscProbFn}, Ptr{$PetscReal}),\n               v, cdf, alpha_,\n              )\n\n\talpha = alpha_[]\n\n\treturn alpha\nend \n\n\"\"\"\n\tPetscFormKeySort(petsclib::PetscLibType,n::PetscInt, arr::Vector{PetscFormKey}) \nSorts an array of `PetscFormKey` in place in increasing order.\n\nNot Collective\n\nInput Parameters:\n- `n`   - number of values\n- `arr` - array of `PetscFormKey`\n\nLevel: intermediate\n\n-seealso: `PetscFormKey`, `PetscIntSortSemiOrdered()`, `PetscSortInt()`\n\n# External Links\n$(_doc_external(\"DM/PetscFormKeySort\"))\n\"\"\"\nfunction PetscFormKeySort(petsclib::PetscLibType, n::PetscInt, arr::Vector{PetscFormKey}) end\n\n@for_petsc function PetscFormKeySort(petsclib::$UnionPetscLib, n::$PetscInt, arr::Vector{PetscFormKey} )\n\n    @chk ccall(\n               (:PetscFormKeySort, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{PetscFormKey}),\n               n, arr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnorm::PetscReal = PetscDTJacobiNorm(petsclib::PetscLibType,alpha::PetscReal, beta::PetscReal, n::PetscInt) \nCompute the weighted L2 norm of a Jacobi polynomial.\n\nInput Parameters:\n- `alpha` - the left exponent > -1\n- `beta`  - the right exponent > -1\n- `n`     - the polynomial degree\n\nOutput Parameter:\n- `norm` - the weighted L2 norm\n\nLevel: beginner\n\n-seealso: `PetscQuadrature`, `PetscDTJacobiEval()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTJacobiNorm\"))\n\"\"\"\nfunction PetscDTJacobiNorm(petsclib::PetscLibType, alpha::PetscReal, beta::PetscReal, n::PetscInt) end\n\n@for_petsc function PetscDTJacobiNorm(petsclib::$UnionPetscLib, alpha::$PetscReal, beta::$PetscReal, n::$PetscInt )\n\tnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTJacobiNorm, $petsc_library),\n               PetscErrorCode,\n               ($PetscReal, $PetscReal, $PetscInt, Ptr{$PetscReal}),\n               alpha, beta, n, norm_,\n              )\n\n\tnorm = norm_[]\n\n\treturn norm\nend \n\n\"\"\"\n\tp::Vector{PetscReal} = PetscDTJacobiEvalJet(petsclib::PetscLibType,alpha::PetscReal, beta::PetscReal, npoints::PetscInt, points::Vector{PetscReal}, degree::PetscInt, k::PetscInt) \nEvaluate the jet (function and derivatives) of the Jacobi polynomials basis up to a given degree.\n\nInput Parameters:\n- `alpha`   - the left exponent of the weight\n- `beta`    - the right exponetn of the weight\n- `npoints` - the number of points to evaluate the polynomials at\n- `points`  - [npoints] array of point coordinates\n- `degree`  - the maximm degree polynomial space to evaluate, (degree + 1) will be evaluated total.\n- `k`       - the maximum derivative to evaluate in the jet, (k + 1) will be evaluated total.\n\nOutput Parameter:\n- `p` - an array containing the evaluations of the Jacobi polynomials's jets on the points.  the size is (degree + 1) x\n(k + 1) x npoints, which also describes the order of the dimensions of this three-dimensional array: the first\n(slowest varying) dimension is polynomial degree; the second dimension is derivative order; the third (fastest\nvarying) dimension is the index of the evaluation point.\n\nLevel: advanced\n\n-seealso: `PetscDTJacobiEval()`, `PetscDTPKDEvalJet()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTJacobiEvalJet\"))\n\"\"\"\nfunction PetscDTJacobiEvalJet(petsclib::PetscLibType, alpha::PetscReal, beta::PetscReal, npoints::PetscInt, points::Vector{PetscReal}, degree::PetscInt, k::PetscInt) end\n\n@for_petsc function PetscDTJacobiEvalJet(petsclib::$UnionPetscLib, alpha::$PetscReal, beta::$PetscReal, npoints::$PetscInt, points::Vector{$PetscReal}, degree::$PetscInt, k::$PetscInt )\n\tp = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTJacobiEvalJet, $petsc_library),\n               PetscErrorCode,\n               ($PetscReal, $PetscReal, $PetscInt, Ptr{$PetscReal}, $PetscInt, $PetscInt, Ptr{$PetscReal}),\n               alpha, beta, npoints, points, degree, k, p,\n              )\n\n\n\treturn p\nend \n\n\"\"\"\n\tB::Vector{PetscReal},D::Vector{PetscReal},D2::Vector{PetscReal} = PetscDTJacobiEval(petsclib::PetscLibType,npoints::PetscInt, alpha::PetscReal, beta::PetscReal, points::PetscReal, ndegree::PetscInt, degrees::PetscInt) \nevaluate Jacobi polynomials for the weight function (1.+x)^{\\alpha} (1.\nat points\n\nNot Collective\n\nInput Parameters:\n- `npoints` - number of spatial points to evaluate at\n- `alpha`   - the left exponent > -1\n- `beta`    - the right exponent > -1\n- `points`  - array of locations to evaluate at\n- `ndegree` - number of basis degrees to evaluate\n- `degrees` - sorted array of degrees to evaluate\n\nOutput Parameters:\n- `B`  - row-oriented basis evaluation matrix B[point*ndegree + degree] (dimension npoints*ndegrees, allocated by caller) (or `NULL`)\n- `D`  - row-oriented derivative evaluation matrix (or `NULL`)\n- `D2` - row-oriented second derivative evaluation matrix (or `NULL`)\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussQuadrature()`, `PetscDTLegendreEval()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTJacobiEval\"))\n\"\"\"\nfunction PetscDTJacobiEval(petsclib::PetscLibType, npoints::PetscInt, alpha::PetscReal, beta::PetscReal, points::PetscReal, ndegree::PetscInt, degrees::PetscInt) end\n\n@for_petsc function PetscDTJacobiEval(petsclib::$UnionPetscLib, npoints::$PetscInt, alpha::$PetscReal, beta::$PetscReal, points::$PetscReal, ndegree::$PetscInt, degrees::$PetscInt )\n\tB = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tD = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tD2 = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTJacobiEval, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscReal, $PetscReal, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               npoints, alpha, beta, points, ndegree, degrees, B, D, D2,\n              )\n\n\n\treturn B,D,D2\nend \n\n\"\"\"\n\tB::Vector{PetscReal},D::Vector{PetscReal},D2::Vector{PetscReal} = PetscDTLegendreEval(petsclib::PetscLibType,npoints::PetscInt, points::PetscReal, ndegree::PetscInt, degrees::PetscInt) \nevaluate Legendre polynomials at points\n\nNot Collective\n\nInput Parameters:\n- `npoints` - number of spatial points to evaluate at\n- `points`  - array of locations to evaluate at\n- `ndegree` - number of basis degrees to evaluate\n- `degrees` - sorted array of degrees to evaluate\n\nOutput Parameters:\n- `B`  - row-oriented basis evaluation matrix B[point*ndegree + degree] (dimension `npoints`*`ndegrees`, allocated by caller) (or `NULL`)\n- `D`  - row-oriented derivative evaluation matrix (or `NULL`)\n- `D2` - row-oriented second derivative evaluation matrix (or `NULL`)\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTLegendreEval\"))\n\"\"\"\nfunction PetscDTLegendreEval(petsclib::PetscLibType, npoints::PetscInt, points::PetscReal, ndegree::PetscInt, degrees::PetscInt) end\n\n@for_petsc function PetscDTLegendreEval(petsclib::$UnionPetscLib, npoints::$PetscInt, points::$PetscReal, ndegree::$PetscInt, degrees::$PetscInt )\n\tB = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tD = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tD2 = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTLegendreEval, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               npoints, points, ndegree, degrees, B, D, D2,\n              )\n\n\n\treturn B,D,D2\nend \n\n\"\"\"\n\tdegtup::Vector{PetscInt} = PetscDTIndexToGradedOrder(petsclib::PetscLibType,len::PetscInt, index::PetscInt) \nconvert an index into a tuple of monomial degrees in a graded order (that is, if the degree sum of tuple x is less than the degree sum of tuple y,\nthen the index of x is smaller than the index of y)\n\nInput Parameters:\n- `len`   - the desired length of the degree tuple\n- `index` - the index to convert: should be >= 0\n\nOutput Parameter:\n- `degtup` - filled with a tuple of degrees\n\nLevel: beginner\n\n-seealso: `PetscDTGradedOrderToIndex()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTIndexToGradedOrder\"))\n\"\"\"\nfunction PetscDTIndexToGradedOrder(petsclib::PetscLibType, len::PetscInt, index::PetscInt) end\n\n@for_petsc function PetscDTIndexToGradedOrder(petsclib::$UnionPetscLib, len::$PetscInt, index::$PetscInt )\n\tdegtup = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTIndexToGradedOrder, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}),\n               len, index, degtup,\n              )\n\n\n\treturn degtup\nend \n\n\"\"\"\n\tindex::PetscInt = PetscDTGradedOrderToIndex(petsclib::PetscLibType,len::PetscInt, degtup::Vector{PetscInt}) \nconvert a tuple into an index in a graded order, the inverse of `PetscDTIndexToGradedOrder()`.\n\nInput Parameters:\n- `len`    - the length of the degree tuple\n- `degtup` - tuple with this length\n\nOutput Parameter:\n- `index` - index in graded order: >= 0\n\nLevel: beginner\n\n-seealso: `PetscDTIndexToGradedOrder()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTGradedOrderToIndex\"))\n\"\"\"\nfunction PetscDTGradedOrderToIndex(petsclib::PetscLibType, len::PetscInt, degtup::Vector{PetscInt}) end\n\n@for_petsc function PetscDTGradedOrderToIndex(petsclib::$UnionPetscLib, len::$PetscInt, degtup::Vector{$PetscInt} )\n\tindex_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDTGradedOrderToIndex, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               len, degtup, index_,\n              )\n\n\tindex = index_[]\n\n\treturn index\nend \n\n\"\"\"\n\tp::Vector{PetscReal} = PetscDTPKDEvalJet(petsclib::PetscLibType,dim::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, degree::PetscInt, k::PetscInt) \nEvaluate the jet (function and derivatives) of the Proriol\nthe space of polynomials up to a given degree.\n\nInput Parameters:\n- `dim`     - the number of variables in the multivariate polynomials\n- `npoints` - the number of points to evaluate the polynomials at\n- `points`  - [npoints x dim] array of point coordinates\n- `degree`  - the degree (sum of degrees on the variables in a monomial) of the polynomial space to evaluate.  There are ((dim + degree) choose dim) polynomials in this space.\n- `k`       - the maximum order partial derivative to evaluate in the jet.  There are (dim + k choose dim) partial derivatives\nin the jet.  Choosing k = 0 means to evaluate just the function and no derivatives\n\nOutput Parameter:\n- `p` - an array containing the evaluations of the PKD polynomials' jets on the points.  The size is ((dim + degree)\nchoose dim) x ((dim + k) choose dim) x npoints, which also describes the order of the dimensions of this\nthree-dimensional array: the first (slowest varying) dimension is basis function index; the second dimension is jet\nindex; the third (fastest varying) dimension is the index of the evaluation point.\n\nLevel: advanced\n\n-seealso: `PetscDTGradedOrderToIndex()`, `PetscDTIndexToGradedOrder()`, `PetscDTJacobiEvalJet()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTPKDEvalJet\"))\n\"\"\"\nfunction PetscDTPKDEvalJet(petsclib::PetscLibType, dim::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, degree::PetscInt, k::PetscInt) end\n\n@for_petsc function PetscDTPKDEvalJet(petsclib::$UnionPetscLib, dim::$PetscInt, npoints::$PetscInt, points::Vector{$PetscReal}, degree::$PetscInt, k::$PetscInt )\n\tp = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTPKDEvalJet, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, $PetscInt, $PetscInt, Ptr{$PetscReal}),\n               dim, npoints, points, degree, k, p,\n              )\n\n\n\treturn p\nend \n\n\"\"\"\n\tsize::PetscInt = PetscDTPTrimmedSize(petsclib::PetscLibType,dim::PetscInt, degree::PetscInt, formDegree::PetscInt) \nThe size of the trimmed polynomial space of k\nwhich can be evaluated in `PetscDTPTrimmedEvalJet()`.\n\nInput Parameters:\n- `dim`        - the number of variables in the multivariate polynomials\n- `degree`     - the degree (sum of degrees on the variables in a monomial) of the trimmed polynomial space.\n- `formDegree` - the degree of the form\n\nOutput Parameter:\n- `size` - The number ((`dim` + `degree`) choose (`dim` + `formDegree`)) x ((`degree` + `formDegree` - 1) choose (`formDegree`))\n\nLevel: advanced\n\n-seealso: `PetscDTPTrimmedEvalJet()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTPTrimmedSize\"))\n\"\"\"\nfunction PetscDTPTrimmedSize(petsclib::PetscLibType, dim::PetscInt, degree::PetscInt, formDegree::PetscInt) end\n\n@for_petsc function PetscDTPTrimmedSize(petsclib::$UnionPetscLib, dim::$PetscInt, degree::$PetscInt, formDegree::$PetscInt )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDTPTrimmedSize, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               dim, degree, formDegree, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tp::Vector{PetscReal} = PetscDTPTrimmedEvalJet(petsclib::PetscLibType,dim::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, degree::PetscInt, formDegree::PetscInt, jetDegree::PetscInt) \nEvaluate the jet (function and derivatives) of a basis of the trimmed polynomial k\na given degree.\n\nInput Parameters:\n- `dim`        - the number of variables in the multivariate polynomials\n- `npoints`    - the number of points to evaluate the polynomials at\n- `points`     - [npoints x dim] array of point coordinates\n- `degree`     - the degree (sum of degrees on the variables in a monomial) of the trimmed polynomial space to evaluate.\nThere are ((dim + degree) choose (dim + formDegree)) x ((degree + formDegree - 1) choose (formDegree)) polynomials in this space.\n(You can use `PetscDTPTrimmedSize()` to compute this size.)\n- `formDegree` - the degree of the form\n- `jetDegree`  - the maximum order partial derivative to evaluate in the jet.  There are ((dim + jetDegree) choose dim) partial derivatives\nin the jet.  Choosing jetDegree = 0 means to evaluate just the function and no derivatives\n\nOutput Parameter:\n- `p` - an array containing the evaluations of the PKD polynomials' jets on the points.\n\nLevel: advanced\n\n-seealso: `PetscDTPKDEvalJet()`, `PetscDTPTrimmedSize()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTPTrimmedEvalJet\"))\n\"\"\"\nfunction PetscDTPTrimmedEvalJet(petsclib::PetscLibType, dim::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, degree::PetscInt, formDegree::PetscInt, jetDegree::PetscInt) end\n\n@for_petsc function PetscDTPTrimmedEvalJet(petsclib::$UnionPetscLib, dim::$PetscInt, npoints::$PetscInt, points::Vector{$PetscReal}, degree::$PetscInt, formDegree::$PetscInt, jetDegree::$PetscInt )\n\tp = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTPTrimmedEvalJet, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscReal}),\n               dim, npoints, points, degree, formDegree, jetDegree, p,\n              )\n\n\n\treturn p\nend \n\n\"\"\"\n\tx::Vector{PetscReal},w::Vector{PetscReal} = PetscDTGaussJacobiQuadrature(petsclib::PetscLibType,npoints::PetscInt, a::PetscReal, b::PetscReal, alpha::PetscReal, beta::PetscReal) \nquadrature for the interval [a, b] with the weight function\n(x-a)^\\alpha (x-b)^\\beta.\n\nNot Collective\n\nInput Parameters:\n- `npoints` - the number of points in the quadrature rule\n- `a`       - the left endpoint of the interval\n- `b`       - the right endpoint of the interval\n- `alpha`   - the left exponent\n- `beta`    - the right exponent\n\nOutput Parameters:\n- `x` - array of length `npoints`, the locations of the quadrature points\n- `w` - array of length `npoints`, the weights of the quadrature points\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTGaussJacobiQuadrature\"))\n\"\"\"\nfunction PetscDTGaussJacobiQuadrature(petsclib::PetscLibType, npoints::PetscInt, a::PetscReal, b::PetscReal, alpha::PetscReal, beta::PetscReal) end\n\n@for_petsc function PetscDTGaussJacobiQuadrature(petsclib::$UnionPetscLib, npoints::$PetscInt, a::$PetscReal, b::$PetscReal, alpha::$PetscReal, beta::$PetscReal )\n\tx = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tw = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTGaussJacobiQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               npoints, a, b, alpha, beta, x, w,\n              )\n\n\n\treturn x,w\nend \n\n\"\"\"\n\tx::Vector{PetscReal},w::Vector{PetscReal} = PetscDTGaussLobattoJacobiQuadrature(petsclib::PetscLibType,npoints::PetscInt, a::PetscReal, b::PetscReal, alpha::PetscReal, beta::PetscReal) \nquadrature for the interval [a, b] with the weight function\n(x-a)^\\alpha (x-b)^\\beta, with endpoints `a` and `b` included as quadrature points.\n\nNot Collective\n\nInput Parameters:\n- `npoints` - the number of points in the quadrature rule\n- `a`       - the left endpoint of the interval\n- `b`       - the right endpoint of the interval\n- `alpha`   - the left exponent\n- `beta`    - the right exponent\n\nOutput Parameters:\n- `x` - array of length `npoints`, the locations of the quadrature points\n- `w` - array of length `npoints`, the weights of the quadrature points\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussJacobiQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTGaussLobattoJacobiQuadrature\"))\n\"\"\"\nfunction PetscDTGaussLobattoJacobiQuadrature(petsclib::PetscLibType, npoints::PetscInt, a::PetscReal, b::PetscReal, alpha::PetscReal, beta::PetscReal) end\n\n@for_petsc function PetscDTGaussLobattoJacobiQuadrature(petsclib::$UnionPetscLib, npoints::$PetscInt, a::$PetscReal, b::$PetscReal, alpha::$PetscReal, beta::$PetscReal )\n\tx = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tw = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTGaussLobattoJacobiQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               npoints, a, b, alpha, beta, x, w,\n              )\n\n\n\treturn x,w\nend \n\n\"\"\"\n\tx::Vector{PetscReal},w::Vector{PetscReal} = PetscDTGaussQuadrature(petsclib::PetscLibType,npoints::PetscInt, a::PetscReal, b::PetscReal) \ncreate Gauss\n\nNot Collective\n\nInput Parameters:\n- `npoints` - number of points\n- `a`       - left end of interval (often-1)\n- `b`       - right end of interval (often +1)\n\nOutput Parameters:\n- `x` - quadrature points\n- `w` - quadrature weights\n\nLevel: intermediate\n\n-seealso: `PetscDTLegendreEval()`, `PetscDTGaussJacobiQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTGaussQuadrature\"))\n\"\"\"\nfunction PetscDTGaussQuadrature(petsclib::PetscLibType, npoints::PetscInt, a::PetscReal, b::PetscReal) end\n\n@for_petsc function PetscDTGaussQuadrature(petsclib::$UnionPetscLib, npoints::$PetscInt, a::$PetscReal, b::$PetscReal )\n\tx = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tw = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTGaussQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscReal, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               npoints, a, b, x, w,\n              )\n\n\n\treturn x,w\nend \n\n\"\"\"\n\tx::Vector{PetscReal},w::Vector{PetscReal} = PetscDTGaussLobattoLegendreQuadrature(petsclib::PetscLibType,npoints::PetscInt, type::PetscGaussLobattoLegendreCreateType) \ncreates a set of the locations and weights of the Gauss\nnodes of a given size on the domain [-1,1]\n\nNot Collective\n\nInput Parameters:\n- `npoints` - number of grid nodes\n- `type`    - `PETSCGAUSSLOBATTOLEGENDRE_VIA_LINEAR_ALGEBRA` or `PETSCGAUSSLOBATTOLEGENDRE_VIA_NEWTON`\n\nOutput Parameters:\n- `x` - quadrature points, pass in an array of length `npoints`\n- `w` - quadrature weights, pass in an array of length `npoints`\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussQuadrature()`, `PetscGaussLobattoLegendreCreateType`\n\n\n# External Links\n$(_doc_external(\"DM/PetscDTGaussLobattoLegendreQuadrature\"))\n\"\"\"\nfunction PetscDTGaussLobattoLegendreQuadrature(petsclib::PetscLibType, npoints::PetscInt, type::PetscGaussLobattoLegendreCreateType) end\n\n@for_petsc function PetscDTGaussLobattoLegendreQuadrature(petsclib::$UnionPetscLib, npoints::$PetscInt, type::PetscGaussLobattoLegendreCreateType )\n\tx = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\tw = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTGaussLobattoLegendreQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, PetscGaussLobattoLegendreCreateType, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               npoints, type, x, w,\n              )\n\n\n\treturn x,w\nend \n\n\"\"\"\n\tPetscDTGaussTensorQuadrature(petsclib::PetscLibType,dim::PetscInt, Nc::PetscInt, npoints::PetscInt, a::PetscReal, b::PetscReal, q::PetscQuadrature) \ncreates a tensor\n\nNot Collective\n\nInput Parameters:\n- `dim`     - The spatial dimension\n- `Nc`      - The number of components\n- `npoints` - number of points in one dimension\n- `a`       - left end of interval (often-1)\n- `b`       - right end of interval (often +1)\n\nOutput Parameter:\n- `q` - A `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussQuadrature()`, `PetscDTLegendreEval()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTGaussTensorQuadrature\"))\n\"\"\"\nfunction PetscDTGaussTensorQuadrature(petsclib::PetscLibType, dim::PetscInt, Nc::PetscInt, npoints::PetscInt, a::PetscReal, b::PetscReal, q::PetscQuadrature) end\n\n@for_petsc function PetscDTGaussTensorQuadrature(petsclib::$UnionPetscLib, dim::$PetscInt, Nc::$PetscInt, npoints::$PetscInt, a::$PetscReal, b::$PetscReal, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscDTGaussTensorQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, $PetscReal, $PetscReal, Ptr{PetscQuadrature}),\n               dim, Nc, npoints, a, b, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDTStroudConicalQuadrature(petsclib::PetscLibType,dim::PetscInt, Nc::PetscInt, npoints::PetscInt, a::PetscReal, b::PetscReal, q::PetscQuadrature) \ncreate Stroud conical quadrature for a simplex {cite}`karniadakis2005spectral`\n\nNot Collective\n\nInput Parameters:\n- `dim`     - The simplex dimension\n- `Nc`      - The number of components\n- `npoints` - The number of points in one dimension\n- `a`       - left end of interval (often-1)\n- `b`       - right end of interval (often +1)\n\nOutput Parameter:\n- `q` - A `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussTensorQuadrature()`, `PetscDTGaussQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTStroudConicalQuadrature\"))\n\"\"\"\nfunction PetscDTStroudConicalQuadrature(petsclib::PetscLibType, dim::PetscInt, Nc::PetscInt, npoints::PetscInt, a::PetscReal, b::PetscReal, q::PetscQuadrature) end\n\n@for_petsc function PetscDTStroudConicalQuadrature(petsclib::$UnionPetscLib, dim::$PetscInt, Nc::$PetscInt, npoints::$PetscInt, a::$PetscReal, b::$PetscReal, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscDTStroudConicalQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, $PetscReal, $PetscReal, Ptr{PetscQuadrature}),\n               dim, Nc, npoints, a, b, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDTSimplexQuadrature(petsclib::PetscLibType,dim::PetscInt, degree::PetscInt, type::PetscDTSimplexQuadratureType, quad::PetscQuadrature) \nCreate a quadrature rule for a simplex that exactly integrates polynomials up to a given degree.\n\nNot Collective\n\nInput Parameters:\n- `dim`    - The spatial dimension of the simplex (1 = segment, 2 = triangle, 3 = tetrahedron)\n- `degree` - The largest polynomial degree that is required to be integrated exactly\n- `type`   - `PetscDTSimplexQuadratureType` indicating the type of quadrature rule\n\nOutput Parameter:\n- `quad` - A `PetscQuadrature` object for integration over the biunit simplex\n\nLevel: intermediate\n\n-seealso: `PetscDTSimplexQuadratureType`, `PetscDTGaussQuadrature()`, `PetscDTStroudCononicalQuadrature()`, `PetscQuadrature`\n\n# External Links\n$(_doc_external(\"DM/PetscDTSimplexQuadrature\"))\n\"\"\"\nfunction PetscDTSimplexQuadrature(petsclib::PetscLibType, dim::PetscInt, degree::PetscInt, type::PetscDTSimplexQuadratureType, quad::PetscQuadrature) end\n\n@for_petsc function PetscDTSimplexQuadrature(petsclib::$UnionPetscLib, dim::$PetscInt, degree::$PetscInt, type::PetscDTSimplexQuadratureType, quad::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscDTSimplexQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, PetscDTSimplexQuadratureType, Ptr{PetscQuadrature}),\n               dim, degree, type, quad,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscDTTanhSinhTensorQuadrature(petsclib::PetscLibType,dim::PetscInt, level::PetscInt, a::PetscReal, b::PetscReal, q::PetscQuadrature) \ncreate tanh\n\nNot Collective\n\nInput Parameters:\n- `dim`   - The cell dimension\n- `level` - The number of points in one dimension, 2^l\n- `a`     - left end of interval (often-1)\n- `b`     - right end of interval (often +1)\n\nOutput Parameter:\n- `q` - A `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscDTGaussTensorQuadrature()`, `PetscQuadrature`\n\n# External Links\n$(_doc_external(\"DM/PetscDTTanhSinhTensorQuadrature\"))\n\"\"\"\nfunction PetscDTTanhSinhTensorQuadrature(petsclib::PetscLibType, dim::PetscInt, level::PetscInt, a::PetscReal, b::PetscReal, q::PetscQuadrature) end\n\n@for_petsc function PetscDTTanhSinhTensorQuadrature(petsclib::$UnionPetscLib, dim::$PetscInt, level::$PetscInt, a::$PetscReal, b::$PetscReal, q::PetscQuadrature )\n\n    @chk ccall(\n               (:PetscDTTanhSinhTensorQuadrature, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscReal, $PetscReal, Ptr{PetscQuadrature}),\n               dim, level, a, b, q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsol::PetscReal = PetscDTTanhSinhIntegrate(petsclib::PetscLibType,func::external, a::PetscReal, b::PetscReal, digits::PetscInt, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscDTTanhSinhIntegrate\"))\n\"\"\"\nfunction PetscDTTanhSinhIntegrate(petsclib::PetscLibType, func::external, a::PetscReal, b::PetscReal, digits::PetscInt, ctx::Cvoid) end\n\n@for_petsc function PetscDTTanhSinhIntegrate(petsclib::$UnionPetscLib, func::external, a::$PetscReal, b::$PetscReal, digits::$PetscInt, ctx::Cvoid )\n\tsol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTTanhSinhIntegrate, $petsc_library),\n               PetscErrorCode,\n               (external, $PetscReal, $PetscReal, $PetscInt, Ptr{Cvoid}, Ptr{$PetscReal}),\n               func, a, b, digits, ctx, sol_,\n              )\n\n\tsol = sol_[]\n\n\treturn sol\nend \n\n\"\"\"\n\tsol::PetscReal = PetscDTTanhSinhIntegrateMPFR(petsclib::PetscLibType,func::external, a::PetscReal, b::PetscReal, digits::PetscInt, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"DM/PetscDTTanhSinhIntegrateMPFR\"))\n\"\"\"\nfunction PetscDTTanhSinhIntegrateMPFR(petsclib::PetscLibType, func::external, a::PetscReal, b::PetscReal, digits::PetscInt, ctx::Cvoid) end\n\n@for_petsc function PetscDTTanhSinhIntegrateMPFR(petsclib::$UnionPetscLib, func::external, a::$PetscReal, b::$PetscReal, digits::$PetscInt, ctx::Cvoid )\n\tsol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTTanhSinhIntegrateMPFR, $petsc_library),\n               PetscErrorCode,\n               (external, $PetscReal, $PetscReal, $PetscInt, Ptr{Cvoid}, Ptr{$PetscReal}),\n               func, a, b, digits, ctx, sol_,\n              )\n\n\tsol = sol_[]\n\n\treturn sol\nend \n\n\"\"\"\n\tq::PetscQuadrature = PetscDTTensorQuadratureCreate(petsclib::PetscLibType,q1::PetscQuadrature, q2::PetscQuadrature) \ncreate the tensor product quadrature from two lower\n\nNot Collective\n\nInput Parameters:\n- `q1` - The first quadrature\n- `q2` - The second quadrature\n\nOutput Parameter:\n- `q` - A `PetscQuadrature` object\n\nLevel: intermediate\n\n-seealso: `PetscQuadrature`, `PetscDTGaussTensorQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTTensorQuadratureCreate\"))\n\"\"\"\nfunction PetscDTTensorQuadratureCreate(petsclib::PetscLibType, q1::PetscQuadrature, q2::PetscQuadrature) end\n\n@for_petsc function PetscDTTensorQuadratureCreate(petsclib::$UnionPetscLib, q1::PetscQuadrature, q2::PetscQuadrature )\n\tq_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:PetscDTTensorQuadratureCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscQuadrature, PetscQuadrature, Ptr{PetscQuadrature}),\n               q1, q2, q_,\n              )\n\n\tq = q_[]\n\n\treturn q\nend \n\n\"\"\"\n\tR::Vector{PetscReal} = PetscDTReconstructPoly(petsclib::PetscLibType,degree::PetscInt, nsource::PetscInt, sourcex::Vector{PetscReal}, ntarget::PetscInt, targetx::Vector{PetscReal}) \ncreate matrix representing polynomial reconstruction using cell intervals and evaluation at target intervals\n\nNot Collective\n\nInput Parameters:\n- `degree`  - degree of reconstruction polynomial\n- `nsource` - number of source intervals\n- `sourcex` - sorted coordinates of source cell boundaries (length `nsource`+1)\n- `ntarget` - number of target intervals\n- `targetx` - sorted coordinates of target cell boundaries (length `ntarget`+1)\n\nOutput Parameter:\n- `R` - reconstruction matrix, utarget = sum_s R[t*nsource+s] * usource[s]\n\nLevel: advanced\n\n-seealso: `PetscDTLegendreEval()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTReconstructPoly\"))\n\"\"\"\nfunction PetscDTReconstructPoly(petsclib::PetscLibType, degree::PetscInt, nsource::PetscInt, sourcex::Vector{PetscReal}, ntarget::PetscInt, targetx::Vector{PetscReal}) end\n\n@for_petsc function PetscDTReconstructPoly(petsclib::$UnionPetscLib, degree::$PetscInt, nsource::$PetscInt, sourcex::Vector{$PetscReal}, ntarget::$PetscInt, targetx::Vector{$PetscReal} )\n\tR = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTReconstructPoly, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               degree, nsource, sourcex, ntarget, targetx, R,\n              )\n\n\n\treturn R\nend \n\n\"\"\"\n\tin::PetscReal = PetscGaussLobattoLegendreIntegrate(petsclib::PetscLibType,n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, f::Vector{PetscReal}) \nCompute the L2 integral of a function on the GLL points\n\nNot Collective\n\nInput Parameters:\n- `n`       - the number of GLL nodes\n- `nodes`   - the GLL nodes\n- `weights` - the GLL weights\n- `f`       - the function values at the nodes\n\nOutput Parameter:\n- `in` - the value of the integral\n\nLevel: beginner\n\n-seealso: `PetscDTGaussLobattoLegendreQuadrature()`\n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreIntegrate\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreIntegrate(petsclib::PetscLibType, n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, f::Vector{PetscReal}) end\n\n@for_petsc function PetscGaussLobattoLegendreIntegrate(petsclib::$UnionPetscLib, n::$PetscInt, nodes::Vector{$PetscReal}, weights::Vector{$PetscReal}, f::Vector{$PetscReal} )\n\tin_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreIntegrate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               n, nodes, weights, f, in_,\n              )\n\n\tin = in_[]\n\n\treturn in\nend \n\n\"\"\"\n\tAA::PetscReal = PetscGaussLobattoLegendreElementLaplacianCreate(petsclib::PetscLibType,n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}) \ncomputes the Laplacian for a single 1d GLL element\n\nNot Collective\n\nInput Parameters:\n- `n`       - the number of GLL nodes\n- `nodes`   - the GLL nodes, of length `n`\n- `weights` - the GLL weights, of length `n`\n\nOutput Parameter:\n- `AA` - the stiffness element, of size `n` by `n`\n\nLevel: beginner\n\n-seealso: `PetscDTGaussLobattoLegendreQuadrature()`, `PetscGaussLobattoLegendreElementLaplacianDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementLaplacianCreate\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementLaplacianCreate(petsclib::PetscLibType, n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}) end\n\n@for_petsc function PetscGaussLobattoLegendreElementLaplacianCreate(petsclib::$UnionPetscLib, n::$PetscInt, nodes::Vector{$PetscReal}, weights::Vector{$PetscReal} )\n\tAA_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementLaplacianCreate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal),\n               n, nodes, weights, AA_,\n              )\n\n\tAA = AA_[]\n\n\treturn AA\nend \n\n\"\"\"\n\tPetscGaussLobattoLegendreElementLaplacianDestroy(petsclib::PetscLibType,n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, AA::PetscReal) \nfrees the Laplacian for a single 1d GLL element created with `PetscGaussLobattoLegendreElementLaplacianCreate()`\n\nNot Collective\n\nInput Parameters:\n- `n`       - the number of GLL nodes\n- `nodes`   - the GLL nodes, ignored\n- `weights` - the GLL weightss, ignored\n- `AA`      - the stiffness element from `PetscGaussLobattoLegendreElementLaplacianCreate()`\n\nLevel: beginner\n\n-seealso: `PetscDTGaussLobattoLegendreQuadrature()`, `PetscGaussLobattoLegendreElementLaplacianCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementLaplacianDestroy\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementLaplacianDestroy(petsclib::PetscLibType, n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, AA::PetscReal) end\n\n@for_petsc function PetscGaussLobattoLegendreElementLaplacianDestroy(petsclib::$UnionPetscLib, n::$PetscInt, nodes::Vector{$PetscReal}, weights::Vector{$PetscReal}, AA::$PetscReal )\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementLaplacianDestroy, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal),\n               n, nodes, weights, AA,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAA::PetscReal,AAT::PetscReal = PetscGaussLobattoLegendreElementGradientCreate(petsclib::PetscLibType,n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}) \ncomputes the gradient for a single 1d GLL element\n\nNot Collective\n\nInput Parameters:\n- `n`       - the number of GLL nodes\n- `nodes`   - the GLL nodes, of length `n`\n- `weights` - the GLL weights, of length `n`\n\nOutput Parameters:\n- `AA`  - the stiffness element, of dimension `n` by `n`\n- `AAT` - the transpose of AA (pass in `NULL` if you do not need this array), of dimension `n` by `n`\n\nLevel: beginner\n\n-seealso: `PetscDTGaussLobattoLegendreQuadrature()`, `PetscGaussLobattoLegendreElementLaplacianDestroy()`, `PetscGaussLobattoLegendreElementGradientDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementGradientCreate\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementGradientCreate(petsclib::PetscLibType, n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}) end\n\n@for_petsc function PetscGaussLobattoLegendreElementGradientCreate(petsclib::$UnionPetscLib, n::$PetscInt, nodes::Vector{$PetscReal}, weights::Vector{$PetscReal} )\n\tAA_ = Ref{$PetscReal}()\n\tAAT_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementGradientCreate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal, $PetscReal),\n               n, nodes, weights, AA_, AAT_,\n              )\n\n\tAA = AA_[]\n\tAAT = AAT_[]\n\n\treturn AA,AAT\nend \n\n\"\"\"\n\tPetscGaussLobattoLegendreElementGradientDestroy(petsclib::PetscLibType,n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, AA::PetscReal, AAT::PetscReal) \nfrees the gradient for a single 1d GLL element obtained with `PetscGaussLobattoLegendreElementGradientCreate()`\n\nNot Collective\n\nInput Parameters:\n- `n`       - the number of GLL nodes\n- `nodes`   - the GLL nodes, ignored\n- `weights` - the GLL weights, ignored\n- `AA`      - the stiffness element obtained with `PetscGaussLobattoLegendreElementGradientCreate()`\n- `AAT`     - the transpose of the element obtained with `PetscGaussLobattoLegendreElementGradientCreate()`\n\nLevel: beginner\n\n-seealso: `PetscDTGaussLobattoLegendreQuadrature()`, `PetscGaussLobattoLegendreElementLaplacianCreate()`, `PetscGaussLobattoLegendreElementAdvectionCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementGradientDestroy\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementGradientDestroy(petsclib::PetscLibType, n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, AA::PetscReal, AAT::PetscReal) end\n\n@for_petsc function PetscGaussLobattoLegendreElementGradientDestroy(petsclib::$UnionPetscLib, n::$PetscInt, nodes::Vector{$PetscReal}, weights::Vector{$PetscReal}, AA::$PetscReal, AAT::$PetscReal )\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementGradientDestroy, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal, $PetscReal),\n               n, nodes, weights, AA, AAT,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tAA::PetscReal = PetscGaussLobattoLegendreElementAdvectionCreate(petsclib::PetscLibType,n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}) \ncomputes the advection operator for a single 1d GLL element\n\nNot Collective\n\nInput Parameters:\n- `n`       - the number of GLL nodes\n- `nodes`   - the GLL nodes, of length `n`\n- `weights` - the GLL weights, of length `n`\n\nOutput Parameter:\n- `AA` - the stiffness element, of dimension `n` by `n`\n\nLevel: beginner\n\n-seealso: `PetscDTGaussLobattoLegendreQuadrature()`, `PetscGaussLobattoLegendreElementLaplacianCreate()`, `PetscGaussLobattoLegendreElementAdvectionDestroy()`\n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementAdvectionCreate\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementAdvectionCreate(petsclib::PetscLibType, n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}) end\n\n@for_petsc function PetscGaussLobattoLegendreElementAdvectionCreate(petsclib::$UnionPetscLib, n::$PetscInt, nodes::Vector{$PetscReal}, weights::Vector{$PetscReal} )\n\tAA_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementAdvectionCreate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal),\n               n, nodes, weights, AA_,\n              )\n\n\tAA = AA_[]\n\n\treturn AA\nend \n\n\"\"\"\n\tPetscGaussLobattoLegendreElementAdvectionDestroy(petsclib::PetscLibType,n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, AA::PetscReal) \nfrees the advection stiffness for a single 1d GLL element created with `PetscGaussLobattoLegendreElementAdvectionCreate()`\n\nNot Collective\n\nInput Parameters:\n- `n`       - the number of GLL nodes\n- `nodes`   - the GLL nodes, ignored\n- `weights` - the GLL weights, ignored\n- `AA`      - advection obtained with `PetscGaussLobattoLegendreElementAdvectionCreate()`\n\nLevel: beginner\n\n-seealso: `PetscDTGaussLobattoLegendreQuadrature()`, `PetscGaussLobattoLegendreElementAdvectionCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementAdvectionDestroy\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementAdvectionDestroy(petsclib::PetscLibType, n::PetscInt, nodes::Vector{PetscReal}, weights::Vector{PetscReal}, AA::PetscReal) end\n\n@for_petsc function PetscGaussLobattoLegendreElementAdvectionDestroy(petsclib::$UnionPetscLib, n::$PetscInt, nodes::Vector{$PetscReal}, weights::Vector{$PetscReal}, AA::$PetscReal )\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementAdvectionDestroy, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal),\n               n, nodes, weights, AA,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnodes::PetscReal,weights::PetscReal = PetscGaussLobattoLegendreElementMassCreate(petsclib::PetscLibType,n::PetscInt, AA::PetscReal) \n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementMassCreate\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementMassCreate(petsclib::PetscLibType, n::PetscInt, AA::PetscReal) end\n\n@for_petsc function PetscGaussLobattoLegendreElementMassCreate(petsclib::$UnionPetscLib, n::$PetscInt, AA::$PetscReal )\n\tnodes_ = Ref{$PetscReal}()\n\tweights_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementMassCreate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal),\n               n, nodes_, weights_, AA,\n              )\n\n\tnodes = nodes_[]\n\tweights = weights_[]\n\n\treturn nodes,weights\nend \n\n\"\"\"\n\tnodes::PetscReal,weights::PetscReal = PetscGaussLobattoLegendreElementMassDestroy(petsclib::PetscLibType,n::PetscInt, AA::PetscReal) \n\n# External Links\n$(_doc_external(\"DM/PetscGaussLobattoLegendreElementMassDestroy\"))\n\"\"\"\nfunction PetscGaussLobattoLegendreElementMassDestroy(petsclib::PetscLibType, n::PetscInt, AA::PetscReal) end\n\n@for_petsc function PetscGaussLobattoLegendreElementMassDestroy(petsclib::$UnionPetscLib, n::$PetscInt, AA::$PetscReal )\n\tnodes_ = Ref{$PetscReal}()\n\tweights_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscGaussLobattoLegendreElementMassDestroy, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscReal),\n               n, nodes_, weights_, AA,\n              )\n\n\tnodes = nodes_[]\n\tweights = weights_[]\n\n\treturn nodes,weights\nend \n\n\"\"\"\n\tcoord::Vector{PetscInt} = PetscDTIndexToBary(petsclib::PetscLibType,len::PetscInt, sum::PetscInt, index::PetscInt) \nconvert an index into a barycentric coordinate.\n\nInput Parameters:\n- `len`   - the desired length of the barycentric tuple (usually 1 more than the dimension it represents, so a barycentric coordinate in a triangle has length 3)\n- `sum`   - the value that the sum of the barycentric coordinates (which will be non-negative integers) should sum to\n- `index` - the index to convert: should be >= 0 and < Binomial(len - 1 + sum, sum)\n\nOutput Parameter:\n- `coord` - will be filled with the barycentric coordinate, of length `n`\n\nLevel: beginner\n\n-seealso: `PetscDTBaryToIndex()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTIndexToBary\"))\n\"\"\"\nfunction PetscDTIndexToBary(petsclib::PetscLibType, len::PetscInt, sum::PetscInt, index::PetscInt) end\n\n@for_petsc function PetscDTIndexToBary(petsclib::$UnionPetscLib, len::$PetscInt, sum::$PetscInt, index::$PetscInt )\n\tcoord = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:PetscDTIndexToBary, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               len, sum, index, coord,\n              )\n\n\n\treturn coord\nend \n\n\"\"\"\n\tindex::PetscInt = PetscDTBaryToIndex(petsclib::PetscLibType,len::PetscInt, sum::PetscInt, coord::Vector{PetscInt}) \nconvert a barycentric coordinate to an index\n\nInput Parameters:\n- `len`   - the desired length of the barycentric tuple (usually 1 more than the dimension it represents, so a barycentric coordinate in a triangle has length 3)\n- `sum`   - the value that the sum of the barycentric coordinates (which will be non-negative integers) should sum to\n- `coord` - a barycentric coordinate with the given length `len` and `sum`\n\nOutput Parameter:\n- `index` - the unique index for the coordinate, >= 0 and < Binomial(len - 1 + sum, sum)\n\nLevel: beginner\n\n-seealso: `PetscDTIndexToBary`\n\n# External Links\n$(_doc_external(\"DM/PetscDTBaryToIndex\"))\n\"\"\"\nfunction PetscDTBaryToIndex(petsclib::PetscLibType, len::PetscInt, sum::PetscInt, coord::Vector{PetscInt}) end\n\n@for_petsc function PetscDTBaryToIndex(petsclib::$UnionPetscLib, len::$PetscInt, sum::$PetscInt, coord::Vector{$PetscInt} )\n\tindex_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDTBaryToIndex, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               len, sum, coord, index_,\n              )\n\n\tindex = index_[]\n\n\treturn index\nend \n\n\"\"\"\n\tq::PetscQuadrature,fq::PetscQuadrature = PetscDTCreateQuadratureByCell(petsclib::PetscLibType,ct::DMPolytopeType, qorder::PetscInt, qtype::PetscDTSimplexQuadratureType) \nCreate default quadrature for a given cell\n\nNot collective\n\nInput Parameters:\n- `ct`     - The integration domain\n- `qorder` - The desired quadrature order\n- `qtype`  - The type of simplex quadrature, or PETSCDTSIMPLEXQUAD_DEFAULT\n\nOutput Parameters:\n- `q`  - The cell quadrature\n- `fq` - The face quadrature\n\nLevel: developer\n\n-seealso: `PetscDTCreateDefaultQuadrature()`, `PetscFECreateDefault()`, `PetscDTGaussTensorQuadrature()`, `PetscDTSimplexQuadrature()`, `PetscDTTensorQuadratureCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTCreateQuadratureByCell\"))\n\"\"\"\nfunction PetscDTCreateQuadratureByCell(petsclib::PetscLibType, ct::DMPolytopeType, qorder::PetscInt, qtype::PetscDTSimplexQuadratureType) end\n\n@for_petsc function PetscDTCreateQuadratureByCell(petsclib::$UnionPetscLib, ct::DMPolytopeType, qorder::$PetscInt, qtype::PetscDTSimplexQuadratureType )\n\tq_ = Ref{PetscQuadrature}()\n\tfq_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:PetscDTCreateQuadratureByCell, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, $PetscInt, PetscDTSimplexQuadratureType, Ptr{PetscQuadrature}, Ptr{PetscQuadrature}),\n               ct, qorder, qtype, q_, fq_,\n              )\n\n\tq = q_[]\n\tfq = fq_[]\n\n\treturn q,fq\nend \n\n\"\"\"\n\tq::PetscQuadrature,fq::PetscQuadrature = PetscDTCreateDefaultQuadrature(petsclib::PetscLibType,ct::DMPolytopeType, qorder::PetscInt) \nCreate default quadrature for a given cell\n\nNot collective\n\nInput Parameters:\n- `ct`     - The integration domain\n- `qorder` - The desired quadrature order\n\nOutput Parameters:\n- `q`  - The cell quadrature\n- `fq` - The face quadrature\n\nLevel: developer\n\n-seealso: `PetscDTCreateQuadratureByCell()`, `PetscFECreateDefault()`, `PetscDTGaussTensorQuadrature()`, `PetscDTSimplexQuadrature()`, `PetscDTTensorQuadratureCreate()`\n\n# External Links\n$(_doc_external(\"DM/PetscDTCreateDefaultQuadrature\"))\n\"\"\"\nfunction PetscDTCreateDefaultQuadrature(petsclib::PetscLibType, ct::DMPolytopeType, qorder::PetscInt) end\n\n@for_petsc function PetscDTCreateDefaultQuadrature(petsclib::$UnionPetscLib, ct::DMPolytopeType, qorder::$PetscInt )\n\tq_ = Ref{PetscQuadrature}()\n\tfq_ = Ref{PetscQuadrature}()\n\n    @chk ccall(\n               (:PetscDTCreateDefaultQuadrature, $petsc_library),\n               PetscErrorCode,\n               (DMPolytopeType, $PetscInt, Ptr{PetscQuadrature}, Ptr{PetscQuadrature}),\n               ct, qorder, q_, fq_,\n              )\n\n\tq = q_[]\n\tfq = fq_[]\n\n\treturn q,fq\nend \n\n\"\"\"\n\tPetscHDF5IntCast(petsclib::PetscLibType,a::PetscInt, b::hCsize_t) \n\n# External Links\n$(_doc_external(\"Viewer/PetscHDF5IntCast\"))\n\"\"\"\nfunction PetscHDF5IntCast(petsclib::PetscLibType, a::PetscInt, b::hCsize_t) end\n\n@for_petsc function PetscHDF5IntCast(petsclib::$UnionPetscLib, a::$PetscInt, b::hCsize_t )\n\n    @chk ccall(\n               (:PetscHDF5IntCast, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{hCsize_t}),\n               a, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrtolower(petsclib::PetscLibType,a::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrtolower\"))\n\"\"\"\nfunction PetscStrtolower(petsclib::PetscLibType, a::Vector{Cchar}) end\n\n@for_petsc function PetscStrtolower(petsclib::$UnionPetscLib, a::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscStrtolower, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               a,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrtoupper(petsclib::PetscLibType,a::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrtoupper\"))\n\"\"\"\nfunction PetscStrtoupper(petsclib::PetscLibType, a::Vector{Cchar}) end\n\n@for_petsc function PetscStrtoupper(petsclib::$UnionPetscLib, a::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscStrtoupper, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar},),\n               a,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrlen(petsclib::PetscLibType,s::Vector{Cchar}, len::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrlen\"))\n\"\"\"\nfunction PetscStrlen(petsclib::PetscLibType, s::Vector{Cchar}, len::Csize_t) end\n\n@for_petsc function PetscStrlen(petsclib::$UnionPetscLib, s::Vector{Cchar}, len::Csize_t )\n\n    @chk ccall(\n               (:PetscStrlen, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Csize_t}),\n               s, len,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrallocpy(petsclib::PetscLibType,s::Vector{Cchar}, t::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrallocpy\"))\n\"\"\"\nfunction PetscStrallocpy(petsclib::PetscLibType, s::Vector{Cchar}, t::Vector{Cchar}) end\n\n@for_petsc function PetscStrallocpy(petsclib::$UnionPetscLib, s::Vector{Cchar}, t::Vector{Cchar} )\n\tt_ = Ref(pointer(t))\n\n    @chk ccall(\n               (:PetscStrallocpy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Ptr{Cchar}}),\n               s, t_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscStrcmp(petsclib::PetscLibType,a::Vector{Cchar}, b::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrcmp\"))\n\"\"\"\nfunction PetscStrcmp(petsclib::PetscLibType, a::Vector{Cchar}, b::Vector{Cchar}) end\n\n@for_petsc function PetscStrcmp(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Vector{Cchar} )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscStrcmp, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               a, b, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscStrncpy(petsclib::PetscLibType,s::Vector{Cchar}, t::Vector{Cchar}, n::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrncpy\"))\n\"\"\"\nfunction PetscStrncpy(petsclib::PetscLibType, s::Vector{Cchar}, t::Vector{Cchar}, n::Csize_t) end\n\n@for_petsc function PetscStrncpy(petsclib::$UnionPetscLib, s::Vector{Cchar}, t::Vector{Cchar}, n::Csize_t )\n\n    @chk ccall(\n               (:PetscStrncpy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               s, t, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrlcat(petsclib::PetscLibType,s::Vector{Cchar}, t::Vector{Cchar}, n::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrlcat\"))\n\"\"\"\nfunction PetscStrlcat(petsclib::PetscLibType, s::Vector{Cchar}, t::Vector{Cchar}, n::Csize_t) end\n\n@for_petsc function PetscStrlcat(petsclib::$UnionPetscLib, s::Vector{Cchar}, t::Vector{Cchar}, n::Csize_t )\n\n    @chk ccall(\n               (:PetscStrlcat, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Csize_t),\n               s, t, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tt::PetscBool = PetscStrncmp(petsclib::PetscLibType,a::Vector{Cchar}, b::Vector{Cchar}, n::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrncmp\"))\n\"\"\"\nfunction PetscStrncmp(petsclib::PetscLibType, a::Vector{Cchar}, b::Vector{Cchar}, n::Csize_t) end\n\n@for_petsc function PetscStrncmp(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Vector{Cchar}, n::Csize_t )\n\tt_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscStrncmp, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Csize_t, Ptr{PetscBool}),\n               a, b, n, t_,\n              )\n\n\tt = t_[]\n\n\treturn t\nend \n\n\"\"\"\n\tPetscStrrstr(petsclib::PetscLibType,a::Vector{Cchar}, b::Vector{Cchar}, tmp::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrrstr\"))\n\"\"\"\nfunction PetscStrrstr(petsclib::PetscLibType, a::Vector{Cchar}, b::Vector{Cchar}, tmp::Vector{Cchar}) end\n\n@for_petsc function PetscStrrstr(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Vector{Cchar}, tmp::Vector{Cchar} )\n\ttmp_ = Ref(pointer(tmp))\n\n    @chk ccall(\n               (:PetscStrrstr, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Ptr{Cchar}}),\n               a, b, tmp_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrstr(petsclib::PetscLibType,haystack::Vector{Cchar}, needle::Vector{Cchar}, tmp::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrstr\"))\n\"\"\"\nfunction PetscStrstr(petsclib::PetscLibType, haystack::Vector{Cchar}, needle::Vector{Cchar}, tmp::Vector{Cchar}) end\n\n@for_petsc function PetscStrstr(petsclib::$UnionPetscLib, haystack::Vector{Cchar}, needle::Vector{Cchar}, tmp::Vector{Cchar} )\n\ttmp_ = Ref(pointer(tmp))\n\n    @chk ccall(\n               (:PetscStrstr, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Ptr{Cchar}}),\n               haystack, needle, tmp_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tt::PetscBool = PetscStrgrt(petsclib::PetscLibType,a::Vector{Cchar}, b::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrgrt\"))\n\"\"\"\nfunction PetscStrgrt(petsclib::PetscLibType, a::Vector{Cchar}, b::Vector{Cchar}) end\n\n@for_petsc function PetscStrgrt(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Vector{Cchar} )\n\tt_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscStrgrt, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               a, b, t_,\n              )\n\n\tt = t_[]\n\n\treturn t\nend \n\n\"\"\"\n\tPetscStrchr(petsclib::PetscLibType,a::Vector{Cchar}, b::Cchar, c::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrchr\"))\n\"\"\"\nfunction PetscStrchr(petsclib::PetscLibType, a::Vector{Cchar}, b::Cchar, c::Vector{Cchar}) end\n\n@for_petsc function PetscStrchr(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Cchar, c::Vector{Cchar} )\n\tc_ = Ref(pointer(c))\n\n    @chk ccall(\n               (:PetscStrchr, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar, Ptr{Ptr{Cchar}}),\n               a, b, c_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscStrrchr(petsclib::PetscLibType,a::Vector{Cchar}, b::Cchar, c::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrrchr\"))\n\"\"\"\nfunction PetscStrrchr(petsclib::PetscLibType, a::Vector{Cchar}, b::Cchar, c::Vector{Cchar}) end\n\n@for_petsc function PetscStrrchr(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Cchar, c::Vector{Cchar} )\n\tc_ = Ref(pointer(c))\n\n    @chk ccall(\n               (:PetscStrrchr, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Cchar, Ptr{Ptr{Cchar}}),\n               a, b, c_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = PetscStrendswith(petsclib::PetscLibType,a::Vector{Cchar}, b::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrendswith\"))\n\"\"\"\nfunction PetscStrendswith(petsclib::PetscLibType, a::Vector{Cchar}, b::Vector{Cchar}) end\n\n@for_petsc function PetscStrendswith(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Vector{Cchar} )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscStrendswith, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               a, b, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = PetscStrbeginswith(petsclib::PetscLibType,a::Vector{Cchar}, b::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscStrbeginswith\"))\n\"\"\"\nfunction PetscStrbeginswith(petsclib::PetscLibType, a::Vector{Cchar}, b::Vector{Cchar}) end\n\n@for_petsc function PetscStrbeginswith(petsclib::$UnionPetscLib, a::Vector{Cchar}, b::Vector{Cchar} )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscStrbeginswith, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}),\n               a, b, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tPetscMemmove(petsclib::PetscLibType,a::Cvoid, b::Cvoid, n::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscMemmove\"))\n\"\"\"\nfunction PetscMemmove(petsclib::PetscLibType, a::Cvoid, b::Cvoid, n::Csize_t) end\n\n@for_petsc function PetscMemmove(petsclib::$UnionPetscLib, a::Cvoid, b::Cvoid, n::Csize_t )\n\n    @chk ccall(\n               (:PetscMemmove, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t),\n               a, b, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMemcpy(petsclib::PetscLibType,a::Cvoid, b::Cvoid, n::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscMemcpy\"))\n\"\"\"\nfunction PetscMemcpy(petsclib::PetscLibType, a::Cvoid, b::Cvoid, n::Csize_t) end\n\n@for_petsc function PetscMemcpy(petsclib::$UnionPetscLib, a::Cvoid, b::Cvoid, n::Csize_t )\n\n    @chk ccall(\n               (:PetscMemcpy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t),\n               a, b, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMemzero(petsclib::PetscLibType,a::Cvoid, n::Csize_t) \n\n# External Links\n$(_doc_external(\"Sys/PetscMemzero\"))\n\"\"\"\nfunction PetscMemzero(petsclib::PetscLibType, a::Cvoid, n::Csize_t) end\n\n@for_petsc function PetscMemzero(petsclib::$UnionPetscLib, a::Cvoid, n::Csize_t )\n\n    @chk ccall(\n               (:PetscMemzero, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cvoid}, Csize_t),\n               a, n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBTMemzero(petsclib::PetscLibType,m::PetscCount, array::PetscBT) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTMemzero\"))\n\"\"\"\nfunction PetscBTMemzero(petsclib::PetscLibType, m::PetscCount, array::PetscBT) end\n\n@for_petsc function PetscBTMemzero(petsclib::$UnionPetscLib, m::PetscCount, array::PetscBT )\n\n    @chk ccall(\n               (:PetscBTMemzero, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, PetscBT),\n               m, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBTDestroy(petsclib::PetscLibType,array::PetscBT) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTDestroy\"))\n\"\"\"\nfunction PetscBTDestroy(petsclib::PetscLibType, array::PetscBT) end\n\n@for_petsc function PetscBTDestroy(petsclib::$UnionPetscLib, array::PetscBT )\n\n    @chk ccall(\n               (:PetscBTDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscBT},),\n               array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tarray::PetscBT = PetscBTCreate(petsclib::PetscLibType,m::PetscCount) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTCreate\"))\n\"\"\"\nfunction PetscBTCreate(petsclib::PetscLibType, m::PetscCount) end\n\n@for_petsc function PetscBTCreate(petsclib::$UnionPetscLib, m::PetscCount )\n\tarray_ = Ref{PetscBT}()\n\n    @chk ccall(\n               (:PetscBTCreate, $petsc_library),\n               PetscErrorCode,\n               (PetscCount, Ptr{PetscBT}),\n               m, array_,\n              )\n\n\tarray = array_[]\n\n\treturn array\nend \n\n\"\"\"\n\tPetscBTCopy(petsclib::PetscLibType,dest::PetscBT, m::PetscCount, source::PetscBT) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTCopy\"))\n\"\"\"\nfunction PetscBTCopy(petsclib::PetscLibType, dest::PetscBT, m::PetscCount, source::PetscBT) end\n\n@for_petsc function PetscBTCopy(petsclib::$UnionPetscLib, dest::PetscBT, m::PetscCount, source::PetscBT )\n\n    @chk ccall(\n               (:PetscBTCopy, $petsc_library),\n               PetscErrorCode,\n               (PetscBT, PetscCount, PetscBT),\n               dest, m, source,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBTSet(petsclib::PetscLibType,array::PetscBT, index::PetscCount) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTSet\"))\n\"\"\"\nfunction PetscBTSet(petsclib::PetscLibType, array::PetscBT, index::PetscCount) end\n\n@for_petsc function PetscBTSet(petsclib::$UnionPetscLib, array::PetscBT, index::PetscCount )\n\n    @chk ccall(\n               (:PetscBTSet, $petsc_library),\n               PetscErrorCode,\n               (PetscBT, PetscCount),\n               array, index,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBTNegate(petsclib::PetscLibType,array::PetscBT, index::PetscCount) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTNegate\"))\n\"\"\"\nfunction PetscBTNegate(petsclib::PetscLibType, array::PetscBT, index::PetscCount) end\n\n@for_petsc function PetscBTNegate(petsclib::$UnionPetscLib, array::PetscBT, index::PetscCount )\n\n    @chk ccall(\n               (:PetscBTNegate, $petsc_library),\n               PetscErrorCode,\n               (PetscBT, PetscCount),\n               array, index,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscBTClear(petsclib::PetscLibType,array::PetscBT, index::PetscCount) \n\n# External Links\n$(_doc_external(\"Sys/PetscBTClear\"))\n\"\"\"\nfunction PetscBTClear(petsclib::PetscLibType, array::PetscBT, index::PetscCount) end\n\n@for_petsc function PetscBTClear(petsclib::$UnionPetscLib, array::PetscBT, index::PetscCount )\n\n    @chk ccall(\n               (:PetscBTClear, $petsc_library),\n               PetscErrorCode,\n               (PetscBT, PetscCount),\n               array, index,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGpuFlops(petsclib::PetscLibType,n::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogGpuFlops\"))\n\"\"\"\nfunction PetscLogGpuFlops(petsclib::PetscLibType, n::PetscLogDouble) end\n\n@for_petsc function PetscLogGpuFlops(petsclib::$UnionPetscLib, n::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogGpuFlops, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               n,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGpuTimeAdd(petsclib::PetscLibType,t::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogGpuTimeAdd\"))\n\"\"\"\nfunction PetscLogGpuTimeAdd(petsclib::PetscLibType, t::PetscLogDouble) end\n\n@for_petsc function PetscLogGpuTimeAdd(petsclib::$UnionPetscLib, t::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogGpuTimeAdd, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogCpuToGpu(petsclib::PetscLibType,size::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogCpuToGpu\"))\n\"\"\"\nfunction PetscLogCpuToGpu(petsclib::PetscLibType, size::PetscLogDouble) end\n\n@for_petsc function PetscLogCpuToGpu(petsclib::$UnionPetscLib, size::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogCpuToGpu, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGpuToCpu(petsclib::PetscLibType,size::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogGpuToCpu\"))\n\"\"\"\nfunction PetscLogGpuToCpu(petsclib::PetscLibType, size::PetscLogDouble) end\n\n@for_petsc function PetscLogGpuToCpu(petsclib::$UnionPetscLib, size::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogGpuToCpu, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogCpuToGpuScalar(petsclib::PetscLibType,size::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogCpuToGpuScalar\"))\n\"\"\"\nfunction PetscLogCpuToGpuScalar(petsclib::PetscLibType, size::PetscLogDouble) end\n\n@for_petsc function PetscLogCpuToGpuScalar(petsclib::$UnionPetscLib, size::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogCpuToGpuScalar, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscLogGpuToCpuScalar(petsclib::PetscLibType,size::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscLogGpuToCpuScalar\"))\n\"\"\"\nfunction PetscLogGpuToCpuScalar(petsclib::PetscLibType, size::PetscLogDouble) end\n\n@for_petsc function PetscLogGpuToCpuScalar(petsclib::$UnionPetscLib, size::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscLogGpuToCpuScalar, $petsc_library),\n               PetscErrorCode,\n               (PetscLogDouble,),\n               size,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tb::PetscInt = PetscIntCast(petsclib::PetscLibType,a::MPIU_Count) \n\n# External Links\n$(_doc_external(\"Sys/PetscIntCast\"))\n\"\"\"\nfunction PetscIntCast(petsclib::PetscLibType, a::MPIU_Count) end\n\n@for_petsc function PetscIntCast(petsclib::$UnionPetscLib, a::MPIU_Count )\n\tb_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscIntCast, $petsc_library),\n               PetscErrorCode,\n               (MPIU_Count, Ptr{$PetscInt}),\n               a, b_,\n              )\n\n\tb = b_[]\n\n\treturn b\nend \n\n\"\"\"\n\tPetscBLASIntCast(petsclib::PetscLibType,a::MPIU_Count, b::PetscBLASInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscBLASIntCast\"))\n\"\"\"\nfunction PetscBLASIntCast(petsclib::PetscLibType, a::MPIU_Count, b::PetscBLASInt) end\n\n@for_petsc function PetscBLASIntCast(petsclib::$UnionPetscLib, a::MPIU_Count, b::PetscBLASInt )\n\n    @chk ccall(\n               (:PetscBLASIntCast, $petsc_library),\n               PetscErrorCode,\n               (MPIU_Count, Ptr{PetscBLASInt}),\n               a, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscCuBLASIntCast(petsclib::PetscLibType,a::MPIU_Count, b::PetscCuBLASInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscCuBLASIntCast\"))\n\"\"\"\nfunction PetscCuBLASIntCast(petsclib::PetscLibType, a::MPIU_Count, b::PetscCuBLASInt) end\n\n@for_petsc function PetscCuBLASIntCast(petsclib::$UnionPetscLib, a::MPIU_Count, b::PetscCuBLASInt )\n\n    @chk ccall(\n               (:PetscCuBLASIntCast, $petsc_library),\n               PetscErrorCode,\n               (MPIU_Count, Ptr{PetscCuBLASInt}),\n               a, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscHipBLASIntCast(petsclib::PetscLibType,a::MPIU_Count, b::PetscHipBLASInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscHipBLASIntCast\"))\n\"\"\"\nfunction PetscHipBLASIntCast(petsclib::PetscLibType, a::MPIU_Count, b::PetscHipBLASInt) end\n\n@for_petsc function PetscHipBLASIntCast(petsclib::$UnionPetscLib, a::MPIU_Count, b::PetscHipBLASInt )\n\n    @chk ccall(\n               (:PetscHipBLASIntCast, $petsc_library),\n               PetscErrorCode,\n               (MPIU_Count, Ptr{PetscHipBLASInt}),\n               a, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscMPIIntCast(petsclib::PetscLibType,a::MPIU_Count, b::PetscMPIInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscMPIIntCast\"))\n\"\"\"\nfunction PetscMPIIntCast(petsclib::PetscLibType, a::MPIU_Count, b::PetscMPIInt) end\n\n@for_petsc function PetscMPIIntCast(petsclib::$UnionPetscLib, a::MPIU_Count, b::PetscMPIInt )\n\n    @chk ccall(\n               (:PetscMPIIntCast, $petsc_library),\n               PetscErrorCode,\n               (MPIU_Count, Ptr{PetscMPIInt}),\n               a, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscCIntCast(petsclib::PetscLibType,a::MPIU_Count, b::Cint) \n\n# External Links\n$(_doc_external(\"Sys/PetscCIntCast\"))\n\"\"\"\nfunction PetscCIntCast(petsclib::PetscLibType, a::MPIU_Count, b::Cint) end\n\n@for_petsc function PetscCIntCast(petsclib::$UnionPetscLib, a::MPIU_Count, b::Cint )\n\n    @chk ccall(\n               (:PetscCIntCast, $petsc_library),\n               PetscErrorCode,\n               (MPIU_Count, Ptr{Cint}),\n               a, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tresult::PetscInt = PetscIntMultError(petsclib::PetscLibType,a::PetscInt, b::PetscInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscIntMultError\"))\n\"\"\"\nfunction PetscIntMultError(petsclib::PetscLibType, a::PetscInt, b::PetscInt) end\n\n@for_petsc function PetscIntMultError(petsclib::$UnionPetscLib, a::$PetscInt, b::$PetscInt )\n\tresult_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscIntMultError, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}),\n               a, b, result_,\n              )\n\n\tresult = result_[]\n\n\treturn result\nend \n\n\"\"\"\n\tresult::PetscInt = PetscIntSumError(petsclib::PetscLibType,a::PetscInt, b::PetscInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscIntSumError\"))\n\"\"\"\nfunction PetscIntSumError(petsclib::PetscLibType, a::PetscInt, b::PetscInt) end\n\n@for_petsc function PetscIntSumError(petsclib::$UnionPetscLib, a::$PetscInt, b::$PetscInt )\n\tresult_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscIntSumError, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}),\n               a, b, result_,\n              )\n\n\tresult = result_[]\n\n\treturn result\nend \n\n\"\"\"\n\tset::PetscBool = PetscCitationsRegister(petsclib::PetscLibType,cit::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscCitationsRegister\"))\n\"\"\"\nfunction PetscCitationsRegister(petsclib::PetscLibType, cit::Vector{Cchar}) end\n\n@for_petsc function PetscCitationsRegister(petsclib::$UnionPetscLib, cit::Vector{Cchar} )\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscCitationsRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{PetscBool}),\n               cit, set_,\n              )\n\n\tset = set_[]\n\n\treturn set\nend \n\n\"\"\"\n\tfactorial::PetscReal = PetscDTFactorial(petsclib::PetscLibType,n::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTFactorial\"))\n\"\"\"\nfunction PetscDTFactorial(petsclib::PetscLibType, n::PetscInt) end\n\n@for_petsc function PetscDTFactorial(petsclib::$UnionPetscLib, n::$PetscInt )\n\tfactorial_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTFactorial, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscReal}),\n               n, factorial_,\n              )\n\n\tfactorial = factorial_[]\n\n\treturn factorial\nend \n\n\"\"\"\n\tfactorial::PetscInt = PetscDTFactorialInt(petsclib::PetscLibType,n::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTFactorialInt\"))\n\"\"\"\nfunction PetscDTFactorialInt(petsclib::PetscLibType, n::PetscInt) end\n\n@for_petsc function PetscDTFactorialInt(petsclib::$UnionPetscLib, n::$PetscInt )\n\tfactorial_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDTFactorialInt, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}),\n               n, factorial_,\n              )\n\n\tfactorial = factorial_[]\n\n\treturn factorial\nend \n\n\"\"\"\n\tbinomial::PetscReal = PetscDTBinomial(petsclib::PetscLibType,n::PetscInt, k::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTBinomial\"))\n\"\"\"\nfunction PetscDTBinomial(petsclib::PetscLibType, n::PetscInt, k::PetscInt) end\n\n@for_petsc function PetscDTBinomial(petsclib::$UnionPetscLib, n::$PetscInt, k::$PetscInt )\n\tbinomial_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:PetscDTBinomial, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscReal}),\n               n, k, binomial_,\n              )\n\n\tbinomial = binomial_[]\n\n\treturn binomial\nend \n\n\"\"\"\n\tbinomial::PetscInt = PetscDTBinomialInt(petsclib::PetscLibType,n::PetscInt, k::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTBinomialInt\"))\n\"\"\"\nfunction PetscDTBinomialInt(petsclib::PetscLibType, n::PetscInt, k::PetscInt) end\n\n@for_petsc function PetscDTBinomialInt(petsclib::$UnionPetscLib, n::$PetscInt, k::$PetscInt )\n\tbinomial_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDTBinomialInt, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}),\n               n, k, binomial_,\n              )\n\n\tbinomial = binomial_[]\n\n\treturn binomial\nend \n\n\"\"\"\n\tperm::PetscInt,isOdd::PetscBool = PetscDTEnumPerm(petsclib::PetscLibType,n::PetscInt, k::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTEnumPerm\"))\n\"\"\"\nfunction PetscDTEnumPerm(petsclib::PetscLibType, n::PetscInt, k::PetscInt) end\n\n@for_petsc function PetscDTEnumPerm(petsclib::$UnionPetscLib, n::$PetscInt, k::$PetscInt )\n\tperm_ = Ref{$PetscInt}()\n\tisOdd_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDTEnumPerm, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}),\n               n, k, perm_, isOdd_,\n              )\n\n\tperm = perm_[]\n\tisOdd = isOdd_[]\n\n\treturn perm,isOdd\nend \n\n\"\"\"\n\tperm::PetscInt,k::PetscInt,isOdd::PetscBool = PetscDTPermIndex(petsclib::PetscLibType,n::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTPermIndex\"))\n\"\"\"\nfunction PetscDTPermIndex(petsclib::PetscLibType, n::PetscInt) end\n\n@for_petsc function PetscDTPermIndex(petsclib::$UnionPetscLib, n::$PetscInt )\n\tperm_ = Ref{$PetscInt}()\n\tk_ = Ref{$PetscInt}()\n\tisOdd_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDTPermIndex, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               n, perm_, k_, isOdd_,\n              )\n\n\tperm = perm_[]\n\tk = k_[]\n\tisOdd = isOdd_[]\n\n\treturn perm,k,isOdd\nend \n\n\"\"\"\n\tsubset::PetscInt = PetscDTEnumSubset(petsclib::PetscLibType,n::PetscInt, k::PetscInt, j::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTEnumSubset\"))\n\"\"\"\nfunction PetscDTEnumSubset(petsclib::PetscLibType, n::PetscInt, k::PetscInt, j::PetscInt) end\n\n@for_petsc function PetscDTEnumSubset(petsclib::$UnionPetscLib, n::$PetscInt, k::$PetscInt, j::$PetscInt )\n\tsubset_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDTEnumSubset, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}),\n               n, k, j, subset_,\n              )\n\n\tsubset = subset_[]\n\n\treturn subset\nend \n\n\"\"\"\n\tsubset::PetscInt,index::PetscInt = PetscDTSubsetIndex(petsclib::PetscLibType,n::PetscInt, k::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTSubsetIndex\"))\n\"\"\"\nfunction PetscDTSubsetIndex(petsclib::PetscLibType, n::PetscInt, k::PetscInt) end\n\n@for_petsc function PetscDTSubsetIndex(petsclib::$UnionPetscLib, n::$PetscInt, k::$PetscInt )\n\tsubset_ = Ref{$PetscInt}()\n\tindex_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:PetscDTSubsetIndex, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               n, k, subset_, index_,\n              )\n\n\tsubset = subset_[]\n\tindex = index_[]\n\n\treturn subset,index\nend \n\n\"\"\"\n\tperm::PetscInt,isOdd::PetscBool = PetscDTEnumSplit(petsclib::PetscLibType,n::PetscInt, k::PetscInt, j::PetscInt) \n\n# External Links\n$(_doc_external(\"DM/PetscDTEnumSplit\"))\n\"\"\"\nfunction PetscDTEnumSplit(petsclib::PetscLibType, n::PetscInt, k::PetscInt, j::PetscInt) end\n\n@for_petsc function PetscDTEnumSplit(petsclib::$UnionPetscLib, n::$PetscInt, k::$PetscInt, j::$PetscInt )\n\tperm_ = Ref{$PetscInt}()\n\tisOdd_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscDTEnumSplit, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}),\n               n, k, j, perm_, isOdd_,\n              )\n\n\tperm = perm_[]\n\tisOdd = isOdd_[]\n\n\treturn perm,isOdd\nend \n\n\"\"\"\n\tPetscTime(petsclib::PetscLibType,v::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscTime\"))\n\"\"\"\nfunction PetscTime(petsclib::PetscLibType, v::PetscLogDouble) end\n\n@for_petsc function PetscTime(petsclib::$UnionPetscLib, v::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscTime, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscTimeSubtract(petsclib::PetscLibType,v::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscTimeSubtract\"))\n\"\"\"\nfunction PetscTimeSubtract(petsclib::PetscLibType, v::PetscLogDouble) end\n\n@for_petsc function PetscTimeSubtract(petsclib::$UnionPetscLib, v::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscTimeSubtract, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscTimeAdd(petsclib::PetscLibType,v::PetscLogDouble) \n\n# External Links\n$(_doc_external(\"Sys/PetscTimeAdd\"))\n\"\"\"\nfunction PetscTimeAdd(petsclib::PetscLibType, v::PetscLogDouble) end\n\n@for_petsc function PetscTimeAdd(petsclib::$UnionPetscLib, v::PetscLogDouble )\n\n    @chk ccall(\n               (:PetscTimeAdd, $petsc_library),\n               PetscErrorCode,\n               (Ptr{PetscLogDouble},),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsBegin(petsclib::PetscLibType,comm::MPI_Comm, prefix::Vector{Cchar}, mess::Vector{Cchar}, sec::Vector{Cchar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsBegin\"))\n\"\"\"\nfunction PetscOptionsBegin(petsclib::PetscLibType, comm::MPI_Comm, prefix::Vector{Cchar}, mess::Vector{Cchar}, sec::Vector{Cchar}) end\n\n@for_petsc function PetscOptionsBegin(petsclib::$UnionPetscLib, comm::MPI_Comm, prefix::Vector{Cchar}, mess::Vector{Cchar}, sec::Vector{Cchar} )\n\n    @chk ccall(\n               (:PetscOptionsBegin, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}),\n               comm, prefix, mess, sec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tPetscOptionsEnd(petsclib::PetscLibType) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsEnd\"))\n\"\"\"\nfunction PetscOptionsEnd(petsclib::PetscLibType) end\n\n@for_petsc function PetscOptionsEnd(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:PetscOptionsEnd, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalue::PetscBool,set::PetscBool = PetscOptionsBool(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscBool) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsBool\"))\n\"\"\"\nfunction PetscOptionsBool(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscBool) end\n\n@for_petsc function PetscOptionsBool(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscBool )\n\tvalue_ = Ref{PetscBool}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsBool, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, PetscBool, Ptr{PetscBool}, Ptr{PetscBool}),\n               opt, text, man, currentvalue, value_, set_,\n              )\n\n\tvalue = value_[]\n\tset = set_[]\n\n\treturn value,set\nend \n\n\"\"\"\n\tPetscOptionsBool3(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscBool3, value::PetscBool3, set::PetscBool3) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsBool3\"))\n\"\"\"\nfunction PetscOptionsBool3(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscBool3, value::PetscBool3, set::PetscBool3) end\n\n@for_petsc function PetscOptionsBool3(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscBool3, value::PetscBool3, set::PetscBool3 )\n\n    @chk ccall(\n               (:PetscOptionsBool3, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, PetscBool3, Ptr{PetscBool3}, Ptr{PetscBool3}),\n               opt, text, man, currentvalue, value, set,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalue::PetscInt,set::PetscBool = PetscOptionsInt(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscInt) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsInt\"))\n\"\"\"\nfunction PetscOptionsInt(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscInt) end\n\n@for_petsc function PetscOptionsInt(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::$PetscInt )\n\tvalue_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsInt, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, $PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}),\n               opt, text, man, currentvalue, value_, set_,\n              )\n\n\tvalue = value_[]\n\tset = set_[]\n\n\treturn value,set\nend \n\n\"\"\"\n\tvalue::PetscReal,set::PetscBool = PetscOptionsReal(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscReal) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsReal\"))\n\"\"\"\nfunction PetscOptionsReal(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscReal) end\n\n@for_petsc function PetscOptionsReal(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::$PetscReal )\n\tvalue_ = Ref{$PetscReal}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsReal, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, $PetscReal, Ptr{$PetscReal}, Ptr{PetscBool}),\n               opt, text, man, currentvalue, value_, set_,\n              )\n\n\tvalue = value_[]\n\tset = set_[]\n\n\treturn value,set\nend \n\n\"\"\"\n\tvalue::PetscScalar,set::PetscBool = PetscOptionsScalar(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscScalar) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsScalar\"))\n\"\"\"\nfunction PetscOptionsScalar(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::PetscScalar) end\n\n@for_petsc function PetscOptionsScalar(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, currentvalue::$PetscScalar )\n\tvalue_ = Ref{$PetscScalar}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsScalar, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, $PetscScalar, Ptr{$PetscScalar}, Ptr{PetscBool}),\n               opt, text, man, currentvalue, value_, set_,\n              )\n\n\tvalue = value_[]\n\tset = set_[]\n\n\treturn value,set\nend \n\n\"\"\"\n\tn::PetscInt,set::PetscBool = PetscOptionsScalarArray(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsScalarArray\"))\n\"\"\"\nfunction PetscOptionsScalarArray(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscScalar}) end\n\n@for_petsc function PetscOptionsScalarArray(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{$PetscScalar} )\n\tn_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsScalarArray, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscScalar}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               opt, text, man, value, n_, set_,\n              )\n\n\tn = n_[]\n\tset = set_[]\n\n\treturn n,set\nend \n\n\"\"\"\n\tn::PetscInt,set::PetscBool = PetscOptionsIntArray(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscInt}) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsIntArray\"))\n\"\"\"\nfunction PetscOptionsIntArray(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscInt}) end\n\n@for_petsc function PetscOptionsIntArray(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{$PetscInt} )\n\tn_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsIntArray, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               opt, text, man, value, n_, set_,\n              )\n\n\tn = n_[]\n\tset = set_[]\n\n\treturn n,set\nend \n\n\"\"\"\n\tn::PetscInt,set::PetscBool = PetscOptionsRealArray(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscReal}) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsRealArray\"))\n\"\"\"\nfunction PetscOptionsRealArray(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscReal}) end\n\n@for_petsc function PetscOptionsRealArray(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{$PetscReal} )\n\tn_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsRealArray, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{$PetscReal}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               opt, text, man, value, n_, set_,\n              )\n\n\tn = n_[]\n\tset = set_[]\n\n\treturn n,set\nend \n\n\"\"\"\n\tn::PetscInt,set::PetscBool = PetscOptionsBoolArray(petsclib::PetscLibType,opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscBool}) \n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsBoolArray\"))\n\"\"\"\nfunction PetscOptionsBoolArray(petsclib::PetscLibType, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscBool}) end\n\n@for_petsc function PetscOptionsBoolArray(petsclib::$UnionPetscLib, opt::Vector{Cchar}, text::Vector{Cchar}, man::Vector{Cchar}, value::Vector{PetscBool} )\n\tn_ = Ref{$PetscInt}()\n\tset_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:PetscOptionsBoolArray, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Ptr{PetscBool}, Ptr{$PetscInt}, Ptr{PetscBool}),\n               opt, text, man, value, n_, set_,\n              )\n\n\tn = n_[]\n\tset = set_[]\n\n\treturn n,set\nend \n\n"
  },
  {
    "path": "src/autowrapped/TS_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_TSTrajectory end\nconst TSTrajectory = Ptr{_n_TSTrajectory}\n\nmutable struct _n_TSAdapt end\nconst TSAdapt = Ptr{_n_TSAdapt}\n\nmutable struct _n_TSMonitorVTKCtx end\nconst TSMonitorVTKCtx = Ptr{_n_TSMonitorVTKCtx}\n\nmutable struct TSRHSJacobianPFn end\n\nmutable struct _n_TSGLLEAdapt end\nconst TSGLLEAdapt = Ptr{_n_TSGLLEAdapt}\n\nmutable struct TSGLLEAcceptFn end\n\nmutable struct TSAlpha2PredictorFn end\n\n#mutable struct TSRHSFunctionFn end\n#mutable struct TSSolutionFn end\n#mutable struct TSForcingFn end\n#mutable struct TSRHSJacobianFn end\n#mutable struct TSIFunctionFn end\n#mutable struct TSIJacobianFn end\n#mutable struct TSI2FunctionFn end\n#mutable struct TSI2JacobianFn end\n#mutable struct TSTransientVariableFn end\n# -------------------------------------------------------\n\"\"\"\n\tTSSetFromOptions(petsclib::PetscLibType,ts::TS) \nSets various `TS` parameters from the options database\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOptions Database Keys:\n- `-ts_type <type>`                                                    - EULER, BEULER, SUNDIALS, PSEUDO, CN, RK, THETA, ALPHA, GLLE,  SSP, GLEE, BSYMP, IRK, see `TSType`\n- `-ts_save_trajectory`                                                - checkpoint the solution at each time-step\n- `-ts_max_time <time>`                                                - maximum time to compute to\n- `-ts_time_span <t0,...tf>`                                           - sets the time span, solutions are computed and stored for each indicated time, init_time and max_time are set\n- `-ts_eval_times <t0,...tn>`                                          - time points where solutions are computed and stored for each indicated time\n- `-ts_max_steps <steps>`                                              - maximum time-step number to execute until (possibly with nonzero starting value)\n- `-ts_run_steps <steps>`                                              - maximum number of time steps for TSSolve to take on each call\n- `-ts_init_time <time>`                                               - initial time to start computation\n- `-ts_final_time <time>`                                              - final time to compute to (deprecated: use `-ts_max_time`)\n- `-ts_dt <dt>`                                                        - initial time step\n- `-ts_exact_final_time <stepover,interpolate,matchstep>`              - whether to stop at the exact given final time and how to compute the solution at that time\n- `-ts_max_snes_failures <maxfailures>`                                - Maximum number of nonlinear solve failures allowed\n- `-ts_max_reject <maxrejects>`                                        - Maximum number of step rejections before step fails\n- `-ts_error_if_step_fails <true,false>`                               - Error if no step succeeds\n- `-ts_rtol <rtol>`                                                    - relative tolerance for local truncation error\n- `-ts_atol <atol>`                                                    - Absolute tolerance for local truncation error\n- `-ts_rhs_jacobian_test_mult -mat_shell_test_mult_view`               - test the Jacobian at each iteration against finite difference with RHS function\n- `-ts_rhs_jacobian_test_mult_transpose`                               - test the Jacobian at each iteration against finite difference with RHS function\n- `-ts_adjoint_solve <yes,no>`                                         - After solving the ODE/DAE solve the adjoint problem (requires `-ts_save_trajectory`)\n- `-ts_fd_color`                                                       - Use finite differences with coloring to compute IJacobian\n- `-ts_monitor`                                                        - print information at each timestep\n- `-ts_monitor_cancel`                                                 - Cancel all monitors\n- `-ts_monitor_wall_clock_time`                                        - Monitor wall-clock time, KSP iterations, and SNES iterations per step\n- `-ts_monitor_lg_solution`                                            - Monitor solution graphically\n- `-ts_monitor_lg_error`                                               - Monitor error graphically\n- `-ts_monitor_error`                                                  - Monitors norm of error\n- `-ts_monitor_lg_timestep`                                            - Monitor timestep size graphically\n- `-ts_monitor_lg_timestep_log`                                        - Monitor log timestep size graphically\n- `-ts_monitor_lg_snes_iterations`                                     - Monitor number nonlinear iterations for each timestep graphically\n- `-ts_monitor_lg_ksp_iterations`                                      - Monitor number nonlinear iterations for each timestep graphically\n- `-ts_monitor_sp_eig`                                                 - Monitor eigenvalues of linearized operator graphically\n- `-ts_monitor_draw_solution`                                          - Monitor solution graphically\n- `-ts_monitor_draw_solution_phase  <xleft,yleft,xright,yright>`       - Monitor solution graphically with phase diagram, requires problem with exactly 2 degrees of freedom\n- `-ts_monitor_draw_error`                                             - Monitor error graphically, requires use to have provided TSSetSolutionFunction()\n- `-ts_monitor_solution [ascii binary draw][:filename][:viewerformat]` - monitors the solution at each timestep\n- `-ts_monitor_solution_interval <interval>`                           - output once every interval (default=1) time steps. Use -1 to only output at the end of the simulation\n- `-ts_monitor_solution_skip_initial`                                  - skip writing of initial condition\n- `-ts_monitor_solution_vtk <filename.vts,filename.vtu>`               - Save each time step to a binary file, use filename-%%03\" PetscInt_FMT \".vts (filename-%%03\" PetscInt_FMT \".vtu)\n- `-ts_monitor_solution_vtk_interval <interval>`                       - output once every interval (default=1) time steps. Use -1 to only output at the end of the simulation\n- `-ts_monitor_envelope`                                               - determine maximum and minimum value of each component of the solution over the solution time\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSGetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetFromOptions\"))\n\"\"\"\nfunction TSSetFromOptions(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSSetFromOptions(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetTrajectory(petsclib::PetscLibType,ts::TS, tr::TSTrajectory) \nGets the trajectory from a `TS` if it exists\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `tr` - the `TSTrajectory` object, if it exists\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSTrajectory`, `TSAdjointSolve()`, `TSTrajectoryCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetTrajectory\"))\n\"\"\"\nfunction TSGetTrajectory(petsclib::PetscLibType, ts::TS, tr::TSTrajectory) end\n\n@for_petsc function TSGetTrajectory(petsclib::$UnionPetscLib, ts::TS, tr::TSTrajectory )\n\n    @chk ccall(\n               (:TSGetTrajectory, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSTrajectory}),\n               ts, tr,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetSaveTrajectory(petsclib::PetscLibType,ts::TS) \nCauses the `TS` to save its solutions as it iterates forward in time in a `TSTrajectory` object\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOptions Database Keys:\n- `-ts_save_trajectory`      - saves the trajectory to a file\n- `-ts_trajectory_type type` - set trajectory type\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSTrajectory`, `TSGetTrajectory()`, `TSAdjointSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetSaveTrajectory\"))\n\"\"\"\nfunction TSSetSaveTrajectory(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSSetSaveTrajectory(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSSetSaveTrajectory, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSResetTrajectory(petsclib::PetscLibType,ts::TS) \nDestroys and recreates the internal `TSTrajectory` object\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSGetTrajectory()`, `TSAdjointSolve()`, `TSRemoveTrajectory()`\n\n# External Links\n$(_doc_external(\"Ts/TSResetTrajectory\"))\n\"\"\"\nfunction TSResetTrajectory(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSResetTrajectory(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSResetTrajectory, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRemoveTrajectory(petsclib::PetscLibType,ts::TS) \nDestroys and removes the internal `TSTrajectory` object from a `TS`\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSResetTrajectory()`, `TSAdjointSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSRemoveTrajectory\"))\n\"\"\"\nfunction TSRemoveTrajectory(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRemoveTrajectory(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSRemoveTrajectory, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSJacobian(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, A::PetscMat, B::PetscMat) \nComputes the Jacobian matrix that has been\nset with `TSSetRHSJacobian()`.\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `t`  - current timestep\n- `U`  - input vector\n\nOutput Parameters:\n- `A` - Jacobian matrix\n- `B` - optional matrix used to compute the preconditioner, often the same as `A`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSJacobian()`, `KSPSetOperators()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSJacobian\"))\n\"\"\"\nfunction TSComputeRHSJacobian(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, A::PetscMat, B::PetscMat) end\n\n@for_petsc function TSComputeRHSJacobian(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, A::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:TSComputeRHSJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CMat, CMat),\n               ts, t, U, A, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSFunction(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, y::PetscVec) \nEvaluates the right\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `t`  - current time\n- `U`  - state vector\n\nOutput Parameter:\n- `y` - right-hand side\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSFunction()`, `TSComputeIFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSFunction\"))\n\"\"\"\nfunction TSComputeRHSFunction(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, y::PetscVec) end\n\n@for_petsc function TSComputeRHSFunction(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:TSComputeRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec),\n               ts, t, U, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeSolutionFunction(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec) \nEvaluates the solution function.\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `t`  - current time\n\nOutput Parameter:\n- `U` - the solution\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetSolutionFunction()`, `TSSetRHSFunction()`, `TSComputeIFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeSolutionFunction\"))\n\"\"\"\nfunction TSComputeSolutionFunction(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec) end\n\n@for_petsc function TSComputeSolutionFunction(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec )\n\n    @chk ccall(\n               (:TSComputeSolutionFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec),\n               ts, t, U,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeForcingFunction(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec) \nEvaluates the forcing function.\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `t`  - current time\n\nOutput Parameter:\n- `U` - the function value\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetSolutionFunction()`, `TSSetRHSFunction()`, `TSComputeIFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeForcingFunction\"))\n\"\"\"\nfunction TSComputeForcingFunction(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec) end\n\n@for_petsc function TSComputeForcingFunction(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec )\n\n    @chk ccall(\n               (:TSComputeForcingFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec),\n               ts, t, U,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIFunction(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, Y::PetscVec, imex::PetscBool) \nEvaluates the DAE residual written in the implicit form F(t,U,Udot)=0\n\nCollective\n\nInput Parameters:\n- `ts`   - the `TS` context\n- `t`    - current time\n- `U`    - state vector\n- `Udot` - time derivative of state vector\n- `imex` - flag indicates if the method is `TSARKIMEX` so that the RHSFunction should be kept separate\n\nOutput Parameter:\n- `Y` - right-hand side\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetIFunction()`, `TSComputeRHSFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIFunction\"))\n\"\"\"\nfunction TSComputeIFunction(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, Y::PetscVec, imex::PetscBool) end\n\n@for_petsc function TSComputeIFunction(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Udot::PetscVec, Y::PetscVec, imex::PetscBool )\n\n    @chk ccall(\n               (:TSComputeIFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, CVec, PetscBool),\n               ts, t, U, Udot, Y, imex,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIJacobian(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, A::PetscMat, B::PetscMat, imex::PetscBool) \nEvaluates the Jacobian of the DAE\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `t`     - current timestep\n- `U`     - state vector\n- `Udot`  - time derivative of state vector\n- `shift` - shift to apply, see note below\n- `imex`  - flag indicates if the method is `TSARKIMEX` so that the RHSJacobian should be kept separate\n\nOutput Parameters:\n- `A` - Jacobian matrix\n- `B` - matrix from which the preconditioner is constructed; often the same as `A`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIJacobian\"))\n\"\"\"\nfunction TSComputeIJacobian(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, A::PetscMat, B::PetscMat, imex::PetscBool) end\n\n@for_petsc function TSComputeIJacobian(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Udot::PetscVec, shift::$PetscReal, A::PetscMat, B::PetscMat, imex::PetscBool )\n\n    @chk ccall(\n               (:TSComputeIJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, $PetscReal, CMat, CMat, PetscBool),\n               ts, t, U, Udot, shift, A, B, imex,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetRHSFunction(petsclib::PetscLibType,ts::TS, r::PetscVec, f::TSRHSFunctionFn, ctx::Cvoid) \nSets the routine for evaluating the function,\nwhere U_t = G(t,u).\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the `TS` context obtained from `TSCreate()`\n- `r`   - vector to put the computed right-hand side (or `NULL` to have it created)\n- `f`   - routine for evaluating the right-hand-side function\n- `ctx` - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSRHSFunctionFn`, `TSSetRHSJacobian()`, `TSSetIJacobian()`, `TSSetIFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetRHSFunction\"))\n\"\"\"\nfunction TSSetRHSFunction(petsclib::PetscLibType, ts::TS, r::PetscVec, f::TSRHSFunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSSetRHSFunction(petsclib::$UnionPetscLib, ts::TS, r::PetscVec, f::TSRHSFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, Ptr{TSRHSFunctionFn}, Ptr{Cvoid}),\n               ts, r, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetSolutionFunction(petsclib::PetscLibType,ts::TS, f::TSSolutionFn, ctx::Cvoid) \nProvide a function that computes the solution of the ODE or DAE\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the `TS` context obtained from `TSCreate()`\n- `f`   - routine for evaluating the solution\n- `ctx` - [optional] user-defined context for private data for the\nfunction evaluation routine (may be `NULL`)\n\nOptions Database Keys:\n- `-ts_monitor_lg_error`   - create a graphical monitor of error history, requires user to have provided `TSSetSolutionFunction()`\n- `-ts_monitor_draw_error` - Monitor error graphically, requires user to have provided `TSSetSolutionFunction()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSolutionFn`, `TSSetRHSJacobian()`, `TSSetIJacobian()`, `TSComputeSolutionFunction()`, `TSSetForcingFunction()`, `TSSetSolution()`, `TSGetSolution()`, `TSMonitorLGError()`, `TSMonitorDrawError()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetSolutionFunction\"))\n\"\"\"\nfunction TSSetSolutionFunction(petsclib::PetscLibType, ts::TS, f::TSSolutionFn, ctx::Cvoid) end\n\n@for_petsc function TSSetSolutionFunction(petsclib::$UnionPetscLib, ts::TS, f::TSSolutionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetSolutionFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSSolutionFn}, Ptr{Cvoid}),\n               ts, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetForcingFunction(petsclib::PetscLibType,ts::TS, func::TSForcingFn, ctx::Cvoid) \nProvide a function that computes a forcing term for a ODE or PDE\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `func` - routine for evaluating the forcing function\n- `ctx`  - [optional] user-defined context for private data for the function evaluation routine\n(may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSForcingFn`, `TSSetRHSJacobian()`, `TSSetIJacobian()`,\n`TSComputeSolutionFunction()`, `TSSetSolutionFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetForcingFunction\"))\n\"\"\"\nfunction TSSetForcingFunction(petsclib::PetscLibType, ts::TS, func::TSForcingFn, ctx::Cvoid) end\n\n@for_petsc function TSSetForcingFunction(petsclib::$UnionPetscLib, ts::TS, func::TSForcingFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetForcingFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSForcingFn}, Ptr{Cvoid}),\n               ts, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetRHSJacobian(petsclib::PetscLibType,ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSRHSJacobianFn, ctx::Cvoid) \nSets the function to compute the Jacobian of G,\nwhere U_t = G(U,t), as well as the location to store the matrix.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `Amat` - (approximate) location to store Jacobian matrix entries computed by `f`\n- `Pmat` - matrix from which preconditioner is to be constructed (usually the same as `Amat`)\n- `f`    - the Jacobian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the Jacobian evaluation routine (may be `NULL`)\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSRHSJacobianFn`, `SNESComputeJacobianDefaultColor()`,\n`TSSetRHSFunction()`, `TSRHSJacobianSetReuse()`, `TSSetIJacobian()`, `TSRHSFunctionFn`, `TSIFunctionFn`\n\n# External Links\n$(_doc_external(\"Ts/TSSetRHSJacobian\"))\n\"\"\"\nfunction TSSetRHSJacobian(petsclib::PetscLibType, ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSRHSJacobianFn, ctx::Cvoid) end\n\n@for_petsc function TSSetRHSJacobian(petsclib::$UnionPetscLib, ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSRHSJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetRHSJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat, CMat, Ptr{TSRHSJacobianFn}, Ptr{Cvoid}),\n               ts, Amat, Pmat, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetIFunction(petsclib::PetscLibType,ts::TS, r::PetscVec, f::TSIFunctionFn, ctx::Cvoid) \nSet the function to compute F(t,U,U_t) where F() = 0 is the DAE to be solved.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the `TS` context obtained from `TSCreate()`\n- `r`   - vector to hold the residual (or `NULL` to have it created internally)\n- `f`   - the function evaluation routine\n- `ctx` - user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSIFunctionFn`, `TSSetRHSJacobian()`, `TSSetRHSFunction()`,\n`TSSetIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetIFunction\"))\n\"\"\"\nfunction TSSetIFunction(petsclib::PetscLibType, ts::TS, r::PetscVec, f::TSIFunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSSetIFunction(petsclib::$UnionPetscLib, ts::TS, r::PetscVec, f::TSIFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetIFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, Ptr{TSIFunctionFn}, Ptr{Cvoid}),\n               ts, r, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetIFunction(petsclib::PetscLibType,ts::TS, r::PetscVec, func::TSIFunctionFn, ctx::Cvoid) \nReturns the vector where the implicit residual is stored and the function/context to compute it.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameters:\n- `r`    - vector to hold residual (or `NULL`)\n- `func` - the function to compute residual (or `NULL`)\n- `ctx`  - the function context (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSetIFunction()`, `SNESGetFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetIFunction\"))\n\"\"\"\nfunction TSGetIFunction(petsclib::PetscLibType, ts::TS, r::PetscVec, func::TSIFunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSGetIFunction(petsclib::$UnionPetscLib, ts::TS, r::PetscVec, func::TSIFunctionFn, ctx::Cvoid )\n\tr_ = Ref(r.ptr)\n\n    @chk ccall(\n               (:TSGetIFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}, TSIFunctionFn, Cvoid),\n               ts, r_, func, ctx,\n              )\n\n\tr.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetRHSFunction(petsclib::PetscLibType,ts::TS, r::PetscVec, func::TSRHSFunctionFn, ctx::Cvoid) \nReturns the vector where the right\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameters:\n- `r`    - vector to hold computed right-hand side (or `NULL`)\n- `func` - the function to compute right-hand side (or `NULL`)\n- `ctx`  - the function context (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSFunction()`, `SNESGetFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetRHSFunction\"))\n\"\"\"\nfunction TSGetRHSFunction(petsclib::PetscLibType, ts::TS, r::PetscVec, func::TSRHSFunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSGetRHSFunction(petsclib::$UnionPetscLib, ts::TS, r::PetscVec, func::TSRHSFunctionFn, ctx::Cvoid )\n\tr_ = Ref(r.ptr)\n\n    @chk ccall(\n               (:TSGetRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}, TSRHSFunctionFn, Cvoid),\n               ts, r_, func, ctx,\n              )\n\n\tr.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetIJacobian(petsclib::PetscLibType,ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSIJacobianFn, ctx::Cvoid) \nSet the function to compute the matrix dF/dU + a*dF/dU_t where F(t,U,U_t) is the function\nprovided with `TSSetIFunction()`.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `Amat` - (approximate) matrix to store Jacobian entries computed by `f`\n- `Pmat` - matrix used to compute preconditioner (usually the same as `Amat`)\n- `f`    - the Jacobian evaluation routine\n- `ctx`  - user-defined context for private data for the Jacobian evaluation routine (may be `NULL`)\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSIJacobianFn`, `TSSetIFunction()`, `TSSetRHSJacobian()`,\n`SNESComputeJacobianDefaultColor()`, `SNESComputeJacobianDefault()`, `TSSetRHSFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetIJacobian\"))\n\"\"\"\nfunction TSSetIJacobian(petsclib::PetscLibType, ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSIJacobianFn, ctx::Cvoid) end\n\n@for_petsc function TSSetIJacobian(petsclib::$UnionPetscLib, ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSIJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetIJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat, CMat, Ptr{TSIJacobianFn}, Ptr{Cvoid}),\n               ts, Amat, Pmat, f, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSJacobianSetReuse(petsclib::PetscLibType,ts::TS, reuse::PetscBool) \nrestore the RHS Jacobian before calling the user\n\nLogically Collective\n\nInput Parameters:\n- `ts`    - `TS` context obtained from `TSCreate()`\n- `reuse` - `PETSC_TRUE` if the RHS Jacobian\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSJacobian()`, `TSComputeRHSJacobianConstant()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSJacobianSetReuse\"))\n\"\"\"\nfunction TSRHSJacobianSetReuse(petsclib::PetscLibType, ts::TS, reuse::PetscBool) end\n\n@for_petsc function TSRHSJacobianSetReuse(petsclib::$UnionPetscLib, ts::TS, reuse::PetscBool )\n\n    @chk ccall(\n               (:TSRHSJacobianSetReuse, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, reuse,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetI2Function(petsclib::PetscLibType,ts::TS, F::PetscVec, fun::TSI2FunctionFn, ctx::Cvoid) \nSet the function to compute F(t,U,U_t,U_tt) where F = 0 is the DAE to be solved.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the `TS` context obtained from `TSCreate()`\n- `F`   - vector to hold the residual (or `NULL` to have it created internally)\n- `fun` - the function evaluation routine\n- `ctx` - user-defined context for private data for the function evaluation routine (may be `NULL`)\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSI2FunctionFn`, `TSSetI2Jacobian()`, `TSSetIFunction()`,\n`TSCreate()`, `TSSetRHSFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetI2Function\"))\n\"\"\"\nfunction TSSetI2Function(petsclib::PetscLibType, ts::TS, F::PetscVec, fun::TSI2FunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSSetI2Function(petsclib::$UnionPetscLib, ts::TS, F::PetscVec, fun::TSI2FunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetI2Function, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, Ptr{TSI2FunctionFn}, Ptr{Cvoid}),\n               ts, F, fun, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetI2Function(petsclib::PetscLibType,ts::TS, r::PetscVec, fun::TSI2FunctionFn, ctx::Cvoid) \nReturns the vector where the implicit residual is stored and the function/context to compute it.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameters:\n- `r`   - vector to hold residual (or `NULL`)\n- `fun` - the function to compute residual (or `NULL`)\n- `ctx` - the function context (or `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSetIFunction()`, `SNESGetFunction()`, `TSCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetI2Function\"))\n\"\"\"\nfunction TSGetI2Function(petsclib::PetscLibType, ts::TS, r::PetscVec, fun::TSI2FunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSGetI2Function(petsclib::$UnionPetscLib, ts::TS, r::PetscVec, fun::TSI2FunctionFn, ctx::Cvoid )\n\tr_ = Ref(r.ptr)\n\n    @chk ccall(\n               (:TSGetI2Function, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}, TSI2FunctionFn, Cvoid),\n               ts, r_, fun, ctx,\n              )\n\n\tr.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetI2Jacobian(petsclib::PetscLibType,ts::TS, J::PetscMat, P::PetscMat, jac::TSI2JacobianFn, ctx::Cvoid) \nSet the function to compute the matrix dF/dU + v*dF/dU_t  + a*dF/dU_tt\nwhere F(t,U,U_t,U_tt) is the function you provided with `TSSetI2Function()`.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the `TS` context obtained from `TSCreate()`\n- `J`   - matrix to hold the Jacobian values\n- `P`   - matrix for constructing the preconditioner (may be same as `J`)\n- `jac` - the Jacobian evaluation routine, see `TSI2JacobianFn` for the calling sequence\n- `ctx` - user-defined context for private data for the Jacobian evaluation routine (may be `NULL`)\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSI2JacobianFn`, `TSSetI2Function()`, `TSGetI2Jacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetI2Jacobian\"))\n\"\"\"\nfunction TSSetI2Jacobian(petsclib::PetscLibType, ts::TS, J::PetscMat, P::PetscMat, jac::TSI2JacobianFn, ctx::Cvoid) end\n\n@for_petsc function TSSetI2Jacobian(petsclib::$UnionPetscLib, ts::TS, J::PetscMat, P::PetscMat, jac::TSI2JacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetI2Jacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat, CMat, Ptr{TSI2JacobianFn}, Ptr{Cvoid}),\n               ts, J, P, jac, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetI2Jacobian(petsclib::PetscLibType,ts::TS, J::PetscMat, P::PetscMat, jac::TSI2JacobianFn, ctx::Cvoid) \nReturns the implicit Jacobian at the present timestep.\n\nNot Collective, but parallel objects are returned if `TS` is parallel\n\nInput Parameter:\n- `ts` - The `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `J`   - The (approximate) Jacobian of F(t,U,U_t,U_tt)\n- `P`   - The matrix from which the preconditioner is constructed, often the same as `J`\n- `jac` - The function to compute the Jacobian matrices\n- `ctx` - User-defined context for Jacobian evaluation routine\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetTimeStep()`, `TSGetMatrices()`, `TSGetTime()`, `TSGetStepNumber()`, `TSSetI2Jacobian()`, `TSGetI2Function()`, `TSCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetI2Jacobian\"))\n\"\"\"\nfunction TSGetI2Jacobian(petsclib::PetscLibType, ts::TS, J::PetscMat, P::PetscMat, jac::TSI2JacobianFn, ctx::Cvoid) end\n\n@for_petsc function TSGetI2Jacobian(petsclib::$UnionPetscLib, ts::TS, J::PetscMat, P::PetscMat, jac::TSI2JacobianFn, ctx::Cvoid )\n\tJ_ = Ref(J.ptr)\n\tP_ = Ref(P.ptr)\n\n    @chk ccall(\n               (:TSGetI2Jacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CMat}, Ptr{CMat}, TSI2JacobianFn, Cvoid),\n               ts, J_, P_, jac, ctx,\n              )\n\n\tJ.ptr = C_NULL\n\tP.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeI2Function(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, V::PetscVec, A::PetscVec, F::PetscVec) \nEvaluates the DAE residual written in implicit form F(t,U,U_t,U_tt) = 0\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `t`  - current time\n- `U`  - state vector\n- `V`  - time derivative of state vector (U_t)\n- `A`  - second time derivative of state vector (U_tt)\n\nOutput Parameter:\n- `F` - the residual vector\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetI2Function()`, `TSGetI2Function()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeI2Function\"))\n\"\"\"\nfunction TSComputeI2Function(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, V::PetscVec, A::PetscVec, F::PetscVec) end\n\n@for_petsc function TSComputeI2Function(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, V::PetscVec, A::PetscVec, F::PetscVec )\n\n    @chk ccall(\n               (:TSComputeI2Function, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, CVec, CVec),\n               ts, t, U, V, A, F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeI2Jacobian(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, V::PetscVec, A::PetscVec, shiftV::PetscReal, shiftA::PetscReal, J::PetscMat, P::PetscMat) \nEvaluates the Jacobian of the DAE\n\nCollective\n\nInput Parameters:\n- `ts`     - the `TS` context\n- `t`      - current timestep\n- `U`      - state vector\n- `V`      - time derivative of state vector\n- `A`      - second time derivative of state vector\n- `shiftV` - shift to apply, see note below\n- `shiftA` - shift to apply, see note below\n\nOutput Parameters:\n- `J` - Jacobian matrix\n- `P` - optional matrix used to construct the preconditioner\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetI2Jacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeI2Jacobian\"))\n\"\"\"\nfunction TSComputeI2Jacobian(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, V::PetscVec, A::PetscVec, shiftV::PetscReal, shiftA::PetscReal, J::PetscMat, P::PetscMat) end\n\n@for_petsc function TSComputeI2Jacobian(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, V::PetscVec, A::PetscVec, shiftV::$PetscReal, shiftA::$PetscReal, J::PetscMat, P::PetscMat )\n\n    @chk ccall(\n               (:TSComputeI2Jacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, CVec, $PetscReal, $PetscReal, CMat, CMat),\n               ts, t, U, V, A, shiftV, shiftA, J, P,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetTransientVariable(petsclib::PetscLibType,ts::TS, tvar::TSTransientVariableFn, ctx::Cvoid) \nsets function to transform from state to transient variables\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - time stepping context on which to change the transient variable\n- `tvar` - a function that transforms to transient variables, see `TSTransientVariableFn` for the calling sequence\n- `ctx`  - a context for tvar\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSBDF`, `TSTransientVariableFn`, `DMTSSetTransientVariable()`, `DMTSGetTransientVariable()`, `TSSetIFunction()`, `TSSetIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetTransientVariable\"))\n\"\"\"\nfunction TSSetTransientVariable(petsclib::PetscLibType, ts::TS, tvar::TSTransientVariableFn, ctx::Cvoid) end\n\n@for_petsc function TSSetTransientVariable(petsclib::$UnionPetscLib, ts::TS, tvar::TSTransientVariableFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetTransientVariable, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSTransientVariableFn}, Ptr{Cvoid}),\n               ts, tvar, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeTransientVariable(petsclib::PetscLibType,ts::TS, U::PetscVec, C::PetscVec) \ntransforms state (primitive) variables to transient (conservative) variables\n\nLogically Collective\n\nInput Parameters:\n- `ts` - TS on which to compute\n- `U`  - state vector to be transformed to transient variables\n\nOutput Parameter:\n- `C` - transient (conservative) variable\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSBDF`, `DMTSSetTransientVariable()`, `TSComputeIFunction()`, `TSComputeIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeTransientVariable\"))\n\"\"\"\nfunction TSComputeTransientVariable(petsclib::PetscLibType, ts::TS, U::PetscVec, C::PetscVec) end\n\n@for_petsc function TSComputeTransientVariable(petsclib::$UnionPetscLib, ts::TS, U::PetscVec, C::PetscVec )\n\n    @chk ccall(\n               (:TSComputeTransientVariable, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, CVec),\n               ts, U, C,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thas::PetscBool = TSHasTransientVariable(petsclib::PetscLibType,ts::TS) \ndetermine whether transient variables have been set\n\nLogically Collective\n\nInput Parameter:\n- `ts` - `TS` on which to compute\n\nOutput Parameter:\n- `has` - `PETSC_TRUE` if transient variables have been set\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSBDF`, `DMTSSetTransientVariable()`, `TSComputeTransientVariable()`\n\n# External Links\n$(_doc_external(\"Ts/TSHasTransientVariable\"))\n\"\"\"\nfunction TSHasTransientVariable(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSHasTransientVariable(petsclib::$UnionPetscLib, ts::TS )\n\thas_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSHasTransientVariable, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, has_,\n              )\n\n\thas = has_[]\n\n\treturn has\nend \n\n\"\"\"\n\tTS2SetSolution(petsclib::PetscLibType,ts::TS, u::PetscVec, v::PetscVec) \nSets the initial solution and time derivative vectors\nfor use by the `TS` routines handling second order equations.\n\nLogically Collective\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()`\n- `u`  - the solution vector\n- `v`  - the time derivative vector\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`\n\n# External Links\n$(_doc_external(\"Ts/TS2SetSolution\"))\n\"\"\"\nfunction TS2SetSolution(petsclib::PetscLibType, ts::TS, u::PetscVec, v::PetscVec) end\n\n@for_petsc function TS2SetSolution(petsclib::$UnionPetscLib, ts::TS, u::PetscVec, v::PetscVec )\n\n    @chk ccall(\n               (:TS2SetSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, CVec),\n               ts, u, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTS2GetSolution(petsclib::PetscLibType,ts::TS, u::PetscVec, v::PetscVec) \nReturns the solution and time derivative at the present timestep\nfor second order equations.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `u` - the vector containing the solution\n- `v` - the vector containing the time derivative\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TS2SetSolution()`, `TSGetTimeStep()`, `TSGetTime()`\n\n# External Links\n$(_doc_external(\"Ts/TS2GetSolution\"))\n\"\"\"\nfunction TS2GetSolution(petsclib::PetscLibType, ts::TS, u::PetscVec, v::PetscVec) end\n\n@for_petsc function TS2GetSolution(petsclib::$UnionPetscLib, ts::TS, u::PetscVec, v::PetscVec )\n\tu_ = Ref(u.ptr)\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:TS2GetSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}, Ptr{CVec}),\n               ts, u_, v_,\n              )\n\n\tu.ptr = C_NULL\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSLoad(petsclib::PetscLibType,ts::TS, viewer::PetscViewer) \nLoads a `TS` that has been stored in binary  with `TSView()`.\n\nCollective\n\nInput Parameters:\n- `ts`     - the newly loaded `TS`, this needs to have been created with `TSCreate()` or\nsome related function before a call to `TSLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `PetscViewer`, `PetscViewerBinaryOpen()`, `TSView()`, `MatLoad()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"Ts/TSLoad\"))\n\"\"\"\nfunction TSLoad(petsclib::PetscLibType, ts::TS, viewer::PetscViewer) end\n\n@for_petsc function TSLoad(petsclib::$UnionPetscLib, ts::TS, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TSLoad, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscViewer),\n               ts, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSViewFromOptions(petsclib::PetscLibType,ts::TS, obj::PetscObject, name::String) \nView a `TS` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `ts`   - the `TS` context\n- `obj`  - Optional object that provides the prefix for the options database keys\n- `name` - command line option string to be passed by user\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSView`, `PetscObjectViewFromOptions()`, `TSCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSViewFromOptions\"))\n\"\"\"\nfunction TSViewFromOptions(petsclib::PetscLibType, ts::TS, obj::PetscObject, name::String) end\n\n@for_petsc function TSViewFromOptions(petsclib::$UnionPetscLib, ts::TS, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:TSViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscObject, Ptr{Cchar}),\n               ts, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSView(petsclib::PetscLibType,ts::TS, viewer::PetscViewer) \nPrints the `TS` data structure.\n\nCollective\n\nInput Parameters:\n- `ts`     - the `TS` context obtained from `TSCreate()`\n- `viewer` - visualization context\n\nOptions Database Key:\n- `-ts_view` - calls `TSView()` at end of `TSStep()`\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `PetscViewer`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Ts/TSView\"))\n\"\"\"\nfunction TSView(petsclib::PetscLibType, ts::TS, viewer::PetscViewer) end\n\n@for_petsc function TSView(petsclib::$UnionPetscLib, ts::TS, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TSView, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscViewer),\n               ts, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetApplicationContext(petsclib::PetscLibType,ts::TS, ctx::PeCtx) \nSets an optional user\n`TS` callbacks with `TSGetApplicationContext()`\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the `TS` context obtained from `TSCreate()`\n- `ctx` - user context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetApplicationContext\"))\n\"\"\"\nfunction TSSetApplicationContext(petsclib::PetscLibType, ts::TS, ctx::PeCtx) end\n\n@for_petsc function TSSetApplicationContext(petsclib::$UnionPetscLib, ts::TS, ctx::PeCtx )\n\n    @chk ccall(\n               (:TSSetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CTS, PeCtx),\n               ts, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetApplicationContext(petsclib::PetscLibType,ts::TS, ctx::Cvoid) \nGets the user\ntimestepper that was set with `TSSetApplicationContext()`\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `ctx` - a pointer to the user context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetApplicationContext\"))\n\"\"\"\nfunction TSGetApplicationContext(petsclib::PetscLibType, ts::TS, ctx::Cvoid) end\n\n@for_petsc function TSGetApplicationContext(petsclib::$UnionPetscLib, ts::TS, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSGetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cvoid}),\n               ts, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsteps::PetscInt = TSGetStepNumber(petsclib::PetscLibType,ts::TS) \nGets the number of time steps completed.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `steps` - number of steps completed so far\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetTime()`, `TSGetTimeStep()`, `TSSetPreStep()`, `TSSetPreStage()`, `TSSetPostStage()`, `TSSetPostStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetStepNumber\"))\n\"\"\"\nfunction TSGetStepNumber(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetStepNumber(petsclib::$UnionPetscLib, ts::TS )\n\tsteps_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetStepNumber, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, steps_,\n              )\n\n\tsteps = steps_[]\n\n\treturn steps\nend \n\n\"\"\"\n\tTSSetStepNumber(petsclib::PetscLibType,ts::TS, steps::PetscInt) \nSets the number of steps completed.\n\nLogically Collective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `steps` - number of steps completed so far\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSGetStepNumber()`, `TSSetTime()`, `TSSetTimeStep()`, `TSSetSolution()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetStepNumber\"))\n\"\"\"\nfunction TSSetStepNumber(petsclib::PetscLibType, ts::TS, steps::PetscInt) end\n\n@for_petsc function TSSetStepNumber(petsclib::$UnionPetscLib, ts::TS, steps::$PetscInt )\n\n    @chk ccall(\n               (:TSSetStepNumber, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, steps,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetTimeStep(petsclib::PetscLibType,ts::TS, time_step::PetscReal) \nAllows one to reset the timestep at any time,\nuseful for simple pseudo-timestepping codes.\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the `TS` context obtained from `TSCreate()`\n- `time_step` - the size of the timestep\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSPSEUDO`, `TSGetTimeStep()`, `TSSetTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetTimeStep\"))\n\"\"\"\nfunction TSSetTimeStep(petsclib::PetscLibType, ts::TS, time_step::PetscReal) end\n\n@for_petsc function TSSetTimeStep(petsclib::$UnionPetscLib, ts::TS, time_step::$PetscReal )\n\n    @chk ccall(\n               (:TSSetTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, time_step,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetExactFinalTime(petsclib::PetscLibType,ts::TS, eftopt::TSExactFinalTimeOption) \nDetermines whether to adapt the final time step to\nmatch the exact final time, to interpolate the solution to the exact final time,\nor to just return at the final time `TS` computed (which may be slightly larger\nthan the requested final time).\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - the time-step context\n- `eftopt` - exact final time option\n-seealso: [](ch_ts), `TS`, `TSExactFinalTimeOption`, `TSGetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetExactFinalTime\"))\n\"\"\"\nfunction TSSetExactFinalTime(petsclib::PetscLibType, ts::TS, eftopt::TSExactFinalTimeOption) end\n\n@for_petsc function TSSetExactFinalTime(petsclib::$UnionPetscLib, ts::TS, eftopt::TSExactFinalTimeOption )\n\n    @chk ccall(\n               (:TSSetExactFinalTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSExactFinalTimeOption),\n               ts, eftopt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetExactFinalTime(petsclib::PetscLibType,ts::TS, eftopt::TSExactFinalTimeOption) \nGets the exact final time option set with `TSSetExactFinalTime()`\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `eftopt` - exact final time option\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSExactFinalTimeOption`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetExactFinalTime\"))\n\"\"\"\nfunction TSGetExactFinalTime(petsclib::PetscLibType, ts::TS, eftopt::TSExactFinalTimeOption) end\n\n@for_petsc function TSGetExactFinalTime(petsclib::$UnionPetscLib, ts::TS, eftopt::TSExactFinalTimeOption )\n\n    @chk ccall(\n               (:TSGetExactFinalTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSExactFinalTimeOption}),\n               ts, eftopt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdt::PetscReal = TSGetTimeStep(petsclib::PetscLibType,ts::TS) \nGets the current timestep size.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `dt` - the current timestep size\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetTimeStep()`, `TSGetTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetTimeStep\"))\n\"\"\"\nfunction TSGetTimeStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetTimeStep(petsclib::$UnionPetscLib, ts::TS )\n\tdt_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSGetTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, dt_,\n              )\n\n\tdt = dt_[]\n\n\treturn dt\nend \n\n\"\"\"\n\tTSGetSolution(petsclib::PetscLibType,ts::TS, v::PetscVec) \nReturns the solution at the present timestep. It\nis valid to call this routine inside the function that you are evaluating\nin order to move to the new timestep. This vector not changed until\nthe solution at the next timestep has been calculated.\n\nNot Collective, but v returned is parallel if ts is parallel\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `v` - the vector containing the solution\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetTimeStep()`, `TSGetTime()`, `TSGetSolveTime()`, `TSGetSolutionComponents()`, `TSSetSolutionFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetSolution\"))\n\"\"\"\nfunction TSGetSolution(petsclib::PetscLibType, ts::TS, v::PetscVec) end\n\n@for_petsc function TSGetSolution(petsclib::$UnionPetscLib, ts::TS, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:TSGetSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}),\n               ts, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetSolutionComponents(petsclib::PetscLibType,ts::TS, n::PetscInt, v::PetscVec) \nReturns any solution components at the present\ntimestep, if available for the time integration method being used.\nSolution components are quantities that share the same size and\nstructure as the solution vector.\n\nNot Collective, but v returned is parallel if ts is parallel\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()` (input parameter).\n- `n`  - If v is `NULL`, then the number of solution components is\nreturned through n, else the n-th solution component is\nreturned in v.\n- `v`  - the vector containing the n-th solution component\n(may be `NULL` to use this function to find out\nthe number of solutions components).\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetSolution()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetSolutionComponents\"))\n\"\"\"\nfunction TSGetSolutionComponents(petsclib::PetscLibType, ts::TS, n::PetscInt, v::PetscVec) end\n\n@for_petsc function TSGetSolutionComponents(petsclib::$UnionPetscLib, ts::TS, n::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:TSGetSolutionComponents, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, Ptr{CVec}),\n               ts, n, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetAuxSolution(petsclib::PetscLibType,ts::TS, v::PetscVec) \nReturns an auxiliary solution at the present\ntimestep, if available for the time integration method being used.\n\nNot Collective, but v returned is parallel if ts is parallel\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()` (input parameter).\n- `v`  - the vector containing the auxiliary solution\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetSolution()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetAuxSolution\"))\n\"\"\"\nfunction TSGetAuxSolution(petsclib::PetscLibType, ts::TS, v::PetscVec) end\n\n@for_petsc function TSGetAuxSolution(petsclib::$UnionPetscLib, ts::TS, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:TSGetAuxSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}),\n               ts, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetTimeError(petsclib::PetscLibType,ts::TS, n::PetscInt, v::PetscVec) \nReturns the estimated error vector, if the chosen\n`TSType` has an error estimation functionality and `TSSetTimeError()` was called\n\nNot Collective, but v returned is parallel if ts is parallel\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()` (input parameter).\n- `n`  - current estimate (n=0) or previous one (n=-1)\n- `v`  - the vector containing the error (same size as the solution).\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSGetSolution()`, `TSSetTimeError()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetTimeError\"))\n\"\"\"\nfunction TSGetTimeError(petsclib::PetscLibType, ts::TS, n::PetscInt, v::PetscVec) end\n\n@for_petsc function TSGetTimeError(petsclib::$UnionPetscLib, ts::TS, n::$PetscInt, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:TSGetTimeError, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, Ptr{CVec}),\n               ts, n, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetTimeError(petsclib::PetscLibType,ts::TS, v::PetscVec) \nSets the estimated error vector, if the chosen\n`TSType` has an error estimation functionality. This can be used\nto restart such a time integrator with a given error vector.\n\nNot Collective, but v returned is parallel if ts is parallel\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()` (input parameter).\n- `v`  - the vector containing the error (same size as the solution).\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetSolution()`, `TSGetTimeError()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetTimeError\"))\n\"\"\"\nfunction TSSetTimeError(petsclib::PetscLibType, ts::TS, v::PetscVec) end\n\n@for_petsc function TSSetTimeError(petsclib::$UnionPetscLib, ts::TS, v::PetscVec )\n\n    @chk ccall(\n               (:TSSetTimeError, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec),\n               ts, v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetProblemType(petsclib::PetscLibType,ts::TS, type::TSProblemType) \nSets the type of problem to be solved.\n\nNot collective\n\nInput Parameters:\n- `ts`   - The `TS`\n- `type` - One of `TS_LINEAR`, `TS_NONLINEAR` where these types refer to problems of the forms\n-seealso: [](ch_ts), `TSSetUp()`, `TSProblemType`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSSetProblemType\"))\n\"\"\"\nfunction TSSetProblemType(petsclib::PetscLibType, ts::TS, type::TSProblemType) end\n\n@for_petsc function TSSetProblemType(petsclib::$UnionPetscLib, ts::TS, type::TSProblemType )\n\n    @chk ccall(\n               (:TSSetProblemType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSProblemType),\n               ts, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TSProblemType = TSGetProblemType(petsclib::PetscLibType,ts::TS) \nGets the type of problem to be solved.\n\nNot collective\n\nInput Parameter:\n- `ts` - The `TS`\n\nOutput Parameter:\n- `type` - One of `TS_LINEAR`, `TS_NONLINEAR` where these types refer to problems of the forms\n-seealso: [](ch_ts), `TSSetUp()`, `TSProblemType`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSGetProblemType\"))\n\"\"\"\nfunction TSGetProblemType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetProblemType(petsclib::$UnionPetscLib, ts::TS )\n\ttype_ = Ref{TSProblemType}()\n\n    @chk ccall(\n               (:TSGetProblemType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSProblemType}),\n               ts, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTSSetUp(petsclib::PetscLibType,ts::TS) \nSets up the internal data structures for the later use of a timestepper.\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSCreate()`, `TS`, `TSStep()`, `TSDestroy()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetUp\"))\n\"\"\"\nfunction TSSetUp(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSSetUp(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSSetUp, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSReset(petsclib::PetscLibType,ts::TS) \nResets a `TS` context to the state it was in before `TSSetUp()` was called and removes any allocated `Vec` and `Mat` from its data structures\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`, `TSSetUp()`, `TSDestroy()`, `TSSetResize()`\n\n# External Links\n$(_doc_external(\"Ts/TSReset\"))\n\"\"\"\nfunction TSReset(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSReset(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSReset, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSDestroy(petsclib::PetscLibType,ts::TS) \nDestroys the timestepper context that was created\nwith `TSCreate()`.\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`, `TSSetUp()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSDestroy\"))\n\"\"\"\nfunction TSDestroy(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSDestroy(petsclib::$UnionPetscLib, ts::TS )\n\tts_ = Ref(ts.ptr)\n\n    @chk ccall(\n               (:TSDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CTS},),\n               ts_,\n              )\n\n\tts.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetSNES(petsclib::PetscLibType,ts::TS, snes::PetscSNES) \nReturns the `SNES` (nonlinear solver) associated with\na `TS` (timestepper) context. Valid only for nonlinear problems.\n\nNot Collective, but snes is parallel if ts is parallel\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `snes` - the nonlinear solver context\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSCreate()`, `TSSetUp()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetSNES\"))\n\"\"\"\nfunction TSGetSNES(petsclib::PetscLibType, ts::TS, snes::PetscSNES) end\n\n@for_petsc function TSGetSNES(petsclib::$UnionPetscLib, ts::TS, snes::PetscSNES )\n\tsnes_ = Ref(snes.ptr)\n\n    @chk ccall(\n               (:TSGetSNES, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CSNES}),\n               ts, snes_,\n              )\n\n\tsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetSNES(petsclib::PetscLibType,ts::TS, snes::PetscSNES) \nSet the `SNES` (nonlinear solver) to be used by the `TS` timestepping context\n\nCollective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `snes` - the nonlinear solver context\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSCreate()`, `TSSetUp()`, `TSSolve()`, `TSGetSNES()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetSNES\"))\n\"\"\"\nfunction TSSetSNES(petsclib::PetscLibType, ts::TS, snes::PetscSNES) end\n\n@for_petsc function TSSetSNES(petsclib::$UnionPetscLib, ts::TS, snes::PetscSNES )\n\n    @chk ccall(\n               (:TSSetSNES, $petsc_library),\n               PetscErrorCode,\n               (CTS, CSNES),\n               ts, snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetKSP(petsclib::PetscLibType,ts::TS, ksp::PetscKSP) \nReturns the `KSP` (linear solver) associated with\na `TS` (timestepper) context.\n\nNot Collective, but `ksp` is parallel if `ts` is parallel\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `ksp` - the nonlinear solver context\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `SNES`, `KSP`, `TSCreate()`, `TSSetUp()`, `TSSolve()`, `TSGetSNES()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetKSP\"))\n\"\"\"\nfunction TSGetKSP(petsclib::PetscLibType, ts::TS, ksp::PetscKSP) end\n\n@for_petsc function TSGetKSP(petsclib::$UnionPetscLib, ts::TS, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:TSGetKSP, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CKSP}),\n               ts, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetMaxSteps(petsclib::PetscLibType,ts::TS, maxsteps::PetscInt) \nSets the maximum number of steps to use.\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - the `TS` context obtained from `TSCreate()`\n- `maxsteps` - maximum number of steps to use\n\nOptions Database Key:\n- `-ts_max_steps <maxsteps>` - Sets maxsteps\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetMaxSteps()`, `TSSetMaxTime()`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetMaxSteps\"))\n\"\"\"\nfunction TSSetMaxSteps(petsclib::PetscLibType, ts::TS, maxsteps::PetscInt) end\n\n@for_petsc function TSSetMaxSteps(petsclib::$UnionPetscLib, ts::TS, maxsteps::$PetscInt )\n\n    @chk ccall(\n               (:TSSetMaxSteps, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, maxsteps,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxsteps::PetscInt = TSGetMaxSteps(petsclib::PetscLibType,ts::TS) \nGets the maximum number of steps to use.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `maxsteps` - maximum number of steps to use\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSetMaxSteps()`, `TSGetMaxTime()`, `TSSetMaxTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetMaxSteps\"))\n\"\"\"\nfunction TSGetMaxSteps(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetMaxSteps(petsclib::$UnionPetscLib, ts::TS )\n\tmaxsteps_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetMaxSteps, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, maxsteps_,\n              )\n\n\tmaxsteps = maxsteps_[]\n\n\treturn maxsteps\nend \n\n\"\"\"\n\tTSSetRunSteps(petsclib::PetscLibType,ts::TS, runsteps::PetscInt) \nSets the maximum number of steps to take in each call to `TSSolve()`.\n\nIf the step count when `TSSolve()` is `start_step`, this will stop the simulation once `current_step - start_step >= run_steps`.\nComparatively, `TSSetMaxSteps()` will stop if `current_step >= max_steps`.\nThe simulation will stop when either condition is reached.\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - the `TS` context obtained from `TSCreate()`\n- `runsteps` - maximum number of steps to take in each call to `TSSolve()`;\n\nOptions Database Key:\n- `-ts_run_steps <runsteps>` - Sets runsteps\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetRunSteps()`, `TSSetMaxTime()`, `TSSetExactFinalTime()`, `TSSetMaxSteps()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetRunSteps\"))\n\"\"\"\nfunction TSSetRunSteps(petsclib::PetscLibType, ts::TS, runsteps::PetscInt) end\n\n@for_petsc function TSSetRunSteps(petsclib::$UnionPetscLib, ts::TS, runsteps::$PetscInt )\n\n    @chk ccall(\n               (:TSSetRunSteps, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, runsteps,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trunsteps::PetscInt = TSGetRunSteps(petsclib::PetscLibType,ts::TS) \nGets the maximum number of steps to take in each call to `TSSolve()`.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `runsteps` - maximum number of steps to take in each call to `TSSolve`.\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSetRunSteps()`, `TSGetMaxTime()`, `TSSetMaxTime()`, `TSGetMaxSteps()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetRunSteps\"))\n\"\"\"\nfunction TSGetRunSteps(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetRunSteps(petsclib::$UnionPetscLib, ts::TS )\n\trunsteps_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetRunSteps, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, runsteps_,\n              )\n\n\trunsteps = runsteps_[]\n\n\treturn runsteps\nend \n\n\"\"\"\n\tTSSetMaxTime(petsclib::PetscLibType,ts::TS, maxtime::PetscReal) \nSets the maximum (or final) time for timestepping.\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - the `TS` context obtained from `TSCreate()`\n- `maxtime` - final time to step to\n\nOptions Database Key:\n- `-ts_max_time <maxtime>` - Sets maxtime\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetMaxTime()`, `TSSetMaxSteps()`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetMaxTime\"))\n\"\"\"\nfunction TSSetMaxTime(petsclib::PetscLibType, ts::TS, maxtime::PetscReal) end\n\n@for_petsc function TSSetMaxTime(petsclib::$UnionPetscLib, ts::TS, maxtime::$PetscReal )\n\n    @chk ccall(\n               (:TSSetMaxTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, maxtime,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxtime::PetscReal = TSGetMaxTime(petsclib::PetscLibType,ts::TS) \nGets the maximum (or final) time for timestepping.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `maxtime` - final time to step to\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSetMaxTime()`, `TSGetMaxSteps()`, `TSSetMaxSteps()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetMaxTime\"))\n\"\"\"\nfunction TSGetMaxTime(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetMaxTime(petsclib::$UnionPetscLib, ts::TS )\n\tmaxtime_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSGetMaxTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, maxtime_,\n              )\n\n\tmaxtime = maxtime_[]\n\n\treturn maxtime\nend \n\n\"\"\"\n\tTSSetSolution(petsclib::PetscLibType,ts::TS, u::PetscVec) \nSets the initial solution vector\nfor use by the `TS` routines.\n\nLogically Collective\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()`\n- `u`  - the solution vector\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSSetSolutionFunction()`, `TSGetSolution()`, `TSCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetSolution\"))\n\"\"\"\nfunction TSSetSolution(petsclib::PetscLibType, ts::TS, u::PetscVec) end\n\n@for_petsc function TSSetSolution(petsclib::$UnionPetscLib, ts::TS, u::PetscVec )\n\n    @chk ccall(\n               (:TSSetSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec),\n               ts, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetPreStep(petsclib::PetscLibType,ts::TS, func::external) \nSets the general\ncalled once at the beginning of each time step.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - The `TS` context obtained from `TSCreate()`\n- `func` - The function\n\nCalling sequence of `func`:\n- `ts` - the `TS` context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetPreStage()`, `TSSetPostStage()`, `TSSetPostStep()`, `TSStep()`, `TSRestartStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetPreStep\"))\n\"\"\"\nfunction TSSetPreStep(petsclib::PetscLibType, ts::TS, func::external) end\n\n@for_petsc function TSSetPreStep(petsclib::$UnionPetscLib, ts::TS, func::external )\n\n    @chk ccall(\n               (:TSSetPreStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPreStep(petsclib::PetscLibType,ts::TS) \nRuns the user\n\nCollective\n\nInput Parameter:\n- `ts` - The `TS` context obtained from `TSCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetPreStep()`, `TSPreStage()`, `TSPostStage()`, `TSPostStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPreStep\"))\n\"\"\"\nfunction TSPreStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSPreStep(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSPreStep, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetPreStage(petsclib::PetscLibType,ts::TS, func::external) \nSets the general\ncalled once at the beginning of each stage.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - The `TS` context obtained from `TSCreate()`\n- `func` - The function\n\nCalling sequence of `func`:\n- `ts`        - the `TS` context\n- `stagetime` - the stage time\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetPostStage()`, `TSSetPreStep()`, `TSSetPostStep()`, `TSGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetPreStage\"))\n\"\"\"\nfunction TSSetPreStage(petsclib::PetscLibType, ts::TS, func::external) end\n\n@for_petsc function TSSetPreStage(petsclib::$UnionPetscLib, ts::TS, func::external )\n\n    @chk ccall(\n               (:TSSetPreStage, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetPostStage(petsclib::PetscLibType,ts::TS, func::external) \nSets the general\ncalled once at the end of each stage.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - The `TS` context obtained from `TSCreate()`\n- `func` - The function\n\nCalling sequence of `func`:\n- `ts`         - the `TS` context\n- `stagetime`  - the stage time\n- `stageindex` - the stage index\n- `Y`          - Array of vectors (of size = total number of stages) with the stage solutions\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetPreStage()`, `TSSetPreStep()`, `TSSetPostStep()`, `TSGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetPostStage\"))\n\"\"\"\nfunction TSSetPostStage(petsclib::PetscLibType, ts::TS, func::external) end\n\n@for_petsc function TSSetPostStage(petsclib::$UnionPetscLib, ts::TS, func::external )\n\n    @chk ccall(\n               (:TSSetPostStage, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetPostEvaluate(petsclib::PetscLibType,ts::TS, func::external) \nSets the general\ncalled at the end of each step evaluation.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - The `TS` context obtained from `TSCreate()`\n- `func` - The function\n\nCalling sequence of `func`:\n- `ts` - the `TS` context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetPreStage()`, `TSSetPreStep()`, `TSSetPostStep()`, `TSGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetPostEvaluate\"))\n\"\"\"\nfunction TSSetPostEvaluate(petsclib::PetscLibType, ts::TS, func::external) end\n\n@for_petsc function TSSetPostEvaluate(petsclib::$UnionPetscLib, ts::TS, func::external )\n\n    @chk ccall(\n               (:TSSetPostEvaluate, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPreStage(petsclib::PetscLibType,ts::TS, stagetime::PetscReal) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts`        - The `TS` context obtained from `TSCreate()`\n- `stagetime` - The absolute time of the current stage\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSPostStage()`, `TSSetPreStep()`, `TSPreStep()`, `TSPostStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPreStage\"))\n\"\"\"\nfunction TSPreStage(petsclib::PetscLibType, ts::TS, stagetime::PetscReal) end\n\n@for_petsc function TSPreStage(petsclib::$UnionPetscLib, ts::TS, stagetime::$PetscReal )\n\n    @chk ccall(\n               (:TSPreStage, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, stagetime,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPostStage(petsclib::PetscLibType,ts::TS, stagetime::PetscReal, stageindex::PetscInt, Y::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts`         - The `TS` context obtained from `TSCreate()`\n- `stagetime`  - The absolute time of the current stage\n- `stageindex` - Stage number\n- `Y`          - Array of vectors (of size = total number of stages) with the stage solutions\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSPreStage()`, `TSSetPreStep()`, `TSPreStep()`, `TSPostStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPostStage\"))\n\"\"\"\nfunction TSPostStage(petsclib::PetscLibType, ts::TS, stagetime::PetscReal, stageindex::PetscInt, Y::Vector{PetscVec}) end\n\n@for_petsc function TSPostStage(petsclib::$UnionPetscLib, ts::TS, stagetime::$PetscReal, stageindex::$PetscInt, Y::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSPostStage, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, $PetscInt, Ptr{CVec}),\n               ts, stagetime, stageindex, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPostEvaluate(petsclib::PetscLibType,ts::TS) \nRuns the user\n\nCollective\n\nInput Parameter:\n- `ts` - The `TS` context obtained from `TSCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetPostEvaluate()`, `TSSetPreStep()`, `TSPreStep()`, `TSPostStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPostEvaluate\"))\n\"\"\"\nfunction TSPostEvaluate(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSPostEvaluate(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSPostEvaluate, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetPostStep(petsclib::PetscLibType,ts::TS, func::external) \nSets the general\ncalled once at the end of each successful time step.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - The `TS` context obtained from `TSCreate()`\n- `func` - The function\n\nCalling sequence of `func`:\n- `ts` - the `TS` context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetPreStep()`, `TSSetPreStage()`, `TSSetPostEvaluate()`, `TSGetTimeStep()`, `TSGetStepNumber()`, `TSGetTime()`, `TSRestartStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetPostStep\"))\n\"\"\"\nfunction TSSetPostStep(petsclib::PetscLibType, ts::TS, func::external) end\n\n@for_petsc function TSSetPostStep(petsclib::$UnionPetscLib, ts::TS, func::external )\n\n    @chk ccall(\n               (:TSSetPostStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPostStep(petsclib::PetscLibType,ts::TS) \nRuns the user\n\nCollective\n\nInput Parameter:\n- `ts` - The `TS` context obtained from `TSCreate()`\n\n-seealso: [](ch_ts), `TS`, `TSSetPreStep()`, `TSSetPreStage()`, `TSSetPostEvaluate()`, `TSGetTimeStep()`, `TSGetStepNumber()`, `TSGetTime()`, `TSSetPostStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPostStep\"))\n\"\"\"\nfunction TSPostStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSPostStep(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSPostStep, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSInterpolate(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec) \nInterpolate the solution computed during the previous step to an arbitrary location in the interval\n\nCollective\n\nInput Parameters:\n- `ts` - time stepping context\n- `t`  - time to interpolate to\n\nOutput Parameter:\n- `U` - state at given time\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetExactFinalTime()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSInterpolate\"))\n\"\"\"\nfunction TSInterpolate(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec) end\n\n@for_petsc function TSInterpolate(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec )\n\n    @chk ccall(\n               (:TSInterpolate, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec),\n               ts, t, U,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSStep(petsclib::PetscLibType,ts::TS) \nSteps one time step\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`, `TSSetUp()`, `TSDestroy()`, `TSSolve()`, `TSSetPreStep()`, `TSSetPreStage()`, `TSSetPostStage()`, `TSInterpolate()`\n\n# External Links\n$(_doc_external(\"Ts/TSStep\"))\n\"\"\"\nfunction TSStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSStep(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSStep, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\torder::PetscInt,wlte::PetscReal = TSEvaluateWLTE(petsclib::PetscLibType,ts::TS, wnormtype::NormType) \nEvaluate the weighted local truncation error norm\nat the end of a time step with a given order of accuracy.\n\nCollective\n\nInput Parameters:\n- `ts`        - time stepping context\n- `wnormtype` - norm type, either `NORM_2` or `NORM_INFINITY`\n\nInput/Output Parameter:\n- `order` - optional, desired order for the error evaluation or `PETSC_DECIDE`;\non output, the actual order of the error evaluation\n\nOutput Parameter:\n- `wlte` - the weighted local truncation error norm\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSStep()`, `TSAdapt`, `TSErrorWeightedNorm()`\n\n# External Links\n$(_doc_external(\"Ts/TSEvaluateWLTE\"))\n\"\"\"\nfunction TSEvaluateWLTE(petsclib::PetscLibType, ts::TS, wnormtype::NormType) end\n\n@for_petsc function TSEvaluateWLTE(petsclib::$UnionPetscLib, ts::TS, wnormtype::NormType )\n\torder_ = Ref{$PetscInt}()\n\twlte_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSEvaluateWLTE, $petsc_library),\n               PetscErrorCode,\n               (CTS, NormType, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               ts, wnormtype, order_, wlte_,\n              )\n\n\torder = order_[]\n\twlte = wlte_[]\n\n\treturn order,wlte\nend \n\n\"\"\"\n\tTSEvaluateStep(petsclib::PetscLibType,ts::TS, order::PetscInt, U::PetscVec, done::PetscBool) \nEvaluate the solution at the end of a time step with a given order of accuracy.\n\nCollective\n\nInput Parameters:\n- `ts`    - time stepping context\n- `order` - desired order of accuracy\n- `done`  - whether the step was evaluated at this order (pass `NULL` to generate an error if not available)\n\nOutput Parameter:\n- `U` - state at the end of the current step\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSStep()`, `TSAdapt`\n\n# External Links\n$(_doc_external(\"Ts/TSEvaluateStep\"))\n\"\"\"\nfunction TSEvaluateStep(petsclib::PetscLibType, ts::TS, order::PetscInt, U::PetscVec, done::PetscBool) end\n\n@for_petsc function TSEvaluateStep(petsclib::$UnionPetscLib, ts::TS, order::$PetscInt, U::PetscVec, done::PetscBool )\n\n    @chk ccall(\n               (:TSEvaluateStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, CVec, Ptr{PetscBool}),\n               ts, order, U, done,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetComputeInitialCondition(petsclib::PetscLibType,ts::TS, initCondition::external) \nSet the function used to automatically compute an initial condition for the timestepping.\n\nLogically collective\n\nInput Parameters:\n- `ts`            - time stepping context\n- `initCondition` - The function which computes an initial condition\n\nCalling sequence of `initCondition`:\n- `ts` - The timestepping context\n- `e`  - The input vector in which the initial condition is to be stored\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetComputeInitialCondition()`, `TSComputeInitialCondition()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetComputeInitialCondition\"))\n\"\"\"\nfunction TSSetComputeInitialCondition(petsclib::PetscLibType, ts::TS, initCondition::external) end\n\n@for_petsc function TSSetComputeInitialCondition(petsclib::$UnionPetscLib, ts::TS, initCondition::external )\n\n    @chk ccall(\n               (:TSSetComputeInitialCondition, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, initCondition,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeInitialCondition(petsclib::PetscLibType,ts::TS, u::PetscVec) \nCompute an initial condition for the timestepping using the function previously set with `TSSetComputeInitialCondition()`\n\nCollective\n\nInput Parameters:\n- `ts` - time stepping context\n- `u`  - The `Vec` to store the condition in which will be used in `TSSolve()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetComputeInitialCondition()`, `TSSetComputeInitialCondition()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeInitialCondition\"))\n\"\"\"\nfunction TSComputeInitialCondition(petsclib::PetscLibType, ts::TS, u::PetscVec) end\n\n@for_petsc function TSComputeInitialCondition(petsclib::$UnionPetscLib, ts::TS, u::PetscVec )\n\n    @chk ccall(\n               (:TSComputeInitialCondition, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec),\n               ts, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetComputeExactError(petsclib::PetscLibType,ts::TS, exactError::external) \nSet the function used to automatically compute the exact error for the timestepping.\n\nLogically collective\n\nInput Parameters:\n- `ts`         - time stepping context\n- `exactError` - The function which computes the solution error\n\nCalling sequence of `exactError`:\n- `ts` - The timestepping context\n- `u`  - The approximate solution vector\n- `e`  - The  vector in which the error is stored\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetComputeExactError()`, `TSComputeExactError()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetComputeExactError\"))\n\"\"\"\nfunction TSSetComputeExactError(petsclib::PetscLibType, ts::TS, exactError::external) end\n\n@for_petsc function TSSetComputeExactError(petsclib::$UnionPetscLib, ts::TS, exactError::external )\n\n    @chk ccall(\n               (:TSSetComputeExactError, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, exactError,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeExactError(petsclib::PetscLibType,ts::TS, u::PetscVec, e::PetscVec) \nCompute the solution error for the timestepping using the function previously set with `TSSetComputeExactError()`\n\nCollective\n\nInput Parameters:\n- `ts` - time stepping context\n- `u`  - The approximate solution\n- `e`  - The `Vec` used to store the error\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetComputeInitialCondition()`, `TSSetComputeInitialCondition()`, `TSSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeExactError\"))\n\"\"\"\nfunction TSComputeExactError(petsclib::PetscLibType, ts::TS, u::PetscVec, e::PetscVec) end\n\n@for_petsc function TSComputeExactError(petsclib::$UnionPetscLib, ts::TS, u::PetscVec, e::PetscVec )\n\n    @chk ccall(\n               (:TSComputeExactError, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, CVec),\n               ts, u, e,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetResize(petsclib::PetscLibType,ts::TS, rollback::PetscBool, setup::external, transfer::external, ctx::Cvoid) \nSets the resize callbacks.\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - The `TS` context obtained from `TSCreate()`\n- `rollback` - Whether a resize will restart the step\n- `setup`    - The setup function\n- `transfer` - The transfer function\n- `ctx`      - [optional] The user-defined context\n\nCalling sequence of `setup`:\n- `ts`     - the `TS` context\n- `step`   - the current step\n- `time`   - the current time\n- `state`  - the current vector of state\n- `resize` - (output parameter) `PETSC_TRUE` if need resizing, `PETSC_FALSE` otherwise\n- `ctx`    - user defined context\n\nCalling sequence of `transfer`:\n- `ts`      - the `TS` context\n- `nv`      - the number of vectors to be transferred\n- `vecsin`  - array of vectors to be transferred\n- `vecsout` - array of transferred vectors\n- `ctx`     - user defined context\n\n-seealso: [](ch_ts), `TS`, `TSSetDM()`, `TSSetIJacobian()`, `TSSetRHSJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetResize\"))\n\"\"\"\nfunction TSSetResize(petsclib::PetscLibType, ts::TS, rollback::PetscBool, setup::external, transfer::external, ctx::Cvoid) end\n\n@for_petsc function TSSetResize(petsclib::$UnionPetscLib, ts::TS, rollback::PetscBool, setup::external, transfer::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetResize, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool, external, external, Ptr{Cvoid}),\n               ts, rollback, setup, transfer, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSResizeRegisterVec(petsclib::PetscLibType,ts::TS, name::String, vec::PetscVec) \nRegister a vector to be transferred with `TSResize()`.\n\nCollective\n\nInput Parameters:\n- `ts`   - The `TS` context obtained from `TSCreate()`\n- `name` - A string identifying the vector\n- `vec`  - The vector\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetResize()`, `TSResize()`, `TSResizeRetrieveVec()`\n\n# External Links\n$(_doc_external(\"Ts/TSResizeRegisterVec\"))\n\"\"\"\nfunction TSResizeRegisterVec(petsclib::PetscLibType, ts::TS, name::String, vec::PetscVec) end\n\n@for_petsc function TSResizeRegisterVec(petsclib::$UnionPetscLib, ts::TS, name::String, vec::PetscVec )\n\n    @chk ccall(\n               (:TSResizeRegisterVec, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, CVec),\n               ts, name, vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSResizeRetrieveVec(petsclib::PetscLibType,ts::TS, name::String, vec::PetscVec) \nRetrieve a vector registered with `TSResizeRegisterVec()`.\n\nCollective\n\nInput Parameters:\n- `ts`   - The `TS` context obtained from `TSCreate()`\n- `name` - A string identifying the vector\n- `vec`  - The vector\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetResize()`, `TSResize()`, `TSResizeRegisterVec()`\n\n# External Links\n$(_doc_external(\"Ts/TSResizeRetrieveVec\"))\n\"\"\"\nfunction TSResizeRetrieveVec(petsclib::PetscLibType, ts::TS, name::String, vec::PetscVec) end\n\n@for_petsc function TSResizeRetrieveVec(petsclib::$UnionPetscLib, ts::TS, name::String, vec::PetscVec )\n\tvec_ = Ref(vec.ptr)\n\n    @chk ccall(\n               (:TSResizeRetrieveVec, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, Ptr{CVec}),\n               ts, name, vec_,\n              )\n\n\tvec.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSResize(petsclib::PetscLibType,ts::TS) \nRuns the user\n\nCollective\n\nInput Parameter:\n- `ts` - The `TS` context obtained from `TSCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetResize()`\n\n# External Links\n$(_doc_external(\"Ts/TSResize\"))\n\"\"\"\nfunction TSResize(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSResize(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSResize, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSolve(petsclib::PetscLibType,ts::TS, u::PetscVec) \nSteps the requested number of timesteps.\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()`\n- `u`  - the solution vector  (can be null if `TSSetSolution()` was used and `TSSetExactFinalTime`(ts,`TS_EXACTFINALTIME_MATCHSTEP`) was not used,\notherwise it must contain the initial conditions and will contain the solution at the final requested time\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`, `TSSetSolution()`, `TSStep()`, `TSGetTime()`, `TSGetSolveTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSolve\"))\n\"\"\"\nfunction TSSolve(petsclib::PetscLibType, ts::TS, u::PetscVec) end\n\n@for_petsc function TSSolve(petsclib::$UnionPetscLib, ts::TS, u::PetscVec )\n\n    @chk ccall(\n               (:TSSolve, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec),\n               ts, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tt::PetscReal = TSGetTime(petsclib::PetscLibType,ts::TS) \nGets the time of the most recently completed step.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `t` - the current time. This time may not corresponds to the final time set with `TSSetMaxTime()`, use `TSGetSolveTime()`.\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSGetSolveTime()`, `TSSetTime()`, `TSGetTimeStep()`, `TSGetStepNumber()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetTime\"))\n\"\"\"\nfunction TSGetTime(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetTime(petsclib::$UnionPetscLib, ts::TS )\n\tt_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSGetTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, t_,\n              )\n\n\tt = t_[]\n\n\treturn t\nend \n\n\"\"\"\n\tt::PetscReal = TSGetPrevTime(petsclib::PetscLibType,ts::TS) \nGets the starting time of the previously completed step.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `t` - the previous time\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSGetTime()`, `TSGetSolveTime()`, `TSGetTimeStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetPrevTime\"))\n\"\"\"\nfunction TSGetPrevTime(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetPrevTime(petsclib::$UnionPetscLib, ts::TS )\n\tt_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSGetPrevTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, t_,\n              )\n\n\tt = t_[]\n\n\treturn t\nend \n\n\"\"\"\n\tTSSetTime(petsclib::PetscLibType,ts::TS, t::PetscReal) \nAllows one to reset the time.\n\nLogically Collective\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()`\n- `t`  - the time\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetTime()`, `TSSetMaxSteps()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetTime\"))\n\"\"\"\nfunction TSSetTime(petsclib::PetscLibType, ts::TS, t::PetscReal) end\n\n@for_petsc function TSSetTime(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal )\n\n    @chk ccall(\n               (:TSSetTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, t,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetOptionsPrefix(petsclib::PetscLibType,ts::TS, prefix::String) \nSets the prefix used for searching for all\nTS options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - The `TS` context\n- `prefix` - The prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSetFromOptions()`, `TSAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetOptionsPrefix\"))\n\"\"\"\nfunction TSSetOptionsPrefix(petsclib::PetscLibType, ts::TS, prefix::String) end\n\n@for_petsc function TSSetOptionsPrefix(petsclib::$UnionPetscLib, ts::TS, prefix::String )\n\n    @chk ccall(\n               (:TSSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}),\n               ts, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAppendOptionsPrefix(petsclib::PetscLibType,ts::TS, prefix::String) \nAppends to the prefix used for searching for all\nTS options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - The `TS` context\n- `prefix` - The prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetOptionsPrefix()`, `TSSetOptionsPrefix()`, `TSSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Ts/TSAppendOptionsPrefix\"))\n\"\"\"\nfunction TSAppendOptionsPrefix(petsclib::PetscLibType, ts::TS, prefix::String) end\n\n@for_petsc function TSAppendOptionsPrefix(petsclib::$UnionPetscLib, ts::TS, prefix::String )\n\n    @chk ccall(\n               (:TSAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}),\n               ts, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetOptionsPrefix(petsclib::PetscLibType,ts::TS, prefix::String) \nSets the prefix used for searching for all\n`TS` options in the database.\n\nNot Collective\n\nInput Parameter:\n- `ts` - The `TS` context\n\nOutput Parameter:\n- `prefix` - A pointer to the prefix string used\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSAppendOptionsPrefix()`, `TSSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetOptionsPrefix\"))\n\"\"\"\nfunction TSGetOptionsPrefix(petsclib::PetscLibType, ts::TS, prefix::String) end\n\n@for_petsc function TSGetOptionsPrefix(petsclib::$UnionPetscLib, ts::TS, prefix::String )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:TSGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Ptr{Cchar}}),\n               ts, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetRHSJacobian(petsclib::PetscLibType,ts::TS, Amat::PetscMat, Pmat::PetscMat, func::TSRHSJacobianFn, ctx::Cvoid) \nReturns the Jacobian J at the present timestep.\n\nNot Collective, but parallel objects are returned if ts is parallel\n\nInput Parameter:\n- `ts` - The `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `Amat` - The (approximate) Jacobian J of G, where U_t = G(U,t)  (or `NULL`)\n- `Pmat` - The matrix from which the preconditioner is constructed, usually the same as `Amat`  (or `NULL`)\n- `func` - Function to compute the Jacobian of the RHS  (or `NULL`)\n- `ctx`  - User-defined context for Jacobian evaluation routine  (or `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetTimeStep()`, `TSGetMatrices()`, `TSGetTime()`, `TSGetStepNumber()`\n\n\n# External Links\n$(_doc_external(\"Ts/TSGetRHSJacobian\"))\n\"\"\"\nfunction TSGetRHSJacobian(petsclib::PetscLibType, ts::TS, Amat::PetscMat, Pmat::PetscMat, func::TSRHSJacobianFn, ctx::Cvoid) end\n\n@for_petsc function TSGetRHSJacobian(petsclib::$UnionPetscLib, ts::TS, Amat::PetscMat, Pmat::PetscMat, func::TSRHSJacobianFn, ctx::Cvoid )\n\tAmat_ = Ref(Amat.ptr)\n\tPmat_ = Ref(Pmat.ptr)\n\n    @chk ccall(\n               (:TSGetRHSJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CMat}, Ptr{CMat}, TSRHSJacobianFn, Cvoid),\n               ts, Amat_, Pmat_, func, ctx,\n              )\n\n\tAmat.ptr = C_NULL\n\tPmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetIJacobian(petsclib::PetscLibType,ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSIJacobianFn, ctx::Cvoid) \nReturns the implicit Jacobian at the present timestep.\n\nNot Collective, but parallel objects are returned if ts is parallel\n\nInput Parameter:\n- `ts` - The `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `Amat` - The (approximate) Jacobian of F(t,U,U_t)\n- `Pmat` - The matrix from which the preconditioner is constructed, often the same as `Amat`\n- `f`    - The function to compute the matrices\n- `ctx`  - User-defined context for Jacobian evaluation routine\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetTimeStep()`, `TSGetRHSJacobian()`, `TSGetMatrices()`, `TSGetTime()`, `TSGetStepNumber()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetIJacobian\"))\n\"\"\"\nfunction TSGetIJacobian(petsclib::PetscLibType, ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSIJacobianFn, ctx::Cvoid) end\n\n@for_petsc function TSGetIJacobian(petsclib::$UnionPetscLib, ts::TS, Amat::PetscMat, Pmat::PetscMat, f::TSIJacobianFn, ctx::Cvoid )\n\tAmat_ = Ref(Amat.ptr)\n\tPmat_ = Ref(Pmat.ptr)\n\n    @chk ccall(\n               (:TSGetIJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CMat}, Ptr{CMat}, TSIJacobianFn, Cvoid),\n               ts, Amat_, Pmat_, f, ctx,\n              )\n\n\tAmat.ptr = C_NULL\n\tPmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetDM(petsclib::PetscLibType,ts::TS, dm::PetscDM) \nSets the `DM` that may be used by some nonlinear solvers or preconditioners under the `TS`\n\nLogically Collective\n\nInput Parameters:\n- `ts` - the `TS` integrator object\n- `dm` - the dm, cannot be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `DM`, `TSGetDM()`, `SNESSetDM()`, `SNESGetDM()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetDM\"))\n\"\"\"\nfunction TSSetDM(petsclib::PetscLibType, ts::TS, dm::PetscDM) end\n\n@for_petsc function TSSetDM(petsclib::$UnionPetscLib, ts::TS, dm::PetscDM )\n\n    @chk ccall(\n               (:TSSetDM, $petsc_library),\n               PetscErrorCode,\n               (CTS, CDM),\n               ts, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdm::PetscDM = TSGetDM(petsclib::PetscLibType,ts::TS, dm::PetscDM) \nGets the `DM` that may be used by some preconditioners\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS`\n\nOutput Parameter:\n- `dm` - the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `DM`, `TSSetDM()`, `SNESSetDM()`, `SNESGetDM()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetDM\"))\n\"\"\"\nfunction TSGetDM(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetDM(petsclib::$UnionPetscLib, ts::TS )\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:TSGetDM, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CDM}),\n               ts, dm_,\n              )\n\n    dm = PetscDM(dm_[], petsclib)\n\treturn dm\nend \n\n\"\"\"\n\tTSComputeRHSFunctionLinear(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, F::PetscVec, ctx::Cvoid) \nEvaluate the right\n\nCollective\n\nInput Parameters:\n- `ts`  - time stepping context\n- `t`   - time at which to evaluate\n- `U`   - state at which to evaluate\n- `ctx` - context\n\nOutput Parameter:\n- `F` - right-hand side\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSFunction()`, `TSSetRHSJacobian()`, `TSComputeRHSJacobianConstant()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSFunctionLinear\"))\n\"\"\"\nfunction TSComputeRHSFunctionLinear(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, F::PetscVec, ctx::Cvoid) end\n\n@for_petsc function TSComputeRHSFunctionLinear(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, F::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSComputeRHSFunctionLinear, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, Ptr{Cvoid}),\n               ts, t, U, F, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSJacobianConstant(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, A::PetscMat, B::PetscMat, ctx::Cvoid) \nReuses a Jacobian that is time\n\nCollective\n\nInput Parameters:\n- `ts`  - time stepping context\n- `t`   - time at which to evaluate\n- `U`   - state at which to evaluate\n- `ctx` - context\n\nOutput Parameters:\n- `A` - Jacobian\n- `B` - matrix used to construct the preconditioner, often the same as `A`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSFunction()`, `TSSetRHSJacobian()`, `TSComputeRHSFunctionLinear()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSJacobianConstant\"))\n\"\"\"\nfunction TSComputeRHSJacobianConstant(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, A::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function TSComputeRHSJacobianConstant(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, A::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSComputeRHSJacobianConstant, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CMat, CMat, Ptr{Cvoid}),\n               ts, t, U, A, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIFunctionLinear(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, F::PetscVec, ctx::Cvoid) \nEvaluate the left hand side via the user\n\nCollective\n\nInput Parameters:\n- `ts`   - time stepping context\n- `t`    - time at which to evaluate\n- `U`    - state at which to evaluate\n- `Udot` - time derivative of state vector\n- `ctx`  - context\n\nOutput Parameter:\n- `F` - left hand side\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetIFunction()`, `TSSetIJacobian()`, `TSComputeIJacobianConstant()`, `TSComputeRHSFunctionLinear()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIFunctionLinear\"))\n\"\"\"\nfunction TSComputeIFunctionLinear(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, F::PetscVec, ctx::Cvoid) end\n\n@for_petsc function TSComputeIFunctionLinear(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Udot::PetscVec, F::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSComputeIFunctionLinear, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, CVec, Ptr{Cvoid}),\n               ts, t, U, Udot, F, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIJacobianConstant(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, A::PetscMat, B::PetscMat, ctx::Cvoid) \nReuses the matrix previously computed with the provided `TSIJacobianFn` for a semi\n\nCollective\n\nInput Parameters:\n- `ts`    - time stepping context\n- `t`     - time at which to evaluate\n- `U`     - state at which to evaluate\n- `Udot`  - time derivative of state vector\n- `shift` - shift to apply\n- `ctx`   - context\n\nOutput Parameters:\n- `A` - pointer to operator\n- `B` - pointer to matrix from which the preconditioner is built (often `A`)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSROSW`, `TSARKIMEX`, `TSSetIFunction()`, `TSSetIJacobian()`, `TSComputeIFunctionLinear()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIJacobianConstant\"))\n\"\"\"\nfunction TSComputeIJacobianConstant(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, A::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function TSComputeIJacobianConstant(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Udot::PetscVec, shift::$PetscReal, A::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSComputeIJacobianConstant, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, $PetscReal, CMat, CMat, Ptr{Cvoid}),\n               ts, t, U, Udot, shift, A, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tequation_type::TSEquationType = TSGetEquationType(petsclib::PetscLibType,ts::TS) \nGets the type of the equation that `TS` is solving.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `equation_type` - see `TSEquationType`\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSSetEquationType()`, `TSEquationType`\n\n# External Links\n$(_doc_external(\"Ts/TSGetEquationType\"))\n\"\"\"\nfunction TSGetEquationType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetEquationType(petsclib::$UnionPetscLib, ts::TS )\n\tequation_type_ = Ref{TSEquationType}()\n\n    @chk ccall(\n               (:TSGetEquationType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSEquationType}),\n               ts, equation_type_,\n              )\n\n\tequation_type = unsafe_string(equation_type_[])\n\n\treturn equation_type\nend \n\n\"\"\"\n\tTSSetEquationType(petsclib::PetscLibType,ts::TS, equation_type::TSEquationType) \nSets the type of the equation that `TS` is solving.\n\nNot Collective\n\nInput Parameters:\n- `ts`            - the `TS` context\n- `equation_type` - see `TSEquationType`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetEquationType()`, `TSEquationType`\n\n# External Links\n$(_doc_external(\"Ts/TSSetEquationType\"))\n\"\"\"\nfunction TSSetEquationType(petsclib::PetscLibType, ts::TS, equation_type::TSEquationType) end\n\n@for_petsc function TSSetEquationType(petsclib::$UnionPetscLib, ts::TS, equation_type::TSEquationType )\n\n    @chk ccall(\n               (:TSSetEquationType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSEquationType),\n               ts, equation_type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetConvergedReason(petsclib::PetscLibType,ts::TS, reason::TSConvergedReason) \nGets the reason the `TS` iteration was stopped.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `reason` - negative value indicates diverged, positive value converged, see `TSConvergedReason` or the\nmanual pages for the individual convergence tests for complete lists\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSConvergedReason`\n\n# External Links\n$(_doc_external(\"Ts/TSGetConvergedReason\"))\n\"\"\"\nfunction TSGetConvergedReason(petsclib::PetscLibType, ts::TS, reason::TSConvergedReason) end\n\n@for_petsc function TSGetConvergedReason(petsclib::$UnionPetscLib, ts::TS, reason::TSConvergedReason )\n\n    @chk ccall(\n               (:TSGetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSConvergedReason}),\n               ts, reason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetConvergedReason(petsclib::PetscLibType,ts::TS, reason::TSConvergedReason) \nSets the reason for handling the convergence of `TSSolve()`.\n\nLogically Collective; reason must contain common value\n\nInput Parameters:\n- `ts`     - the `TS` context\n- `reason` - negative value indicates diverged, positive value converged, see `TSConvergedReason` or the\nmanual pages for the individual convergence tests for complete lists\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSConvergedReason`\n\n# External Links\n$(_doc_external(\"Ts/TSSetConvergedReason\"))\n\"\"\"\nfunction TSSetConvergedReason(petsclib::PetscLibType, ts::TS, reason::TSConvergedReason) end\n\n@for_petsc function TSSetConvergedReason(petsclib::$UnionPetscLib, ts::TS, reason::TSConvergedReason )\n\n    @chk ccall(\n               (:TSSetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSConvergedReason),\n               ts, reason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tftime::PetscReal = TSGetSolveTime(petsclib::PetscLibType,ts::TS) \nGets the time after a call to `TSSolve()`\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `ftime` - the final time. This time corresponds to the final time set with `TSSetMaxTime()`\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSConvergedReason`\n\n# External Links\n$(_doc_external(\"Ts/TSGetSolveTime\"))\n\"\"\"\nfunction TSGetSolveTime(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetSolveTime(petsclib::$UnionPetscLib, ts::TS )\n\tftime_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSGetSolveTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, ftime_,\n              )\n\n\tftime = ftime_[]\n\n\treturn ftime\nend \n\n\"\"\"\n\tnits::PetscInt = TSGetSNESIterations(petsclib::PetscLibType,ts::TS) \nGets the total number of nonlinear iterations\nused by the time integrator.\n\nNot Collective\n\nInput Parameter:\n- `ts` - `TS` context\n\nOutput Parameter:\n- `nits` - number of nonlinear iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSGetKSPIterations()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetSNESIterations\"))\n\"\"\"\nfunction TSGetSNESIterations(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetSNESIterations(petsclib::$UnionPetscLib, ts::TS )\n\tnits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetSNESIterations, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, nits_,\n              )\n\n\tnits = nits_[]\n\n\treturn nits\nend \n\n\"\"\"\n\tlits::PetscInt = TSGetKSPIterations(petsclib::PetscLibType,ts::TS) \nGets the total number of linear iterations\nused by the time integrator.\n\nNot Collective\n\nInput Parameter:\n- `ts` - `TS` context\n\nOutput Parameter:\n- `lits` - number of linear iterations\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSGetSNESIterations()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetKSPIterations\"))\n\"\"\"\nfunction TSGetKSPIterations(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetKSPIterations(petsclib::$UnionPetscLib, ts::TS )\n\tlits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetKSPIterations, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, lits_,\n              )\n\n\tlits = lits_[]\n\n\treturn lits\nend \n\n\"\"\"\n\trejects::PetscInt = TSGetStepRejections(petsclib::PetscLibType,ts::TS) \nGets the total number of rejected steps.\n\nNot Collective\n\nInput Parameter:\n- `ts` - `TS` context\n\nOutput Parameter:\n- `rejects` - number of steps rejected\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSGetSNESIterations()`, `TSGetKSPIterations()`, `TSSetMaxStepRejections()`, `TSGetSNESFailures()`, `TSSetMaxSNESFailures()`, `TSSetErrorIfStepFails()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetStepRejections\"))\n\"\"\"\nfunction TSGetStepRejections(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetStepRejections(petsclib::$UnionPetscLib, ts::TS )\n\trejects_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetStepRejections, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, rejects_,\n              )\n\n\trejects = rejects_[]\n\n\treturn rejects\nend \n\n\"\"\"\n\tfails::PetscInt = TSGetSNESFailures(petsclib::PetscLibType,ts::TS) \nGets the total number of failed `SNES` solves in a `TS`\n\nNot Collective\n\nInput Parameter:\n- `ts` - `TS` context\n\nOutput Parameter:\n- `fails` - number of failed nonlinear solves\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSGetSNESIterations()`, `TSGetKSPIterations()`, `TSSetMaxStepRejections()`, `TSGetStepRejections()`, `TSSetMaxSNESFailures()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetSNESFailures\"))\n\"\"\"\nfunction TSGetSNESFailures(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetSNESFailures(petsclib::$UnionPetscLib, ts::TS )\n\tfails_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetSNESFailures, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, fails_,\n              )\n\n\tfails = fails_[]\n\n\treturn fails\nend \n\n\"\"\"\n\tTSSetMaxStepRejections(petsclib::PetscLibType,ts::TS, rejects::PetscInt) \nSets the maximum number of step rejections before a time step fails\n\nNot Collective\n\nInput Parameters:\n- `ts`      - `TS` context\n- `rejects` - maximum number of rejected steps, pass `PETSC_UNLIMITED` for unlimited\n\nOptions Database Key:\n- `-ts_max_reject` - Maximum number of step rejections before a step fails\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSGetSNESIterations()`, `TSGetKSPIterations()`, `TSSetMaxSNESFailures()`, `TSGetStepRejections()`, `TSGetSNESFailures()`, `TSSetErrorIfStepFails()`, `TSGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetMaxStepRejections\"))\n\"\"\"\nfunction TSSetMaxStepRejections(petsclib::PetscLibType, ts::TS, rejects::PetscInt) end\n\n@for_petsc function TSSetMaxStepRejections(petsclib::$UnionPetscLib, ts::TS, rejects::$PetscInt )\n\n    @chk ccall(\n               (:TSSetMaxStepRejections, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, rejects,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetMaxSNESFailures(petsclib::PetscLibType,ts::TS, fails::PetscInt) \nSets the maximum number of failed `SNES` solves\n\nNot Collective\n\nInput Parameters:\n- `ts`    - `TS` context\n- `fails` - maximum number of failed nonlinear solves, pass `PETSC_UNLIMITED` to allow any number of failures.\n\nOptions Database Key:\n- `-ts_max_snes_failures` - Maximum number of nonlinear solve failures\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSGetSNESIterations()`, `TSGetKSPIterations()`, `TSSetMaxStepRejections()`, `TSGetStepRejections()`, `TSGetSNESFailures()`, `SNESGetConvergedReason()`, `TSGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetMaxSNESFailures\"))\n\"\"\"\nfunction TSSetMaxSNESFailures(petsclib::PetscLibType, ts::TS, fails::PetscInt) end\n\n@for_petsc function TSSetMaxSNESFailures(petsclib::$UnionPetscLib, ts::TS, fails::$PetscInt )\n\n    @chk ccall(\n               (:TSSetMaxSNESFailures, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, fails,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetErrorIfStepFails(petsclib::PetscLibType,ts::TS, err::PetscBool) \nImmediately error if no step succeeds during `TSSolve()`\n\nNot Collective\n\nInput Parameters:\n- `ts`  - `TS` context\n- `err` - `PETSC_TRUE` to error if no step succeeds, `PETSC_FALSE` to return without failure\n\nOptions Database Key:\n- `-ts_error_if_step_fails` - Error if no step succeeds\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetSNESIterations()`, `TSGetKSPIterations()`, `TSSetMaxStepRejections()`, `TSGetStepRejections()`, `TSGetSNESFailures()`, `TSGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetErrorIfStepFails\"))\n\"\"\"\nfunction TSSetErrorIfStepFails(petsclib::PetscLibType, ts::TS, err::PetscBool) end\n\n@for_petsc function TSSetErrorIfStepFails(petsclib::$UnionPetscLib, ts::TS, err::PetscBool )\n\n    @chk ccall(\n               (:TSSetErrorIfStepFails, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, err,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetAdapt(petsclib::PetscLibType,ts::TS, adapt::TSAdapt) \nGet the adaptive controller context for the current method\n\nCollective if controller has not yet been created\n\nInput Parameter:\n- `ts` - time stepping context\n\nOutput Parameter:\n- `adapt` - adaptive controller\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSAdapt`, `TSAdaptSetType()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetAdapt\"))\n\"\"\"\nfunction TSGetAdapt(petsclib::PetscLibType, ts::TS, adapt::TSAdapt) end\n\n@for_petsc function TSGetAdapt(petsclib::$UnionPetscLib, ts::TS, adapt::TSAdapt )\n\n    @chk ccall(\n               (:TSGetAdapt, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSAdapt}),\n               ts, adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetTolerances(petsclib::PetscLibType,ts::TS, atol::PetscReal, vatol::PetscVec, rtol::PetscReal, vrtol::PetscVec) \nSet tolerances for local truncation error when using an adaptive controller\n\nLogically Collective\n\nInput Parameters:\n- `ts`    - time integration context\n- `atol`  - scalar absolute tolerances\n- `vatol` - vector of absolute tolerances or `NULL`, used in preference to `atol` if present\n- `rtol`  - scalar relative tolerances\n- `vrtol` - vector of relative tolerances or `NULL`, used in preference to `rtol` if present\n\nOptions Database Keys:\n- `-ts_rtol <rtol>` - relative tolerance for local truncation error\n- `-ts_atol <atol>` - Absolute tolerance for local truncation error\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSAdapt`, `TSErrorWeightedNorm()`, `TSGetTolerances()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetTolerances\"))\n\"\"\"\nfunction TSSetTolerances(petsclib::PetscLibType, ts::TS, atol::PetscReal, vatol::PetscVec, rtol::PetscReal, vrtol::PetscVec) end\n\n@for_petsc function TSSetTolerances(petsclib::$UnionPetscLib, ts::TS, atol::$PetscReal, vatol::PetscVec, rtol::$PetscReal, vrtol::PetscVec )\n\n    @chk ccall(\n               (:TSSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, $PetscReal, CVec),\n               ts, atol, vatol, rtol, vrtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tatol::PetscReal,rtol::PetscReal = TSGetTolerances(petsclib::PetscLibType,ts::TS, vatol::PetscVec, vrtol::PetscVec) \nGet tolerances for local truncation error when using adaptive controller\n\nLogically Collective\n\nInput Parameter:\n- `ts` - time integration context\n\nOutput Parameters:\n- `atol`  - scalar absolute tolerances, `NULL` to ignore\n- `vatol` - vector of absolute tolerances, `NULL` to ignore\n- `rtol`  - scalar relative tolerances, `NULL` to ignore\n- `vrtol` - vector of relative tolerances, `NULL` to ignore\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSAdapt`, `TSErrorWeightedNorm()`, `TSSetTolerances()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetTolerances\"))\n\"\"\"\nfunction TSGetTolerances(petsclib::PetscLibType, ts::TS, vatol::PetscVec, vrtol::PetscVec) end\n\n@for_petsc function TSGetTolerances(petsclib::$UnionPetscLib, ts::TS, vatol::PetscVec, vrtol::PetscVec )\n\tatol_ = Ref{$PetscReal}()\n\tvatol_ = Ref(vatol.ptr)\n\trtol_ = Ref{$PetscReal}()\n\tvrtol_ = Ref(vrtol.ptr)\n\n    @chk ccall(\n               (:TSGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}, Ptr{CVec}, Ptr{$PetscReal}, Ptr{CVec}),\n               ts, atol_, vatol_, rtol_, vrtol_,\n              )\n\n\tatol = atol_[]\n\tvatol.ptr = C_NULL\n\trtol = rtol_[]\n\tvrtol.ptr = C_NULL\n\n\treturn atol,rtol\nend \n\n\"\"\"\n\tnorm::PetscReal,norma::PetscReal,normr::PetscReal = TSErrorWeightedNorm(petsclib::PetscLibType,ts::TS, U::PetscVec, Y::PetscVec, wnormtype::NormType) \ncompute a weighted norm of the difference between two state vectors based on supplied absolute and relative tolerances\n\nCollective\n\nInput Parameters:\n- `ts`        - time stepping context\n- `U`         - state vector, usually ts->vec_sol\n- `Y`         - state vector to be compared to U\n- `wnormtype` - norm type, either `NORM_2` or `NORM_INFINITY`\n\nOutput Parameters:\n- `norm`  - weighted norm, a value of 1.0 achieves a balance between absolute and relative tolerances\n- `norma` - weighted norm, a value of 1.0 means that the error meets the absolute tolerance set by the user\n- `normr` - weighted norm, a value of 1.0 means that the error meets the relative tolerance set by the user\n\nOptions Database Key:\n- `-ts_adapt_wnormtype <wnormtype>` - 2, INFINITY\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `VecErrorWeightedNorms()`, `TSErrorWeightedENorm()`\n\n# External Links\n$(_doc_external(\"Ts/TSErrorWeightedNorm\"))\n\"\"\"\nfunction TSErrorWeightedNorm(petsclib::PetscLibType, ts::TS, U::PetscVec, Y::PetscVec, wnormtype::NormType) end\n\n@for_petsc function TSErrorWeightedNorm(petsclib::$UnionPetscLib, ts::TS, U::PetscVec, Y::PetscVec, wnormtype::NormType )\n\tnorm_ = Ref{$PetscReal}()\n\tnorma_ = Ref{$PetscReal}()\n\tnormr_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSErrorWeightedNorm, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, CVec, NormType, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ts, U, Y, wnormtype, norm_, norma_, normr_,\n              )\n\n\tnorm = norm_[]\n\tnorma = norma_[]\n\tnormr = normr_[]\n\n\treturn norm,norma,normr\nend \n\n\"\"\"\n\tnorm::PetscReal,norma::PetscReal,normr::PetscReal = TSErrorWeightedENorm(petsclib::PetscLibType,ts::TS, E::PetscVec, U::PetscVec, Y::PetscVec, wnormtype::NormType) \ncompute a weighted error norm based on supplied absolute and relative tolerances\n\nCollective\n\nInput Parameters:\n- `ts`        - time stepping context\n- `E`         - error vector\n- `U`         - state vector, usually ts->vec_sol\n- `Y`         - state vector, previous time step\n- `wnormtype` - norm type, either `NORM_2` or `NORM_INFINITY`\n\nOutput Parameters:\n- `norm`  - weighted norm, a value of 1.0 achieves a balance between absolute and relative tolerances\n- `norma` - weighted norm, a value of 1.0 means that the error meets the absolute tolerance set by the user\n- `normr` - weighted norm, a value of 1.0 means that the error meets the relative tolerance set by the user\n\nOptions Database Key:\n- `-ts_adapt_wnormtype <wnormtype>` - 2, INFINITY\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `VecErrorWeightedNorms()`, `TSErrorWeightedNorm()`\n\n# External Links\n$(_doc_external(\"Ts/TSErrorWeightedENorm\"))\n\"\"\"\nfunction TSErrorWeightedENorm(petsclib::PetscLibType, ts::TS, E::PetscVec, U::PetscVec, Y::PetscVec, wnormtype::NormType) end\n\n@for_petsc function TSErrorWeightedENorm(petsclib::$UnionPetscLib, ts::TS, E::PetscVec, U::PetscVec, Y::PetscVec, wnormtype::NormType )\n\tnorm_ = Ref{$PetscReal}()\n\tnorma_ = Ref{$PetscReal}()\n\tnormr_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSErrorWeightedENorm, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, CVec, CVec, NormType, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ts, E, U, Y, wnormtype, norm_, norma_, normr_,\n              )\n\n\tnorm = norm_[]\n\tnorma = norma_[]\n\tnormr = normr_[]\n\n\treturn norm,norma,normr\nend \n\n\"\"\"\n\tTSSetCFLTimeLocal(petsclib::PetscLibType,ts::TS, cfltime::PetscReal) \nSet the local CFL constraint relative to forward Euler\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - time stepping context\n- `cfltime` - maximum stable time step if using forward Euler (value can be different on each process)\n\n-seealso: [](ch_ts), `TSGetCFLTime()`, `TSADAPTCFL`\n\n# External Links\n$(_doc_external(\"Ts/TSSetCFLTimeLocal\"))\n\"\"\"\nfunction TSSetCFLTimeLocal(petsclib::PetscLibType, ts::TS, cfltime::PetscReal) end\n\n@for_petsc function TSSetCFLTimeLocal(petsclib::$UnionPetscLib, ts::TS, cfltime::$PetscReal )\n\n    @chk ccall(\n               (:TSSetCFLTimeLocal, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, cfltime,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcfltime::PetscReal = TSGetCFLTime(petsclib::PetscLibType,ts::TS) \nGet the maximum stable time step according to CFL criteria applied to forward Euler\n\nCollective\n\nInput Parameter:\n- `ts` - time stepping context\n\nOutput Parameter:\n- `cfltime` - maximum stable time step for forward Euler\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSetCFLTimeLocal()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetCFLTime\"))\n\"\"\"\nfunction TSGetCFLTime(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetCFLTime(petsclib::$UnionPetscLib, ts::TS )\n\tcfltime_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSGetCFLTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, cfltime_,\n              )\n\n\tcfltime = cfltime_[]\n\n\treturn cfltime\nend \n\n\"\"\"\n\tTSVISetVariableBounds(petsclib::PetscLibType,ts::TS, xl::PetscVec, xu::PetscVec) \nSets the lower and upper bounds for the solution vector. xl <= x <= xu\n\nInput Parameters:\n- `ts` - the `TS` context.\n- `xl` - lower bound.\n- `xu` - upper bound.\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSVISetVariableBounds\"))\n\"\"\"\nfunction TSVISetVariableBounds(petsclib::PetscLibType, ts::TS, xl::PetscVec, xu::PetscVec) end\n\n@for_petsc function TSVISetVariableBounds(petsclib::$UnionPetscLib, ts::TS, xl::PetscVec, xu::PetscVec )\n\n    @chk ccall(\n               (:TSVISetVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, CVec),\n               ts, xl, xu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tyr::PetscReal,yi::PetscReal = TSComputeLinearStability(petsclib::PetscLibType,ts::TS, xr::PetscReal, xi::PetscReal) \ncomputes the linear stability function at a point\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `xr` - real part of input argument\n- `xi` - imaginary part of input argument\n\nOutput Parameters:\n- `yr` - real part of function value\n- `yi` - imaginary part of function value\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSFunction()`, `TSComputeIFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeLinearStability\"))\n\"\"\"\nfunction TSComputeLinearStability(petsclib::PetscLibType, ts::TS, xr::PetscReal, xi::PetscReal) end\n\n@for_petsc function TSComputeLinearStability(petsclib::$UnionPetscLib, ts::TS, xr::$PetscReal, xi::$PetscReal )\n\tyr_ = Ref{$PetscReal}()\n\tyi_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSComputeLinearStability, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ts, xr, xi, yr_, yi_,\n              )\n\n\tyr = yr_[]\n\tyi = yi_[]\n\n\treturn yr,yi\nend \n\n\"\"\"\n\tTSRestartStep(petsclib::PetscLibType,ts::TS) \nFlags the solver to restart the next step\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSBDF`, `TSSolve()`, `TSSetPreStep()`, `TSSetPostStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSRestartStep\"))\n\"\"\"\nfunction TSRestartStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRestartStep(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSRestartStep, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRollBack(petsclib::PetscLibType,ts::TS) \nRolls back one time step\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetStepRollBack()`, `TSCreate()`, `TSSetUp()`, `TSDestroy()`, `TSSolve()`, `TSSetPreStep()`, `TSSetPreStage()`, `TSInterpolate()`\n\n# External Links\n$(_doc_external(\"Ts/TSRollBack\"))\n\"\"\"\nfunction TSRollBack(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRollBack(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSRollBack, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = TSGetStepRollBack(petsclib::PetscLibType,ts::TS) \nGet the internal flag indicating if you are rolling back a step\n\nNot collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `flg` - the rollback flag\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`, `TSRollBack()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetStepRollBack\"))\n\"\"\"\nfunction TSGetStepRollBack(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetStepRollBack(petsclib::$UnionPetscLib, ts::TS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSGetStepRollBack, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = TSGetStepResize(petsclib::PetscLibType,ts::TS) \nGet the internal flag indicating if the current step is after a resize.\n\nNot collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `flg` - the resize flag\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`, `TSSetResize()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetStepResize\"))\n\"\"\"\nfunction TSGetStepResize(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetStepResize(petsclib::$UnionPetscLib, ts::TS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSGetStepResize, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tns::PetscInt = TSGetStages(petsclib::PetscLibType,ts::TS, Y::PetscVec) \nGet the number of stages and stage values\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `ns` - the number of stages\n- `Y`  - the current stage vectors\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetStages\"))\n\"\"\"\nfunction TSGetStages(petsclib::PetscLibType, ts::TS, Y::PetscVec) end\n\n@for_petsc function TSGetStages(petsclib::$UnionPetscLib, ts::TS, Y::PetscVec )\n\tns_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetStages, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, CVec),\n               ts, ns_, Y,\n              )\n\n\tns = ns_[]\n\n\treturn ns\nend \n\n\"\"\"\n\tTSComputeIJacobianDefaultColor(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, J::PetscMat, B::PetscMat, ctx::Cvoid) \nComputes the Jacobian using finite differences and coloring to exploit matrix sparsity.\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `t`     - current timestep\n- `U`     - state vector\n- `Udot`  - time derivative of state vector\n- `shift` - shift to apply, see note below\n- `ctx`   - an optional user context\n\nOutput Parameters:\n- `J` - Jacobian matrix (not altered in this routine)\n- `B` - newly computed Jacobian matrix to use with preconditioner (generally the same as `J`)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetIJacobian()`, `MatFDColoringCreate()`, `MatFDColoringSetFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIJacobianDefaultColor\"))\n\"\"\"\nfunction TSComputeIJacobianDefaultColor(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, J::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function TSComputeIJacobianDefaultColor(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Udot::PetscVec, shift::$PetscReal, J::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSComputeIJacobianDefaultColor, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, $PetscReal, CMat, CMat, Ptr{Cvoid}),\n               ts, t, U, Udot, shift, J, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetFunctionDomainError(petsclib::PetscLibType,ts::TS, func::external) \nSet a function that tests if the current state vector is valid\n\nLogically collective\n\nInput Parameters:\n- `ts`   - the `TS` context\n- `func` - function called within `TSFunctionDomainError()`\n\nCalling sequence of `func`:\n- `ts`     - the `TS` context\n- `time`   - the current time (of the stage)\n- `state`  - the state to check if it is valid\n- `accept` - (output parameter) `PETSC_FALSE` if the state is not acceptable, `PETSC_TRUE` if acceptable\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdaptCheckStage()`, `TSFunctionDomainError()`, `SNESSetFunctionDomainError()`, `TSGetSNES()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetFunctionDomainError\"))\n\"\"\"\nfunction TSSetFunctionDomainError(petsclib::PetscLibType, ts::TS, func::external) end\n\n@for_petsc function TSSetFunctionDomainError(petsclib::$UnionPetscLib, ts::TS, func::external )\n\n    @chk ccall(\n               (:TSSetFunctionDomainError, $petsc_library),\n               PetscErrorCode,\n               (CTS, external),\n               ts, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\taccept::PetscBool = TSFunctionDomainError(petsclib::PetscLibType,ts::TS, stagetime::PetscReal, Y::PetscVec) \nChecks if the current state is valid\n\nCollective\n\nInput Parameters:\n- `ts`        - the `TS` context\n- `stagetime` - time of the simulation\n- `Y`         - state vector to check.\n\nOutput Parameter:\n- `accept` - Set to `PETSC_FALSE` if the current state vector is valid.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetFunctionDomainError()`\n\n# External Links\n$(_doc_external(\"Ts/TSFunctionDomainError\"))\n\"\"\"\nfunction TSFunctionDomainError(petsclib::PetscLibType, ts::TS, stagetime::PetscReal, Y::PetscVec) end\n\n@for_petsc function TSFunctionDomainError(petsclib::$UnionPetscLib, ts::TS, stagetime::$PetscReal, Y::PetscVec )\n\taccept_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSFunctionDomainError, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{PetscBool}),\n               ts, stagetime, Y, accept_,\n              )\n\n\taccept = accept_[]\n\n\treturn accept\nend \n\n\"\"\"\n\tTSClone(petsclib::PetscLibType,tsin::TS, tsout::TS) \nThis function clones a time step `TS` object.\n\nCollective\n\nInput Parameter:\n- `tsin` - The input `TS`\n\nOutput Parameter:\n- `tsout` - The output `TS` (cloned)\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSCreate()`, `TSSetType()`, `TSSetUp()`, `TSDestroy()`, `TSSetProblemType()`\n\n# External Links\n$(_doc_external(\"Ts/TSClone\"))\n\"\"\"\nfunction TSClone(petsclib::PetscLibType, tsin::TS, tsout::TS) end\n\n@for_petsc function TSClone(petsclib::$UnionPetscLib, tsin::TS, tsout::TS )\n\ttsout_ = Ref(tsout.ptr)\n\n    @chk ccall(\n               (:TSClone, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CTS}),\n               tsin, tsout_,\n              )\n\n\ttsout.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = TSRHSJacobianTest(petsclib::PetscLibType,ts::TS) \nCompares the multiply routine provided to the `MATSHELL` with differencing on the `TS` given RHS function.\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the time stepping routine\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the multiply is likely correct\n\nOptions Database Key:\n- `-ts_rhs_jacobian_test_mult -mat_shell_test_mult_view` - run the test at each timestep of the integrator\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `Mat`, `MATSHELL`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`, `MatShellTestMultTranspose()`, `TSRHSJacobianTestTranspose()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSJacobianTest\"))\n\"\"\"\nfunction TSRHSJacobianTest(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRHSJacobianTest(petsclib::$UnionPetscLib, ts::TS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSRHSJacobianTest, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = TSRHSJacobianTestTranspose(petsclib::PetscLibType,ts::TS) \nCompares the multiply transpose routine provided to the `MATSHELL` with differencing on the `TS` given RHS function.\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the time stepping routine\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the multiply is likely correct\n\nOptions Database Key:\n- `-ts_rhs_jacobian_test_mult_transpose -mat_shell_test_mult_transpose_view` - run the test at each timestep of the integrator\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `Mat`, `MatCreateShell()`, `MatShellGetContext()`, `MatShellGetOperation()`, `MatShellTestMultTranspose()`, `TSRHSJacobianTest()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSJacobianTestTranspose\"))\n\"\"\"\nfunction TSRHSJacobianTestTranspose(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRHSJacobianTestTranspose(petsclib::$UnionPetscLib, ts::TS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSRHSJacobianTestTranspose, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tTSSetUseSplitRHSFunction(petsclib::PetscLibType,ts::TS, use_splitrhsfnc::PetscBool) \nUse the split RHSFunction when a multirate method is used.\n\nLogically Collective\n\nInput Parameters:\n- `ts`                   - timestepping context\n- `use_splitrhsfunction` - `PETSC_TRUE` indicates that the split RHSFunction will be used\n\nOptions Database Key:\n- `-ts_use_splitrhsfunction` - <true,false>\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetUseSplitRHSFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetUseSplitRHSFunction\"))\n\"\"\"\nfunction TSSetUseSplitRHSFunction(petsclib::PetscLibType, ts::TS, use_splitrhsfnc::PetscBool) end\n\n@for_petsc function TSSetUseSplitRHSFunction(petsclib::$UnionPetscLib, ts::TS, use_splitrhsfnc::PetscBool )\n\n    @chk ccall(\n               (:TSSetUseSplitRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, use_splitrhsfnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuse_splitrhsfnc::PetscBool = TSGetUseSplitRHSFunction(petsclib::PetscLibType,ts::TS) \nGets whether to use the split RHSFunction when a multirate method is used.\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `use_splitrhsfunction` - `PETSC_TRUE` indicates that the split RHSFunction will be used\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetUseSplitRHSFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetUseSplitRHSFunction\"))\n\"\"\"\nfunction TSGetUseSplitRHSFunction(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetUseSplitRHSFunction(petsclib::$UnionPetscLib, ts::TS )\n\tuse_splitrhsfnc_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSGetUseSplitRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, use_splitrhsfnc_,\n              )\n\n\tuse_splitrhsfnc = use_splitrhsfnc_[]\n\n\treturn use_splitrhsfnc\nend \n\n\"\"\"\n\tTSSetMatStructure(petsclib::PetscLibType,ts::TS, str::MatStructure) \nsets the relationship between the nonzero structure of the RHS Jacobian matrix to the IJacobian matrix.\n\nLogically  Collective\n\nInput Parameters:\n- `ts`  - the time-stepper\n- `str` - the structure (the default is `UNKNOWN_NONZERO_PATTERN`)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `MatAXPY()`, `MatStructure`\n\n# External Links\n$(_doc_external(\"Ts/TSSetMatStructure\"))\n\"\"\"\nfunction TSSetMatStructure(petsclib::PetscLibType, ts::TS, str::MatStructure) end\n\n@for_petsc function TSSetMatStructure(petsclib::$UnionPetscLib, ts::TS, str::MatStructure )\n\n    @chk ccall(\n               (:TSSetMatStructure, $petsc_library),\n               PetscErrorCode,\n               (CTS, MatStructure),\n               ts, str,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetEvaluationTimes(petsclib::PetscLibType,ts::TS, n::PetscInt, time_points::Vector{PetscReal}) \nsets the evaluation points. The solution will be computed and stored for each time requested\n\nCollective\n\nInput Parameters:\n- `ts`          - the time-stepper\n- `n`           - number of the time points\n- `time_points` - array of the time points, must be increasing\n\nOptions Database Key:\n- `-ts_eval_times <t0,...tn>` - Sets the evaluation times\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGetEvaluationTimes()`, `TSGetEvaluationSolutions()`, `TSSetTimeSpan()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetEvaluationTimes\"))\n\"\"\"\nfunction TSSetEvaluationTimes(petsclib::PetscLibType, ts::TS, n::PetscInt, time_points::Vector{PetscReal}) end\n\n@for_petsc function TSSetEvaluationTimes(petsclib::$UnionPetscLib, ts::TS, n::$PetscInt, time_points::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSSetEvaluationTimes, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, Ptr{$PetscReal}),\n               ts, n, time_points,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt,time_points::Vector{PetscReal} = TSGetEvaluationTimes(petsclib::PetscLibType,ts::TS) \ngets the evaluation times set with `TSSetEvaluationTimes()`\n\nNot Collective\n\nInput Parameter:\n- `ts` - the time-stepper\n\nOutput Parameters:\n- `n`           - number of the time points\n- `time_points` - array of the time points\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSSetEvaluationTimes()`, `TSGetEvaluationSolutions()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetEvaluationTimes\"))\n\"\"\"\nfunction TSGetEvaluationTimes(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetEvaluationTimes(petsclib::$UnionPetscLib, ts::TS )\n\tn_ = Ref{$PetscInt}()\n\ttime_points_ = Ref{Ptr{$PetscReal}}()\n\n    @chk ccall(\n               (:TSGetEvaluationTimes, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}),\n               ts, n_, time_points_,\n              )\n\n\tn = n_[]\n\ttime_points = unsafe_wrap(Array, time_points_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,time_points\nend \n\n\"\"\"\n\tnsol::PetscInt,sol_times::Vector{PetscReal} = TSGetEvaluationSolutions(petsclib::PetscLibType,ts::TS, Sols::Vector{PetscVec}) \nGet the number of solutions and the solutions at the evaluation time points specified\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `nsol`      - the number of solutions\n- `sol_times` - array of solution times corresponding to the solution vectors. See note below\n- `Sols`      - the solution vectors\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetEvaluationTimes()`, `TSGetEvaluationTimes()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetEvaluationSolutions\"))\n\"\"\"\nfunction TSGetEvaluationSolutions(petsclib::PetscLibType, ts::TS, Sols::Vector{PetscVec}) end\n\n@for_petsc function TSGetEvaluationSolutions(petsclib::$UnionPetscLib, ts::TS, Sols::Vector{PetscVec} )\n\tnsol_ = Ref{$PetscInt}()\n\tsol_times_ = Ref{Ptr{$PetscReal}}()\n\tSols_ = Ref(pointer(Sols))\n\n    @chk ccall(\n               (:TSGetEvaluationSolutions, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, Ptr{Ptr{$PetscReal}}, Ptr{Ptr{CVec}}),\n               ts, nsol_, sol_times_, Sols_,\n              )\n\n\tnsol = nsol_[]\n\tsol_times = unsafe_wrap(Array, sol_times_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn nsol,sol_times\nend \n\n\"\"\"\n\tTSSetTimeSpan(petsclib::PetscLibType,ts::TS, n::PetscInt, span_times::Vector{PetscReal}) \nsets the time span. The solution will be computed and stored for each time requested in the span\n\nCollective\n\nInput Parameters:\n- `ts`         - the time-stepper\n- `n`          - number of the time points (>=2)\n- `span_times` - array of the time points, must be increasing. The first element and the last element are the initial time and the final time respectively.\n\nOptions Database Key:\n- `-ts_time_span <t0,...tf>` - Sets the time span\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSetEvaluationTimes()`, `TSGetEvaluationTimes()`, `TSGetEvaluationSolutions()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetTimeSpan\"))\n\"\"\"\nfunction TSSetTimeSpan(petsclib::PetscLibType, ts::TS, n::PetscInt, span_times::Vector{PetscReal}) end\n\n@for_petsc function TSSetTimeSpan(petsclib::$UnionPetscLib, ts::TS, n::$PetscInt, span_times::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSSetTimeSpan, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, Ptr{$PetscReal}),\n               ts, n, span_times,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPruneIJacobianColor(petsclib::PetscLibType,ts::TS, J::PetscMat, B::PetscMat) \nRemove nondiagonal zeros in the Jacobian matrix and update the `MatMFFD` coloring information.\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `J`  - Jacobian matrix (not altered in this routine)\n- `B`  - newly computed Jacobian matrix to use with preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `MatFDColoring`, `TSComputeIJacobianDefaultColor()`, `MatEliminateZeros()`, `MatFDColoringCreate()`, `MatFDColoringSetFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSPruneIJacobianColor\"))\n\"\"\"\nfunction TSPruneIJacobianColor(petsclib::PetscLibType, ts::TS, J::PetscMat, B::PetscMat) end\n\n@for_petsc function TSPruneIJacobianColor(petsclib::$UnionPetscLib, ts::TS, J::PetscMat, B::PetscMat )\n\n    @chk ccall(\n               (:TSPruneIJacobianColor, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat, CMat),\n               ts, J, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetType(petsclib::PetscLibType,ts::TS, type::TSType) \nSets the algorithm/method to be used for integrating the ODE with the given `TS`.\n\nCollective\n\nInput Parameters:\n- `ts`   - The `TS` context\n- `type` - A known method\n\nOptions Database Key:\n- `-ts_type <type>` - Sets the method; use -help for a list of available methods (for instance, euler)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSCreate()`, `TSSetFromOptions()`, `TSDestroy()`, `TSType`\n\n# External Links\n$(_doc_external(\"Ts/TSSetType\"))\n\"\"\"\nfunction TSSetType(petsclib::PetscLibType, ts::TS, type::TSType) end\n\n@for_petsc function TSSetType(petsclib::$UnionPetscLib, ts::TS, type::TSType )\n\n    @chk ccall(\n               (:TSSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSType),\n               ts, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TSType = TSGetType(petsclib::PetscLibType,ts::TS) \nGets the `TS` method type (as a string) that is being used to solve the ODE with the given `TS`\n\nNot Collective\n\nInput Parameter:\n- `ts` - The `TS`\n\nOutput Parameter:\n- `type` - The `TSType`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSType`, `TSSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetType\"))\n\"\"\"\nfunction TSGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetType(petsclib::$UnionPetscLib, ts::TS )\n\ttype_ = Ref{TSType}()\n\n    @chk ccall(\n               (:TSGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSType}),\n               ts, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTSRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a creation method to the `TS` package.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine itself\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSetType()`, `TSType`, `TSRegisterAll()`, `TSRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSRegister\"))\n\"\"\"\nfunction TSRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function TSRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:TSRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the PETSc interface to `TS`. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `PetscFinalize()`, `TSInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSFinalizePackage\"))\n\"\"\"\nfunction TSFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TS` package. It is called\nfrom `PetscDLLibraryRegister_petscts()` when using dynamic libraries, and on the first call to `TSCreate()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `PetscInitialize()`, `TSFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSInitializePackage\"))\n\"\"\"\nfunction TSInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitor(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec) \nRuns all user\n\nCollective\n\nInput Parameters:\n- `ts`    - time stepping context obtained from `TSCreate()`\n- `step`  - step number that has just completed\n- `ptime` - model time of the state\n- `u`     - state at the current model time\n\nLevel: developer\n\n-seealso: `TS`, `TSMonitorSet()`, `TSMonitorSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitor\"))\n\"\"\"\nfunction TSMonitor(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec) end\n\n@for_petsc function TSMonitor(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec )\n\n    @chk ccall(\n               (:TSMonitor, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec),\n               ts, step, ptime, u,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorSetFromOptions(petsclib::PetscLibType,ts::TS, name::String, help::String, manual::String, monitor::external, monitorsetup::external) \nSets a monitor function and viewer appropriate for the type indicated by the user\n\nCollective\n\nInput Parameters:\n- `ts`           - `TS` object you wish to monitor\n- `name`         - the monitor type one is seeking\n- `help`         - message indicating what monitoring is done\n- `manual`       - manual page for the monitor\n- `monitor`      - the monitor function, this must use a `PetscViewerFormat` as its context\n- `monitorsetup` - a function that is called once ONLY if the user selected this monitor that may set additional features of the `TS` or `PetscViewer` objects\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `PetscOptionsCreateViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSetFromOptions\"))\n\"\"\"\nfunction TSMonitorSetFromOptions(petsclib::PetscLibType, ts::TS, name::String, help::String, manual::String, monitor::external, monitorsetup::external) end\n\n@for_petsc function TSMonitorSetFromOptions(petsclib::$UnionPetscLib, ts::TS, name::String, help::String, manual::String, monitor::external, monitorsetup::external )\n\n    @chk ccall(\n               (:TSMonitorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, external, external),\n               ts, name, help, manual, monitor, monitorsetup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorSet(petsclib::PetscLibType,ts::TS, monitor::external, mctx::Cvoid, mdestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function that is to be used at every\ntimestep to display the iteration's  progress.\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - the `TS` context obtained from `TSCreate()`\n- `monitor`  - monitoring routine\n- `mctx`     - [optional] user-defined context for private data for the monitor routine (use `NULL` if no context is desired)\n- `mdestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence\n\nCalling sequence of `monitor`:\n- `ts`    - the `TS` context\n- `steps` - iteration number (after the final time step the monitor routine may be called with a step of -1, this indicates the solution has been interpolated to this time)\n- `time`  - current time\n- `u`     - current iterate\n- `ctx`   - [optional] monitoring context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorDefault()`, `TSMonitorCancel()`, `TSDMSwarmMonitorMoments()`, `TSMonitorExtreme()`, `TSMonitorDrawSolution()`,\n`TSMonitorDrawSolutionPhase()`, `TSMonitorDrawSolutionFunction()`, `TSMonitorDrawError()`, `TSMonitorSolution()`, `TSMonitorSolutionVTK()`,\n`TSMonitorLGSolution()`, `TSMonitorLGError()`, `TSMonitorSPSwarmSolution()`, `TSMonitorError()`, `TSMonitorEnvelope()`,  `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSet\"))\n\"\"\"\nfunction TSMonitorSet(petsclib::PetscLibType, ts::TS, monitor::external, mctx::Cvoid, mdestroy::PetscCtxDestroyFn) end\n\n@for_petsc function TSMonitorSet(petsclib::$UnionPetscLib, ts::TS, monitor::external, mctx::Cvoid, mdestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:TSMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (CTS, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ts, monitor, mctx, mdestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorCancel(petsclib::PetscLibType,ts::TS) \nClears all the monitors that have been set on a time\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorDefault()`, `TSMonitorSet()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorCancel\"))\n\"\"\"\nfunction TSMonitorCancel(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSMonitorCancel(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorDefault(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, vf::PetscViewerAndFormat) \nThe default monitor, prints the timestep and time for each step\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - iteration number (after the final time step the monitor routine may be called with a step of -1, this indicates the solution has been interpolated to this time)\n- `ptime` - current time\n- `v`     - current iterate\n- `vf`    - the viewer and format\n\nOptions Database Key:\n- `-ts_monitor` - monitors the time integration\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSet()`, `TSDMSwarmMonitorMoments()`, `TSMonitorWallClockTime()`, `TSMonitorExtreme()`, `TSMonitorDrawSolution()`,\n`TSMonitorDrawSolutionPhase()`, `TSMonitorDrawSolutionFunction()`, `TSMonitorDrawError()`, `TSMonitorSolution()`, `TSMonitorSolutionVTK()`,\n`TSMonitorLGSolution()`, `TSMonitorLGError()`, `TSMonitorSPSwarmSolution()`, `TSMonitorError()`, `TSMonitorEnvelope()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDefault\"))\n\"\"\"\nfunction TSMonitorDefault(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSMonitorDefault(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, v::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSMonitorDefault, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{PetscViewerAndFormat}),\n               ts, step, ptime, v, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorWallClockTimeSetUp(petsclib::PetscLibType,ts::TS, vf::PetscViewerAndFormat) \nSetup routine passed to `TSMonitorSetFromOptions()` when using `\n\nInput Parameters:\n- `ts` - the `TS` context\n- `vf` - the viewer and format\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSet()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorWallClockTimeSetUp\"))\n\"\"\"\nfunction TSMonitorWallClockTimeSetUp(petsclib::PetscLibType, ts::TS, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSMonitorWallClockTimeSetUp(petsclib::$UnionPetscLib, ts::TS, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSMonitorWallClockTimeSetUp, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscViewerAndFormat}),\n               ts, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorWallClockTime(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, vf::PetscViewerAndFormat) \nMonitor wall\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - iteration number (after the final time step the monitor routine may be called with a step of -1, this indicates the solution has been interpolated to this time)\n- `ptime` - current time\n- `v`     - current solution\n- `vf`    - the viewer and format\n\nOptions Database Key:\n- `-ts_monitor_wall_clock_time` - Monitor wall-clock time, KSP iterations, and SNES iterations per step.\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSet()`, `TSMonitorDefault()`, `TSMonitorExtreme()`, `TSMonitorDrawSolution()`,\n`TSMonitorDrawSolutionPhase()`, `TSMonitorDrawSolutionFunction()`, `TSMonitorDrawError()`, `TSMonitorSolution()`, `TSMonitorSolutionVTK()`,\n`TSMonitorLGSolution()`, `TSMonitorLGError()`, `TSMonitorSPSwarmSolution()`, `TSMonitorError()`, `TSMonitorEnvelope()`, `TSDMSwarmMonitorMoments()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorWallClockTime\"))\n\"\"\"\nfunction TSMonitorWallClockTime(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSMonitorWallClockTime(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, v::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSMonitorWallClockTime, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{PetscViewerAndFormat}),\n               ts, step, ptime, v, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorExtreme(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, vf::PetscViewerAndFormat) \nPrints the extreme values of the solution at each timestep\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - iteration number (after the final time step the monitor routine may be called with a step of -1, this indicates the solution has been interpolated to this time)\n- `ptime` - current time\n- `v`     - current iterate\n- `vf`    - the viewer and format\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorExtreme\"))\n\"\"\"\nfunction TSMonitorExtreme(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSMonitorExtreme(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, v::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSMonitorExtreme, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{PetscViewerAndFormat}),\n               ts, step, ptime, v, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGTimeStep(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) \nMonitors a `TS` by printing the time\n\nCollective\n\nInput Parameters:\n- `ts`     - the time integrator\n- `step`   - the current time step\n- `ptime`  - the current time\n- `v`      - the current state\n- `monctx` - the monitor context obtained with `TSMonitorLGCtxCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSMonitorLGCtxCreate()`, `TSMonitorSet()`, `TSMonitorLGCtxDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGTimeStep\"))\n\"\"\"\nfunction TSMonitorLGTimeStep(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) end\n\n@for_petsc function TSMonitorLGTimeStep(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, v::PetscVec, monctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, v, monctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorDrawSolution(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) \nMonitors progress of the `TS` solvers by calling\n`VecView()` for the solution at each timestep\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - the solution at the current time\n- `dummy` - either a viewer or `NULL`\n\nOptions Database Keys:\n- `-ts_monitor_draw_solution`         - draw the solution at each time-step\n- `-ts_monitor_draw_solution_initial` - show initial solution as well as current solution\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorDrawCtxCreate()`, `TSMonitorDrawCtxDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDrawSolution\"))\n\"\"\"\nfunction TSMonitorDrawSolution(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) end\n\n@for_petsc function TSMonitorDrawSolution(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dummy::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorDrawSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorDrawSolutionPhase(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) \nMonitors progress of the `TS` solvers by plotting the solution as a phase diagram\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - the solution at the current time\n- `dummy` - either a viewer or `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDrawSolutionPhase\"))\n\"\"\"\nfunction TSMonitorDrawSolutionPhase(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) end\n\n@for_petsc function TSMonitorDrawSolutionPhase(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dummy::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorDrawSolutionPhase, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorDrawSolutionFunction(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) \nMonitors progress of the `TS` solvers by calling\n`VecView()` for the solution provided by `TSSetSolutionFunction()` at each timestep\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - solution at current time\n- `dummy` - either a viewer or `NULL`\n\nOptions Database Key:\n- `-ts_monitor_draw_solution_function` - Monitor error graphically, requires user to have provided `TSSetSolutionFunction()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSSetSolutionFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDrawSolutionFunction\"))\n\"\"\"\nfunction TSMonitorDrawSolutionFunction(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) end\n\n@for_petsc function TSMonitorDrawSolutionFunction(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dummy::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorDrawSolutionFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorDrawError(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) \nMonitors progress of the `TS` solvers by calling\n`VecView()` for the error at each timestep\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - solution at current time\n- `dummy` - either a viewer or `NULL`\n\nOptions Database Key:\n- `-ts_monitor_draw_error` - Monitor error graphically, requires user to have provided `TSSetSolutionFunction()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSSetSolutionFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDrawError\"))\n\"\"\"\nfunction TSMonitorDrawError(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) end\n\n@for_petsc function TSMonitorDrawError(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dummy::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorDrawError, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorSolutionSetup(petsclib::PetscLibType,ts::TS, vf::PetscViewerAndFormat) \nSetups the context for `TSMonitorSolution()`\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context\n- `vf` - viewer and its format\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSolution()`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSolutionSetup\"))\n\"\"\"\nfunction TSMonitorSolutionSetup(petsclib::PetscLibType, ts::TS, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSMonitorSolutionSetup(petsclib::$UnionPetscLib, ts::TS, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSMonitorSolutionSetup, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscViewerAndFormat}),\n               ts, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorSolution(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, vf::PetscViewerAndFormat) \nMonitors progress of the `TS` solvers by `VecView()` for the solution at each timestep. Normally the viewer is a binary file or a `PetscDraw` object\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current state\n- `vf`    - viewer and its format\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorSolutionSetup()`,\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSolution\"))\n\"\"\"\nfunction TSMonitorSolution(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSMonitorSolution(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSMonitorSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{PetscViewerAndFormat}),\n               ts, step, ptime, u, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorSolutionVTK(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, ctx::TSMonitorVTKCtx) \nMonitors progress of the `TS` solvers by `VecView()` for the solution at selected timesteps.\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current state\n- `ctx`   - monitor context obtained with `TSMonitorSolutionVTKCtxCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSolutionVTK\"))\n\"\"\"\nfunction TSMonitorSolutionVTK(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, ctx::TSMonitorVTKCtx) end\n\n@for_petsc function TSMonitorSolutionVTK(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, ctx::TSMonitorVTKCtx )\n\n    @chk ccall(\n               (:TSMonitorSolutionVTK, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, TSMonitorVTKCtx),\n               ts, step, ptime, u, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorSolutionVTKDestroy(petsclib::PetscLibType,ctx::TSMonitorVTKCtx) \nDestroy the monitor context created with `TSMonitorSolutionVTKCtxCreate()`\n\nNot Collective\n\nInput Parameter:\n- `ctx` - the monitor context\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSMonitorSet()`, `TSMonitorSolutionVTK()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSolutionVTKDestroy\"))\n\"\"\"\nfunction TSMonitorSolutionVTKDestroy(petsclib::PetscLibType, ctx::TSMonitorVTKCtx) end\n\n@for_petsc function TSMonitorSolutionVTKDestroy(petsclib::$UnionPetscLib, ctx::TSMonitorVTKCtx )\n\n    @chk ccall(\n               (:TSMonitorSolutionVTKDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorVTKCtx},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::TSMonitorVTKCtx = TSMonitorSolutionVTKCtxCreate(petsclib::PetscLibType,filenametemplate::String) \nCreate the monitor context to be used in `TSMonitorSolutionVTK()`\n\nNot collective\n\nInput Parameter:\n- `filenametemplate` - the template file name, e.g. foo-%03d.vts\n\nOutput Parameter:\n- `ctx` - the monitor context\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSMonitorSet()`, `TSMonitorSolutionVTK()`, `TSMonitorSolutionVTKDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSolutionVTKCtxCreate\"))\n\"\"\"\nfunction TSMonitorSolutionVTKCtxCreate(petsclib::PetscLibType, filenametemplate::String) end\n\n@for_petsc function TSMonitorSolutionVTKCtxCreate(petsclib::$UnionPetscLib, filenametemplate::String )\n\tctx_ = Ref{TSMonitorVTKCtx}()\n\n    @chk ccall(\n               (:TSMonitorSolutionVTKCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{TSMonitorVTKCtx}),\n               filenametemplate, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTSMonitorLGSolution(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) \nMonitors progress of the `TS` solvers by plotting each component of the solution vector\nin a time based line graph\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current solution\n- `dctx`  - the `TSMonitorLGCtx` object that contains all the options for the monitoring, this is created with `TSMonitorLGCtxCreate()`\n\nOptions Database Key:\n- `-ts_monitor_lg_solution_variables` - enable monitor of lg solution variables\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGCtxCreate()`, `TSMonitorLGCtxSetVariableNames()`, `TSMonitorLGCtxGetVariableNames()`,\n`TSMonitorLGSetVariableNames()`, `TSMonitorLGGetVariableNames()`, `TSMonitorLGSetDisplayVariables()`, `TSMonitorLGCtxSetDisplayVariables()`,\n`TSMonitorLGCtxSetTransform()`, `TSMonitorLGSetTransform()`, `TSMonitorLGError()`, `TSMonitorLGSNESIterations()`, `TSMonitorLGKSPIterations()`,\n`TSMonitorEnvelopeCtxCreate()`, `TSMonitorEnvelopeGetBounds()`, `TSMonitorEnvelopeCtxDestroy()`, `TSMonitorEnvelop()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGSolution\"))\n\"\"\"\nfunction TSMonitorLGSolution(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) end\n\n@for_petsc function TSMonitorLGSolution(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGSetVariableNames(petsclib::PetscLibType,ts::TS, names::Cchar) \nSets the name of each component in the solution vector so that it may be displayed in the plot\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `names` - the names of the components, final string must be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetDisplayVariables()`, `TSMonitorLGCtxSetVariableNames()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGSetVariableNames\"))\n\"\"\"\nfunction TSMonitorLGSetVariableNames(petsclib::PetscLibType, ts::TS, names::Cchar) end\n\n@for_petsc function TSMonitorLGSetVariableNames(petsclib::$UnionPetscLib, ts::TS, names::Cchar )\n\n    @chk ccall(\n               (:TSMonitorLGSetVariableNames, $petsc_library),\n               PetscErrorCode,\n               (CTS, Cchar),\n               ts, names,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGGetVariableNames(petsclib::PetscLibType,ts::TS, names::Cchar) \nGets the name of each component in the solution vector so that it may be displayed in the plot\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `names` - the names of the components, final string must be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetDisplayVariables()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGGetVariableNames\"))\n\"\"\"\nfunction TSMonitorLGGetVariableNames(petsclib::PetscLibType, ts::TS, names::Cchar) end\n\n@for_petsc function TSMonitorLGGetVariableNames(petsclib::$UnionPetscLib, ts::TS, names::Cchar )\n\n    @chk ccall(\n               (:TSMonitorLGGetVariableNames, $petsc_library),\n               PetscErrorCode,\n               (CTS, Cchar),\n               ts, names,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGSetDisplayVariables(petsclib::PetscLibType,ts::TS, displaynames::Cchar) \nSets the variables that are to be display in the monitor\n\nCollective\n\nInput Parameters:\n- `ts`           - the `TS` context\n- `displaynames` - the names of the components, final string must be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetVariableNames()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGSetDisplayVariables\"))\n\"\"\"\nfunction TSMonitorLGSetDisplayVariables(petsclib::PetscLibType, ts::TS, displaynames::Cchar) end\n\n@for_petsc function TSMonitorLGSetDisplayVariables(petsclib::$UnionPetscLib, ts::TS, displaynames::Cchar )\n\n    @chk ccall(\n               (:TSMonitorLGSetDisplayVariables, $petsc_library),\n               PetscErrorCode,\n               (CTS, Cchar),\n               ts, displaynames,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGSetTransform(petsclib::PetscLibType,ts::TS, transform::external, destroy::PetscCtxDestroyFn, tctx::Cvoid) \nSolution vector will be transformed by provided function before being displayed\n\nCollective\n\nInput Parameters:\n- `ts`        - the `TS` context\n- `transform` - the transform function\n- `destroy`   - function to destroy the optional context, see `PetscCtxDestroyFn` for its calling sequence\n- `tctx`      - optional context used by transform function\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetVariableNames()`, `TSMonitorLGCtxSetTransform()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGSetTransform\"))\n\"\"\"\nfunction TSMonitorLGSetTransform(petsclib::PetscLibType, ts::TS, transform::external, destroy::PetscCtxDestroyFn, tctx::Cvoid) end\n\n@for_petsc function TSMonitorLGSetTransform(petsclib::$UnionPetscLib, ts::TS, transform::external, destroy::PetscCtxDestroyFn, tctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGSetTransform, $petsc_library),\n               PetscErrorCode,\n               (CTS, external, Ptr{PetscCtxDestroyFn}, Ptr{Cvoid}),\n               ts, transform, destroy, tctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGError(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) \nMonitors progress of the `TS` solvers by plotting each component of the error\nin a time based line graph\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current solution\n- `dummy` - `TSMonitorLGCtx` object created with `TSMonitorLGCtxCreate()`\n\nOptions Database Key:\n- `-ts_monitor_lg_error` - create a graphical monitor of error history\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSSetSolutionFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGError\"))\n\"\"\"\nfunction TSMonitorLGError(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dummy::Cvoid) end\n\n@for_petsc function TSMonitorLGError(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dummy::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGError, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorSPSwarmSolution(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) \nGraphically displays phase plots of `DMSWARM` particles on a scatter plot\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current solution\n- `dctx`  - the `TSMonitorSPCtx` object that contains all the options for the monitoring, this is created with `TSMonitorSPCtxCreate()`\n\nOptions Database Keys:\n- `-ts_monitor_sp_swarm <n>`                  - Monitor the solution every n steps, or -1 for plotting only the final solution\n- `-ts_monitor_sp_swarm_retain <n>`           - Retain n old points so we can see the history, or -1 for all points\n- `-ts_monitor_sp_swarm_multi_species <bool>` - Color each species differently\n- `-ts_monitor_sp_swarm_phase <bool>`         - Plot in phase space, as opposed to coordinate space\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `DMSWARM`, `TSMonitorSPCtxCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSPSwarmSolution\"))\n\"\"\"\nfunction TSMonitorSPSwarmSolution(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) end\n\n@for_petsc function TSMonitorSPSwarmSolution(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorSPSwarmSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorHGSwarmSolution(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) \nGraphically displays histograms of `DMSWARM` particles\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current solution\n- `dctx`  - the `TSMonitorSPCtx` object that contains all the options for the monitoring, this is created with `TSMonitorHGCtxCreate()`\n\nOptions Database Keys:\n- `-ts_monitor_hg_swarm <n>`             - Monitor the solution every n steps, or -1 for plotting only the final solution\n- `-ts_monitor_hg_swarm_species <num>`   - Number of species to histogram\n- `-ts_monitor_hg_swarm_bins <num>`      - Number of histogram bins\n- `-ts_monitor_hg_swarm_velocity <bool>` - Plot in velocity space, as opposed to coordinate space\n\nLevel: intermediate\n\n-seealso: `TSMonitorSet()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorHGSwarmSolution\"))\n\"\"\"\nfunction TSMonitorHGSwarmSolution(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) end\n\n@for_petsc function TSMonitorHGSwarmSolution(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorHGSwarmSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorError(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, vf::PetscViewerAndFormat) \nMonitors progress of the `TS` solvers by printing the 2 norm of the error at each timestep\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current solution\n- `vf`    - unused context\n\nOptions Database Key:\n- `-ts_monitor_error` - create a graphical monitor of error history\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSSetSolutionFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorError\"))\n\"\"\"\nfunction TSMonitorError(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSMonitorError(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSMonitorError, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{PetscViewerAndFormat}),\n               ts, step, ptime, u, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGSNESIterations(petsclib::PetscLibType,ts::TS, n::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGSNESIterations\"))\n\"\"\"\nfunction TSMonitorLGSNESIterations(petsclib::PetscLibType, ts::TS, n::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) end\n\n@for_petsc function TSMonitorLGSNESIterations(petsclib::$UnionPetscLib, ts::TS, n::$PetscInt, ptime::$PetscReal, v::PetscVec, monctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGSNESIterations, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, n, ptime, v, monctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGKSPIterations(petsclib::PetscLibType,ts::TS, n::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGKSPIterations\"))\n\"\"\"\nfunction TSMonitorLGKSPIterations(petsclib::PetscLibType, ts::TS, n::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) end\n\n@for_petsc function TSMonitorLGKSPIterations(petsclib::$UnionPetscLib, ts::TS, n::$PetscInt, ptime::$PetscReal, v::PetscVec, monctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGKSPIterations, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, n, ptime, v, monctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorEnvelope(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) \nMonitors the maximum and minimum value of each component of the solution\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current solution\n- `dctx`  - the envelope context\n\nOptions Database Key:\n- `-ts_monitor_envelope` - determine maximum and minimum value of each component of the solution over the solution time\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorEnvelopeGetBounds()`, `TSMonitorEnvelopeCtxCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorEnvelope\"))\n\"\"\"\nfunction TSMonitorEnvelope(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) end\n\n@for_petsc function TSMonitorEnvelope(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorEnvelope, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorEnvelopeGetBounds(petsclib::PetscLibType,ts::TS, max::PetscVec, min::PetscVec) \nGets the bounds for the components of the solution\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameters:\n- `max` - the maximum values\n- `min` - the minimum values\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorEnvelopeCtx`, `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetDisplayVariables()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorEnvelopeGetBounds\"))\n\"\"\"\nfunction TSMonitorEnvelopeGetBounds(petsclib::PetscLibType, ts::TS, max::PetscVec, min::PetscVec) end\n\n@for_petsc function TSMonitorEnvelopeGetBounds(petsclib::$UnionPetscLib, ts::TS, max::PetscVec, min::PetscVec )\n\tmax_ = Ref(max.ptr)\n\tmin_ = Ref(min.ptr)\n\n    @chk ccall(\n               (:TSMonitorEnvelopeGetBounds, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}, Ptr{CVec}),\n               ts, max_, min_,\n              )\n\n\tmax.ptr = C_NULL\n\tmin.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSDMSwarmMonitorMoments(petsclib::PetscLibType,ts::TS, step::PetscInt, t::PetscReal, U::PetscVec, vf::PetscViewerAndFormat) \nMonitors the first three moments of a `DMSWARM` being evolved by the `TS`\n\nNot Collective\n\nInput Parameters:\n- `ts`   - the `TS` context\n- `step` - current timestep\n- `t`    - current time\n- `U`    - current solution\n- `vf`   - not used\n\nOptions Database Key:\n- `-ts_dmswarm_monitor_moments`          - Monitor moments of particle distribution\n- `-ts_dmswarm_monitor_moments_interval` - Interval of timesteps between monitor outputs\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `DMSWARM`\n\n# External Links\n$(_doc_external(\"Ts/TSDMSwarmMonitorMoments\"))\n\"\"\"\nfunction TSDMSwarmMonitorMoments(petsclib::PetscLibType, ts::TS, step::PetscInt, t::PetscReal, U::PetscVec, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSDMSwarmMonitorMoments(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, t::$PetscReal, U::PetscVec, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSDMSwarmMonitorMoments, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{PetscViewerAndFormat}),\n               ts, step, t, U, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tts::TS = TSCreate(petsclib::PetscLibType,comm::MPI_Comm) \nThis function creates an empty timestepper. The problem type can then be set with `TSSetProblemType()` and the\ntype of solver can then be set with `TSSetType()`.\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator\n\nOutput Parameter:\n- `ts` - The `TS`\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSSetType()`, `TSSetUp()`, `TSDestroy()`, `TSSetProblemType()`\n\n# External Links\n$(_doc_external(\"Ts/TSCreate\"))\n\"\"\"\nfunction TSCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function TSCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tts_ = Ref{CTS}()\n\n    @chk ccall(\n               (:TSCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CTS}),\n               comm, ts_,\n              )\n\n\tts = TS(ts_[], petsclib)\n\n\treturn ts\nend \n\n\"\"\"\n\tTSMonitorSPEig(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSPEig\"))\n\"\"\"\nfunction TSMonitorSPEig(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, v::PetscVec, monctx::Cvoid) end\n\n@for_petsc function TSMonitorSPEig(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, v::PetscVec, monctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorSPEig, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, v, monctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSSplitSetIS(petsclib::PetscLibType,ts::TS, splitname::String, is::IS) \nSet the index set for the specified split\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the `TS` context obtained from `TSCreate()`\n- `splitname` - name of this split, if `NULL` the number of the split is used\n- `is`        - the index set for part of the solution vector\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `IS`, `TSRHSSplitGetIS()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitSetIS\"))\n\"\"\"\nfunction TSRHSSplitSetIS(petsclib::PetscLibType, ts::TS, splitname::String, is::IS) end\n\n@for_petsc function TSRHSSplitSetIS(petsclib::$UnionPetscLib, ts::TS, splitname::String, is::IS )\n\n    @chk ccall(\n               (:TSRHSSplitSetIS, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, CIS),\n               ts, splitname, is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSSplitGetIS(petsclib::PetscLibType,ts::TS, splitname::String, is::IS) \nRetrieves the elements for a split as an `IS`\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the `TS` context obtained from `TSCreate()`\n- `splitname` - name of this split\n\nOutput Parameter:\n- `is` - the index set for part of the solution vector\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `IS`, `TSRHSSplitSetIS()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitGetIS\"))\n\"\"\"\nfunction TSRHSSplitGetIS(petsclib::PetscLibType, ts::TS, splitname::String, is::IS) end\n\n@for_petsc function TSRHSSplitGetIS(petsclib::$UnionPetscLib, ts::TS, splitname::String, is::IS )\n\tis_ = Ref(is.ptr)\n\n    @chk ccall(\n               (:TSRHSSplitGetIS, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, Ptr{CIS}),\n               ts, splitname, is_,\n              )\n\n\tis.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSSplitSetRHSFunction(petsclib::PetscLibType,ts::TS, splitname::String, r::PetscVec, rhsfunc::TSRHSFunctionFn, ctx::Cvoid) \nSet the split right\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the `TS` context obtained from `TSCreate()`\n- `splitname` - name of this split\n- `r`         - vector to hold the residual (or `NULL` to have it created internally)\n- `rhsfunc`   - the RHS function evaluation routine\n- `ctx`       - user-defined context for private data for the split function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSRHSFunctionFn`, `IS`, `TSRHSSplitSetIS()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitSetRHSFunction\"))\n\"\"\"\nfunction TSRHSSplitSetRHSFunction(petsclib::PetscLibType, ts::TS, splitname::String, r::PetscVec, rhsfunc::TSRHSFunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSRHSSplitSetRHSFunction(petsclib::$UnionPetscLib, ts::TS, splitname::String, r::PetscVec, rhsfunc::TSRHSFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSRHSSplitSetRHSFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, CVec, Ptr{TSRHSFunctionFn}, Ptr{Cvoid}),\n               ts, splitname, r, rhsfunc, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSSplitSetIFunction(petsclib::PetscLibType,ts::TS, splitname::String, r::PetscVec, ifunc::TSIFunctionFn, ctx::Cvoid) \nSet the split implicit function for `TSARKIMEX`\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the `TS` context obtained from `TSCreate()`\n- `splitname` - name of this split\n- `r`         - vector to hold the residual (or `NULL` to have it created internally)\n- `ifunc`     - the implicit function evaluation routine\n- `ctx`       - user-defined context for private data for the split function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSIFunctionFn`, `IS`, `TSRHSSplitSetIS()`, `TSARKIMEX`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitSetIFunction\"))\n\"\"\"\nfunction TSRHSSplitSetIFunction(petsclib::PetscLibType, ts::TS, splitname::String, r::PetscVec, ifunc::TSIFunctionFn, ctx::Cvoid) end\n\n@for_petsc function TSRHSSplitSetIFunction(petsclib::$UnionPetscLib, ts::TS, splitname::String, r::PetscVec, ifunc::TSIFunctionFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSRHSSplitSetIFunction, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, CVec, Ptr{TSIFunctionFn}, Ptr{Cvoid}),\n               ts, splitname, r, ifunc, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSSplitSetIJacobian(petsclib::PetscLibType,ts::TS, splitname::String, Amat::PetscMat, Pmat::PetscMat, ijac::TSIJacobianFn, ctx::Cvoid) \nSet the Jacobian for the split implicit function with `TSARKIMEX`\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the `TS` context obtained from `TSCreate()`\n- `splitname` - name of this split\n- `Amat`      - (approximate) matrix to store Jacobian entries computed by `f`\n- `Pmat`      - matrix used to compute preconditioner (usually the same as `Amat`)\n- `ijac`      - the Jacobian evaluation routine\n- `ctx`       - user-defined context for private data for the split function evaluation routine (may be `NULL`)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSRHSSplitSetIFunction`, `TSIJacobianFn`, `IS`, `TSRHSSplitSetIS()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitSetIJacobian\"))\n\"\"\"\nfunction TSRHSSplitSetIJacobian(petsclib::PetscLibType, ts::TS, splitname::String, Amat::PetscMat, Pmat::PetscMat, ijac::TSIJacobianFn, ctx::Cvoid) end\n\n@for_petsc function TSRHSSplitSetIJacobian(petsclib::$UnionPetscLib, ts::TS, splitname::String, Amat::PetscMat, Pmat::PetscMat, ijac::TSIJacobianFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSRHSSplitSetIJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, CMat, CMat, Ptr{TSIJacobianFn}, Ptr{Cvoid}),\n               ts, splitname, Amat, Pmat, ijac, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSSplitGetSubTS(petsclib::PetscLibType,ts::TS, splitname::String, subts::TS) \nGet the sub\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `splitname` - the number of the split\n- `subts`     - the sub-`TS`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `IS`, `TSGetRHSSplitFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitGetSubTS\"))\n\"\"\"\nfunction TSRHSSplitGetSubTS(petsclib::PetscLibType, ts::TS, splitname::String, subts::TS) end\n\n@for_petsc function TSRHSSplitGetSubTS(petsclib::$UnionPetscLib, ts::TS, splitname::String, subts::TS )\n\tsubts_ = Ref(subts.ptr)\n\n    @chk ccall(\n               (:TSRHSSplitGetSubTS, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, Ptr{CTS}),\n               ts, splitname, subts_,\n              )\n\n\tsubts.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt = TSRHSSplitGetSubTSs(petsclib::PetscLibType,ts::TS, subts::Vector{TS}) \nGet an array of all sub\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `n`     - the number of splits\n- `subts` - the array of `TS` contexts\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `IS`, `TSGetRHSSplitFunction()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitGetSubTSs\"))\n\"\"\"\nfunction TSRHSSplitGetSubTSs(petsclib::PetscLibType, ts::TS, subts::Vector{TS}) end\n\n@for_petsc function TSRHSSplitGetSubTSs(petsclib::$UnionPetscLib, ts::TS, subts::Vector{TS} )\n\tn_ = Ref{$PetscInt}()\n\tsubts_ = Ref(pointer(subts))\n\n    @chk ccall(\n               (:TSRHSSplitGetSubTSs, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, Ptr{Ptr{CTS}}),\n               ts, n_, subts_,\n              )\n\n\tn = n_[]\n\n\treturn n\nend \n\n\"\"\"\n\tTSRHSSplitGetSNES(petsclib::PetscLibType,ts::TS, snes::PetscSNES) \nReturns the `SNES` (nonlinear solver) associated with\na `TS` (timestepper) context when RHS splits are used.\n\nNot Collective, but snes is parallel if ts is parallel\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `snes` - the nonlinear solver context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSCreate()`, `TSRHSSplitSetSNES()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitGetSNES\"))\n\"\"\"\nfunction TSRHSSplitGetSNES(petsclib::PetscLibType, ts::TS, snes::PetscSNES) end\n\n@for_petsc function TSRHSSplitGetSNES(petsclib::$UnionPetscLib, ts::TS, snes::PetscSNES )\n\tsnes_ = Ref(snes.ptr)\n\n    @chk ccall(\n               (:TSRHSSplitGetSNES, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CSNES}),\n               ts, snes_,\n              )\n\n\tsnes.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRHSSplitSetSNES(petsclib::PetscLibType,ts::TS, snes::PetscSNES) \nSet the `SNES` (nonlinear solver) to be used by the\ntimestepping context when RHS splits are used.\n\nCollective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `snes` - the nonlinear solver context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `SNES`, `TSCreate()`, `TSRHSSplitGetSNES()`\n\n# External Links\n$(_doc_external(\"Ts/TSRHSSplitSetSNES\"))\n\"\"\"\nfunction TSRHSSplitSetSNES(petsclib::PetscLibType, ts::TS, snes::PetscSNES) end\n\n@for_petsc function TSRHSSplitSetSNES(petsclib::$UnionPetscLib, ts::TS, snes::PetscSNES )\n\n    @chk ccall(\n               (:TSRHSSplitSetSNES, $petsc_library),\n               PetscErrorCode,\n               (CTS, CSNES),\n               ts, snes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetRHSJacobianP(petsclib::PetscLibType,ts::TS, Amat::PetscMat, func::TSRHSJacobianPFn, ctx::Cvoid) \nSets the function that computes the Jacobian of G w.r.t. the parameters p where U_t = G(U,p,t), as well as the location to store the matrix.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - `TS` context obtained from `TSCreate()`\n- `Amat` - JacobianP matrix\n- `func` - function\n- `ctx`  - [optional] user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSRHSJacobianPFn`, `TSGetRHSJacobianP()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetRHSJacobianP\"))\n\"\"\"\nfunction TSSetRHSJacobianP(petsclib::PetscLibType, ts::TS, Amat::PetscMat, func::TSRHSJacobianPFn, ctx::Cvoid) end\n\n@for_petsc function TSSetRHSJacobianP(petsclib::$UnionPetscLib, ts::TS, Amat::PetscMat, func::TSRHSJacobianPFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetRHSJacobianP, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat, Ptr{TSRHSJacobianPFn}, Ptr{Cvoid}),\n               ts, Amat, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetRHSJacobianP(petsclib::PetscLibType,ts::TS, Amat::PetscMat, func::TSRHSJacobianPFn, ctx::Cvoid) \nGets the function that computes the Jacobian of G  w.r.t. the parameters p where  U_t = G(U,p,t), as well as the location to store the matrix.\n\nLogically Collective\n\nInput Parameter:\n- `ts` - `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `Amat` - JacobianP matrix\n- `func` - function\n- `ctx`  - [optional] user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSSetRHSJacobianP()`, `TS`, `TSRHSJacobianPFn`\n\n# External Links\n$(_doc_external(\"Ts/TSGetRHSJacobianP\"))\n\"\"\"\nfunction TSGetRHSJacobianP(petsclib::PetscLibType, ts::TS, Amat::PetscMat, func::TSRHSJacobianPFn, ctx::Cvoid) end\n\n@for_petsc function TSGetRHSJacobianP(petsclib::$UnionPetscLib, ts::TS, Amat::PetscMat, func::TSRHSJacobianPFn, ctx::Cvoid )\n\tAmat_ = Ref(Amat.ptr)\n\n    @chk ccall(\n               (:TSGetRHSJacobianP, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CMat}, TSRHSJacobianPFn, Cvoid),\n               ts, Amat_, func, ctx,\n              )\n\n\tAmat.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSJacobianP(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Amat::PetscMat) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Jacobian\n\nOutput Parameter:\n- `Amat` - the computed Jacobian\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetRHSJacobianP()`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSJacobianP\"))\n\"\"\"\nfunction TSComputeRHSJacobianP(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Amat::PetscMat) end\n\n@for_petsc function TSComputeRHSJacobianP(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Amat::PetscMat )\n\n    @chk ccall(\n               (:TSComputeRHSJacobianP, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CMat),\n               ts, t, U, Amat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetIJacobianP(petsclib::PetscLibType,ts::TS, Amat::PetscMat, func::external, ctx::Cvoid) \nSets the function that computes the Jacobian of F w.r.t. the parameters p where F(Udot,U,p,t) = G(U,p,t), as well as the location to store the matrix.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - `TS` context obtained from `TSCreate()`\n- `Amat` - JacobianP matrix\n- `func` - function\n- `ctx`  - [optional] user-defined function context\n\nCalling sequence of `func`:\n- `ts`    - the `TS` context\n- `t`     - current timestep\n- `U`     - input vector (current ODE solution)\n- `Udot`  - time derivative of state vector\n- `shift` - shift to apply, see the note in `TSSetIJacobian()`\n- `A`     - output matrix\n- `ctx`   - [optional] user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSSetRHSJacobianP()`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSSetIJacobianP\"))\n\"\"\"\nfunction TSSetIJacobianP(petsclib::PetscLibType, ts::TS, Amat::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TSSetIJacobianP(petsclib::$UnionPetscLib, ts::TS, Amat::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetIJacobianP, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat, external, Ptr{Cvoid}),\n               ts, Amat, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIJacobianP(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, Amat::PetscMat, imex::PetscBool) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `t`     - current timestep\n- `U`     - state vector\n- `Udot`  - time derivative of state vector\n- `shift` - shift to apply, see note below\n- `imex`  - flag indicates if the method is IMEX so that the `RHSJacobianP` should be kept separate\n\nOutput Parameter:\n- `Amat` - Jacobian matrix\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetIJacobianP()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIJacobianP\"))\n\"\"\"\nfunction TSComputeIJacobianP(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Udot::PetscVec, shift::PetscReal, Amat::PetscMat, imex::PetscBool) end\n\n@for_petsc function TSComputeIJacobianP(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Udot::PetscVec, shift::$PetscReal, Amat::PetscMat, imex::PetscBool )\n\n    @chk ccall(\n               (:TSComputeIJacobianP, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec, $PetscReal, CMat, PetscBool),\n               ts, t, U, Udot, shift, Amat, imex,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGetCostIntegral(petsclib::PetscLibType,ts::TS, v::PetscVec) \nReturns the values of the integral term in the cost functions.\nIt is valid to call the routine after a backward run.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameter:\n- `v` - the vector containing the integrals for each cost function\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSAdjointSolve()`, `TSSetCostIntegrand()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetCostIntegral\"))\n\"\"\"\nfunction TSGetCostIntegral(petsclib::PetscLibType, ts::TS, v::PetscVec) end\n\n@for_petsc function TSGetCostIntegral(petsclib::$UnionPetscLib, ts::TS, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:TSGetCostIntegral, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}),\n               ts, v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeCostIntegrand(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Q::PetscVec) \nEvaluates the integral function in the cost functions.\n\nInput Parameters:\n- `ts` - the `TS` context\n- `t`  - current time\n- `U`  - state vector, i.e. current solution\n\nOutput Parameter:\n- `Q` - vector of size numcost to hold the outputs\n\nLevel: deprecated\n\n-seealso: [](ch_ts), `TS`, `TSAdjointSolve()`, `TSSetCostIntegrand()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeCostIntegrand\"))\n\"\"\"\nfunction TSComputeCostIntegrand(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Q::PetscVec) end\n\n@for_petsc function TSComputeCostIntegrand(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Q::PetscVec )\n\n    @chk ccall(\n               (:TSComputeCostIntegrand, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, CVec),\n               ts, t, U, Q,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetIHessianProduct(petsclib::PetscLibType,ts::TS, ihp1::PetscVec, ihessianproductfunc1::external, ihp2::PetscVec, ihessianproductfunc2::external, ihp3::PetscVec, ihessianproductfunc3::external, ihp4::PetscVec, ihessianproductfunc4::external, ctx::Cvoid) \nSets the function that computes the vector\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - `TS` context obtained from `TSCreate()`\n- `ihp1` - an array of vectors storing the result of vector-Hessian-vector product for F_UU\n- `hessianproductfunc1` - vector-Hessian-vector product function for F_UU\n- `ihp2` - an array of vectors storing the result of vector-Hessian-vector product for F_UP\n- `hessianproductfunc2` - vector-Hessian-vector product function for F_UP\n- `ihp3` - an array of vectors storing the result of vector-Hessian-vector product for F_PU\n- `hessianproductfunc3` - vector-Hessian-vector product function for F_PU\n- `ihp4` - an array of vectors storing the result of vector-Hessian-vector product for F_PP\n- `hessianproductfunc4` - vector-Hessian-vector product function for F_PP\n\nCalling sequence of `ihessianproductfunc1`:\n- `ts`  - the `TS` context\n- `t`   - current timestep\n- `U`   - input vector (current ODE solution)\n- `Vl`  - an array of input vectors to be left-multiplied with the Hessian\n- `Vr`  - input vector to be right-multiplied with the Hessian\n- `VHV` - an array of output vectors for vector-Hessian-vector product\n- `ctx` - [optional] user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSSetIHessianProduct\"))\n\"\"\"\nfunction TSSetIHessianProduct(petsclib::PetscLibType, ts::TS, ihp1::PetscVec, ihessianproductfunc1::external, ihp2::PetscVec, ihessianproductfunc2::external, ihp3::PetscVec, ihessianproductfunc3::external, ihp4::PetscVec, ihessianproductfunc4::external, ctx::Cvoid) end\n\n@for_petsc function TSSetIHessianProduct(petsclib::$UnionPetscLib, ts::TS, ihp1::PetscVec, ihessianproductfunc1::external, ihp2::PetscVec, ihessianproductfunc2::external, ihp3::PetscVec, ihessianproductfunc3::external, ihp4::PetscVec, ihessianproductfunc4::external, ctx::Cvoid )\n\tihp1_ = Ref(ihp1.ptr)\n\tihp2_ = Ref(ihp2.ptr)\n\tihp3_ = Ref(ihp3.ptr)\n\tihp4_ = Ref(ihp4.ptr)\n\n    @chk ccall(\n               (:TSSetIHessianProduct, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}, external, Ptr{CVec}, external, Ptr{CVec}, external, Ptr{CVec}, external, Ptr{Cvoid}),\n               ts, ihp1_, ihessianproductfunc1, ihp2_, ihessianproductfunc2, ihp3_, ihessianproductfunc3, ihp4_, ihessianproductfunc4, ctx,\n              )\n\n\tihp1.ptr = C_NULL\n\tihp2.ptr = C_NULL\n\tihp3.ptr = C_NULL\n\tihp4.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIHessianProductFunctionUU(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetIHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIHessianProductFunctionUU\"))\n\"\"\"\nfunction TSComputeIHessianProductFunctionUU(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeIHessianProductFunctionUU(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeIHessianProductFunctionUU, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIHessianProductFunctionUP(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetIHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIHessianProductFunctionUP\"))\n\"\"\"\nfunction TSComputeIHessianProductFunctionUP(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeIHessianProductFunctionUP(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeIHessianProductFunctionUP, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIHessianProductFunctionPU(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetIHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIHessianProductFunctionPU\"))\n\"\"\"\nfunction TSComputeIHessianProductFunctionPU(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeIHessianProductFunctionPU(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeIHessianProductFunctionPU, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeIHessianProductFunctionPP(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetIHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeIHessianProductFunctionPP\"))\n\"\"\"\nfunction TSComputeIHessianProductFunctionPP(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeIHessianProductFunctionPP(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeIHessianProductFunctionPP, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetRHSHessianProduct(petsclib::PetscLibType,ts::TS, rhshp1::Vector{PetscVec}, rhshessianproductfunc1::external, rhshp2::Vector{PetscVec}, rhshessianproductfunc2::external, rhshp3::Vector{PetscVec}, rhshessianproductfunc3::external, rhshp4::Vector{PetscVec}, rhshessianproductfunc4::external, ctx::Cvoid) \nSets the function that computes the vector\nproduct. The Hessian is the second-order derivative of G (RHSFunction) w.r.t. the state\nvariable.\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - `TS` context obtained from `TSCreate()`\n- `rhshp1` - an array of vectors storing the result of vector-Hessian-vector product for G_UU\n- `hessianproductfunc1` - vector-Hessian-vector product function for G_UU\n- `rhshp2` - an array of vectors storing the result of vector-Hessian-vector product for G_UP\n- `hessianproductfunc2` - vector-Hessian-vector product function for G_UP\n- `rhshp3` - an array of vectors storing the result of vector-Hessian-vector product for G_PU\n- `hessianproductfunc3` - vector-Hessian-vector product function for G_PU\n- `rhshp4` - an array of vectors storing the result of vector-Hessian-vector product for G_PP\n- `hessianproductfunc4` - vector-Hessian-vector product function for G_PP\n- `ctx`    - [optional] user-defined function context\n\nCalling sequence of `rhshessianproductfunc1`:\n- `ts`  - the `TS` context\n- `t`   - current timestep\n- `U`   - input vector (current ODE solution)\n- `Vl`  - an array of input vectors to be left-multiplied with the Hessian\n- `Vr`  - input vector to be right-multiplied with the Hessian\n- `VHV` - an array of output vectors for vector-Hessian-vector product\n- `ctx` - [optional] user-defined function context\n\nLevel: intermediate\n\n-seealso: `TS`, `TSAdjoint`\n\n# External Links\n$(_doc_external(\"Ts/TSSetRHSHessianProduct\"))\n\"\"\"\nfunction TSSetRHSHessianProduct(petsclib::PetscLibType, ts::TS, rhshp1::Vector{PetscVec}, rhshessianproductfunc1::external, rhshp2::Vector{PetscVec}, rhshessianproductfunc2::external, rhshp3::Vector{PetscVec}, rhshessianproductfunc3::external, rhshp4::Vector{PetscVec}, rhshessianproductfunc4::external, ctx::Cvoid) end\n\n@for_petsc function TSSetRHSHessianProduct(petsclib::$UnionPetscLib, ts::TS, rhshp1::Vector{PetscVec}, rhshessianproductfunc1::external, rhshp2::Vector{PetscVec}, rhshessianproductfunc2::external, rhshp3::Vector{PetscVec}, rhshessianproductfunc3::external, rhshp4::Vector{PetscVec}, rhshessianproductfunc4::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetRHSHessianProduct, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{CVec}, external, Ptr{CVec}, external, Ptr{CVec}, external, Ptr{CVec}, external, Ptr{Cvoid}),\n               ts, rhshp1, rhshessianproductfunc1, rhshp2, rhshessianproductfunc2, rhshp3, rhshessianproductfunc3, rhshp4, rhshessianproductfunc4, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSHessianProductFunctionUU(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSHessianProductFunctionUU\"))\n\"\"\"\nfunction TSComputeRHSHessianProductFunctionUU(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeRHSHessianProductFunctionUU(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeRHSHessianProductFunctionUU, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSHessianProductFunctionUP(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSetRHSHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSHessianProductFunctionUP\"))\n\"\"\"\nfunction TSComputeRHSHessianProductFunctionUP(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeRHSHessianProductFunctionUP(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeRHSHessianProductFunctionUP, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSHessianProductFunctionPU(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetRHSHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSHessianProductFunctionPU\"))\n\"\"\"\nfunction TSComputeRHSHessianProductFunctionPU(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeRHSHessianProductFunctionPU(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeRHSHessianProductFunctionPU, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSComputeRHSHessianProductFunctionPP(petsclib::PetscLibType,ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) \nRuns the user\n\nCollective\n\nInput Parameters:\n- `ts` - The `TS` context obtained from `TSCreate()`\n- `t`  - the time\n- `U`  - the solution at which to compute the Hessian product\n- `Vl` - the array of input vectors to be multiplied with the Hessian from the left\n- `Vr` - the input vector to be multiplied with the Hessian from the right\n\nOutput Parameter:\n- `VHV` - the array of output vectors that store the Hessian product\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetRHSHessianProduct()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeRHSHessianProductFunctionPP\"))\n\"\"\"\nfunction TSComputeRHSHessianProductFunctionPP(petsclib::PetscLibType, ts::TS, t::PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec}) end\n\n@for_petsc function TSComputeRHSHessianProductFunctionPP(petsclib::$UnionPetscLib, ts::TS, t::$PetscReal, U::PetscVec, Vl::Vector{PetscVec}, Vr::PetscVec, VHV::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSComputeRHSHessianProductFunctionPP, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, CVec, Ptr{CVec}, CVec, Ptr{CVec}),\n               ts, t, U, Vl, Vr, VHV,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetCostGradients(petsclib::PetscLibType,ts::TS, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}) \nSets the initial value of the gradients of the cost function w.r.t. initial values and w.r.t. the problem parameters\nfor use by the `TS` adjoint routines.\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - the `TS` context obtained from `TSCreate()`\n- `numcost` - number of gradients to be computed, this is the number of cost functions\n- `lambda`  - gradients with respect to the initial condition variables, the dimension and parallel layout of these vectors is the same as the ODE solution vector\n- `mu`      - gradients with respect to the parameters, the number of entries in these vectors is the same as the number of parameters\n\nLevel: beginner\n\n-seealso: `TS`, `TSAdjointSolve()`, `TSGetCostGradients()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetCostGradients\"))\n\"\"\"\nfunction TSSetCostGradients(petsclib::PetscLibType, ts::TS, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}) end\n\n@for_petsc function TSSetCostGradients(petsclib::$UnionPetscLib, ts::TS, numcost::$PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSSetCostGradients, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, Ptr{CVec}, Ptr{CVec}),\n               ts, numcost, lambda, mu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumcost::PetscInt = TSGetCostGradients(petsclib::PetscLibType,ts::TS, lambda::Vector{PetscVec}, mu::Vector{PetscVec}) \nReturns the gradients from the `TSAdjointSolve()`\n\nNot Collective, but the vectors returned are parallel if `TS` is parallel\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `numcost` - size of returned arrays\n- `lambda`  - vectors containing the gradients of the cost functions with respect to the ODE/DAE solution variables\n- `mu`      - vectors containing the gradients of the cost functions with respect to the problem parameters\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSAdjointSolve()`, `TSSetCostGradients()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetCostGradients\"))\n\"\"\"\nfunction TSGetCostGradients(petsclib::PetscLibType, ts::TS, lambda::Vector{PetscVec}, mu::Vector{PetscVec}) end\n\n@for_petsc function TSGetCostGradients(petsclib::$UnionPetscLib, ts::TS, lambda::Vector{PetscVec}, mu::Vector{PetscVec} )\n\tnumcost_ = Ref{$PetscInt}()\n\tlambda_ = Ref(pointer(lambda))\n\tmu_ = Ref(pointer(mu))\n\n    @chk ccall(\n               (:TSGetCostGradients, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, Ptr{Ptr{CVec}}, Ptr{Ptr{CVec}}),\n               ts, numcost_, lambda_, mu_,\n              )\n\n\tnumcost = numcost_[]\n\n\treturn numcost\nend \n\n\"\"\"\n\tTSSetCostHessianProducts(petsclib::PetscLibType,ts::TS, numcost::PetscInt, lambda2::Vector{PetscVec}, mu2::Vector{PetscVec}, dir::PetscVec) \nSets the initial value of the Hessian\nfor use by the `TS` adjoint routines.\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - the `TS` context obtained from `TSCreate()`\n- `numcost` - number of cost functions\n- `lambda2` - Hessian-vector product with respect to the initial condition variables, the dimension and parallel layout of these vectors is the same as the ODE solution vector\n- `mu2`     - Hessian-vector product with respect to the parameters, the number of entries in these vectors is the same as the number of parameters\n- `dir`     - the direction vector that are multiplied with the Hessian of the cost functions\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSAdjointSolve()`, `TSAdjointSetForward()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetCostHessianProducts\"))\n\"\"\"\nfunction TSSetCostHessianProducts(petsclib::PetscLibType, ts::TS, numcost::PetscInt, lambda2::Vector{PetscVec}, mu2::Vector{PetscVec}, dir::PetscVec) end\n\n@for_petsc function TSSetCostHessianProducts(petsclib::$UnionPetscLib, ts::TS, numcost::$PetscInt, lambda2::Vector{PetscVec}, mu2::Vector{PetscVec}, dir::PetscVec )\n\n    @chk ccall(\n               (:TSSetCostHessianProducts, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, Ptr{CVec}, Ptr{CVec}, CVec),\n               ts, numcost, lambda2, mu2, dir,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumcost::PetscInt = TSGetCostHessianProducts(petsclib::PetscLibType,ts::TS, lambda2::Vector{PetscVec}, mu2::Vector{PetscVec}, dir::PetscVec) \nReturns the gradients from the `TSAdjointSolve()`\n\nNot Collective, but vectors returned are parallel if `TS` is parallel\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `numcost` - number of cost functions\n- `lambda2` - Hessian-vector product with respect to the initial condition variables, the dimension and parallel layout of these vectors is the same as the ODE solution vector\n- `mu2`     - Hessian-vector product with respect to the parameters, the number of entries in these vectors is the same as the number of parameters\n- `dir`     - the direction vector that are multiplied with the Hessian of the cost functions\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdjointSolve()`, `TSSetCostHessianProducts()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetCostHessianProducts\"))\n\"\"\"\nfunction TSGetCostHessianProducts(petsclib::PetscLibType, ts::TS, lambda2::Vector{PetscVec}, mu2::Vector{PetscVec}, dir::PetscVec) end\n\n@for_petsc function TSGetCostHessianProducts(petsclib::$UnionPetscLib, ts::TS, lambda2::Vector{PetscVec}, mu2::Vector{PetscVec}, dir::PetscVec )\n\tnumcost_ = Ref{$PetscInt}()\n\tlambda2_ = Ref(pointer(lambda2))\n\tmu2_ = Ref(pointer(mu2))\n\tdir_ = Ref(dir.ptr)\n\n    @chk ccall(\n               (:TSGetCostHessianProducts, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, Ptr{Ptr{CVec}}, Ptr{Ptr{CVec}}, Ptr{CVec}),\n               ts, numcost_, lambda2_, mu2_, dir_,\n              )\n\n\tnumcost = numcost_[]\n\tdir.ptr = C_NULL\n\n\treturn numcost\nend \n\n\"\"\"\n\tTSAdjointSetForward(petsclib::PetscLibType,ts::TS, didp::PetscMat) \nTrigger the tangent linear solver and initialize the forward sensitivities\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `didp` - the derivative of initial values w.r.t. parameters\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdjointSolve()`, `TSSetCostHessianProducts()`, `TSAdjointResetForward()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointSetForward\"))\n\"\"\"\nfunction TSAdjointSetForward(petsclib::PetscLibType, ts::TS, didp::PetscMat) end\n\n@for_petsc function TSAdjointSetForward(petsclib::$UnionPetscLib, ts::TS, didp::PetscMat )\n\n    @chk ccall(\n               (:TSAdjointSetForward, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat),\n               ts, didp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointResetForward(petsclib::PetscLibType,ts::TS) \nReset the tangent linear solver and destroy the tangent linear context\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdjointSetForward()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointResetForward\"))\n\"\"\"\nfunction TSAdjointResetForward(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAdjointResetForward(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSAdjointResetForward, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointSetUp(petsclib::PetscLibType,ts::TS) \nSets up the internal data structures for the later use\nof an adjoint solver\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSCreate()`, `TSAdjointStep()`, `TSSetCostGradients()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointSetUp\"))\n\"\"\"\nfunction TSAdjointSetUp(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAdjointSetUp(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSAdjointSetUp, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointReset(petsclib::PetscLibType,ts::TS) \nResets a `TS` adjoint context and removes any allocated `Vec`s and `Mat`s.\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSCreate()`, `TSAdjointSetUp()`, `TSDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointReset\"))\n\"\"\"\nfunction TSAdjointReset(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAdjointReset(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSAdjointReset, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointSetSteps(petsclib::PetscLibType,ts::TS, steps::PetscInt) \nSets the number of steps the adjoint solver should take backward in time\n\nLogically Collective\n\nInput Parameters:\n- `ts`    - the `TS` context obtained from `TSCreate()`\n- `steps` - number of steps to use\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdjointSolve()`, `TS`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointSetSteps\"))\n\"\"\"\nfunction TSAdjointSetSteps(petsclib::PetscLibType, ts::TS, steps::PetscInt) end\n\n@for_petsc function TSAdjointSetSteps(petsclib::$UnionPetscLib, ts::TS, steps::$PetscInt )\n\n    @chk ccall(\n               (:TSAdjointSetSteps, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, steps,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointMonitorSetFromOptions(petsclib::PetscLibType,ts::TS, name::String, help::String, manual::String, monitor::external, monitorsetup::external) \nSets a monitor function and viewer appropriate for the type indicated by the user\n\nCollective\n\nInput Parameters:\n- `ts`           - `TS` object you wish to monitor\n- `name`         - the monitor type one is seeking\n- `help`         - message indicating what monitoring is done\n- `manual`       - manual page for the monitor\n- `monitor`      - the monitor function, its context must be a `PetscViewerAndFormat`\n- `monitorsetup` - a function that is called once ONLY if the user selected this monitor that may set additional features of the `TS` or `PetscViewer` objects\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscOptionsCreateViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointMonitorSetFromOptions\"))\n\"\"\"\nfunction TSAdjointMonitorSetFromOptions(petsclib::PetscLibType, ts::TS, name::String, help::String, manual::String, monitor::external, monitorsetup::external) end\n\n@for_petsc function TSAdjointMonitorSetFromOptions(petsclib::$UnionPetscLib, ts::TS, name::String, help::String, manual::String, monitor::external, monitorsetup::external )\n\n    @chk ccall(\n               (:TSAdjointMonitorSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, external, external),\n               ts, name, help, manual, monitor, monitorsetup,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointMonitorSet(petsclib::PetscLibType,ts::TS, adjointmonitor::external, adjointmctx::Cvoid, adjointmdestroy::PetscCtxDestroyFn) \nSets an ADDITIONAL function that is to be used at every\ntimestep to display the iteration's  progress.\n\nLogically Collective\n\nInput Parameters:\n- `ts`              - the `TS` context obtained from `TSCreate()`\n- `adjointmonitor`  - monitoring routine\n- `adjointmctx`     - [optional] user-defined context for private data for the monitor routine\n(use `NULL` if no context is desired)\n- `adjointmdestroy` - [optional] routine that frees monitor context (may be `NULL`), see `PetscCtxDestroyFn` for its calling sequence\n\nCalling sequence of `adjointmonitor`:\n- `ts`          - the `TS` context\n- `steps`       - iteration number (after the final time step the monitor routine is called with\na step of -1, this is at the final time which may have been interpolated to)\n- `time`        - current time\n- `u`           - current iterate\n- `numcost`     - number of cost functionos\n- `lambda`      - sensitivities to initial conditions\n- `mu`          - sensitivities to parameters\n- `adjointmctx` - [optional] adjoint monitoring context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSAdjointSolve()`, `TSAdjointMonitorCancel()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointMonitorSet\"))\n\"\"\"\nfunction TSAdjointMonitorSet(petsclib::PetscLibType, ts::TS, adjointmonitor::external, adjointmctx::Cvoid, adjointmdestroy::PetscCtxDestroyFn) end\n\n@for_petsc function TSAdjointMonitorSet(petsclib::$UnionPetscLib, ts::TS, adjointmonitor::external, adjointmctx::Cvoid, adjointmdestroy::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:TSAdjointMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (CTS, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               ts, adjointmonitor, adjointmctx, adjointmdestroy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointMonitorCancel(petsclib::PetscLibType,ts::TS) \nClears all the adjoint monitors that have been set on a time\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\n-seealso: [](ch_ts), `TS`, `TSAdjointSolve()`, `TSAdjointMonitorSet()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointMonitorCancel\"))\n\"\"\"\nfunction TSAdjointMonitorCancel(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAdjointMonitorCancel(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSAdjointMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointMonitorDefault(petsclib::PetscLibType,ts::TS, step::PetscInt, time::PetscReal, v::PetscVec, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}, vf::PetscViewerAndFormat) \nthe default monitor of adjoint computations\n\nInput Parameters:\n- `ts`      - the `TS` context\n- `step`    - iteration number (after the final time step the monitor routine is called with a\nstep of -1, this is at the final time which may have been interpolated to)\n- `time`    - current time\n- `v`       - current iterate\n- `numcost` - number of cost functionos\n- `lambda`  - sensitivities to initial conditions\n- `mu`      - sensitivities to parameters\n- `vf`      - the viewer and format\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSAdjointSolve()`, `TSAdjointMonitorSet()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointMonitorDefault\"))\n\"\"\"\nfunction TSAdjointMonitorDefault(petsclib::PetscLibType, ts::TS, step::PetscInt, time::PetscReal, v::PetscVec, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}, vf::PetscViewerAndFormat) end\n\n@for_petsc function TSAdjointMonitorDefault(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, time::$PetscReal, v::PetscVec, numcost::$PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}, vf::PetscViewerAndFormat )\n\n    @chk ccall(\n               (:TSAdjointMonitorDefault, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, $PetscInt, Ptr{CVec}, Ptr{CVec}, Ptr{PetscViewerAndFormat}),\n               ts, step, time, v, numcost, lambda, mu, vf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointMonitorDrawSensi(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}, dummy::Cvoid) \nMonitors progress of the adjoint `TS` solvers by calling\n`VecView()` for the sensitivities to initial states at each timestep\n\nCollective\n\nInput Parameters:\n- `ts`      - the `TS` context\n- `step`    - current time-step\n- `ptime`   - current time\n- `u`       - current state\n- `numcost` - number of cost functions\n- `lambda`  - sensitivities to initial conditions\n- `mu`      - sensitivities to parameters\n- `dummy`   - either a viewer or `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdjointSolve()`, `TSAdjointMonitorSet()`, `TSAdjointMonitorDefault()`, `VecView()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointMonitorDrawSensi\"))\n\"\"\"\nfunction TSAdjointMonitorDrawSensi(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}, dummy::Cvoid) end\n\n@for_petsc function TSAdjointMonitorDrawSensi(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, numcost::$PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}, dummy::Cvoid )\n\n    @chk ccall(\n               (:TSAdjointMonitorDrawSensi, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, $PetscInt, Ptr{CVec}, Ptr{CVec}, Ptr{Cvoid}),\n               ts, step, ptime, u, numcost, lambda, mu, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointSetFromOptions(petsclib::PetscLibType,ts::TS, PetscOptionsObject::PetscOptionItems) \nSets various `TS` adjoint parameters from options database.\n\nCollective\n\nInput Parameters:\n- `ts`                 - the `TS` context\n- `PetscOptionsObject` - the options context\n\nOptions Database Keys:\n- `-ts_adjoint_solve <yes,no>`     - After solving the ODE/DAE solve the adjoint problem (requires `-ts_save_trajectory`)\n- `-ts_adjoint_monitor`            - print information at each adjoint time step\n- `-ts_adjoint_monitor_draw_sensi` - monitor the sensitivity of the first cost function wrt initial conditions (lambda[0]) graphically\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSSetSaveTrajectory()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointSetFromOptions\"))\n\"\"\"\nfunction TSAdjointSetFromOptions(petsclib::PetscLibType, ts::TS, PetscOptionsObject::PetscOptionItems) end\n\n@for_petsc function TSAdjointSetFromOptions(petsclib::$UnionPetscLib, ts::TS, PetscOptionsObject::PetscOptionItems )\n\n    @chk ccall(\n               (:TSAdjointSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscOptionItems),\n               ts, PetscOptionsObject,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointStep(petsclib::PetscLibType,ts::TS) \nSteps one time step backward in the adjoint run\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdjointSetUp()`, `TSAdjointSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointStep\"))\n\"\"\"\nfunction TSAdjointStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAdjointStep(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSAdjointStep, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointSolve(petsclib::PetscLibType,ts::TS) \nSolves the discrete ajoint problem for an ODE/DAE\n\nCollective\n`\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOptions Database Key:\n- `-ts_adjoint_view_solution <viewerinfo>` - views the first gradient with respect to the initial values\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSCreate()`, `TSSetCostGradients()`, `TSSetSolution()`, `TSAdjointStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointSolve\"))\n\"\"\"\nfunction TSAdjointSolve(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAdjointSolve(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSAdjointSolve, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointMonitor(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}) \nRuns all user\n\nCollective\n\nInput Parameters:\n- `ts`      - time stepping context obtained from `TSCreate()`\n- `step`    - step number that has just completed\n- `ptime`   - model time of the state\n- `u`       - state at the current model time\n- `numcost` - number of cost functions (dimension of lambda  or mu)\n- `lambda`  - vectors containing the gradients of the cost functions with respect to the ODE/DAE solution variables\n- `mu`      - vectors containing the gradients of the cost functions with respect to the problem parameters\n\nLevel: developer\n\n-seealso: `TSAdjointMonitorSet()`, `TSAdjointSolve()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointMonitor\"))\n\"\"\"\nfunction TSAdjointMonitor(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, numcost::PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec}) end\n\n@for_petsc function TSAdjointMonitor(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, numcost::$PetscInt, lambda::Vector{PetscVec}, mu::Vector{PetscVec} )\n\n    @chk ccall(\n               (:TSAdjointMonitor, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, $PetscInt, Ptr{CVec}, Ptr{CVec}),\n               ts, step, ptime, u, numcost, lambda, mu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdjointCostIntegral(petsclib::PetscLibType,ts::TS) \nEvaluate the cost integral in the adjoint run.\n\nCollective\n\nInput Parameter:\n- `ts` - time stepping context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSAdjointSolve()`, `TSAdjointStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdjointCostIntegral\"))\n\"\"\"\nfunction TSAdjointCostIntegral(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAdjointCostIntegral(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSAdjointCostIntegral, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSForwardSetUp(petsclib::PetscLibType,ts::TS) \nSets up the internal data structures for the later use\nof forward sensitivity analysis\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSCreate()`, `TSDestroy()`, `TSSetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardSetUp\"))\n\"\"\"\nfunction TSForwardSetUp(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSForwardSetUp(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSForwardSetUp, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSForwardReset(petsclib::PetscLibType,ts::TS) \nReset the internal data structures used by forward sensitivity analysis\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSCreate()`, `TSDestroy()`, `TSForwardSetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardReset\"))\n\"\"\"\nfunction TSForwardReset(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSForwardReset(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSForwardReset, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSForwardStep(petsclib::PetscLibType,ts::TS) \nCompute the forward sensitivity for one time step.\n\nCollective\n\nInput Parameter:\n- `ts` - time stepping context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSForwardSetSensitivities()`, `TSForwardGetSensitivities()`, `TSForwardSetIntegralGradients()`, `TSForwardGetIntegralGradients()`, `TSForwardSetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardStep\"))\n\"\"\"\nfunction TSForwardStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSForwardStep(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSForwardStep, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSForwardSetSensitivities(petsclib::PetscLibType,ts::TS, nump::PetscInt, Smat::PetscMat) \nSets the initial value of the trajectory sensitivities of solution  w.r.t. the problem parameters and initial values.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `nump` - number of parameters\n- `Smat` - sensitivities with respect to the parameters, the number of entries in these vectors is the same as the number of parameters\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSForwardGetSensitivities()`, `TSForwardSetIntegralGradients()`, `TSForwardGetIntegralGradients()`, `TSForwardStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardSetSensitivities\"))\n\"\"\"\nfunction TSForwardSetSensitivities(petsclib::PetscLibType, ts::TS, nump::PetscInt, Smat::PetscMat) end\n\n@for_petsc function TSForwardSetSensitivities(petsclib::$UnionPetscLib, ts::TS, nump::$PetscInt, Smat::PetscMat )\n\n    @chk ccall(\n               (:TSForwardSetSensitivities, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, CMat),\n               ts, nump, Smat,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnump::PetscInt = TSForwardGetSensitivities(petsclib::PetscLibType,ts::TS, Smat::PetscMat) \nReturns the trajectory sensitivities\n\nNot Collective, but Smat returned is parallel if ts is parallel\n\nOutput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `nump` - number of parameters\n- `Smat` - sensitivities with respect to the parameters, the number of entries in these vectors is the same as the number of parameters\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSForwardSetSensitivities()`, `TSForwardSetIntegralGradients()`, `TSForwardGetIntegralGradients()`, `TSForwardStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardGetSensitivities\"))\n\"\"\"\nfunction TSForwardGetSensitivities(petsclib::PetscLibType, ts::TS, Smat::PetscMat) end\n\n@for_petsc function TSForwardGetSensitivities(petsclib::$UnionPetscLib, ts::TS, Smat::PetscMat )\n\tnump_ = Ref{$PetscInt}()\n\tSmat_ = Ref(Smat.ptr)\n\n    @chk ccall(\n               (:TSForwardGetSensitivities, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, Ptr{CMat}),\n               ts, nump_, Smat_,\n              )\n\n\tnump = nump_[]\n\tSmat.ptr = C_NULL\n\n\treturn nump\nend \n\n\"\"\"\n\tTSForwardCostIntegral(petsclib::PetscLibType,ts::TS) \nEvaluate the cost integral in the forward run.\n\nCollective\n\nInput Parameter:\n- `ts` - time stepping context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSAdjointCostIntegral()`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardCostIntegral\"))\n\"\"\"\nfunction TSForwardCostIntegral(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSForwardCostIntegral(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSForwardCostIntegral, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSForwardSetInitialSensitivities(petsclib::PetscLibType,ts::TS, didp::PetscMat) \nSet initial values for tangent linear sensitivities\n\nCollective\n\nInput Parameters:\n- `ts`   - the `TS` context obtained from `TSCreate()`\n- `didp` - parametric sensitivities of the initial condition\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSForwardSetSensitivities()`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardSetInitialSensitivities\"))\n\"\"\"\nfunction TSForwardSetInitialSensitivities(petsclib::PetscLibType, ts::TS, didp::PetscMat) end\n\n@for_petsc function TSForwardSetInitialSensitivities(petsclib::$UnionPetscLib, ts::TS, didp::PetscMat )\n\n    @chk ccall(\n               (:TSForwardSetInitialSensitivities, $petsc_library),\n               PetscErrorCode,\n               (CTS, CMat),\n               ts, didp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tns::PetscInt = TSForwardGetStages(petsclib::PetscLibType,ts::TS, S::PetscMat) \nGet the number of stages and the tangent linear sensitivities at the intermediate stages\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `ns` - number of stages\n- `S`  - tangent linear sensitivities at the intermediate stages\n\nLevel: advanced\n\n-seealso: `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSForwardGetStages\"))\n\"\"\"\nfunction TSForwardGetStages(petsclib::PetscLibType, ts::TS, S::PetscMat) end\n\n@for_petsc function TSForwardGetStages(petsclib::$UnionPetscLib, ts::TS, S::PetscMat )\n\tns_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSForwardGetStages, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, CMat),\n               ts, ns_, S,\n              )\n\n\tns = ns_[]\n\n\treturn ns\nend \n\n\"\"\"\n\tquadts::TS = TSCreateQuadratureTS(petsclib::PetscLibType,ts::TS, fwd::PetscBool) \nCreate a sub\n\nInput Parameters:\n- `ts`  - the `TS` context obtained from `TSCreate()`\n- `fwd` - flag indicating whether to evaluate cost integral in the forward run or the adjoint run\n\nOutput Parameter:\n- `quadts` - the child `TS` context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSGetQuadratureTS()`\n\n# External Links\n$(_doc_external(\"Ts/TSCreateQuadratureTS\"))\n\"\"\"\nfunction TSCreateQuadratureTS(petsclib::PetscLibType, ts::TS, fwd::PetscBool) end\n\n@for_petsc function TSCreateQuadratureTS(petsclib::$UnionPetscLib, ts::TS, fwd::PetscBool )\n\tquadts_ = Ref{CTS}()\n\n    @chk ccall(\n               (:TSCreateQuadratureTS, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool, Ptr{CTS}),\n               ts, fwd, quadts_,\n              )\n\n\tquadts = TS(quadts_[], petsclib)\n\n\treturn quadts\nend \n\n\"\"\"\n\tfwd::PetscBool = TSGetQuadratureTS(petsclib::PetscLibType,ts::TS, quadts::TS) \nReturn the sub\n\nInput Parameter:\n- `ts` - the `TS` context obtained from `TSCreate()`\n\nOutput Parameters:\n- `fwd`    - flag indicating whether to evaluate cost integral in the forward run or the adjoint run\n- `quadts` - the child `TS` context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSCreateQuadratureTS()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetQuadratureTS\"))\n\"\"\"\nfunction TSGetQuadratureTS(petsclib::PetscLibType, ts::TS, quadts::TS) end\n\n@for_petsc function TSGetQuadratureTS(petsclib::$UnionPetscLib, ts::TS, quadts::TS )\n\tfwd_ = Ref{PetscBool}()\n\tquadts_ = Ref(quadts.ptr)\n\n    @chk ccall(\n               (:TSGetQuadratureTS, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}, Ptr{CTS}),\n               ts, fwd_, quadts_,\n              )\n\n\tfwd = fwd_[]\n\tquadts.ptr = C_NULL\n\n\treturn fwd\nend \n\n\"\"\"\n\tTSComputeSNESJacobian(petsclib::PetscLibType,ts::TS, x::PetscVec, J::PetscMat, Jpre::PetscMat) \nCompute the Jacobian needed for the `SNESSolve()` in `TS`\n\nCollective\n\nInput Parameters:\n- `ts` - the `TS` context obtained from `TSCreate()`\n- `x`  - state vector\n\nOutput Parameters:\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to compute the preconditioner for `J` (may be same as `J`)\n\nLevel: developer\n\n-seealso: `SNES`, `TS`, `SNESSetJacobian()`, `TSSetRHSJacobian()`, `TSSetIJacobian()`\n\n# External Links\n$(_doc_external(\"Ts/TSComputeSNESJacobian\"))\n\"\"\"\nfunction TSComputeSNESJacobian(petsclib::PetscLibType, ts::TS, x::PetscVec, J::PetscMat, Jpre::PetscMat) end\n\n@for_petsc function TSComputeSNESJacobian(petsclib::$UnionPetscLib, ts::TS, x::PetscVec, J::PetscMat, Jpre::PetscMat )\n\n    @chk ccall(\n               (:TSComputeSNESJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, CMat, CMat),\n               ts, x, J, Jpre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSARKIMEXRegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `TSARKIMEXRegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSARKIMEX`, `TSARKIMEXRegister()`, `TSARKIMEXRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXRegisterDestroy\"))\n\"\"\"\nfunction TSARKIMEXRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TSARKIMEXRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSARKIMEXRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSARKIMEXInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSARKIMEX` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`, `TSARKIMEXFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXInitializePackage\"))\n\"\"\"\nfunction TSARKIMEXInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSARKIMEXInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSARKIMEXInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSARKIMEXFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSARKIMEX` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`, `TSARKIMEXInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXFinalizePackage\"))\n\"\"\"\nfunction TSARKIMEXFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSARKIMEXFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSARKIMEXFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSARKIMEXRegister(petsclib::PetscLibType,name::TSARKIMEXType, order::PetscInt, s::PetscInt, At::Vector{PetscReal}, bt::Vector{PetscReal}, ct::Vector{PetscReal}, A::Vector{PetscReal}, b::Vector{PetscReal}, c::Vector{PetscReal}, bembedt::Vector{PetscReal}, bembed::Vector{PetscReal}, pinterp::PetscInt, binterpt::Vector{PetscReal}, binterp::Vector{PetscReal}) \nregister a `TSARKIMEX` scheme by providing the entries in the Butcher tableau and optionally embedded approximations and interpolation\n\nLogically Collective\n\nInput Parameters:\n- `name`     - identifier for method\n- `order`    - approximation order of method\n- `s`        - number of stages, this is the dimension of the matrices below\n- `At`       - Butcher table of stage coefficients for stiff part (dimension s*s, row-major)\n- `bt`       - Butcher table for completing the stiff part of the step (dimension s; NULL to use the last row of At)\n- `ct`       - Abscissa of each stiff stage (dimension s, NULL to use row sums of At)\n- `A`        - Non-stiff stage coefficients (dimension s*s, row-major)\n- `b`        - Non-stiff step completion table (dimension s; NULL to use last row of At)\n- `c`        - Non-stiff abscissa (dimension s; NULL to use row sums of A)\n- `bembedt`  - Stiff part of completion table for embedded method (dimension s; NULL if not available)\n- `bembed`   - Non-stiff part of completion table for embedded method (dimension s; NULL to use bembedt if provided)\n- `pinterp`  - Order of the interpolation scheme, equal to the number of columns of binterpt and binterp\n- `binterpt` - Coefficients of the interpolation formula for the stiff part (dimension s*pinterp)\n- `binterp`  - Coefficients of the interpolation formula for the non-stiff part (dimension s*pinterp; NULL to reuse binterpt)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSARKIMEX`, `TSType`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXRegister\"))\n\"\"\"\nfunction TSARKIMEXRegister(petsclib::PetscLibType, name::TSARKIMEXType, order::PetscInt, s::PetscInt, At::Vector{PetscReal}, bt::Vector{PetscReal}, ct::Vector{PetscReal}, A::Vector{PetscReal}, b::Vector{PetscReal}, c::Vector{PetscReal}, bembedt::Vector{PetscReal}, bembed::Vector{PetscReal}, pinterp::PetscInt, binterpt::Vector{PetscReal}, binterp::Vector{PetscReal}) end\n\n@for_petsc function TSARKIMEXRegister(petsclib::$UnionPetscLib, name::TSARKIMEXType, order::$PetscInt, s::$PetscInt, At::Vector{$PetscReal}, bt::Vector{$PetscReal}, ct::Vector{$PetscReal}, A::Vector{$PetscReal}, b::Vector{$PetscReal}, c::Vector{$PetscReal}, bembedt::Vector{$PetscReal}, bembed::Vector{$PetscReal}, pinterp::$PetscInt, binterpt::Vector{$PetscReal}, binterp::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSARKIMEXRegister, $petsc_library),\n               PetscErrorCode,\n               (TSARKIMEXType, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               name, order, s, At, bt, ct, A, b, c, bembedt, bembed, pinterp, binterpt, binterp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSDIRKRegister(petsclib::PetscLibType,name::TSDIRKType, order::PetscInt, s::PetscInt, At::Vector{PetscReal}, bt::Vector{PetscReal}, ct::Vector{PetscReal}, bembedt::Vector{PetscReal}, pinterp::PetscInt, binterpt::Vector{PetscReal}) \nregister a `TSDIRK` scheme by providing the entries in its Butcher tableau and, optionally, embedded approximations and interpolation\n\nLogically Collective.\n\nInput Parameters:\n- `name`     - identifier for method\n- `order`    - approximation order of method\n- `s`        - number of stages, this is the dimension of the matrices below\n- `At`       - Butcher table of stage coefficients (dimension `s`*`s`, row-major order)\n- `bt`       - Butcher table for completing the step (dimension `s`; pass `NULL` to use the last row of `At`)\n- `ct`       - Abscissa of each stage (dimension s, NULL to use row sums of At)\n- `bembedt`  - Stiff part of completion table for embedded method (dimension s; `NULL` if not available)\n- `pinterp`  - Order of the interpolation scheme, equal to the number of columns of `binterpt` and `binterp`\n- `binterpt` - Coefficients of the interpolation formula (dimension s*pinterp)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSDIRK`, `TSType`, `TS`\n\n# External Links\n$(_doc_external(\"Ts/TSDIRKRegister\"))\n\"\"\"\nfunction TSDIRKRegister(petsclib::PetscLibType, name::TSDIRKType, order::PetscInt, s::PetscInt, At::Vector{PetscReal}, bt::Vector{PetscReal}, ct::Vector{PetscReal}, bembedt::Vector{PetscReal}, pinterp::PetscInt, binterpt::Vector{PetscReal}) end\n\n@for_petsc function TSDIRKRegister(petsclib::$UnionPetscLib, name::TSDIRKType, order::$PetscInt, s::$PetscInt, At::Vector{$PetscReal}, bt::Vector{$PetscReal}, ct::Vector{$PetscReal}, bembedt::Vector{$PetscReal}, pinterp::$PetscInt, binterpt::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSDIRKRegister, $petsc_library),\n               PetscErrorCode,\n               (TSDIRKType, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}),\n               name, order, s, At, bt, ct, bembedt, pinterp, binterpt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSARKIMEXSetType(petsclib::PetscLibType,ts::TS, arktype::TSARKIMEXType) \nSet the type of `TSARKIMEX` scheme\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - timestepping context\n- `arktype` - type of `TSARKIMEX` scheme\n\nOptions Database Key:\n- `-ts_arkimex_type <1bee,a2,l2,ars122,2c,2d,2e,prssp2,3,bpr3,ars443,4,5>` - set `TSARKIMEX` scheme type\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSARKIMEXGetType()`, `TSARKIMEX`, `TSARKIMEXType`, `TSARKIMEX1BEE`, `TSARKIMEXA2`, `TSARKIMEXL2`, `TSARKIMEXARS122`, `TSARKIMEX2C`, `TSARKIMEX2D`, `TSARKIMEX2E`, `TSARKIMEXPRSSP2`,\n`TSARKIMEX3`, `TSARKIMEXBPR3`, `TSARKIMEXARS443`, `TSARKIMEX4`, `TSARKIMEX5`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXSetType\"))\n\"\"\"\nfunction TSARKIMEXSetType(petsclib::PetscLibType, ts::TS, arktype::TSARKIMEXType) end\n\n@for_petsc function TSARKIMEXSetType(petsclib::$UnionPetscLib, ts::TS, arktype::TSARKIMEXType )\n\n    @chk ccall(\n               (:TSARKIMEXSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSARKIMEXType),\n               ts, arktype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tarktype::TSARKIMEXType = TSARKIMEXGetType(petsclib::PetscLibType,ts::TS) \nGet the type of `TSARKIMEX` scheme\n\nLogically Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `arktype` - type of `TSARKIMEX` scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSARKIMEX`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXGetType\"))\n\"\"\"\nfunction TSARKIMEXGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSARKIMEXGetType(petsclib::$UnionPetscLib, ts::TS )\n\tarktype_ = Ref{TSARKIMEXType}()\n\n    @chk ccall(\n               (:TSARKIMEXGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSARKIMEXType}),\n               ts, arktype_,\n              )\n\n\tarktype = unsafe_string(arktype_[])\n\n\treturn arktype\nend \n\n\"\"\"\n\tTSARKIMEXSetFullyImplicit(petsclib::PetscLibType,ts::TS, flg::PetscBool) \nSolve both parts of the equation implicitly, including the part that is normally solved explicitly\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - timestepping context\n- `flg` - `PETSC_TRUE` for fully implicit\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSARKIMEX`, `TSARKIMEXGetType()`, `TSARKIMEXGetFullyImplicit()`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXSetFullyImplicit\"))\n\"\"\"\nfunction TSARKIMEXSetFullyImplicit(petsclib::PetscLibType, ts::TS, flg::PetscBool) end\n\n@for_petsc function TSARKIMEXSetFullyImplicit(petsclib::$UnionPetscLib, ts::TS, flg::PetscBool )\n\n    @chk ccall(\n               (:TSARKIMEXSetFullyImplicit, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = TSARKIMEXGetFullyImplicit(petsclib::PetscLibType,ts::TS) \nInquires if both parts of the equation are solved implicitly\n\nLogically Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` for fully implicit\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSARKIMEXGetType()`, `TSARKIMEXSetFullyImplicit()`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXGetFullyImplicit\"))\n\"\"\"\nfunction TSARKIMEXGetFullyImplicit(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSARKIMEXGetFullyImplicit(petsclib::$UnionPetscLib, ts::TS )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSARKIMEXGetFullyImplicit, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tTSDIRKSetType(petsclib::PetscLibType,ts::TS, dirktype::TSDIRKType) \nSet the type of `TSDIRK` scheme\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - timestepping context\n- `dirktype` - type of `TSDIRK` scheme\n\nOptions Database Key:\n- `-ts_dirkimex_type` - set `TSDIRK` scheme type\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSDIRKGetType()`, `TSDIRK`, `TSDIRKType`\n\n# External Links\n$(_doc_external(\"Ts/TSDIRKSetType\"))\n\"\"\"\nfunction TSDIRKSetType(petsclib::PetscLibType, ts::TS, dirktype::TSDIRKType) end\n\n@for_petsc function TSDIRKSetType(petsclib::$UnionPetscLib, ts::TS, dirktype::TSDIRKType )\n\n    @chk ccall(\n               (:TSDIRKSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSDIRKType),\n               ts, dirktype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdirktype::TSDIRKType = TSDIRKGetType(petsclib::PetscLibType,ts::TS) \nGet the type of `TSDIRK` scheme\n\nLogically Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `dirktype` - type of `TSDIRK` scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSDIRKSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSDIRKGetType\"))\n\"\"\"\nfunction TSDIRKGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSDIRKGetType(petsclib::$UnionPetscLib, ts::TS )\n\tdirktype_ = Ref{TSDIRKType}()\n\n    @chk ccall(\n               (:TSDIRKGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSDIRKType}),\n               ts, dirktype_,\n              )\n\n\tdirktype = unsafe_string(dirktype_[])\n\n\treturn dirktype\nend \n\n\"\"\"\n\tTSARKIMEXSetFastSlowSplit(petsclib::PetscLibType,ts::TS, fastslow::PetscBool) \nUse `TSARKIMEX` for solving a fast\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - timestepping context\n- `fastslow` - `PETSC_TRUE` enables the `TSARKIMEX` solver for a fast-slow system where the RHS is split component-wise.\n\nOptions Database Key:\n- `-ts_arkimex_fastslowsplit` - <true,false>\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSARKIMEX`, `TSARKIMEXGetFastSlowSplit()`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXSetFastSlowSplit\"))\n\"\"\"\nfunction TSARKIMEXSetFastSlowSplit(petsclib::PetscLibType, ts::TS, fastslow::PetscBool) end\n\n@for_petsc function TSARKIMEXSetFastSlowSplit(petsclib::$UnionPetscLib, ts::TS, fastslow::PetscBool )\n\n    @chk ccall(\n               (:TSARKIMEXSetFastSlowSplit, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, fastslow,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfastslow::PetscBool = TSARKIMEXGetFastSlowSplit(petsclib::PetscLibType,ts::TS) \nGets whether to use `TSARKIMEX` for a fast\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `fastslow` - `PETSC_TRUE` if `TSARKIMEX` will be used for solving a fast-slow system, `PETSC_FALSE` otherwise\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSARKIMEX`, `TSARKIMEXSetFastSlowSplit()`\n\n# External Links\n$(_doc_external(\"Ts/TSARKIMEXGetFastSlowSplit\"))\n\"\"\"\nfunction TSARKIMEXGetFastSlowSplit(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSARKIMEXGetFastSlowSplit(petsclib::$UnionPetscLib, ts::TS )\n\tfastslow_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSARKIMEXGetFastSlowSplit, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, fastslow_,\n              )\n\n\tfastslow = fastslow_[]\n\n\treturn fastslow\nend \n\n\"\"\"\n\tTSPythonSetType(petsclib::PetscLibType,ts::TS, pyname::String) \nInitialize a `TS` object implemented in Python.\n\nCollective\n\nInput Parameters:\n- `ts`  - the `TS` context\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOptions Database Key:\n- `-ts_python_type <pyname>`  - python class\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSCreate()`, `TSSetType()`, `TSPYTHON`, `PetscPythonInitialize()`\n\n# External Links\n$(_doc_external(\"Ts/TSPythonSetType\"))\n\"\"\"\nfunction TSPythonSetType(petsclib::PetscLibType, ts::TS, pyname::String) end\n\n@for_petsc function TSPythonSetType(petsclib::$UnionPetscLib, ts::TS, pyname::String )\n\n    @chk ccall(\n               (:TSPythonSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}),\n               ts, pyname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpyname::String = TSPythonGetType(petsclib::PetscLibType,ts::TS) \nGet the type of a `TS` object implemented in Python.\n\nNot Collective\n\nInput Parameter:\n- `ts`  - the `TS` context\n\nOutput Parameter:\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSCreate()`, `TSSetType()`, `TSPYTHON`, `PetscPythonInitialize()`, `TSPythonSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSPythonGetType\"))\n\"\"\"\nfunction TSPythonGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSPythonGetType(petsclib::$UnionPetscLib, ts::TS )\n\tpyname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:TSPythonGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Ptr{Cchar}}),\n               ts, pyname_,\n              )\n\n\tpyname = unsafe_wrap(Array, pyname_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pyname\nend \n\n\"\"\"\n\tTSSSPSetType(petsclib::PetscLibType,ts::TS, ssptype::TSSSPType) \nset the `TSSSP` time integration scheme to use\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - time stepping object\n- `ssptype` - type of scheme to use\n\nOptions Database Keys:\n- `-ts_ssp_type <rks2>`               - Type of `TSSSP` method (one of) rks2 rks3 rk104\n- `-ts_ssp_nstages<rks2: 5, rks3: 9>` - Number of stages\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSSSP`, `TSSSPGetType()`, `TSSSPSetNumStages()`, `TSSSPRKS2`, `TSSSPRKS3`, `TSSSPRK104`\n\n# External Links\n$(_doc_external(\"Ts/TSSSPSetType\"))\n\"\"\"\nfunction TSSSPSetType(petsclib::PetscLibType, ts::TS, ssptype::TSSSPType) end\n\n@for_petsc function TSSSPSetType(petsclib::$UnionPetscLib, ts::TS, ssptype::TSSSPType )\n\n    @chk ccall(\n               (:TSSSPSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSSSPType),\n               ts, ssptype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TSSSPType = TSSSPGetType(petsclib::PetscLibType,ts::TS) \nget the `TSSSP` time integration scheme\n\nLogically Collective\n\nInput Parameter:\n- `ts` - time stepping object\n\nOutput Parameter:\n- `type` - type of scheme being used\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSSSP`, `TSSSPSetType()`, `TSSSPSetNumStages()`, `TSSSPRKS2`, `TSSSPRKS3`, `TSSSPRK104`\n\n# External Links\n$(_doc_external(\"Ts/TSSSPGetType\"))\n\"\"\"\nfunction TSSSPGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSSSPGetType(petsclib::$UnionPetscLib, ts::TS )\n\ttype_ = Ref{TSSSPType}()\n\n    @chk ccall(\n               (:TSSSPGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSSSPType}),\n               ts, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTSSSPSetNumStages(petsclib::PetscLibType,ts::TS, nstages::PetscInt) \nset the number of stages to use with the `TSSSP` method. Must be called after\n`TSSSPSetType()`.\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - time stepping object\n- `nstages` - number of stages\n\nOptions Database Keys:\n- `-ts_ssp_type <rks2>`               - Type of `TSSSP` method (one of) rks2 rks3 rk104\n- `-ts_ssp_nstages<rks2: 5, rks3: 9>` - Number of stages\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSSSP`, `TSSSPGetNumStages()`, `TSSSPRKS2`, `TSSSPRKS3`, `TSSSPRK104`\n\n# External Links\n$(_doc_external(\"Ts/TSSSPSetNumStages\"))\n\"\"\"\nfunction TSSSPSetNumStages(petsclib::PetscLibType, ts::TS, nstages::PetscInt) end\n\n@for_petsc function TSSSPSetNumStages(petsclib::$UnionPetscLib, ts::TS, nstages::$PetscInt )\n\n    @chk ccall(\n               (:TSSSPSetNumStages, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, nstages,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnstages::PetscInt = TSSSPGetNumStages(petsclib::PetscLibType,ts::TS) \nget the number of stages in the `TSSSP` time integration scheme\n\nLogically Collective\n\nInput Parameter:\n- `ts` - time stepping object\n\nOutput Parameter:\n- `nstages` - number of stages\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSSSP`, `TSSSPGetType()`, `TSSSPSetNumStages()`, `TSSSPRKS2`, `TSSSPRKS3`, `TSSSPRK104`\n\n# External Links\n$(_doc_external(\"Ts/TSSSPGetNumStages\"))\n\"\"\"\nfunction TSSSPGetNumStages(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSSSPGetNumStages(petsclib::$UnionPetscLib, ts::TS )\n\tnstages_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSSSPGetNumStages, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, nstages_,\n              )\n\n\tnstages = nstages_[]\n\n\treturn nstages\nend \n\n\"\"\"\n\tTSSSPInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSSSP` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`, `TSSSPFinalizePackage()`, `TSInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSSSPInitializePackage\"))\n\"\"\"\nfunction TSSSPInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSSSPInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSSSPInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSSPFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSSSP` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`, `TSSSPInitiallizePackage()`, `TSInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSSSPFinalizePackage\"))\n\"\"\"\nfunction TSSSPFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSSSPFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSSSPFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRKRegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `TSRKRegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSRK`, `TSRKRegister()`, `TSRKRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKRegisterDestroy\"))\n\"\"\"\nfunction TSRKRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TSRKRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSRKRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRKInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSRK` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSInitializePackage()`, `PetscInitialize()`, `TSRKFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKInitializePackage\"))\n\"\"\"\nfunction TSRKInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSRKInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSRKInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRKFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSRK` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`, `TSRKInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKFinalizePackage\"))\n\"\"\"\nfunction TSRKFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSRKFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSRKFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRKRegister(petsclib::PetscLibType,name::TSRKType, order::PetscInt, s::PetscInt, A::Vector{PetscReal}, b::Vector{PetscReal}, c::Vector{PetscReal}, bembed::Vector{PetscReal}, p::PetscInt, binterp::Vector{PetscReal}) \nregister an `TSRK` scheme by providing the entries in the Butcher tableau and optionally embedded approximations and interpolation\n\nNot Collective, but the same schemes should be registered on all processes on which they will be used, No Fortran Support\n\nInput Parameters:\n- `name`    - identifier for method\n- `order`   - approximation order of method\n- `s`       - number of stages, this is the dimension of the matrices below\n- `A`       - stage coefficients (dimension s*s, row-major)\n- `b`       - step completion table (dimension s; NULL to use last row of A)\n- `c`       - abscissa (dimension s; NULL to use row sums of A)\n- `bembed`  - completion table for embedded method (dimension s; NULL if not available)\n- `p`       - Order of the interpolation scheme, equal to the number of columns of binterp\n- `binterp` - Coefficients of the interpolation formula (dimension s*p; NULL to reuse b with p=1)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSRK`\n\n# External Links\n$(_doc_external(\"Ts/TSRKRegister\"))\n\"\"\"\nfunction TSRKRegister(petsclib::PetscLibType, name::TSRKType, order::PetscInt, s::PetscInt, A::Vector{PetscReal}, b::Vector{PetscReal}, c::Vector{PetscReal}, bembed::Vector{PetscReal}, p::PetscInt, binterp::Vector{PetscReal}) end\n\n@for_petsc function TSRKRegister(petsclib::$UnionPetscLib, name::TSRKType, order::$PetscInt, s::$PetscInt, A::Vector{$PetscReal}, b::Vector{$PetscReal}, c::Vector{$PetscReal}, bembed::Vector{$PetscReal}, p::$PetscInt, binterp::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSRKRegister, $petsc_library),\n               PetscErrorCode,\n               (TSRKType, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}),\n               name, order, s, A, b, c, bembed, p, binterp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ts::PetscInt,A::PetscReal,b::PetscReal,c::PetscReal,bembed::PetscReal,p::PetscInt,binterp::PetscReal,FSAL::PetscBool = TSRKGetTableau(petsclib::PetscLibType,ts::TS) \nGet info on the `TSRK` tableau\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameters:\n- `s`       - number of stages, this is the dimension of the matrices below\n- `A`       - stage coefficients (dimension s*s, row-major)\n- `b`       - step completion table (dimension s)\n- `c`       - abscissa (dimension s)\n- `bembed`  - completion table for embedded method (dimension s; NULL if not available)\n- `p`       - Order of the interpolation scheme, equal to the number of columns of binterp\n- `binterp` - Coefficients of the interpolation formula (dimension s*p)\n- `FSAL`    - whether or not the scheme has the First Same As Last property\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSRK`, `TSRKRegister()`, `TSRKSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKGetTableau\"))\n\"\"\"\nfunction TSRKGetTableau(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRKGetTableau(petsclib::$UnionPetscLib, ts::TS )\n\ts_ = Ref{$PetscInt}()\n\tA_ = Ref{$PetscReal}()\n\tb_ = Ref{$PetscReal}()\n\tc_ = Ref{$PetscReal}()\n\tbembed_ = Ref{$PetscReal}()\n\tp_ = Ref{$PetscInt}()\n\tbinterp_ = Ref{$PetscReal}()\n\tFSAL_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSRKGetTableau, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}, $PetscReal, $PetscReal, $PetscReal, $PetscReal, Ptr{$PetscInt}, $PetscReal, Ptr{PetscBool}),\n               ts, s_, A_, b_, c_, bembed_, p_, binterp_, FSAL_,\n              )\n\n\ts = s_[]\n\tA = A_[]\n\tb = b_[]\n\tc = c_[]\n\tbembed = bembed_[]\n\tp = p_[]\n\tbinterp = binterp_[]\n\tFSAL = FSAL_[]\n\n\treturn s,A,b,c,bembed,p,binterp,FSAL\nend \n\n\"\"\"\n\torder::PetscInt = TSRKGetOrder(petsclib::PetscLibType,ts::TS) \nGet the order of the `TSRK` scheme\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `order` - order of `TSRK` scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSRK`, `TSRKGetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKGetOrder\"))\n\"\"\"\nfunction TSRKGetOrder(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRKGetOrder(petsclib::$UnionPetscLib, ts::TS )\n\torder_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSRKGetOrder, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, order_,\n              )\n\n\torder = order_[]\n\n\treturn order\nend \n\n\"\"\"\n\tTSRKSetType(petsclib::PetscLibType,ts::TS, rktype::TSRKType) \nSet the type of the `TSRK` scheme\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - timestepping context\n- `rktype` - type of `TSRK` scheme\n\nOptions Database Key:\n- `-ts_rk_type` - <1fe,2a,3,3bs,4,5f,5dp,5bs>\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSRKGetType()`, `TSRK`, `TSRKType`, `TSRK1FE`, `TSRK2A`, `TSRK2B`, `TSRK3`, `TSRK3BS`, `TSRK4`, `TSRK5F`, `TSRK5DP`, `TSRK5BS`, `TSRK6VR`, `TSRK7VR`, `TSRK8VR`\n\n# External Links\n$(_doc_external(\"Ts/TSRKSetType\"))\n\"\"\"\nfunction TSRKSetType(petsclib::PetscLibType, ts::TS, rktype::TSRKType) end\n\n@for_petsc function TSRKSetType(petsclib::$UnionPetscLib, ts::TS, rktype::TSRKType )\n\n    @chk ccall(\n               (:TSRKSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSRKType),\n               ts, rktype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trktype::TSRKType = TSRKGetType(petsclib::PetscLibType,ts::TS) \nGet the type of `TSRK` scheme\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `rktype` - type of `TSRK`-scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSRKSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKGetType\"))\n\"\"\"\nfunction TSRKGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRKGetType(petsclib::$UnionPetscLib, ts::TS )\n\trktype_ = Ref{TSRKType}()\n\n    @chk ccall(\n               (:TSRKGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSRKType}),\n               ts, rktype_,\n              )\n\n\trktype = unsafe_string(rktype_[])\n\n\treturn rktype\nend \n\n\"\"\"\n\tTSRKSetMultirate(petsclib::PetscLibType,ts::TS, use_multirate::PetscBool) \nUse the interpolation\n\nLogically Collective\n\nInput Parameters:\n- `ts`            - timestepping context\n- `use_multirate` - `PETSC_TRUE` enables the multirate `TSRK` method, sets the basic method to be RK2A and sets the ratio between slow stepsize and fast stepsize to be 2\n\nOptions Database Key:\n- `-ts_rk_multirate` - <true,false>\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSRK`, `TSRKGetMultirate()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKSetMultirate\"))\n\"\"\"\nfunction TSRKSetMultirate(petsclib::PetscLibType, ts::TS, use_multirate::PetscBool) end\n\n@for_petsc function TSRKSetMultirate(petsclib::$UnionPetscLib, ts::TS, use_multirate::PetscBool )\n\n    @chk ccall(\n               (:TSRKSetMultirate, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, use_multirate,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tuse_multirate::PetscBool = TSRKGetMultirate(petsclib::PetscLibType,ts::TS) \nGets whether to use the interpolation\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `use_multirate` - `PETSC_TRUE` if the multirate RK method is enabled, `PETSC_FALSE` otherwise\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSRK`, `TSRKSetMultirate()`\n\n# External Links\n$(_doc_external(\"Ts/TSRKGetMultirate\"))\n\"\"\"\nfunction TSRKGetMultirate(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRKGetMultirate(petsclib::$UnionPetscLib, ts::TS )\n\tuse_multirate_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSRKGetMultirate, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, use_multirate_,\n              )\n\n\tuse_multirate = use_multirate_[]\n\n\treturn use_multirate\nend \n\n\"\"\"\n\tTSBDFSetOrder(petsclib::PetscLibType,ts::TS, order::PetscInt) \nSet the order of the `TSBDF` method\n\nLogically Collective\n\nInput Parameters:\n- `ts`    - timestepping context\n- `order` - order of the method\n\nOptions Database Key:\n- `-ts_bdf_order <order>` - select the order\n\nLevel: intermediate\n\n-seealso: `TSBDFGetOrder()`, `TS`, `TSBDF`\n\n# External Links\n$(_doc_external(\"Ts/TSBDFSetOrder\"))\n\"\"\"\nfunction TSBDFSetOrder(petsclib::PetscLibType, ts::TS, order::PetscInt) end\n\n@for_petsc function TSBDFSetOrder(petsclib::$UnionPetscLib, ts::TS, order::$PetscInt )\n\n    @chk ccall(\n               (:TSBDFSetOrder, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, order,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\torder::PetscInt = TSBDFGetOrder(petsclib::PetscLibType,ts::TS) \nGet the order of the `TSBDF` method\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `order` - order of the method\n\nLevel: intermediate\n\n-seealso: `TSBDFSetOrder()`, `TS`, `TSBDF`\n\n# External Links\n$(_doc_external(\"Ts/TSBDFGetOrder\"))\n\"\"\"\nfunction TSBDFGetOrder(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSBDFGetOrder(petsclib::$UnionPetscLib, ts::TS )\n\torder_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSBDFGetOrder, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, order_,\n              )\n\n\torder = order_[]\n\n\treturn order\nend \n\n\"\"\"\n\tTSBasicSymplecticRegisterAll(petsclib::PetscLibType) \nRegisters all of the basic symplectic integration methods in `TSBASICSYMPLECTIC`\n\nNot Collective, but should be called by all processes which will need the schemes to be registered\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSBASICSYMPLECTIC`, `TSBasicSymplecticRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSBasicSymplecticRegisterAll\"))\n\"\"\"\nfunction TSBasicSymplecticRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function TSBasicSymplecticRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSBasicSymplecticRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSBasicSymplecticRegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `TSBasicSymplecticRegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSBasicSymplecticRegister()`, `TSBasicSymplecticRegisterAll()`, `TSBASICSYMPLECTIC`\n\n# External Links\n$(_doc_external(\"Ts/TSBasicSymplecticRegisterDestroy\"))\n\"\"\"\nfunction TSBasicSymplecticRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TSBasicSymplecticRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSBasicSymplecticRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSBasicSymplecticInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSBASICSYMPLECTIC` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`, `TSBASICSYMPLECTIC`\n\n# External Links\n$(_doc_external(\"Ts/TSBasicSymplecticInitializePackage\"))\n\"\"\"\nfunction TSBasicSymplecticInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSBasicSymplecticInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSBasicSymplecticInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSBasicSymplecticFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSBASICSYMPLECTIC` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`, `TSBASICSYMPLECTIC`\n\n# External Links\n$(_doc_external(\"Ts/TSBasicSymplecticFinalizePackage\"))\n\"\"\"\nfunction TSBasicSymplecticFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSBasicSymplecticFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSBasicSymplecticFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSBasicSymplecticRegister(petsclib::PetscLibType,name::TSRosWType, order::PetscInt, s::PetscInt, c::Vector{PetscReal}, d::Vector{PetscReal}) \nregister a basic symplectic integration scheme by providing the coefficients.\n\nNot Collective, but the same schemes should be registered on all processes on which they will be used\n\nInput Parameters:\n- `name`  - identifier for method\n- `order` - approximation order of method\n- `s`     - number of stages, this is the dimension of the matrices below\n- `c`     - coefficients for updating generalized position (dimension s)\n- `d`     - coefficients for updating generalized momentum (dimension s)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSBASICSYMPLECTIC`\n\n# External Links\n$(_doc_external(\"Ts/TSBasicSymplecticRegister\"))\n\"\"\"\nfunction TSBasicSymplecticRegister(petsclib::PetscLibType, name::TSRosWType, order::PetscInt, s::PetscInt, c::Vector{PetscReal}, d::Vector{PetscReal}) end\n\n@for_petsc function TSBasicSymplecticRegister(petsclib::$UnionPetscLib, name::TSRosWType, order::$PetscInt, s::$PetscInt, c::Vector{$PetscReal}, d::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSBasicSymplecticRegister, $petsc_library),\n               PetscErrorCode,\n               (TSRosWType, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               name, order, s, c, d,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSBasicSymplecticSetType(petsclib::PetscLibType,ts::TS, bsymptype::TSBasicSymplecticType) \nSet the type of the basic symplectic method\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - timestepping context\n- `bsymptype` - type of the symplectic scheme\n\nOptions Database Key:\n- `-ts_basicsymplectic_type <scheme>` - select the scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSBASICSYMPLECTIC`, `TSBasicSymplecticType`\n\n# External Links\n$(_doc_external(\"Ts/TSBasicSymplecticSetType\"))\n\"\"\"\nfunction TSBasicSymplecticSetType(petsclib::PetscLibType, ts::TS, bsymptype::TSBasicSymplecticType) end\n\n@for_petsc function TSBasicSymplecticSetType(petsclib::$UnionPetscLib, ts::TS, bsymptype::TSBasicSymplecticType )\n\n    @chk ccall(\n               (:TSBasicSymplecticSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSBasicSymplecticType),\n               ts, bsymptype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSBasicSymplecticGetType(petsclib::PetscLibType,ts::TS, bsymptype::TSBasicSymplecticType) \nGet the type of the basic symplectic method\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - timestepping context\n- `bsymptype` - type of the basic symplectic scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSBASICSYMPLECTIC`, `TSBasicSymplecticType`, `TSBasicSymplecticSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSBasicSymplecticGetType\"))\n\"\"\"\nfunction TSBasicSymplecticGetType(petsclib::PetscLibType, ts::TS, bsymptype::TSBasicSymplecticType) end\n\n@for_petsc function TSBasicSymplecticGetType(petsclib::$UnionPetscLib, ts::TS, bsymptype::TSBasicSymplecticType )\n\n    @chk ccall(\n               (:TSBasicSymplecticGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSBasicSymplecticType}),\n               ts, bsymptype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdt::PetscReal = TSPseudoComputeTimeStep(petsclib::PetscLibType,ts::TS) \nComputes the next timestep for a currently running\npseudo-timestepping process.\n\nCollective\n\nInput Parameter:\n- `ts` - timestep context\n\nOutput Parameter:\n- `dt` - newly computed timestep\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoTimeStepDefault()`, `TSPseudoSetTimeStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoComputeTimeStep\"))\n\"\"\"\nfunction TSPseudoComputeTimeStep(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSPseudoComputeTimeStep(petsclib::$UnionPetscLib, ts::TS )\n\tdt_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSPseudoComputeTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, dt_,\n              )\n\n\tdt = dt_[]\n\n\treturn dt\nend \n\n\"\"\"\n\tnewdt::PetscReal,flag::PetscBool = TSPseudoVerifyTimeStepDefault(petsclib::PetscLibType,ts::TS, update::PetscVec, dtctx::Cvoid) \nDefault code to verify the quality of the last timestep.\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `ts`     - the timestep context\n- `dtctx`  - unused timestep context\n- `update` - latest solution vector\n\nOutput Parameters:\n- `newdt` - the timestep to use for the next step\n- `flag`  - flag indicating whether the last time step was acceptable\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoSetVerifyTimeStep()`, `TSPseudoVerifyTimeStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoVerifyTimeStepDefault\"))\n\"\"\"\nfunction TSPseudoVerifyTimeStepDefault(petsclib::PetscLibType, ts::TS, update::PetscVec, dtctx::Cvoid) end\n\n@for_petsc function TSPseudoVerifyTimeStepDefault(petsclib::$UnionPetscLib, ts::TS, update::PetscVec, dtctx::Cvoid )\n\tnewdt_ = Ref{$PetscReal}()\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSPseudoVerifyTimeStepDefault, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, Ptr{Cvoid}, Ptr{$PetscReal}, Ptr{PetscBool}),\n               ts, update, dtctx, newdt_, flag_,\n              )\n\n\tnewdt = newdt_[]\n\tflag = flag_[]\n\n\treturn newdt,flag\nend \n\n\"\"\"\n\tdt::PetscReal,flag::PetscBool = TSPseudoVerifyTimeStep(petsclib::PetscLibType,ts::TS, update::PetscVec) \nVerifies whether the last timestep was acceptable.\n\nCollective\n\nInput Parameters:\n- `ts`     - timestep context\n- `update` - latest solution vector\n\nOutput Parameters:\n- `dt`   - newly computed timestep (if it had to shrink)\n- `flag` - indicates if current timestep was ok\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoSetVerifyTimeStep()`, `TSPseudoVerifyTimeStepDefault()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoVerifyTimeStep\"))\n\"\"\"\nfunction TSPseudoVerifyTimeStep(petsclib::PetscLibType, ts::TS, update::PetscVec) end\n\n@for_petsc function TSPseudoVerifyTimeStep(petsclib::$UnionPetscLib, ts::TS, update::PetscVec )\n\tdt_ = Ref{$PetscReal}()\n\tflag_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSPseudoVerifyTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, CVec, Ptr{$PetscReal}, Ptr{PetscBool}),\n               ts, update, dt_, flag_,\n              )\n\n\tdt = dt_[]\n\tflag = flag_[]\n\n\treturn dt,flag\nend \n\n\"\"\"\n\tTSPseudoSetVerifyTimeStep(petsclib::PetscLibType,ts::TS, dt::external, ctx::Cvoid) \nSets a user\nlast timestep.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - timestep context\n- `dt`  - user-defined function to verify timestep\n- `ctx` - [optional] user-defined context for private data for the timestep verification routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `ts`     - the time-step context\n- `update` - latest solution vector\n- `ctx`    - [optional] user-defined timestep context\n- `newdt`  - the timestep to use for the next step\n- `flag`   - flag indicating whether the last time step was acceptable\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoVerifyTimeStepDefault()`, `TSPseudoVerifyTimeStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoSetVerifyTimeStep\"))\n\"\"\"\nfunction TSPseudoSetVerifyTimeStep(petsclib::PetscLibType, ts::TS, dt::external, ctx::Cvoid) end\n\n@for_petsc function TSPseudoSetVerifyTimeStep(petsclib::$UnionPetscLib, ts::TS, dt::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSPseudoSetVerifyTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, external, Ptr{Cvoid}),\n               ts, dt, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPseudoSetTimeStepIncrement(petsclib::PetscLibType,ts::TS, inc::PetscReal) \nSets the scaling increment applied to\ndt when using the TSPseudoTimeStepDefault() routine.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the timestep context\n- `inc` - the scaling factor >= 1.0\n\nOptions Database Key:\n- `-ts_pseudo_increment <increment>` - set pseudo increment\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoSetTimeStep()`, `TSPseudoTimeStepDefault()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoSetTimeStepIncrement\"))\n\"\"\"\nfunction TSPseudoSetTimeStepIncrement(petsclib::PetscLibType, ts::TS, inc::PetscReal) end\n\n@for_petsc function TSPseudoSetTimeStepIncrement(petsclib::$UnionPetscLib, ts::TS, inc::$PetscReal )\n\n    @chk ccall(\n               (:TSPseudoSetTimeStepIncrement, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, inc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPseudoSetMaxTimeStep(petsclib::PetscLibType,ts::TS, maxdt::PetscReal) \nSets the maximum time step\nwhen using the TSPseudoTimeStepDefault() routine.\n\nLogically Collective\n\nInput Parameters:\n- `ts`    - the timestep context\n- `maxdt` - the maximum time step, use a non-positive value to deactivate\n\nOptions Database Key:\n- `-ts_pseudo_max_dt <increment>` - set pseudo max dt\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoSetTimeStep()`, `TSPseudoTimeStepDefault()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoSetMaxTimeStep\"))\n\"\"\"\nfunction TSPseudoSetMaxTimeStep(petsclib::PetscLibType, ts::TS, maxdt::PetscReal) end\n\n@for_petsc function TSPseudoSetMaxTimeStep(petsclib::$UnionPetscLib, ts::TS, maxdt::$PetscReal )\n\n    @chk ccall(\n               (:TSPseudoSetMaxTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, maxdt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPseudoIncrementDtFromInitialDt(petsclib::PetscLibType,ts::TS) \nIndicates that a new timestep\nis computed via the formula   dt = initial_dt*initial_fnorm/current_fnorm   rather than the default update,   dt = current_dt*previous_fnorm/current_fnorm.\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the timestep context\n\nOptions Database Key:\n- `-ts_pseudo_increment_dt_from_initial_dt <true,false>` - use the initial dt to determine increment\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoSetTimeStep()`, `TSPseudoTimeStepDefault()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoIncrementDtFromInitialDt\"))\n\"\"\"\nfunction TSPseudoIncrementDtFromInitialDt(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSPseudoIncrementDtFromInitialDt(petsclib::$UnionPetscLib, ts::TS )\n\n    @chk ccall(\n               (:TSPseudoIncrementDtFromInitialDt, $petsc_library),\n               PetscErrorCode,\n               (CTS,),\n               ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSPseudoSetTimeStep(petsclib::PetscLibType,ts::TS, dt::external, ctx::Cvoid) \nSets the user\ncalled at each pseudo-timestep to update the timestep.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - timestep context\n- `dt`  - function to compute timestep\n- `ctx` - [optional] user-defined context for private data required by the function (may be `NULL`)\n\nCalling sequence of `dt`:\n- `ts`    - the `TS` context\n- `newdt` - the newly computed timestep\n- `ctx`   - [optional] user-defined context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSPSEUDO`, `TSPseudoTimeStepDefault()`, `TSPseudoComputeTimeStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoSetTimeStep\"))\n\"\"\"\nfunction TSPseudoSetTimeStep(petsclib::PetscLibType, ts::TS, dt::external, ctx::Cvoid) end\n\n@for_petsc function TSPseudoSetTimeStep(petsclib::$UnionPetscLib, ts::TS, dt::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSPseudoSetTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, external, Ptr{Cvoid}),\n               ts, dt, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewdt::PetscReal = TSPseudoTimeStepDefault(petsclib::PetscLibType,ts::TS, dtctx::Cvoid) \nDefault code to compute pseudo\n\nCollective, No Fortran Support\n\nInput Parameters:\n- `ts`    - the timestep context\n- `dtctx` - unused timestep context\n\nOutput Parameter:\n- `newdt` - the timestep to use for the next step\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSPseudoSetTimeStep()`, `TSPseudoComputeTimeStep()`, `TSPSEUDO`\n\n# External Links\n$(_doc_external(\"Ts/TSPseudoTimeStepDefault\"))\n\"\"\"\nfunction TSPseudoTimeStepDefault(petsclib::PetscLibType, ts::TS, dtctx::Cvoid) end\n\n@for_petsc function TSPseudoTimeStepDefault(petsclib::$UnionPetscLib, ts::TS, dtctx::Cvoid )\n\tnewdt_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSPseudoTimeStepDefault, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}, Ptr{Cvoid}),\n               ts, newdt_, dtctx,\n              )\n\n\tnewdt = newdt_[]\n\n\treturn newdt\nend \n\n\"\"\"\n\tTSMPRKRegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `TSMPRKRegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSMPRK`, `TSMPRKRegister()`, `TSMPRKRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSMPRKRegisterDestroy\"))\n\"\"\"\nfunction TSMPRKRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TSMPRKRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSMPRKRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMPRKInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSMPRK` package. It is called\nfrom `PetscDLLibraryRegister()` when using dynamic libraries, and on the first call to `TSCreate_MPRK()`\nwhen using static libraries.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSMPRK`, `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Ts/TSMPRKInitializePackage\"))\n\"\"\"\nfunction TSMPRKInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSMPRKInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSMPRKInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMPRKFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSMPRK` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSMPRK`, `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Ts/TSMPRKFinalizePackage\"))\n\"\"\"\nfunction TSMPRKFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSMPRKFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSMPRKFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMPRKRegister(petsclib::PetscLibType,name::TSMPRKType, order::PetscInt, sbase::PetscInt, ratio1::PetscInt, ratio2::PetscInt, Asb::Vector{PetscReal}, bsb::Vector{PetscReal}, csb::Vector{PetscReal}, rsb::Vector{PetscInt}, Amb::Vector{PetscReal}, bmb::Vector{PetscReal}, cmb::Vector{PetscReal}, rmb::Vector{PetscInt}, Af::Vector{PetscReal}, bf::Vector{PetscReal}, cf::Vector{PetscReal}) \nregister a `TSMPRK` scheme by providing the entries in the Butcher tableau\n\nNot Collective, but the same schemes should be registered on all processes on which they will be used, No Fortran Support\n\nInput Parameters:\n- `name`   - identifier for method\n- `order`  - approximation order of method\n- `sbase`  - number of stages in the base methods\n- `ratio1` - stepsize ratio at 1st level (e.g. slow/medium)\n- `ratio2` - stepsize ratio at 2nd level (e.g. medium/fast)\n- `Asb`    - stage coefficients for slow components(dimension s*s, row-major)\n- `bsb`    - step completion table for slow components(dimension s)\n- `csb`    - abscissa for slow components(dimension s)\n- `rsb`    - array of flags for repeated stages for slow components (dimension s)\n- `Amb`    - stage coefficients for medium components(dimension s*s, row-major)\n- `bmb`    - step completion table for medium components(dimension s)\n- `cmb`    - abscissa for medium components(dimension s)\n- `rmb`    - array of flags for repeated stages for medium components (dimension s)\n- `Af`     - stage coefficients for fast components(dimension s*s, row-major)\n- `bf`     - step completion table for fast components(dimension s)\n- `cf`     - abscissa for fast components(dimension s)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSMPRK`\n\n# External Links\n$(_doc_external(\"Ts/TSMPRKRegister\"))\n\"\"\"\nfunction TSMPRKRegister(petsclib::PetscLibType, name::TSMPRKType, order::PetscInt, sbase::PetscInt, ratio1::PetscInt, ratio2::PetscInt, Asb::Vector{PetscReal}, bsb::Vector{PetscReal}, csb::Vector{PetscReal}, rsb::Vector{PetscInt}, Amb::Vector{PetscReal}, bmb::Vector{PetscReal}, cmb::Vector{PetscReal}, rmb::Vector{PetscInt}, Af::Vector{PetscReal}, bf::Vector{PetscReal}, cf::Vector{PetscReal}) end\n\n@for_petsc function TSMPRKRegister(petsclib::$UnionPetscLib, name::TSMPRKType, order::$PetscInt, sbase::$PetscInt, ratio1::$PetscInt, ratio2::$PetscInt, Asb::Vector{$PetscReal}, bsb::Vector{$PetscReal}, csb::Vector{$PetscReal}, rsb::Vector{$PetscInt}, Amb::Vector{$PetscReal}, bmb::Vector{$PetscReal}, cmb::Vector{$PetscReal}, rmb::Vector{$PetscInt}, Af::Vector{$PetscReal}, bf::Vector{$PetscReal}, cf::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSMPRKRegister, $petsc_library),\n               PetscErrorCode,\n               (TSMPRKType, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               name, order, sbase, ratio1, ratio2, Asb, bsb, csb, rsb, Amb, bmb, cmb, rmb, Af, bf, cf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMPRKSetType(petsclib::PetscLibType,ts::TS, mprktype::TSMPRKType) \nSet the type of `TSMPRK` scheme\n\nNot Collective\n\nInput Parameters:\n- `ts`       - timestepping context\n- `mprktype` - type of `TSMPRK` scheme\n\nOptions Database Key:\n- `-ts_mprk_type` - <pm2,p2,p3> - select the specific scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMPRKGetType()`, `TSMPRK`, `TSMPRKType`\n\n# External Links\n$(_doc_external(\"Ts/TSMPRKSetType\"))\n\"\"\"\nfunction TSMPRKSetType(petsclib::PetscLibType, ts::TS, mprktype::TSMPRKType) end\n\n@for_petsc function TSMPRKSetType(petsclib::$UnionPetscLib, ts::TS, mprktype::TSMPRKType )\n\n    @chk ccall(\n               (:TSMPRKSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSMPRKType),\n               ts, mprktype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmprktype::TSMPRKType = TSMPRKGetType(petsclib::PetscLibType,ts::TS) \nGet the type of `TSMPRK` scheme\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `mprktype` - type of `TSMPRK` scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMPRK`\n\n# External Links\n$(_doc_external(\"Ts/TSMPRKGetType\"))\n\"\"\"\nfunction TSMPRKGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSMPRKGetType(petsclib::$UnionPetscLib, ts::TS )\n\tmprktype_ = Ref{TSMPRKType}()\n\n    @chk ccall(\n               (:TSMPRKGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSMPRKType}),\n               ts, mprktype_,\n              )\n\n\tmprktype = unsafe_string(mprktype_[])\n\n\treturn mprktype\nend \n\n\"\"\"\n\tTSRosWRegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `TSRosWRegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSRosWRegister()`, `TSRosWRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWRegisterDestroy\"))\n\"\"\"\nfunction TSRosWRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TSRosWRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSRosWRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRosWInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSROSW` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSROSW`, `PetscInitialize()`, `TSRosWFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWInitializePackage\"))\n\"\"\"\nfunction TSRosWInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSRosWInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSRosWInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRosWFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSROSW` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSROSW`, `PetscFinalize()`, `TSRosWInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWFinalizePackage\"))\n\"\"\"\nfunction TSRosWFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSRosWFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSRosWFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRosWRegister(petsclib::PetscLibType,name::TSRosWType, order::PetscInt, s::PetscInt, A::Vector{PetscReal}, Gamma::Vector{PetscReal}, b::Vector{PetscReal}, bembed::Vector{PetscReal}, pinterp::PetscInt, binterpt::Vector{PetscReal}) \nregister a `TSROSW`, Rosenbrock W scheme by providing the entries in the Butcher tableau and optionally embedded approximations and interpolation\n\nNot Collective, but the same schemes should be registered on all processes on which they will be used\n\nInput Parameters:\n- `name`     - identifier for method\n- `order`    - approximation order of method\n- `s`        - number of stages, this is the dimension of the matrices below\n- `A`        - Table of propagated stage coefficients (dimension s*s, row-major), strictly lower triangular\n- `Gamma`    - Table of coefficients in implicit stage equations (dimension s*s, row-major), lower triangular with nonzero diagonal\n- `b`        - Step completion table (dimension s)\n- `bembed`   - Step completion table for a scheme of order one less (dimension s, NULL if no embedded scheme is available)\n- `pinterp`  - Order of the interpolation scheme, equal to the number of columns of binterpt\n- `binterpt` - Coefficients of the interpolation formula (dimension s*pinterp)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSROSW`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWRegister\"))\n\"\"\"\nfunction TSRosWRegister(petsclib::PetscLibType, name::TSRosWType, order::PetscInt, s::PetscInt, A::Vector{PetscReal}, Gamma::Vector{PetscReal}, b::Vector{PetscReal}, bembed::Vector{PetscReal}, pinterp::PetscInt, binterpt::Vector{PetscReal}) end\n\n@for_petsc function TSRosWRegister(petsclib::$UnionPetscLib, name::TSRosWType, order::$PetscInt, s::$PetscInt, A::Vector{$PetscReal}, Gamma::Vector{$PetscReal}, b::Vector{$PetscReal}, bembed::Vector{$PetscReal}, pinterp::$PetscInt, binterpt::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSRosWRegister, $petsc_library),\n               PetscErrorCode,\n               (TSRosWType, $PetscInt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}),\n               name, order, s, A, Gamma, b, bembed, pinterp, binterpt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRosWRegisterRos4(petsclib::PetscLibType,name::TSRosWType, gamma::PetscReal, a2::PetscReal, a3::PetscReal, b3::PetscReal, e4::PetscReal) \nregister a fourth order Rosenbrock scheme by providing parameter choices\n\nNot Collective, but the same schemes should be registered on all processes on which they will be used\n\nInput Parameters:\n- `name`  - identifier for method\n- `gamma` - leading coefficient (diagonal entry)\n- `a2`    - design parameter, see Table 7.2 of {cite}`wanner1996solving`\n- `a3`    - design parameter or `PETSC_DETERMINE` to satisfy one of the order five conditions (Eq 7.22)\n- `b3`    - design parameter, see Table 7.2 of {cite}`wanner1996solving`\n- `e4`    - design parameter for embedded method, see coefficient E4 in ros4.f code from Hairer\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSROSW`, `TSRosWRegister()`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWRegisterRos4\"))\n\"\"\"\nfunction TSRosWRegisterRos4(petsclib::PetscLibType, name::TSRosWType, gamma::PetscReal, a2::PetscReal, a3::PetscReal, b3::PetscReal, e4::PetscReal) end\n\n@for_petsc function TSRosWRegisterRos4(petsclib::$UnionPetscLib, name::TSRosWType, gamma::$PetscReal, a2::$PetscReal, a3::$PetscReal, b3::$PetscReal, e4::$PetscReal )\n\n    @chk ccall(\n               (:TSRosWRegisterRos4, $petsc_library),\n               PetscErrorCode,\n               (TSRosWType, $PetscReal, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               name, gamma, a2, a3, b3, e4,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSRosWSetType(petsclib::PetscLibType,ts::TS, roswtype::TSRosWType) \nSet the type of Rosenbrock\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - timestepping context\n- `roswtype` - type of Rosenbrock-W scheme\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSRosWGetType()`, `TSROSW`, `TSROSW2M`, `TSROSW2P`, `TSROSWRA3PW`, `TSROSWRA34PW2`, `TSROSWRODAS3`, `TSROSWSANDU3`, `TSROSWASSP3P3S1C`, `TSROSWLASSP3P4S2C`, `TSROSWLLSSP3P4S2C`, `TSROSWARK3`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWSetType\"))\n\"\"\"\nfunction TSRosWSetType(petsclib::PetscLibType, ts::TS, roswtype::TSRosWType) end\n\n@for_petsc function TSRosWSetType(petsclib::$UnionPetscLib, ts::TS, roswtype::TSRosWType )\n\n    @chk ccall(\n               (:TSRosWSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSRosWType),\n               ts, roswtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trostype::TSRosWType = TSRosWGetType(petsclib::PetscLibType,ts::TS) \nGet the type of Rosenbrock\n\nLogically Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `rostype` - type of Rosenbrock-W scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSRosWType`, `TSRosWSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWGetType\"))\n\"\"\"\nfunction TSRosWGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSRosWGetType(petsclib::$UnionPetscLib, ts::TS )\n\trostype_ = Ref{TSRosWType}()\n\n    @chk ccall(\n               (:TSRosWGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSRosWType}),\n               ts, rostype_,\n              )\n\n\trostype = unsafe_string(rostype_[])\n\n\treturn rostype\nend \n\n\"\"\"\n\tTSRosWSetRecomputeJacobian(petsclib::PetscLibType,ts::TS, flg::PetscBool) \nSet whether to recompute the Jacobian at each stage. The default is to update the Jacobian once per step.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - timestepping context\n- `flg` - `PETSC_TRUE` to recompute the Jacobian at each stage\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSRosWType`, `TSRosWGetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSRosWSetRecomputeJacobian\"))\n\"\"\"\nfunction TSRosWSetRecomputeJacobian(petsclib::PetscLibType, ts::TS, flg::PetscBool) end\n\n@for_petsc function TSRosWSetRecomputeJacobian(petsclib::$UnionPetscLib, ts::TS, flg::PetscBool )\n\n    @chk ccall(\n               (:TSRosWSetRecomputeJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSIRKTableauCreate(petsclib::PetscLibType,ts::TS, nstages::PetscInt, A::PetscReal, b::PetscReal, c::PetscReal, binterp::PetscReal, A_inv::PetscScalar, A_inv_rowsum::PetscScalar, I_s::PetscScalar) \ncreate the tableau for `TSIRK` and provide the entries\n\nNot Collective\n\nInput Parameters:\n- `ts`           - timestepping context\n- `nstages`      - number of stages, this is the dimension of the matrices below\n- `A`            - stage coefficients (dimension nstages*nstages, row-major)\n- `b`            - step completion table (dimension nstages)\n- `c`            - abscissa (dimension nstages)\n- `binterp`      - coefficients of the interpolation formula (dimension nstages)\n- `A_inv`        - inverse of A (dimension nstages*nstages, row-major)\n- `A_inv_rowsum` - row sum of the inverse of A (dimension nstages)\n- `I_s`          - identity matrix (dimension nstages*nstages)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSIRK`, `TSIRKRegister()`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKTableauCreate\"))\n\"\"\"\nfunction TSIRKTableauCreate(petsclib::PetscLibType, ts::TS, nstages::PetscInt, A::PetscReal, b::PetscReal, c::PetscReal, binterp::PetscReal, A_inv::PetscScalar, A_inv_rowsum::PetscScalar, I_s::PetscScalar) end\n\n@for_petsc function TSIRKTableauCreate(petsclib::$UnionPetscLib, ts::TS, nstages::$PetscInt, A::$PetscReal, b::$PetscReal, c::$PetscReal, binterp::$PetscReal, A_inv::$PetscScalar, A_inv_rowsum::$PetscScalar, I_s::$PetscScalar )\n\n    @chk ccall(\n               (:TSIRKTableauCreate, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscScalar}, Ptr{$PetscScalar}, Ptr{$PetscScalar}),\n               ts, nstages, A, b, c, binterp, A_inv, A_inv_rowsum, I_s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSIRKRegister(petsclib::PetscLibType,sname::String, fnc::external) \nadds a `TSIRK` implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of user-defined IRK scheme\n- `function` - function to create method context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSIRK`, `TSIRKRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKRegister\"))\n\"\"\"\nfunction TSIRKRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function TSIRKRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:TSIRKRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSIRKRegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `TSIRKRegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSIRK`, `TSIRKRegister()`, `TSIRKRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKRegisterDestroy\"))\n\"\"\"\nfunction TSIRKRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TSIRKRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSIRKRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSIRKInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSIRK` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSIRK`, `PetscInitialize()`, `TSIRKFinalizePackage()`, `TSInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKInitializePackage\"))\n\"\"\"\nfunction TSIRKInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSIRKInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSIRKInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSIRKFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSIRK` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSIRK`, `PetscFinalize()`, `TSInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKFinalizePackage\"))\n\"\"\"\nfunction TSIRKFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSIRKFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSIRKFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSIRKSetType(petsclib::PetscLibType,ts::TS, irktype::TSIRKType) \nSet the type of `TSIRK` scheme to use\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - timestepping context\n- `irktype` - type of `TSIRK` scheme\n\nOptions Database Key:\n- `-ts_irk_type <gauss>` - set irk type\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSIRKGetType()`, `TSIRK`, `TSIRKType`, `TSIRKGAUSS`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKSetType\"))\n\"\"\"\nfunction TSIRKSetType(petsclib::PetscLibType, ts::TS, irktype::TSIRKType) end\n\n@for_petsc function TSIRKSetType(petsclib::$UnionPetscLib, ts::TS, irktype::TSIRKType )\n\n    @chk ccall(\n               (:TSIRKSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSIRKType),\n               ts, irktype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tirktype::TSIRKType = TSIRKGetType(petsclib::PetscLibType,ts::TS) \nGet the type of `TSIRK` IMEX scheme being used\n\nLogically Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `irktype` - type of `TSIRK` IMEX scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSIRK`, `TSIRKType`, `TSIRKGAUSS`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKGetType\"))\n\"\"\"\nfunction TSIRKGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSIRKGetType(petsclib::$UnionPetscLib, ts::TS )\n\tirktype_ = Ref{TSIRKType}()\n\n    @chk ccall(\n               (:TSIRKGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSIRKType}),\n               ts, irktype_,\n              )\n\n\tirktype = unsafe_string(irktype_[])\n\n\treturn irktype\nend \n\n\"\"\"\n\tTSIRKSetNumStages(petsclib::PetscLibType,ts::TS, nstages::PetscInt) \nSet the number of stages of `TSIRK` scheme to use\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - timestepping context\n- `nstages` - number of stages of `TSIRK` scheme\n\nOptions Database Key:\n- `-ts_irk_nstages <int>` - set number of stages\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSIRKGetNumStages()`, `TSIRK`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKSetNumStages\"))\n\"\"\"\nfunction TSIRKSetNumStages(petsclib::PetscLibType, ts::TS, nstages::PetscInt) end\n\n@for_petsc function TSIRKSetNumStages(petsclib::$UnionPetscLib, ts::TS, nstages::$PetscInt )\n\n    @chk ccall(\n               (:TSIRKSetNumStages, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, nstages,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSIRKGetNumStages(petsclib::PetscLibType,ts::TS, nstages::PetscInt) \nGet the number of stages of `TSIRK` scheme\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - timestepping context\n- `nstages` - number of stages of `TSIRK` scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSIRKSetNumStages()`, `TSIRK`\n\n# External Links\n$(_doc_external(\"Ts/TSIRKGetNumStages\"))\n\"\"\"\nfunction TSIRKGetNumStages(petsclib::PetscLibType, ts::TS, nstages::PetscInt) end\n\n@for_petsc function TSIRKGetNumStages(petsclib::$UnionPetscLib, ts::TS, nstages::$PetscInt )\n\n    @chk ccall(\n               (:TSIRKGetNumStages, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, nstages,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSDiscGradSetFormulation(petsclib::PetscLibType,ts::TS, Sfunc::external, Ffunc::external, Gfunc::external, ctx::Cvoid) \nSet the construction method for S, F, and grad F from the\nformulation u_t = S(u) \\nabla F(u) for `TSDISCGRAD`\n\nNot Collective\n\nInput Parameters:\n- `ts`    - timestepping context\n- `Sfunc` - constructor for the S matrix from the formulation\n- `Ffunc` - functional F from the formulation\n- `Gfunc` - constructor for the gradient of F from the formulation\n- `ctx`   - optional context for the functions\n\nCalling sequence of `Sfunc`:\n- `ts`   - the integrator\n- `time` - the current time\n- `u`    - the solution\n- `S`    - the S-matrix from the formulation\n- `ctx`  - the user context\n\nCalling sequence of `Ffunc`:\n- `ts`   - the integrator\n- `time` - the current time\n- `u`    - the solution\n- `F`    - the computed function from the formulation\n- `ctx`  - the user context\n\nCalling sequence of `Gfunc`:\n- `ts`   - the integrator\n- `time` - the current time\n- `u`    - the solution\n- `G`    - the gradient of the computed function from the formulation\n- `ctx`  - the user context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSDISCGRAD`, `TSDiscGradGetFormulation()`\n\n# External Links\n$(_doc_external(\"Ts/TSDiscGradSetFormulation\"))\n\"\"\"\nfunction TSDiscGradSetFormulation(petsclib::PetscLibType, ts::TS, Sfunc::external, Ffunc::external, Gfunc::external, ctx::Cvoid) end\n\n@for_petsc function TSDiscGradSetFormulation(petsclib::$UnionPetscLib, ts::TS, Sfunc::external, Ffunc::external, Gfunc::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSDiscGradSetFormulation, $petsc_library),\n               PetscErrorCode,\n               (CTS, external, external, external, Ptr{Cvoid}),\n               ts, Sfunc, Ffunc, Gfunc, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdgtype::TSDGType = TSDiscGradGetType(petsclib::PetscLibType,ts::TS) \nChecks for which discrete gradient to use in formulation for `TSDISCGRAD`\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `dgtype` - Discrete gradient type <none, gonzalez, average>\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSDISCGRAD`, `TSDiscGradSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSDiscGradGetType\"))\n\"\"\"\nfunction TSDiscGradGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSDiscGradGetType(petsclib::$UnionPetscLib, ts::TS )\n\tdgtype_ = Ref{TSDGType}()\n\n    @chk ccall(\n               (:TSDiscGradGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSDGType}),\n               ts, dgtype_,\n              )\n\n\tdgtype = unsafe_string(dgtype_[])\n\n\treturn dgtype\nend \n\n\"\"\"\n\tTSDiscGradSetType(petsclib::PetscLibType,ts::TS, dgtype::TSDGType) \nSets discrete gradient formulation.\n\nNot Collective\n\nInput Parameters:\n- `ts`     - timestepping context\n- `dgtype` - Discrete gradient type <none, gonzalez, average>\n\nOptions Database Key:\n- `-ts_discgrad_type <type>` - flag to choose discrete gradient type\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSDISCGRAD`\n\n# External Links\n$(_doc_external(\"Ts/TSDiscGradSetType\"))\n\"\"\"\nfunction TSDiscGradSetType(petsclib::PetscLibType, ts::TS, dgtype::TSDGType) end\n\n@for_petsc function TSDiscGradSetType(petsclib::$UnionPetscLib, ts::TS, dgtype::TSDGType )\n\n    @chk ccall(\n               (:TSDiscGradSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSDGType),\n               ts, dgtype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsGetIterations(petsclib::PetscLibType,ts::TS, nonlin::Cint, lin::Cint) \nGets the number of nonlinear and linear iterations used so far by `TSSUNDIALS`.\n\nNot Collective\n\nInput Parameter:\n- `ts` - the time-step context\n\nOutput Parameters:\n- `nonlin` - number of nonlinear iterations\n- `lin`    - number of linear iterations\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSundialsSetType()`, `TSSundialsSetMaxl()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetGramSchmidtType()`, `TSSundialsSetTolerance()`,\n`TSSundialsGetPC()`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsGetIterations\"))\n\"\"\"\nfunction TSSundialsGetIterations(petsclib::PetscLibType, ts::TS, nonlin::Cint, lin::Cint) end\n\n@for_petsc function TSSundialsGetIterations(petsclib::$UnionPetscLib, ts::TS, nonlin::Cint, lin::Cint )\n\n    @chk ccall(\n               (:TSSundialsGetIterations, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cint}, Ptr{Cint}),\n               ts, nonlin, lin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetType(petsclib::PetscLibType,ts::TS, type::TSSundialsLmmType) \nSets the method that `TSSUNDIALS` will use for integration.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the time-step context\n- `type` - one of  `SUNDIALS_ADAMS` or `SUNDIALS_BDF`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetMaxl()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetGramSchmidtType()`,\n`TSSundialsSetTolerance()`, `TSSundialsGetPC()`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetType\"))\n\"\"\"\nfunction TSSundialsSetType(petsclib::PetscLibType, ts::TS, type::TSSundialsLmmType) end\n\n@for_petsc function TSSundialsSetType(petsclib::$UnionPetscLib, ts::TS, type::TSSundialsLmmType )\n\n    @chk ccall(\n               (:TSSundialsSetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSSundialsLmmType),\n               ts, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetMaxord(petsclib::PetscLibType,ts::TS, maxord::PetscInt) \nSets the maximum order for BDF/Adams method used by `TSSUNDIALS`.\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - the time-step context\n- `maxord` - maximum order of BDF / Adams method\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetType()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetGramSchmidtType()`,\n`TSSundialsSetTolerance()`, `TSSundialsGetPC()`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetMaxord\"))\n\"\"\"\nfunction TSSundialsSetMaxord(petsclib::PetscLibType, ts::TS, maxord::PetscInt) end\n\n@for_petsc function TSSundialsSetMaxord(petsclib::$UnionPetscLib, ts::TS, maxord::$PetscInt )\n\n    @chk ccall(\n               (:TSSundialsSetMaxord, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, maxord,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetMaxl(petsclib::PetscLibType,ts::TS, maxl::PetscInt) \nSets the dimension of the Krylov space used by\nGMRES in the linear solver in `TSSUNDIALS`. `TSSUNDIALS` DOES NOT use restarted GMRES so\nthis is the maximum number of GMRES steps that will be used.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the time-step context\n- `maxl` - number of direction vectors (the dimension of Krylov subspace).\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetType()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetGramSchmidtType()`, `TSSundialsSetTolerance()`,\n`TSSundialsGetPC()`, `TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetMaxl\"))\n\"\"\"\nfunction TSSundialsSetMaxl(petsclib::PetscLibType, ts::TS, maxl::PetscInt) end\n\n@for_petsc function TSSundialsSetMaxl(petsclib::$UnionPetscLib, ts::TS, maxl::$PetscInt )\n\n    @chk ccall(\n               (:TSSundialsSetMaxl, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, maxl,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetLinearTolerance(petsclib::PetscLibType,ts::TS, tol::PetscReal) \nSets the tolerance used to solve the linear\nsystem by `TSSUNDIALS`.\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - the time-step context\n- `tol` - the factor by which the tolerance on the nonlinear solver is\nmultiplied to get the tolerance on the linear solver, .05 by default.\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetType()`, `TSSundialsSetMaxl()`,\n`TSSundialsSetGramSchmidtType()`, `TSSundialsSetTolerance()`,\n`TSSundialsGetPC()`,\n`TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetLinearTolerance\"))\n\"\"\"\nfunction TSSundialsSetLinearTolerance(petsclib::PetscLibType, ts::TS, tol::PetscReal) end\n\n@for_petsc function TSSundialsSetLinearTolerance(petsclib::$UnionPetscLib, ts::TS, tol::$PetscReal )\n\n    @chk ccall(\n               (:TSSundialsSetLinearTolerance, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, tol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetGramSchmidtType(petsclib::PetscLibType,ts::TS, type::TSSundialsGramSchmidtType) \nSets type of orthogonalization used\nin GMRES method by `TSSUNDIALS` linear solver.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the time-step context\n- `type` - either `SUNDIALS_MODIFIED_GS` or `SUNDIALS_CLASSICAL_GS`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetType()`, `TSSundialsSetMaxl()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetTolerance()`,\n`TSSundialsGetPC()`,\n`TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetGramSchmidtType\"))\n\"\"\"\nfunction TSSundialsSetGramSchmidtType(petsclib::PetscLibType, ts::TS, type::TSSundialsGramSchmidtType) end\n\n@for_petsc function TSSundialsSetGramSchmidtType(petsclib::$UnionPetscLib, ts::TS, type::TSSundialsGramSchmidtType )\n\n    @chk ccall(\n               (:TSSundialsSetGramSchmidtType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSSundialsGramSchmidtType),\n               ts, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetTolerance(petsclib::PetscLibType,ts::TS, aabs::PetscReal, rel::PetscReal) \nSets the absolute and relative tolerance used by\n`TSSUNDIALS` for error control.\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the time-step context\n- `aabs` - the absolute tolerance\n- `rel`  - the relative tolerance\n\nSee the CVODE/SUNDIALS users manual for exact details on these parameters. Essentially\nthese regulate the size of the error for a SINGLE timestep.\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetType()`, `TSSundialsSetGMRESMaxl()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetGramSchmidtType()`,\n`TSSundialsGetPC()`,\n`TSSetExactFinalTime()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetTolerance\"))\n\"\"\"\nfunction TSSundialsSetTolerance(petsclib::PetscLibType, ts::TS, aabs::PetscReal, rel::PetscReal) end\n\n@for_petsc function TSSundialsSetTolerance(petsclib::$UnionPetscLib, ts::TS, aabs::$PetscReal, rel::$PetscReal )\n\n    @chk ccall(\n               (:TSSundialsSetTolerance, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, $PetscReal),\n               ts, aabs, rel,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsGetPC(petsclib::PetscLibType,ts::TS, pc::PC) \nExtract the PC context from a time\n\nInput Parameter:\n- `ts` - the time-step context\n\nOutput Parameter:\n- `pc` - the preconditioner context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetType()`, `TSSundialsSetMaxl()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetGramSchmidtType()`, `TSSundialsSetTolerance()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsGetPC\"))\n\"\"\"\nfunction TSSundialsGetPC(petsclib::PetscLibType, ts::TS, pc::PC) end\n\n@for_petsc function TSSundialsGetPC(petsclib::$UnionPetscLib, ts::TS, pc::PC )\n\n    @chk ccall(\n               (:TSSundialsGetPC, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PC}),\n               ts, pc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetMinTimeStep(petsclib::PetscLibType,ts::TS, mindt::PetscReal) \nSmallest time step to be chosen by the adaptive controller.\n\nInput Parameters:\n- `ts`    - the time-step context\n- `mindt` - lowest time step if positive, negative to deactivate\n\n-seealso: [](ch_ts), `TSSundialsSetType()`, `TSSundialsSetTolerance()`,\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetMinTimeStep\"))\n\"\"\"\nfunction TSSundialsSetMinTimeStep(petsclib::PetscLibType, ts::TS, mindt::PetscReal) end\n\n@for_petsc function TSSundialsSetMinTimeStep(petsclib::$UnionPetscLib, ts::TS, mindt::$PetscReal )\n\n    @chk ccall(\n               (:TSSundialsSetMinTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, mindt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetMaxTimeStep(petsclib::PetscLibType,ts::TS, maxdt::PetscReal) \nLargest time step to be chosen by the adaptive controller.\n\nInput Parameters:\n- `ts`    - the time-step context\n- `maxdt` - lowest time step if positive, negative to deactivate\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSSundialsSetType()`, `TSSundialsSetTolerance()`,\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetMaxTimeStep\"))\n\"\"\"\nfunction TSSundialsSetMaxTimeStep(petsclib::PetscLibType, ts::TS, maxdt::PetscReal) end\n\n@for_petsc function TSSundialsSetMaxTimeStep(petsclib::$UnionPetscLib, ts::TS, maxdt::$PetscReal )\n\n    @chk ccall(\n               (:TSSundialsSetMaxTimeStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, maxdt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsMonitorInternalSteps(petsclib::PetscLibType,ts::TS, ft::PetscBool) \nMonitor `TSSUNDIALS` internal steps (Defaults to false).\n\nInput Parameters:\n- `ts` - the time-step context\n- `ft` - `PETSC_TRUE` if monitor, else `PETSC_FALSE`\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TSSundialsGetIterations()`, `TSSundialsSetType()`, `TSSundialsSetMaxl()`,\n`TSSundialsSetLinearTolerance()`, `TSSundialsSetGramSchmidtType()`, `TSSundialsSetTolerance()`,\n`TSSundialsGetPC()`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsMonitorInternalSteps\"))\n\"\"\"\nfunction TSSundialsMonitorInternalSteps(petsclib::PetscLibType, ts::TS, ft::PetscBool) end\n\n@for_petsc function TSSundialsMonitorInternalSteps(petsclib::$UnionPetscLib, ts::TS, ft::PetscBool )\n\n    @chk ccall(\n               (:TSSundialsMonitorInternalSteps, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, ft,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSundialsSetUseDense(petsclib::PetscLibType,ts::TS, use_dense::PetscBool) \nSet a flag to use a dense linear solver in `TSSUNDIALS` (serial only)\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the time-step context\n- `use_dense` - `PETSC_TRUE` to use the dense solver\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSSUNDIALS`\n\n# External Links\n$(_doc_external(\"Ts/TSSundialsSetUseDense\"))\n\"\"\"\nfunction TSSundialsSetUseDense(petsclib::PetscLibType, ts::TS, use_dense::PetscBool) end\n\n@for_petsc function TSSundialsSetUseDense(petsclib::$UnionPetscLib, ts::TS, use_dense::PetscBool )\n\n    @chk ccall(\n               (:TSSundialsSetUseDense, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, use_dense,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttheta::PetscReal = TSThetaGetTheta(petsclib::PetscLibType,ts::TS) \nGet the abscissa of the stage in (0,1] for `TSTHETA`\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `theta` - stage abscissa\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSThetaSetTheta()`, `TSTHETA`\n\n# External Links\n$(_doc_external(\"Ts/TSThetaGetTheta\"))\n\"\"\"\nfunction TSThetaGetTheta(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSThetaGetTheta(petsclib::$UnionPetscLib, ts::TS )\n\ttheta_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSThetaGetTheta, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}),\n               ts, theta_,\n              )\n\n\ttheta = theta_[]\n\n\treturn theta\nend \n\n\"\"\"\n\tTSThetaSetTheta(petsclib::PetscLibType,ts::TS, theta::PetscReal) \nSet the abscissa of the stage in (0,1]  for `TSTHETA`\n\nNot Collective\n\nInput Parameters:\n- `ts`    - timestepping context\n- `theta` - stage abscissa\n\nOptions Database Key:\n- `-ts_theta_theta <theta>` - set theta\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSThetaGetTheta()`, `TSTHETA`, `TSCN`\n\n# External Links\n$(_doc_external(\"Ts/TSThetaSetTheta\"))\n\"\"\"\nfunction TSThetaSetTheta(petsclib::PetscLibType, ts::TS, theta::PetscReal) end\n\n@for_petsc function TSThetaSetTheta(petsclib::$UnionPetscLib, ts::TS, theta::$PetscReal )\n\n    @chk ccall(\n               (:TSThetaSetTheta, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, theta,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tendpoint::PetscBool = TSThetaGetEndpoint(petsclib::PetscLibType,ts::TS) \nGets whether to use the endpoint variant of the method (e.g. trapezoid/Crank\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `endpoint` - `PETSC_TRUE` when using the endpoint variant\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSThetaSetEndpoint()`, `TSTHETA`, `TSCN`\n\n# External Links\n$(_doc_external(\"Ts/TSThetaGetEndpoint\"))\n\"\"\"\nfunction TSThetaGetEndpoint(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSThetaGetEndpoint(petsclib::$UnionPetscLib, ts::TS )\n\tendpoint_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSThetaGetEndpoint, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{PetscBool}),\n               ts, endpoint_,\n              )\n\n\tendpoint = endpoint_[]\n\n\treturn endpoint\nend \n\n\"\"\"\n\tTSThetaSetEndpoint(petsclib::PetscLibType,ts::TS, flg::PetscBool) \nSets whether to use the endpoint variant of the method (e.g. trapezoid/Crank\n\nNot Collective\n\nInput Parameters:\n- `ts`  - timestepping context\n- `flg` - `PETSC_TRUE` to use the endpoint variant\n\nOptions Database Key:\n- `-ts_theta_endpoint <flg>` - use the endpoint variant\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTHETA`, `TSCN`\n\n# External Links\n$(_doc_external(\"Ts/TSThetaSetEndpoint\"))\n\"\"\"\nfunction TSThetaSetEndpoint(petsclib::PetscLibType, ts::TS, flg::PetscBool) end\n\n@for_petsc function TSThetaSetEndpoint(petsclib::$UnionPetscLib, ts::TS, flg::PetscBool )\n\n    @chk ccall(\n               (:TSThetaSetEndpoint, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLESetType(petsclib::PetscLibType,ts::TS, type::TSGLLEType) \nsets the class of general linear method, `TSGLLE` to use for time\n\nCollective\n\nInput Parameters:\n- `ts`   - the `TS` context\n- `type` - a method\n\nOptions Database Key:\n- `-ts_gl_type <type>` - sets the method, use -help for a list of available method (e.g. irks)\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGLLEType`, `TSGLLE`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLESetType\"))\n\"\"\"\nfunction TSGLLESetType(petsclib::PetscLibType, ts::TS, type::TSGLLEType) end\n\n@for_petsc function TSGLLESetType(petsclib::$UnionPetscLib, ts::TS, type::TSGLLEType )\n\n    @chk ccall(\n               (:TSGLLESetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSGLLEType),\n               ts, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLESetAcceptType(petsclib::PetscLibType,ts::TS, type::TSGLLEAcceptType) \nsets the acceptance test for `TSGLLE`\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - the `TS` context\n- `type` - the type\n\nOptions Database Key:\n- `-ts_gl_accept_type <type>` - sets the method used to determine whether to accept or reject a step\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSGLLE`, `TSGLLEAcceptRegister()`, `TSGLLEAdapt`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLESetAcceptType\"))\n\"\"\"\nfunction TSGLLESetAcceptType(petsclib::PetscLibType, ts::TS, type::TSGLLEAcceptType) end\n\n@for_petsc function TSGLLESetAcceptType(petsclib::$UnionPetscLib, ts::TS, type::TSGLLEAcceptType )\n\n    @chk ccall(\n               (:TSGLLESetAcceptType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSGLLEAcceptType),\n               ts, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEGetAdapt(petsclib::PetscLibType,ts::TS, adapt::TSGLLEAdapt) \ngets the `TSGLLEAdapt` object from the `TS`\n\nNot Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `adapt` - the `TSGLLEAdapt` context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGLLE`, `TSGLLEAdapt`, `TSGLLEAdaptRegister()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLEGetAdapt\"))\n\"\"\"\nfunction TSGLLEGetAdapt(petsclib::PetscLibType, ts::TS, adapt::TSGLLEAdapt) end\n\n@for_petsc function TSGLLEGetAdapt(petsclib::$UnionPetscLib, ts::TS, adapt::TSGLLEAdapt )\n\n    @chk ccall(\n               (:TSGLLEGetAdapt, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSGLLEAdapt}),\n               ts, adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLERegister(petsclib::PetscLibType,sname::String, fnc::external) \nadds a `TSGLLE` implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of user-defined general linear scheme\n- `function` - routine to create method context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGLLE`, `TSGLLEType`, `TSGLLERegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLERegister\"))\n\"\"\"\nfunction TSGLLERegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function TSGLLERegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:TSGLLERegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAcceptRegister(petsclib::PetscLibType,sname::String, fnc::TSGLLEAcceptFn) \nadds a `TSGLLE` acceptance scheme\n\nNot Collective\n\nInput Parameters:\n- `sname`    - name of user-defined acceptance scheme\n- `function` - routine to create method context, see `TSGLLEAcceptFn` for the calling sequence\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGLLE`, `TSGLLEType`, `TSGLLERegisterAll()`, `TSGLLEAcceptFn`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAcceptRegister\"))\n\"\"\"\nfunction TSGLLEAcceptRegister(petsclib::PetscLibType, sname::String, fnc::TSGLLEAcceptFn) end\n\n@for_petsc function TSGLLEAcceptRegister(petsclib::$UnionPetscLib, sname::String, fnc::TSGLLEAcceptFn )\n\n    @chk ccall(\n               (:TSGLLEAcceptRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, Ptr{TSGLLEAcceptFn}),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSGLLE` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`, `TSInitializePackage()`, `TSGLLEFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLEInitializePackage\"))\n\"\"\"\nfunction TSGLLEInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSGLLEInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLLEInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSGLLE` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`, `TSGLLEInitializePackage()`, `TSInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLEFinalizePackage\"))\n\"\"\"\nfunction TSGLLEFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSGLLEFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLLEFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAlpha2SetPredictor(petsclib::PetscLibType,ts::TS, predictor::TSAlpha2PredictorFn, ctx::Cvoid) \nsets the callback for computing a predictor (i.e., initial guess\nfor the nonlinear solver).\n\nInput Parameters:\n- `ts`        - timestepping context\n- `predictor` - callback to set the predictor in each step\n- `ctx`       - the application context, which may be set to `NULL` if not used\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSALPHA2`, `TSAlpha2PredictorFn`\n\n# External Links\n$(_doc_external(\"Ts/TSAlpha2SetPredictor\"))\n\"\"\"\nfunction TSAlpha2SetPredictor(petsclib::PetscLibType, ts::TS, predictor::TSAlpha2PredictorFn, ctx::Cvoid) end\n\n@for_petsc function TSAlpha2SetPredictor(petsclib::$UnionPetscLib, ts::TS, predictor::TSAlpha2PredictorFn, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSAlpha2SetPredictor, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSAlpha2PredictorFn}, Ptr{Cvoid}),\n               ts, predictor, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAlpha2SetRadius(petsclib::PetscLibType,ts::TS, radius::PetscReal) \nsets the desired spectral radius of the method for `TSALPHA2`\n(i.e. high-frequency numerical damping)\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - timestepping context\n- `radius` - the desired spectral radius\n\nOptions Database Key:\n- `-ts_alpha_radius <radius>` - set the desired spectral radius\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSALPHA2`, `TSAlpha2SetParams()`, `TSAlpha2GetParams()`\n\n# External Links\n$(_doc_external(\"Ts/TSAlpha2SetRadius\"))\n\"\"\"\nfunction TSAlpha2SetRadius(petsclib::PetscLibType, ts::TS, radius::PetscReal) end\n\n@for_petsc function TSAlpha2SetRadius(petsclib::$UnionPetscLib, ts::TS, radius::$PetscReal )\n\n    @chk ccall(\n               (:TSAlpha2SetRadius, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, radius,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAlpha2SetParams(petsclib::PetscLibType,ts::TS, alpha_m::PetscReal, alpha_f::PetscReal, gamma::PetscReal, beta::PetscReal) \nsets the algorithmic parameters for `TSALPHA2`\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - timestepping context\n- `alpha_m` - algorithmic parameter\n- `alpha_f` - algorithmic parameter\n- `gamma`   - algorithmic parameter\n- `beta`    - algorithmic parameter\n\nOptions Database Keys:\n- `-ts_alpha_alpha_m <alpha_m>` - set alpha_m\n- `-ts_alpha_alpha_f <alpha_f>` - set alpha_f\n- `-ts_alpha_gamma   <gamma>`   - set gamma\n- `-ts_alpha_beta    <beta>`    - set beta\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSALPHA2`, `TSAlpha2SetRadius()`, `TSAlpha2GetParams()`\n\n# External Links\n$(_doc_external(\"Ts/TSAlpha2SetParams\"))\n\"\"\"\nfunction TSAlpha2SetParams(petsclib::PetscLibType, ts::TS, alpha_m::PetscReal, alpha_f::PetscReal, gamma::PetscReal, beta::PetscReal) end\n\n@for_petsc function TSAlpha2SetParams(petsclib::$UnionPetscLib, ts::TS, alpha_m::$PetscReal, alpha_f::$PetscReal, gamma::$PetscReal, beta::$PetscReal )\n\n    @chk ccall(\n               (:TSAlpha2SetParams, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               ts, alpha_m, alpha_f, gamma, beta,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\talpha_m::PetscReal,alpha_f::PetscReal,gamma::PetscReal,beta::PetscReal = TSAlpha2GetParams(petsclib::PetscLibType,ts::TS) \ngets the algorithmic parameters for `TSALPHA2`\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameters:\n- `alpha_m` - algorithmic parameter\n- `alpha_f` - algorithmic parameter\n- `gamma`   - algorithmic parameter\n- `beta`    - algorithmic parameter\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSALPHA2`, `TSAlpha2SetRadius()`, `TSAlpha2SetParams()`\n\n# External Links\n$(_doc_external(\"Ts/TSAlpha2GetParams\"))\n\"\"\"\nfunction TSAlpha2GetParams(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAlpha2GetParams(petsclib::$UnionPetscLib, ts::TS )\n\talpha_m_ = Ref{$PetscReal}()\n\talpha_f_ = Ref{$PetscReal}()\n\tgamma_ = Ref{$PetscReal}()\n\tbeta_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAlpha2GetParams, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ts, alpha_m_, alpha_f_, gamma_, beta_,\n              )\n\n\talpha_m = alpha_m_[]\n\talpha_f = alpha_f_[]\n\tgamma = gamma_[]\n\tbeta = beta_[]\n\n\treturn alpha_m,alpha_f,gamma,beta\nend \n\n\"\"\"\n\tTSAlphaSetRadius(petsclib::PetscLibType,ts::TS, radius::PetscReal) \nsets the desired spectral radius of the method for `TSALPHA`\n(i.e. high-frequency numerical damping)\n\nLogically Collective\n\nInput Parameters:\n- `ts`     - timestepping context\n- `radius` - the desired spectral radius\n\nOptions Database Key:\n- `-ts_alpha_radius <radius>` - set alpha radius\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSALPHA`, `TSAlphaSetParams()`, `TSAlphaGetParams()`\n\n# External Links\n$(_doc_external(\"Ts/TSAlphaSetRadius\"))\n\"\"\"\nfunction TSAlphaSetRadius(petsclib::PetscLibType, ts::TS, radius::PetscReal) end\n\n@for_petsc function TSAlphaSetRadius(petsclib::$UnionPetscLib, ts::TS, radius::$PetscReal )\n\n    @chk ccall(\n               (:TSAlphaSetRadius, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, radius,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAlphaSetParams(petsclib::PetscLibType,ts::TS, alpha_m::PetscReal, alpha_f::PetscReal, gamma::PetscReal) \nsets the algorithmic parameters for `TSALPHA`\n\nLogically Collective\n\nInput Parameters:\n- `ts`      - timestepping context\n- `alpha_m` - algorithmic parameter\n- `alpha_f` - algorithmic parameter\n- `gamma`   - algorithmic parameter\n\nOptions Database Keys:\n- `-ts_alpha_alpha_m <alpha_m>` - set alpha_m\n- `-ts_alpha_alpha_f <alpha_f>` - set alpha_f\n- `-ts_alpha_gamma   <gamma>`   - set gamma\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSALPHA`, `TSAlphaSetRadius()`, `TSAlphaGetParams()`\n\n# External Links\n$(_doc_external(\"Ts/TSAlphaSetParams\"))\n\"\"\"\nfunction TSAlphaSetParams(petsclib::PetscLibType, ts::TS, alpha_m::PetscReal, alpha_f::PetscReal, gamma::PetscReal) end\n\n@for_petsc function TSAlphaSetParams(petsclib::$UnionPetscLib, ts::TS, alpha_m::$PetscReal, alpha_f::$PetscReal, gamma::$PetscReal )\n\n    @chk ccall(\n               (:TSAlphaSetParams, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, $PetscReal, $PetscReal),\n               ts, alpha_m, alpha_f, gamma,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\talpha_m::PetscReal,alpha_f::PetscReal,gamma::PetscReal = TSAlphaGetParams(petsclib::PetscLibType,ts::TS) \ngets the algorithmic parameters for `TSALPHA`\n\nNot Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameters:\n- `alpha_m` - algorithmic parameter\n- `alpha_f` - algorithmic parameter\n- `gamma`   - algorithmic parameter\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSALPHA`, `TSAlphaSetRadius()`, `TSAlphaSetParams()`\n\n# External Links\n$(_doc_external(\"Ts/TSAlphaGetParams\"))\n\"\"\"\nfunction TSAlphaGetParams(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSAlphaGetParams(petsclib::$UnionPetscLib, ts::TS )\n\talpha_m_ = Ref{$PetscReal}()\n\talpha_f_ = Ref{$PetscReal}()\n\tgamma_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAlphaGetParams, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ts, alpha_m_, alpha_f_, gamma_,\n              )\n\n\talpha_m = alpha_m_[]\n\talpha_f = alpha_f_[]\n\tgamma = gamma_[]\n\n\treturn alpha_m,alpha_f,gamma\nend \n\n\"\"\"\n\tTSGLEERegisterAll(petsclib::PetscLibType) \nRegisters all of the General Linear with Error Estimation methods in `TSGLEE`\n\nNot Collective, but should be called by all processes which will need the schemes to be registered\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGLEERegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLEERegisterAll\"))\n\"\"\"\nfunction TSGLEERegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function TSGLEERegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLEERegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLEERegisterDestroy(petsclib::PetscLibType) \nFrees the list of schemes that were registered by `TSGLEERegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGLEERegister()`, `TSGLEERegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLEERegisterDestroy\"))\n\"\"\"\nfunction TSGLEERegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TSGLEERegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLEERegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLEEInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSGLEE` package. It is called\nfrom `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLEEInitializePackage\"))\n\"\"\"\nfunction TSGLEEInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSGLEEInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLEEInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLEEFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSGLEE` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLEEFinalizePackage\"))\n\"\"\"\nfunction TSGLEEFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSGLEEFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLEEFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLEERegister(petsclib::PetscLibType,name::TSGLEEType, order::PetscInt, s::PetscInt, r::PetscInt, gamma::PetscReal, A::Vector{PetscReal}, B::Vector{PetscReal}, U::Vector{PetscReal}, V::Vector{PetscReal}, S::Vector{PetscReal}, F::Vector{PetscReal}, c::Vector{PetscReal}, Fembed::Vector{PetscReal}, Ferror::Vector{PetscReal}, Serror::Vector{PetscReal}, pinterp::PetscInt, binterp::Vector{PetscReal}) \nregister a new `TSGLEE` scheme by providing the entries in the Butcher tableau\n\nNot Collective, but the same schemes should be registered on all processes on which they will be used, No Fortran Support\n\nInput Parameters:\n- `name`    - identifier for method\n- `order`   - order of method\n- `s`       - number of stages\n- `r`       - number of steps\n- `gamma`   - LTE ratio\n- `A`       - stage coefficients (dimension s*s, row-major)\n- `B`       - step completion coefficients (dimension r*s, row-major)\n- `U`       - method coefficients (dimension s*r, row-major)\n- `V`       - method coefficients (dimension r*r, row-major)\n- `S`       - starting coefficients\n- `F`       - finishing coefficients\n- `c`       - abscissa (dimension s; NULL to use row sums of A)\n- `Fembed`  - step completion coefficients for embedded method\n- `Ferror`  - error computation coefficients\n- `Serror`  - error initialization coefficients\n- `pinterp` - order of interpolation (0 if unavailable)\n- `binterp` - array of interpolation coefficients (NULL if unavailable)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGLEE`\n\n# External Links\n$(_doc_external(\"Ts/TSGLEERegister\"))\n\"\"\"\nfunction TSGLEERegister(petsclib::PetscLibType, name::TSGLEEType, order::PetscInt, s::PetscInt, r::PetscInt, gamma::PetscReal, A::Vector{PetscReal}, B::Vector{PetscReal}, U::Vector{PetscReal}, V::Vector{PetscReal}, S::Vector{PetscReal}, F::Vector{PetscReal}, c::Vector{PetscReal}, Fembed::Vector{PetscReal}, Ferror::Vector{PetscReal}, Serror::Vector{PetscReal}, pinterp::PetscInt, binterp::Vector{PetscReal}) end\n\n@for_petsc function TSGLEERegister(petsclib::$UnionPetscLib, name::TSGLEEType, order::$PetscInt, s::$PetscInt, r::$PetscInt, gamma::$PetscReal, A::Vector{$PetscReal}, B::Vector{$PetscReal}, U::Vector{$PetscReal}, V::Vector{$PetscReal}, S::Vector{$PetscReal}, F::Vector{$PetscReal}, c::Vector{$PetscReal}, Fembed::Vector{$PetscReal}, Ferror::Vector{$PetscReal}, Serror::Vector{$PetscReal}, pinterp::$PetscInt, binterp::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSGLEERegister, $petsc_library),\n               PetscErrorCode,\n               (TSGLEEType, $PetscInt, $PetscInt, $PetscInt, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, Ptr{$PetscReal}),\n               name, order, s, r, gamma, A, B, U, V, S, F, c, Fembed, Ferror, Serror, pinterp, binterp,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLEESetType(petsclib::PetscLibType,ts::TS, gleetype::TSGLEEType) \nSet the type of `TSGLEE` scheme\n\nLogically Collective\n\nInput Parameters:\n- `ts`       - timestepping context\n- `gleetype` - type of `TSGLEE` scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSGLEEGetType()`, `TSGLEE`\n\n# External Links\n$(_doc_external(\"Ts/TSGLEESetType\"))\n\"\"\"\nfunction TSGLEESetType(petsclib::PetscLibType, ts::TS, gleetype::TSGLEEType) end\n\n@for_petsc function TSGLEESetType(petsclib::$UnionPetscLib, ts::TS, gleetype::TSGLEEType )\n\n    @chk ccall(\n               (:TSGLEESetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, TSGLEEType),\n               ts, gleetype,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tgleetype::TSGLEEType = TSGLEEGetType(petsclib::PetscLibType,ts::TS) \nGet the type of `TSGLEE` scheme\n\nLogically Collective\n\nInput Parameter:\n- `ts` - timestepping context\n\nOutput Parameter:\n- `gleetype` - type of `TSGLEE` scheme\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSGLEE`, `TSGLEESetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLEEGetType\"))\n\"\"\"\nfunction TSGLEEGetType(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGLEEGetType(petsclib::$UnionPetscLib, ts::TS )\n\tgleetype_ = Ref{TSGLEEType}()\n\n    @chk ccall(\n               (:TSGLEEGetType, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSGLEEType}),\n               ts, gleetype_,\n              )\n\n\tgleetype = unsafe_string(gleetype_[])\n\n\treturn gleetype\nend \n\n\"\"\"\n\tTSEIMEXSetMaxRows(petsclib::PetscLibType,ts::TS, nrows::PetscInt) \nSet the maximum number of rows for `TSEIMEX` schemes\n\nLogically Collective\n\nInput Parameters:\n- `ts`    - timestepping context\n- `nrows` - maximum number of rows\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSEIMEXSetRowCol()`, `TSEIMEXSetOrdAdapt()`, `TSEIMEX`\n\n# External Links\n$(_doc_external(\"Ts/TSEIMEXSetMaxRows\"))\n\"\"\"\nfunction TSEIMEXSetMaxRows(petsclib::PetscLibType, ts::TS, nrows::PetscInt) end\n\n@for_petsc function TSEIMEXSetMaxRows(petsclib::$UnionPetscLib, ts::TS, nrows::$PetscInt )\n\n    @chk ccall(\n               (:TSEIMEXSetMaxRows, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt),\n               ts, nrows,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSEIMEXSetRowCol(petsclib::PetscLibType,ts::TS, row::PetscInt, col::PetscInt) \nSet the number of rows and the number of columns for the tableau that represents the T solution in the `TSEIMEX` scheme\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - timestepping context\n- `row` - the row\n- `col` - the column\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSEIMEXSetMaxRows()`, `TSEIMEXSetOrdAdapt()`, `TSEIMEX`\n\n# External Links\n$(_doc_external(\"Ts/TSEIMEXSetRowCol\"))\n\"\"\"\nfunction TSEIMEXSetRowCol(petsclib::PetscLibType, ts::TS, row::PetscInt, col::PetscInt) end\n\n@for_petsc function TSEIMEXSetRowCol(petsclib::$UnionPetscLib, ts::TS, row::$PetscInt, col::$PetscInt )\n\n    @chk ccall(\n               (:TSEIMEXSetRowCol, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscInt),\n               ts, row, col,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSEIMEXSetOrdAdapt(petsclib::PetscLibType,ts::TS, flg::PetscBool) \nSet the order adaptativity for the `TSEIMEX` schemes\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - timestepping context\n- `flg` - index in the T table\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSEIMEXSetRowCol()`, `TSEIMEX`\n\n# External Links\n$(_doc_external(\"Ts/TSEIMEXSetOrdAdapt\"))\n\"\"\"\nfunction TSEIMEXSetOrdAdapt(petsclib::PetscLibType, ts::TS, flg::PetscBool) end\n\n@for_petsc function TSEIMEXSetOrdAdapt(petsclib::$UnionPetscLib, ts::TS, flg::PetscBool )\n\n    @chk ccall(\n               (:TSEIMEXSetOrdAdapt, $petsc_library),\n               PetscErrorCode,\n               (CTS, PetscBool),\n               ts, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorDMDARayDestroy(petsclib::PetscLibType,mctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDMDARayDestroy\"))\n\"\"\"\nfunction TSMonitorDMDARayDestroy(petsclib::PetscLibType, mctx::Cvoid) end\n\n@for_petsc function TSMonitorDMDARayDestroy(petsclib::$UnionPetscLib, mctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorDMDARayDestroy, $petsc_library),\n               PetscErrorCode,\n               (Cvoid,),\n               mctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorDMDARay(petsclib::PetscLibType,ts::TS, steps::PetscInt, time::PetscReal, u::PetscVec, mctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDMDARay\"))\n\"\"\"\nfunction TSMonitorDMDARay(petsclib::PetscLibType, ts::TS, steps::PetscInt, time::PetscReal, u::PetscVec, mctx::Cvoid) end\n\n@for_petsc function TSMonitorDMDARay(petsclib::$UnionPetscLib, ts::TS, steps::$PetscInt, time::$PetscReal, u::PetscVec, mctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorDMDARay, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, steps, time, u, mctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGDMDARay(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGDMDARay\"))\n\"\"\"\nfunction TSMonitorLGDMDARay(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, ctx::Cvoid) end\n\n@for_petsc function TSMonitorLGDMDARay(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGDMDARay, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetPostEventStep(petsclib::PetscLibType,ts::TS, dt1::PetscReal) \nSet the first time step to use after the event\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - time integration context\n- `dt1` - first post event step\n\nOptions Database Key:\n- `-ts_event_post_event_step <dt1>` - first time step after the event\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSEvent`, `TSSetEventHandler()`, `TSSetPostEventSecondStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetPostEventStep\"))\n\"\"\"\nfunction TSSetPostEventStep(petsclib::PetscLibType, ts::TS, dt1::PetscReal) end\n\n@for_petsc function TSSetPostEventStep(petsclib::$UnionPetscLib, ts::TS, dt1::$PetscReal )\n\n    @chk ccall(\n               (:TSSetPostEventStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, dt1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetPostEventSecondStep(petsclib::PetscLibType,ts::TS, dt2::PetscReal) \nSet the second time step to use after the event\n\nLogically Collective\n\nInput Parameters:\n- `ts`  - time integration context\n- `dt2` - second post event step\n\nOptions Database Key:\n- `-ts_event_post_event_second_step <dt2>` - second time step after the event\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSEvent`, `TSSetEventHandler()`, `TSSetPostEventStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetPostEventSecondStep\"))\n\"\"\"\nfunction TSSetPostEventSecondStep(petsclib::PetscLibType, ts::TS, dt2::PetscReal) end\n\n@for_petsc function TSSetPostEventSecondStep(petsclib::$UnionPetscLib, ts::TS, dt2::$PetscReal )\n\n    @chk ccall(\n               (:TSSetPostEventSecondStep, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal),\n               ts, dt2,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetEventTolerances(petsclib::PetscLibType,ts::TS, tol::PetscReal, vtol::Vector{PetscReal}) \nSet tolerances for event (indicator function) zero crossings\n\nLogically Collective\n\nInput Parameters:\n- `ts`   - time integration context\n- `tol`  - tolerance, `PETSC_CURRENT` to leave the current value\n- `vtol` - array of tolerances or `NULL`, used in preference to `tol` if present\n\nOptions Database Key:\n- `-ts_event_tol <tol>` - tolerance for event (indicator function) zero crossing\n\nLevel: beginner\n\n-seealso: [](ch_ts), `TS`, `TSEvent`, `TSSetEventHandler()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetEventTolerances\"))\n\"\"\"\nfunction TSSetEventTolerances(petsclib::PetscLibType, ts::TS, tol::PetscReal, vtol::Vector{PetscReal}) end\n\n@for_petsc function TSSetEventTolerances(petsclib::$UnionPetscLib, ts::TS, tol::$PetscReal, vtol::Vector{$PetscReal} )\n\n    @chk ccall(\n               (:TSSetEventTolerances, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscReal, Ptr{$PetscReal}),\n               ts, tol, vtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSSetEventHandler(petsclib::PetscLibType,ts::TS, nevents::PetscInt, direction::Vector{PetscInt}, terminate::Vector{PetscBool}, indicator::external, postevent::external, ctx::Cvoid) \nSets functions and parameters used for indicating events and handling them\n\nLogically Collective\n\nInput Parameters:\n- `ts`        - the `TS` context obtained from `TSCreate()`\n- `nevents`   - number of local events (i.e. managed by the given MPI process)\n- `direction` - direction of zero crossing to be detected (one for each local event).\n`-1` => zero crossing in negative direction,\n`+1` => zero crossing in positive direction, `0` => both ways\n- `terminate` - flag to indicate whether time stepping should be terminated after\nan event is detected (one for each local event)\n- `indicator` - callback defininig the user indicator functions whose sign changes (see `direction`) mark presence of the events\n- `postevent` - [optional] user post-event callback; it can change the solution, ODE etc at the time of the event\n- `ctx`       - [optional] user-defined context for private data for the\n`indicator()` and `postevent()` routines (use `NULL` if no\ncontext is desired)\n\nCalling sequence of `indicator`:\n- `ts`     - the `TS` context\n- `t`      - current time\n- `U`      - current solution\n- `fvalue` - output array with values of local indicator functions (length == `nevents`) for time t and state-vector U\n- `ctx`    - the context passed as the final argument to `TSSetEventHandler()`\n\nCalling sequence of `postevent`:\n- `ts`           - the `TS` context\n- `nevents_zero` - number of triggered local events (whose indicator function is marked as crossing zero, and direction is appropriate)\n- `events_zero`  - indices of the triggered local events\n- `t`            - current time\n- `U`            - current solution\n- `forwardsolve` - flag to indicate whether `TS` is doing a forward solve (`PETSC_TRUE`) or adjoint solve (`PETSC_FALSE`)\n- `ctx`          - the context passed as the final argument to `TSSetEventHandler()`\n\nOptions Database Keys:\n- `-ts_event_tol <tol>`                       - tolerance for zero crossing check of indicator functions\n- `-ts_event_monitor`                         - print choices made by event handler\n- `-ts_event_recorder_initial_size <recsize>` - initial size of event recorder\n- `-ts_event_post_event_step <dt1>`           - first time step after event\n- `-ts_event_post_event_second_step <dt2>`    - second time step after event\n- `-ts_event_dt_min <dt>`                     - minimum time step considered for TSEvent\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSEvent`, `TSCreate()`, `TSSetTimeStep()`, `TSSetConvergedReason()`\n\n# External Links\n$(_doc_external(\"Ts/TSSetEventHandler\"))\n\"\"\"\nfunction TSSetEventHandler(petsclib::PetscLibType, ts::TS, nevents::PetscInt, direction::Vector{PetscInt}, terminate::Vector{PetscBool}, indicator::external, postevent::external, ctx::Cvoid) end\n\n@for_petsc function TSSetEventHandler(petsclib::$UnionPetscLib, ts::TS, nevents::$PetscInt, direction::Vector{$PetscInt}, terminate::Vector{PetscBool}, indicator::external, postevent::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TSSetEventHandler, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, Ptr{$PetscInt}, Ptr{PetscBool}, external, external, Ptr{Cvoid}),\n               ts, nevents, direction, terminate, indicator, postevent, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnevents::PetscInt = TSGetNumEvents(petsclib::PetscLibType,ts::TS) \nGet the number of events defined on the given MPI process\n\nLogically Collective\n\nInput Parameter:\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `nevents` - the number of local events on each MPI process\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSEvent`, `TSSetEventHandler()`\n\n# External Links\n$(_doc_external(\"Ts/TSGetNumEvents\"))\n\"\"\"\nfunction TSGetNumEvents(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSGetNumEvents(petsclib::$UnionPetscLib, ts::TS )\n\tnevents_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSGetNumEvents, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{$PetscInt}),\n               ts, nevents_,\n              )\n\n\tnevents = nevents_[]\n\n\treturn nevents\nend \n\n"
  },
  {
    "path": "src/autowrapped/TSaddons_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_TSMonitorDrawCtx end\nconst TSMonitorDrawCtx = Ptr{_n_TSMonitorDrawCtx}\n\nmutable struct _n_TSMonitorLGCtxNetwork end\nconst TSMonitorLGCtxNetwork = Ptr{_n_TSMonitorLGCtxNetwork}\n\nmutable struct _n_TSMonitorEnvelopeCtx end\nconst TSMonitorEnvelopeCtx = Ptr{_n_TSMonitorEnvelopeCtx}\n\nmutable struct _n_TSMonitorSPEigCtx end\nconst TSMonitorSPEigCtx = Ptr{_n_TSMonitorSPEigCtx}\n\nmutable struct _n_TSMonitorSPCtx end\nconst TSMonitorSPCtx = Ptr{_n_TSMonitorSPCtx}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_TSMonitorHGCtx end\nconst TSMonitorHGCtx = Ptr{_n_TSMonitorHGCtx}\n\n# -------------------------------------------------------\n\"\"\"\n\tTSTrajectoryRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds a way of storing trajectories to the `TS` package\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - the name of a new user-defined creation routine\n- `function` - the creation routine itself\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectoryRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryRegister\"))\n\"\"\"\nfunction TSTrajectoryRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function TSTrajectoryRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:TSTrajectoryRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySet(petsclib::PetscLibType,tj::TSTrajectory, ts::TS, stepnum::PetscInt, time::PetscReal, X::PetscVec) \nSets a vector of state in the trajectory object\n\nCollective\n\nInput Parameters:\n- `tj`      - the trajectory object\n- `ts`      - the time stepper object (optional)\n- `stepnum` - the step number\n- `time`    - the current time\n- `X`       - the current solution\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectorySetUp()`, `TSTrajectoryDestroy()`, `TSTrajectorySetType()`, `TSTrajectorySetVariableNames()`, `TSGetTrajectory()`, `TSTrajectoryGet()`, `TSTrajectoryGetVecs()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySet\"))\n\"\"\"\nfunction TSTrajectorySet(petsclib::PetscLibType, tj::TSTrajectory, ts::TS, stepnum::PetscInt, time::PetscReal, X::PetscVec) end\n\n@for_petsc function TSTrajectorySet(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS, stepnum::$PetscInt, time::$PetscReal, X::PetscVec )\n\n    @chk ccall(\n               (:TSTrajectorySet, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS, $PetscInt, $PetscReal, CVec),\n               tj, ts, stepnum, time, X,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsteps::PetscInt = TSTrajectoryGetNumSteps(petsclib::PetscLibType,tj::TSTrajectory) \nReturn the number of steps registered in the `TSTrajectory` via `TSTrajectorySet()`.\n\nNot Collective.\n\nInput Parameter:\n- `tj` - the trajectory object\n\nOutput Parameter:\n- `steps` - the number of steps\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSTrajectorySet()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryGetNumSteps\"))\n\"\"\"\nfunction TSTrajectoryGetNumSteps(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectoryGetNumSteps(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\tsteps_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSTrajectoryGetNumSteps, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, Ptr{$PetscInt}),\n               tj, steps_,\n              )\n\n\tsteps = steps_[]\n\n\treturn steps\nend \n\n\"\"\"\n\ttime::PetscReal = TSTrajectoryGet(petsclib::PetscLibType,tj::TSTrajectory, ts::TS, stepnum::PetscInt) \nUpdates the solution vector of a time stepper object by querying the `TSTrajectory`\n\nCollective\n\nInput Parameters:\n- `tj`      - the trajectory object\n- `ts`      - the time stepper object\n- `stepnum` - the step number\n\nOutput Parameter:\n- `time` - the time associated with the step number\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSSolve()`, `TSTrajectorySetUp()`, `TSTrajectoryDestroy()`, `TSTrajectorySetType()`, `TSTrajectorySetVariableNames()`, `TSGetTrajectory()`, `TSTrajectorySet()`, `TSTrajectoryGetVecs()`, `TSGetSolution()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryGet\"))\n\"\"\"\nfunction TSTrajectoryGet(petsclib::PetscLibType, tj::TSTrajectory, ts::TS, stepnum::PetscInt) end\n\n@for_petsc function TSTrajectoryGet(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS, stepnum::$PetscInt )\n\ttime_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSTrajectoryGet, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS, $PetscInt, Ptr{$PetscReal}),\n               tj, ts, stepnum, time_,\n              )\n\n\ttime = time_[]\n\n\treturn time\nend \n\n\"\"\"\n\ttime::PetscReal = TSTrajectoryGetVecs(petsclib::PetscLibType,tj::TSTrajectory, ts::TS, stepnum::PetscInt, U::PetscVec, Udot::PetscVec) \nReconstructs the vector of state and its time derivative using information from the `TSTrajectory` and, possibly, from the `TS`\n\nCollective\n\nInput Parameters:\n- `tj`      - the trajectory object\n- `ts`      - the time stepper object (optional)\n- `stepnum` - the requested step number\n\nOutput Parameters:\n- `time` - On input time for the step if step number is `PETSC_DECIDE`, on output the time associated with the step number\n- `U`    - state vector (can be `NULL`)\n- `Udot` - time derivative of state vector (can be `NULL`)\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSTrajectory`, `TSTrajectorySetUp()`, `TSTrajectoryDestroy()`, `TSTrajectorySetType()`, `TSTrajectorySetVariableNames()`, `TSGetTrajectory()`, `TSTrajectorySet()`, `TSTrajectoryGet()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryGetVecs\"))\n\"\"\"\nfunction TSTrajectoryGetVecs(petsclib::PetscLibType, tj::TSTrajectory, ts::TS, stepnum::PetscInt, U::PetscVec, Udot::PetscVec) end\n\n@for_petsc function TSTrajectoryGetVecs(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS, stepnum::$PetscInt, U::PetscVec, Udot::PetscVec )\n\ttime_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSTrajectoryGetVecs, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS, $PetscInt, Ptr{$PetscReal}, CVec, CVec),\n               tj, ts, stepnum, time_, U, Udot,\n              )\n\n\ttime = time_[]\n\n\treturn time\nend \n\n\"\"\"\n\tTSTrajectoryViewFromOptions(petsclib::PetscLibType,A::TSTrajectory, obj::PetscObject, name::String) \nView a `TSTrajectory` based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `TSTrajectory` context\n- `obj`  - Optional object that provides prefix used for option name\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectoryView`, `PetscObjectViewFromOptions()`, `TSTrajectoryCreate()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryViewFromOptions\"))\n\"\"\"\nfunction TSTrajectoryViewFromOptions(petsclib::PetscLibType, A::TSTrajectory, obj::PetscObject, name::String) end\n\n@for_petsc function TSTrajectoryViewFromOptions(petsclib::$UnionPetscLib, A::TSTrajectory, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:TSTrajectoryViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectoryView(petsclib::PetscLibType,tj::TSTrajectory, viewer::PetscViewer) \nPrints information about the trajectory object\n\nCollective\n\nInput Parameters:\n- `tj`     - the `TSTrajectory` context obtained from `TSTrajectoryCreate()`\n- `viewer` - visualization context\n\nOptions Database Key:\n- `-ts_trajectory_view` - calls `TSTrajectoryView()` at end of `TSAdjointStep()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSTrajectory`, `PetscViewer`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryView\"))\n\"\"\"\nfunction TSTrajectoryView(petsclib::PetscLibType, tj::TSTrajectory, viewer::PetscViewer) end\n\n@for_petsc function TSTrajectoryView(petsclib::$UnionPetscLib, tj::TSTrajectory, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TSTrajectoryView, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, PetscViewer),\n               tj, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetVariableNames(petsclib::PetscLibType,ctx::TSTrajectory, names::Cchar) \nSets the name of each component in the solution vector so that it may be saved with the trajectory\n\nCollective\n\nInput Parameters:\n- `ctx`   - the trajectory context\n- `names` - the names of the components, final string must be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSGetTrajectory()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetVariableNames\"))\n\"\"\"\nfunction TSTrajectorySetVariableNames(petsclib::PetscLibType, ctx::TSTrajectory, names::Cchar) end\n\n@for_petsc function TSTrajectorySetVariableNames(petsclib::$UnionPetscLib, ctx::TSTrajectory, names::Cchar )\n\n    @chk ccall(\n               (:TSTrajectorySetVariableNames, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, Cchar),\n               ctx, names,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetTransform(petsclib::PetscLibType,tj::TSTrajectory, transform::external, destroy::external, tctx::Cvoid) \nSolution vector will be transformed by provided function before being saved to disk\n\nCollective\n\nInput Parameters:\n- `tj`        - the `TSTrajectory` context\n- `transform` - the transform function\n- `destroy`   - function to destroy the optional context\n- `tctx`      - optional context used by transform function\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectorySetVariableNames()`, `TSTrajectory`, `TSMonitorLGSetTransform()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetTransform\"))\n\"\"\"\nfunction TSTrajectorySetTransform(petsclib::PetscLibType, tj::TSTrajectory, transform::external, destroy::external, tctx::Cvoid) end\n\n@for_petsc function TSTrajectorySetTransform(petsclib::$UnionPetscLib, tj::TSTrajectory, transform::external, destroy::external, tctx::Cvoid )\n\n    @chk ccall(\n               (:TSTrajectorySetTransform, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, external, external, Ptr{Cvoid}),\n               tj, transform, destroy, tctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttj::TSTrajectory = TSTrajectoryCreate(petsclib::PetscLibType,comm::MPI_Comm) \nThis function creates an empty trajectory object used to store the time dependent solution of an ODE/DAE\n\nCollective\n\nInput Parameter:\n- `comm` - the communicator\n\nOutput Parameter:\n- `tj` - the trajectory object\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSTrajectory`, `TSTrajectorySetUp()`, `TSTrajectoryDestroy()`, `TSTrajectorySetType()`, `TSTrajectorySetVariableNames()`, `TSGetTrajectory()`, `TSTrajectorySetKeepFiles()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryCreate\"))\n\"\"\"\nfunction TSTrajectoryCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function TSTrajectoryCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\ttj_ = Ref{TSTrajectory}()\n\n    @chk ccall(\n               (:TSTrajectoryCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{TSTrajectory}),\n               comm, tj_,\n              )\n\n\ttj = tj_[]\n\n\treturn tj\nend \n\n\"\"\"\n\tTSTrajectorySetType(petsclib::PetscLibType,tj::TSTrajectory, ts::TS, type::TSTrajectoryType) \nSets the storage method to be used as in a trajectory\n\nCollective\n\nInput Parameters:\n- `tj`   - the `TSTrajectory` context\n- `ts`   - the `TS` context\n- `type` - a known method\n\nOptions Database Key:\n- `-ts_trajectory_type <type>` - Sets the method; use -help for a list of available methods (for instance, basic)\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TS`, `TSTrajectoryCreate()`, `TSTrajectorySetFromOptions()`, `TSTrajectoryDestroy()`, `TSTrajectoryGetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetType\"))\n\"\"\"\nfunction TSTrajectorySetType(petsclib::PetscLibType, tj::TSTrajectory, ts::TS, type::TSTrajectoryType) end\n\n@for_petsc function TSTrajectorySetType(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS, type::TSTrajectoryType )\n\n    @chk ccall(\n               (:TSTrajectorySetType, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS, TSTrajectoryType),\n               tj, ts, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TSTrajectoryType = TSTrajectoryGetType(petsclib::PetscLibType,tj::TSTrajectory, ts::TS) \nGets the trajectory type\n\nCollective\n\nInput Parameters:\n- `tj` - the `TSTrajectory` context\n- `ts` - the `TS` context\n\nOutput Parameter:\n- `type` - a known method\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSTrajectory`, `TSTrajectoryCreate()`, `TSTrajectorySetFromOptions()`, `TSTrajectoryDestroy()`, `TSTrajectorySetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryGetType\"))\n\"\"\"\nfunction TSTrajectoryGetType(petsclib::PetscLibType, tj::TSTrajectory, ts::TS) end\n\n@for_petsc function TSTrajectoryGetType(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS )\n\ttype_ = Ref{TSTrajectoryType}()\n\n    @chk ccall(\n               (:TSTrajectoryGetType, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS, Ptr{TSTrajectoryType}),\n               tj, ts, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTSTrajectoryRegisterAll(petsclib::PetscLibType) \nRegisters all of the `TSTrajectory` storage schecmes in the `TS` package.\n\nNot Collective\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectoryRegister()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryRegisterAll\"))\n\"\"\"\nfunction TSTrajectoryRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function TSTrajectoryRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSTrajectoryRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectoryReset(petsclib::PetscLibType,tj::TSTrajectory) \nResets a trajectory context\n\nCollective\n\nInput Parameter:\n- `tj` - the `TSTrajectory` context obtained from `TSGetTrajectory()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TS`, `TSTrajectory`, `TSTrajectoryCreate()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryReset\"))\n\"\"\"\nfunction TSTrajectoryReset(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectoryReset(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\n    @chk ccall(\n               (:TSTrajectoryReset, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory,),\n               tj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectoryDestroy(petsclib::PetscLibType,tj::TSTrajectory) \nDestroys a trajectory context\n\nCollective\n\nInput Parameter:\n- `tj` - the `TSTrajectory` context obtained from `TSTrajectoryCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectoryCreate()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryDestroy\"))\n\"\"\"\nfunction TSTrajectoryDestroy(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectoryDestroy(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\n    @chk ccall(\n               (:TSTrajectoryDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSTrajectory},),\n               tj,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetUseHistory(petsclib::PetscLibType,tj::TSTrajectory, flg::PetscBool) \nUse `TSHistory` in `TSTrajectory`\n\nCollective\n\nInput Parameters:\n- `tj`  - the `TSTrajectory` context\n- `flg` - `PETSC_TRUE` to save, `PETSC_FALSE` to disable\n\nOptions Database Key:\n- `-ts_trajectory_use_history` - have it use `TSHistory`\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetUseHistory\"))\n\"\"\"\nfunction TSTrajectorySetUseHistory(petsclib::PetscLibType, tj::TSTrajectory, flg::PetscBool) end\n\n@for_petsc function TSTrajectorySetUseHistory(petsclib::$UnionPetscLib, tj::TSTrajectory, flg::PetscBool )\n\n    @chk ccall(\n               (:TSTrajectorySetUseHistory, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, PetscBool),\n               tj, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetMonitor(petsclib::PetscLibType,tj::TSTrajectory, flg::PetscBool) \nMonitor the schedules generated by the `TSTrajectory` checkpointing controller\n\nCollective\n\nInput Parameters:\n- `tj`  - the `TSTrajectory` context\n- `flg` - `PETSC_TRUE` to active a monitor, `PETSC_FALSE` to disable\n\nOptions Database Key:\n- `-ts_trajectory_monitor` - print `TSTrajectory` information\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetMonitor\"))\n\"\"\"\nfunction TSTrajectorySetMonitor(petsclib::PetscLibType, tj::TSTrajectory, flg::PetscBool) end\n\n@for_petsc function TSTrajectorySetMonitor(petsclib::$UnionPetscLib, tj::TSTrajectory, flg::PetscBool )\n\n    @chk ccall(\n               (:TSTrajectorySetMonitor, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, PetscBool),\n               tj, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetKeepFiles(petsclib::PetscLibType,tj::TSTrajectory, flg::PetscBool) \nKeep the files generated by the `TSTrajectory` once the program is done\n\nCollective\n\nInput Parameters:\n- `tj`  - the `TSTrajectory` context\n- `flg` - `PETSC_TRUE` to save, `PETSC_FALSE` to disable\n\nOptions Database Key:\n- `-ts_trajectory_keep_files` - have it keep the files\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`, `TSTrajectorySetUp()`, `TSTrajectorySetMonitor()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetKeepFiles\"))\n\"\"\"\nfunction TSTrajectorySetKeepFiles(petsclib::PetscLibType, tj::TSTrajectory, flg::PetscBool) end\n\n@for_petsc function TSTrajectorySetKeepFiles(petsclib::$UnionPetscLib, tj::TSTrajectory, flg::PetscBool )\n\n    @chk ccall(\n               (:TSTrajectorySetKeepFiles, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, PetscBool),\n               tj, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetDirname(petsclib::PetscLibType,tj::TSTrajectory, dirname::String) \nSpecify the name of the directory where `TSTrajectory` disk checkpoints are stored.\n\nCollective\n\nInput Parameters:\n- `tj`      - the `TSTrajectory` context\n- `dirname` - the directory name\n\nOptions Database Key:\n- `-ts_trajectory_dirname` - set the directory name\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectorySetFiletemplate()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetDirname\"))\n\"\"\"\nfunction TSTrajectorySetDirname(petsclib::PetscLibType, tj::TSTrajectory, dirname::String) end\n\n@for_petsc function TSTrajectorySetDirname(petsclib::$UnionPetscLib, tj::TSTrajectory, dirname::String )\n\n    @chk ccall(\n               (:TSTrajectorySetDirname, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, Ptr{Cchar}),\n               tj, dirname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetFiletemplate(petsclib::PetscLibType,tj::TSTrajectory, filetemplate::String) \nSpecify the name template for the files storing `TSTrajectory` checkpoints.\n\nCollective\n\nInput Parameters:\n- `tj`           - the `TSTrajectory` context\n- `filetemplate` - the template\n\nOptions Database Key:\n- `-ts_trajectory_file_template` - set the file name template\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectorySetDirname()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetFiletemplate\"))\n\"\"\"\nfunction TSTrajectorySetFiletemplate(petsclib::PetscLibType, tj::TSTrajectory, filetemplate::String) end\n\n@for_petsc function TSTrajectorySetFiletemplate(petsclib::$UnionPetscLib, tj::TSTrajectory, filetemplate::String )\n\n    @chk ccall(\n               (:TSTrajectorySetFiletemplate, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, Ptr{Cchar}),\n               tj, filetemplate,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetFromOptions(petsclib::PetscLibType,tj::TSTrajectory, ts::TS) \nSets various `TSTrajectory` parameters from user options.\n\nCollective\n\nInput Parameters:\n- `tj` - the `TSTrajectory` context obtained from `TSGetTrajectory()`\n- `ts` - the `TS` context\n\nOptions Database Keys:\n- `-ts_trajectory_type <type>`             - basic, memory, singlefile, visualization\n- `-ts_trajectory_keep_files <true,false>` - keep the files generated by the code after the program ends. This is true by default for singlefile and visualization\n- `-ts_trajectory_monitor`                 - print `TSTrajectory` information\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSSetSaveTrajectory()`, `TSTrajectorySetUp()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetFromOptions\"))\n\"\"\"\nfunction TSTrajectorySetFromOptions(petsclib::PetscLibType, tj::TSTrajectory, ts::TS) end\n\n@for_petsc function TSTrajectorySetFromOptions(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS )\n\n    @chk ccall(\n               (:TSTrajectorySetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS),\n               tj, ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetUp(petsclib::PetscLibType,tj::TSTrajectory, ts::TS) \nSets up the internal data structures, e.g. stacks, for the later use\nof a `TS` `TSTrajectory`.\n\nCollective\n\nInput Parameters:\n- `tj` - the `TSTrajectory` context\n- `ts` - the TS context obtained from `TSCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSSetSaveTrajectory()`, `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetUp\"))\n\"\"\"\nfunction TSTrajectorySetUp(petsclib::PetscLibType, tj::TSTrajectory, ts::TS) end\n\n@for_petsc function TSTrajectorySetUp(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS )\n\n    @chk ccall(\n               (:TSTrajectorySetUp, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS),\n               tj, ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectorySetSolutionOnly(petsclib::PetscLibType,tj::TSTrajectory, solution_only::PetscBool) \nTells the trajectory to store just the solution, and not any intermediate stage information\n\nCollective\n\nInput Parameters:\n- `tj`            - the `TSTrajectory` context obtained with `TSGetTrajectory()`\n- `solution_only` - the boolean flag\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSSetSaveTrajectory()`, `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`, `TSTrajectoryGetSolutionOnly()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetSolutionOnly\"))\n\"\"\"\nfunction TSTrajectorySetSolutionOnly(petsclib::PetscLibType, tj::TSTrajectory, solution_only::PetscBool) end\n\n@for_petsc function TSTrajectorySetSolutionOnly(petsclib::$UnionPetscLib, tj::TSTrajectory, solution_only::PetscBool )\n\n    @chk ccall(\n               (:TSTrajectorySetSolutionOnly, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, PetscBool),\n               tj, solution_only,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsolution_only::PetscBool = TSTrajectoryGetSolutionOnly(petsclib::PetscLibType,tj::TSTrajectory) \nGets the value set with `TSTrajectorySetSolutionOnly()`.\n\nLogically Collective\n\nInput Parameter:\n- `tj` - the `TSTrajectory` context\n\nOutput Parameter:\n- `solution_only` - the boolean flag\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSSetSaveTrajectory()`, `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`, `TSTrajectorySetSolutionOnly()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryGetSolutionOnly\"))\n\"\"\"\nfunction TSTrajectoryGetSolutionOnly(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectoryGetSolutionOnly(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\tsolution_only_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSTrajectoryGetSolutionOnly, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, Ptr{PetscBool}),\n               tj, solution_only_,\n              )\n\n\tsolution_only = solution_only_[]\n\n\treturn solution_only\nend \n\n\"\"\"\n\tTSTrajectoryGetUpdatedHistoryVecs(petsclib::PetscLibType,tj::TSTrajectory, ts::TS, time::PetscReal, U::PetscVec, Udot::PetscVec) \nGet updated state and time\n\nCollective\n\nInput Parameters:\n- `tj`   - the `TSTrajectory` context\n- `ts`   - the `TS` solver context\n- `time` - the requested time\n\nOutput Parameters:\n- `U`    - state vector at given time (can be interpolated)\n- `Udot` - time-derivative vector at given time (can be interpolated)\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSSetSaveTrajectory()`, `TSTrajectoryCreate()`, `TSTrajectoryDestroy()`, `TSTrajectoryRestoreUpdatedHistoryVecs()`, `TSTrajectoryGetVecs()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryGetUpdatedHistoryVecs\"))\n\"\"\"\nfunction TSTrajectoryGetUpdatedHistoryVecs(petsclib::PetscLibType, tj::TSTrajectory, ts::TS, time::PetscReal, U::PetscVec, Udot::PetscVec) end\n\n@for_petsc function TSTrajectoryGetUpdatedHistoryVecs(petsclib::$UnionPetscLib, tj::TSTrajectory, ts::TS, time::$PetscReal, U::PetscVec, Udot::PetscVec )\n\tU_ = Ref(U.ptr)\n\tUdot_ = Ref(Udot.ptr)\n\n    @chk ccall(\n               (:TSTrajectoryGetUpdatedHistoryVecs, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, CTS, $PetscReal, Ptr{CVec}, Ptr{CVec}),\n               tj, ts, time, U_, Udot_,\n              )\n\n\tU.ptr = C_NULL\n\tUdot.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectoryRestoreUpdatedHistoryVecs(petsclib::PetscLibType,tj::TSTrajectory, U::PetscVec, Udot::PetscVec) \nRestores updated state and time\n\nCollective\n\nInput Parameters:\n- `tj`   - the `TSTrajectory` context\n- `U`    - state vector at given time (can be interpolated)\n- `Udot` - time-derivative vector at given time (can be interpolated)\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectoryGetUpdatedHistoryVecs()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryRestoreUpdatedHistoryVecs\"))\n\"\"\"\nfunction TSTrajectoryRestoreUpdatedHistoryVecs(petsclib::PetscLibType, tj::TSTrajectory, U::PetscVec, Udot::PetscVec) end\n\n@for_petsc function TSTrajectoryRestoreUpdatedHistoryVecs(petsclib::$UnionPetscLib, tj::TSTrajectory, U::PetscVec, Udot::PetscVec )\n\tU_ = Ref(U.ptr)\n\tUdot_ = Ref(Udot.ptr)\n\n    @chk ccall(\n               (:TSTrajectoryRestoreUpdatedHistoryVecs, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, Ptr{CVec}, Ptr{CVec}),\n               tj, U_, Udot_,\n              )\n\n\tU.ptr = C_NULL\n\tUdot.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSTrajectoryMemorySetType(petsclib::PetscLibType,tj::TSTrajectory, tj_memory_type::TSTrajectoryMemoryType) \nsets the software that is used to generate the checkpointing schedule.\n\nLogically Collective\n\nInput Parameters:\n- `tj`             - the `TSTrajectory` context\n- `tj_memory_type` - Revolve or CAMS\n\nOptions Database Key:\n- `-ts_trajectory_memory_type <tj_memory_type>` - petsc, revolve, cams\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectorySetMaxUnitsRAM()`, `TSTrajectoryMemoryType`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectoryMemorySetType\"))\n\"\"\"\nfunction TSTrajectoryMemorySetType(petsclib::PetscLibType, tj::TSTrajectory, tj_memory_type::TSTrajectoryMemoryType) end\n\n@for_petsc function TSTrajectoryMemorySetType(petsclib::$UnionPetscLib, tj::TSTrajectory, tj_memory_type::TSTrajectoryMemoryType )\n\n    @chk ccall(\n               (:TSTrajectoryMemorySetType, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, TSTrajectoryMemoryType),\n               tj, tj_memory_type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmax_cps_ram::PetscInt = TSTrajectorySetMaxCpsRAM(petsclib::PetscLibType,tj::TSTrajectory) \nSet maximum number of checkpoints in RAM\n\nLogically Collective\n\nInput Parameter:\n- `tj` - tstrajectory context\n\nOutput Parameter:\n- `max_cps_ram` - maximum number of checkpoints in RAM\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectorySetMaxUnitsRAM()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetMaxCpsRAM\"))\n\"\"\"\nfunction TSTrajectorySetMaxCpsRAM(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectorySetMaxCpsRAM(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\tmax_cps_ram_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSTrajectorySetMaxCpsRAM, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, $PetscInt),\n               tj, max_cps_ram_,\n              )\n\n\tmax_cps_ram = max_cps_ram_[]\n\n\treturn max_cps_ram\nend \n\n\"\"\"\n\tmax_cps_disk::PetscInt = TSTrajectorySetMaxCpsDisk(petsclib::PetscLibType,tj::TSTrajectory) \nSet maximum number of checkpoints on disk\n\nLogically Collective\n\nInput Parameter:\n- `tj` - tstrajectory context\n\nOutput Parameter:\n- `max_cps_disk` - maximum number of checkpoints on disk\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectorySetMaxUnitsDisk()`, `TSTrajectorySetMaxUnitsRAM()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetMaxCpsDisk\"))\n\"\"\"\nfunction TSTrajectorySetMaxCpsDisk(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectorySetMaxCpsDisk(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\tmax_cps_disk_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSTrajectorySetMaxCpsDisk, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, $PetscInt),\n               tj, max_cps_disk_,\n              )\n\n\tmax_cps_disk = max_cps_disk_[]\n\n\treturn max_cps_disk\nend \n\n\"\"\"\n\tmax_units_ram::PetscInt = TSTrajectorySetMaxUnitsRAM(petsclib::PetscLibType,tj::TSTrajectory) \nSet maximum number of checkpointing units in RAM\n\nLogically Collective\n\nInput Parameter:\n- `tj` - tstrajectory context\n\nOutput Parameter:\n- `max_units_ram` - maximum number of checkpointing units in RAM\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectorySetMaxCpsRAM()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetMaxUnitsRAM\"))\n\"\"\"\nfunction TSTrajectorySetMaxUnitsRAM(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectorySetMaxUnitsRAM(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\tmax_units_ram_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSTrajectorySetMaxUnitsRAM, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, $PetscInt),\n               tj, max_units_ram_,\n              )\n\n\tmax_units_ram = max_units_ram_[]\n\n\treturn max_units_ram\nend \n\n\"\"\"\n\tmax_units_disk::PetscInt = TSTrajectorySetMaxUnitsDisk(petsclib::PetscLibType,tj::TSTrajectory) \nSet maximum number of checkpointing units on disk\n\nLogically Collective\n\nInput Parameter:\n- `tj` - tstrajectory context\n\nOutput Parameter:\n- `max_units_disk` - maximum number of checkpointing units on disk\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSTrajectory`, `TSTrajectorySetMaxCpsDisk()`\n\n# External Links\n$(_doc_external(\"Ts/TSTrajectorySetMaxUnitsDisk\"))\n\"\"\"\nfunction TSTrajectorySetMaxUnitsDisk(petsclib::PetscLibType, tj::TSTrajectory) end\n\n@for_petsc function TSTrajectorySetMaxUnitsDisk(petsclib::$UnionPetscLib, tj::TSTrajectory )\n\tmax_units_disk_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TSTrajectorySetMaxUnitsDisk, $petsc_library),\n               PetscErrorCode,\n               (TSTrajectory, $PetscInt),\n               tj, max_units_disk_,\n              )\n\n\tmax_units_disk = max_units_disk_[]\n\n\treturn max_units_disk\nend \n\n\"\"\"\n\tTSMonitorDrawCtxDestroy(petsclib::PetscLibType,ictx::TSMonitorDrawCtx) \nDestroys the monitor context for `TSMonitorDrawSolution()`\n\nCollective\n\nInput Parameter:\n- `ictx` - the monitor context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorDrawSolution()`, `TSMonitorDrawError()`, `TSMonitorDrawCtx`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDrawCtxDestroy\"))\n\"\"\"\nfunction TSMonitorDrawCtxDestroy(petsclib::PetscLibType, ictx::TSMonitorDrawCtx) end\n\n@for_petsc function TSMonitorDrawCtxDestroy(petsclib::$UnionPetscLib, ictx::TSMonitorDrawCtx )\n\n    @chk ccall(\n               (:TSMonitorDrawCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorDrawCtx},),\n               ictx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::TSMonitorDrawCtx = TSMonitorDrawCtxCreate(petsclib::PetscLibType,comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) \nCreates the monitor context for `TSMonitorDrawCtx`\n\nCollective\n\nInput Parameters:\n- `comm`     - the MPI communicator to use\n- `host`     - the X display to open, or `NULL` for the local machine\n- `label`    - the title to put in the title bar\n- `x`        - the x screen coordinates of the upper left coordinate of the window\n- `y`        - the y screen coordinates of the upper left coordinate of the window\n- `m`        - the screen width in pixels\n- `n`        - the screen height in pixels\n- `howoften` - if positive then determines the frequency of the plotting, if -1 then only at the final time\n\nOutput Parameter:\n- `ctx` - the monitor context\n\nOptions Database Keys:\n- `-ts_monitor_draw_solution`         - draw the solution at each time-step\n- `-ts_monitor_draw_solution_initial` - show initial solution as well as current solution\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorDrawCtxDestroy()`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorDrawCtx`, `PetscMonitorDrawSolution()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorDrawCtxCreate\"))\n\"\"\"\nfunction TSMonitorDrawCtxCreate(petsclib::PetscLibType, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) end\n\n@for_petsc function TSMonitorDrawCtxCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::$PetscInt )\n\tctx_ = Ref{TSMonitorDrawCtx}()\n\n    @chk ccall(\n               (:TSMonitorDrawCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, $PetscInt, Ptr{TSMonitorDrawCtx}),\n               comm, host, label, x, y, m, n, howoften, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tctx::TSMonitorLGCtx = TSMonitorLGCtxCreate(petsclib::PetscLibType,comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) \nCreates a `TSMonitorLGCtx` context for use with\n`TS` to monitor the solution process graphically in various ways\n\nCollective\n\nInput Parameters:\n- `comm`     - the MPI communicator to use\n- `host`     - the X display to open, or `NULL` for the local machine\n- `label`    - the title to put in the title bar\n- `x`        - the x screen coordinates of the upper left coordinate of the window\n- `y`        - the y screen coordinates of the upper left coordinate of the window\n- `m`        - the screen width in pixels\n- `n`        - the screen height in pixels\n- `howoften` - if positive then determines the frequency of the plotting, if -1 then only at the final time\n\nOutput Parameter:\n- `ctx` - the context\n\nOptions Database Keys:\n- `-ts_monitor_lg_timestep`        - automatically sets line graph monitor\n- `-ts_monitor_lg_timestep_log`    - automatically sets line graph monitor\n- `-ts_monitor_lg_solution`        - monitor the solution (or certain values of the solution by calling `TSMonitorLGSetDisplayVariables()` or `TSMonitorLGCtxSetDisplayVariables()`)\n- `-ts_monitor_lg_error`           - monitor the error\n- `-ts_monitor_lg_ksp_iterations`  - monitor the number of `KSP` iterations needed for each timestep\n- `-ts_monitor_lg_snes_iterations` - monitor the number of `SNES` iterations needed for each timestep\n- `-lg_use_markers <true,false>`   - mark the data points (at each time step) on the plot; default is true\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorLGTimeStep()`, `TSMonitorSet()`, `TSMonitorLGSolution()`, `TSMonitorLGError()`, `TSMonitorDefault()`, `VecView()`,\n`TSMonitorLGCtxSetVariableNames()`, `TSMonitorLGCtxGetVariableNames()`,\n`TSMonitorLGSetVariableNames()`, `TSMonitorLGGetVariableNames()`, `TSMonitorLGSetDisplayVariables()`, `TSMonitorLGCtxSetDisplayVariables()`,\n`TSMonitorLGCtxSetTransform()`, `TSMonitorLGSetTransform()`, `TSMonitorLGSNESIterations()`, `TSMonitorLGKSPIterations()`,\n`TSMonitorEnvelopeCtxCreate()`, `TSMonitorEnvelopeGetBounds()`, `TSMonitorEnvelopeCtxDestroy()`, `TSMonitorEnvelop()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxCreate\"))\n\"\"\"\nfunction TSMonitorLGCtxCreate(petsclib::PetscLibType, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) end\n\n@for_petsc function TSMonitorLGCtxCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::$PetscInt )\n\tctx_ = Ref{TSMonitorLGCtx}()\n\n    @chk ccall(\n               (:TSMonitorLGCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, $PetscInt, Ptr{TSMonitorLGCtx}),\n               comm, host, label, x, y, m, n, howoften, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTSMonitorLGCtxDestroy(petsclib::PetscLibType,ctx::TSMonitorLGCtx) \nDestroys a line graph context that was created with `TSMonitorLGCtxCreate()`.\n\nCollective\n\nInput Parameter:\n- `ctx` - the monitor context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorLGCtxCreate()`, `TSMonitorSet()`, `TSMonitorLGTimeStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxDestroy\"))\n\"\"\"\nfunction TSMonitorLGCtxDestroy(petsclib::PetscLibType, ctx::TSMonitorLGCtx) end\n\n@for_petsc function TSMonitorLGCtxDestroy(petsclib::$UnionPetscLib, ctx::TSMonitorLGCtx )\n\n    @chk ccall(\n               (:TSMonitorLGCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorLGCtx},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGCtxSetVariableNames(petsclib::PetscLibType,ctx::TSMonitorLGCtx, names::Cchar) \nSets the name of each component in the solution vector so that it may be displayed in the plot\n\nCollective\n\nInput Parameters:\n- `ctx`   - the `TS` context\n- `names` - the names of the components, final string must be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetDisplayVariables()`, `TSMonitorLGSetVariableNames()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxSetVariableNames\"))\n\"\"\"\nfunction TSMonitorLGCtxSetVariableNames(petsclib::PetscLibType, ctx::TSMonitorLGCtx, names::Cchar) end\n\n@for_petsc function TSMonitorLGCtxSetVariableNames(petsclib::$UnionPetscLib, ctx::TSMonitorLGCtx, names::Cchar )\n\n    @chk ccall(\n               (:TSMonitorLGCtxSetVariableNames, $petsc_library),\n               PetscErrorCode,\n               (TSMonitorLGCtx, Cchar),\n               ctx, names,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGCtxSetDisplayVariables(petsclib::PetscLibType,ctx::TSMonitorLGCtx, displaynames::Cchar) \nSets the variables that are to be display in the monitor\n\nCollective\n\nInput Parameters:\n- `ctx`          - the `TSMonitorLG` context\n- `displaynames` - the names of the components, final string must be `NULL`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetVariableNames()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxSetDisplayVariables\"))\n\"\"\"\nfunction TSMonitorLGCtxSetDisplayVariables(petsclib::PetscLibType, ctx::TSMonitorLGCtx, displaynames::Cchar) end\n\n@for_petsc function TSMonitorLGCtxSetDisplayVariables(petsclib::$UnionPetscLib, ctx::TSMonitorLGCtx, displaynames::Cchar )\n\n    @chk ccall(\n               (:TSMonitorLGCtxSetDisplayVariables, $petsc_library),\n               PetscErrorCode,\n               (TSMonitorLGCtx, Cchar),\n               ctx, displaynames,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGCtxSetTransform(petsclib::PetscLibType,ctx::TSMonitorLGCtx, transform::external, destroy::PetscCtxDestroyFn, tctx::Cvoid) \nSolution vector will be transformed by provided function before being displayed\n\nCollective\n\nInput Parameters:\n- `tctx`      - the `TS` context\n- `transform` - the transform function\n- `destroy`   - function to destroy the optional context, see `PetscCtxDestroyFn` for its calling sequence\n- `ctx`       - optional context used by transform function\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorLGSetVariableNames()`, `TSMonitorLGSetTransform()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxSetTransform\"))\n\"\"\"\nfunction TSMonitorLGCtxSetTransform(petsclib::PetscLibType, ctx::TSMonitorLGCtx, transform::external, destroy::PetscCtxDestroyFn, tctx::Cvoid) end\n\n@for_petsc function TSMonitorLGCtxSetTransform(petsclib::$UnionPetscLib, ctx::TSMonitorLGCtx, transform::external, destroy::PetscCtxDestroyFn, tctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGCtxSetTransform, $petsc_library),\n               PetscErrorCode,\n               (TSMonitorLGCtx, external, Ptr{PetscCtxDestroyFn}, Ptr{Cvoid}),\n               ctx, transform, destroy, tctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSMonitorLGCtxNetworkDestroy(petsclib::PetscLibType,ctx::TSMonitorLGCtxNetwork) \nDestroys  line graph contexts that where created with `TSMonitorLGCtxNetworkCreate()`.\n\nCollective\n\nInput Parameter:\n- `ctx` - the monitor context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorLGCtxNetworkSolution()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxNetworkDestroy\"))\n\"\"\"\nfunction TSMonitorLGCtxNetworkDestroy(petsclib::PetscLibType, ctx::TSMonitorLGCtxNetwork) end\n\n@for_petsc function TSMonitorLGCtxNetworkDestroy(petsclib::$UnionPetscLib, ctx::TSMonitorLGCtxNetwork )\n\n    @chk ccall(\n               (:TSMonitorLGCtxNetworkDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorLGCtxNetwork},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::TSMonitorLGCtxNetwork = TSMonitorLGCtxNetworkCreate(petsclib::PetscLibType,ts::TS, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxNetworkCreate\"))\n\"\"\"\nfunction TSMonitorLGCtxNetworkCreate(petsclib::PetscLibType, ts::TS, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) end\n\n@for_petsc function TSMonitorLGCtxNetworkCreate(petsclib::$UnionPetscLib, ts::TS, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::$PetscInt )\n\tctx_ = Ref{TSMonitorLGCtxNetwork}()\n\n    @chk ccall(\n               (:TSMonitorLGCtxNetworkCreate, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, $PetscInt, Ptr{TSMonitorLGCtxNetwork}),\n               ts, host, label, x, y, m, n, howoften, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTSMonitorLGCtxNetworkSolution(petsclib::PetscLibType,ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) \nMonitors progress of the `TS` solvers for a `DMNETWORK` solution with one window for each vertex and each edge\n\nCollective\n\nInput Parameters:\n- `ts`    - the `TS` context\n- `step`  - current time-step\n- `ptime` - current time\n- `u`     - current solution\n- `dctx`  - the `TSMonitorLGCtxNetwork` object that contains all the options for the monitoring, this is created with `TSMonitorLGCtxCreateNetwork()`\n\nOptions Database Key:\n- `-ts_monitor_lg_solution_variables` - monitor solution variables\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorLGCtxNetworkDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorLGCtxNetworkSolution\"))\n\"\"\"\nfunction TSMonitorLGCtxNetworkSolution(petsclib::PetscLibType, ts::TS, step::PetscInt, ptime::PetscReal, u::PetscVec, dctx::Cvoid) end\n\n@for_petsc function TSMonitorLGCtxNetworkSolution(petsclib::$UnionPetscLib, ts::TS, step::$PetscInt, ptime::$PetscReal, u::PetscVec, dctx::Cvoid )\n\n    @chk ccall(\n               (:TSMonitorLGCtxNetworkSolution, $petsc_library),\n               PetscErrorCode,\n               (CTS, $PetscInt, $PetscReal, CVec, Ptr{Cvoid}),\n               ts, step, ptime, u, dctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::TSMonitorEnvelopeCtx = TSMonitorEnvelopeCtxCreate(petsclib::PetscLibType,ts::TS) \nCreates a context for use with `TSMonitorEnvelope()`\n\nCollective\n\nInput Parameter:\n- `ts` - the `TS` solver object\n\nOutput Parameter:\n- `ctx` - the context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorLGTimeStep()`, `TSMonitorSet()`, `TSMonitorLGSolution()`, `TSMonitorLGError()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorEnvelopeCtxCreate\"))\n\"\"\"\nfunction TSMonitorEnvelopeCtxCreate(petsclib::PetscLibType, ts::TS) end\n\n@for_petsc function TSMonitorEnvelopeCtxCreate(petsclib::$UnionPetscLib, ts::TS )\n\tctx_ = Ref{TSMonitorEnvelopeCtx}()\n\n    @chk ccall(\n               (:TSMonitorEnvelopeCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (CTS, Ptr{TSMonitorEnvelopeCtx}),\n               ts, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTSMonitorEnvelopeCtxDestroy(petsclib::PetscLibType,ctx::TSMonitorEnvelopeCtx) \nDestroys a context that was created  with `TSMonitorEnvelopeCtxCreate()`.\n\nCollective\n\nInput Parameter:\n- `ctx` - the monitor context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSMonitorLGCtxCreate()`, `TSMonitorSet()`, `TSMonitorLGTimeStep()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorEnvelopeCtxDestroy\"))\n\"\"\"\nfunction TSMonitorEnvelopeCtxDestroy(petsclib::PetscLibType, ctx::TSMonitorEnvelopeCtx) end\n\n@for_petsc function TSMonitorEnvelopeCtxDestroy(petsclib::$UnionPetscLib, ctx::TSMonitorEnvelopeCtx )\n\n    @chk ccall(\n               (:TSMonitorEnvelopeCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorEnvelopeCtx},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::TSMonitorSPEigCtx = TSMonitorSPEigCtxCreate(petsclib::PetscLibType,comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) \nCreates a context for use with `TS` to monitor the eigenvalues of the linearized operator\n\nCollective\n\nInput Parameters:\n- `comm`     - the communicator to share the monitor\n- `host`     - the X display to open, or `NULL` for the local machine\n- `label`    - the title to put in the title bar\n- `x`        - the horizontal screen coordinates of the upper left coordinate of the window\n- `y`        - the vertical coordinates of the upper left coordinate of the window\n- `m`        - the screen width in pixels\n- `n`        - the screen height in pixels\n- `howoften` - if positive then determines the frequency of the plotting, if -1 then only at the final time\n\nOutput Parameter:\n- `ctx` - the context\n\nOptions Database Key:\n- `-ts_monitor_sp_eig` - plot egienvalues of linearized right-hand side\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSPEigTimeStep()`, `TSMonitorSet()`, `TSMonitorLGSolution()`, `TSMonitorLGError()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSPEigCtxCreate\"))\n\"\"\"\nfunction TSMonitorSPEigCtxCreate(petsclib::PetscLibType, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) end\n\n@for_petsc function TSMonitorSPEigCtxCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::$PetscInt )\n\tctx_ = Ref{TSMonitorSPEigCtx}()\n\n    @chk ccall(\n               (:TSMonitorSPEigCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, $PetscInt, Ptr{TSMonitorSPEigCtx}),\n               comm, host, label, x, y, m, n, howoften, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTSMonitorSPEigCtxDestroy(petsclib::PetscLibType,ctx::TSMonitorSPEigCtx) \nDestroys a scatter plot context that was created with `TSMonitorSPEigCtxCreate()`.\n\nCollective\n\nInput Parameter:\n- `ctx` - the monitor context\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSMonitorSPEigCtxCreate()`, `TSMonitorSet()`, `TSMonitorSPEig()`\n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSPEigCtxDestroy\"))\n\"\"\"\nfunction TSMonitorSPEigCtxDestroy(petsclib::PetscLibType, ctx::TSMonitorSPEigCtx) end\n\n@for_petsc function TSMonitorSPEigCtxDestroy(petsclib::$UnionPetscLib, ctx::TSMonitorSPEigCtx )\n\n    @chk ccall(\n               (:TSMonitorSPEigCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorSPEigCtx},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::TSMonitorSPCtx = TSMonitorSPCtxCreate(petsclib::PetscLibType,comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt, retain::PetscInt, phase::PetscBool, multispecies::PetscBool) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSPCtxCreate\"))\n\"\"\"\nfunction TSMonitorSPCtxCreate(petsclib::PetscLibType, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt, retain::PetscInt, phase::PetscBool, multispecies::PetscBool) end\n\n@for_petsc function TSMonitorSPCtxCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::$PetscInt, retain::$PetscInt, phase::PetscBool, multispecies::PetscBool )\n\tctx_ = Ref{TSMonitorSPCtx}()\n\n    @chk ccall(\n               (:TSMonitorSPCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, $PetscInt, $PetscInt, PetscBool, PetscBool, Ptr{TSMonitorSPCtx}),\n               comm, host, label, x, y, m, n, howoften, retain, phase, multispecies, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTSMonitorSPCtxDestroy(petsclib::PetscLibType,ctx::TSMonitorSPCtx) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorSPCtxDestroy\"))\n\"\"\"\nfunction TSMonitorSPCtxDestroy(petsclib::PetscLibType, ctx::TSMonitorSPCtx) end\n\n@for_petsc function TSMonitorSPCtxDestroy(petsclib::$UnionPetscLib, ctx::TSMonitorSPCtx )\n\n    @chk ccall(\n               (:TSMonitorSPCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorSPCtx},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tctx::TSMonitorHGCtx = TSMonitorHGCtxCreate(petsclib::PetscLibType,comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt, Ns::PetscInt, Nb::PetscInt, velocity::PetscBool) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorHGCtxCreate\"))\n\"\"\"\nfunction TSMonitorHGCtxCreate(petsclib::PetscLibType, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt, Ns::PetscInt, Nb::PetscInt, velocity::PetscBool) end\n\n@for_petsc function TSMonitorHGCtxCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::$PetscInt, Ns::$PetscInt, Nb::$PetscInt, velocity::PetscBool )\n\tctx_ = Ref{TSMonitorHGCtx}()\n\n    @chk ccall(\n               (:TSMonitorHGCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, $PetscInt, $PetscInt, $PetscInt, PetscBool, Ptr{TSMonitorHGCtx}),\n               comm, host, label, x, y, m, n, howoften, Ns, Nb, velocity, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTSMonitorHGCtxDestroy(petsclib::PetscLibType,ctx::TSMonitorHGCtx) \n\n# External Links\n$(_doc_external(\"Ts/TSMonitorHGCtxDestroy\"))\n\"\"\"\nfunction TSMonitorHGCtxDestroy(petsclib::PetscLibType, ctx::TSMonitorHGCtx) end\n\n@for_petsc function TSMonitorHGCtxDestroy(petsclib::$UnionPetscLib, ctx::TSMonitorHGCtx )\n\n    @chk ccall(\n               (:TSMonitorHGCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSMonitorHGCtx},),\n               ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptRegister(petsclib::PetscLibType,sname::String, fnc::external) \nadds a TSAdapt implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of user-defined adaptivity scheme\n- `function` - routine to create method context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSAdaptRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptRegister\"))\n\"\"\"\nfunction TSAdaptRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function TSAdaptRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:TSAdaptRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TS` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptFinalizePackage\"))\n\"\"\"\nfunction TSAdaptFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSAdaptFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSAdaptFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSAdapt` package. It is\ncalled from `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptInitializePackage\"))\n\"\"\"\nfunction TSAdaptInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSAdaptInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSAdaptInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptSetType(petsclib::PetscLibType,adapt::TSAdapt, type::TSAdaptType) \nsets the approach used for the error adapter\n\nLogicially Collective\n\nInput Parameters:\n- `adapt` - the `TS` adapter, most likely obtained with `TSGetAdapt()`\n- `type`  - one of the `TSAdaptType`\n\nOptions Database Key:\n- `-ts_adapt_type <basic or dsp or none>` - to set the adapter type\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSGetAdapt()`, `TSAdaptDestroy()`, `TSAdaptType`, `TSAdaptGetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetType\"))\n\"\"\"\nfunction TSAdaptSetType(petsclib::PetscLibType, adapt::TSAdapt, type::TSAdaptType) end\n\n@for_petsc function TSAdaptSetType(petsclib::$UnionPetscLib, adapt::TSAdapt, type::TSAdaptType )\n\n    @chk ccall(\n               (:TSAdaptSetType, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, TSAdaptType),\n               adapt, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TSAdaptType = TSAdaptGetType(petsclib::PetscLibType,adapt::TSAdapt) \ngets the `TS` adapter method type (as a string).\n\nNot Collective\n\nInput Parameter:\n- `adapt` - The `TS` adapter, most likely obtained with `TSGetAdapt()`\n\nOutput Parameter:\n- `type` - The name of `TS` adapter method\n\nLevel: intermediate\n\n-seealso: `TSAdapt`, `TSAdaptType`, `TSAdaptSetType()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptGetType\"))\n\"\"\"\nfunction TSAdaptGetType(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptGetType(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\ttype_ = Ref{TSAdaptType}()\n\n    @chk ccall(\n               (:TSAdaptGetType, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{TSAdaptType}),\n               adapt, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTSAdaptSetOptionsPrefix(petsclib::PetscLibType,adapt::TSAdapt, prefix::String) \n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetOptionsPrefix\"))\n\"\"\"\nfunction TSAdaptSetOptionsPrefix(petsclib::PetscLibType, adapt::TSAdapt, prefix::String) end\n\n@for_petsc function TSAdaptSetOptionsPrefix(petsclib::$UnionPetscLib, adapt::TSAdapt, prefix::String )\n\n    @chk ccall(\n               (:TSAdaptSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{Cchar}),\n               adapt, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptLoad(petsclib::PetscLibType,adapt::TSAdapt, viewer::PetscViewer) \nLoads a TSAdapt that has been stored in binary with `TSAdaptView()`.\n\nCollective\n\nInput Parameters:\n- `adapt`  - the newly loaded `TSAdapt`, this needs to have been created with `TSAdaptCreate()` or\nsome related function before a call to `TSAdaptLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()` or\nHDF5 file viewer, obtained from `PetscViewerHDF5Open()`\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `PetscViewerBinaryOpen()`, `TSAdaptView()`, `MatLoad()`, `VecLoad()`, `TSAdapt`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptLoad\"))\n\"\"\"\nfunction TSAdaptLoad(petsclib::PetscLibType, adapt::TSAdapt, viewer::PetscViewer) end\n\n@for_petsc function TSAdaptLoad(petsclib::$UnionPetscLib, adapt::TSAdapt, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TSAdaptLoad, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, PetscViewer),\n               adapt, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptView(petsclib::PetscLibType,adapt::TSAdapt, viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Ts/TSAdaptView\"))\n\"\"\"\nfunction TSAdaptView(petsclib::PetscLibType, adapt::TSAdapt, viewer::PetscViewer) end\n\n@for_petsc function TSAdaptView(petsclib::$UnionPetscLib, adapt::TSAdapt, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TSAdaptView, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, PetscViewer),\n               adapt, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptReset(petsclib::PetscLibType,adapt::TSAdapt) \nResets a `TSAdapt` context to its defaults\n\nCollective\n\nInput Parameter:\n- `adapt` - the `TSAdapt` context obtained from `TSGetAdapt()` or `TSAdaptCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSGetAdapt()`, `TSAdapt`, `TSAdaptCreate()`, `TSAdaptDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptReset\"))\n\"\"\"\nfunction TSAdaptReset(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptReset(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\n    @chk ccall(\n               (:TSAdaptReset, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt,),\n               adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptDestroy(petsclib::PetscLibType,adapt::TSAdapt) \n\n# External Links\n$(_doc_external(\"Ts/TSAdaptDestroy\"))\n\"\"\"\nfunction TSAdaptDestroy(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptDestroy(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\n    @chk ccall(\n               (:TSAdaptDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSAdapt},),\n               adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptSetMonitor(petsclib::PetscLibType,adapt::TSAdapt, flg::PetscBool) \nMonitor the choices made by the adaptive controller\n\nCollective\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `flg`   - `PETSC_TRUE` to active a monitor, `PETSC_FALSE` to disable\n\nOptions Database Key:\n- `-ts_adapt_monitor` - to turn on monitoring\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSGetAdapt()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetMonitor\"))\n\"\"\"\nfunction TSAdaptSetMonitor(petsclib::PetscLibType, adapt::TSAdapt, flg::PetscBool) end\n\n@for_petsc function TSAdaptSetMonitor(petsclib::$UnionPetscLib, adapt::TSAdapt, flg::PetscBool )\n\n    @chk ccall(\n               (:TSAdaptSetMonitor, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, PetscBool),\n               adapt, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptSetCheckStage(petsclib::PetscLibType,adapt::TSAdapt, func::external) \nSet a callback to check convergence for a stage\n\nLogically Collective\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `func`  - stage check function\n\nCalling sequence:\n- `adapt`  - adaptive controller context\n- `ts`     - time stepping context\n- `t`      - current time\n- `Y`      - current solution vector\n- `accept` - pending choice of whether to accept, can be modified by this routine\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSAdapt`, `TSGetAdapt()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetCheckStage\"))\n\"\"\"\nfunction TSAdaptSetCheckStage(petsclib::PetscLibType, adapt::TSAdapt, func::external) end\n\n@for_petsc function TSAdaptSetCheckStage(petsclib::$UnionPetscLib, adapt::TSAdapt, func::external )\n\n    @chk ccall(\n               (:TSAdaptSetCheckStage, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, external),\n               adapt, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptSetAlwaysAccept(petsclib::PetscLibType,adapt::TSAdapt, flag::PetscBool) \nSet whether to always accept steps regardless of\nany error or stability condition not meeting the prescribed goal.\n\nLogically Collective\n\nInput Parameters:\n- `adapt` - time step adaptivity context, usually gotten with `TSGetAdapt()`\n- `flag`  - whether to always accept steps\n\nOptions Database Key:\n- `-ts_adapt_always_accept` - to always accept steps\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSGetAdapt()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetAlwaysAccept\"))\n\"\"\"\nfunction TSAdaptSetAlwaysAccept(petsclib::PetscLibType, adapt::TSAdapt, flag::PetscBool) end\n\n@for_petsc function TSAdaptSetAlwaysAccept(petsclib::$UnionPetscLib, adapt::TSAdapt, flag::PetscBool )\n\n    @chk ccall(\n               (:TSAdaptSetAlwaysAccept, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, PetscBool),\n               adapt, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptSetSafety(petsclib::PetscLibType,adapt::TSAdapt, safety::PetscReal, reject_safety::PetscReal) \nSet safety factors for time step adaptor\n\nLogically Collective\n\nInput Parameters:\n- `adapt`         - adaptive controller context\n- `safety`        - safety factor relative to target error/stability goal\n- `reject_safety` - extra safety factor to apply if the last step was rejected\n\nOptions Database Keys:\n- `-ts_adapt_safety <safety>`               - to set safety factor\n- `-ts_adapt_reject_safety <reject_safety>` - to set reject safety factor\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptGetSafety()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetSafety\"))\n\"\"\"\nfunction TSAdaptSetSafety(petsclib::PetscLibType, adapt::TSAdapt, safety::PetscReal, reject_safety::PetscReal) end\n\n@for_petsc function TSAdaptSetSafety(petsclib::$UnionPetscLib, adapt::TSAdapt, safety::$PetscReal, reject_safety::$PetscReal )\n\n    @chk ccall(\n               (:TSAdaptSetSafety, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscReal, $PetscReal),\n               adapt, safety, reject_safety,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsafety::PetscReal,reject_safety::PetscReal = TSAdaptGetSafety(petsclib::PetscLibType,adapt::TSAdapt) \nGet safety factors for time step adapter\n\nNot Collective\n\nInput Parameter:\n- `adapt` - adaptive controller context\n\nOutput Parameters:\n- `safety`        - safety factor relative to target error/stability goal\n- `reject_safety` - extra safety factor to apply if the last step was rejected\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptSetSafety()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptGetSafety\"))\n\"\"\"\nfunction TSAdaptGetSafety(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptGetSafety(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\tsafety_ = Ref{$PetscReal}()\n\treject_safety_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAdaptGetSafety, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               adapt, safety_, reject_safety_,\n              )\n\n\tsafety = safety_[]\n\treject_safety = reject_safety_[]\n\n\treturn safety,reject_safety\nend \n\n\"\"\"\n\tTSAdaptSetMaxIgnore(petsclib::PetscLibType,adapt::TSAdapt, max_ignore::PetscReal) \nSet error estimation threshold. Solution components below this threshold value will not be considered when computing error norms\nfor time step adaptivity (in absolute value). A negative value (default) of the threshold leads to considering all solution components.\n\nLogically Collective\n\nInput Parameters:\n- `adapt`      - adaptive controller context\n- `max_ignore` - threshold for solution components that are ignored during error estimation\n\nOptions Database Key:\n- `-ts_adapt_max_ignore <max_ignore>` - to set the threshold\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptGetMaxIgnore()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetMaxIgnore\"))\n\"\"\"\nfunction TSAdaptSetMaxIgnore(petsclib::PetscLibType, adapt::TSAdapt, max_ignore::PetscReal) end\n\n@for_petsc function TSAdaptSetMaxIgnore(petsclib::$UnionPetscLib, adapt::TSAdapt, max_ignore::$PetscReal )\n\n    @chk ccall(\n               (:TSAdaptSetMaxIgnore, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscReal),\n               adapt, max_ignore,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmax_ignore::PetscReal = TSAdaptGetMaxIgnore(petsclib::PetscLibType,adapt::TSAdapt) \nGet error estimation threshold. Solution components below this threshold value will not be considered when computing error norms\nfor time step adaptivity (in absolute value).\n\nNot Collective\n\nInput Parameter:\n- `adapt` - adaptive controller context\n\nOutput Parameter:\n- `max_ignore` - threshold for solution components that are ignored during error estimation\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptSetMaxIgnore()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptGetMaxIgnore\"))\n\"\"\"\nfunction TSAdaptGetMaxIgnore(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptGetMaxIgnore(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\tmax_ignore_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAdaptGetMaxIgnore, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{$PetscReal}),\n               adapt, max_ignore_,\n              )\n\n\tmax_ignore = max_ignore_[]\n\n\treturn max_ignore\nend \n\n\"\"\"\n\tTSAdaptSetClip(petsclib::PetscLibType,adapt::TSAdapt, low::PetscReal, high::PetscReal) \nSets the admissible decrease/increase factor in step size in the time step adapter\n\nLogically collective\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `low`   - admissible decrease factor\n- `high`  - admissible increase factor\n\nOptions Database Key:\n- `-ts_adapt_clip <low>,<high>` - to set admissible time step decrease and increase factors\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptChoose()`, `TSAdaptGetClip()`, `TSAdaptSetScaleSolveFailed()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetClip\"))\n\"\"\"\nfunction TSAdaptSetClip(petsclib::PetscLibType, adapt::TSAdapt, low::PetscReal, high::PetscReal) end\n\n@for_petsc function TSAdaptSetClip(petsclib::$UnionPetscLib, adapt::TSAdapt, low::$PetscReal, high::$PetscReal )\n\n    @chk ccall(\n               (:TSAdaptSetClip, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscReal, $PetscReal),\n               adapt, low, high,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlow::PetscReal,high::PetscReal = TSAdaptGetClip(petsclib::PetscLibType,adapt::TSAdapt) \nGets the admissible decrease/increase factor in step size in the time step adapter\n\nNot Collective\n\nInput Parameter:\n- `adapt` - adaptive controller context\n\nOutput Parameters:\n- `low`  - optional, admissible decrease factor\n- `high` - optional, admissible increase factor\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptChoose()`, `TSAdaptSetClip()`, `TSAdaptSetScaleSolveFailed()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptGetClip\"))\n\"\"\"\nfunction TSAdaptGetClip(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptGetClip(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\tlow_ = Ref{$PetscReal}()\n\thigh_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAdaptGetClip, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               adapt, low_, high_,\n              )\n\n\tlow = low_[]\n\thigh = high_[]\n\n\treturn low,high\nend \n\n\"\"\"\n\tTSAdaptSetScaleSolveFailed(petsclib::PetscLibType,adapt::TSAdapt, scale::PetscReal) \nScale step size by this factor if solve fails\n\nLogically Collective\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `scale` - scale\n\nOptions Database Key:\n- `-ts_adapt_scale_solve_failed <scale>` - to set scale step by this factor if solve fails\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptChoose()`, `TSAdaptGetScaleSolveFailed()`, `TSAdaptGetClip()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetScaleSolveFailed\"))\n\"\"\"\nfunction TSAdaptSetScaleSolveFailed(petsclib::PetscLibType, adapt::TSAdapt, scale::PetscReal) end\n\n@for_petsc function TSAdaptSetScaleSolveFailed(petsclib::$UnionPetscLib, adapt::TSAdapt, scale::$PetscReal )\n\n    @chk ccall(\n               (:TSAdaptSetScaleSolveFailed, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscReal),\n               adapt, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tscale::PetscReal = TSAdaptGetScaleSolveFailed(petsclib::PetscLibType,adapt::TSAdapt) \nGets the admissible decrease/increase factor in step size\n\nNot Collective\n\nInput Parameter:\n- `adapt` - adaptive controller context\n\nOutput Parameter:\n- `scale` - scale factor\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptChoose()`, `TSAdaptSetScaleSolveFailed()`, `TSAdaptSetClip()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptGetScaleSolveFailed\"))\n\"\"\"\nfunction TSAdaptGetScaleSolveFailed(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptGetScaleSolveFailed(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\tscale_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAdaptGetScaleSolveFailed, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{$PetscReal}),\n               adapt, scale_,\n              )\n\n\tscale = scale_[]\n\n\treturn scale\nend \n\n\"\"\"\n\tTSAdaptSetStepLimits(petsclib::PetscLibType,adapt::TSAdapt, hmin::PetscReal, hmax::PetscReal) \nSet the minimum and maximum step sizes to be considered by the time step controller\n\nLogically Collective\n\nInput Parameters:\n- `adapt` - time step adaptivity context, usually gotten with `TSGetAdapt()`\n- `hmin`  - minimum time step\n- `hmax`  - maximum time step\n\nOptions Database Keys:\n- `-ts_adapt_dt_min <min>` - to set minimum time step\n- `-ts_adapt_dt_max <max>` - to set maximum time step\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptGetStepLimits()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetStepLimits\"))\n\"\"\"\nfunction TSAdaptSetStepLimits(petsclib::PetscLibType, adapt::TSAdapt, hmin::PetscReal, hmax::PetscReal) end\n\n@for_petsc function TSAdaptSetStepLimits(petsclib::$UnionPetscLib, adapt::TSAdapt, hmin::$PetscReal, hmax::$PetscReal )\n\n    @chk ccall(\n               (:TSAdaptSetStepLimits, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscReal, $PetscReal),\n               adapt, hmin, hmax,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\thmin::PetscReal,hmax::PetscReal = TSAdaptGetStepLimits(petsclib::PetscLibType,adapt::TSAdapt) \nGet the minimum and maximum step sizes to be considered by the time step controller\n\nNot Collective\n\nInput Parameter:\n- `adapt` - time step adaptivity context, usually gotten with `TSGetAdapt()`\n\nOutput Parameters:\n- `hmin` - minimum time step\n- `hmax` - maximum time step\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptSetStepLimits()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptGetStepLimits\"))\n\"\"\"\nfunction TSAdaptGetStepLimits(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptGetStepLimits(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\thmin_ = Ref{$PetscReal}()\n\thmax_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAdaptGetStepLimits, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               adapt, hmin_, hmax_,\n              )\n\n\thmin = hmin_[]\n\thmax = hmax_[]\n\n\treturn hmin,hmax\nend \n\n\"\"\"\n\tTSAdaptSetFromOptions(petsclib::PetscLibType,adapt::TSAdapt, PetscOptionsObject::PetscOptionItems) \nSets various `TSAdapt` parameters from user options.\n\nCollective\n\nInput Parameters:\n- `adapt`              - the `TSAdapt` context\n- `PetscOptionsObject` - object created by `PetscOptionsBegin()`\n\nOptions Database Keys:\n- `-ts_adapt_type <type>`                - algorithm to use for adaptivity\n- `-ts_adapt_always_accept`              - always accept steps regardless of error/stability goals\n- `-ts_adapt_safety <safety>`            - safety factor relative to target error/stability goal\n- `-ts_adapt_reject_safety <safety>`     - extra safety factor to apply if the last step was rejected\n- `-ts_adapt_clip <low,high>`            - admissible time step decrease and increase factors\n- `-ts_adapt_dt_min <min>`               - minimum timestep to use\n- `-ts_adapt_dt_max <max>`               - maximum timestep to use\n- `-ts_adapt_scale_solve_failed <scale>` - scale timestep by this factor if a solve fails\n- `-ts_adapt_wnormtype <2 or infinity>`  - type of norm for computing error estimates\n- `-ts_adapt_time_step_increase_delay`   - number of timesteps to delay increasing the time step after it has been decreased due to failed solver\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSAdapt`, `TSGetAdapt()`, `TSAdaptSetType()`, `TSAdaptSetAlwaysAccept()`, `TSAdaptSetSafety()`,\n`TSAdaptSetClip()`, `TSAdaptSetScaleSolveFailed()`, `TSAdaptSetStepLimits()`, `TSAdaptSetMonitor()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetFromOptions\"))\n\"\"\"\nfunction TSAdaptSetFromOptions(petsclib::PetscLibType, adapt::TSAdapt, PetscOptionsObject::PetscOptionItems) end\n\n@for_petsc function TSAdaptSetFromOptions(petsclib::$UnionPetscLib, adapt::TSAdapt, PetscOptionsObject::PetscOptionItems )\n\n    @chk ccall(\n               (:TSAdaptSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, PetscOptionItems),\n               adapt, PetscOptionsObject,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptCandidatesClear(petsclib::PetscLibType,adapt::TSAdapt) \nclear any previously set candidate schemes\n\nLogically Collective\n\nInput Parameter:\n- `adapt` - adaptive controller\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptCreate()`, `TSAdaptCandidateAdd()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptCandidatesClear\"))\n\"\"\"\nfunction TSAdaptCandidatesClear(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptCandidatesClear(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\n    @chk ccall(\n               (:TSAdaptCandidatesClear, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt,),\n               adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptCandidateAdd(petsclib::PetscLibType,adapt::TSAdapt, name::String, order::PetscInt, stageorder::PetscInt, ccfl::PetscReal, cost::PetscReal, inuse::PetscBool) \nadd a candidate scheme for the adaptive controller to select from\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `adapt`      - time step adaptivity context, obtained with `TSGetAdapt()` or `TSAdaptCreate()`\n- `name`       - name of the candidate scheme to add\n- `order`      - order of the candidate scheme\n- `stageorder` - stage order of the candidate scheme\n- `ccfl`       - stability coefficient relative to explicit Euler, used for CFL constraints\n- `cost`       - relative measure of the amount of work required for the candidate scheme\n- `inuse`      - indicates that this scheme is the one currently in use, this flag can only be set for one scheme\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptCandidatesClear()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptCandidateAdd\"))\n\"\"\"\nfunction TSAdaptCandidateAdd(petsclib::PetscLibType, adapt::TSAdapt, name::String, order::PetscInt, stageorder::PetscInt, ccfl::PetscReal, cost::PetscReal, inuse::PetscBool) end\n\n@for_petsc function TSAdaptCandidateAdd(petsclib::$UnionPetscLib, adapt::TSAdapt, name::String, order::$PetscInt, stageorder::$PetscInt, ccfl::$PetscReal, cost::$PetscReal, inuse::PetscBool )\n\n    @chk ccall(\n               (:TSAdaptCandidateAdd, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{Cchar}, $PetscInt, $PetscInt, $PetscReal, $PetscReal, PetscBool),\n               adapt, name, order, stageorder, ccfl, cost, inuse,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tn::PetscInt,order::PetscInt,stageorder::PetscInt,ccfl::PetscReal,cost::PetscReal = TSAdaptCandidatesGet(petsclib::PetscLibType,adapt::TSAdapt) \nGet the list of candidate orders of accuracy and cost\n\nNot Collective\n\nInput Parameter:\n- `adapt` - time step adaptivity context\n\nOutput Parameters:\n- `n`          - number of candidate schemes, always at least 1\n- `order`      - the order of each candidate scheme\n- `stageorder` - the stage order of each candidate scheme\n- `ccfl`       - the CFL coefficient of each scheme\n- `cost`       - the relative cost of each scheme\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptCandidatesClear()`, `TSAdaptCandidateAdd()`, `TSAdaptChoose()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptCandidatesGet\"))\n\"\"\"\nfunction TSAdaptCandidatesGet(petsclib::PetscLibType, adapt::TSAdapt) end\n\n@for_petsc function TSAdaptCandidatesGet(petsclib::$UnionPetscLib, adapt::TSAdapt )\n\tn_ = Ref{$PetscInt}()\n\torder_ = Ref{$PetscInt}()\n\tstageorder_ = Ref{$PetscInt}()\n\tccfl_ = Ref{$PetscReal}()\n\tcost_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAdaptCandidatesGet, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{$PetscInt}, $PetscInt, $PetscInt, $PetscReal, $PetscReal),\n               adapt, n_, order_, stageorder_, ccfl_, cost_,\n              )\n\n\tn = n_[]\n\torder = order_[]\n\tstageorder = stageorder_[]\n\tccfl = ccfl_[]\n\tcost = cost_[]\n\n\treturn n,order,stageorder,ccfl,cost\nend \n\n\"\"\"\n\tnext_sc::PetscInt,next_h::PetscReal,accept::PetscBool = TSAdaptChoose(petsclib::PetscLibType,adapt::TSAdapt, ts::TS, h::PetscReal) \nchoose which method and step size to use for the next step\n\nCollective\n\nInput Parameters:\n- `adapt` - adaptive controller\n- `ts`    - time stepper\n- `h`     - current step size\n\nOutput Parameters:\n- `next_sc` - optional, scheme to use for the next step\n- `next_h`  - step size to use for the next step\n- `accept`  - `PETSC_TRUE` to accept the current step, `PETSC_FALSE` to repeat the current step with the new step size\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSAdapt`, `TSAdaptCandidatesClear()`, `TSAdaptCandidateAdd()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptChoose\"))\n\"\"\"\nfunction TSAdaptChoose(petsclib::PetscLibType, adapt::TSAdapt, ts::TS, h::PetscReal) end\n\n@for_petsc function TSAdaptChoose(petsclib::$UnionPetscLib, adapt::TSAdapt, ts::TS, h::$PetscReal )\n\tnext_sc_ = Ref{$PetscInt}()\n\tnext_h_ = Ref{$PetscReal}()\n\taccept_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSAdaptChoose, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, CTS, $PetscReal, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{PetscBool}),\n               adapt, ts, h, next_sc_, next_h_, accept_,\n              )\n\n\tnext_sc = next_sc_[]\n\tnext_h = next_h_[]\n\taccept = accept_[]\n\n\treturn next_sc,next_h,accept\nend \n\n\"\"\"\n\tTSAdaptSetTimeStepIncreaseDelay(petsclib::PetscLibType,adapt::TSAdapt, cnt::PetscInt) \nThe number of timesteps to wait after a decrease in the timestep due to failed solver\nbefore increasing the time step.\n\nLogicially Collective\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `cnt`   - the number of timesteps\n\nOptions Database Key:\n- `-ts_adapt_time_step_increase_delay cnt` - number of steps to delay the increase\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSAdapt`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptSetTimeStepIncreaseDelay\"))\n\"\"\"\nfunction TSAdaptSetTimeStepIncreaseDelay(petsclib::PetscLibType, adapt::TSAdapt, cnt::PetscInt) end\n\n@for_petsc function TSAdaptSetTimeStepIncreaseDelay(petsclib::$UnionPetscLib, adapt::TSAdapt, cnt::$PetscInt )\n\n    @chk ccall(\n               (:TSAdaptSetTimeStepIncreaseDelay, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscInt),\n               adapt, cnt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\taccept::PetscBool = TSAdaptCheckStage(petsclib::PetscLibType,adapt::TSAdapt, ts::TS, t::PetscReal, Y::PetscVec) \nchecks whether to accept a stage, (e.g. reject and change time step size if nonlinear solve fails or solution vector is infeasible)\n\nCollective\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `ts`    - time stepper\n- `t`     - Current simulation time\n- `Y`     - Current solution vector\n\nOutput Parameter:\n- `accept` - `PETSC_TRUE` to accept the stage, `PETSC_FALSE` to reject\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSAdapt`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptCheckStage\"))\n\"\"\"\nfunction TSAdaptCheckStage(petsclib::PetscLibType, adapt::TSAdapt, ts::TS, t::PetscReal, Y::PetscVec) end\n\n@for_petsc function TSAdaptCheckStage(petsclib::$UnionPetscLib, adapt::TSAdapt, ts::TS, t::$PetscReal, Y::PetscVec )\n\taccept_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSAdaptCheckStage, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, CTS, $PetscReal, CVec, Ptr{PetscBool}),\n               adapt, ts, t, Y, accept_,\n              )\n\n\taccept = accept_[]\n\n\treturn accept\nend \n\n\"\"\"\n\tinadapt::TSAdapt = TSAdaptCreate(petsclib::PetscLibType,comm::MPI_Comm) \ncreate an adaptive controller context for time stepping\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator\n\nOutput Parameter:\n- `inadapt` - new `TSAdapt` object\n\nLevel: developer\n\n-seealso: [](ch_ts), `TSAdapt`, `TSGetAdapt()`, `TSAdaptSetType()`, `TSAdaptDestroy()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptCreate\"))\n\"\"\"\nfunction TSAdaptCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function TSAdaptCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tinadapt_ = Ref{TSAdapt}()\n\n    @chk ccall(\n               (:TSAdaptCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{TSAdapt}),\n               comm, inadapt_,\n              )\n\n\tinadapt = inadapt_[]\n\n\treturn inadapt\nend \n\n\"\"\"\n\tt::PetscReal,dt::PetscReal = TSAdaptHistoryGetStep(petsclib::PetscLibType,adapt::TSAdapt, step::PetscInt) \nGets time and time step for a given step number in the history\n\nLogically Collective\n\nInput Parameters:\n- `adapt` - the TSAdapt context\n- `step`  - the step number\n\nOutput Parameters:\n- `t`  - the time corresponding to the requested step (can be `NULL`)\n- `dt` - the time step to be taken at the requested step (can be `NULL`)\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TS`, `TSGetAdapt()`, `TSAdaptSetType()`, `TSAdaptHistorySetTrajectory()`, `TSADAPTHISTORY`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptHistoryGetStep\"))\n\"\"\"\nfunction TSAdaptHistoryGetStep(petsclib::PetscLibType, adapt::TSAdapt, step::PetscInt) end\n\n@for_petsc function TSAdaptHistoryGetStep(petsclib::$UnionPetscLib, adapt::TSAdapt, step::$PetscInt )\n\tt_ = Ref{$PetscReal}()\n\tdt_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TSAdaptHistoryGetStep, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscInt, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               adapt, step, t_, dt_,\n              )\n\n\tt = t_[]\n\tdt = dt_[]\n\n\treturn t,dt\nend \n\n\"\"\"\n\tTSAdaptHistorySetHistory(petsclib::PetscLibType,adapt::TSAdapt, n::PetscInt, hist::Vector{PetscReal}, backward::PetscBool) \nSets the time history in the adaptor\n\nLogically Collective\n\nInput Parameters:\n- `adapt`    - the `TSAdapt` context\n- `n`        - size of the time history\n- `hist`     - the time history\n- `backward` - if the time history has to be followed backward\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGetAdapt()`, `TSAdaptSetType()`, `TSAdaptHistorySetTrajectory()`, `TSADAPTHISTORY`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptHistorySetHistory\"))\n\"\"\"\nfunction TSAdaptHistorySetHistory(petsclib::PetscLibType, adapt::TSAdapt, n::PetscInt, hist::Vector{PetscReal}, backward::PetscBool) end\n\n@for_petsc function TSAdaptHistorySetHistory(petsclib::$UnionPetscLib, adapt::TSAdapt, n::$PetscInt, hist::Vector{$PetscReal}, backward::PetscBool )\n\n    @chk ccall(\n               (:TSAdaptHistorySetHistory, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscInt, Ptr{$PetscReal}, PetscBool),\n               adapt, n, hist, backward,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptHistorySetTrajectory(petsclib::PetscLibType,adapt::TSAdapt, tj::TSTrajectory, backward::PetscBool) \nSets a time history in the adaptor from a given `TSTrajectory`\n\nLogically Collective\n\nInput Parameters:\n- `adapt`    - the `TSAdapt` context\n- `tj`       - the `TSTrajectory` context\n- `backward` - if the time history has to be followed backward\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGetAdapt()`, `TSAdaptSetType()`, `TSAdaptHistorySetHistory()`, `TSADAPTHISTORY`, `TSAdapt`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptHistorySetTrajectory\"))\n\"\"\"\nfunction TSAdaptHistorySetTrajectory(petsclib::PetscLibType, adapt::TSAdapt, tj::TSTrajectory, backward::PetscBool) end\n\n@for_petsc function TSAdaptHistorySetTrajectory(petsclib::$UnionPetscLib, adapt::TSAdapt, tj::TSTrajectory, backward::PetscBool )\n\n    @chk ccall(\n               (:TSAdaptHistorySetTrajectory, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, TSTrajectory, PetscBool),\n               adapt, tj, backward,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptDSPSetFilter(petsclib::PetscLibType,adapt::TSAdapt, name::String) \nSets internal parameters corresponding to the named filter {cite}`soderlind2006adaptive` {cite}`soderlind2003digital`\n\nCollective\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `name`  - filter name\n\nOptions Database Key:\n- `-ts_adapt_dsp_filter <name>` - Sets predefined controller by name; use -help for a list of available controllers\n\nFilter names:\n- `basic`                       - similar to `TSADAPTBASIC` but with different criteria for step rejections.\n- `PI30, PI42, PI33, PI34`      - PI controllers.\n- `PC11, PC47, PC36`            - predictive controllers.\n- `H0211, H211b, H211PI`        - digital filters with orders dynamics=2, adaptivity=1, filter=1.\n- `H0312, H312b, H312PID`       - digital filters with orders dynamics=3, adaptivity=1, filter=2.\n- `H0321, H321`                 - digital filters with orders dynamics=3, adaptivity=2, filter=1.\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TSADAPTDSP`, `TS`, `TSAdapt`, `TSGetAdapt()`, `TSAdaptDSPSetPID()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptDSPSetFilter\"))\n\"\"\"\nfunction TSAdaptDSPSetFilter(petsclib::PetscLibType, adapt::TSAdapt, name::String) end\n\n@for_petsc function TSAdaptDSPSetFilter(petsclib::$UnionPetscLib, adapt::TSAdapt, name::String )\n\n    @chk ccall(\n               (:TSAdaptDSPSetFilter, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, Ptr{Cchar}),\n               adapt, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSAdaptDSPSetPID(petsclib::PetscLibType,adapt::TSAdapt, kkI::PetscReal, kkP::PetscReal, kkD::PetscReal) \nSet the PID controller parameters {cite}`soderlind2006adaptive`  {cite}`soderlind2003digital`\n\nInput Parameters:\n- `adapt` - adaptive controller context\n- `kkI`   - Integral parameter\n- `kkP`   - Proportional parameter\n- `kkD`   - Derivative parameter\n\nOptions Database Key:\n- `-ts_adapt_dsp_pid <kkI,kkP,kkD>` - Sets PID controller parameters\n\nLevel: intermediate\n\n-seealso: [](ch_ts), `TS`, `TSAdapt`, `TSGetAdapt()`, `TSAdaptDSPSetFilter()`\n\n# External Links\n$(_doc_external(\"Ts/TSAdaptDSPSetPID\"))\n\"\"\"\nfunction TSAdaptDSPSetPID(petsclib::PetscLibType, adapt::TSAdapt, kkI::PetscReal, kkP::PetscReal, kkD::PetscReal) end\n\n@for_petsc function TSAdaptDSPSetPID(petsclib::$UnionPetscLib, adapt::TSAdapt, kkI::$PetscReal, kkP::$PetscReal, kkD::$PetscReal )\n\n    @chk ccall(\n               (:TSAdaptDSPSetPID, $petsc_library),\n               PetscErrorCode,\n               (TSAdapt, $PetscReal, $PetscReal, $PetscReal),\n               adapt, kkI, kkP, kkD,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptRegister(petsclib::PetscLibType,sname::String, fnc::external) \nadds a `TSGLLEAdapt` implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of user-defined adaptivity scheme\n- `function` - routine to create method context\n\nLevel: advanced\n\n-seealso: [](ch_ts), `TSGLLE`, `TSGLLEAdapt`, `TSGLLEAdaptRegisterAll()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptRegister\"))\n\"\"\"\nfunction TSGLLEAdaptRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function TSGLLEAdaptRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:TSGLLEAdaptRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TSGLLE` package. It is\ncalled from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscFinalize()`, `TSGLLEAdapt`, `TSGLLEAdaptInitializePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptFinalizePackage\"))\n\"\"\"\nfunction TSGLLEAdaptFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSGLLEAdaptFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLLEAdaptFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `TSGLLEAdapt` package. It is\ncalled from `TSInitializePackage()`.\n\nLevel: developer\n\n-seealso: [](ch_ts), `PetscInitialize()`, `TSGLLEAdapt`, `TSGLLEAdaptFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptInitializePackage\"))\n\"\"\"\nfunction TSGLLEAdaptInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TSGLLEAdaptInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TSGLLEAdaptInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptSetType(petsclib::PetscLibType,adapt::TSGLLEAdapt, type::TSGLLEAdaptType) \n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptSetType\"))\n\"\"\"\nfunction TSGLLEAdaptSetType(petsclib::PetscLibType, adapt::TSGLLEAdapt, type::TSGLLEAdaptType) end\n\n@for_petsc function TSGLLEAdaptSetType(petsclib::$UnionPetscLib, adapt::TSGLLEAdapt, type::TSGLLEAdaptType )\n\n    @chk ccall(\n               (:TSGLLEAdaptSetType, $petsc_library),\n               PetscErrorCode,\n               (TSGLLEAdapt, TSGLLEAdaptType),\n               adapt, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptSetOptionsPrefix(petsclib::PetscLibType,adapt::TSGLLEAdapt, prefix::String) \n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptSetOptionsPrefix\"))\n\"\"\"\nfunction TSGLLEAdaptSetOptionsPrefix(petsclib::PetscLibType, adapt::TSGLLEAdapt, prefix::String) end\n\n@for_petsc function TSGLLEAdaptSetOptionsPrefix(petsclib::$UnionPetscLib, adapt::TSGLLEAdapt, prefix::String )\n\n    @chk ccall(\n               (:TSGLLEAdaptSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (TSGLLEAdapt, Ptr{Cchar}),\n               adapt, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptView(petsclib::PetscLibType,adapt::TSGLLEAdapt, viewer::PetscViewer) \n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptView\"))\n\"\"\"\nfunction TSGLLEAdaptView(petsclib::PetscLibType, adapt::TSGLLEAdapt, viewer::PetscViewer) end\n\n@for_petsc function TSGLLEAdaptView(petsclib::$UnionPetscLib, adapt::TSGLLEAdapt, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TSGLLEAdaptView, $petsc_library),\n               PetscErrorCode,\n               (TSGLLEAdapt, PetscViewer),\n               adapt, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptDestroy(petsclib::PetscLibType,adapt::TSGLLEAdapt) \n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptDestroy\"))\n\"\"\"\nfunction TSGLLEAdaptDestroy(petsclib::PetscLibType, adapt::TSGLLEAdapt) end\n\n@for_petsc function TSGLLEAdaptDestroy(petsclib::$UnionPetscLib, adapt::TSGLLEAdapt )\n\n    @chk ccall(\n               (:TSGLLEAdaptDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TSGLLEAdapt},),\n               adapt,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTSGLLEAdaptSetFromOptions(petsclib::PetscLibType,adapt::TSGLLEAdapt, PetscOptionsObject::PetscOptionItems) \n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptSetFromOptions\"))\n\"\"\"\nfunction TSGLLEAdaptSetFromOptions(petsclib::PetscLibType, adapt::TSGLLEAdapt, PetscOptionsObject::PetscOptionItems) end\n\n@for_petsc function TSGLLEAdaptSetFromOptions(petsclib::$UnionPetscLib, adapt::TSGLLEAdapt, PetscOptionsObject::PetscOptionItems )\n\n    @chk ccall(\n               (:TSGLLEAdaptSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (TSGLLEAdapt, PetscOptionItems),\n               adapt, PetscOptionsObject,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnext_sc::PetscInt,next_h::PetscReal,finish::PetscBool = TSGLLEAdaptChoose(petsclib::PetscLibType,adapt::TSGLLEAdapt, n::PetscInt, orders::Vector{PetscInt}, errors::Vector{PetscReal}, cost::Vector{PetscReal}, cur::PetscInt, h::PetscReal, tleft::PetscReal) \n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptChoose\"))\n\"\"\"\nfunction TSGLLEAdaptChoose(petsclib::PetscLibType, adapt::TSGLLEAdapt, n::PetscInt, orders::Vector{PetscInt}, errors::Vector{PetscReal}, cost::Vector{PetscReal}, cur::PetscInt, h::PetscReal, tleft::PetscReal) end\n\n@for_petsc function TSGLLEAdaptChoose(petsclib::$UnionPetscLib, adapt::TSGLLEAdapt, n::$PetscInt, orders::Vector{$PetscInt}, errors::Vector{$PetscReal}, cost::Vector{$PetscReal}, cur::$PetscInt, h::$PetscReal, tleft::$PetscReal )\n\tnext_sc_ = Ref{$PetscInt}()\n\tnext_h_ = Ref{$PetscReal}()\n\tfinish_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TSGLLEAdaptChoose, $petsc_library),\n               PetscErrorCode,\n               (TSGLLEAdapt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, $PetscInt, $PetscReal, $PetscReal, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{PetscBool}),\n               adapt, n, orders, errors, cost, cur, h, tleft, next_sc_, next_h_, finish_,\n              )\n\n\tnext_sc = next_sc_[]\n\tnext_h = next_h_[]\n\tfinish = finish_[]\n\n\treturn next_sc,next_h,finish\nend \n\n\"\"\"\n\tinadapt::TSGLLEAdapt = TSGLLEAdaptCreate(petsclib::PetscLibType,comm::MPI_Comm) \n\n# External Links\n$(_doc_external(\"Ts/TSGLLEAdaptCreate\"))\n\"\"\"\nfunction TSGLLEAdaptCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function TSGLLEAdaptCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tinadapt_ = Ref{TSGLLEAdapt}()\n\n    @chk ccall(\n               (:TSGLLEAdaptCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{TSGLLEAdapt}),\n               comm, inadapt_,\n              )\n\n\tinadapt = inadapt_[]\n\n\treturn inadapt\nend \n\n"
  },
  {
    "path": "src/autowrapped/Tao_addons_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_TaoMonitorDrawCtx end\nconst TaoMonitorDrawCtx = Ptr{_n_TaoMonitorDrawCtx}\n# -------------------------------------------------------\n\"\"\"\n\tctx::TaoMonitorDrawCtx = TaoMonitorDrawCtxCreate(petsclib::PetscLibType,comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) \nCreates the monitor context for `TaoMonitorSolutionDraw()`\n\nCollective\n\nInput Parameters:\n- `comm`     - the communicator to share the context\n- `host`     - the name of the X Windows host that will display the monitor\n- `label`    - the label to put at the top of the display window\n- `x`        - the horizontal coordinate of the lower left corner of the window to open\n- `y`        - the vertical coordinate of the lower left corner of the window to open\n- `m`        - the width of the window\n- `n`        - the height of the window\n- `howoften` - how many `Tao` iterations between displaying the monitor information\n\nOutput Parameter:\n- `ctx` - the monitor context\n\nOptions Database Keys:\n- `-tao_monitor_solution_draw` - use `TaoMonitorSolutionDraw()` to monitor the solution\n- `-tao_draw_solution_initial` - show initial guess as well as current solution\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorSet()`, `TaoMonitorDefault()`, `VecView()`, `TaoMonitorDrawCtx()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorDrawCtxCreate\"))\n\"\"\"\nfunction TaoMonitorDrawCtxCreate(petsclib::PetscLibType, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::PetscInt) end\n\n@for_petsc function TaoMonitorDrawCtxCreate(petsclib::$UnionPetscLib, comm::MPI_Comm, host::String, label::String, x::Cint, y::Cint, m::Cint, n::Cint, howoften::$PetscInt )\n\tctx_ = Ref{TaoMonitorDrawCtx}()\n\n    @chk ccall(\n               (:TaoMonitorDrawCtxCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, Ptr{Cchar}, Cint, Cint, Cint, Cint, $PetscInt, Ptr{TaoMonitorDrawCtx}),\n               comm, host, label, x, y, m, n, howoften, ctx_,\n              )\n\n\tctx = ctx_[]\n\n\treturn ctx\nend \n\n\"\"\"\n\tTaoMonitorDrawCtxDestroy(petsclib::PetscLibType,ictx::TaoMonitorDrawCtx) \nDestroys the monitor context for `TaoMonitorSolutionDraw()`\n\nCollective\n\nInput Parameter:\n- `ictx` - the monitor context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorSet()`, `TaoMonitorDefault()`, `VecView()`, `TaoMonitorSolutionDraw()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorDrawCtxDestroy\"))\n\"\"\"\nfunction TaoMonitorDrawCtxDestroy(petsclib::PetscLibType, ictx::TaoMonitorDrawCtx) end\n\n@for_petsc function TaoMonitorDrawCtxDestroy(petsclib::$UnionPetscLib, ictx::TaoMonitorDrawCtx )\n\n    @chk ccall(\n               (:TaoMonitorDrawCtxDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TaoMonitorDrawCtx},),\n               ictx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchViewFromOptions(petsclib::PetscLibType,A::TaoLineSearch, obj::PetscObject, name::String) \nView a `TaoLineSearch` object based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the `Tao` context\n- `obj`  - Optional object\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchView()`, `PetscObjectViewFromOptions()`, `TaoLineSearchCreate()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchViewFromOptions\"))\n\"\"\"\nfunction TaoLineSearchViewFromOptions(petsclib::PetscLibType, A::TaoLineSearch, obj::PetscObject, name::String) end\n\n@for_petsc function TaoLineSearchViewFromOptions(petsclib::$UnionPetscLib, A::TaoLineSearch, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:TaoLineSearchViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchView(petsclib::PetscLibType,ls::TaoLineSearch, viewer::PetscViewer) \nPrints information about the `TaoLineSearch`\n\nCollective\n\nInput Parameters:\n- `ls`     - the `TaoLineSearch` context\n- `viewer` - visualization context\n\nOptions Database Key:\n- `-tao_ls_view` - Calls `TaoLineSearchView()` at the end of each line search\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `PetscViewerASCIIOpen()`, `TaoLineSearchViewFromOptions()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchView\"))\n\"\"\"\nfunction TaoLineSearchView(petsclib::PetscLibType, ls::TaoLineSearch, viewer::PetscViewer) end\n\n@for_petsc function TaoLineSearchView(petsclib::$UnionPetscLib, ls::TaoLineSearch, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TaoLineSearchView, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, PetscViewer),\n               ls, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewls::TaoLineSearch = TaoLineSearchCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a `TaoLineSearch` object.  Algorithms in `Tao` that use\nline-searches will automatically create one so this all is rarely needed\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `newls` - the new `TaoLineSearch` context\n\nOptions Database Key:\n- `-tao_ls_type` - select which method `Tao` should use\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchType`, `TaoLineSearchSetType()`, `TaoLineSearchApply()`, `TaoLineSearchDestroy()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchCreate\"))\n\"\"\"\nfunction TaoLineSearchCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function TaoLineSearchCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tnewls_ = Ref{TaoLineSearch}()\n\n    @chk ccall(\n               (:TaoLineSearchCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{TaoLineSearch}),\n               comm, newls_,\n              )\n\n\tnewls = newls_[]\n\n\treturn newls\nend \n\n\"\"\"\n\tTaoLineSearchSetUp(petsclib::PetscLibType,ls::TaoLineSearch) \nSets up the internal data structures for the later use\nof a `TaoLineSearch`\n\nCollective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`, `TaoLineSearchApply()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetUp\"))\n\"\"\"\nfunction TaoLineSearchSetUp(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchSetUp(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\n    @chk ccall(\n               (:TaoLineSearchSetUp, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch,),\n               ls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchReset(petsclib::PetscLibType,ls::TaoLineSearch) \nSome line searches may carry state information\nfrom one `TaoLineSearchApply()` to the next.  This function resets this\nstate information.\n\nCollective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`, `TaoLineSearchApply()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchReset\"))\n\"\"\"\nfunction TaoLineSearchReset(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchReset(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\n    @chk ccall(\n               (:TaoLineSearchReset, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch,),\n               ls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchDestroy(petsclib::PetscLibType,ls::TaoLineSearch) \nDestroys the `TaoLineSearch` context that was created with\n`TaoLineSearchCreate()`\n\nCollective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nLevel: developer\n\n-seealso: `TaoLineSearchCreate()`, `TaoLineSearchSolve()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchDestroy\"))\n\"\"\"\nfunction TaoLineSearchDestroy(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchDestroy(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\n    @chk ccall(\n               (:TaoLineSearchDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{TaoLineSearch},),\n               ls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tf::PetscReal,steplength::PetscReal = TaoLineSearchApply(petsclib::PetscLibType,ls::TaoLineSearch, x::PetscVec, g::PetscVec, s::PetscVec, reason::TaoLineSearchConvergedReason) \nPerforms a line\nCriteria for acceptable step length depends on the line-search algorithm chosen\n\nCollective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `s`  - search direction\n\nOutput Parameters:\n- `x`          - On input the current solution, on output `x` contains the new solution determined by the line search\n- `f`          - On input the objective function value at current solution, on output contains the objective function value at new solution\n- `g`          - On input the gradient evaluated at `x`, on output contains the gradient at new solution\n- `steplength` - scalar multiplier of s used ( x = x0 + steplength * x)\n- `reason`     - `TaoLineSearchConvergedReason` reason why the line-search stopped\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearchConvergedReason`, `TaoLineSearch`, `TaoLineSearchCreate()`, `TaoLineSearchSetType()`,\n`TaoLineSearchSetInitialStepLength()`, `TaoAddLineSearchCounts()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchApply\"))\n\"\"\"\nfunction TaoLineSearchApply(petsclib::PetscLibType, ls::TaoLineSearch, x::PetscVec, g::PetscVec, s::PetscVec, reason::TaoLineSearchConvergedReason) end\n\n@for_petsc function TaoLineSearchApply(petsclib::$UnionPetscLib, ls::TaoLineSearch, x::PetscVec, g::PetscVec, s::PetscVec, reason::TaoLineSearchConvergedReason )\n\tf_ = Ref{$PetscReal}()\n\tsteplength_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoLineSearchApply, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CVec, Ptr{$PetscReal}, CVec, CVec, Ptr{$PetscReal}, Ptr{TaoLineSearchConvergedReason}),\n               ls, x, f_, g, s, steplength_, reason,\n              )\n\n\tf = f_[]\n\tsteplength = steplength_[]\n\n\treturn f,steplength\nend \n\n\"\"\"\n\tTaoLineSearchSetType(petsclib::PetscLibType,ls::TaoLineSearch, type::TaoLineSearchType) \nSets the algorithm used in a line search\n\nCollective\n\nInput Parameters:\n- `ls`   - the `TaoLineSearch` context\n- `type` - the `TaoLineSearchType` selection\n\nOptions Database Key:\n- `-tao_ls_type <type>` - select which method Tao should use at runtime\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchType`, `TaoLineSearchCreate()`, `TaoLineSearchGetType()`,\n`TaoLineSearchApply()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetType\"))\n\"\"\"\nfunction TaoLineSearchSetType(petsclib::PetscLibType, ls::TaoLineSearch, type::TaoLineSearchType) end\n\n@for_petsc function TaoLineSearchSetType(petsclib::$UnionPetscLib, ls::TaoLineSearch, type::TaoLineSearchType )\n\n    @chk ccall(\n               (:TaoLineSearchSetType, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, TaoLineSearchType),\n               ls, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchMonitor(petsclib::PetscLibType,ls::TaoLineSearch, its::PetscInt, f::PetscReal, step::PetscReal) \nMonitor the line search steps. This routine will output the\niteration number, step length, and function value before calling the implementation\nspecific monitor.\n\nInput Parameters:\n- `ls`   - the `TaoLineSearch` context\n- `its`  - the current iterate number (>=0)\n- `f`    - the current objective function value\n- `step` - the step length\n\nOptions Database Key:\n- `-tao_ls_monitor` - Use the default monitor, which prints statistics to standard output\n\nLevel: developer\n\n-seealso: `TaoLineSearch`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchMonitor\"))\n\"\"\"\nfunction TaoLineSearchMonitor(petsclib::PetscLibType, ls::TaoLineSearch, its::PetscInt, f::PetscReal, step::PetscReal) end\n\n@for_petsc function TaoLineSearchMonitor(petsclib::$UnionPetscLib, ls::TaoLineSearch, its::$PetscInt, f::$PetscReal, step::$PetscReal )\n\n    @chk ccall(\n               (:TaoLineSearchMonitor, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, $PetscInt, $PetscReal, $PetscReal),\n               ls, its, f, step,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchSetFromOptions(petsclib::PetscLibType,ls::TaoLineSearch) \nSets various `TaoLineSearch` parameters from user\noptions.\n\nCollective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOptions Database Keys:\n- `-tao_ls_type <type>`     - The algorithm that `TaoLineSearch` uses (more-thuente, gpcg, unit)\n- `-tao_ls_ftol <tol>`      - tolerance for sufficient decrease\n- `-tao_ls_gtol <tol>`      - tolerance for curvature condition\n- `-tao_ls_rtol <tol>`      - relative tolerance for acceptable step\n- `-tao_ls_stepinit <step>` - initial steplength allowed\n- `-tao_ls_stepmin <step>`  - minimum steplength allowed\n- `-tao_ls_stepmax <step>`  - maximum steplength allowed\n- `-tao_ls_max_funcs <n>`   - maximum number of function evaluations allowed\n- `-tao_ls_view`            - display line-search results to standard output\n\nLevel: beginner\n\n-seealso: `TaoLineSearch`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetFromOptions\"))\n\"\"\"\nfunction TaoLineSearchSetFromOptions(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchSetFromOptions(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\n    @chk ccall(\n               (:TaoLineSearchSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch,),\n               ls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TaoLineSearchType = TaoLineSearchGetType(petsclib::PetscLibType,ls::TaoLineSearch) \nGets the current line search algorithm\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameter:\n- `type` - the line search algorithm in effect\n\nLevel: developer\n\n-seealso: `TaoLineSearch`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetType\"))\n\"\"\"\nfunction TaoLineSearchGetType(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchGetType(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\ttype_ = Ref{TaoLineSearchType}()\n\n    @chk ccall(\n               (:TaoLineSearchGetType, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{TaoLineSearchType}),\n               ls, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tnfeval::PetscInt,ngeval::PetscInt,nfgeval::PetscInt = TaoLineSearchGetNumberFunctionEvaluations(petsclib::PetscLibType,ls::TaoLineSearch) \nGets the number of function and gradient evaluation\nroutines used by the line search in last application (not cumulative).\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameters:\n- `nfeval`  - number of function evaluations\n- `ngeval`  - number of gradient evaluations\n- `nfgeval` - number of function/gradient evaluations\n\nLevel: intermediate\n\n-seealso: `TaoLineSearch`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetNumberFunctionEvaluations\"))\n\"\"\"\nfunction TaoLineSearchGetNumberFunctionEvaluations(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchGetNumberFunctionEvaluations(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\tnfeval_ = Ref{$PetscInt}()\n\tngeval_ = Ref{$PetscInt}()\n\tnfgeval_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoLineSearchGetNumberFunctionEvaluations, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               ls, nfeval_, ngeval_, nfgeval_,\n              )\n\n\tnfeval = nfeval_[]\n\tngeval = ngeval_[]\n\tnfgeval = nfgeval_[]\n\n\treturn nfeval,ngeval,nfgeval\nend \n\n\"\"\"\n\tflg::PetscBool = TaoLineSearchIsUsingTaoRoutines(petsclib::PetscLibType,ls::TaoLineSearch) \nChecks whether the line search is using\nthe standard `Tao` evaluation routines.\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the line search is using `Tao` evaluation routines,\notherwise `PETSC_FALSE`\n\nLevel: developer\n\n-seealso: `TaoLineSearch`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchIsUsingTaoRoutines\"))\n\"\"\"\nfunction TaoLineSearchIsUsingTaoRoutines(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchIsUsingTaoRoutines(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TaoLineSearchIsUsingTaoRoutines, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{PetscBool}),\n               ls, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tTaoLineSearchSetObjectiveRoutine(petsclib::PetscLibType,ls::TaoLineSearch, func::external, ctx::Cvoid) \nSets the function evaluation routine for the line search\n\nLogically Collective\n\nInput Parameters:\n- `ls`   - the `TaoLineSearch` context\n- `func` - the objective function evaluation routine\n- `ctx`  - the (optional) user-defined context for private data\n\nCalling sequence of `func`:\n- `ls`  - the line search context\n- `x`   - input vector\n- `f`   - function value\n- `ctx` - (optional) user-defined context\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`, `TaoLineSearchSetGradientRoutine()`, `TaoLineSearchSetObjectiveAndGradientRoutine()`, `TaoLineSearchUseTaoRoutines()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetObjectiveRoutine\"))\n\"\"\"\nfunction TaoLineSearchSetObjectiveRoutine(petsclib::PetscLibType, ls::TaoLineSearch, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoLineSearchSetObjectiveRoutine(petsclib::$UnionPetscLib, ls::TaoLineSearch, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoLineSearchSetObjectiveRoutine, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, external, Ptr{Cvoid}),\n               ls, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchSetGradientRoutine(petsclib::PetscLibType,ls::TaoLineSearch, func::external, ctx::Cvoid) \nSets the gradient evaluation routine for the line search\n\nLogically Collective\n\nInput Parameters:\n- `ls`   - the `TaoLineSearch` context\n- `func` - the gradient evaluation routine\n- `ctx`  - the (optional) user-defined context for private data\n\nCalling sequence of `func`:\n- `ls`  - the linesearch object\n- `x`   - input vector\n- `g`   - gradient vector\n- `ctx` - (optional) user-defined context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`, `TaoLineSearchSetObjectiveRoutine()`, `TaoLineSearchSetObjectiveAndGradientRoutine()`, `TaoLineSearchUseTaoRoutines()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetGradientRoutine\"))\n\"\"\"\nfunction TaoLineSearchSetGradientRoutine(petsclib::PetscLibType, ls::TaoLineSearch, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoLineSearchSetGradientRoutine(petsclib::$UnionPetscLib, ls::TaoLineSearch, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoLineSearchSetGradientRoutine, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, external, Ptr{Cvoid}),\n               ls, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchSetObjectiveAndGradientRoutine(petsclib::PetscLibType,ls::TaoLineSearch, func::external, ctx::Cvoid) \nSets the objective/gradient evaluation routine for the line search\n\nLogically Collective\n\nInput Parameters:\n- `ls`   - the `TaoLineSearch` context\n- `func` - the objective and gradient evaluation routine\n- `ctx`  - the (optional) user-defined context for private data\n\nCalling sequence of `func`:\n- `ls`  - the linesearch object\n- `x`   - input vector\n- `f`   - function value\n- `g`   - gradient vector\n- `ctx` - (optional) user-defined context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`, `TaoLineSearchSetObjectiveRoutine()`, `TaoLineSearchSetGradientRoutine()`, `TaoLineSearchUseTaoRoutines()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetObjectiveAndGradientRoutine\"))\n\"\"\"\nfunction TaoLineSearchSetObjectiveAndGradientRoutine(petsclib::PetscLibType, ls::TaoLineSearch, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoLineSearchSetObjectiveAndGradientRoutine(petsclib::$UnionPetscLib, ls::TaoLineSearch, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoLineSearchSetObjectiveAndGradientRoutine, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, external, Ptr{Cvoid}),\n               ls, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchSetObjectiveAndGTSRoutine(petsclib::PetscLibType,ls::TaoLineSearch, func::external, ctx::Cvoid) \nSets the objective and\n(gradient'*stepdirection) evaluation routine for the line search.\n\nLogically Collective\n\nInput Parameters:\n- `ls`   - the `TaoLineSearch` context\n- `func` - the objective and gradient evaluation routine\n- `ctx`  - the (optional) user-defined context for private data\n\nCalling sequence of `func`:\n- `ls`  - the linesearch context\n- `x`   - input vector\n- `s`   - step direction\n- `f`   - function value\n- `gts` - inner product of gradient and step direction vectors\n- `ctx` - (optional) user-defined context\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`, `TaoLineSearchSetObjective()`, `TaoLineSearchSetGradient()`, `TaoLineSearchUseTaoRoutines()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetObjectiveAndGTSRoutine\"))\n\"\"\"\nfunction TaoLineSearchSetObjectiveAndGTSRoutine(petsclib::PetscLibType, ls::TaoLineSearch, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoLineSearchSetObjectiveAndGTSRoutine(petsclib::$UnionPetscLib, ls::TaoLineSearch, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoLineSearchSetObjectiveAndGTSRoutine, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, external, Ptr{Cvoid}),\n               ls, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchUseTaoRoutines(petsclib::PetscLibType,ls::TaoLineSearch, ts::Tao) \nInforms the `TaoLineSearch` to use the\nobjective and gradient evaluation routines from the given `Tao` object. The default.\n\nLogically Collective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `ts` - the `Tao` context with defined objective/gradient evaluation routines\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchUseTaoRoutines\"))\n\"\"\"\nfunction TaoLineSearchUseTaoRoutines(petsclib::PetscLibType, ls::TaoLineSearch, ts::Tao) end\n\n@for_petsc function TaoLineSearchUseTaoRoutines(petsclib::$UnionPetscLib, ls::TaoLineSearch, ts::Tao )\n\n    @chk ccall(\n               (:TaoLineSearchUseTaoRoutines, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CTao),\n               ls, ts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tf::PetscReal = TaoLineSearchComputeObjective(petsclib::PetscLibType,ls::TaoLineSearch, x::PetscVec) \nComputes the objective function value at a given point\n\nCollective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `x`  - input vector\n\nOutput Parameter:\n- `f` - Objective value at `x`\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchComputeGradient()`, `TaoLineSearchComputeObjectiveAndGradient()`, `TaoLineSearchSetObjectiveRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchComputeObjective\"))\n\"\"\"\nfunction TaoLineSearchComputeObjective(petsclib::PetscLibType, ls::TaoLineSearch, x::PetscVec) end\n\n@for_petsc function TaoLineSearchComputeObjective(petsclib::$UnionPetscLib, ls::TaoLineSearch, x::PetscVec )\n\tf_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoLineSearchComputeObjective, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CVec, Ptr{$PetscReal}),\n               ls, x, f_,\n              )\n\n\tf = f_[]\n\n\treturn f\nend \n\n\"\"\"\n\tf::PetscReal = TaoLineSearchComputeObjectiveAndGradient(petsclib::PetscLibType,ls::TaoLineSearch, x::PetscVec, g::PetscVec) \nComputes the objective function value at a given point\n\nCollective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `x`  - input vector\n\nOutput Parameters:\n- `f` - Objective value at `x`\n- `g` - Gradient vector at `x`\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchComputeGradient()`, `TaoLineSearchSetObjectiveRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchComputeObjectiveAndGradient\"))\n\"\"\"\nfunction TaoLineSearchComputeObjectiveAndGradient(petsclib::PetscLibType, ls::TaoLineSearch, x::PetscVec, g::PetscVec) end\n\n@for_petsc function TaoLineSearchComputeObjectiveAndGradient(petsclib::$UnionPetscLib, ls::TaoLineSearch, x::PetscVec, g::PetscVec )\n\tf_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoLineSearchComputeObjectiveAndGradient, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CVec, Ptr{$PetscReal}, CVec),\n               ls, x, f_, g,\n              )\n\n\tf = f_[]\n\n\treturn f\nend \n\n\"\"\"\n\tTaoLineSearchComputeGradient(petsclib::PetscLibType,ls::TaoLineSearch, x::PetscVec, g::PetscVec) \nComputes the gradient of the objective function\n\nCollective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `x`  - input vector\n\nOutput Parameter:\n- `g` - gradient vector\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchComputeObjective()`, `TaoLineSearchComputeObjectiveAndGradient()`, `TaoLineSearchSetGradient()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchComputeGradient\"))\n\"\"\"\nfunction TaoLineSearchComputeGradient(petsclib::PetscLibType, ls::TaoLineSearch, x::PetscVec, g::PetscVec) end\n\n@for_petsc function TaoLineSearchComputeGradient(petsclib::$UnionPetscLib, ls::TaoLineSearch, x::PetscVec, g::PetscVec )\n\n    @chk ccall(\n               (:TaoLineSearchComputeGradient, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CVec, CVec),\n               ls, x, g,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tf::PetscReal,gts::PetscReal = TaoLineSearchComputeObjectiveAndGTS(petsclib::PetscLibType,ls::TaoLineSearch, x::PetscVec) \nComputes the objective function value and inner product of gradient and\nstep direction at a given point\n\nCollective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `x`  - input vector\n\nOutput Parameters:\n- `f`   - Objective value at `x`\n- `gts` - inner product of gradient and step direction at `x`\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchComputeGradient()`, `TaoLineSearchComputeObjectiveAndGradient()`, `TaoLineSearchSetObjectiveRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchComputeObjectiveAndGTS\"))\n\"\"\"\nfunction TaoLineSearchComputeObjectiveAndGTS(petsclib::PetscLibType, ls::TaoLineSearch, x::PetscVec) end\n\n@for_petsc function TaoLineSearchComputeObjectiveAndGTS(petsclib::$UnionPetscLib, ls::TaoLineSearch, x::PetscVec )\n\tf_ = Ref{$PetscReal}()\n\tgts_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoLineSearchComputeObjectiveAndGTS, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CVec, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               ls, x, f_, gts_,\n              )\n\n\tf = f_[]\n\tgts = gts_[]\n\n\treturn f,gts\nend \n\n\"\"\"\n\tf::PetscReal,steplength::PetscReal = TaoLineSearchGetSolution(petsclib::PetscLibType,ls::TaoLineSearch, x::PetscVec, g::PetscVec, reason::TaoLineSearchConvergedReason) \nReturns the solution to the line search\n\nCollective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameters:\n- `x`          - the new solution\n- `f`          - the objective function value at `x`\n- `g`          - the gradient at `x`\n- `steplength` - the multiple of the step direction taken by the line search\n- `reason`     - the reason why the line search terminated\n\nLevel: developer\n\n-seealso: `TaoLineSearchGetStartingVector()`, `TaoLineSearchGetStepDirection()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetSolution\"))\n\"\"\"\nfunction TaoLineSearchGetSolution(petsclib::PetscLibType, ls::TaoLineSearch, x::PetscVec, g::PetscVec, reason::TaoLineSearchConvergedReason) end\n\n@for_petsc function TaoLineSearchGetSolution(petsclib::$UnionPetscLib, ls::TaoLineSearch, x::PetscVec, g::PetscVec, reason::TaoLineSearchConvergedReason )\n\tf_ = Ref{$PetscReal}()\n\tsteplength_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoLineSearchGetSolution, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CVec, Ptr{$PetscReal}, CVec, Ptr{$PetscReal}, Ptr{TaoLineSearchConvergedReason}),\n               ls, x, f_, g, steplength_, reason,\n              )\n\n\tf = f_[]\n\tsteplength = steplength_[]\n\n\treturn f,steplength\nend \n\n\"\"\"\n\tTaoLineSearchGetStartingVector(petsclib::PetscLibType,ls::TaoLineSearch, x::PetscVec) \nGets a the initial point of the line\nsearch.\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameter:\n- `x` - The initial point of the line search\n\nLevel: advanced\n\n-seealso: `TaoLineSearchGetSolution()`, `TaoLineSearchGetStepDirection()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetStartingVector\"))\n\"\"\"\nfunction TaoLineSearchGetStartingVector(petsclib::PetscLibType, ls::TaoLineSearch, x::PetscVec) end\n\n@for_petsc function TaoLineSearchGetStartingVector(petsclib::$UnionPetscLib, ls::TaoLineSearch, x::PetscVec )\n\tx_ = Ref(x.ptr)\n\n    @chk ccall(\n               (:TaoLineSearchGetStartingVector, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{CVec}),\n               ls, x_,\n              )\n\n\tx.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchGetStepDirection(petsclib::PetscLibType,ls::TaoLineSearch, s::PetscVec) \nGets the step direction of the line\nsearch.\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameter:\n- `s` - the step direction of the line search\n\nLevel: advanced\n\n-seealso: `TaoLineSearchGetSolution()`, `TaoLineSearchGetStartingVector()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetStepDirection\"))\n\"\"\"\nfunction TaoLineSearchGetStepDirection(petsclib::PetscLibType, ls::TaoLineSearch, s::PetscVec) end\n\n@for_petsc function TaoLineSearchGetStepDirection(petsclib::$UnionPetscLib, ls::TaoLineSearch, s::PetscVec )\n\ts_ = Ref(s.ptr)\n\n    @chk ccall(\n               (:TaoLineSearchGetStepDirection, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{CVec}),\n               ls, s_,\n              )\n\n\ts.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tf_fullstep::PetscReal = TaoLineSearchGetFullStepObjective(petsclib::PetscLibType,ls::TaoLineSearch) \nReturns the objective function value at the full step.  Useful for some minimization algorithms.\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameter:\n- `f_fullstep` - the objective value at the full step length\n\nLevel: developer\n\n-seealso: `TaoLineSearchGetSolution()`, `TaoLineSearchGetStartingVector()`, `TaoLineSearchGetStepDirection()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetFullStepObjective\"))\n\"\"\"\nfunction TaoLineSearchGetFullStepObjective(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchGetFullStepObjective(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\tf_fullstep_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoLineSearchGetFullStepObjective, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{$PetscReal}),\n               ls, f_fullstep_,\n              )\n\n\tf_fullstep = f_fullstep_[]\n\n\treturn f_fullstep\nend \n\n\"\"\"\n\tTaoLineSearchSetVariableBounds(petsclib::PetscLibType,ls::TaoLineSearch, xl::PetscVec, xu::PetscVec) \nSets the upper and lower bounds for a bounded line search\n\nLogically Collective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `xl` - vector of lower bounds\n- `xu` - vector of upper bounds\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoSetVariableBounds()`, `TaoLineSearchCreate()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetVariableBounds\"))\n\"\"\"\nfunction TaoLineSearchSetVariableBounds(petsclib::PetscLibType, ls::TaoLineSearch, xl::PetscVec, xu::PetscVec) end\n\n@for_petsc function TaoLineSearchSetVariableBounds(petsclib::$UnionPetscLib, ls::TaoLineSearch, xl::PetscVec, xu::PetscVec )\n\n    @chk ccall(\n               (:TaoLineSearchSetVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, CVec, CVec),\n               ls, xl, xu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchSetInitialStepLength(petsclib::PetscLibType,ls::TaoLineSearch, s::PetscReal) \nSets the initial step length of a line\nsearch.  If this value is not set then 1.0 is assumed.\n\nLogically Collective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `s`  - the initial step size\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchGetStepLength()`, `TaoLineSearchApply()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetInitialStepLength\"))\n\"\"\"\nfunction TaoLineSearchSetInitialStepLength(petsclib::PetscLibType, ls::TaoLineSearch, s::PetscReal) end\n\n@for_petsc function TaoLineSearchSetInitialStepLength(petsclib::$UnionPetscLib, ls::TaoLineSearch, s::$PetscReal )\n\n    @chk ccall(\n               (:TaoLineSearchSetInitialStepLength, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, $PetscReal),\n               ls, s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ts::PetscReal = TaoLineSearchGetStepLength(petsclib::PetscLibType,ls::TaoLineSearch) \nGet the current step length\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameter:\n- `s` - the current step length\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchSetInitialStepLength()`, `TaoLineSearchApply()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetStepLength\"))\n\"\"\"\nfunction TaoLineSearchGetStepLength(petsclib::PetscLibType, ls::TaoLineSearch) end\n\n@for_petsc function TaoLineSearchGetStepLength(petsclib::$UnionPetscLib, ls::TaoLineSearch )\n\ts_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoLineSearchGetStepLength, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{$PetscReal}),\n               ls, s_,\n              )\n\n\ts = s_[]\n\n\treturn s\nend \n\n\"\"\"\n\tTaoLineSearchRegister(petsclib::PetscLibType,sname::String, func::external) \nAdds a line\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname` - name of a new user-defined solver\n- `func`  - routine to Create method context\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchRegister\"))\n\"\"\"\nfunction TaoLineSearchRegister(petsclib::PetscLibType, sname::String, func::external) end\n\n@for_petsc function TaoLineSearchRegister(petsclib::$UnionPetscLib, sname::String, func::external )\n\n    @chk ccall(\n               (:TaoLineSearchRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchAppendOptionsPrefix(petsclib::PetscLibType,ls::TaoLineSearch, p::String) \nAppends to the prefix used for searching\nfor all `TaoLineSearch` options in the database.\n\nCollective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` solver context\n- `p`  - the prefix string to prepend to all line search requests\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchSetOptionsPrefix()`, `TaoLineSearchGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchAppendOptionsPrefix\"))\n\"\"\"\nfunction TaoLineSearchAppendOptionsPrefix(petsclib::PetscLibType, ls::TaoLineSearch, p::String) end\n\n@for_petsc function TaoLineSearchAppendOptionsPrefix(petsclib::$UnionPetscLib, ls::TaoLineSearch, p::String )\n\n    @chk ccall(\n               (:TaoLineSearchAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{Cchar}),\n               ls, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchGetOptionsPrefix(petsclib::PetscLibType,ls::TaoLineSearch, p::String) \nGets the prefix used for searching for all\n`TaoLineSearch` options in the database\n\nNot Collective\n\nInput Parameter:\n- `ls` - the `TaoLineSearch` context\n\nOutput Parameter:\n- `p` - pointer to the prefix string used is returned\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchSetOptionsPrefix()`, `TaoLineSearchAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchGetOptionsPrefix\"))\n\"\"\"\nfunction TaoLineSearchGetOptionsPrefix(petsclib::PetscLibType, ls::TaoLineSearch, p::String) end\n\n@for_petsc function TaoLineSearchGetOptionsPrefix(petsclib::$UnionPetscLib, ls::TaoLineSearch, p::String )\n\tp_ = Ref(pointer(p))\n\n    @chk ccall(\n               (:TaoLineSearchGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{Ptr{Cchar}}),\n               ls, p_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchSetOptionsPrefix(petsclib::PetscLibType,ls::TaoLineSearch, p::String) \nSets the prefix used for searching for all\n`TaoLineSearch` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `ls` - the `TaoLineSearch` context\n- `p`  - the prefix string to prepend to all `ls` option requests\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchAppendOptionsPrefix()`, `TaoLineSearchGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchSetOptionsPrefix\"))\n\"\"\"\nfunction TaoLineSearchSetOptionsPrefix(petsclib::PetscLibType, ls::TaoLineSearch, p::String) end\n\n@for_petsc function TaoLineSearchSetOptionsPrefix(petsclib::$UnionPetscLib, ls::TaoLineSearch, p::String )\n\n    @chk ccall(\n               (:TaoLineSearchSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (TaoLineSearch, Ptr{Cchar}),\n               ls, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the `TaoLineSearch` package. It is called from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `Tao`, `TaoLineSearch`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchFinalizePackage\"))\n\"\"\"\nfunction TaoLineSearchFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TaoLineSearchFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TaoLineSearchFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLineSearchInitializePackage(petsclib::PetscLibType) \nThis function registers the line\nalgorithms in `Tao`.  When using shared or static libraries, this function is called from the\nfirst entry to `TaoCreate()`; when using dynamic, it is called\nfrom PetscDLLibraryRegister_tao()\n\nLevel: developer\n\n-seealso: `Tao`, `TaoLineSearch`, `TaoLineSearchCreate()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLineSearchInitializePackage\"))\n\"\"\"\nfunction TaoLineSearchInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TaoLineSearchInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TaoLineSearchInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/Tao_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_TaoLineSearch end\nconst TaoLineSearch = Ptr{_n_TaoLineSearch}\n\n# -------------------------------------------------------\n\"\"\"\n\tTaoFinalizePackage(petsclib::PetscLibType) \nThis function destroys everything in the PETSc/Tao\ninterface to the Tao package. It is called from `PetscFinalize()`.\n\nLevel: developer\n\n-seealso: `TaoInitializePackage()`, `PetscFinalize()`, `TaoRegister()`, `TaoRegisterAll()`\n\n# External Links\n$(_doc_external(\"Tao/TaoFinalizePackage\"))\n\"\"\"\nfunction TaoFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function TaoFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TaoFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoInitializePackage(petsclib::PetscLibType) \nThis function sets up PETSc to use the Tao\npackage.  When using static or shared libraries, this function is called from the\nfirst entry to `TaoCreate()`; when using shared or static libraries, it is called\nfrom PetscDLLibraryRegister_tao()\n\nLevel: developer\n\n-seealso: `TaoCreate()`, `TaoFinalizePackage()`, `TaoRegister()`, `TaoRegisterAll()`\n\n# External Links\n$(_doc_external(\"Tao/TaoInitializePackage\"))\n\"\"\"\nfunction TaoInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function TaoInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TaoInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetSolution(petsclib::PetscLibType,tao::Tao, x0::PetscVec) \nSets the vector holding the initial guess for the solve\n\nLogically Collective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `x0`  - the initial guess\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoCreate()`, `TaoSolve()`, `TaoGetSolution()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetSolution\"))\n\"\"\"\nfunction TaoSetSolution(petsclib::PetscLibType, tao::Tao, x0::PetscVec) end\n\n@for_petsc function TaoSetSolution(petsclib::$UnionPetscLib, tao::Tao, x0::PetscVec )\n\n    @chk ccall(\n               (:TaoSetSolution, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec),\n               tao, x0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoTestGradient(petsclib::PetscLibType,tao::Tao, x::PetscVec, g1::PetscVec) \n\n# External Links\n$(_doc_external(\"Tao/TaoTestGradient\"))\n\"\"\"\nfunction TaoTestGradient(petsclib::PetscLibType, tao::Tao, x::PetscVec, g1::PetscVec) end\n\n@for_petsc function TaoTestGradient(petsclib::$UnionPetscLib, tao::Tao, x::PetscVec, g1::PetscVec )\n\n    @chk ccall(\n               (:TaoTestGradient, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, x, g1,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeGradient(petsclib::PetscLibType,tao::Tao, X::PetscVec, G::PetscVec) \nComputes the gradient of the objective function\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `X`   - input vector\n\nOutput Parameter:\n- `G` - gradient vector\n\nOptions Database Keys:\n- `-tao_test_gradient`      - compare the user provided gradient with one compute via finite differences to check for errors\n- `-tao_test_gradient_view` - display the user provided gradient, the finite difference gradient and the difference between them to help users detect the location of errors in the user provided gradient\n\nLevel: developer\n\n-seealso: [](ch_tao), `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetGradient()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeGradient\"))\n\"\"\"\nfunction TaoComputeGradient(petsclib::PetscLibType, tao::Tao, X::PetscVec, G::PetscVec) end\n\n@for_petsc function TaoComputeGradient(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, G::PetscVec )\n\n    @chk ccall(\n               (:TaoComputeGradient, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, X, G,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tf::PetscReal = TaoComputeObjective(petsclib::PetscLibType,tao::Tao, X::PetscVec) \nComputes the objective function value at a given point\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `X`   - input vector\n\nOutput Parameter:\n- `f` - Objective value at X\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeGradient()`, `TaoComputeObjectiveAndGradient()`, `TaoSetObjective()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeObjective\"))\n\"\"\"\nfunction TaoComputeObjective(petsclib::PetscLibType, tao::Tao, X::PetscVec) end\n\n@for_petsc function TaoComputeObjective(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec )\n\tf_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoComputeObjective, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, Ptr{$PetscReal}),\n               tao, X, f_,\n              )\n\n\tf = f_[]\n\n\treturn f\nend \n\n\"\"\"\n\tf::PetscReal = TaoComputeObjectiveAndGradient(petsclib::PetscLibType,tao::Tao, X::PetscVec, G::PetscVec) \nComputes the objective function value at a given point\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `X`   - input vector\n\nOutput Parameters:\n- `f` - Objective value at `X`\n- `G` - Gradient vector at `X`\n\nLevel: developer\n\n-seealso: [](ch_tao), `TaoComputeGradient()`, `TaoSetObjective()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeObjectiveAndGradient\"))\n\"\"\"\nfunction TaoComputeObjectiveAndGradient(petsclib::PetscLibType, tao::Tao, X::PetscVec, G::PetscVec) end\n\n@for_petsc function TaoComputeObjectiveAndGradient(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, G::PetscVec )\n\tf_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoComputeObjectiveAndGradient, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, Ptr{$PetscReal}, CVec),\n               tao, X, f_, G,\n              )\n\n\tf = f_[]\n\n\treturn f\nend \n\n\"\"\"\n\tTaoSetObjective(petsclib::PetscLibType,tao::Tao, func::external, ctx::Cvoid) \nSets the function evaluation routine for minimization\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `func` - the objective function\n- `ctx`  - [optional] user-defined context for private data for the function evaluation\nroutine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the optimizer\n- `x`   - input vector\n- `f`   - function value\n- `ctx` - [optional] user-defined function context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `TaoSetGradient()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoGetObjective()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetObjective\"))\n\"\"\"\nfunction TaoSetObjective(petsclib::PetscLibType, tao::Tao, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetObjective(petsclib::$UnionPetscLib, tao::Tao, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetObjective, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}),\n               tao, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetResidualRoutine(petsclib::PetscLibType,tao::Tao, res::PetscVec, func::external, ctx::Cvoid) \nSets the residual evaluation routine for least\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `res`  - the residual vector\n- `func` - the residual evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the function evaluation\nroutine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the optimizer\n- `x`   - input vector\n- `res` - function value vector\n- `ctx` - [optional] user-defined function context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetJacobianRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetResidualRoutine\"))\n\"\"\"\nfunction TaoSetResidualRoutine(petsclib::PetscLibType, tao::Tao, res::PetscVec, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetResidualRoutine(petsclib::$UnionPetscLib, tao::Tao, res::PetscVec, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetResidualRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, external, Ptr{Cvoid}),\n               tao, res, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetResidualWeights(petsclib::PetscLibType,tao::Tao, sigma_v::PetscVec, n::PetscInt, rows::PetscInt, cols::PetscInt, vals::PetscReal) \nGive weights for the residual values. A vector can be used if only diagonal terms are used, otherwise a matrix can be give.\n\nCollective\n\nInput Parameters:\n- `tao`     - the `Tao` context\n- `sigma_v` - vector of weights (diagonal terms only)\n- `n`       - the number of weights (if using off-diagonal)\n- `rows`    - index list of rows for `sigma_v`\n- `cols`    - index list of columns for `sigma_v`\n- `vals`    - array of weights\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetResidualRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetResidualWeights\"))\n\"\"\"\nfunction TaoSetResidualWeights(petsclib::PetscLibType, tao::Tao, sigma_v::PetscVec, n::PetscInt, rows::PetscInt, cols::PetscInt, vals::PetscReal) end\n\n@for_petsc function TaoSetResidualWeights(petsclib::$UnionPetscLib, tao::Tao, sigma_v::PetscVec, n::$PetscInt, rows::$PetscInt, cols::$PetscInt, vals::$PetscReal )\n\n    @chk ccall(\n               (:TaoSetResidualWeights, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               tao, sigma_v, n, rows, cols, vals,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeResidual(petsclib::PetscLibType,tao::Tao, X::PetscVec, F::PetscVec) \nComputes a least\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `X`   - input vector\n\nOutput Parameter:\n- `F` - Objective vector at `X`\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSetResidualRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeResidual\"))\n\"\"\"\nfunction TaoComputeResidual(petsclib::PetscLibType, tao::Tao, X::PetscVec, F::PetscVec) end\n\n@for_petsc function TaoComputeResidual(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, F::PetscVec )\n\n    @chk ccall(\n               (:TaoComputeResidual, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, X, F,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetGradient(petsclib::PetscLibType,tao::Tao, g::PetscVec, func::external, ctx::Cvoid) \nSets the gradient evaluation routine for the function to be optimized\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `g`    - [optional] the vector to internally hold the gradient computation\n- `func` - the gradient function\n- `ctx`  - [optional] user-defined context for private data for the gradient evaluation\nroutine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the optimization solver\n- `x`   - input vector\n- `g`   - gradient value (output)\n- `ctx` - [optional] user-defined function context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSolve()`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoGetGradient()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetGradient\"))\n\"\"\"\nfunction TaoSetGradient(petsclib::PetscLibType, tao::Tao, g::PetscVec, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetGradient(petsclib::$UnionPetscLib, tao::Tao, g::PetscVec, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetGradient, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, external, Ptr{Cvoid}),\n               tao, g, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetObjectiveAndGradient(petsclib::PetscLibType,tao::Tao, g::PetscVec, func::external, ctx::Cvoid) \nSets a combined objective function and gradient evaluation routine for the function to be optimized\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `g`    - [optional] the vector to internally hold the gradient computation\n- `func` - the gradient function\n- `ctx`  - [optional] user-defined context for private data for the gradient evaluation\nroutine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the optimization object\n- `x`   - input vector\n- `f`   - objective value (output)\n- `g`   - gradient value (output)\n- `ctx` - [optional] user-defined function context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSolve()`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetGradient()`, `TaoGetObjectiveAndGradient()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetObjectiveAndGradient\"))\n\"\"\"\nfunction TaoSetObjectiveAndGradient(petsclib::PetscLibType, tao::Tao, g::PetscVec, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetObjectiveAndGradient(petsclib::$UnionPetscLib, tao::Tao, g::PetscVec, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetObjectiveAndGradient, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, external, Ptr{Cvoid}),\n               tao, g, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = TaoIsObjectiveDefined(petsclib::PetscLibType,tao::Tao) \nChecks to see if the user has\ndeclared an objective-only routine.  Useful for determining when\nit is appropriate to call `TaoComputeObjective()` or\n`TaoComputeObjectiveAndGradient()`\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if function routine is set by user, `PETSC_FALSE` otherwise\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoIsGradientDefined()`, `TaoIsObjectiveAndGradientDefined()`\n\n# External Links\n$(_doc_external(\"Tao/TaoIsObjectiveDefined\"))\n\"\"\"\nfunction TaoIsObjectiveDefined(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoIsObjectiveDefined(petsclib::$UnionPetscLib, tao::Tao )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TaoIsObjectiveDefined, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{PetscBool}),\n               tao, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = TaoIsGradientDefined(petsclib::PetscLibType,tao::Tao) \nChecks to see if the user has\ndeclared an objective-only routine.  Useful for determining when\nit is appropriate to call `TaoComputeGradient()` or\n`TaoComputeGradientAndGradient()`\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if function routine is set by user, `PETSC_FALSE` otherwise\n\nLevel: developer\n\n-seealso: [](ch_tao), `TaoSetGradient()`, `TaoIsObjectiveDefined()`, `TaoIsObjectiveAndGradientDefined()`\n\n# External Links\n$(_doc_external(\"Tao/TaoIsGradientDefined\"))\n\"\"\"\nfunction TaoIsGradientDefined(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoIsGradientDefined(petsclib::$UnionPetscLib, tao::Tao )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TaoIsGradientDefined, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{PetscBool}),\n               tao, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = TaoIsObjectiveAndGradientDefined(petsclib::PetscLibType,tao::Tao) \nChecks to see if the user has\ndeclared a joint objective/gradient routine.  Useful for determining when\nit is appropriate to call `TaoComputeObjective()` or\n`TaoComputeObjectiveAndGradient()`\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if function routine is set by user, `PETSC_FALSE` otherwise\n\nLevel: developer\n\n-seealso: [](ch_tao), `TaoSetObjectiveAndGradient()`, `TaoIsObjectiveDefined()`, `TaoIsGradientDefined()`\n\n# External Links\n$(_doc_external(\"Tao/TaoIsObjectiveAndGradientDefined\"))\n\"\"\"\nfunction TaoIsObjectiveAndGradientDefined(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoIsObjectiveAndGradientDefined(petsclib::$UnionPetscLib, tao::Tao )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TaoIsObjectiveAndGradientDefined, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{PetscBool}),\n               tao, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tTaoSetHessian(petsclib::PetscLibType,tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid) \nSets the function to compute the Hessian as well as the location to store the matrix.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `H`    - Matrix used for the hessian\n- `Hpre` - Matrix that will be used to construct the preconditioner, can be same as `H`\n- `func` - Hessian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the\nHessian evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao`  - the `Tao`  context\n- `x`    - input vector\n- `H`    - Hessian matrix\n- `Hpre` - matrix used to construct the preconditioner, usually the same as `H`\n- `ctx`  - [optional] user-defined Hessian context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoTypes`, `TaoSetObjective()`, `TaoSetGradient()`, `TaoSetObjectiveAndGradient()`, `TaoGetHessian()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetHessian\"))\n\"\"\"\nfunction TaoSetHessian(petsclib::PetscLibType, tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetHessian(petsclib::$UnionPetscLib, tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetHessian, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, H, Hpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoTestHessian(petsclib::PetscLibType,tao::Tao) \n\n# External Links\n$(_doc_external(\"Tao/TaoTestHessian\"))\n\"\"\"\nfunction TaoTestHessian(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoTestHessian(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoTestHessian, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeHessian(petsclib::PetscLibType,tao::Tao, X::PetscVec, H::PetscMat, Hpre::PetscMat) \nComputes the Hessian matrix that has been\nset with `TaoSetHessian()`.\n\nCollective\n\nInput Parameters:\n- `tao` - the Tao solver context\n- `X`   - input vector\n\nOutput Parameters:\n- `H`    - Hessian matrix\n- `Hpre` - matrix used to construct the preconditioner, usually the same as `H`\n\nOptions Database Keys:\n- `-tao_test_hessian`                   - compare the user provided Hessian with one compute via finite differences to check for errors\n- `-tao_test_hessian <numerical value>` - display entries in the difference between the user provided Hessian and finite difference Hessian that are greater than a certain value to help users detect errors\n- `-tao_test_hessian_view`              - display the user provided Hessian, the finite difference Hessian and the difference between them to help users detect the location of errors in the user provided Hessian\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetHessian()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeHessian\"))\n\"\"\"\nfunction TaoComputeHessian(petsclib::PetscLibType, tao::Tao, X::PetscVec, H::PetscMat, Hpre::PetscMat) end\n\n@for_petsc function TaoComputeHessian(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, H::PetscMat, Hpre::PetscMat )\n\n    @chk ccall(\n               (:TaoComputeHessian, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat),\n               tao, X, H, Hpre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeJacobian(petsclib::PetscLibType,tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) \nComputes the Jacobian matrix that has been\nset with TaoSetJacobianRoutine().\n\nCollective\n\nInput Parameters:\n- `tao` - the Tao solver context\n- `X`   - input vector\n\nOutput Parameters:\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to compute the preconditioner, often the same as `J`\n\nLevel: developer\n\n-seealso: [](ch_tao), `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetJacobianRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeJacobian\"))\n\"\"\"\nfunction TaoComputeJacobian(petsclib::PetscLibType, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) end\n\n@for_petsc function TaoComputeJacobian(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat )\n\n    @chk ccall(\n               (:TaoComputeJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat),\n               tao, X, J, Jpre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeResidualJacobian(petsclib::PetscLibType,tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) \nComputes the least\nset with `TaoSetJacobianResidual()`.\n\nCollective\n\nInput Parameters:\n- `tao` - the Tao solver context\n- `X`   - input vector\n\nOutput Parameters:\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to compute the preconditioner, often the same as `J`\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeResidual()`, `TaoSetJacobianResidual()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeResidualJacobian\"))\n\"\"\"\nfunction TaoComputeResidualJacobian(petsclib::PetscLibType, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) end\n\n@for_petsc function TaoComputeResidualJacobian(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat )\n\n    @chk ccall(\n               (:TaoComputeResidualJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat),\n               tao, X, J, Jpre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeJacobianState(petsclib::PetscLibType,tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat, Jinv::PetscMat) \nComputes the Jacobian matrix that has been\nset with `TaoSetJacobianStateRoutine()`.\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `X`   - input vector\n\nOutput Parameters:\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner, often the same as `J`\n- `Jinv` - unknown\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetJacobianStateRoutine()`, `TaoComputeJacobianDesign()`, `TaoSetStateDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeJacobianState\"))\n\"\"\"\nfunction TaoComputeJacobianState(petsclib::PetscLibType, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat, Jinv::PetscMat) end\n\n@for_petsc function TaoComputeJacobianState(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat, Jinv::PetscMat )\n\n    @chk ccall(\n               (:TaoComputeJacobianState, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat, CMat),\n               tao, X, J, Jpre, Jinv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeJacobianDesign(petsclib::PetscLibType,tao::Tao, X::PetscVec, J::PetscMat) \nComputes the Jacobian matrix that has been\nset with `TaoSetJacobianDesignRoutine()`.\n\nCollective\n\nInput Parameters:\n- `tao` - the Tao solver context\n- `X`   - input vector\n\nOutput Parameter:\n- `J` - Jacobian matrix\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetJacobianDesignRoutine()`, `TaoSetStateDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeJacobianDesign\"))\n\"\"\"\nfunction TaoComputeJacobianDesign(petsclib::PetscLibType, tao::Tao, X::PetscVec, J::PetscMat) end\n\n@for_petsc function TaoComputeJacobianDesign(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, J::PetscMat )\n\n    @chk ccall(\n               (:TaoComputeJacobianDesign, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat),\n               tao, X, J,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetJacobianRoutine(petsclib::PetscLibType,tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) \nSets the function to compute the Jacobian as well as the location to store the matrix.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `J`    - Matrix used for the Jacobian\n- `Jpre` - Matrix that will be used to construct the preconditioner, can be same as `J`\n- `func` - Jacobian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the\nJacobian evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao`  - the `Tao` context\n- `x`    - input vector\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner, usually the same as `J`\n- `ctx`  - [optional] user-defined Jacobian context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetGradient()`, `TaoSetObjective()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetJacobianRoutine\"))\n\"\"\"\nfunction TaoSetJacobianRoutine(petsclib::PetscLibType, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetJacobianRoutine(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetJacobianRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, J, Jpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetJacobianResidualRoutine(petsclib::PetscLibType,tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) \nSets the function to compute the least\nlocation to store the matrix.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `J`    - Matrix used for the jacobian\n- `Jpre` - Matrix that will be used to construct the preconditioner, can be same as `J`\n- `func` - Jacobian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the\nJacobian evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao`  - the `Tao`  context\n- `x`    - input vector\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner, usually the same as `J`\n- `ctx`  - [optional] user-defined Jacobian context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetGradient()`, `TaoSetObjective()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetJacobianResidualRoutine\"))\n\"\"\"\nfunction TaoSetJacobianResidualRoutine(petsclib::PetscLibType, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetJacobianResidualRoutine(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetJacobianResidualRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, J, Jpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetJacobianStateRoutine(petsclib::PetscLibType,tao::Tao, J::PetscMat, Jpre::PetscMat, Jinv::PetscMat, func::external, ctx::Cvoid) \nSets the function to compute the Jacobian\n(and its inverse) of the constraint function with respect to the state variables.\nUsed only for PDE-constrained optimization.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `J`    - Matrix used for the Jacobian\n- `Jpre` - Matrix that will be used to construct the preconditioner, can be same as `J`.  Only used if `Jinv` is `NULL`\n- `Jinv` - [optional] Matrix used to apply the inverse of the state Jacobian. Use `NULL` to default to PETSc `KSP` solvers to apply the inverse.\n- `func` - Jacobian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the\nJacobian evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao`  - the `Tao` context\n- `x`    - input vector\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner, usually the same as `J`\n- `Jinv` - inverse of `J`\n- `ctx`  - [optional] user-defined Jacobian context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeJacobianState()`, `TaoSetJacobianDesignRoutine()`, `TaoSetStateDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetJacobianStateRoutine\"))\n\"\"\"\nfunction TaoSetJacobianStateRoutine(petsclib::PetscLibType, tao::Tao, J::PetscMat, Jpre::PetscMat, Jinv::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetJacobianStateRoutine(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, Jpre::PetscMat, Jinv::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetJacobianStateRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, CMat, external, Ptr{Cvoid}),\n               tao, J, Jpre, Jinv, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetJacobianDesignRoutine(petsclib::PetscLibType,tao::Tao, J::PetscMat, func::external, ctx::Cvoid) \nSets the function to compute the Jacobian of\nthe constraint function with respect to the design variables.  Used only for\nPDE-constrained optimization.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `J`    - Matrix used for the Jacobian\n- `func` - Jacobian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the\nJacobian evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the `Tao` context\n- `x`   - input vector\n- `J`   - Jacobian matrix\n- `ctx` - [optional] user-defined Jacobian context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeJacobianDesign()`, `TaoSetJacobianStateRoutine()`, `TaoSetStateDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetJacobianDesignRoutine\"))\n\"\"\"\nfunction TaoSetJacobianDesignRoutine(petsclib::PetscLibType, tao::Tao, J::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetJacobianDesignRoutine(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetJacobianDesignRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, external, Ptr{Cvoid}),\n               tao, J, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetStateDesignIS(petsclib::PetscLibType,tao::Tao, s_is::IS, d_is::IS) \nIndicate to the `Tao` object which variables in the\nsolution vector are state variables and which are design.  Only applies to\nPDE-constrained optimization.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - The `Tao` context\n- `s_is` - the index set corresponding to the state variables\n- `d_is` - the index set corresponding to the design variables\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetJacobianStateRoutine()`, `TaoSetJacobianDesignRoutine()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetStateDesignIS\"))\n\"\"\"\nfunction TaoSetStateDesignIS(petsclib::PetscLibType, tao::Tao, s_is::IS, d_is::IS) end\n\n@for_petsc function TaoSetStateDesignIS(petsclib::$UnionPetscLib, tao::Tao, s_is::IS, d_is::IS )\n\n    @chk ccall(\n               (:TaoSetStateDesignIS, $petsc_library),\n               PetscErrorCode,\n               (CTao, CIS, CIS),\n               tao, s_is, d_is,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeJacobianEquality(petsclib::PetscLibType,tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) \nComputes the Jacobian matrix that has been\nset with `TaoSetJacobianEqualityRoutine()`.\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `X`   - input vector\n\nOutput Parameters:\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner, often the same as `J`\n\nLevel: developer\n\n-seealso: [](ch_tao), `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetJacobianStateRoutine()`, `TaoComputeJacobianDesign()`, `TaoSetStateDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeJacobianEquality\"))\n\"\"\"\nfunction TaoComputeJacobianEquality(petsclib::PetscLibType, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) end\n\n@for_petsc function TaoComputeJacobianEquality(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat )\n\n    @chk ccall(\n               (:TaoComputeJacobianEquality, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat),\n               tao, X, J, Jpre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeJacobianInequality(petsclib::PetscLibType,tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) \nComputes the Jacobian matrix that has been\nset with `TaoSetJacobianInequalityRoutine()`.\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `X`   - input vector\n\nOutput Parameters:\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetJacobianStateRoutine()`, `TaoComputeJacobianDesign()`, `TaoSetStateDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeJacobianInequality\"))\n\"\"\"\nfunction TaoComputeJacobianInequality(petsclib::PetscLibType, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat) end\n\n@for_petsc function TaoComputeJacobianInequality(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, J::PetscMat, Jpre::PetscMat )\n\n    @chk ccall(\n               (:TaoComputeJacobianInequality, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat),\n               tao, X, J, Jpre,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetJacobianEqualityRoutine(petsclib::PetscLibType,tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) \nSets the function to compute the Jacobian\n(and its inverse) of the constraint function with respect to the equality variables.\nUsed only for PDE-constrained optimization.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `J`    - Matrix used for the Jacobian\n- `Jpre` - Matrix that will be used to construct the preconditioner, can be same as `J`.\n- `func` - Jacobian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the\nJacobian evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao`  - the `Tao` context\n- `x`    - input vector\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner, usually the same as `J`\n- `ctx`  - [optional] user-defined Jacobian context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeJacobianEquality()`, `TaoSetJacobianDesignRoutine()`, `TaoSetEqualityDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetJacobianEqualityRoutine\"))\n\"\"\"\nfunction TaoSetJacobianEqualityRoutine(petsclib::PetscLibType, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetJacobianEqualityRoutine(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetJacobianEqualityRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, J, Jpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetJacobianInequalityRoutine(petsclib::PetscLibType,tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) \nSets the function to compute the Jacobian\n(and its inverse) of the constraint function with respect to the inequality variables.\nUsed only for PDE-constrained optimization.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `J`    - Matrix used for the Jacobian\n- `Jpre` - Matrix that will be used to construct the preconditioner, can be same as `J`.\n- `func` - Jacobian evaluation routine\n- `ctx`  - [optional] user-defined context for private data for the\nJacobian evaluation routine (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao`  - the `Tao` context\n- `x`    - input vector\n- `J`    - Jacobian matrix\n- `Jpre` - matrix used to construct the preconditioner, usually the same as `J`\n- `ctx`  - [optional] user-defined Jacobian context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeJacobianInequality()`, `TaoSetJacobianDesignRoutine()`, `TaoSetInequalityDesignIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetJacobianInequalityRoutine\"))\n\"\"\"\nfunction TaoSetJacobianInequalityRoutine(petsclib::PetscLibType, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetJacobianInequalityRoutine(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetJacobianInequalityRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, J, Jpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetVariableBounds(petsclib::PetscLibType,tao::Tao, XL::PetscVec, XU::PetscVec) \nSets the upper and lower bounds for the optimization problem\n\nLogically Collective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `XL`  - vector of lower bounds\n- `XU`  - vector of upper bounds\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoGetVariableBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetVariableBounds\"))\n\"\"\"\nfunction TaoSetVariableBounds(petsclib::PetscLibType, tao::Tao, XL::PetscVec, XU::PetscVec) end\n\n@for_petsc function TaoSetVariableBounds(petsclib::$UnionPetscLib, tao::Tao, XL::PetscVec, XU::PetscVec )\n\n    @chk ccall(\n               (:TaoSetVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, XL, XU,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetVariableBoundsRoutine(petsclib::PetscLibType,tao::Tao, func::external, ctx::Cvoid) \nSets a function to be used to compute lower and upper variable bounds for the optimization\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `func` - the bounds computation routine\n- `ctx`  - [optional] user-defined context for private data for the bounds computation (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the `Tao` solver\n- `xl`  - vector of lower bounds\n- `xu`  - vector of upper bounds\n- `ctx` - the (optional) user-defined function context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoSetVariableBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetVariableBoundsRoutine\"))\n\"\"\"\nfunction TaoSetVariableBoundsRoutine(petsclib::PetscLibType, tao::Tao, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetVariableBoundsRoutine(petsclib::$UnionPetscLib, tao::Tao, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetVariableBoundsRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}),\n               tao, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetVariableBounds(petsclib::PetscLibType,tao::Tao, XL::PetscVec, XU::PetscVec) \nGets the upper and lower bounds vectors set with `TaoSetVariableBounds()`\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `XL` - vector of lower bounds\n- `XU` - vector of upper bounds\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoSetVariableBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetVariableBounds\"))\n\"\"\"\nfunction TaoGetVariableBounds(petsclib::PetscLibType, tao::Tao, XL::PetscVec, XU::PetscVec) end\n\n@for_petsc function TaoGetVariableBounds(petsclib::$UnionPetscLib, tao::Tao, XL::PetscVec, XU::PetscVec )\n\tXL_ = Ref(XL.ptr)\n\tXU_ = Ref(XU.ptr)\n\n    @chk ccall(\n               (:TaoGetVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CVec}, Ptr{CVec}),\n               tao, XL_, XU_,\n              )\n\n\tXL.ptr = C_NULL\n\tXU.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeVariableBounds(petsclib::PetscLibType,tao::Tao) \nCompute the variable bounds using the\nroutine set by `TaoSetVariableBoundsRoutine()`.\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoSetVariableBoundsRoutine()`, `TaoSetVariableBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeVariableBounds\"))\n\"\"\"\nfunction TaoComputeVariableBounds(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoComputeVariableBounds(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoComputeVariableBounds, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetInequalityBounds(petsclib::PetscLibType,tao::Tao, IL::PetscVec, IU::PetscVec) \nSets the upper and lower bounds\n\nLogically Collective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `IL`  - vector of lower bounds\n- `IU`  - vector of upper bounds\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoGetInequalityBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetInequalityBounds\"))\n\"\"\"\nfunction TaoSetInequalityBounds(petsclib::PetscLibType, tao::Tao, IL::PetscVec, IU::PetscVec) end\n\n@for_petsc function TaoSetInequalityBounds(petsclib::$UnionPetscLib, tao::Tao, IL::PetscVec, IU::PetscVec )\n\n    @chk ccall(\n               (:TaoSetInequalityBounds, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, IL, IU,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetInequalityBounds(petsclib::PetscLibType,tao::Tao, IL::PetscVec, IU::PetscVec) \nGets the upper and lower bounds set via `TaoSetInequalityBounds()`\n\nLogically Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `IL` - vector of lower bounds\n- `IU` - vector of upper bounds\n\nLevel: beginner\n\n-seealso: [](ch_tao), `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoSetInequalityBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetInequalityBounds\"))\n\"\"\"\nfunction TaoGetInequalityBounds(petsclib::PetscLibType, tao::Tao, IL::PetscVec, IU::PetscVec) end\n\n@for_petsc function TaoGetInequalityBounds(petsclib::$UnionPetscLib, tao::Tao, IL::PetscVec, IU::PetscVec )\n\tIL_ = Ref(IL.ptr)\n\tIU_ = Ref(IU.ptr)\n\n    @chk ccall(\n               (:TaoGetInequalityBounds, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CVec}, Ptr{CVec}),\n               tao, IL_, IU_,\n              )\n\n\tIL.ptr = C_NULL\n\tIU.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeConstraints(petsclib::PetscLibType,tao::Tao, X::PetscVec, C::PetscVec) \nCompute the variable bounds using the\nroutine set by `TaoSetConstraintsRoutine()`.\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `X`   - location to evaluate the constraints\n\nOutput Parameter:\n- `C` - the constraints\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoSetConstraintsRoutine()`, `TaoComputeJacobian()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeConstraints\"))\n\"\"\"\nfunction TaoComputeConstraints(petsclib::PetscLibType, tao::Tao, X::PetscVec, C::PetscVec) end\n\n@for_petsc function TaoComputeConstraints(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, C::PetscVec )\n\n    @chk ccall(\n               (:TaoComputeConstraints, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, X, C,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetConstraintsRoutine(petsclib::PetscLibType,tao::Tao, c::PetscVec, func::external, ctx::Cvoid) \nSets a function to be used to compute constraints.  Tao only handles constraints under certain conditions, see [](ch_tao) for details\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `c`    - A vector that will be used to store constraint evaluation\n- `func` - the bounds computation routine\n- `ctx`  - [optional] user-defined context for private data for the constraints computation (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the `Tao` solver\n- `x`   - point to evaluate constraints\n- `c`   - vector constraints evaluated at `x`\n- `ctx` - the (optional) user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoSetVariablevBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetConstraintsRoutine\"))\n\"\"\"\nfunction TaoSetConstraintsRoutine(petsclib::PetscLibType, tao::Tao, c::PetscVec, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetConstraintsRoutine(petsclib::$UnionPetscLib, tao::Tao, c::PetscVec, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetConstraintsRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, external, Ptr{Cvoid}),\n               tao, c, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeDualVariables(petsclib::PetscLibType,tao::Tao, DL::PetscVec, DU::PetscVec) \nComputes the dual vectors corresponding to the bounds\nof the variables\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `DL` - dual variable vector for the lower bounds\n- `DU` - dual variable vector for the upper bounds\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeObjective()`, `TaoSetVariableBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeDualVariables\"))\n\"\"\"\nfunction TaoComputeDualVariables(petsclib::PetscLibType, tao::Tao, DL::PetscVec, DU::PetscVec) end\n\n@for_petsc function TaoComputeDualVariables(petsclib::$UnionPetscLib, tao::Tao, DL::PetscVec, DU::PetscVec )\n\n    @chk ccall(\n               (:TaoComputeDualVariables, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, DL, DU,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetDualVariables(petsclib::PetscLibType,tao::Tao, DE::PetscVec, DI::PetscVec) \nGets the dual vectors\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `DE` - dual variable vector for the lower bounds\n- `DI` - dual variable vector for the upper bounds\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoComputeDualVariables()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetDualVariables\"))\n\"\"\"\nfunction TaoGetDualVariables(petsclib::PetscLibType, tao::Tao, DE::PetscVec, DI::PetscVec) end\n\n@for_petsc function TaoGetDualVariables(petsclib::$UnionPetscLib, tao::Tao, DE::PetscVec, DI::PetscVec )\n\tDE_ = Ref(DE.ptr)\n\tDI_ = Ref(DI.ptr)\n\n    @chk ccall(\n               (:TaoGetDualVariables, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CVec}, Ptr{CVec}),\n               tao, DE_, DI_,\n              )\n\n\tDE.ptr = C_NULL\n\tDI.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetEqualityConstraintsRoutine(petsclib::PetscLibType,tao::Tao, ce::PetscVec, func::external, ctx::Cvoid) \nSets a function to be used to compute constraints.  Tao only handles constraints under certain conditions, see [](ch_tao) for details\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `ce`   - A vector that will be used to store equality constraint evaluation\n- `func` - the bounds computation routine\n- `ctx`  - [optional] user-defined context for private data for the equality constraints computation (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the `Tao` solver\n- `x`   - point to evaluate equality constraints\n- `ce`  - vector of equality constraints evaluated at x\n- `ctx` - the (optional) user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoSetVariableBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetEqualityConstraintsRoutine\"))\n\"\"\"\nfunction TaoSetEqualityConstraintsRoutine(petsclib::PetscLibType, tao::Tao, ce::PetscVec, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetEqualityConstraintsRoutine(petsclib::$UnionPetscLib, tao::Tao, ce::PetscVec, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetEqualityConstraintsRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, external, Ptr{Cvoid}),\n               tao, ce, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetInequalityConstraintsRoutine(petsclib::PetscLibType,tao::Tao, ci::PetscVec, func::external, ctx::Cvoid) \nSets a function to be used to compute constraints.  Tao only handles constraints under certain conditions, see [](ch_tao) for details\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `ci`   - A vector that will be used to store inequality constraint evaluation\n- `func` - the bounds computation routine\n- `ctx`  - [optional] user-defined context for private data for the inequality constraints computation (may be `NULL`)\n\nCalling sequence of `func`:\n- `tao` - the `Tao` solver\n- `x`   - point to evaluate inequality constraints\n- `ci`  - vector of inequality constraints evaluated at x\n- `ctx` - the (optional) user-defined function context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetObjective()`, `TaoSetHessian()`, `TaoSetObjectiveAndGradient()`, `TaoSetVariableBounds()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetInequalityConstraintsRoutine\"))\n\"\"\"\nfunction TaoSetInequalityConstraintsRoutine(petsclib::PetscLibType, tao::Tao, ci::PetscVec, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetInequalityConstraintsRoutine(petsclib::$UnionPetscLib, tao::Tao, ci::PetscVec, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetInequalityConstraintsRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, external, Ptr{Cvoid}),\n               tao, ci, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeEqualityConstraints(petsclib::PetscLibType,tao::Tao, X::PetscVec, CE::PetscVec) \nCompute the variable bounds using the\nroutine set by `TaoSetEqualityConstraintsRoutine()`.\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `X`  - point the equality constraints were evaluated on\n- `CE` - vector of equality constraints evaluated at X\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoSetEqualityConstraintsRoutine()`, `TaoComputeJacobianEquality()`, `TaoComputeInequalityConstraints()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeEqualityConstraints\"))\n\"\"\"\nfunction TaoComputeEqualityConstraints(petsclib::PetscLibType, tao::Tao, X::PetscVec, CE::PetscVec) end\n\n@for_petsc function TaoComputeEqualityConstraints(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, CE::PetscVec )\n\n    @chk ccall(\n               (:TaoComputeEqualityConstraints, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, X, CE,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoComputeInequalityConstraints(petsclib::PetscLibType,tao::Tao, X::PetscVec, CI::PetscVec) \nCompute the variable bounds using the\nroutine set by `TaoSetInequalityConstraintsRoutine()`.\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `X`  - point the inequality constraints were evaluated on\n- `CI` - vector of inequality constraints evaluated at X\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoSetInequalityConstraintsRoutine()`, `TaoComputeJacobianInequality()`, `TaoComputeEqualityConstraints()`\n\n# External Links\n$(_doc_external(\"Tao/TaoComputeInequalityConstraints\"))\n\"\"\"\nfunction TaoComputeInequalityConstraints(petsclib::PetscLibType, tao::Tao, X::PetscVec, CI::PetscVec) end\n\n@for_petsc function TaoComputeInequalityConstraints(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, CI::PetscVec )\n\n    @chk ccall(\n               (:TaoComputeInequalityConstraints, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec),\n               tao, X, CI,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoDefaultComputeGradient(petsclib::PetscLibType,tao::Tao, Xin::PetscVec, G::PetscVec, dummy::Cvoid) \ncomputes the gradient using finite differences.\n\nCollective\n\nInput Parameters:\n- `tao`   - the Tao context\n- `Xin`   - compute gradient at this point\n- `dummy` - not used\n\nOutput Parameter:\n- `G` - Gradient Vector\n\nOptions Database Key:\n- `-tao_fd_gradient`      - activates TaoDefaultComputeGradient()\n- `-tao_fd_delta <delta>` - change in X used to calculate finite differences\n\nLevel: advanced\n\n-seealso: `Tao`, `TaoSetGradient()`\n\n# External Links\n$(_doc_external(\"Tao/TaoDefaultComputeGradient\"))\n\"\"\"\nfunction TaoDefaultComputeGradient(petsclib::PetscLibType, tao::Tao, Xin::PetscVec, G::PetscVec, dummy::Cvoid) end\n\n@for_petsc function TaoDefaultComputeGradient(petsclib::$UnionPetscLib, tao::Tao, Xin::PetscVec, G::PetscVec, dummy::Cvoid )\n\n    @chk ccall(\n               (:TaoDefaultComputeGradient, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CVec, Ptr{Cvoid}),\n               tao, Xin, G, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoDefaultComputeHessian(petsclib::PetscLibType,tao::Tao, V::PetscVec, H::PetscMat, B::PetscMat, dummy::Cvoid) \nComputes the Hessian using finite differences.\n\nCollective\n\nInput Parameters:\n- `tao`   - the Tao context\n- `V`     - compute Hessian at this point\n- `dummy` - not used\n\nOutput Parameters:\n- `H` - Hessian matrix (not altered in this routine)\n- `B` - newly computed Hessian matrix to use with preconditioner (generally the same as H)\n\nOptions Database Key:\n- `-tao_fd_hessian` - activates TaoDefaultComputeHessian()\n\nLevel: advanced\n\n-seealso: `Tao`, `TaoSetHessian()`, `TaoDefaultComputeHessianColor()`, `SNESComputeJacobianDefault()`, `TaoSetGradient()`, `TaoDefaultComputeGradient()`\n\n# External Links\n$(_doc_external(\"Tao/TaoDefaultComputeHessian\"))\n\"\"\"\nfunction TaoDefaultComputeHessian(petsclib::PetscLibType, tao::Tao, V::PetscVec, H::PetscMat, B::PetscMat, dummy::Cvoid) end\n\n@for_petsc function TaoDefaultComputeHessian(petsclib::$UnionPetscLib, tao::Tao, V::PetscVec, H::PetscMat, B::PetscMat, dummy::Cvoid )\n\n    @chk ccall(\n               (:TaoDefaultComputeHessian, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat, Ptr{Cvoid}),\n               tao, V, H, B, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoDefaultComputeHessianColor(petsclib::PetscLibType,tao::Tao, V::PetscVec, H::PetscMat, B::PetscMat, ctx::Cvoid) \nComputes the Hessian using colored finite differences.\n\nCollective\n\nInput Parameters:\n- `tao` - the Tao context\n- `V`   - compute Hessian at this point\n- `ctx` - the color object of type `MatFDColoring`\n\nOutput Parameters:\n- `H` - Hessian matrix (not altered in this routine)\n- `B` - newly computed Hessian matrix to use with preconditioner (generally the same as H)\n\nLevel: advanced\n\n-seealso: `Tao`, `MatColoring`, `TaoSetHessian()`, `TaoDefaultComputeHessian()`, `SNESComputeJacobianDefaultColor()`, `TaoSetGradient()`\n\n# External Links\n$(_doc_external(\"Tao/TaoDefaultComputeHessianColor\"))\n\"\"\"\nfunction TaoDefaultComputeHessianColor(petsclib::PetscLibType, tao::Tao, V::PetscVec, H::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function TaoDefaultComputeHessianColor(petsclib::$UnionPetscLib, tao::Tao, V::PetscVec, H::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoDefaultComputeHessianColor, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat, Ptr{Cvoid}),\n               tao, V, H, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoDefaultComputeHessianMFFD(petsclib::PetscLibType,tao::Tao, X::PetscVec, H::PetscMat, B::PetscMat, ctx::Cvoid) \n\n# External Links\n$(_doc_external(\"Tao/TaoDefaultComputeHessianMFFD\"))\n\"\"\"\nfunction TaoDefaultComputeHessianMFFD(petsclib::PetscLibType, tao::Tao, X::PetscVec, H::PetscMat, B::PetscMat, ctx::Cvoid) end\n\n@for_petsc function TaoDefaultComputeHessianMFFD(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec, H::PetscMat, B::PetscMat, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoDefaultComputeHessianMFFD, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, CMat, CMat, Ptr{Cvoid}),\n               tao, X, H, B, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoParametersInitialize(petsclib::PetscLibType,tao::Tao) \nSets all the parameters in `tao` to their default value (when `TaoCreate()` was called) if they\ncurrently contain default values. Default values are the parameter values when the object's type is set.\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` object\n\nLevel: developer\n\n-seealso: [](ch_snes), `Tao`, `TaoSolve()`, `TaoDestroy()`,\n`PetscObjectParameterSetDefault()`\n\n# External Links\n$(_doc_external(\"Tao/TaoParametersInitialize\"))\n\"\"\"\nfunction TaoParametersInitialize(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoParametersInitialize(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoParametersInitialize, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewtao::Tao = TaoCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates a Tao solver\n\nCollective\n\nInput Parameter:\n- `comm` - MPI communicator\n\nOutput Parameter:\n- `newtao` - the new `Tao` context\n\nOptions Database Key:\n- `-tao_type` - select which method Tao should use\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSolve()`, `TaoDestroy()`, `TaoSetFromOptions()`, `TaoSetType()`\n\n# External Links\n$(_doc_external(\"Tao/TaoCreate\"))\n\"\"\"\nfunction TaoCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function TaoCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tnewtao_ = Ref{CTao}()\n\n    @chk ccall(\n               (:TaoCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CTao}),\n               comm, newtao_,\n              )\n\n\tnewtao = Tao(newtao_[], petsclib)\n\n\treturn newtao\nend \n\n\"\"\"\n\tTaoSolve(petsclib::PetscLibType,tao::Tao) \nSolves an optimization problem min F(x) s.t. l <= x <= u\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoCreate()`, `TaoSetObjective()`, `TaoSetGradient()`, `TaoSetHessian()`, `TaoGetConvergedReason()`, `TaoSetUp()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSolve\"))\n\"\"\"\nfunction TaoSolve(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoSolve(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoSolve, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetUp(petsclib::PetscLibType,tao::Tao) \nSets up the internal data structures for the later use\nof a Tao solver\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoCreate()`, `TaoSolve()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetUp\"))\n\"\"\"\nfunction TaoSetUp(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoSetUp(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoSetUp, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoDestroy(petsclib::PetscLibType,tao::Tao) \nDestroys the `Tao` context that was created with `TaoCreate()`\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoCreate()`, `TaoSolve()`\n\n# External Links\n$(_doc_external(\"Tao/TaoDestroy\"))\n\"\"\"\nfunction TaoDestroy(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoDestroy(petsclib::$UnionPetscLib, tao::Tao )\n\ttao_ = Ref(tao.ptr)\n\n    @chk ccall(\n               (:TaoDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CTao},),\n               tao_,\n              )\n\n\ttao.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoKSPSetUseEW(petsclib::PetscLibType,tao::Tao, flag::PetscBool) \nSets `SNES` to use Eisenstat\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - Tao context\n- `flag` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `SNESKSPSetUseEW()`\n\n# External Links\n$(_doc_external(\"Tao/TaoKSPSetUseEW\"))\n\"\"\"\nfunction TaoKSPSetUseEW(petsclib::PetscLibType, tao::Tao, flag::PetscBool) end\n\n@for_petsc function TaoKSPSetUseEW(petsclib::$UnionPetscLib, tao::Tao, flag::PetscBool )\n\n    @chk ccall(\n               (:TaoKSPSetUseEW, $petsc_library),\n               PetscErrorCode,\n               (CTao, PetscBool),\n               tao, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetFromOptions(petsclib::PetscLibType,tao::Tao) \nSets various Tao parameters from the options database\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOptions Database Keys:\n- `-tao_type <type>`             - The algorithm that Tao uses (lmvm, nls, etc.)\n- `-tao_gatol <gatol>`           - absolute error tolerance for ||gradient||\n- `-tao_grtol <grtol>`           - relative error tolerance for ||gradient||\n- `-tao_gttol <gttol>`           - reduction of ||gradient|| relative to initial gradient\n- `-tao_max_it <max>`            - sets maximum number of iterations\n- `-tao_max_funcs <max>`         - sets maximum number of function evaluations\n- `-tao_fmin <fmin>`             - stop if function value reaches fmin\n- `-tao_steptol <tol>`           - stop if trust region radius less than <tol>\n- `-tao_trust0 <t>`              - initial trust region radius\n- `-tao_view_solution`           - view the solution at the end of the optimization process\n- `-tao_monitor`                 - prints function value and residual norm at each iteration\n- `-tao_monitor_short`           - same as `-tao_monitor`, but truncates very small values\n- `-tao_monitor_constraint_norm` - prints objective value, gradient, and constraint norm at each iteration\n- `-tao_monitor_globalization`   - prints information about the globalization at each iteration\n- `-tao_monitor_solution`        - prints solution vector at each iteration\n- `-tao_monitor_ls_residual`     - prints least-squares residual vector at each iteration\n- `-tao_monitor_step`            - prints step vector at each iteration\n- `-tao_monitor_gradient`        - prints gradient vector at each iteration\n- `-tao_monitor_solution_draw`   - graphically view solution vector at each iteration\n- `-tao_monitor_step_draw`       - graphically view step vector at each iteration\n- `-tao_monitor_gradient_draw`   - graphically view gradient at each iteration\n- `-tao_monitor_cancel`          - cancels all monitors (except those set with command line)\n- `-tao_fd_gradient`             - use gradient computed with finite differences\n- `-tao_fd_hessian`              - use hessian computed with finite differences\n- `-tao_mf_hessian`              - use matrix-free Hessian computed with finite differences\n- `-tao_view`                    - prints information about the Tao after solving\n- `-tao_converged_reason`        - prints the reason Tao stopped iterating\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoCreate()`, `TaoSolve()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetFromOptions\"))\n\"\"\"\nfunction TaoSetFromOptions(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoSetFromOptions(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoViewFromOptions(petsclib::PetscLibType,A::Tao, obj::PetscObject, name::String) \nView a `Tao` object based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the  `Tao` context\n- `obj`  - Optional object that provides the prefix for the options database\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoView`, `PetscObjectViewFromOptions()`, `TaoCreate()`\n\n# External Links\n$(_doc_external(\"Tao/TaoViewFromOptions\"))\n\"\"\"\nfunction TaoViewFromOptions(petsclib::PetscLibType, A::Tao, obj::PetscObject, name::String) end\n\n@for_petsc function TaoViewFromOptions(petsclib::$UnionPetscLib, A::Tao, obj::PetscObject, name::String )\n\n    @chk ccall(\n               (:TaoViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CTao, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoView(petsclib::PetscLibType,tao::Tao, viewer::PetscViewer) \nPrints information about the `Tao` object\n\nCollective\n\nInput Parameters:\n- `tao`    - the `Tao` context\n- `viewer` - visualization context\n\nOptions Database Key:\n- `-tao_view` - Calls `TaoView()` at the end of `TaoSolve()`\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"Tao/TaoView\"))\n\"\"\"\nfunction TaoView(petsclib::PetscLibType, tao::Tao, viewer::PetscViewer) end\n\n@for_petsc function TaoView(petsclib::$UnionPetscLib, tao::Tao, viewer::PetscViewer )\n\n    @chk ccall(\n               (:TaoView, $petsc_library),\n               PetscErrorCode,\n               (CTao, PetscViewer),\n               tao, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetRecycleHistory(petsclib::PetscLibType,tao::Tao, recycle::PetscBool) \nSets the boolean flag to enable/disable re\niterate information from the previous `TaoSolve()`. This feature is disabled by\ndefault.\n\nLogically Collective\n\nInput Parameters:\n- `tao`     - the `Tao` context\n- `recycle` - boolean flag\n\nOptions Database Key:\n- `-tao_recycle_history <true,false>` - reuse the history\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoGetRecycleHistory()`, `TAOBNCG`, `TAOBQNLS`, `TAOBQNKLS`, `TAOBQNKTR`, `TAOBQNKTL`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetRecycleHistory\"))\n\"\"\"\nfunction TaoSetRecycleHistory(petsclib::PetscLibType, tao::Tao, recycle::PetscBool) end\n\n@for_petsc function TaoSetRecycleHistory(petsclib::$UnionPetscLib, tao::Tao, recycle::PetscBool )\n\n    @chk ccall(\n               (:TaoSetRecycleHistory, $petsc_library),\n               PetscErrorCode,\n               (CTao, PetscBool),\n               tao, recycle,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\trecycle::PetscBool = TaoGetRecycleHistory(petsclib::PetscLibType,tao::Tao) \nRetrieve the boolean flag for re\nfrom the previous `TaoSolve()`. This feature is disabled by default.\n\nLogically Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `recycle` - boolean flag\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetRecycleHistory()`, `TAOBNCG`, `TAOBQNLS`, `TAOBQNKLS`, `TAOBQNKTR`, `TAOBQNKTL`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetRecycleHistory\"))\n\"\"\"\nfunction TaoGetRecycleHistory(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetRecycleHistory(petsclib::$UnionPetscLib, tao::Tao )\n\trecycle_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:TaoGetRecycleHistory, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{PetscBool}),\n               tao, recycle_,\n              )\n\n\trecycle = recycle_[]\n\n\treturn recycle\nend \n\n\"\"\"\n\tTaoSetTolerances(petsclib::PetscLibType,tao::Tao, gatol::PetscReal, grtol::PetscReal, gttol::PetscReal) \nSets parameters used in `TaoSolve()` convergence tests\n\nLogically Collective\n\nInput Parameters:\n- `tao`   - the `Tao` context\n- `gatol` - stop if norm of gradient is less than this\n- `grtol` - stop if relative norm of gradient is less than this\n- `gttol` - stop if norm of gradient is reduced by this factor\n\nOptions Database Keys:\n- `-tao_gatol <gatol>` - Sets gatol\n- `-tao_grtol <grtol>` - Sets grtol\n- `-tao_gttol <gttol>` - Sets gttol\n\nStopping Criteria:\n-seealso: [](ch_tao), `Tao`, `TaoConvergedReason`, `TaoGetTolerances()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetTolerances\"))\n\"\"\"\nfunction TaoSetTolerances(petsclib::PetscLibType, tao::Tao, gatol::PetscReal, grtol::PetscReal, gttol::PetscReal) end\n\n@for_petsc function TaoSetTolerances(petsclib::$UnionPetscLib, tao::Tao, gatol::$PetscReal, grtol::$PetscReal, gttol::$PetscReal )\n\n    @chk ccall(\n               (:TaoSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal, $PetscReal, $PetscReal),\n               tao, gatol, grtol, gttol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetConstraintTolerances(petsclib::PetscLibType,tao::Tao, catol::PetscReal, crtol::PetscReal) \nSets constraint tolerance parameters used in `TaoSolve()` convergence tests\n\nLogically Collective\n\nInput Parameters:\n- `tao`   - the `Tao` context\n- `catol` - absolute constraint tolerance, constraint norm must be less than `catol` for used for `gatol` convergence criteria\n- `crtol` - relative constraint tolerance, constraint norm must be less than `crtol` for used for `gatol`, `gttol` convergence criteria\n\nOptions Database Keys:\n- `-tao_catol <catol>` - Sets catol\n- `-tao_crtol <crtol>` - Sets crtol\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoConvergedReason`, `TaoGetTolerances()`, `TaoGetConstraintTolerances()`, `TaoSetTolerances()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetConstraintTolerances\"))\n\"\"\"\nfunction TaoSetConstraintTolerances(petsclib::PetscLibType, tao::Tao, catol::PetscReal, crtol::PetscReal) end\n\n@for_petsc function TaoSetConstraintTolerances(petsclib::$UnionPetscLib, tao::Tao, catol::$PetscReal, crtol::$PetscReal )\n\n    @chk ccall(\n               (:TaoSetConstraintTolerances, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal, $PetscReal),\n               tao, catol, crtol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tcatol::PetscReal,crtol::PetscReal = TaoGetConstraintTolerances(petsclib::PetscLibType,tao::Tao) \nGets constraint tolerance parameters used in `TaoSolve()` convergence tests\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `catol` - absolute constraint tolerance, constraint norm must be less than `catol` for used for `gatol` convergence criteria\n- `crtol` - relative constraint tolerance, constraint norm must be less than `crtol` for used for `gatol`, `gttol` convergence criteria\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoConvergedReasons`,`TaoGetTolerances()`, `TaoSetTolerances()`, `TaoSetConstraintTolerances()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetConstraintTolerances\"))\n\"\"\"\nfunction TaoGetConstraintTolerances(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetConstraintTolerances(petsclib::$UnionPetscLib, tao::Tao )\n\tcatol_ = Ref{$PetscReal}()\n\tcrtol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGetConstraintTolerances, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               tao, catol_, crtol_,\n              )\n\n\tcatol = catol_[]\n\tcrtol = crtol_[]\n\n\treturn catol,crtol\nend \n\n\"\"\"\n\tTaoSetFunctionLowerBound(petsclib::PetscLibType,tao::Tao, fmin::PetscReal) \nSets a bound on the solution objective value.\nWhen an approximate solution with an objective value below this number\nhas been found, the solver will terminate.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the Tao solver context\n- `fmin` - the tolerance\n\nOptions Database Key:\n- `-tao_fmin <fmin>` - sets the minimum function value\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoConvergedReason`, `TaoSetTolerances()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetFunctionLowerBound\"))\n\"\"\"\nfunction TaoSetFunctionLowerBound(petsclib::PetscLibType, tao::Tao, fmin::PetscReal) end\n\n@for_petsc function TaoSetFunctionLowerBound(petsclib::$UnionPetscLib, tao::Tao, fmin::$PetscReal )\n\n    @chk ccall(\n               (:TaoSetFunctionLowerBound, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal),\n               tao, fmin,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tfmin::PetscReal = TaoGetFunctionLowerBound(petsclib::PetscLibType,tao::Tao) \nGets the bound on the solution objective value.\nWhen an approximate solution with an objective value below this number\nhas been found, the solver will terminate.\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `fmin` - the minimum function value\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoConvergedReason`, `TaoSetFunctionLowerBound()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetFunctionLowerBound\"))\n\"\"\"\nfunction TaoGetFunctionLowerBound(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetFunctionLowerBound(petsclib::$UnionPetscLib, tao::Tao )\n\tfmin_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGetFunctionLowerBound, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}),\n               tao, fmin_,\n              )\n\n\tfmin = fmin_[]\n\n\treturn fmin\nend \n\n\"\"\"\n\tTaoSetMaximumFunctionEvaluations(petsclib::PetscLibType,tao::Tao, nfcn::PetscInt) \nSets a maximum number of function evaluations allowed for a `TaoSolve()`.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` solver context\n- `nfcn` - the maximum number of function evaluations (>=0), use `PETSC_UNLIMITED` to have no bound\n\nOptions Database Key:\n- `-tao_max_funcs <nfcn>` - sets the maximum number of function evaluations\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetTolerances()`, `TaoSetMaximumIterations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetMaximumFunctionEvaluations\"))\n\"\"\"\nfunction TaoSetMaximumFunctionEvaluations(petsclib::PetscLibType, tao::Tao, nfcn::PetscInt) end\n\n@for_petsc function TaoSetMaximumFunctionEvaluations(petsclib::$UnionPetscLib, tao::Tao, nfcn::$PetscInt )\n\n    @chk ccall(\n               (:TaoSetMaximumFunctionEvaluations, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscInt),\n               tao, nfcn,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnfcn::PetscInt = TaoGetMaximumFunctionEvaluations(petsclib::PetscLibType,tao::Tao) \nGets a maximum number of function evaluations allowed for a `TaoSolve()`\n\nLogically Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `nfcn` - the maximum number of function evaluations\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetMaximumFunctionEvaluations()`, `TaoGetMaximumIterations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetMaximumFunctionEvaluations\"))\n\"\"\"\nfunction TaoGetMaximumFunctionEvaluations(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetMaximumFunctionEvaluations(petsclib::$UnionPetscLib, tao::Tao )\n\tnfcn_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoGetMaximumFunctionEvaluations, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscInt}),\n               tao, nfcn_,\n              )\n\n\tnfcn = nfcn_[]\n\n\treturn nfcn\nend \n\n\"\"\"\n\tnfuncs::PetscInt = TaoGetCurrentFunctionEvaluations(petsclib::PetscLibType,tao::Tao) \nGet current number of function evaluations used by a `Tao` object\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `nfuncs` - the current number of function evaluations (maximum between gradient and function evaluations)\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetMaximumFunctionEvaluations()`, `TaoGetMaximumFunctionEvaluations()`, `TaoGetMaximumIterations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetCurrentFunctionEvaluations\"))\n\"\"\"\nfunction TaoGetCurrentFunctionEvaluations(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetCurrentFunctionEvaluations(petsclib::$UnionPetscLib, tao::Tao )\n\tnfuncs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoGetCurrentFunctionEvaluations, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscInt}),\n               tao, nfuncs_,\n              )\n\n\tnfuncs = nfuncs_[]\n\n\treturn nfuncs\nend \n\n\"\"\"\n\tTaoSetMaximumIterations(petsclib::PetscLibType,tao::Tao, maxits::PetscInt) \nSets a maximum number of iterates to be used in `TaoSolve()`\n\nLogically Collective\n\nInput Parameters:\n- `tao`    - the `Tao` solver context\n- `maxits` - the maximum number of iterates (>=0), use `PETSC_UNLIMITED` to have no bound\n\nOptions Database Key:\n- `-tao_max_it <its>` - sets the maximum number of iterations\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetTolerances()`, `TaoSetMaximumFunctionEvaluations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetMaximumIterations\"))\n\"\"\"\nfunction TaoSetMaximumIterations(petsclib::PetscLibType, tao::Tao, maxits::PetscInt) end\n\n@for_petsc function TaoSetMaximumIterations(petsclib::$UnionPetscLib, tao::Tao, maxits::$PetscInt )\n\n    @chk ccall(\n               (:TaoSetMaximumIterations, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscInt),\n               tao, maxits,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxits::PetscInt = TaoGetMaximumIterations(petsclib::PetscLibType,tao::Tao) \nGets a maximum number of iterates that will be used\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `maxits` - the maximum number of iterates\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetMaximumIterations()`, `TaoGetMaximumFunctionEvaluations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetMaximumIterations\"))\n\"\"\"\nfunction TaoGetMaximumIterations(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetMaximumIterations(petsclib::$UnionPetscLib, tao::Tao )\n\tmaxits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoGetMaximumIterations, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscInt}),\n               tao, maxits_,\n              )\n\n\tmaxits = maxits_[]\n\n\treturn maxits\nend \n\n\"\"\"\n\tTaoSetInitialTrustRegionRadius(petsclib::PetscLibType,tao::Tao, radius::PetscReal) \nSets the initial trust region radius.\n\nLogically Collective\n\nInput Parameters:\n- `tao`    - a `Tao` optimization solver\n- `radius` - the trust region radius\n\nOptions Database Key:\n- `-tao_trust0 <t0>` - sets initial trust region radius\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoGetTrustRegionRadius()`, `TaoSetTrustRegionTolerance()`, `TAONTR`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetInitialTrustRegionRadius\"))\n\"\"\"\nfunction TaoSetInitialTrustRegionRadius(petsclib::PetscLibType, tao::Tao, radius::PetscReal) end\n\n@for_petsc function TaoSetInitialTrustRegionRadius(petsclib::$UnionPetscLib, tao::Tao, radius::$PetscReal )\n\n    @chk ccall(\n               (:TaoSetInitialTrustRegionRadius, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal),\n               tao, radius,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tradius::PetscReal = TaoGetInitialTrustRegionRadius(petsclib::PetscLibType,tao::Tao) \nGets the initial trust region radius.\n\nNot Collective\n\nInput Parameter:\n- `tao` - a `Tao` optimization solver\n\nOutput Parameter:\n- `radius` - the trust region radius\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetInitialTrustRegionRadius()`, `TaoGetCurrentTrustRegionRadius()`, `TAONTR`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetInitialTrustRegionRadius\"))\n\"\"\"\nfunction TaoGetInitialTrustRegionRadius(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetInitialTrustRegionRadius(petsclib::$UnionPetscLib, tao::Tao )\n\tradius_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGetInitialTrustRegionRadius, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}),\n               tao, radius_,\n              )\n\n\tradius = radius_[]\n\n\treturn radius\nend \n\n\"\"\"\n\tradius::PetscReal = TaoGetCurrentTrustRegionRadius(petsclib::PetscLibType,tao::Tao) \nGets the current trust region radius.\n\nNot Collective\n\nInput Parameter:\n- `tao` - a `Tao` optimization solver\n\nOutput Parameter:\n- `radius` - the trust region radius\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetInitialTrustRegionRadius()`, `TaoGetInitialTrustRegionRadius()`, `TAONTR`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetCurrentTrustRegionRadius\"))\n\"\"\"\nfunction TaoGetCurrentTrustRegionRadius(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetCurrentTrustRegionRadius(petsclib::$UnionPetscLib, tao::Tao )\n\tradius_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGetCurrentTrustRegionRadius, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}),\n               tao, radius_,\n              )\n\n\tradius = radius_[]\n\n\treturn radius\nend \n\n\"\"\"\n\tgatol::PetscReal,grtol::PetscReal,gttol::PetscReal = TaoGetTolerances(petsclib::PetscLibType,tao::Tao) \ngets the current values of some tolerances used for the convergence testing of `TaoSolve()`\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `gatol` - stop if norm of gradient is less than this\n- `grtol` - stop if relative norm of gradient is less than this\n- `gttol` - stop if norm of gradient is reduced by a this factor\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetTolerances()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetTolerances\"))\n\"\"\"\nfunction TaoGetTolerances(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetTolerances(petsclib::$UnionPetscLib, tao::Tao )\n\tgatol_ = Ref{$PetscReal}()\n\tgrtol_ = Ref{$PetscReal}()\n\tgttol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               tao, gatol_, grtol_, gttol_,\n              )\n\n\tgatol = gatol_[]\n\tgrtol = grtol_[]\n\tgttol = gttol_[]\n\n\treturn gatol,grtol,gttol\nend \n\n\"\"\"\n\tTaoGetKSP(petsclib::PetscLibType,tao::Tao, ksp::PetscKSP) \nGets the linear solver used by the optimization solver.\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver\n\nOutput Parameter:\n- `ksp` - the `KSP` linear solver used in the optimization solver\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `KSP`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetKSP\"))\n\"\"\"\nfunction TaoGetKSP(petsclib::PetscLibType, tao::Tao, ksp::PetscKSP) end\n\n@for_petsc function TaoGetKSP(petsclib::$UnionPetscLib, tao::Tao, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:TaoGetKSP, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CKSP}),\n               tao, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tlits::PetscInt = TaoGetLinearSolveIterations(petsclib::PetscLibType,tao::Tao) \nGets the total number of linear iterations\nused by the `Tao` solver\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `lits` - number of linear iterations\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoGetKSP()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetLinearSolveIterations\"))\n\"\"\"\nfunction TaoGetLinearSolveIterations(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetLinearSolveIterations(petsclib::$UnionPetscLib, tao::Tao )\n\tlits_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoGetLinearSolveIterations, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscInt}),\n               tao, lits_,\n              )\n\n\tlits = lits_[]\n\n\treturn lits\nend \n\n\"\"\"\n\tTaoGetLineSearch(petsclib::PetscLibType,tao::Tao, ls::TaoLineSearch) \nGets the line search used by the optimization solver.\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver\n\nOutput Parameter:\n- `ls` - the line search used in the optimization solver\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchType`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetLineSearch\"))\n\"\"\"\nfunction TaoGetLineSearch(petsclib::PetscLibType, tao::Tao, ls::TaoLineSearch) end\n\n@for_petsc function TaoGetLineSearch(petsclib::$UnionPetscLib, tao::Tao, ls::TaoLineSearch )\n\n    @chk ccall(\n               (:TaoGetLineSearch, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoLineSearch}),\n               tao, ls,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoAddLineSearchCounts(petsclib::PetscLibType,tao::Tao) \nAdds the number of function evaluations spent\nin the line search to the running total.\n\nInput Parameters:\n- `tao` - the `Tao` solver\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoGetLineSearch()`, `TaoLineSearchApply()`\n\n# External Links\n$(_doc_external(\"Tao/TaoAddLineSearchCounts\"))\n\"\"\"\nfunction TaoAddLineSearchCounts(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoAddLineSearchCounts(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoAddLineSearchCounts, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetSolution(petsclib::PetscLibType,tao::Tao, X::PetscVec) \nReturns the vector with the current solution from the `Tao` object\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `X` - the current solution\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetSolution()`, `TaoSolve()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetSolution\"))\n\"\"\"\nfunction TaoGetSolution(petsclib::PetscLibType, tao::Tao, X::PetscVec) end\n\n@for_petsc function TaoGetSolution(petsclib::$UnionPetscLib, tao::Tao, X::PetscVec )\n\tX_ = Ref(X.ptr)\n\n    @chk ccall(\n               (:TaoGetSolution, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CVec}),\n               tao, X_,\n              )\n\n\tX.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoResetStatistics(petsclib::PetscLibType,tao::Tao) \nInitialize the statistics collected by the `Tao` object.\nThese statistics include the iteration number, residual norms, and convergence status.\nThis routine gets called before solving each optimization problem.\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoCreate()`, `TaoSolve()`\n\n# External Links\n$(_doc_external(\"Tao/TaoResetStatistics\"))\n\"\"\"\nfunction TaoResetStatistics(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoResetStatistics(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoResetStatistics, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetUpdate(petsclib::PetscLibType,tao::Tao, func::external, ctx::Cvoid) \nSets the general\nat the beginning of every iteration of the optimization algorithm. Called after the new solution and the gradient\nis determined, but before the Hessian is computed (if applicable).\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - The `Tao` solver\n- `func` - The function\n- `ctx`  - The update function context\n\nCalling sequence of `func`:\n- `tao` - The optimizer context\n- `it`  - The current iteration index\n- `ctx` - The update context\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSolve()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetUpdate\"))\n\"\"\"\nfunction TaoSetUpdate(petsclib::PetscLibType, tao::Tao, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetUpdate(petsclib::$UnionPetscLib, tao::Tao, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetUpdate, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}),\n               tao, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetConvergenceTest(petsclib::PetscLibType,tao::Tao, conv::external, ctx::Cvoid) \nSets the function that is to be used to test\nfor convergence of the iterative minimization solution.  The new convergence\ntesting routine will replace Tao's default convergence test.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` object\n- `conv` - the routine to test for convergence\n- `ctx`  - [optional] context for private data for the convergence routine\n(may be `NULL`)\n\nCalling sequence of `conv`:\n- `tao` - the `Tao` object\n- `ctx` - [optional] convergence context\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSolve()`, `TaoSetConvergedReason()`, `TaoGetSolutionStatus()`, `TaoGetTolerances()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetConvergenceTest\"))\n\"\"\"\nfunction TaoSetConvergenceTest(petsclib::PetscLibType, tao::Tao, conv::external, ctx::Cvoid) end\n\n@for_petsc function TaoSetConvergenceTest(petsclib::$UnionPetscLib, tao::Tao, conv::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetConvergenceTest, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}),\n               tao, conv, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorSet(petsclib::PetscLibType,tao::Tao, func::external, ctx::Cvoid, dest::PetscCtxDestroyFn) \nSets an additional function that is to be used at every\niteration of the solver to display the iteration's\nprogress.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` solver context\n- `func` - monitoring routine\n- `ctx`  - [optional] user-defined context for private data for the monitor routine (may be `NULL`)\n- `dest` - [optional] function to destroy the context when the `Tao` is destroyed, see `PetscCtxDestroyFn` for the calling sequence\n\nCalling sequence of `func`:\n- `tao` - the `Tao` solver context\n- `ctx` - [optional] monitoring context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSolve()`, `TaoMonitorDefault()`, `TaoMonitorCancel()`, `TaoSetDestroyRoutine()`, `TaoView()`, `PetscCtxDestroyFn`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorSet\"))\n\"\"\"\nfunction TaoMonitorSet(petsclib::PetscLibType, tao::Tao, func::external, ctx::Cvoid, dest::PetscCtxDestroyFn) end\n\n@for_petsc function TaoMonitorSet(petsclib::$UnionPetscLib, tao::Tao, func::external, ctx::Cvoid, dest::PetscCtxDestroyFn )\n\n    @chk ccall(\n               (:TaoMonitorSet, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}, Ptr{PetscCtxDestroyFn}),\n               tao, func, ctx, dest,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorCancel(petsclib::PetscLibType,tao::Tao) \nClears all the monitor functions for a `Tao` object.\n\nLogically Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOptions Database Key:\n- `-tao_monitor_cancel` - cancels all monitors that have been hardwired\ninto a code by calls to `TaoMonitorSet()`, but does not cancel those\nset via the options database\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefault()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorCancel\"))\n\"\"\"\nfunction TaoMonitorCancel(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoMonitorCancel(petsclib::$UnionPetscLib, tao::Tao )\n\n    @chk ccall(\n               (:TaoMonitorCancel, $petsc_library),\n               PetscErrorCode,\n               (CTao,),\n               tao,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorDefault(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nDefault routine for monitoring progress of `TaoSolve()`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context or `NULL`\n\nOptions Database Key:\n- `-tao_monitor` - turn on default monitoring\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefaultShort()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorDefault\"))\n\"\"\"\nfunction TaoMonitorDefault(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorDefault(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorDefault, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorGlobalization(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nDefault routine for monitoring progress of `TaoSolve()` with extra detail on the globalization method.\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context or `NULL`\n\nOptions Database Key:\n- `-tao_monitor_globalization` - turn on monitoring with globalization information\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefaultShort()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorGlobalization\"))\n\"\"\"\nfunction TaoMonitorGlobalization(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorGlobalization(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorGlobalization, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorDefaultShort(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nRoutine for monitoring progress of `TaoSolve()` that displays fewer digits than `TaoMonitorDefault()`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context of type `PETSCVIEWERASCII`\n\nOptions Database Key:\n- `-tao_monitor_short` - turn on default short monitoring\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefault()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorDefaultShort\"))\n\"\"\"\nfunction TaoMonitorDefaultShort(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorDefaultShort(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorDefaultShort, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorConstraintNorm(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nsame as `TaoMonitorDefault()` except\nit prints the norm of the constraint function.\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context or `NULL`\n\nOptions Database Key:\n- `-tao_monitor_constraint_norm` - monitor the constraints\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefault()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorConstraintNorm\"))\n\"\"\"\nfunction TaoMonitorConstraintNorm(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorConstraintNorm(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorConstraintNorm, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorSolution(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nViews the solution at each iteration of `TaoSolve()`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context or `NULL`\n\nOptions Database Key:\n- `-tao_monitor_solution` - view the solution\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefaultShort()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorSolution\"))\n\"\"\"\nfunction TaoMonitorSolution(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorSolution(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorSolution, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorGradient(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nViews the gradient at each iteration of `TaoSolve()`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context or `NULL`\n\nOptions Database Key:\n- `-tao_monitor_gradient` - view the gradient at each iteration\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefaultShort()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorGradient\"))\n\"\"\"\nfunction TaoMonitorGradient(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorGradient(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorGradient, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorStep(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nViews the step\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context or `NULL`\n\nOptions Database Key:\n- `-tao_monitor_step` - view the step vector at each iteration\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefaultShort()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorStep\"))\n\"\"\"\nfunction TaoMonitorStep(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorStep(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorStep, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorSolutionDraw(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nPlots the solution at each iteration of `TaoSolve()`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `TaoMonitorDraw` context\n\nOptions Database Key:\n- `-tao_monitor_solution_draw` - draw the solution at each iteration\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorSolution()`, `TaoMonitorSet()`, `TaoMonitorGradientDraw()`, `TaoMonitorDrawCtxCreate()`,\n`TaoMonitorDrawCtxDestroy()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorSolutionDraw\"))\n\"\"\"\nfunction TaoMonitorSolutionDraw(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorSolutionDraw(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorSolutionDraw, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorGradientDraw(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nPlots the gradient at each iteration of `TaoSolve()`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - `PetscViewer` context\n\nOptions Database Key:\n- `-tao_monitor_gradient_draw` - draw the gradient at each iteration\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorGradient()`, `TaoMonitorSet()`, `TaoMonitorSolutionDraw()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorGradientDraw\"))\n\"\"\"\nfunction TaoMonitorGradientDraw(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorGradientDraw(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorGradientDraw, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorStepDraw(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nPlots the step direction at each iteration of `TaoSolve()`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - the `PetscViewer` context\n\nOptions Database Key:\n- `-tao_monitor_step_draw` - draw the step direction at each iteration\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorSet()`, `TaoMonitorSolutionDraw`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorStepDraw\"))\n\"\"\"\nfunction TaoMonitorStepDraw(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorStepDraw(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorStepDraw, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMonitorResidual(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nViews the least\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - the `PetscViewer` context or `NULL`\n\nOptions Database Key:\n- `-tao_monitor_ls_residual` - view the residual at each iteration\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoMonitorDefaultShort()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitorResidual\"))\n\"\"\"\nfunction TaoMonitorResidual(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoMonitorResidual(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoMonitorResidual, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoDefaultConvergenceTest(petsclib::PetscLibType,tao::Tao, dummy::Cvoid) \nDetermines whether the solver should continue iterating\nor terminate.\n\nCollective\n\nInput Parameters:\n- `tao`   - the `Tao` context\n- `dummy` - unused dummy context\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoSetTolerances()`, `TaoGetConvergedReason()`, `TaoSetConvergedReason()`\n\n# External Links\n$(_doc_external(\"Tao/TaoDefaultConvergenceTest\"))\n\"\"\"\nfunction TaoDefaultConvergenceTest(petsclib::PetscLibType, tao::Tao, dummy::Cvoid) end\n\n@for_petsc function TaoDefaultConvergenceTest(petsclib::$UnionPetscLib, tao::Tao, dummy::Cvoid )\n\n    @chk ccall(\n               (:TaoDefaultConvergenceTest, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, dummy,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetOptionsPrefix(petsclib::PetscLibType,tao::Tao, p::String) \nSets the prefix used for searching for all\nTao options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `p`   - the prefix string to prepend to all Tao option requests\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSetFromOptions()`, `TaoAppendOptionsPrefix()`, `TaoGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetOptionsPrefix\"))\n\"\"\"\nfunction TaoSetOptionsPrefix(petsclib::PetscLibType, tao::Tao, p::String) end\n\n@for_petsc function TaoSetOptionsPrefix(petsclib::$UnionPetscLib, tao::Tao, p::String )\n\n    @chk ccall(\n               (:TaoSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cchar}),\n               tao, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoAppendOptionsPrefix(petsclib::PetscLibType,tao::Tao, p::String) \nAppends to the prefix used for searching for all Tao options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `p`   - the prefix string to prepend to all `Tao` option requests\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSetFromOptions()`, `TaoSetOptionsPrefix()`, `TaoGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoAppendOptionsPrefix\"))\n\"\"\"\nfunction TaoAppendOptionsPrefix(petsclib::PetscLibType, tao::Tao, p::String) end\n\n@for_petsc function TaoAppendOptionsPrefix(petsclib::$UnionPetscLib, tao::Tao, p::String )\n\n    @chk ccall(\n               (:TaoAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cchar}),\n               tao, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetOptionsPrefix(petsclib::PetscLibType,tao::Tao, p::String) \nGets the prefix used for searching for all\nTao options in the database\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `p` - pointer to the prefix string used is returned\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSetFromOptions()`, `TaoSetOptionsPrefix()`, `TaoAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetOptionsPrefix\"))\n\"\"\"\nfunction TaoGetOptionsPrefix(petsclib::PetscLibType, tao::Tao, p::String) end\n\n@for_petsc function TaoGetOptionsPrefix(petsclib::$UnionPetscLib, tao::Tao, p::String )\n\tp_ = Ref(pointer(p))\n\n    @chk ccall(\n               (:TaoGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Ptr{Cchar}}),\n               tao, p_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetType(petsclib::PetscLibType,tao::Tao, type::TaoType) \nSets the `TaoType` for the minimization solver.\n\nCollective\n\nInput Parameters:\n- `tao`  - the `Tao` solver context\n- `type` - a known method\n\nOptions Database Key:\n- `-tao_type <type>` - Sets the method; use -help for a list\nof available methods (for instance, \"-tao_type lmvm\" or \"-tao_type tron\")\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoCreate()`, `TaoGetType()`, `TaoType`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetType\"))\n\"\"\"\nfunction TaoSetType(petsclib::PetscLibType, tao::Tao, type::TaoType) end\n\n@for_petsc function TaoSetType(petsclib::$UnionPetscLib, tao::Tao, type::TaoType )\n\n    @chk ccall(\n               (:TaoSetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, TaoType),\n               tao, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoRegister(petsclib::PetscLibType,sname::String, func::external) \nAdds a method to the Tao package for minimization.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname` - name of a new user-defined solver\n- `func`  - routine to Create method context\n\n-seealso: [](ch_tao), `Tao`, `TaoSetType()`, `TaoRegisterAll()`, `TaoRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Tao/TaoRegister\"))\n\"\"\"\nfunction TaoRegister(petsclib::PetscLibType, sname::String, func::external) end\n\n@for_petsc function TaoRegister(petsclib::$UnionPetscLib, sname::String, func::external )\n\n    @chk ccall(\n               (:TaoRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, func,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoRegisterDestroy(petsclib::PetscLibType) \nFrees the list of minimization solvers that were\nregistered by `TaoRegister()`.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoRegisterAll()`, `TaoRegister()`\n\n# External Links\n$(_doc_external(\"Tao/TaoRegisterDestroy\"))\n\"\"\"\nfunction TaoRegisterDestroy(petsclib::PetscLibType) end\n\n@for_petsc function TaoRegisterDestroy(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:TaoRegisterDestroy, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\titer::PetscInt = TaoGetIterationNumber(petsclib::PetscLibType,tao::Tao) \nGets the number of `TaoSolve()` iterations completed\nat this time.\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `iter` - iteration number\n\n-seealso: [](ch_tao), `Tao`, `TaoGetLinearSolveIterations()`, `TaoGetResidualNorm()`, `TaoGetObjective()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetIterationNumber\"))\n\"\"\"\nfunction TaoGetIterationNumber(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetIterationNumber(petsclib::$UnionPetscLib, tao::Tao )\n\titer_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoGetIterationNumber, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscInt}),\n               tao, iter_,\n              )\n\n\titer = iter_[]\n\n\treturn iter\nend \n\n\"\"\"\n\tvalue::PetscReal = TaoGetResidualNorm(petsclib::PetscLibType,tao::Tao) \nGets the current value of the norm of the residual (gradient)\nat this time.\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `value` - the current value\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoGetLinearSolveIterations()`, `TaoGetIterationNumber()`, `TaoGetObjective()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetResidualNorm\"))\n\"\"\"\nfunction TaoGetResidualNorm(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetResidualNorm(petsclib::$UnionPetscLib, tao::Tao )\n\tvalue_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGetResidualNorm, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}),\n               tao, value_,\n              )\n\n\tvalue = value_[]\n\n\treturn value\nend \n\n\"\"\"\n\tTaoSetIterationNumber(petsclib::PetscLibType,tao::Tao, iter::PetscInt) \nSets the current iteration number.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `iter` - iteration number\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoGetLinearSolveIterations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetIterationNumber\"))\n\"\"\"\nfunction TaoSetIterationNumber(petsclib::PetscLibType, tao::Tao, iter::PetscInt) end\n\n@for_petsc function TaoSetIterationNumber(petsclib::$UnionPetscLib, tao::Tao, iter::$PetscInt )\n\n    @chk ccall(\n               (:TaoSetIterationNumber, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscInt),\n               tao, iter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\titer::PetscInt = TaoGetTotalIterationNumber(petsclib::PetscLibType,tao::Tao) \nGets the total number of `TaoSolve()` iterations\ncompleted. This number keeps accumulating if multiple solves\nare called with the `Tao` object.\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `iter` - number of iterations\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoGetLinearSolveIterations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetTotalIterationNumber\"))\n\"\"\"\nfunction TaoGetTotalIterationNumber(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetTotalIterationNumber(petsclib::$UnionPetscLib, tao::Tao )\n\titer_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoGetTotalIterationNumber, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscInt}),\n               tao, iter_,\n              )\n\n\titer = iter_[]\n\n\treturn iter\nend \n\n\"\"\"\n\tTaoSetTotalIterationNumber(petsclib::PetscLibType,tao::Tao, iter::PetscInt) \nSets the current total iteration number.\n\nLogically Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `iter` - the iteration number\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoGetLinearSolveIterations()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetTotalIterationNumber\"))\n\"\"\"\nfunction TaoSetTotalIterationNumber(petsclib::PetscLibType, tao::Tao, iter::PetscInt) end\n\n@for_petsc function TaoSetTotalIterationNumber(petsclib::$UnionPetscLib, tao::Tao, iter::$PetscInt )\n\n    @chk ccall(\n               (:TaoSetTotalIterationNumber, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscInt),\n               tao, iter,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetConvergedReason(petsclib::PetscLibType,tao::Tao, reason::TaoConvergedReason) \nSets the termination flag on a `Tao` object\n\nLogically Collective\n\nInput Parameters:\n- `tao`    - the `Tao` context\n- `reason` - the `TaoConvergedReason`\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoConvergedReason`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetConvergedReason\"))\n\"\"\"\nfunction TaoSetConvergedReason(petsclib::PetscLibType, tao::Tao, reason::TaoConvergedReason) end\n\n@for_petsc function TaoSetConvergedReason(petsclib::$UnionPetscLib, tao::Tao, reason::TaoConvergedReason )\n\n    @chk ccall(\n               (:TaoSetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CTao, TaoConvergedReason),\n               tao, reason,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetConvergedReason(petsclib::PetscLibType,tao::Tao, reason::TaoConvergedReason) \nGets the reason the `TaoSolve()` was stopped.\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `reason` - value of `TaoConvergedReason`\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoConvergedReason`, `TaoSetConvergenceTest()`, `TaoSetTolerances()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetConvergedReason\"))\n\"\"\"\nfunction TaoGetConvergedReason(petsclib::PetscLibType, tao::Tao, reason::TaoConvergedReason) end\n\n@for_petsc function TaoGetConvergedReason(petsclib::$UnionPetscLib, tao::Tao, reason::TaoConvergedReason )\n\n    @chk ccall(\n               (:TaoGetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoConvergedReason}),\n               tao, reason,\n              )\n\n\n\treturn nothing\nend\n\n\n@for_petsc function TaoGetConvergedReason(petsclib::$UnionPetscLib, tao::Tao)\n    reason = Ref{TaoConvergedReason}()\n    @chk ccall(\n               (:TaoGetConvergedReason, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoConvergedReason}),\n               tao, reason,\n              )\n    return reason[]\nend \n\n\"\"\"\n\tits::PetscInt,f::PetscReal,gnorm::PetscReal,cnorm::PetscReal,xdiff::PetscReal = TaoGetSolutionStatus(petsclib::PetscLibType,tao::Tao, reason::TaoConvergedReason) \nGet the current iterate, objective value,\nresidual, infeasibility, and termination from a `Tao` object\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `its`    - the current iterate number (>=0)\n- `f`      - the current function value\n- `gnorm`  - the square of the gradient norm, duality gap, or other measure indicating distance from optimality.\n- `cnorm`  - the infeasibility of the current solution with regard to the constraints.\n- `xdiff`  - the step length or trust region radius of the most recent iterate.\n- `reason` - The termination reason, which can equal `TAO_CONTINUE_ITERATING`\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `TaoMonitor()`, `TaoGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetSolutionStatus\"))\n\"\"\"\nfunction TaoGetSolutionStatus(petsclib::PetscLibType, tao::Tao, reason::TaoConvergedReason) end\n\n@for_petsc function TaoGetSolutionStatus(petsclib::$UnionPetscLib, tao::Tao, reason::TaoConvergedReason )\n\tits_ = Ref{$PetscInt}()\n\tf_ = Ref{$PetscReal}()\n\tgnorm_ = Ref{$PetscReal}()\n\tcnorm_ = Ref{$PetscReal}()\n\txdiff_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGetSolutionStatus, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{TaoConvergedReason}),\n               tao, its_, f_, gnorm_, cnorm_, xdiff_, reason,\n              )\n\n\tits = its_[]\n\tf = f_[]\n\tgnorm = gnorm_[]\n\tcnorm = cnorm_[]\n\txdiff = xdiff_[]\n\n\treturn its,f,gnorm,cnorm,xdiff\nend \n\n\"\"\"\n\ttype::TaoType = TaoGetType(petsclib::PetscLibType,tao::Tao) \nGets the current `TaoType` being used in the `Tao` object\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `type` - the `TaoType`\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoType`, `TaoSetType()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetType\"))\n\"\"\"\nfunction TaoGetType(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetType(petsclib::$UnionPetscLib, tao::Tao )\n\ttype_ = Ref{TaoType}()\n\n    @chk ccall(\n               (:TaoGetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoType}),\n               tao, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTaoMonitor(petsclib::PetscLibType,tao::Tao, its::PetscInt, f::PetscReal, res::PetscReal, cnorm::PetscReal, steplength::PetscReal) \nMonitor the solver and the current solution.  This\nroutine will record the iteration number and residual statistics,\nand call any monitors specified by the user.\n\nInput Parameters:\n- `tao`        - the `Tao` context\n- `its`        - the current iterate number (>=0)\n- `f`          - the current objective function value\n- `res`        - the gradient norm, square root of the duality gap, or other measure indicating distance from optimality.  This measure will be recorded and\nused for some termination tests.\n- `cnorm`      - the infeasibility of the current solution with regard to the constraints.\n- `steplength` - multiple of the step direction added to the previous iterate.\n\nOptions Database Key:\n- `-tao_monitor` - Use the default monitor, which prints statistics to standard output\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TaoGetConvergedReason()`, `TaoMonitorDefault()`, `TaoMonitorSet()`\n\n# External Links\n$(_doc_external(\"Tao/TaoMonitor\"))\n\"\"\"\nfunction TaoMonitor(petsclib::PetscLibType, tao::Tao, its::PetscInt, f::PetscReal, res::PetscReal, cnorm::PetscReal, steplength::PetscReal) end\n\n@for_petsc function TaoMonitor(petsclib::$UnionPetscLib, tao::Tao, its::$PetscInt, f::$PetscReal, res::$PetscReal, cnorm::$PetscReal, steplength::$PetscReal )\n\n    @chk ccall(\n               (:TaoMonitor, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscInt, $PetscReal, $PetscReal, $PetscReal, $PetscReal),\n               tao, its, f, res, cnorm, steplength,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetConvergenceHistory(petsclib::PetscLibType,tao::Tao, obj::Vector{PetscReal}, resid::Vector{PetscReal}, cnorm::Vector{PetscReal}, lits::Vector{PetscInt}, na::PetscInt, reset::PetscBool) \nSets the array used to hold the convergence history.\n\nLogically Collective\n\nInput Parameters:\n- `tao`   - the `Tao` solver context\n- `obj`   - array to hold objective value history\n- `resid` - array to hold residual history\n- `cnorm` - array to hold constraint violation history\n- `lits`  - integer array holds the number of linear iterations for each Tao iteration\n- `na`    - size of `obj`, `resid`, and `cnorm`\n- `reset` - `PETSC_TRUE` indicates each new minimization resets the history counter to zero,\nelse it continues storing new values for new minimizations after the old ones\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `TaoGetConvergenceHistory()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetConvergenceHistory\"))\n\"\"\"\nfunction TaoSetConvergenceHistory(petsclib::PetscLibType, tao::Tao, obj::Vector{PetscReal}, resid::Vector{PetscReal}, cnorm::Vector{PetscReal}, lits::Vector{PetscInt}, na::PetscInt, reset::PetscBool) end\n\n@for_petsc function TaoSetConvergenceHistory(petsclib::$UnionPetscLib, tao::Tao, obj::Vector{$PetscReal}, resid::Vector{$PetscReal}, cnorm::Vector{$PetscReal}, lits::Vector{$PetscInt}, na::$PetscInt, reset::PetscBool )\n\n    @chk ccall(\n               (:TaoSetConvergenceHistory, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscInt}, $PetscInt, PetscBool),\n               tao, obj, resid, cnorm, lits, na, reset,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tobj::PetscReal,resid::PetscReal,cnorm::PetscReal,lits::PetscInt,nhist::PetscInt = TaoGetConvergenceHistory(petsclib::PetscLibType,tao::Tao) \nGets the arrays used that hold the convergence history.\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameters:\n- `obj`   - array used to hold objective value history\n- `resid` - array used to hold residual history\n- `cnorm` - array used to hold constraint violation history\n- `lits`  - integer array used to hold linear solver iteration count\n- `nhist` - size of `obj`, `resid`, `cnorm`, and `lits`\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSolve()`, `TaoSetConvergenceHistory()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetConvergenceHistory\"))\n\"\"\"\nfunction TaoGetConvergenceHistory(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoGetConvergenceHistory(petsclib::$UnionPetscLib, tao::Tao )\n\tobj_ = Ref{$PetscReal}()\n\tresid_ = Ref{$PetscReal}()\n\tcnorm_ = Ref{$PetscReal}()\n\tlits_ = Ref{$PetscInt}()\n\tnhist_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoGetConvergenceHistory, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal, $PetscReal, $PetscReal, $PetscInt, Ptr{$PetscInt}),\n               tao, obj_, resid_, cnorm_, lits_, nhist_,\n              )\n\n\tobj = obj_[]\n\tresid = resid_[]\n\tcnorm = cnorm_[]\n\tlits = lits_[]\n\tnhist = nhist_[]\n\n\treturn obj,resid,cnorm,lits,nhist\nend \n\n\"\"\"\n\tTaoSetApplicationContext(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nSets the optional user\n`Tao` callback functions with `TaoGetApplicationContext()`\n\nLogically Collective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `ctx` - the user context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetApplicationContext\"))\n\"\"\"\nfunction TaoSetApplicationContext(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoSetApplicationContext(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoSetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetApplicationContext(petsclib::PetscLibType,tao::Tao, ctx::PeCtx) \nGets the user\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `ctx` - a pointer to the user context\n\nLevel: intermediate\n\n-seealso: [](ch_tao), `Tao`, `TaoSetApplicationContext()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetApplicationContext\"))\n\"\"\"\nfunction TaoGetApplicationContext(petsclib::PetscLibType, tao::Tao, ctx::PeCtx) end\n\n@for_petsc function TaoGetApplicationContext(petsclib::$UnionPetscLib, tao::Tao, ctx::PeCtx )\n\n    @chk ccall(\n               (:TaoGetApplicationContext, $petsc_library),\n               PetscErrorCode,\n               (CTao, PeCtx),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetGradientNorm(petsclib::PetscLibType,tao::Tao, M::PetscMat) \nSets the matrix used to define the norm that measures the size of the gradient in some of the `Tao` algorithms\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` context\n- `M`   - matrix that defines the norm\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoGetGradientNorm()`, `TaoGradientNorm()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetGradientNorm\"))\n\"\"\"\nfunction TaoSetGradientNorm(petsclib::PetscLibType, tao::Tao, M::PetscMat) end\n\n@for_petsc function TaoSetGradientNorm(petsclib::$UnionPetscLib, tao::Tao, M::PetscMat )\n\n    @chk ccall(\n               (:TaoSetGradientNorm, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat),\n               tao, M,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetGradientNorm(petsclib::PetscLibType,tao::Tao, M::PetscMat) \nReturns the matrix used to define the norm used for measuring the size of the gradient in some of the `Tao` algorithms\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `M` - gradient norm\n\nLevel: beginner\n\n-seealso: [](ch_tao), `Tao`, `TaoSetGradientNorm()`, `TaoGradientNorm()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetGradientNorm\"))\n\"\"\"\nfunction TaoGetGradientNorm(petsclib::PetscLibType, tao::Tao, M::PetscMat) end\n\n@for_petsc function TaoGetGradientNorm(petsclib::$UnionPetscLib, tao::Tao, M::PetscMat )\n\tM_ = Ref(M.ptr)\n\n    @chk ccall(\n               (:TaoGetGradientNorm, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CMat}),\n               tao, M_,\n              )\n\n\tM.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tgnorm::PetscReal = TaoGradientNorm(petsclib::PetscLibType,tao::Tao, gradient::PetscVec, type::NormType) \nCompute the norm using the `NormType`, the user has selected\n\nCollective\n\nInput Parameters:\n- `tao`      - the `Tao` context\n- `gradient` - the gradient\n- `type`     - the norm type\n\nOutput Parameter:\n- `gnorm` - the gradient norm\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TaoSetGradientNorm()`, `TaoGetGradientNorm()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGradientNorm\"))\n\"\"\"\nfunction TaoGradientNorm(petsclib::PetscLibType, tao::Tao, gradient::PetscVec, type::NormType) end\n\n@for_petsc function TaoGradientNorm(petsclib::$UnionPetscLib, tao::Tao, gradient::PetscVec, type::NormType )\n\tgnorm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoGradientNorm, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec, NormType, Ptr{$PetscReal}),\n               tao, gradient, type, gnorm_,\n              )\n\n\tgnorm = gnorm_[]\n\n\treturn gnorm\nend \n\n\"\"\"\n\tTaoSoftThreshold(petsclib::PetscLibType,in::PetscVec, lb::PetscReal, ub::PetscReal, out::PetscVec) \nCalculates soft thresholding routine with input vector\nand given lower and upper bound and returns it to output vector.\n\nInput Parameters:\n- `in` - input vector to be thresholded\n- `lb` - lower bound\n- `ub` - upper bound\n\nOutput Parameter:\n- `out` - Soft thresholded output vector\n\n-seealso: `Tao`, `Vec`\n\n# External Links\n$(_doc_external(\"Tao/TaoSoftThreshold\"))\n\"\"\"\nfunction TaoSoftThreshold(petsclib::PetscLibType, in::PetscVec, lb::PetscReal, ub::PetscReal, out::PetscVec) end\n\n@for_petsc function TaoSoftThreshold(petsclib::$UnionPetscLib, in::PetscVec, lb::$PetscReal, ub::$PetscReal, out::PetscVec )\n\n    @chk ccall(\n               (:TaoSoftThreshold, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscReal, $PetscReal, CVec),\n               in, lb, ub, out,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoPythonSetType(petsclib::PetscLibType,tao::Tao, pyname::String) \nInitialize a `Tao` object implemented in Python.\n\nCollective\n\nInput Parameters:\n- `tao`  - the optimization solver (`Tao`) context.\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nOptions Database Key:\n- `-tao_python_type <pyname>`  - python class\n\nLevel: intermediate\n\n-seealso: `TaoCreate()`, `TaoSetType()`, `TAOPYTHON`, `PetscPythonInitialize()`\n\n# External Links\n$(_doc_external(\"Tao/TaoPythonSetType\"))\n\"\"\"\nfunction TaoPythonSetType(petsclib::PetscLibType, tao::Tao, pyname::String) end\n\n@for_petsc function TaoPythonSetType(petsclib::$UnionPetscLib, tao::Tao, pyname::String )\n\n    @chk ccall(\n               (:TaoPythonSetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cchar}),\n               tao, pyname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tpyname::String = TaoPythonGetType(petsclib::PetscLibType,tao::Tao) \nGet the type of a `Tao` object implemented in Python.\n\nNot Collective\n\nInput Parameter:\n- `tao`  - the optimization solver (`Tao`) context.\n\nOutput Parameter:\n- `pyname`  - full dotted Python name [package].module[.{class|function}]\n\nLevel: intermediate\n\n-seealso: `TaoCreate()`, `TaoSetType()`, `TaoPYTHON`, `PetscPythonInitialize()`, `TaoPythonSetType()`\n\n# External Links\n$(_doc_external(\"Tao/TaoPythonGetType\"))\n\"\"\"\nfunction TaoPythonGetType(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoPythonGetType(petsclib::$UnionPetscLib, tao::Tao )\n\tpyname_ = Ref{Ptr{Cchar}}()\n\n    @chk ccall(\n               (:TaoPythonGetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Ptr{Cchar}}),\n               tao, pyname_,\n              )\n\n\tpyname = unsafe_wrap(Array, pyname_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn pyname\nend \n\n\"\"\"\n\tTaoShellSetSolve(petsclib::PetscLibType,tao::Tao, solve::external) \nSets routine to apply as solver\n\nLogically Collective\n\nInput Parameters:\n- `tao`   - the nonlinear solver context\n- `solve` - the application-provided solver routine\n\nCalling sequence of `solve`:\n- `tao` - the optimizer, get the application context with `TaoShellGetContext()`\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOSHELL`, `TaoShellSetContext()`, `TaoShellGetContext()`\n\n# External Links\n$(_doc_external(\"Tao/TaoShellSetSolve\"))\n\"\"\"\nfunction TaoShellSetSolve(petsclib::PetscLibType, tao::Tao, solve::external) end\n\n@for_petsc function TaoShellSetSolve(petsclib::$UnionPetscLib, tao::Tao, solve::external )\n\n    @chk ccall(\n               (:TaoShellSetSolve, $petsc_library),\n               PetscErrorCode,\n               (CTao, external),\n               tao, solve,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoShellGetContext(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nReturns the user\n\nNot Collective\n\nInput Parameter:\n- `tao` - should have been created with `TaoSetType`(tao,`TAOSHELL`);\n\nOutput Parameter:\n- `ctx` - the user provided context\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOSHELL`, `TaoShellSetContext()`\n\n# External Links\n$(_doc_external(\"Tao/TaoShellGetContext\"))\n\"\"\"\nfunction TaoShellGetContext(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoShellGetContext(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoShellGetContext, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoShellSetContext(petsclib::PetscLibType,tao::Tao, ctx::Cvoid) \nsets the context for a `TAOSHELL`\n\nLogically Collective\n\nInput Parameters:\n- `tao` - the shell Tao\n- `ctx` - the context\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOSHELL`, `TaoShellGetContext()`\n\n# External Links\n$(_doc_external(\"Tao/TaoShellSetContext\"))\n\"\"\"\nfunction TaoShellSetContext(petsclib::PetscLibType, tao::Tao, ctx::Cvoid) end\n\n@for_petsc function TaoShellSetContext(petsclib::$UnionPetscLib, tao::Tao, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoShellSetContext, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{Cvoid}),\n               tao, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoBRGNGetDampingVector(petsclib::PetscLibType,tao::Tao, d::PetscVec) \nGet the damping vector {diag}(J^T J) from a `TAOBRGN` with `TAOBRGN_REGULARIZATION_LM` regularization\n\nCollective\n\nInput Parameter:\n- `tao` - a `Tao` of type `TAOBRGN` with `TAOBRGN_REGULARIZATION_LM` regularization\n\nOutput Parameter:\n- `d` - the damping vector\n\nLevel: developer\n\n-seealso: [](ch_tao), `Tao`, `TAOBRGN`, `TaoBRGNRegularzationTypes`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNGetDampingVector\"))\n\"\"\"\nfunction TaoBRGNGetDampingVector(petsclib::PetscLibType, tao::Tao, d::PetscVec) end\n\n@for_petsc function TaoBRGNGetDampingVector(petsclib::$UnionPetscLib, tao::Tao, d::PetscVec )\n\td_ = Ref(d.ptr)\n\n    @chk ccall(\n               (:TaoBRGNGetDampingVector, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CVec}),\n               tao, d_,\n              )\n\n\td.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TaoBRGNRegularizationType = TaoBRGNGetRegularizationType(petsclib::PetscLibType,tao::Tao) \nGet the `TaoBRGNRegularizationType` of a `TAOBRGN`\n\nNot collective\n\nInput Parameter:\n- `tao` - a `Tao` of type `TAOBRGN`\n\nOutput Parameter:\n- `type` - the `TaoBRGNRegularizationType`\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TAOBRGN`, `TaoBRGNRegularizationType`, `TaoBRGNSetRegularizationType()`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNGetRegularizationType\"))\n\"\"\"\nfunction TaoBRGNGetRegularizationType(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoBRGNGetRegularizationType(petsclib::$UnionPetscLib, tao::Tao )\n\ttype_ = Ref{TaoBRGNRegularizationType}()\n\n    @chk ccall(\n               (:TaoBRGNGetRegularizationType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoBRGNRegularizationType}),\n               tao, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTaoBRGNSetRegularizationType(petsclib::PetscLibType,tao::Tao, type::TaoBRGNRegularizationType) \nSet the `TaoBRGNRegularizationType` of a `TAOBRGN`\n\nLogically collective\n\nInput Parameters:\n- `tao`  - a `Tao` of type `TAOBRGN`\n- `type` - the `TaoBRGNRegularizationType`\n\nLevel: advanced\n\n-seealso: [](ch_tao), `Tao`, `TAOBRGN`, `TaoBRGNRegularizationType`, `TaoBRGNGetRegularizationType`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNSetRegularizationType\"))\n\"\"\"\nfunction TaoBRGNSetRegularizationType(petsclib::PetscLibType, tao::Tao, type::TaoBRGNRegularizationType) end\n\n@for_petsc function TaoBRGNSetRegularizationType(petsclib::$UnionPetscLib, tao::Tao, type::TaoBRGNRegularizationType )\n\n    @chk ccall(\n               (:TaoBRGNSetRegularizationType, $petsc_library),\n               PetscErrorCode,\n               (CTao, TaoBRGNRegularizationType),\n               tao, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoBRGNGetSubsolver(petsclib::PetscLibType,tao::Tao, subsolver::Tao) \nGet the pointer to the subsolver inside a `TAOBRGN`\n\nCollective\n\nInput Parameters:\n- `tao`       - the Tao solver context\n- `subsolver` - the `Tao` sub-solver context\n\nLevel: advanced\n\n-seealso: `Tao`, `Mat`, `TAOBRGN`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNGetSubsolver\"))\n\"\"\"\nfunction TaoBRGNGetSubsolver(petsclib::PetscLibType, tao::Tao, subsolver::Tao) end\n\n@for_petsc function TaoBRGNGetSubsolver(petsclib::$UnionPetscLib, tao::Tao, subsolver::Tao )\n\tsubsolver_ = Ref(subsolver.ptr)\n\n    @chk ccall(\n               (:TaoBRGNGetSubsolver, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CTao}),\n               tao, subsolver_,\n              )\n\n\tsubsolver.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoBRGNSetRegularizerWeight(petsclib::PetscLibType,tao::Tao, lambda::PetscReal) \nSet the regularizer weight for the Gauss\n\nCollective\n\nInput Parameters:\n- `tao`    - the `Tao` solver context\n- `lambda` - L1-norm regularizer weight\n\nLevel: beginner\n\n-seealso: `Tao`, `Mat`, `TAOBRGN`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNSetRegularizerWeight\"))\n\"\"\"\nfunction TaoBRGNSetRegularizerWeight(petsclib::PetscLibType, tao::Tao, lambda::PetscReal) end\n\n@for_petsc function TaoBRGNSetRegularizerWeight(petsclib::$UnionPetscLib, tao::Tao, lambda::$PetscReal )\n\n    @chk ccall(\n               (:TaoBRGNSetRegularizerWeight, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal),\n               tao, lambda,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoBRGNSetL1SmoothEpsilon(petsclib::PetscLibType,tao::Tao, epsilon::PetscReal) \nSet the L1\n\nCollective\n\nInput Parameters:\n- `tao`     - the `Tao` solver context\n- `epsilon` - L1-norm smooth approximation parameter\n\nLevel: advanced\n\n-seealso: `Tao`, `Mat`, `TAOBRGN`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNSetL1SmoothEpsilon\"))\n\"\"\"\nfunction TaoBRGNSetL1SmoothEpsilon(petsclib::PetscLibType, tao::Tao, epsilon::PetscReal) end\n\n@for_petsc function TaoBRGNSetL1SmoothEpsilon(petsclib::$UnionPetscLib, tao::Tao, epsilon::$PetscReal )\n\n    @chk ccall(\n               (:TaoBRGNSetL1SmoothEpsilon, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal),\n               tao, epsilon,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoBRGNSetDictionaryMatrix(petsclib::PetscLibType,tao::Tao, dict::PetscMat) \nbind the dictionary matrix from user application context to gn\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `dict` - the user specified dictionary matrix.  We allow to set a `NULL` dictionary, which means identity matrix by default\n\nLevel: advanced\n\n-seealso: `Tao`, `Mat`, `TAOBRGN`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNSetDictionaryMatrix\"))\n\"\"\"\nfunction TaoBRGNSetDictionaryMatrix(petsclib::PetscLibType, tao::Tao, dict::PetscMat) end\n\n@for_petsc function TaoBRGNSetDictionaryMatrix(petsclib::$UnionPetscLib, tao::Tao, dict::PetscMat )\n\n    @chk ccall(\n               (:TaoBRGNSetDictionaryMatrix, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat),\n               tao, dict,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoBRGNSetRegularizerObjectiveAndGradientRoutine(petsclib::PetscLibType,tao::Tao, func::external, ctx::Cvoid) \nSets the user\nfunction into the algorithm.\n\nInput Parameters:\n- `tao`  - the Tao context\n- `func` - function pointer for the regularizer value and gradient evaluation\n- `ctx`  - user context for the regularizer\n\nCalling sequence:\n- `tao` - the `Tao` context\n- `u`   - the location at which to compute the objective and gradient\n- `val` - location to store objective function value\n- `g`   - location to store gradient\n- `ctx` - user context for the regularizer Hessian\n\nLevel: advanced\n\n-seealso: `Tao`, `Mat`, `TAOBRGN`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNSetRegularizerObjectiveAndGradientRoutine\"))\n\"\"\"\nfunction TaoBRGNSetRegularizerObjectiveAndGradientRoutine(petsclib::PetscLibType, tao::Tao, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoBRGNSetRegularizerObjectiveAndGradientRoutine(petsclib::$UnionPetscLib, tao::Tao, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoBRGNSetRegularizerObjectiveAndGradientRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}),\n               tao, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoBRGNSetRegularizerHessianRoutine(petsclib::PetscLibType,tao::Tao, Hreg::PetscMat, func::external, ctx::Cvoid) \nSets the user\nfunction into the algorithm.\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `Hreg` - user-created matrix for the Hessian of the regularization term\n- `func` - function pointer for the regularizer Hessian evaluation\n- `ctx`  - user context for the regularizer Hessian\n\nCalling sequence:\n- `tao`  - the `Tao` context\n- `u`    - the location at which to compute the Hessian\n- `Hreg` - user-created matrix for the Hessian of the regularization term\n- `ctx`  - user context for the regularizer Hessian\n\nLevel: advanced\n\n-seealso: `Tao`, `Mat`, `TAOBRGN`\n\n# External Links\n$(_doc_external(\"Tao/TaoBRGNSetRegularizerHessianRoutine\"))\n\"\"\"\nfunction TaoBRGNSetRegularizerHessianRoutine(petsclib::PetscLibType, tao::Tao, Hreg::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoBRGNSetRegularizerHessianRoutine(petsclib::$UnionPetscLib, tao::Tao, Hreg::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoBRGNSetRegularizerHessianRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, external, Ptr{Cvoid}),\n               tao, Hreg, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetMisfitHessianChangeStatus(petsclib::PetscLibType,tao::Tao, b::PetscBool) \nSet boolean that determines  whether Hessian matrix of misfit subsolver changes with respect to input vector.\n\nCollective\n\nInput Parameters:\n- `tao` - the Tao solver context.\n- `b`   - the Hessian matrix change status boolean, `PETSC_FALSE`  when the Hessian matrix does not change, `PETSC_TRUE` otherwise.\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetMisfitHessianChangeStatus\"))\n\"\"\"\nfunction TaoADMMSetMisfitHessianChangeStatus(petsclib::PetscLibType, tao::Tao, b::PetscBool) end\n\n@for_petsc function TaoADMMSetMisfitHessianChangeStatus(petsclib::$UnionPetscLib, tao::Tao, b::PetscBool )\n\n    @chk ccall(\n               (:TaoADMMSetMisfitHessianChangeStatus, $petsc_library),\n               PetscErrorCode,\n               (CTao, PetscBool),\n               tao, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetRegHessianChangeStatus(petsclib::PetscLibType,tao::Tao, b::PetscBool) \nSet boolean that determines whether Hessian matrix of regularization subsolver changes with respect to input vector.\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `b`   - the Hessian matrix change status boolean, `PETSC_FALSE` when the Hessian matrix does not change, `PETSC_TRUE` otherwise.\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetRegHessianChangeStatus\"))\n\"\"\"\nfunction TaoADMMSetRegHessianChangeStatus(petsclib::PetscLibType, tao::Tao, b::PetscBool) end\n\n@for_petsc function TaoADMMSetRegHessianChangeStatus(petsclib::$UnionPetscLib, tao::Tao, b::PetscBool )\n\n    @chk ccall(\n               (:TaoADMMSetRegHessianChangeStatus, $petsc_library),\n               PetscErrorCode,\n               (CTao, PetscBool),\n               tao, b,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetSpectralPenalty(petsclib::PetscLibType,tao::Tao, mu::PetscReal) \nSet the spectral penalty (mu) value\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `mu`  - spectral penalty\n\nLevel: advanced\n\n-seealso: `TaoADMMSetMinimumSpectralPenalty()`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetSpectralPenalty\"))\n\"\"\"\nfunction TaoADMMSetSpectralPenalty(petsclib::PetscLibType, tao::Tao, mu::PetscReal) end\n\n@for_petsc function TaoADMMSetSpectralPenalty(petsclib::$UnionPetscLib, tao::Tao, mu::$PetscReal )\n\n    @chk ccall(\n               (:TaoADMMSetSpectralPenalty, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal),\n               tao, mu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmu::PetscReal = TaoADMMGetSpectralPenalty(petsclib::PetscLibType,tao::Tao) \nGet the spectral penalty (mu) value\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `mu` - spectral penalty\n\nLevel: advanced\n\n-seealso: `TaoADMMSetMinimumSpectralPenalty()`, `TaoADMMSetSpectralPenalty()`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMGetSpectralPenalty\"))\n\"\"\"\nfunction TaoADMMGetSpectralPenalty(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoADMMGetSpectralPenalty(petsclib::$UnionPetscLib, tao::Tao )\n\tmu_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoADMMGetSpectralPenalty, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}),\n               tao, mu_,\n              )\n\n\tmu = mu_[]\n\n\treturn mu\nend \n\n\"\"\"\n\tTaoADMMGetMisfitSubsolver(petsclib::PetscLibType,tao::Tao, misfit::Tao) \nGet the pointer to the misfit subsolver inside `TAOADMM`\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `misfit` - the `Tao` subsolver context\n\nLevel: advanced\n\n-seealso: `TAOADMM`, `Tao`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMGetMisfitSubsolver\"))\n\"\"\"\nfunction TaoADMMGetMisfitSubsolver(petsclib::PetscLibType, tao::Tao, misfit::Tao) end\n\n@for_petsc function TaoADMMGetMisfitSubsolver(petsclib::$UnionPetscLib, tao::Tao, misfit::Tao )\n\tmisfit_ = Ref(misfit.ptr)\n\n    @chk ccall(\n               (:TaoADMMGetMisfitSubsolver, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CTao}),\n               tao, misfit_,\n              )\n\n\tmisfit.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMGetRegularizationSubsolver(petsclib::PetscLibType,tao::Tao, reg::Tao) \nGet the pointer to the regularization subsolver inside `TAOADMM`\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `reg` - the `Tao` subsolver context\n\nLevel: advanced\n\n-seealso: `TAOADMM`, `Tao`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMGetRegularizationSubsolver\"))\n\"\"\"\nfunction TaoADMMGetRegularizationSubsolver(petsclib::PetscLibType, tao::Tao, reg::Tao) end\n\n@for_petsc function TaoADMMGetRegularizationSubsolver(petsclib::$UnionPetscLib, tao::Tao, reg::Tao )\n\treg_ = Ref(reg.ptr)\n\n    @chk ccall(\n               (:TaoADMMGetRegularizationSubsolver, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CTao}),\n               tao, reg_,\n              )\n\n\treg.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetConstraintVectorRHS(petsclib::PetscLibType,tao::Tao, c::PetscVec) \nSet the RHS constraint vector for `TAOADMM`\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `c`   - RHS vector\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetConstraintVectorRHS\"))\n\"\"\"\nfunction TaoADMMSetConstraintVectorRHS(petsclib::PetscLibType, tao::Tao, c::PetscVec) end\n\n@for_petsc function TaoADMMSetConstraintVectorRHS(petsclib::$UnionPetscLib, tao::Tao, c::PetscVec )\n\n    @chk ccall(\n               (:TaoADMMSetConstraintVectorRHS, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec),\n               tao, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetMinimumSpectralPenalty(petsclib::PetscLibType,tao::Tao, mu::PetscReal) \nSet the minimum value for the spectral penalty\n\nCollective\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `mu`  - minimum spectral penalty value\n\nLevel: advanced\n\n-seealso: `TaoADMMGetSpectralPenalty()`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetMinimumSpectralPenalty\"))\n\"\"\"\nfunction TaoADMMSetMinimumSpectralPenalty(petsclib::PetscLibType, tao::Tao, mu::PetscReal) end\n\n@for_petsc function TaoADMMSetMinimumSpectralPenalty(petsclib::$UnionPetscLib, tao::Tao, mu::$PetscReal )\n\n    @chk ccall(\n               (:TaoADMMSetMinimumSpectralPenalty, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal),\n               tao, mu,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetRegularizerCoefficient(petsclib::PetscLibType,tao::Tao, lambda::PetscReal) \nSet the regularization coefficient lambda for L1 norm regularization case\n\nCollective\n\nInput Parameters:\n- `tao`    - the `Tao` solver context\n- `lambda` - L1-norm regularizer coefficient\n\nLevel: advanced\n\n-seealso: `TaoADMMSetMisfitConstraintJacobian()`, `TaoADMMSetRegularizerConstraintJacobian()`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetRegularizerCoefficient\"))\n\"\"\"\nfunction TaoADMMSetRegularizerCoefficient(petsclib::PetscLibType, tao::Tao, lambda::PetscReal) end\n\n@for_petsc function TaoADMMSetRegularizerCoefficient(petsclib::$UnionPetscLib, tao::Tao, lambda::$PetscReal )\n\n    @chk ccall(\n               (:TaoADMMSetRegularizerCoefficient, $petsc_library),\n               PetscErrorCode,\n               (CTao, $PetscReal),\n               tao, lambda,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tlambda::PetscReal = TaoADMMGetRegularizerCoefficient(petsclib::PetscLibType,tao::Tao) \nGet the regularization coefficient lambda for L1 norm regularization case\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `lambda` - L1-norm regularizer coefficient\n\nLevel: advanced\n\n-seealso: `TaoADMMSetMisfitConstraintJacobian()`, `TaoADMMSetRegularizerConstraintJacobian()`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMGetRegularizerCoefficient\"))\n\"\"\"\nfunction TaoADMMGetRegularizerCoefficient(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoADMMGetRegularizerCoefficient(petsclib::$UnionPetscLib, tao::Tao )\n\tlambda_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:TaoADMMGetRegularizerCoefficient, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{$PetscReal}),\n               tao, lambda_,\n              )\n\n\tlambda = lambda_[]\n\n\treturn lambda\nend \n\n\"\"\"\n\tTaoADMMSetMisfitConstraintJacobian(petsclib::PetscLibType,tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) \nSet the constraint matrix B for the `TAOADMM` algorithm. Matrix B constrains the z variable.\n\nCollective\n\nInput Parameters:\n- `tao`  - the Tao solver context\n- `J`    - user-created regularizer constraint Jacobian matrix\n- `Jpre` - user-created regularizer Jacobian constraint matrix for constructing the preconditioner, often this is `J`\n- `func` - function pointer for the regularizer constraint Jacobian update function\n- `ctx`  - user context for the regularizer Hessian\n\nLevel: advanced\n\n-seealso: `TaoADMMSetRegularizerCoefficient()`, `TaoADMMSetRegularizerConstraintJacobian()`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetMisfitConstraintJacobian\"))\n\"\"\"\nfunction TaoADMMSetMisfitConstraintJacobian(petsclib::PetscLibType, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoADMMSetMisfitConstraintJacobian(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoADMMSetMisfitConstraintJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, J, Jpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetRegularizerConstraintJacobian(petsclib::PetscLibType,tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) \nSet the constraint matrix B for `TAOADMM` algorithm. Matrix B constraints z variable.\n\nCollective\n\nInput Parameters:\n- `tao`  - the `Tao` solver context\n- `J`    - user-created regularizer constraint Jacobian matrix\n- `Jpre` - user-created regularizer Jacobian constraint matrix for constructing the preconditioner, often this is `J`\n- `func` - function pointer for the regularizer constraint Jacobian update function\n- `ctx`  - user context for the regularizer Hessian\n\nLevel: advanced\n\n-seealso: `TaoADMMSetRegularizerCoefficient()`, `TaoADMMSetMisfitConstraintJacobian()`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetRegularizerConstraintJacobian\"))\n\"\"\"\nfunction TaoADMMSetRegularizerConstraintJacobian(petsclib::PetscLibType, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoADMMSetRegularizerConstraintJacobian(petsclib::$UnionPetscLib, tao::Tao, J::PetscMat, Jpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoADMMSetRegularizerConstraintJacobian, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, J, Jpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetMisfitObjectiveAndGradientRoutine(petsclib::PetscLibType,tao::Tao, func::external, ctx::Cvoid) \nSets the user\n\nCollective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `func` - function pointer for the misfit value and gradient evaluation\n- `ctx`  - user context for the misfit\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetMisfitObjectiveAndGradientRoutine\"))\n\"\"\"\nfunction TaoADMMSetMisfitObjectiveAndGradientRoutine(petsclib::PetscLibType, tao::Tao, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoADMMSetMisfitObjectiveAndGradientRoutine(petsclib::$UnionPetscLib, tao::Tao, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoADMMSetMisfitObjectiveAndGradientRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}),\n               tao, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetMisfitHessianRoutine(petsclib::PetscLibType,tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid) \nSets the user\nfunction into the algorithm, to be used for subsolverX.\n\nCollective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `H`    - user-created matrix for the Hessian of the misfit term\n- `Hpre` - user-created matrix for the preconditioner of Hessian of the misfit term\n- `func` - function pointer for the misfit Hessian evaluation\n- `ctx`  - user context for the misfit Hessian\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetMisfitHessianRoutine\"))\n\"\"\"\nfunction TaoADMMSetMisfitHessianRoutine(petsclib::PetscLibType, tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoADMMSetMisfitHessianRoutine(petsclib::$UnionPetscLib, tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoADMMSetMisfitHessianRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, H, Hpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetRegularizerObjectiveAndGradientRoutine(petsclib::PetscLibType,tao::Tao, func::external, ctx::Cvoid) \nSets the user\n\nCollective\n\nInput Parameters:\n- `tao`  - the Tao context\n- `func` - function pointer for the regularizer value and gradient evaluation\n- `ctx`  - user context for the regularizer\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetRegularizerObjectiveAndGradientRoutine\"))\n\"\"\"\nfunction TaoADMMSetRegularizerObjectiveAndGradientRoutine(petsclib::PetscLibType, tao::Tao, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoADMMSetRegularizerObjectiveAndGradientRoutine(petsclib::$UnionPetscLib, tao::Tao, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoADMMSetRegularizerObjectiveAndGradientRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, external, Ptr{Cvoid}),\n               tao, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetRegularizerHessianRoutine(petsclib::PetscLibType,tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid) \nSets the user\nfunction, to be used for subsolverZ.\n\nCollective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `H`    - user-created matrix for the Hessian of the regularization term\n- `Hpre` - user-created matrix for the preconditioner of Hessian of the regularization term\n- `func` - function pointer for the regularizer Hessian evaluation\n- `ctx`  - user context for the regularizer Hessian\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetRegularizerHessianRoutine\"))\n\"\"\"\nfunction TaoADMMSetRegularizerHessianRoutine(petsclib::PetscLibType, tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid) end\n\n@for_petsc function TaoADMMSetRegularizerHessianRoutine(petsclib::$UnionPetscLib, tao::Tao, H::PetscMat, Hpre::PetscMat, func::external, ctx::Cvoid )\n\n    @chk ccall(\n               (:TaoADMMSetRegularizerHessianRoutine, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat, CMat, external, Ptr{Cvoid}),\n               tao, H, Hpre, func, ctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetADMMParentTao(petsclib::PetscLibType,tao::Tao, admm_tao::Tao) \nGets pointer to parent `TAOADMM`, used by inner subsolver.\n\nCollective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `admm_tao` - the parent `Tao` context\n\nLevel: advanced\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetADMMParentTao\"))\n\"\"\"\nfunction TaoGetADMMParentTao(petsclib::PetscLibType, tao::Tao, admm_tao::Tao) end\n\n@for_petsc function TaoGetADMMParentTao(petsclib::$UnionPetscLib, tao::Tao, admm_tao::Tao )\n\tadmm_tao_ = Ref(admm_tao.ptr)\n\n    @chk ccall(\n               (:TaoGetADMMParentTao, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CTao}),\n               tao, admm_tao_,\n              )\n\n\tadmm_tao.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMGetDualVector(petsclib::PetscLibType,tao::Tao, Y::PetscVec) \nReturns the dual vector associated with the current `TAOADMM` state\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `Y` - the current solution\n\nLevel: intermediate\n\n-seealso: `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMGetDualVector\"))\n\"\"\"\nfunction TaoADMMGetDualVector(petsclib::PetscLibType, tao::Tao, Y::PetscVec) end\n\n@for_petsc function TaoADMMGetDualVector(petsclib::$UnionPetscLib, tao::Tao, Y::PetscVec )\n\tY_ = Ref(Y.ptr)\n\n    @chk ccall(\n               (:TaoADMMGetDualVector, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CVec}),\n               tao, Y_,\n              )\n\n\tY.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoADMMSetRegularizerType(petsclib::PetscLibType,tao::Tao, type::TaoADMMRegularizerType) \nSet regularizer type for `TAOADMM` routine\n\nNot Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `type` - regularizer type\n\nOptions Database Key:\n- `-tao_admm_regularizer_type <admm_regularizer_user,admm_regularizer_soft_thresh>` - select the regularizer\n\nLevel: intermediate\n\n-seealso: `TaoADMMGetRegularizerType()`, `TaoADMMRegularizerType`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetRegularizerType\"))\n\"\"\"\nfunction TaoADMMSetRegularizerType(petsclib::PetscLibType, tao::Tao, type::TaoADMMRegularizerType) end\n\n@for_petsc function TaoADMMSetRegularizerType(petsclib::$UnionPetscLib, tao::Tao, type::TaoADMMRegularizerType )\n\n    @chk ccall(\n               (:TaoADMMSetRegularizerType, $petsc_library),\n               PetscErrorCode,\n               (CTao, TaoADMMRegularizerType),\n               tao, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TaoADMMRegularizerType = TaoADMMGetRegularizerType(petsclib::PetscLibType,tao::Tao) \nGets the type of regularizer routine for `TAOADMM`\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `type` - the type of regularizer\n\nLevel: intermediate\n\n-seealso: `TaoADMMSetRegularizerType()`, `TaoADMMRegularizerType`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMGetRegularizerType\"))\n\"\"\"\nfunction TaoADMMGetRegularizerType(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoADMMGetRegularizerType(petsclib::$UnionPetscLib, tao::Tao )\n\ttype_ = Ref{TaoADMMRegularizerType}()\n\n    @chk ccall(\n               (:TaoADMMGetRegularizerType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoADMMRegularizerType}),\n               tao, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTaoADMMSetUpdateType(petsclib::PetscLibType,tao::Tao, type::TaoADMMUpdateType) \nSet update routine for `TAOADMM` routine\n\nNot Collective\n\nInput Parameters:\n- `tao`  - the `Tao` context\n- `type` - spectral parameter update type\n\nLevel: intermediate\n\n-seealso: `TaoADMMGetUpdateType()`, `TaoADMMUpdateType`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMSetUpdateType\"))\n\"\"\"\nfunction TaoADMMSetUpdateType(petsclib::PetscLibType, tao::Tao, type::TaoADMMUpdateType) end\n\n@for_petsc function TaoADMMSetUpdateType(petsclib::$UnionPetscLib, tao::Tao, type::TaoADMMUpdateType )\n\n    @chk ccall(\n               (:TaoADMMSetUpdateType, $petsc_library),\n               PetscErrorCode,\n               (CTao, TaoADMMUpdateType),\n               tao, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TaoADMMUpdateType = TaoADMMGetUpdateType(petsclib::PetscLibType,tao::Tao) \nGets the type of spectral penalty update routine for `TAOADMM`\n\nNot Collective\n\nInput Parameter:\n- `tao` - the `Tao` context\n\nOutput Parameter:\n- `type` - the type of spectral penalty update routine\n\nLevel: intermediate\n\n-seealso: `TaoADMMSetUpdateType()`, `TaoADMMUpdateType`, `TAOADMM`\n\n# External Links\n$(_doc_external(\"Tao/TaoADMMGetUpdateType\"))\n\"\"\"\nfunction TaoADMMGetUpdateType(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoADMMGetUpdateType(petsclib::$UnionPetscLib, tao::Tao )\n\ttype_ = Ref{TaoADMMUpdateType}()\n\n    @chk ccall(\n               (:TaoADMMGetUpdateType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoADMMUpdateType}),\n               tao, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\ttype::TaoALMMType = TaoALMMGetType(petsclib::PetscLibType,tao::Tao) \nRetrieve the augmented Lagrangian formulation type for the subproblem.\n\nInput Parameter:\n- `tao` - the `Tao` context for the `TAOALMM` solver\n\nOutput Parameter:\n- `type` - augmented Lagragrangian type\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOALMM`, `TaoALMMSetType()`, `TaoALMMType`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMGetType\"))\n\"\"\"\nfunction TaoALMMGetType(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoALMMGetType(petsclib::$UnionPetscLib, tao::Tao )\n\ttype_ = Ref{TaoALMMType}()\n\n    @chk ccall(\n               (:TaoALMMGetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoALMMType}),\n               tao, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTaoALMMSetType(petsclib::PetscLibType,tao::Tao, type::TaoALMMType) \nDetermine the augmented Lagrangian formulation type for the subproblem.\n\nInput Parameters:\n- `tao`  - the `Tao` context for the `TAOALMM` solver\n- `type` - augmented Lagragrangian type\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOALMM`, `TaoALMMGetType()`, `TaoALMMType`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMSetType\"))\n\"\"\"\nfunction TaoALMMSetType(petsclib::PetscLibType, tao::Tao, type::TaoALMMType) end\n\n@for_petsc function TaoALMMSetType(petsclib::$UnionPetscLib, tao::Tao, type::TaoALMMType )\n\n    @chk ccall(\n               (:TaoALMMSetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, TaoALMMType),\n               tao, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoALMMGetSubsolver(petsclib::PetscLibType,tao::Tao, subsolver::Tao) \nRetrieve the subsolver being used by `TAOALMM`.\n\nInput Parameter:\n- `tao` - the `Tao` context for the `TAOALMM` solver\n\nOutput Parameter:\n- `subsolver` - the `Tao` context for the subsolver\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOALMM`, `TaoALMMSetSubsolver()`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMGetSubsolver\"))\n\"\"\"\nfunction TaoALMMGetSubsolver(petsclib::PetscLibType, tao::Tao, subsolver::Tao) end\n\n@for_petsc function TaoALMMGetSubsolver(petsclib::$UnionPetscLib, tao::Tao, subsolver::Tao )\n\tsubsolver_ = Ref(subsolver.ptr)\n\n    @chk ccall(\n               (:TaoALMMGetSubsolver, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CTao}),\n               tao, subsolver_,\n              )\n\n\tsubsolver.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoALMMSetSubsolver(petsclib::PetscLibType,tao::Tao, subsolver::Tao) \nChanges the subsolver inside `TAOALMM` with the user provided one.\n\nInput Parameters:\n- `tao`       - the `Tao` context for the `TAOALMM` solver\n- `subsolver` - the Tao context for the subsolver\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOALMM`, `TaoALMMGetSubsolver()`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMSetSubsolver\"))\n\"\"\"\nfunction TaoALMMSetSubsolver(petsclib::PetscLibType, tao::Tao, subsolver::Tao) end\n\n@for_petsc function TaoALMMSetSubsolver(petsclib::$UnionPetscLib, tao::Tao, subsolver::Tao )\n\n    @chk ccall(\n               (:TaoALMMSetSubsolver, $petsc_library),\n               PetscErrorCode,\n               (CTao, CTao),\n               tao, subsolver,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoALMMGetMultipliers(petsclib::PetscLibType,tao::Tao, Y::PetscVec) \nRetrieve a pointer to the Lagrange multipliers.\n\nInput Parameter:\n- `tao` - the `Tao` context for the `TAOALMM` solver\n\nOutput Parameter:\n- `Y` - vector of Lagrange multipliers\n\nLevel: advanced\n\n-seealso: `TAOALMM`, `Tao`, `TaoALMMSetMultipliers()`, `TaoALMMGetDualIS()`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMGetMultipliers\"))\n\"\"\"\nfunction TaoALMMGetMultipliers(petsclib::PetscLibType, tao::Tao, Y::PetscVec) end\n\n@for_petsc function TaoALMMGetMultipliers(petsclib::$UnionPetscLib, tao::Tao, Y::PetscVec )\n\tY_ = Ref(Y.ptr)\n\n    @chk ccall(\n               (:TaoALMMGetMultipliers, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CVec}),\n               tao, Y_,\n              )\n\n\tY.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoALMMSetMultipliers(petsclib::PetscLibType,tao::Tao, Y::PetscVec) \nSet user\n\nInput Parameters:\n- `tao` - the `Tao` context for the `TAOALMM` solver\n- `Y`   - vector of Lagrange multipliers\n\nLevel: advanced\n\n-seealso: `TAOALMM`, `Tao`, `TaoALMMGetMultipliers()`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMSetMultipliers\"))\n\"\"\"\nfunction TaoALMMSetMultipliers(petsclib::PetscLibType, tao::Tao, Y::PetscVec) end\n\n@for_petsc function TaoALMMSetMultipliers(petsclib::$UnionPetscLib, tao::Tao, Y::PetscVec )\n\n    @chk ccall(\n               (:TaoALMMSetMultipliers, $petsc_library),\n               PetscErrorCode,\n               (CTao, CVec),\n               tao, Y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoALMMGetPrimalIS(petsclib::PetscLibType,tao::Tao, opt_is::IS, slack_is::IS) \nRetrieve the index set that identifies optimization\nand slack variable components of the subsolver's solution vector.\n\nInput Parameter:\n- `tao` - the `Tao` context for the `TAOALMM` solver\n\nOutput Parameters:\n- `opt_is`   - index set associated with the optimization variables (`NULL` if not needed)\n- `slack_is` - index set associated with the slack variables (`NULL` if not needed)\n\nLevel: advanced\n\n-seealso: `TAOALMM`, `Tao`, `IS`, `TaoALMMGetPrimalVector()`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMGetPrimalIS\"))\n\"\"\"\nfunction TaoALMMGetPrimalIS(petsclib::PetscLibType, tao::Tao, opt_is::IS, slack_is::IS) end\n\n@for_petsc function TaoALMMGetPrimalIS(petsclib::$UnionPetscLib, tao::Tao, opt_is::IS, slack_is::IS )\n\topt_is_ = Ref(opt_is.ptr)\n\tslack_is_ = Ref(slack_is.ptr)\n\n    @chk ccall(\n               (:TaoALMMGetPrimalIS, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CIS}, Ptr{CIS}),\n               tao, opt_is_, slack_is_,\n              )\n\n\topt_is.ptr = C_NULL\n\tslack_is.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoALMMGetDualIS(petsclib::PetscLibType,tao::Tao, eq_is::IS, ineq_is::IS) \nRetrieve the index set that identifies equality\nand inequality constraint components of the dual vector returned\nby `TaoALMMGetMultipliers()`.\n\nInput Parameter:\n- `tao` - the Tao context for the `TAOALMM` solver\n\nOutput Parameters:\n- `eq_is`   - index set associated with the equality constraints (`NULL` if not needed)\n- `ineq_is` - index set associated with the inequality constraints (`NULL` if not needed)\n\nLevel: advanced\n\n-seealso: `TAOALMM`, `Tao`, `TaoALMMGetMultipliers()`\n\n# External Links\n$(_doc_external(\"Tao/TaoALMMGetDualIS\"))\n\"\"\"\nfunction TaoALMMGetDualIS(petsclib::PetscLibType, tao::Tao, eq_is::IS, ineq_is::IS) end\n\n@for_petsc function TaoALMMGetDualIS(petsclib::$UnionPetscLib, tao::Tao, eq_is::IS, ineq_is::IS )\n\teq_is_ = Ref(eq_is.ptr)\n\tineq_is_ = Ref(ineq_is.ptr)\n\n    @chk ccall(\n               (:TaoALMMGetDualIS, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CIS}, Ptr{CIS}),\n               tao, eq_is_, ineq_is_,\n              )\n\n\teq_is.ptr = C_NULL\n\tineq_is.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLMVMRecycle(petsclib::PetscLibType,tao::Tao, flg::PetscBool) \nEnable/disable recycling of the QN history between subsequent `TaoSolve()` calls.\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `flg` - Boolean flag for recycling (`PETSC_TRUE` or `PETSC_FALSE`)\n\nLevel: intermediate\n\n-seealso: `Tao`, `TAOLMVM`, `TAOBLMVM`\n\n# External Links\n$(_doc_external(\"Tao/TaoLMVMRecycle\"))\n\"\"\"\nfunction TaoLMVMRecycle(petsclib::PetscLibType, tao::Tao, flg::PetscBool) end\n\n@for_petsc function TaoLMVMRecycle(petsclib::$UnionPetscLib, tao::Tao, flg::PetscBool )\n\n    @chk ccall(\n               (:TaoLMVMRecycle, $petsc_library),\n               PetscErrorCode,\n               (CTao, PetscBool),\n               tao, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLMVMSetH0(petsclib::PetscLibType,tao::Tao, H0::PetscMat) \nSet the initial Hessian for the QN approximation\n\nInput Parameters:\n- `tao` - the `Tao` solver context\n- `H0`  - `Mat` object for the initial Hessian\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOLMVM`, `TAOBLMVM`, `TaoLMVMGetH0()`, `TaoLMVMGetH0KSP()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLMVMSetH0\"))\n\"\"\"\nfunction TaoLMVMSetH0(petsclib::PetscLibType, tao::Tao, H0::PetscMat) end\n\n@for_petsc function TaoLMVMSetH0(petsclib::$UnionPetscLib, tao::Tao, H0::PetscMat )\n\n    @chk ccall(\n               (:TaoLMVMSetH0, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat),\n               tao, H0,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLMVMGetH0(petsclib::PetscLibType,tao::Tao, H0::PetscMat) \nGet the matrix object for the QN initial Hessian\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `H0` - `Mat` object for the initial Hessian\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOLMVM`, `TAOBLMVM`, `TaoLMVMSetH0()`, `TaoLMVMGetH0KSP()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLMVMGetH0\"))\n\"\"\"\nfunction TaoLMVMGetH0(petsclib::PetscLibType, tao::Tao, H0::PetscMat) end\n\n@for_petsc function TaoLMVMGetH0(petsclib::$UnionPetscLib, tao::Tao, H0::PetscMat )\n\tH0_ = Ref(H0.ptr)\n\n    @chk ccall(\n               (:TaoLMVMGetH0, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CMat}),\n               tao, H0_,\n              )\n\n\tH0.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoLMVMGetH0KSP(petsclib::PetscLibType,tao::Tao, ksp::PetscKSP) \nGet the iterative solver for applying the inverse of the QN initial Hessian\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `ksp` - `KSP` solver context for the initial Hessian\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOLMVM`, `TAOBLMVM`, `TaoLMVMGetH0()`\n\n# External Links\n$(_doc_external(\"Tao/TaoLMVMGetH0KSP\"))\n\"\"\"\nfunction TaoLMVMGetH0KSP(petsclib::PetscLibType, tao::Tao, ksp::PetscKSP) end\n\n@for_petsc function TaoLMVMGetH0KSP(petsclib::$UnionPetscLib, tao::Tao, ksp::PetscKSP )\n\tksp_ = Ref(ksp.ptr)\n\n    @chk ccall(\n               (:TaoLMVMGetH0KSP, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CKSP}),\n               tao, ksp_,\n              )\n\n\tksp.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::TaoBNCGType = TaoBNCGGetType(petsclib::PetscLibType,tao::Tao) \nReturn the type for the `TAOBNCG` solver\n\nInput Parameter:\n- `tao` - the `Tao` solver context\n\nOutput Parameter:\n- `type` - `TAOBNCG` type\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOBNCG`, `TaoBNCGSetType()`, `TaoBNCGType`\n\n# External Links\n$(_doc_external(\"Tao/TaoBNCGGetType\"))\n\"\"\"\nfunction TaoBNCGGetType(petsclib::PetscLibType, tao::Tao) end\n\n@for_petsc function TaoBNCGGetType(petsclib::$UnionPetscLib, tao::Tao )\n\ttype_ = Ref{TaoBNCGType}()\n\n    @chk ccall(\n               (:TaoBNCGGetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{TaoBNCGType}),\n               tao, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tTaoBNCGSetType(petsclib::PetscLibType,tao::Tao, type::TaoBNCGType) \nSet the type for the `TAOBNCG` solver\n\nInput Parameters:\n- `tao`  - the `Tao` solver context\n- `type` - `TAOBNCG` type\n\nLevel: advanced\n\n-seealso: `Tao`, `TAOBNCG`, `TaoBNCGGetType()`, `TaoBNCGType`\n\n# External Links\n$(_doc_external(\"Tao/TaoBNCGSetType\"))\n\"\"\"\nfunction TaoBNCGSetType(petsclib::PetscLibType, tao::Tao, type::TaoBNCGType) end\n\n@for_petsc function TaoBNCGSetType(petsclib::$UnionPetscLib, tao::Tao, type::TaoBNCGType )\n\n    @chk ccall(\n               (:TaoBNCGSetType, $petsc_library),\n               PetscErrorCode,\n               (CTao, TaoBNCGType),\n               tao, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoGetLMVMMatrix(petsclib::PetscLibType,tao::Tao, B::PetscMat) \nReturns a pointer to the internal LMVM matrix. Valid\nonly for quasi-Newton family of methods.\n\nInput Parameter:\n- `tao` - `Tao` solver context\n\nOutput Parameter:\n- `B` - LMVM matrix\n\nLevel: advanced\n\n-seealso: `TAOBQNLS`, `TAOBQNKLS`, `TAOBQNKTL`, `TAOBQNKTR`, `MATLMVM`, `TaoSetLMVMMatrix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoGetLMVMMatrix\"))\n\"\"\"\nfunction TaoGetLMVMMatrix(petsclib::PetscLibType, tao::Tao, B::PetscMat) end\n\n@for_petsc function TaoGetLMVMMatrix(petsclib::$UnionPetscLib, tao::Tao, B::PetscMat )\n\tB_ = Ref(B.ptr)\n\n    @chk ccall(\n               (:TaoGetLMVMMatrix, $petsc_library),\n               PetscErrorCode,\n               (CTao, Ptr{CMat}),\n               tao, B_,\n              )\n\n\tB.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoSetLMVMMatrix(petsclib::PetscLibType,tao::Tao, B::PetscMat) \nSets an external LMVM matrix into the Tao solver. Valid\nonly for quasi-Newton family of methods.\n\nQN family of methods create their own LMVM matrices and users who wish to\nmanipulate this matrix should use TaoGetLMVMMatrix() instead.\n\nInput Parameters:\n- `tao` - Tao solver context\n- `B`   - LMVM matrix\n\nLevel: advanced\n\n-seealso: `TAOBQNLS`, `TAOBQNKLS`, `TAOBQNKTL`, `TAOBQNKTR`, `MATLMVM`, `TaoGetLMVMMatrix()`\n\n# External Links\n$(_doc_external(\"Tao/TaoSetLMVMMatrix\"))\n\"\"\"\nfunction TaoSetLMVMMatrix(petsclib::PetscLibType, tao::Tao, B::PetscMat) end\n\n@for_petsc function TaoSetLMVMMatrix(petsclib::$UnionPetscLib, tao::Tao, B::PetscMat )\n\n    @chk ccall(\n               (:TaoSetLMVMMatrix, $petsc_library),\n               PetscErrorCode,\n               (CTao, CMat),\n               tao, B,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoVecGetSubVec(petsclib::PetscLibType,vfull::PetscVec, is::IS, reduced_type::TaoSubsetType, maskvalue::PetscReal, vreduced::PetscVec) \nGets a subvector using the `IS`\n\nInput Parameters:\n- `vfull`        - the full matrix\n- `is`           - the index set for the subvector\n- `reduced_type` - the method `Tao` is using for subsetting\n- `maskvalue`    - the value to set the unused vector elements to (for `TAO_SUBSET_MASK` or `TAO_SUBSET_MATRIXFREE`)\n\nOutput Parameter:\n- `vreduced` - the subvector\n\nLevel: developer\n\n-seealso: `TaoMatGetSubMat()`, `TaoSubsetType`\n\n# External Links\n$(_doc_external(\"Tao/TaoVecGetSubVec\"))\n\"\"\"\nfunction TaoVecGetSubVec(petsclib::PetscLibType, vfull::PetscVec, is::IS, reduced_type::TaoSubsetType, maskvalue::PetscReal, vreduced::PetscVec) end\n\n@for_petsc function TaoVecGetSubVec(petsclib::$UnionPetscLib, vfull::PetscVec, is::IS, reduced_type::TaoSubsetType, maskvalue::$PetscReal, vreduced::PetscVec )\n\tvreduced_ = Ref(vreduced.ptr)\n\n    @chk ccall(\n               (:TaoVecGetSubVec, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, TaoSubsetType, $PetscReal, Ptr{CVec}),\n               vfull, is, reduced_type, maskvalue, vreduced_,\n              )\n\n\tvreduced.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tTaoMatGetSubMat(petsclib::PetscLibType,M::PetscMat, is::IS, v1::PetscVec, subset_type::TaoSubsetType, Msub::PetscMat) \nGets a submatrix using the `IS`\n\nInput Parameters:\n- `M`           - the full matrix (`n x n`)\n- `is`          - the index set for the submatrix (both row and column index sets need to be the same)\n- `v1`          - work vector of dimension n, needed for `TAO_SUBSET_MASK` option\n- `subset_type` - the method `Tao` is using for subsetting\n\nOutput Parameter:\n- `Msub` - the submatrix\n\nLevel: developer\n\n-seealso: `TaoVecGetSubVec()`, `TaoSubsetType`\n\n# External Links\n$(_doc_external(\"Tao/TaoMatGetSubMat\"))\n\"\"\"\nfunction TaoMatGetSubMat(petsclib::PetscLibType, M::PetscMat, is::IS, v1::PetscVec, subset_type::TaoSubsetType, Msub::PetscMat) end\n\n@for_petsc function TaoMatGetSubMat(petsclib::$UnionPetscLib, M::PetscMat, is::IS, v1::PetscVec, subset_type::TaoSubsetType, Msub::PetscMat )\n\tMsub_ = Ref(Msub.ptr)\n\n    @chk ccall(\n               (:TaoMatGetSubMat, $petsc_library),\n               PetscErrorCode,\n               (CMat, CIS, CVec, TaoSubsetType, Ptr{CMat}),\n               M, is, v1, subset_type, Msub_,\n              )\n\n\tMsub.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tbound_tol::PetscReal = TaoEstimateActiveBounds(petsclib::PetscLibType,X::PetscVec, XL::PetscVec, XU::PetscVec, G::PetscVec, S::PetscVec, W::PetscVec, steplen::PetscReal, active_lower::IS, active_upper::IS, active_fixed::IS, active::IS, inactive::IS) \nGenerates index sets for variables at the lower and upper\nbounds, as well as fixed variables where lower and upper bounds equal each other.\n\nInput Parameters:\n- `X`       - solution vector\n- `XL`      - lower bound vector\n- `XU`      - upper bound vector\n- `G`       - unprojected gradient\n- `S`       - step direction with which the active bounds will be estimated\n- `W`       - work vector of type and size of `X`\n- `steplen` - the step length at which the active bounds will be estimated (needs to be conservative)\n\nOutput Parameters:\n- `bound_tol`    - tolerance for the bound estimation\n- `active_lower` - index set for active variables at the lower bound\n- `active_upper` - index set for active variables at the upper bound\n- `active_fixed` - index set for fixed variables\n- `active`       - index set for all active variables\n- `inactive`     - complementary index set for inactive variables\n\nLevel: developer\n\n-seealso: `TAOBNCG`, `TAOBNTL`, `TAOBNTR`, `TaoBoundSolution()`\n\n# External Links\n$(_doc_external(\"Tao/TaoEstimateActiveBounds\"))\n\"\"\"\nfunction TaoEstimateActiveBounds(petsclib::PetscLibType, X::PetscVec, XL::PetscVec, XU::PetscVec, G::PetscVec, S::PetscVec, W::PetscVec, steplen::PetscReal, active_lower::IS, active_upper::IS, active_fixed::IS, active::IS, inactive::IS) end\n\n@for_petsc function TaoEstimateActiveBounds(petsclib::$UnionPetscLib, X::PetscVec, XL::PetscVec, XU::PetscVec, G::PetscVec, S::PetscVec, W::PetscVec, steplen::$PetscReal, active_lower::IS, active_upper::IS, active_fixed::IS, active::IS, inactive::IS )\n\tbound_tol_ = Ref{$PetscReal}()\n\tactive_lower_ = Ref(active_lower.ptr)\n\tactive_upper_ = Ref(active_upper.ptr)\n\tactive_fixed_ = Ref(active_fixed.ptr)\n\tactive_ = Ref(active.ptr)\n\tinactive_ = Ref(inactive.ptr)\n\n    @chk ccall(\n               (:TaoEstimateActiveBounds, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec, CVec, CVec, $PetscReal, Ptr{$PetscReal}, Ptr{CIS}, Ptr{CIS}, Ptr{CIS}, Ptr{CIS}, Ptr{CIS}),\n               X, XL, XU, G, S, W, steplen, bound_tol_, active_lower_, active_upper_, active_fixed_, active_, inactive_,\n              )\n\n\tbound_tol = bound_tol_[]\n\tactive_lower.ptr = C_NULL\n\tactive_upper.ptr = C_NULL\n\tactive_fixed.ptr = C_NULL\n\tactive.ptr = C_NULL\n\tinactive.ptr = C_NULL\n\n\treturn bound_tol\nend \n\n\"\"\"\n\tTaoBoundStep(petsclib::PetscLibType,X::PetscVec, XL::PetscVec, XU::PetscVec, active_lower::IS, active_upper::IS, active_fixed::IS, scale::PetscReal, S::PetscVec) \nEnsures the correct zero or adjusted step direction values for active\nvariables.\n\nInput Parameters:\n- `X`            - solution vector\n- `XL`           - lower bound vector\n- `XU`           - upper bound vector\n- `active_lower` - index set for lower bounded active variables\n- `active_upper` - index set for lower bounded active variables\n- `active_fixed` - index set for fixed active variables\n- `scale`        - amplification factor for the step that needs to be taken on actively bounded variables\n\nOutput Parameter:\n- `S` - step direction to be modified\n\nLevel: developer\n\n-seealso: `TAOBNCG`, `TAOBNTL`, `TAOBNTR`, `TaoBoundSolution()`\n\n# External Links\n$(_doc_external(\"Tao/TaoBoundStep\"))\n\"\"\"\nfunction TaoBoundStep(petsclib::PetscLibType, X::PetscVec, XL::PetscVec, XU::PetscVec, active_lower::IS, active_upper::IS, active_fixed::IS, scale::PetscReal, S::PetscVec) end\n\n@for_petsc function TaoBoundStep(petsclib::$UnionPetscLib, X::PetscVec, XL::PetscVec, XU::PetscVec, active_lower::IS, active_upper::IS, active_fixed::IS, scale::$PetscReal, S::PetscVec )\n\n    @chk ccall(\n               (:TaoBoundStep, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CIS, CIS, CIS, $PetscReal, CVec),\n               X, XL, XU, active_lower, active_upper, active_fixed, scale, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnDiff::PetscInt = TaoBoundSolution(petsclib::PetscLibType,X::PetscVec, XL::PetscVec, XU::PetscVec, bound_tol::PetscReal, Xout::PetscVec) \nEnsures that the solution vector is snapped into the bounds within a given tolerance.\n\nCollective\n\nInput Parameters:\n- `X`         - solution vector\n- `XL`        - lower bound vector\n- `XU`        - upper bound vector\n- `bound_tol` - absolute tolerance in enforcing the bound\n\nOutput Parameters:\n- `nDiff` - total number of vector entries that have been bounded\n- `Xout`  - modified solution vector satisfying bounds to `bound_tol`\n\nLevel: developer\n\n-seealso: `TAOBNCG`, `TAOBNTL`, `TAOBNTR`, `TaoBoundStep()`\n\n# External Links\n$(_doc_external(\"Tao/TaoBoundSolution\"))\n\"\"\"\nfunction TaoBoundSolution(petsclib::PetscLibType, X::PetscVec, XL::PetscVec, XU::PetscVec, bound_tol::PetscReal, Xout::PetscVec) end\n\n@for_petsc function TaoBoundSolution(petsclib::$UnionPetscLib, X::PetscVec, XL::PetscVec, XU::PetscVec, bound_tol::$PetscReal, Xout::PetscVec )\n\tnDiff_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:TaoBoundSolution, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, $PetscReal, Ptr{$PetscInt}, CVec),\n               X, XL, XU, bound_tol, nDiff_, Xout,\n              )\n\n\tnDiff = nDiff_[]\n\n\treturn nDiff\nend \n\n"
  },
  {
    "path": "src/autowrapped/VecTagger_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_VecTagger end\nconst VecTagger = Ptr{_n_VecTagger}\n\n# -------------------------------------------------------\n\"\"\"\n\ttagger::VecTagger = VecTaggerCreate(petsclib::PetscLibType,comm::MPI_Comm) \ncreate a `VecTagger` context.\n\nCollective\n\nInput Parameter:\n- `comm` - communicator on which the `VecTagger` will operate\n\nOutput Parameter:\n- `tagger` - new Vec tagger context\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerSetBlockSize()`, `VecTaggerSetFromOptions()`, `VecTaggerSetUp()`, `VecTaggerComputeIS()`, `VecTaggerComputeBoxes()`, `VecTaggerDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerCreate\"))\n\"\"\"\nfunction VecTaggerCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function VecTaggerCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\ttagger_ = Ref{VecTagger}()\n\n    @chk ccall(\n               (:VecTaggerCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{VecTagger}),\n               comm, tagger_,\n              )\n\n\ttagger = tagger_[]\n\n\treturn tagger\nend \n\n\"\"\"\n\tVecTaggerSetType(petsclib::PetscLibType,tagger::VecTagger, type::VecTaggerType) \nset the Vec tagger implementation\n\nCollective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `type`   - a known method\n\nOptions Database Key:\n- `-vec_tagger_type <type>` - Sets the method; use -help for a list\nof available methods (for instance, absolute, relative, cdf, or, and)\n\nLevel: advanced\n\n-seealso: `VecTaggerType`, `VecTaggerCreate()`, `VecTagger`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerSetType\"))\n\"\"\"\nfunction VecTaggerSetType(petsclib::PetscLibType, tagger::VecTagger, type::VecTaggerType) end\n\n@for_petsc function VecTaggerSetType(petsclib::$UnionPetscLib, tagger::VecTagger, type::VecTaggerType )\n\n    @chk ccall(\n               (:VecTaggerSetType, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, VecTaggerType),\n               tagger, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::VecTaggerType = VecTaggerGetType(petsclib::PetscLibType,tagger::VecTagger) \nGets the `VecTaggerType` name (as a string) from the `VecTagger`.\n\nNot Collective\n\nInput Parameter:\n- `tagger` - The `VecTagger` context\n\nOutput Parameter:\n- `type` - The `VecTagger` type name\n\nLevel: advanced\n\n-seealso: `VecTaggerSetType()`, `VecTaggerCreate()`, `VecTaggerSetFromOptions()`, `VecTagger`, `VecTaggerType`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerGetType\"))\n\"\"\"\nfunction VecTaggerGetType(petsclib::PetscLibType, tagger::VecTagger) end\n\n@for_petsc function VecTaggerGetType(petsclib::$UnionPetscLib, tagger::VecTagger )\n\ttype_ = Ref{VecTaggerType}()\n\n    @chk ccall(\n               (:VecTaggerGetType, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{VecTaggerType}),\n               tagger, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tVecTaggerDestroy(petsclib::PetscLibType,tagger::VecTagger) \ndestroy a `VecTagger` context\n\nCollective\n\nInput Parameter:\n- `tagger` - address of tagger\n\nLevel: advanced\n\n-seealso: `VecTaggerCreate()`, `VecTaggerSetType()`, `VecTagger`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerDestroy\"))\n\"\"\"\nfunction VecTaggerDestroy(petsclib::PetscLibType, tagger::VecTagger) end\n\n@for_petsc function VecTaggerDestroy(petsclib::$UnionPetscLib, tagger::VecTagger )\n\n    @chk ccall(\n               (:VecTaggerDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{VecTagger},),\n               tagger,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerSetUp(petsclib::PetscLibType,tagger::VecTagger) \nset up a `VecTagger` context\n\nCollective\n\nInput Parameter:\n- `tagger` - Vec tagger object\n\nLevel: advanced\n\n-seealso: `VecTaggerSetFromOptions()`, `VecTaggerSetType()`, `VecTagger`, `VecTaggerCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerSetUp\"))\n\"\"\"\nfunction VecTaggerSetUp(petsclib::PetscLibType, tagger::VecTagger) end\n\n@for_petsc function VecTaggerSetUp(petsclib::$UnionPetscLib, tagger::VecTagger )\n\n    @chk ccall(\n               (:VecTaggerSetUp, $petsc_library),\n               PetscErrorCode,\n               (VecTagger,),\n               tagger,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerSetFromOptions(petsclib::PetscLibType,tagger::VecTagger) \nset `VecTagger` options using the options database\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - vec tagger\n\nOptions Database Keys:\n- `-vec_tagger_type`       - implementation type, see `VecTaggerSetType()`\n- `-vec_tagger_block_size` - set the block size, see `VecTaggerSetBlockSize()`\n- `-vec_tagger_invert`     - invert the index set returned by `VecTaggerComputeIS()`\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerCreate()`, `VecTaggerSetUp()`\n\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerSetFromOptions\"))\n\"\"\"\nfunction VecTaggerSetFromOptions(petsclib::PetscLibType, tagger::VecTagger) end\n\n@for_petsc function VecTaggerSetFromOptions(petsclib::$UnionPetscLib, tagger::VecTagger )\n\n    @chk ccall(\n               (:VecTaggerSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (VecTagger,),\n               tagger,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerSetBlockSize(petsclib::PetscLibType,tagger::VecTagger, blocksize::PetscInt) \nset the block size of the set of indices returned by `VecTaggerComputeIS()`.\n\nLogically Collective\n\nInput Parameters:\n- `tagger`    - vec tagger\n- `blocksize` - block size of the criteria used to tagger vectors\n\nLevel: advanced\n\n-seealso: `VecTaggerComputeIS()`, `VecTaggerGetBlockSize()`, `VecSetBlockSize()`, `VecGetBlockSize()`, `VecTagger`, `VecTaggerCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerSetBlockSize\"))\n\"\"\"\nfunction VecTaggerSetBlockSize(petsclib::PetscLibType, tagger::VecTagger, blocksize::PetscInt) end\n\n@for_petsc function VecTaggerSetBlockSize(petsclib::$UnionPetscLib, tagger::VecTagger, blocksize::$PetscInt )\n\n    @chk ccall(\n               (:VecTaggerSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, $PetscInt),\n               tagger, blocksize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tblocksize::PetscInt = VecTaggerGetBlockSize(petsclib::PetscLibType,tagger::VecTagger) \nget the block size of the indices created by `VecTaggerComputeIS()`.\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - vec tagger\n\nOutput Parameter:\n- `blocksize` - block size of the vectors the tagger operates on\n\nLevel: advanced\n\n-seealso: `VecTaggerComputeIS()`, `VecTaggerSetBlockSize()`, `VecTagger`, `VecTaggerCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerGetBlockSize\"))\n\"\"\"\nfunction VecTaggerGetBlockSize(petsclib::PetscLibType, tagger::VecTagger) end\n\n@for_petsc function VecTaggerGetBlockSize(petsclib::$UnionPetscLib, tagger::VecTagger )\n\tblocksize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecTaggerGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{$PetscInt}),\n               tagger, blocksize_,\n              )\n\n\tblocksize = blocksize_[]\n\n\treturn blocksize\nend \n\n\"\"\"\n\tVecTaggerSetInvert(petsclib::PetscLibType,tagger::VecTagger, invert::PetscBool) \nIf the tagged index sets are based on boxes that can be returned by `VecTaggerComputeBoxes()`,\nthen this option inverts values used to compute the IS, i.e., from being in the union of the boxes to being in the\nintersection of their exteriors.\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - vec tagger\n- `invert` - `PETSC_TRUE` to invert, `PETSC_FALSE` to use the indices as is\n\nLevel: advanced\n\n-seealso: `VecTaggerComputeIS()`, `VecTaggerGetInvert()`, `VecTagger`, `VecTaggerCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerSetInvert\"))\n\"\"\"\nfunction VecTaggerSetInvert(petsclib::PetscLibType, tagger::VecTagger, invert::PetscBool) end\n\n@for_petsc function VecTaggerSetInvert(petsclib::$UnionPetscLib, tagger::VecTagger, invert::PetscBool )\n\n    @chk ccall(\n               (:VecTaggerSetInvert, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, PetscBool),\n               tagger, invert,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tinvert::PetscBool = VecTaggerGetInvert(petsclib::PetscLibType,tagger::VecTagger) \nget whether the set of indices returned by `VecTaggerComputeIS()` are inverted\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - vec tagger\n\nOutput Parameter:\n- `invert` - `PETSC_TRUE` to invert, `PETSC_FALSE` to use the indices as is\n\nLevel: advanced\n\n-seealso: `VecTaggerComputeIS()`, `VecTaggerSetInvert()`, `VecTagger`, `VecTaggerCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerGetInvert\"))\n\"\"\"\nfunction VecTaggerGetInvert(petsclib::PetscLibType, tagger::VecTagger) end\n\n@for_petsc function VecTaggerGetInvert(petsclib::$UnionPetscLib, tagger::VecTagger )\n\tinvert_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecTaggerGetInvert, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{PetscBool}),\n               tagger, invert_,\n              )\n\n\tinvert = invert_[]\n\n\treturn invert\nend \n\n\"\"\"\n\tVecTaggerView(petsclib::PetscLibType,tagger::VecTagger, viewer::PetscViewer) \nview a `VecTagger` context\n\nCollective\n\nInput Parameters:\n- `tagger` - vec tagger\n- `viewer` - viewer to display tagger, for example `PETSC_VIEWER_STDOUT_WORLD`\n\nLevel: advanced\n\n-seealso: `VecTaggerCreate()`, `VecTagger`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerView\"))\n\"\"\"\nfunction VecTaggerView(petsclib::PetscLibType, tagger::VecTagger, viewer::PetscViewer) end\n\n@for_petsc function VecTaggerView(petsclib::$UnionPetscLib, tagger::VecTagger, viewer::PetscViewer )\n\n    @chk ccall(\n               (:VecTaggerView, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, PetscViewer),\n               tagger, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnumBoxes::PetscInt,listed::PetscBool = VecTaggerComputeBoxes(petsclib::PetscLibType,tagger::VecTagger, vec::PetscVec, boxes::Vector{VecTaggerBox}) \nIf the tagged index set can be summarized as a list of boxes of values, returns that list, otherwise returns\nin listed `PETSC_FALSE`\n\nCollective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `vec`    - the vec to tag\n\nOutput Parameters:\n- `numBoxes` - the number of boxes in the tag definition\n- `boxes`    - a newly allocated list of boxes.  This is a flat array of (BlockSize * `numBoxe`s) pairs that the user can free with `PetscFree()`.\n- `listed`   - `PETSC_TRUE` if a list was created, pass in `NULL` if not needed\n\nLevel: advanced\n\n-seealso: `VecTaggerComputeIS()`, `VecTagger`, `VecTaggerCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerComputeBoxes\"))\n\"\"\"\nfunction VecTaggerComputeBoxes(petsclib::PetscLibType, tagger::VecTagger, vec::PetscVec, boxes::Vector{VecTaggerBox}) end\n\n@for_petsc function VecTaggerComputeBoxes(petsclib::$UnionPetscLib, tagger::VecTagger, vec::PetscVec, boxes::Vector{VecTaggerBox} )\n\tnumBoxes_ = Ref{$PetscInt}()\n\tboxes_ = Ref(pointer(boxes))\n\tlisted_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecTaggerComputeBoxes, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, CVec, Ptr{$PetscInt}, Ptr{Ptr{VecTaggerBox}}, Ptr{PetscBool}),\n               tagger, vec, numBoxes_, boxes_, listed_,\n              )\n\n\tnumBoxes = numBoxes_[]\n\tlisted = listed_[]\n\n\treturn numBoxes,listed\nend \n\n\"\"\"\n\tlisted::PetscBool = VecTaggerComputeIS(petsclib::PetscLibType,tagger::VecTagger, vec::PetscVec, is::Vector{IS}) \nUse a `VecTagger` context to tag a set of indices based on a vector's values\n\nCollective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `vec`    - the vec to tag\n\nOutput Parameters:\n- `is`     - a list of the indices tagged by the tagger, i.e., if the number of local indices will be n / bs, where n is `VecGetLocalSize()` and bs is `VecTaggerGetBlockSize()`.\n- `listed` - routine was able to compute the `IS`, pass in `NULL` if not needed\n\nLevel: advanced\n\n-seealso: `VecTaggerComputeBoxes()`, `VecTagger`, `VecTaggerCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerComputeIS\"))\n\"\"\"\nfunction VecTaggerComputeIS(petsclib::PetscLibType, tagger::VecTagger, vec::PetscVec, is::Vector{IS}) end\n\n@for_petsc function VecTaggerComputeIS(petsclib::$UnionPetscLib, tagger::VecTagger, vec::PetscVec, is::Vector{IS} )\n\tlisted_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecTaggerComputeIS, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, CVec, Ptr{CIS}, Ptr{PetscBool}),\n               tagger, vec, is, listed_,\n              )\n\n\tlisted = listed_[]\n\n\treturn listed\nend \n\n\"\"\"\n\tVecTaggerInitializePackage(petsclib::PetscLibType) \nInitialize VecTagger package\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `VecTaggerFinalizePackage()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerInitializePackage\"))\n\"\"\"\nfunction VecTaggerInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function VecTaggerInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:VecTaggerInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerFinalizePackage(petsclib::PetscLibType) \nFinalize VecTagger package, it is called from PetscFinalize()\n\nLogically Collective\n\nLevel: developer\n\n-seealso: `VecTaggerInitializePackage()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerFinalizePackage\"))\n\"\"\"\nfunction VecTaggerFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function VecTaggerFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:VecTaggerFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerRegisterAll(petsclib::PetscLibType) \nRegisters all the `VecTagger` communication implementations\n\nNot Collective\n\nLevel: advanced\n\n-seealso: `VecTaggerRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerRegisterAll\"))\n\"\"\"\nfunction VecTaggerRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function VecTaggerRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:VecTaggerRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerRegister(petsclib::PetscLibType,sname::String, fnc::external) \nAdds an implementation of the `VecTagger` communication protocol.\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - name of a new user-defined implementation\n- `function` - routine to create method context\n\nLevel: advanced\n\n-seealso: `VecTaggerType`, `VecTaggerCreate()`, `VecTagger`, `VecTaggerRegisterAll()`, `VecTaggerRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerRegister\"))\n\"\"\"\nfunction VecTaggerRegister(petsclib::PetscLibType, sname::String, fnc::external) end\n\n@for_petsc function VecTaggerRegister(petsclib::$UnionPetscLib, sname::String, fnc::external )\n\n    @chk ccall(\n               (:VecTaggerRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnsubs::PetscInt = VecTaggerOrGetSubs(petsclib::PetscLibType,tagger::VecTagger, subs::Vector{VecTagger}) \nGet the sub `VecTagger`s whose union defines the outer `VecTagger`\n\nNot Collective\n\nInput Parameter:\n- `tagger` - the `VecTagger` context\n\nOutput Parameters:\n- `nsubs` - the number of sub `VecTagger`s\n- `subs`  - the sub `VecTagger`s\n\nLevel: advanced\n\n-seealso: `VecTaggerOrSetSubs()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerOrGetSubs\"))\n\"\"\"\nfunction VecTaggerOrGetSubs(petsclib::PetscLibType, tagger::VecTagger, subs::Vector{VecTagger}) end\n\n@for_petsc function VecTaggerOrGetSubs(petsclib::$UnionPetscLib, tagger::VecTagger, subs::Vector{VecTagger} )\n\tnsubs_ = Ref{$PetscInt}()\n\tsubs_ = Ref(pointer(subs))\n\n    @chk ccall(\n               (:VecTaggerOrGetSubs, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{$PetscInt}, Ptr{Ptr{VecTagger}}),\n               tagger, nsubs_, subs_,\n              )\n\n\tnsubs = nsubs_[]\n\n\treturn nsubs\nend \n\n\"\"\"\n\tVecTaggerOrSetSubs(petsclib::PetscLibType,tagger::VecTagger, nsubs::PetscInt, subs::Vector{VecTagger}, mode::PetscCopyMode) \nSet the sub `VecTagger`s whose union defines the outer `VecTagger`\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `nsubs`  - the number of sub `VecTagger`s\n- `subs`   - the sub `VecTagger`s\n- `mode`   - the copy mode to use for `subs`\n\nLevel: advanced\n\n-seealso: `VecTaggetOrGetStubs()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerOrSetSubs\"))\n\"\"\"\nfunction VecTaggerOrSetSubs(petsclib::PetscLibType, tagger::VecTagger, nsubs::PetscInt, subs::Vector{VecTagger}, mode::PetscCopyMode) end\n\n@for_petsc function VecTaggerOrSetSubs(petsclib::$UnionPetscLib, tagger::VecTagger, nsubs::$PetscInt, subs::Vector{VecTagger}, mode::PetscCopyMode )\n\n    @chk ccall(\n               (:VecTaggerOrSetSubs, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, $PetscInt, Ptr{VecTagger}, PetscCopyMode),\n               tagger, nsubs, subs, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerCDFSetMethod(petsclib::PetscLibType,tagger::VecTagger, method::VecTaggerCDFMethod) \nSet the method used to compute absolute boxes from CDF boxes\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `method` - the method\n\nLevel: advanced\n\n-seealso: `Vec`, `VecTagger`, `VecTaggerCDFMethod`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerCDFSetMethod\"))\n\"\"\"\nfunction VecTaggerCDFSetMethod(petsclib::PetscLibType, tagger::VecTagger, method::VecTaggerCDFMethod) end\n\n@for_petsc function VecTaggerCDFSetMethod(petsclib::$UnionPetscLib, tagger::VecTagger, method::VecTaggerCDFMethod )\n\n    @chk ccall(\n               (:VecTaggerCDFSetMethod, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, VecTaggerCDFMethod),\n               tagger, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerCDFGetMethod(petsclib::PetscLibType,tagger::VecTagger, method::VecTaggerCDFMethod) \nGet the method used to compute absolute boxes from CDF boxes\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - the `VecTagger` context\n\nOutput Parameter:\n- `method` - the method\n\nLevel: advanced\n\n-seealso: `Vec`, `VecTagger`, `VecTaggerCDFMethod`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerCDFGetMethod\"))\n\"\"\"\nfunction VecTaggerCDFGetMethod(petsclib::PetscLibType, tagger::VecTagger, method::VecTaggerCDFMethod) end\n\n@for_petsc function VecTaggerCDFGetMethod(petsclib::$UnionPetscLib, tagger::VecTagger, method::VecTaggerCDFMethod )\n\n    @chk ccall(\n               (:VecTaggerCDFGetMethod, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{VecTaggerCDFMethod}),\n               tagger, method,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerCDFIterativeSetTolerances(petsclib::PetscLibType,tagger::VecTagger, maxit::PetscInt, rtol::PetscReal, atol::PetscReal) \nSet the tolerances for iterative computation of absolute boxes from CDF boxes.\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `maxit`  - the maximum number of iterations: 0 indicates the absolute values will be estimated from an initial guess based only on the minimum, maximum, mean,\nand standard deviation of the box endpoints.\n- `rtol`   - the acceptable relative tolerance in the absolute values from the initial guess\n- `atol`   - the acceptable absolute tolerance in the absolute values from the initial guess\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerCDFSetMethod()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerCDFIterativeSetTolerances\"))\n\"\"\"\nfunction VecTaggerCDFIterativeSetTolerances(petsclib::PetscLibType, tagger::VecTagger, maxit::PetscInt, rtol::PetscReal, atol::PetscReal) end\n\n@for_petsc function VecTaggerCDFIterativeSetTolerances(petsclib::$UnionPetscLib, tagger::VecTagger, maxit::$PetscInt, rtol::$PetscReal, atol::$PetscReal )\n\n    @chk ccall(\n               (:VecTaggerCDFIterativeSetTolerances, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, $PetscInt, $PetscReal, $PetscReal),\n               tagger, maxit, rtol, atol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tmaxit::PetscInt,rtol::PetscReal,atol::PetscReal = VecTaggerCDFIterativeGetTolerances(petsclib::PetscLibType,tagger::VecTagger) \nGet the tolerances for iterative computation of absolute boxes from CDF boxes.\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - the `VecTagger` context\n\nOutput Parameters:\n- `maxit` - the maximum number of iterations: 0 indicates the absolute values will be estimated from an initial guess based only on the minimum, maximum,\nmean, and standard deviation of the box endpoints.\n- `rtol`  - the acceptable relative tolerance in the absolute values from the initial guess\n- `atol`  - the acceptable absolute tolerance in the absolute values from the initial guess\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerCDFSetMethod()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerCDFIterativeGetTolerances\"))\n\"\"\"\nfunction VecTaggerCDFIterativeGetTolerances(petsclib::PetscLibType, tagger::VecTagger) end\n\n@for_petsc function VecTaggerCDFIterativeGetTolerances(petsclib::$UnionPetscLib, tagger::VecTagger )\n\tmaxit_ = Ref{$PetscInt}()\n\trtol_ = Ref{$PetscReal}()\n\tatol_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecTaggerCDFIterativeGetTolerances, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               tagger, maxit_, rtol_, atol_,\n              )\n\n\tmaxit = maxit_[]\n\trtol = rtol_[]\n\tatol = atol_[]\n\n\treturn maxit,rtol,atol\nend \n\n\"\"\"\n\tVecTaggerCDFSetBox(petsclib::PetscLibType,tagger::VecTagger, box::Vector{VecTaggerBox}) \nSet the cumulative box defining the values to be tagged by the tagger, where cumulative boxes are subsets of [0,1], where 0 indicates the smallest value present in the vector and 1 indicates the largest.\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `box`    - a blocksize array of `VecTaggerBox` boxes\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerCDFGetBox()`, `VecTaggerBox`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerCDFSetBox\"))\n\"\"\"\nfunction VecTaggerCDFSetBox(petsclib::PetscLibType, tagger::VecTagger, box::Vector{VecTaggerBox}) end\n\n@for_petsc function VecTaggerCDFSetBox(petsclib::$UnionPetscLib, tagger::VecTagger, box::Vector{VecTaggerBox} )\n\n    @chk ccall(\n               (:VecTaggerCDFSetBox, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{VecTaggerBox}),\n               tagger, box,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerCDFGetBox(petsclib::PetscLibType,tagger::VecTagger, box::Vector{VecTaggerBox}) \nGet the cumulative box (multi\nare subsets of [0,1], where 0 indicates the smallest value present in the vector and 1 indicates the largest.\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - the `VecTagger` context\n\nOutput Parameter:\n- `box` - a blocksize array of `VecTaggerBox` boxes\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerCDFSetBox()`, `VecTaggerBox`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerCDFGetBox\"))\n\"\"\"\nfunction VecTaggerCDFGetBox(petsclib::PetscLibType, tagger::VecTagger, box::Vector{VecTaggerBox}) end\n\n@for_petsc function VecTaggerCDFGetBox(petsclib::$UnionPetscLib, tagger::VecTagger, box::Vector{VecTaggerBox} )\n\tbox_ = Ref(pointer(box))\n\n    @chk ccall(\n               (:VecTaggerCDFGetBox, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{Ptr{VecTaggerBox}}),\n               tagger, box_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerRelativeSetBox(petsclib::PetscLibType,tagger::VecTagger, box::Vector{VecTaggerBox}) \nSet the relative box defining the values to be tagged by the tagger, where relative boxes are subsets of [0,1] (or [0,1]+[0,1]i for complex scalars), where 0 indicates the smallest value present in the vector and 1 indicates the largest.\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - the VecTagger context\n- `box`    - a blocksize list of VecTaggerBox boxes\n\nLevel: advanced\n\n-seealso: `VecTaggerRelativeGetBox()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerRelativeSetBox\"))\n\"\"\"\nfunction VecTaggerRelativeSetBox(petsclib::PetscLibType, tagger::VecTagger, box::Vector{VecTaggerBox}) end\n\n@for_petsc function VecTaggerRelativeSetBox(petsclib::$UnionPetscLib, tagger::VecTagger, box::Vector{VecTaggerBox} )\n\n    @chk ccall(\n               (:VecTaggerRelativeSetBox, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{VecTaggerBox}),\n               tagger, box,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerRelativeGetBox(petsclib::PetscLibType,tagger::VecTagger, box::Vector{VecTaggerBox}) \nGet the relative box defining the values to be tagged by the tagger, where relative boxess are subsets of [0,1] (or [0,1]+[0,1]i for complex scalars), where 0 indicates the smallest value present in the vector and 1 indicates the largest.\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - the VecTagger context\n\nOutput Parameter:\n- `box` - a blocksize list of VecTaggerBox boxes\n\nLevel: advanced\n\n-seealso: `VecTaggerRelativeSetBox()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerRelativeGetBox\"))\n\"\"\"\nfunction VecTaggerRelativeGetBox(petsclib::PetscLibType, tagger::VecTagger, box::Vector{VecTaggerBox}) end\n\n@for_petsc function VecTaggerRelativeGetBox(petsclib::$UnionPetscLib, tagger::VecTagger, box::Vector{VecTaggerBox} )\n\tbox_ = Ref(pointer(box))\n\n    @chk ccall(\n               (:VecTaggerRelativeGetBox, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{Ptr{VecTaggerBox}}),\n               tagger, box_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnsubs::PetscInt = VecTaggerAndGetSubs(petsclib::PetscLibType,tagger::VecTagger, subs::Vector{VecTagger}) \nGet the sub `VecTagger`s whose intersection defines the outer `VecTagger`\n\nNot Collective\n\nInput Parameter:\n- `tagger` - the `VecTagger` context\n\nOutput Parameters:\n- `nsubs` - the number of sub `VecTagger`s\n- `subs`  - the sub `VecTagger`s\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerAndSetSubs()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerAndGetSubs\"))\n\"\"\"\nfunction VecTaggerAndGetSubs(petsclib::PetscLibType, tagger::VecTagger, subs::Vector{VecTagger}) end\n\n@for_petsc function VecTaggerAndGetSubs(petsclib::$UnionPetscLib, tagger::VecTagger, subs::Vector{VecTagger} )\n\tnsubs_ = Ref{$PetscInt}()\n\tsubs_ = Ref(pointer(subs))\n\n    @chk ccall(\n               (:VecTaggerAndGetSubs, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{$PetscInt}, Ptr{Ptr{VecTagger}}),\n               tagger, nsubs_, subs_,\n              )\n\n\tnsubs = nsubs_[]\n\n\treturn nsubs\nend \n\n\"\"\"\n\tVecTaggerAndSetSubs(petsclib::PetscLibType,tagger::VecTagger, nsubs::PetscInt, subs::Vector{VecTagger}, mode::PetscCopyMode) \nSet the sub `VecTagger`s whose intersection defines the outer `VecTagger`\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `nsubs`  - the number of sub `VecTagger`s\n- `subs`   - the sub `VecTagger`s\n- `mode`   - the copy mode to use for `subs`\n\nLevel: advanced\n\n-seealso: `VecTagger`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerAndSetSubs\"))\n\"\"\"\nfunction VecTaggerAndSetSubs(petsclib::PetscLibType, tagger::VecTagger, nsubs::PetscInt, subs::Vector{VecTagger}, mode::PetscCopyMode) end\n\n@for_petsc function VecTaggerAndSetSubs(petsclib::$UnionPetscLib, tagger::VecTagger, nsubs::$PetscInt, subs::Vector{VecTagger}, mode::PetscCopyMode )\n\n    @chk ccall(\n               (:VecTaggerAndSetSubs, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, $PetscInt, Ptr{VecTagger}, PetscCopyMode),\n               tagger, nsubs, subs, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerAbsoluteSetBox(petsclib::PetscLibType,tagger::VecTagger, box::Vector{VecTaggerBox}) \nSet the box defining the values to be tagged by the tagger.\n\nLogically Collective\n\nInput Parameters:\n- `tagger` - the `VecTagger` context\n- `box`    - the box: a blocksize array of `VecTaggerBox` boxes\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerBox`, `VecTaggerAbsoluteGetBox()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerAbsoluteSetBox\"))\n\"\"\"\nfunction VecTaggerAbsoluteSetBox(petsclib::PetscLibType, tagger::VecTagger, box::Vector{VecTaggerBox}) end\n\n@for_petsc function VecTaggerAbsoluteSetBox(petsclib::$UnionPetscLib, tagger::VecTagger, box::Vector{VecTaggerBox} )\n\n    @chk ccall(\n               (:VecTaggerAbsoluteSetBox, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{VecTaggerBox}),\n               tagger, box,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTaggerAbsoluteGetBox(petsclib::PetscLibType,tagger::VecTagger, box::Vector{VecTaggerBox}) \nGet the box defining the values to be tagged by the tagger.\n\nLogically Collective\n\nInput Parameter:\n- `tagger` - the `VecTagger` context\n\nOutput Parameter:\n- `box` - the box: a blocksize array of `VecTaggerBox` boxes\n\nLevel: advanced\n\n-seealso: `VecTagger`, `VecTaggerBox`, `VecTaggerAbsoluteSetBox()`\n\n# External Links\n$(_doc_external(\"Vec/VecTaggerAbsoluteGetBox\"))\n\"\"\"\nfunction VecTaggerAbsoluteGetBox(petsclib::PetscLibType, tagger::VecTagger, box::Vector{VecTaggerBox}) end\n\n@for_petsc function VecTaggerAbsoluteGetBox(petsclib::$UnionPetscLib, tagger::VecTagger, box::Vector{VecTaggerBox} )\n\tbox_ = Ref(pointer(box))\n\n    @chk ccall(\n               (:VecTaggerAbsoluteGetBox, $petsc_library),\n               PetscErrorCode,\n               (VecTagger, Ptr{Ptr{VecTaggerBox}}),\n               tagger, box_,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/Vec_wrappers.jl",
    "content": "# autodefined type arguments for class Vec ------\nmutable struct _n_ViennaCLVector end\nconst ViennaCLVector = Ptr{_n_ViennaCLVector}\n\nmutable struct _p_PetscSection end\nconst PetscSection = Ptr{_p_PetscSection}\n\nmutable struct _p_ISLocalToGlobalMapping end\nconst ISLocalToGlobalMapping = Ptr{_p_ISLocalToGlobalMapping}\n\n# -------------------------------------------------------\n\"\"\"\n\tmax::PetscReal = VecMaxPointwiseDivide(petsclib::PetscLibType,x::PetscVec, y::PetscVec) \nComputes the maximum of the componentwise division `max = max_i abs(x[i]/y[i])`.\n\nLogically Collective\n\nInput Parameters:\n- `x` - the numerators\n- `y` - the denominators\n\nOutput Parameter:\n- `max` - the result\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecPointwiseDivide()`, `VecPointwiseMult()`, `VecPointwiseMax()`, `VecPointwiseMin()`, `VecPointwiseMaxAbs()`\n\n# External Links\n$(_doc_external(\"Vec/VecMaxPointwiseDivide\"))\n\"\"\"\nfunction VecMaxPointwiseDivide(petsclib::PetscLibType, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecMaxPointwiseDivide(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec )\n\tmax_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecMaxPointwiseDivide, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscReal}),\n               x, y, max_,\n              )\n\n\tmax = max_[]\n\n\treturn max\nend \n\n\"\"\"\n\tval::PetscScalar = VecDot(petsclib::PetscLibType,x::PetscVec, y::PetscVec) \nComputes the vector dot product.\n\nCollective\n\nInput Parameters:\n- `x` - first vector\n- `y` - second vector\n\nOutput Parameter:\n- `val` - the dot product\n\nLevel: intermediate\n\nNotes for Users of Complex Numbers:\nFor complex vectors, `VecDot()` computes\n-seealso: [](ch_vectors), `Vec`, `VecMDot()`, `VecTDot()`, `VecNorm()`, `VecDotBegin()`, `VecDotEnd()`, `VecDotRealPart()`\n\n# External Links\n$(_doc_external(\"Vec/VecDot\"))\n\"\"\"\nfunction VecDot(petsclib::PetscLibType, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecDot(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec )\n\tval_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:VecDot, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscScalar}),\n               x, y, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tval::PetscReal = VecDotRealPart(petsclib::PetscLibType,x::PetscVec, y::PetscVec) \nComputes the real part of the vector dot product.\n\nCollective\n\nInput Parameters:\n- `x` - first vector\n- `y` - second vector\n\nOutput Parameter:\n- `val` - the real part of the dot product;\n\nLevel: intermediate\n\nNotes for Users of Complex Numbers:\nSee `VecDot()` for more details on the definition of the dot product for complex numbers\n\nFor real numbers this returns the same value as `VecDot()`\n\nFor complex numbers in C^n (that is a vector of n components with a complex number for each component) this is equal to the usual real dot product on the\nthe space R^{2n} (that is a vector of 2n components with the real or imaginary part of the complex numbers for components)\n\n-seealso: [](ch_vectors), `Vec`, `VecMDot()`, `VecTDot()`, `VecNorm()`, `VecDotBegin()`, `VecDotEnd()`, `VecDot()`, `VecDotNorm2()`\n\n# External Links\n$(_doc_external(\"Vec/VecDotRealPart\"))\n\"\"\"\nfunction VecDotRealPart(petsclib::PetscLibType, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecDotRealPart(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecDotRealPart, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscReal}),\n               x, y, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tval::PetscReal = VecNorm(petsclib::PetscLibType,x::PetscVec, type::NormType) \nComputes the vector norm.\n\nCollective\n\nInput Parameters:\n- `x`    - the vector\n- `type` - the type of the norm requested\n\nOutput Parameter:\n- `val` - the norm\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `NormType`, `VecDot()`, `VecTDot()`, `VecDotBegin()`, `VecDotEnd()`, `VecNormAvailable()`,\n`VecNormBegin()`, `VecNormEnd()`, `NormType()`\n\n# External Links\n$(_doc_external(\"Vec/VecNorm\"))\n\"\"\"\nfunction VecNorm(petsclib::PetscLibType, x::PetscVec, type::NormType) end\n\n@for_petsc function VecNorm(petsclib::$UnionPetscLib, x::PetscVec, type::NormType )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecNorm, $petsc_library),\n               PetscErrorCode,\n               (CVec, NormType, Ptr{$PetscReal}),\n               x, type, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tavailable::PetscBool,val::PetscReal = VecNormAvailable(petsclib::PetscLibType,x::PetscVec, type::NormType) \nReturns the vector norm if it is already known. That is, it has been previously computed and cached in the vector\n\nNot Collective\n\nInput Parameters:\n- `x`    - the vector\n- `type` - one of `NORM_1` (sum_i |x[i]|), `NORM_2` sqrt(sum_i (x[i])^2), `NORM_INFINITY` max_i |x[i]|.  Also available\n`NORM_1_AND_2`, which computes both norms and stores them\nin a two element array.\n\nOutput Parameters:\n- `available` - `PETSC_TRUE` if the val returned is valid\n- `val`       - the norm\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecDot()`, `VecTDot()`, `VecNorm()`, `VecDotBegin()`, `VecDotEnd()`,\n`VecNormBegin()`, `VecNormEnd()`\n\n# External Links\n$(_doc_external(\"Vec/VecNormAvailable\"))\n\"\"\"\nfunction VecNormAvailable(petsclib::PetscLibType, x::PetscVec, type::NormType) end\n\n@for_petsc function VecNormAvailable(petsclib::$UnionPetscLib, x::PetscVec, type::NormType )\n\tavailable_ = Ref{PetscBool}()\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecNormAvailable, $petsc_library),\n               PetscErrorCode,\n               (CVec, NormType, Ptr{PetscBool}, Ptr{$PetscReal}),\n               x, type, available_, val_,\n              )\n\n\tavailable = available_[]\n\tval = val_[]\n\n\treturn available,val\nend \n\n\"\"\"\n\tval::PetscReal = VecNormalize(petsclib::PetscLibType,x::PetscVec) \nNormalizes a vector by its 2\n\nCollective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `val` - the vector norm before normalization. May be `NULL` if the value is not needed.\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecNorm()`, `NORM_2`, `NormType`\n\n# External Links\n$(_doc_external(\"Vec/VecNormalize\"))\n\"\"\"\nfunction VecNormalize(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecNormalize(petsclib::$UnionPetscLib, x::PetscVec )\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecNormalize, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscReal}),\n               x, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tp::PetscInt,val::PetscReal = VecMax(petsclib::PetscLibType,x::PetscVec) \nDetermines the vector component with maximum real part and its location.\n\nCollective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameters:\n- `p`   - the index of `val` (pass `NULL` if you don't want this) in the vector\n- `val` - the maximum component\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecNorm()`, `VecMin()`\n\n# External Links\n$(_doc_external(\"Vec/VecMax\"))\n\"\"\"\nfunction VecMax(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecMax(petsclib::$UnionPetscLib, x::PetscVec )\n\tp_ = Ref{$PetscInt}()\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecMax, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               x, p_, val_,\n              )\n\n\tp = p_[]\n\tval = val_[]\n\n\treturn p,val\nend \n\n\"\"\"\n\tp::PetscInt,val::PetscReal = VecMin(petsclib::PetscLibType,x::PetscVec) \nDetermines the vector component with minimum real part and its location.\n\nCollective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameters:\n- `p`   - the index of `val` (pass `NULL` if you don't want this location) in the vector\n- `val` - the minimum component\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecMin\"))\n\"\"\"\nfunction VecMin(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecMin(petsclib::$UnionPetscLib, x::PetscVec )\n\tp_ = Ref{$PetscInt}()\n\tval_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecMin, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               x, p_, val_,\n              )\n\n\tp = p_[]\n\tval = val_[]\n\n\treturn p,val\nend \n\n\"\"\"\n\tval::PetscScalar = VecTDot(petsclib::PetscLibType,x::PetscVec, y::PetscVec) \nComputes an indefinite vector dot product. That is, this\nroutine does NOT use the complex conjugate.\n\nCollective\n\nInput Parameters:\n- `x` - first vector\n- `y` - second vector\n\nOutput Parameter:\n- `val` - the dot product\n\nLevel: intermediate\n\nNotes for Users of Complex Numbers:\nFor complex vectors, `VecTDot()` computes the indefinite form\n-seealso: [](ch_vectors), `Vec`, `VecDot()`, `VecMTDot()`\n\n# External Links\n$(_doc_external(\"Vec/VecTDot\"))\n\"\"\"\nfunction VecTDot(petsclib::PetscLibType, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecTDot(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec )\n\tval_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:VecTDot, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscScalar}),\n               x, y, val_,\n              )\n\n\tval = val_[]\n\n\treturn val\nend \n\n\"\"\"\n\tVecAXPY(petsclib::PetscLibType,y::PetscVec, alpha::PetscScalar, x::PetscVec) \nComputes `y = alpha x + y`.\n\nLogically Collective\n\nInput Parameters:\n- `alpha` - the scalar\n- `x`     - vector scale by `alpha`\n- `y`     - vector accumulated into\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAYPX()`, `VecMAXPY()`, `VecWAXPY()`, `VecAXPBYPCZ()`, `VecAXPBY()`\n\n# External Links\n$(_doc_external(\"Vec/VecAXPY\"))\n\"\"\"\nfunction VecAXPY(petsclib::PetscLibType, y::PetscVec, alpha::PetscScalar, x::PetscVec) end\n\n@for_petsc function VecAXPY(petsclib::$UnionPetscLib, y::PetscVec, alpha::$PetscScalar, x::PetscVec )\n\n    @chk ccall(\n               (:VecAXPY, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar, CVec),\n               y, alpha, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecAYPX(petsclib::PetscLibType,y::PetscVec, beta::PetscScalar, x::PetscVec) \nComputes `y = x + beta y`.\n\nLogically Collective\n\nInput Parameters:\n- `beta` - the scalar\n- `x`    - the unscaled vector\n- `y`    - the vector to be scaled\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecMAXPY()`, `VecWAXPY()`, `VecAXPY()`, `VecAXPBYPCZ()`, `VecAXPBY()`\n\n# External Links\n$(_doc_external(\"Vec/VecAYPX\"))\n\"\"\"\nfunction VecAYPX(petsclib::PetscLibType, y::PetscVec, beta::PetscScalar, x::PetscVec) end\n\n@for_petsc function VecAYPX(petsclib::$UnionPetscLib, y::PetscVec, beta::$PetscScalar, x::PetscVec )\n\n    @chk ccall(\n               (:VecAYPX, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar, CVec),\n               y, beta, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecAXPBY(petsclib::PetscLibType,y::PetscVec, alpha::PetscScalar, beta::PetscScalar, x::PetscVec) \nComputes `y = alpha x + beta y`.\n\nLogically Collective\n\nInput Parameters:\n- `alpha` - first scalar\n- `beta`  - second scalar\n- `x`     - the first scaled vector\n- `y`     - the second scaled vector\n\nOutput Parameter:\n- `y` - output vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAYPX()`, `VecMAXPY()`, `VecWAXPY()`, `VecAXPY()`, `VecAXPBYPCZ()`\n\n# External Links\n$(_doc_external(\"Vec/VecAXPBY\"))\n\"\"\"\nfunction VecAXPBY(petsclib::PetscLibType, y::PetscVec, alpha::PetscScalar, beta::PetscScalar, x::PetscVec) end\n\n@for_petsc function VecAXPBY(petsclib::$UnionPetscLib, y::PetscVec, alpha::$PetscScalar, beta::$PetscScalar, x::PetscVec )\n\n    @chk ccall(\n               (:VecAXPBY, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar, $PetscScalar, CVec),\n               y, alpha, beta, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecAXPBYPCZ(petsclib::PetscLibType,z::PetscVec, alpha::PetscScalar, beta::PetscScalar, gamma::PetscScalar, x::PetscVec, y::PetscVec) \nComputes `z = alpha x + beta y + gamma z`\n\nLogically Collective\n\nInput Parameters:\n- `alpha` - first scalar\n- `beta`  - second scalar\n- `gamma` - third scalar\n- `x`     - first vector\n- `y`     - second vector\n- `z`     - third vector\n\nOutput Parameter:\n- `z` - output vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAYPX()`, `VecMAXPY()`, `VecWAXPY()`, `VecAXPY()`, `VecAXPBY()`\n\n# External Links\n$(_doc_external(\"Vec/VecAXPBYPCZ\"))\n\"\"\"\nfunction VecAXPBYPCZ(petsclib::PetscLibType, z::PetscVec, alpha::PetscScalar, beta::PetscScalar, gamma::PetscScalar, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecAXPBYPCZ(petsclib::$UnionPetscLib, z::PetscVec, alpha::$PetscScalar, beta::$PetscScalar, gamma::$PetscScalar, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecAXPBYPCZ, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar, $PetscScalar, $PetscScalar, CVec, CVec),\n               z, alpha, beta, gamma, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecWAXPY(petsclib::PetscLibType,w::PetscVec, alpha::PetscScalar, x::PetscVec, y::PetscVec) \nComputes `w = alpha x + y`.\n\nLogically Collective\n\nInput Parameters:\n- `alpha` - the scalar\n- `x`     - first vector, multiplied by `alpha`\n- `y`     - second vector\n\nOutput Parameter:\n- `w` - the result\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAXPY()`, `VecAYPX()`, `VecAXPBY()`, `VecMAXPY()`, `VecAXPBYPCZ()`\n\n# External Links\n$(_doc_external(\"Vec/VecWAXPY\"))\n\"\"\"\nfunction VecWAXPY(petsclib::PetscLibType, w::PetscVec, alpha::PetscScalar, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecWAXPY(petsclib::$UnionPetscLib, w::PetscVec, alpha::$PetscScalar, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecWAXPY, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar, CVec, CVec),\n               w, alpha, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ty::Vector{PetscScalar} = VecGetValues(petsclib::PetscLibType,x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}) \nGets values from certain locations of a vector. Currently\ncan only get values on the same processor on which they are owned\n\nNot Collective\n\nInput Parameters:\n- `x`  - vector to get values from\n- `ni` - number of elements to get\n- `ix` - indices where to get them from (in global 1d numbering)\n\nOutput Parameter:\n- `y` - array of values, must be passed in with a length of `ni`\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecSetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetValues\"))\n\"\"\"\nfunction VecGetValues(petsclib::PetscLibType, x::AbstractPetscVec, ni::PetscInt, ix::Vector{PetscInt}) end\n\n@for_petsc function VecGetValues(petsclib::$UnionPetscLib, x::AbstractPetscVec, ni::$PetscInt, ix::Vector{$PetscInt} )\n\ty = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecGetValues, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}),\n               x, ni, ix, y,\n              )\n\n\n\treturn y\nend \n\n\"\"\"\n\tval::Vector{PetscScalar} = VecMTDot(petsclib::PetscLibType,x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) \nComputes indefinite vector multiple dot products.\nThat is, it does NOT use the complex conjugate.\n\nCollective\n\nInput Parameters:\n- `x`  - one vector\n- `nv` - number of vectors\n- `y`  - array of vectors.  Note that vectors are pointers\n\nOutput Parameter:\n- `val` - array of the dot products\n\nLevel: intermediate\n\nNotes for Users of Complex Numbers:\nFor complex vectors, `VecMTDot()` computes the indefinite form\n-seealso: [](ch_vectors), `Vec`, `VecMDot()`, `VecTDot()`\n\n# External Links\n$(_doc_external(\"Vec/VecMTDot\"))\n\"\"\"\nfunction VecMTDot(petsclib::PetscLibType, x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) end\n\n@for_petsc function VecMTDot(petsclib::$UnionPetscLib, x::PetscVec, nv::$PetscInt, y::Vector{PetscVec} )\n\tval = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecMTDot, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{CVec}, Ptr{$PetscScalar}),\n               x, nv, y, val,\n              )\n\n\n\treturn val\nend \n\n\"\"\"\n\tval::Vector{PetscScalar} = VecMDot(petsclib::PetscLibType,x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) \nComputes multiple vector dot products.\n\nCollective\n\nInput Parameters:\n- `x`  - one vector\n- `nv` - number of vectors\n- `y`  - array of vectors.\n\nOutput Parameter:\n- `val` - array of the dot products (does not allocate the array)\n\nLevel: intermediate\n\nNotes for Users of Complex Numbers:\nFor complex vectors, `VecMDot()` computes\n-seealso: [](ch_vectors), `Vec`, `VecMTDot()`, `VecDot()`, `VecDuplicateVecs()`\n\n# External Links\n$(_doc_external(\"Vec/VecMDot\"))\n\"\"\"\nfunction VecMDot(petsclib::PetscLibType, x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) end\n\n@for_petsc function VecMDot(petsclib::$UnionPetscLib, x::PetscVec, nv::$PetscInt, y::Vector{PetscVec} )\n\tval = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecMDot, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{CVec}, Ptr{$PetscScalar}),\n               x, nv, y, val,\n              )\n\n\n\treturn val\nend \n\n\"\"\"\n\tVecMAXPY(petsclib::PetscLibType,y::PetscVec, nv::PetscInt, alpha::Vector{PetscScalar}, x::Vector{PetscVec}) \nComputes `y = y + sum alpha[i] x[i]`\n\nLogically Collective\n\nInput Parameters:\n- `nv`    - number of scalars and `x` vectors\n- `alpha` - array of scalars\n- `y`     - one vector\n- `x`     - array of vectors\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecMAXPBY()`,`VecAYPX()`, `VecWAXPY()`, `VecAXPY()`, `VecAXPBYPCZ()`, `VecAXPBY()`, `VecDuplicateVecs()`\n\n# External Links\n$(_doc_external(\"Vec/VecMAXPY\"))\n\"\"\"\nfunction VecMAXPY(petsclib::PetscLibType, y::PetscVec, nv::PetscInt, alpha::Vector{PetscScalar}, x::Vector{PetscVec}) end\n\n@for_petsc function VecMAXPY(petsclib::$UnionPetscLib, y::PetscVec, nv::$PetscInt, alpha::Vector{$PetscScalar}, x::Vector{PetscVec} )\n\n    @chk ccall(\n               (:VecMAXPY, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscScalar}, Ptr{CVec}),\n               y, nv, alpha, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecMAXPBY(petsclib::PetscLibType,y::PetscVec, nv::PetscInt, alpha::Vector{PetscScalar}, beta::PetscScalar, x::Vector{PetscVec}) \nComputes `y = beta y + sum alpha[i] x[i]`\n\nLogically Collective\n\nInput Parameters:\n- `nv`    - number of scalars and `x` vectors\n- `alpha` - array of scalars\n- `beta`  - scalar\n- `y`     - one vector\n- `x`     - array of vectors\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecMAXPY()`, `VecAYPX()`, `VecWAXPY()`, `VecAXPY()`, `VecAXPBYPCZ()`, `VecAXPBY()`\n\n# External Links\n$(_doc_external(\"Vec/VecMAXPBY\"))\n\"\"\"\nfunction VecMAXPBY(petsclib::PetscLibType, y::PetscVec, nv::PetscInt, alpha::Vector{PetscScalar}, beta::PetscScalar, x::Vector{PetscVec}) end\n\n@for_petsc function VecMAXPBY(petsclib::$UnionPetscLib, y::PetscVec, nv::$PetscInt, alpha::Vector{$PetscScalar}, beta::$PetscScalar, x::Vector{PetscVec} )\n\n    @chk ccall(\n               (:VecMAXPBY, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscScalar}, $PetscScalar, Ptr{CVec}),\n               y, nv, alpha, beta, x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecConcatenate(petsclib::PetscLibType,nx::PetscInt, X::Vector{PetscVec}, Y::PetscVec, x_is::Vector{IS}) \nCreates a new vector that is a vertical concatenation of all the given array of vectors\nin the order they appear in the array. The concatenated vector resides on the same\ncommunicator and is the same type as the source vectors.\n\nCollective\n\nInput Parameters:\n- `nx` - number of vectors to be concatenated\n- `X`  - array containing the vectors to be concatenated in the order of concatenation\n\nOutput Parameters:\n- `Y`    - concatenated vector\n- `x_is` - array of index sets corresponding to the concatenated components of `Y` (pass `NULL` if not needed)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VECNEST`, `VECSCATTER`, `VecScatterCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecConcatenate\"))\n\"\"\"\nfunction VecConcatenate(petsclib::PetscLibType, nx::PetscInt, X::Vector{PetscVec}, Y::PetscVec, x_is::Vector{IS}) end\n\n@for_petsc function VecConcatenate(petsclib::$UnionPetscLib, nx::$PetscInt, X::Vector{PetscVec}, Y::PetscVec, x_is::Vector{IS} )\n\tY_ = Ref(Y.ptr)\n\tx_is_ = Ref(pointer(x_is))\n\n    @chk ccall(\n               (:VecConcatenate, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{CVec}, Ptr{CVec}, Ptr{Ptr{IS}}),\n               nx, X, Y_, x_is_,\n              )\n\n\tY.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGetSubVector(petsclib::PetscLibType,X::PetscVec, is::IS, Y::PetscVec) \nGets a vector representing part of another vector\n\nCollective\n\nInput Parameters:\n- `X`  - vector from which to extract a subvector\n- `is` - index set representing portion of `X` to extract\n\nOutput Parameter:\n- `Y` - subvector corresponding to `is`\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `IS`, `VECNEST`, `MatCreateSubMatrix()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetSubVector\"))\n\"\"\"\nfunction VecGetSubVector(petsclib::PetscLibType, X::PetscVec, is::IS, Y::PetscVec) end\n\n@for_petsc function VecGetSubVector(petsclib::$UnionPetscLib, X::PetscVec, is::IS, Y::PetscVec )\n\tY_ = Ref(Y.ptr)\n\n    @chk ccall(\n               (:VecGetSubVector, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, Ptr{CVec}),\n               X, is, Y_,\n              )\n\n\tY.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecRestoreSubVector(petsclib::PetscLibType,X::PetscVec, is::IS, Y::PetscVec) \nRestores a subvector extracted using `VecGetSubVector()`\n\nCollective\n\nInput Parameters:\n- `X`  - vector from which subvector was obtained\n- `is` - index set representing the subset of `X`\n- `Y`  - subvector being restored\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `IS`, `VecGetSubVector()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreSubVector\"))\n\"\"\"\nfunction VecRestoreSubVector(petsclib::PetscLibType, X::PetscVec, is::IS, Y::PetscVec) end\n\n@for_petsc function VecRestoreSubVector(petsclib::$UnionPetscLib, X::PetscVec, is::IS, Y::PetscVec )\n\tY_ = Ref(Y.ptr)\n\n    @chk ccall(\n               (:VecRestoreSubVector, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, Ptr{CVec}),\n               X, is, Y_,\n              )\n\n\tY.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tw::PetscVec = VecCreateLocalVector(petsclib::PetscLibType,v::PetscVec) \nCreates a vector object suitable for use with `VecGetLocalVector()` and friends. You must call `VecDestroy()` when the\nvector is no longer needed.\n\nNot Collective.\n\nInput Parameter:\n- `v` - The vector for which the local vector is desired.\n\nOutput Parameter:\n- `w` - Upon exit this contains the local vector.\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetLocalVectorRead()`, `VecRestoreLocalVectorRead()`, `VecGetLocalVector()`, `VecRestoreLocalVector()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateLocalVector\"))\n\"\"\"\nfunction VecCreateLocalVector(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecCreateLocalVector(petsclib::$UnionPetscLib, v::PetscVec )\n\tw_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{CVec}),\n               v, w_,\n              )\n\n\tw = PetscVec(w_[], petsclib)\n\n\treturn w\nend \n\n\"\"\"\n\tVecGetLocalVectorRead(petsclib::PetscLibType,v::PetscVec, w::PetscVec) \nMaps the local portion of a vector into a\nvector.\n\nNot Collective.\n\nInput Parameter:\n- `v` - The vector for which the local vector is desired.\n\nOutput Parameter:\n- `w` - Upon exit this contains the local vector.\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecCreateLocalVector()`, `VecRestoreLocalVectorRead()`, `VecGetLocalVector()`, `VecGetArrayRead()`, `VecGetArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetLocalVectorRead\"))\n\"\"\"\nfunction VecGetLocalVectorRead(petsclib::PetscLibType, v::PetscVec, w::PetscVec) end\n\n@for_petsc function VecGetLocalVectorRead(petsclib::$UnionPetscLib, v::PetscVec, w::PetscVec )\n\n    @chk ccall(\n               (:VecGetLocalVectorRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec),\n               v, w,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecRestoreLocalVectorRead(petsclib::PetscLibType,v::PetscVec, w::PetscVec) \nUnmaps the local portion of a vector\npreviously mapped into a vector using `VecGetLocalVectorRead()`.\n\nNot Collective.\n\nInput Parameters:\n- `v` - The local portion of this vector was previously mapped into `w` using `VecGetLocalVectorRead()`.\n- `w` - The vector into which the local portion of `v` was mapped.\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecCreateLocalVector()`, `VecGetLocalVectorRead()`, `VecGetLocalVector()`, `VecGetArrayRead()`, `VecGetArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreLocalVectorRead\"))\n\"\"\"\nfunction VecRestoreLocalVectorRead(petsclib::PetscLibType, v::PetscVec, w::PetscVec) end\n\n@for_petsc function VecRestoreLocalVectorRead(petsclib::$UnionPetscLib, v::PetscVec, w::PetscVec )\n\n    @chk ccall(\n               (:VecRestoreLocalVectorRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec),\n               v, w,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGetLocalVector(petsclib::PetscLibType,v::PetscVec, w::PetscVec) \nMaps the local portion of a vector into a\nvector.\n\nCollective\n\nInput Parameter:\n- `v` - The vector for which the local vector is desired.\n\nOutput Parameter:\n- `w` - Upon exit this contains the local vector.\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecCreateLocalVector()`, `VecRestoreLocalVector()`, `VecGetLocalVectorRead()`, `VecGetArrayRead()`, `VecGetArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetLocalVector\"))\n\"\"\"\nfunction VecGetLocalVector(petsclib::PetscLibType, v::PetscVec, w::PetscVec) end\n\n@for_petsc function VecGetLocalVector(petsclib::$UnionPetscLib, v::PetscVec, w::PetscVec )\n\n    @chk ccall(\n               (:VecGetLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec),\n               v, w,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecRestoreLocalVector(petsclib::PetscLibType,v::PetscVec, w::PetscVec) \nUnmaps the local portion of a vector\npreviously mapped into a vector using `VecGetLocalVector()`.\n\nLogically Collective.\n\nInput Parameters:\n- `v` - The local portion of this vector was previously mapped into `w` using `VecGetLocalVector()`.\n- `w` - The vector into which the local portion of `v` was mapped.\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecCreateLocalVector()`, `VecGetLocalVector()`, `VecGetLocalVectorRead()`, `VecRestoreLocalVectorRead()`, `LocalVectorRead()`, `VecGetArrayRead()`, `VecGetArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreLocalVector\"))\n\"\"\"\nfunction VecRestoreLocalVector(petsclib::PetscLibType, v::PetscVec, w::PetscVec) end\n\n@for_petsc function VecRestoreLocalVector(petsclib::$UnionPetscLib, v::PetscVec, w::PetscVec )\n\n    @chk ccall(\n               (:VecRestoreLocalVector, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec),\n               v, w,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar} = VecGetArray(petsclib::PetscLibType,x::PetscVec) \nReturns a pointer to a contiguous array that contains this\nMPI processes's portion of the vector data\n\nLogically Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecGetArrays()`, `VecPlaceArray()`, `VecGetArray2d()`,\n`VecGetArrayPair()`, `VecRestoreArrayPair()`, `VecGetArrayWrite()`, `VecRestoreArrayWrite()`, `VecGetArrayAndMemType()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray\"))\n\"\"\"\nfunction VecGetArray(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecGetArray(petsclib::$UnionPetscLib, x::PetscVec )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecGetArray, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn a\nend \n\n\"\"\"\n\tVecRestoreArray(petsclib::PetscLibType,x::PetscVec, a::Vector{PetscScalar}) \nRestores a vector after `VecGetArray()` has been called and the array is no longer needed\n\nLogically Collective\n\nInput Parameters:\n- `x` - the vector\n- `a` - location of pointer to array obtained from `VecGetArray()`\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArrayRead()`, `VecRestoreArrays()`, `VecPlaceArray()`, `VecRestoreArray2d()`,\n`VecGetArrayPair()`, `VecRestoreArrayPair()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray\"))\n\"\"\"\nfunction VecRestoreArray(petsclib::PetscLibType, x::PetscVec, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArray(petsclib::$UnionPetscLib, x::PetscVec, a::Vector{$PetscScalar} )\n\ta_ = Ref(pointer(a))\n\n    @chk ccall(\n               (:VecRestoreArray, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar} = VecGetArrayRead(petsclib::PetscLibType,x::PetscVec) \nGet read\n\nNot Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `a` - the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`,\n`VecGetArrayAndMemType()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArrayRead\"))\n\"\"\"\nfunction VecGetArrayRead(petsclib::PetscLibType, x::AbstractPetscVec) end\n\n@for_petsc function VecGetArrayRead(petsclib::$UnionPetscLib, x::AbstractPetscVec )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecGetArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn a\nend \n\n\"\"\"\n\tVecRestoreArrayRead(petsclib::PetscLibType,x::PetscVec, a::Vector{PetscScalar}) \nRestore array obtained with `VecGetArrayRead()`\n\nNot Collective\n\nInput Parameters:\n- `x` - the vector\n- `a` - the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArrayRead\"))\n\"\"\"\nfunction VecRestoreArrayRead(petsclib::PetscLibType, x::AbstractPetscVec, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArrayRead(petsclib::$UnionPetscLib, x::AbstractPetscVec, a::Vector{$PetscScalar} )\n\ta_ = Ref(pointer(a))\n\n    @chk ccall(\n               (:VecRestoreArrayRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar} = VecGetArrayWrite(petsclib::PetscLibType,x::PetscVec) \nReturns a pointer to a contiguous array that WILL contain this\nMPI processes's portion of the vector data.\n\nLogically Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecGetArrays()`, `VecPlaceArray()`, `VecGetArray2d()`,\n`VecGetArrayPair()`, `VecRestoreArrayPair()`, `VecGetArray()`, `VecRestoreArrayWrite()`, `VecGetArrayAndMemType()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArrayWrite\"))\n\"\"\"\nfunction VecGetArrayWrite(petsclib::PetscLibType, x::AbstractPetscVec) end\n\n@for_petsc function VecGetArrayWrite(petsclib::$UnionPetscLib, x::AbstractPetscVec )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecGetArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn a\nend \n\n\"\"\"\n\tVecRestoreArrayWrite(petsclib::PetscLibType,x::PetscVec, a::Vector{PetscScalar}) \nRestores a vector after `VecGetArrayWrite()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x` - the vector\n- `a` - location of pointer to array obtained from `VecGetArray()`\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArrayRead()`, `VecRestoreArrays()`, `VecPlaceArray()`, `VecRestoreArray2d()`,\n`VecGetArrayPair()`, `VecRestoreArrayPair()`, `VecGetArrayWrite()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArrayWrite\"))\n\"\"\"\nfunction VecRestoreArrayWrite(petsclib::PetscLibType, x::AbstractPetscVec, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArrayWrite(petsclib::$UnionPetscLib, x::AbstractPetscVec, a::Vector{$PetscScalar} )\n\ta_ = Ref(pointer(a))\n\n    @chk ccall(\n               (:VecRestoreArrayWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar} = VecGetArrays(petsclib::PetscLibType,x::Vector{PetscVec}, n::PetscInt) \nReturns a pointer to the arrays in a set of vectors\nthat were created by a call to `VecDuplicateVecs()`.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `x` - the vectors\n- `n` - the number of vectors\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArrays()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArrays\"))\n\"\"\"\nfunction VecGetArrays(petsclib::PetscLibType, x::Vector{PetscVec}, n::PetscInt) end\n\n@for_petsc function VecGetArrays(petsclib::$UnionPetscLib, x::Vector{PetscVec}, n::$PetscInt )\n\n    @chk ccall(\n               (:VecGetArrays, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CVec}, $PetscInt, Ptr{$PetscScalar}),\n               x, n, a,\n              )\n\n\n\treturn a\nend \n\n\"\"\"\n\tVecRestoreArrays(petsclib::PetscLibType,x::Vector{PetscVec}, n::PetscInt, a::Vector{PetscScalar}) \nRestores a group of vectors after `VecGetArrays()`\nhas been called.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `x` - the vector\n- `n` - the number of vectors\n- `a` - location of pointer to arrays obtained from `VecGetArrays()`\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArrays()`, `VecRestoreArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArrays\"))\n\"\"\"\nfunction VecRestoreArrays(petsclib::PetscLibType, x::Vector{PetscVec}, n::PetscInt, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArrays(petsclib::$UnionPetscLib, x::Vector{PetscVec}, n::$PetscInt, a::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:VecRestoreArrays, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CVec}, $PetscInt, Ptr{$PetscScalar}),\n               x, n, a,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar},mtype::PetscMemType = VecGetArrayAndMemType(petsclib::PetscLibType,x::PetscVec) \nLike `VecGetArray()`, but if this is a standard device vector (e.g.,\n`VECCUDA`), the returned pointer will be a device pointer to the device memory that contains\nthis MPI processes's portion of the vector data.\n\nLogically Collective; No Fortran Support\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameters:\n- `a`     - location to put pointer to the array\n- `mtype` - memory type of the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArrayAndMemType()`, `VecGetArrayReadAndMemType()`, `VecGetArrayWriteAndMemType()`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecGetArrays()`,\n`VecPlaceArray()`, `VecGetArray2d()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`, `VecGetArrayWrite()`, `VecRestoreArrayWrite()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArrayAndMemType\"))\n\"\"\"\nfunction VecGetArrayAndMemType(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecGetArrayAndMemType(petsclib::$UnionPetscLib, x::PetscVec )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\tmtype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:VecGetArrayAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}, Ptr{PetscMemType}),\n               x, a_, mtype_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\tmtype = unsafe_string(mtype_[])\n\n\treturn a,mtype\nend \n\n\"\"\"\n\tVecRestoreArrayAndMemType(petsclib::PetscLibType,x::PetscVec, a::Vector{PetscScalar}) \nRestores a vector after `VecGetArrayAndMemType()` has been called.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `x` - the vector\n- `a` - location of pointer to array obtained from `VecGetArrayAndMemType()`\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArrayAndMemType()`, `VecGetArray()`, `VecRestoreArrayRead()`, `VecRestoreArrays()`,\n`VecPlaceArray()`, `VecRestoreArray2d()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArrayAndMemType\"))\n\"\"\"\nfunction VecRestoreArrayAndMemType(petsclib::PetscLibType, x::PetscVec, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArrayAndMemType(petsclib::$UnionPetscLib, x::PetscVec, a::Vector{$PetscScalar} )\n\ta_ = Ref(pointer(a))\n\n    @chk ccall(\n               (:VecRestoreArrayAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar},mtype::PetscMemType = VecGetArrayReadAndMemType(petsclib::PetscLibType,x::PetscVec) \nLike `VecGetArrayRead()`, but if the input vector is a device vector, it will return a read\nThe returned pointer is guaranteed to point to up-to-date data. For host vectors, it functions as `VecGetArrayRead()`.\n\nNot Collective; No Fortran Support\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameters:\n- `a`     - the array\n- `mtype` - memory type of the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArrayReadAndMemType()`, `VecGetArrayAndMemType()`, `VecGetArrayWriteAndMemType()`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArrayReadAndMemType\"))\n\"\"\"\nfunction VecGetArrayReadAndMemType(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecGetArrayReadAndMemType(petsclib::$UnionPetscLib, x::PetscVec )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\tmtype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:VecGetArrayReadAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}, Ptr{PetscMemType}),\n               x, a_, mtype_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\tmtype = unsafe_string(mtype_[])\n\n\treturn a,mtype\nend \n\n\"\"\"\n\tVecRestoreArrayReadAndMemType(petsclib::PetscLibType,x::PetscVec, a::Vector{PetscScalar}) \nRestore array obtained with `VecGetArrayReadAndMemType()`\n\nNot Collective; No Fortran Support\n\nInput Parameters:\n- `x` - the vector\n- `a` - the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArrayReadAndMemType()`, `VecRestoreArrayAndMemType()`, `VecRestoreArrayWriteAndMemType()`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArrayReadAndMemType\"))\n\"\"\"\nfunction VecRestoreArrayReadAndMemType(petsclib::PetscLibType, x::PetscVec, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArrayReadAndMemType(petsclib::$UnionPetscLib, x::PetscVec, a::Vector{$PetscScalar} )\n\ta_ = Ref(pointer(a))\n\n    @chk ccall(\n               (:VecRestoreArrayReadAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar},mtype::PetscMemType = VecGetArrayWriteAndMemType(petsclib::PetscLibType,x::PetscVec) \nLike `VecGetArrayWrite()`, but if this is a device vector it will always return\na device pointer to the device memory that contains this processor's portion of the vector data.\n\nLogically Collective; No Fortran Support\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameters:\n- `a`     - the array\n- `mtype` - memory type of the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArrayWriteAndMemType()`, `VecGetArrayReadAndMemType()`, `VecGetArrayAndMemType()`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`,\n\n# External Links\n$(_doc_external(\"Vec/VecGetArrayWriteAndMemType\"))\n\"\"\"\nfunction VecGetArrayWriteAndMemType(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecGetArrayWriteAndMemType(petsclib::$UnionPetscLib, x::PetscVec )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\tmtype_ = Ref{PetscMemType}()\n\n    @chk ccall(\n               (:VecGetArrayWriteAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}, Ptr{PetscMemType}),\n               x, a_, mtype_,\n              )\n\n\ta = unsafe_wrap(Array, a_[], VecGetLocalSize(petsclib, x); own = false)\n\tmtype = unsafe_string(mtype_[])\n\n\treturn a,mtype\nend \n\n\"\"\"\n\tVecRestoreArrayWriteAndMemType(petsclib::PetscLibType,x::PetscVec, a::Vector{PetscScalar}) \nRestore array obtained with `VecGetArrayWriteAndMemType()`\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `x` - the vector\n- `a` - the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArrayWriteAndMemType()`, `VecRestoreArrayAndMemType()`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArrayWriteAndMemType\"))\n\"\"\"\nfunction VecRestoreArrayWriteAndMemType(petsclib::PetscLibType, x::PetscVec, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArrayWriteAndMemType(petsclib::$UnionPetscLib, x::PetscVec, a::Vector{$PetscScalar} )\n\ta_ = Ref(pointer(a))\n\n    @chk ccall(\n               (:VecRestoreArrayWriteAndMemType, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscScalar}}),\n               x, a_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecPlaceArray(petsclib::PetscLibType,vec::PetscVec, array::Vector{PetscScalar}) \nAllows one to replace the array in a vector with an\narray provided by the user. This is useful to avoid copying an array\ninto a vector.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `vec`   - the vector\n- `array` - the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecReplaceArray()`, `VecResetArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecPlaceArray\"))\n\"\"\"\nfunction VecPlaceArray(petsclib::PetscLibType, vec::PetscVec, array::Vector{PetscScalar}) end\n\n@for_petsc function VecPlaceArray(petsclib::$UnionPetscLib, vec::PetscVec, array::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:VecPlaceArray, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}),\n               vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecReplaceArray(petsclib::PetscLibType,vec::PetscVec, array::Vector{PetscScalar}) \nAllows one to replace the array in a vector with an\narray provided by the user. This is useful to avoid copying an array\ninto a vector.\n\nLogically Collective; No Fortran Support\n\nInput Parameters:\n- `vec`   - the vector\n- `array` - the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecPlaceArray()`, `VecResetArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecReplaceArray\"))\n\"\"\"\nfunction VecReplaceArray(petsclib::PetscLibType, vec::PetscVec, array::Vector{PetscScalar}) end\n\n@for_petsc function VecReplaceArray(petsclib::$UnionPetscLib, vec::PetscVec, array::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:VecReplaceArray, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}),\n               vec, array,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar} = VecGetArray2d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt) \nReturns a pointer to a 2d contiguous array that contains this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray2d()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `n`      - second dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray2d\"))\n\"\"\"\nfunction VecGetArray2d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt) end\n\n@for_petsc function VecGetArray2d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, mstart::$PetscInt, nstart::$PetscInt )\n\n    arr_ptr = Ref{Ptr{Ptr{$PetscScalar}}}()\n\n    @chk ccall(\n               (:VecGetArray2d, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, mstart, nstart, arr_ptr,\n              )\n\n    # Assume contiguous storage, use first row pointer\n    #mat = unsafe_wrap(Array, data_ptr, (m, n))\n    \n    # there is a difference in C vs julia storage of arrays\n    data_ptr = unsafe_load(arr_ptr[])\n    sz = (m,n)\n    perm = (2,1)\n    mat = unsafe_wrap(Array, data_ptr, sz)\n    mat = PermutedDimsArray(mat, perm)\n    #arr = PetscArray(mat, a_)\n\n\n\n\treturn PetscArray(mat, arr_ptr)\nend \n\n\"\"\"\n\ta::Vector{PetscScalar} = VecGetArray2dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt) \nReturns a pointer to a 2d contiguous array that will contain this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray2dWrite()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `n`      - second dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray2dWrite\"))\n\"\"\"\nfunction VecGetArray2dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt) end\n\n@for_petsc function VecGetArray2dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, mstart::$PetscInt, nstart::$PetscInt )\n\n    arr_ptr = Ref{Ptr{Ptr{$PetscScalar}}}()\n\n    @chk ccall(\n               (:VecGetArray2dWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, mstart, nstart, arr_ptr,\n            )\n\n    # Assume contiguous storage, use first row pointer\n    data_ptr = unsafe_load(arr_ptr[])\n    mat = unsafe_wrap(Array, data_ptr, (m, n))\n\n\treturn PetscArray(mat,arr_ptr)            \nend \n\n\"\"\"\n\tVecRestoreArray2d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt, a::PetscArray{PetscScalar, 2}) \nRestores a vector after `VecGetArray2d()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `n`      - second dimension of the two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray2d()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray2d\"))\n\"\"\"\nfunction VecRestoreArray2d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt, a::PetscArray{PetscScalar, 2}) end\n\n@for_petsc function VecRestoreArray2d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, a::PetscArray{$PetscScalar, 2} )\n\tif a.ptr[] != C_NULL \n\n        @chk ccall(\n                (:VecRestoreArray2d, $petsc_library),\n                PetscErrorCode,\n                (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n                x, m, n, mstart, nstart, a.ptr,\n                )\n\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\n\n\"\"\"\n\tVecRestoreArray2dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt, a::PetscArray{PetscScalar, 2}) \nRestores a vector after `VecGetArray2dWrite()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `n`      - second dimension of the two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray2d()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray2dWrite\"))\n\"\"\"\nfunction VecRestoreArray2dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt, a::PetscArray{PetscScalar, 2}) end\n\n@for_petsc function VecRestoreArray2dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, a::PetscArray{$PetscScalar, 2} )\n\tif a.ptr[]  != C_NULL  \n\n        @chk ccall(\n                (:VecRestoreArray2dWrite, $petsc_library),\n                PetscErrorCode,\n                (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n                x, m, n, mstart, nstart, a.ptr,\n                )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\n\n\"\"\"\n\ta::PetscArray = VecGetArray1d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, mstart::PetscInt) \nReturns a pointer to a 1d contiguous array that contains this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray1d()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray2d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray1d\"))\n\"\"\"\nfunction VecGetArray1d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, mstart::PetscInt) end\n\n@for_petsc function VecGetArray1d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, mstart::$PetscInt )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecGetArray1d, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, Ref{Ptr{$PetscScalar}}),\n               x, m, mstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, m) \n\ta = PetscArray(mat,a_[]) \n\n\treturn a\nend \n\n\n\"\"\"\n\ta::PetscArray = VecGetArray1dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, mstart::PetscInt) \nReturns a pointer to a 1d contiguous array that will contain this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray1dWrite()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray2d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray1dWrite\"))\n\"\"\"\nfunction VecGetArray1dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, mstart::PetscInt) end\n\n@for_petsc function VecGetArray1dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, mstart::$PetscInt )\n\ta_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecGetArray1dWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, Ref{Ptr{$PetscScalar}}),\n               x, m, mstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, m) \n\ta = PetscArray(mat,data_ptr) \n\n\treturn a\nend \n\n\n\n\"\"\"\n\tVecRestoreArray1d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, mstart::PetscInt, a::PetscArray{PetscScalar, 1}) \nRestores a vector after `VecGetArray1d()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray1d()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray2d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray1d\"))\n\"\"\"\nfunction VecRestoreArray1d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, mstart::PetscInt, a::PetscArray{PetscScalar, 1}) end\n\n@for_petsc function VecRestoreArray1d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, mstart::$PetscInt, a::PetscArray{$PetscScalar, 1} )\n\tif a.ptr[]  != C_NULL \n\n    @chk ccall(\n               (:VecRestoreArray1d, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, Ref{Ptr{$PetscScalar}}),\n               x, m, mstart, a.ptr,\n              )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\n\"\"\"\n\tVecRestoreArray1dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, mstart::PetscInt, a::PetscArray{PetscScalar, 1}) \nRestores a vector after `VecGetArray1dWrite()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray1d()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray2d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray1dWrite\"))\n\"\"\"\nfunction VecRestoreArray1dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, mstart::PetscInt, a::PetscArray{PetscScalar, 1}) end\n\n@for_petsc function VecRestoreArray1dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, mstart::$PetscInt, a::PetscArray{$PetscScalar, 1} )\n\tif a.ptr[]  != C_NULL \n\n    @chk ccall(\n               (:VecRestoreArray1dWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, Ref{Ptr{$PetscScalar}}),\n               x, m, mstart, a.ptr,\n              )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n \n\n\"\"\"\n\ta::PetscArray = VecGetArray3d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt) \nReturns a pointer to a 3d contiguous array that contains this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray3d()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of three dimensional array\n- `n`      - second dimension of three dimensional array\n- `p`      - third dimension of three dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetarray()`, `DMDAVecRestoreArray()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray3d\"))\n\"\"\"\nfunction VecGetArray3d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt) end\n\n@for_petsc function VecGetArray3d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt )\n\ta_ = Ref{Ptr{Ptr{Ptr{$PetscScalar}}}}()\n\n    @chk ccall(\n               (:VecGetArray3d, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{Ptr{$PetscScalar}}}}),\n               x, m, n, p, mstart, nstart, pstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, (m,n,p)) \n\ta = PetscArray(mat,data_ptr) \n\n\treturn a\nend \n\n\n\n\"\"\"\n\ta::PetscArray = VecGetArray3dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt) \nReturns a pointer to a 3d contiguous array that will contain this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray3dWrite()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of three dimensional array\n- `n`      - second dimension of three dimensional array\n- `p`      - third dimension of three dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetarray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray3dWrite\"))\n\"\"\"\nfunction VecGetArray3dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt) end\n\n@for_petsc function VecGetArray3dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt )\n\ta_ = Ref{Ptr{Ptr{Ptr{$PetscScalar}}}}()\n\n    @chk ccall(\n               (:VecGetArray3dWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{Ptr{$PetscScalar}}}}),\n               x, m, n, p, mstart, nstart, pstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, (m,n,p)) \n\ta = PetscArray(mat,data_ptr) \n\n\treturn a\nend \n\n\n\n\"\"\"\n\tVecRestoreArray3d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, a::PetscArray{PetscScalar, 3}) \nRestores a vector after `VecGetArray3d()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of three dimensional array\n- `n`      - second dimension of the three dimensional array\n- `p`      - third dimension of the three dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from VecGetArray3d()\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray3d\"))\n\"\"\"\nfunction VecRestoreArray3d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, a::PetscArray{PetscScalar, 3}) end\n\n@for_petsc function VecRestoreArray3d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, a::PetscArray{$PetscScalar, 3} )\n\tif a.ptr[]  != C_NULL  \n\n    @chk ccall(\n               (:VecRestoreArray3d, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, p, mstart, nstart, pstart, a.ptr,\n              )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecRestoreArray3dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, a::PetscArray{PetscScalar, 3}) \nRestores a vector after `VecGetArray3dWrite()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of three dimensional array\n- `n`      - second dimension of the three dimensional array\n- `p`      - third dimension of the three dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from VecGetArray3d()\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray3dWrite\"))\n\"\"\"\nfunction VecRestoreArray3dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, a::PetscArray{PetscScalar, 3}) end\n\n@for_petsc function VecRestoreArray3dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, a::PetscArray{$PetscScalar, 3} )\n\tif a.ptr[]  != C_NULL  \n\n    @chk ccall(\n               (:VecRestoreArray3dWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, p, mstart, nstart, pstart, a.ptr,\n              )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\n\n\"\"\"\n\ta::PetscArray = VecGetArray4d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt) \nReturns a pointer to a 4d contiguous array that contains this processor's portion of the vector data.  You MUST call `VecRestoreArray4d()` when you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of four dimensional array\n- `n`      - second dimension of four dimensional array\n- `p`      - third dimension of four dimensional array\n- `q`      - fourth dimension of four dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `qstart` - first index in the fourth coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetarray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray4d\"))\n\"\"\"\nfunction VecGetArray4d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt) end\n\n@for_petsc function VecGetArray4d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, q::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, qstart::$PetscInt )\n\ta_ = Ref{Ptr{Ptr{Ptr{Ptr{$PetscScalar}}}}}()\n\n    @chk ccall(\n               (:VecGetArray4d, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{Ptr{Ptr{$PetscScalar}}}}}),\n               x, m, n, p, q, mstart, nstart, pstart, qstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, (m,n,p,q)) \n\ta = PetscArray(mat,data_ptr) \n\n\treturn a\nend \n\n\n\"\"\"\n\ta::PetscArray = VecGetArray4dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt) \nReturns a pointer to a 4d contiguous array that will contain this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray4dWrite()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of four dimensional array\n- `n`      - second dimension of four dimensional array\n- `p`      - third dimension of four dimensional array\n- `q`      - fourth dimension of four dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `qstart` - first index in the fourth coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetarray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray4dWrite\"))\n\"\"\"\nfunction VecGetArray4dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt) end\n\n@for_petsc function VecGetArray4dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, q::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, qstart::$PetscInt )\n\ta_ = Ref{Ptr{Ptr{Ptr{Ptr{$PetscScalar}}}}}()\n\n    @chk ccall(\n               (:VecGetArray4dWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{Ptr{Ptr{$PetscScalar}}}}}),\n               x, m, n, p, q, mstart, nstart, pstart, qstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, (m,n,p,q)) \n\ta = PetscArray(mat,data_ptr) \n\n\treturn a\nend \n\n\n\"\"\"\n\tVecRestoreArray4d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 4}) \nRestores a vector after `VecGetArray4d()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of four dimensional array\n- `n`      - second dimension of the four dimensional array\n- `p`      - third dimension of the four dimensional array\n- `q`      - fourth dimension of the four dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `qstart` - first index in the fourth coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from VecGetArray4d()\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray4d\"))\n\"\"\"\nfunction VecRestoreArray4d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 4}) end\n\n@for_petsc function VecRestoreArray4d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, q::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, qstart::$PetscInt, a::PetscArray{$PetscScalar, 4} )\n\tif a.ptr[]  != C_NULL  \n\n        @chk ccall(\n                (:VecRestoreArray4d, $petsc_library),\n                PetscErrorCode,\n                (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n                x, m, n, p, q, mstart, nstart, pstart, qstart, a.ptr,\n                )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\treturn nothing\nend \n\n\n\"\"\"\n\tVecRestoreArray4dWrite(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 4}) \nRestores a vector after `VecGetArray4dWrite()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of four dimensional array\n- `n`      - second dimension of the four dimensional array\n- `p`      - third dimension of the four dimensional array\n- `q`      - fourth dimension of the four dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `qstart` - first index in the fourth coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray4d()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray4dWrite\"))\n\"\"\"\nfunction VecRestoreArray4dWrite(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 4}) end\n\n@for_petsc function VecRestoreArray4dWrite(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, q::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, qstart::$PetscInt, a::PetscArray{$PetscScalar, 4} )\n\tif a.ptr[]  != C_NULL  \n\n    @chk ccall(\n               (:VecRestoreArray4dWrite, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{Ptr{Ptr{$PetscScalar}}}}}),\n               x, m, n, p, q, mstart, nstart, pstart, qstart, a.ptr,\n              )\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::Vector{PetscScalar} = VecGetArray2dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt) \nReturns a pointer to a 2d contiguous array that contains this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray2dRead()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `n`      - second dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray2dRead\"))\n\"\"\"\nfunction VecGetArray2dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt) end\n\n@for_petsc function VecGetArray2dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, mstart::$PetscInt, nstart::$PetscInt )\n\n    arr_ptr = Ref{Ptr{Ptr{$PetscScalar}}}()\n\n    @chk ccall(\n               (:VecGetArray2dRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, mstart, nstart, arr_ptr,\n              )\n\n    # Assume contiguous storage, use first row pointer\n    data_ptr = unsafe_load(arr_ptr[])\n    mat = unsafe_wrap(Array, data_ptr, (m, n))\n\n\treturn PetscArray(mat,arr_ptr)\nend \n\n\"\"\"\n\tVecRestoreArray2dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt, a::PetscArray{PetscScalar, 2}) \nRestores a vector after `VecGetArray2dRead()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `n`      - second dimension of the two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from VecGetArray2d()\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray2dRead\"))\n\"\"\"\nfunction VecRestoreArray2dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, mstart::PetscInt, nstart::PetscInt, a::PetscArray{PetscScalar, 2}) end\n\n@for_petsc function VecRestoreArray2dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, a::PetscArray{$PetscScalar, 2} )\n\tif a.ptr[]  != C_NULL  \n\n        @chk ccall(\n                (:VecRestoreArray2dRead, $petsc_library),\n                PetscErrorCode,\n                (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n                x, m, n, mstart, nstart, a.ptr,\n                )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\n\"\"\"\n\tVecRestoreArray1dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, mstart::PetscInt, a::PetscArray{PetscScalar, 1}) \nRestores a vector after `VecGetArray1dRead()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray1dRead()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray2d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray1dRead\"))\n\"\"\"\nfunction VecRestoreArray1dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, mstart::PetscInt, a::PetscArray{PetscScalar, 1}) end\n\n@for_petsc function VecRestoreArray1dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, mstart::$PetscInt, a::PetscArray{$PetscScalar, 1} )\n\tif a.ptr[]  != C_NULL \n        @chk ccall(\n                (:VecRestoreArray1dRead, $petsc_library),\n                PetscErrorCode,\n                (CVec, $PetscInt, $PetscInt, Ptr{Ptr{$PetscScalar}}),\n                x, m, mstart, a.ptr,\n                )\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n \n\n\n\n\"\"\"\n\tVecRestoreArray1dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, mstart::PetscInt, a::Vector{PetscScalar}) \nRestores a vector after `VecGetArray1dRead()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of two dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray1dRead()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray2d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray1dRead\"))\n\"\"\"\nfunction VecRestoreArray1dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, mstart::PetscInt, a::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArray1dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, mstart::$PetscInt, a::Vector{$PetscScalar} )\n\ta_ = Ref(pointer(a))\n\n    @chk ccall(\n               (:VecRestoreArray1dRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, Ptr{Ptr{$PetscScalar}}),\n               x, m, mstart, a_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ta::PetscArray = VecGetArray3dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt) \nReturns a pointer to a 3d contiguous array that contains this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray3dRead()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of three dimensional array\n- `n`      - second dimension of three dimensional array\n- `p`      - third dimension of three dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetarray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray3dRead\"))\n\"\"\"\nfunction VecGetArray3dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt) end\n\n@for_petsc function VecGetArray3dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt )\n\ta_ = Ref{Ptr{Ptr{Ptr{$PetscScalar}}}}()\n\n    @chk ccall(\n               (:VecGetArray3dRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{Ptr{$PetscScalar}}}}),\n               x, m, n, p, mstart, nstart, pstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, (m,n,p)) \n\ta = PetscArray(mat,data_ptr) \n\n\treturn a\nend \n\n \n\n\"\"\"\n\tVecRestoreArray3dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, a::PetscArray{PetscScalar, 3}) \nRestores a vector after `VecGetArray3dRead()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of three dimensional array\n- `n`      - second dimension of the three dimensional array\n- `p`      - third dimension of the three dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray3dRead()`\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray3dRead\"))\n\"\"\"\nfunction VecRestoreArray3dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, a::PetscArray{PetscScalar, 3}) end\n\n@for_petsc function VecRestoreArray3dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, a::PetscArray{$PetscScalar, 3} )\n\tif a.ptr[]  != C_NULL \n\n    @chk ccall(\n               (:VecRestoreArray3dRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, p, mstart, nstart, pstart, a.ptr,\n              )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\n\"\"\"\n\ta::PetscArray = VecGetArray4dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt) \nReturns a pointer to a 4d contiguous array that contains this\nprocessor's portion of the vector data.  You MUST call `VecRestoreArray4dRead()`\nwhen you no longer need access to the array.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of four dimensional array\n- `n`      - second dimension of four dimensional array\n- `p`      - third dimension of four dimensional array\n- `q`      - fourth dimension of four dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `qstart` - first index in the fourth coordinate direction (often 0)\n\nOutput Parameter:\n- `a` - location to put pointer to the array\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrays()`, `VecPlaceArray()`,\n`VecRestoreArray2d()`, `DMDAVecGetarray()`, `DMDAVecRestoreArray()`, `VecGetArray3d()`, `VecRestoreArray3d()`,\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray4dRead\"))\n\"\"\"\nfunction VecGetArray4dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt) end\n\n@for_petsc function VecGetArray4dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, q::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, qstart::$PetscInt )\n\ta_ = Ref{Ptr{Ptr{Ptr{Ptr{$PetscScalar}}}}}()\n\n    @chk ccall(\n               (:VecGetArray4dRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{Ptr{Ptr{$PetscScalar}}}}}),\n               x, m, n, p, q, mstart, nstart, pstart, qstart, a_,\n              )\n\n\tdata_ptr = unsafe_load(a_[])\n\tmat = unsafe_wrap(Array, data_ptr, (m,n,p,q)) \n\ta = PetscArray(mat,data_ptr) \n\n\treturn a\nend \n\n\n\"\"\"\n\tVecRestoreArray4dRead(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 4}) \nRestores a vector after `VecGetArray4d()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of four dimensional array\n- `n`      - second dimension of the four dimensional array\n- `p`      - third dimension of the four dimensional array\n- `q`      - fourth dimension of the four dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `qstart` - first index in the fourth coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from `VecGetArray4dRead()`\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray4dRead\"))\n\"\"\"\nfunction VecRestoreArray4dRead(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 4}) end\n\n@for_petsc function VecRestoreArray4dRead(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, q::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, qstart::$PetscInt, a::PetscArray{$PetscScalar, 4} )\n\tif a.ptr[]  != C_NULL  \n\n    @chk ccall(\n               (:VecRestoreArray4dRead, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, p, q, mstart, nstart, pstart, qstart, a.ptr,\n              )\n\n\t\t\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n\n\n\"\"\"\n\tstate::PetscInt = VecLockGet(petsclib::PetscLibType,x::PetscVec) \nGet the current lock status of a vector\n\nLogically Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `state` - greater than zero indicates the vector is locked for read; less than zero indicates the vector is\nlocked for write; equal to zero means the vector is unlocked, that is, it is free to read or write.\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecLockReadPush()`, `VecLockReadPop()`\n\n# External Links\n$(_doc_external(\"Vec/VecLockGet\"))\n\"\"\"\nfunction VecLockGet(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecLockGet(petsclib::$UnionPetscLib, x::PetscVec )\n\tstate_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecLockGet, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}),\n               x, state_,\n              )\n\n\tstate = state_[]\n\n\treturn state\nend \n\n\"\"\"\n\tVecLockGetLocation(petsclib::PetscLibType,x::PetscVec, file::Vector{Cchar}, func::Vector{Cchar}, line::Cint) \n\n# External Links\n$(_doc_external(\"Vec/VecLockGetLocation\"))\n\"\"\"\nfunction VecLockGetLocation(petsclib::PetscLibType, x::PetscVec, file::Vector{Cchar}, func::Vector{Cchar}, line::Cint) end\n\n@for_petsc function VecLockGetLocation(petsclib::$UnionPetscLib, x::PetscVec, file::Vector{Cchar}, func::Vector{Cchar}, line::Cint )\n\tfile_ = Ref(pointer(file))\n\tfunc_ = Ref(pointer(func))\n\n    @chk ccall(\n               (:VecLockGetLocation, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{Cchar}}, Ptr{Ptr{Cchar}}, Ptr{Cint}),\n               x, file_, func_, line,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecLockReadPush(petsclib::PetscLibType,x::PetscVec) \nPush a read\n\nLogically Collective\n\nInput Parameter:\n- `x` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecLockReadPop()`, `VecLockGet()`\n\n# External Links\n$(_doc_external(\"Vec/VecLockReadPush\"))\n\"\"\"\nfunction VecLockReadPush(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecLockReadPush(petsclib::$UnionPetscLib, x::PetscVec )\n\n    @chk ccall(\n               (:VecLockReadPush, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecLockReadPop(petsclib::PetscLibType,x::PetscVec) \nPop a read\n\nLogically Collective\n\nInput Parameter:\n- `x` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecLockReadPush()`, `VecLockGet()`\n\n# External Links\n$(_doc_external(\"Vec/VecLockReadPop\"))\n\"\"\"\nfunction VecLockReadPop(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecLockReadPop(petsclib::$UnionPetscLib, x::PetscVec )\n\n    @chk ccall(\n               (:VecLockReadPop, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecLockWriteSet(petsclib::PetscLibType,x::PetscVec, flg::PetscBool) \nLock or unlock a vector for exclusive read/write access\n\nLogically Collective\n\nInput Parameters:\n- `x`   - the vector\n- `flg` - `PETSC_TRUE` to lock the vector for exclusive read/write access; `PETSC_FALSE` to unlock it.\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecLockReadPush()`, `VecLockReadPop()`, `VecLockGet()`\n\n# External Links\n$(_doc_external(\"Vec/VecLockWriteSet\"))\n\"\"\"\nfunction VecLockWriteSet(petsclib::PetscLibType, x::PetscVec, flg::PetscBool) end\n\n@for_petsc function VecLockWriteSet(petsclib::$UnionPetscLib, x::PetscVec, flg::PetscBool )\n\n    @chk ccall(\n               (:VecLockWriteSet, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscBool),\n               x, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGetLocalToGlobalMapping(petsclib::PetscLibType,X::PetscVec, mapping::ISLocalToGlobalMapping) \nGets the local\n\nNot Collective\n\nInput Parameter:\n- `X` - the vector\n\nOutput Parameter:\n- `mapping` - the mapping\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecSetValuesLocal()`, `VecSetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetLocalToGlobalMapping\"))\n\"\"\"\nfunction VecGetLocalToGlobalMapping(petsclib::PetscLibType, X::PetscVec, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function VecGetLocalToGlobalMapping(petsclib::$UnionPetscLib, X::PetscVec, mapping::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:VecGetLocalToGlobalMapping, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{ISLocalToGlobalMapping}),\n               X, mapping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecAssemblyBegin(petsclib::PetscLibType,vec::PetscVec) \nBegins assembling the vector; that is ensuring all the vector's entries are stored on the correct MPI process. This routine should\nbe called after completing all calls to `VecSetValues()`.\n\nCollective\n\nInput Parameter:\n- `vec` - the vector\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyEnd()`, `VecSetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecAssemblyBegin\"))\n\"\"\"\nfunction VecAssemblyBegin(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecAssemblyBegin(petsclib::$UnionPetscLib, vec::PetscVec )\n\n    @chk ccall(\n               (:VecAssemblyBegin, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecAssemblyEnd(petsclib::PetscLibType,vec::PetscVec) \nCompletes assembling the vector.  This routine should be called after `VecAssemblyBegin()`.\n\nCollective\n\nInput Parameter:\n- `vec` - the vector\n\nOptions Database Keys:\n- `-vec_view`                 - Prints vector in `PETSC_VIEWER_DEFAULT` format\n- `-vec_view ::ascii_matlab`  - Prints vector in `PETSC_VIEWER_ASCII_MATLAB` format to stdout\n- `-vec_view matlab:filename` - Prints vector in MATLAB .mat file to filename (requires PETSc configured with --with-matlab)\n- `-vec_view draw`            - Activates vector viewing using drawing tools\n- `-display <name>`           - Sets display name (default is host)\n- `-draw_pause <sec>`         - Sets number of seconds to pause after display\n- `-vec_view socket`          - Activates vector viewing using a socket\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecSetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecAssemblyEnd\"))\n\"\"\"\nfunction VecAssemblyEnd(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecAssemblyEnd(petsclib::$UnionPetscLib, vec::PetscVec )\n\n    @chk ccall(\n               (:VecAssemblyEnd, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecPointwiseMax(petsclib::PetscLibType,w::PetscVec, x::PetscVec, y::PetscVec) \nComputes the component\n\nLogically Collective\n\nInput Parameters:\n- `x` - the first input vector\n- `y` - the second input vector\n\nOutput Parameter:\n- `w` - the result\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecPointwiseDivide()`, `VecPointwiseMult()`, `VecPointwiseMin()`, `VecPointwiseMaxAbs()`, `VecMaxPointwiseDivide()`\n\n# External Links\n$(_doc_external(\"Vec/VecPointwiseMax\"))\n\"\"\"\nfunction VecPointwiseMax(petsclib::PetscLibType, w::PetscVec, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecPointwiseMax(petsclib::$UnionPetscLib, w::PetscVec, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecPointwiseMax, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec),\n               w, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecPointwiseMin(petsclib::PetscLibType,w::PetscVec, x::PetscVec, y::PetscVec) \nComputes the component\n\nLogically Collective\n\nInput Parameters:\n- `x` - the first input vector\n- `y` - the second input vector\n\nOutput Parameter:\n- `w` - the result\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecPointwiseDivide()`, `VecPointwiseMult()`, `VecPointwiseMaxAbs()`, `VecMaxPointwiseDivide()`\n\n# External Links\n$(_doc_external(\"Vec/VecPointwiseMin\"))\n\"\"\"\nfunction VecPointwiseMin(petsclib::PetscLibType, w::PetscVec, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecPointwiseMin(petsclib::$UnionPetscLib, w::PetscVec, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecPointwiseMin, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec),\n               w, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecPointwiseMaxAbs(petsclib::PetscLibType,w::PetscVec, x::PetscVec, y::PetscVec) \nComputes the component\n\nLogically Collective\n\nInput Parameters:\n- `x` - the first input vector\n- `y` - the second input vector\n\nOutput Parameter:\n- `w` - the result\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecPointwiseDivide()`, `VecPointwiseMult()`, `VecPointwiseMin()`, `VecPointwiseMax()`, `VecMaxPointwiseDivide()`\n\n# External Links\n$(_doc_external(\"Vec/VecPointwiseMaxAbs\"))\n\"\"\"\nfunction VecPointwiseMaxAbs(petsclib::PetscLibType, w::PetscVec, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecPointwiseMaxAbs(petsclib::$UnionPetscLib, w::PetscVec, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecPointwiseMaxAbs, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec),\n               w, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecPointwiseDivide(petsclib::PetscLibType,w::PetscVec, x::PetscVec, y::PetscVec) \nComputes the component\n\nLogically Collective\n\nInput Parameters:\n- `x` - the numerator vector\n- `y` - the denominator vector\n\nOutput Parameter:\n- `w` - the result\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecPointwiseMult()`, `VecPointwiseMax()`, `VecPointwiseMin()`, `VecPointwiseMaxAbs()`, `VecMaxPointwiseDivide()`\n\n# External Links\n$(_doc_external(\"Vec/VecPointwiseDivide\"))\n\"\"\"\nfunction VecPointwiseDivide(petsclib::PetscLibType, w::PetscVec, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecPointwiseDivide(petsclib::$UnionPetscLib, w::PetscVec, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecPointwiseDivide, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec),\n               w, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecPointwiseMult(petsclib::PetscLibType,w::PetscVec, x::PetscVec, y::PetscVec) \nComputes the component\n\nLogically Collective\n\nInput Parameters:\n- `x` - the first vector\n- `y` - the second vector\n\nOutput Parameter:\n- `w` - the result\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecPointwiseDivide()`, `VecPointwiseMax()`, `VecPointwiseMin()`, `VecPointwiseMaxAbs()`, `VecMaxPointwiseDivide()`\n\n# External Links\n$(_doc_external(\"Vec/VecPointwiseMult\"))\n\"\"\"\nfunction VecPointwiseMult(petsclib::PetscLibType, w::PetscVec, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecPointwiseMult(petsclib::$UnionPetscLib, w::PetscVec, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecPointwiseMult, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec),\n               w, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewv::PetscVec = VecDuplicate(petsclib::PetscLibType,v::PetscVec) \nCreates a new vector of the same type as an existing vector.\n\nCollective\n\nInput Parameter:\n- `v` - a vector to mimic\n\nOutput Parameter:\n- `newv` - location to put new vector\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecDestroy()`, `VecDuplicateVecs()`, `VecCreate()`, `VecCopy()`\n\n# External Links\n$(_doc_external(\"Vec/VecDuplicate\"))\n\"\"\"\nfunction VecDuplicate(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecDuplicate(petsclib::$UnionPetscLib, v::PetscVec )\n\tnewv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecDuplicate, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{CVec}),\n               v, newv_,\n              )\n\n\tnewv = PetscVec(newv_[], petsclib)\n\n\treturn newv\nend \n\n\"\"\"\n\tVecDestroy(petsclib::PetscLibType,v::PetscVec) \nDestroys a vector.\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecCreate()`, `VecDuplicate()`, `VecDestroyVecs()`\n\n# External Links\n$(_doc_external(\"Vec/VecDestroy\"))\n\"\"\"\nfunction VecDestroy(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecDestroy(petsclib::$UnionPetscLib, v::PetscVec )\n\tv_ = Ref(v.ptr)\n\n    @chk ccall(\n               (:VecDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CVec},),\n               v_,\n              )\n\n\tv.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tV::Vector{PetscVec} = VecDuplicateVecs(petsclib::PetscLibType,v::PetscVec, m::PetscInt) \nCreates several vectors of the same type as an existing vector.\n\nCollective\n\nInput Parameters:\n- `m` - the number of vectors to obtain\n- `v` - a vector to mimic\n\nOutput Parameter:\n- `V` - location to put pointer to array of vectors\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, [](ch_fortran), `VecDestroyVecs()`, `VecDuplicate()`, `VecCreate()`, `VecMDot()`, `VecMAXPY()`, `KSPGMRES`,\n`KSPGMRESSetPreAllocateVectors()`\n\n# External Links\n$(_doc_external(\"Vec/VecDuplicateVecs\"))\n\"\"\"\nfunction VecDuplicateVecs(petsclib::PetscLibType, v::PetscVec, m::PetscInt) end\n\n@for_petsc function VecDuplicateVecs(petsclib::$UnionPetscLib, v::PetscVec, m::$PetscInt )\n\tV_ = Ref{Ptr{PetscVec}}()\n\n    @chk ccall(\n               (:VecDuplicateVecs, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{Ptr{CVec}}),\n               v, m, V_,\n              )\n\n\tV = unsafe_wrap(Array, V_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn V\nend \n\n\"\"\"\n\tVecDestroyVecs(petsclib::PetscLibType,m::PetscInt, vv::Vector{PetscVec}) \nFrees a block of vectors obtained with `VecDuplicateVecs()`.\n\nCollective\n\nInput Parameters:\n- `m`  - the number of vectors previously obtained, if zero no vectors are destroyed\n- `vv` - pointer to pointer to array of vector pointers, if `NULL` no vectors are destroyed\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, [](ch_fortran), `VecDuplicateVecs()`, `VecDestroyVecsf90()`\n\n# External Links\n$(_doc_external(\"Vec/VecDestroyVecs\"))\n\"\"\"\nfunction VecDestroyVecs(petsclib::PetscLibType, m::PetscInt, vv::Vector{PetscVec}) end\n\n@for_petsc function VecDestroyVecs(petsclib::$UnionPetscLib, m::$PetscInt, vv::Vector{PetscVec} )\n\tvv_ = Ref(pointer(vv))\n\n    @chk ccall(\n               (:VecDestroyVecs, $petsc_library),\n               PetscErrorCode,\n               ($PetscInt, Ptr{Ptr{CVec}}),\n               m, vv_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecViewFromOptions(petsclib::PetscLibType,A::PetscVec, obj::PetscObject, name::Vector{Cchar}) \nView a vector based on values in the options database\n\nCollective\n\nInput Parameters:\n- `A`    - the vector\n- `obj`  - optional object that provides the options prefix for this viewing, use 'NULL' to use the prefix of `A`\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecView`, `PetscObjectViewFromOptions()`, `VecCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecViewFromOptions\"))\n\"\"\"\nfunction VecViewFromOptions(petsclib::PetscLibType, A::PetscVec, obj::PetscObject, name::Vector{Cchar}) end\n\n@for_petsc function VecViewFromOptions(petsclib::$UnionPetscLib, A::PetscVec, obj::PetscObject, name::Vector{Cchar} )\n\n    @chk ccall(\n               (:VecViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscObject, Ptr{Cchar}),\n               A, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecView(petsclib::PetscLibType,vec::PetscVec, viewer::PetscViewer) \nViews a vector object.\n\nCollective\n\nInput Parameters:\n- `vec`    - the vector\n- `viewer` - an optional `PetscViewer` visualization context\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecViewFromOptions()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`, `PetscDrawLGCreate()`,\n`PetscViewerSocketOpen()`, `PetscViewerBinaryOpen()`, `VecLoad()`, `PetscViewerCreate()`,\n`PetscRealView()`, `PetscScalarView()`, `PetscIntView()`, `PetscViewerHDF5SetTimestep()`\n\n# External Links\n$(_doc_external(\"Vec/VecView\"))\n\"\"\"\nfunction VecView(petsclib::PetscLibType, vec::PetscVec, viewer::PetscViewer) end\n\n@for_petsc function VecView(petsclib::$UnionPetscLib, vec::PetscVec, viewer::PetscViewer )\n\n    @chk ccall(\n               (:VecView, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscViewer),\n               vec, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecViewNative(petsclib::PetscLibType,vec::PetscVec, viewer::PetscViewer) \nViews a vector object with the original type specific viewer\n\nCollective\n\nInput Parameters:\n- `vec`    - the vector\n- `viewer` - an optional `PetscViewer` visualization context\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`, `PetscDrawLGCreate()`, `VecView()`\n`PetscViewerSocketOpen()`, `PetscViewerBinaryOpen()`, `VecLoad()`, `PetscViewerCreate()`,\n`PetscRealView()`, `PetscScalarView()`, `PetscIntView()`, `PetscViewerHDF5SetTimestep()`\n\n# External Links\n$(_doc_external(\"Vec/VecViewNative\"))\n\"\"\"\nfunction VecViewNative(petsclib::PetscLibType, vec::PetscVec, viewer::PetscViewer) end\n\n@for_petsc function VecViewNative(petsclib::$UnionPetscLib, vec::PetscVec, viewer::PetscViewer )\n\n    @chk ccall(\n               (:VecViewNative, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscViewer),\n               vec, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsize::PetscInt = VecGetSize(petsclib::PetscLibType,x::PetscVec) \nReturns the global number of elements of the vector.\n\nNot Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `size` - the global length of the vector\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetLocalSize()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetSize\"))\n\"\"\"\nfunction VecGetSize(petsclib::PetscLibType, x::AbstractPetscVec) end\n\n@for_petsc function VecGetSize(petsclib::$UnionPetscLib, x::AbstractPetscVec )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecGetSize, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}),\n               x, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tsize::PetscInt = VecGetLocalSize(petsclib::PetscLibType,x::PetscVec) \nReturns the number of elements of the vector stored\nin local memory (that is on this MPI process)\n\nNot Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `size` - the length of the local piece of the vector\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecGetSize()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetLocalSize\"))\n\"\"\"\nfunction VecGetLocalSize(petsclib::PetscLibType, x::AbstractPetscVec) end\n\n@for_petsc function VecGetLocalSize(petsclib::$UnionPetscLib, x::AbstractPetscVec )\n\tsize_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecGetLocalSize, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}),\n               x, size_,\n              )\n\n\tsize = size_[]\n\n\treturn size\nend \n\n\"\"\"\n\tlow::PetscInt,high::PetscInt = VecGetOwnershipRange(petsclib::PetscLibType,x::PetscVec) \nReturns the range of indices owned by\nthis process. The vector is laid out with the\nfirst `n1` elements on the first processor, next `n2` elements on the\nsecond, etc.  For certain parallel layouts this range may not be\nwell defined.\n\nNot Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameters:\n- `low`  - the first local element, pass in `NULL` if not interested\n- `high` - one more than the last local element, pass in `NULL` if not interested\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `MatGetOwnershipRange()`, `MatGetOwnershipRanges()`, `VecGetOwnershipRanges()`, `PetscSplitOwnership()`,\n`VecSetSizes()`, `VecCreateMPI()`, `PetscLayout`, `DMDAGetGhostCorners()`, `DM`\n\n# External Links\n$(_doc_external(\"Vec/VecGetOwnershipRange\"))\n\"\"\"\nfunction VecGetOwnershipRange(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecGetOwnershipRange(petsclib::$UnionPetscLib, x::PetscVec )\n\tlow_ = Ref{$PetscInt}()\n\thigh_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecGetOwnershipRange, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               x, low_, high_,\n              )\n\n\tlow = low_[]\n\thigh = high_[]\n\n\treturn low,high\nend \n\n\"\"\"\n\tranges::Vector{PetscInt} = VecGetOwnershipRanges(petsclib::PetscLibType,x::PetscVec) \nReturns the range of indices owned by EACH processor,\nThe vector is laid out with the\nfirst `n1` elements on the first processor, next `n2` elements on the\nsecond, etc.  For certain parallel layouts this range may not be\nwell defined.\n\nNot Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `ranges` - array of length `size` + 1 with the start and end+1 for each process\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `MatGetOwnershipRange()`, `MatGetOwnershipRanges()`, `VecGetOwnershipRange()`, `PetscSplitOwnership()`,\n`VecSetSizes()`, `VecCreateMPI()`, `PetscLayout`, `DMDAGetGhostCorners()`, `DM`\n\n# External Links\n$(_doc_external(\"Vec/VecGetOwnershipRanges\"))\n\"\"\"\nfunction VecGetOwnershipRanges(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecGetOwnershipRanges(petsclib::$UnionPetscLib, x::PetscVec )\n\tranges_ = Ref{Ptr{$PetscInt}}()\n\n    @chk ccall(\n               (:VecGetOwnershipRanges, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{$PetscInt}}),\n               x, ranges_,\n              )\n\n\tranges = unsafe_wrap(Array, ranges_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn ranges\nend \n\n\"\"\"\n\tVecResetArray(petsclib::PetscLibType,vec::PetscVec) \nResets a vector to use its default memory. Call this\nafter the use of `VecPlaceArray()`.\n\nNot Collective\n\nInput Parameter:\n- `vec` - the vector\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecReplaceArray()`, `VecPlaceArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecResetArray\"))\n\"\"\"\nfunction VecResetArray(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecResetArray(petsclib::$UnionPetscLib, vec::PetscVec )\n\n    @chk ccall(\n               (:VecResetArray, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecLoad(petsclib::PetscLibType,vec::PetscVec, viewer::PetscViewer) \nLoads a vector that has been stored in binary or HDF5 format\nwith `VecView()`.\n\nCollective\n\nInput Parameters:\n- `vec`    - the newly loaded vector, this needs to have been created with `VecCreate()` or\nsome related function before the call to `VecLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()` or\nHDF5 file viewer, obtained from `PetscViewerHDF5Open()`\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `PetscViewerBinaryOpen()`, `VecView()`, `MatLoad()`\n\n# External Links\n$(_doc_external(\"Vec/VecLoad\"))\n\"\"\"\nfunction VecLoad(petsclib::PetscLibType, vec::PetscVec, viewer::PetscViewer) end\n\n@for_petsc function VecLoad(petsclib::$UnionPetscLib, vec::PetscVec, viewer::PetscViewer )\n\n    @chk ccall(\n               (:VecLoad, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscViewer),\n               vec, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecReciprocal(petsclib::PetscLibType,vec::PetscVec) \nReplaces each component of a vector by its reciprocal.\n\nLogically Collective\n\nInput Parameter:\n- `vec` - the vector\n\nOutput Parameter:\n- `vec` - the vector reciprocal\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecLog()`, `VecExp()`, `VecSqrtAbs()`\n\n# External Links\n$(_doc_external(\"Vec/VecReciprocal\"))\n\"\"\"\nfunction VecReciprocal(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecReciprocal(petsclib::$UnionPetscLib, vec::PetscVec )\n\n    @chk ccall(\n               (:VecReciprocal, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecZeroEntries(petsclib::PetscLibType,vec::PetscVec) \nputs a `0.0` in each element of a vector\n\nLogically Collective\n\nInput Parameter:\n- `vec` - The vector\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecCreate()`, `VecSetOptionsPrefix()`, `VecSet()`, `VecSetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecZeroEntries\"))\n\"\"\"\nfunction VecZeroEntries(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecZeroEntries(petsclib::$UnionPetscLib, vec::PetscVec )\n\n    @chk ccall(\n               (:VecZeroEntries, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tbs::PetscInt = VecGetBlockSize(petsclib::PetscLibType,v::PetscVec) \nGets the blocksize for the vector, i.e. what is used for `VecSetValuesBlocked()`\nand `VecSetValuesBlockedLocal()`.\n\nNot Collective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `bs` - the blocksize\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecSetValuesBlocked()`, `VecSetLocalToGlobalMapping()`, `VecSetBlockSize()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetBlockSize\"))\n\"\"\"\nfunction VecGetBlockSize(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecGetBlockSize(petsclib::$UnionPetscLib, v::PetscVec )\n\tbs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecGetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}),\n               v, bs_,\n              )\n\n\tbs = bs_[]\n\n\treturn bs\nend \n\n\"\"\"\n\tVecAppendOptionsPrefix(petsclib::PetscLibType,v::PetscVec, prefix::Vector{Cchar}) \nAppends to the prefix used for searching for all\n`Vec` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `v`      - the `Vec` context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecGetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Vec/VecAppendOptionsPrefix\"))\n\"\"\"\nfunction VecAppendOptionsPrefix(petsclib::PetscLibType, v::PetscVec, prefix::Vector{Cchar}) end\n\n@for_petsc function VecAppendOptionsPrefix(petsclib::$UnionPetscLib, v::PetscVec, prefix::Vector{Cchar} )\n\n    @chk ccall(\n               (:VecAppendOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Cchar}),\n               v, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGetOptionsPrefix(petsclib::PetscLibType,v::PetscVec, prefix::Vector{Cchar}) \nSets the prefix used for searching for all\nVec options in the database.\n\nNot Collective\n\nInput Parameter:\n- `v` - the `Vec` context\n\nOutput Parameter:\n- `prefix` - pointer to the prefix string used\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetOptionsPrefix\"))\n\"\"\"\nfunction VecGetOptionsPrefix(petsclib::PetscLibType, v::PetscVec, prefix::Vector{Cchar}) end\n\n@for_petsc function VecGetOptionsPrefix(petsclib::$UnionPetscLib, v::PetscVec, prefix::Vector{Cchar} )\n\tprefix_ = Ref(pointer(prefix))\n\n    @chk ccall(\n               (:VecGetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Ptr{Cchar}}),\n               v, prefix_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGetState(petsclib::PetscLibType,v::PetscVec, state::PetscObjectState) \nGets the state of a `Vec`.\n\nNot Collective\n\nInput Parameter:\n- `v` - the `Vec` context\n\nOutput Parameter:\n- `state` - the object state\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecCreate()`, `PetscObjectStateGet()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetState\"))\n\"\"\"\nfunction VecGetState(petsclib::PetscLibType, v::PetscVec, state::PetscObjectState) end\n\n@for_petsc function VecGetState(petsclib::$UnionPetscLib, v::PetscVec, state::PetscObjectState )\n\n    @chk ccall(\n               (:VecGetState, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{PetscObjectState}),\n               v, state,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecCopy(petsclib::PetscLibType,x::PetscVec, y::PetscVec) \nCopies a vector `y = x`\n\nLogically Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `y` - the copy\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecDuplicate()`\n\n# External Links\n$(_doc_external(\"Vec/VecCopy\"))\n\"\"\"\nfunction VecCopy(petsclib::PetscLibType, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecCopy(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecCopy, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec),\n               x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGetLayout(petsclib::PetscLibType,x::PetscVec, map::PetscLayout) \nget `PetscLayout` describing a vector layout\n\nNot Collective\n\nInput Parameter:\n- `x` - the vector\n\nOutput Parameter:\n- `map` - the layout\n\nLevel: developer\n\n-seealso: [](ch_vectors), `PetscLayout`, `Vec`, `VecGetSize()`, `VecGetOwnershipRange()`, `VecGetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetLayout\"))\n\"\"\"\nfunction VecGetLayout(petsclib::PetscLibType, x::PetscVec, map::PetscLayout) end\n\n@for_petsc function VecGetLayout(petsclib::$UnionPetscLib, x::PetscVec, map::PetscLayout )\n\n    @chk ccall(\n               (:VecGetLayout, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{PetscLayout}),\n               x, map,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecFlag(petsclib::PetscLibType,xin::PetscVec, flg::PetscInt) \nset infinity into the local part of the vector on any subset of MPI processes\n\nLogically Collective\n\nInput Parameters:\n- `xin` - the vector, can be `NULL` but only if on all processes\n- `flg` - indicates if this processes portion of the vector should be set to infinity\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `PetscLayout`, `VecGetLayout()`, `VecGetSize()`, `VecGetOwnershipRange()`, `VecGetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"Vec/VecFlag\"))\n\"\"\"\nfunction VecFlag(petsclib::PetscLibType, xin::PetscVec, flg::PetscInt) end\n\n@for_petsc function VecFlag(petsclib::$UnionPetscLib, xin::PetscVec, flg::$PetscInt )\n\n    @chk ccall(\n               (:VecFlag, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt),\n               xin, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecBindToCPU(petsclib::PetscLibType,v::PetscVec, flg::PetscBool) \nmarks a vector to temporarily stay on the CPU and perform computations on the CPU\n\nLogically collective\n\nInput Parameters:\n- `v`   - the vector\n- `flg` - bind to the CPU if value of `PETSC_TRUE`\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecBoundToCPU()`\n\n# External Links\n$(_doc_external(\"Vec/VecBindToCPU\"))\n\"\"\"\nfunction VecBindToCPU(petsclib::PetscLibType, v::PetscVec, flg::PetscBool) end\n\n@for_petsc function VecBindToCPU(petsclib::$UnionPetscLib, v::PetscVec, flg::PetscBool )\n\n    @chk ccall(\n               (:VecBindToCPU, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscBool),\n               v, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = VecBoundToCPU(petsclib::PetscLibType,v::PetscVec) \nquery if a vector is bound to the CPU\n\nNot collective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `flg` - the logical flag\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecBindToCPU()`\n\n# External Links\n$(_doc_external(\"Vec/VecBoundToCPU\"))\n\"\"\"\nfunction VecBoundToCPU(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecBoundToCPU(petsclib::$UnionPetscLib, v::PetscVec )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecBoundToCPU, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{PetscBool}),\n               v, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tflg::PetscBool = VecGetBindingPropagates(petsclib::PetscLibType,v::PetscVec) \nGets whether the state of being bound to the CPU for a GPU vector type propagates to child and some other associated objects\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `flg` - flag indicating whether the boundtocpu flag will be propagated\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecSetBindingPropagates()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetBindingPropagates\"))\n\"\"\"\nfunction VecGetBindingPropagates(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecGetBindingPropagates(petsclib::$UnionPetscLib, v::PetscVec )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecGetBindingPropagates, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{PetscBool}),\n               v, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tVecGetPinnedMemoryMin(petsclib::PetscLibType,v::PetscVec, mbytes::Csize_t) \nGet the minimum data size for which pinned memory will be used for host (CPU) allocations.\n\nLogically Collective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `mbytes` - minimum data size in bytes\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecSetPinnedMemoryMin()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetPinnedMemoryMin\"))\n\"\"\"\nfunction VecGetPinnedMemoryMin(petsclib::PetscLibType, v::PetscVec, mbytes::Csize_t) end\n\n@for_petsc function VecGetPinnedMemoryMin(petsclib::$UnionPetscLib, v::PetscVec, mbytes::Csize_t )\n\n    @chk ccall(\n               (:VecGetPinnedMemoryMin, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Csize_t}),\n               v, mbytes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGetOffloadMask(petsclib::PetscLibType,v::PetscVec, mask::PetscOffloadMask) \nGet the offload mask of a `Vec`\n\nNot Collective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `mask` - corresponding `PetscOffloadMask` enum value.\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecCreateSeqCUDA()`, `VecCreateSeqViennaCL()`, `VecGetArray()`, `VecGetType()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetOffloadMask\"))\n\"\"\"\nfunction VecGetOffloadMask(petsclib::PetscLibType, v::PetscVec, mask::PetscOffloadMask) end\n\n@for_petsc function VecGetOffloadMask(petsclib::$UnionPetscLib, v::PetscVec, mask::PetscOffloadMask )\n\n    @chk ccall(\n               (:VecGetOffloadMask, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{PetscOffloadMask}),\n               v, mask,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnorm::PetscReal,norm_loc::PetscInt,norma::PetscReal,norma_loc::PetscInt,normr::PetscReal,normr_loc::PetscInt = VecErrorWeightedNorms(petsclib::PetscLibType,U::PetscVec, Y::PetscVec, E::PetscVec, wnormtype::NormType, atol::PetscReal, vatol::PetscVec, rtol::PetscReal, vrtol::PetscVec, ignore_max::PetscReal) \ncompute a weighted norm of the difference between two vectors\n\nCollective\n\nInput Parameters:\n- `U`          - first vector to be compared\n- `Y`          - second vector to be compared\n- `E`          - optional third vector representing the error (if not provided, the error is ||U-Y||)\n- `wnormtype`  - norm type\n- `atol`       - scalar for absolute tolerance\n- `vatol`      - vector representing per-entry absolute tolerances (can be `NULL`)\n- `rtol`       - scalar for relative tolerance\n- `vrtol`      - vector representing per-entry relative tolerances (can be `NULL`)\n- `ignore_max` - ignore values smaller than this value in absolute terms.\n\nOutput Parameters:\n- `norm`      - weighted norm\n- `norm_loc`  - number of vector locations used for the weighted norm\n- `norma`     - weighted norm based on the absolute tolerance\n- `norma_loc` - number of vector locations used for the absolute weighted norm\n- `normr`     - weighted norm based on the relative tolerance\n- `normr_loc` - number of vector locations used for the relative weighted norm\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `NormType`, `TSErrorWeightedNorm()`, `TSErrorWeightedENorm()`\n\n# External Links\n$(_doc_external(\"Vec/VecErrorWeightedNorms\"))\n\"\"\"\nfunction VecErrorWeightedNorms(petsclib::PetscLibType, U::PetscVec, Y::PetscVec, E::PetscVec, wnormtype::NormType, atol::PetscReal, vatol::PetscVec, rtol::PetscReal, vrtol::PetscVec, ignore_max::PetscReal) end\n\n@for_petsc function VecErrorWeightedNorms(petsclib::$UnionPetscLib, U::PetscVec, Y::PetscVec, E::PetscVec, wnormtype::NormType, atol::$PetscReal, vatol::PetscVec, rtol::$PetscReal, vrtol::PetscVec, ignore_max::$PetscReal )\n\tnorm_ = Ref{$PetscReal}()\n\tnorm_loc_ = Ref{$PetscInt}()\n\tnorma_ = Ref{$PetscReal}()\n\tnorma_loc_ = Ref{$PetscInt}()\n\tnormr_ = Ref{$PetscReal}()\n\tnormr_loc_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecErrorWeightedNorms, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, NormType, $PetscReal, CVec, $PetscReal, CVec, $PetscReal, Ptr{$PetscReal}, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscInt}, Ptr{$PetscReal}, Ptr{$PetscInt}),\n               U, Y, E, wnormtype, atol, vatol, rtol, vrtol, ignore_max, norm_, norm_loc_, norma_, norma_loc_, normr_, normr_loc_,\n              )\n\n\tnorm = norm_[]\n\tnorm_loc = norm_loc_[]\n\tnorma = norma_[]\n\tnorma_loc = norma_loc_[]\n\tnormr = normr_[]\n\tnormr_loc = normr_loc_[]\n\n\treturn norm,norm_loc,norma,norma_loc,normr,normr_loc\nend \n\n\"\"\"\n\tVecRegisterAll(petsclib::PetscLibType) \nRegisters all of the vector types in the `Vec` package.\n\nNot Collective\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecRegister()`, `VecRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecRegisterAll\"))\n\"\"\"\nfunction VecRegisterAll(petsclib::PetscLibType) end\n\n@for_petsc function VecRegisterAll(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:VecRegisterAll, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::VecType = VecGetType(petsclib::PetscLibType,vec::PetscVec) \nGets the vector type name (as a string) from a `Vec`.\n\nNot Collective\n\nInput Parameter:\n- `vec` - The vector\n\nOutput Parameter:\n- `type` - The `VecType` of the vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetType\"))\n\"\"\"\nfunction VecGetType(petsclib::PetscLibType, vec::AbstractPetscVec) end\n\n@for_petsc function VecGetType(petsclib::$UnionPetscLib, vec::AbstractPetscVec )\n\ttype_ = Ref{VecType}()\n\n    @chk ccall(\n               (:VecGetType, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{VecType}),\n               vec, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tVecRegister(petsclib::PetscLibType,sname::Vector{Cchar}, fnc::external) \nAdds a new vector component implementation\n\nNot Collective, No Fortran Support\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\n-seealso: `VecRegisterAll()`, `VecRegisterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecRegister\"))\n\"\"\"\nfunction VecRegister(petsclib::PetscLibType, sname::Vector{Cchar}, fnc::external) end\n\n@for_petsc function VecRegister(petsclib::$UnionPetscLib, sname::Vector{Cchar}, fnc::external )\n\n    @chk ccall(\n               (:VecRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecInitializePackage(petsclib::PetscLibType) \nThis function initializes everything in the `Vec` package. It is called\nfrom PetscDLLibraryRegister_petscvec() when using dynamic libraries, and on the first call to `VecCreate()`\nwhen using shared or static libraries.\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Vec/VecInitializePackage\"))\n\"\"\"\nfunction VecInitializePackage(petsclib::PetscLibType) end\n\n@for_petsc function VecInitializePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:VecInitializePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecFinalizePackage(petsclib::PetscLibType) \nThis function finalizes everything in the Vec package. It is called\nfrom PetscFinalize().\n\nLevel: developer\n\n-seealso: `PetscInitialize()`\n\n# External Links\n$(_doc_external(\"Vec/VecFinalizePackage\"))\n\"\"\"\nfunction VecFinalizePackage(petsclib::PetscLibType) end\n\n@for_petsc function VecFinalizePackage(petsclib::$UnionPetscLib)\n\n    @chk ccall(\n               (:VecFinalizePackage, $petsc_library),\n               PetscErrorCode,\n               (),\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvec::PetscVec = VecCreate(petsclib::PetscLibType,comm::MPI_Comm) \nCreates an empty vector object. The type can then be set with `VecSetType()`,\nor `VecSetFromOptions().`\n\nCollective\n\nInput Parameter:\n- `comm` - The communicator for the vector object\n\nOutput Parameter:\n- `vec` - The vector object\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecSetType()`, `VecSetSizes()`, `VecCreateMPIWithArray()`, `VecCreateMPI()`, `VecDuplicate()`,\n`VecDuplicateVecs()`, `VecCreateGhost()`, `VecCreateSeq()`, `VecPlaceArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreate\"))\n\"\"\"\nfunction VecCreate(petsclib::PetscLibType, comm::MPI_Comm) end\n\n@for_petsc function VecCreate(petsclib::$UnionPetscLib, comm::MPI_Comm )\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreate, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{CVec}),\n               comm, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tvec::PetscVec = VecCreateFromOptions(petsclib::PetscLibType,comm::MPI_Comm, prefix::Vector{Cchar}, bs::PetscInt, m::PetscInt, n::PetscInt) \nCreates a vector whose type is set from the options database\n\nCollective\n\nInput Parameters:\n- `comm`   - The communicator for the vector object\n- `prefix` - [optional] prefix for the options database\n- `bs`     - the block size (commonly 1)\n- `m`      - the local size (or `PETSC_DECIDE`)\n- `n`      - the global size (or `PETSC_DETERMINE`)\n\nOutput Parameter:\n- `vec` - The vector object\n\nOptions Database Keys:\n- `-vec_type` - see `VecType`, for example `seq`, `mpi`, `cuda`, defaults to `mpi`\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecSetType()`, `VecSetSizes()`, `VecCreateMPIWithArray()`, `VecCreateMPI()`, `VecDuplicate()`,\n`VecDuplicateVecs()`, `VecCreateGhost()`, `VecCreateSeq()`, `VecPlaceArray()`, `VecCreate()`, `VecType`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateFromOptions\"))\n\"\"\"\nfunction VecCreateFromOptions(petsclib::PetscLibType, comm::MPI_Comm, prefix::Vector{Cchar}, bs::PetscInt, m::PetscInt, n::PetscInt) end\n\n@for_petsc function VecCreateFromOptions(petsclib::$UnionPetscLib, comm::MPI_Comm, prefix::Vector{Cchar}, bs::$PetscInt, m::$PetscInt, n::$PetscInt )\n\tvec_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateFromOptions, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, Ptr{Cchar}, $PetscInt, $PetscInt, $PetscInt, Ptr{CVec}),\n               comm, prefix, bs, m, n, vec_,\n              )\n\n\tvec = PetscVec(vec_[], petsclib)\n\n\treturn vec\nend \n\n\"\"\"\n\tv::PetscVec = VecCreateMPI(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a parallel vector.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator to use\n- `n`    - local vector length (or `PETSC_DECIDE` to have calculated if `N` is given)\n- `N`    - global vector length (or `PETSC_DETERMINE` to have calculated if `n` is given)\n\nOutput Parameter:\n- `v` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateSeq()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`, `VecCreateGhost()`,\n`VecCreateMPIWithArray()`, `VecCreateGhostWithArray()`, `VecMPISetGhost()`, `PetscLayout`,\n`VecGetOwnershipRange()`, `VecGetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateMPI\"))\n\"\"\"\nfunction VecCreateMPI(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function VecCreateMPI(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateMPI, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CVec}),\n               comm, n, N, v_,\n              )\n\n\tv = PetscVec(v_[], petsclib)\n\n\treturn v\nend \n\n\"\"\"\n\tl::PetscVec = VecGhostGetLocalForm(petsclib::PetscLibType,g::PetscVec) \nObtains the local ghosted representation of\na parallel vector (obtained with `VecCreateGhost()`, `VecCreateGhostWithArray()` or `VecCreateSeq()`).\n\nLogically Collective\n\nInput Parameter:\n- `g` - the global vector\n\nOutput Parameter:\n- `l` - the local (ghosted) representation,`NULL` if `g` is not ghosted\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `VecGhostUpdateBegin()`, `VecGhostUpdateEnd()`, `Vec`, `VecType`, `VecCreateGhost()`, `VecGhostRestoreLocalForm()`, `VecCreateGhostWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecGhostGetLocalForm\"))\n\"\"\"\nfunction VecGhostGetLocalForm(petsclib::PetscLibType, g::PetscVec) end\n\n@for_petsc function VecGhostGetLocalForm(petsclib::$UnionPetscLib, g::PetscVec)\n\tl_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecGhostGetLocalForm, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{CVec}),\n               g, l_,\n              )\n\n\tl = PetscVec(l_[], petsclib)\n\n\n\treturn l\nend \n\n\"\"\"\n\tflg::PetscBool = VecGhostIsLocalForm(petsclib::PetscLibType,g::PetscVec, l::PetscVec) \nChecks if a given vector is the local form of a global vector\n\nNot Collective\n\nInput Parameters:\n- `g` - the global vector\n- `l` - the local vector\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if `l` is the local form\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateGhost()`, `VecGhostRestoreLocalForm()`, `VecCreateGhostWithArray()`, `VecGhostGetLocalForm()`\n\n# External Links\n$(_doc_external(\"Vec/VecGhostIsLocalForm\"))\n\"\"\"\nfunction VecGhostIsLocalForm(petsclib::PetscLibType, g::PetscVec, l::PetscVec) end\n\n@for_petsc function VecGhostIsLocalForm(petsclib::$UnionPetscLib, g::PetscVec, l::PetscVec )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecGhostIsLocalForm, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{PetscBool}),\n               g, l, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tVecGhostRestoreLocalForm(petsclib::PetscLibType,g::PetscVec, l::PetscVec) \nRestores the local ghosted representation of\na parallel vector obtained with `VecGhostGetLocalForm()`.\n\nLogically Collective\n\nInput Parameters:\n- `g` - the global vector\n- `l` - the local (ghosted) representation\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `VecGhostUpdateBegin()`, `VecGhostUpdateEnd()`, `Vec`, `VecType`, `VecCreateGhost()`, `VecGhostGetLocalForm()`, `VecCreateGhostWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecGhostRestoreLocalForm\"))\n\"\"\"\nfunction VecGhostRestoreLocalForm(petsclib::PetscLibType, g::PetscVec, l::PetscVec) end\n\n@for_petsc function VecGhostRestoreLocalForm(petsclib::$UnionPetscLib, g::PetscVec, l::PetscVec )\n\tl_ = Ref(l.ptr)\n\n    @chk ccall(\n               (:VecGhostRestoreLocalForm, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{CVec}),\n               g, l_,\n              )\n\n\tl.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGhostUpdateBegin(petsclib::PetscLibType,g::PetscVec, insertmode::InsertMode, scattermode::ScatterMode) \nBegins the vector scatter to update the vector from\nlocal representation to global or global representation to local.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `g`           - the vector (obtained with `VecCreateGhost()` or `VecDuplicate()`)\n- `insertmode`  - one of `ADD_VALUES`, `MAX_VALUES`, `MIN_VALUES` or `INSERT_VALUES`\n- `scattermode` - one of `SCATTER_FORWARD` (update ghosts) or `SCATTER_REVERSE` (update local values from ghosts)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateGhost()`, `VecGhostUpdateEnd()`, `VecGhostGetLocalForm()`,\n`VecGhostRestoreLocalForm()`, `VecCreateGhostWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecGhostUpdateBegin\"))\n\"\"\"\nfunction VecGhostUpdateBegin(petsclib::PetscLibType, g::PetscVec, insertmode::InsertMode, scattermode::ScatterMode) end\n\n@for_petsc function VecGhostUpdateBegin(petsclib::$UnionPetscLib, g::PetscVec, insertmode::InsertMode, scattermode::ScatterMode )\n\n    @chk ccall(\n               (:VecGhostUpdateBegin, $petsc_library),\n               PetscErrorCode,\n               (CVec, InsertMode, ScatterMode),\n               g, insertmode, scattermode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecGhostUpdateEnd(petsclib::PetscLibType,g::PetscVec, insertmode::InsertMode, scattermode::ScatterMode) \nEnd the vector scatter to update the vector from\nlocal representation to global or global representation to local.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `g`           - the vector (obtained with `VecCreateGhost()` or `VecDuplicate()`)\n- `insertmode`  - one of `ADD_VALUES`, `MAX_VALUES`, `MIN_VALUES` or `INSERT_VALUES`\n- `scattermode` - one of `SCATTER_FORWARD` (update ghosts) or `SCATTER_REVERSE` (update local values from ghosts)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateGhost()`, `VecGhostUpdateBegin()`, `VecGhostGetLocalForm()`,\n`VecGhostRestoreLocalForm()`, `VecCreateGhostWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecGhostUpdateEnd\"))\n\"\"\"\nfunction VecGhostUpdateEnd(petsclib::PetscLibType, g::PetscVec, insertmode::InsertMode, scattermode::ScatterMode) end\n\n@for_petsc function VecGhostUpdateEnd(petsclib::$UnionPetscLib, g::PetscVec, insertmode::InsertMode, scattermode::ScatterMode )\n\n    @chk ccall(\n               (:VecGhostUpdateEnd, $petsc_library),\n               PetscErrorCode,\n               (CVec, InsertMode, ScatterMode),\n               g, insertmode, scattermode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvv::PetscVec = VecCreateMPIWithArray(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, array::Vector{PetscScalar}) \nCreates a parallel, array\nwhere the user provides the array space to store the vector values.\n\nCollective\n\nInput Parameters:\n- `comm`  - the MPI communicator to use\n- `bs`    - block size, same meaning as `VecSetBlockSize()`\n- `n`     - local vector length, cannot be `PETSC_DECIDE`\n- `N`     - global vector length (or `PETSC_DETERMINE` to have calculated)\n- `array` - the user provided array to store the vector values\n\nOutput Parameter:\n- `vv` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateSeqWithArray()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`, `VecCreateGhost()`,\n`VecCreateMPI()`, `VecCreateGhostWithArray()`, `VecPlaceArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateMPIWithArray\"))\n\"\"\"\nfunction VecCreateMPIWithArray(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, array::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateMPIWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, N::$PetscInt, array::Vector{$PetscScalar} )\n\tvv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateMPIWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{CVec}),\n               comm, bs, n, N, array, vv_,\n              )\n\n\tvv = PetscVec(vv_[], petsclib)\n\n\treturn vv\nend \n\n\"\"\"\n\tvv::PetscVec = VecCreateGhostWithArray(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}, array::Vector{PetscScalar}) \nCreates a parallel vector with ghost padding on each processor;\nthe caller allocates the array space.\n\nCollective\n\nInput Parameters:\n- `comm`   - the MPI communicator to use\n- `n`      - local vector length\n- `N`      - global vector length (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `nghost` - number of local ghost points\n- `ghosts` - global indices of ghost points (or `NULL` if not needed), these do not need to be in increasing order (sorted)\n- `array`  - the space to store the vector values (as long as n + nghost)\n\nOutput Parameter:\n- `vv` - the global vector representation (without ghost points as part of vector)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreate()`, `VecGhostGetLocalForm()`, `VecGhostRestoreLocalForm()`,\n`VecCreateGhost()`, `VecCreateSeqWithArray()`, `VecCreateMPIWithArray()`,\n`VecCreateGhostBlock()`, `VecCreateGhostBlockWithArray()`, `VecMPISetGhost()`, `VecGhostUpdateBegin()`, `VecGhostUpdateEnd()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateGhostWithArray\"))\n\"\"\"\nfunction VecCreateGhostWithArray(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}, array::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateGhostWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt, nghost::$PetscInt, ghosts::Vector{$PetscInt}, array::Vector{$PetscScalar} )\n\tvv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateGhostWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CVec}),\n               comm, n, N, nghost, ghosts, array, vv_,\n              )\n\n\tvv = PetscVec(vv_[], petsclib)\n\n\treturn vv\nend \n\n\"\"\"\n\tVecGhostGetGhostIS(petsclib::PetscLibType,X::PetscVec, ghost::IS) \nReturn ghosting indices of a ghost vector\n\nInput Parameters:\n- `X` - ghost vector\n\nOutput Parameter:\n- `ghost` - ghosting indices\n\nLevel: beginner\n\n-seealso: `VecCreateGhostWithArray()`, `VecCreateMPIWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecGhostGetGhostIS\"))\n\"\"\"\nfunction VecGhostGetGhostIS(petsclib::PetscLibType, X::PetscVec, ghost::IS) end\n\n@for_petsc function VecGhostGetGhostIS(petsclib::$UnionPetscLib, X::PetscVec, ghost::IS )\n\n    @chk ccall(\n               (:VecGhostGetGhostIS, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{IS}),\n               X, ghost,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvv::PetscVec = VecCreateGhost(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}) \nCreates a parallel vector with ghost padding on each processor.\n\nCollective\n\nInput Parameters:\n- `comm`   - the MPI communicator to use\n- `n`      - local vector length\n- `N`      - global vector length (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `nghost` - number of local ghost points\n- `ghosts` - global indices of ghost points, these do not need to be in increasing order (sorted)\n\nOutput Parameter:\n- `vv` - the global vector representation (without ghost points as part of vector)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateSeq()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`, `VecCreateMPI()`,\n`VecGhostGetLocalForm()`, `VecGhostRestoreLocalForm()`, `VecGhostUpdateBegin()`,\n`VecCreateGhostWithArray()`, `VecCreateMPIWithArray()`, `VecGhostUpdateEnd()`,\n`VecCreateGhostBlock()`, `VecCreateGhostBlockWithArray()`, `VecMPISetGhost()`\n\n\n# External Links\n$(_doc_external(\"Vec/VecCreateGhost\"))\n\"\"\"\nfunction VecCreateGhost(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}) end\n\n@for_petsc function VecCreateGhost(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt, nghost::$PetscInt, ghosts::Vector{$PetscInt} )\n\tvv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateGhost, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CVec}),\n               comm, n, N, nghost, ghosts, vv_,\n              )\n\n\tvv = PetscVec(vv_[], petsclib)\n\n\treturn vv\nend \n\n\"\"\"\n\tVecMPISetGhost(petsclib::PetscLibType,vv::PetscVec, nghost::PetscInt, ghosts::Vector{PetscInt}) \nSets the ghost points for an MPI ghost vector\n\nCollective\n\nInput Parameters:\n- `vv`     - the MPI vector\n- `nghost` - number of local ghost points\n- `ghosts` - global indices of ghost points, these do not need to be in increasing order (sorted)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateSeq()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`, `VecCreateMPI()`,\n`VecGhostGetLocalForm()`, `VecGhostRestoreLocalForm()`, `VecGhostUpdateBegin()`,\n`VecCreateGhostWithArray()`, `VecCreateMPIWithArray()`, `VecGhostUpdateEnd()`,\n`VecCreateGhostBlock()`, `VecCreateGhostBlockWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecMPISetGhost\"))\n\"\"\"\nfunction VecMPISetGhost(petsclib::PetscLibType, vv::PetscVec, nghost::PetscInt, ghosts::Vector{PetscInt}) end\n\n@for_petsc function VecMPISetGhost(petsclib::$UnionPetscLib, vv::PetscVec, nghost::$PetscInt, ghosts::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:VecMPISetGhost, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}),\n               vv, nghost, ghosts,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvv::PetscVec = VecCreateGhostBlockWithArray(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}, array::Vector{PetscScalar}) \nCreates a parallel vector with ghost padding on each processor;\nthe caller allocates the array space. Indices in the ghost region are based on blocks.\n\nCollective\n\nInput Parameters:\n- `comm`   - the MPI communicator to use\n- `bs`     - block size\n- `n`      - local vector length\n- `N`      - global vector length (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `nghost` - number of local ghost blocks\n- `ghosts` - global indices of ghost blocks (or `NULL` if not needed), counts are by block not by index, these do not need to be in increasing order (sorted)\n- `array`  - the space to store the vector values (as long as n + nghost*bs)\n\nOutput Parameter:\n- `vv` - the global vector representation (without ghost points as part of vector)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreate()`, `VecGhostGetLocalForm()`, `VecGhostRestoreLocalForm()`,\n`VecCreateGhost()`, `VecCreateSeqWithArray()`, `VecCreateMPIWithArray()`,\n`VecCreateGhostWithArray()`, `VecCreateGhostBlock()`, `VecGhostUpdateBegin()`, `VecGhostUpdateEnd()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateGhostBlockWithArray\"))\n\"\"\"\nfunction VecCreateGhostBlockWithArray(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}, array::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateGhostBlockWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, N::$PetscInt, nghost::$PetscInt, ghosts::Vector{$PetscInt}, array::Vector{$PetscScalar} )\n\tvv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateGhostBlockWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, Ptr{CVec}),\n               comm, bs, n, N, nghost, ghosts, array, vv_,\n              )\n\n\tvv = PetscVec(vv_[], petsclib)\n\n\treturn vv\nend \n\n\"\"\"\n\tvv::PetscVec = VecCreateGhostBlock(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}) \nCreates a parallel vector with ghost padding on each processor.\nThe indicing of the ghost points is done with blocks.\n\nCollective\n\nInput Parameters:\n- `comm`   - the MPI communicator to use\n- `bs`     - the block size\n- `n`      - local vector length\n- `N`      - global vector length (or `PETSC_DETERMINE` to have calculated if `n` is given)\n- `nghost` - number of local ghost blocks\n- `ghosts` - global indices of ghost blocks, counts are by block, not by individual index, these do not need to be in increasing order (sorted)\n\nOutput Parameter:\n- `vv` - the global vector representation (without ghost points as part of vector)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateSeq()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`, `VecCreateMPI()`,\n`VecGhostGetLocalForm()`, `VecGhostRestoreLocalForm()`, `VecGhostUpdateBegin()`, `VecGhostUpdateEnd()`\n`VecCreateGhostWithArray()`, `VecCreateMPIWithArray()`, `VecCreateGhostBlockWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateGhostBlock\"))\n\"\"\"\nfunction VecCreateGhostBlock(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, nghost::PetscInt, ghosts::Vector{PetscInt}) end\n\n@for_petsc function VecCreateGhostBlock(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, N::$PetscInt, nghost::$PetscInt, ghosts::Vector{$PetscInt} )\n\tvv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateGhostBlock, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscInt}, Ptr{CVec}),\n               comm, bs, n, N, nghost, ghosts, vv_,\n              )\n\n\tvv = PetscVec(vv_[], petsclib)\n\n\treturn vv\nend \n\n\"\"\"\n\tv::PetscVec = VecCreateMPIKokkosWithArray(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, darray::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"Vec/VecCreateMPIKokkosWithArray\"))\n\"\"\"\nfunction VecCreateMPIKokkosWithArray(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, darray::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateMPIKokkosWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, N::$PetscInt, darray::Vector{$PetscScalar} )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateMPIKokkosWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{CVec}),\n               comm, bs, n, N, darray, v_,\n              )\n\n\tv = PetscVec(v_[], petsclib)\n\n\treturn v\nend \n\n\"\"\"\n\tarray::ViennaCLVector,vv::PetscVec = VecCreateMPIViennaCLWithArray(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/VecCreateMPIViennaCLWithArray\"))\n\"\"\"\nfunction VecCreateMPIViennaCLWithArray(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt) end\n\n@for_petsc function VecCreateMPIViennaCLWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, N::$PetscInt )\n\tarray_ = Ref{ViennaCLVector}()\n\tvv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateMPIViennaCLWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{ViennaCLVector}, Ptr{CVec}),\n               comm, bs, n, N, array_, vv_,\n              )\n\n\tarray = array_[]\n\tvv = PetscVec(vv_[], petsclib)\n\n\treturn array,vv\nend \n\n\"\"\"\n\tviennaclvec::ViennaCLVector,vv::PetscVec = VecCreateMPIViennaCLWithArrays(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, cpuarray::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"Vec/VecCreateMPIViennaCLWithArrays\"))\n\"\"\"\nfunction VecCreateMPIViennaCLWithArrays(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, N::PetscInt, cpuarray::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateMPIViennaCLWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, N::$PetscInt, cpuarray::Vector{$PetscScalar} )\n\tviennaclvec_ = Ref{ViennaCLVector}()\n\tvv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateMPIViennaCLWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{ViennaCLVector}, Ptr{CVec}),\n               comm, bs, n, N, cpuarray, viennaclvec_, vv_,\n              )\n\n\tviennaclvec = viennaclvec_[]\n\tvv = PetscVec(vv_[], petsclib)\n\n\treturn viennaclvec,vv\nend \n\n\"\"\"\n\tv::PetscVec = VecCreateSeq(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt) \nCreates a standard, sequential array\n\nCollective\n\nInput Parameters:\n- `comm` - the communicator, should be `PETSC_COMM_SELF`\n- `n`    - the vector length\n\nOutput Parameter:\n- `v` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateMPI()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`, `VecCreateGhost()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeq\"))\n\"\"\"\nfunction VecCreateSeq(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt) end\n\n@for_petsc function VecCreateSeq(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateSeq, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{CVec}),\n               comm, n, v_,\n              )\n\n\tv = PetscVec(v_[], petsclib)\n\n\treturn v\nend \n\n\"\"\"\n\tV::PetscVec = VecCreateSeqWithArray(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, array::Vector{PetscScalar}) \nCreates a standard,sequential array\nwhere the user provides the array space to store the vector values.\n\nCollective\n\nInput Parameters:\n- `comm`  - the communicator, should be `PETSC_COMM_SELF`\n- `bs`    - the block size\n- `n`     - the vector length\n- `array` - memory where the vector elements are to be stored.\n\nOutput Parameter:\n- `V` - the vector\n\nLevel: intermediate\n\n-seealso: `VecCreateMPIWithArray()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`VecCreateGhost()`, `VecCreateSeq()`, `VecPlaceArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeqWithArray\"))\n\"\"\"\nfunction VecCreateSeqWithArray(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, array::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateSeqWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, array::Vector{$PetscScalar} )\n\tV_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateSeqWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{CVec}),\n               comm, bs, n, array, V_,\n              )\n\n\tV = PetscVec(V_[], petsclib)\n\n\treturn V\nend \n\n\"\"\"\n\ta::PetscScalar = VecKokkosPlaceArray(petsclib::PetscLibType,v::PetscVec) \n\n# External Links\n$(_doc_external(\"Vec/VecKokkosPlaceArray\"))\n\"\"\"\nfunction VecKokkosPlaceArray(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecKokkosPlaceArray(petsclib::$UnionPetscLib, v::PetscVec )\n\ta_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:VecKokkosPlaceArray, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}),\n               v, a_,\n              )\n\n\ta = a_[]\n\n\treturn a\nend \n\n\"\"\"\n\tVecKokkosResetArray(petsclib::PetscLibType,v::PetscVec) \n\n# External Links\n$(_doc_external(\"Vec/VecKokkosResetArray\"))\n\"\"\"\nfunction VecKokkosResetArray(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecKokkosResetArray(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecKokkosResetArray, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tv::PetscVec = VecCreateSeqKokkosWithArray(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, darray::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeqKokkosWithArray\"))\n\"\"\"\nfunction VecCreateSeqKokkosWithArray(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, darray::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateSeqKokkosWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, darray::Vector{$PetscScalar} )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateSeqKokkosWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{CVec}),\n               comm, bs, n, darray, v_,\n              )\n\n\tv = PetscVec(v_[], petsclib)\n\n\treturn v\nend \n\n\"\"\"\n\tv::PetscVec = VecCreateSeqKokkos(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeqKokkos\"))\n\"\"\"\nfunction VecCreateSeqKokkos(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt) end\n\n@for_petsc function VecCreateSeqKokkos(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateSeqKokkos, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{CVec}),\n               comm, n, v_,\n              )\n\n\tv = PetscVec(v_[], petsclib)\n\n\treturn v\nend \n\n\"\"\"\n\tv::PetscVec = VecCreateSeqViennaCL(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeqViennaCL\"))\n\"\"\"\nfunction VecCreateSeqViennaCL(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt) end\n\n@for_petsc function VecCreateSeqViennaCL(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateSeqViennaCL, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{CVec}),\n               comm, n, v_,\n              )\n\n\tv = PetscVec(v_[], petsclib)\n\n\treturn v\nend \n\n\"\"\"\n\tviennaclvec::ViennaCLVector,V::PetscVec = VecCreateSeqViennaCLWithArrays(petsclib::PetscLibType,comm::MPI_Comm, bs::PetscInt, n::PetscInt, cpuarray::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeqViennaCLWithArrays\"))\n\"\"\"\nfunction VecCreateSeqViennaCLWithArrays(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, cpuarray::Vector{PetscScalar}) end\n\n@for_petsc function VecCreateSeqViennaCLWithArrays(petsclib::$UnionPetscLib, comm::MPI_Comm, bs::$PetscInt, n::$PetscInt, cpuarray::Vector{$PetscScalar} )\n\tviennaclvec_ = Ref{ViennaCLVector}()\n\tV_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateSeqViennaCLWithArrays, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{ViennaCLVector}, Ptr{CVec}),\n               comm, bs, n, cpuarray, viennaclvec_, V_,\n              )\n\n\tviennaclvec = viennaclvec_[]\n\tV = PetscVec(V_[], petsclib)\n\n\treturn viennaclvec,V\nend \n\n\"\"\"\n\tv::PetscVec = VecCreateShared(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, N::PetscInt) \nCreates a parallel vector that uses shared memory.\n\nCollective\n\nInput Parameters:\n- `comm` - the MPI communicator to use\n- `n`    - local vector length (or `PETSC_DECIDE` to have calculated if `N` is given)\n- `N`    - global vector length (or `PETSC_DECIDE` to have calculated if `n` is given)\n\nOutput Parameter:\n- `v` - the vector\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecCreateSeq()`, `VecCreate()`, `VecCreateMPI()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`VecCreateGhost()`, `VecCreateMPIWithArray()`, `VecCreateGhostWithArray()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateShared\"))\n\"\"\"\nfunction VecCreateShared(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, N::PetscInt) end\n\n@for_petsc function VecCreateShared(petsclib::$UnionPetscLib, comm::MPI_Comm, n::$PetscInt, N::$PetscInt )\n\tv_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateShared, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{CVec}),\n               comm, n, N, v_,\n              )\n\n\tv = PetscVec(v_[], petsclib)\n\n\treturn v\nend \n\n\"\"\"\n\tVecNestGetSubVec(petsclib::PetscLibType,X::PetscVec, idxm::PetscInt, sx::PetscVec) \nReturns a single, sub\n\nNot Collective\n\nInput Parameters:\n- `X`    - nest vector\n- `idxm` - index of the vector within the nest\n\nOutput Parameter:\n- `sx` - vector at index `idxm` within the nest\n\nLevel: developer\n\n-seealso: `VECNEST`,  [](ch_vectors), `Vec`, `VecType`, `VecNestGetSize()`, `VecNestGetSubVecs()`\n\n# External Links\n$(_doc_external(\"Vec/VecNestGetSubVec\"))\n\"\"\"\nfunction VecNestGetSubVec(petsclib::PetscLibType, X::PetscVec, idxm::PetscInt, sx::PetscVec) end\n\n@for_petsc function VecNestGetSubVec(petsclib::$UnionPetscLib, X::PetscVec, idxm::$PetscInt, sx::PetscVec )\n\tsx_ = Ref(sx.ptr)\n\n    @chk ccall(\n               (:VecNestGetSubVec, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{CVec}),\n               X, idxm, sx_,\n              )\n\n\tsx.ptr = C_NULL\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscInt = VecNestGetSubVecs(petsclib::PetscLibType,X::PetscVec, sx::Vector{PetscVec}) \nReturns the entire array of vectors defining a nest vector.\n\nNot Collective\n\nInput Parameter:\n- `X` - nest vector\n\nOutput Parameters:\n- `N`  - number of nested vecs\n- `sx` - array of vectors, can pass in `NULL`\n\nLevel: developer\n\n-seealso: `VECNEST`,  [](ch_vectors), `Vec`, `VecType`, `VecNestGetSize()`, `VecNestGetSubVec()`\n\n# External Links\n$(_doc_external(\"Vec/VecNestGetSubVecs\"))\n\"\"\"\nfunction VecNestGetSubVecs(petsclib::PetscLibType, X::PetscVec, sx::Vector{PetscVec}) end\n\n@for_petsc function VecNestGetSubVecs(petsclib::$UnionPetscLib, X::PetscVec, sx::Vector{PetscVec} )\n\tN_ = Ref{$PetscInt}()\n\tsx_ = Ref(pointer(sx))\n\n    @chk ccall(\n               (:VecNestGetSubVecs, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{Ptr{CVec}}),\n               X, N_, sx_,\n              )\n\n\tN = N_[]\n\n\treturn N\nend \n\n\"\"\"\n\tVecNestSetSubVec(petsclib::PetscLibType,X::PetscVec, idxm::PetscInt, sx::PetscVec) \nSet a single component vector in a nest vector at specified index.\n\nNot Collective\n\nInput Parameters:\n- `X`    - nest vector\n- `idxm` - index of the vector within the nest vector\n- `sx`   - vector at index `idxm` within the nest vector\n\nLevel: developer\n\n-seealso: `VECNEST`,  [](ch_vectors), `Vec`, `VecType`, `VecNestSetSubVecs()`, `VecNestGetSubVec()`\n\n# External Links\n$(_doc_external(\"Vec/VecNestSetSubVec\"))\n\"\"\"\nfunction VecNestSetSubVec(petsclib::PetscLibType, X::PetscVec, idxm::PetscInt, sx::PetscVec) end\n\n@for_petsc function VecNestSetSubVec(petsclib::$UnionPetscLib, X::PetscVec, idxm::$PetscInt, sx::PetscVec )\n\n    @chk ccall(\n               (:VecNestSetSubVec, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, CVec),\n               X, idxm, sx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecNestSetSubVecs(petsclib::PetscLibType,X::PetscVec, N::PetscInt, idxm::Vector{PetscInt}, sx::Vector{PetscVec}) \nSets the component vectors at the specified indices in a nest vector.\n\nNot Collective\n\nInput Parameters:\n- `X`    - nest vector\n- `N`    - number of component vecs in `sx`\n- `idxm` - indices of component vectors that are to be replaced\n- `sx`   - array of vectors\n\nLevel: developer\n\n-seealso: `VECNEST`,  [](ch_vectors), `Vec`, `VecType`, `VecNestGetSize()`, `VecNestGetSubVec()`\n\n# External Links\n$(_doc_external(\"Vec/VecNestSetSubVecs\"))\n\"\"\"\nfunction VecNestSetSubVecs(petsclib::PetscLibType, X::PetscVec, N::PetscInt, idxm::Vector{PetscInt}, sx::Vector{PetscVec}) end\n\n@for_petsc function VecNestSetSubVecs(petsclib::$UnionPetscLib, X::PetscVec, N::$PetscInt, idxm::Vector{$PetscInt}, sx::Vector{PetscVec} )\n\n    @chk ccall(\n               (:VecNestSetSubVecs, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{CVec}),\n               X, N, idxm, sx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tN::PetscInt = VecNestGetSize(petsclib::PetscLibType,X::PetscVec) \nReturns the size of the nest vector.\n\nNot Collective\n\nInput Parameter:\n- `X` - nest vector\n\nOutput Parameter:\n- `N` - number of nested vecs\n\nLevel: developer\n\n-seealso: `VECNEST`,  [](ch_vectors), `Vec`, `VecType`, `VecNestGetSubVec()`, `VecNestGetSubVecs()`\n\n# External Links\n$(_doc_external(\"Vec/VecNestGetSize\"))\n\"\"\"\nfunction VecNestGetSize(petsclib::PetscLibType, X::PetscVec) end\n\n@for_petsc function VecNestGetSize(petsclib::$UnionPetscLib, X::PetscVec )\n\tN_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecNestGetSize, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}),\n               X, N_,\n              )\n\n\tN = N_[]\n\n\treturn N\nend \n\n\"\"\"\n\tY::PetscVec = VecCreateNest(petsclib::PetscLibType,comm::MPI_Comm, nb::PetscInt, is::Vector{IS}, x::Vector{PetscVec}) \nCreates a new vector containing several nested subvectors, each stored separately\n\nCollective\n\nInput Parameters:\n- `comm` - Communicator for the new `Vec`\n- `nb`   - number of nested blocks\n- `is`   - array of `nb` index sets describing each nested block, or `NULL` to pack subvectors contiguously\n- `x`    - array of `nb` sub-vectors\n\nOutput Parameter:\n- `Y` - new vector\n\nLevel: advanced\n\n-seealso: `VECNEST`,  [](ch_vectors), `Vec`, `VecType`, `VecCreate()`, `MatCreateNest()`, `DMSetVecType()`\n\n# External Links\n$(_doc_external(\"Vec/VecCreateNest\"))\n\"\"\"\nfunction VecCreateNest(petsclib::PetscLibType, comm::MPI_Comm, nb::PetscInt, is::Vector{IS}, x::Vector{PetscVec}) end\n\n@for_petsc function VecCreateNest(petsclib::$UnionPetscLib, comm::MPI_Comm, nb::$PetscInt, is::Vector{IS}, x::Vector{PetscVec} )\n\tY_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecCreateNest, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, Ptr{IS}, Ptr{CVec}, Ptr{CVec}),\n               comm, nb, is, x, Y_,\n              )\n\n\tY = PetscVec(Y_[], petsclib)\n\n\treturn Y\nend \n\n\"\"\"\n\tVecDotBegin(petsclib::PetscLibType,x::PetscVec, y::PetscVec, result::PetscScalar) \nStarts a split phase dot product computation.\n\nInput Parameters:\n- `x`      - the first vector\n- `y`      - the second vector\n- `result` - where the result will go (can be `NULL`)\n\nLevel: advanced\n\n-seealso: `VecDotEnd()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecTDotBegin()`, `VecTDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecDotBegin\"))\n\"\"\"\nfunction VecDotBegin(petsclib::PetscLibType, x::PetscVec, y::PetscVec, result::PetscScalar) end\n\n@for_petsc function VecDotBegin(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec, result::$PetscScalar )\n\n    @chk ccall(\n               (:VecDotBegin, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscScalar}),\n               x, y, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecDotEnd(petsclib::PetscLibType,x::PetscVec, y::PetscVec, result::PetscScalar) \nEnds a split phase dot product computation.\n\nInput Parameters:\n- `x`      - the first vector (can be `NULL`)\n- `y`      - the second vector (can be `NULL`)\n- `result` - where the result will go\n\nLevel: advanced\n\n-seealso: `VecDotBegin()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecTDotBegin()`, `VecTDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecDotEnd\"))\n\"\"\"\nfunction VecDotEnd(petsclib::PetscLibType, x::PetscVec, y::PetscVec, result::PetscScalar) end\n\n@for_petsc function VecDotEnd(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec, result::$PetscScalar )\n\n    @chk ccall(\n               (:VecDotEnd, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscScalar}),\n               x, y, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTDotBegin(petsclib::PetscLibType,x::PetscVec, y::PetscVec, result::PetscScalar) \nStarts a split phase transpose dot product computation.\n\nInput Parameters:\n- `x`      - the first vector\n- `y`      - the second vector\n- `result` - where the result will go (can be `NULL`)\n\nLevel: advanced\n\n-seealso: `VecTDotEnd()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecDotBegin()`, `VecDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecTDotBegin\"))\n\"\"\"\nfunction VecTDotBegin(petsclib::PetscLibType, x::PetscVec, y::PetscVec, result::PetscScalar) end\n\n@for_petsc function VecTDotBegin(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec, result::$PetscScalar )\n\n    @chk ccall(\n               (:VecTDotBegin, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscScalar}),\n               x, y, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecTDotEnd(petsclib::PetscLibType,x::PetscVec, y::PetscVec, result::PetscScalar) \nEnds a split phase transpose dot product computation.\n\nInput Parameters:\n- `x`      - the first vector (can be `NULL`)\n- `y`      - the second vector (can be `NULL`)\n- `result` - where the result will go\n\nLevel: advanced\n\n-seealso: `VecTDotBegin()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecDotBegin()`, `VecDotEnd()`\n\n# External Links\n$(_doc_external(\"Vec/VecTDotEnd\"))\n\"\"\"\nfunction VecTDotEnd(petsclib::PetscLibType, x::PetscVec, y::PetscVec, result::PetscScalar) end\n\n@for_petsc function VecTDotEnd(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec, result::$PetscScalar )\n\n    @chk ccall(\n               (:VecTDotEnd, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscScalar}),\n               x, y, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecNormBegin(petsclib::PetscLibType,x::PetscVec, ntype::NormType, result::PetscReal) \nStarts a split phase norm computation.\n\nInput Parameters:\n- `x`      - the first vector\n- `ntype`  - norm type, one of `NORM_1`, `NORM_2`, `NORM_MAX`, `NORM_1_AND_2`\n- `result` - where the result will go (can be `NULL`)\n\nLevel: advanced\n\n-seealso: `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`, `VecDotBegin()`, `VecDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecNormBegin\"))\n\"\"\"\nfunction VecNormBegin(petsclib::PetscLibType, x::PetscVec, ntype::NormType, result::PetscReal) end\n\n@for_petsc function VecNormBegin(petsclib::$UnionPetscLib, x::PetscVec, ntype::NormType, result::$PetscReal )\n\n    @chk ccall(\n               (:VecNormBegin, $petsc_library),\n               PetscErrorCode,\n               (CVec, NormType, Ptr{$PetscReal}),\n               x, ntype, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecNormEnd(petsclib::PetscLibType,x::PetscVec, ntype::NormType, result::PetscReal) \nEnds a split phase norm computation.\n\nInput Parameters:\n- `x`      - the first vector\n- `ntype`  - norm type, one of `NORM_1`, `NORM_2`, `NORM_MAX`, `NORM_1_AND_2`\n- `result` - where the result will go\n\nLevel: advanced\n\n-seealso: `VecNormBegin()`, `VecNorm()`, `VecDot()`, `VecMDot()`, `VecDotBegin()`, `VecDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecNormEnd\"))\n\"\"\"\nfunction VecNormEnd(petsclib::PetscLibType, x::PetscVec, ntype::NormType, result::PetscReal) end\n\n@for_petsc function VecNormEnd(petsclib::$UnionPetscLib, x::PetscVec, ntype::NormType, result::$PetscReal )\n\n    @chk ccall(\n               (:VecNormEnd, $petsc_library),\n               PetscErrorCode,\n               (CVec, NormType, Ptr{$PetscReal}),\n               x, ntype, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecMDotBegin(petsclib::PetscLibType,x::PetscVec, nv::PetscInt, y::Vector{PetscVec}, result::Vector{PetscScalar}) \nStarts a split phase multiple dot product computation.\n\nInput Parameters:\n- `x`      - the first vector\n- `nv`     - number of vectors\n- `y`      - array of vectors\n- `result` - where the result will go (can be `NULL`)\n\nLevel: advanced\n\n-seealso: `VecMDotEnd()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecTDotBegin()`, `VecTDotEnd()`, `VecMTDotBegin()`, `VecMTDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecMDotBegin\"))\n\"\"\"\nfunction VecMDotBegin(petsclib::PetscLibType, x::PetscVec, nv::PetscInt, y::Vector{PetscVec}, result::Vector{PetscScalar}) end\n\n@for_petsc function VecMDotBegin(petsclib::$UnionPetscLib, x::PetscVec, nv::$PetscInt, y::Vector{PetscVec}, result::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:VecMDotBegin, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{CVec}, Ptr{$PetscScalar}),\n               x, nv, y, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tresult::Vector{PetscScalar} = VecMDotEnd(petsclib::PetscLibType,x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) \nEnds a split phase multiple dot product computation.\n\nInput Parameters:\n- `x`  - the first vector (can be `NULL`)\n- `nv` - number of vectors\n- `y`  - array of vectors (can be `NULL`)\n\nOutput Parameter:\n- `result` - where the result will go\n\nLevel: advanced\n\n-seealso: `VecMDotBegin()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecTDotBegin()`, `VecTDotEnd()`, `VecMTDotBegin()`, `VecMTDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecMDotEnd\"))\n\"\"\"\nfunction VecMDotEnd(petsclib::PetscLibType, x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) end\n\n@for_petsc function VecMDotEnd(petsclib::$UnionPetscLib, x::PetscVec, nv::$PetscInt, y::Vector{PetscVec} )\n\tresult = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecMDotEnd, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{CVec}, Ptr{$PetscScalar}),\n               x, nv, y, result,\n              )\n\n\n\treturn result\nend \n\n\"\"\"\n\tVecMTDotBegin(petsclib::PetscLibType,x::PetscVec, nv::PetscInt, y::Vector{PetscVec}, result::Vector{PetscScalar}) \nStarts a split phase transpose multiple dot product computation.\n\nInput Parameters:\n- `x`      - the first vector\n- `nv`     - number of vectors\n- `y`      - array of  vectors\n- `result` - where the result will go (can be `NULL`)\n\nLevel: advanced\n\n-seealso: `VecMTDotEnd()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecDotBegin()`, `VecDotEnd()`, `VecMDotBegin()`, `VecMDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecMTDotBegin\"))\n\"\"\"\nfunction VecMTDotBegin(petsclib::PetscLibType, x::PetscVec, nv::PetscInt, y::Vector{PetscVec}, result::Vector{PetscScalar}) end\n\n@for_petsc function VecMTDotBegin(petsclib::$UnionPetscLib, x::PetscVec, nv::$PetscInt, y::Vector{PetscVec}, result::Vector{$PetscScalar} )\n\n    @chk ccall(\n               (:VecMTDotBegin, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{CVec}, Ptr{$PetscScalar}),\n               x, nv, y, result,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tresult::Vector{PetscScalar} = VecMTDotEnd(petsclib::PetscLibType,x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) \nEnds a split phase transpose multiple dot product computation.\n\nInput Parameters:\n- `x`  - the first vector (can be `NULL`)\n- `nv` - number of vectors\n- `y`  - array of  vectors (can be `NULL`)\n\nOutput Parameter:\n- `result` - where the result will go\n\nLevel: advanced\n\n-seealso: `VecMTDotBegin()`, `VecNormBegin()`, `VecNormEnd()`, `VecNorm()`, `VecDot()`, `VecMDot()`,\n`VecDotBegin()`, `VecDotEnd()`, `VecMDotBegin()`, `VecMDotEnd()`, `PetscCommSplitReductionBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecMTDotEnd\"))\n\"\"\"\nfunction VecMTDotEnd(petsclib::PetscLibType, x::PetscVec, nv::PetscInt, y::Vector{PetscVec}) end\n\n@for_petsc function VecMTDotEnd(petsclib::$UnionPetscLib, x::PetscVec, nv::$PetscInt, y::Vector{PetscVec} )\n\tresult = Vector{$PetscScalar}(undef, nv);  \n\n    @chk ccall(\n               (:VecMTDotEnd, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{CVec}, Ptr{$PetscScalar}),\n               x, nv, y, result,\n              )\n\n\n\treturn result\nend \n\n\"\"\"\n\tVecExp(petsclib::PetscLibType,v::PetscVec) \nReplaces each component of a vector by e^x_i\n\nNot Collective\n\nInput Parameter:\n- `v` - The vector\n\nOutput Parameter:\n- `v` - The vector of exponents\n\nLevel: beginner\n\n-seealso: `Vec`, `VecLog()`, `VecAbs()`, `VecSqrtAbs()`, `VecReciprocal()`\n\n\n# External Links\n$(_doc_external(\"Vec/VecExp\"))\n\"\"\"\nfunction VecExp(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecExp(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecExp, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecLog(petsclib::PetscLibType,v::PetscVec) \nReplaces each component of a vector by log(x_i), the natural logarithm\n\nNot Collective\n\nInput Parameter:\n- `v` - The vector\n\nOutput Parameter:\n- `v` - The vector of logs\n\nLevel: beginner\n\n-seealso: `Vec`, `VecExp()`, `VecAbs()`, `VecSqrtAbs()`, `VecReciprocal()`\n\n\n# External Links\n$(_doc_external(\"Vec/VecLog\"))\n\"\"\"\nfunction VecLog(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecLog(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecLog, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecAbs(petsclib::PetscLibType,v::PetscVec) \nReplaces every element in a vector with its absolute value.\n\nLogically Collective\n\nInput Parameter:\n- `v` - the vector\n\nLevel: intermediate\n\n-seealso: `Vec`, `VecExp()`, `VecSqrtAbs()`, `VecReciprocal()`, `VecLog()`\n\n# External Links\n$(_doc_external(\"Vec/VecAbs\"))\n\"\"\"\nfunction VecAbs(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecAbs(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecAbs, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecConjugate(petsclib::PetscLibType,x::PetscVec) \nConjugates a vector. That is, replace every entry in a vector with its complex conjugate\n\nLogically Collective\n\nInput Parameter:\n- `x` - the vector\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecSet()`\n\n# External Links\n$(_doc_external(\"Vec/VecConjugate\"))\n\"\"\"\nfunction VecConjugate(petsclib::PetscLibType, x::PetscVec) end\n\n@for_petsc function VecConjugate(petsclib::$UnionPetscLib, x::PetscVec )\n\n    @chk ccall(\n               (:VecConjugate, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecImaginaryPart(petsclib::PetscLibType,v::PetscVec) \nReplaces a complex vector with its imginary part\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nLevel: beginner\n\n-seealso: `Vec`, `VecNorm()`, `VecRealPart()`\n\n# External Links\n$(_doc_external(\"Vec/VecImaginaryPart\"))\n\"\"\"\nfunction VecImaginaryPart(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecImaginaryPart(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecImaginaryPart, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecRealPart(petsclib::PetscLibType,v::PetscVec) \nReplaces a complex vector with its real part\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nLevel: beginner\n\n-seealso: `Vec`, `VecNorm()`, `VecImaginaryPart()`\n\n# External Links\n$(_doc_external(\"Vec/VecRealPart\"))\n\"\"\"\nfunction VecRealPart(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecRealPart(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecRealPart, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tdp::PetscScalar,nm::PetscReal = VecDotNorm2(petsclib::PetscLibType,s::PetscVec, t::PetscVec) \ncomputes the inner product of two vectors and the 2\n\nCollective\n\nInput Parameters:\n- `s` - first vector\n- `t` - second vector\n\nOutput Parameters:\n- `dp` - s'conj(t)\n- `nm` - t'conj(t)\n\nLevel: advanced\n\n-seealso: `Vec`, `VecDot()`, `VecNorm()`, `VecDotBegin()`, `VecNormBegin()`, `VecDotEnd()`, `VecNormEnd()`\n\n\n# External Links\n$(_doc_external(\"Vec/VecDotNorm2\"))\n\"\"\"\nfunction VecDotNorm2(petsclib::PetscLibType, s::PetscVec, t::PetscVec) end\n\n@for_petsc function VecDotNorm2(petsclib::$UnionPetscLib, s::PetscVec, t::PetscVec )\n\tdp_ = Ref{$PetscScalar}()\n\tnm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecDotNorm2, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscScalar}, Ptr{$PetscReal}),\n               s, t, dp_, nm_,\n              )\n\n\tdp = dp_[]\n\tnm = nm_[]\n\n\treturn dp,nm\nend \n\n\"\"\"\n\tmean::PetscScalar = VecMean(petsclib::PetscLibType,v::PetscVec) \nComputes the arithmetic mean of all the components of a vector.\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `mean` - the result\n\nLevel: beginner\n\n-seealso: `Vec`, `VecSum()`, `VecNorm()`\n\n# External Links\n$(_doc_external(\"Vec/VecMean\"))\n\"\"\"\nfunction VecMean(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecMean(petsclib::$UnionPetscLib, v::PetscVec )\n\tmean_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:VecMean, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}),\n               v, mean_,\n              )\n\n\tmean = mean_[]\n\n\treturn mean\nend \n\n\"\"\"\n\tVecPermute(petsclib::PetscLibType,x::PetscVec, row::IS, inv::PetscBool) \nPermutes a vector in place using the given ordering.\n\nInput Parameters:\n- `x`   - The vector\n- `row` - The ordering\n- `inv` - The flag for inverting the permutation\n\nLevel: beginner\n\n-seealso: `Vec`, `MatPermute()`\n\n# External Links\n$(_doc_external(\"Vec/VecPermute\"))\n\"\"\"\nfunction VecPermute(petsclib::PetscLibType, x::PetscVec, row::IS, inv::PetscBool) end\n\n@for_petsc function VecPermute(petsclib::$UnionPetscLib, x::PetscVec, row::IS, inv::PetscBool )\n\n    @chk ccall(\n               (:VecPermute, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, PetscBool),\n               x, row, inv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = VecEqual(petsclib::PetscLibType,vec1::PetscVec, vec2::PetscVec) \nCompares two vectors. Returns true if the two vectors are either pointing to the same memory buffer,\nor if the two vectors have the same local and global layout as well as bitwise equality of all entries.\nDoes NOT take round-off errors into account.\n\nCollective\n\nInput Parameters:\n- `vec1` - the first vector\n- `vec2` - the second vector\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the vectors are equal; `PETSC_FALSE` otherwise.\n\nLevel: intermediate\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecEqual\"))\n\"\"\"\nfunction VecEqual(petsclib::PetscLibType, vec1::PetscVec, vec2::PetscVec) end\n\n@for_petsc function VecEqual(petsclib::$UnionPetscLib, vec1::PetscVec, vec2::PetscVec )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecEqual, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{PetscBool}),\n               vec1, vec2, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tn::PetscInt,e::Vector{PetscScalar} = VecUniqueEntries(petsclib::PetscLibType,vec::PetscVec) \nCompute the number of unique entries, and those entries\n\nCollective\n\nInput Parameter:\n- `vec` - the vector\n\nOutput Parameters:\n- `n` - The number of unique entries\n- `e` - The entries, each MPI process receives all the unique entries\n\nLevel: intermediate\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecUniqueEntries\"))\n\"\"\"\nfunction VecUniqueEntries(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecUniqueEntries(petsclib::$UnionPetscLib, vec::PetscVec )\n\tn_ = Ref{$PetscInt}()\n\te_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecUniqueEntries, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{Ptr{$PetscScalar}}),\n               vec, n_, e_,\n              )\n\n\tn = n_[]\n\te = unsafe_wrap(Array, e_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn n,e\nend \n\n\"\"\"\n\tVecFilter(petsclib::PetscLibType,v::PetscVec, tol::PetscReal) \nSet all values in the vector with an absolute value less than or equal to the tolerance to zero\n\nInput Parameters:\n- `v`   - The vector\n- `tol` - The zero tolerance\n\nOutput Parameter:\n- `v` - The filtered vector\n\nLevel: intermediate\n\n-seealso: `VecCreate()`, `VecSet()`, `MatFilter()`\n\n# External Links\n$(_doc_external(\"Vec/VecFilter\"))\n\"\"\"\nfunction VecFilter(petsclib::PetscLibType, v::PetscVec, tol::PetscReal) end\n\n@for_petsc function VecFilter(petsclib::$UnionPetscLib, v::PetscVec, tol::$PetscReal )\n\n    @chk ccall(\n               (:VecFilter, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscReal),\n               v, tol,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecWhichEqual(petsclib::PetscLibType,Vec1::PetscVec, Vec2::PetscVec, S::IS) \nCreates an index set containing the indices\nwhere the vectors `Vec1` and `Vec2` have identical elements.\n\nCollective\n\nInput Parameters:\n- `Vec1` - the first vector to compare\n- `Vec2` - the second two vector to compare\n\nOutput Parameter:\n- `S` - The index set containing the indices i where vec1[i] == vec2[i]\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecWhichEqual\"))\n\"\"\"\nfunction VecWhichEqual(petsclib::PetscLibType, Vec1::PetscVec, Vec2::PetscVec, S::IS) end\n\n@for_petsc function VecWhichEqual(petsclib::$UnionPetscLib, Vec1::PetscVec, Vec2::PetscVec, S::IS )\n\n    @chk ccall(\n               (:VecWhichEqual, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{IS}),\n               Vec1, Vec2, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecWhichLessThan(petsclib::PetscLibType,Vec1::PetscVec, Vec2::PetscVec, S::IS) \nCreates an index set containing the indices\nwhere the vectors `Vec1` < `Vec2`\n\nCollective\n\nInput Parameters:\n- `Vec1` - the first vector to compare\n- `Vec2` - the second vector to compare\n\nOutput Parameter:\n- `S` - The index set containing the indices i where vec1[i] < vec2[i]\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecWhichLessThan\"))\n\"\"\"\nfunction VecWhichLessThan(petsclib::PetscLibType, Vec1::PetscVec, Vec2::PetscVec, S::IS) end\n\n@for_petsc function VecWhichLessThan(petsclib::$UnionPetscLib, Vec1::PetscVec, Vec2::PetscVec, S::IS )\n\n    @chk ccall(\n               (:VecWhichLessThan, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{IS}),\n               Vec1, Vec2, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecWhichGreaterThan(petsclib::PetscLibType,Vec1::PetscVec, Vec2::PetscVec, S::IS) \nCreates an index set containing the indices\nwhere the vectors `Vec1` > `Vec2`\n\nCollective\n\nInput Parameters:\n- `Vec1` - the first vector to compare\n- `Vec2` - the second vector to compare\n\nOutput Parameter:\n- `S` - The index set containing the indices i where vec1[i] > vec2[i]\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecWhichGreaterThan\"))\n\"\"\"\nfunction VecWhichGreaterThan(petsclib::PetscLibType, Vec1::PetscVec, Vec2::PetscVec, S::IS) end\n\n@for_petsc function VecWhichGreaterThan(petsclib::$UnionPetscLib, Vec1::PetscVec, Vec2::PetscVec, S::IS )\n\n    @chk ccall(\n               (:VecWhichGreaterThan, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{IS}),\n               Vec1, Vec2, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecWhichBetween(petsclib::PetscLibType,VecLow::PetscVec, V::PetscVec, VecHigh::PetscVec, S::IS) \nCreates an index set containing the indices\nwhere  `VecLow` < `V` < `VecHigh`\n\nCollective\n\nInput Parameters:\n- `VecLow`  - lower bound\n- `V`       - Vector to compare\n- `VecHigh` - higher bound\n\nOutput Parameter:\n- `S` - The index set containing the indices i where veclow[i] < v[i] < vechigh[i]\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecWhichBetween\"))\n\"\"\"\nfunction VecWhichBetween(petsclib::PetscLibType, VecLow::PetscVec, V::PetscVec, VecHigh::PetscVec, S::IS) end\n\n@for_petsc function VecWhichBetween(petsclib::$UnionPetscLib, VecLow::PetscVec, V::PetscVec, VecHigh::PetscVec, S::IS )\n\n    @chk ccall(\n               (:VecWhichBetween, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, Ptr{IS}),\n               VecLow, V, VecHigh, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecWhichBetweenOrEqual(petsclib::PetscLibType,VecLow::PetscVec, V::PetscVec, VecHigh::PetscVec, S::IS) \nCreates an index set containing the indices\nwhere  `VecLow` <= `V` <= `VecHigh`\n\nCollective\n\nInput Parameters:\n- `VecLow`  - lower bound\n- `V`       - Vector to compare\n- `VecHigh` - higher bound\n\nOutput Parameter:\n- `S` - The index set containing the indices i where veclow[i] <= v[i] <= vechigh[i]\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecWhichBetweenOrEqual\"))\n\"\"\"\nfunction VecWhichBetweenOrEqual(petsclib::PetscLibType, VecLow::PetscVec, V::PetscVec, VecHigh::PetscVec, S::IS) end\n\n@for_petsc function VecWhichBetweenOrEqual(petsclib::$UnionPetscLib, VecLow::PetscVec, V::PetscVec, VecHigh::PetscVec, S::IS )\n\n    @chk ccall(\n               (:VecWhichBetweenOrEqual, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, Ptr{IS}),\n               VecLow, V, VecHigh, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecWhichInactive(petsclib::PetscLibType,VecLow::PetscVec, V::PetscVec, D::PetscVec, VecHigh::PetscVec, Strong::PetscBool, S::IS) \nCreates an `IS` based on a set of vectors\n\nCollective\n\nInput Parameters:\n- `VecLow`  - lower bound\n- `V`       - Vector to compare\n- `D`       - Direction to compare\n- `VecHigh` - higher bound\n- `Strong`  - indicator for applying strongly inactive test\n\nOutput Parameter:\n- `S` - The index set containing the indices i where the bound is inactive\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecWhichInactive\"))\n\"\"\"\nfunction VecWhichInactive(petsclib::PetscLibType, VecLow::PetscVec, V::PetscVec, D::PetscVec, VecHigh::PetscVec, Strong::PetscBool, S::IS) end\n\n@for_petsc function VecWhichInactive(petsclib::$UnionPetscLib, VecLow::PetscVec, V::PetscVec, D::PetscVec, VecHigh::PetscVec, Strong::PetscBool, S::IS )\n\n    @chk ccall(\n               (:VecWhichInactive, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec, PetscBool, Ptr{IS}),\n               VecLow, V, D, VecHigh, Strong, S,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecISAXPY(petsclib::PetscLibType,vfull::PetscVec, is::IS, alpha::PetscScalar, vreduced::PetscVec) \nAdds a reduced vector to the appropriate elements of a full\nvfull[is[i]] += alpha*vreduced[i]\n\nLogically Collective\n\nInput Parameters:\n- `vfull`    - the full-space vector\n- `is`       - the index set for the reduced space\n- `alpha`    - the scalar coefficient\n- `vreduced` - the reduced-space vector\n\nOutput Parameter:\n- `vfull` - the sum of the full-space vector and reduced-space vector\n\nLevel: advanced\n\n-seealso: `VecISCopy()`, `VecISSet()`, `VecAXPY()`\n\n# External Links\n$(_doc_external(\"Vec/VecISAXPY\"))\n\"\"\"\nfunction VecISAXPY(petsclib::PetscLibType, vfull::PetscVec, is::IS, alpha::PetscScalar, vreduced::PetscVec) end\n\n@for_petsc function VecISAXPY(petsclib::$UnionPetscLib, vfull::PetscVec, is::IS, alpha::$PetscScalar, vreduced::PetscVec )\n\n    @chk ccall(\n               (:VecISAXPY, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, $PetscScalar, CVec),\n               vfull, is, alpha, vreduced,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecISCopy(petsclib::PetscLibType,vfull::PetscVec, is::IS, mode::ScatterMode, vreduced::PetscVec) \nCopies between a reduced vector and the appropriate elements of a full\n\nLogically Collective\n\nInput Parameters:\n- `vfull`    - the full-space vector\n- `is`       - the index set for the reduced space\n- `mode`     - the direction of copying, `SCATTER_FORWARD` or `SCATTER_REVERSE`\n- `vreduced` - the reduced-space vector\n\nOutput Parameter:\n- `vfull` - the sum of the full-space vector and reduced-space vector\n\nLevel: advanced\n\n-seealso: `VecISSet()`, `VecISAXPY()`, `VecCopy()`\n\n# External Links\n$(_doc_external(\"Vec/VecISCopy\"))\n\"\"\"\nfunction VecISCopy(petsclib::PetscLibType, vfull::PetscVec, is::IS, mode::ScatterMode, vreduced::PetscVec) end\n\n@for_petsc function VecISCopy(petsclib::$UnionPetscLib, vfull::PetscVec, is::IS, mode::ScatterMode, vreduced::PetscVec )\n\n    @chk ccall(\n               (:VecISCopy, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, ScatterMode, CVec),\n               vfull, is, mode, vreduced,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecISSet(petsclib::PetscLibType,V::PetscVec, S::IS, c::PetscScalar) \nSets the elements of a vector, specified by an index set, to a constant\n\nLogically Collective\n\nInput Parameters:\n- `V` - the vector\n- `S` - index set for the locations in the vector\n- `c` - the constant\n\nLevel: advanced\n\n-seealso: `VecISCopy()`, `VecISAXPY()`, `VecISShift()`, `VecSet()`\n\n# External Links\n$(_doc_external(\"Vec/VecISSet\"))\n\"\"\"\nfunction VecISSet(petsclib::PetscLibType, V::PetscVec, S::IS, c::PetscScalar) end\n\n@for_petsc function VecISSet(petsclib::$UnionPetscLib, V::PetscVec, S::IS, c::$PetscScalar )\n\n    @chk ccall(\n               (:VecISSet, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, $PetscScalar),\n               V, S, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecISShift(petsclib::PetscLibType,V::PetscVec, S::IS, c::PetscScalar) \nShifts the elements of a vector, specified by an index set, by a constant\n\nLogically Collective\n\nInput Parameters:\n- `V` - the vector\n- `S` - index set for the locations in the vector\n- `c` - the constant\n\nLevel: advanced\n\n-seealso: `VecISCopy()`, `VecISAXPY()`, `VecISSet()`, `VecShift()`\n\n# External Links\n$(_doc_external(\"Vec/VecISShift\"))\n\"\"\"\nfunction VecISShift(petsclib::PetscLibType, V::PetscVec, S::IS, c::PetscScalar) end\n\n@for_petsc function VecISShift(petsclib::$UnionPetscLib, V::PetscVec, S::IS, c::$PetscScalar )\n\n    @chk ccall(\n               (:VecISShift, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, $PetscScalar),\n               V, S, c,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecBoundGradientProjection(petsclib::PetscLibType,G::PetscVec, X::PetscVec, XL::PetscVec, XU::PetscVec, GP::PetscVec) \nProjects vector according to this definition.\nIf XL[i] < X[i] < XU[i], then GP[i] = G[i];\nIf X[i] <= XL[i], then GP[i] = min(G[i],0);\nIf X[i] >= XU[i], then GP[i] = max(G[i],0);\n\nInput Parameters:\n- `G`  - current gradient vector\n- `X`  - current solution vector with XL[i] <= X[i] <= XU[i]\n- `XL` - lower bounds\n- `XU` - upper bounds\n\nOutput Parameter:\n- `GP` - gradient projection vector\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecBoundGradientProjection\"))\n\"\"\"\nfunction VecBoundGradientProjection(petsclib::PetscLibType, G::PetscVec, X::PetscVec, XL::PetscVec, XU::PetscVec, GP::PetscVec) end\n\n@for_petsc function VecBoundGradientProjection(petsclib::$UnionPetscLib, G::PetscVec, X::PetscVec, XL::PetscVec, XU::PetscVec, GP::PetscVec )\n\n    @chk ccall(\n               (:VecBoundGradientProjection, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec, CVec),\n               G, X, XL, XU, GP,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecPow(petsclib::PetscLibType,v::PetscVec, p::PetscScalar) \nReplaces each component of a vector by  x_i^p \n\nLogically Collective\n\nInput Parameters:\n- `v` - the vector\n- `p` - the exponent to use on each element\n\nLevel: intermediate\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecPow\"))\n\"\"\"\nfunction VecPow(petsclib::PetscLibType, v::PetscVec, p::PetscScalar) end\n\n@for_petsc function VecPow(petsclib::$UnionPetscLib, v::PetscVec, p::$PetscScalar )\n\n    @chk ccall(\n               (:VecPow, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar),\n               v, p,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecMedian(petsclib::PetscLibType,Vec1::PetscVec, Vec2::PetscVec, Vec3::PetscVec, VMedian::PetscVec) \nComputes the componentwise median of three vectors\nand stores the result in this vector.  Used primarily for projecting\na vector within upper and lower bounds.\n\nLogically Collective\n\nInput Parameters:\n- `Vec1` - The first vector\n- `Vec2` - The second vector\n- `Vec3` - The third vector\n\nOutput Parameter:\n- `VMedian` - The median vector (this can be any one of the input vectors)\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecMedian\"))\n\"\"\"\nfunction VecMedian(petsclib::PetscLibType, Vec1::PetscVec, Vec2::PetscVec, Vec3::PetscVec, VMedian::PetscVec) end\n\n@for_petsc function VecMedian(petsclib::$UnionPetscLib, Vec1::PetscVec, Vec2::PetscVec, Vec3::PetscVec, VMedian::PetscVec )\n\n    @chk ccall(\n               (:VecMedian, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec),\n               Vec1, Vec2, Vec3, VMedian,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tvalues::Vector{PetscScalar} = VecGetValuesSection(petsclib::PetscLibType,v::PetscVec, s::PetscSection, point::PetscInt) \nGets all the values associated with a given point, according to the section, in the given `Vec`\n\nNot Collective\n\nInput Parameters:\n- `v`     - the `Vec`\n- `s`     - the organizing `PetscSection`\n- `point` - the point\n\nOutput Parameter:\n- `values` - the array of output values\n\nLevel: developer\n\n-seealso: `PetscSection`, `PetscSectionCreate()`, `VecSetValuesSection()`\n\n# External Links\n$(_doc_external(\"Vec/VecGetValuesSection\"))\n\"\"\"\nfunction VecGetValuesSection(petsclib::PetscLibType, v::PetscVec, s::PetscSection, point::PetscInt) end\n\n@for_petsc function VecGetValuesSection(petsclib::$UnionPetscLib, v::PetscVec, s::PetscSection, point::$PetscInt )\n\tvalues_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecGetValuesSection, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscSection, $PetscInt, Ptr{Ptr{$PetscScalar}}),\n               v, s, point, values_,\n              )\n\n\tvalues = unsafe_wrap(Array, values_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn values\nend \n\n\"\"\"\n\tdm::PetscDM = VecGetDM(petsclib::PetscLibType,v::PetscVec) \nGets the `DM` defining the data layout of the vector\n\nNot Collective\n\nInput Parameter:\n- `v` - The `Vec`\n\nOutput Parameter:\n- `dm` - The `DM`\n\nLevel: intermediate\n\nNote:\nA `Vec` may not have a `DM` associated with it.\n\nSee also: \n=== \n`DM`, `VecSetDM()`, `DMGetLocalVector()`, `DMGetGlobalVector()`, `DMSetVecType()`\n\n# External Links\n$(_doc_external(\"DM/VecGetDM\"))\n\"\"\"\nfunction VecGetDM(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecGetDM(petsclib::$UnionPetscLib, v::PetscVec)\n\tdm_ = Ref{CDM}()\n\n    @chk ccall(\n               (:VecGetDM, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{CDM}),\n               v, dm_,\n              )\n\n    dm = PetscDM(dm_[], petsclib)\n\treturn dm\nend \n\n\"\"\"\n\tVecFischer(petsclib::PetscLibType,X::PetscVec, F::PetscVec, L::PetscVec, U::PetscVec, FB::PetscVec) \nEvaluates the Fischer\nproblems.\n\nLogically Collective\n\nInput Parameters:\n- `X` - current point\n- `F` - function evaluated at x\n- `L` - lower bounds\n- `U` - upper bounds\n\nOutput Parameter:\n- `FB` - The Fischer-Burmeister function vector\n\nLevel: developer\n\n-seealso: `Vec`, `VecSFischer()`, `MatDFischer()`, `MatDSFischer()`\n\n# External Links\n$(_doc_external(\"Tao/VecFischer\"))\n\"\"\"\nfunction VecFischer(petsclib::PetscLibType, X::PetscVec, F::PetscVec, L::PetscVec, U::PetscVec, FB::PetscVec) end\n\n@for_petsc function VecFischer(petsclib::$UnionPetscLib, X::PetscVec, F::PetscVec, L::PetscVec, U::PetscVec, FB::PetscVec )\n\n    @chk ccall(\n               (:VecFischer, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec, CVec),\n               X, F, L, U, FB,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\txv::Vector{PetscScalar},yv::Vector{PetscScalar} = VecGetArrayPair(petsclib::PetscLibType,x::PetscVec, y::PetscVec) \n\n# External Links\n$(_doc_external(\"Vec/VecGetArrayPair\"))\n\"\"\"\nfunction VecGetArrayPair(petsclib::PetscLibType, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecGetArrayPair(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec )\n\txv_ = Ref{Ptr{$PetscScalar}}()\n\tyv_ = Ref{Ptr{$PetscScalar}}()\n\n    @chk ccall(\n               (:VecGetArrayPair, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               x, y, xv_, yv_,\n              )\n\n\txv = unsafe_wrap(Array, xv_[], VecGetLocalSize(petsclib, x); own = false)\n\tyv = unsafe_wrap(Array, yv_[], VecGetLocalSize(petsclib, x); own = false)\n\n\treturn xv,yv\nend \n\n\"\"\"\n\tVecRestoreArrayPair(petsclib::PetscLibType,x::PetscVec, y::PetscVec, xv::Vector{PetscScalar}, yv::Vector{PetscScalar}) \n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArrayPair\"))\n\"\"\"\nfunction VecRestoreArrayPair(petsclib::PetscLibType, x::PetscVec, y::PetscVec, xv::Vector{PetscScalar}, yv::Vector{PetscScalar}) end\n\n@for_petsc function VecRestoreArrayPair(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec, xv::Vector{$PetscScalar}, yv::Vector{$PetscScalar} )\n\txv_ = Ref(pointer(xv))\n\tyv_ = Ref(pointer(yv))\n\n    @chk ccall(\n               (:VecRestoreArrayPair, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{Ptr{$PetscScalar}}, Ptr{Ptr{$PetscScalar}}),\n               x, y, xv_, yv_,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/Vecs_wrappers.jl",
    "content": "# autodefined type arguments for class ------\nmutable struct _n_Vecs end\nconst Vecs = Ptr{_n_Vecs}\n\nmutable struct n_PetscRandom end\nconst PetscRandom = Ptr{n_PetscRandom}\n# -------------------------------------------------------\n\"\"\"\n\tVecScatterPetscToFFTW(petsclib::PetscLibType,A::PetscMat, x::PetscVec, y::PetscVec) \nCopies a PETSc vector to the vector that goes into `MATFFTW` calls.\n\nCollective\n\nInput Parameters:\n- `A` - FFTW matrix\n- `x` - the PETSc vector\n\nOutput Parameter:\n- `y` - the FFTW vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `MATFFTW`, `VecScatterFFTWToPetsc()`, `MatCreateVecsFFTW()`\n\n# External Links\n$(_doc_external(\"Mat/VecScatterPetscToFFTW\"))\n\"\"\"\nfunction VecScatterPetscToFFTW(petsclib::PetscLibType, A::PetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecScatterPetscToFFTW(petsclib::$UnionPetscLib, A::PetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecScatterPetscToFFTW, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               A, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterFFTWToPetsc(petsclib::PetscLibType,A::PetscMat, x::PetscVec, y::PetscVec) \nConverts `MATFFTW` output vector to a PETSc vector.\n\nCollective\n\nInput Parameters:\n- `A` - `MATFFTW` matrix\n- `x` - FFTW vector\n\nOutput Parameter:\n- `y` - PETSc vector\n\nLevel: intermediate\n\n-seealso: [](ch_matrices), `Mat`, `VecScatterPetscToFFTW()`, `MATFFTW`, `MatCreateVecsFFTW()`\n\n# External Links\n$(_doc_external(\"Mat/VecScatterFFTWToPetsc\"))\n\"\"\"\nfunction VecScatterFFTWToPetsc(petsclib::PetscLibType, A::PetscMat, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecScatterFFTWToPetsc(petsclib::$UnionPetscLib, A::PetscMat, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecScatterFFTWToPetsc, $petsc_library),\n               PetscErrorCode,\n               (CMat, CVec, CVec),\n               A, x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScale(petsclib::PetscLibType,x::PetscVec, alpha::PetscScalar) \nScales a vector.\n\nLogically Collective\n\nInput Parameters:\n- `x`     - the vector\n- `alpha` - the scalar\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecSet()`\n\n# External Links\n$(_doc_external(\"Vec/VecScale\"))\n\"\"\"\nfunction VecScale(petsclib::PetscLibType, x::PetscVec, alpha::PetscScalar) end\n\n@for_petsc function VecScale(petsclib::$UnionPetscLib, x::PetscVec, alpha::$PetscScalar )\n\n    @chk ccall(\n               (:VecScale, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar),\n               x, alpha,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSet(petsclib::PetscLibType,x::PetscVec, alpha::PetscScalar) \nSets all components of a vector to a single scalar value.\n\nLogically Collective\n\nInput Parameters:\n- `x`     - the vector\n- `alpha` - the scalar\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecSetValues()`, `VecSetValuesBlocked()`, `VecSetRandom()`\n\n# External Links\n$(_doc_external(\"Vec/VecSet\"))\n\"\"\"\nfunction VecSet(petsclib::PetscLibType, x::PetscVec, alpha::PetscScalar) end\n\n@for_petsc function VecSet(petsclib::$UnionPetscLib, x::PetscVec, alpha::$PetscScalar )\n\n    @chk ccall(\n               (:VecSet, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar),\n               x, alpha,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetValues(petsclib::PetscLibType,x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}, y::Vector{PetscScalar}, iora::InsertMode) \nInserts or adds values into certain locations of a vector.\n\nNot Collective\n\nInput Parameters:\n- `x`    - vector to insert in\n- `ni`   - number of elements to add\n- `ix`   - indices where to add\n- `y`    - array of values. Pass `NULL` to set all zeroes.\n- `iora` - either `INSERT_VALUES` to replace the current values or `ADD_VALUES` to add values to any existing entries\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecSetValuesLocal()`,\n`VecSetValue()`, `VecSetValuesBlocked()`, `InsertMode`, `INSERT_VALUES`, `ADD_VALUES`, `VecGetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetValues\"))\n\"\"\"\nVecSetValues(petsclib::PetscLibType, x::PetscVec, ni::PetscInt, ix::Vector, y::Vector, iora::InsertMode)\n\n@for_petsc function VecSetValues(petsclib::$UnionPetscLib, x::AbstractPetscVec, ni::$PetscInt, ix::Vector{$PetscInt}, y::Vector{$PetscScalar}, iora::InsertMode )\n\n    @chk ccall(\n               (:VecSetValues, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               x, ni, ix, y, iora,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetValuesBlocked(petsclib::PetscLibType,x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}, y::Vector{PetscScalar}, iora::InsertMode) \nInserts or adds blocks of values into certain locations of a vector.\n\nNot Collective\n\nInput Parameters:\n- `x`    - vector to insert in\n- `ni`   - number of blocks to add\n- `ix`   - indices where to add in block count, rather than element count\n- `y`    - array of values. Pass `NULL` to set all zeroes.\n- `iora` - either `INSERT_VALUES` replaces existing entries with new values, `ADD_VALUES`, adds values to any existing entries\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecSetValuesBlockedLocal()`,\n`VecSetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetValuesBlocked\"))\n\"\"\"\nfunction VecSetValuesBlocked(petsclib::PetscLibType, x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}, y::Vector{PetscScalar}, iora::InsertMode) end\n\n@for_petsc function VecSetValuesBlocked(petsclib::$UnionPetscLib, x::PetscVec, ni::$PetscInt, ix::Vector{$PetscInt}, y::Vector{$PetscScalar}, iora::InsertMode )\n\n    @chk ccall(\n               (:VecSetValuesBlocked, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               x, ni, ix, y, iora,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetValuesLocal(petsclib::PetscLibType,x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}, y::Vector{PetscScalar}, iora::InsertMode) \nInserts or adds values into certain locations of a vector,\nusing a local ordering of the nodes.\n\nNot Collective\n\nInput Parameters:\n- `x`    - vector to insert in\n- `ni`   - number of elements to add\n- `ix`   - indices where to add\n- `y`    - array of values. Pass `NULL` to set all zeroes.\n- `iora` - either `INSERT_VALUES` replaces existing entries with new values, `ADD_VALUES` adds values to any existing entries\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecSetValues()`, `VecSetLocalToGlobalMapping()`,\n`VecSetValuesBlockedLocal()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetValuesLocal\"))\n\"\"\"\nfunction VecSetValuesLocal(petsclib::PetscLibType, x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}, y::Vector{PetscScalar}, iora::InsertMode) end\n\n@for_petsc function VecSetValuesLocal(petsclib::$UnionPetscLib, x::PetscVec, ni::$PetscInt, ix::Vector{$PetscInt}, y::Vector{$PetscScalar}, iora::InsertMode )\n\n    @chk ccall(\n               (:VecSetValuesLocal, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               x, ni, ix, y, iora,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetValuesBlockedLocal(petsclib::PetscLibType,x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}, y::Vector{PetscScalar}, iora::InsertMode) \nInserts or adds values into certain locations of a vector,\nusing a local ordering of the nodes.\n\nNot Collective\n\nInput Parameters:\n- `x`    - vector to insert in\n- `ni`   - number of blocks to add\n- `ix`   - indices where to add in block count, not element count\n- `y`    - array of values. Pass `NULL` to set all zeroes.\n- `iora` - either `INSERT_VALUES` replaces existing entries with new values, `ADD_VALUES` adds values to any existing entries\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecSetValues()`, `VecSetValuesBlocked()`,\n`VecSetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetValuesBlockedLocal\"))\n\"\"\"\nfunction VecSetValuesBlockedLocal(petsclib::PetscLibType, x::PetscVec, ni::PetscInt, ix::Vector{PetscInt}, y::Vector{PetscScalar}, iora::InsertMode) end\n\n@for_petsc function VecSetValuesBlockedLocal(petsclib::$UnionPetscLib, x::PetscVec, ni::$PetscInt, ix::Vector{$PetscInt}, y::Vector{$PetscScalar}, iora::InsertMode )\n\n    @chk ccall(\n               (:VecSetValuesBlockedLocal, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscScalar}, InsertMode),\n               x, ni, ix, y, iora,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnstash::PetscInt,reallocs::PetscInt,bnstash::PetscInt,breallocs::PetscInt = VecStashGetInfo(petsclib::PetscLibType,vec::PetscVec) \nGets how many values are currently in the vector stash, i.e. need\nto be communicated to other processors during the `VecAssemblyBegin()`/`VecAssemblyEnd()` process\n\nNot Collective\n\nInput Parameter:\n- `vec` - the vector\n\nOutput Parameters:\n- `nstash`    - the size of the stash\n- `reallocs`  - the number of additional mallocs incurred in building the stash\n- `bnstash`   - the size of the block stash\n- `breallocs` - the number of additional mallocs incurred in building the block stash (from `VecSetValuesBlocked()`)\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecStashSetInitialSize()`, `VecStashView()`\n\n# External Links\n$(_doc_external(\"Vec/VecStashGetInfo\"))\n\"\"\"\nfunction VecStashGetInfo(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecStashGetInfo(petsclib::$UnionPetscLib, vec::PetscVec )\n\tnstash_ = Ref{$PetscInt}()\n\treallocs_ = Ref{$PetscInt}()\n\tbnstash_ = Ref{$PetscInt}()\n\tbreallocs_ = Ref{$PetscInt}()\n\n    @chk ccall(\n               (:VecStashGetInfo, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               vec, nstash_, reallocs_, bnstash_, breallocs_,\n              )\n\n\tnstash = nstash_[]\n\treallocs = reallocs_[]\n\tbnstash = bnstash_[]\n\tbreallocs = breallocs_[]\n\n\treturn nstash,reallocs,bnstash,breallocs\nend \n\n\"\"\"\n\tVecSetLocalToGlobalMapping(petsclib::PetscLibType,x::PetscVec, mapping::ISLocalToGlobalMapping) \nSets a local numbering to global numbering used\nby the routine `VecSetValuesLocal()` to allow users to insert vector entries\nusing a local (per-processor) numbering.\n\nLogically Collective\n\nInput Parameters:\n- `x`       - vector\n- `mapping` - mapping created with `ISLocalToGlobalMappingCreate()` or `ISLocalToGlobalMappingCreateIS()`\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecSetValues()`, `VecSetValuesLocal()`,\n`VecGetLocalToGlobalMapping()`, `VecSetValuesBlockedLocal()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetLocalToGlobalMapping\"))\n\"\"\"\nfunction VecSetLocalToGlobalMapping(petsclib::PetscLibType, x::PetscVec, mapping::ISLocalToGlobalMapping) end\n\n@for_petsc function VecSetLocalToGlobalMapping(petsclib::$UnionPetscLib, x::PetscVec, mapping::ISLocalToGlobalMapping )\n\n    @chk ccall(\n               (:VecSetLocalToGlobalMapping, $petsc_library),\n               PetscErrorCode,\n               (CVec, ISLocalToGlobalMapping),\n               x, mapping,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetPreallocationCOO(petsclib::PetscLibType,x::PetscVec, ncoo::PetscCount, coo_i::Vector{PetscInt}) \nset preallocation for a vector using a coordinate format of the entries with global indices\n\nCollective\n\nInput Parameters:\n- `x`     - vector being preallocated\n- `ncoo`  - number of entries\n- `coo_i` - entry indices\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecSetValuesCOO()`, `VecSetPreallocationCOOLocal()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetPreallocationCOO\"))\n\"\"\"\nfunction VecSetPreallocationCOO(petsclib::PetscLibType, x::PetscVec, ncoo::PetscCount, coo_i::Vector{PetscInt}) end\n\n@for_petsc function VecSetPreallocationCOO(petsclib::$UnionPetscLib, x::PetscVec, ncoo::PetscCount, coo_i::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:VecSetPreallocationCOO, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscCount, Ptr{$PetscInt}),\n               x, ncoo, coo_i,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetPreallocationCOOLocal(petsclib::PetscLibType,x::PetscVec, ncoo::PetscCount, coo_i::Vector{PetscInt}) \nset preallocation for vectors using a coordinate format of the entries with local indices\n\nCollective\n\nInput Parameters:\n- `x`     - vector being preallocated\n- `ncoo`  - number of entries\n- `coo_i` - row indices (local numbering; may be modified)\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecSetPreallocationCOO()`, `VecSetValuesCOO()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetPreallocationCOOLocal\"))\n\"\"\"\nfunction VecSetPreallocationCOOLocal(petsclib::PetscLibType, x::PetscVec, ncoo::PetscCount, coo_i::Vector{PetscInt}) end\n\n@for_petsc function VecSetPreallocationCOOLocal(petsclib::$UnionPetscLib, x::PetscVec, ncoo::PetscCount, coo_i::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:VecSetPreallocationCOOLocal, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscCount, Ptr{$PetscInt}),\n               x, ncoo, coo_i,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetValuesCOO(petsclib::PetscLibType,x::PetscVec, coo_v::Vector{PetscScalar}, imode::InsertMode) \nset values at once in a vector preallocated using `VecSetPreallocationCOO()`\n\nCollective\n\nInput Parameters:\n- `x`     - vector being set\n- `coo_v` - the value array\n- `imode` - the insert mode\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecSetPreallocationCOO()`, `VecSetPreallocationCOOLocal()`, `VecSetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetValuesCOO\"))\n\"\"\"\nfunction VecSetValuesCOO(petsclib::PetscLibType, x::PetscVec, coo_v::Vector{PetscScalar}, imode::InsertMode) end\n\n@for_petsc function VecSetValuesCOO(petsclib::$UnionPetscLib, x::PetscVec, coo_v::Vector{$PetscScalar}, imode::InsertMode )\n\n    @chk ccall(\n               (:VecSetValuesCOO, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}, InsertMode),\n               x, coo_v, imode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetOption(petsclib::PetscLibType,x::PetscVec, op::VecOption, flag::PetscBool) \nSets an option for controlling a vector's behavior.\n\nCollective\n\nInput Parameters:\n- `x`    - the vector\n- `op`   - the option\n- `flag` - turn the option on or off\n\nSupported Options:\n- `VEC_IGNORE_OFF_PROC_ENTRIES` - which causes `VecSetValues()` to ignore\nentries destined to be stored on a separate processor. This can be used\nto eliminate the global reduction in the `VecAssemblyBegin()` if you know\nthat you have only used `VecSetValues()` to set local elements\n- `VEC_IGNORE_NEGATIVE_INDICES` - which means you can pass negative indices\nin ix in calls to `VecSetValues()` or `VecGetValues()`. These rows are simply\nignored.\n- `VEC_SUBSET_OFF_PROC_ENTRIES` - which causes `VecAssemblyBegin()` to assume that the off-process\nentries will always be a subset (possibly equal) of the off-process entries set on the\nfirst assembly which had a true `VEC_SUBSET_OFF_PROC_ENTRIES` and the vector has not\nchanged this flag afterwards. If this assembly is not such first assembly, then this\nassembly can reuse the communication pattern setup in that first assembly, thus avoiding\na global reduction. Subsequent assemblies setting off-process values should use the same\nInsertMode as the first assembly.\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecSetValues()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetOption\"))\n\"\"\"\nfunction VecSetOption(petsclib::PetscLibType, x::PetscVec, op::VecOption, flag::PetscBool) end\n\n@for_petsc function VecSetOption(petsclib::$UnionPetscLib, x::PetscVec, op::VecOption, flag::PetscBool )\n\n    @chk ccall(\n               (:VecSetOption, $petsc_library),\n               PetscErrorCode,\n               (CVec, VecOption, PetscBool),\n               x, op, flag,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStashSetInitialSize(petsclib::PetscLibType,vec::PetscVec, size::PetscInt, bsize::PetscInt) \nsets the sizes of the vec\nused during the assembly process to store values that belong to\nother processors.\n\nNot Collective, different processes can have different size stashes\n\nInput Parameters:\n- `vec`   - the vector\n- `size`  - the initial size of the stash.\n- `bsize` - the initial size of the block-stash(if used).\n\nOptions Database Keys:\n- `-vecstash_initial_size <size> or <size0,size1,...sizep-1>`           - set initial size\n- `-vecstash_block_initial_size <bsize> or <bsize0,bsize1,...bsizep-1>` - set initial block size\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecSetBlockSize()`, `VecSetValues()`, `VecSetValuesBlocked()`, `VecStashView()`\n\n# External Links\n$(_doc_external(\"Vec/VecStashSetInitialSize\"))\n\"\"\"\nfunction VecStashSetInitialSize(petsclib::PetscLibType, vec::PetscVec, size::PetscInt, bsize::PetscInt) end\n\n@for_petsc function VecStashSetInitialSize(petsclib::$UnionPetscLib, vec::PetscVec, size::$PetscInt, bsize::$PetscInt )\n\n    @chk ccall(\n               (:VecStashSetInitialSize, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt),\n               vec, size, bsize,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetRandom(petsclib::PetscLibType,x::PetscVec, rctx::PetscRandom) \nSets all components of a vector to random numbers.\n\nLogically Collective\n\nInput Parameters:\n- `x`    - the vector\n- `rctx` - the random number context, formed by `PetscRandomCreate()`, or use `NULL` and it will create one internally.\n\nOutput Parameter:\n- `x` - the vector\n\nExample of Usage:\n-seealso: [](ch_vectors), `Vec`, `VecSet()`, `VecSetValues()`, `PetscRandomCreate()`, `PetscRandomDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetRandom\"))\n\"\"\"\nfunction VecSetRandom(petsclib::PetscLibType, x::PetscVec, rctx::PetscRandom) end\n\n@for_petsc function VecSetRandom(petsclib::$UnionPetscLib, x::PetscVec, rctx::PetscRandom )\n\n    @chk ccall(\n               (:VecSetRandom, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscRandom),\n               x, rctx,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetFromOptions(petsclib::PetscLibType,vec::PetscVec) \nConfigures the vector from the options database.\n\nCollective\n\nInput Parameter:\n- `vec` - The vector\n\nLevel: beginner\n\n-seealso: [](ch_vectors), `Vec`, `VecCreate()`, `VecSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetFromOptions\"))\n\"\"\"\nfunction VecSetFromOptions(petsclib::PetscLibType, vec::PetscVec) end\n\n@for_petsc function VecSetFromOptions(petsclib::$UnionPetscLib, vec::PetscVec )\n\n    @chk ccall(\n               (:VecSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               vec,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetSizes(petsclib::PetscLibType,v::PetscVec, n::PetscInt, N::PetscInt) \nSets the local and global sizes, and checks to determine compatibility of the sizes\n\nCollective\n\nInput Parameters:\n- `v` - the vector\n- `n` - the local size (or `PETSC_DECIDE` to have it set)\n- `N` - the global size (or `PETSC_DETERMINE` to have it set)\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecCreate()`, `VecCreateSeq()`, `VecCreateMPI()`, `VecGetSize()`, `PetscSplitOwnership()`, `PetscLayout`,\n`VecGetOwnershipRange()`, `VecGetOwnershipRanges()`, `MatSetSizes()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetSizes\"))\n\"\"\"\nfunction VecSetSizes(petsclib::PetscLibType, v::PetscVec, n::PetscInt, N::PetscInt) end\n\n@for_petsc function VecSetSizes(petsclib::$UnionPetscLib, v::PetscVec, n::$PetscInt, N::$PetscInt )\n\n    @chk ccall(\n               (:VecSetSizes, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt),\n               v, n, N,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetBlockSize(petsclib::PetscLibType,v::PetscVec, bs::PetscInt) \nSets the block size for future calls to `VecSetValuesBlocked()`\nand `VecSetValuesBlockedLocal()`.\n\nLogically Collective\n\nInput Parameters:\n- `v`  - the vector\n- `bs` - the blocksize\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecSetValuesBlocked()`, `VecSetLocalToGlobalMapping()`, `VecGetBlockSize()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetBlockSize\"))\n\"\"\"\nfunction VecSetBlockSize(petsclib::PetscLibType, v::PetscVec, bs::PetscInt) end\n\n@for_petsc function VecSetBlockSize(petsclib::$UnionPetscLib, v::PetscVec, bs::$PetscInt )\n\n    @chk ccall(\n               (:VecSetBlockSize, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt),\n               v, bs,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetOptionsPrefix(petsclib::PetscLibType,v::PetscVec, prefix::Vector{Cchar}) \nSets the prefix used for searching for all\n`Vec` options in the database.\n\nLogically Collective\n\nInput Parameters:\n- `v`      - the `Vec` context\n- `prefix` - the prefix to prepend to all option names\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecSetFromOptions()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetOptionsPrefix\"))\n\"\"\"\nfunction VecSetOptionsPrefix(petsclib::PetscLibType, v::PetscVec, prefix::Vector{Cchar}) end\n\n@for_petsc function VecSetOptionsPrefix(petsclib::$UnionPetscLib, v::PetscVec, prefix::Vector{Cchar} )\n\n    @chk ccall(\n               (:VecSetOptionsPrefix, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{Cchar}),\n               v, prefix,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetUp(petsclib::PetscLibType,v::PetscVec) \nSets up the internal vector data structures for the later use.\n\nCollective\n\nInput Parameter:\n- `v` - the `Vec` context\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecCreate()`, `VecDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetUp\"))\n\"\"\"\nfunction VecSetUp(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecSetUp(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecSetUp, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSwap(petsclib::PetscLibType,x::PetscVec, y::PetscVec) \nSwaps the values between two vectors, `x` and `y`.\n\nLogically Collective\n\nInput Parameters:\n- `x` - the first vector\n- `y` - the second vector\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecSet()`\n\n# External Links\n$(_doc_external(\"Vec/VecSwap\"))\n\"\"\"\nfunction VecSwap(petsclib::PetscLibType, x::PetscVec, y::PetscVec) end\n\n@for_petsc function VecSwap(petsclib::$UnionPetscLib, x::PetscVec, y::PetscVec )\n\n    @chk ccall(\n               (:VecSwap, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec),\n               x, y,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStashViewFromOptions(petsclib::PetscLibType,obj::PetscVec, bobj::PetscObject, optionname::Vector{Cchar}) \nProcesses command line options to determine if/how a `VecStash` object is to be viewed.\n\nCollective\n\nInput Parameters:\n- `obj`        - the `Vec` containing a stash\n- `bobj`       - optional other object that provides the prefix\n- `optionname` - option to activate viewing\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecStashSetInitialSize()`\n\n# External Links\n$(_doc_external(\"Vec/VecStashViewFromOptions\"))\n\"\"\"\nfunction VecStashViewFromOptions(petsclib::PetscLibType, obj::PetscVec, bobj::PetscObject, optionname::Vector{Cchar}) end\n\n@for_petsc function VecStashViewFromOptions(petsclib::$UnionPetscLib, obj::PetscVec, bobj::PetscObject, optionname::Vector{Cchar} )\n\n    @chk ccall(\n               (:VecStashViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscObject, Ptr{Cchar}),\n               obj, bobj, optionname,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStashView(petsclib::PetscLibType,v::PetscVec, viewer::PetscViewer) \nPrints the entries in the vector stash and block stash.\n\nCollective\n\nInput Parameters:\n- `v`      - the vector\n- `viewer` - the viewer\n\nLevel: advanced\n\n-seealso: [](ch_vectors), `Vec`, `VecSetBlockSize()`, `VecSetValues()`, `VecSetValuesBlocked()`\n\n# External Links\n$(_doc_external(\"Vec/VecStashView\"))\n\"\"\"\nfunction VecStashView(petsclib::PetscLibType, v::PetscVec, viewer::PetscViewer) end\n\n@for_petsc function VecStashView(petsclib::$UnionPetscLib, v::PetscVec, viewer::PetscViewer )\n\n    @chk ccall(\n               (:VecStashView, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscViewer),\n               v, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetLayout(petsclib::PetscLibType,x::PetscVec, map::PetscLayout) \nset `PetscLayout` describing vector layout\n\nNot Collective\n\nInput Parameters:\n- `x`   - the vector\n- `map` - the layout\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `PetscLayout`, `VecGetLayout()`, `VecGetSize()`, `VecGetOwnershipRange()`, `VecGetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetLayout\"))\n\"\"\"\nfunction VecSetLayout(petsclib::PetscLibType, x::PetscVec, map::PetscLayout) end\n\n@for_petsc function VecSetLayout(petsclib::$UnionPetscLib, x::PetscVec, map::PetscLayout )\n\n    @chk ccall(\n               (:VecSetLayout, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscLayout),\n               x, map,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetBindingPropagates(petsclib::PetscLibType,v::PetscVec, flg::PetscBool) \nSets whether the state of being bound to the CPU for a GPU vector type propagates to child and some other associated objects\n\nInput Parameters:\n- `v`   - the vector\n- `flg` - flag indicating whether the boundtocpu flag should be propagated\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `MatSetBindingPropagates()`, `VecGetBindingPropagates()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetBindingPropagates\"))\n\"\"\"\nfunction VecSetBindingPropagates(petsclib::PetscLibType, v::PetscVec, flg::PetscBool) end\n\n@for_petsc function VecSetBindingPropagates(petsclib::$UnionPetscLib, v::PetscVec, flg::PetscBool )\n\n    @chk ccall(\n               (:VecSetBindingPropagates, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscBool),\n               v, flg,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetPinnedMemoryMin(petsclib::PetscLibType,v::PetscVec, mbytes::Csize_t) \nSet the minimum data size for which pinned memory will be used for host (CPU) allocations.\n\nLogically Collective\n\nInput Parameters:\n- `v`      - the vector\n- `mbytes` - minimum data size in bytes\n\nOptions Database Key:\n- `-vec_pinned_memory_min <size>` - minimum size (in bytes) for an allocation to use pinned memory on host.\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetPinnedMemoryMin()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetPinnedMemoryMin\"))\n\"\"\"\nfunction VecSetPinnedMemoryMin(petsclib::PetscLibType, v::PetscVec, mbytes::Csize_t) end\n\n@for_petsc function VecSetPinnedMemoryMin(petsclib::$UnionPetscLib, v::PetscVec, mbytes::Csize_t )\n\n    @chk ccall(\n               (:VecSetPinnedMemoryMin, $petsc_library),\n               PetscErrorCode,\n               (CVec, Csize_t),\n               v, mbytes,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetType(petsclib::PetscLibType,vec::PetscVec, newType::VecType) \nBuilds a vector, for a particular vector implementation.\n\nCollective\n\nInput Parameters:\n- `vec`     - The vector object\n- `newType` - The name of the vector type\n\nOptions Database Key:\n- `-vec_type <type>` - Sets the vector type; use -help for a list\nof available types\n\nLevel: intermediate\n\n-seealso: [](ch_vectors), `Vec`, `VecType`, `VecGetType()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetType\"))\n\"\"\"\nfunction VecSetType(petsclib::PetscLibType, vec::PetscVec, newType::VecType) end\n\n@for_petsc function VecSetType(petsclib::$UnionPetscLib, vec::PetscVec, newType::VecType )\n\n    @chk ccall(\n               (:VecSetType, $petsc_library),\n               PetscErrorCode,\n               (CVec, VecType),\n               vec, newType,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStrideSet(petsclib::PetscLibType,v::PetscVec, start::PetscInt, s::PetscScalar) \nSets a subvector of a vector defined\nby a starting point and a stride with a given value\n\nLogically Collective\n\nInput Parameters:\n- `v`     - the vector\n- `start` - starting point of the subvector (defined by a stride)\n- `s`     - value to set for each entry in that subvector\n\nLevel: advanced\n\n-seealso: `Vec`, `VecNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`, `VecStrideScale()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideSet\"))\n\"\"\"\nfunction VecStrideSet(petsclib::PetscLibType, v::PetscVec, start::PetscInt, s::PetscScalar) end\n\n@for_petsc function VecStrideSet(petsclib::$UnionPetscLib, v::PetscVec, start::$PetscInt, s::$PetscScalar )\n\n    @chk ccall(\n               (:VecStrideSet, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscScalar),\n               v, start, s,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStrideScale(petsclib::PetscLibType,v::PetscVec, start::PetscInt, scale::PetscScalar) \nScales a subvector of a vector defined\nby a starting point and a stride.\n\nLogically Collective\n\nInput Parameters:\n- `v`     - the vector\n- `start` - starting point of the subvector (defined by a stride)\n- `scale` - value to multiply each subvector entry by\n\nLevel: advanced\n\n-seealso: `Vec`, `VecNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideScale\"))\n\"\"\"\nfunction VecStrideScale(petsclib::PetscLibType, v::PetscVec, start::PetscInt, scale::PetscScalar) end\n\n@for_petsc function VecStrideScale(petsclib::$UnionPetscLib, v::PetscVec, start::$PetscInt, scale::$PetscScalar )\n\n    @chk ccall(\n               (:VecStrideScale, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscScalar),\n               v, start, scale,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnrm::PetscReal = VecStrideNorm(petsclib::PetscLibType,v::PetscVec, start::PetscInt, ntype::NormType) \nComputes the norm of subvector of a vector defined\nby a starting point and a stride.\n\nCollective\n\nInput Parameters:\n- `v`     - the vector\n- `start` - starting point of the subvector (defined by a stride)\n- `ntype` - type of norm, one of `NORM_1`, `NORM_2`, `NORM_INFINITY`\n\nOutput Parameter:\n- `nrm` - the norm\n\nLevel: advanced\n\n-seealso: `Vec`, `VecNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideNorm\"))\n\"\"\"\nfunction VecStrideNorm(petsclib::PetscLibType, v::PetscVec, start::PetscInt, ntype::NormType) end\n\n@for_petsc function VecStrideNorm(petsclib::$UnionPetscLib, v::PetscVec, start::$PetscInt, ntype::NormType )\n\tnrm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecStrideNorm, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, NormType, Ptr{$PetscReal}),\n               v, start, ntype, nrm_,\n              )\n\n\tnrm = nrm_[]\n\n\treturn nrm\nend \n\n\"\"\"\n\tidex::PetscInt,nrm::PetscReal = VecStrideMax(petsclib::PetscLibType,v::PetscVec, start::PetscInt) \nComputes the maximum of subvector of a vector defined\nby a starting point and a stride and optionally its location.\n\nCollective\n\nInput Parameters:\n- `v`     - the vector\n- `start` - starting point of the subvector (defined by a stride)\n\nOutput Parameters:\n- `idex` - the location where the maximum occurred  (pass `NULL` if not required)\n- `nrm`  - the maximum value in the subvector\n\nLevel: advanced\n\n-seealso: `Vec`, `VecMax()`, `VecStrideNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideMax\"))\n\"\"\"\nfunction VecStrideMax(petsclib::PetscLibType, v::PetscVec, start::PetscInt) end\n\n@for_petsc function VecStrideMax(petsclib::$UnionPetscLib, v::PetscVec, start::$PetscInt )\n\tidex_ = Ref{$PetscInt}()\n\tnrm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecStrideMax, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               v, start, idex_, nrm_,\n              )\n\n\tidex = idex_[]\n\tnrm = nrm_[]\n\n\treturn idex,nrm\nend \n\n\"\"\"\n\tidex::PetscInt,nrm::PetscReal = VecStrideMin(petsclib::PetscLibType,v::PetscVec, start::PetscInt) \nComputes the minimum of subvector of a vector defined\nby a starting point and a stride and optionally its location.\n\nCollective\n\nInput Parameters:\n- `v`     - the vector\n- `start` - starting point of the subvector (defined by a stride)\n\nOutput Parameters:\n- `idex` - the location where the minimum occurred. (pass `NULL` if not required)\n- `nrm`  - the minimum value in the subvector\n\nLevel: advanced\n\n-seealso: `Vec`, `VecMin()`, `VecStrideNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideMin\"))\n\"\"\"\nfunction VecStrideMin(petsclib::PetscLibType, v::PetscVec, start::PetscInt) end\n\n@for_petsc function VecStrideMin(petsclib::$UnionPetscLib, v::PetscVec, start::$PetscInt )\n\tidex_ = Ref{$PetscInt}()\n\tnrm_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecStrideMin, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               v, start, idex_, nrm_,\n              )\n\n\tidex = idex_[]\n\tnrm = nrm_[]\n\n\treturn idex,nrm\nend \n\n\"\"\"\n\tsum::PetscScalar = VecStrideSum(petsclib::PetscLibType,v::PetscVec, start::PetscInt) \nComputes the sum of subvector of a vector defined\nby a starting point and a stride.\n\nCollective\n\nInput Parameters:\n- `v`     - the vector\n- `start` - starting point of the subvector (defined by a stride)\n\nOutput Parameter:\n- `sum` - the sum\n\nLevel: advanced\n\n-seealso: `Vec`, `VecSum()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideSum\"))\n\"\"\"\nfunction VecStrideSum(petsclib::PetscLibType, v::PetscVec, start::PetscInt) end\n\n@for_petsc function VecStrideSum(petsclib::$UnionPetscLib, v::PetscVec, start::$PetscInt )\n\tsum_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:VecStrideSum, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscScalar}),\n               v, start, sum_,\n              )\n\n\tsum = sum_[]\n\n\treturn sum\nend \n\n\"\"\"\n\tVecStrideScaleAll(petsclib::PetscLibType,v::PetscVec, scales::PetscScalar) \nScales the subvectors of a vector defined\nby a starting point and a stride.\n\nLogically Collective\n\nInput Parameters:\n- `v`      - the vector\n- `scales` - values to multiply each subvector entry by\n\nLevel: advanced\n\n-seealso: `Vec`, `VecNorm()`, `VecStrideScale()`, `VecScale()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideScaleAll\"))\n\"\"\"\nfunction VecStrideScaleAll(petsclib::PetscLibType, v::PetscVec, scales::PetscScalar) end\n\n@for_petsc function VecStrideScaleAll(petsclib::$UnionPetscLib, v::PetscVec, scales::$PetscScalar )\n\n    @chk ccall(\n               (:VecStrideScaleAll, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}),\n               v, scales,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnrm::Vector{PetscReal} = VecStrideNormAll(petsclib::PetscLibType,v::PetscVec, ntype::NormType) \nComputes the norms of subvectors of a vector defined\nby a starting point and a stride.\n\nCollective\n\nInput Parameters:\n- `v`     - the vector\n- `ntype` - type of norm, one of `NORM_1`, `NORM_2`, `NORM_INFINITY`\n\nOutput Parameter:\n- `nrm` - the norms\n\nLevel: advanced\n\n-seealso: `Vec`, `VecNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideNormAll\"))\n\"\"\"\nfunction VecStrideNormAll(petsclib::PetscLibType, v::PetscVec, ntype::NormType) end\n\n@for_petsc function VecStrideNormAll(petsclib::$UnionPetscLib, v::PetscVec, ntype::NormType )\n\tnrm = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecStrideNormAll, $petsc_library),\n               PetscErrorCode,\n               (CVec, NormType, Ptr{$PetscReal}),\n               v, ntype, nrm,\n              )\n\n\n\treturn nrm\nend \n\n\"\"\"\n\tidex::Vector{PetscInt},nrm::Vector{PetscReal} = VecStrideMaxAll(petsclib::PetscLibType,v::PetscVec) \nComputes the maximums of subvectors of a vector defined\nby a starting point and a stride and optionally its location.\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameters:\n- `idex` - the location where the maximum occurred (not supported, pass `NULL`,\nif you need this, send mail to petsc-maint@mcs.anl.gov to request it)\n- `nrm`  - the maximum values of each subvector\n\nLevel: advanced\n\n-seealso: `Vec`, `VecMax()`, `VecStrideNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideMaxAll\"))\n\"\"\"\nfunction VecStrideMaxAll(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecStrideMaxAll(petsclib::$UnionPetscLib, v::PetscVec )\n\tidex = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tnrm = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecStrideMaxAll, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               v, idex, nrm,\n              )\n\n\n\treturn idex,nrm\nend \n\n\"\"\"\n\tidex::Vector{PetscInt},nrm::Vector{PetscReal} = VecStrideMinAll(petsclib::PetscLibType,v::PetscVec) \nComputes the minimum of subvector of a vector defined\nby a starting point and a stride and optionally its location.\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameters:\n- `idex` - the location where the minimum occurred (not supported, pass `NULL`,\nif you need this, send mail to petsc-maint@mcs.anl.gov to request it)\n- `nrm`  - the minimums of each subvector\n\nLevel: advanced\n\n-seealso: `Vec`, `VecMin()`, `VecStrideNorm()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideMinAll\"))\n\"\"\"\nfunction VecStrideMinAll(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecStrideMinAll(petsclib::$UnionPetscLib, v::PetscVec )\n\tidex = Vector{$PetscInt}(undef, ni);  # CHECK SIZE!!\n\tnrm = Vector{$PetscReal}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecStrideMinAll, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscInt}, Ptr{$PetscReal}),\n               v, idex, nrm,\n              )\n\n\n\treturn idex,nrm\nend \n\n\"\"\"\n\tsums::Vector{PetscScalar} = VecStrideSumAll(petsclib::PetscLibType,v::PetscVec) \nComputes the sums of subvectors of a vector defined by a stride.\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `sums` - the sums\n\nLevel: advanced\n\n-seealso: `Vec`, `VecSum()`, `VecStrideGather()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideSumAll\"))\n\"\"\"\nfunction VecStrideSumAll(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecStrideSumAll(petsclib::$UnionPetscLib, v::PetscVec )\n\tsums = Vector{$PetscScalar}(undef, ni);  # CHECK SIZE!!\n\n    @chk ccall(\n               (:VecStrideSumAll, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}),\n               v, sums,\n              )\n\n\n\treturn sums\nend \n\n\"\"\"\n\tVecStrideGatherAll(petsclib::PetscLibType,v::PetscVec, s::Vector{PetscVec}, addv::InsertMode) \nGathers all the single components from a multi\nseparate vectors.\n\nCollective\n\nInput Parameters:\n- `v`    - the vector\n- `addv` - one of `ADD_VALUES`, `INSERT_VALUES`, `MAX_VALUES`\n\nOutput Parameter:\n- `s` - the location where the subvectors are stored\n\nLevel: advanced\n\n-seealso: `Vec`, `VecStrideNorm()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`, `VecStrideGather()`,\n`VecStrideScatterAll()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideGatherAll\"))\n\"\"\"\nfunction VecStrideGatherAll(petsclib::PetscLibType, v::PetscVec, s::Vector{PetscVec}, addv::InsertMode) end\n\n@for_petsc function VecStrideGatherAll(petsclib::$UnionPetscLib, v::PetscVec, s::Vector{PetscVec}, addv::InsertMode )\n\n    @chk ccall(\n               (:VecStrideGatherAll, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{CVec}, InsertMode),\n               v, s, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStrideScatterAll(petsclib::PetscLibType,s::Vector{PetscVec}, v::PetscVec, addv::InsertMode) \nScatters all the single components from separate vectors into\na multi-component vector.\n\nCollective\n\nInput Parameters:\n- `s`    - the location where the subvectors are stored\n- `addv` - one of `ADD_VALUES`, `INSERT_VALUES`, `MAX_VALUES`\n\nOutput Parameter:\n- `v` - the multicomponent vector\n\nLevel: advanced\n\n-seealso: `Vec`, `VecStrideNorm()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`, `VecStrideGather()`,\n\n\n# External Links\n$(_doc_external(\"Vec/VecStrideScatterAll\"))\n\"\"\"\nfunction VecStrideScatterAll(petsclib::PetscLibType, s::Vector{PetscVec}, v::PetscVec, addv::InsertMode) end\n\n@for_petsc function VecStrideScatterAll(petsclib::$UnionPetscLib, s::Vector{PetscVec}, v::PetscVec, addv::InsertMode )\n\n    @chk ccall(\n               (:VecStrideScatterAll, $petsc_library),\n               PetscErrorCode,\n               (Ptr{CVec}, CVec, InsertMode),\n               s, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStrideGather(petsclib::PetscLibType,v::PetscVec, start::PetscInt, s::PetscVec, addv::InsertMode) \nGathers a single component from a multi\nanother vector.\n\nCollective\n\nInput Parameters:\n- `v`     - the vector\n- `start` - starting point of the subvector (defined by a stride)\n- `addv`  - one of `ADD_VALUES`, `INSERT_VALUES`, `MAX_VALUES`\n\nOutput Parameter:\n- `s` - the location where the subvector is stored\n\nLevel: advanced\n\n-seealso: `Vec`, `VecStrideNorm()`, `VecStrideScatter()`, `VecStrideMin()`, `VecStrideMax()`, `VecStrideGatherAll()`,\n`VecStrideScatterAll()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideGather\"))\n\"\"\"\nfunction VecStrideGather(petsclib::PetscLibType, v::PetscVec, start::PetscInt, s::PetscVec, addv::InsertMode) end\n\n@for_petsc function VecStrideGather(petsclib::$UnionPetscLib, v::PetscVec, start::$PetscInt, s::PetscVec, addv::InsertMode )\n\n    @chk ccall(\n               (:VecStrideGather, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, CVec, InsertMode),\n               v, start, s, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStrideScatter(petsclib::PetscLibType,s::PetscVec, start::PetscInt, v::PetscVec, addv::InsertMode) \nScatters a single component from a vector into a multi\n\nCollective\n\nInput Parameters:\n- `s`     - the single-component vector\n- `start` - starting point of the subvector (defined by a stride)\n- `addv`  - one of `ADD_VALUES`, `INSERT_VALUES`, `MAX_VALUES`\n\nOutput Parameter:\n- `v` - the location where the subvector is scattered (the multi-component vector)\n\nLevel: advanced\n\n-seealso: `Vec`, `VecStrideNorm()`, `VecStrideGather()`, `VecStrideMin()`, `VecStrideMax()`, `VecStrideGatherAll()`,\n`VecStrideScatterAll()`, `VecStrideSubSetScatter()`, `VecStrideSubSetGather()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideScatter\"))\n\"\"\"\nfunction VecStrideScatter(petsclib::PetscLibType, s::PetscVec, start::PetscInt, v::PetscVec, addv::InsertMode) end\n\n@for_petsc function VecStrideScatter(petsclib::$UnionPetscLib, s::PetscVec, start::$PetscInt, v::PetscVec, addv::InsertMode )\n\n    @chk ccall(\n               (:VecStrideScatter, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, CVec, InsertMode),\n               s, start, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStrideSubSetGather(petsclib::PetscLibType,v::PetscVec, nidx::PetscInt, idxv::Vector{PetscInt}, idxs::Vector{PetscInt}, s::PetscVec, addv::InsertMode) \nGathers a subset of components from a multi\nanother vector.\n\nCollective\n\nInput Parameters:\n- `v`    - the vector\n- `nidx` - the number of indices\n- `idxv` - the indices of the components 0 <= idxv[0] ...idxv[nidx-1] < bs(v), they need not be sorted\n- `idxs` - the indices of the components 0 <= idxs[0] ...idxs[nidx-1] < bs(s), they need not be sorted, may be null if nidx == bs(s) or is `PETSC_DETERMINE`\n- `addv` - one of `ADD_VALUES`, `INSERT_VALUES`, `MAX_VALUES`\n\nOutput Parameter:\n- `s` - the location where the subvector is stored\n\nLevel: advanced\n\n-seealso: `Vec`, `VecStrideNorm()`, `VecStrideScatter()`, `VecStrideGather()`, `VecStrideSubSetScatter()`, `VecStrideMin()`, `VecStrideMax()`, `VecStrideGatherAll()`,\n`VecStrideScatterAll()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideSubSetGather\"))\n\"\"\"\nfunction VecStrideSubSetGather(petsclib::PetscLibType, v::PetscVec, nidx::PetscInt, idxv::Vector{PetscInt}, idxs::Vector{PetscInt}, s::PetscVec, addv::InsertMode) end\n\n@for_petsc function VecStrideSubSetGather(petsclib::$UnionPetscLib, v::PetscVec, nidx::$PetscInt, idxv::Vector{$PetscInt}, idxs::Vector{$PetscInt}, s::PetscVec, addv::InsertMode )\n\n    @chk ccall(\n               (:VecStrideSubSetGather, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, CVec, InsertMode),\n               v, nidx, idxv, idxs, s, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecStrideSubSetScatter(petsclib::PetscLibType,s::PetscVec, nidx::PetscInt, idxs::Vector{PetscInt}, idxv::Vector{PetscInt}, v::PetscVec, addv::InsertMode) \nScatters components from a vector into a subset of components of a multi\n\nCollective\n\nInput Parameters:\n- `s`    - the smaller-component vector\n- `nidx` - the number of indices in idx\n- `idxs` - the indices of the components in the smaller-component vector, 0 <= idxs[0] ...idxs[nidx-1] < bs(s) they need not be sorted, may be null if nidx == bs(s) or is `PETSC_DETERMINE`\n- `idxv` - the indices of the components in the larger-component vector, 0 <= idx[0] ...idx[nidx-1] < bs(v) they need not be sorted\n- `addv` - one of `ADD_VALUES`, `INSERT_VALUES`, `MAX_VALUES`\n\nOutput Parameter:\n- `v` - the location where the subvector is into scattered (the multi-component vector)\n\nLevel: advanced\n\n-seealso: `Vec`, `VecStrideNorm()`, `VecStrideGather()`, `VecStrideSubSetGather()`, `VecStrideMin()`, `VecStrideMax()`, `VecStrideGatherAll()`,\n`VecStrideScatterAll()`\n\n# External Links\n$(_doc_external(\"Vec/VecStrideSubSetScatter\"))\n\"\"\"\nfunction VecStrideSubSetScatter(petsclib::PetscLibType, s::PetscVec, nidx::PetscInt, idxs::Vector{PetscInt}, idxv::Vector{PetscInt}, v::PetscVec, addv::InsertMode) end\n\n@for_petsc function VecStrideSubSetScatter(petsclib::$UnionPetscLib, s::PetscVec, nidx::$PetscInt, idxs::Vector{$PetscInt}, idxv::Vector{$PetscInt}, v::PetscVec, addv::InsertMode )\n\n    @chk ccall(\n               (:VecStrideSubSetScatter, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, Ptr{$PetscInt}, Ptr{$PetscInt}, CVec, InsertMode),\n               s, nidx, idxs, idxv, v, addv,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSqrtAbs(petsclib::PetscLibType,v::PetscVec) \nReplaces each component of a vector by the square root of its magnitude.\n\nNot Collective\n\nInput Parameter:\n- `v` - The vector\n\nLevel: beginner\n\n-seealso: `Vec`, `VecLog()`, `VecExp()`, `VecReciprocal()`, `VecAbs()`\n\n\n# External Links\n$(_doc_external(\"Vec/VecSqrtAbs\"))\n\"\"\"\nfunction VecSqrtAbs(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecSqrtAbs(petsclib::$UnionPetscLib, v::PetscVec )\n\n    @chk ccall(\n               (:VecSqrtAbs, $petsc_library),\n               PetscErrorCode,\n               (CVec,),\n               v,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tsum::PetscScalar = VecSum(petsclib::PetscLibType,v::PetscVec) \nComputes the sum of all the components of a vector.\n\nCollective\n\nInput Parameter:\n- `v` - the vector\n\nOutput Parameter:\n- `sum` - the result\n\nLevel: beginner\n\n-seealso: `Vec`, `VecMean()`, `VecNorm()`\n\n# External Links\n$(_doc_external(\"Vec/VecSum\"))\n\"\"\"\nfunction VecSum(petsclib::PetscLibType, v::PetscVec) end\n\n@for_petsc function VecSum(petsclib::$UnionPetscLib, v::PetscVec )\n\tsum_ = Ref{$PetscScalar}()\n\n    @chk ccall(\n               (:VecSum, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{$PetscScalar}),\n               v, sum_,\n              )\n\n\tsum = sum_[]\n\n\treturn sum\nend \n\n\"\"\"\n\tVecShift(petsclib::PetscLibType,v::PetscVec, shift::PetscScalar) \nShifts all of the components of a vector by computing\n`x[i] = x[i] + shift`.\n\nLogically Collective\n\nInput Parameters:\n- `v`     - the vector\n- `shift` - the shift\n\nLevel: intermediate\n\n-seealso: `Vec`, `VecISShift()`\n\n# External Links\n$(_doc_external(\"Vec/VecShift\"))\n\"\"\"\nfunction VecShift(petsclib::PetscLibType, v::PetscVec, shift::PetscScalar) end\n\n@for_petsc function VecShift(petsclib::$UnionPetscLib, v::PetscVec, shift::$PetscScalar )\n\n    @chk ccall(\n               (:VecShift, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscScalar),\n               v, shift,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterSetUp(petsclib::PetscLibType,sf::VecScatter) \nSets up the `VecScatter` to be able to actually scatter information between vectors\n\nCollective\n\nInput Parameter:\n- `sf` - the scatter context\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`, `VecScatterCopy()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterSetUp\"))\n\"\"\"\nfunction VecScatterSetUp(petsclib::PetscLibType, sf::VecScatter) end\n\n@for_petsc function VecScatterSetUp(petsclib::$UnionPetscLib, sf::VecScatter )\n\n    @chk ccall(\n               (:VecScatterSetUp, $petsc_library),\n               PetscErrorCode,\n               (VecScatter,),\n               sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterSetType(petsclib::PetscLibType,sf::VecScatter, type::VecScatterType) \nBuilds a vector scatter, for a particular vector scatter implementation.\n\nCollective\n\nInput Parameters:\n- `sf`   - The `VecScatter` object\n- `type` - The name of the vector scatter type\n\nOptions Database Key:\n- `-sf_type <type>` - Sets the `VecScatterType`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterType`, `VecScatterGetType()`, `VecScatterCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterSetType\"))\n\"\"\"\nfunction VecScatterSetType(petsclib::PetscLibType, sf::VecScatter, type::VecScatterType) end\n\n@for_petsc function VecScatterSetType(petsclib::$UnionPetscLib, sf::VecScatter, type::VecScatterType )\n\n    @chk ccall(\n               (:VecScatterSetType, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, VecScatterType),\n               sf, type,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\ttype::VecScatterType = VecScatterGetType(petsclib::PetscLibType,sf::VecScatter) \nGets the vector scatter type name (as a string) from the `VecScatter`.\n\nNot Collective\n\nInput Parameter:\n- `sf` - The vector scatter\n\nOutput Parameter:\n- `type` - The vector scatter type name\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterType`, `VecScatterSetType()`, `VecScatterCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterGetType\"))\n\"\"\"\nfunction VecScatterGetType(petsclib::PetscLibType, sf::VecScatter) end\n\n@for_petsc function VecScatterGetType(petsclib::$UnionPetscLib, sf::VecScatter )\n\ttype_ = Ref{VecScatterType}()\n\n    @chk ccall(\n               (:VecScatterGetType, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, Ptr{VecScatterType}),\n               sf, type_,\n              )\n\n\ttype = unsafe_string(type_[])\n\n\treturn type\nend \n\n\"\"\"\n\tVecScatterRegister(petsclib::PetscLibType,sname::Vector{Cchar}, fnc::external) \nAdds a new vector scatter component implementation\n\nNot Collective\n\nInput Parameters:\n- `sname`    - The name of a new user-defined creation routine\n- `function` - The creation routine\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterType`, `VecRegister()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterRegister\"))\n\"\"\"\nfunction VecScatterRegister(petsclib::PetscLibType, sname::Vector{Cchar}, fnc::external) end\n\n@for_petsc function VecScatterRegister(petsclib::$UnionPetscLib, sname::Vector{Cchar}, fnc::external )\n\n    @chk ccall(\n               (:VecScatterRegister, $petsc_library),\n               PetscErrorCode,\n               (Ptr{Cchar}, external),\n               sname, fnc,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tflg::PetscBool = VecScatterGetMerged(petsclib::PetscLibType,sf::VecScatter) \nReturns true if the scatter is completed in the `VecScatterBegin()`\nand the `VecScatterEnd()` does nothing\n\nNot Collective\n\nInput Parameter:\n- `sf` - scatter context created with `VecScatterCreate()`\n\nOutput Parameter:\n- `flg` - `PETSC_TRUE` if the `VecScatterBegin()`/`VecScatterEnd()` are all done during the `VecScatterBegin()`\n\nLevel: developer\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`, `VecScatterEnd()`, `VecScatterBegin()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterGetMerged\"))\n\"\"\"\nfunction VecScatterGetMerged(petsclib::PetscLibType, sf::VecScatter) end\n\n@for_petsc function VecScatterGetMerged(petsclib::$UnionPetscLib, sf::VecScatter )\n\tflg_ = Ref{PetscBool}()\n\n    @chk ccall(\n               (:VecScatterGetMerged, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, Ptr{PetscBool}),\n               sf, flg_,\n              )\n\n\tflg = flg_[]\n\n\treturn flg\nend \n\n\"\"\"\n\tVecScatterDestroy(petsclib::PetscLibType,sf::VecScatter) \nDestroys a scatter context created by `VecScatterCreate()`\n\nCollective\n\nInput Parameter:\n- `sf` - the scatter context\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`, `VecScatterCopy()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterDestroy\"))\n\"\"\"\nfunction VecScatterDestroy(petsclib::PetscLibType, sf::VecScatter) end\n\n@for_petsc function VecScatterDestroy(petsclib::$UnionPetscLib, sf::VecScatter )\n\n    sf_ = Ref{VecScatter}(sf)\n\n    @chk ccall(\n               (:VecScatterDestroy, $petsc_library),\n               PetscErrorCode,\n               (Ptr{VecScatter},),\n               sf_,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterCopy(petsclib::PetscLibType,sf::VecScatter, newsf::VecScatter) \nMakes a copy of a scatter context.\n\nCollective\n\nInput Parameter:\n- `sf` - the scatter context\n\nOutput Parameter:\n- `newsf` - the context copy\n\nLevel: advanced\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterType`, `VecScatterCreate()`, `VecScatterDestroy()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterCopy\"))\n\"\"\"\nfunction VecScatterCopy(petsclib::PetscLibType, sf::VecScatter, newsf::VecScatter) end\n\n@for_petsc function VecScatterCopy(petsclib::$UnionPetscLib, sf::VecScatter, newsf::VecScatter )\n\n    @chk ccall(\n               (:VecScatterCopy, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, Ptr{VecScatter}),\n               sf, newsf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterViewFromOptions(petsclib::PetscLibType,sf::VecScatter, obj::PetscObject, name::Vector{Cchar}) \nView a `VecScatter` object based on values in the options database\n\nCollective\n\nInput Parameters:\n- `sf`   - the scatter context\n- `obj`  - Optional object\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterView()`, `PetscObjectViewFromOptions()`, `VecScatterCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterViewFromOptions\"))\n\"\"\"\nfunction VecScatterViewFromOptions(petsclib::PetscLibType, sf::VecScatter, obj::PetscObject, name::Vector{Cchar}) end\n\n@for_petsc function VecScatterViewFromOptions(petsclib::$UnionPetscLib, sf::VecScatter, obj::PetscObject, name::Vector{Cchar} )\n\n    @chk ccall(\n               (:VecScatterViewFromOptions, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, PetscObject, Ptr{Cchar}),\n               sf, obj, name,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterView(petsclib::PetscLibType,sf::VecScatter, viewer::PetscViewer) \nViews a vector scatter context.\n\nCollective\n\nInput Parameters:\n- `sf`     - the scatter context\n- `viewer` - the viewer for displaying the context\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `PetscViewer`, `VecScatterViewFromOptions()`, `PetscObjectViewFromOptions()`, `VecScatterCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterView\"))\n\"\"\"\nfunction VecScatterView(petsclib::PetscLibType, sf::VecScatter, viewer::PetscViewer) end\n\n@for_petsc function VecScatterView(petsclib::$UnionPetscLib, sf::VecScatter, viewer::PetscViewer )\n\n    @chk ccall(\n               (:VecScatterView, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, PetscViewer),\n               sf, viewer,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterRemap(petsclib::PetscLibType,sf::VecScatter, tomap::Vector{PetscInt}, frommap::Vector{PetscInt}) \nRemaps the \"from\" and \"to\" indices in a\nvector scatter context.\n\nCollective\n\nInput Parameters:\n- `sf`      - vector scatter context\n- `tomap`   - remapping plan for \"to\" indices (may be `NULL`).\n- `frommap` - remapping plan for \"from\" indices (may be `NULL`)\n\nLevel: developer\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterRemap\"))\n\"\"\"\nfunction VecScatterRemap(petsclib::PetscLibType, sf::VecScatter, tomap::Vector{PetscInt}, frommap::Vector{PetscInt}) end\n\n@for_petsc function VecScatterRemap(petsclib::$UnionPetscLib, sf::VecScatter, tomap::Vector{$PetscInt}, frommap::Vector{$PetscInt} )\n\n    @chk ccall(\n               (:VecScatterRemap, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, Ptr{$PetscInt}, Ptr{$PetscInt}),\n               sf, tomap, frommap,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterSetFromOptions(petsclib::PetscLibType,sf::VecScatter) \nConfigures the vector scatter from values in the options database.\n\nCollective\n\nInput Parameter:\n- `sf` - The vector scatter\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`, `VecScatterDestroy()`, `VecScatterSetUp()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterSetFromOptions\"))\n\"\"\"\nfunction VecScatterSetFromOptions(petsclib::PetscLibType, sf::VecScatter) end\n\n@for_petsc function VecScatterSetFromOptions(petsclib::$UnionPetscLib, sf::VecScatter )\n\n    @chk ccall(\n               (:VecScatterSetFromOptions, $petsc_library),\n               PetscErrorCode,\n               (VecScatter,),\n               sf,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tnewsf::VecScatter = VecScatterCreate(petsclib::PetscLibType,x::PetscVec, ix::IS, y::PetscVec, iy::IS) \nCreates a vector scatter `VecScatter` context that is used to communicate entries between two vectors `Vec`\n\nCollective\n\nInput Parameters:\n- `x`  - a vector that defines the shape (parallel data layout of the vector) of vectors from which we scatter\n- `y`  - a vector that defines the shape (parallel data layout of the vector) of vectors to which we scatter\n- `ix` - the indices of `x` to scatter (if `NULL` scatters all values)\n- `iy` - the indices of `y` to hold results (if `NULL` fills entire vector `yin` in order)\n\nOutput Parameter:\n- `newsf` - location to store the new scatter context\n\nOptions Database Keys:\n- `-vecscatter_view`              - Prints detail of communications\n- `-vecscatter_view ::ascii_info` - Print less details about communication\n- `-vecscatter_merge`             - `VecScatterBegin()` handles all of the communication, `VecScatterEnd()` is a nop\neliminates the chance for overlap of computation and communication\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterDestroy()`, `VecScatterCreateToAll()`, `VecScatterCreateToZero()`, `PetscSFCreate()`,\n`VecScatterType`, `InsertMode`, `ScatterMode`, `VecScatterBegin()`, `VecScatterEnd()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterCreate\"))\n\"\"\"\nfunction VecScatterCreate(petsclib::PetscLibType, x::PetscVec, ix::IS, y::PetscVec, iy::IS) end\n\n@for_petsc function VecScatterCreate(petsclib::$UnionPetscLib, x::PetscVec, ix::IS, y::PetscVec, iy::IS )\n\tnewsf_ = Ref{VecScatter}()\n\n    @chk ccall(\n               (:VecScatterCreate, $petsc_library),\n               PetscErrorCode,\n               (CVec, CIS, CVec, CIS, Ptr{VecScatter}),\n               x, ix, y, iy, newsf_,\n              )\n\n\tnewsf = newsf_[]\n\n\treturn newsf\nend \n\n\"\"\"\n\tctx::VecScatter,vout::PetscVec = VecScatterCreateToAll(petsclib::PetscLibType,vin::PetscVec) \nCreates a vector and a scatter context that copies all\nvector values to each processor\n\nCollective\n\nInput Parameter:\n- `vin` - an `MPIVEC`\n\nOutput Parameters:\n- `ctx`  - scatter context\n- `vout` - output `SEQVEC` that is large enough to scatter into\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`, `VecScatterCreateToZero()`, `VecScatterBegin()`, `VecScatterEnd()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterCreateToAll\"))\n\"\"\"\nfunction VecScatterCreateToAll(petsclib::PetscLibType, vin::PetscVec) end\n\n@for_petsc function VecScatterCreateToAll(petsclib::$UnionPetscLib, vin::PetscVec )\n\tctx_ = Ref{VecScatter}()\n\tvout_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecScatterCreateToAll, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{VecScatter}, Ptr{CVec}),\n               vin, ctx_, vout_,\n              )\n\n\tctx = ctx_[]\n\tvout = PetscVec(vout_[], petsclib)\n\n\treturn ctx,vout\nend \n\n\"\"\"\n\tctx::VecScatter,vout::PetscVec = VecScatterCreateToZero(petsclib::PetscLibType,vin::PetscVec) \nCreates an output vector and a scatter context used to\ncopy all vector values into the output vector on the zeroth processor\n\nCollective\n\nInput Parameter:\n- `vin` - `Vec` of type `MPIVEC`\n\nOutput Parameters:\n- `ctx`  - scatter context\n- `vout` - output `SEQVEC` that is large enough to scatter into on processor 0 and\nof length zero on all other processors\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`, `VecScatterCreateToAll()`, `VecScatterBegin()`, `VecScatterEnd()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterCreateToZero\"))\n\"\"\"\nfunction VecScatterCreateToZero(petsclib::PetscLibType, vin::PetscVec) end\n\n@for_petsc function VecScatterCreateToZero(petsclib::$UnionPetscLib, vin::PetscVec )\n\tctx_ = Ref{VecScatter}()\n\tvout_ = Ref{CVec}()\n\n    @chk ccall(\n               (:VecScatterCreateToZero, $petsc_library),\n               PetscErrorCode,\n               (CVec, Ptr{VecScatter}, Ptr{CVec}),\n               vin, ctx_, vout_,\n              )\n\n\tctx = ctx_[]\n\tvout = PetscVec(vout_[], petsclib)\n\n\treturn ctx,vout\nend \n\n\"\"\"\n\tVecScatterBegin(petsclib::PetscLibType,sf::VecScatter, x::PetscVec, y::PetscVec, addv::InsertMode, mode::ScatterMode) \nBegins a generalized scatter from one vector to\nanother. Complete the scattering phase with `VecScatterEnd()`.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `sf`   - scatter context generated by `VecScatterCreate()`\n- `x`    - the vector from which we scatter\n- `y`    - the vector to which we scatter\n- `addv` - either `ADD_VALUES`, `MAX_VALUES`, `MIN_VALUES` or `INSERT_VALUES`, with `INSERT_VALUES` mode any location\nnot scattered to retains its old value; i.e. the vector is NOT first zeroed.\n- `mode` - the scattering mode, usually `SCATTER_FORWARD`.  The available modes are: `SCATTER_FORWARD` or `SCATTER_REVERSE`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterCreate()`, `VecScatterEnd()`, `InsertMode`, `ScatterMode`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterBegin\"))\n\"\"\"\nfunction VecScatterBegin(petsclib::PetscLibType, sf::VecScatter, x::PetscVec, y::PetscVec, addv::InsertMode, mode::ScatterMode) end\n\n@for_petsc function VecScatterBegin(petsclib::$UnionPetscLib, sf::VecScatter, x::PetscVec, y::PetscVec, addv::InsertMode, mode::ScatterMode )\n\n    @chk ccall(\n               (:VecScatterBegin, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, CVec, CVec, InsertMode, ScatterMode),\n               sf, x, y, addv, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecScatterEnd(petsclib::PetscLibType,sf::VecScatter, x::PetscVec, y::PetscVec, addv::InsertMode, mode::ScatterMode) \nEnds a generalized scatter from one vector to another. Call\nafter first calling `VecScatterBegin()`.\n\nNeighbor-wise Collective\n\nInput Parameters:\n- `sf`   - scatter context generated by `VecScatterCreate()`\n- `x`    - the vector from which we scatter\n- `y`    - the vector to which we scatter\n- `addv` - one of `ADD_VALUES`, `MAX_VALUES`, `MIN_VALUES` or `INSERT_VALUES`\n- `mode` - the scattering mode, usually `SCATTER_FORWARD`.  The available modes are: `SCATTER_FORWARD`, `SCATTER_REVERSE`\n\nLevel: intermediate\n\n-seealso: [](sec_scatter), `VecScatter`, `VecScatterBegin()`, `VecScatterCreate()`\n\n# External Links\n$(_doc_external(\"Vec/VecScatterEnd\"))\n\"\"\"\nfunction VecScatterEnd(petsclib::PetscLibType, sf::VecScatter, x::PetscVec, y::PetscVec, addv::InsertMode, mode::ScatterMode) end\n\n@for_petsc function VecScatterEnd(petsclib::$UnionPetscLib, sf::VecScatter, x::PetscVec, y::PetscVec, addv::InsertMode, mode::ScatterMode )\n\n    @chk ccall(\n               (:VecScatterEnd, $petsc_library),\n               PetscErrorCode,\n               (VecScatter, CVec, CVec, InsertMode, ScatterMode),\n               sf, x, y, addv, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tstepmax::PetscReal = VecStepMaxBounded(petsclib::PetscLibType,X::PetscVec, DX::PetscVec, XL::PetscVec, XU::PetscVec) \nSee below\n\nCollective\n\nInput Parameters:\n- `X`  - vector with no negative entries\n- `XL` - lower bounds\n- `XU` - upper bounds\n- `DX` - step direction, can have negative, positive or zero entries\n\nOutput Parameter:\n- `stepmax` - minimum value so that X[i] + stepmax*DX[i] <= XL[i]  or  XU[i] <= X[i] + stepmax*DX[i]\n\nLevel: intermediate\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecStepMaxBounded\"))\n\"\"\"\nfunction VecStepMaxBounded(petsclib::PetscLibType, X::PetscVec, DX::PetscVec, XL::PetscVec, XU::PetscVec) end\n\n@for_petsc function VecStepMaxBounded(petsclib::$UnionPetscLib, X::PetscVec, DX::PetscVec, XL::PetscVec, XU::PetscVec )\n\tstepmax_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecStepMaxBounded, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec, Ptr{$PetscReal}),\n               X, DX, XL, XU, stepmax_,\n              )\n\n\tstepmax = stepmax_[]\n\n\treturn stepmax\nend \n\n\"\"\"\n\tboundmin::PetscReal,wolfemin::PetscReal,boundmax::PetscReal = VecStepBoundInfo(petsclib::PetscLibType,X::PetscVec, DX::PetscVec, XL::PetscVec, XU::PetscVec) \nSee below\n\nCollective\n\nInput Parameters:\n- `X`  - vector with no negative entries\n- `XL` - lower bounds\n- `XU` - upper bounds\n- `DX` - step direction, can have negative, positive or zero entries\n\nOutput Parameters:\n- `boundmin` - (may be `NULL` this it is not computed) maximum value so that   XL[i] <= X[i] + boundmax*DX[i] <= XU[i]\n- `wolfemin` - (may be `NULL` this it is not computed)\n- `boundmax` - (may be `NULL` this it is not computed) minimum value so that X[i] + boundmax*DX[i] <= XL[i]  or  XU[i] <= X[i] + boundmax*DX[i]\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecStepBoundInfo\"))\n\"\"\"\nfunction VecStepBoundInfo(petsclib::PetscLibType, X::PetscVec, DX::PetscVec, XL::PetscVec, XU::PetscVec) end\n\n@for_petsc function VecStepBoundInfo(petsclib::$UnionPetscLib, X::PetscVec, DX::PetscVec, XL::PetscVec, XU::PetscVec )\n\tboundmin_ = Ref{$PetscReal}()\n\twolfemin_ = Ref{$PetscReal}()\n\tboundmax_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecStepBoundInfo, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec, Ptr{$PetscReal}, Ptr{$PetscReal}, Ptr{$PetscReal}),\n               X, DX, XL, XU, boundmin_, wolfemin_, boundmax_,\n              )\n\n\tboundmin = boundmin_[]\n\twolfemin = wolfemin_[]\n\tboundmax = boundmax_[]\n\n\treturn boundmin,wolfemin,boundmax\nend \n\n\"\"\"\n\tstep::PetscReal = VecStepMax(petsclib::PetscLibType,X::PetscVec, DX::PetscVec) \nReturns the largest value so that x[i] + step*DX[i] >= 0 for all i\n\nCollective\n\nInput Parameters:\n- `X`  - vector with no negative entries\n- `DX` - a step direction, can have negative, positive or zero entries\n\nOutput Parameter:\n- `step` - largest value such that x[i] + step*DX[i] >= 0 for all i\n\nLevel: advanced\n\n-seealso: `Vec`\n\n# External Links\n$(_doc_external(\"Vec/VecStepMax\"))\n\"\"\"\nfunction VecStepMax(petsclib::PetscLibType, X::PetscVec, DX::PetscVec) end\n\n@for_petsc function VecStepMax(petsclib::$UnionPetscLib, X::PetscVec, DX::PetscVec )\n\tstep_ = Ref{$PetscReal}()\n\n    @chk ccall(\n               (:VecStepMax, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, Ptr{$PetscReal}),\n               X, DX, step_,\n              )\n\n\tstep = step_[]\n\n\treturn step\nend \n\n\"\"\"\n\tVecsDestroy(petsclib::PetscLibType,x::Vecs) \n\n# External Links\n$(_doc_external(\"Vec/VecsDestroy\"))\n\"\"\"\nfunction VecsDestroy(petsclib::PetscLibType, x::Vecs) end\n\n@for_petsc function VecsDestroy(petsclib::$UnionPetscLib, x::Vecs )\n\n    @chk ccall(\n               (:VecsDestroy, $petsc_library),\n               PetscErrorCode,\n               (Vecs,),\n               x,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tx::Vecs = VecsCreateSeq(petsclib::PetscLibType,comm::MPI_Comm, p::PetscInt, m::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/VecsCreateSeq\"))\n\"\"\"\nfunction VecsCreateSeq(petsclib::PetscLibType, comm::MPI_Comm, p::PetscInt, m::PetscInt) end\n\n@for_petsc function VecsCreateSeq(petsclib::$UnionPetscLib, comm::MPI_Comm, p::$PetscInt, m::$PetscInt )\n\tx_ = Ref{Vecs}()\n\n    @chk ccall(\n               (:VecsCreateSeq, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{Vecs}),\n               comm, p, m, x_,\n              )\n\n\tx = x_[]\n\n\treturn x\nend \n\n\"\"\"\n\ta::PetscScalar,x::Vecs = VecsCreateSeqWithArray(petsclib::PetscLibType,comm::MPI_Comm, p::PetscInt, m::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/VecsCreateSeqWithArray\"))\n\"\"\"\nfunction VecsCreateSeqWithArray(petsclib::PetscLibType, comm::MPI_Comm, p::PetscInt, m::PetscInt) end\n\n@for_petsc function VecsCreateSeqWithArray(petsclib::$UnionPetscLib, comm::MPI_Comm, p::$PetscInt, m::$PetscInt )\n\ta_ = Ref{$PetscScalar}()\n\tx_ = Ref{Vecs}()\n\n    @chk ccall(\n               (:VecsCreateSeqWithArray, $petsc_library),\n               PetscErrorCode,\n               (MPI_Comm, $PetscInt, $PetscInt, Ptr{$PetscScalar}, Ptr{Vecs}),\n               comm, p, m, a_, x_,\n              )\n\n\ta = a_[]\n\tx = x_[]\n\n\treturn a,x\nend \n\n\"\"\"\n\ty::Vecs = VecsDuplicate(petsclib::PetscLibType,x::Vecs) \n\n# External Links\n$(_doc_external(\"Vec/VecsDuplicate\"))\n\"\"\"\nfunction VecsDuplicate(petsclib::PetscLibType, x::Vecs) end\n\n@for_petsc function VecsDuplicate(petsclib::$UnionPetscLib, x::Vecs )\n\ty_ = Ref{Vecs}()\n\n    @chk ccall(\n               (:VecsDuplicate, $petsc_library),\n               PetscErrorCode,\n               (Vecs, Ptr{Vecs}),\n               x, y_,\n              )\n\n\ty = y_[]\n\n\treturn y\nend \n\n\"\"\"\n\tVecSetValuesSection(petsclib::PetscLibType,v::PetscVec, s::PetscSection, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) \nSets all the values associated with a given point, according to the section, in the given `Vec`\n\nNot Collective\n\nInput Parameters:\n- `v`      - the `Vec`\n- `s`      - the organizing `PetscSection`\n- `point`  - the point\n- `values` - the array of input values\n- `mode`   - the insertion mode, either `ADD_VALUES` or `INSERT_VALUES`\n\nLevel: developer\n\n-seealso: `PetscSection`, `PetscSectionCreate()`, `VecGetValuesSection()`\n\n# External Links\n$(_doc_external(\"Vec/VecSetValuesSection\"))\n\"\"\"\nfunction VecSetValuesSection(petsclib::PetscLibType, v::PetscVec, s::PetscSection, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode) end\n\n@for_petsc function VecSetValuesSection(petsclib::$UnionPetscLib, v::PetscVec, s::PetscSection, point::$PetscInt, values::Vector{$PetscScalar}, mode::InsertMode )\n\n    @chk ccall(\n               (:VecSetValuesSection, $petsc_library),\n               PetscErrorCode,\n               (CVec, PetscSection, $PetscInt, Ptr{$PetscScalar}, InsertMode),\n               v, s, point, values, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetDM(petsclib::PetscLibType,v::PetscVec, dm::PetscDM) \nSets the `DM` defining the data layout of the vector.\n\nNot Collective\n\nInput Parameters:\n- `v`  - The `Vec`\n- `dm` - The `DM`\n\nLevel: developer\n\nNotes:\nThis is rarely used, generally one uses `DMGetLocalVector()` or  `DMGetGlobalVector()` to create a vector associated with a given `DM`\n\nThis is NOT the same as `DMCreateGlobalVector()` since it does not change the view methods or perform other customization, but merely sets the `DM` member.\n\nSee also: \n=== \n`DM`, `VecGetDM()`, `DMGetLocalVector()`, `DMGetGlobalVector()`, `DMSetVecType()`\n\n# External Links\n$(_doc_external(\"Dm/VecSetDM\"))\n\"\"\"\nfunction VecSetDM(petsclib::PetscLibType, v::PetscVec, dm::PetscDM) end\n\n@for_petsc function VecSetDM(petsclib::$UnionPetscLib, v::PetscVec, dm::PetscDM )\n\n    @chk ccall(\n               (:VecSetDM, $petsc_library),\n               PetscErrorCode,\n               (CVec, CDM),\n               v, dm,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSFischer(petsclib::PetscLibType,X::PetscVec, F::PetscVec, L::PetscVec, U::PetscVec, mu::PetscReal, FB::PetscVec) \nEvaluates the Smoothed Fischer\ncomplementarity problems.\n\nLogically Collective\n\nInput Parameters:\n- `X`  - current point\n- `F`  - function evaluated at x\n- `L`  - lower bounds\n- `U`  - upper bounds\n- `mu` - smoothing parameter\n\nOutput Parameter:\n- `FB` - The Smoothed Fischer-Burmeister function vector\n\n-seealso: `Vec`, `VecFischer()`, `MatDFischer()`, `MatDSFischer()`\n\n# External Links\n$(_doc_external(\"Tao/VecSFischer\"))\n\"\"\"\nfunction VecSFischer(petsclib::PetscLibType, X::PetscVec, F::PetscVec, L::PetscVec, U::PetscVec, mu::PetscReal, FB::PetscVec) end\n\n@for_petsc function VecSFischer(petsclib::$UnionPetscLib, X::PetscVec, F::PetscVec, L::PetscVec, U::PetscVec, mu::$PetscReal, FB::PetscVec )\n\n    @chk ccall(\n               (:VecSFischer, $petsc_library),\n               PetscErrorCode,\n               (CVec, CVec, CVec, CVec, $PetscReal, CVec),\n               X, F, L, U, mu, FB,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetValue(petsclib::PetscLibType,v::PetscVec, i::PetscInt, va::PetscScalar, mode::InsertMode) \n\n# External Links\n$(_doc_external(\"Vec/VecSetValue\"))\n\"\"\"\nfunction VecSetValue(petsclib::PetscLibType, v::PetscVec, i::PetscInt, va::PetscScalar, mode::InsertMode) end\n\n@for_petsc function VecSetValue(petsclib::$UnionPetscLib, v::PetscVec, i::$PetscInt, va::$PetscScalar, mode::InsertMode )\n\n    @chk ccall(\n               (:VecSetValue, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscScalar, InsertMode),\n               v, i, va, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetValueLocal(petsclib::PetscLibType,v::PetscVec, i::PetscInt, va::PetscScalar, mode::InsertMode) \n\n# External Links\n$(_doc_external(\"Vec/VecSetValueLocal\"))\n\"\"\"\nfunction VecSetValueLocal(petsclib::PetscLibType, v::PetscVec, i::PetscInt, va::PetscScalar, mode::InsertMode) end\n\n@for_petsc function VecSetValueLocal(petsclib::$UnionPetscLib, v::PetscVec, i::$PetscInt, va::$PetscScalar, mode::InsertMode )\n\n    @chk ccall(\n               (:VecSetValueLocal, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscScalar, InsertMode),\n               v, i, va, mode,\n              )\n\n\n\treturn nothing\nend \n\n\"\"\"\n\tVecSetErrorIfLocked(petsclib::PetscLibType,x::PetscVec, arg::PetscInt) \n\n# External Links\n$(_doc_external(\"Vec/VecSetErrorIfLocked\"))\n\"\"\"\nfunction VecSetErrorIfLocked(petsclib::PetscLibType, x::PetscVec, arg::PetscInt) end\n\n@for_petsc function VecSetErrorIfLocked(petsclib::$UnionPetscLib, x::PetscVec, arg::$PetscInt )\n\n    @chk ccall(\n               (:VecSetErrorIfLocked, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt),\n               x, arg,\n              )\n\n\n\treturn nothing\nend \n\n"
  },
  {
    "path": "src/autowrapped/enums_wrappers.jl",
    "content": "@enum PetscRegressorLinearType begin\n    REGRESSOR_LINEAR_OLS = 0\n    REGRESSOR_LINEAR_LASSO = 1\n    REGRESSOR_LINEAR_RIDGE = 2\nend \n\n@enum DMFieldContinuity begin\n    DMFIELD_VERTEX = 0\n    DMFIELD_EDGE = 1\n    DMFIELD_FACET = 2\n    DMFIELD_CELL = 3\nend \n\n@enum ScatterMode begin\n    SCATTER_FORWARD = 0\n    SCATTER_REVERSE = 1\n    SCATTER_FORWARD_LOCAL = 2\n    SCATTER_REVERSE_LOCAL = 3\nend \n\n@enum NormType begin\n    NORM_1 = 0\n    NORM_2 = 1\n    NORM_FROBENIUS = 2\n    NORM_INFINITY = 3\n    NORM_1_AND_2 = 4\nend \n\n@enum ReductionType begin\n    REDUCTION_SUM_REALPART = 10\n    REDUCTION_MEAN_REALPART = 11\n    REDUCTION_SUM_IMAGINARYPART = 12\n    REDUCTION_MEAN_IMAGINARYPART = 13\nend \n\n@enum VecOption begin\n    VEC_IGNORE_OFF_PROC_ENTRIES = 0\n    VEC_IGNORE_NEGATIVE_INDICES = 1\n    VEC_SUBSET_OFF_PROC_ENTRIES = 2\nend \n\n@enum VecOperation begin\n    VECOP_DUPLICATE = 0\n    VECOP_SET = 10\n    VECOP_VIEW = 33\n    VECOP_LOAD = 41\n    VECOP_VIEWNATIVE = 68\n    VECOP_LOADNATIVE = 69\nend \n\n@enum VecTaggerCDFMethod begin\n    VECTAGGER_CDF_GATHER = 0\n    VECTAGGER_CDF_ITERATIVE = 1\n    VECTAGGER_CDF_NUM_METHODS = 2\nend \n\n@enum PetscDrawMarkerType begin\n    PETSC_DRAW_MARKER_CROSS = 0\n    PETSC_DRAW_MARKER_POINT = 1\n    PETSC_DRAW_MARKER_PLUS = 2\n    PETSC_DRAW_MARKER_CIRCLE = 3\nend \n\n@enum PetscDrawButton begin\n    PETSC_BUTTON_NONE = 0\n    PETSC_BUTTON_LEFT = 1\n    PETSC_BUTTON_CENTER = 2\n    PETSC_BUTTON_RIGHT = 3\n    PETSC_BUTTON_WHEEL_UP = 4\n    PETSC_BUTTON_WHEEL_DOWN = 5\n    PETSC_BUTTON_LEFT_SHIFT = 6\n    PETSC_BUTTON_CENTER_SHIFT = 7\n    PETSC_BUTTON_RIGHT_SHIFT = 8\nend \n\n@enum PetscWeakFormKind begin\n    PETSC_WF_OBJECTIVE = 0\n    PETSC_WF_F0 = 1\n    PETSC_WF_F1 = 2\n    PETSC_WF_G0 = 3\n    PETSC_WF_G1 = 4\n    PETSC_WF_G2 = 5\n    PETSC_WF_G3 = 6\n    PETSC_WF_GP0 = 7\n    PETSC_WF_GP1 = 8\n    PETSC_WF_GP2 = 9\n    PETSC_WF_GP3 = 10\n    PETSC_WF_GT0 = 11\n    PETSC_WF_GT1 = 12\n    PETSC_WF_GT2 = 13\n    PETSC_WF_GT3 = 14\n    PETSC_WF_BDF0 = 15\n    PETSC_WF_BDF1 = 16\n    PETSC_WF_BDG0 = 17\n    PETSC_WF_BDG1 = 18\n    PETSC_WF_BDG2 = 19\n    PETSC_WF_BDG3 = 20\n    PETSC_WF_BDGP0 = 21\n    PETSC_WF_BDGP1 = 22\n    PETSC_WF_BDGP2 = 23\n    PETSC_WF_BDGP3 = 24\n    PETSC_WF_R = 25\n    PETSC_WF_CEED = 26\n    PETSC_NUM_WF = 27\nend \n\n@enum DMSwarmType begin\n    DMSWARM_BASIC = 0\n    DMSWARM_PIC = 1\nend \n\n@enum DMSwarmMigrateType begin\n    DMSWARM_MIGRATE_BASIC = 0\n    DMSWARM_MIGRATE_DMCELLNSCATTER = 1\n    DMSWARM_MIGRATE_DMCELLEXACT = 2\n    DMSWARM_MIGRATE_USER = 3\nend \n\n@enum DMSwarmCollectType begin\n    DMSWARM_COLLECT_BASIC = 0\n    DMSWARM_COLLECT_DMDABOUNDINGBOX = 1\n    DMSWARM_COLLECT_GENERAL = 2\n    DMSWARM_COLLECT_USER = 3\nend \n\n@enum DMSwarmRemapType begin\n    DMSWARM_REMAP_NONE = 0\n    DMSWARM_REMAP_PFAK = 1\n    DMSWARM_REMAP_COLELLA = 2\nend \n\n@enum DMSwarmPICLayoutType begin\n    DMSWARMPIC_LAYOUT_REGULAR = 0\n    DMSWARMPIC_LAYOUT_GAUSS = 1\n    DMSWARMPIC_LAYOUT_SUBDIVISION = 2\nend \n\n@enum DMStagStencilLocation begin\n    DMSTAG_NULL_LOCATION = 0\n    DMSTAG_BACK_DOWN_LEFT = 1\n    DMSTAG_BACK_DOWN = 2\n    DMSTAG_BACK_DOWN_RIGHT = 3\n    DMSTAG_BACK_LEFT = 4\n    DMSTAG_BACK = 5\n    DMSTAG_BACK_RIGHT = 6\n    DMSTAG_BACK_UP_LEFT = 7\n    DMSTAG_BACK_UP = 8\n    DMSTAG_BACK_UP_RIGHT = 9\n    DMSTAG_DOWN_LEFT = 10\n    DMSTAG_DOWN = 11\n    DMSTAG_DOWN_RIGHT = 12\n    DMSTAG_LEFT = 13\n    DMSTAG_ELEMENT = 14\n    DMSTAG_RIGHT = 15\n    DMSTAG_UP_LEFT = 16\n    DMSTAG_UP = 17\n    DMSTAG_UP_RIGHT = 18\n    DMSTAG_FRONT_DOWN_LEFT = 19\n    DMSTAG_FRONT_DOWN = 20\n    DMSTAG_FRONT_DOWN_RIGHT = 21\n    DMSTAG_FRONT_LEFT = 22\n    DMSTAG_FRONT = 23\n    DMSTAG_FRONT_RIGHT = 24\n    DMSTAG_FRONT_UP_LEFT = 25\n    DMSTAG_FRONT_UP = 26\n    DMSTAG_FRONT_UP_RIGHT = 27\nend \n\n@enum DMStagStencilType begin\n    DMSTAG_STENCIL_NONE = 0\n    DMSTAG_STENCIL_STAR = 1\n    DMSTAG_STENCIL_BOX = 2\nend \n\n@enum MatFactorType begin\n    MAT_FACTOR_NONE = 0\n    MAT_FACTOR_LU = 1\n    MAT_FACTOR_CHOLESKY = 2\n    MAT_FACTOR_ILU = 3\n    MAT_FACTOR_ICC = 4\n    MAT_FACTOR_ILUDT = 5\n    MAT_FACTOR_QR = 6\n    MAT_FACTOR_NUM_TYPES = 7\nend \n\n@enum MatProductType begin\n    MATPRODUCT_UNSPECIFIED = 0\n    MATPRODUCT_AB = 1\n    MATPRODUCT_AtB = 2\n    MATPRODUCT_ABt = 3\n    MATPRODUCT_PtAP = 4\n    MATPRODUCT_RARt = 5\n    MATPRODUCT_ABC = 6\nend \n\n@enum MatReuse begin\n    MAT_INITIAL_MATRIX = 0\n    MAT_REUSE_MATRIX = 1\n    MAT_IGNORE_MATRIX = 2\n    MAT_INPLACE_MATRIX = 3\nend \n\n@enum MatCreateSubMatrixOption begin\n    MAT_DO_NOT_GET_VALUES = 0\n    MAT_GET_VALUES = 1\nend \n\n@enum MatStructure begin\n    DIFFERENT_NONZERO_PATTERN = 0\n    SUBSET_NONZERO_PATTERN = 1\n    SAME_NONZERO_PATTERN = 2\n    UNKNOWN_NONZERO_PATTERN = 3\nend \n\n@enum MatCompositeMergeType begin\n    MAT_COMPOSITE_MERGE_RIGHT = 0\n    MAT_COMPOSITE_MERGE_LEFT = 1\nend \n\n@enum MatCompositeType begin\n    MAT_COMPOSITE_ADDITIVE = 0\n    MAT_COMPOSITE_MULTIPLICATIVE = 1\nend \n\n@enum MatAssemblyType begin\n    MAT_FLUSH_ASSEMBLY = 1\n    MAT_FINAL_ASSEMBLY = 0\nend \n\n@enum MatOption begin\n    MAT_OPTION_MIN = -3\n    MAT_UNUSED_NONZERO_LOCATION_ERR = -2\n    MAT_ROW_ORIENTED = -1\n    MAT_SYMMETRIC = 1\n    MAT_STRUCTURALLY_SYMMETRIC = 2\n    MAT_FORCE_DIAGONAL_ENTRIES = 3\n    MAT_IGNORE_OFF_PROC_ENTRIES = 4\n    MAT_USE_HASH_TABLE = 5\n    MAT_KEEP_NONZERO_PATTERN = 6\n    MAT_IGNORE_ZERO_ENTRIES = 7\n    MAT_USE_INODES = 8\n    MAT_HERMITIAN = 9\n    MAT_SYMMETRY_ETERNAL = 10\n    MAT_NEW_NONZERO_LOCATION_ERR = 11\n    MAT_IGNORE_LOWER_TRIANGULAR = 12\n    MAT_ERROR_LOWER_TRIANGULAR = 13\n    MAT_GETROW_UPPERTRIANGULAR = 14\n    MAT_SPD = 15\n    MAT_NO_OFF_PROC_ZERO_ROWS = 16\n    MAT_NO_OFF_PROC_ENTRIES = 17\n    MAT_NEW_NONZERO_LOCATIONS = 18\n    MAT_NEW_NONZERO_ALLOCATION_ERR = 19\n    MAT_SUBSET_OFF_PROC_ENTRIES = 20\n    MAT_SUBMAT_SINGLEIS = 21\n    MAT_STRUCTURE_ONLY = 22\n    MAT_SORTED_FULL = 23\n    MAT_FORM_EXPLICIT_TRANSPOSE = 24\n    MAT_STRUCTURAL_SYMMETRY_ETERNAL = 25\n    MAT_SPD_ETERNAL = 26\n    MAT_OPTION_MAX = 27\nend \n\n@enum MatDuplicateOption begin\n    MAT_DO_NOT_COPY_VALUES = 0\n    MAT_COPY_VALUES = 1\n    MAT_SHARE_NONZERO_PATTERN = 2\nend \n\n@enum MatInfoType begin\n    MAT_LOCAL = 1\n    MAT_GLOBAL_MAX = 2\n    MAT_GLOBAL_SUM = 3\nend \n\n@enum MatFactorShiftType begin\n    MAT_SHIFT_NONE = 0\n    MAT_SHIFT_NONZERO = 1\n    MAT_SHIFT_POSITIVE_DEFINITE = 2\n    MAT_SHIFT_INBLOCKS = 3\nend \n\n@enum MatFactorError begin\n    MAT_FACTOR_NOERROR = 0\n    MAT_FACTOR_STRUCT_ZEROPIVOT = 1\n    MAT_FACTOR_NUMERIC_ZEROPIVOT = 2\n    MAT_FACTOR_OUTMEMORY = 3\n    MAT_FACTOR_OTHER = 4\nend \n\n@enum MatFactorSchurStatus begin\n    MAT_FACTOR_SCHUR_UNFACTORED = 0\n    MAT_FACTOR_SCHUR_FACTORED = 1\n    MAT_FACTOR_SCHUR_INVERTED = 2\nend \n\n@enum MatSORType begin\n    SOR_FORWARD_SWEEP = 1\n    SOR_BACKWARD_SWEEP = 2\n    SOR_SYMMETRIC_SWEEP = 3\n    SOR_LOCAL_FORWARD_SWEEP = 4\n    SOR_LOCAL_BACKWARD_SWEEP = 8\n    SOR_LOCAL_SYMMETRIC_SWEEP = 12\n    SOR_ZERO_INITIAL_GUESS = 16\n    SOR_EISENSTAT = 32\n    SOR_APPLY_UPPER = 64\n    SOR_APPLY_LOWER = 128\nend \n\n@enum MatColoringWeightType begin\n    MAT_COLORING_WEIGHT_RANDOM = 0\n    MAT_COLORING_WEIGHT_LEXICAL = 1\n    MAT_COLORING_WEIGHT_LF = 2\n    MAT_COLORING_WEIGHT_SL = 3\nend \n\n@enum MPChacoGlobalType begin\n    MP_CHACO_MULTILEVEL = 1\n    MP_CHACO_SPECTRAL = 2\n    MP_CHACO_LINEAR = 4\n    MP_CHACO_RANDOM = 5\n    MP_CHACO_SCATTERED = 6\nend \n\n@enum MPChacoLocalType begin\n    MP_CHACO_KERNIGHAN = 1\n    MP_CHACO_NONE = 2\nend \n\n@enum MPChacoEigenType begin\n    MP_CHACO_LANCZOS = 0\n    MP_CHACO_RQI = 1\nend \n\n@enum MPPTScotchStrategyType begin\n    MP_PTSCOTCH_DEFAULT = 0\n    MP_PTSCOTCH_QUALITY = 1\n    MP_PTSCOTCH_SPEED = 2\n    MP_PTSCOTCH_BALANCE = 3\n    MP_PTSCOTCH_SAFETY = 4\n    MP_PTSCOTCH_SCALABILITY = 5\nend \n\n@enum MatOperation begin\n    MATOP_SET_VALUES = 0\n    MATOP_GET_ROW = 1\n    MATOP_RESTORE_ROW = 2\n    MATOP_MULT = 3\n    MATOP_MULT_ADD = 4\n    MATOP_MULT_TRANSPOSE = 5\n    MATOP_MULT_TRANSPOSE_ADD = 6\n    MATOP_SOLVE = 7\n    MATOP_SOLVE_ADD = 8\n    MATOP_SOLVE_TRANSPOSE = 9\n    MATOP_SOLVE_TRANSPOSE_ADD = 10\n    MATOP_LUFACTOR = 11\n    MATOP_CHOLESKYFACTOR = 12\n    MATOP_SOR = 13\n    MATOP_TRANSPOSE = 14\n    MATOP_GETINFO = 15\n    MATOP_EQUAL = 16\n    MATOP_GET_DIAGONAL = 17\n    MATOP_DIAGONAL_SCALE = 18\n    MATOP_NORM = 19\n    MATOP_ASSEMBLY_BEGIN = 20\n    MATOP_ASSEMBLY_END = 21\n    MATOP_SET_OPTION = 22\n    MATOP_ZERO_ENTRIES = 23\n    MATOP_ZERO_ROWS = 24\n    MATOP_LUFACTOR_SYMBOLIC = 25\n    MATOP_LUFACTOR_NUMERIC = 26\n    MATOP_CHOLESKY_FACTOR_SYMBOLIC = 27\n    MATOP_CHOLESKY_FACTOR_NUMERIC = 28\n    MATOP_SETUP = 29\n    MATOP_ILUFACTOR_SYMBOLIC = 30\n    MATOP_ICCFACTOR_SYMBOLIC = 31\n    MATOP_GET_DIAGONAL_BLOCK = 32\n    MATOP_SET_INF = 33\n    MATOP_DUPLICATE = 34\n    MATOP_FORWARD_SOLVE = 35\n    MATOP_BACKWARD_SOLVE = 36\n    MATOP_ILUFACTOR = 37\n    MATOP_ICCFACTOR = 38\n    MATOP_AXPY = 39\n    MATOP_CREATE_SUBMATRICES = 40\n    MATOP_INCREASE_OVERLAP = 41\n    MATOP_GET_VALUES = 42\n    MATOP_COPY = 43\n    MATOP_GET_ROW_MAX = 44\n    MATOP_SCALE = 45\n    MATOP_SHIFT = 46\n    MATOP_DIAGONAL_SET = 47\n    MATOP_ZERO_ROWS_COLUMNS = 48\n    MATOP_SET_RANDOM = 49\n    MATOP_GET_ROW_IJ = 50\n    MATOP_RESTORE_ROW_IJ = 51\n    MATOP_GET_COLUMN_IJ = 52\n    MATOP_RESTORE_COLUMN_IJ = 53\n    MATOP_FDCOLORING_CREATE = 54\n    MATOP_COLORING_PATCH = 55\n    MATOP_SET_UNFACTORED = 56\n    MATOP_PERMUTE = 57\n    MATOP_SET_VALUES_BLOCKED = 58\n    MATOP_CREATE_SUBMATRIX = 59\n    MATOP_DESTROY = 60\n    MATOP_VIEW = 61\n    MATOP_CONVERT_FROM = 62\n    MATOP_MATMAT_MULT_SYMBOLIC = 63\n    MATOP_MATMAT_MULT_NUMERIC = 64\n    MATOP_SET_LOCAL_TO_GLOBAL_MAP = 65\n    MATOP_SET_VALUES_LOCAL = 66\n    MATOP_ZERO_ROWS_LOCAL = 67\n    MATOP_GET_ROW_MAX_ABS = 68\n    MATOP_GET_ROW_MIN_ABS = 69\n    MATOP_CONVERT = 70\n    MATOP_HAS_OPERATION = 71\n    MATOP_FD_COLORING_APPLY = 72\n    MATOP_SET_FROM_OPTIONS = 73\n    MATOP_FIND_ZERO_DIAGONALS = 74\n    MATOP_MULT_MULTIPLE = 75\n    MATOP_SOLVE_MULTIPLE = 76\n    MATOP_GET_INERTIA = 77\n    MATOP_LOAD = 78\n    MATOP_IS_SYMMETRIC = 79\n    MATOP_IS_HERMITIAN = 80\n    MATOP_IS_STRUCTURALLY_SYMMETRIC = 81\n    MATOP_SET_VALUES_BLOCKEDLOCAL = 82\n    MATOP_CREATE_VECS = 83\n    MATOP_MAT_MULT_SYMBOLIC = 84\n    MATOP_MAT_MULT_NUMERIC = 85\n    MATOP_PTAP_NUMERIC = 86\n    MATOP_MAT_TRANSPOSE_MULT_SYMBO = 87\n    MATOP_MAT_TRANSPOSE_MULT_NUMER = 88\n    MATOP_BIND_TO_CPU = 89\n    MATOP_PRODUCTSETFROMOPTIONS = 90\n    MATOP_PRODUCTSYMBOLIC = 91\n    MATOP_PRODUCTNUMERIC = 92\n    MATOP_CONJUGATE = 93\n    MATOP_VIEW_NATIVE = 94\n    MATOP_SET_VALUES_ROW = 95\n    MATOP_REAL_PART = 96\n    MATOP_IMAGINARY_PART = 97\n    MATOP_GET_ROW_UPPER_TRIANGULAR = 98\n    MATOP_RESTORE_ROW_UPPER_TRIANG = 99\n    MATOP_MAT_SOLVE = 100\n    MATOP_MAT_SOLVE_TRANSPOSE = 101\n    MATOP_GET_ROW_MIN = 102\n    MATOP_GET_COLUMN_VECTOR = 103\n    MATOP_MISSING_DIAGONAL = 104\n    MATOP_GET_SEQ_NONZERO_STRUCTUR = 105\n    MATOP_CREATE = 106\n    MATOP_GET_GHOSTS = 107\n    MATOP_GET_LOCAL_SUB_MATRIX = 108\n    MATOP_RESTORE_LOCALSUB_MATRIX = 109\n    MATOP_MULT_DIAGONAL_BLOCK = 110\n    MATOP_HERMITIAN_TRANSPOSE = 111\n    MATOP_MULT_HERMITIAN_TRANSPOSE = 112\n    MATOP_MULT_HERMITIAN_TRANS_ADD = 113\n    MATOP_GET_MULTI_PROC_BLOCK = 114\n    MATOP_FIND_NONZERO_ROWS = 115\n    MATOP_GET_COLUMN_NORMS = 116\n    MATOP_INVERT_BLOCK_DIAGONAL = 117\n    MATOP_INVERT_VBLOCK_DIAGONAL = 118\n    MATOP_CREATE_SUB_MATRICES_MPI = 119\n    MATOP_SET_VALUES_BATCH = 120\n    MATOP_TRANSPOSE_MAT_MULT_SYMBO = 121\n    MATOP_TRANSPOSE_MAT_MULT_NUMER = 122\n    MATOP_TRANSPOSE_COLORING_CREAT = 123\n    MATOP_TRANS_COLORING_APPLY_SPT = 124\n    MATOP_TRANS_COLORING_APPLY_DEN = 125\n    MATOP_RART_NUMERIC = 126\n    MATOP_SET_BLOCK_SIZES = 127\n    MATOP_RESIDUAL = 128\n    MATOP_FDCOLORING_SETUP = 129\n    MATOP_FIND_OFFBLOCK_ENTRIES = 130\n    MATOP_MPICONCATENATESEQ = 131\n    MATOP_DESTROYSUBMATRICES = 132\n    MATOP_MAT_TRANSPOSE_SOLVE = 133\n    MATOP_GET_VALUES_LOCAL = 134\n    MATOP_CREATE_GRAPH = 135\n    MATOP_TRANSPOSE_SYMBOLIC = 136\n    MATOP_ELIMINATE_ZEROS = 137\n    MATOP_GET_ROW_SUM_ABS = 138\n    MATOP_GET_FACTOR = 139\n    MATOP_GET_BLOCK_DIAGONAL = 140\n    MATOP_GET_VBLOCK_DIAGONAL = 141\n    MATOP_COPY_HASH_TO_XAIJ = 142\n    MATOP_GET_CURRENT_MEM_TYPE = 143\n    MATOP_ZERO_ROWS_COLUMNS_LOCAL = 144\nend \n\n@enum MatHtoolCompressorType begin\n    MAT_HTOOL_COMPRESSOR_SYMPARTIAL_ACA = 0\n    MAT_HTOOL_COMPRESSOR_FULL_ACA = 1\n    MAT_HTOOL_COMPRESSOR_SVD = 2\nend \n\n@enum MatHtoolClusteringType begin\n    MAT_HTOOL_CLUSTERING_PCA_REGULAR = 0\n    MAT_HTOOL_CLUSTERING_PCA_GEOMETRIC = 1\n    MAT_HTOOL_CLUSTERING_BOUNDING_BOX_1_REGULAR = 2\n    MAT_HTOOL_CLUSTERING_BOUNDING_BOX_1_GEOMETRIC = 3\nend \n\n@enum MatSTRUMPACKReordering begin\n    MAT_STRUMPACK_NATURAL = 0\n    MAT_STRUMPACK_METIS = 1\n    MAT_STRUMPACK_PARMETIS = 2\n    MAT_STRUMPACK_SCOTCH = 3\n    MAT_STRUMPACK_PTSCOTCH = 4\n    MAT_STRUMPACK_RCM = 5\n    MAT_STRUMPACK_GEOMETRIC = 6\n    MAT_STRUMPACK_AMD = 7\n    MAT_STRUMPACK_MMD = 8\n    MAT_STRUMPACK_AND = 9\n    MAT_STRUMPACK_MLF = 10\n    MAT_STRUMPACK_SPECTRAL = 11\nend \n\n@enum MatSTRUMPACKCompressionType begin\n    MAT_STRUMPACK_COMPRESSION_TYPE_NONE = 0\n    MAT_STRUMPACK_COMPRESSION_TYPE_HSS = 1\n    MAT_STRUMPACK_COMPRESSION_TYPE_BLR = 2\n    MAT_STRUMPACK_COMPRESSION_TYPE_HODLR = 3\n    MAT_STRUMPACK_COMPRESSION_TYPE_BLR_HODLR = 4\n    MAT_STRUMPACK_COMPRESSION_TYPE_ZFP_BLR_HODLR = 5\n    MAT_STRUMPACK_COMPRESSION_TYPE_LOSSLESS = 6\n    MAT_STRUMPACK_COMPRESSION_TYPE_LOSSY = 7\nend \n\n@enum MatCUSPARSEStorageFormat begin\n    MAT_CUSPARSE_CSR = 0\n    MAT_CUSPARSE_ELL = 1\n    MAT_CUSPARSE_HYB = 2\nend \n\n@enum MatCUSPARSEFormatOperation begin\n    MAT_CUSPARSE_MULT_DIAG = 0\n    MAT_CUSPARSE_MULT_OFFDIAG = 1\n    MAT_CUSPARSE_MULT = 2\n    MAT_CUSPARSE_ALL = 3\nend \n\n@enum MatHIPSPARSEStorageFormat begin\n    MAT_HIPSPARSE_CSR = 0\n    MAT_HIPSPARSE_ELL = 1\n    MAT_HIPSPARSE_HYB = 2\nend \n\n@enum MatHIPSPARSEFormatOperation begin\n    MAT_HIPSPARSE_MULT_DIAG = 0\n    MAT_HIPSPARSE_MULT_OFFDIAG = 1\n    MAT_HIPSPARSE_MULT = 2\n    MAT_HIPSPARSE_ALL = 3\nend \n\n@enum SNESNewtonTRFallbackType begin\n    SNES_TR_FALLBACK_NEWTON = 0\n    SNES_TR_FALLBACK_CAUCHY = 1\n    SNES_TR_FALLBACK_DOGLEG = 2\nend \n\n@enum SNESNewtonTRQNType begin\n    SNES_TR_QN_NONE = 0\n    SNES_TR_QN_SAME = 1\n    SNES_TR_QN_DIFFERENT = 2\nend \n\n@enum SNESConvergedReason begin\n    SNES_CONVERGED_FNORM_ABS = 2\n    SNES_CONVERGED_FNORM_RELATIVE = 3\n    SNES_CONVERGED_SNORM_RELATIVE = 4\n    SNES_CONVERGED_ITS = 5\n    SNES_BREAKOUT_INNER_ITER = 6\n    SNES_CONVERGED_USER = 7\n    SNES_DIVERGED_FUNCTION_DOMAIN = -1\n    SNES_DIVERGED_FUNCTION_COUNT = -2\n    SNES_DIVERGED_LINEAR_SOLVE = -3\n    SNES_DIVERGED_FNORM_NAN = -4\n    SNES_DIVERGED_MAX_IT = -5\n    SNES_DIVERGED_LINE_SEARCH = -6\n    SNES_DIVERGED_INNER = -7\n    SNES_DIVERGED_LOCAL_MIN = -8\n    SNES_DIVERGED_DTOL = -9\n    SNES_DIVERGED_JACOBIAN_DOMAIN = -10\n    SNES_DIVERGED_TR_DELTA = -11\nend \n\n@enum SNESNormSchedule begin\n    SNES_NORM_DEFAULT = -1\n    SNES_NORM_NONE = 0\n    SNES_NORM_ALWAYS = 1\n    SNES_NORM_INITIAL_ONLY = 2\n    SNES_NORM_FINAL_ONLY = 3\n    SNES_NORM_INITIAL_FINAL_ONLY = 4\nend \n\n@enum SNESFunctionType begin\n    SNES_FUNCTION_DEFAULT = -1\n    SNES_FUNCTION_UNPRECONDITIONED = 0\n    SNES_FUNCTION_PRECONDITIONED = 1\nend \n\n@enum SNESLineSearchReason begin\n    SNES_LINESEARCH_SUCCEEDED = 0\n    SNES_LINESEARCH_FAILED_NANORINF = 1\n    SNES_LINESEARCH_FAILED_DOMAIN = 2\n    SNES_LINESEARCH_FAILED_REDUCT = 3\n    SNES_LINESEARCH_FAILED_USER = 4\n    SNES_LINESEARCH_FAILED_FUNCTION = 5\nend \n\n@enum SNESNGMRESRestartType begin\n    SNES_NGMRES_RESTART_NONE = 0\n    SNES_NGMRES_RESTART_PERIODIC = 1\n    SNES_NGMRES_RESTART_DIFFERENCE = 2\nend \n\n@enum SNESNGMRESSelectType begin\n    SNES_NGMRES_SELECT_NONE = 0\n    SNES_NGMRES_SELECT_DIFFERENCE = 1\n    SNES_NGMRES_SELECT_LINESEARCH = 2\nend \n\n@enum SNESNCGType begin\n    SNES_NCG_FR = 0\n    SNES_NCG_PRP = 1\n    SNES_NCG_HS = 2\n    SNES_NCG_DY = 3\n    SNES_NCG_CD = 4\nend \n\n@enum SNESQNScaleType begin\n    SNES_QN_SCALE_DEFAULT = 0\n    SNES_QN_SCALE_NONE = 1\n    SNES_QN_SCALE_SCALAR = 2\n    SNES_QN_SCALE_DIAGONAL = 3\n    SNES_QN_SCALE_JACOBIAN = 4\nend \n\n@enum SNESQNRestartType begin\n    SNES_QN_RESTART_DEFAULT = 0\n    SNES_QN_RESTART_NONE = 1\n    SNES_QN_RESTART_POWELL = 2\n    SNES_QN_RESTART_PERIODIC = 3\nend \n\n@enum SNESQNType begin\n    SNES_QN_LBFGS = 0\n    SNES_QN_BROYDEN = 1\n    SNES_QN_BADBROYDEN = 2\nend \n\n@enum SNESCompositeType begin\n    SNES_COMPOSITE_ADDITIVE = 0\n    SNES_COMPOSITE_MULTIPLICATIVE = 1\n    SNES_COMPOSITE_ADDITIVEOPTIMAL = 2\nend \n\n@enum SNESFASType begin\n    SNES_FAS_MULTIPLICATIVE = 0\n    SNES_FAS_ADDITIVE = 1\n    SNES_FAS_FULL = 2\n    SNES_FAS_KASKADE = 3\nend \n\n@enum SNESNewtonALCorrectionType begin\n    SNES_NEWTONAL_CORRECTION_EXACT = 0\n    SNES_NEWTONAL_CORRECTION_NORMAL = 1\nend \n\n@enum LandauDeviceType begin\n    LANDAU_KOKKOS = 0\n    LANDAU_CPU = 1\nend \n\n@enum LandauOMPTimers begin\n    LANDAU_EX2_TSSOLVE = 0\n    LANDAU_MATRIX_TOTAL = 1\n    LANDAU_OPERATOR = 2\n    LANDAU_JACOBIAN_COUNT = 3\n    LANDAU_JACOBIAN = 4\n    LANDAU_MASS = 5\n    LANDAU_F_DF = 6\n    LANDAU_KERNEL = 7\n    KSP_FACTOR = 8\n    KSP_SOLVE = 9\n    LANDAU_NUM_TIMERS = 10\nend \n\n@enum PetscErrorType begin\n    PETSC_ERROR_INITIAL = 0\n    PETSC_ERROR_REPEAT = 1\n    PETSC_ERROR_IN_CXX = 2\nend \n\n@enum PetscFPTrap begin\n    PETSC_FP_TRAP_OFF = 0\n    PETSC_FP_TRAP_INDIV = 1\n    PETSC_FP_TRAP_FLTOPERR = 2\n    PETSC_FP_TRAP_FLTOVF = 4\n    PETSC_FP_TRAP_FLTUND = 8\n    PETSC_FP_TRAP_FLTDIV = 16\n    PETSC_FP_TRAP_FLTINEX = 32\n    PETSC_FP_TRAP_ON = 63\nend \n\n@enum DMCopyLabelsMode begin\n    DM_COPY_LABELS_REPLACE = 0\n    DM_COPY_LABELS_KEEP = 1\n    DM_COPY_LABELS_FAIL = 2\nend \n\n@enum KSPChebyshevKind begin\n    KSP_CHEBYSHEV_FIRST = 0\n    KSP_CHEBYSHEV_FOURTH = 1\n    KSP_CHEBYSHEV_OPT_FOURTH = 2\nend \n\n@enum KSPFCDTruncationType begin\n    KSP_FCD_TRUNC_TYPE_STANDARD = 0\n    KSP_FCD_TRUNC_TYPE_NOTAY = 1\nend \n\n@enum KSPHPDDMType begin\n    KSP_HPDDM_TYPE_GMRES = 0\n    KSP_HPDDM_TYPE_BGMRES = 1\n    KSP_HPDDM_TYPE_CG = 2\n    KSP_HPDDM_TYPE_BCG = 3\n    KSP_HPDDM_TYPE_GCRODR = 4\n    KSP_HPDDM_TYPE_BGCRODR = 5\n    KSP_HPDDM_TYPE_BFBCG = 6\n    KSP_HPDDM_TYPE_PREONLY = 7\nend \n\n@enum KSPHPDDMPrecision begin\n    KSP_HPDDM_PRECISION_HALF = 0\n    KSP_HPDDM_PRECISION_SINGLE = 1\n    KSP_HPDDM_PRECISION_DOUBLE = 2\n    KSP_HPDDM_PRECISION_QUADRUPLE = 3\nend \n\n@enum KSPGMRESCGSRefinementType begin\n    KSP_GMRES_CGS_REFINE_NEVER = 0\n    KSP_GMRES_CGS_REFINE_IFNEEDED = 1\n    KSP_GMRES_CGS_REFINE_ALWAYS = 2\nend \n\n@enum KSPNormType begin\n    KSP_NORM_DEFAULT = -1\n    KSP_NORM_NONE = 0\n    KSP_NORM_PRECONDITIONED = 1\n    KSP_NORM_UNPRECONDITIONED = 2\n    KSP_NORM_NATURAL = 3\nend \n\n@enum KSPCGType begin\n    KSP_CG_SYMMETRIC = 0\n    KSP_CG_HERMITIAN = 1\nend \n\n@enum MatSchurComplementAinvType begin\n    MAT_SCHUR_COMPLEMENT_AINV_DIAG = 0\n    MAT_SCHUR_COMPLEMENT_AINV_LUMP = 1\n    MAT_SCHUR_COMPLEMENT_AINV_BLOCK_DIAG = 2\n    MAT_SCHUR_COMPLEMENT_AINV_FULL = 3\nend \n\n@enum MatLMVMMultAlgorithm begin\n    MAT_LMVM_MULT_RECURSIVE = 0\n    MAT_LMVM_MULT_DENSE = 1\n    MAT_LMVM_MULT_COMPACT_DENSE = 2\nend \n\n@enum MatLMVMSymBroydenScaleType begin\n    MAT_LMVM_SYMBROYDEN_SCALE_NONE = 0\n    MAT_LMVM_SYMBROYDEN_SCALE_SCALAR = 1\n    MAT_LMVM_SYMBROYDEN_SCALE_DIAGONAL = 2\n    MAT_LMVM_SYMBROYDEN_SCALE_USER = 3\n    MAT_LMVM_SYMBROYDEN_SCALE_DECIDE = 4\nend \n\n@enum MatLMVMDenseType begin\n    MAT_LMVM_DENSE_REORDER = 0\n    MAT_LMVM_DENSE_INPLACE = 1\nend \n\n@enum ISInfo begin\n    IS_INFO_MIN = -1\n    IS_SORTED = 0\n    IS_UNIQUE = 1\n    IS_PERMUTATION = 2\n    IS_INTERVAL = 3\n    IS_IDENTITY = 4\n    IS_INFO_MAX = 5\nend \n\n@enum ISInfoType begin\n    IS_LOCAL = 0\n    IS_GLOBAL = 1\nend \n\n@enum ISGlobalToLocalMappingMode begin\n    IS_GTOLM_MASK = 0\n    IS_GTOLM_DROP = 1\nend \n\n@enum ISColoringType begin\n    IS_COLORING_GLOBAL = 0\n    IS_COLORING_LOCAL = 1\nend \n\n@enum DMPlexInterpolatedFlag begin\n    DMPLEX_INTERPOLATED_INVALID = -1\n    DMPLEX_INTERPOLATED_NONE = 0\n    DMPLEX_INTERPOLATED_PARTIAL = 1\n    DMPLEX_INTERPOLATED_MIXED = 2\n    DMPLEX_INTERPOLATED_FULL = 3\nend \n\n@enum DMPlexTPSType begin\n    DMPLEX_TPS_SCHWARZ_P = 0\n    DMPLEX_TPS_GYROID = 1\nend \n\n@enum TSProblemType begin\n    TS_LINEAR = 0\n    TS_NONLINEAR = 1\nend \n\n@enum TSEquationType begin\n    TS_EQ_UNSPECIFIED = -1\n    TS_EQ_EXPLICIT = 0\n    TS_EQ_ODE_EXPLICIT = 1\n    TS_EQ_DAE_SEMI_EXPLICIT_INDEX1 = 100\n    TS_EQ_DAE_SEMI_EXPLICIT_INDEX2 = 200\n    TS_EQ_DAE_SEMI_EXPLICIT_INDEX3 = 300\n    TS_EQ_DAE_SEMI_EXPLICIT_INDEXHI = 500\n    TS_EQ_IMPLICIT = 1000\n    TS_EQ_ODE_IMPLICIT = 1001\n    TS_EQ_DAE_IMPLICIT_INDEX1 = 1100\n    TS_EQ_DAE_IMPLICIT_INDEX2 = 1200\n    TS_EQ_DAE_IMPLICIT_INDEX3 = 1300\n    TS_EQ_DAE_IMPLICIT_INDEXHI = 1500\nend \n\n@enum TSConvergedReason begin\n    TS_CONVERGED_ITERATING = 0\n    TS_CONVERGED_TIME = 1\n    TS_CONVERGED_ITS = 2\n    TS_CONVERGED_USER = 3\n    TS_CONVERGED_EVENT = 4\n    TS_CONVERGED_PSEUDO_FATOL = 5\n    TS_CONVERGED_PSEUDO_FRTOL = 6\n    TS_DIVERGED_NONLINEAR_SOLVE = -1\n    TS_DIVERGED_STEP_REJECTED = -2\n    TSFORWARD_DIVERGED_LINEAR_SOLVE = -3\n    TSADJOINT_DIVERGED_LINEAR_SOLVE = -4\nend \n\n@enum TSExactFinalTimeOption begin\n    TS_EXACTFINALTIME_UNSPECIFIED = 0\n    TS_EXACTFINALTIME_STEPOVER = 1\n    TS_EXACTFINALTIME_INTERPOLATE = 2\n    TS_EXACTFINALTIME_MATCHSTEP = 3\nend \n\n@enum TSTrajectoryMemoryType begin\n    TJ_REVOLVE = 0\n    TJ_CAMS = 1\n    TJ_PETSC = 2\nend \n\n@enum TSDGType begin\n    TS_DG_GONZALEZ = 0\n    TS_DG_AVERAGE = 1\n    TS_DG_NONE = 2\nend \n\n@enum TSSundialsLmmType begin\n    SUNDIALS_ADAMS = 1\n    SUNDIALS_BDF = 2\nend \n\n@enum TSSundialsGramSchmidtType begin\n    SUNDIALS_MODIFIED_GS = 1\n    SUNDIALS_CLASSICAL_GS = 2\nend \n\n@enum PetscScalarPrecision begin\n    PETSC_SCALAR_DOUBLE = 0\n    PETSC_SCALAR_SINGLE = 1\n    PETSC_SCALAR_LONG_DOUBLE = 2\n    PETSC_SCALAR_HALF = 3\nend \n\n@enum DMBoundaryType begin\n    DM_BOUNDARY_NONE = 0\n    DM_BOUNDARY_GHOSTED = 1\n    DM_BOUNDARY_MIRROR = 2\n    DM_BOUNDARY_PERIODIC = 3\n    DM_BOUNDARY_TWIST = 4\nend \n\n@enum DMBoundaryConditionType begin\n    DM_BC_ESSENTIAL = 1\n    DM_BC_ESSENTIAL_FIELD = 5\n    DM_BC_NATURAL = 2\n    DM_BC_NATURAL_FIELD = 6\n    DM_BC_ESSENTIAL_BD_FIELD = 9\n    DM_BC_NATURAL_RIEMANN = 10\n    DM_BC_LOWER_BOUND = 4\n    DM_BC_UPPER_BOUND = 8\nend \n\n@enum DMPointLocationType begin\n    DM_POINTLOCATION_NONE = 0\n    DM_POINTLOCATION_NEAREST = 1\n    DM_POINTLOCATION_REMOVE = 2\nend \n\n@enum DMBlockingType begin\n    DM_BLOCKING_TOPOLOGICAL_POINT = 0\n    DM_BLOCKING_FIELD_NODE = 1\nend \n\n@enum DMAdaptationStrategy begin\n    DM_ADAPTATION_INITIAL = 0\n    DM_ADAPTATION_SEQUENTIAL = 1\n    DM_ADAPTATION_MULTILEVEL = 2\nend \n\n@enum DMAdaptationCriterion begin\n    DM_ADAPTATION_NONE = 0\n    DM_ADAPTATION_REFINE = 1\n    DM_ADAPTATION_LABEL = 2\n    DM_ADAPTATION_METRIC = 3\nend \n\n@enum DMAdaptFlag begin\n    DM_ADAPT_DETERMINE = PETSC_DETERMINE\n    DM_ADAPT_KEEP = 0\n    DM_ADAPT_REFINE = 1\n    DM_ADAPT_COARSEN = 2\n    DM_ADAPT_COARSEN_LAST = 3\n    DM_ADAPT_RESERVED_COUNT = 4\nend \n\n@enum DMDirection begin\n    DM_X = 0\n    DM_Y = 1\n    DM_Z = 2\nend \n\n@enum DMEnclosureType begin\n    DM_ENC_EQUALITY = 0\n    DM_ENC_SUPERMESH = 1\n    DM_ENC_SUBMESH = 2\n    DM_ENC_NONE = 3\n    DM_ENC_UNKNOWN = 4\nend \n\n@enum DMPolytopeType begin\n    DM_POLYTOPE_POINT = 0\n    DM_POLYTOPE_SEGMENT = 1\n    DM_POLYTOPE_POINT_PRISM_TENSOR = 2\n    DM_POLYTOPE_TRIANGLE = 3\n    DM_POLYTOPE_QUADRILATERAL = 4\n    DM_POLYTOPE_SEG_PRISM_TENSOR = 5\n    DM_POLYTOPE_TETRAHEDRON = 6\n    DM_POLYTOPE_HEXAHEDRON = 7\n    DM_POLYTOPE_TRI_PRISM = 8\n    DM_POLYTOPE_TRI_PRISM_TENSOR = 9\n    DM_POLYTOPE_QUAD_PRISM_TENSOR = 10\n    DM_POLYTOPE_PYRAMID = 11\n    DM_POLYTOPE_FV_GHOST = 12\n    DM_POLYTOPE_INTERIOR_GHOST = 13\n    DM_POLYTOPE_UNKNOWN = 14\n    DM_POLYTOPE_UNKNOWN_CELL = 15\n    DM_POLYTOPE_UNKNOWN_FACE = 16\n    DM_NUM_POLYTOPES = 17\nend \n\n@enum PetscUnit begin\n    PETSC_UNIT_LENGTH = 0\n    PETSC_UNIT_MASS = 1\n    PETSC_UNIT_TIME = 2\n    PETSC_UNIT_CURRENT = 3\n    PETSC_UNIT_TEMPERATURE = 4\n    PETSC_UNIT_AMOUNT = 5\n    PETSC_UNIT_LUMINOSITY = 6\n    NUM_PETSC_UNITS = 7\nend \n\n@enum DMReorderDefaultFlag begin\n    DM_REORDER_DEFAULT_NOTSET = -1\n    DM_REORDER_DEFAULT_FALSE = 0\n    DM_REORDER_DEFAULT_TRUE = 1\nend \n\n@enum PetscOffloadMask begin\n    PETSC_OFFLOAD_UNALLOCATED = 0\n    PETSC_OFFLOAD_CPU = 1\n    PETSC_OFFLOAD_GPU = 2\n    PETSC_OFFLOAD_BOTH = 3\nend \n\n@enum PetscDeviceInitType begin\n    PETSC_DEVICE_INIT_NONE = 0\n    PETSC_DEVICE_INIT_LAZY = 1\n    PETSC_DEVICE_INIT_EAGER = 2\nend \n\n@enum PetscDeviceType begin\n    PETSC_DEVICE_HOST = 0\n    PETSC_DEVICE_CUDA = 1\n    PETSC_DEVICE_HIP = 2\n    PETSC_DEVICE_SYCL = 3\n    PETSC_DEVICE_MAX = 4\nend \n\n@enum PetscDeviceAttribute begin\n    PETSC_DEVICE_ATTR_SIZE_T_SHARED_MEM_PER_BLOCK = 0\n    PETSC_DEVICE_ATTR_MAX = 1\nend \n\n@enum PetscStreamType begin\n    PETSC_STREAM_DEFAULT = 0\n    PETSC_STREAM_NONBLOCKING = 1\n    PETSC_STREAM_DEFAULT_WITH_BARRIER = 2\n    PETSC_STREAM_NONBLOCKING_WITH_BARRIER = 3\n    PETSC_STREAM_MAX = 4\nend \n\n@enum PetscDeviceContextJoinMode begin\n    PETSC_DEVICE_CONTEXT_JOIN_DESTROY = 0\n    PETSC_DEVICE_CONTEXT_JOIN_SYNC = 1\n    PETSC_DEVICE_CONTEXT_JOIN_NO_SYNC = 2\nend \n\n@enum PetscDeviceCopyMode begin\n    PETSC_DEVICE_COPY_HTOH = 0\n    PETSC_DEVICE_COPY_DTOH = 1\n    PETSC_DEVICE_COPY_HTOD = 2\n    PETSC_DEVICE_COPY_DTOD = 3\n    PETSC_DEVICE_COPY_AUTO = 4\nend \n\n@enum PetscMemoryAccessMode begin\n    PETSC_MEMORY_ACCESS_READ = 1\n    PETSC_MEMORY_ACCESS_WRITE = 2\n    PETSC_MEMORY_ACCESS_READ_WRITE = 3 \nend \n\n@enum MoabReadMode begin\n    READ_PART = 0\n    READ_DELETE = 1\n    BCAST_DELETE = 2\nend \n\n@enum MoabWriteMode begin\n    WRITE_PART = 0\n    FORMAT = 1\nend \n\n@enum PetscPartitionerMultistageStrategy begin\n    PETSCPARTITIONER_MS_STRATEGY_NODE = 0\n    PETSCPARTITIONER_MS_STRATEGY_MSECTION = 1\nend \n\n@enum PCSide begin\n    PC_SIDE_DEFAULT = -1\n    PC_LEFT = 0\n    PC_RIGHT = 1\n    PC_SYMMETRIC = 2\nend \n\n@enum PCRichardsonConvergedReason begin\n    PCRICHARDSON_NOT_SET = 0\n    PCRICHARDSON_CONVERGED_RTOL = 2\n    PCRICHARDSON_CONVERGED_ATOL = 3\n    PCRICHARDSON_CONVERGED_ITS = 4\n    PCRICHARDSON_DIVERGED_DTOL = -4\nend \n\n@enum PCJacobiType begin\n    PC_JACOBI_DIAGONAL = 0\n    PC_JACOBI_ROWL1 = 1\n    PC_JACOBI_ROWMAX = 2\n    PC_JACOBI_ROWSUM = 3\nend \n\n@enum PCASMType begin\n    PC_ASM_BASIC = 3\n    PC_ASM_RESTRICT = 1\n    PC_ASM_INTERPOLATE = 2\n    PC_ASM_NONE = 0\nend \n\n@enum PCGASMType begin\n    PC_GASM_BASIC = 3\n    PC_GASM_RESTRICT = 1\n    PC_GASM_INTERPOLATE = 2\n    PC_GASM_NONE = 0\nend \n\n@enum PCCompositeType begin\n    PC_COMPOSITE_ADDITIVE = 0\n    PC_COMPOSITE_MULTIPLICATIVE = 1\n    PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE = 2\n    PC_COMPOSITE_SPECIAL = 3\n    PC_COMPOSITE_SCHUR = 4\n    PC_COMPOSITE_GKB = 5\nend \n\n@enum PCFieldSplitSchurPreType begin\n    PC_FIELDSPLIT_SCHUR_PRE_SELF = 0\n    PC_FIELDSPLIT_SCHUR_PRE_SELFP = 1\n    PC_FIELDSPLIT_SCHUR_PRE_A11 = 2\n    PC_FIELDSPLIT_SCHUR_PRE_USER = 3\n    PC_FIELDSPLIT_SCHUR_PRE_FULL = 4\nend \n\n@enum PCFieldSplitSchurFactType begin\n    PC_FIELDSPLIT_SCHUR_FACT_DIAG = 0\n    PC_FIELDSPLIT_SCHUR_FACT_LOWER = 1\n    PC_FIELDSPLIT_SCHUR_FACT_UPPER = 2\n    PC_FIELDSPLIT_SCHUR_FACT_FULL = 3\nend \n\n@enum PCPARMSGlobalType begin\n    PC_PARMS_GLOBAL_RAS = 0\n    PC_PARMS_GLOBAL_SCHUR = 1\n    PC_PARMS_GLOBAL_BJ = 2\nend \n\n@enum PCPARMSLocalType begin\n    PC_PARMS_LOCAL_ILU0 = 0\n    PC_PARMS_LOCAL_ILUK = 1\n    PC_PARMS_LOCAL_ILUT = 2\n    PC_PARMS_LOCAL_ARMS = 3\nend \n\n@enum PCMGType begin\n    PC_MG_MULTIPLICATIVE = 0\n    PC_MG_ADDITIVE = 1\n    PC_MG_FULL = 2\n    PC_MG_KASKADE = 3\nend \n\n@enum PCMGCycleType begin\n    PC_MG_CYCLE_V = 1\n    PC_MG_CYCLE_W = 2\nend \n\n@enum PCMGGalerkinType begin\n    PC_MG_GALERKIN_BOTH = 0\n    PC_MG_GALERKIN_PMAT = 1\n    PC_MG_GALERKIN_MAT = 2\n    PC_MG_GALERKIN_NONE = 3\n    PC_MG_GALERKIN_EXTERNAL = 4\nend \n\n@enum PCExoticType begin\n    PC_EXOTIC_FACE = 0\n    PC_EXOTIC_WIREBASKET = 1\nend \n\n@enum PCBDDCInterfaceExtType begin\n    PC_BDDC_INTERFACE_EXT_DIRICHLET = 0\n    PC_BDDC_INTERFACE_EXT_LUMP = 1\nend \n\n@enum PCMGCoarseSpaceType begin\n    PCMG_ADAPT_NONE = 0\n    PCMG_ADAPT_POLYNOMIAL = 1\n    PCMG_ADAPT_HARMONIC = 2\n    PCMG_ADAPT_EIGENVECTOR = 3\n    PCMG_ADAPT_GENERALIZED_EIGENVECTOR = 4\n    PCMG_ADAPT_GDSW = 5\nend \n\n@enum PCPatchConstructType begin\n    PC_PATCH_STAR = 0\n    PC_PATCH_VANKA = 1\n    PC_PATCH_PARDECOMP = 2\n    PC_PATCH_USER = 3\n    PC_PATCH_PYTHON = 4\nend \n\n@enum PCDeflationSpaceType begin\n    PC_DEFLATION_SPACE_HAAR = 0\n    PC_DEFLATION_SPACE_DB2 = 1\n    PC_DEFLATION_SPACE_DB4 = 2\n    PC_DEFLATION_SPACE_DB8 = 3\n    PC_DEFLATION_SPACE_DB16 = 4\n    PC_DEFLATION_SPACE_BIORTH22 = 5\n    PC_DEFLATION_SPACE_MEYER = 6\n    PC_DEFLATION_SPACE_AGGREGATION = 7\n    PC_DEFLATION_SPACE_USER = 8\nend \n\n@enum PCHPDDMCoarseCorrectionType begin\n    PC_HPDDM_COARSE_CORRECTION_DEFLATED = 0\n    PC_HPDDM_COARSE_CORRECTION_ADDITIVE = 1\n    PC_HPDDM_COARSE_CORRECTION_BALANCED = 2\n    PC_HPDDM_COARSE_CORRECTION_NONE = 3\nend \n\n@enum PCHPDDMSchurPreType begin\n    PC_HPDDM_SCHUR_PRE_LEAST_SQUARES = 0\n    PC_HPDDM_SCHUR_PRE_GENEO = 1\nend \n\n@enum PCFailedReason begin\n    PC_SETUP_ERROR = -1\n    PC_NOERROR = 0\n    PC_FACTOR_STRUCT_ZEROPIVOT = 1\n    PC_FACTOR_NUMERIC_ZEROPIVOT = 2\n    PC_FACTOR_OUTMEMORY = 3\n    PC_FACTOR_OTHER = 4\n    PC_INCONSISTENT_RHS = 5\n    PC_SUBPC_ERROR = 6\nend \n\n@enum PCGAMGLayoutType begin\n    PCGAMG_LAYOUT_COMPACT = 0\n    PCGAMG_LAYOUT_SPREAD = 1\nend \n\n@enum PetscFEJacobianType begin\n    PETSCFE_JACOBIAN = 0\n    PETSCFE_JACOBIAN_PRE = 1\n    PETSCFE_JACOBIAN_DYN = 2\nend \n\n@enum PetscFEGeomMode begin\n    PETSC_FEGEOM_BASIC = 0\n    PETSC_FEGEOM_EMBEDDED = 1\n    PETSC_FEGEOM_BOUNDARY = 2\n    PETSC_FEGEOM_COHESIVE = 3\nend \n\n@enum PetscInfoCommFlag begin\n    PETSC_INFO_COMM_ALL = -1\n    PETSC_INFO_COMM_NO_SELF = 0\n    PETSC_INFO_COMM_ONLY_SELF = 1\nend \n\n@enum PetscEnum begin\n    ENUM_DUMMY = 0\nend \n\n@enum PetscBool3 begin\n    PETSC_BOOL3_FALSE = 0\n    PETSC_BOOL3_TRUE = 1\n    PETSC_BOOL3_UNKNOWN = -1 \nend \n\n@enum PetscCopyMode begin\n    PETSC_COPY_VALUES = 0\n    PETSC_OWN_POINTER = 1\n    PETSC_USE_POINTER = 2\nend \n\n@enum PetscDataType begin\n    PETSC_DATATYPE_UNKNOWN = 0\n    PETSC_DOUBLE = 1\n    PETSC_COMPLEX = 2\n    PETSC_LONG = 3\n    PETSC_SHORT = 4\n    PETSC_FLOAT = 5\n    PETSC_CHAR = 6\n    PETSC_BIT_LOGICAL = 7\n    PETSC_ENUM = 8\n    PETSC_BOOL = 9\n    PETSC___FLOAT128 = 10\n    PETSC_OBJECT = 11\n    PETSC_FUNCTION = 12\n    PETSC_STRING = 13\n    PETSC___FP16 = 14\n    PETSC_STRUCT = 15\n    PETSC_INT = 16\n    PETSC_INT64 = 17\n    PETSC_COUNT = 18\n    PETSC_INT32 = 19\nend \n\n@enum PetscFileMode begin\n    FILE_MODE_UNDEFINED = -1\n    FILE_MODE_READ = 0\n    FILE_MODE_WRITE = 1\n    FILE_MODE_APPEND = 2\n    FILE_MODE_UPDATE = 3\n    FILE_MODE_APPEND_UPDATE = 4\nend \n\n@enum PetscDLMode begin\n    PETSC_DL_DECIDE = 0\n    PETSC_DL_NOW = 1\n    PETSC_DL_LOCAL = 2\nend \n\n@enum PetscBinarySeekType begin\n    PETSC_BINARY_SEEK_SET = 0\n    PETSC_BINARY_SEEK_CUR = 1\n    PETSC_BINARY_SEEK_END = 2\nend \n\n@enum PetscBuildTwoSidedType begin\n    PETSC_BUILDTWOSIDED_NOTSET = -1\n    PETSC_BUILDTWOSIDED_ALLREDUCE = 0\n    PETSC_BUILDTWOSIDED_IBARRIER = 1\n    PETSC_BUILDTWOSIDED_REDSCATTER = 2 \nend \n\n@enum InsertMode begin\n    NOT_SET_VALUES = 0\n    INSERT_VALUES = 1\n    ADD_VALUES = 2\n    MAX_VALUES = 3\n    MIN_VALUES = 4\n    INSERT_ALL_VALUES = 5\n    ADD_ALL_VALUES = 6\n    INSERT_BC_VALUES = 7\n    ADD_BC_VALUES = 8\nend \n\n@enum PetscSubcommType begin\n    PETSC_SUBCOMM_GENERAL = 0\n    PETSC_SUBCOMM_CONTIGUOUS = 1\n    PETSC_SUBCOMM_INTERLACED = 2\nend \n\n@enum PetscGaussLobattoLegendreCreateType begin\n    PETSCGAUSSLOBATTOLEGENDRE_VIA_LINEAR_ALGEBRA = 0\n    PETSCGAUSSLOBATTOLEGENDRE_VIA_NEWTON = 1\nend \n\n@enum PetscDTNodeType begin\n    PETSCDTNODES_DEFAULT = -1\n    PETSCDTNODES_GAUSSJACOBI = 0\n    PETSCDTNODES_EQUISPACED = 1\n    PETSCDTNODES_TANHSINH = 2\nend \n\n@enum PetscDTSimplexQuadratureType begin\n    PETSCDTSIMPLEXQUAD_DEFAULT = -1\n    PETSCDTSIMPLEXQUAD_CONIC = 0\n    PETSCDTSIMPLEXQUAD_MINSYM = 1\nend \n\n@enum DTProbDensityType begin\n    DTPROB_DENSITY_CONSTANT = 0\n    DTPROB_DENSITY_GAUSSIAN = 1\n    DTPROB_DENSITY_MAXWELL_BOLTZMANN = 2\n    DTPROB_NUM_DENSITY = 3\nend \n\n@enum TaoSubsetType begin\n    TAO_SUBSET_SUBVEC = 0\n    TAO_SUBSET_MASK = 1\n    TAO_SUBSET_MATRIXFREE = 2\nend \n\n@enum TaoADMMUpdateType begin\n    TAO_ADMM_UPDATE_BASIC = 0\n    TAO_ADMM_UPDATE_ADAPTIVE = 1\n    TAO_ADMM_UPDATE_ADAPTIVE_RELAXED = 2\nend \n\n@enum TaoADMMRegularizerType begin\n    TAO_ADMM_REGULARIZER_USER = 0\n    TAO_ADMM_REGULARIZER_SOFT_THRESH = 1\nend \n\n@enum TaoALMMType begin\n    TAO_ALMM_CLASSIC = 0\n    TAO_ALMM_PHR = 1\nend \n\n@enum TaoBNCGType begin\n    TAO_BNCG_GD = 0\n    TAO_BNCG_PCGD = 1\n    TAO_BNCG_HS = 2\n    TAO_BNCG_FR = 3\n    TAO_BNCG_PRP = 4\n    TAO_BNCG_PRP_PLUS = 5\n    TAO_BNCG_DY = 6\n    TAO_BNCG_HZ = 7\n    TAO_BNCG_DK = 8\n    TAO_BNCG_KD = 9\n    TAO_BNCG_SSML_BFGS = 10\n    TAO_BNCG_SSML_DFP = 11\n    TAO_BNCG_SSML_BRDN = 12\nend \n\n@enum TaoConvergedReason begin\n    TAO_CONVERGED_GATOL = 3\n    TAO_CONVERGED_GRTOL = 4\n    TAO_CONVERGED_GTTOL = 5\n    TAO_CONVERGED_STEPTOL = 6\n    TAO_CONVERGED_MINF = 7\n    TAO_CONVERGED_USER = 8\n    TAO_DIVERGED_MAXITS = -2\n    TAO_DIVERGED_NAN = -4\n    TAO_DIVERGED_MAXFCN = -5\n    TAO_DIVERGED_LS_FAILURE = -6\n    TAO_DIVERGED_TR_REDUCTION = -7\n    TAO_DIVERGED_USER = -8\n    TAO_CONTINUE_ITERATING = 0\nend \n\n@enum TaoBRGNRegularizationType begin\n    TAOBRGN_REGULARIZATION_USER = 0\n    TAOBRGN_REGULARIZATION_L2PROX = 1\n    TAOBRGN_REGULARIZATION_L2PURE = 2\n    TAOBRGN_REGULARIZATION_L1DICT = 3\n    TAOBRGN_REGULARIZATION_LM = 4\nend \n\n@enum PetscViewerGLVisType begin\n    PETSC_VIEWER_GLVIS_DUMP = 0\n    PETSC_VIEWER_GLVIS_SOCKET = 1\nend \n\n@enum PetscViewerFormat begin\n    PETSC_VIEWER_DEFAULT = 0\n    PETSC_VIEWER_ASCII_MATLAB = 1\n    PETSC_VIEWER_ASCII_MATHEMATICA = 2\n    PETSC_VIEWER_ASCII_IMPL = 3\n    PETSC_VIEWER_ASCII_INFO = 4\n    PETSC_VIEWER_ASCII_INFO_DETAIL = 5\n    PETSC_VIEWER_ASCII_COMMON = 6\n    PETSC_VIEWER_ASCII_SYMMODU = 7\n    PETSC_VIEWER_ASCII_INDEX = 8\n    PETSC_VIEWER_ASCII_DENSE = 9\n    PETSC_VIEWER_ASCII_MATRIXMARKET = 10\n    PETSC_VIEWER_ASCII_PCICE = 11\n    PETSC_VIEWER_ASCII_PYTHON = 12\n    PETSC_VIEWER_ASCII_FACTOR_INFO = 13\n    PETSC_VIEWER_ASCII_LATEX = 14\n    PETSC_VIEWER_ASCII_XML = 15\n    PETSC_VIEWER_ASCII_FLAMEGRAPH = 16\n    PETSC_VIEWER_ASCII_GLVIS = 17\n    PETSC_VIEWER_ASCII_CSV = 18\n    PETSC_VIEWER_DRAW_BASIC = 19\n    PETSC_VIEWER_DRAW_LG = 20\n    PETSC_VIEWER_DRAW_LG_XRANGE = 21\n    PETSC_VIEWER_DRAW_CONTOUR = 22\n    PETSC_VIEWER_DRAW_PORTS = 23\n    PETSC_VIEWER_VTK_VTS = 24\n    PETSC_VIEWER_VTK_VTR = 25\n    PETSC_VIEWER_VTK_VTU = 26\n    PETSC_VIEWER_BINARY_MATLAB = 27\n    PETSC_VIEWER_NATIVE = 28\n    PETSC_VIEWER_HDF5_PETSC = 29\n    PETSC_VIEWER_HDF5_VIZ = 30\n    PETSC_VIEWER_HDF5_XDMF = 31\n    PETSC_VIEWER_HDF5_MAT = 32\n    PETSC_VIEWER_NOFORMAT = 33\n    PETSC_VIEWER_LOAD_BALANCE = 34\n    PETSC_VIEWER_FAILED = 35\n    PETSC_VIEWER_ALL = 36\nend \n\n@enum PetscViewerVTKFieldType begin\n    PETSC_VTK_INVALID = 0\n    PETSC_VTK_POINT_FIELD = 1\n    PETSC_VTK_POINT_VECTOR_FIELD = 2\n    PETSC_VTK_CELL_FIELD = 3\n    PETSC_VTK_CELL_VECTOR_FIELD = 4\nend \n\n@enum PetscSFDirection begin\n    PETSCSF_ROOT2LEAF = 0\n    PETSCSF_LEAF2ROOT = 1\nend \n\n@enum PetscSFOperation begin\n    PETSCSF_BCAST = 0\n    PETSCSF_REDUCE = 1\n    PETSCSF_FETCH = 2\nend \n\n@enum PetscSFBackend begin\n    PETSCSF_BACKEND_INVALID = 0\n    PETSCSF_BACKEND_CUDA = 1\n    PETSCSF_BACKEND_HIP = 2\n    PETSCSF_BACKEND_KOKKOS = 3\nend \n\n@enum TaoLineSearchConvergedReason begin\n    TAOLINESEARCH_FAILED_INFORNAN = -1\n    TAOLINESEARCH_FAILED_BADPARAMETER = -2\n    TAOLINESEARCH_FAILED_ASCENT = -3\n    TAOLINESEARCH_CONTINUE_ITERATING = 0\n    TAOLINESEARCH_SUCCESS = 1\n    TAOLINESEARCH_SUCCESS_USER = 2\n    TAOLINESEARCH_HALTED_OTHER = 3\n    TAOLINESEARCH_HALTED_MAXFCN = 4\n    TAOLINESEARCH_HALTED_UPPERBOUND = 5\n    TAOLINESEARCH_HALTED_LOWERBOUND = 6\n    TAOLINESEARCH_HALTED_RTOL = 7\n    TAOLINESEARCH_HALTED_USER = 8\nend \n\n@enum PetscDualSpaceReferenceCell begin\n    PETSCDUALSPACE_REFCELL_SIMPLEX = 0\n    PETSCDUALSPACE_REFCELL_TENSOR = 1\nend \n\n@enum PetscDualSpaceTransformType begin\n    IDENTITY_TRANSFORM = 0\n    COVARIANT_PIOLA_TRANSFORM = 1\n    CONTRAVARIANT_PIOLA_TRANSFORM = 2\nend \n\n@enum PetscOptionSource begin\n    PETSC_OPT_CODE = 0\n    PETSC_OPT_COMMAND_LINE = 1\n    PETSC_OPT_FILE = 2\n    PETSC_OPT_ENVIRONMENT = 3\n    NUM_PETSC_OPT_SOURCE = 4\nend \n\n@enum PetscOptionType begin\n    OPTION_INT = 0\n    OPTION_BOOL = 1\n    OPTION_REAL = 2\n    OPTION_FLIST = 3\n    OPTION_STRING = 4\n    OPTION_REAL_ARRAY = 5\n    OPTION_SCALAR_ARRAY = 6\n    OPTION_HEAD = 7\n    OPTION_INT_ARRAY = 8\n    OPTION_ELIST = 9\n    OPTION_BOOL_ARRAY = 10\n    OPTION_STRING_ARRAY = 11\nend \n\n@enum PetscSFPattern begin\n    PETSCSF_PATTERN_GENERAL = 0\n    PETSCSF_PATTERN_ALLGATHER = 1\n    PETSCSF_PATTERN_GATHER = 2\n    PETSCSF_PATTERN_ALLTOALL = 3\nend \n\n@enum PetscSFWindowSyncType begin\n    PETSCSF_WINDOW_SYNC_FENCE = 0\n    PETSCSF_WINDOW_SYNC_LOCK = 1\n    PETSCSF_WINDOW_SYNC_ACTIVE = 2\nend \n\n@enum PetscSFWindowFlavorType begin\n    PETSCSF_WINDOW_FLAVOR_CREATE = 0\n    PETSCSF_WINDOW_FLAVOR_DYNAMIC = 1\n    PETSCSF_WINDOW_FLAVOR_ALLOCATE = 2\n    PETSCSF_WINDOW_FLAVOR_SHARED = 3\nend \n\n@enum PetscSFDuplicateOption begin\n    PETSCSF_DUPLICATE_CONFONLY = 0\n    PETSCSF_DUPLICATE_RANKS = 1\n    PETSCSF_DUPLICATE_GRAPH = 2\nend \n\n@enum PetscSFConcatenateRootMode begin\n    PETSCSF_CONCATENATE_ROOTMODE_LOCAL = 0\n    PETSCSF_CONCATENATE_ROOTMODE_SHARED = 1\n    PETSCSF_CONCATENATE_ROOTMODE_GLOBAL = 2\nend \n\n@enum DMDAStencilType begin\n    DMDA_STENCIL_STAR = 0\n    DMDA_STENCIL_BOX = 1\nend \n\n@enum DMDAInterpolationType begin\n    DMDA_Q0 = 0\n    DMDA_Q1 = 1\nend \n\n@enum DMDAElementType begin\n    DMDA_ELEMENT_P1 = 0\n    DMDA_ELEMENT_Q1 = 1\nend \n\n@enum PetscDiscType begin\n    PETSC_DISC_NONE = 0\n    PETSC_DISC_FE = 1\n    PETSC_DISC_FV = 2\nend \n\n@enum DMPlexShape begin\n    DM_SHAPE_BOX = 0\n    DM_SHAPE_BOX_SURFACE = 1\n    DM_SHAPE_BALL = 2\n    DM_SHAPE_SPHERE = 3\n    DM_SHAPE_CYLINDER = 4\n    DM_SHAPE_SCHWARZ_P = 5\n    DM_SHAPE_GYROID = 6\n    DM_SHAPE_DOUBLET = 7\n    DM_SHAPE_ANNULUS = 8\n    DM_SHAPE_HYPERCUBIC = 9\n    DM_SHAPE_ZBOX = 10\n    DM_SHAPE_UNKNOWN = 11\nend \n\n@enum DMPlexCoordMap begin\n    DM_COORD_MAP_NONE = 0\n    DM_COORD_MAP_SHEAR = 1\n    DM_COORD_MAP_FLARE = 2\n    DM_COORD_MAP_ANNULUS = 3\n    DM_COORD_MAP_SHELL = 4\n    DM_COORD_MAP_SINUSOID = 5\n    DM_COORD_MAP_UNKNOWN = 6\nend \n\n@enum DMPlexCSRAlgorithm begin\n    DM_PLEX_CSR_MAT = 0\n    DM_PLEX_CSR_GRAPH = 1\n    DM_PLEX_CSR_OVERLAP = 2\nend \n\n"
  },
  {
    "path": "src/autowrapped/petsc_library.jl",
    "content": "#\n# START OF PROLOGUE\n#\n\nusing MPI\nconst MPI_Comm = MPI.Comm\nconst MPI_Datatype = MPI.MPI_Datatype\nconst MPI_File = MPI.MPI_File\nconst MPI_Aint = MPI.MPI_Aint\nconst MPI_Info = MPI.MPI_Info\nconst MPI_Win = MPI.MPI_Win\nconst MPI_Offset = MPI.MPI_Offset\nconst MPI_Op = MPI.MPI_Op\nconst MPI_UNSIGNED_SHORT = MPI.UNSIGNED_SHORT\nconst MPI_INT64_T = MPI.INT64_T\nconst MPI_INT32_T = MPI.INT32_T\nconst MPI_FLOAT = MPI.FLOAT\nconst MPI_COMM_SELF = MPI.COMM_SELF\nconst MPI_DOUBLE = MPI.DOUBLE\nconst MPI_SUM = MPI.SUM\nconst MPI_MAX = MPI.MAX\nconst MPI_MIN = MPI.MIN\nconst MPI_REPLACE = MPI.REPLACE\nconst MPIU_INT64 = MPI.UINT64_T\nconst MPIU_INT32 = MPI.UINT32_T\n\n# We know these will be Cvoid, so just set them to be that\nconst PetscViewer = Ptr{Cvoid}\nconst PetscObject = Ptr{Cvoid}\n\n\nconst PETSC_DECIDE = -1\nconst PETSC_DETERMINE = PETSC_DECIDE\nconst PETSC_COMM_SELF = MPI.COMM_SELF\n\nPetscInt = Int64\nPetscInt64 = Int64\nPetscInt32 = Int32\nPetscScalar = Float64\nPetscReal = Float64\n#PetscBool = Bool\n\nmutable struct _n_ISColoring end\nconst ISColoring = Ptr{_n_ISColoring}\n\n# ----- Custom Julia struct for PETSc Vec -----\nconst CVec = Ptr{Cvoid}\nabstract type AbstractPetscVec{T} end\nmutable struct PetscVec{PetscLib} <: AbstractPetscVec{PetscLib}\n    ptr::CVec\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscVec{PetscLib}(ptr::CVec, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty Vec (null pointer)\n    PetscVec{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscVec(lib::PetscLib) where {PetscLib} = PetscVec{PetscLib}()\nPetscVec(ptr::CVec, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscVec{PetscLib}(ptr, age)\nBase.convert(::Type{CVec}, v::AbstractPetscVec) = v.ptr\nBase.unsafe_convert(::Type{CVec}, v::AbstractPetscVec) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc Mat -----\nconst CMat = Ptr{Cvoid}\nabstract type AbstractPetscMat{T} end\nmutable struct PetscMat{PetscLib} <: AbstractPetscMat{PetscLib}\n    ptr::CMat\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscMat{PetscLib}(ptr::CMat, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty Mat (null pointer)\n    PetscMat{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscMat(lib::PetscLib) where {PetscLib} = PetscMat{PetscLib}()\nPetscMat(ptr::CMat, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscMat{PetscLib}(ptr, age)\nBase.convert(::Type{CMat}, v::AbstractPetscMat) = v.ptr\nBase.unsafe_convert(::Type{CMat}, v::AbstractPetscMat) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc KSP -----\nconst CKSP = Ptr{Cvoid}\nabstract type AbstractPetscKSP{T} end\nmutable struct PetscKSP{PetscLib} <: AbstractPetscKSP{PetscLib}\n    ptr::CKSP\n    age::Int\n    computerhs!::Function\n    computeops!::Function\n    opts::Any  # Options database for deferred sub-solver setup (e.g. FieldSplit)\n    \n    # Constructor from pointer and age (with default callback placeholders)\n    PetscKSP{PetscLib}(ptr::CKSP, age::Int = 0, computerhs!::Function = x -> error(\"computerhs! not defined\"), computeops!::Function = x -> error(\"computeops! not defined\"), opts::Any = nothing) where {PetscLib} = new{PetscLib}(ptr, age, computerhs!, computeops!, opts)\n\n    # Constructor for empty KSP (null pointer)\n    PetscKSP{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0, x -> error(\"computerhs! not defined\"), x -> error(\"computeops! not defined\"), nothing)\nend\n\n# Convenience constructor from petsclib instance\nPetscKSP(lib::PetscLib) where {PetscLib} = PetscKSP{PetscLib}()\nPetscKSP(ptr::CKSP, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscKSP{PetscLib}(ptr, age)\nBase.convert(::Type{CKSP}, v::AbstractPetscKSP) = v.ptr\nBase.unsafe_convert(::Type{CKSP}, v::AbstractPetscKSP) = v.ptr\n\n\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc SNES -----\nconst CSNES = Ptr{Cvoid}\nabstract type AbstractPetscSNES{T} end\nmutable struct PetscSNES{PetscLib} <: AbstractPetscSNES{PetscLib}\n    ptr::CSNES\n    age::Int\n    f!::Function\n    updateJ!::Function\n    user_ctx::Any\n    opts::Any  # Options database for deferred sub-solver setup (e.g. FieldSplit)\n\n    # Constructor from pointer and age (with defaults for callbacks and context)\n    PetscSNES{PetscLib}(ptr::CSNES, age::Int = 0, f!::Function = x -> error(\"function not defined\"), updateJ!::Function = x -> error(\"function not defined\"), user_ctx::Any = nothing, opts::Any = nothing) where {PetscLib} = new{PetscLib}(ptr, age, f!, updateJ!, user_ctx, opts)\n    \n    # Constructor for empty SNES (null pointer)\n    PetscSNES{PetscLib}(ptr, age) where {PetscLib} = new{PetscLib}(\n                        ptr,\n                        age,\n                        x -> error(\"function not defined\"),\n                        x -> error(\"function not defined\"),\n                        nothing,\n                        nothing,\n                        )                  \nend\n\n# Convenience constructor from petsclib instance\nPetscSNES(lib::PetscLib) where {PetscLib} = PetscSNES{PetscLib}()\nPetscSNES(ptr::Ptr, lib::PetscLib, f!::Function, updateJ!::Function, user_ctx::Any=nothing, age::Int = 0) where {PetscLib} = PetscSNES{PetscLib}(ptr, age, f!, updateJ!, user_ctx)\nPetscSNES(ptr::Ptr, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscSNES{PetscLib}(ptr, age)\nBase.convert(::Type{CSNES}, v::AbstractPetscSNES) = v.ptr\nBase.unsafe_convert(::Type{CSNES}, v::AbstractPetscSNES) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc DM -----\nconst CDM = Ptr{Cvoid}\nabstract type AbstractPetscDM{T} end\nmutable struct PetscDM{PetscLib} <: AbstractPetscDM{PetscLib}\n    ptr::CDM\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscDM{PetscLib}(ptr::CDM, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty DM (null pointer)\n    PetscDM{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscDM(lib::PetscLib) where {PetscLib} = PetscDM{PetscLib}()\nPetscDM(ptr::CDM, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscDM{PetscLib}(ptr, age)\nBase.convert(::Type{CDM}, v::AbstractPetscDM) = v.ptr\nBase.unsafe_convert(::Type{CDM}, v::AbstractPetscDM) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# PetscOptions\nconst COptions = Ptr{Cvoid} \nabstract type AbstractPetscOptions{T} end\n\nmutable struct PetscOptions{PetscLib} <: AbstractPetscOptions{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    PetscOptions{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nPetscOptions(lib::PetscLib) where {PetscLib} = PetscOptions{PetscLib}()\nPetscOptions(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = PetscOptions{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractPetscOptions) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractPetscOptions) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# IS\nconst CIS = Ptr{Cvoid} \nabstract type AbstractIS{T} end\n\nmutable struct IS{PetscLib} <: AbstractIS{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    IS{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nIS(lib::PetscLib) where {PetscLib} = IS{PetscLib}()\nIS(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = IS{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractIS) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractIS) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# PF\nconst CPF = Ptr{Cvoid} \nabstract type AbstractPF{T} end\n\nmutable struct PF{PetscLib} <: AbstractPF{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    PF{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nPF(lib::PetscLib) where {PetscLib} = PF{PetscLib}()\nPF(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = PF{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractPF) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractPF) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# TS\nconst CTS = Ptr{Cvoid} \nabstract type AbstractTS{T} end\n\nmutable struct TS{PetscLib} <: AbstractTS{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    TS{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nTS(lib::PetscLib) where {PetscLib} = TS{PetscLib}()\nTS(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = TS{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractTS) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractTS) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# Tao\nconst CTao = Ptr{Cvoid} \nabstract type AbstractTao{T} end\n\nmutable struct Tao{PetscLib} <: AbstractTao{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    Tao{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nTao(lib::PetscLib) where {PetscLib} = Tao{PetscLib}()\nTao(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = Tao{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractTao) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractTao) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# AO\nconst CAO = Ptr{Cvoid} \nabstract type AbstractAO{T} end\n\nmutable struct AO{PetscLib} <: AbstractAO{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    AO{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nAO(lib::PetscLib) where {PetscLib} = AO{PetscLib}()\nAO(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = AO{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractAO) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractAO) = v.ptr\n# ------------------------------------------------------\n\n\n# Stuff that I don't really want to define by hand, but seem to not be part of the petsc python interface?\nmutable struct _p_PetscSF end\nconst PetscSF = Ptr{_p_PetscSF}\n\nconst PETSCSTACKSIZE = 64\n\nconst void = Cvoid\nconst char = Cchar\n\nmutable struct PetscDraw end\nmutable struct DMLabel end\nmutable struct TSMonitorLGCtx end\nmutable struct PetscCtxDestroyFn end\nmutable struct PetscErrorCodeFn end\n\n# stuff I need to define to get PETSc.jl to load with \"using\". We need to find a real solution\nmutable struct _n_PC end\nconst PC = Ptr{_n_PC}\n\nconst PetscObject = Ptr{Cvoid}\nconst external = Ptr{Cvoid}\nconst PetscVoidFn = Cvoid\nconst PetscProbFn = Ptr{Cvoid}\nconst PetscBT = Ptr{Cchar}\n\n# required in Sys_wrappers\nmutable struct _n_PetscLogRegistry end\nconst PetscLogRegistry = Ptr{_n_PetscLogRegistry}\n\nmutable struct _n_PetscIntStack end\nconst PetscIntStack = Ptr{_n_PetscIntStack}\nmutable struct _n_PetscLogState\n    registry::PetscLogRegistry\n    active::PetscBT\n    stage_stack::PetscIntStack\n    current_stage::Cint\n    bt_num_stages::Cint\n    bt_num_events::Cint\n    refct::Cint\n    _n_PetscLogState() = new()\nend\nconst PetscLogState = Ptr{_n_PetscLogState}\n\n@enum KSPConvergedReason::Int32 begin\n    KSP_CONVERGED_RTOL_NORMAL = 1\n    KSP_CONVERGED_ATOL_NORMAL = 9\n    KSP_CONVERGED_RTOL = 2\n    KSP_CONVERGED_ATOL = 3\n    KSP_CONVERGED_ITS = 4\n    KSP_CONVERGED_NEG_CURVE = 5\n    # KSP_CONVERGED_CG_NEG_CURVE = 5\n    KSP_CONVERGED_CG_CONSTRAINED = 6\n    # KSP_CONVERGED_STEP_LENGTH = 6\n    KSP_CONVERGED_HAPPY_BREAKDOWN = 7\n    KSP_DIVERGED_NULL = -2\n    KSP_DIVERGED_ITS = -3\n    KSP_DIVERGED_DTOL = -4\n    KSP_DIVERGED_BREAKDOWN = -5\n    KSP_DIVERGED_BREAKDOWN_BICG = -6\n    KSP_DIVERGED_NONSYMMETRIC = -7\n    KSP_DIVERGED_INDEFINITE_PC = -8\n    KSP_DIVERGED_NANORINF = -9\n    KSP_DIVERGED_INDEFINITE_MAT = -10\n    KSP_DIVERGED_PC_FAILED = -11\n    # KSP_DIVERGED_PCSETUP_FAILED = -11\n    KSP_CONVERGED_ITERATING = 0\nend\n\n@enum PetscMemType::UInt32 begin\n    PETSC_MEMTYPE_HOST = 0\n    PETSC_MEMTYPE_DEVICE = 1\n    # PETSC_MEMTYPE_CUDA = 1\n    PETSC_MEMTYPE_NVSHMEM = 17\n    PETSC_MEMTYPE_HIP = 3\n    PETSC_MEMTYPE_SYCL = 5\nend\n\n# needed for Mat ---\n#\n# END OF PROLOGUE\n#\n\n# load all generated files\n#include(\"../src/LibPETSc_lib.jl\")\ninclude(\"petscarray.jl\")\ninclude(\"enums_wrappers.jl\")\ninclude(\"senums_wrappers.jl\")\ninclude(\"typedefs_wrappers.jl\")\ninclude(\"struct_wrappers.jl\")\ninclude(\"Sys_wrappers.jl\")\ninclude(\"Vec_wrappers.jl\")\ninclude(\"Vecs_wrappers.jl\")\ninclude(\"Mat_wrappers.jl\")\ninclude(\"KSP_wrappers.jl\")\ninclude(\"SNES_wrappers.jl\")\ninclude(\"DM_wrappers.jl\")\ninclude(\"PetscOptions_wrappers.jl\")\ninclude(\"PetscObject_wrappers.jl\")\ninclude(\"PetscDraw_wrappers.jl\")\ninclude(\"PetscRegressor_wrappers.jl\")\ninclude(\"PF_wrappers.jl\")\ninclude(\"IS_wrappers.jl\")\ninclude(\"TS_wrappers.jl\")\ninclude(\"AO_wrappers.jl\")\ninclude(\"Tao_wrappers.jl\")\ninclude(\"DMaddons_wrappers.jl\")\ninclude(\"VecTagger_wrappers.jl\")\ninclude(\"PetscDS_wrappers.jl\")\ninclude(\"Mataddons_wrappers.jl\")\ninclude(\"ISaddons_wrappers.jl\")\ninclude(\"SNESLineSearch_wrappers.jl\")\ninclude(\"PetscBag_wrappers.jl\")\ninclude(\"KSPGuess_wrappers.jl\")\ninclude(\"PetscKDTree_wrappers.jl\")\ninclude(\"PetscGridHash_wrappers.jl\")\ninclude(\"PetscSection_wrappers.jl\")\ninclude(\"TSaddons_wrappers.jl\")\ninclude(\"PetscSpace_wrappers.jl\")\ninclude(\"PetscDevice_wrappers.jl\")\ninclude(\"PetscLayout_wrappers.jl\")\ninclude(\"PetscMatlabEngine_wrappers.jl\")\ninclude(\"PetscPartitioner_wrappers.jl\")\ninclude(\"PetscConvEst_wrappers.jl\")\ninclude(\"PetscFE_wrappers.jl\")\ninclude(\"PetscBench_wrappers.jl\")\ninclude(\"PetscToken_wrappers.jl\")\ninclude(\"PetscFunctionList_wrappers.jl\")\ninclude(\"PetscDLLibrary_wrappers.jl\")\ninclude(\"PetscContainer_wrappers.jl\")\ninclude(\"PetscRandom_wrappers.jl\")\ninclude(\"Petsccomm_wrappers.jl\")\ninclude(\"PetscOmpCtrl_wrappers.jl\")\ninclude(\"PetscHeap_wrappers.jl\")\ninclude(\"PetscSegBuffer_wrappers.jl\")\ninclude(\"PetscLimiter_wrappers.jl\")\ninclude(\"PetscFV_wrappers.jl\")\ninclude(\"Tao_addons_wrappers.jl\")\ninclude(\"PetscViewer_wrappers.jl\")\ninclude(\"Characteristic_wrappers.jl\")\ninclude(\"PetscSF_wrappers.jl\")\ninclude(\"PetscDualSpace_wrappers.jl\")\ninclude(\"PetscOptions_addons_wrappers.jl\")\ninclude(\"PetscIntStack_wrappers.jl\")\ninclude(\"PetscLog_wrappers.jl\")"
  },
  {
    "path": "src/autowrapped/petsc_wrappers_version.jl",
    "content": "# Auto-generated by wrapping/generatejuliabindings.jl — do not edit\n# PETSc installation: /Users/kausb/Downloads/petsc\nconst PETSC_WRAPPERS_VERSION = v\"3.24.0\"\n"
  },
  {
    "path": "src/autowrapped/petscarray.jl",
    "content": "# this creates a Julia wrapper around a PETSc array\n# that holds a pointer to the underlying PETSc data\n# and a Julia array that references the data, so we \n# can use Julia array operations on it\n\n\"\"\"\n    PetscArray{T,N} <: AbstractArray{T,N}\nBehaves like a normal Julia array but holds a pointer to PETSc data, which can be destroyed\n\"\"\"\nstruct PetscArray{T,N} <: AbstractArray{T,N}\n    data::AbstractArray{T,N}  # julia array that holds the data\n    ptr  # ptr to the underlying PETSc data (as a vector so we can put it to zero)\nend\n\n# ============================================================================\n# Array interface - make PetscArray behave like a normal Julia array\n# ============================================================================\n\n# Size and shape\nBase.size(A::PetscArray) = size(A.data)\nBase.axes(A::PetscArray) = axes(A.data)\nBase.length(A::PetscArray) = length(A.data)\nBase.eltype(::Type{PetscArray{T,N}}) where {T,N} = T\nBase.ndims(::Type{PetscArray{T,N}}) where {T,N} = N\n\n# Indexing - linear and cartesian\nBase.getindex(A::PetscArray, i::Int) = getindex(A.data, i)\nBase.getindex(A::PetscArray, I::Vararg{Int,N}) where {N} = getindex(A.data, I...)\nBase.getindex(A::PetscArray, I...) = getindex(A.data, I...)\n\nBase.setindex!(A::PetscArray, v, i::Int) = setindex!(A.data, v, i)\nBase.setindex!(A::PetscArray, v, I::Vararg{Int,N}) where {N} = setindex!(A.data, v, I...)\nBase.setindex!(A::PetscArray, v, I...) = setindex!(A.data, v, I...)\n\n# Iteration\nBase.iterate(A::PetscArray) = iterate(A.data)\nBase.iterate(A::PetscArray, state) = iterate(A.data, state)\n\n# Conversion and similarity\nBase.similar(A::PetscArray, ::Type{T}, dims::Dims) where {T} = similar(A.data, T, dims)\nBase.similar(A::PetscArray, ::Type{T}) where {T} = similar(A.data, T)\nBase.similar(A::PetscArray) = similar(A.data)\n\nBase.copy(A::PetscArray) = PetscArray(copy(A.data), A.ptr)\nBase.copyto!(dest::PetscArray, src::PetscArray) = (copyto!(dest.data, src.data); dest)\nBase.copyto!(dest::Array, src::PetscArray) = copyto!(dest, src.data)\nBase.copyto!(dest::PetscArray, src::Array) = (copyto!(dest.data, src); dest)\n\n# Broadcasting\nBase.BroadcastStyle(::Type{<:PetscArray}) = Broadcast.ArrayStyle{Array}()\nBase.similar(bc::Broadcast.Broadcasted{Broadcast.ArrayStyle{Array}}, ::Type{ElType}) where {ElType} = similar(Array{ElType}, axes(bc))\n\n# Show methods\nBase.show(io::IO, ::MIME\"text/plain\", A::PetscArray) = show(io, MIME(\"text/plain\"), A.data)\nBase.show(io::IO, A::PetscArray) = show(io, A.data)\n\n# Mathematical operations\nBase.:(+)(A::PetscArray, B::PetscArray) = A.data + B.data\nBase.:(+)(A::PetscArray, B::Array) = A.data + B\nBase.:(+)(A::Array, B::PetscArray) = A + B.data\n\nBase.:(-)(A::PetscArray, B::PetscArray) = A.data - B.data\nBase.:(-)(A::PetscArray, B::Array) = A.data - B\nBase.:(-)(A::Array, B::PetscArray) = A - B.data\nBase.:(-)(A::PetscArray) = -A.data\n\nBase.:(*)(A::PetscArray, B::PetscArray) = A.data * B.data\nBase.:(*)(A::PetscArray, B::Array) = A.data * B\nBase.:(*)(A::Array, B::PetscArray) = A * B.data\nBase.:(*)(A::PetscArray, x::Number) = A.data * x\nBase.:(*)(x::Number, A::PetscArray) = x * A.data\n\nBase.:(/)(A::PetscArray, x::Number) = A.data / x\nBase.:(\\)(A::PetscArray, B::PetscArray) = A.data \\ B.data\nBase.:(\\)(A::PetscArray, B::Array) = A.data \\ B\nBase.:(\\)(A::Array, B::PetscArray) = A \\ B.data\n\n# Comparison\nBase.:(==)(A::PetscArray, B::PetscArray) = A.data == B.data\nBase.:(==)(A::PetscArray, B::Array) = A.data == B\nBase.:(==)(A::Array, B::PetscArray) = A == B.data\n\nBase.isapprox(A::PetscArray, B::PetscArray; kwargs...) = isapprox(A.data, B.data; kwargs...)\nBase.isapprox(A::PetscArray, B::Array; kwargs...) = isapprox(A.data, B; kwargs...)\nBase.isapprox(A::Array, B::PetscArray; kwargs...) = isapprox(A, B.data; kwargs...)\n\n# Array operations\nBase.fill!(A::PetscArray, x) = (fill!(A.data, x); A)\nBase.sum(A::PetscArray; dims=:) = sum(A.data; dims=dims)\nBase.sum(f, A::PetscArray) = sum(f, A.data)\nBase.prod(A::PetscArray; dims=:) = prod(A.data; dims=dims)\nBase.minimum(A::PetscArray; dims=:) = minimum(A.data; dims=dims)\nBase.maximum(A::PetscArray; dims=:) = maximum(A.data; dims=dims)\nBase.extrema(A::PetscArray; dims=:) = extrema(A.data; dims=dims)\n\nBase.transpose(A::PetscArray) = transpose(A.data)\nBase.adjoint(A::PetscArray) = adjoint(A.data)\nBase.permutedims(A::PetscArray, perm) = permutedims(A.data, perm)\n\n# Reshape and views\nBase.reshape(A::PetscArray, dims::Dims) = reshape(A.data, dims)\nBase.reshape(A::PetscArray, dims::Int...) = reshape(A.data, dims...)\nBase.vec(A::PetscArray) = vec(A.data)\nBase.view(A::PetscArray, I...) = view(A.data, I...)\n\n# Type conversions\nBase.convert(::Type{Array{T,N}}, A::PetscArray{T,N}) where {T,N} = A.data\nBase.convert(::Type{Array}, A::PetscArray) = A.data\nBase.Array(A::PetscArray) = A.data\n\n# First, last, etc.\nBase.first(A::PetscArray) = first(A.data)\nBase.last(A::PetscArray) = last(A.data)\nBase.firstindex(A::PetscArray) = firstindex(A.data)\nBase.lastindex(A::PetscArray) = lastindex(A.data)\nBase.eachindex(A::PetscArray) = eachindex(A.data)\n\n# Linear algebra support\nimport LinearAlgebra\nLinearAlgebra.norm(A::PetscArray, p::Real=2) = LinearAlgebra.norm(A.data, p)\nLinearAlgebra.dot(A::PetscArray, B::PetscArray) = LinearAlgebra.dot(A.data, B.data)\nLinearAlgebra.dot(A::PetscArray, B::Array) = LinearAlgebra.dot(A.data, B)\nLinearAlgebra.dot(A::Array, B::PetscArray) = LinearAlgebra.dot(A, B.data)\n\n"
  },
  {
    "path": "src/autowrapped/senums_wrappers.jl",
    "content": "# not quite sure yet how to deal with this\nPetscRegressorType=Ptr{Cchar}\nDMFieldType=Ptr{Cchar}\nDMPlexTransformType=Ptr{Cchar}\nPetscDrawType=Ptr{Cchar}\nPFType=Ptr{Cchar}\nDMAdaptorType=Ptr{Cchar}\nPetscFEType=Ptr{Cchar}\nVecType=Ptr{Cchar}\nVecTaggerType=Ptr{Cchar}\nMatType=Ptr{Cchar}\nMatSolverType=Ptr{Cchar}\nMatProductAlgorithm=Ptr{Cchar}\nMatOrderingType=Ptr{Cchar}\nMatColoringType=Ptr{Cchar}\nMatPartitioningType=Ptr{Cchar}\nMatMFFDType=Ptr{Cchar}\nSNESType=Ptr{Cchar}\nSNESLineSearchType=Ptr{Cchar}\nSNESMSType=Ptr{Cchar}\nDMType=Ptr{Cchar}\nKSPType=Ptr{Cchar}\nKSPGuessType=Ptr{Cchar}\nISType=Ptr{Cchar}\nISLocalToGlobalMappingType=Ptr{Cchar}\nPetscSectionSymType=Ptr{Cchar}\nTSType=Ptr{Cchar}\nTSTrajectoryType=Ptr{Cchar}\nTSSSPType=Ptr{Cchar}\nTSAdaptType=Ptr{Cchar}\nTSGLLEAdaptType=Ptr{Cchar}\nTSGLLEAcceptType=Ptr{Cchar}\nTSGLLEType=Ptr{Cchar}\nTSRKType=Ptr{Cchar}\nTSMPRKType=Ptr{Cchar}\nTSIRKType=Ptr{Cchar}\nTSGLEEType=Ptr{Cchar}\nTSARKIMEXType=Ptr{Cchar}\nTSDIRKType=Ptr{Cchar}\nTSRosWType=Ptr{Cchar}\nTSBasicSymplecticType=Ptr{Cchar}\nPetscSpaceType=Ptr{Cchar}\nMatCoarsenType=Ptr{Cchar}\nDMLabelType=Ptr{Cchar}\nPetscPartitionerType=Ptr{Cchar}\nPCType=Ptr{Cchar}\nPCGAMGType=Ptr{Cchar}\nPCGAMGClassicalType=Ptr{Cchar}\nPetscBenchType=Ptr{Cchar}\nPetscRandomType=Ptr{Cchar}\nTaoType=Ptr{Cchar}\nPetscViewerType=Ptr{Cchar}\nDMForestTopology=Ptr{Cchar}\nDMForestAdaptivityStrategy=Ptr{Cchar}\nCharacteristicType=Ptr{Cchar}\nPetscSFType=Ptr{Cchar}\nTaoLineSearchType=Ptr{Cchar}\nPetscDualSpaceType=Ptr{Cchar}\nAOType=Ptr{Cchar}\nPetscLimiterType=Ptr{Cchar}\nPetscFVType=Ptr{Cchar}\nPetscLogHandlerType=Ptr{Cchar}\nPetscDSType=Ptr{Cchar}\n"
  },
  {
    "path": "src/autowrapped/struct_wrappers.jl",
    "content": "struct PetscFEGeom\n    mode::PetscFEGeomMode\n    isAffine::PetscBool\n    dim::PetscInt\n    dimEmbed::PetscInt\n    numCells::PetscInt\n    numPoints::PetscInt\n    xi::Ptr{PetscReal}\n    v::Ptr{PetscReal}\n    J::Ptr{PetscReal}\n    invJ::Ptr{PetscReal}\n    detJ::Ptr{PetscReal}\n    n::Ptr{PetscReal}\n    face::Ptr{NTuple{4, PetscInt}}\n    suppJ::Ptr{NTuple{2, PetscReal}}\n    suppInvJ::Ptr{NTuple{2, PetscReal}}\n    suppDetJ::Ptr{NTuple{2, PetscReal}}\n\n    PetscFEGeom() = new()\n\n    PetscFEGeom(mode,isAffine,dim,dimEmbed,numCells,numPoints,xi,v,J,invJ,detJ,n,face,suppJ,suppInvJ,suppDetJ) = new(mode::PetscFEGeomMode,isAffine::PetscBool,dim::PetscInt,dimEmbed::PetscInt,numCells::PetscInt,numPoints::PetscInt,xi::Ptr{PetscReal},v::Ptr{PetscReal},J::Ptr{PetscReal},invJ::Ptr{PetscReal},detJ::Ptr{PetscReal},n::Ptr{PetscReal},face::Ptr{NTuple{4, PetscInt}},suppJ::Ptr{NTuple{2, PetscReal}},suppInvJ::Ptr{NTuple{2, PetscReal}},suppDetJ::Ptr{NTuple{2, PetscReal}})\n\nend \n\nstruct VecTaggerBox\n    min::PetscScalar\n    max::PetscScalar\n\n    VecTaggerBox() = new()\n\n    VecTaggerBox(min,max) = new(min::PetscScalar,max::PetscScalar)\n\nend \n\nstruct PetscDrawViewPorts\n    nports::PetscInt\n    xl::Ptr{PetscReal}\n    xr::Ptr{PetscReal}\n    yl::Ptr{PetscReal}\n    yr::Ptr{PetscReal}\n    draw::PetscDraw\n    port_xl::PetscReal \n    port_yl::PetscReal \n    port_xr::PetscReal \n    port_yr::PetscReal \n    \n\n    PetscDrawViewPorts() = new()\n\n    PetscDrawViewPorts(nports,xl,xr,yl,yr,draw,port_xl) = new(nports::PetscInt,xl::Ptr{PetscReal},xr::Ptr{PetscReal},yl::Ptr{PetscReal},yr::Ptr{PetscReal},draw::PetscDraw,port_xl::PetscReal ,    port_yl::PetscReal ,    port_xr::PetscReal ,    port_yr::PetscReal)\n\nend \n\nstruct PetscFormKey\n    label::DMLabel\n    value::PetscInt\n    field::PetscInt\n    part::PetscInt\n\n    PetscFormKey() = new()\n\n    PetscFormKey(label,value,field,part) = new(label::DMLabel,value::PetscInt,field::PetscInt,part::PetscInt)\n\nend \n\nstruct DMStagStencil\n    loc::DMStagStencilLocation\n    i::PetscInt \n    j::PetscInt \n    k::PetscInt \n    c::PetscInt \n    \n\n    DMStagStencil() = new()\n\n    DMStagStencil(loc,i,j,k,c) = new(loc::DMStagStencilLocation,i::PetscInt ,    j::PetscInt ,    k::PetscInt ,    c::PetscInt)\n\nend \n\nstruct MatStencil\n    # Must match PETSc C struct order: struct MatStencil { PetscInt i,j,k,c; };\n    i::PetscInt\n    j::PetscInt\n    k::PetscInt\n    c::PetscInt\n\n    MatStencil() = new()\n        \n    # Convenience constructor accepting integers in i,j,k,c order\n    MatStencil(i,j,k,c) = new(i::PetscInt, j::PetscInt, k::PetscInt, c::PetscInt)\nend \n\nstruct MatInfo\n    block_size::PetscLogDouble\n    nz_allocated::PetscLogDouble \n    nz_used::PetscLogDouble \n    nz_unneeded::PetscLogDouble \n    \n    memory::PetscLogDouble\n    assemblies::PetscLogDouble\n    mallocs::PetscLogDouble\n    fill_ratio_given::PetscLogDouble \n    fill_ratio_needed::PetscLogDouble \n    \n    factor_mallocs::PetscLogDouble\n\n    MatInfo() = new()\n\n    MatInfo(block_size,nz_allocated,memory,assemblies,mallocs,fill_ratio_given,factor_mallocs) = new(block_size::PetscLogDouble,nz_allocated::PetscLogDouble,nz_used::PetscLogDouble ,nz_unneeded::PetscLogDouble,memory::PetscLogDouble,assemblies::PetscLogDouble,mallocs::PetscLogDouble,fill_ratio_given::PetscLogDouble ,fill_ratio_needed::PetscLogDouble,factor_mallocs::PetscLogDouble)\n\nend \n\nstruct MatFactorInfo\n    diagonal_fill::PetscReal\n    usedt::PetscReal\n    dt::PetscReal\n    dtcol::PetscReal\n    dtcount::PetscReal\n    fill::PetscReal\n    levels::PetscReal\n    pivotinblocks::PetscReal\n    zeropivot::PetscReal\n    shifttype::PetscReal\n    shiftamount::PetscReal\n    factoronhost::PetscBool\n    solveonhost::PetscBool\n\n    MatFactorInfo() = new()\n\n    MatFactorInfo(diagonal_fill,usedt,dt,dtcol,dtcount,fill,levels,pivotinblocks,zeropivot,shifttype,shiftamount,factoronhost,solveonhost) = new(diagonal_fill::PetscReal,usedt::PetscReal,dt::PetscReal,dtcol::PetscReal,dtcount::PetscReal,fill::PetscReal,levels::PetscReal,pivotinblocks::PetscReal,zeropivot::PetscReal,shifttype::PetscReal,shiftamount::PetscReal,factoronhost::PetscBool,solveonhost::PetscBool)\n\nend \n\nstruct LandauStaticData\n    invJ::Ptr{Cvoid}\n    D::Ptr{Cvoid}\n    B::Ptr{Cvoid}\n    alpha::Ptr{Cvoid}\n    beta::Ptr{Cvoid}\n    invMass::Ptr{Cvoid}\n    w::Ptr{Cvoid}\n    x::Ptr{Cvoid}\n    y::Ptr{Cvoid}\n    z::Ptr{Cvoid}\n    Eq_m::Ptr{Cvoid}\n    f::Ptr{Cvoid}\n    dfdx::Ptr{Cvoid}\n    dfdy::Ptr{Cvoid}\n    dfdz::Ptr{Cvoid}\n    dim_::Cint \n    ns_::Cint \n    nip_::Cint \n    nq_::Cint \n    nb_::Cint \n    \n    NCells::Ptr{Cvoid}\n    species_offset::Ptr{Cvoid}\n    mat_offset::Ptr{Cvoid}\n    elem_offset::Ptr{Cvoid}\n    ip_offset::Ptr{Cvoid}\n    ipf_offset::Ptr{Cvoid}\n    ipfdf_data::Ptr{Cvoid}\n    maps::Ptr{Cvoid}\n    coo_elem_offsets::Ptr{Cvoid}\n    coo_elem_point_offsets::Ptr{Cvoid}\n    coo_elem_fullNb::Ptr{Cvoid}\n    coo_vals::Ptr{Cvoid}\n    lambdas::Ptr{Cvoid}\n    coo_n_cellsTot::LandauIdx\n    coo_size::LandauIdx\n    coo_max_fullnb::LandauIdx\n\n    LandauStaticData() = new()\n\n    LandauStaticData(invJ,D,B,alpha,beta,invMass,w,x,y,z,Eq_m,f,dfdx,dfdy,dfdz,dim_,NCells,species_offset,mat_offset,elem_offset,ip_offset,ipf_offset,ipfdf_data,maps,coo_elem_offsets,coo_elem_point_offsets,coo_elem_fullNb,coo_vals,lambdas,coo_n_cellsTot,coo_size,coo_max_fullnb) = new(invJ::Ptr{Cvoid},D::Ptr{Cvoid},B::Ptr{Cvoid},alpha::Ptr{Cvoid},beta::Ptr{Cvoid},invMass::Ptr{Cvoid},w::Ptr{Cvoid},x::Ptr{Cvoid},y::Ptr{Cvoid},z::Ptr{Cvoid},Eq_m::Ptr{Cvoid},f::Ptr{Cvoid},dfdx::Ptr{Cvoid},dfdy::Ptr{Cvoid},dfdz::Ptr{Cvoid},dim_::Cint,ns_::Cint ,    nip_::Cint ,    nq_::Cint ,    nb_::Cint ,NCells::Ptr{Cvoid},species_offset::Ptr{Cvoid},mat_offset::Ptr{Cvoid},elem_offset::Ptr{Cvoid},ip_offset::Ptr{Cvoid},ipf_offset::Ptr{Cvoid},ipfdf_data::Ptr{Cvoid},maps::Ptr{Cvoid},coo_elem_offsets::Ptr{Cvoid},coo_elem_point_offsets::Ptr{Cvoid},coo_elem_fullNb::Ptr{Cvoid},coo_vals::Ptr{Cvoid},lambdas::Ptr{Cvoid},coo_n_cellsTot::LandauIdx,coo_size::LandauIdx,coo_max_fullnb::LandauIdx)\n\nend \n\nstruct PetscStack\n    _function::Ptr{NTuple{PETSCSTACKSIZE, Cchar}}\n    file::Ptr{NTuple{PETSCSTACKSIZE, Cchar}}\n    line::NTuple{PETSCSTACKSIZE, Cint}\n    petscroutine::NTuple{PETSCSTACKSIZE, Cint}\n    currentsize::Cint\n    hotdepth::Cint\n    check::PetscBool\n\n    PetscStack() = new()\n\n    PetscStack(_function,file,line,petscroutine,currentsize,hotdepth,check) = new(_function::Ptr{NTuple{PETSCSTACKSIZE, Cchar}},file::Ptr{NTuple{PETSCSTACKSIZE, Cchar}},line::NTuple{PETSCSTACKSIZE, Cint},petscroutine::NTuple{PETSCSTACKSIZE, Cint},currentsize::Cint,hotdepth::Cint,check::PetscBool)\n\nend \n\nstruct JacActionCtx\n    dm::PetscDM\n    u::PetscVec\n    J::PetscMat\n    user::Ptr{Cvoid}\n\n    JacActionCtx() = new()\n\n    JacActionCtx(dm,u,J,user) = new(dm::PetscDM,u::PetscVec,J::PetscMat,user::Ptr{Cvoid})\n\nend \n\nstruct TSMonitorDMDARayCtx\n    ray::PetscVec\n    scatter::VecScatter\n    viewer::PetscViewer\n    lgctx::TSMonitorLGCtx\n\n    TSMonitorDMDARayCtx() = new()\n\n    TSMonitorDMDARayCtx(ray,scatter,viewer,lgctx) = new(ray::PetscVec,scatter::VecScatter,viewer::PetscViewer,lgctx::TSMonitorLGCtx)\n\nend \n\nstruct PCMPIServerAddresses\n    n::PetscInt\n    addr::Ptr{NTuple{3, Cvoid}}\n\n    PCMPIServerAddresses() = new()\n\n    PCMPIServerAddresses(n,addr) = new(n::PetscInt,addr::Ptr{NTuple{3, Cvoid}})\n\nend \n\nstruct PetscFVFaceGeom\n    normal::NTuple{3, PetscReal}\n    centroid::NTuple{3, PetscReal}\n    grad::NTuple{2, PetscScalar}\n\n    PetscFVFaceGeom() = new()\n\n    PetscFVFaceGeom(normal,centroid,grad) = new(normal::NTuple{3, PetscReal},centroid::NTuple{3, PetscReal},grad::NTuple{2, PetscScalar})\n\nend \n\nstruct PetscFVCellGeom\n    centroid::NTuple{3, PetscReal}\n    volume::PetscReal\n\n    PetscFVCellGeom() = new()\n\n    PetscFVCellGeom(centroid,volume) = new(centroid::NTuple{3, PetscReal},volume::PetscReal)\n\nend \n\nstruct PetscViewerAndFormat\n    viewer::PetscViewer\n    format::PetscViewerFormat\n    view_interval::PetscInt\n    data::Ptr{Cvoid}\n    data_destroy::Ptr{PetscCtxDestroyFn}\n\n    PetscViewerAndFormat() = new()\n\n    PetscViewerAndFormat(viewer,format,view_interval,data,data_destroy) = new(viewer::PetscViewer,format::PetscViewerFormat,view_interval::PetscInt,data::Ptr{Cvoid},data_destroy::Ptr{PetscCtxDestroyFn})\n\nend \n\nstruct PetscSFNode\n    rank::PetscInt\n    index::PetscInt\n\n    PetscSFNode() = new()\n\n    PetscSFNode(rank,index) = new(rank::PetscInt,index::PetscInt)\n\nend \n\nstruct DMDALocalInfo\n    da::PetscDM\n    dim::PetscInt \n    dof::PetscInt \n    sw::PetscInt \n    \n    mx::PetscInt \n    my::PetscInt \n    mz::PetscInt \n    \n    xs::PetscInt \n    ys::PetscInt \n    zs::PetscInt \n    \n    xm::PetscInt \n    ym::PetscInt \n    zm::PetscInt \n    \n    gxs::PetscInt \n    gys::PetscInt \n    gzs::PetscInt \n    \n    gxm::PetscInt \n    gym::PetscInt \n    gzm::PetscInt \n    \n    bx::DMBoundaryType \n    by::DMBoundaryType \n    bz::DMBoundaryType \n    \n    st::DMDAStencilType\n\n    DMDALocalInfo() = new()\n\n    DMDALocalInfo(da,dim,mx,xs,xm,gxs,gxm,bx,st) = new(da::PetscDM,dim::PetscInt ,    dof::PetscInt ,    sw::PetscInt ,   mx::PetscInt ,    my::PetscInt ,    mz::PetscInt ,xs::PetscInt ,    ys::PetscInt ,    zs::PetscInt ,    xm::PetscInt ,    ym::PetscInt ,    zm::PetscInt ,    gxs::PetscInt ,    gys::PetscInt ,    gzs::PetscInt ,    gxm::PetscInt ,    gym::PetscInt ,    gzm::PetscInt ,    bx::DMBoundaryType ,    by::DMBoundaryType ,    bz::DMBoundaryType ,    st::DMDAStencilType)\n\nend \n\nstruct PetscEventPerfInfo\n    id::Cint\n    active::PetscBool\n    visible::PetscBool\n    depth::Cint\n    count::Cint\n    flops::PetscLogDouble\n    flops2::PetscLogDouble\n    flopsTmp::PetscLogDouble\n    time::PetscLogDouble\n    time2::PetscLogDouble\n    timeTmp::PetscLogDouble\n    syncTime::PetscLogDouble\n    dof::NTuple{8, PetscLogDouble}\n    errors::NTuple{8, PetscLogDouble}\n    numMessages::PetscLogDouble\n    messageLength::PetscLogDouble\n    numReductions::PetscLogDouble\n    memIncrease::PetscLogDouble\n    mallocIncrease::PetscLogDouble\n    mallocSpace::PetscLogDouble\n    mallocIncreaseEvent::PetscLogDouble\n\n    PetscEventPerfInfo() = new()\n\n    PetscEventPerfInfo(id,active,visible,depth,count,flops,flops2,flopsTmp,time,time2,timeTmp,syncTime,dof,errors,numMessages,messageLength,numReductions,memIncrease,mallocIncrease,mallocSpace,mallocIncreaseEvent) = new(id::Cint,active::PetscBool,visible::PetscBool,depth::Cint,count::Cint,flops::PetscLogDouble,flops2::PetscLogDouble,flopsTmp::PetscLogDouble,time::PetscLogDouble,time2::PetscLogDouble,timeTmp::PetscLogDouble,syncTime::PetscLogDouble,dof::NTuple{8, PetscLogDouble},errors::NTuple{8, PetscLogDouble},numMessages::PetscLogDouble,messageLength::PetscLogDouble,numReductions::PetscLogDouble,memIncrease::PetscLogDouble,mallocIncrease::PetscLogDouble,mallocSpace::PetscLogDouble,mallocIncreaseEvent::PetscLogDouble)\n\nend \n\nstruct PetscLogEventInfo\n    name::Ptr{Cchar}\n    classid::PetscClassId\n    collective::PetscBool\n\n    PetscLogEventInfo() = new()\n\n    PetscLogEventInfo(name,classid,collective) = new(name::Ptr{Cchar},classid::PetscClassId,collective::PetscBool)\n\nend \n\nstruct PetscLogClassInfo\n    name::Ptr{Cchar}\n    classid::PetscClassId\n\n    PetscLogClassInfo() = new()\n\n    PetscLogClassInfo(name,classid) = new(name::Ptr{Cchar},classid::PetscClassId)\n\nend \n\nstruct PetscLogStageInfo\n    name::Ptr{Cchar}\n\n    PetscLogStageInfo() = new()\n\n    PetscLogStageInfo(name) = new(name::Ptr{Cchar})\n\nend \n\nstruct DMDACoor\n    x::PetscScalar \n    y::PetscScalar \n    z::PetscScalar \n    \n\n    DMDACoor() = new()\n\n    DMDACoor(x) = new(x::PetscScalar ,    y::PetscScalar ,    z::PetscScalar)\n\nend \n\n"
  },
  {
    "path": "src/autowrapped/typedefs_wrappers.jl",
    "content": "const LandauIdx = PetscInt\nconst MatScalar = PetscScalar\nconst MatReal = PetscReal\nconst PetscElemScalar = PetscScalar\nconst DMNetworkComponentGenericDataType = PetscInt\nconst PetscErrorCode = Cint\nconst PetscClassId = Cint\nconst PetscMPIInt = Cint\nconst PetscSizeT = Csize_t\nconst PetscCount = Cptrdiff_t\nconst PetscShort = Cshort\nconst PetscFloat = Cfloat\nconst PetscCuBLASInt = Cint\nconst PetscHipBLASInt = Cint\nconst PetscExodusIIInt = Cint\nconst PetscExodusIIFloat = Cfloat\nprimitive type PetscBool 32 end\n\nconst PETSC_FALSE = Base.bitcast(PetscBool, Int32(0))\nconst PETSC_TRUE = Base.bitcast(PetscBool, Int32(1))\n\n@inline _petscbool_bits(x::PetscBool) = Base.bitcast(Int32, x)\n\nPetscBool(x::Bool) = convert(PetscBool, x)\n\nBase.convert(::Type{PetscBool}, x::Bool) = x ? PETSC_TRUE : PETSC_FALSE\nBase.convert(::Type{PetscBool}, x::PetscBool) = x\nBase.convert(::Type{PetscBool}, x::Integer) = x == 0 ? PETSC_FALSE : PETSC_TRUE\nBase.Bool(x::PetscBool) = _petscbool_bits(x) != 0\nBase.convert(::Type{Bool}, x::PetscBool) = Base.Bool(x)\nBase.convert(::Type{Int32}, x::PetscBool) = _petscbool_bits(x)\nBase.cconvert(::Type{PetscBool}, x::Bool) = convert(PetscBool, x)\nBase.cconvert(::Type{PetscBool}, x::PetscBool) = x\nBase.unsafe_convert(::Type{PetscBool}, x::PetscBool) = x\nBase.promote_rule(::Type{PetscBool}, ::Type{Bool}) = Bool\nBase.promote_rule(::Type{Bool}, ::Type{PetscBool}) = Bool\nBase.getindex(r::Base.RefValue{PetscBool}) = Bool(getfield(r, :x))\n\nBase.:(==)(x::PetscBool, y::PetscBool) = _petscbool_bits(x) == _petscbool_bits(y)\nBase.:(==)(x::PetscBool, y::Bool) = Bool(x) == y\nBase.:(==)(x::Bool, y::PetscBool) = x == Bool(y)\nBase.:(!)(x::PetscBool) = !Bool(x)\nBase.hash(x::PetscBool, h::UInt) = hash(Bool(x), h)\nBase.show(io::IO, x::PetscBool) = show(io, Bool(x))\nBase.zero(::Type{PetscBool}) = PETSC_FALSE\nBase.one(::Type{PetscBool}) = PETSC_TRUE\nBase.iszero(x::PetscBool) = !Bool(x)\nconst PetscLogDouble = Cdouble\nconst PetscObjectId = PetscInt64\nconst PetscObjectState = PetscInt64\nconst VecScatter = PetscSF\nconst VecScatterType = PetscSFType\nconst PetscLogEvent = Cint\nconst PetscLogStage = Cint\nconst PetscLogClass = Cint\n"
  },
  {
    "path": "src/deprecated/const.jl",
    "content": "# define common PETSc constants\n# this excludes configurable constants (e.g. PetscScalar) which are set in lib.jl\n\nconst PetscErrorCode      = Cint\n\nstruct PetscError <: Exception\n    code::PetscErrorCode\nend\n\nmacro chk(expr)\n    :((errcode = $(esc(expr))) == 0 || throw(PetscError(errcode)))\nend\n\nconst PETSC_DEFAULT = -2\nconst PETSC_DECIDE = PETSC_DETERMINE = -1\n\n@enum DMBoundaryType begin\n    DM_BOUNDARY_NONE=0\n    DM_BOUNDARY_GHOSTED=1\n    DM_BOUNDARY_MIRROR=2\n    DM_BOUNDARY_PERIODIC=3\n    DM_BOUNDARY_TWIST=4\nend\n\n@enum DMStagStencilType begin\n    DMSTAG_STENCIL_NONE\n    DMSTAG_STENCIL_STAR\n    DMSTAG_STENCIL_BOX\nend\n\n@enum PetscBool PETSC_FALSE PETSC_TRUE\n\n@enum PetscDataType begin\n    PETSC_DATATYPE_UNKNOWN  = 0\n    PETSC_DOUBLE            = 1\n    PETSC_COMPLEX           = 2\n    PETSC_LONG              = 3\n    PETSC_SHORT             = 4\n    PETSC_FLOAT             = 5\n    PETSC_CHAR              = 6\n    PETSC_BIT_LOGICAL       = 7\n    PETSC_ENUM              = 8\n    PETSC_BOOL              = 9\n    PETSC_FLOAT128          = 10\n    PETSC_OBJECT            = 11\n    PETSC_FUNCTION          = 12\n    PETSC_STRING            = 13\n    PETSC___FP16            = 14\n    PETSC_STRUCT            = 15\n    PETSC_INT               = 16\n    PETSC_INT64             = 17\nend\n\nconst Petsc64bitInt       = Int64\nconst PetscLogDouble      = Cdouble\n\n@enum InsertMode NOT_SET_VALUES INSERT_VALUES ADD_VALUES MAX_VALUES MIN_VALUES INSERT_ALL_VALUES ADD_ALL_VALUES INSERT_BC_VALUES ADD_BC_VALUES\n\n@enum MatOption begin\n    MAT_OPTION_MIN                  = -3\n    MAT_UNUSED_NONZERO_LOCATION_ERR = -2\n    MAT_ROW_ORIENTED                = -1\n    MAT_SYMMETRIC                   = 1\n    MAT_STRUCTURALLY_SYMMETRIC      = 2\n    MAT_FORCE_DIAGONAL_ENTRIES      = 3\n    MAT_IGNORE_OFF_PROC_ENTRIES     = 4\n    MAT_USE_HASH_TABLE              = 5\n    MAT_KEEP_NONZERO_PATTERN        = 6\n    MAT_IGNORE_ZERO_ENTRIES         = 7\n    MAT_USE_INODES                  = 8\n    MAT_HERMITIAN                   = 9\n    MAT_SYMMETRY_ETERNAL            = 10\n    MAT_NEW_NONZERO_LOCATION_ERR    = 11\n    MAT_IGNORE_LOWER_TRIANGULAR     = 12\n    MAT_ERROR_LOWER_TRIANGULAR      = 13\n    MAT_GETROW_UPPERTRIANGULAR      = 14\n    MAT_SPD                         = 15\n    MAT_NO_OFF_PROC_ZERO_ROWS       = 16\n    MAT_NO_OFF_PROC_ENTRIES         = 17\n    MAT_NEW_NONZERO_LOCATIONS       = 18\n    MAT_NEW_NONZERO_ALLOCATION_ERR  = 19\n    MAT_SUBSET_OFF_PROC_ENTRIES     = 20\n    MAT_SUBMAT_SINGLEIS             = 21\n    MAT_STRUCTURE_ONLY              = 22\n    MAT_SORTED_FULL                 = 23\n    MAT_FORM_EXPLICIT_TRANSPOSE     = 24\n    MAT_STRUCTURAL_SYMMETRY_ETERNAL = 25\n    MAT_SPD_ETERNAL                 = 26\n    MAT_OPTION_MAX                  = 27\nend\n\n@enum NormType begin\n    NORM_1 = 0\n    NORM_2 = 1\n    NORM_FROBENIUS = 2\n    NORM_INFINITY = 3\n    NORM_1_AND_2 = 4\nend\n\n@enum MatAssemblyType MAT_FLUSH_ASSEMBLY=1 MAT_FINAL_ASSEMBLY=0\n\n@enum MatFactorType begin\n    MAT_FACTOR_NONE     = 0\n    MAT_FACTOR_LU       = 1\n    MAT_FACTOR_CHOLESKY = 2\n    MAT_FACTOR_ILU      = 3\n    MAT_FACTOR_ICC      = 4\n    MAT_FACTOR_ILUDT    = 5\nend\n\n@enum PetscViewerFormat begin\n    PETSC_VIEWER_DEFAULT\n    PETSC_VIEWER_ASCII_MATLAB\n    PETSC_VIEWER_ASCII_MATHEMATICA\n    PETSC_VIEWER_ASCII_IMPL\n    PETSC_VIEWER_ASCII_INFO\n    PETSC_VIEWER_ASCII_INFO_DETAIL\n    PETSC_VIEWER_ASCII_COMMON\n    PETSC_VIEWER_ASCII_SYMMODU\n    PETSC_VIEWER_ASCII_INDEX\n    PETSC_VIEWER_ASCII_DENSE\n    PETSC_VIEWER_ASCII_MATRIXMARKET\n    PETSC_VIEWER_ASCII_VTK\n    PETSC_VIEWER_ASCII_VTK_CELL\n    PETSC_VIEWER_ASCII_VTK_COORDS\n    PETSC_VIEWER_ASCII_PCICE\n    PETSC_VIEWER_ASCII_PYTHON\n    PETSC_VIEWER_ASCII_FACTOR_INFO\n    PETSC_VIEWER_ASCII_LATEX\n    PETSC_VIEWER_ASCII_XML\n    PETSC_VIEWER_ASCII_GLVIS\n    PETSC_VIEWER_ASCII_CSV\n    PETSC_VIEWER_DRAW_BASIC\n    PETSC_VIEWER_DRAW_LG\n    PETSC_VIEWER_DRAW_LG_XRANGE\n    PETSC_VIEWER_DRAW_CONTOUR\n    PETSC_VIEWER_DRAW_PORTS\n    PETSC_VIEWER_VTK_VTS\n    PETSC_VIEWER_VTK_VTR\n    PETSC_VIEWER_VTK_VTU\n    PETSC_VIEWER_BINARY_MATLAB\n    PETSC_VIEWER_NATIVE\n    PETSC_VIEWER_HDF5_PETSC\n    PETSC_VIEWER_HDF5_VIZ\n    PETSC_VIEWER_HDF5_XDMF\n    PETSC_VIEWER_HDF5_MAT\n    PETSC_VIEWER_NOFORMAT\n    PETSC_VIEWER_LOAD_BALANCE\nend\n\n@enum MatOperation begin\n    MATOP_SET_VALUES=0\n    MATOP_GET_ROW=1\n    MATOP_RESTORE_ROW=2\n    MATOP_MULT=3\n    MATOP_MULT_ADD=4\n    MATOP_MULT_TRANSPOSE=5\n    MATOP_MULT_TRANSPOSE_ADD=6\n    MATOP_SOLVE=7\n    MATOP_SOLVE_ADD=8\n    MATOP_SOLVE_TRANSPOSE=9\n    MATOP_SOLVE_TRANSPOSE_ADD=10\nend \n\n@enum DMStagStencilLocation begin\n    DMSTAG_NULL_LOCATION=0\n    DMSTAG_BACK_DOWN_LEFT\n    DMSTAG_BACK_DOWN\n    DMSTAG_BACK_DOWN_RIGHT\n    DMSTAG_BACK_LEFT\n    DMSTAG_BACK\n    DMSTAG_BACK_RIGHT\n    DMSTAG_BACK_UP_LEFT\n    DMSTAG_BACK_UP\n    DMSTAG_BACK_UP_RIGHT\n    DMSTAG_DOWN_LEFT\n    DMSTAG_DOWN\n    DMSTAG_DOWN_RIGHT\n    DMSTAG_LEFT\n    DMSTAG_ELEMENT\n    DMSTAG_RIGHT\n    DMSTAG_UP_LEFT\n    DMSTAG_UP\n    DMSTAG_UP_RIGHT\n    DMSTAG_FRONT_DOWN_LEFT\n    DMSTAG_FRONT_DOWN\n    DMSTAG_FRONT_DOWN_RIGHT\n    DMSTAG_FRONT_LEFT\n    DMSTAG_FRONT\n    DMSTAG_FRONT_RIGHT\n    DMSTAG_FRONT_UP_LEFT\n    DMSTAG_FRONT_UP\n    DMSTAG_FRONT_UP_RIGHT\nend\n\n@enum DMDAStencilType begin\n  DMDA_STENCIL_STAR = 0\n  DMDA_STENCIL_BOX = 1\nend\n"
  },
  {
    "path": "src/deprecated/dm.jl",
    "content": "const CDM = Ptr{Cvoid}\nabstract type AbstractDM{PetscLib} end\n\nimport PETSc.LibPETSc: DMType, PetscViewer, ISColoringType, DMBlockingType, MPI_Datatype\nimport PETSc.LibPETSc: PetscObject, DMLabel, PetscMPIInt, PetscSection, DMField, PetscFE\nimport PETSc.LibPETSc: DMPointLocationType, VecScatter, VecType, MatType, MatFDColoring, DMReorderDefaultFlag,\n        MatOrderingType,PetscSF,PetscDS,PetscCopyMode,DMCopyLabelsMode,DMPolytopeType, IS\n\n\nmutable struct DM{PetscLib} <: AbstractDM{PetscLib}\n    ptr::CDM\n    opts::Options{PetscLib}\n    age::Int\nend\n\nmutable struct DMPtr{PetscLib} <: AbstractDM{PetscLib}\n    ptr::CDM\n    age::Int\n    own::Bool\nend\n\ninclude(\"./dm_wrapped.jl\")\n\nfunction destroy(dm::AbstractDM{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) &&\n       dm.age == getlib(PetscLib).age &&\n       dm.ptr != C_NULL &&\n       (!hasfield(typeof(dm), :own) || dm.own)\n        LibPETSc.DMDestroy(PetscLib, dm)\n    end\n    dm.ptr = C_NULL\n    return nothing\nend\n\n\n\n\"\"\"\n    setfromoptions!(dm::DM, opts=dm.opts)\n\n# External Links\n$(_doc_external(\"DM/DMSetFromOptions\"))\n\"\"\"\nfunction setfromoptions!(\n    dm::AbstractDM{PetscLib},\n    opts::Options = dm.opts,\n) where {PetscLib}\n    with(opts) do\n        LibPETSc.DMSetFromOptions(PetscLib, dm)\n    end\nend\n\n\"\"\"\n    setup!(dm::DM, opts=dm.opts)\n\n# External Links\n$(_doc_external(\"DM/DMSetUp\"))\n\"\"\"\nfunction setup!(\n    dm::AbstractDM{PetscLib},\n    opts::Options = dm.opts,\n) where {PetscLib}\n    with(opts) do\n        LibPETSc.DMSetUp(PetscLib, dm)\n    end\nend\n\n\"\"\"\n    gettype(dm::AbstractDM)\n\nGets type name of the `dm`\n\n# External Links\n$(_doc_external(\"DM/DMGetType\"))\n\"\"\"\ngettype(dm::AbstractDM{PetscLib}) where PetscLib = DMGetType(dm)\n\n#function gettype(dm::AbstractDM{PetscLib}) where {PetscLib}\n#    t_r = Ref{PETSc.DMType}()\n#    LibPETSc.DMGetType(PetscLib, dm, t_r)\n#    return unsafe_string(t_r[])\n#end\n\n\"\"\"\n    getdimension(dm::AbstractDM)\n\nReturn the topological dimension of the `dm`\n\n# External Links\n$(_doc_external(\"DM/DMGetDimension\"))\n\"\"\"\ngetdimension(dm::AbstractDM{PetscLib}) where PetscLib = DMGetDimension(dm)\n\n\n#function getdimension(dm::AbstractDM{PetscLib}) where {PetscLib}\n#    r_dim = Ref{PetscLib.PetscInt}()\n#    LibPETSc.DMGetDimension(PetscLib, dm, r_dim)\n#    return r_dim[]\n#end\n\n\"\"\"\n    MatAIJ(dm::AbstractDM)\n\nGenerates a matrix from the `dm` object.\n\n# External Links\n$(_doc_external(\"DM/DMCreateMatrix\"))\n\"\"\"\nfunction MatAIJ(dm::AbstractDM{PetscLib}) where {PetscLib}\n    mat = MatAIJ{PetscLib, PetscLib.PetscScalar}(C_NULL, getlib(PetscLib).age)\n\n    LibPETSc.DMCreateMatrix(PetscLib, dm, mat)\n\n    if MPI.Comm_size(getcomm(mat)) == 1\n        finalizer(destroy, mat)\n    end\n\n    return mat\nend\n\n\"\"\"\n    DMLocalVec(dm::AbstractDM)\n\nreturns a local vector from the `dm` object (has space for ghost).\n\n# External Links\n$(_doc_external(\"DM/DMCreateLocalVector\"))\n\"\"\"\nmutable struct DMLocalVec{PetscLib, PetscScalar, DMT <: AbstractDM} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    age::Int\n    dm::DMT\n    own::Bool\nend\nfunction DMLocalVec(dm::AbstractDM{PetscLib}) where {PetscLib}\n    petsclib = getlib(PetscLib)\n    PetscScalar = petsclib.PetscScalar\n    vec = DMLocalVec{PetscLib, PetscScalar, typeof(dm)}(\n        C_NULL,\n        petsclib.age,\n        dm,\n        true,\n    )\n\n    LibPETSc.DMCreateLocalVector(PetscLib, dm, vec)\n\n    if MPI.Comm_size(getcomm(vec)) == 1\n        finalizer(destroy, vec)\n    end\n\n    return vec\nend\n\n\"\"\"\n    DMGlobalVec(dm::AbstractDM)\n\nreturns a global vector from the `dm` object.\n\n# External Links\n$(_doc_external(\"DM/DMCreateGlobalVector\"))\n\"\"\"\nmutable struct DMGlobalVec{PetscLib, PetscScalar, DMT <: AbstractDM} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    age::Int\n    dm::DMT\n    own::Bool\nend\nfunction DMGlobalVec(dm::AbstractDM{PetscLib}) where {PetscLib}\n    petsclib = getlib(PetscLib)\n    PetscScalar = petsclib.PetscScalar\n    vec = DMGlobalVec{PetscLib, PetscScalar, typeof(dm)}(\n        C_NULL,\n        petsclib.age,\n        dm,\n        true,\n    )\n\n    LibPETSc.DMCreateGlobalVector(PetscLib, dm, vec)\n\n    if MPI.Comm_size(getcomm(vec)) == 1\n        finalizer(destroy, vec)\n    end\n\n    return vec\nend\n\n\"\"\"\n    update!(\n        local_vec::DMLocalVec,\n        global_vec::AbstractVec,\n        mode::InsertMode,\n    )\n\nUpdates `local_vec` from the `global_vec` with insert `mode`.\n\nCommunication and computation can be overlapped with [`updatebegin!`](@ref) and\n[`updateend!`](@ref)\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocal\"))\n$(_doc_external(\"DM/DMGlobalToLocalBegin\"))\n$(_doc_external(\"DM/DMGlobalToLocalEnd\"))\n\"\"\"\nfunction update!(\n    local_vec::DMLocalVec{PetscLib},\n    global_vec::AbstractVec,\n    mode::InsertMode,\n) where {PetscLib}\n    updatebegin!(local_vec, global_vec, mode)\n    return updateend!(local_vec, global_vec, mode)\nend\n\n\"\"\"\n    updatebegin!(\n        local_vec::DMLocalVec,\n        global_vec::AbstractVec,\n        mode::InsertMode,\n    )\n\nBegin update of `local_vec` from the `global_vec` with insert `mode`.\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalBegin\"))\n\"\"\"\nfunction updatebegin!(\n    local_vec::DMLocalVec{PetscLib},\n    global_vec::AbstractVec,\n    mode::InsertMode,\n) where {PetscLib}\n    LibPETSc.DMGlobalToLocalBegin(\n        PetscLib,\n        local_vec.dm,\n        global_vec,\n        mode,\n        local_vec,\n    )\n\n    return nothing\nend\n\n\"\"\"\n    updateend!(\n        local_vec::DMLocalVec,\n        global_vec::AbstractVec,\n        mode::InsertMode,\n    )\n\nEnd update of `local_vec` from the `global_vec` with insert `mode`.\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalEnd\"))\n\"\"\"\nfunction updateend!(\n    local_vec::DMLocalVec{PetscLib},\n    global_vec::AbstractVec,\n    mode::InsertMode,\n) where {PetscLib}\n    LibPETSc.DMGlobalToLocalEnd(\n        PetscLib,\n        local_vec.dm,\n        global_vec,\n        mode,\n        local_vec,\n    )\n\n    return local_vec\nend\n\n\"\"\"\n    update!(\n        global_vec::AbstractVec,\n        local_vec::DMLocalVec,\n        mode::InsertMode,\n    )\n\nUpdates `global_vec` from the `local_vec` with insert `mode`.\n\nCommunication and computation can be overlapped with [`updatebegin!`](@ref) and\n[`updateend!`](@ref)\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobal\"))\n$(_doc_external(\"DM/DMLocalToGlobalBegin\"))\n$(_doc_external(\"DM/DMLocalToGlobalEnd\"))\n\"\"\"\nfunction update!(\n    global_vec::AbstractVec,\n    local_vec::DMLocalVec{PetscLib},\n    mode::InsertMode,\n) where {PetscLib}\n    updatebegin!(global_vec, local_vec, mode)\n    return updateend!(global_vec, local_vec, mode)\nend\n\n\"\"\"\n    updatebegin!(\n        global_vec::AbstractVec,\n        local_vec::DMLocalVec,\n        mode::InsertMode,\n    )\n\nBegin update of `global_vec` from the `local_vec` with insert `mode`.\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalBegin\"))\n\"\"\"\nfunction updatebegin!(\n    global_vec::AbstractVec,\n    local_vec::DMLocalVec{PetscLib},\n    mode::InsertMode,\n) where {PetscLib}\n    LibPETSc.DMLocalToGlobalBegin(\n        PetscLib,\n        local_vec.dm,\n        local_vec,\n        mode,\n        global_vec,\n    )\n\n    return nothing\nend\n\n\"\"\"\n    updateend!(\n        global_vec::AbstractVec,\n        local_vec::DMLocalVec,\n        mode::InsertMode,\n    )\n\nEnd update of `global_vec` from the `local_vec` with insert `mode`.\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalEnd\"))\n\"\"\"\nfunction updateend!(\n    global_vec::AbstractVec,\n    local_vec::DMLocalVec{PetscLib},\n    mode::InsertMode,\n) where {PetscLib}\n    LibPETSc.DMLocalToGlobalEnd(\n        PetscLib,\n        local_vec.dm,\n        local_vec,\n        mode,\n        global_vec,\n    )\n\n    return local_vec\nend\n\n\"\"\"\n    getcoordinateDM(dm::AbstractDM)\n\nCreate a `coord_dm` for the coordinates of `dm`.\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateDM\"))\n\"\"\"\nfunction getcoordinateDM(dm::AbstractDM{PetscLib}) where {PetscLib}\n    coord_dm = empty(dm)\n    LibPETSc.DMGetCoordinateDM(PetscLib, dm, coord_dm)\n\n    if gettype(dm) == \"stag\"\n        @assert gettype(coord_dm) == \"product\"\n    else\n        @assert gettype(coord_dm) == gettype(dm)\n    end\n\n    if MPI.Comm_size(getcomm(coord_dm)) == 1\n        finalizer(destroy, coord_dm)\n    end\n\n    return coord_dm\nend\n\n\"\"\"\n    coordinatesDMLocalVec(dm::AbstractDM)\n\nGets a local vector with the coordinates associated with `dm`.\n\nNote that the returned vector is borrowed from the `dm` and is not a new vector.\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocal\"))\n\"\"\"\nfunction coordinatesDMLocalVec(dm::AbstractDM{PetscLib}) where {PetscLib}\n    petsclib = getlib(PetscLib)\n    PetscScalar = petsclib.PetscScalar\n    coord_vec = DMLocalVec{PetscLib, PetscScalar, typeof(dm)}(\n        C_NULL,\n        petsclib.age,\n        dm,\n        false,\n    )\n    LibPETSc.DMGetCoordinatesLocal(PetscLib, dm, coord_vec)\n\n    return coord_vec\nend\n\n\"\"\"\n    view(dm::AbstractDM, [viewer])\n\nview a `dm` with `viewer`\n\n# External Links\n$(_doc_external(\"DM/DMView\"))\n\"\"\"\nfunction view(\n    dm::AbstractDM{PetscLib},\n    viewer = LibPETSc.PETSC_VIEWER_STDOUT_(PetscLib, getcomm(dm)),\n) where {PetscLib}\n    LibPETSc.DMView(PetscLib, dm, viewer)\n    return nothing\nend\n"
  },
  {
    "path": "src/deprecated/dm_wrapped.jl",
    "content": "\"\"\"\n\t UNTESTED !!!\n\tnewdm = DMClone(dm::AbstractDM{PetscLib})\n\nCreates a `DM` object with the same topology as the original.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The original `DM` object\n\nOutput Parameter:\n===\n- `newdm` - The new `DM` object\n\nLevel: beginner\n\nNotes:\nFor some `DM` implementations this is a shallow clone, the result of which may share (reference counted) information with its parent. For example,\n`DMClone()` applied to a `DMPLEX` object will result in a new `DMPLEX` that shares the topology with the original `DMPLEX`. It does not\nshare the `PetscSection` of the original `DM`.\n\nThe clone is considered set up if the original has been set up.\n\nUse `DMConvert()` for a general way to create new `DM` from a given `DM`\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMCreate()`, `DMSetType()`, `DMSetLocalSection()`, `DMSetGlobalSection()`, `DMPLEX`, `DMConvert()`\n\n# External Links\n$(_doc_external(\"DM/DMClone\"))\n\"\"\"\nfunction DMClone(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tnewdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMClone(\n\t\tPetscLib,\n\t\tdm,\n\t\tnewdm,\n\t)\n\n\treturn newdm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetType(dm::AbstractDM{PetscLib},method::DMType)\n\nBuilds a `DM`, for a particular `DM` implementation.\n\nCollective\n\nInput Parameters:\n===\n- `dm`     - The `DM` object\n- `method` - The name of the `DMType`, for example `DMDA`, `DMPLEX`\n\nOptions Database Key:\n===\n- `-dm_type <type>` - Sets the `DM` type; use -help for a list of available types\n\nLevel: intermediate\n\nNote:\nOf the `DM` is constructed by directly calling a function to construct a particular `DM`, for example, `DMDACreate2d()` or `DMPlexCreateBoxMesh()`\n\nSee also: \n=== \n`DM`, `DMType`, `DMDA`, `DMPLEX`, `DMGetType()`, `DMCreate()`, `DMDACreate2d()`\n\n# External Links\n$(_doc_external(\"DM/DMSetType\"))\n\"\"\"\nfunction DMSetType(dm::AbstractDM{PetscLib},method::DMType) where {PetscLib}\n\n\tLibPETSc.DMSetType(\n\t\tPetscLib,\n\t\tdm,\n\t\tmethod,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\ttype = DMGetType(dm::AbstractDM{PetscLib})\n\nGets the `DM` type name (as a string) from the `DM`.\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `type` - The `DMType` name\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMType`, `DMDA`, `DMPLEX`, `DMSetType()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMGetType\"))\n\"\"\"\nfunction DMGetType(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tr_type = Ref{PETSc.DMType}()\n\n\tLibPETSc.DMGetType(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_type,\n\t)\n\n\n\ttype = unsafe_string(r_type[])\n\treturn type\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMView(dm::AbstractDM{PetscLib},v::PetscViewer)\n\nViews a `DM`. Depending on the `PetscViewer` and its `PetscViewerFormat` it may print some ASCII information about the `DM` to the screen or a file or\nsave the `DM` in a binary file to be loaded later or create a visualization of the `DM`\n\nCollective\n\nInput Parameters:\n===\n- `dm` - the `DM` object to view\n- `v`  - the viewer\n\nLevel: beginner\n\nNotes:\n\n`PetscViewer` = `PETSCVIEWERHDF5` i.e. HDF5 format can be used with `PETSC_VIEWER_HDF5_PETSC` as the `PetscViewerFormat` to save multiple `DMPLEX`\nmeshes in a single HDF5 file. This in turn requires one to name the `DMPLEX` object with `PetscObjectSetName()`\nbefore saving it with `DMView()` and before loading it with `DMLoad()` for identification of the mesh object.\n\n`PetscViewer` = `PETSCVIEWEREXODUSII` i.e. ExodusII format assumes that element blocks (mapped to \"Cell sets\" labels)\nconsists of sequentially numbered cells.\n\nIf `dm` has been distributed, only the part of the `DM` on MPI rank 0 (including \"ghost\" cells and vertices) will be written.\n\nOnly TRI, TET, QUAD, and HEX cells are supported.\n\n`DMPLEX` only represents geometry while most post-processing software expect that a mesh also provides information on the discretization space. This function assumes that the file represents Lagrange finite elements of order 1 or 2.\nThe order of the mesh shall be set using `PetscViewerExodusIISetOrder()`\n\nVariable names can be set and querried using `PetscViewerExodusII[Set/Get][Nodal/Zonal]VariableNames[s]`.\n\nSee also: \n=== \n`DM`, `PetscViewer`, `PetscViewerFormat`, `PetscViewerSetFormat()`, `DMDestroy()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMLoad()`, `PetscObjectSetName()`\n\n# External Links\n$(_doc_external(\"DM/DMView\"))\n\"\"\"\nfunction DMView(dm::AbstractDM{PetscLib},v::PetscViewer) where {PetscLib}\n\n\tLibPETSc.DMView(\n\t\tPetscLib,\n\t\tdm,\n\t\tv,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMLoad(newdm::AbstractDM{PetscLib},viewer::PetscViewer)\n\nLoads a DM that has been stored in binary  with `DMView()`.\n\nCollective\n\nInput Parameters:\n===\n- `newdm`  - the newly loaded `DM`, this needs to have been created with `DMCreate()` or\nsome related function before a call to `DMLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()` or\n`PETSCVIEWERHDF5` file viewer, obtained from `PetscViewerHDF5Open()`\n\nLevel: intermediate\n\nNotes:\nThe type is determined by the data in the file, any type set into the DM before this call is ignored.\n\nUsing `PETSCVIEWERHDF5` type with `PETSC_VIEWER_HDF5_PETSC` format, one can save multiple `DMPLEX`\nmeshes in a single HDF5 file. This in turn requires one to name the `DMPLEX` object with `PetscObjectSetName()`\nbefore saving it with `DMView()` and before loading it with `DMLoad()` for identification of the mesh object.\n\nSee also: \n=== \n`DM`, `PetscViewerBinaryOpen()`, `DMView()`, `MatLoad()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"DM/DMLoad\"))\n\"\"\"\nfunction DMLoad(newdm::AbstractDM{PetscLib},viewer::PetscViewer) where {PetscLib}\n\n\tLibPETSc.DMLoad(\n\t\tPetscLib,\n\t\tnewdm,\n\t\tviewer,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdm = DMDestroy()\n\nDestroys a `DM`.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM` object to destroy\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMType`, `DMSetType()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMDestroy\"))\n\"\"\"\nfunction DMDestroy(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tLibPETSc.DMDestroy(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn dm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvec = DMCreateGlobalVector(dm::AbstractDM{PetscLib})\n\nCreates a global vector from a `DM` object. A global vector is a parallel vector that has no duplicate values shared between MPI ranks,\nthat is it has no ghost locations.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameter:\n===\n- `vec` - the global vector\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `Vec`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`,\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateGlobalVector\"))\n\"\"\"\nfunction DMCreateGlobalVector(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tvec = CVec()\n\n\tLibPETSc.DMCreateGlobalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t)\n\n\treturn vec\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvec = DMCreateLocalVector(dm::AbstractDM{PetscLib})\n\nCreates a local vector from a `DM` object.\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameter:\n===\n- `vec` - the local vector\n\nLevel: beginner\n\nNote:\nA local vector usually has ghost locations that contain values that are owned by different MPI ranks. A global vector has no ghost locations.\n\nSee also: \n=== \n`DM`, `Vec`, `DMCreateGlobalVector()`, `DMGetLocalVector()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`\n`DMGlobalToLocalBegin()`, `DMGlobalToLocalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateLocalVector\"))\n\"\"\"\nfunction DMCreateLocalVector(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tvec = CVec()\n\n\tLibPETSc.DMCreateLocalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t)\n\n\treturn vec\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tg = DMGetLocalVector(dm::AbstractDM{PetscLib})\n\nGets a PETSc vector that may be used with the `DM` local routines. This vector has spaces for the ghost values.\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `g` - the local vector\n\nLevel: beginner\n\nNote:\nThe vector values are NOT initialized and may have garbage in them, so you may need\nto zero them.\n\nThe output parameter, `g`, is a regular PETSc vector that should be returned with\n`DMRestoreLocalVector()` DO NOT call `VecDestroy()` on it.\n\nThis is intended to be used for vectors you need for a short time, like within a single function call.\nFor vectors that you intend to keep around (for example in a C struct) or pass around large parts of your\ncode you should use `DMCreateLocalVector()`.\n\nVecStride*() operations can be useful when using `DM` with dof > 1\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMRestoreLocalVector()`,\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearLocalVectors()`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalVector\"))\n\"\"\"\nfunction DMGetLocalVector(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tg = CVec()\n\n\tLibPETSc.DMGetLocalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t)\n\n\treturn g\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tg = DMRestoreLocalVector(dm::AbstractDM{PetscLib})\n\nReturns a PETSc vector that was\nobtained from `DMGetLocalVector()`. Do not use with vector obtained via\n`DMCreateLocalVector()`.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - the `DM`\n- `g`  - the local vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMGetLocalVector()`, `DMClearLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreLocalVector\"))\n\"\"\"\nfunction DMRestoreLocalVector(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tg = CVec()\n\n\tLibPETSc.DMRestoreLocalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t)\n\n\treturn g\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tg = DMGetGlobalVector(dm::AbstractDM{PetscLib})\n\nGets a PETSc vector that may be used with the `DM` global routines.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `g` - the global vector\n\nLevel: beginner\n\nNote:\nThe vector values are NOT initialized and may have garbage in them, so you may need\nto zero them.\n\nThe output parameter, `g`, is a regular PETSc vector that should be returned with\n`DMRestoreGlobalVector()` DO NOT call `VecDestroy()` on it.\n\nThis is intended to be used for vectors you need for a short time, like within a single function call.\nFor vectors that you intend to keep around (for example in a C struct) or pass around large parts of your\ncode you should use `DMCreateGlobalVector()`.\n\nVecStride*() operations can be useful when using `DM` with dof > 1\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMRestoreLocalVector()`\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearGlobalVectors()`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetGlobalVector\"))\n\"\"\"\nfunction DMGetGlobalVector(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tg = CVec()\n\n\tLibPETSc.DMGetGlobalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t)\n\n\treturn g\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tg = DMRestoreGlobalVector(dm::AbstractDM{PetscLib})\n\nReturns a PETSc vector that\nobtained from `DMGetGlobalVector()`. Do not use with vector obtained via\n`DMCreateGlobalVector()`.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - the `DM`\n- `g`  - the global vector\n\nLevel: beginner\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToGlobalBegin()`,\n`DMGlobalToGlobalEnd()`, `DMGlobalToGlobal()`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMClearGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreGlobalVector\"))\n\"\"\"\nfunction DMRestoreGlobalVector(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tg = CVec()\n\n\tLibPETSc.DMRestoreGlobalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t)\n\n\treturn g\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearGlobalVectors(dm::AbstractDM{PetscLib})\n\nDestroys all the global vectors that have been created for `DMGetGlobalVector()` calls in this `DM`\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMCreateGlobalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMGlobalToLocalBegin()`,\n`DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMCreateLocalVector()`, `DMRestoreLocalVector()`\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearGlobalVectors\"))\n\"\"\"\nfunction DMClearGlobalVectors(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMClearGlobalVectors(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearLocalVectors(dm::AbstractDM{PetscLib})\n\nDestroys all the local vectors that have been created for `DMGetLocalVector()` calls in this `DM`\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMCreateLocalVector()`, `VecDuplicate()`, `VecDuplicateVecs()`,\n`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMLocalToLocalBegin()`,\n`DMLocalToLocalEnd()`, `DMRestoreLocalVector()`\n`VecStrideMax()`, `VecStrideMin()`, `VecStrideNorm()`, `DMClearGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearLocalVectors\"))\n\"\"\"\nfunction DMClearLocalVectors(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMClearLocalVectors(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearNamedGlobalVectors(dm::AbstractDM{PetscLib})\n\nDestroys all the named global vectors that have been created with `DMGetNamedGlobalVector()` in this `DM`\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`, `DMClearNamedLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearNamedGlobalVectors\"))\n\"\"\"\nfunction DMClearNamedGlobalVectors(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMClearNamedGlobalVectors(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearNamedLocalVectors(dm::AbstractDM{PetscLib})\n\nDestroys all the named local vectors that have been created with `DMGetNamedLocalVector()` in this `DM`\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMGetNamedLocalVector()`, `DMClearNamedGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMClearNamedLocalVectors\"))\n\"\"\"\nfunction DMClearNamedLocalVectors(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMClearNamedLocalVectors(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\texists = DMHasNamedGlobalVector(dm::AbstractDM{PetscLib},name::Vector{Char})\n\ncheck for a named, persistent global vector created with `DMGetNamedGlobalVector()`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `Vec`\n\nOutput Parameter:\n===\n- `exists` - true if the vector was previously created\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`, `DMClearNamedGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMHasNamedGlobalVector\"))\n\"\"\"\nfunction DMHasNamedGlobalVector(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\texists = Ref{PetscBool}()\n\n\tLibPETSc.DMHasNamedGlobalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\texists,\n\t)\n\n\treturn exists[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tX = DMGetNamedGlobalVector(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nget access to a named, persistent global vector\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `X`\n\nOutput Parameter:\n===\n- `X` - named `Vec`\n\nLevel: developer\n\nNote:\nIf a `Vec` with the given name does not exist, it is created.\n\n-seealso: `DM`, `DMRestoreNamedGlobalVector()`, `DMHasNamedGlobalVector()`, `DMClearNamedGlobalVectors()`, `DMGetGlobalVector()`, `DMGetLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNamedGlobalVector\"))\n\"\"\"\nfunction DMGetNamedGlobalVector(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tX = CVec()\n\n\tLibPETSc.DMGetNamedGlobalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tX,\n\t)\n\n\treturn X\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tX = DMRestoreNamedGlobalVector(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nrestore access to a named, persistent global vector\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - `DM` on which `X` was gotten\n- `name` - name under which `X` was gotten\n- `X`    - `Vec` to restore\n\nLevel: developer\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMClearNamedGlobalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreNamedGlobalVector\"))\n\"\"\"\nfunction DMRestoreNamedGlobalVector(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tX = CVec()\n\n\tLibPETSc.DMRestoreNamedGlobalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tX,\n\t)\n\n\treturn X\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\texists = DMHasNamedLocalVector(dm::AbstractDM{PetscLib},name::Vector{Char})\n\ncheck for a named, persistent local vector created with `DMGetNamedLocalVector()`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `Vec`\n\nOutput Parameter:\n===\n- `exists` - true if the vector was previously created\n\nLevel: developer\n\nNote:\nIf a `Vec` with the given name does not exist, it is created.\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`, `DMClearNamedLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMHasNamedLocalVector\"))\n\"\"\"\nfunction DMHasNamedLocalVector(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\texists = Ref{PetscBool}()\n\n\tLibPETSc.DMHasNamedLocalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\texists,\n\t)\n\n\treturn exists[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tX = DMGetNamedLocalVector(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nget access to a named, persistent local vector\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - `DM` to hold named vectors\n- `name` - unique name for `X`\n\nOutput Parameter:\n===\n- `X` - named `Vec`\n\nLevel: developer\n\nNote:\nIf a `Vec` with the given name does not exist, it is created.\n\n-seealso: `DM`, `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`, `DMHasNamedLocalVector()`, `DMClearNamedLocalVectors()`, `DMGetGlobalVector()`, `DMGetLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNamedLocalVector\"))\n\"\"\"\nfunction DMGetNamedLocalVector(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tX = CVec()\n\n\tLibPETSc.DMGetNamedLocalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tX,\n\t)\n\n\treturn X\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tX = DMRestoreNamedLocalVector(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nrestore access to a named, persistent local vector obtained with `DMGetNamedLocalVector()`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - `DM` on which `X` was gotten\n- `name` - name under which `X` was gotten\n- `X`    - `Vec` to restore\n\nLevel: developer\n\n-seealso: `DM`, `DMRestoreNamedGlobalVector()`, `DMGetNamedLocalVector()`, `DMClearNamedLocalVectors()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreNamedLocalVector\"))\n\"\"\"\nfunction DMRestoreNamedLocalVector(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tX = CVec()\n\n\tLibPETSc.DMRestoreNamedLocalVector(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tX,\n\t)\n\n\treturn X\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tltog = DMGetLocalToGlobalMapping(dm::AbstractDM{PetscLib})\n\nAccesses the local\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM` that provides the mapping\n\nOutput Parameter:\n===\n- `ltog` - the mapping\n\nLevel: advanced\n\nNotes:\nThe global to local mapping allows one to set values into the global vector or matrix using `VecSetValuesLocal()` and `MatSetValuesLocal()`\n\nVectors obtained with  `DMCreateGlobalVector()` and matrices obtained with `DMCreateMatrix()` already contain the global mapping so you do\nneed to use this function with those objects.\n\nThis mapping can then be used by `VecSetLocalToGlobalMapping()` or `MatSetLocalToGlobalMapping()`.\n\nSee also: \n=== \n`DM`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`, `VecSetLocalToGlobalMapping()`, `MatSetLocalToGlobalMapping()`,\n`DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalToGlobalMapping\"))\n\"\"\"\nfunction DMGetLocalToGlobalMapping(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tltog = LibPETSc.ISLocalToGlobalMapping()\n\n\tLibPETSc.DMGetLocalToGlobalMapping(\n\t\tPetscLib,\n\t\tdm,\n\t\tltog,\n\t)\n\n\treturn ltog\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tbs = DMGetBlockSize(dm::AbstractDM{PetscLib})\n\nGets the inherent block size associated with a `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` with block structure\n\nOutput Parameter:\n===\n- `bs` - the block size, 1 implies no exploitable block structure\n\nLevel: intermediate\n\nNotes:\nThis might be the number of degrees of freedom at each grid point for a structured grid.\n\nComplex `DM` that represent multiphysics or staggered grids or mixed-methods do not generally have a single inherent block size, but\nrather different locations in the vectors may have a different block size.\n\nSee also: \n=== \n`DM`, `ISCreateBlock()`, `VecSetBlockSize()`, `MatSetBlockSize()`, `DMGetLocalToGlobalMapping()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBlockSize\"))\n\"\"\"\nfunction DMGetBlockSize(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tbs = [PetscInt(1)]\n\n\tLibPETSc.DMGetBlockSize(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(bs,1),\n\t)\n\n\treturn bs[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tcoloring = DMCreateColoring(dm::AbstractDM{PetscLib},ctype::ISColoringType)\n\nGets coloring of a graph associated with the `DM`. Often the graph represents the operator matrix associated with the discretization\nof a PDE on the `DM`.\n\nCollective\n\nInput Parameters:\n===\n- `dm`    - the `DM` object\n- `ctype` - `IS_COLORING_LOCAL` or `IS_COLORING_GLOBAL`\n\nOutput Parameter:\n===\n- `coloring` - the coloring\n\nLevel: developer\n\nNotes:\nColoring of matrices can also be computed directly from the sparse matrix nonzero structure via the `MatColoring` object or from the mesh from which the\nmatrix comes from (what this function provides). In general using the mesh produces a more optimal coloring (fewer colors).\n\nThis produces a coloring with the distance of 2, see `MatSetColoringDistance()` which can be used for efficiently computing Jacobians with `MatFDColoringCreate()`\nFor `DMDA` in three dimensions with periodic boundary conditions the number of grid points in each dimension must be divisible by 2*stencil_width + 1,\notherwise an error will be generated.\n\nSee also: \n=== \n`DM`, `ISColoring`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatType()`, `MatColoring`, `MatFDColoringCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateColoring\"))\n\"\"\"\nfunction DMCreateColoring(dm::AbstractDM{PetscLib},ctype::ISColoringType) where {PetscLib}\n\tcoloring = LibPETSc.ISColoring()\n\n\tLibPETSc.DMCreateColoring(\n\t\tPetscLib,\n\t\tdm,\n\t\tctype,\n\t\tcoloring,\n\t)\n\n\treturn coloring\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetMatrixPreallocateSkip(dm::AbstractDM{PetscLib},skip::PetscBool)\n\nWhen `DMCreateMatrix()` is called the matrix sizes and\n`ISLocalToGlobalMapping` will be properly set, but the data structures to store values in the\nmatrices will not be preallocated.\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM`\n- `skip` - `PETSC_TRUE` to skip preallocation\n\nLevel: developer\n\nNote:\nThis is most useful to reduce initialization costs when `MatSetPreallocationCOO()` and\n`MatSetValuesCOO()` will be used.\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `DMSetMatrixStructureOnly()`, `DMSetMatrixPreallocateOnly()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatrixPreallocateSkip\"))\n\"\"\"\nfunction DMSetMatrixPreallocateSkip(dm::AbstractDM{PetscLib},skip::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetMatrixPreallocateSkip(\n\t\tPetscLib,\n\t\tdm,\n\t\tskip,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetMatrixPreallocateOnly(dm::AbstractDM{PetscLib},only::PetscBool)\n\nWhen `DMCreateMatrix()` is called the matrix will be properly\npreallocated but the nonzero structure and zero values will not be set.\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM`\n- `only` - `PETSC_TRUE` if only want preallocation\n\nOptions Database Key:\n===\n- `-dm_preallocate_only` - Only preallocate the matrix for `DMCreateMatrix()`, `DMCreateMassMatrix()`, but do not fill it with zeros\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixStructureOnly()`, `DMSetMatrixPreallocateSkip()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatrixPreallocateOnly\"))\n\"\"\"\nfunction DMSetMatrixPreallocateOnly(dm::AbstractDM{PetscLib},only::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetMatrixPreallocateOnly(\n\t\tPetscLib,\n\t\tdm,\n\t\tonly,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetMatrixStructureOnly(dm::AbstractDM{PetscLib},only::PetscBool)\n\nWhen `DMCreateMatrix()` is called, the matrix structure will be created\nbut the array for numerical values will not be allocated.\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM`\n- `only` - `PETSC_TRUE` if you only want matrix structure\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `DMSetMatrixPreallocateOnly()`, `DMSetMatrixPreallocateSkip()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatrixStructureOnly\"))\n\"\"\"\nfunction DMSetMatrixStructureOnly(dm::AbstractDM{PetscLib},only::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetMatrixStructureOnly(\n\t\tPetscLib,\n\t\tdm,\n\t\tonly,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetBlockingType(dm::AbstractDM{PetscLib},btype::DMBlockingType)\n\nset the blocking granularity to be used for variable block size `DMCreateMatrix()` is called\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`    - the `DM`\n- `btype` - block by topological point or field node\n\nOptions Database Key:\n===\n- `-dm_blocking_type [topological_point, field_node]` - use topological point blocking or field node blocking\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"DM/DMSetBlockingType\"))\n\"\"\"\nfunction DMSetBlockingType(dm::AbstractDM{PetscLib},btype::DMBlockingType) where {PetscLib}\n\n\tLibPETSc.DMSetBlockingType(\n\t\tPetscLib,\n\t\tdm,\n\t\tbtype,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tbtype = DMGetBlockingType(dm::AbstractDM{PetscLib})\n\nget the blocking granularity to be used for variable block size `DMCreateMatrix()` is called\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `btype` - block by topological point or field node\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCreateMatrix()`, `MatSetVariableBlockSizes()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBlockingType\"))\n\"\"\"\nfunction DMGetBlockingType(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tbtype = LibPETSc.DMBlockingType()\n\n\tLibPETSc.DMGetBlockingType(\n\t\tPetscLib,\n\t\tdm,\n\t\tbtype,\n\t)\n\n\treturn btype\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmat,vec = DMCreateInterpolation(dmc::AbstractDM{PetscLib},dmf::AbstractDM{PetscLib})\n\nGets the interpolation matrix between two `DM` objects. The resulting matrix map degrees of freedom in the vector obtained by\n`DMCreateGlobalVector()` on the coarse `DM` to similar vectors on the fine grid `DM`.\n\nCollective\n\nInput Parameters:\n===\n- `dmc` - the `DM` object\n- `dmf` - the second, finer `DM` object\n\nOutput Parameters:\n===\n- `mat` - the interpolation\n- `vec` - the scaling (optional, pass `NULL` if not needed), see `DMCreateInterpolationScale()`\n\nLevel: developer\n\nNotes:\nFor `DMDA` objects this only works for \"uniform refinement\", that is the refined mesh was obtained `DMRefine()` or the coarse mesh was obtained by\nDMCoarsen(). The coordinates set into the `DMDA` are completely ignored in computing the interpolation.\n\nFor `DMDA` objects you can use this interpolation (more precisely the interpolation from the `DMGetCoordinateDM()`) to interpolate the mesh coordinate\nvectors EXCEPT in the periodic case where it does not make sense since the coordinate vectors are not periodic.\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateRestriction()`, `DMCreateInterpolationScale()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateInterpolation\"))\n\"\"\"\nfunction DMCreateInterpolation(dmc::AbstractDM{PetscLib},dmf::AbstractDM{PetscLib}) where {PetscLib}\n\tvec = CVec()\n\n\tLibPETSc.DMCreateInterpolation(\n\t\tPetscLib,\n\t\tdmc,\n\t\tdmf,\n\t\tmat,\n\t\tvec,\n\t)\n\n\treturn mat,vec\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmat = DMCreateRestriction(dmc::AbstractDM{PetscLib},dmf::AbstractDM{PetscLib})\n\nGets restriction matrix between two `DM` objects. The resulting matrix map degrees of freedom in the vector obtained by\n`DMCreateGlobalVector()` on the fine `DM` to similar vectors on the coarse grid `DM`.\n\nCollective\n\nInput Parameters:\n===\n- `dmc` - the `DM` object\n- `dmf` - the second, finer `DM` object\n\nOutput Parameter:\n===\n- `mat` - the restriction\n\nLevel: developer\n\nNote:\nThis only works for `DMSTAG`. For many situations either the transpose of the operator obtained with `DMCreateInterpolation()` or that\nmatrix multiplied by the vector obtained with `DMCreateInterpolationScale()` provides the desired object.\n\nSee also: \n=== \n`DM`, `DMRestrict()`, `DMInterpolate()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateRestriction\"))\n\"\"\"\nfunction DMCreateRestriction(dmc::AbstractDM{PetscLib},dmf::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCreateRestriction(\n\t\tPetscLib,\n\t\tdmc,\n\t\tdmf,\n\t\tmat,\n\t)\n\n\treturn mat\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmat = DMCreateInjection(dac::AbstractDM{PetscLib},daf::AbstractDM{PetscLib})\n\nGets injection matrix between two `DM` objects.\n\nCollective\n\nInput Parameters:\n===\n- `dac` - the `DM` object\n- `daf` - the second, finer `DM` object\n\nOutput Parameter:\n===\n- `mat` - the injection\n\nLevel: developer\n\nNotes:\nThis is an operator that applied to a vector obtained with `DMCreateGlobalVector()` on the\nfine grid maps the values to a vector on the vector on the coarse `DM` by simply selecting\nthe values on the coarse grid points. This compares to the operator obtained by\n`DMCreateRestriction()` or the transpose of the operator obtained by\n`DMCreateInterpolation()` that uses a \"local weighted average\" of the values around the\ncoarse grid point as the coarse grid value.\n\nFor `DMDA` objects this only works for \"uniform refinement\", that is the refined mesh was obtained `DMRefine()` or the coarse mesh was obtained by\n`DMCoarsen()`. The coordinates set into the `DMDA` are completely ignored in computing the injection.\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMCreateInterpolation()`,\n`DMCreateRestriction()`, `MatRestrict()`, `MatInterpolate()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateInjection\"))\n\"\"\"\nfunction DMCreateInjection(dac::AbstractDM{PetscLib},daf::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCreateInjection(\n\t\tPetscLib,\n\t\tdac,\n\t\tdaf,\n\t\tmat,\n\t)\n\n\treturn mat\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmat = DMCreateMassMatrix(dmc::AbstractDM{PetscLib},dmf::AbstractDM{PetscLib})\n\nGets the mass matrix between two `DM` objects, Mᵢⱼ = ∫ϕᵢϕⱼ\t where the ϕ are Galerkin basis functions for a\na Galerkin finite element model on the `DM`\n\nCollective\n\nInput Parameters:\n===\n- `dmc` - the target `DM` object\n- `dmf` - the source `DM` object, can be `NULL`\n\nOutput Parameter:\n===\n- `mat` - the mass matrix\n\nLevel: developer\n\nNotes:\nFor `DMPLEX` the finite element model for the `DM` must have been already provided.\n\nif `dmc` is `dmf` or `NULL`, then x^t M x is an approximation to the L2 norm of the vector x which is obtained by `DMCreateGlobalVector()`\n\nSee also: \n=== \n`DM`, `DMCreateMassMatrixLumped()`, `DMCreateMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateRestriction()`, `DMCreateInterpolation()`, `DMCreateInjection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateMassMatrix\"))\n\"\"\"\nfunction DMCreateMassMatrix(dmc::AbstractDM{PetscLib},dmf::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCreateMassMatrix(\n\t\tPetscLib,\n\t\tdmc,\n\t\tdmf,\n\t\tmat,\n\t)\n\n\treturn mat\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tllm,lm = DMCreateMassMatrixLumped(dm::AbstractDM{PetscLib})\n\nGets the lumped mass matrix for a given `DM`\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameters:\n===\n- `llm` - the local lumped mass matrix, which is a diagonal matrix, represented as a vector\n- `lm`  - the global lumped mass matrix, which is a diagonal matrix, represented as a vector\n\nLevel: developer\n\nNote:\nSee `DMCreateMassMatrix()` for how to create the non-lumped version of the mass matrix.\n\nSee also: \n=== \n`DM`, `DMCreateMassMatrix()`, `DMCreateMatrix()`, `DMRefine()`, `DMCoarsen()`, `DMCreateRestriction()`, `DMCreateInterpolation()`, `DMCreateInjection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateMassMatrixLumped\"))\n\"\"\"\nfunction DMCreateMassMatrixLumped(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tllm = CVec()\n\tlm = CVec()\n\n\tLibPETSc.DMCreateMassMatrixLumped(\n\t\tPetscLib,\n\t\tdm,\n\t\tllm,\n\t\tlm,\n\t)\n\n\treturn llm,lm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmem = DMGetWorkArray(dm::AbstractDM{PetscLib},count::Int,dtype::MPI_Datatype)\n\nGets a work array guaranteed to be at least the input size, restore with `DMRestoreWorkArray()`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - the `DM` object\n- `count` - The minimum size\n- `dtype` - MPI data type, often `MPIU_REAL`, `MPIU_SCALAR`, or `MPIU_INT`)\n\nOutput Parameter:\n===\n- `mem` - the work array\n\nLevel: developer\n\nNotes:\nA `DM` may stash the array between instantiations so using this routine may be more efficient than calling `PetscMalloc()`\n\nThe array may contain nonzero values\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMCreate()`, `DMRestoreWorkArray()`, `PetscMalloc()`\n\n# External Links\n$(_doc_external(\"DM/DMGetWorkArray\"))\n\"\"\"\nfunction DMGetWorkArray(dm::AbstractDM{PetscLib},count::Int,dtype::MPI_Datatype) where {PetscLib}\n\tFloat64 = PetscLib.Float64\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_mem = PETSc_RefPtr(dims, Float64)\n\n\tLibPETSc.DMGetWorkArray(\n\t\tPetscLib,\n\t\tdm,\n\t\tcount,\n\t\tdtype,\n\t\tr_mem,\n\t)\n\n\tmem = PETSc_unsafe_wrap(r_mem, dims; own=false)\n\n\treturn mem\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmem = DMRestoreWorkArray(dm::AbstractDM{PetscLib},count::Int,dtype::MPI_Datatype)\n\nRestores a work array obtained with `DMCreateWorkArray()`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - the `DM` object\n- `count` - The minimum size\n- `dtype` - MPI data type, often `MPIU_REAL`, `MPIU_SCALAR`, `MPIU_INT`\n\nOutput Parameter:\n===\n- `mem` - the work array\n\nLevel: developer\n\nDeveloper Note:\ncount and dtype are ignored, they are only needed for `DMGetWorkArray()`\n\nSee also: \n=== \n`DM`, `DMDestroy()`, `DMCreate()`, `DMGetWorkArray()`\n\n# External Links\n$(_doc_external(\"DM/DMRestoreWorkArray\"))\n\"\"\"\nfunction DMRestoreWorkArray(dm::AbstractDM{PetscLib},count::Int,dtype::MPI_Datatype) where {PetscLib}\n\tFloat64 = PetscLib.Float64\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_mem = PETSc_RefPtr(dims, Float64)\n\n\tLibPETSc.DMRestoreWorkArray(\n\t\tPetscLib,\n\t\tdm,\n\t\tcount,\n\t\tdtype,\n\t\tr_mem,\n\t)\n\n\tmem = PETSc_unsafe_wrap(r_mem, dims; own=false)\n\n\treturn mem\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tcdm = DMGetCoarseDM(dm::AbstractDM{PetscLib})\n\nGet the coarse `DM`from which this `DM` was obtained by refinement\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameter:\n===\n- `cdm` - The coarse `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetCoarseDM()`, `DMCoarsen()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoarseDM\"))\n\"\"\"\nfunction DMGetCoarseDM(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tcdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMGetCoarseDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tcdm,\n\t)\n\n\treturn cdm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoarseDM(dm::AbstractDM{PetscLib},cdm::AbstractDM{PetscLib})\n\nSet the coarse `DM` from which this `DM` was obtained by refinement\n\nInput Parameters:\n===\n- `dm`  - The `DM` object\n- `cdm` - The coarse `DM`\n\nLevel: intermediate\n\nNote:\nNormally this is set automatically by `DMRefine()`\n\nSee also: \n=== \n`DM`, `DMGetCoarseDM()`, `DMCoarsen()`, `DMSetRefine()`, `DMSetFineDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoarseDM\"))\n\"\"\"\nfunction DMSetCoarseDM(dm::AbstractDM{PetscLib},cdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMSetCoarseDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tcdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfdm = DMGetFineDM(dm::AbstractDM{PetscLib})\n\nGet the fine mesh from which this `DM` was obtained by coarsening\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameter:\n===\n- `fdm` - The fine `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetFineDM()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMGetFineDM\"))\n\"\"\"\nfunction DMGetFineDM(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tfdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMGetFineDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tfdm,\n\t)\n\n\treturn fdm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetFineDM(dm::AbstractDM{PetscLib},fdm::AbstractDM{PetscLib})\n\nSet the fine mesh from which this was obtained by coarsening\n\nInput Parameters:\n===\n- `dm`  - The `DM` object\n- `fdm` - The fine `DM`\n\nLevel: developer\n\nNote:\nNormally this is set automatically by `DMCoarsen()`\n\nSee also: \n=== \n`DM`, `DMGetFineDM()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMSetFineDM\"))\n\"\"\"\nfunction DMSetFineDM(dm::AbstractDM{PetscLib},fdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMSetFineDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tfdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMRefineHierarchy(dm::AbstractDM{PetscLib},nlevels::Int,dmf::Vector{DM})\n\nRefines a `DM` object, all levels at once\n\nCollective\n\nInput Parameters:\n===\n- `dm`      - the `DM` object\n- `nlevels` - the number of levels of refinement\n\nOutput Parameter:\n===\n- `dmf` - the refined `DM` hierarchy\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMCoarsenHierarchy()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMRefineHierarchy\"))\n\"\"\"\nfunction DMRefineHierarchy(dm::AbstractDM{PetscLib},nlevels::Int,dmf::Vector{DM}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMRefineHierarchy(\n\t\tPetscLib,\n\t\tdm,\n\t\tnlevels,\n\t\tdmf,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCoarsenHierarchy(dm::AbstractDM{PetscLib},nlevels::Int,dmc::Vector{DM})\n\nCoarsens a `DM` object, all levels at once\n\nCollective\n\nInput Parameters:\n===\n- `dm`      - the `DM` object\n- `nlevels` - the number of levels of coarsening\n\nOutput Parameter:\n===\n- `dmc` - the coarsened `DM` hierarchy\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMRefineHierarchy()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMCoarsenHierarchy\"))\n\"\"\"\nfunction DMCoarsenHierarchy(dm::AbstractDM{PetscLib},nlevels::Int,dmc::Vector{DM}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMCoarsenHierarchy(\n\t\tPetscLib,\n\t\tdm,\n\t\tnlevels,\n\t\tdmc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMRestrict(fine::AbstractDM{PetscLib},restrct::AbstractMatrix,rscale::AbstractVector,inject::AbstractMatrix,coarse::AbstractDM{PetscLib})\n\nrestricts user\n\nCollective if any hooks are\n\nInput Parameters:\n===\n- `fine`    - finer `DM` from which the data is obtained\n- `restrct` - restriction matrix, apply using `MatRestrict()`, usually the transpose of the interpolation\n- `rscale`  - scaling vector for restriction\n- `inject`  - injection matrix, also use `MatRestrict()`\n- `coarse`  - coarser `DM` to update\n\nLevel: developer\n\nDeveloper Note:\nThough this routine is called `DMRestrict()` the hooks are added with `DMCoarsenHookAdd()`, a consistent terminology would be better\n\nSee also: \n=== \n`DM`, `DMCoarsenHookAdd()`, `MatRestrict()`, `DMInterpolate()`, `DMRefineHookAdd()`\n\n# External Links\n$(_doc_external(\"DM/DMRestrict\"))\n\"\"\"\nfunction DMRestrict(fine::AbstractDM{PetscLib},restrct::AbstractMatrix,rscale::AbstractVector,inject::AbstractMatrix,coarse::AbstractDM{PetscLib}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMRestrict(\n\t\tPetscLib,\n\t\tfine,\n\t\trestrct,\n\t\trscale,\n\t\tinject,\n\t\tcoarse,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMInterpolate(coarse::AbstractDM{PetscLib},interp::AbstractMatrix,fine::AbstractDM{PetscLib})\n\ninterpolates user\n\nCollective if any hooks are\n\nInput Parameters:\n===\n- `coarse` - coarser `DM` to use as a base\n- `interp` - interpolation matrix, apply using `MatInterpolate()`\n- `fine`   - finer `DM` to update\n\nLevel: developer\n\nDeveloper Note:\nThis routine is called `DMInterpolate()` while the hook is called `DMRefineHookAdd()`. It would be better to have an\nan API with consistent terminology.\n\nSee also: \n=== \n`DM`, `DMRefineHookAdd()`, `MatInterpolate()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolate\"))\n\"\"\"\nfunction DMInterpolate(coarse::AbstractDM{PetscLib},interp::AbstractMatrix,fine::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMInterpolate(\n\t\tPetscLib,\n\t\tcoarse,\n\t\tinterp,\n\t\tfine,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMInterpolateSolution(coarse::AbstractDM{PetscLib},fine::AbstractDM{PetscLib},interp::AbstractMatrix,coarseSol::AbstractVector,fineSol::AbstractVector)\n\nInterpolates a solution from a coarse mesh to a fine mesh.\n\nCollective\n\nInput Parameters:\n===\n- `coarse`    - coarse `DM`\n- `fine`      - fine `DM`\n- `interp`    - (optional) the matrix computed by `DMCreateInterpolation()`.  Implementations may not need this, but if it\nis available it can avoid some recomputation.  If it is provided, `MatInterpolate()` will be used if\nthe coarse `DM` does not have a specialized implementation.\n- `coarseSol` - solution on the coarse mesh\n\nOutput Parameter:\n===\n- `fineSol` - the interpolation of coarseSol to the fine mesh\n\nLevel: developer\n\nNote:\nThis function exists because the interpolation of a solution vector between meshes is not always a linear\nmap.  For example, if a boundary value problem has an inhomogeneous Dirichlet boundary condition that is compressed\nout of the solution vector.  Or if interpolation is inherently a nonlinear operation, such as a method using\nslope-limiting reconstruction.\n\nDeveloper Note:\nThis doesn't just interpolate \"solutions\" so its API name is questionable.\n\nSee also: \n=== \n`DM`, `DMInterpolate()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMInterpolateSolution\"))\n\"\"\"\nfunction DMInterpolateSolution(coarse::AbstractDM{PetscLib},fine::AbstractDM{PetscLib},interp::AbstractMatrix,coarseSol::AbstractVector,fineSol::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMInterpolateSolution(\n\t\tPetscLib,\n\t\tcoarse,\n\t\tfine,\n\t\tinterp,\n\t\tcoarseSol,\n\t\tfineSol,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdme = DMExtrude(dm::AbstractDM{PetscLib},layers::Int)\n\nExtrude a `DM` object from a surface\n\nCollective\n\nInput Parameters:\n===\n- `dm`     - the `DM` object\n- `layers` - the number of extruded cell layers\n\nOutput Parameter:\n===\n- `dme` - the extruded `DM`, or `NULL`\n\nLevel: developer\n\nNote:\nIf no extrusion was done, the return value is `NULL`\n\nSee also: \n=== \n`DM`, `DMRefine()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMExtrude\"))\n\"\"\"\nfunction DMExtrude(dm::AbstractDM{PetscLib},layers::Int) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tdme = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMExtrude(\n\t\tPetscLib,\n\t\tdm,\n\t\tlayers,\n\t\tdme,\n\t)\n\n\treturn dme\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetFromOptions(dm::AbstractDM{PetscLib})\n\nsets parameters in a `DM` from the options database\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM` object to set options for\n\nOptions Database Keys:\n===\n- `-dm_preallocate_only`                               - Only preallocate the matrix for `DMCreateMatrix()` and `DMCreateMassMatrix()`, but do not fill it with zeros\n- `-dm_vec_type <type>`                                - type of vector to create inside `DM`\n- `-dm_mat_type <type>`                                - type of matrix to create inside `DM`\n- `-dm_is_coloring_type`                               - <global or local>\n- `-dm_bind_below <n>`                                 - bind (force execution on CPU) for `Vec` and `Mat` objects with local size (number of vector entries or matrix rows) below n; currently only supported for `DMDA`\n- `-dm_plex_filename <str>`                            - File containing a mesh\n- `-dm_plex_boundary_filename <str>`                   - File containing a mesh boundary\n- `-dm_plex_name <str>`                                - Name of the mesh in the file\n- `-dm_plex_shape <shape>`                             - The domain shape, such as `BOX`, `SPHERE`, etc.\n- `-dm_plex_cell <ct>`                                 - Cell shape\n- `-dm_plex_reference_cell_domain <bool>`              - Use a reference cell domain\n- `-dm_plex_dim <dim>`                                 - Set the topological dimension\n- `-dm_plex_simplex <bool>`                            - `PETSC_TRUE` for simplex elements, `PETSC_FALSE` for tensor elements\n- `-dm_plex_interpolate <bool>`                        - `PETSC_TRUE` turns on topological interpolation (creating edges and faces)\n- `-dm_plex_scale <sc>`                                - Scale factor for mesh coordinates\n- `-dm_coord_remap <bool>`                             - Map coordinates using a function\n- `-dm_coord_map <mapname>`                            - Select a builtin coordinate map\n- `-dm_coord_map_params <p0,p1,p2,...>`                - Set coordinate mapping parameters\n- `-dm_plex_box_faces <m,n,p>`                         - Number of faces along each dimension\n- `-dm_plex_box_lower <x,y,z>`                         - Specify lower-left-bottom coordinates for the box\n- `-dm_plex_box_upper <x,y,z>`                         - Specify upper-right-top coordinates for the box\n- `-dm_plex_box_bd <bx,by,bz>`                         - Specify the `DMBoundaryType` for each direction\n- `-dm_plex_sphere_radius <r>`                         - The sphere radius\n- `-dm_plex_ball_radius <r>`                           - Radius of the ball\n- `-dm_plex_cylinder_bd <bz>`                          - Boundary type in the z direction\n- `-dm_plex_cylinder_num_wedges <n>`                   - Number of wedges around the cylinder\n- `-dm_plex_reorder <order>`                           - Reorder the mesh using the specified algorithm\n- `-dm_refine_pre <n>`                                 - The number of refinements before distribution\n- `-dm_refine_uniform_pre <bool>`                      - Flag for uniform refinement before distribution\n- `-dm_refine_volume_limit_pre <v>`                    - The maximum cell volume after refinement before distribution\n- `-dm_refine <n>`                                     - The number of refinements after distribution\n- `-dm_extrude <l>`                                    - Activate extrusion and specify the number of layers to extrude\n- `-dm_plex_transform_extrude_thickness <t>`           - The total thickness of extruded layers\n- `-dm_plex_transform_extrude_use_tensor <bool>`       - Use tensor cells when extruding\n- `-dm_plex_transform_extrude_symmetric <bool>`        - Extrude layers symmetrically about the surface\n- `-dm_plex_transform_extrude_normal <n0,...,nd>`      - Specify the extrusion direction\n- `-dm_plex_transform_extrude_thicknesses <t0,...,tl>` - Specify thickness of each layer\n- `-dm_plex_create_fv_ghost_cells`                     - Flag to create finite volume ghost cells on the boundary\n- `-dm_plex_fv_ghost_cells_label <name>`               - Label name for ghost cells boundary\n- `-dm_distribute <bool>`                              - Flag to redistribute a mesh among processes\n- `-dm_distribute_overlap <n>`                         - The size of the overlap halo\n- `-dm_plex_adj_cone <bool>`                           - Set adjacency direction\n- `-dm_plex_adj_closure <bool>`                        - Set adjacency size\n- `-dm_plex_use_ceed <bool>`                           - Use LibCEED as the FEM backend\n- `-dm_plex_check_symmetry`                            - Check that the adjacency information in the mesh is symmetric - `DMPlexCheckSymmetry()`\n- `-dm_plex_check_skeleton`                            - Check that each cell has the correct number of vertices (only for homogeneous simplex or tensor meshes) - `DMPlexCheckSkeleton()`\n- `-dm_plex_check_faces`                               - Check that the faces of each cell give a vertex order this is consistent with what we expect from the cell type - `DMPlexCheckFaces()`\n- `-dm_plex_check_geometry`                            - Check that cells have positive volume - `DMPlexCheckGeometry()`\n- `-dm_plex_check_pointsf`                             - Check some necessary conditions for `PointSF` - `DMPlexCheckPointSF()`\n- `-dm_plex_check_interface_cones`                     - Check points on inter-partition interfaces have conforming order of cone points - `DMPlexCheckInterfaceCones()`\n- `-dm_plex_check_all`                                 - Perform all the checks above\n\nLevel: intermediate\n\nNote:\nFor some `DMType` such as `DMDA` this cannot be called after `DMSetUp()` has been called.\n\nSee also: \n=== \n`DM`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`,\n`DMPlexCheckSymmetry()`, `DMPlexCheckSkeleton()`, `DMPlexCheckFaces()`, `DMPlexCheckGeometry()`, `DMPlexCheckPointSF()`, `DMPlexCheckInterfaceCones()`,\n`DMSetOptionsPrefix()`, `DMType`, `DMPLEX`, `DMDA`, `DMSetUp()`\n\n# External Links\n$(_doc_external(\"DM/DMSetFromOptions\"))\n\"\"\"\nfunction DMSetFromOptions(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMSetFromOptions(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMViewFromOptions(dm::AbstractDM{PetscLib},obj::PetscObject,name::Vector{Char})\n\nView a `DM` in a particular way based on a request in the options database\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - the `DM` object\n- `obj`  - optional object that provides the prefix for the options database (if `NULL` then the prefix in obj is used)\n- `name` - option string that is used to activate viewing\n\nLevel: intermediate\n\nNote:\nSee `PetscObjectViewFromOptions()` for a list of values that can be provided in the options database to determine how the `DM` is viewed\n\nSee also: \n=== \n`DM`, `DMView()`, `PetscObjectViewFromOptions()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMViewFromOptions\"))\n\"\"\"\nfunction DMViewFromOptions(dm::AbstractDM{PetscLib},obj::PetscObject,name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMViewFromOptions(\n\t\tPetscLib,\n\t\tdm,\n\t\tobj,\n\t\tname,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdmAdapt = DMAdaptLabel(dm::AbstractDM{PetscLib},label::DMLabel)\n\nAdapt a `DM` based on a `DMLabel` with values interpreted as coarsening and refining flags.  Specific implementations of `DM` maybe have\nspecialized flags, but all implementations should accept flag values `DM_ADAPT_DETERMINE`, `DM_ADAPT_KEEP`, `DM_ADAPT_REFINE`, and,\n`DM_ADAPT_COARSEN`.\n\nCollective\n\nInput Parameters:\n===\n- `dm`    - the pre-adaptation `DM` object\n- `label` - label with the flags\n\nOutput Parameters:\n===\n- `dmAdapt` - the adapted `DM` object: may be `NULL` if an adapted `DM` could not be produced.\n\nLevel: intermediate\n\n-seealso: `DM`, `DMAdaptMetric()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptLabel\"))\n\"\"\"\nfunction DMAdaptLabel(dm::AbstractDM{PetscLib},label::DMLabel) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tdmAdapt = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMAdaptLabel(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t\tdmAdapt,\n\t)\n\n\treturn dmAdapt\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdmAdapt = DMAdaptMetric(dm::AbstractDM{PetscLib},metric::AbstractVector,bdLabel::DMLabel,rgLabel::DMLabel)\n\nGenerates a mesh adapted to the specified metric field.\n\nInput Parameters:\n===\n- `dm`      - The DM object\n- `metric`  - The metric to which the mesh is adapted, defined vertex-wise.\n- `bdLabel` - Label for boundary tags, which will be preserved in the output mesh. `bdLabel` should be `NULL` if there is no such label, and should be different from \"_boundary_\".\n- `rgLabel` - Label for cell tags, which will be preserved in the output mesh. `rgLabel` should be `NULL` if there is no such label, and should be different from \"_regions_\".\n\nOutput Parameter:\n===\n- `dmAdapt` - Pointer to the `DM` object containing the adapted mesh\n\nNote:\nThe label in the adapted mesh will be registered under the name of the input `DMLabel` object\n\nLevel: advanced\n\n-seealso: `DMAdaptLabel()`, `DMCoarsen()`, `DMRefine()`\n\n# External Links\n$(_doc_external(\"DM/DMAdaptMetric\"))\n\"\"\"\nfunction DMAdaptMetric(dm::AbstractDM{PetscLib},metric::AbstractVector,bdLabel::DMLabel,rgLabel::DMLabel) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tdmAdapt = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMAdaptMetric(\n\t\tPetscLib,\n\t\tdm,\n\t\tmetric,\n\t\tbdLabel,\n\t\trgLabel,\n\t\tdmAdapt,\n\t)\n\n\treturn dmAdapt\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetUp(dm::AbstractDM{PetscLib})\n\nsets up the data structures inside a `DM` object\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM` object to setup\n\nLevel: intermediate\n\nNote:\nThis is usually called after various parameter setting operations and `DMSetFromOptions()` are called on the `DM`\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMSetType()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMSetUp\"))\n\"\"\"\nfunction DMSetUp(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMSetUp(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tscale = DMCreateInterpolationScale(dac::AbstractDM{PetscLib},daf::AbstractDM{PetscLib},mat::AbstractMatrix)\n\nForms L = 1/(R*1) where 1 is the vector of all ones, and R is\nthe transpose of the interpolation between the `DM`.\n\nInput Parameters:\n===\n- `dac` - `DM` that defines a coarse mesh\n- `daf` - `DM` that defines a fine mesh\n- `mat` - the restriction (or interpolation operator) from fine to coarse\n\nOutput Parameter:\n===\n- `scale` - the scaled vector\n\nLevel: advanced\n\nNote:\nxcoarse = diag(L)*R*xfine preserves scale and is thus suitable for state (versus residual)\nrestriction. In other words xcoarse is the coarse representation of xfine.\n\nDeveloper Note:\nIf the fine-scale `DMDA` has the -dm_bind_below option set to true, then `DMCreateInterpolationScale()` calls `MatSetBindingPropagates()`\non the restriction/interpolation operator to set the bindingpropagates flag to true.\n\nSee also: \n=== \n`DM`, `MatRestrict()`, `MatInterpolate()`, `DMCreateInterpolation()`, `DMCreateRestriction()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateInterpolationScale\"))\n\"\"\"\nfunction DMCreateInterpolationScale(dac::AbstractDM{PetscLib},daf::AbstractDM{PetscLib},mat::AbstractMatrix) where {PetscLib}\n\tscale = CVec()\n\n\tLibPETSc.DMCreateInterpolationScale(\n\t\tPetscLib,\n\t\tdac,\n\t\tdaf,\n\t\tmat,\n\t\tscale,\n\t)\n\n\treturn scale\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGlobalToLocalBegin(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector)\n\nBegins updating local vectors from global vector\n\nNeighbor-wise Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM` object\n- `g`    - the global vector\n- `mode` - `INSERT_VALUES` or `ADD_VALUES`\n- `l`    - the local vector\n\nLevel: intermediate\n\nNotes:\nThe operation is completed with `DMGlobalToLocalEnd()`\n\nOne can perform local computations between the `DMGlobalToLocalBegin()` and  `DMGlobalToLocalEnd()` to overlap communication and computation\n\n`DMGlobalToLocal()` is a short form of  `DMGlobalToLocalBegin()` and  `DMGlobalToLocalEnd()`\n\n`DMGlobalToLocalHookAdd()` may be used to provide additional operations that are performed during the update process.\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobal()`, `DMLocalToGlobalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalBegin\"))\n\"\"\"\nfunction DMGlobalToLocalBegin(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGlobalToLocalBegin(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t\tmode,\n\t\tl,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGlobalToLocalEnd(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector)\n\nEnds updating local vectors from global vector\n\nNeighbor-wise Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM` object\n- `g`    - the global vector\n- `mode` - `INSERT_VALUES` or `ADD_VALUES`\n- `l`    - the local vector\n\nLevel: intermediate\n\nNote:\nSee `DMGlobalToLocalBegin()` for details.\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobal()`, `DMLocalToGlobalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocalEnd\"))\n\"\"\"\nfunction DMGlobalToLocalEnd(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGlobalToLocalEnd(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t\tmode,\n\t\tl,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMLocalToGlobalBegin(dm::AbstractDM{PetscLib},l::AbstractVector,mode::InsertMode,g::AbstractVector)\n\nbegins updating global vectors from local vectors\n\nNeighbor-wise Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM` object\n- `l`    - the local vector\n- `mode` - if `INSERT_VALUES` then no parallel communication is used, if `ADD_VALUES` then all ghost points from the same base point accumulate into that base point.\n- `g`    - the global vector\n\nLevel: intermediate\n\nNotes:\nIn the `ADD_VALUES` case you normally would zero the receiving vector before beginning this operation.\n\n`INSERT_VALUES is` not supported for `DMDA`, in that case simply compute the values directly into a global vector instead of a local one.\n\nUse `DMLocalToGlobalEnd()` to complete the communication process.\n\n`DMLocalToGlobal()` is a short form of  `DMLocalToGlobalBegin()` and  `DMLocalToGlobalEnd()`\n\n`DMLocalToGlobalHookAdd()` may be used to provide additional operations that are performed during the update process.\n\nSee also: \n=== \n`DM`, `DMLocalToGlobal()`, `DMLocalToGlobalEnd()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMGlobalToLocalEnd()`, `DMGlobalToLocalBegin()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalBegin\"))\n\"\"\"\nfunction DMLocalToGlobalBegin(dm::AbstractDM{PetscLib},l::AbstractVector,mode::InsertMode,g::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMLocalToGlobalBegin(\n\t\tPetscLib,\n\t\tdm,\n\t\tl,\n\t\tmode,\n\t\tg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMLocalToGlobalEnd(dm::AbstractDM{PetscLib},l::AbstractVector,mode::InsertMode,g::AbstractVector)\n\nupdates global vectors from local vectors\n\nNeighbor-wise Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM` object\n- `l`    - the local vector\n- `mode` - `INSERT_VALUES` or `ADD_VALUES`\n- `g`    - the global vector\n\nLevel: intermediate\n\nNote:\nSee `DMLocalToGlobalBegin()` for full details\n\nSee also: \n=== \n`DM`, `DMLocalToGlobalBegin()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocalEnd()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobalEnd\"))\n\"\"\"\nfunction DMLocalToGlobalEnd(dm::AbstractDM{PetscLib},l::AbstractVector,mode::InsertMode,g::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMLocalToGlobalEnd(\n\t\tPetscLib,\n\t\tdm,\n\t\tl,\n\t\tmode,\n\t\tg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMLocalToLocalBegin(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector)\n\nBegins the process of mapping values from a local vector (that include\nghost points that contain irrelevant values) to another local vector where the ghost points\nin the second are set correctly from values on other MPI ranks.\n\nNeighbor-wise Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM` object\n- `g`    - the original local vector\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n===\n- `l` - the local vector with correct ghost values\n\nLevel: intermediate\n\nNote:\nMust be followed by `DMLocalToLocalEnd()`.\n\nSee also: \n=== \n`DM`, `DMLocalToLocalEnd()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToLocalBegin\"))\n\"\"\"\nfunction DMLocalToLocalBegin(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMLocalToLocalBegin(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t\tmode,\n\t\tl,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMLocalToLocalEnd(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector)\n\nMaps from a local vector to another local vector where the ghost\npoints in the second are set correctly. Must be preceded by `DMLocalToLocalBegin()`.\n\nNeighbor-wise Collective\n\nInput Parameters:\n===\n- `dm`   - the `DM` object\n- `g`    - the original local vector\n- `mode` - one of `INSERT_VALUES` or `ADD_VALUES`\n\nOutput Parameter:\n===\n- `l` - the local vector with correct ghost values\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLocalToLocalBegin()`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocalEnd()`, `DMLocalToGlobalBegin()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToLocalEnd\"))\n\"\"\"\nfunction DMLocalToLocalEnd(dm::AbstractDM{PetscLib},g::AbstractVector,mode::InsertMode,l::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMLocalToLocalEnd(\n\t\tPetscLib,\n\t\tdm,\n\t\tg,\n\t\tmode,\n\t\tl,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tM = DMConvert(dm::AbstractDM{PetscLib},newtype::DMType)\n\nConverts a `DM` to another `DM`, either of the same or different type.\n\nCollective\n\nInput Parameters:\n===\n- `dm`      - the `DM`\n- `newtype` - new `DM` type (use \"same\" for the same type)\n\nOutput Parameter:\n===\n- `M` - pointer to new `DM`\n\nLevel: intermediate\n\nNote:\nCannot be used to convert a sequential `DM` to a parallel or a parallel to sequential,\nthe MPI communicator of the generated `DM` is always the same as the communicator\nof the input `DM`.\n\nSee also: \n=== \n`DM`, `DMSetType()`, `DMCreate()`, `DMClone()`\n\n# External Links\n$(_doc_external(\"DM/DMConvert\"))\n\"\"\"\nfunction DMConvert(dm::AbstractDM{PetscLib},newtype::DMType) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tM = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMConvert(\n\t\tPetscLib,\n\t\tdm,\n\t\tnewtype,\n\t\tM,\n\t)\n\n\treturn M\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdim = DMGetDimension(dm::AbstractDM{PetscLib})\n\nReturn the topological dimension of the `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `dim` - The topological dimension\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMSetDimension()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDimension\"))\n\"\"\"\nfunction DMGetDimension(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tdim = [PetscInt(1)]\n\n\tLibPETSc.DMGetDimension(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(dim,1),\n\t)\n\n\treturn dim[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetDimension(dm::AbstractDM{PetscLib},dim::Int)\n\nSet the topological dimension of the `DM`\n\nCollective\n\nInput Parameters:\n===\n- `dm`  - The `DM`\n- `dim` - The topological dimension\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMGetDimension()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMSetDimension\"))\n\"\"\"\nfunction DMSetDimension(dm::AbstractDM{PetscLib},dim::Int) where {PetscLib}\n\n\tLibPETSc.DMSetDimension(\n\t\tPetscLib,\n\t\tdm,\n\t\tdim,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tpStart,pEnd = DMGetDimPoints(dm::AbstractDM{PetscLib},dim::Int)\n\nGet the half\n\nCollective\n\nInput Parameters:\n===\n- `dm`  - the `DM`\n- `dim` - the dimension\n\nOutput Parameters:\n===\n- `pStart` - The first point of the given dimension\n- `pEnd`   - The first point following points of the given dimension\n\nLevel: intermediate\n\nNote:\nThe points are vertices in the Hasse diagram encoding the topology. This is explained in\nhttps://arxiv.org/abs/0908.4427. If no points exist of this dimension in the storage scheme,\nthen the interval is empty.\n\nSee also: \n=== \n`DM`, `DMPLEX`, `DMPlexGetDepthStratum()`, `DMPlexGetHeightStratum()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDimPoints\"))\n\"\"\"\nfunction DMGetDimPoints(dm::AbstractDM{PetscLib},dim::Int) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tpStart = [PetscInt(1)]\n\tpEnd = [PetscInt(1)]\n\n\tLibPETSc.DMGetDimPoints(\n\t\tPetscLib,\n\t\tdm,\n\t\tdim,\n\t\tRef(pStart,1),\n\t\tRef(pEnd,1),\n\t)\n\n\treturn pStart[1],pEnd[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tuseNatural = DMGetUseNatural(dm::AbstractDM{PetscLib})\n\nGet the flag for creating a mapping to the natural order when a `DM` is (re)distributed in parallel\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `useNatural` - `PETSC_TRUE` to build the mapping to a natural order during distribution\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMSetUseNatural()`, `DMCreate()`\n\n# External Links\n$(_doc_external(\"DM/DMGetUseNatural\"))\n\"\"\"\nfunction DMGetUseNatural(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tuseNatural = Ref{PetscBool}()\n\n\tLibPETSc.DMGetUseNatural(\n\t\tPetscLib,\n\t\tdm,\n\t\tuseNatural,\n\t)\n\n\treturn useNatural[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetUseNatural(dm::AbstractDM{PetscLib},useNatural::PetscBool)\n\nSet the flag for creating a mapping to the natural order when a `DM` is (re)distributed in parallel\n\nCollective\n\nInput Parameters:\n===\n- `dm`         - The `DM`\n- `useNatural` - `PETSC_TRUE` to build the mapping to a natural order during distribution\n\nLevel: beginner\n\nNote:\nThis also causes the map to be build after `DMCreateSubDM()` and `DMCreateSuperDM()`\n\nSee also: \n=== \n`DM`, `DMGetUseNatural()`, `DMCreate()`, `DMPlexDistribute()`, `DMCreateSubDM()`, `DMCreateSuperDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetUseNatural\"))\n\"\"\"\nfunction DMSetUseNatural(dm::AbstractDM{PetscLib},useNatural::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetUseNatural(\n\t\tPetscLib,\n\t\tdm,\n\t\tuseNatural,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tnranks = DMGetNeighbors(dm::AbstractDM{PetscLib},ranks::Vector{PetscMPIInt})\n\nGets an array containing the MPI ranks of all the processes neighbors\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameters:\n===\n- `nranks` - the number of neighbours\n- `ranks`  - the neighbors ranks\n\nLevel: beginner\n\nNote:\nDo not free the array, it is freed when the `DM` is destroyed.\n\nSee also: \n=== \n`DM`, `DMDAGetNeighbors()`, `PetscSFGetRootRanks()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNeighbors\"))\n\"\"\"\nfunction DMGetNeighbors(dm::AbstractDM{PetscLib},ranks::Vector{PetscMPIInt}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tnranks = [PetscInt(1)]\n\n\tLibPETSc.DMGetNeighbors(\n\t\tPetscLib,\n\t\tdm,\n\t\tranks,\n\t\tRef(nranks,1),\n\t)\n\n\treturn nranks[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tcdm = DMGetCoordinateDM(dm::AbstractDM{PetscLib})\n\nGets the `DM` that prescribes coordinate layout and scatters between global and local coordinates\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `cdm` - coordinate `DM`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCoordinateDM()`, `DMSetCoordinates()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGSetCellCoordinateDM()`,\n\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateDM\"))\n\"\"\"\nfunction DMGetCoordinateDM(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tcdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMGetCoordinateDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tcdm,\n\t)\n\n\treturn cdm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoordinateDM(dm::AbstractDM{PetscLib},cdm::AbstractDM{PetscLib})\n\nSets the `DM` that prescribes coordinate layout and scatters between global and local coordinates\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`  - the `DM`\n- `cdm` - coordinate `DM`\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDM()`, `DMSetCoordinates()`, `DMGetCellCoordinateDM()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`,\n`DMGSetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateDM\"))\n\"\"\"\nfunction DMSetCoordinateDM(dm::AbstractDM{PetscLib},cdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMSetCoordinateDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tcdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tcdm = DMGetCellCoordinateDM(dm::AbstractDM{PetscLib})\n\nGets the `DM` that prescribes cellwise coordinate layout and scatters between global and local cellwise coordinates\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `cdm` - cellwise coordinate `DM`, or `NULL` if they are not defined\n\nLevel: intermediate\n\nNote:\nCall `DMLocalizeCoordinates()` to automatically create cellwise coordinates for periodic geometries.\n\n-seealso: `DM`, `DMSetCellCoordinateDM()`, `DMSetCellCoordinates()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMGetCellCoordinatesLocal()`,\n`DMLocalizeCoordinates()`, `DMSetCoordinateDM()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinateDM\"))\n\"\"\"\nfunction DMGetCellCoordinateDM(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tcdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMGetCellCoordinateDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tcdm,\n\t)\n\n\treturn cdm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCellCoordinateDM(dm::AbstractDM{PetscLib},cdm::AbstractDM{PetscLib})\n\nSets the `DM` that prescribes cellwise coordinate layout and scatters between global and local cellwise coordinates\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`  - the `DM`\n- `cdm` - cellwise coordinate `DM`\n\nLevel: intermediate\n\nNote:\nAs opposed to `DMSetCoordinateDM()` these coordinates are useful for discontinuous Galerkin methods since they support coordinate fields that are discontinuous at cell boundaries.\n\n-seealso: `DMGetCellCoordinateDM()`, `DMSetCellCoordinates()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMGetCellCoordinatesLocal()`,\n`DMSetCoordinateDM()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinateDM\"))\n\"\"\"\nfunction DMSetCellCoordinateDM(dm::AbstractDM{PetscLib},cdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMSetCellCoordinateDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tcdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdim = DMGetCoordinateDim(dm::AbstractDM{PetscLib})\n\nRetrieve the dimension of the embedding space for coordinate values. For example a mesh on the surface of a sphere would have a 3 dimensional embedding space\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameter:\n===\n- `dim` - The embedding dimension\n\nLevel: intermediate\n\n-seealso: `DM`, `DMSetCoordinateDim()`, `DMGetCoordinateSection()`, `DMGetCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateDim\"))\n\"\"\"\nfunction DMGetCoordinateDim(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tdim = [PetscInt(1)]\n\n\tLibPETSc.DMGetCoordinateDim(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(dim,1),\n\t)\n\n\treturn dim[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoordinateDim(dm::AbstractDM{PetscLib},dim::Int)\n\nSet the dimension of the embedding space for coordinate values.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`  - The `DM` object\n- `dim` - The embedding dimension\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDim()`, `DMSetCoordinateSection()`, `DMGetCoordinateSection()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateDim\"))\n\"\"\"\nfunction DMSetCoordinateDim(dm::AbstractDM{PetscLib},dim::Int) where {PetscLib}\n\n\tLibPETSc.DMSetCoordinateDim(\n\t\tPetscLib,\n\t\tdm,\n\t\tdim,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsection = DMGetCoordinateSection(dm::AbstractDM{PetscLib})\n\nRetrieve the `PetscSection` of coordinate values over the mesh.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameter:\n===\n- `section` - The `PetscSection` object\n\nLevel: intermediate\n\nNote:\nThis just retrieves the local section from the coordinate `DM`. In other words,\n-vb\nDMGetCoordinateDM(dm, &cdm);\nDMGetLocalSection(cdm, &section);\n-ve\n\n-seealso: `DM`, `DMGetCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateSection\"))\n\"\"\"\nfunction DMGetCoordinateSection(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsection = LibPETSc.PetscSection()\n\n\tLibPETSc.DMGetCoordinateSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn section\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoordinateSection(dm::AbstractDM{PetscLib},dim::Int,section::PetscSection)\n\nSet the `PetscSection` of coordinate values over the mesh.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`      - The `DM` object\n- `dim`     - The embedding dimension, or `PETSC_DETERMINE`\n- `section` - The `PetscSection` object\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDim()`, `DMGetCoordinateSection()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateSection\"))\n\"\"\"\nfunction DMSetCoordinateSection(dm::AbstractDM{PetscLib},dim::Int,section::PetscSection) where {PetscLib}\n\n\tLibPETSc.DMSetCoordinateSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tdim,\n\t\tsection,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsection = DMGetCellCoordinateSection(dm::AbstractDM{PetscLib})\n\nRetrieve the `PetscSection` of cellwise coordinate values over the mesh.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameter:\n===\n- `section` - The `PetscSection` object, or `NULL` if no cellwise coordinates are defined\n\nLevel: intermediate\n\nNote:\nThis just retrieves the local section from the cell coordinate `DM`. In other words,\n-vb\nDMGetCellCoordinateDM(dm, &cdm);\nDMGetLocalSection(cdm, &section);\n-ve\n\n-seealso: `DM`, `DMGetCoordinateSection()`, `DMSetCellCoordinateSection()`, `DMGetCellCoordinateDM()`, `DMGetCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinateSection\"))\n\"\"\"\nfunction DMGetCellCoordinateSection(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsection = LibPETSc.PetscSection()\n\n\tLibPETSc.DMGetCellCoordinateSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn section\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCellCoordinateSection(dm::AbstractDM{PetscLib},dim::Int,section::PetscSection)\n\nSet the `PetscSection` of cellwise coordinate values over the mesh.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`      - The `DM` object\n- `dim`     - The embedding dimension, or `PETSC_DETERMINE`\n- `section` - The `PetscSection` object for a cellwise layout\n\nLevel: intermediate\n\n-seealso: `DM`, `DMGetCoordinateDim()`, `DMSetCoordinateSection()`, `DMGetCellCoordinateSection()`, `DMGetCoordinateSection()`, `DMGetCellCoordinateDM()`, `DMGetLocalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinateSection\"))\n\"\"\"\nfunction DMSetCellCoordinateSection(dm::AbstractDM{PetscLib},dim::Int,section::PetscSection) where {PetscLib}\n\n\tLibPETSc.DMSetCellCoordinateSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tdim,\n\t\tsection,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tc = DMGetCoordinates(dm::AbstractDM{PetscLib})\n\nGets a global vector with the coordinates associated with the `DM`.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `c` - global coordinate vector\n\nLevel: intermediate\n\nNotes:\nThis is a borrowed reference, so the user should NOT destroy this vector. When the `DM` is\ndestroyed `c` will no longer be valid.\n\nEach process has only the locally-owned portion of the global coordinates (does NOT have the ghost coordinates).\n\nFor `DMDA`, in two and three dimensions coordinates are interlaced (x_0,y_0,x_1,y_1,...)\nand (x_0,y_0,z_0,x_1,y_1,z_1...)\n\n-seealso: `DM`, `DMDA`, `DMSetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCoordinateDM()`, `DMDASetUniformCoordinates()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinates\"))\n\"\"\"\nfunction DMGetCoordinates(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tc = CVec()\n\n\tLibPETSc.DMGetCoordinates(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn c\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoordinates(dm::AbstractDM{PetscLib},c::AbstractVector)\n\nSets into the `DM` a global vector that holds the coordinates\n\nCollective\n\nInput Parameters:\n===\n- `dm` - the `DM`\n- `c`  - coordinate vector\n\nLevel: intermediate\n\nNotes:\nThe coordinates do not include those for ghost points, which are in the local vector.\n\nThe vector `c` can be destroyed after the call\n\n-seealso: `DM`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetCoordinateDM()`, `DMDASetUniformCoordinates()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinates\"))\n\"\"\"\nfunction DMSetCoordinates(dm::AbstractDM{PetscLib},c::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetCoordinates(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tc = DMGetCellCoordinates(dm::AbstractDM{PetscLib})\n\nGets a global vector with the cellwise coordinates associated with the `DM`.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `c` - global coordinate vector\n\nLevel: intermediate\n\nNotes:\nThis is a borrowed reference, so the user should NOT destroy this vector. When the `DM` is\ndestroyed `c` will no longer be valid.\n\nEach process has only the locally-owned portion of the global coordinates (does NOT have the ghost coordinates).\n\n-seealso: `DM`, `DMGetCoordinates()`, `DMSetCellCoordinates()`, `DMGetCellCoordinatesLocal()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinates\"))\n\"\"\"\nfunction DMGetCellCoordinates(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tc = CVec()\n\n\tLibPETSc.DMGetCellCoordinates(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn c\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCellCoordinates(dm::AbstractDM{PetscLib},c::AbstractVector)\n\nSets into the `DM` a global vector that holds the cellwise coordinates\n\nCollective\n\nInput Parameters:\n===\n- `dm` - the `DM`\n- `c`  - cellwise coordinate vector\n\nLevel: intermediate\n\nNotes:\nThe coordinates do not include those for ghost points, which are in the local vector.\n\nThe vector `c` should be destroyed by the caller.\n\n-seealso: `DM`, `DMGetCoordinates()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMGetCellCoordinatesLocal()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinates\"))\n\"\"\"\nfunction DMSetCellCoordinates(dm::AbstractDM{PetscLib},c::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetCellCoordinates(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetCoordinatesLocalSetUp(dm::AbstractDM{PetscLib})\n\nPrepares a local vector of coordinates, so that `DMGetCoordinatesLocalNoncollective()` can be used as non\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nLevel: advanced\n\n-seealso: `DM`, `DMSetCoordinates()`, `DMGetCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalSetUp\"))\n\"\"\"\nfunction DMGetCoordinatesLocalSetUp(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMGetCoordinatesLocalSetUp(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tc = DMGetCoordinatesLocal(dm::AbstractDM{PetscLib})\n\nGets a local vector with the coordinates associated with the `DM`.\n\nCollective the first time it is called\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `c` - coordinate vector\n\nLevel: intermediate\n\nNotes:\nThis is a borrowed reference, so the user should NOT destroy `c`\n\nEach process has the local and ghost coordinates\n\nFor `DMDA`, in two and three dimensions coordinates are interlaced (x_0,y_0,x_1,y_1,...)\nand (x_0,y_0,z_0,x_1,y_1,z_1...)\n\n-seealso: `DM`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMSetCoordinates()`, `DMGetCoordinateDM()`, `DMGetCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocal\"))\n\"\"\"\nfunction DMGetCoordinatesLocal(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tc = CVec()\n\n\tLibPETSc.DMGetCoordinatesLocal(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn c\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tc = DMGetCoordinatesLocalNoncollective(dm::AbstractDM{PetscLib})\n\nNon\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `c` - coordinate vector\n\nLevel: advanced\n\nNote:\nA previous call to  `DMGetCoordinatesLocal()` or `DMGetCoordinatesLocalSetUp()` ensures that a call to this function will not error.\n\n-seealso: `DM`, `DMGetCoordinatesLocalSetUp()`, `DMGetCoordinatesLocal()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMSetCoordinates()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalNoncollective\"))\n\"\"\"\nfunction DMGetCoordinatesLocalNoncollective(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tc = CVec()\n\n\tLibPETSc.DMGetCoordinatesLocalNoncollective(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn c\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tpCoordSection,pCoord = DMGetCoordinatesLocalTuple(dm::AbstractDM{PetscLib},p::IS)\n\nGets a local vector with the coordinates of specified points and the section describing its layout.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - the `DM`\n- `p`  - the `IS` of points whose coordinates will be returned\n\nOutput Parameters:\n===\n- `pCoordSection` - the `PetscSection` describing the layout of pCoord, i.e. each point corresponds to one point in `p`, and DOFs correspond to coordinates\n- `pCoord`        - the `Vec` with coordinates of points in `p`\n\nLevel: advanced\n\nNotes:\n`DMGetCoordinatesLocalSetUp()` must be called first. This function employs `DMGetCoordinatesLocalNoncollective()` so it is not collective.\n\nThis creates a new vector, so the user SHOULD destroy this vector\n\nEach process has the local and ghost coordinates\n\nFor `DMDA`, in two and three dimensions coordinates are interlaced (x_0,y_0,x_1,y_1,...)\nand (x_0,y_0,z_0,x_1,y_1,z_1...)\n\n-seealso: `DM`, `DMDA`, `DMSetCoordinatesLocal()`, `DMGetCoordinatesLocal()`, `DMGetCoordinatesLocalNoncollective()`, `DMGetCoordinatesLocalSetUp()`, `DMGetCoordinates()`, `DMSetCoordinates()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalTuple\"))\n\"\"\"\nfunction DMGetCoordinatesLocalTuple(dm::AbstractDM{PetscLib},p::IS) where {PetscLib}\n\tpCoordSection = LibPETSc.PetscSection()\n\tpCoord = CVec()\n\n\tLibPETSc.DMGetCoordinatesLocalTuple(\n\t\tPetscLib,\n\t\tdm,\n\t\tp,\n\t\tpCoordSection,\n\t\tpCoord,\n\t)\n\n\treturn pCoordSection,pCoord\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoordinatesLocal(dm::AbstractDM{PetscLib},c::AbstractVector)\n\nSets into the `DM` a local vector, including ghost points, that holds the coordinates\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - the `DM`\n- `c`  - coordinate vector\n\nLevel: intermediate\n\nNotes:\nThe coordinates of ghost points can be set using `DMSetCoordinates()`\nfollowed by `DMGetCoordinatesLocal()`. This is intended to enable the\nsetting of ghost coordinates outside of the domain.\n\nThe vector `c` should be destroyed by the caller.\n\n-seealso: `DM`, `DMGetCoordinatesLocal()`, `DMSetCoordinates()`, `DMGetCoordinates()`, `DMGetCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinatesLocal\"))\n\"\"\"\nfunction DMSetCoordinatesLocal(dm::AbstractDM{PetscLib},c::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetCoordinatesLocal(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetCellCoordinatesLocalSetUp(dm::AbstractDM{PetscLib})\n\nPrepares a local vector of cellwise coordinates, so that `DMGetCellCoordinatesLocalNoncollective()` can be used as non\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nLevel: advanced\n\n-seealso: `DM`, `DMGetCellCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinatesLocalSetUp\"))\n\"\"\"\nfunction DMGetCellCoordinatesLocalSetUp(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMGetCellCoordinatesLocalSetUp(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tc = DMGetCellCoordinatesLocal(dm::AbstractDM{PetscLib})\n\nGets a local vector with the cellwise coordinates associated with the `DM`.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `c` - coordinate vector\n\nLevel: intermediate\n\nNotes:\nThis is a borrowed reference, so the user should NOT destroy this vector\n\nEach process has the local and ghost coordinates\n\n-seealso: `DM`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMSetCellCoordinates()`, `DMGetCellCoordinateDM()`, `DMGetCellCoordinatesLocalNoncollective()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinatesLocal\"))\n\"\"\"\nfunction DMGetCellCoordinatesLocal(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tc = CVec()\n\n\tLibPETSc.DMGetCellCoordinatesLocal(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn c\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tc = DMGetCellCoordinatesLocalNoncollective(dm::AbstractDM{PetscLib})\n\nNon\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameter:\n===\n- `c` - cellwise coordinate vector\n\nLevel: advanced\n\n-seealso: `DM`, `DMGetCellCoordinatesLocalSetUp()`, `DMGetCellCoordinatesLocal()`, `DMSetCellCoordinatesLocal()`, `DMGetCellCoordinates()`, `DMSetCellCoordinates()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellCoordinatesLocalNoncollective\"))\n\"\"\"\nfunction DMGetCellCoordinatesLocalNoncollective(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tc = CVec()\n\n\tLibPETSc.DMGetCellCoordinatesLocalNoncollective(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn c\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCellCoordinatesLocal(dm::AbstractDM{PetscLib},c::AbstractVector)\n\nSets into the `DM` a local vector including ghost points that holds the cellwise coordinates\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - the `DM`\n- `c`  - cellwise coordinate vector\n\nLevel: intermediate\n\nNotes:\nThe coordinates of ghost points can be set using `DMSetCoordinates()`\nfollowed by `DMGetCoordinatesLocal()`. This is intended to enable the\nsetting of ghost coordinates outside of the domain.\n\nThe vector `c` should be destroyed by the caller.\n\n-seealso: `DM`, `DMGetCellCoordinatesLocal()`, `DMSetCellCoordinates()`, `DMGetCellCoordinates()`, `DMGetCellCoordinateDM()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCellCoordinatesLocal\"))\n\"\"\"\nfunction DMSetCellCoordinatesLocal(dm::AbstractDM{PetscLib},c::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetCellCoordinatesLocal(\n\t\tPetscLib,\n\t\tdm,\n\t\tc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfield = DMGetCoordinateField(dm::AbstractDM{PetscLib})\n\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinateField\"))\n\"\"\"\nfunction DMGetCoordinateField(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tfield = LibPETSc.DMField()\n\n\tLibPETSc.DMGetCoordinateField(\n\t\tPetscLib,\n\t\tdm,\n\t\tfield,\n\t)\n\n\treturn field\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoordinateField(dm::AbstractDM{PetscLib},field::DMField)\n\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateField\"))\n\"\"\"\nfunction DMSetCoordinateField(dm::AbstractDM{PetscLib},field::DMField) where {PetscLib}\n\n\tLibPETSc.DMSetCoordinateField(\n\t\tPetscLib,\n\t\tdm,\n\t\tfield,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetLocalBoundingBox(dm::AbstractDM{PetscLib},lmin::Vector{Float64},lmax::Vector{Float64})\n\nReturns the bounding box for the piece of the `DM` on this process.\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameters:\n===\n- `lmin` - local minimum coordinates (length coord dim, optional)\n- `lmax` - local maximum coordinates (length coord dim, optional)\n\nLevel: beginner\n\nNote:\nIf the `DM` is a `DMDA` and has no coordinates, the index bounds are returned instead.\n\n-seealso: `DM`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMGetBoundingBox()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalBoundingBox\"))\n\"\"\"\nfunction DMGetLocalBoundingBox(dm::AbstractDM{PetscLib},lmin::Vector{Float64},lmax::Vector{Float64}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGetLocalBoundingBox(\n\t\tPetscLib,\n\t\tdm,\n\t\tlmin,\n\t\tlmax,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetBoundingBox(dm::AbstractDM{PetscLib},gmin::Vector{Float64},gmax::Vector{Float64})\n\nReturns the global bounding box for the `DM`.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - the `DM`\n\nOutput Parameters:\n===\n- `gmin` - global minimum coordinates (length coord dim, optional)\n- `gmax` - global maximum coordinates (length coord dim, optional)\n\nLevel: beginner\n\n-seealso: `DM`, `DMGetLocalBoundingBox()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBoundingBox\"))\n\"\"\"\nfunction DMGetBoundingBox(dm::AbstractDM{PetscLib},gmin::Vector{Float64},gmax::Vector{Float64}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGetBoundingBox(\n\t\tPetscLib,\n\t\tdm,\n\t\tgmin,\n\t\tgmax,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoordinateDisc(dm::AbstractDM{PetscLib},disc::PetscFE,project::PetscBool)\n\nSet a coordinate space\n\nInput Parameters:\n===\n- `dm`      - The `DM` object\n- `disc`    - The new coordinate discretization or `NULL` to ensure a coordinate discretization exists\n- `project` - Project coordinates to new discretization\n\nLevel: intermediate\n\nNotes:\nA `PetscFE` defines an approximation space using a `PetscSpace`, which represents the basis functions, and a `PetscDualSpace`, which defines the interpolation operation in the space.\n\nThis function takes the current mesh coordinates, which are discretized using some `PetscFE` space, and projects this function into a new `PetscFE` space.\nThe coordinate projection is done on the continuous coordinates, but the discontinuous coordinates are not updated.\n\nDeveloper Note:\nWith more effort, we could directly project the discontinuous coordinates also.\n\n-seealso: `DM`, `PetscFE`, `DMGetCoordinateField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoordinateDisc\"))\n\"\"\"\nfunction DMSetCoordinateDisc(dm::AbstractDM{PetscLib},disc::PetscFE,project::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetCoordinateDisc(\n\t\tPetscLib,\n\t\tdm,\n\t\tdisc,\n\t\tproject,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tcellSF = DMLocatePoints(dm::AbstractDM{PetscLib},v::AbstractVector,ltype::DMPointLocationType)\n\nLocate the points in `v` in the mesh and return a `PetscSF` of the containing cells\n\nCollective\n\nInput Parameters:\n===\n- `dm`    - The `DM`\n- `ltype` - The type of point location, e.g. `DM_POINTLOCATION_NONE` or `DM_POINTLOCATION_NEAREST`\n\nInput/Output Parameters:\n- `v`      - The `Vec` of points, on output contains the nearest mesh points to the given points if `DM_POINTLOCATION_NEAREST` is used\n- `cellSF` - Points to either `NULL`, or a `PetscSF` with guesses for which cells contain each point;\non output, the `PetscSF` containing the MPI ranks and local indices of the containing points\n\nLevel: developer\n\nNotes:\nTo do a search of the local cells of the mesh, `v` should have `PETSC_COMM_SELF` as its communicator.\nTo do a search of all the cells in the distributed mesh, `v` should have the same MPI communicator as `dm`.\n\nPoints will only be located in owned cells, not overlap cells arising from `DMPlexDistribute()` or other overlapping distributions.\n\nIf *cellSF is `NULL` on input, a `PetscSF` will be created.\nIf *cellSF is not `NULL` on input, it should point to an existing `PetscSF`, whose graph will be used as initial guesses.\n\nAn array that maps each point to its containing cell can be obtained with\n-vb\nconst PetscSFNode *cells;\nPetscInt           nFound;\nconst PetscInt    *found;\n\nPetscSFGetGraph(cellSF,NULL,&nFound,&found,&cells);\n-ve\n\nWhere cells[i].rank is the MPI rank of the process owning the cell containing point found[i] (or i if found == NULL), and cells[i].index is\nthe index of the cell in its MPI process' local numbering. This rank is in the communicator for `v`, so if `v` is on `PETSC_COMM_SELF` then the rank will always be 0.\n\n-seealso: `DM`, `DMSetCoordinates()`, `DMSetCoordinatesLocal()`, `DMGetCoordinates()`, `DMGetCoordinatesLocal()`, `DMPointLocationType`\n\n# External Links\n$(_doc_external(\"DM/DMLocatePoints\"))\n\"\"\"\nfunction DMLocatePoints(dm::AbstractDM{PetscLib},v::AbstractVector,ltype::DMPointLocationType) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tcellSF = LibPETSc.PetscSF()\n\n\tLibPETSc.DMLocatePoints(\n\t\tPetscLib,\n\t\tdm,\n\t\tv,\n\t\tltype,\n\t\tcellSF,\n\t)\n\n\treturn cellSF\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetPeriodicity(dm::AbstractDM{PetscLib},maxCell::Vector{Float64},Lstart::Vector{Float64},L::Vector{Float64})\n\nGet the description of mesh periodicity\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameters:\n===\n- `maxCell` - Over distances greater than this, we can assume a point has crossed over to another sheet, when trying to localize cell coordinates\n- `Lstart`  - If we assume the mesh is a torus, this is the start of each coordinate, or `NULL` for 0.0\n- `L`       - If we assume the mesh is a torus, this is the length of each coordinate, otherwise it is < 0.0\n\nLevel: developer\n\n-seealso: `DM`\n\n# External Links\n$(_doc_external(\"DM/DMGetPeriodicity\"))\n\"\"\"\nfunction DMGetPeriodicity(dm::AbstractDM{PetscLib},maxCell::Vector{Float64},Lstart::Vector{Float64},L::Vector{Float64}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGetPeriodicity(\n\t\tPetscLib,\n\t\tdm,\n\t\tmaxCell,\n\t\tLstart,\n\t\tL,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetPeriodicity(dm::AbstractDM{PetscLib},maxCell::Vector{Float64},Lstart::Vector{Float64},L::Vector{Float64})\n\nSet the description of mesh periodicity\n\nInput Parameters:\n===\n- `dm`      - The `DM` object\n- `maxCell` - Over distances greater than this, we can assume a point has crossed over to another sheet, when trying to localize cell coordinates. Pass `NULL` to remove such information.\n- `Lstart`  - If we assume the mesh is a torus, this is the start of each coordinate, or `NULL` for 0.0\n- `L`       - If we assume the mesh is a torus, this is the length of each coordinate, otherwise it is < 0.0\n\nLevel: developer\n\n-seealso: `DM`, `DMGetPeriodicity()`\n\n# External Links\n$(_doc_external(\"DM/DMSetPeriodicity\"))\n\"\"\"\nfunction DMSetPeriodicity(dm::AbstractDM{PetscLib},maxCell::Vector{Float64},Lstart::Vector{Float64},L::Vector{Float64}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetPeriodicity(\n\t\tPetscLib,\n\t\tdm,\n\t\tmaxCell,\n\t\tLstart,\n\t\tL,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMLocalizeCoordinate(dm::AbstractDM{PetscLib},in::Vector{Float64},endpoint::PetscBool,out::Vector{Float64})\n\nIf a mesh is periodic (a torus with lengths L_i, some of which can be infinite), project the coordinate onto [0, L_i) in each dimension.\n\nInput Parameters:\n===\n- `dm`       - The `DM`\n- `in`       - The input coordinate point (dim numbers)\n- `endpoint` - Include the endpoint L_i\n\nOutput Parameter:\n===\n- `out` - The localized coordinate point (dim numbers)\n\nLevel: developer\n\n-seealso: `DM`, `DMLocalizeCoordinates()`, `DMLocalizeAddCoordinate()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalizeCoordinate\"))\n\"\"\"\nfunction DMLocalizeCoordinate(dm::AbstractDM{PetscLib},in::Vector{Float64},endpoint::PetscBool,out::Vector{Float64}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMLocalizeCoordinate(\n\t\tPetscLib,\n\t\tdm,\n\t\tin,\n\t\tendpoint,\n\t\tout,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMLocalizeCoordinates(dm::AbstractDM{PetscLib})\n\nIf a mesh is periodic, create local coordinates for cells having periodic faces\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nLevel: developer\n\n-seealso: `DM`, `DMSetPeriodicity()`, `DMLocalizeCoordinate()`, `DMLocalizeAddCoordinate()`\n\n# External Links\n$(_doc_external(\"DM/DMLocalizeCoordinates\"))\n\"\"\"\nfunction DMLocalizeCoordinates(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMLocalizeCoordinates(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tareLocalized = DMGetCoordinatesLocalized(dm::AbstractDM{PetscLib})\n\nCheck if the `DM` coordinates have been localized for cells\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `areLocalized` - `PETSC_TRUE` if localized\n\nLevel: developer\n\n-seealso: `DM`, `DMLocalizeCoordinates()`, `DMSetPeriodicity()`, `DMGetCoordinatesLocalizedLocal()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalized\"))\n\"\"\"\nfunction DMGetCoordinatesLocalized(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tareLocalized = Ref{PetscBool}()\n\n\tLibPETSc.DMGetCoordinatesLocalized(\n\t\tPetscLib,\n\t\tdm,\n\t\tareLocalized,\n\t)\n\n\treturn areLocalized[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tareLocalized = DMGetCoordinatesLocalizedLocal(dm::AbstractDM{PetscLib})\n\nCheck if the `DM` coordinates have been localized for cells on this process\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `areLocalized` - `PETSC_TRUE` if localized\n\nLevel: developer\n\n-seealso: `DM`, `DMLocalizeCoordinates()`, `DMGetCoordinatesLocalized()`, `DMSetPeriodicity()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocalizedLocal\"))\n\"\"\"\nfunction DMGetCoordinatesLocalizedLocal(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tareLocalized = Ref{PetscBool}()\n\n\tLibPETSc.DMGetCoordinatesLocalizedLocal(\n\t\tPetscLib,\n\t\tdm,\n\t\tareLocalized,\n\t)\n\n\treturn areLocalized[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSubDomainRestrict(global::AbstractDM{PetscLib},oscatter::VecScatter,gscatter::VecScatter,subdm::AbstractDM{PetscLib})\n\nrestricts user\n\nCollective if any hooks are\n\nInput Parameters:\n===\n- `global`   - The global `DM` to use as a base\n- `oscatter` - The scatter from domain global vector filling subdomain global vector with overlap\n- `gscatter` - The scatter from domain global vector filling subdomain local vector with ghosts\n- `subdm`    - The subdomain `DM` to update\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsenHookAdd()`, `MatRestrict()`, `DMCreateDomainDecomposition()`\n\n# External Links\n$(_doc_external(\"DM/DMSubDomainRestrict\"))\n\"\"\"\nfunction DMSubDomainRestrict(v_global::AbstractDM{PetscLib},oscatter::VecScatter,gscatter::VecScatter,subdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMSubDomainRestrict(\n\t\tPetscLib,\n\t\tv_global,\n\t\toscatter,\n\t\tgscatter,\n\t\tsubdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetOptionsPrefix(dm::AbstractDM{PetscLib},prefix::Vector{Char})\n\nSets the prefix prepended to all option names when searching through the options database\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`     - the `DM` context\n- `prefix` - the prefix to prepend\n\nLevel: advanced\n\nNote:\nA hyphen (-) must NOT be given at the beginning of the prefix name.\nThe first character of all runtime options is AUTOMATICALLY the hyphen.\n\nSee also: \n=== \n`DM`, `PetscObjectSetOptionsPrefix()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMSetOptionsPrefix\"))\n\"\"\"\nfunction DMSetOptionsPrefix(dm::AbstractDM{PetscLib},prefix::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetOptionsPrefix(\n\t\tPetscLib,\n\t\tdm,\n\t\tprefix,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMAppendOptionsPrefix(dm::AbstractDM{PetscLib},prefix::Vector{Char})\n\nAppends an additional string to an already existing prefix used for searching for\n`DM` options in the options database.\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`     - the `DM` context\n- `prefix` - the string to append to the current prefix\n\nLevel: advanced\n\nNote:\nIf the `DM` does not currently have an options prefix then this value is used alone as the prefix as if `DMSetOptionsPrefix()` had been called.\nA hyphen (-) must NOT be given at the beginning of the prefix name.\nThe first character of all runtime options is AUTOMATICALLY the hyphen.\n\nSee also: \n=== \n`DM`, `DMSetOptionsPrefix()`, `DMGetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMAppendOptionsPrefix\"))\n\"\"\"\nfunction DMAppendOptionsPrefix(dm::AbstractDM{PetscLib},prefix::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMAppendOptionsPrefix(\n\t\tPetscLib,\n\t\tdm,\n\t\tprefix,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetOptionsPrefix(dm::AbstractDM{PetscLib},prefix::Vector{Char})\n\nGets the prefix used for searching for all\nDM options in the options database.\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` context\n\nOutput Parameter:\n===\n- `prefix` - pointer to the prefix string used is returned\n\nLevel: advanced\n\nFortran Note:\nPass in a string 'prefix' of\nsufficient length to hold the prefix.\n\nSee also: \n=== \n`DM`, `DMSetOptionsPrefix()`, `DMAppendOptionsPrefix()`, `DMSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/DMGetOptionsPrefix\"))\n\"\"\"\nfunction DMGetOptionsPrefix(dm::AbstractDM{PetscLib},prefix::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGetOptionsPrefix(\n\t\tPetscLib,\n\t\tdm,\n\t\tprefix,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetVecType(dm::AbstractDM{PetscLib},ctype::VecType)\n\nSets the type of vector to be created with `DMCreateLocalVector()` and `DMCreateGlobalVector()`\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`    - initial distributed array\n- `ctype` - the vector type, for example `VECSTANDARD`, `VECCUDA`, or `VECVIENNACL`\n\nOptions Database Key:\n===\n- `-dm_vec_type ctype` - the type of vector to create\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMDestroy()`, `DMDAInterpolationType`, `VecType`, `DMGetVecType()`, `DMSetMatType()`, `DMGetMatType()`,\n`VECSTANDARD`, `VECCUDA`, `VECVIENNACL`, `DMCreateLocalVector()`, `DMCreateGlobalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMSetVecType\"))\n\"\"\"\nfunction DMSetVecType(dm::AbstractDM{PetscLib},ctype::VecType) where {PetscLib}\n\n\tLibPETSc.DMSetVecType(\n\t\tPetscLib,\n\t\tdm,\n\t\tctype,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctype = DMGetVecType(da::AbstractDM{PetscLib})\n\nGets the type of vector created with `DMCreateLocalVector()` and `DMCreateGlobalVector()`\n\nLogically Collective\n\nInput Parameter:\n===\n- `da` - initial distributed array\n\nOutput Parameter:\n===\n- `ctype` - the vector type\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMCreate()`, `DMDestroy()`, `DMDAInterpolationType`, `VecType`, `DMSetMatType()`, `DMGetMatType()`, `DMSetVecType()`\n\n# External Links\n$(_doc_external(\"DM/DMGetVecType\"))\n\"\"\"\nfunction DMGetVecType(da::AbstractDM{PetscLib}) where {PetscLib}\n\tctype = Ref{VecType}()\n\n\tLibPETSc.DMGetVecType(\n\t\tPetscLib,\n\t\tda,\n\t\tr_ctype,\n\t)\n\n\n\tctype = unsafe_string(r_ctype[])\n\treturn ctype\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetMatType(dm::AbstractDM{PetscLib},ctype::MatType)\n\nSets the type of matrix created with `DMCreateMatrix()`\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`    - the `DM` context\n- `ctype` - the matrix type, for example `MATMPIAIJ`\n\nOptions Database Key:\n===\n- `-dm_mat_type ctype` - the type of the matrix to create, for example mpiaij\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `MatType`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `DMGetMatType()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DM/DMSetMatType\"))\n\"\"\"\nfunction DMSetMatType(dm::AbstractDM{PetscLib},ctype::MatType) where {PetscLib}\n\n\tLibPETSc.DMSetMatType(\n\t\tPetscLib,\n\t\tdm,\n\t\tctype,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctype = DMGetMatType(dm::AbstractDM{PetscLib})\n\nGets the type of matrix that would be created with `DMCreateMatrix()`\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` context\n\nOutput Parameter:\n===\n- `ctype` - the matrix type\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `MatType`, `DMSetMatType()`\n\n# External Links\n$(_doc_external(\"DM/DMGetMatType\"))\n\"\"\"\nfunction DMGetMatType(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tctype = Ref{MatType}()\n\n\tLibPETSc.DMGetMatType(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_ctype,\n\t)\n\n\n\treturn ctype\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetISColoringType(dm::AbstractDM{PetscLib},ctype::ISColoringType)\n\nSets the type of coloring, `IS_COLORING_GLOBAL` or `IS_COLORING_LOCAL` that is created by the `DM`\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`    - the `DM` context\n- `ctype` - the matrix type\n\nOptions Database Key:\n===\n- `-dm_is_coloring_type` - global or local\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `MatType`, `DMGetMatType()`,\n`DMGetISColoringType()`, `ISColoringType`, `IS_COLORING_GLOBAL`, `IS_COLORING_LOCAL`\n\n# External Links\n$(_doc_external(\"DM/DMSetISColoringType\"))\n\"\"\"\nfunction DMSetISColoringType(dm::AbstractDM{PetscLib},ctype::ISColoringType) where {PetscLib}\n\n\tLibPETSc.DMSetISColoringType(\n\t\tPetscLib,\n\t\tdm,\n\t\tctype,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctype = DMGetISColoringType(dm::AbstractDM{PetscLib})\n\nGets the type of coloring, `IS_COLORING_GLOBAL` or `IS_COLORING_LOCAL` that is created by the `DM`\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` context\n\nOutput Parameter:\n===\n- `ctype` - the matrix type\n\nOptions Database Key:\n===\n- `-dm_is_coloring_type` - global or local\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMSetMatrixPreallocateOnly()`, `MatType`, `DMGetMatType()`,\n`ISColoringType`, `IS_COLORING_GLOBAL`, `IS_COLORING_LOCAL`\n\n# External Links\n$(_doc_external(\"DM/DMGetISColoringType\"))\n\"\"\"\nfunction DMGetISColoringType(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tctype = Ref{ISColoringType}()\n\n\tLibPETSc.DMGetISColoringType(\n\t\tPetscLib,\n\t\tdm,\n\t\tctype,\n\t)\n\n\treturn ctype\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctx = DMGetApplicationContext(dm::AbstractDM{PetscLib})\n\nGets a user context from a `DM` object\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameter:\n===\n- `ctx` - the user context\n\nLevel: intermediate\n\nNote:\nA user context is a way to pass problem specific information that is accessible whenever the `DM` is available\n\nSee also: \n=== \n`DM`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMGetApplicationContext\"))\n\"\"\"\nfunction DMGetApplicationContext(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tFloat64 = PetscLib.Float64\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, Float64)\n\n\tLibPETSc.DMGetApplicationContext(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = DMHasVariableBounds(dm::AbstractDM{PetscLib})\n\ndoes the `DM` object have a variable bounds function?\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object to destroy\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` if the variable bounds function exists\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMComputeVariableBounds()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"DM/DMHasVariableBounds\"))\n\"\"\"\nfunction DMHasVariableBounds(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.DMHasVariableBounds(\n\t\tPetscLib,\n\t\tdm,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = DMHasColoring(dm::AbstractDM{PetscLib})\n\ndoes the `DM` object have a method of providing a coloring?\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the DM object\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` if the `DM` has facilities for `DMCreateColoring()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateColoring()`\n\n# External Links\n$(_doc_external(\"DM/DMHasColoring\"))\n\"\"\"\nfunction DMHasColoring(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.DMHasColoring(\n\t\tPetscLib,\n\t\tdm,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = DMHasCreateRestriction(dm::AbstractDM{PetscLib})\n\ndoes the `DM` object have a method of providing a restriction?\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` if the `DM` has facilities for `DMCreateRestriction()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateRestriction()`, `DMHasCreateInterpolation()`, `DMHasCreateInjection()`\n\n# External Links\n$(_doc_external(\"DM/DMHasCreateRestriction\"))\n\"\"\"\nfunction DMHasCreateRestriction(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.DMHasCreateRestriction(\n\t\tPetscLib,\n\t\tdm,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = DMHasCreateInjection(dm::AbstractDM{PetscLib})\n\ndoes the `DM` object have a method of providing an injection?\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` if the `DM` has facilities for `DMCreateInjection()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCreateInjection()`, `DMHasCreateRestriction()`, `DMHasCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMHasCreateInjection\"))\n\"\"\"\nfunction DMHasCreateInjection(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.DMHasCreateInjection(\n\t\tPetscLib,\n\t\tdm,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMComputeVariableBounds(dm::AbstractDM{PetscLib},xl::AbstractVector,xu::AbstractVector)\n\ncompute variable bounds used by `SNESVI`.\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameters:\n===\n- `xl` - lower bound\n- `xu` - upper bound\n\nLevel: advanced\n\nNote:\nThis is generally not called by users. It calls the function provided by the user with DMSetVariableBounds()\n\nSee also: \n=== \n`DM`, `DMHasVariableBounds()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"DM/DMComputeVariableBounds\"))\n\"\"\"\nfunction DMComputeVariableBounds(dm::AbstractDM{PetscLib},xl::AbstractVector,xu::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMComputeVariableBounds(\n\t\tPetscLib,\n\t\tdm,\n\t\txl,\n\t\txu,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tis,subdm = DMCreateSubDM(dm::AbstractDM{PetscLib},numFields::Int,fields::Vector{Int})\n\nReturns an `IS` and `DM` encapsulating a subproblem defined by the fields passed in.\nThe fields are defined by `DMCreateFieldIS()`.\n\nNot collective\n\nInput Parameters:\n===\n- `dm`        - The `DM` object\n- `numFields` - The number of fields to select\n- `fields`    - The field numbers of the selected fields\n\nOutput Parameters:\n===\n- `is`    - The global indices for all the degrees of freedom in the new sub `DM`, use `NULL` if not needed\n- `subdm` - The `DM` for the subproblem, use `NULL` if not needed\n\nLevel: intermediate\n\nNote:\nYou need to call `DMPlexSetMigrationSF()` on the original `DM` if you want the Global-To-Natural map to be automatically constructed\n\nSee also: \n=== \n`DM`, `DMCreateFieldIS()`, `DMCreateFieldDecomposition()`, `DMAddField()`, `DMCreateSuperDM()`, `IS`, `DMPlexSetMigrationSF()`, `DMDestroy()`, `DMView()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSubDM\"))\n\"\"\"\nfunction DMCreateSubDM(dm::AbstractDM{PetscLib},numFields::Int,fields::Vector{Int}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tis = LibPETSc.IS()\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tsubdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMCreateSubDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tnumFields,\n\t\tfields,\n\t\tis,\n\t\tsubdm,\n\t)\n\n\treturn is,subdm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tis,subdm = DMCreateSectionSubDM(dm::AbstractDM{PetscLib},numFields::Int,fields::Vector{Int},numComps::Vector{Int},comps::Vector{Int})\n\nReturns an `IS` and `subDM` containing a `PetscSection` that encapsulates a subproblem defined by a subset of the fields in a `PetscSection` in the `DM`.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`        - The `DM` object\n- `numFields` - The number of fields to incorporate into `subdm`\n- `fields`    - The field numbers of the selected fields\n- `numComps`  - The number of components from each field to incorporate into `subdm`, or PETSC_DECIDE for all components\n- `comps`     - The component numbers of the selected fields (omitted for PTESC_DECIDE fields)\n\nOutput Parameters:\n===\n- `is`    - The global indices for the subproblem or `NULL`\n- `subdm` - The `DM` for the subproblem, which must already have be cloned from `dm` or `NULL`\n\nLevel: intermediate\n\nNotes:\nIf `is` and `subdm` are both `NULL` this does nothing\n\n-seealso: `DMCreateSubDM()`, `DMGetLocalSection()`, `DMPlexSetMigrationSF()`, `DMView()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSectionSubDM\"))\n\"\"\"\nfunction DMCreateSectionSubDM(dm::AbstractDM{PetscLib},numFields::Int,fields::Vector{Int},numComps::Vector{Int},comps::Vector{Int}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tis = LibPETSc.IS()\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tsubdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMCreateSectionSubDM(\n\t\tPetscLib,\n\t\tdm,\n\t\tnumFields,\n\t\tfields,\n\t\tnumComps,\n\t\tcomps,\n\t\tis,\n\t\tsubdm,\n\t)\n\n\treturn is,subdm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlevel = DMGetRefineLevel(dm::AbstractDM{PetscLib})\n\nGets the number of refinements that have generated this `DM` from some initial `DM`.\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameter:\n===\n- `level` - number of refinements\n\nLevel: developer\n\nNote:\nThis can be used, by example, to set the number of coarser levels associated with this `DM` for a multigrid solver.\n\nSee also: \n=== \n`DM`, `DMRefine()`, `DMCoarsen()`, `DMGetCoarsenLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMGetRefineLevel\"))\n\"\"\"\nfunction DMGetRefineLevel(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tlevel = [PetscInt(1)]\n\n\tLibPETSc.DMGetRefineLevel(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(level,1),\n\t)\n\n\treturn level[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetRefineLevel(dm::AbstractDM{PetscLib},level::Int)\n\nSets the number of refinements that have generated this `DM`.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - the `DM` object\n- `level` - number of refinements\n\nLevel: advanced\n\nNotes:\nThis value is used by `PCMG` to determine how many multigrid levels to use\n\nThe values are usually set automatically by the process that is causing the refinements of an initial `DM` by calling this routine.\n\nSee also: \n=== \n`DM`, `DMGetRefineLevel()`, `DMCoarsen()`, `DMGetCoarsenLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMSetRefineLevel\"))\n\"\"\"\nfunction DMSetRefineLevel(dm::AbstractDM{PetscLib},level::Int) where {PetscLib}\n\n\tLibPETSc.DMSetRefineLevel(\n\t\tPetscLib,\n\t\tdm,\n\t\tlevel,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlevel = DMGetCoarsenLevel(dm::AbstractDM{PetscLib})\n\nGets the number of coarsenings that have generated this `DM`.\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DM` object\n\nOutput Parameter:\n===\n- `level` - number of coarsenings\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMSetCoarsenLevel()`, `DMGetRefineLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCoarsenLevel\"))\n\"\"\"\nfunction DMGetCoarsenLevel(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tlevel = [PetscInt(1)]\n\n\tLibPETSc.DMGetCoarsenLevel(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(level,1),\n\t)\n\n\treturn level[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetCoarsenLevel(dm::AbstractDM{PetscLib},level::Int)\n\nSets the number of coarsenings that have generated this `DM`.\n\nCollective\n\nInput Parameters:\n===\n- `dm`    - the `DM` object\n- `level` - number of coarsenings\n\nLevel: developer\n\nNote:\nThis is rarely used directly, the information is automatically set when a `DM` is created with `DMCoarsen()`\n\nSee also: \n=== \n`DM`, `DMCoarsen()`, `DMGetCoarsenLevel()`, `DMGetRefineLevel()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`\n\n# External Links\n$(_doc_external(\"DM/DMSetCoarsenLevel\"))\n\"\"\"\nfunction DMSetCoarsenLevel(dm::AbstractDM{PetscLib},level::Int) where {PetscLib}\n\n\tLibPETSc.DMSetCoarsenLevel(\n\t\tPetscLib,\n\t\tdm,\n\t\tlevel,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdm = VecGetDM(v::AbstractVector)\n\nGets the `DM` defining the data layout of the vector\n\nNot Collective\n\nInput Parameter:\n===\n- `v` - The `Vec`\n\nOutput Parameter:\n===\n- `dm` - The `DM`\n\nLevel: intermediate\n\nNote:\nA `Vec` may not have a `DM` associated with it.\n\nSee also: \n=== \n`DM`, `VecSetDM()`, `DMGetLocalVector()`, `DMGetGlobalVector()`, `DMSetVecType()`\n\n# External Links\n$(_doc_external(\"DM/VecGetDM\"))\n\"\"\"\nfunction VecGetDM(v::AbstractVector{PetscLib}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.VecGetDM(\n\t\tPetscLib,\n\t\tv,\n\t\tdm,\n\t)\n\n\treturn dm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t VecSetDM(v::AbstractVector,dm::AbstractDM{PetscLib})\n\nSets the `DM` defining the data layout of the vector.\n\nNot Collective\n\nInput Parameters:\n===\n- `v`  - The `Vec`\n- `dm` - The `DM`\n\nLevel: developer\n\nNotes:\nThis is rarely used, generally one uses `DMGetLocalVector()` or  `DMGetGlobalVector()` to create a vector associated with a given `DM`\n\nThis is NOT the same as `DMCreateGlobalVector()` since it does not change the view methods or perform other customization, but merely sets the `DM` member.\n\nSee also: \n=== \n`DM`, `VecGetDM()`, `DMGetLocalVector()`, `DMGetGlobalVector()`, `DMSetVecType()`\n\n# External Links\n$(_doc_external(\"DM/VecSetDM\"))\n\"\"\"\nfunction VecSetDM(v::AbstractVector,dm::AbstractDM{PetscLib}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.VecSetDM(\n\t\tPetscLib,\n\t\tv,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdm = MatGetDM(A::AbstractMatrix)\n\nGets the `DM` defining the data layout of the matrix\n\nNot Collective\n\nInput Parameter:\n===\n- `A` - The `Mat`\n\nOutput Parameter:\n===\n- `dm` - The `DM`\n\nLevel: intermediate\n\nNote:\nA matrix may not have a `DM` associated with it\n\nDeveloper Note:\nSince the `Mat` class doesn't know about the `DM` class the `DM` object is associated with the `Mat` through a `PetscObjectCompose()` operation\n\nSee also: \n=== \n`DM`, `MatSetDM()`, `DMCreateMatrix()`, `DMSetMatType()`\n\n# External Links\n$(_doc_external(\"DM/MatGetDM\"))\n\"\"\"\nfunction MatGetDM(A::AbstractMatrix{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.MatGetDM(\n\t\tPetscLib,\n\t\tA,\n\t\tdm,\n\t)\n\n\treturn dm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t MatSetDM(A::AbstractMatrix,dm::AbstractDM{PetscLib})\n\nSets the `DM` defining the data layout of the matrix\n\nNot Collective\n\nInput Parameters:\n===\n- `A`  - The `Mat`\n- `dm` - The `DM`\n\nLevel: developer\n\nNote:\nThis is rarely used in practice, rather `DMCreateMatrix()` is used to create a matrix associated with a particular `DM`\n\nDeveloper Note:\nSince the `Mat` class doesn't know about the `DM` class the `DM` object is associated with\nthe `Mat` through a `PetscObjectCompose()` operation\n\nSee also: \n=== \n`DM`, `MatGetDM()`, `DMCreateMatrix()`, `DMSetMatType()`\n\n# External Links\n$(_doc_external(\"DM/MatSetDM\"))\n\"\"\"\nfunction MatSetDM(A::AbstractMatrix,dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.MatSetDM(\n\t\tPetscLib,\n\t\tA,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t MatFDColoringUseDM(coloring::AbstractMatrix,fdcoloring::MatFDColoring)\n\nallows a `MatFDColoring` object to use the `DM` associated with the matrix to compute a `IS_COLORING_LOCAL` coloring\n\nInput Parameters:\n===\n- `coloring`   - The matrix to get the `DM` from\n- `fdcoloring` - the `MatFDColoring` object\n\nLevel: advanced\n\nDeveloper Note:\nThis routine exists because the PETSc `Mat` library does not know about the `DM` objects\n\nSee also: \n=== \n`DM`, `MatFDColoring`, `MatFDColoringCreate()`, `ISColoringType`\n\n# External Links\n$(_doc_external(\"DM/MatFDColoringUseDM\"))\n\"\"\"\nfunction MatFDColoringUseDM(coloring::AbstractMatrix{PetscLib},fdcoloring::MatFDColoring) where {PetscLib}\n\n\tLibPETSc.MatFDColoringUseDM(\n\t\tPetscLib,\n\t\tcoloring,\n\t\tfdcoloring,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMPrintCellIndices(PetscLib, c::Int,name::Vector{Char},len::Int,x::Vector{Int})\n\n\n# External Links\n$(_doc_external(\"DM/DMPrintCellIndices\"))\n\"\"\"\nfunction DMPrintCellIndices(PetscLib, c::Int,name::Vector{Char},len::Int,x::Vector{Int}) \n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMPrintCellIndices(\n\t\tPetscLib,\n\t\tc,\n\t\tname,\n\t\tlen,\n\t\tx,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMPrintCellVector(c::Int,name::Vector{Char},len::Int,x::Vector{Float64})\n\n\n# External Links\n$(_doc_external(\"DM/DMPrintCellVector\"))\n\"\"\"\nfunction DMPrintCellVector(PetscLib, c::Int,name::Vector{Char},len::Int,x::Vector{Float64})\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMPrintCellVector(\n\t\tPetscLib,\n\t\tc,\n\t\tname,\n\t\tlen,\n\t\tx,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMPrintCellVectorReal(c::Int,name::Vector{Char},len::Int,x::Vector{Float64})\n\n\n# External Links\n$(_doc_external(\"DM/DMPrintCellVectorReal\"))\n\"\"\"\nfunction DMPrintCellVectorReal(PetscLib, c::Int,name::Vector{Char},len::Int,x::Vector{Float64}) \n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMPrintCellVectorReal(\n\t\tPetscLib,\n\t\tc,\n\t\tname,\n\t\tlen,\n\t\tx,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMPrintCellMatrix(c::Int,name::Vector{Char},rows::Int,cols::Int,A::Vector{Float64})\n\n\n# External Links\n$(_doc_external(\"DM/DMPrintCellMatrix\"))\n\"\"\"\nfunction DMPrintCellMatrix(PetscLib, c::Int,name::Vector{Char},rows::Int,cols::Int,A::Vector{Float64})\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMPrintCellMatrix(\n\t\tPetscLib,\n\t\tc,\n\t\tname,\n\t\trows,\n\t\tcols,\n\t\tA,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMPrintLocalVec(dm::AbstractDM{PetscLib},name::Vector{Char},tol<:AbstractFloat,X::AbstractVector)\n\n\n# External Links\n$(_doc_external(\"DM/DMPrintLocalVec\"))\n\"\"\"\nfunction DMPrintLocalVec(dm::AbstractDM{PetscLib},name::Vector{Char},tol::Float64,X::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMPrintLocalVec(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\ttol,\n\t\tX,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsection = DMGetSection(dm::AbstractDM{PetscLib})\n\nGet the `PetscSection` encoding the local data layout for the `DM`.   This is equivalent to `DMGetLocalSection()`. Deprecated in v3.12\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `section` - The `PetscSection`\n\nOptions Database Key:\n===\n- `-dm_petscsection_view` - View the `PetscSection` created by the `DM`\n\nLevel: advanced\n\nNotes:\nUse `DMGetLocalSection()` in new code.\n\nThis gets a borrowed reference, so the user should not destroy this `PetscSection`.\n\nSee also: \n=== \n`DM`, `DMGetLocalSection()`, `DMSetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetSection\"))\n\"\"\"\nfunction DMGetSection(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsection = LibPETSc.PetscSection()\n\n\tLibPETSc.DMGetSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn section\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetSection(dm::AbstractDM{PetscLib},section::PetscSection)\n\nSet the `PetscSection` encoding the local data layout for the `DM`.  This is equivalent to `DMSetLocalSection()`. Deprecated in v3.12\n\nInput Parameters:\n===\n- `dm`      - The `DM`\n- `section` - The `PetscSection`\n\nLevel: advanced\n\nNotes:\nUse `DMSetLocalSection()` in new code.\n\nAny existing `PetscSection` will be destroyed\n\nSee also: \n=== \n`DM`, `DMSetLocalSection()`, `DMGetLocalSection()`, `DMSetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetSection\"))\n\"\"\"\nfunction DMSetSection(dm::AbstractDM{PetscLib},section::PetscSection) where {PetscLib}\n\n\tLibPETSc.DMSetSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsection = DMGetLocalSection(dm::AbstractDM{PetscLib})\n\nGet the `PetscSection` encoding the local data layout for the `DM`.\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `section` - The `PetscSection`\n\nOptions Database Key:\n===\n- `-dm_petscsection_view` - View the section created by the `DM`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSection`.\n\nSee also: \n=== \n`DM`, `DMSetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLocalSection\"))\n\"\"\"\nfunction DMGetLocalSection(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsection = LibPETSc.PetscSection()\n\n\tLibPETSc.DMGetLocalSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn section\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetLocalSection(dm::AbstractDM{PetscLib},section::PetscSection)\n\nSet the `PetscSection` encoding the local data layout for the `DM`.\n\nInput Parameters:\n===\n- `dm`      - The `DM`\n- `section` - The `PetscSection`\n\nLevel: intermediate\n\nNote:\nAny existing Section will be destroyed\n\nSee also: \n=== \n`DM`, `PetscSection`, `DMGetLocalSection()`, `DMSetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLocalSection\"))\n\"\"\"\nfunction DMSetLocalSection(dm::AbstractDM{PetscLib},section::PetscSection) where {PetscLib}\n\n\tLibPETSc.DMSetLocalSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsection = DMGetGlobalSection(dm::AbstractDM{PetscLib})\n\nGet the `PetscSection` encoding the global data layout for the `DM`.\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `section` - The `PetscSection`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSection`.\n\nSee also: \n=== \n`DM`, `DMSetLocalSection()`, `DMGetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetGlobalSection\"))\n\"\"\"\nfunction DMGetGlobalSection(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsection = LibPETSc.PetscSection()\n\n\tLibPETSc.DMGetGlobalSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn section\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetGlobalSection(dm::AbstractDM{PetscLib},section::PetscSection)\n\nSet the `PetscSection` encoding the global data layout for the `DM`.\n\nInput Parameters:\n===\n- `dm`      - The `DM`\n- `section` - The PetscSection, or `NULL`\n\nLevel: intermediate\n\nNote:\nAny existing `PetscSection` will be destroyed\n\nSee also: \n=== \n`DM`, `DMGetGlobalSection()`, `DMSetLocalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMSetGlobalSection\"))\n\"\"\"\nfunction DMSetGlobalSection(dm::AbstractDM{PetscLib},section::PetscSection) where {PetscLib}\n\n\tLibPETSc.DMSetGlobalSection(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tperm,blockStarts = DMCreateSectionPermutation(dm::AbstractDM{PetscLib})\n\nCreate a permutation of the `PetscSection` chart and optionally a block structure.\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameters:\n===\n- `perm`        - A permutation of the mesh points in the chart\n- `blockStarts` - A high bit is set for the point that begins every block, or `NULL` for default blocking\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `PetscSection`, `DMGetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSectionPermutation\"))\n\"\"\"\nfunction DMCreateSectionPermutation(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tperm = LibPETSc.IS()\n\tblockStarts = LibPETSc.PetscBT()\n\n\tLibPETSc.DMCreateSectionPermutation(\n\t\tPetscLib,\n\t\tdm,\n\t\tperm,\n\t\tblockStarts,\n\t)\n\n\treturn perm,blockStarts\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMReorderSectionSetDefault(dm::AbstractDM{PetscLib},reorder::DMReorderDefaultFlag)\n\nSet flag indicating whether the local section should be reordered by default\n\nLogically collective\n\nInput Parameters:\n===\n- `dm`      - The DM\n- `reorder` - Flag for reordering\n\nLevel: intermediate\n\n-seealso: `DMReorderSectionGetDefault()`\n\n# External Links\n$(_doc_external(\"DM/DMReorderSectionSetDefault\"))\n\"\"\"\nfunction DMReorderSectionSetDefault(dm::AbstractDM{PetscLib},reorder::DMReorderDefaultFlag) where {PetscLib}\n\n\tLibPETSc.DMReorderSectionSetDefault(\n\t\tPetscLib,\n\t\tdm,\n\t\treorder,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMReorderSectionSetType(dm::AbstractDM{PetscLib},reorder::MatOrderingType)\n\nSet the type of local section reordering\n\nLogically collective\n\nInput Parameters:\n===\n- `dm`      - The DM\n- `reorder` - The reordering method\n\nLevel: intermediate\n\n-seealso: `DMReorderSectionGetType()`, `DMReorderSectionSetDefault()`\n\n# External Links\n$(_doc_external(\"DM/DMReorderSectionSetType\"))\n\"\"\"\nfunction DMReorderSectionSetType(dm::AbstractDM{PetscLib},reorder::MatOrderingType) where {PetscLib}\n\n\tLibPETSc.DMReorderSectionSetType(\n\t\tPetscLib,\n\t\tdm,\n\t\treorder,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMUseTensorOrder(dm::AbstractDM{PetscLib},tensor::PetscBool)\n\nUse a tensor product closure ordering for the default section\n\nInput Parameters:\n===\n- `dm`     - The DM\n- `tensor` - Flag for tensor order\n\nLevel: developer\n\n-seealso: `DMPlexSetClosurePermutationTensor()`, `PetscSectionResetClosurePermutation()`\n\n# External Links\n$(_doc_external(\"DM/DMUseTensorOrder\"))\n\"\"\"\nfunction DMUseTensorOrder(dm::AbstractDM{PetscLib},tensor::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMUseTensorOrder(\n\t\tPetscLib,\n\t\tdm,\n\t\ttensor,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsf = DMGetSectionSF(dm::AbstractDM{PetscLib})\n\nGet the `PetscSF` encoding the parallel dof overlap for the `DM`. If it has not been set,\nit is created from the default `PetscSection` layouts in the `DM`.\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSF`.\n\nSee also: \n=== \n`DM`, `DMSetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMGetSectionSF\"))\n\"\"\"\nfunction DMGetSectionSF(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsf = LibPETSc.PetscSF()\n\n\tLibPETSc.DMGetSectionSF(\n\t\tPetscLib,\n\t\tdm,\n\t\tsf,\n\t)\n\n\treturn sf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetSectionSF(dm::AbstractDM{PetscLib},sf::PetscSF)\n\nSet the `PetscSF` encoding the parallel dof overlap for the `DM`\n\nInput Parameters:\n===\n- `dm` - The `DM`\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nAny previous `PetscSF` is destroyed\n\nSee also: \n=== \n`DM`, `DMGetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMSetSectionSF\"))\n\"\"\"\nfunction DMSetSectionSF(dm::AbstractDM{PetscLib},sf::PetscSF) where {PetscLib}\n\n\tLibPETSc.DMSetSectionSF(\n\t\tPetscLib,\n\t\tdm,\n\t\tsf,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCreateSectionSF(dm::AbstractDM{PetscLib},localSection::PetscSection,globalSection::PetscSection)\n\nCreate the `PetscSF` encoding the parallel dof overlap for the `DM` based upon the `PetscSection`s\ndescribing the data layout.\n\nInput Parameters:\n===\n- `dm`            - The `DM`\n- `localSection`  - `PetscSection` describing the local data layout\n- `globalSection` - `PetscSection` describing the global data layout\n\nLevel: developer\n\nNote:\nOne usually uses `DMGetSectionSF()` to obtain the `PetscSF`\n\nDeveloper Note:\nSince this routine has for arguments the two sections from the `DM` and puts the resulting `PetscSF`\ndirectly into the `DM`, perhaps this function should not take the local and global sections as\ninput and should just obtain them from the `DM`? Plus PETSc creation functions return the thing\nthey create, this returns nothing\n\nSee also: \n=== \n`DM`, `DMGetSectionSF()`, `DMSetSectionSF()`, `DMGetLocalSection()`, `DMGetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateSectionSF\"))\n\"\"\"\nfunction DMCreateSectionSF(dm::AbstractDM{PetscLib},localSection::PetscSection,globalSection::PetscSection) where {PetscLib}\n\n\tLibPETSc.DMCreateSectionSF(\n\t\tPetscLib,\n\t\tdm,\n\t\tlocalSection,\n\t\tglobalSection,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsf = DMGetPointSF(dm::AbstractDM{PetscLib})\n\nGet the `PetscSF` encoding the parallel section point overlap for the `DM`.\n\nNot collective but the resulting `PetscSF` is collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSF`.\n\nSee also: \n=== \n`DM`, `DMSetPointSF()`, `DMGetSectionSF()`, `DMSetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMGetPointSF\"))\n\"\"\"\nfunction DMGetPointSF(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsf = LibPETSc.PetscSF()\n\n\tLibPETSc.DMGetPointSF(\n\t\tPetscLib,\n\t\tdm,\n\t\tsf,\n\t)\n\n\treturn sf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetPointSF(dm::AbstractDM{PetscLib},sf::PetscSF)\n\nSet the `PetscSF` encoding the parallel section point overlap for the `DM`.\n\nCollective\n\nInput Parameters:\n===\n- `dm` - The `DM`\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetPointSF()`, `DMGetSectionSF()`, `DMSetSectionSF()`, `DMCreateSectionSF()`\n\n# External Links\n$(_doc_external(\"DM/DMSetPointSF\"))\n\"\"\"\nfunction DMSetPointSF(dm::AbstractDM{PetscLib},sf::PetscSF) where {PetscLib}\n\n\tLibPETSc.DMSetPointSF(\n\t\tPetscLib,\n\t\tdm,\n\t\tsf,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsf = DMGetNaturalSF(dm::AbstractDM{PetscLib})\n\nGet the `PetscSF` encoding the map back to the original mesh ordering\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `sf` - The `PetscSF`\n\nLevel: intermediate\n\nNote:\nThis gets a borrowed reference, so the user should not destroy this `PetscSF`.\n\nSee also: \n=== \n`DM`, `DMSetNaturalSF()`, `DMSetUseNatural()`, `DMGetUseNatural()`, `DMPlexCreateGlobalToNaturalSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNaturalSF\"))\n\"\"\"\nfunction DMGetNaturalSF(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsf = LibPETSc.PetscSF()\n\n\tLibPETSc.DMGetNaturalSF(\n\t\tPetscLib,\n\t\tdm,\n\t\tsf,\n\t)\n\n\treturn sf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetNaturalSF(dm::AbstractDM{PetscLib},sf::PetscSF)\n\nSet the PetscSF encoding the map back to the original mesh ordering\n\nInput Parameters:\n===\n- `dm` - The DM\n- `sf` - The PetscSF\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNaturalSF()`, `DMSetUseNatural()`, `DMGetUseNatural()`, `DMPlexCreateGlobalToNaturalSF()`, `DMPlexDistribute()`\n\n# External Links\n$(_doc_external(\"DM/DMSetNaturalSF\"))\n\"\"\"\nfunction DMSetNaturalSF(dm::AbstractDM{PetscLib},sf::PetscSF) where {PetscLib}\n\n\tLibPETSc.DMSetNaturalSF(\n\t\tPetscLib,\n\t\tdm,\n\t\tsf,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsection,mat,bias = DMGetDefaultConstraints(dm::AbstractDM{PetscLib})\n\nGet the `PetscSection` and `Mat` that specify the local constraint interpolation. See `DMSetDefaultConstraints()` for a description of the purpose of constraint interpolation.\n\nnot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameters:\n===\n- `section` - The `PetscSection` describing the range of the constraint matrix: relates rows of the constraint matrix to dofs of the default section.  Returns `NULL` if there are no local constraints.\n- `mat`     - The `Mat` that interpolates local constraints: its width should be the layout size of the default section.  Returns `NULL` if there are no local constraints.\n- `bias`    - Vector containing bias to be added to constrained dofs\n\nLevel: advanced\n\nNote:\nThis gets borrowed references, so the user should not destroy the `PetscSection`, `Mat`, or `Vec`.\n\nSee also: \n=== \n`DM`, `DMSetDefaultConstraints()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDefaultConstraints\"))\n\"\"\"\nfunction DMGetDefaultConstraints(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tsection = LibPETSc.PetscSection()\n\tbias = CVec()\n\n\tLibPETSc.DMGetDefaultConstraints(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t\tmat,\n\t\tbias,\n\t)\n\n\treturn section,mat,bias\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetDefaultConstraints(dm::AbstractDM{PetscLib},section::PetscSection,mat::AbstractMatrix,bias::AbstractVector)\n\nSet the `PetscSection` and `Mat` that specify the local constraint interpolation.\n\nCollective\n\nInput Parameters:\n===\n- `dm`      - The `DM`\n- `section` - The `PetscSection` describing the range of the constraint matrix: relates rows of the constraint matrix to dofs of the default section.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).\n- `mat`     - The `Mat` that interpolates local constraints: its width should be the layout size of the default section:  `NULL` indicates no constraints.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).\n- `bias`    - A bias vector to be added to constrained values in the local vector.  `NULL` indicates no bias.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).\n\nLevel: advanced\n\nNotes:\nIf a constraint matrix is specified, then it is applied during `DMGlobalToLocalEnd()` when mode is `INSERT_VALUES`, `INSERT_BC_VALUES`, or `INSERT_ALL_VALUES`.  Without a constraint matrix, the local vector l returned by `DMGlobalToLocalEnd()` contains values that have been scattered from a global vector without modification; with a constraint matrix A, l is modified by computing c = A * l + bias, l[s[i]] = c[i], where the scatter s is defined by the `PetscSection` returned by `DMGetDefaultConstraints()`.\n\nIf a constraint matrix is specified, then its adjoint is applied during `DMLocalToGlobalBegin()` when mode is `ADD_VALUES`, `ADD_BC_VALUES`, or `ADD_ALL_VALUES`.  Without a constraint matrix, the local vector l is accumulated into a global vector without modification; with a constraint matrix A, l is first modified by computing c[i] = l[s[i]], l[s[i]] = 0, l = l + A'*c, which is the adjoint of the operation described above.  Any bias, if specified, is ignored when accumulating.\n\nThis increments the references of the `PetscSection`, `Mat`, and `Vec`, so they user can destroy them.\n\nSee also: \n=== \n`DM`, `DMGetDefaultConstraints()`\n\n# External Links\n$(_doc_external(\"DM/DMSetDefaultConstraints\"))\n\"\"\"\nfunction DMSetDefaultConstraints(dm::AbstractDM{PetscLib},section::PetscSection,mat::AbstractMatrix,bias::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetDefaultConstraints(\n\t\tPetscLib,\n\t\tdm,\n\t\tsection,\n\t\tmat,\n\t\tbias,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\todm = DMGetOutputDM(dm::AbstractDM{PetscLib})\n\nRetrieve the `DM` associated with the layout for output\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The original `DM`\n\nOutput Parameter:\n===\n- `odm` - The `DM` which provides the layout for output\n\nLevel: intermediate\n\nNote:\nIn some situations the vector obtained with `DMCreateGlobalVector()` excludes points for degrees of freedom that are associated with fixed (Dirichelet) boundary\nconditions since the algebraic solver does not solve for those variables. The output `DM` includes these excluded points and its global vector contains the\nlocations for those dof so that they can be output to a file or other viewer along with the unconstrained dof.\n\nSee also: \n=== \n`DM`, `VecView()`, `DMGetGlobalSection()`, `DMCreateGlobalVector()`, `PetscSectionHasConstraints()`, `DMSetGlobalSection()`\n\n# External Links\n$(_doc_external(\"DM/DMGetOutputDM\"))\n\"\"\"\nfunction DMGetOutputDM(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\todm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.DMGetOutputDM(\n\t\tPetscLib,\n\t\tdm,\n\t\todm,\n\t)\n\n\treturn odm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetOutputSequenceNumber(dm::AbstractDM{PetscLib},num::Int,val<:AbstractFloat)\n\nSet the sequence number/value for output\n\nInput Parameters:\n===\n- `dm`  - The original `DM`\n- `num` - The output sequence number\n- `val` - The output sequence value\n\nLevel: intermediate\n\nNote:\nThis is intended for output that should appear in sequence, for instance\na set of timesteps in an `PETSCVIEWERHDF5` file, or a set of realizations of a stochastic system.\n\nSee also: \n=== \n`DM`, `VecView()`\n\n# External Links\n$(_doc_external(\"DM/DMSetOutputSequenceNumber\"))\n\"\"\"\nfunction DMSetOutputSequenceNumber(dm::AbstractDM{PetscLib},num::Int,val::Float64) where {PetscLib}\n\n\tLibPETSc.DMSetOutputSequenceNumber(\n\t\tPetscLib,\n\t\tdm,\n\t\tnum,\n\t\tval,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tnumFields = DMGetNumFields(dm::AbstractDM{PetscLib})\n\nGet the number of fields in the `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `numFields` - The number of fields\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetNumFields()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumFields\"))\n\"\"\"\nfunction DMGetNumFields(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tnumFields = [PetscInt(1)]\n\n\tLibPETSc.DMGetNumFields(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(numFields,1),\n\t)\n\n\treturn numFields[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetNumFields(dm::AbstractDM{PetscLib},numFields::Int)\n\nSet the number of fields in the `DM`\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`        - The `DM`\n- `numFields` - The number of fields\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNumFields()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetNumFields\"))\n\"\"\"\nfunction DMSetNumFields(dm::AbstractDM{PetscLib},numFields::Int) where {PetscLib}\n\n\tLibPETSc.DMSetNumFields(\n\t\tPetscLib,\n\t\tdm,\n\t\tnumFields,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlabel,disc = DMGetField(dm::AbstractDM{PetscLib},f::Int)\n\nReturn the `DMLabel` and discretization object for a given `DM` field\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - The `DM`\n- `f`  - The field number\n\nOutput Parameters:\n===\n- `label` - The label indicating the support of the field, or `NULL` for the entire mesh (pass in `NULL` if not needed)\n- `disc`  - The discretization object (pass in `NULL` if not needed)\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetField\"))\n\"\"\"\nfunction DMGetField(dm::AbstractDM{PetscLib},f::Int) where {PetscLib}\n\tlabel = LibPETSc.DMLabel()\n\tdisc = LibPETSc.PetscObject()\n\n\tLibPETSc.DMGetField(\n\t\tPetscLib,\n\t\tdm,\n\t\tf,\n\t\tlabel,\n\t\tdisc,\n\t)\n\n\treturn label,disc\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetField(dm::AbstractDM{PetscLib},f::Int,label::DMLabel,disc::PetscObject)\n\nSet the discretization object for a given `DM` field. Usually one would call `DMAddField()` which automatically handles\nthe field numbering.\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM`\n- `f`     - The field number\n- `label` - The label indicating the support of the field, or `NULL` for the entire mesh\n- `disc`  - The discretization object\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMGetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetField\"))\n\"\"\"\nfunction DMSetField(dm::AbstractDM{PetscLib},f::Int,label::DMLabel,disc::PetscObject) where {PetscLib}\n\n\tLibPETSc.DMSetField(\n\t\tPetscLib,\n\t\tdm,\n\t\tf,\n\t\tlabel,\n\t\tdisc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMAddField(dm::AbstractDM{PetscLib},label::DMLabel,disc::PetscObject)\n\nAdd a field to a `DM` object. A field is a function space defined by of a set of discretization points (geometric entities)\nand a discretization object that defines the function space associated with those points.\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM`\n- `label` - The label indicating the support of the field, or `NULL` for the entire mesh\n- `disc`  - The discretization object\n\nLevel: intermediate\n\nNotes:\nThe label already exists or will be added to the `DM` with `DMSetLabel()`.\n\nFor example, a piecewise continuous pressure field can be defined by coefficients at the cell centers of a mesh and piecewise constant functions\nwithin each cell. Thus a specific function in the space is defined by the combination of a `Vec` containing the coefficients, a `DM` defining the\ngeometry entities, a `DMLabel` indicating a subset of those geometric entities, and a discretization object, such as a `PetscFE`.\n\nSee also: \n=== \n`DM`, `DMSetLabel()`, `DMSetField()`, `DMGetField()`, `PetscFE`\n\n# External Links\n$(_doc_external(\"DM/DMAddField\"))\n\"\"\"\nfunction DMAddField(dm::AbstractDM{PetscLib},label::DMLabel,disc::PetscObject) where {PetscLib}\n\n\tLibPETSc.DMAddField(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t\tdisc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetFieldAvoidTensor(dm::AbstractDM{PetscLib},f::Int,avoidTensor::PetscBool)\n\nSet flag to avoid defining the field on tensor cells\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`          - The `DM`\n- `f`           - The field index\n- `avoidTensor` - `PETSC_TRUE` to skip defining the field on tensor cells\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetFieldAvoidTensor()`, `DMSetField()`, `DMGetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetFieldAvoidTensor\"))\n\"\"\"\nfunction DMSetFieldAvoidTensor(dm::AbstractDM{PetscLib},f::Int,avoidTensor::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetFieldAvoidTensor(\n\t\tPetscLib,\n\t\tdm,\n\t\tf,\n\t\tavoidTensor,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tavoidTensor = DMGetFieldAvoidTensor(dm::AbstractDM{PetscLib},f::Int)\n\nGet flag to avoid defining the field on tensor cells\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - The `DM`\n- `f`  - The field index\n\nOutput Parameter:\n===\n- `avoidTensor` - The flag to avoid defining the field on tensor cells\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMAddField()`, `DMSetField()`, `DMGetField()`, `DMSetFieldAvoidTensor()`\n\n# External Links\n$(_doc_external(\"DM/DMGetFieldAvoidTensor\"))\n\"\"\"\nfunction DMGetFieldAvoidTensor(dm::AbstractDM{PetscLib},f::Int) where {PetscLib}\n\tavoidTensor = Ref{PetscBool}()\n\n\tLibPETSc.DMGetFieldAvoidTensor(\n\t\tPetscLib,\n\t\tdm,\n\t\tf,\n\t\tavoidTensor,\n\t)\n\n\treturn avoidTensor[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearFields(dm::AbstractDM{PetscLib})\n\nRemove all fields from the `DM`\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNumFields()`, `DMSetNumFields()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMClearFields\"))\n\"\"\"\nfunction DMClearFields(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMClearFields(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCopyFields(dm::AbstractDM{PetscLib},minDegree::Int,maxDegree::Int,newdm::AbstractDM{PetscLib})\n\nCopy the discretizations for the `DM` into another `DM`\n\nCollective\n\nInput Parameters:\n===\n- `dm`        - The `DM`\n- `minDegree` - Minimum degree for a discretization, or `PETSC_DETERMINE` for no limit\n- `maxDegree` - Maximum degree for a discretization, or `PETSC_DETERMINE` for no limit\n\nOutput Parameter:\n===\n- `newdm` - The `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetField()`, `DMSetField()`, `DMAddField()`, `DMCopyDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyFields\"))\n\"\"\"\nfunction DMCopyFields(dm::AbstractDM{PetscLib},minDegree::Int,maxDegree::Int,newdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCopyFields(\n\t\tPetscLib,\n\t\tdm,\n\t\tminDegree,\n\t\tmaxDegree,\n\t\tnewdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tuseCone,useClosure = DMGetAdjacency(dm::AbstractDM{PetscLib},f::Int)\n\nReturns the flags for determining variable influence\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - The `DM` object\n- `f`  - The field number, or `PETSC_DEFAULT` for the default adjacency\n\nOutput Parameters:\n===\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nNotes:\n-vb\nFEM:   Two points p and q are adjacent if q in closure(star(p)),   useCone = PETSC_FALSE, useClosure = PETSC_TRUE\nFVM:   Two points p and q are adjacent if q in support(p+cone(p)), useCone = PETSC_TRUE,  useClosure = PETSC_FALSE\nFVM++: Two points p and q are adjacent if q in star(closure(p)),   useCone = PETSC_TRUE,  useClosure = PETSC_TRUE\n-ve\nFurther explanation can be found in the User's Manual Section on the Influence of Variables on One Another.\n\nSee also: \n=== \n`DM`, `DMSetAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetAdjacency\"))\n\"\"\"\nfunction DMGetAdjacency(dm::AbstractDM{PetscLib},f::Int) where {PetscLib}\n\tuseCone = Ref{PetscBool}()\n\tuseClosure = Ref{PetscBool}()\n\n\tLibPETSc.DMGetAdjacency(\n\t\tPetscLib,\n\t\tdm,\n\t\tf,\n\t\tuseCone,\n\t\tuseClosure,\n\t)\n\n\treturn useCone[] == PETSC_TRUE,useClosure[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetAdjacency(dm::AbstractDM{PetscLib},f::Int,useCone::PetscBool,useClosure::PetscBool)\n\nSet the flags for determining variable influence\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`         - The `DM` object\n- `f`          - The field number\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nNotes:\n-vb\nFEM:   Two points p and q are adjacent if q in closure(star(p)),   useCone = PETSC_FALSE, useClosure = PETSC_TRUE\nFVM:   Two points p and q are adjacent if q in support(p+cone(p)), useCone = PETSC_TRUE,  useClosure = PETSC_FALSE\nFVM++: Two points p and q are adjacent if q in star(closure(p)),   useCone = PETSC_TRUE,  useClosure = PETSC_TRUE\n-ve\nFurther explanation can be found in the User's Manual Section on the Influence of Variables on One Another.\n\nSee also: \n=== \n`DM`, `DMGetAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetAdjacency\"))\n\"\"\"\nfunction DMSetAdjacency(dm::AbstractDM{PetscLib},f::Int,useCone::PetscBool,useClosure::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetAdjacency(\n\t\tPetscLib,\n\t\tdm,\n\t\tf,\n\t\tuseCone,\n\t\tuseClosure,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tuseCone,useClosure = DMGetBasicAdjacency(dm::AbstractDM{PetscLib})\n\nReturns the flags for determining variable influence, using either the default or field 0 if it is defined\n\nNot collective\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameters:\n===\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nNotes:\n-vb\nFEM:   Two points p and q are adjacent if q in closure(star(p)),   useCone = PETSC_FALSE, useClosure = PETSC_TRUE\nFVM:   Two points p and q are adjacent if q in support(p+cone(p)), useCone = PETSC_TRUE,  useClosure = PETSC_FALSE\nFVM++: Two points p and q are adjacent if q in star(closure(p)),   useCone = PETSC_TRUE,  useClosure = PETSC_TRUE\n-ve\n\nSee also: \n=== \n`DM`, `DMSetBasicAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMGetBasicAdjacency\"))\n\"\"\"\nfunction DMGetBasicAdjacency(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tuseCone = Ref{PetscBool}()\n\tuseClosure = Ref{PetscBool}()\n\n\tLibPETSc.DMGetBasicAdjacency(\n\t\tPetscLib,\n\t\tdm,\n\t\tuseCone,\n\t\tuseClosure,\n\t)\n\n\treturn useCone[] == PETSC_TRUE,useClosure[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetBasicAdjacency(dm::AbstractDM{PetscLib},useCone::PetscBool,useClosure::PetscBool)\n\nSet the flags for determining variable influence, using either the default or field 0 if it is defined\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`         - The `DM` object\n- `useCone`    - Flag for variable influence starting with the cone operation\n- `useClosure` - Flag for variable influence using transitive closure\n\nLevel: developer\n\nNotes:\n-vb\nFEM:   Two points p and q are adjacent if q in closure(star(p)),   useCone = PETSC_FALSE, useClosure = PETSC_TRUE\nFVM:   Two points p and q are adjacent if q in support(p+cone(p)), useCone = PETSC_TRUE,  useClosure = PETSC_FALSE\nFVM++: Two points p and q are adjacent if q in star(closure(p)),   useCone = PETSC_TRUE,  useClosure = PETSC_TRUE\n-ve\n\nSee also: \n=== \n`DM`, `DMGetBasicAdjacency()`, `DMGetField()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMSetBasicAdjacency\"))\n\"\"\"\nfunction DMSetBasicAdjacency(dm::AbstractDM{PetscLib},useCone::PetscBool,useClosure::PetscBool) where {PetscLib}\n\n\tLibPETSc.DMSetBasicAdjacency(\n\t\tPetscLib,\n\t\tdm,\n\t\tuseCone,\n\t\tuseClosure,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tNds = DMGetNumDS(dm::AbstractDM{PetscLib})\n\nGet the number of discrete systems in the `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `Nds` - The number of `PetscDS` objects\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumDS\"))\n\"\"\"\nfunction DMGetNumDS(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tNds = [PetscInt(1)]\n\n\tLibPETSc.DMGetNumDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(Nds,1),\n\t)\n\n\treturn Nds[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tds = DMGetDS(dm::AbstractDM{PetscLib})\n\nGet the default `PetscDS`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `ds` - The default `PetscDS`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetCellDS()`, `DMGetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetDS\"))\n\"\"\"\nfunction DMGetDS(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tds = LibPETSc.PetscDS()\n\n\tLibPETSc.DMGetDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tds,\n\t)\n\n\treturn ds\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tds,dsIn = DMGetCellDS(dm::AbstractDM{PetscLib},point::Int)\n\nGet the `PetscDS` defined on a given cell\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM`\n- `point` - Cell for the `PetscDS`\n\nOutput Parameters:\n===\n- `ds`   - The `PetscDS` defined on the given cell\n- `dsIn` - The `PetscDS` for input on the given cell, or NULL if the same ds\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMGetDS()`, `DMSetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCellDS\"))\n\"\"\"\nfunction DMGetCellDS(dm::AbstractDM{PetscLib},point::Int) where {PetscLib}\n\tds = LibPETSc.PetscDS()\n\tdsIn = LibPETSc.PetscDS()\n\n\tLibPETSc.DMGetCellDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tpoint,\n\t\tds,\n\t\tdsIn,\n\t)\n\n\treturn ds,dsIn\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfields,ds,dsIn = DMGetRegionDS(dm::AbstractDM{PetscLib},label::DMLabel)\n\nGet the `PetscDS` for a given mesh region, defined by a `DMLabel`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM`\n- `label` - The `DMLabel` defining the mesh region, or `NULL` for the entire mesh\n\nOutput Parameters:\n===\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL`\n- `ds`     - The `PetscDS` defined on the given region, or `NULL`\n- `dsIn`   - The `PetscDS` for input in the given region, or `NULL`\n\nLevel: advanced\n\nNote:\nIf a non-`NULL` label is given, but there is no `PetscDS` on that specific label,\nthe `PetscDS` for the full domain (if present) is returned. Returns with\nfields = `NULL` and ds = `NULL` if there is no `PetscDS` for the full domain.\n\nSee also: \n=== \n`DM`, `DMGetRegionNumDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetRegionDS\"))\n\"\"\"\nfunction DMGetRegionDS(dm::AbstractDM{PetscLib},label::DMLabel) where {PetscLib}\n\tfields = LibPETSc.IS()\n\tds = LibPETSc.PetscDS()\n\tdsIn = LibPETSc.PetscDS()\n\n\tLibPETSc.DMGetRegionDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t\tfields,\n\t\tds,\n\t\tdsIn,\n\t)\n\n\treturn fields,ds,dsIn\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetRegionDS(dm::AbstractDM{PetscLib},label::DMLabel,fields::IS,ds::PetscDS,dsIn::PetscDS)\n\nSet the `PetscDS` for a given mesh region, defined by a `DMLabel`\n\nCollective\n\nInput Parameters:\n===\n- `dm`     - The `DM`\n- `label`  - The `DMLabel` defining the mesh region, or `NULL` for the entire mesh\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL` for all fields\n- `ds`     - The `PetscDS` defined on the given region\n- `dsIn`   - The `PetscDS` for input on the given cell, or `NULL` if it is the same `PetscDS`\n\nLevel: advanced\n\nNote:\nIf the label has a `PetscDS` defined, it will be replaced. Otherwise, it will be added to the `DM`. If the `PetscDS` is replaced,\nthe fields argument is ignored.\n\nSee also: \n=== \n`DM`, `DMGetRegionDS()`, `DMSetRegionNumDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMSetRegionDS\"))\n\"\"\"\nfunction DMSetRegionDS(dm::AbstractDM{PetscLib},label::DMLabel,fields::IS,ds::PetscDS,dsIn::PetscDS) where {PetscLib}\n\n\tLibPETSc.DMSetRegionDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t\tfields,\n\t\tds,\n\t\tdsIn,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlabel,fields,ds,dsIn = DMGetRegionNumDS(dm::AbstractDM{PetscLib},num::Int)\n\nGet the `PetscDS` for a given mesh region, defined by the region number\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`  - The `DM`\n- `num` - The region number, in [0, Nds)\n\nOutput Parameters:\n===\n- `label`  - The region label, or `NULL`\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL`\n- `ds`     - The `PetscDS` defined on the given region, or `NULL`\n- `dsIn`   - The `PetscDS` for input in the given region, or `NULL`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetRegionDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetRegionNumDS\"))\n\"\"\"\nfunction DMGetRegionNumDS(dm::AbstractDM{PetscLib},num::Int) where {PetscLib}\n\tlabel = LibPETSc.DMLabel()\n\tfields = LibPETSc.IS()\n\tds = LibPETSc.PetscDS()\n\tdsIn = LibPETSc.PetscDS()\n\n\tLibPETSc.DMGetRegionNumDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tnum,\n\t\tlabel,\n\t\tfields,\n\t\tds,\n\t\tdsIn,\n\t)\n\n\treturn label,fields,ds,dsIn\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetRegionNumDS(dm::AbstractDM{PetscLib},num::Int,label::DMLabel,fields::IS,ds::PetscDS,dsIn::PetscDS)\n\nSet the `PetscDS` for a given mesh region, defined by the region number\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`     - The `DM`\n- `num`    - The region number, in [0, Nds)\n- `label`  - The region label, or `NULL`\n- `fields` - The `IS` containing the `DM` field numbers for the fields in this `PetscDS`, or `NULL` to prevent setting\n- `ds`     - The `PetscDS` defined on the given region, or `NULL` to prevent setting\n- `dsIn`   - The `PetscDS` for input on the given cell, or `NULL` if it is the same `PetscDS`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetRegionDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMSetRegionNumDS\"))\n\"\"\"\nfunction DMSetRegionNumDS(dm::AbstractDM{PetscLib},num::Int,label::DMLabel,fields::IS,ds::PetscDS,dsIn::PetscDS) where {PetscLib}\n\n\tLibPETSc.DMSetRegionNumDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tnum,\n\t\tlabel,\n\t\tfields,\n\t\tds,\n\t\tdsIn,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tnum = DMFindRegionNum(dm::AbstractDM{PetscLib},ds::PetscDS)\n\nFind the region number for a given `PetscDS`, or\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - The `DM`\n- `ds` - The `PetscDS` defined on the given region\n\nOutput Parameter:\n===\n- `num` - The region number, in [0, Nds), or -1 if not found\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMGetRegionNumDS()`, `DMGetRegionDS()`, `DMSetRegionDS()`, `DMGetDS()`, `DMGetCellDS()`\n\n# External Links\n$(_doc_external(\"DM/DMFindRegionNum\"))\n\"\"\"\nfunction DMFindRegionNum(dm::AbstractDM{PetscLib},ds::PetscDS) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tnum = [PetscInt(1)]\n\n\tLibPETSc.DMFindRegionNum(\n\t\tPetscLib,\n\t\tdm,\n\t\tds,\n\t\tRef(num,1),\n\t)\n\n\treturn num[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCreateDS(dm::AbstractDM{PetscLib})\n\nCreate the discrete systems for the `DM` based upon the fields added to the `DM`\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOptions Database Key:\n===\n- `-dm_petscds_view` - View all the `PetscDS` objects in this `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMSetField`, `DMAddField()`, `DMGetDS()`, `DMGetCellDS()`, `DMGetRegionDS()`, `DMSetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateDS\"))\n\"\"\"\nfunction DMCreateDS(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCreateDS(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearDS(dm::AbstractDM{PetscLib})\n\nRemove all discrete systems from the `DM`\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMGetNumDS()`, `DMGetDS()`, `DMSetField()`\n\n# External Links\n$(_doc_external(\"DM/DMClearDS\"))\n\"\"\"\nfunction DMClearDS(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMClearDS(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCopyDS(dm::AbstractDM{PetscLib},minDegree::Int,maxDegree::Int,newdm::AbstractDM{PetscLib})\n\nCopy the discrete systems for the `DM` into another `DM`\n\nCollective\n\nInput Parameters:\n===\n- `dm`        - The `DM`\n- `minDegree` - Minimum degree for a discretization, or `PETSC_DETERMINE` for no limit\n- `maxDegree` - Maximum degree for a discretization, or `PETSC_DETERMINE` for no limit\n\nOutput Parameter:\n===\n- `newdm` - The `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCopyFields()`, `DMAddField()`, `DMGetDS()`, `DMGetCellDS()`, `DMGetRegionDS()`, `DMSetRegionDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyDS\"))\n\"\"\"\nfunction DMCopyDS(dm::AbstractDM{PetscLib},minDegree::Int,maxDegree::Int,newdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCopyDS(\n\t\tPetscLib,\n\t\tdm,\n\t\tminDegree,\n\t\tmaxDegree,\n\t\tnewdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCopyDisc(dm::AbstractDM{PetscLib},newdm::AbstractDM{PetscLib})\n\nCopy the fields and discrete systems for the `DM` into another `DM`\n\nCollective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `newdm` - The `DM`\n\nLevel: advanced\n\nDeveloper Note:\nReally ugly name, nothing in PETSc is called a `Disc` plus it is an ugly abbreviation\n\nSee also: \n=== \n`DM`, `DMCopyFields()`, `DMCopyDS()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyDisc\"))\n\"\"\"\nfunction DMCopyDisc(dm::AbstractDM{PetscLib},newdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCopyDisc(\n\t\tPetscLib,\n\t\tdm,\n\t\tnewdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMComputeExactSolution(dm::AbstractDM{PetscLib},time<:AbstractFloat,u::AbstractVector,u_t::AbstractVector)\n\nCompute the exact solution for a given `DM`, using the `PetscDS` information.\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - The `DM`\n- `time` - The time\n\nOutput Parameters:\n===\n- `u`   - The vector will be filled with exact solution values, or `NULL`\n- `u_t` - The vector will be filled with the time derivative of exact solution values, or `NULL`\n\nLevel: developer\n\nNote:\nThe user must call `PetscDSSetExactSolution()` before using this routine\n\nSee also: \n=== \n`DM`, `PetscDSSetExactSolution()`\n\n# External Links\n$(_doc_external(\"DM/DMComputeExactSolution\"))\n\"\"\"\nfunction DMComputeExactSolution(dm::AbstractDM{PetscLib},time::Float64,u::AbstractVector,u_t::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMComputeExactSolution(\n\t\tPetscLib,\n\t\tdm,\n\t\ttime,\n\t\tu,\n\t\tu_t,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tnumAux = DMGetNumAuxiliaryVec(dm::AbstractDM{PetscLib})\n\nGet the number of auxiliary vectors associated with this `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `numAux` - The number of auxiliary data vectors\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMSetAuxiliaryVec()`, `DMGetAuxiliaryLabels()`, `DMGetAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumAuxiliaryVec\"))\n\"\"\"\nfunction DMGetNumAuxiliaryVec(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tnumAux = [PetscInt(1)]\n\n\tLibPETSc.DMGetNumAuxiliaryVec(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(numAux,1),\n\t)\n\n\treturn numAux[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\taux = DMGetAuxiliaryVec(dm::AbstractDM{PetscLib},label::DMLabel,value::Int,part::Int)\n\nGet the auxiliary vector for region specified by the given label and value, and equation part\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM`\n- `label` - The `DMLabel`\n- `value` - The label value indicating the region\n- `part`  - The equation part, or 0 if unused\n\nOutput Parameter:\n===\n- `aux` - The `Vec` holding auxiliary field data\n\nLevel: advanced\n\nNote:\nIf no auxiliary vector is found for this (label, value), (NULL, 0, 0) is checked as well.\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMSetAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryLabels()`\n\n# External Links\n$(_doc_external(\"DM/DMGetAuxiliaryVec\"))\n\"\"\"\nfunction DMGetAuxiliaryVec(dm::AbstractDM{PetscLib},label::DMLabel,value::Int,part::Int) where {PetscLib}\n\taux = CVec()\n\n\tLibPETSc.DMGetAuxiliaryVec(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t\tvalue,\n\t\tpart,\n\t\taux,\n\t)\n\n\treturn aux\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetAuxiliaryVec(dm::AbstractDM{PetscLib},label::DMLabel,value::Int,part::Int,aux::AbstractVector)\n\nSet an auxiliary vector for region specified by the given label and value, and equation part\n\nNot Collective because auxiliary vectors are not parallel\n\nInput Parameters:\n===\n- `dm`    - The `DM`\n- `label` - The `DMLabel`\n- `value` - The label value indicating the region\n- `part`  - The equation part, or 0 if unused\n- `aux`   - The `Vec` holding auxiliary field data\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMGetAuxiliaryLabels()`, `DMCopyAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMSetAuxiliaryVec\"))\n\"\"\"\nfunction DMSetAuxiliaryVec(dm::AbstractDM{PetscLib},label::DMLabel,value::Int,part::Int,aux::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetAuxiliaryVec(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t\tvalue,\n\t\tpart,\n\t\taux,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetAuxiliaryLabels(dm::AbstractDM{PetscLib},labels::Vector{DMLabel},values::Vector{Int},parts::Vector{Int})\n\nGet the labels, values, and parts for all auxiliary vectors in this `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameters:\n===\n- `labels` - The `DMLabel`s for each `Vec`\n- `values` - The label values for each `Vec`\n- `parts`  - The equation parts for each `Vec`\n\nLevel: advanced\n\nNote:\nThe arrays passed in must be at least as large as `DMGetNumAuxiliaryVec()`.\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMSetAuxiliaryVec()`, `DMCopyAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMGetAuxiliaryLabels\"))\n\"\"\"\nfunction DMGetAuxiliaryLabels(dm::AbstractDM{PetscLib},labels::Vector{DMLabel},values::Vector{Int},parts::Vector{Int}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGetAuxiliaryLabels(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabels,\n\t\tvalues,\n\t\tparts,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCopyAuxiliaryVec(dm::AbstractDM{PetscLib},dmNew::AbstractDM{PetscLib})\n\nCopy the auxiliary vector data on a `DM` to a new `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `dmNew` - The new `DM`, now with the same auxiliary data\n\nLevel: advanced\n\nNote:\nThis is a shallow copy of the auxiliary vectors\n\nSee also: \n=== \n`DM`, `DMClearAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMSetAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMCopyAuxiliaryVec\"))\n\"\"\"\nfunction DMCopyAuxiliaryVec(dm::AbstractDM{PetscLib},dmNew::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCopyAuxiliaryVec(\n\t\tPetscLib,\n\t\tdm,\n\t\tdmNew,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearAuxiliaryVec(dm::AbstractDM{PetscLib})\n\nDestroys the auxiliary vector information and creates a new empty one\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMCopyAuxiliaryVec()`, `DMGetNumAuxiliaryVec()`, `DMGetAuxiliaryVec()`, `DMSetAuxiliaryVec()`\n\n# External Links\n$(_doc_external(\"DM/DMClearAuxiliaryVec\"))\n\"\"\"\nfunction DMClearAuxiliaryVec(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMClearAuxiliaryVec(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCreateLabel(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nCreate a label of the given name if it does not already exist in the `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `name` - The label name\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabelCreate()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateLabel\"))\n\"\"\"\nfunction DMCreateLabel(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMCreateLabel(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCreateLabelAtIndex(dm::AbstractDM{PetscLib},l::Int,name::Vector{Char})\n\nCreate a label of the given name at the given index. If it already exists in the `DM`, move it to this index.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `l`    - The index for the label\n- `name` - The label name\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMCreateLabel()`, `DMLabelCreate()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMCreateLabelAtIndex\"))\n\"\"\"\nfunction DMCreateLabelAtIndex(dm::AbstractDM{PetscLib},l::Int,name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMCreateLabelAtIndex(\n\t\tPetscLib,\n\t\tdm,\n\t\tl,\n\t\tname,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvalue = DMGetLabelValue(dm::AbstractDM{PetscLib},name::Vector{Char},point::Int)\n\nGet the value in a `DMLabel` for the given point, with\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `point` - The mesh point\n\nOutput Parameter:\n===\n- `value` - The label value for this point, or -1 if the point is not in the label\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelValue\"))\n\"\"\"\nfunction DMGetLabelValue(dm::AbstractDM{PetscLib},name::Vector{Char},point::Int) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tvalue = [PetscInt(1)]\n\n\tLibPETSc.DMGetLabelValue(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tpoint,\n\t\tRef(value,1),\n\t)\n\n\treturn value[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetLabelValue(dm::AbstractDM{PetscLib},name::Vector{Char},point::Int,value::Int)\n\nAdd a point to a `DMLabel` with given value\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `point` - The mesh point\n- `value` - The label value for this point\n\nOutput Parameter:\n===\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelSetValue()`, `DMGetStratumIS()`, `DMClearLabelValue()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLabelValue\"))\n\"\"\"\nfunction DMSetLabelValue(dm::AbstractDM{PetscLib},name::Vector{Char},point::Int,value::Int) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetLabelValue(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tpoint,\n\t\tvalue,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearLabelValue(dm::AbstractDM{PetscLib},name::Vector{Char},point::Int,value::Int)\n\nRemove a point from a `DMLabel` with given value\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `point` - The mesh point\n- `value` - The label value for this point\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelClearValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMClearLabelValue\"))\n\"\"\"\nfunction DMClearLabelValue(dm::AbstractDM{PetscLib},name::Vector{Char},point::Int,value::Int) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMClearLabelValue(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tpoint,\n\t\tvalue,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsize = DMGetLabelSize(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nGet the value of `DMLabelGetNumValues()` of a `DMLabel` in the `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n===\n- `size` - The number of different integer ids, or 0 if the label does not exist\n\nLevel: beginner\n\nDeveloper Note:\nThis should be renamed to something like `DMGetLabelNumValues()` or removed.\n\nSee also: \n=== \n`DM`, `DMLabelGetNumValues()`, `DMSetLabelValue()`, `DMGetLabel()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelSize\"))\n\"\"\"\nfunction DMGetLabelSize(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tsize = [PetscInt(1)]\n\n\tLibPETSc.DMGetLabelSize(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tRef(size,1),\n\t)\n\n\treturn size[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tids = DMGetLabelIdIS(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nGet the `DMLabelGetValueIS()` from a `DMLabel` in the `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n===\n- `ids` - The integer ids, or `NULL` if the label does not exist\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetValueIS()`, `DMGetLabelSize()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelIdIS\"))\n\"\"\"\nfunction DMGetLabelIdIS(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tids = LibPETSc.IS()\n\n\tLibPETSc.DMGetLabelIdIS(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tids,\n\t)\n\n\treturn ids\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tsize = DMGetStratumSize(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int)\n\nGet the number of points in a label stratum\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `name`  - The label name of the stratum\n- `value` - The stratum value\n\nOutput Parameter:\n===\n- `size` - The number of points, also called the stratum size\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetStratumSize()`, `DMGetLabelSize()`, `DMGetLabelIds()`\n\n# External Links\n$(_doc_external(\"DM/DMGetStratumSize\"))\n\"\"\"\nfunction DMGetStratumSize(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tsize = [PetscInt(1)]\n\n\tLibPETSc.DMGetStratumSize(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tvalue,\n\t\tRef(size,1),\n\t)\n\n\treturn size[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tpoints = DMGetStratumIS(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int)\n\nGet the points in a label stratum\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `value` - The stratum value\n\nOutput Parameter:\n===\n- `points` - The stratum points, or `NULL` if the label does not exist or does not have that value\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabelGetStratumIS()`, `DMGetStratumSize()`\n\n# External Links\n$(_doc_external(\"DM/DMGetStratumIS\"))\n\"\"\"\nfunction DMGetStratumIS(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tpoints = LibPETSc.IS()\n\n\tLibPETSc.DMGetStratumIS(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tvalue,\n\t\tpoints,\n\t)\n\n\treturn points\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetStratumIS(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int,points::IS)\n\nSet the points in a label stratum\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`     - The `DM` object\n- `name`   - The label name\n- `value`  - The stratum value\n- `points` - The stratum points\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMClearLabelStratum()`, `DMLabelClearStratum()`, `DMLabelSetStratumIS()`, `DMGetStratumSize()`\n\n# External Links\n$(_doc_external(\"DM/DMSetStratumIS\"))\n\"\"\"\nfunction DMSetStratumIS(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int,points::IS) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetStratumIS(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tvalue,\n\t\tpoints,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMClearLabelStratum(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int)\n\nRemove all points from a stratum from a `DMLabel`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `name`  - The label name\n- `value` - The label value for this point\n\nOutput Parameter:\n===\n\nLevel: beginner\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMLabelClearStratum()`, `DMSetLabelValue()`, `DMGetStratumIS()`, `DMClearLabelValue()`\n\n# External Links\n$(_doc_external(\"DM/DMClearLabelStratum\"))\n\"\"\"\nfunction DMClearLabelStratum(dm::AbstractDM{PetscLib},name::Vector{Char},value::Int) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMClearLabelStratum(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tvalue,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\toutput = DMGetLabelOutput(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nGet the output flag for a given label\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n===\n- `output` - The flag for output\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMSetLabelOutput()`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelOutput\"))\n\"\"\"\nfunction DMGetLabelOutput(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\toutput = Ref{PetscBool}()\n\n\tLibPETSc.DMGetLabelOutput(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\toutput,\n\t)\n\n\treturn output[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetLabelOutput(dm::AbstractDM{PetscLib},name::Vector{Char},output::PetscBool)\n\nSet if a given label should be saved to a `PetscViewer` in calls to `DMView()`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`     - The `DM` object\n- `name`   - The label name\n- `output` - `PETSC_TRUE` to save the label to the viewer\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetOutputFlag()`, `DMGetLabelOutput()`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLabelOutput\"))\n\"\"\"\nfunction DMSetLabelOutput(dm::AbstractDM{PetscLib},name::Vector{Char},output::PetscBool) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMSetLabelOutput(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\toutput,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tnumLabels = DMGetNumLabels(dm::AbstractDM{PetscLib})\n\nReturn the number of labels defined by on the `DM`\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - The `DM` object\n\nOutput Parameter:\n===\n- `numLabels` - the number of Labels\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetLabelByNum()`, `DMGetLabelName()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetNumLabels\"))\n\"\"\"\nfunction DMGetNumLabels(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tnumLabels = [PetscInt(1)]\n\n\tLibPETSc.DMGetNumLabels(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(numLabels,1),\n\t)\n\n\treturn numLabels[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMGetLabelName(dm::AbstractDM{PetscLib},n::Int,name::Vector{Char})\n\nReturn the name of nth label\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - The `DM` object\n- `n`  - the label number\n\nOutput Parameter:\n===\n- `name` - the label name\n\nLevel: intermediate\n\nDeveloper Note:\nSome of the functions that appropriate on labels using their number have the suffix ByNum, others do not.\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetLabelByNum()`, `DMGetLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelName\"))\n\"\"\"\nfunction DMGetLabelName(dm::AbstractDM{PetscLib},n::Int,name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.DMGetLabelName(\n\t\tPetscLib,\n\t\tdm,\n\t\tn,\n\t\tname,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\thasLabel = DMHasLabel(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nDetermine whether the `DM` has a label of a given name\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n===\n- `hasLabel` - `PETSC_TRUE` if the label is present\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMGetLabel()`, `DMGetLabelByNum()`, `DMCreateLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMHasLabel\"))\n\"\"\"\nfunction DMHasLabel(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\thasLabel = Ref{PetscBool}()\n\n\tLibPETSc.DMHasLabel(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\thasLabel,\n\t)\n\n\treturn hasLabel[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlabel = DMGetLabel(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nReturn the label of a given name, or `NULL`, from a `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n===\n- `label` - The `DMLabel`, or `NULL` if the label is absent\n\nDefault labels in a `DMPLEX`:\n- `\"depth\"`       - Holds the depth (co-dimension) of each mesh point\n- `\"celltype\"`    - Holds the topological type of each cell\n- `\"ghost\"`       - If the DM is distributed with overlap, this marks the cells and faces in the overlap\n- `\"Cell Sets\"`   - Mirrors the cell sets defined by GMsh and ExodusII\n- `\"Face Sets\"`   - Mirrors the face sets defined by GMsh and ExodusII\n- `\"Vertex Sets\"` - Mirrors the vertex sets defined by GMsh\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMHasLabel()`, `DMGetLabelByNum()`, `DMAddLabel()`, `DMCreateLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetCellType()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabel\"))\n\"\"\"\nfunction DMGetLabel(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tlabel = LibPETSc.DMLabel()\n\n\tLibPETSc.DMGetLabel(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tlabel,\n\t)\n\n\treturn label\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMSetLabel(dm::AbstractDM{PetscLib},label::DMLabel)\n\nReplaces the label of a given name, or ignores it if the name is not present\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `label` - The `DMLabel`, having the same name, to substitute\n\nDefault labels in a `DMPLEX`:\n- `\"depth\"`       - Holds the depth (co-dimension) of each mesh point\n- `\"celltype\"`    - Holds the topological type of each cell\n- `\"ghost\"`       - If the DM is distributed with overlap, this marks the cells and faces in the overlap\n- `\"Cell Sets\"`   - Mirrors the cell sets defined by GMsh and ExodusII\n- `\"Face Sets\"`   - Mirrors the face sets defined by GMsh and ExodusII\n- `\"Vertex Sets\"` - Mirrors the vertex sets defined by GMsh\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetCellType()`\n\n# External Links\n$(_doc_external(\"DM/DMSetLabel\"))\n\"\"\"\nfunction DMSetLabel(dm::AbstractDM{PetscLib},label::DMLabel) where {PetscLib}\n\n\tLibPETSc.DMSetLabel(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlabel = DMGetLabelByNum(dm::AbstractDM{PetscLib},n::Int)\n\nReturn the nth label on a `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm` - The `DM` object\n- `n`  - the label number\n\nOutput Parameter:\n===\n- `label` - the label\n\nLevel: intermediate\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMAddLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMGetLabelByNum\"))\n\"\"\"\nfunction DMGetLabelByNum(dm::AbstractDM{PetscLib},n::Int) where {PetscLib}\n\tlabel = LibPETSc.DMLabel()\n\n\tLibPETSc.DMGetLabelByNum(\n\t\tPetscLib,\n\t\tdm,\n\t\tn,\n\t\tlabel,\n\t)\n\n\treturn label\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMAddLabel(dm::AbstractDM{PetscLib},label::DMLabel)\n\nAdd the label to this `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`    - The `DM` object\n- `label` - The `DMLabel`\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()`\n\n# External Links\n$(_doc_external(\"DM/DMAddLabel\"))\n\"\"\"\nfunction DMAddLabel(dm::AbstractDM{PetscLib},label::DMLabel) where {PetscLib}\n\n\tLibPETSc.DMAddLabel(\n\t\tPetscLib,\n\t\tdm,\n\t\tlabel,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlabel = DMRemoveLabel(dm::AbstractDM{PetscLib},name::Vector{Char})\n\nRemove the label given by name from this `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - The `DM` object\n- `name` - The label name\n\nOutput Parameter:\n===\n- `label` - The `DMLabel`, or `NULL` if the label is absent. Pass in `NULL` to call `DMLabelDestroy()` on the label, otherwise the\ncaller is responsible for calling `DMLabelDestroy()`.\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMLabelDestroy()`, `DMRemoveLabelBySelf()`\n\n# External Links\n$(_doc_external(\"DM/DMRemoveLabel\"))\n\"\"\"\nfunction DMRemoveLabel(dm::AbstractDM{PetscLib},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tlabel = LibPETSc.DMLabel()\n\n\tLibPETSc.DMRemoveLabel(\n\t\tPetscLib,\n\t\tdm,\n\t\tname,\n\t\tlabel,\n\t)\n\n\treturn label\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlabel = DMRemoveLabelBySelf(dm::AbstractDM{PetscLib},failNotFound::PetscBool)\n\nRemove the label from this `DM`\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`           - The `DM` object\n- `label`        - The `DMLabel` to be removed from the `DM`\n- `failNotFound` - Should it fail if the label is not found in the `DM`?\n\nLevel: developer\n\nNote:\nOnly exactly the same instance is removed if found, name match is ignored.\nIf the `DM` has an exclusive reference to the label, the label gets destroyed and\n*label nullified.\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMGetLabel()` `DMGetLabelValue()`, `DMSetLabelValue()`, `DMLabelDestroy()`, `DMRemoveLabel()`\n\n# External Links\n$(_doc_external(\"DM/DMRemoveLabelBySelf\"))\n\"\"\"\nfunction DMRemoveLabelBySelf(dm::AbstractDM{PetscLib},failNotFound::PetscBool) where {PetscLib}\n\tlabel = LibPETSc.DMLabel()\n\n\tLibPETSc.DMRemoveLabelBySelf(\n\t\tPetscLib,\n\t\tdm,\n\t\tfailNotFound,\n\t\tlabel,\n\t)\n\n\treturn label\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCopyLabels(dmA::AbstractDM{PetscLib},dmB::AbstractDM{PetscLib},mode::PetscCopyMode,all::PetscBool,emode::DMCopyLabelsMode)\n\nCopy labels from one `DM` mesh to another `DM` with a superset of the points\n\nCollective\n\nInput Parameters:\n===\n- `dmA`   - The `DM` object with initial labels\n- `dmB`   - The `DM` object to which labels are copied\n- `mode`  - Copy labels by pointers (`PETSC_OWN_POINTER`) or duplicate them (`PETSC_COPY_VALUES`)\n- `all`   - Copy all labels including \"depth\", \"dim\", and \"celltype\" (`PETSC_TRUE`) which are otherwise ignored (`PETSC_FALSE`)\n- `emode` - How to behave when a `DMLabel` in the source and destination `DM`s with the same name is encountered (see `DMCopyLabelsMode`)\n\nLevel: intermediate\n\nNote:\nThis is typically used when interpolating or otherwise adding to a mesh, or testing.\n\nSee also: \n=== \n`DM`, `DMLabel`, `DMAddLabel()`, `DMCopyLabelsMode`\n\n# External Links\n$(_doc_external(\"DM/DMCopyLabels\"))\n\"\"\"\nfunction DMCopyLabels(dmA::AbstractDM{PetscLib},dmB::AbstractDM{PetscLib},mode::PetscCopyMode,all::PetscBool,emode::DMCopyLabelsMode) where {PetscLib}\n\n\tLibPETSc.DMCopyLabels(\n\t\tPetscLib,\n\t\tdmA,\n\t\tdmB,\n\t\tmode,\n\t\tall,\n\t\temode,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tisBd = DMIsBoundaryPoint(dm::AbstractDM{PetscLib},point::Int)\n\n\n# External Links\n$(_doc_external(\"DM/DMIsBoundaryPoint\"))\n\"\"\"\nfunction DMIsBoundaryPoint(dm::AbstractDM{PetscLib},point::Int) where {PetscLib}\n\tisBd = Ref{PetscBool}()\n\n\tLibPETSc.DMIsBoundaryPoint(\n\t\tPetscLib,\n\t\tdm,\n\t\tpoint,\n\t\tisBd,\n\t)\n\n\treturn isBd[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\terrorVec = DMComputeError(dm::AbstractDM{PetscLib},sol::AbstractVector,errors::Vector{Float64})\n\nComputes the error assuming the user has provided the exact solution functions\n\nCollective\n\nInput Parameters:\n===\n- `dm`  - The `DM`\n- `sol` - The solution vector\n\nInput/Output Parameter:\n- `errors` - An array of length Nf, the number of fields, or `NULL` for no output; on output\ncontains the error in each field\n\nOutput Parameter:\n===\n- `errorVec` - A vector to hold the cellwise error (may be `NULL`)\n\nLevel: developer\n\nNote:\nThe exact solutions come from the `PetscDS` object, and the time comes from `DMGetOutputSequenceNumber()`.\n\nSee also: \n=== \n`DM`, `DMMonitorSet()`, `DMGetRegionNumDS()`, `PetscDSGetExactSolution()`, `DMGetOutputSequenceNumber()`\n\n# External Links\n$(_doc_external(\"DM/DMComputeError\"))\n\"\"\"\nfunction DMComputeError(dm::AbstractDM{PetscLib},sol::AbstractVector,errors::Vector{Float64}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\terrorVec = CVec()\n\n\tLibPETSc.DMComputeError(\n\t\tPetscLib,\n\t\tdm,\n\t\tsol,\n\t\terrors,\n\t\terrorVec,\n\t)\n\n\treturn errorVec\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = DMHasBasisTransform(dm::AbstractDM{PetscLib})\n\nWhether the `DM` employs a basis transformation from functions in global vectors to functions in local vectors\n\nInput Parameter:\n===\n- `dm` - The `DM`\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` if a basis transformation should be done\n\nLevel: developer\n\nSee also: \n=== \n`DM`, `DMPlexGlobalToLocalBasis()`, `DMPlexLocalToGlobalBasis()`, `DMPlexCreateBasisRotation()`\n\n# External Links\n$(_doc_external(\"DM/DMHasBasisTransform\"))\n\"\"\"\nfunction DMHasBasisTransform(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.DMHasBasisTransform(\n\t\tPetscLib,\n\t\tdm,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMCopyTransform(dm::AbstractDM{PetscLib},newdm::AbstractDM{PetscLib})\n\n\n# External Links\n$(_doc_external(\"DM/DMCopyTransform\"))\n\"\"\"\nfunction DMCopyTransform(dm::AbstractDM{PetscLib},newdm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMCopyTransform(\n\t\tPetscLib,\n\t\tdm,\n\t\tnewdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tcompatible,set = DMGetCompatibility(dm1::AbstractDM{PetscLib},dm2::AbstractDM{PetscLib})\n\ndetermine if two `DM`s are compatible\n\nCollective\n\nInput Parameters:\n===\n- `dm1` - the first `DM`\n- `dm2` - the second `DM`\n\nOutput Parameters:\n===\n- `compatible` - whether or not the two `DM`s are compatible\n- `set`        - whether or not the compatible value was actually determined and set\n\nLevel: advanced\n\nNotes:\nTwo `DM`s are deemed compatible if they represent the same parallel decomposition\nof the same topology. This implies that the section (field data) on one\n\"makes sense\" with respect to the topology and parallel decomposition of the other.\nLoosely speaking, compatible `DM`s represent the same domain and parallel\ndecomposition, but hold different data.\n\nTypically, one would confirm compatibility if intending to simultaneously iterate\nover a pair of vectors obtained from different `DM`s.\n\nFor example, two `DMDA` objects are compatible if they have the same local\nand global sizes and the same stencil width. They can have different numbers\nof degrees of freedom per node. Thus, one could use the node numbering from\neither `DM` in bounds for a loop over vectors derived from either `DM`.\n\nConsider the operation of summing data living on a 2-dof `DMDA` to data living\non a 1-dof `DMDA`, which should be compatible, as in the following snippet.\n-vb\n-..\nPetscCall(DMGetCompatibility(da1,da2,&compatible,&set));\nif (set && compatible)  {\nPetscCall(DMDAVecGetArrayDOF(da1,vec1,&arr1));\nPetscCall(DMDAVecGetArrayDOF(da2,vec2,&arr2));\nPetscCall(DMDAGetCorners(da1,&x,&y,NULL,&m,&n,NULL));\nfor (j=y; j<y+n; ++j) {\nfor (i=x; i<x+m, ++i) {\narr1[j][i][0] = arr2[j][i][0] + arr2[j][i][1];\n}\n}\nPetscCall(DMDAVecRestoreArrayDOF(da1,vec1,&arr1));\nPetscCall(DMDAVecRestoreArrayDOF(da2,vec2,&arr2));\n} else {\nSETERRQ(PetscObjectComm((PetscObject)da1,PETSC_ERR_ARG_INCOMP,\"DMDA objects incompatible\");\n}\n-..\n-ve\n\nChecking compatibility might be expensive for a given implementation of `DM`,\nor might be impossible to unambiguously confirm or deny. For this reason,\nthis function may decline to determine compatibility, and hence users should\nalways check the \"set\" output parameter.\n\nA `DM` is always compatible with itself.\n\nIn the current implementation, `DM`s which live on \"unequal\" communicators\n(MPI_UNEQUAL in the terminology of MPI_Comm_compare()) are always deemed\nincompatible.\n\nThis function is labeled \"Collective,\" as information about all subdomains\nis required on each rank. However, in `DM` implementations which store all this\ninformation locally, this function may be merely \"Logically Collective\".\n\nDeveloper Note:\nCompatibility is assumed to be a symmetric concept; `DM` A is compatible with `DM` B\niff B is compatible with A. Thus, this function checks the implementations\nof both dm and dmc (if they are of different types), attempting to determine\ncompatibility. It is left to `DM` implementers to ensure that symmetry is\npreserved. The simplest way to do this is, when implementing type-specific\nlogic for this function, is to check for existing logic in the implementation\nof other `DM` types and let *set = PETSC_FALSE if found.\n\nSee also: \n=== \n`DM`, `DMDACreateCompatibleDMDA()`, `DMStagCreateCompatibleDMStag()`\n\n# External Links\n$(_doc_external(\"DM/DMGetCompatibility\"))\n\"\"\"\nfunction DMGetCompatibility(dm1::AbstractDM{PetscLib},dm2::AbstractDM{PetscLib}) where {PetscLib}\n\tcompatible = Ref{PetscBool}()\n\tset = Ref{PetscBool}()\n\n\tLibPETSc.DMGetCompatibility(\n\t\tPetscLib,\n\t\tdm1,\n\t\tdm2,\n\t\tcompatible,\n\t\tset,\n\t)\n\n\treturn compatible[] == PETSC_TRUE,set[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t DMMonitorCancel(dm::AbstractDM{PetscLib})\n\nClears all the monitor functions for a `DM` object.\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - the DM\n\nOptions Database Key:\n===\n- `-dm_monitor_cancel` - cancels all monitors that have been hardwired\ninto a code by calls to `DMonitorSet()`, but does not cancel those\nset via the options database\n\nLevel: intermediate\n\nNote:\nThere is no way to clear one specific monitor from a `DM` object.\n\nSee also: \n=== \n`DM`, `DMMonitorSet()`, `DMMonitorSetFromOptions()`, `DMMonitor()`\n\n# External Links\n$(_doc_external(\"DM/DMMonitorCancel\"))\n\"\"\"\nfunction DMMonitorCancel(dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMMonitorCancel(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tornt,found = DMPolytopeMatchOrientation(ct::DMPolytopeType,sourceCone::Vector{Int},targetCone::Vector{Int})\n\nDetermine an orientation (transformation) that takes the source face arrangement to the target face arrangement\n\nNot Collective\n\nInput Parameters:\n===\n- `ct`         - The `DMPolytopeType`\n- `sourceCone` - The source arrangement of faces\n- `targetCone` - The target arrangement of faces\n\nOutput Parameters:\n===\n- `ornt`  - The orientation (transformation) which will take the source arrangement to the target arrangement\n- `found` - Flag indicating that a suitable orientation was found\n\nLevel: advanced\n\nNote:\nAn arrangement is a face order combined with an orientation for each face\n\nEach orientation (transformation) is labeled with an integer from negative `DMPolytopeTypeGetNumArrangements(ct)`/2 to `DMPolytopeTypeGetNumArrangements(ct)`/2\nthat labels each arrangement (face ordering plus orientation for each face).\n\nSee `DMPolytopeMatchVertexOrientation()` to find a new vertex orientation that takes the source vertex arrangement to the target vertex arrangement\n\nSee also: \n=== \n`DM`, `DMPolytopeGetOrientation()`, `DMPolytopeMatchVertexOrientation()`, `DMPolytopeGetVertexOrientation()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeMatchOrientation\"))\n\"\"\"\nfunction DMPolytopeMatchOrientation(PetscLib, ct::DMPolytopeType,sourceCone::Vector{Int},targetCone::Vector{Int})\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tornt = [PetscInt(1)]\n\tfound = Ref{PetscBool}()\n\n\tLibPETSc.DMPolytopeMatchOrientation(\n\t\tPetscLib,\n\t\tct,\n\t\tsourceCone,\n\t\ttargetCone,\n\t\tRef(ornt,1),\n\t\tfound,\n\t)\n\n\treturn ornt[1],found[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tornt,found = DMPolytopeMatchVertexOrientation(PetscLib,ct::DMPolytopeType,sourceVert::Vector{Int},targetVert::Vector{Int})\n\nDetermine an orientation (transformation) that takes the source vertex arrangement to the target vertex arrangement\n\nNot Collective\n\nInput Parameters:\n===\n- `ct`         - The `DMPolytopeType`\n- `sourceVert` - The source arrangement of vertices\n- `targetVert` - The target arrangement of vertices\n\nOutput Parameters:\n===\n- `ornt`  - The orientation (transformation) which will take the source arrangement to the target arrangement\n- `found` - Flag indicating that a suitable orientation was found\n\nLevel: advanced\n\nNotes:\nAn arrangement is a vertex order\n\nEach orientation (transformation) is labeled with an integer from negative `DMPolytopeTypeGetNumArrangements(ct)`/2 to `DMPolytopeTypeGetNumArrangements(ct)`/2\nthat labels each arrangement (vertex ordering).\n\nSee `DMPolytopeMatchOrientation()` to find a new face orientation that takes the source face arrangement to the target face arrangement\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMPolytopeGetOrientation()`, `DMPolytopeMatchOrientation()`, `DMPolytopeTypeGetNumVertices()`, `DMPolytopeTypeGetVertexArrangement()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeMatchVertexOrientation\"))\n\"\"\"\nfunction DMPolytopeMatchVertexOrientation(PetscLib, ct::DMPolytopeType,sourceVert::Vector{Int},targetVert::Vector{Int})\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tornt = [PetscInt(1)]\n\tfound = Ref{PetscBool}()\n\n\tLibPETSc.DMPolytopeMatchVertexOrientation(\n\t\tPetscLib,\n\t\tct,\n\t\tsourceVert,\n\t\ttargetVert,\n\t\tRef(ornt,1),\n\t\tfound,\n\t)\n\n\treturn ornt[1],found[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tornt = DMPolytopeGetOrientation(PetscLib, ct::DMPolytopeType,sourceCone::Vector{Int},targetCone::Vector{Int})\n\nDetermine an orientation (transformation) that takes the source face arrangement to the target face arrangement\n\nNot Collective\n\nInput Parameters:\n===\n- `ct`         - The `DMPolytopeType`\n- `sourceCone` - The source arrangement of faces\n- `targetCone` - The target arrangement of faces\n\nOutput Parameter:\n===\n- `ornt` - The orientation (transformation) which will take the source arrangement to the target arrangement\n\nLevel: advanced\n\nNote:\nThis function is the same as `DMPolytopeMatchOrientation()` except it will generate an error if no suitable orientation can be found.\n\nDeveloper Note:\nIt is unclear why this function needs to exist since one can simply call `DMPolytopeMatchOrientation()` and error if none is found\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMPolytopeMatchOrientation()`, `DMPolytopeGetVertexOrientation()`, `DMPolytopeMatchVertexOrientation()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeGetOrientation\"))\n\"\"\"\nfunction DMPolytopeGetOrientation(PetscLib, ct::DMPolytopeType,sourceCone::Vector{Int},targetCone::Vector{Int})\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tornt = [PetscInt(1)]\n\n\tLibPETSc.DMPolytopeGetOrientation(\n\t\tPetscLib,\n\t\tct,\n\t\tsourceCone,\n\t\ttargetCone,\n\t\tRef(ornt,1),\n\t)\n\n\treturn ornt[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tornt = DMPolytopeGetVertexOrientation(PetscLib, ct::DMPolytopeType,sourceCone::Vector{Int},targetCone::Vector{Int})\n\nDetermine an orientation (transformation) that takes the source vertex arrangement to the target vertex arrangement\n\nNot Collective\n\nInput Parameters:\n===\n- `ct`         - The `DMPolytopeType`\n- `sourceCone` - The source arrangement of vertices\n- `targetCone` - The target arrangement of vertices\n\nOutput Parameter:\n===\n- `ornt` - The orientation (transformation) which will take the source arrangement to the target arrangement\n\nLevel: advanced\n\nNote:\nThis function is the same as `DMPolytopeMatchVertexOrientation()` except it errors if not orientation is possible.\n\nDeveloper Note:\nIt is unclear why this function needs to exist since one can simply call `DMPolytopeMatchVertexOrientation()` and error if none is found\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMPolytopeMatchVertexOrientation()`, `DMPolytopeGetOrientation()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeGetVertexOrientation\"))\n\"\"\"\nfunction DMPolytopeGetVertexOrientation(PetscLib, ct::DMPolytopeType,sourceCone::Vector{Int},targetCone::Vector{Int})\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tornt = [PetscInt(1)]\n\n\tLibPETSc.DMPolytopeGetVertexOrientation(\n\t\tPetscLib,\n\t\tct,\n\t\tsourceCone,\n\t\ttargetCone,\n\t\tRef(ornt,1),\n\t)\n\n\treturn ornt[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tinside = DMPolytopeInCellTest(PetscLib, ct::DMPolytopeType,point::Vector{Float64})\n\nCheck whether a point lies inside the reference cell of given type\n\nNot Collective\n\nInput Parameters:\n===\n- `ct`    - The `DMPolytopeType`\n- `point` - Coordinates of the point\n\nOutput Parameter:\n===\n- `inside` - Flag indicating whether the point is inside the reference cell of given type\n\nLevel: advanced\n\nSee also: \n=== \n`DM`, `DMPolytopeType`, `DMLocatePoints()`\n\n# External Links\n$(_doc_external(\"DM/DMPolytopeInCellTest\"))\n\"\"\"\nfunction DMPolytopeInCellTest(PetscLib, ct::DMPolytopeType,point::Vector{Float64})\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tinside = Ref{PetscBool}()\n\n\tLibPETSc.DMPolytopeInCellTest(\n\t\tPetscLib,\n\t\tct,\n\t\tpoint,\n\t\tinside,\n\t)\n\n\treturn inside[] == PETSC_TRUE\nend\n \n \n"
  },
  {
    "path": "src/deprecated/dmda.jl",
    "content": "abstract type AbstractDMDA{PetscLib} <: AbstractDM{PetscLib} end\n\nmutable struct DMDA{PetscLib} <: AbstractDMDA{PetscLib}\n    ptr::CDM\n    opts::Options{PetscLib}\n    age::Int\nend\n\nmutable struct DMDAPtr{PetscLib} <: AbstractDMDA{PetscLib}\n    ptr::CDM\n    age::Int\n    own::Bool\nend\n\n\"\"\"\n    DMDA(\n        petsclib::PetscLib\n        comm::MPI.Comm,\n        boundary_type::NTuple{D, DMBoundaryType},\n        global_dim::NTuple{D, Integer},\n        dof_per_node::Integer,\n        stencil_width::Integer,\n        stencil_type;\n        points_per_proc::Tuple,\n        processors::Tuple,\n        setfromoptions = true,\n        dmsetup = true,\n        options...\n    )\n\nCreates a D-dimensional distributed array with the options specified using\nkeyword arguments.\n\nIf keyword argument `points_per_proc[k] isa Vector{petsclib.PetscInt}` then this\nspecifies the points per processor in dimension `k`.\n\nIf keyword argument `processors[k] isa Integer` then this specifies the number of\nprocessors used in dimension `k`; ignored when `D == 1`.\n\nIf keyword argument `setfromoptions == true` then `setfromoptions!` called.\n\nIf keyword argument `dmsetup == true` then `setup!` is called.\n\nWhen `D == 1` the `stencil_type` argument is not required and ignored if\nspecified.\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreate1d\"))\n$(_doc_external(\"DMDA/DMDACreate2d\"))\n$(_doc_external(\"DMDA/DMDACreate3d\"))\n\"\"\"\nfunction DMDA(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{1, DMBoundaryType},\n    global_dim::NTuple{1, Integer},\n    dof_per_node::Integer,\n    stencil_width::Integer,\n    stencil_type = nothing;\n    points_per_proc::Tuple = (nothing,),\n    processors = nothing,\n    setfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    opts = Options(petsclib; options...)\n    da = DMDA{PetscLib}(C_NULL, opts, petsclib.age)\n\n    @assert length(points_per_proc) == 1\n\n    ref_points_per_proc =\n        if isnothing(points_per_proc[1]) || points_per_proc[1] == PETSC_DECIDE\n            C_NULL\n        else\n            @assert points_per_proc[1] isa Array{PetscLib.PetscInt}\n            @assert length(points_per_proc[1]) == MPI.Comm_size(comm)\n            points_per_proc[1]\n        end\n\n    with(da.opts) do\n        LibPETSc.DMDACreate1d(\n            PetscLib,\n            comm,\n            boundary_type[1],\n            global_dim[1],\n            dof_per_node,\n            stencil_width,\n            ref_points_per_proc,\n            da,\n        )\n    end\n    setfromoptions && setfromoptions!(da)\n    dmsetup && setup!(da)\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, da)\n    end\n    return da\nend\n\nfunction DMDA(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{2, DMBoundaryType},\n    global_dim::NTuple{2, Integer},\n    dof_per_node::Integer,\n    stencil_width::Integer,\n    stencil_type;\n    points_per_proc::Tuple = (nothing, nothing),\n    processors::Tuple = (PETSC_DECIDE, PETSC_DECIDE),\n    setfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    opts = Options(petsclib; options...)\n    da = DMDA{PetscLib}(C_NULL, opts, petsclib.age)\n\n    @assert length(points_per_proc) == 2\n\n    ref_points_per_proc = ntuple(2) do d\n        if isnothing(points_per_proc[d]) || points_per_proc[d] == PETSC_DECIDE\n            C_NULL\n        else\n            @assert points_per_proc[d] isa Array{PetscLib.PetscInt}\n            @assert length(points_per_proc[d]) == MPI.Comm_size(comm)\n            points_per_proc[d]\n        end\n    end\n\n    with(da.opts) do\n        LibPETSc.DMDACreate2d(\n            PetscLib,\n            comm,\n            boundary_type[1],\n            boundary_type[2],\n            stencil_type,\n            global_dim[1],\n            global_dim[2],\n            processors[1],\n            processors[2],\n            dof_per_node,\n            stencil_width,\n            ref_points_per_proc[1],\n            ref_points_per_proc[2],\n            da,\n        )\n    end\n    setfromoptions && setfromoptions!(da)\n    dmsetup && setup!(da)\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, da)\n    end\n    return da\nend\n\nfunction DMDA(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{3, DMBoundaryType},\n    global_dim::NTuple{3, Integer},\n    dof_per_node::Integer,\n    stencil_width::Integer,\n    stencil_type;\n    points_per_proc::Tuple = (nothing, nothing, nothing),\n    processors::Tuple = (PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE),\n    setfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    opts = Options(petsclib; options...)\n    da = DMDA{PetscLib}(C_NULL, opts, petsclib.age)\n\n    @assert length(points_per_proc) == 3\n\n    ref_points_per_proc = ntuple(3) do d\n        if isnothing(points_per_proc[d]) || points_per_proc[d] == PETSC_DECIDE\n            C_NULL\n        else\n            @assert points_per_proc[d] isa Array{PetscLib.PetscInt}\n            @assert length(points_per_proc[d]) == MPI.Comm_size(comm)\n            points_per_proc[d]\n        end\n    end\n\n    with(da.opts) do\n        LibPETSc.DMDACreate3d(\n            PetscLib,\n            comm,\n            boundary_type[1],\n            boundary_type[2],\n            boundary_type[3],\n            stencil_type,\n            global_dim[1],\n            global_dim[2],\n            global_dim[3],\n            processors[1],\n            processors[2],\n            processors[3],\n            dof_per_node,\n            stencil_width,\n            ref_points_per_proc[1],\n            ref_points_per_proc[2],\n            ref_points_per_proc[3],\n            da,\n        )\n    end\n    setfromoptions && setfromoptions!(da)\n    dmsetup && setup!(da)\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, da)\n    end\n    return da\nend\n\n\"\"\"\n    getinfo(da::AbstractDMDA)\n\nGet the info associated with the distributed array `da`. Returns `V` which has\nfields\n\n - `dim`\n - `global_size` (`Tuple` of length 3)\n - `procs_per_dim` (`Tuple` of length 3)\n - `dof_per_node`\n - `boundary_type` (`Tuple` of length 3)\n - `stencil_width`\n - `stencil_type`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetInfo\"))\n\"\"\"\nfunction getinfo(da::AbstractDMDA{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n\n    dim = [PetscInt(0)]\n    glo_size = [PetscInt(0), PetscInt(0), PetscInt(0)]\n    procs_per_dim = [PetscInt(0), PetscInt(0), PetscInt(0)]\n    dof_per_node = [PetscInt(0)]\n    stencil_width = [PetscInt(0)]\n    boundary_type = [DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE]\n    stencil_type = [DMDA_STENCIL_STAR]\n\n    LibPETSc.DMDAGetInfo(\n        PetscLib,\n        da,\n        dim,\n        Ref(glo_size, 1),\n        Ref(glo_size, 2),\n        Ref(glo_size, 3),\n        Ref(procs_per_dim, 1),\n        Ref(procs_per_dim, 2),\n        Ref(procs_per_dim, 3),\n        dof_per_node,\n        stencil_width,\n        Ref(boundary_type, 1),\n        Ref(boundary_type, 2),\n        Ref(boundary_type, 3),\n        stencil_type,\n    )\n\n    return (\n        dim = dim[1],\n        global_size = (glo_size...,),\n        procs_per_dim = (procs_per_dim...,),\n        dof_per_node = dof_per_node[1],\n        boundary_type = (boundary_type...,),\n        stencil_width = stencil_width[1],\n        stencil_type = stencil_type[1],\n    )\nend\n\n\"\"\"\n    getcorners(da::AbstractDMDA)\n\nReturns a `NamedTuple` with the global indices (excluding ghost points) of the\n`lower` and `upper` corners as well as the `size`.\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetCorners\"))\n\"\"\"\nfunction getcorners(da::AbstractDMDA{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    corners = [PetscInt(0), PetscInt(0), PetscInt(0)]\n    local_size = [PetscInt(1), PetscInt(1), PetscInt(1)]\n    LibPETSc.DMDAGetCorners(\n        PetscLib,\n        da,\n        Ref(corners, 1),\n        Ref(corners, 2),\n        Ref(corners, 3),\n        Ref(local_size, 1),\n        Ref(local_size, 2),\n        Ref(local_size, 3),\n    )\n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n    )\nend\n\n\"\"\"\n    getghostcorners(da::AbstractDMDA)\n\nReturns a `NamedTuple` with the global indices (including ghost points) of the\n`lower` and `upper` corners as well as the `size`.\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetGhostCorners\"))\n\"\"\"\nfunction getghostcorners(da::AbstractDMDA{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    corners = [PetscInt(0), PetscInt(0), PetscInt(0)]\n    local_size = [PetscInt(0), PetscInt(0), PetscInt(0)]\n    LibPETSc.DMDAGetGhostCorners(\n        PetscLib,\n        da,\n        Ref(corners, 1),\n        Ref(corners, 2),\n        Ref(corners, 3),\n        Ref(local_size, 1),\n        Ref(local_size, 2),\n        Ref(local_size, 3),\n    )\n    map!(local_size, local_size) do v\n        v == 0 ? 1 : v\n    end\n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n    )\nend\n\n\"\"\"\n    empty(da::DMDA)\n\nreturn an uninitialized `DMDA` struct.\n\"\"\"\nBase.empty(da::DMDA{PetscLib}) where {PetscLib} =\n    DMDA{PetscLib}(C_NULL, da.opts, da.age)\n\n\"\"\"\n    setuniformcoordinates!(\n        da::DMDA\n        xyzmin::NTuple{N, Real},\n        xyzmax::NTuple{N, Real},\n    ) where {N}\n\nSet uniform coordinates for the `da` using the lower and upper corners defined\nby the `NTuple`s `xyzmin` and `xyzmax`. If `N` is less than the dimension of the\n`da` then the value of the trailing coordinates is set to `0`.\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetUniformCoordinates\"))\n\"\"\"\nfunction setuniformcoordinates!(\n    da::DMDA{PetscLib},\n    xyzmin::NTuple{N, Real},\n    xyzmax::NTuple{N, Real},\n) where {N, PetscLib}\n    PetscReal = PetscLib.PetscReal\n    xmin = PetscReal(xyzmin[1])\n    xmax = PetscReal(xyzmax[1])\n\n    ymin = (N > 1) ? PetscReal(xyzmin[2]) : PetscReal(0)\n    ymax = (N > 1) ? PetscReal(xyzmax[2]) : PetscReal(0)\n\n    zmin = (N > 2) ? PetscReal(xyzmin[3]) : PetscReal(0)\n    zmax = (N > 2) ? PetscReal(xyzmax[3]) : PetscReal(0)\n\n    LibPETSc.DMDASetUniformCoordinates(\n        PetscLib,\n        da,\n        xmin,\n        xmax,\n        ymin,\n        ymax,\n        zmin,\n        zmax,\n    )\n    return da\nend\n\n\"\"\"\n    getlocalcoordinatearray(da::AbstractDMDA)\n\nReturns a `NamedTuple` with OffsetArrays that contain the local coordinates and\nthat can be addressed uisng global indices\n\n\"\"\"\nfunction getlocalcoordinatearray(da::AbstractDMDA{PetscLib}) where {PetscLib}\n    # retrieve local coordinates\n    coord_vec = coordinatesDMLocalVec(da)\n    # array\n    array1D = unsafe_localarray(coord_vec; read = true, write = false)\n    dim = [PetscLib.PetscInt(0)]\n    LibPETSc.DMGetCoordinateDim(PetscLib, da, dim)\n    dim = dim[1]\n    corners = getghostcorners(da)\n\n    return reshapelocalarray(array1D, da, dim)\nend\n\n\"\"\"\n    localinteriorlinearindex(dmda::AbstractDMDA)\n\nreturns the linear indices associated with the degrees of freedom own by this\nMPI rank embedded in the ghost index space for the `dmda`\n\"\"\"\nfunction localinteriorlinearindex(da::AbstractDMDA{PetscLib}) where PetscLib\n    # Determine the indices of the linear indices of the local part of the\n    # matrix we own\n    ghost_corners = PETSc.getghostcorners(da)\n    corners = PETSc.getcorners(da)\n\n    # First compute the Cartesian indices for the local portion we own\n    offset = ghost_corners.lower - CartesianIndex(1, 1, 1)\n    l_inds = ((corners.lower):(corners.upper)) .- offset\n\n    # Create a grid of indices with ghost then extract only the local part\n    lower = CartesianIndex(1, ghost_corners.lower)\n    upper = CartesianIndex(ndofs(da), ghost_corners.upper)\n    ind_local = LinearIndices(lower:upper)[:, l_inds][:]\n    return ind_local\nend\n\n\"\"\"\n    ndofs(da::AbstractDMDA)\n\nReturn the number of dofs in for `da`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetDof\"))\n\"\"\"\nfunction ndofs(da::AbstractDMDA{PetscLib}) where PetscLib\n    PetscInt = PetscLib.PetscInt\n    ndof = [PetscInt(0)]\n\n    # number of DOF that the DMDA has\n    LibPETSc.DMDAGetDof(PetscLib, da, ndof)\n    return @inbounds ndof[1]\nend\n\n\"\"\"\n    reshapelocalarray(Arr, da::AbstractDMDA{PetscLib}, ndof = ndofs(da))\n\nReturns an array with the same data as `Arr` but reshaped as an array that can\nbe addressed with global indexing.\n\"\"\"\nfunction reshapelocalarray(\n    Arr,\n    da::AbstractDMDA{PetscLib},\n    ndof::Integer = ndofs(da),\n) where {PetscLib}\n\n    # First we try to use a ghosted size\n    corners = getghostcorners(da)\n    # If this is two big for the array use non-ghosted\n    if length(Arr) < prod(corners.size) * ndof\n        corners = getcorners(da)\n    end\n    @assert length(Arr) == prod(corners.size) * ndof\n\n    oArr = OffsetArray(\n        reshape(Arr, Int64(ndof), Int64.(corners.size)...),\n        1:ndof,\n        (corners.lower[1]):(corners.upper[1]),\n        (corners.lower[2]):(corners.upper[2]),\n        (corners.lower[3]):(corners.upper[3]),\n    )\n\n    return oArr\nend\n"
  },
  {
    "path": "src/deprecated/dmstag.jl",
    "content": "abstract type AbstractDMStag{PetscLib} <: AbstractDM{PetscLib} end\n\nmutable struct DMStag{PetscLib} <: AbstractDMStag{PetscLib}\n    ptr::CDM\n    opts::Options{PetscLib}\n    age::Int\nend\n\nmutable struct DMStagPtr{PetscLib} <: AbstractDMStag{PetscLib}\n    ptr::CDM\n    age::Int\n    own::Bool\nend\n\nimport PETSc.LibPETSc:  DMStagStencilLocation, DMType, DMStagStencil\n\n\ninclude(\"dmstag_wrapped.jl\")    \n\n\"\"\"\n    empty(dm::DMStag)\n\nreturn an uninitialized `DMStag` struct.\n\"\"\"\nBase.empty(dm::DMStag{PetscLib}) where {PetscLib} =\n    DMStag{PetscLib}(C_NULL, dm.opts, dm.age)\n\n#abstract type DMStagStencilLocation{PetscLib} end\n\n\"\"\"\n    DMStag(\n        petsclib::PetscLib\n        comm::MPI.Comm,\n        boundary_type::NTuple{D, DMBoundaryType},\n        global_dim::NTuple{D, Integer},\n        dof_per_node::NTuple{1 + D, Integer},\n        stencil_width::Integer,\n        stencil_type = DMSTAG_STENCIL_BOX;\n        points_per_proc::Tuple,\n        processors::Tuple,\n        setfromoptions = true,\n        dmsetup = true,\n        options...\n    )\n\nCreates a D-dimensional distributed staggered array with the options specified\nusing keyword arguments.\n\nThe Tuple `dof_per_node` specifies how many degrees of freedom are at all the\nstaggerings in the order:\n - 1D: `(vertex, element)`\n - 2D: `(vertex, edge, element)`\n - 3D: `(vertex, edge, face, element)`\n\nIf keyword argument `points_per_proc[k] isa Vector{petsclib.PetscInt}` then this\nspecifies the points per processor in dimension `k`.\n\nIf keyword argument `processors[k] isa Integer` then this specifies the number of\nprocessors used in dimension `k`; ignored when `D == 1`.\n\nIf keyword argument `setfromoptions == true` then `setfromoptions!` called.\n\nIf keyword argument `dmsetup == true` then `setup!` is called.\n\nWhen `D == 1` the `stencil_type` argument is not required and ignored if\nspecified.\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate1d\"))\n$(_doc_external(\"DMStag/DMStagCreate2d\"))\n$(_doc_external(\"DMStag/DMStagCreate3d\"))\n\"\"\"\nfunction DMStag(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{1, DMBoundaryType},\n    global_dim::NTuple{1, Integer},\n    dof_per_node::NTuple{2, Integer},\n    stencil_width::Integer,\n    stencil_type = DMSTAG_STENCIL_BOX;\n    points_per_proc::Tuple = (nothing,),\n    processors = nothing,\n    dmsetfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    opts = Options(petsclib; options...)\n    dm = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n    ref_points_per_proc =\n        if isnothing(points_per_proc[1]) || points_per_proc[1] == PETSC_DECIDE\n            C_NULL\n        else\n           # @assert points_per_proc[1] isa Array{PetscLib.PetscInt}\n            @assert length(points_per_proc[1]) == MPI.Comm_size(comm)\n            points_per_proc[1]\n        end\n\n    with(dm.opts) do\n        LibPETSc.DMStagCreate1d(\n            PetscLib,\n            comm,\n            boundary_type[1],\n            global_dim[1],\n            dof_per_node[1],\n            dof_per_node[2],\n            stencil_type,\n            stencil_width,\n            ref_points_per_proc,\n            dm,\n        )\n    end\n\n    dmsetfromoptions && setfromoptions!(dm)\n    dmsetup && setup!(dm)\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, dm)\n    end\n\n    return dm\nend\n\n\nfunction DMStag(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{2, DMBoundaryType},\n    global_dim::NTuple{2, Integer},\n    dof_per_node::NTuple{3, Integer},\n    stencil_width::Integer,\n    stencil_type = DMSTAG_STENCIL_BOX;\n    points_per_proc::Tuple = (nothing, nothing),\n    processors::Tuple = (PETSC_DECIDE, PETSC_DECIDE),\n    dmsetfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    opts = Options(petsclib; options...)\n    dm = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n    ref_points_per_proc = ntuple(2) do d\n        if isnothing(points_per_proc[d]) || points_per_proc[d] == PETSC_DECIDE\n            C_NULL\n        else\n            @assert points_per_proc[d] isa Array{PetscLib.PetscInt}\n            @assert length(points_per_proc[d]) == MPI.Comm_size(comm)\n            points_per_proc[d]\n        end\n    end\n\n    with(dm.opts) do\n        LibPETSc.DMStagCreate2d(\n            PetscLib,\n            comm,\n            boundary_type[1],\n            boundary_type[2],\n            global_dim[1],\n            global_dim[2],\n            processors[1],\n            processors[2],\n            dof_per_node[1],\n            dof_per_node[2],\n            dof_per_node[3],\n            stencil_type,\n            stencil_width,\n            ref_points_per_proc[1],\n            ref_points_per_proc[2],\n            dm,\n        )\n    end\n\n    dmsetfromoptions && setfromoptions!(dm)\n    dmsetup && setup!(dm)\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, dm)\n    end\n\n    return dm\nend\n\nfunction DMStag(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{3, DMBoundaryType},\n    global_dim::NTuple{3, Integer},\n    dof_per_node::NTuple{4, Integer},\n    stencil_width::Integer,\n    stencil_type = DMSTAG_STENCIL_BOX;\n    points_per_proc::Tuple = (nothing, nothing, nothing),\n    processors::Tuple = (PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE),\n    dmsetfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    opts = Options(petsclib; options...)\n    dm = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n    ref_points_per_proc = ntuple(3) do d\n        if isnothing(points_per_proc[d]) || points_per_proc[d] == PETSC_DECIDE\n            C_NULL\n        else\n            @assert points_per_proc[d] isa Array{PetscLib.PetscInt}\n            @assert length(points_per_proc[d]) == MPI.Comm_size(comm)\n            points_per_proc[d]\n        end\n    end\n\n    with(dm.opts) do\n        LibPETSc.DMStagCreate3d(\n            PetscLib,\n            comm,\n            boundary_type[1],\n            boundary_type[2],\n            boundary_type[3],\n            global_dim[1],\n            global_dim[2],\n            global_dim[3],\n            processors[1],\n            processors[2],\n            processors[3],\n            dof_per_node[1],\n            dof_per_node[2],\n            dof_per_node[3],\n            dof_per_node[4],\n            stencil_type,\n            stencil_width,\n            ref_points_per_proc[1],\n            ref_points_per_proc[2],\n            ref_points_per_proc[3],\n            dm,\n        )\n    end\n\n    dmsetfromoptions && setfromoptions!(dm)\n    dmsetup && setup!(dm)\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, dm)\n    end\n\n    return dm\nend\n\nfunction DMStag(\n    dm::AbstractDMStag{PetscLib},\n    dof_per_node::Union{NTuple{2,Int},NTuple{3,Int},NTuple{4,Int}},\n    dmsetfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    petsclib = getlib(PetscLib)\n    opts = Options(petsclib; options...)\n    dmnew = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n    s = size(dof_per_node,1)\n\n    dof_per_node_C = [0,0,0,0]\n\n    for (i, value) in enumerate(dof_per_node)\n        dof_per_node_C[i] = value\n    end\n\n\n    with(dm.opts) do\n        LibPETSc.DMStagCreateCompatibleDMStag(\n            PetscLib,\n            dm,\n            dof_per_node_C[1],\n            dof_per_node_C[2],\n            dof_per_node_C[3],\n            dof_per_node_C[4],\n            dmnew,\n        )\n    end\n\n    dmsetfromoptions && setfromoptions!(dmnew)\n    dmsetup && setup!(dmnew)\n\n    comm  = getcomm(dm);\n\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, dmnew)\n    end    \n\n    return dmnew\nend\n\n\nBase.size(dm::AbstractDMStag) = DMStagGetGlobalSizes(dm)\nglobalsize(dm::AbstractDMStag) = DMStagGetGlobalSizes(dm::AbstractDMStag)\nboundarytypes(dm::AbstractDMStag)  = DMStagGetBoundaryTypes(dm::AbstractDMStag) \n\n\"\"\"\n    getcorners(dm::AbstractDMStag)\n\nReturns a `NamedTuple` with the global indices (excluding ghost points) of the\n`lower` and `upper` corners as well as the `size`. Also included is `nextra` of\nthe number of extra partial elements in each direction.\n\n# External Links\n$(_doc_external(\"DMDA/DMStagGetCorners\"))\n\"\"\"\nfunction getcorners(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    \n    x,y,z,m,n,p,nExtrax,nExtray,nExtraz = DMStagGetCorners(dm)\n\n    corners = [x,y,z]\n    local_size = [m,n,p]\n    nextra = [nExtrax,nExtray,nExtraz]\n \n\n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n        nextra = (nextra...,),\n    )\nend\n\n\n\"\"\"\n    getghostcorners(dm::AbstractDMStag)\n\nReturns a `NamedTuple` with the global indices (including ghost points) of the\n`lower` and `upper` corners as well as the `size`.\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetGhostCorners\"))\n\"\"\"\nfunction getghostcorners(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n\n    x,y,z,m,n,p = DMStagGetGhostCorners(dm)\n\n    corners = [x,y,z]\n    local_size = [m,n,p]\n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n    )\nend\n\n\nfunction setuniformcoordinates!(\n    dm::AbstractDMStag{PetscLib},\n    xyzmin::Union{NTuple{1,Int},NTuple{2,Int},NTuple{3,Int}},\n    xyzmax::Union{NTuple{1,Int},NTuple{2,Int},NTuple{3,Int}},\n    ) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n\n    xmin = xyzmin[1]\n    xmax = xyzmax[1]\n\n    s = size(xyzmin,1)\n\n    ymin = (s > 1) ? xyzmin[2] : PetscInt(0)\n    ymax = (s > 1) ? xyzmax[2] : PetscInt(0)\n\n    zmin = (s > 2) ? xyzmin[3] : PetscInt(0)\n    zmax = (s > 2) ? xyzmax[3] : PetscInt(0)\n\n    LibPETSc.DMStagSetUniformCoordinatesProduct(\n        PetscLib,\n        dm,\n        xmin,\n        xmax,\n        ymin,\n        ymax,\n        zmin,\n        zmax,\n    )\n\n    return nothing\nend\n\nfunction getcoordinatearray(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n    PetscScalar = PetscLib.PetscScalar\n\n    xP = Ref{Ptr{Ptr{PetscScalar}}}(C_NULL)\n    yP = Ref{Ptr{Ptr{PetscScalar}}}(C_NULL)\n    zP = Ref{Ptr{Ptr{PetscScalar}}}(C_NULL)\n\n    LibPETSc.DMStagGetProductCoordinateArrays(\n        PetscLib,\n        dm,\n        xP,\n        yP,\n        zP\n    )\n\n    corners = getghostcorners(dm)\n    mstart  = corners.lower\n    s       = corners.size\n    \n    xP = Base.unsafe_load(xP[],mstart[1])\n    xArray = unsafe_wrap(Array, xP, (2,s[1]); own = false)\n    xArrayO = OffsetArray(xArray,CartesianIndex(1,mstart[1]):CartesianIndex(2,mstart[1]+s[1]-1))\n    if yP[] != (C_NULL)\n        yP = Base.unsafe_load(yP[],mstart[2])\n        yArray = unsafe_wrap(Array, yP, (2,s[2]); own = false)\n        yArrayO = OffsetArray(yArray,CartesianIndex(1,mstart[2]):CartesianIndex(2,mstart[2]+s[2]-1))\n    else \n        yArrayO = nothing\n    end\n    if zP[] != (C_NULL)\n        zP = Base.unsafe_load(zP[],mstart[3])\n        zArray = unsafe_wrap(Array, zP, (2,s[3]); own = false)\n        zArrayO = OffsetArray(zArray,CartesianIndex(1,mstart[3]):CartesianIndex(2,mstart[3]+s[3]-1))\n    else\n        zArrayO = nothing\n    end\n\n    return xArrayO,yArrayO,zArrayO\n\nend\n\n\n\"\"\"\n    getentriesperelement(dm::AbstractDMStag)\n\n\"\"\"\nfunction getentriesperelement(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    entriesPerElement = [PetscInt(1)]\n\n    LibPETSc.DMStagGetEntriesPerElement(\n        PetscLib,\n        dm,\n        Ref(entriesPerElement,1)\n    )\n\n    return entriesPerElement[1]\nend\n\n\n\"\"\"\n    vecgetarray(dm::AbstractDMStag{PetscLib}, v::AbstractVec{PetscLib})\n\"\"\"\nfunction vecgetarray(dm::AbstractDMStag{PetscLib}, v::AbstractVec{PetscLib}) where {PetscLib}\n    # Note: there is actually no need to call PETSc again, as Julia has the possibility \n    # to wrap an existing array into another one. Our vec already has the array wrapper, \n    # so we reshape that \n\n    # Extract array from vector. Note: we need to release this by calling \n    # Base.finalize on X1!\n    X1       =   unsafe_localarray(v;  write=true, read=true)\n\n    array          =   vecgetarray(dm, X1) \n        \n    return array\nend\n\n\n\"\"\"\n    vecgetarray(dm::AbstractDMStag{PetscLib}, v::Vector)\n\"\"\"\nfunction vecgetarray(dm::AbstractDMStag{PetscLib}, v::Vector) where {PetscLib}\n\n    entriesPerElement   =   getentriesperelement(dm)\n    ghost_corners       =   getghostcorners(dm)\n    dim                 =   getdimension(dm) \n\n    # Dimensions of new array (see the PETSc DMStagVecGetArrayRead routine)\n    dim_vec             =   [entriesPerElement; collect(ghost_corners.size[1:dim])]\n\n    # Wrap julia vector to new vector.\n    X                   =    Base.view(v,:)\n     \n    # reshape to correct format\n    X                   =   reshape(v, Tuple(dim_vec))\n    array               =   PermutedDimsArray(X, Tuple([2:dim+1;1]))   # permute to take care of different array ordering in C/Julia\n       \n    return array\nend  \n\nfunction getlocationslot(\n    dm::AbstractDMStag{PetscLib},\n    loc::LibPETSc.DMStagStencilLocation, \n    dof::Integer\n    ) where {PetscLib}\n    PetscInt     = inttype(PetscLib)\n    slot = [PetscInt(1)]\n\n    LibPETSc.DMStagGetLocationSlot(\n        PetscLib,\n        dm,\n        loc,\n        dof,\n        Ref(slot,1)\n    )\n\n    return slot[]\nend\n\nDMStagGetLocationSlot(dm, loc, dof)   =  getlocationslot(dm, loc, dof)\n\n\"\"\"\n    Indices = DMStagGetIndices(dm::DMStag)\n    \nReturn indices of start and end of the central/vertex nodes of a local array built from the input `dm`. \nThis takes ghost points into account and helps    \n\n    dm \t        - the DMStag object\n    Indices \t- indices of lower and upper range of center and vertex nodes\n\"\"\"\nfunction DMStagGetIndices end\n\nfunction DMStagGetIndices(dm::DMStag)\n    # In Julia, indices in arrays start @ 1, whereas they can go negative in C\n    gc              =   PETSc.getghostcorners(dm);  \n    c               =   PETSc.getcorners(dm); \n\n    # If we have ghosted boundaries, we need to shift the start/end points, as ghosted \n    # boundaries are treated in PETSc with negative numbers, whereas in Julia everything is 1-based\n\n    # NOTE: we have not yet tested this in parallel\n    Diff            =   c.lower - gc.lower;\n    Start           =   c.lower + Diff;\n    End             =   Start + CartesianIndex(c.size) -  CartesianIndex(1,1,1) ;\n\n    # Note that we add the shift for julia/petsc consistency\n    shift = 0;\n    center = (  x= Start[1]:End[1],\n                y= Start[2]:End[2],  \n                z= Start[3]:End[3] )\n\n    vertex = (  x= Start[1]:End[1]+1 ,\n                y= Start[2]:End[2]+1 ,  \n                z= Start[3]:End[3]+1 )\n\n    return (center=center, vertex=vertex)\n            \nend\n\n"
  },
  {
    "path": "src/deprecated/dmstag_wrapped.jl",
    "content": "\"\"\"\n\tdm = DMStagCreate1d(petsclib::PetscLib,comm::MPI_Comm,bndx::DMBoundaryType,M::Int,dof0::Int,dof1::Int,stencilType::DMStagStencilType,stencilWidth::Int,lx::Vector{Int},dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...)\n\nCreate an object to manage data living on the elements and vertices of a parallelized regular 1D grid.\n\nCollective\n\nInput Parameters:\n===\n- petsclib     - the PETSc library\n- `comm`         - MPI communicator\n- `bndx`         - boundary type: `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `M`            - global number of elements\n- `dof0`         - number of degrees of freedom per vertex/0-cell\n- `dof1`         - number of degrees of freedom per element/1-cell\n- `stencilType`  - ghost/halo region type: `DMSTAG_STENCIL_BOX` or `DMSTAG_STENCIL_NONE`\n- `stencilWidth` - width, in elements, of halo/ghost region\n- `lx`           - array of local sizes, of length equal to the comm size, summing to `M` or `NULL`\n- `dmsetfromoptions` - call set from options\n- `dmsetup`          - call setup\n- `options`          - additional options\n\nOutput Parameter:\n===\n- `dm` - the new `DMSTAG` object\n\nOptions Database Keys:\n===\n- `-dm_view`                                      - calls `DMViewFromOptions()` at the conclusion of `DMSetUp()`\n- `-stag_grid_x <nx>`                             - number of elements in the x direction\n- `-stag_ghost_stencil_width`                     - width of ghost region, in elements\n- `-stag_boundary_type_x <none,ghosted,periodic>` - `DMBoundaryType` value\n\nLevel: beginner\n\nNotes:\nYou must call `DMSetUp()` after this call before using the `DM`.\nIf you wish to use the options database (see the keys above) to change values in the `DMSTAG`, you must call\n`DMSetFromOptions()` after this function but before `DMSetUp()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMLocalToGlobalBegin()`, `DMDACreate1d()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate1d\"))\n\"\"\"\nfunction DMStagCreate1d(petsclib::PetscLib,comm::MPI_Comm,bndx::DMBoundaryType,M::Int,dof0::Int,dof1::Int,stencilType::DMStagStencilType,stencilWidth::Int,lx::Vector{Int},dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...) where {PetscLib}\n\topts = Options(petsclib; options...)\n\tdm = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n\twith(dm.opts) do\n\t\tLibPETSc.DMStagCreate1d(\n\t\t\tpetsclib,\n\t\t\tcomm,\n\t\t\tbndx,\n\t\t\tM,\n\t\t\tdof0,\n\t\t\tdof1,\n\t\t\tstencilType,\n\t\t\tstencilWidth,\n\t\t\tlx,\n\t\t\tdm,\n\t\t)\n\tend\n\tdmsetfromoptions && setfromoptions!(dm)\n\tdmsetup && setup!(dm)\n\n\treturn dm\nend\n \n \n\"\"\"\n\tdm = DMStagCreate2d(petsclib::PetscLib,comm::MPI_Comm,bndx::DMBoundaryType,bndy::DMBoundaryType,M::Int,N::Int,m::Int,n::Int,dof0::Int,dof1::Int,dof2::Int,stencilType::DMStagStencilType,stencilWidth::Int,lx::Vector{Int},ly::Vector{Int},dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...)\n\nCreate an object to manage data living on the elements, faces, and vertices of a parallelized regular 2D grid.\n\nCollective\n\nInput Parameters:\n===\n- petsclib     - the PETSc library\n- `comm`         - MPI communicator\n- `bndx`         - x boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `bndy`         - y boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `M`            - global number of elements in x direction\n- `N`            - global number of elements in y direction\n- `m`            - number of ranks in the x direction (may be `PETSC_DECIDE`)\n- `n`            - number of ranks in the y direction (may be `PETSC_DECIDE`)\n- `dof0`         - number of degrees of freedom per vertex/0-cell\n- `dof1`         - number of degrees of freedom per face/1-cell\n- `dof2`         - number of degrees of freedom per element/2-cell\n- `stencilType`  - ghost/halo region type: `DMSTAG_STENCIL_NONE`, `DMSTAG_STENCIL_BOX`, or `DMSTAG_STENCIL_STAR`\n- `stencilWidth` - width, in elements, of halo/ghost region\n- `lx`           - array of local x element counts, of length equal to `m`, summing to `M`, or `NULL`\n- `ly`           - array of local y element counts, of length equal to `n`, summing to `N`, or `NULL`\n- `dmsetfromoptions` - call set from options\n- `dmsetup`          - call setup\n- `options`          - additional options\n\nOutput Parameter:\n===\n- `dm` - the new `DMSTAG` object\n\nOptions Database Keys:\n===\n- `-dm_view`                                      - calls `DMViewFromOptions()` at the conclusion of `DMSetUp()`\n- `-stag_grid_x <nx>`                             - number of elements in the x direction\n- `-stag_grid_y <ny>`                             - number of elements in the y direction\n- `-stag_ranks_x <rx>`                            - number of ranks in the x direction\n- `-stag_ranks_y <ry>`                            - number of ranks in the y direction\n- `-stag_ghost_stencil_width`                     - width of ghost region, in elements\n- `-stag_boundary_type_x <none,ghosted,periodic>` - `DMBoundaryType` value\n- `-stag_boundary_type_y <none,ghosted,periodic>` - `DMBoundaryType` value\n\nLevel: beginner\n\nNotes:\nYou must call `DMSetUp()` after this call, before using the `DM`.\nIf you wish to use the options database (see the keys above) to change values in the `DMSTAG`, you must call\n`DMSetFromOptions()` after this function but before `DMSetUp()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreate1d()`, `DMStagCreate3d()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMLocalToGlobalBegin()`, `DMDACreate2d()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate2d\"))\n\"\"\"\nfunction DMStagCreate2d(petsclib::PetscLib,comm::MPI_Comm,bndx::DMBoundaryType,bndy::DMBoundaryType,M::Int,N::Int,m::Int,n::Int,dof0::Int,dof1::Int,dof2::Int,stencilType::DMStagStencilType,stencilWidth::Int,lx::Vector{Int},ly::Vector{Int},dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...) where {PetscLib}\n\topts = Options(petsclib; options...)\n\tdm = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n\twith(dm.opts) do\n\t\tLibPETSc.DMStagCreate2d(\n\t\t\tpetsclib,\n\t\t\tcomm,\n\t\t\tbndx,\n\t\t\tbndy,\n\t\t\tM,\n\t\t\tN,\n\t\t\tm,\n\t\t\tn,\n\t\t\tdof0,\n\t\t\tdof1,\n\t\t\tdof2,\n\t\t\tstencilType,\n\t\t\tstencilWidth,\n\t\t\tlx,\n\t\t\tly,\n\t\t\tdm,\n\t\t)\n\tend\n\tdmsetfromoptions && setfromoptions!(dm)\n\tdmsetup && setup!(dm)\n\n\treturn dm\nend\n \n \n\"\"\"\n\tdm = DMStagCreate3d(petsclib::PetscLib,comm::MPI_Comm,bndx::DMBoundaryType,bndy::DMBoundaryType,bndz::DMBoundaryType,M::Int,N::Int,P::Int,m::Int,n::Int,p::Int,dof0::Int,dof1::Int,dof2::Int,dof3::Int,stencilType::DMStagStencilType,stencilWidth::Int,lx::Vector{Int},ly::Vector{Int},lz::Vector{Int},dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...)\n\nCreate an object to manage data living on the elements, faces, edges, and vertices of a parallelized regular 3D grid.\n\nCollective\n\nInput Parameters:\n===\n- petsclib     - the PETSc library\n- `comm`         - MPI communicator\n- `bndx`         - x boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `bndy`         - y boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `bndz`         - z boundary type, `DM_BOUNDARY_NONE`, `DM_BOUNDARY_PERIODIC`, or `DM_BOUNDARY_GHOSTED`\n- `M`            - global number of elements in x direction\n- `N`            - global number of elements in y direction\n- `P`            - global number of elements in z direction\n- `m`            - number of ranks in the x direction (may be `PETSC_DECIDE`)\n- `n`            - number of ranks in the y direction (may be `PETSC_DECIDE`)\n- `p`            - number of ranks in the z direction (may be `PETSC_DECIDE`)\n- `dof0`         - number of degrees of freedom per vertex/0-cell\n- `dof1`         - number of degrees of freedom per edge/1-cell\n- `dof2`         - number of degrees of freedom per face/2-cell\n- `dof3`         - number of degrees of freedom per element/3-cell\n- `stencilType`  - ghost/halo region type: `DMSTAG_STENCIL_NONE`, `DMSTAG_STENCIL_BOX`, or `DMSTAG_STENCIL_STAR`\n- `stencilWidth` - width, in elements, of halo/ghost region\n- `lx`           - array of local x  element counts, of length equal to `m`, summing to `M`, or `NULL`\n- `ly`           - arrays of local y element counts, of length equal to `n`, summing to `N`, or `NULL`\n- `lz`           - arrays of local z element counts, of length equal to `p`, summing to `P`, or `NULL`\n- `dmsetfromoptions` - call set from options\n- `dmsetup`          - call setup\n- `options`          - additional options\n\nOutput Parameter:\n===\n- `dm` - the new `DMSTAG` object\n\nOptions Database Keys:\n===\n- `-dm_view`                                      - calls `DMViewFromOptions()` at the conclusion of `DMSetUp()`\n- `-stag_grid_x <nx>`                             - number of elements in the x direction\n- `-stag_grid_y <ny>`                             - number of elements in the y direction\n- `-stag_grid_z <nz>`                             - number of elements in the z direction\n- `-stag_ranks_x <rx>`                            - number of ranks in the x direction\n- `-stag_ranks_y <ry>`                            - number of ranks in the y direction\n- `-stag_ranks_z <rz>`                            - number of ranks in the z direction\n- `-stag_ghost_stencil_width`                     - width of ghost region, in elements\n- `-stag_boundary_type x <none,ghosted,periodic>` - `DMBoundaryType` value\n- `-stag_boundary_type y <none,ghosted,periodic>` - `DMBoundaryType` value\n- `-stag_boundary_type z <none,ghosted,periodic>` - `DMBoundaryType` value\n\nLevel: beginner\n\nNotes:\nYou must call `DMSetUp()` after this call before using the `DM`.\nIf you wish to use the options database (see the keys above) to change values in the `DMSTAG`, you must call\n`DMSetFromOptions()` after this function but before `DMSetUp()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateLocalVector()`, `DMLocalToGlobalBegin()`, `DMDACreate3d()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate3d\"))\n\"\"\"\nfunction DMStagCreate3d(petsclib::PetscLib,comm::MPI_Comm,bndx::DMBoundaryType,bndy::DMBoundaryType,bndz::DMBoundaryType,M::Int,N::Int,P::Int,m::Int,n::Int,p::Int,dof0::Int,dof1::Int,dof2::Int,dof3::Int,stencilType::DMStagStencilType,stencilWidth::Int,lx::Vector{Int},ly::Vector{Int},lz::Vector{Int},dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...) where {PetscLib}\n\topts = Options(petsclib; options...)\n\tdm = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n\twith(dm.opts) do\n\t\tLibPETSc.DMStagCreate3d(\n\t\t\tpetsclib,\n\t\t\tcomm,\n\t\t\tbndx,\n\t\t\tbndy,\n\t\t\tbndz,\n\t\t\tM,\n\t\t\tN,\n\t\t\tP,\n\t\t\tm,\n\t\t\tn,\n\t\t\tp,\n\t\t\tdof0,\n\t\t\tdof1,\n\t\t\tdof2,\n\t\t\tdof3,\n\t\t\tstencilType,\n\t\t\tstencilWidth,\n\t\t\tlx,\n\t\t\tly,\n\t\t\tlz,\n\t\t\tdm,\n\t\t)\n\tend\n\tdmsetfromoptions && setfromoptions!(dm)\n\tdmsetup && setup!(dm)\n\n\treturn dm\nend\n \n \n\"\"\"\n\tnewdm = DMStagCreateCompatibleDMStag(dm::AbstractDMStag{PetscLib},dof0::Int,dof1::Int,dof2::Int,dof3::Int,dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...)\n\ncreate a compatible `DMSTAG` with different dof/stratum\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - the `DMSTAG` object\n- `dof0` - number of dof on the first stratum in the new `DMSTAG`\n- `dof1` - number of dof on the second stratum in the new `DMSTAG`\n- `dof2` - number of dof on the third stratum in the new `DMSTAG`\n- `dof3` - number of dof on the fourth stratum in the new `DMSTAG`\n- `dmsetfromoptions` - call set from options\n- `dmsetup`          - call setup\n- `options`          - additional options\n\nOutput Parameter:\n===\n- `newdm` - the new, compatible `DMSTAG`\n\nLevel: intermediate\n\nNotes:\nDOF supplied for strata too big for the dimension are ignored; these may be set to `0`.\nFor example, for a 2-dimensional `DMSTAG`, `dof2` sets the number of dof per element,\nand `dof3` is unused. For a 3-dimensional `DMSTAG`, `dof3` sets the number of DOF per element.\n\nIn contrast to `DMDACreateCompatibleDMDA()`, coordinates are not reused.\n\nSee also: \n=== \n`DMSTAG`, `DMDACreateCompatibleDMDA()`, `DMGetCompatibility()`, `DMStagMigrateVec()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreateCompatibleDMStag\"))\n\"\"\"\nfunction DMStagCreateCompatibleDMStag(dm::AbstractDMStag{PetscLib},dof0::Int,dof1::Int,dof2::Int,dof3::Int,dmsetfromoptions::Bool=true,dmsetup::Bool=true,options...) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib; options...)\n\tnewdm = DMStag{PetscLib}(C_NULL, opts, petsclib.age)\n\n\twith(dm.opts) do\n\t\tLibPETSc.DMStagCreateCompatibleDMStag(\n\t\t\tPetscLib,\n\t\t\tdm,\n\t\t\tdof0,\n\t\t\tdof1,\n\t\t\tdof2,\n\t\t\tdof3,\n\t\t\tnewdm,\n\t\t)\n\tend\n\n\tdmsetfromoptions && setfromoptions!(newdm)\n\tdmsetup && setup!(newdm)\n\n\treturn newdm\nend\n \n \n\"\"\"\n\tboundaryTypeX,boundaryTypeY,boundaryTypeZ = DMStagGetBoundaryTypes(dm::AbstractDMStag{PetscLib})\n\nget boundary types\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `boundaryTypeX` - boundary type for x direction\n- `boundaryTypeY` - boundary type for y direction, not set for one dimensional problems\n- `boundaryTypeZ` - boundary type for z direction, not set for one and two dimensional problems\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMBoundaryType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetBoundaryTypes\"))\n\"\"\"\nfunction DMStagGetBoundaryTypes(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tboundaryTypeX = Ref{DMBoundaryType}(DM_BOUNDARY_NONE)\n\tboundaryTypeY = Ref{DMBoundaryType}(DM_BOUNDARY_NONE)\n\tboundaryTypeZ = Ref{DMBoundaryType}(DM_BOUNDARY_NONE)\n\n\tLibPETSc.DMStagGetBoundaryTypes(\n\t\tPetscLib,\n\t\tdm,\n\t\tboundaryTypeX,\n\t\tboundaryTypeY,\n\t\tboundaryTypeZ,\n\t)\n\n\treturn boundaryTypeX[],boundaryTypeY[],boundaryTypeZ[]\nend\n \n \n\"\"\"\n\tx,y,z,m,n,p,nExtrax,nExtray,nExtraz = DMStagGetCorners(dm::AbstractDMStag{PetscLib})\n\nreturn global element indices of the local region (excluding ghost points)\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `x`       - starting element index in first direction\n- `y`       - starting element index in second direction\n- `z`       - starting element index in third direction\n- `m`       - element width in first direction\n- `n`       - element width in second direction\n- `p`       - element width in third direction\n- `nExtrax` - number of extra partial elements in first direction\n- `nExtray` - number of extra partial elements in second direction\n- `nExtraz` - number of extra partial elements in third direction\n\nLevel: beginner\n\nNotes:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nThe number of extra partial elements is either 1 or 0.\nThe value is 1 on right, top, and front non-periodic domain (\"physical\") boundaries,\nin the x, y, and z directions respectively, and otherwise 0.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGhostCorners()`, `DMDAGetCorners()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetCorners\"))\n\"\"\"\nfunction DMStagGetCorners(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tx = [PetscInt(1)]\n\ty = [PetscInt(1)]\n\tz = [PetscInt(1)]\n\tm = [PetscInt(1)]\n\tn = [PetscInt(1)]\n\tp = [PetscInt(1)]\n\tnExtrax = [PetscInt(1)]\n\tnExtray = [PetscInt(1)]\n\tnExtraz = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetCorners(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(x,1),\n\t\tRef(y,1),\n\t\tRef(z,1),\n\t\tRef(m,1),\n\t\tRef(n,1),\n\t\tRef(p,1),\n\t\tRef(nExtrax,1),\n\t\tRef(nExtray,1),\n\t\tRef(nExtraz,1),\n\t)\n\n\treturn x[1],y[1],z[1],m[1],n[1],p[1],nExtrax[1],nExtray[1],nExtraz[1]\nend\n \n \n\"\"\"\n\tdof0,dof1,dof2,dof3 = DMStagGetDOF(dm::AbstractDMStag{PetscLib})\n\nget number of DOF associated with each stratum of the grid\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `dof0` - the number of points per 0-cell (vertex/node)\n- `dof1` - the number of points per 1-cell (element in 1D, edge in 2D and 3D)\n- `dof2` - the number of points per 2-cell (element in 2D, face in 3D)\n- `dof3` - the number of points per 3-cell (element in 3D)\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetCorners()`, `DMStagGetGhostCorners()`, `DMStagGetGlobalSizes()`, `DMStagGetStencilWidth()`, `DMStagGetBoundaryTypes()`, `DMStagGetLocationDOF()`, `DMDAGetDof()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetDOF\"))\n\"\"\"\nfunction DMStagGetDOF(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tdof0 = [PetscInt(1)]\n\tdof1 = [PetscInt(1)]\n\tdof2 = [PetscInt(1)]\n\tdof3 = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetDOF(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(dof0,1),\n\t\tRef(dof1,1),\n\t\tRef(dof2,1),\n\t\tRef(dof3,1),\n\t)\n\n\treturn dof0[1],dof1[1],dof2[1],dof3[1]\nend\n \n \n\"\"\"\n\tentriesPerElement = DMStagGetEntries(dm::AbstractDMStag{PetscLib})\n\nget number of native entries in the global representation\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n===\n- `entries` - number of rank-native entries in the global representation\n\nLevel: developer\n\nNote:\nThis is the number of entries on this rank for a global vector associated with `dm`.\nThat is, it is value of `size` returned by `VecGetLocalSize(vec,&size)` when\n`DMCreateGlobalVector(dm,&vec) is used to create a `Vec`. Users would typically\nuse these functions.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetDOF()`, `DMStagGetEntriesLocal()`, `DMStagGetEntriesPerElement()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetEntries\"))\n\"\"\"\nfunction DMStagGetEntries(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tentriesPerElement = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetEntries(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(entriesPerElement,1),\n\t)\n\n\treturn entriesPerElement[1]\nend\n \n \n\"\"\"\n\tentries = DMStagGetEntriesLocal(dm::AbstractDMStag{PetscLib})\n\nget number of entries in the local representation\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n===\n- `entries` - number of entries in the local representation\n\nLevel: developer\n\nNote:\nThis is the number of entries on this rank in the local representation.\nThat is, it is value of `size` returned by `VecGetSize(vec,&size)` or\n`VecGetLocalSize(vec,&size)` when `DMCreateLocalVector(dm,&vec)` is used to\ncreate a `Vec`. Users would typically use these functions.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetDOF()`, `DMStagGetEntries()`, `DMStagGetEntriesPerElement()`, `DMCreateLocalVector()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetEntriesLocal\"))\n\"\"\"\nfunction DMStagGetEntriesLocal(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tentries = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetEntriesLocal(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(entries,1),\n\t)\n\n\treturn entries[1]\nend\n \n \n\"\"\"\n\tentriesPerElement = DMStagGetEntriesPerElement(dm::AbstractDMStag{PetscLib})\n\nget number of entries per element in the local representation\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n===\n- `entriesPerElement` - number of entries associated with each element in the local representation\n\nLevel: developer\n\nNotes:\nThis is the natural block size for most local operations. In 1D it is equal to `dof0` + `dof1`,\nin 2D it is equal to `dof0` + 2`dof1` + `dof2`, and in 3D it is equal to `dof0` + 3`dof1` + 3`dof2` + `dof3`\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetDOF()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetEntriesPerElement\"))\n\"\"\"\nfunction DMStagGetEntriesPerElement(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tentriesPerElement = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetEntriesPerElement(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(entriesPerElement,1),\n\t)\n\n\treturn entriesPerElement[1]\nend\n \n \n\"\"\"\n\tx,y,z,m,n,p = DMStagGetGhostCorners(dm::AbstractDMStag{PetscLib})\n\nreturn global element indices of the local region, including ghost points\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `x` - the starting element index in the first direction\n- `y` - the starting element index in the second direction\n- `z` - the starting element index in the third direction\n- `m` - the element width in the first direction\n- `n` - the element width in the second direction\n- `p` - the element width in the third direction\n\nLevel: beginner\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetCorners()`, `DMDAGetGhostCorners()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetGhostCorners\"))\n\"\"\"\nfunction DMStagGetGhostCorners(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tx = [PetscInt(1)]\n\ty = [PetscInt(1)]\n\tz = [PetscInt(1)]\n\tm = [PetscInt(1)]\n\tn = [PetscInt(1)]\n\tp = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetGhostCorners(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(x,1),\n\t\tRef(y,1),\n\t\tRef(z,1),\n\t\tRef(m,1),\n\t\tRef(n,1),\n\t\tRef(p,1),\n\t)\n\n\treturn x[1],y[1],z[1],m[1],n[1],p[1]\nend\n \n \n\"\"\"\n\tM,N,P = DMStagGetGlobalSizes(dm::AbstractDMStag{PetscLib})\n\nget global element counts\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `M` - global element counts in the x direction\n- `N` - global element counts in the y direction\n- `P` - global element counts in the z direction\n\nLevel: beginner\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetLocalSizes()`, `DMDAGetInfo()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetGlobalSizes\"))\n\"\"\"\nfunction DMStagGetGlobalSizes(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tM = [PetscInt(1)]\n\tN = [PetscInt(1)]\n\tP = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetGlobalSizes(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(M,1),\n\t\tRef(N,1),\n\t\tRef(P,1),\n\t)\n\n\treturn M[1],N[1],P[1]\nend\n \n \n\"\"\"\n\tisFirstRank0,isFirstRank1,isFirstRank2 = DMStagGetIsFirstRank(dm::AbstractDMStag{PetscLib})\n\nget boolean value for whether this rank is first in each direction in the rank grid\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `isFirstRank0` - whether this rank is first in the x direction\n- `isFirstRank1` - whether this rank is first in the y direction\n- `isFirstRank2` - whether this rank is first in the z direction\n\nLevel: intermediate\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetIsLastRank()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetIsFirstRank\"))\n\"\"\"\nfunction DMStagGetIsFirstRank(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tisFirstRank0 = Ref{PetscBool}()\n\tisFirstRank1 = Ref{PetscBool}()\n\tisFirstRank2 = Ref{PetscBool}()\n\n\tLibPETSc.DMStagGetIsFirstRank(\n\t\tPetscLib,\n\t\tdm,\n\t\tisFirstRank0,\n\t\tisFirstRank1,\n\t\tisFirstRank2,\n\t)\n\n\treturn isFirstRank0[] == PETSC_TRUE,isFirstRank1[] == PETSC_TRUE,isFirstRank2[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\tisLastRank0,isLastRank1,isLastRank2 = DMStagGetIsLastRank(dm::AbstractDMStag{PetscLib})\n\nget boolean value for whether this rank is last in each direction in the rank grid\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `isLastRank0` - whether this rank is last in the x direction\n- `isLastRank1` - whether this rank is last in the y direction\n- `isLastRank2` - whether this rank is last in the z direction\n\nLevel: intermediate\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetIsFirstRank()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetIsLastRank\"))\n\"\"\"\nfunction DMStagGetIsLastRank(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tisLastRank0 = Ref{PetscBool}()\n\tisLastRank1 = Ref{PetscBool}()\n\tisLastRank2 = Ref{PetscBool}()\n\n\tLibPETSc.DMStagGetIsLastRank(\n\t\tPetscLib,\n\t\tdm,\n\t\tisLastRank0,\n\t\tisLastRank1,\n\t\tisLastRank2,\n\t)\n\n\treturn isLastRank0[] == PETSC_TRUE,isLastRank1[] == PETSC_TRUE,isLastRank2[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\tm,n,p = DMStagGetLocalSizes(dm::AbstractDMStag{PetscLib})\n\nget local elementwise sizes\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `m` - local element counts (excluding ghosts) in the x direction\n- `n` - local element counts (excluding ghosts) in the y direction\n- `p` - local element counts (excluding ghosts) in the z direction\n\nLevel: beginner\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGlobalSizes()`, `DMStagGetDOF()`, `DMStagGetNumRanks()`, `DMDAGetLocalInfo()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetLocalSizes\"))\n\"\"\"\nfunction DMStagGetLocalSizes(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tm = [PetscInt(1)]\n\tn = [PetscInt(1)]\n\tp = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetLocalSizes(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(m,1),\n\t\tRef(n,1),\n\t\tRef(p,1),\n\t)\n\n\treturn m[1],n[1],p[1]\nend\n \n \n\"\"\"\n\tdof = DMStagGetLocationDOF(dm::AbstractDMStag{PetscLib},loc::DMStagStencilLocation)\n\nGet number of DOF associated with a given point in a `DMSTAG` grid\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `loc` - grid point (see `DMStagStencilLocation`)\n\nOutput Parameter:\n===\n- `dof` - the number of DOF (components) living at `loc` in `dm`\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencilLocation`, `DMStagStencil`, `DMDAGetDof()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetLocationDOF\"))\n\"\"\"\nfunction DMStagGetLocationDOF(dm::AbstractDMStag{PetscLib},loc::DMStagStencilLocation) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tdof = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetLocationDOF(\n\t\tPetscLib,\n\t\tdm,\n\t\tloc,\n\t\tRef(dof,1),\n\t)\n\n\treturn dof[1]\nend\n \n \n\"\"\"\n\tslot = DMStagGetLocationSlot(dm::AbstractDMStag{PetscLib},loc::DMStagStencilLocation,c::Int)\n\nget index to use in accessing raw local arrays\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `loc` - location relative to an element\n- `c`   - component\n\nOutput Parameter:\n===\n- `slot` - index to use\n\nLevel: beginner\n\nNotes:\nProvides an appropriate index to use with `DMStagVecGetArray()` and friends.\nThis is required so that the user doesn't need to know about the ordering of\ndof associated with each local element.\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArray()`, `DMStagVecGetArrayRead()`, `DMStagGetDOF()`, `DMStagGetEntriesPerElement()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetLocationSlot\"))\n\"\"\"\nfunction DMStagGetLocationSlot(dm::AbstractDMStag{PetscLib},loc::DMStagStencilLocation,c::Int) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tslot = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetLocationSlot(\n\t\tPetscLib,\n\t\tdm,\n\t\tloc,\n\t\tc,\n\t\tRef(slot,1),\n\t)\n\n\treturn slot[1]\nend\n \n \n\"\"\"\n\tnRanks0,nRanks1,nRanks2 = DMStagGetNumRanks(dm::AbstractDMStag{PetscLib})\n\nget number of ranks in each direction in the global grid decomposition\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `nRanks0` - number of ranks in the x direction in the grid decomposition\n- `nRanks1` - number of ranks in the y direction in the grid decomposition\n- `nRanks2` - number of ranks in the z direction in the grid decomposition\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGlobalSizes()`, `DMStagGetLocalSize()`, `DMStagSetNumRanks()`, `DMDAGetInfo()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetNumRanks\"))\n\"\"\"\nfunction DMStagGetNumRanks(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tnRanks0 = [PetscInt(1)]\n\tnRanks1 = [PetscInt(1)]\n\tnRanks2 = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetNumRanks(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(nRanks0,1),\n\t\tRef(nRanks1,1),\n\t\tRef(nRanks2,1),\n\t)\n\n\treturn nRanks0[1],nRanks1[1],nRanks2[1]\nend\n \n \n\"\"\"\n\tlx,ly,lz = DMStagGetOwnershipRanges(dm::AbstractDMStag{PetscLib})\n\nget elements per rank in each direction\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `lx` - ownership along x direction (optional)\n- `ly` - ownership along y direction (optional)\n- `lz` - ownership along z direction (optional)\n\nLevel: intermediate\n\nNotes:\nThese correspond to the optional final arguments passed to `DMStagCreate1d()`, `DMStagCreate2d()`, and `DMStagCreate3d()`.\n\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nIn C you should not free these arrays, nor change the values in them.\nThey will only have valid values while the `DMSTAG` they came from still exists (has not been destroyed).\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetGlobalSizes()`, `DMStagSetOwnershipRanges()`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDAGetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetOwnershipRanges\"))\n\"\"\"\nfunction DMStagGetOwnershipRanges(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tn_lx,n_ly,n_lz = DMStagGetNumRanks(dm::AbstractDMStag{PetscLib})\n\tnX = (n_lx,)\n\tnY = (n_ly,)\n\tnZ = (n_lz,)\n\t\n\tr_lx = PETSc_RefPtr(nX, PetscInt)\n\tr_ly = PETSc_RefPtr(nY, PetscInt)\n\tr_lz = PETSc_RefPtr(nZ, PetscInt)\n\n\tLibPETSc.DMStagGetOwnershipRanges(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_lx,\n\t\tr_ly,\n\t\tr_lz,\n\t)\n\n\tarrX = PETSc_unsafe_wrap(r_lx, nX; own=false)\n\tarrY = PETSc_unsafe_wrap(r_ly, nY; own=false)\n\tarrZ = PETSc_unsafe_wrap(r_lz, nZ; own=false)\n\n\treturn arrX, arrY, arrZ\nend\n \n \n\"\"\"\n\tarrX,arrY,arrZ,p_arrx,p_arry,p_arrz = DMStagGetProductCoordinateArrays(dm::AbstractDMStag{PetscLib})\n\nextract local product coordinate arrays, one per dimension\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `arrX` - local 1D coordinate arrays for x direction\n- `arrY` - local 1D coordinate arrays for y direction, not set for one dimensional problems\n- `arrZ` - local 1D coordinate arrays for z direction, not set for one and two dimensional problems\n- `p_arrx` - pointer to local 1D coordinate arrays for x direction\n- `p_arry` - pointer to local 1D coordinate arrays for y direction\n- `p_arrz` - pointer to local 1D coordinate arrays for z direction\n\nLevel: intermediate\n\nNotes:\nA high-level helper function to quickly extract local coordinate arrays.\n\nNote that 2-dimensional arrays are returned. See\n`DMStagVecGetArray()`, which is called internally to produce these arrays\nrepresenting coordinates on elements and vertices (element boundaries)\nfor a 1-dimensional `DMSTAG` in each coordinate direction.\n\nOne should use `DMStagGetProductCoordinateLocationSlot()` to determine appropriate\nindices for the second dimension in these returned arrays. This function\nchecks that the coordinate array is a suitable product of 1-dimensional\n`DMSTAG` objects.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagGetProductCoordinateArraysRead()`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagGetProductCoordinateLocationSlot()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetProductCoordinateArrays\"))\n\"\"\"\nfunction DMStagGetProductCoordinateArrays(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\tPetscInt    = PetscLib.PetscInt\n\tdims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\tnX = (dims[1],PetscInt(1))\n\tnY = (dims[2],PetscInt(1))\n\tnZ = (dims[3],PetscInt(1))\n\tr_arrX = PETSc_RefPtr(nX, PetscScalar)\n\tr_arrY = PETSc_RefPtr(nY, PetscScalar)\n\tr_arrZ = PETSc_RefPtr(nZ, PetscScalar)\n\n\tLibPETSc.DMStagGetProductCoordinateArrays(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_arrX,\n\t\tr_arrY,\n\t\tr_arrZ,\n\t)\n\n\tarrX = PETSc_unsafe_wrap(r_arrX, nX; own=false)\n\tarrY = PETSc_unsafe_wrap(r_arrY, nY; own=false)\n\tarrZ = PETSc_unsafe_wrap(r_arrZ, nZ; own=false)\n\n\treturn arrX[:],arrY[:],arrZ[:], r_arrX, r_arrY, r_arrZ\nend\n \n \n\"\"\"\n\tarrX,arrY,arrZ,p_arrx,p_arry,p_arrz = DMStagGetProductCoordinateArraysRead(dm::AbstractDMStag{PetscLib})\n\nextract product coordinate arrays, read\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `arrX` - local 1D coordinate arrays for x direction\n- `arrY` - local 1D coordinate arrays for y direction, not set for one dimensional problems\n- `arrZ` - local 1D coordinate arrays for z direction, not set for one and two dimensional problems\n- `p_arrx` - pointer to local 1D coordinate arrays for x direction\n- `p_arry` - pointer to local 1D coordinate arrays for y direction\n- `p_arrz` - pointer to local 1D coordinate arrays for z direction\n\nLevel: intermediate\n\nNote:\nSee `DMStagGetProductCoordinateArrays()` for more information.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagGetProductCoordinateArrays()`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagGetProductCoordinateLocationSlot()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetProductCoordinateArraysRead\"))\n\"\"\"\nfunction DMStagGetProductCoordinateArraysRead(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\tPetscInt    = PetscLib.PetscInt\n\t\n\tdims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\tnX = (dims[1],PetscInt(1))\n\tnY = (dims[2],PetscInt(1))\n\tnZ = (dims[3],PetscInt(1))\n\tr_arrX = PETSc_RefPtr(nX, PetscScalar)\n\tr_arrY = PETSc_RefPtr(nY, PetscScalar)\n\tr_arrZ = PETSc_RefPtr(nZ, PetscScalar)\n\t\n\tLibPETSc.DMStagGetProductCoordinateArraysRead(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_arrX,\n\t\tr_arrY,\n\t\tr_arrZ,\n\t)\n\n\tarrX = PETSc_unsafe_wrap(r_arrX, nX; own=false)\n\tarrY = PETSc_unsafe_wrap(r_arrY, nY; own=false)\n\tarrZ = PETSc_unsafe_wrap(r_arrZ, nZ; own=false)\n\n\treturn arrX[:],arrY[:],arrZ[:], r_arrX, r_arrY, r_arrZ\nend\n \n \n\"\"\"\n\tslot = DMStagGetProductCoordinateLocationSlot(dm::AbstractDMStag{PetscLib},loc::DMStagStencilLocation)\n\nget slot for use with local product coordinate arrays\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `loc` - the grid location\n\nOutput Parameter:\n===\n- `slot` - the index to use in local arrays\n\nLevel: intermediate\n\nNotes:\nHigh-level helper function to get slot indices for 1D coordinate `DM`s,\nfor use with `DMStagGetProductCoordinateArrays()` and related functions.\n\nFor `loc`, one should use `DMSTAG_LEFT`, `DMSTAG_ELEMENT`, or `DMSTAG_RIGHT` for \"previous\", \"center\" and \"next\"\nlocations, respectively, in each dimension.\nOne can equivalently use `DMSTAG_DOWN` or `DMSTAG_BACK` in place of `DMSTAG_LEFT`,\nand `DMSTAG_UP` or `DMSTACK_FRONT` in place of `DMSTAG_RIGHT`;\n\nThis function checks that the coordinates are actually set up so that using the\nslots from any of the 1D coordinate sub-`DM`s are valid for all the 1D coordinate sub-`DM`s.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagGetProductCoordinateArrays()`, `DMStagGetProductCoordinateArraysRead()`, `DMStagSetUniformCoordinates()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetProductCoordinateLocationSlot\"))\n\"\"\"\nfunction DMStagGetProductCoordinateLocationSlot(dm::AbstractDMStag{PetscLib},loc::DMStagStencilLocation) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tslot = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetProductCoordinateLocationSlot(\n\t\tPetscLib,\n\t\tdm,\n\t\tloc,\n\t\tRef(slot,1),\n\t)\n\n\treturn slot[1]\nend\n \n \n\"\"\"\n\tstencilType = DMStagGetStencilType(dm::AbstractDMStag{PetscLib})\n\nget elementwise ghost/halo stencil type\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n===\n- `stencilType` - the elementwise ghost stencil type: `DMSTAG_STENCIL_BOX`, `DMSTAG_STENCIL_STAR`, or `DMSTAG_STENCIL_NONE`\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetStencilType()`, `DMStagGetStencilWidth`, `DMStagStencilType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetStencilType\"))\n\"\"\"\nfunction DMStagGetStencilType(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tstencilType = Ref{DMStagStencilType}()\n\n\tLibPETSc.DMStagGetStencilType(\n\t\tPetscLib,\n\t\tdm,\n\t\tstencilType,\n\t)\n\n\treturn string(stencilType[])\nend\n \n \n\"\"\"\n\tstencilWidth = DMStagGetStencilWidth(dm::AbstractDMStag{PetscLib})\n\nget elementwise stencil width\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameter:\n===\n- `stencilWidth` - stencil/halo/ghost width in elements\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetStencilWidth()`, `DMStagGetStencilType()`, `DMDAGetStencilType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetStencilWidth\"))\n\"\"\"\nfunction DMStagGetStencilWidth(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tstencilWidth = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetStencilWidth(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(stencilWidth,1),\n\t)\n\n\treturn stencilWidth[1]\nend\n \n \n\"\"\"\n\trefine_x,refine_y,refine_z = DMStagGetRefinementFactor(dm::AbstractDMStag{PetscLib})\n\nget refinement ratios in each direction\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nOutput Parameters:\n===\n- `refine_x` - ratio of fine grid to coarse in x-direction (2 by default)\n- `refine_y` - ratio of fine grid to coarse in y-direction (2 by default)\n- `refine_z` - ratio of fine grid to coarse in z-direction (2 by default)\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMRefine()`, `DMCoarsen()`, `DMStagSetRefinementFactor()`, `DMDASetRefinementFactor()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagGetRefinementFactor\"))\n\"\"\"\nfunction DMStagGetRefinementFactor(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\trefine_x = [PetscInt(1)]\n\trefine_y = [PetscInt(1)]\n\trefine_z = [PetscInt(1)]\n\n\tLibPETSc.DMStagGetRefinementFactor(\n\t\tPetscLib,\n\t\tdm,\n\t\tRef(refine_x,1),\n\t\tRef(refine_y,1),\n\t\tRef(refine_z,1),\n\t)\n\n\treturn refine_x[1],refine_y[1],refine_z[1]\nend\n \n \n\"\"\"\n\tval = DMStagMatGetValuesStencil(dm::AbstractDMStag{PetscLib},mat::AbstractMatrix,nRow::Int,posRow::Vector{DMStagStencil{Int}},nCol::Int,posCol::Vector{DMStagStencil{Int}})\n\nretrieve local matrix entries using grid indexing\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`     - the `DMSTAG` object\n- `mat`    - the matrix\n- `nRow`   - number of rows\n- `posRow` - grid locations (including components) of rows\n- `nCol`   - number of columns\n- `posCol` - grid locations (including components) of columns\n\nOutput Parameter:\n===\n- `val` - logically two-dimensional array of values\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecGetValuesStencil()`, `DMStagVecSetValuesStencil()`, `DMStagMatSetValuesStencil()`, `MatSetValuesStencil()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagMatGetValuesStencil\"))\n\"\"\"\nfunction DMStagMatGetValuesStencil(dm::AbstractDMStag{PetscLib},mat::AbstractMatrix,nRow::Int,posRow::Vector{DMStagStencil{Int}},nCol::Int,posCol::Vector{DMStagStencil{Int}}) where {PetscLib}\n\t@assert length(posRow) == nRow \n\t@assert length(posCol) == nCol\n\t\n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscScalar = PetscLib.PetscScalar\n\tval = zeros(PetscScalar, nRow*nCol)\n\n\tLibPETSc.DMStagMatGetValuesStencil(\n\t\tPetscLib,\n\t\tdm,\n\t\tmat,\n\t\tnRow,\n\t\tposRow,\n\t\tnCol,\n\t\tposCol,\n\t\tRef(val,nRow*nCol),\n\t)\n\n\treturn val\nend\n\nDMStagMatGetValuesStencil(dm::AbstractDMStag{PetscLib},mat::AbstractMatrix,posRow::Vector{DMStagStencil{Int}},posCol::Vector{DMStagStencil{Int}}) where {PetscLib} =DMStagMatGetValuesStencil(dm,mat,length(posRow),posRow,length(posCol),posCol)\n\n \n\"\"\"\n\t DMStagMatSetValuesStencil(dm::AbstractDMStag{PetscLib},mat::AbstractMatrix,nRow::Int,posRow::Vector{DMStagStencil{Int}},nCol::Int,posCol::Vector{DMStagStencil{Int}},val::Vector{<:AbstractFloat},insertMode::InsertMode)\n\ninsert or add matrix entries using grid indexing\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`         - the `DMSTAG` object\n- `mat`        - the matrix\n- `nRow`       - number of rows\n- `posRow`     - grid locations (including components) of rows\n- `nCol`       - number of columns\n- `posCol`     - grid locations (including components) of columns\n- `val`        - logically two-dimensional array of values\n- `insertMode` - `INSERT_VALUES` or `ADD_VALUES`\n\nNotes:\nSee notes for `MatSetValuesStencil()`\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecGetValuesStencil()`, `DMStagVecSetValuesStencil()`, `DMStagMatGetValuesStencil()`, `MatSetValuesStencil()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `DMCreateMatrix()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagMatSetValuesStencil\"))\n\"\"\"\nfunction DMStagMatSetValuesStencil(dm::AbstractDMStag{PetscLib},mat::AbstractMatrix,nRow::Int,posRow::Vector{DMStagStencil{Int}},nCol::Int,posCol::Vector{DMStagStencil{Int}},val::Vector{<:AbstractFloat},insertMode::InsertMode) where {PetscLib}\n\t@assert length(val) == nRow*nCol \n\tLibPETSc.DMStagMatSetValuesStencil(\n\t\tPetscLib,\n\t\tdm,\n\t\tmat,\n\t\tnRow,\n\t\tposRow,\n\t\tnCol,\n\t\tposCol,\n\t\tval,\n\t\tinsertMode,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagMigrateVec(dm::AbstractDMStag{PetscLib},vec::AbstractVector,dmTo::AbstractDMStag{PetscLib},vecTo::AbstractVector)\n\ntransfer a vector associated with a `DMSTAG` to a vector associated with a compatible `DMSTAG`\n\nCollective\n\nInput Parameters:\n===\n- `dm`    - the source `DMSTAG` object\n- `vec`   - the source vector, compatible with `dm`\n- `dmTo`  - the compatible destination `DMSTAG` object\n- `vecTo` - the destination vector, compatible with `dmTo`\n\nLevel: advanced\n\nNotes:\nExtra dof are ignored, and unfilled dof are zeroed.\nCurrently only implemented to migrate global vectors to global vectors.\nFor the definition of compatibility of `DM`s, see `DMGetCompatibility()`.\n\nSee also: \n=== \n`DMSTAG`, `DMStagCreateCompatibleDMStag()`, `DMGetCompatibility()`, `DMStagVecSplitToDMDA()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagMigrateVec\"))\n\"\"\"\nfunction DMStagMigrateVec(dm::AbstractDMStag{PetscLib},vec::AbstractVector,dmTo::AbstractDMStag{PetscLib},vecTo::AbstractVector) where {PetscLib}\n\n\tLibPETSc.DMStagMigrateVec(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tdmTo,\n\t\tvecTo,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagPopulateLocalToGlobalInjective(dm::AbstractDMStag{PetscLib})\n\npopulate an internal 1\n\nCollective\n\nCreates an internal object which explicitly maps a single local degree of\nfreedom to each global degree of freedom. This is used, if populated,\ninstead of SCATTER_REVERSE_LOCAL with the (1-to-many, in general)\nglobal-to-local map, when DMLocalToGlobal() is called with INSERT_VALUES.\nThis allows usage, for example, even in the periodic, 1-rank case, where\nthe inverse of the global-to-local map, even when restricted to on-rank\ncommunication, is non-injective. This is at the cost of storing an additional\nVecScatter object inside each `DMSTAG` object.\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n\nLevel: developer\n\nNotes:\nIn normal usage, library users shouldn't be concerned with this function,\nas it is called during `DMSetUp()`, when required.\n\nReturns immediately if the internal map is already populated.\n\nDeveloper Notes:\nThis could, if desired, be moved up to a general `DM` routine. It would allow,\nfor example, `DMDA` to support `DMLocalToGlobal()` with `INSERT_VALUES`,\neven in the single-rank periodic case.\n\nSee also: \n=== \n`DMSTAG`, `DMLocalToGlobal()`, `VecScatter`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagPopulateLocalToGlobalInjective\"))\n\"\"\"\nfunction DMStagPopulateLocalToGlobalInjective(dm::AbstractDMStag{PetscLib}) where {PetscLib}\n\n\tLibPETSc.DMStagPopulateLocalToGlobalInjective(\n\t\tPetscLib,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\tarrX,arrY,arrZ = DMStagRestoreProductCoordinateArrays(dm::AbstractDMStag{PetscLib}, p_arrX, p_arrY, p_arrZ)\n\nrestore local array access\n\nLogically Collective\n\nInput Parameter:\n===\n- `dm` - the `DMSTAG` object\n- `p_arrX` - pointer to local 1D coordinate arrays for x direction\n- `p_arrY` - pointer to local 1D coordinate arrays for y direction\n- `p_arrZ` - pointer to local 1D coordinate arrays for z direction\n\nLevel: intermediate\n\nNotes:\nThis function does not automatically perform a local->global scatter to populate global coordinates from the local coordinates.\nThus, it may be required to explicitly perform these operations in some situations, as in the following partial example:\n```\nPetscCall(DMGetCoordinateDM(dm, &cdm));\nfor (PetscInt d = 0; d < 3; ++d) {\nDM  subdm;\nVec coor, coor_local;\n\nPetscCall(DMProductGetDM(cdm, d, &subdm));\nPetscCall(DMGetCoordinates(subdm, &coor));\nPetscCall(DMGetCoordinatesLocal(subdm, &coor_local));\nPetscCall(DMLocalToGlobal(subdm, coor_local, INSERT_VALUES, coor));\nPetscCall(PetscPrintf(PETSC_COMM_WORLD, \"Coordinates dim %\" PetscInt_FMT \":\\n\", d));\nPetscCall(VecView(coor, PETSC_VIEWER_STDOUT_WORLD));\n}\n```\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetProductCoordinateArrays()`, `DMStagGetProductCoordinateArraysRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagRestoreProductCoordinateArrays\"))\n\"\"\"\nfunction DMStagRestoreProductCoordinateArrays(dm::AbstractDMStag{PetscLib}, r_arrX, r_arrY, r_arrZ) where {PetscLib}\n\t\n\tLibPETSc.DMStagRestoreProductCoordinateArrays(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_arrX,\n\t\tr_arrY,\n\t\tr_arrZ,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\tarrX,arrY,arrZ = DMStagRestoreProductCoordinateArraysRead(dm::AbstractDMStag{PetscLib}, p_arrX, p_arrY, p_arrZ)\n\nrestore local product array access, read\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`   - the `DMSTAG` object\n- `p_arrX` - pointer to local 1D coordinate arrays for x direction\n- `p_arrY` - pointer to local 1D coordinate arrays for y direction\n- `p_arrZ` - pointer to local 1D coordinate arrays for z direction\n\nLevel: intermediate\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetProductCoordinateArrays()`, `DMStagGetProductCoordinateArraysRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagRestoreProductCoordinateArraysRead\"))\n\"\"\"\nfunction DMStagRestoreProductCoordinateArraysRead(dm::AbstractDMStag{PetscLib},  r_arrX, r_arrY, r_arrZ) where {PetscLib}\n\tLibPETSc.DMStagRestoreProductCoordinateArraysRead(\n\t\tPetscLib,\n\t\tdm,\n\t\tr_arrX,\n\t\tr_arrY,\n\t\tr_arrZ,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t xc = DMStagRestrictSimple(dmf::AbstractDMStag{PetscLib},xf::AbstractVector,dmc::AbstractDMStag{PetscLib})\n\nrestricts data from a fine to a coarse `DMSTAG`, in the simplest way\n\nValues on coarse cells are averages of all fine cells that they cover.\nThus, values on vertices are injected, values on edges are averages\nof the underlying two fine edges, and values on elements in\nd dimensions are averages of 2^d underlying elements.\n\nInput Parameters:\n===\n- `dmf` - fine `DM`\n- `xf`  - data on fine `DM`\n- `dmc` - coarse `DM`\n\nOutput Parameter:\n===\n- `xc` - data on coarse `DM`\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DM`, `DMRestrict()`, `DMCoarsen()`, `DMCreateInjection()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagRestrictSimple\"))\n\"\"\"\nfunction DMStagRestrictSimple(dmf::AbstractDMStag{PetscLib},xf::AbstractVector,dmc::AbstractDMStag{PetscLib}) where {PetscLib}\n\n\txc = DMLocalVec(dmc)      \n\n\tLibPETSc.DMStagRestrictSimple(\n\t\tPetscLib,\n\t\tdmf,\n\t\txf,\n\t\tdmc,\n\t\txc\n\t)\n\n\treturn xc\nend\n \n \n\"\"\"\n\t DMStagSetBoundaryTypes(dm::AbstractDMStag{PetscLib},boundaryType0::DMBoundaryType,boundaryType1::DMBoundaryType,boundaryType2::DMBoundaryType)\n\nset `DMSTAG` boundary types\n\nLogically Collective; boundaryType0, boundaryType1, and boundaryType2 must contain common values\n\nInput Parameters:\n===\n- `dm`            - the `DMSTAG` object\n- `boundaryType2` - boundary type for x direction\n- `boundaryType1` - boundary type for y direction, not set for one dimensional problems\n- `boundaryType0` - boundary type for z direction, not set for one and two dimensional problems\n\nLevel: advanced\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMBoundaryType`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDASetBoundaryType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetBoundaryTypes\"))\n\"\"\"\nfunction DMStagSetBoundaryTypes(dm::AbstractDMStag{PetscLib},boundaryType0::DMBoundaryType,boundaryType1::DMBoundaryType,boundaryType2::DMBoundaryType) where {PetscLib}\n\n\tLibPETSc.DMStagSetBoundaryTypes(\n\t\tPetscLib,\n\t\tdm,\n\t\tboundaryType0,\n\t\tboundaryType1,\n\t\tboundaryType2,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetCoordinateDMType(dm::AbstractDMStag{PetscLib},dmtype::DMType)\n\nset DM type to store coordinates\n\nLogically Collective; `dmtype` must contain common value\n\nInput Parameters:\n===\n- `dm`     - the `DMSTAG` object\n- `dmtype` - `DMtype` for coordinates, either `DMSTAG` or `DMPRODUCT`\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMGetCoordinateDM()`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesExplicit()`, `DMStagSetUniformCoordinatesProduct()`, `DMType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetCoordinateDMType\"))\n\"\"\"\nfunction DMStagSetCoordinateDMType(dm::AbstractDMStag{PetscLib},dmtype::DMType) where {PetscLib}\n\n\tLibPETSc.DMStagSetCoordinateDMType(\n\t\tPetscLib,\n\t\tdm,\n\t\tdmtype,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetDOF(dm::AbstractDMStag{PetscLib},dof0::Int,dof1::Int,dof2::Int,dof3::Int)\n\nset dof/stratum\n\nLogically Collective; `dof0`, `dof1`, `dof2`, and `dof3` must contain common values\n\nInput Parameters:\n===\n- `dm`   - the `DMSTAG` object\n- `dof0` - the number of points per 0-cell (vertex/node)\n- `dof1` - the number of points per 1-cell (element in 1D, edge in 2D and 3D)\n- `dof2` - the number of points per 2-cell (element in 2D, face in 3D)\n- `dof3` - the number of points per 3-cell (element in 3D)\n\nLevel: advanced\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMDASetDof()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetDOF\"))\n\"\"\"\nfunction DMStagSetDOF(dm::AbstractDMStag{PetscLib},dof0::Int,dof1::Int,dof2::Int,dof3::Int) where {PetscLib}\n\n\tLibPETSc.DMStagSetDOF(\n\t\tPetscLib,\n\t\tdm,\n\t\tdof0,\n\t\tdof1,\n\t\tdof2,\n\t\tdof3,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetGlobalSizes(dm::AbstractDMStag{PetscLib},N0::Int,N1::Int,N2::Int)\n\nset global element counts in each direction\n\nLogically Collective; `N0`, `N1`, and `N2` must contain common values\n\nInput Parameters:\n===\n- `dm` - the `DMSTAG` object\n- `N0` - global elementwise size in the x direction\n- `N1` - global elementwise size in the y direction\n- `N2` - global elementwise size in the z direction\n\nLevel: advanced\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetGlobalSizes()`, `DMDASetSizes()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetGlobalSizes\"))\n\"\"\"\nfunction DMStagSetGlobalSizes(dm::AbstractDMStag{PetscLib},N0::Int,N1::Int,N2::Int) where {PetscLib}\n\n\tLibPETSc.DMStagSetGlobalSizes(\n\t\tPetscLib,\n\t\tdm,\n\t\tN0,\n\t\tN1,\n\t\tN2,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetNumRanks(dm::AbstractDMStag{PetscLib},nRanks0::Int,nRanks1::Int,nRanks2::Int)\n\nset ranks in each direction in the global rank grid\n\nLogically Collective; `nRanks0`, `nRanks1`, and `nRanks2` must contain common values\n\nInput Parameters:\n===\n- `dm`      - the `DMSTAG` object\n- `nRanks0` - number of ranks in the x direction\n- `nRanks1` - number of ranks in the y direction\n- `nRanks2` - number of ranks in the z direction\n\nLevel: developer\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee also: \n=== \n`DMSTAG`, `DMDASetNumProcs()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetNumRanks\"))\n\"\"\"\nfunction DMStagSetNumRanks(dm::AbstractDMStag{PetscLib},nRanks0::Int,nRanks1::Int,nRanks2::Int) where {PetscLib}\n\n\tLibPETSc.DMStagSetNumRanks(\n\t\tPetscLib,\n\t\tdm,\n\t\tnRanks0,\n\t\tnRanks1,\n\t\tnRanks2,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetOwnershipRanges(dm::AbstractDMStag{PetscLib},lx::Vector{Int},ly::Vector{Int},lz::Vector{Int})\n\nset elements per rank in each direction\n\nLogically Collective; `lx`, `ly`, and `lz` must contain common values\n\nInput Parameters:\n===\n- `dm` - the `DMSTAG` object\n- `lx` - element counts for each rank in the x direction, may be `NULL`\n- `ly` - element counts for each rank in the y direction, may be `NULL`\n- `lz` - element counts for each rank in the z direction, may be `NULL`\n\nLevel: developer\n\nNote:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids. These arguments may be set to `NULL` in this case.\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetGlobalSizes()`, `DMStagGetOwnershipRanges()`, `DMDASetOwnershipRanges()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetOwnershipRanges\"))\n\"\"\"\nfunction DMStagSetOwnershipRanges(dm::AbstractDMStag{PetscLib},lx::Vector{Int},ly::Vector{Int},lz::Vector{Int}) where {PetscLib}\n\tLibPETSc.DMStagSetOwnershipRanges(\n\t\tPetscLib,\n\t\tdm,\n\t\tlx,\n\t\tly,\n\t\tlz,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetStencilType(dm::AbstractDMStag{PetscLib},stencilType::DMStagStencilType)\n\nset elementwise ghost/halo stencil type\n\nLogically Collective; `stencilType` must contain common value\n\nInput Parameters:\n===\n- `dm`          - the `DMSTAG` object\n- `stencilType` - the elementwise ghost stencil type: `DMSTAG_STENCIL_BOX`, `DMSTAG_STENCIL_STAR`, or `DMSTAG_STENCIL_NONE`\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetStencilType()`, `DMStagSetStencilWidth()`, `DMStagStencilType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetStencilType\"))\n\"\"\"\nfunction DMStagSetStencilType(dm::AbstractDMStag{PetscLib},stencilType::DMStagStencilType) where {PetscLib}\n\n\tLibPETSc.DMStagSetStencilType(\n\t\tPetscLib,\n\t\tdm,\n\t\tstencilType,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetStencilWidth(dm::AbstractDMStag{PetscLib},stencilWidth::Int)\n\nset elementwise stencil width\n\nLogically Collective; `stencilWidth` must contain common value\n\nInput Parameters:\n===\n- `dm`           - the `DMSTAG` object\n- `stencilWidth` - stencil/halo/ghost width in elements\n\nLevel: beginner\n\nNote:\nThe width value is not used when `DMSTAG_STENCIL_NONE` is specified.\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetStencilWidth()`, `DMStagGetStencilType()`, `DMStagStencilType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetStencilWidth\"))\n\"\"\"\nfunction DMStagSetStencilWidth(dm::AbstractDMStag{PetscLib},stencilWidth::Int) where {PetscLib}\n\n\tLibPETSc.DMStagSetStencilWidth(\n\t\tPetscLib,\n\t\tdm,\n\t\tstencilWidth,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetRefinementFactor(dm::AbstractDMStag{PetscLib},refine_x::Int,refine_y::Int,refine_z::Int)\n\nset refinement ratios in each direction\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`       - the `DMSTAG` object\n- `refine_x` - ratio of fine grid to coarse in x-direction (2 by default)\n- `refine_y` - ratio of fine grid to coarse in y-direction (2 by default)\n- `refine_z` - ratio of fine grid to coarse in z-direction (2 by default)\n\nLevel: intermediate\n\nNote:\nPass `PETSC_IGNORE` to leave a value unchanged\n\nSee also: \n=== \n`DMSTAG`, `DMRefine()`, `DMCoarsen()`, `DMStagGetRefinementFactor()`, `DMDAGetRefinementFactor()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetRefinementFactor\"))\n\"\"\"\nfunction DMStagSetRefinementFactor(dm::AbstractDMStag{PetscLib},refine_x::Int,refine_y::Int,refine_z::Int) where {PetscLib}\n\n\tLibPETSc.DMStagSetRefinementFactor(\n\t\tPetscLib,\n\t\tdm,\n\t\trefine_x,\n\t\trefine_y,\n\t\trefine_z,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagSetUniformCoordinates(dm::AbstractDMStag{PetscLib},xmin<:AbstractFloat,xmax<:AbstractFloat,ymin<:AbstractFloat,ymax<:AbstractFloat,zmin<:AbstractFloat,zmax<:AbstractFloat)\n\nset `DMSTAG` coordinates to be a uniform grid\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - the `DMSTAG` object\n- `xmin` - minimum global coordinate value in the x direction\n- `xmax` - maximum global coordinate values in the x direction\n- `ymin` - minimum global coordinate value in the y direction\n- `ymax` - maximum global coordinate value in the y direction\n- `zmin` - minimum global coordinate value in the z direction\n- `zmax` - maximum global coordinate value in the z direction\n\nLevel: advanced\n\nNotes:\n`DMSTAG` supports 2 different types of coordinate `DM`: `DMSTAG` and `DMPRODUCT`.\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nLocal coordinates are populated (using `DMSetCoordinatesLocal()`), linearly\nextrapolated to ghost cells, including those outside the physical domain.\nThis is also done in case of periodic boundaries, meaning that the same\nglobal point may have different coordinates in different local representations,\nwhich are equivalent assuming a periodicity implied by the arguments to this function,\ni.e. two points are equivalent if their difference is a multiple of (`xmax` - `xmin` )\nin the x direction, ( `ymax` - `ymin` ) in the y direction, and ( `zmax` - `zmin` ) in the z direction.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagSetUniformCoordinatesExplicit()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagSetCoordinateDMType()`, `DMGetCoordinateDM()`, `DMGetCoordinates()`, `DMDASetUniformCoordinates()`, `DMBoundaryType`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetUniformCoordinates\"))\n\"\"\"\nfunction DMStagSetUniformCoordinates(dm::AbstractDMStag{PetscLib},xmin,xmax,ymin,ymax,zmin,zmax) where {PetscLib}\n\n\tLibPETSc.DMStagSetUniformCoordinates(\n\t\tPetscLib,\n\t\tdm,\n\t\txmin,\n\t\txmax,\n\t\tymin,\n\t\tymax,\n\t\tzmin,\n\t\tzmax\n\t)\n\n\treturn nothing\nend \n \n\"\"\"\n\t DMStagSetUniformCoordinatesExplicit(dm::AbstractDMStag{PetscLib},xmin<:AbstractFloat,xmax<:AbstractFloat,ymin<:AbstractFloat,ymax<:AbstractFloat,zmin<:AbstractFloat,zmax<:AbstractFloat)\n\nset `DMSTAG` coordinates to be a uniform grid, storing all values\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - the `DMSTAG` object\n- `xmin` - minimum global coordinate value in the x direction\n- `xmax` - maximum global coordinate value in the x direction\n- `ymin` - minimum global coordinate value in the y direction\n- `ymax` - maximum global coordinate value in the y direction\n- `zmin` - minimum global coordinate value in the z direction\n- `zmax` - maximum global coordinate value in the z direction\n\nLevel: beginner\n\nNotes:\n`DMSTAG` supports 2 different types of coordinate `DM`: either another `DMSTAG`, or a `DMPRODUCT`.\nIf the grid is orthogonal, using `DMPRODUCT` should be more efficient.\n\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nSee the manual page for `DMStagSetUniformCoordinates()` for information on how\ncoordinates for dummy cells outside the physical domain boundary are populated.\n\nSee also: \n=== \n`DMSTAG`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagSetCoordinateDMType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetUniformCoordinatesExplicit\"))\n\"\"\"\nfunction DMStagSetUniformCoordinatesExplicit(dm::AbstractDMStag{PetscLib},xmin,xmax,ymin,ymax,zmin,zmax) where {PetscLib}\n\n\tLibPETSc.DMStagSetUniformCoordinatesExplicit(\n\t\tPetscLib,\n\t\tdm,\n\t\txmin,\n\t\txmax,\n\t\tymin,\n\t\tymax,\n\t\tzmin,\n\t\tzmax\n\t)\n\n\treturn nothing\nend\n\n \n\"\"\"\n\t DMStagSetUniformCoordinatesProduct(dm::AbstractDMStag{PetscLib},xmin<:AbstractFloat,xmax<:AbstractFloat,ymin<:AbstractFloat,ymax<:AbstractFloat,zmin<:AbstractFloat,zmax<:AbstractFloat)\n\ncreate uniform coordinates, as a product of 1D arrays\n\nSet the coordinate `DM` to be a `DMPRODUCT` of 1D `DMSTAG` objects, each of which have a coordinate `DM` (also a 1d `DMSTAG`) holding uniform coordinates.\n\nCollective\n\nInput Parameters:\n===\n- `dm`   - the `DMSTAG` object\n- `xmin` - minimum global coordinate value in the x direction\n- `xmax` - maximum global coordinate value in the x direction\n- `ymin` - minimum global coordinate value in the y direction\n- `ymax` - maximum global coordinate value in the y direction\n- `zmin` - minimum global coordinate value in the z direction\n- `zmax` - maximum global coordinate value in the z direction\n\nLevel: intermediate\n\nNotes:\nArguments corresponding to higher dimensions are ignored for 1D and 2D grids.\n\nThe per-dimension 1-dimensional `DMSTAG` objects that comprise the product\nalways have active 0-cells (vertices, element boundaries) and 1-cells\n(element centers).\n\nSee the manual page for `DMStagSetUniformCoordinates()` for information on how\ncoordinates for dummy cells outside the physical domain boundary are populated.\n\nSee also: \n=== \n`DMSTAG`, `DMPRODUCT`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesExplicit()`, `DMStagSetCoordinateDMType()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagSetUniformCoordinatesProduct\"))\n\"\"\"\nfunction DMStagSetUniformCoordinatesProduct(dm::AbstractDMStag{PetscLib},xmin,xmax,ymin,ymax,zmin,zmax) where {PetscLib}\n\n\tLibPETSc.DMStagSetUniformCoordinatesProduct(\n\t\tPetscLib,\n\t\tdm,\n\t\txmin,\n\t\txmax,\n\t\tymin,\n\t\tymax,\n\t\tzmin,\n\t\tzmax\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\tix = DMStagStencilToIndexLocal(dm::AbstractDMStag{PetscLib},dim::Int,n::Int,pos::Vector{DMStagStencil{Int}})\n\nConvert an array of `DMStagStenci`l objects to an array of indices into a local vector.\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `dim` - the dimension of the `DMSTAG` object\n- `n`   - the number of `DMStagStencil` objects\n- `pos` - an array of `n` `DMStagStencil` objects\n\nOutput Parameter:\n===\n- `ix` - output array of `n` indices\n\nNotes:\nThe `DMStagStencil` objects in `pos` use global element indices.\n\nThe `.c` fields in `pos` must always be set (even if to `0`).\n\nDeveloper Notes:\nThis is a \"hot\" function, and accepts the dimension redundantly to avoid having to perform any error checking inside the function.\n\nLevel: developer\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencilLocation`, `DMStagStencil`, `DMGetLocalVector`, `DMCreateLocalVector`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagStencilToIndexLocal\"))\n\"\"\"\nfunction DMStagStencilToIndexLocal(dm::AbstractDMStag{PetscLib},dim::Int,n::Int,pos::Vector{DMStagStencil{Int}}) where {PetscLib}\n\t@assert length(pos) == n \n\t\n\tPetscInt = PetscLib.PetscInt\n\tix = zeros(PetscInt,n)\n\n\tLibPETSc.DMStagStencilToIndexLocal(\n\t\tPetscLib,\n\t\tdm,\n\t\tdim,\n\t\tn,\n\t\tpos,\n\t\tRef(ix,n),\n\t)\n\n\treturn ix\nend\n \n \n\"\"\"\n\tarray, p_array = DMStagVecGetArray(dm::AbstractDMStag{PetscLib},vec::AbstractVector)\n\nget access to local array\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `vec` - the `Vec` object\n\nOutput Parameter:\n===\n- `array` - the array\n- `p_array` - pointer to the array\n\nLevel: beginner\n\nNote:\nThis function returns a (dim+1)-dimensional array for a dim-dimensional\n`DMSTAG`.\n\nThe first 1-3 dimensions indicate an element in the global\nnumbering, using the standard C ordering.\n\nThe final dimension in this array corresponds to a degree\nof freedom with respect to this element, for example corresponding to\nthe element or one of its neighboring faces, edges, or vertices.\n\nFor example, for a 3D `DMSTAG`, indexing is `array[k][j][i][idx]`, where `k` is the\nindex in the z-direction, `j` is the index in the y-direction, and `i` is the\nindex in the x-direction.\n\n`idx` is obtained with `DMStagGetLocationSlot()`, since the correct offset\ninto the (d+1)-dimensional C array for a d-dimensional `DMSTAG` depends on the grid size and the number\nof DOF stored at each location.\n\n`DMStagVecRestoreArray()` must be called, once finished with the array\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArrayRead()`, `DMStagGetLocationSlot()`, `DMGetLocalVector()`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMCreateGlobalVector()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecGetArray\"))\n\"\"\"\nfunction DMStagVecGetArray(dm::AbstractDMStag{PetscLib},vec::AbstractVector) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\tdims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\tdims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\tdmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (dims...,dmE)\n\tr_array = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMStagVecGetArray(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tr_array,\n\t)\n\n\tarray = PETSc_unsafe_wrap(r_array, dims; own=false)\n\n\treturn array, r_array\nend\n \n \n\"\"\"\n\tarray, p_array = DMStagVecGetArrayRead(dm::AbstractDMStag{PetscLib},vec::AbstractVector)\n\nget read\n\nLogically Collective\n\nSee the man page for `DMStagVecGetArray()` for more information.\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `vec` - the `Vec` object\n\nOutput Parameter:\n===\n- `array` - the read-only array\n- `p_array` - pointer to the array\n\nLevel: beginner\n\nNote:\n`DMStagVecRestoreArrayRead()` must be called, once finished with the array\n\nSee also: \n=== \n`DMSTAG`, `DMStagGetLocationSlot()`, `DMGetLocalVector()`, `DMCreateLocalVector()`, `DMGetGlobalVector()`, `DMCreateGlobalVector()`, `DMDAVecGetArrayRead()`, `DMDAVecGetArrayDOFRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecGetArrayRead\"))\n\"\"\"\nfunction DMStagVecGetArrayRead(dm::AbstractDMStag{PetscLib},vec::AbstractVector) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\tdims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\tdims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\tdmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (dims...,dmE)\n\tr_array = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMStagVecGetArrayRead(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tr_array,\n\t)\n\n\tarray = PETSc_unsafe_wrap(r_array, dims; own=false)\n\n\treturn array, r_array\nend\n \n \n\"\"\"\n\tval = DMStagVecGetValuesStencil(dm::AbstractDMStag{PetscLib},vec::AbstractVector,n::Int,pos::Vector{DMStagStencil{Int}})\n\nget vector values using grid indexing\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `vec` - the vector object\n- `n`   - the number of values to obtain\n- `pos` - locations to obtain values from (as an array of `DMStagStencil` values)\n\nOutput Parameter:\n===\n- `val` - value at the point\n\nNotes:\nAccepts stencils which refer to global element numbers, but\nonly allows access to entries in the local representation (including ghosts).\n\nThis approach is not as efficient as getting values directly with `DMStagVecGetArray()`,\nwhich is recommended for matrix-free operators.\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecSetValuesStencil()`, `DMStagMatSetValuesStencil()`, `DMStagVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecGetValuesStencil\"))\n\"\"\"\nfunction DMStagVecGetValuesStencil(dm::AbstractDMStag{PetscLib},vec::AbstractVector,n::Int,pos::Vector{DMStagStencil{Int}}) where {PetscLib}\n\t@assert length(pos) == n \n\tPetscScalar = PetscLib.PetscScalar\n\tval = zeros(PetscScalar,n)\n\n\tLibPETSc.DMStagVecGetValuesStencil(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tn,\n\t\tpos,\n\t\tRef(val,n),\n\t)\n\n\treturn val\nend\n \nDMStagVecGetValuesStencil(dm::AbstractDMStag{PetscLib},vec::AbstractVector,pos::Vector{DMStagStencil{Int}}) where {PetscLib} = DMStagVecGetValuesStencil(dm,vec,length(pos),pos)\n\n\n\"\"\"\n\tarray = DMStagVecRestoreArray(dm::AbstractDMStag{PetscLib},vec::AbstractVector, p_array)\n\nrestore access to a raw array\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `vec` - the `Vec` object\n- `p_array` - pointer to the array\n\nOutput Parameter:\n===\n- `array` - the array\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArray()`, `DMDAVecRestoreArray()`, `DMDAVecRestoreArrayDOF()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecRestoreArray\"))\n\"\"\"\nfunction DMStagVecRestoreArray(dm::AbstractDMStag{PetscLib},vec::AbstractVector, r_array) where {PetscLib}\n\t\n\tLibPETSc.DMStagVecRestoreArray(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tr_array\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\tarray = DMStagVecRestoreArrayRead(dm::AbstractDMStag{PetscLib},vec::AbstractVector, p_array)\n\nrestore read\n\nLogically Collective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `vec` - the Vec object\n- `p_array` - Pointer to array\n\nOutput Parameter:\n===\n- `array` - the read-only array\n\nLevel: beginner\n\nSee also: \n=== \n`DMSTAG`, `DMStagVecGetArrayRead()`, `DMDAVecRestoreArrayRead()`, `DMDAVecRestoreArrayDOFRead()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecRestoreArrayRead\"))\n\"\"\"\nfunction DMStagVecRestoreArrayRead(dm::AbstractDMStag{PetscLib},vec::AbstractVector) where {PetscLib}\n\n\tLibPETSc.DMStagVecRestoreArrayRead(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tr_array,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t DMStagVecSetValuesStencil(dm::AbstractDMStag{PetscLib},vec::AbstractVector,n::Int,pos::Vector{DMStagStencil{Int}},val::Vector{<:AbstractFloat},insertMode::InsertMode)\n\nSet `Vec` values using global grid indexing\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`         - the `DMSTAG` object\n- `vec`        - the `Vec`\n- `n`          - the number of values to set\n- `pos`        - the locations to set values, as an array of `DMStagStencil` structs\n- `val`        - the values to set\n- `insertMode` - `INSERT_VALUES` or `ADD_VALUES`\n\nNotes:\nThe vector is expected to be a global vector compatible with the DM (usually obtained by `DMGetGlobalVector()` or `DMCreateGlobalVector()`).\n\nThis approach is not as efficient as setting values directly with `DMStagVecGetArray()`, which is recommended for matrix-free operators.\nFor assembling systems, where overhead may be less important than convenience, this routine could be helpful in assembling a righthand side and a matrix (using `DMStagMatSetValuesStencil()`).\n\nLevel: advanced\n\nSee also: \n=== \n`DMSTAG`, `Vec`, `DMStagStencil`, `DMStagStencilLocation`, `DMStagVecGetValuesStencil()`, `DMStagMatSetValuesStencil()`, `DMCreateGlobalVector()`, `DMGetLocalVector()`, `DMStagVecGetArray()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecSetValuesStencil\"))\n\"\"\"\nfunction DMStagVecSetValuesStencil(dm::AbstractDMStag{PetscLib},vec::AbstractVector,n::Int,pos::Vector{DMStagStencil{Int}},val::Vector{<:AbstractFloat},insertMode::InsertMode) where {PetscLib}\n\t@assert length(val) == length(pos) == n \n\t\n\tLibPETSc.DMStagVecSetValuesStencil(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tn,\n\t\tpos,\n\t\tval,\n\t\tinsertMode,\n\t)\n\n\treturn nothing\nend\n\n\"\"\"\nSame but no need to specify the length of input vectors\n\"\"\"\nDMStagVecSetValuesStencil(dm::AbstractDMStag{PetscLib},vec::AbstractVector,pos::Vector{DMStagStencil{Int}},val::Vector{<:AbstractFloat},insertMode::InsertMode) where {PetscLib} = DMStagVecSetValuesStencil(dm,vec,length(pos),pos,val,insertMode)\n\n\n \n\"\"\"\n\tpda, pdavec = DMStagVecSplitToDMDA(dm::AbstractDMStag{PetscLib},vec::AbstractVector,loc::DMStagStencilLocation,c::Int)\n\ncreate a `DMDA` and `Vec` from a subgrid of a `DMSTAG` and its `Vec`\n\nCollective\n\nInput Parameters:\n===\n- `dm`  - the `DMSTAG` object\n- `vec` - `Vec` object associated with `dm`\n- `loc` - which subgrid to extract (see `DMStagStencilLocation`)\n- `c`   - which component to extract (see note below)\n\nOutput Parameters:\n===\n- `pda`    - the `DMDA`\n- `pdavec` - the new `Vec`\n\nLevel: advanced\n\nNotes:\nIf a `c` value of `-k` is provided, the first `k` DOF for that position are extracted,\npadding with zero values if needed. If a non-negative value is provided, a single\nDOF is extracted.\n\nThe caller is responsible for destroying the created `DMDA` and `Vec`.\n\nSee also: \n=== \n`DMSTAG`, `DMDA`, `DMStagStencilLocation`, `DM`, `Vec`, `DMStagMigrateVec()`, `DMStagCreateCompatibleDMStag()`\n\n# External Links\n$(_doc_external(\"DMStag/DMStagVecSplitToDMDA\"))\n\"\"\"\nfunction DMStagVecSplitToDMDA(dm::AbstractDMStag{PetscLib},vec::AbstractVector,loc::DMStagStencilLocation,c::Int) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tpda \t= DMDA{PetscLib}(C_NULL, opts, petsclib.age)\n\tpdavec \t= VecSeq{PetscLib, petsclib.PetscScalar}(C_NULL, petsclib.age)\n\n\tLibPETSc.DMStagVecSplitToDMDA(\n\t\tPetscLib,\n\t\tdm,\n\t\tvec,\n\t\tloc,\n\t\tc,\n\t\tpda,\n\t\tpdavec,\n\t)\n\n\treturn pda,pdavec\nend\n \n \n"
  },
  {
    "path": "src/deprecated/ksp.jl",
    "content": "const CKSP = Ptr{Cvoid}\nconst CKSPType = Cstring\nconst KSPType = LibPETSc.KSPType\n\nPetscReal = LibPETSc.PETSC_REAL\nimport PETSc.LibPETSc: PetscCount, PetscViewerFormat, KSPNormType, KSPGuess, KSPGuessType\n\nabstract type AbstractKSP{PetscLib, PetscScalar} <: Factorization{PetscScalar} end\n\n\"\"\"\n    KSPPtr(petsclib, ksp::CKS, own)\n\nContainer type for a PETSc KSP that is just a raw pointer.\n\"\"\"\nmutable struct KSPPtr{PetscLib, PetscScalar} <:\n               AbstractKSP{PetscLib, PetscScalar}\n    ptr::CKSP\n    age::Int\nend\n\nmutable struct KSP{PetscLib, PetscScalar} <: AbstractKSP{PetscLib, PetscScalar}\n    ptr::CKSP\n    opts::Options{PetscLib}\n    age::Int\n    computerhs! # Needed for KSPSetComputeRHS\n    computeops! # Needed for KSPSetComputeOperators\n    function KSP{PetscLib}(comm, opts) where {PetscLib}\n        PetscScalar = PetscLib.PetscScalar\n        ksp = new{PetscLib, PetscScalar}(\n            C_NULL,\n            opts,\n            getlib(PetscLib).age,\n            nothing,\n            nothing,\n        )\n        with(ksp.opts) do\n            LibPETSc.KSPCreate(PetscLib, comm, ksp)\n            #ksp.ptr = KSPCreate(comm)\n        end\n\n        # If there is only one rank we can finalize the KSP with GC\n        if MPI.Comm_size(comm) == 1\n            finalizer(destroy, ksp)\n        end\n\n        return ksp\n    end\nend\n\ninclude(\"ksp_wrapped.jl\")   \n\n\nfunction setfromoptions!(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n    with(ksp.opts) do\n        LibPETSc.KSPSetFromOptions(PetscLib, ksp)\n    end\nend\n\n\"\"\"\n    KSP(A::AbstractMat, P::AbstractMat{PetscLib} = A; options...)\n\nCreate a `KSP` using the matrix `A` and preconditioner construction matrix `P`\nwith the `options`.\n\nThe communicator is obtained from `A` and if it has size `1` then the garbage\ncollector is set, otherwise the user is responsible for calling\n[`destroy`](@ref).\n\n# External Links\n$(_doc_external(\"KSP/KSPCreate\"))\n$(_doc_external(\"KSP/KSPSetOperators\"))\n$(_doc_external(\"KSP/KSPSetFromOptions\"))\n\"\"\"\nfunction KSP(\n    A::AbstractMat{PetscLib},\n    P::AbstractMat{PetscLib} = A;\n    options...,\n) where {PetscLib}\n    @assert initialized(PetscLib)\n\n    ksp = KSP{PetscLib}(getcomm(A), Options(PetscLib; options...))\n\n    KSPSetOperators(ksp,A,P)\n\n    setfromoptions!(ksp)\n\n    return ksp\nend\n\n\n\"\"\"\n    KSP([petsclib,] A::SparseMatrixCSC; options...)\n\nCreate a [`KSP`](@ref) with the sparse matrix `A` using the `petsclib`. If\n`petsclib` is not given, the default library will be used`.\n\"\"\"\nKSP(petsclib, A::SparseMatrixCSC; kwargs...) =\n    KSP(MatSeqAIJ(petsclib, A); kwargs...)\nfunction KSP(A::SparseMatrixCSC{PetscScalar}; kwargs...) where {PetscScalar}\n    KSP(MatSeqAIJ(getlib(; PetscScalar = PetscScalar), A); kwargs...)\nend\n\n\"\"\"\n    KSP(da::AbstractDM; options...)\n\nConstruct a PETSc Krylov subspace solver from the distributed mesh\n\nAny PETSc options prefixed with `ksp_` and `pc_` can be passed as keywords.\n\n# External Links\n$(_doc_external(\"KSP/KSPCreate\"))\n$(_doc_external(\"KSP/KSPSetDM\"))\n$(_doc_external(\"KSP/KSPSetFromOptions\"))\n\"\"\"\nfunction KSP(dm::AbstractDM{PetscLib}; options...) where {PetscLib}\n    @assert initialized(PetscLib)\n\n    comm = getcomm(dm)\n\n    ksp = KSP{PetscLib}(comm, Options(PetscLib; options...))\n\n    with(options) do\n        KSPSetDM(ksp, dm)\n    end\n\n    setfromoptions!(ksp)\n\n    return ksp\nend\n\n#\n# Wrapper for calls to setcomputerhs!\nmutable struct Fn_KSPComputeRHS{PetscLib, PetscInt} end\nfunction (w::Fn_KSPComputeRHS{PetscLib, PetscInt})(\n    new_ksp_ptr::CKSP,\n    cb::CVec,\n    ksp_ptr::Ptr{Cvoid},\n)::PetscInt where {PetscLib, PetscInt}\n    PetscScalar = PetscLib.PetscScalar\n    new_ksp = KSPPtr{PetscLib, PetscScalar}(new_ksp_ptr, getlib(PetscLib).age)\n    b = VecPtr(PetscLib, cb, false)\n    ksp = unsafe_pointer_to_objref(ksp_ptr)\n    ierr = ksp.computerhs!(b, new_ksp)\n    return PetscLib.PetscInt(ierr)\nend\n\n\"\"\"\n    setcomputerhs!(ksp::AbstractKSP, rhs!::Function)\n    setcomputerhs!(rhs!::Function, ksp::AbstractKSP)\n\nDefine `rhs!` to be the right-hand side function of the `ksp`. A call to\n`rhs!(b, new_ksp)` should set the elements of the PETSc vector `b` based on the\n`new_ksp`.\n\n!!! note\n\n    The `new_ksp` passed to `rhs!` may not be the same as the `ksp` passed to\n    `setcomputerhs!`.\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeRHS\"))\n\"\"\"\nsetcomputerhs!(ksp::AbstractKSP, rhs!) = setcomputerhs!(rhs!, ksp)\n# We have to use the macro here because of the @cfunction\nLibPETSc.@for_petsc function setcomputerhs!(rhs!, ksp::KSP{$PetscLib})\n    # We must wrap the user function in our own object\n    fptr = @cfunction(\n        Fn_KSPComputeRHS{$PetscLib, $PetscInt}(),\n        $PetscInt,\n        (CKSP, CVec, Ptr{Cvoid})\n    )\n    # set the computerhs! in the ksp\n    ksp.computerhs! = rhs!\n    LibPETSc.KSPSetComputeRHS($PetscLib, ksp, fptr, pointer_from_objref(ksp))\n    return ksp\nend\n\n# Wrapper for calls to setcomputerhs!\nmutable struct Fn_KSPComputeOperators{PetscLib, PetscInt} end\nfunction (w::Fn_KSPComputeOperators{PetscLib, PetscInt})(\n    new_ksp_ptr::CKSP,\n    cA::CMat,\n    cP::CMat,\n    ksp_ptr::Ptr{Cvoid},\n)::PetscInt where {PetscLib, PetscInt}\n    PetscScalar = PetscLib.PetscScalar\n    new_ksp = KSPPtr{PetscLib, PetscScalar}(new_ksp_ptr, getlib(PetscLib).age)\n    A = MatPtr{PetscLib, PetscScalar}(cA, getlib(PetscLib).age)\n    P = MatPtr{PetscLib, PetscScalar}(cP, getlib(PetscLib).age)\n    ksp = unsafe_pointer_to_objref(ksp_ptr)\n    ierr = ksp.computeops!(A, P, new_ksp)\n    return PetscLib.PetscInt(ierr)\nend\n\n\"\"\"\n    setcomputeoperators!(ksp::AbstractKSP, ops!::Function)\n    setcomputeoperators!(ops!::Function, ksp::AbstractKSP)\n\nDefine `ops!` to be the compute operators function for the `ksp`. A call to\n`ops!(A, P, new_ksp)` should set the elements of the PETSc matrix linear\noperator `A` and preconditioning matrix `P` based on the `new_ksp`.\n\n!!! note\n\n    The `new_ksp` passed to `ops!` may not be the same as the `ksp` passed to\n    `setcomputeoperators!`.\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeOperators\"))\n\"\"\"\nsetcomputeoperators!(ksp::AbstractKSP, ops!) = setcomputeoperators!(ops!, ksp)\n# We have to use the macro here because of the @cfunction\nLibPETSc.@for_petsc function setcomputeoperators!(ops!, ksp::KSP{$PetscLib})\n    # We must wrap the user function in our own object\n    fptr = @cfunction(\n        Fn_KSPComputeOperators{$PetscLib, $PetscInt}(),\n        $PetscInt,\n        (CKSP, CMat, CMat, Ptr{Cvoid})\n    )\n    # set the computerhs! in the ksp\n    ksp.computeops! = ops!\n    LibPETSc.KSPSetComputeOperators($PetscLib, ksp, fptr, pointer_from_objref(ksp))\n    return ksp\nend\n\n\"\"\"\n    getDMDA(ksp::AbstractKSP)\n\nGet `dmda` for `ksp`\n\nThe returned `dmda` is owned by the `ksp`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetDM\"))\n\"\"\"\nfunction getDM(ksp::AbstractKSP{PetscLib}) where PetscLib\n    #t_dmda = Ref{CDM}()\n    #LibPETSc.KSPGetDM(PetscLib, ksp, t_dmda)\n    #dmda = DMDAPtr{PetscLib}(t_dmda[], getlib(PetscLib).age, false)\n    dmda = KSPGetDM(ksp)\n    return dmda\nend\n\n\nfunction destroy(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) &&\n       ksp.age == getlib(PetscLib).age &&\n       ksp.ptr != C_NULL\n        LibPETSc.KSPDestroy(PetscLib, ksp)\n    end\n    ksp.ptr = C_NULL\n    return nothing\nend\n\nfunction solve!(\n    x::AbstractVec{PetscLib},\n    ksp::AbstractKSP{PetscLib},\n    b::AbstractVec{PetscLib},\n) where {PetscLib}\n    with(ksp.opts) do\n        LibPETSc.KSPSolve(PetscLib, ksp, b, x)\n    end\n    return x\nend\n\nfunction solve!(\n    ksp::AbstractKSP{PetscLib},\n) where {PetscLib}\n    with(ksp.opts) do\n        LibPETSc.KSPSolve(PetscLib, ksp, C_NULL, C_NULL)\n    end\n    return ksp\nend\n\n\"\"\"\n    createvecs(ksp::AbstractKSP; nright = 0, nleft = 0)\n\nCreate `nright` right and `nleft` left vectors compatible with the `ksp`.\nReturned object `V` has `Tuple` members `V.right` and `V.left` containing the\nvectors.\n\n# External Links\n$(_doc_external(\"KSP/KSPCreateVecs\"))\n\"\"\"\nfunction createvecs(\n    ksp::AbstractKSP{PetscLib};\n    nright = 0,\n    nleft = 0,\n) where {PetscLib}\n    # pointer of pointers to the base vectors\n    r_right_vs = Ref{Ptr{CVec}}()\n    r_left_vs = Ref{Ptr{CVec}}()\n\n    # create 1 right and left vector\n    LibPETSc.KSPCreateVecs(PetscLib, ksp, 1, r_right_vs, 1, r_left_vs)\n\n    # create right vectors\n    a_v = unsafe_wrap(Array, r_right_vs[], 1; own = false)\n    v = VecPtr(PetscLib, a_v[1], false)\n    right = ntuple(i -> similar(v), nright)\n\n    # create left vectors\n    a_v = unsafe_wrap(Array, r_left_vs[], 1; own = false)\n    v = VecPtr(PetscLib, a_v[1], false)\n    left = ntuple(i -> similar(v), nleft)\n\n    LibPETSc.VecDestroyVecs(PetscLib, 1, r_right_vs)\n    LibPETSc.VecDestroyVecs(PetscLib, 1, r_left_vs)\n\n    (right = right, left = left)\nend\n\nfunction LinearAlgebra.ldiv!(x::AbstractVec, ksp::AbstractKSP, b::AbstractVec)\n    solve!(x, ksp, b)\nend\n\nfunction Base.:\\(ksp::AbstractKSP, b::AbstractVec)\n    x = createvecs(ksp; nleft = 1).left[1]\n    ldiv!(x, ksp, b)\n    return x\nend\n\nfunction Base.:\\(\n    ksp::AbstractKSP{PetscLib},\n    b::Vector{PetscScalar},\n) where {PetscLib, PetscScalar}\n    @assert PetscScalar == PetscLib.PetscScalar\n    @assert MPI.Comm_size(getcomm(ksp)) == 1\n\n    petsc_b = VecSeqWithArray(PetscLib, b)\n    petsc_x = createvecs(ksp; nleft = 1).left[1]\n\n    ldiv!(petsc_x, ksp, petsc_b)\n\n    x = similar(b, length(petsc_x))\n\n    withlocalarray!(petsc_x; read = true, write = false) do y\n        x .= y\n    end\n\n    destroy(petsc_b)\n    destroy(petsc_x)\n\n    return x\nend\n\n\n#=\n#\n# OLD WRAPPERS\n#\nstruct WrappedKSP{T, PetscLib} <: AbstractKSP{T, PetscLib}\n    ptr::CKSP\nend\n\nLinearAlgebra.transpose(ksp) = LinearAlgebra.Transpose(ksp)\nLinearAlgebra.adjoint(ksp) = LinearAlgebra.Adjoint(ksp)\n\n\"\"\"\n    KSPSetComputeRHS!(\n        ksp::KSP{Number},\n        ComputeRHS!,\n        ctx = C_NULL,\n    )\n\nSet the right-hand side function `ComputeRHS!` for the `ksp` using the user\n`ctx`. `ComputeRHS!` should be callable with three arguments of type\n`(::KSP{Number}, ::Vec, ::Ptr)`;\nsee [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetComputeRHS.html)\n\"\"\"\nfunction KSPSetComputeRHS! end\n\n\"\"\"\n    struct Fn_KSPComputeRHS{T} end\n\nType used to wrap `ComputeRHS!` functions in KSP\n\"\"\"\nstruct Fn_KSPComputeRHS{T} end\n\n\"\"\"\n    KSPSetComputeOperators!(\n        ksp::KSP{Number},\n        ComputeOperators!,\n        ctx = C_NULL,\n    )\n\nSet the linear operators function `ComputeOperators!` for the `ksp` using the\nuser `ctx`. `ComputeOperators!` should be callable with four arguments of type\n`(::KSP{Number}, ::Mat, ::Mat, ::Ptr)`;\nsee [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetComputeOperators.html)\n\"\"\"\nfunction KSPSetComputeOperators! end\n\n\"\"\"\n    struct Fn_KSPComputeOperators{T} end\n\nType used to wrap `ComputeOperators!` functions in KSP\n\"\"\"\nstruct Fn_KSPComputeOperators{T} end\n\n@for_libpetsc begin\n\n    function (::Fn_KSPComputeRHS{$PetscScalar})(\n        new_ksp_ptr::CKSP,\n        cb::CVec,\n        ksp_ptr::Ptr{Cvoid}\n       )::$PetscInt\n        ksp = unsafe_pointer_to_objref(ksp_ptr)\n        new_ksp = WrappedKSP{$PetscScalar, $PetscLib}(new_ksp_ptr)\n        b = Vec{$PetscScalar}(cb)\n        ierr = ksp.ComputeRHS!(new_ksp, b)\n        return $PetscInt(ierr)\n    end\n\n    function KSPSetComputeRHS!(\n        ksp::KSP{$PetscScalar},\n        ComputeRHS!\n    )\n        ptr_ksp = pointer_from_objref(ksp)\n        fptr = @cfunction(Fn_KSPComputeRHS{$PetscScalar}(),\n                          $PetscInt,\n                          (CKSP, CVec, Ptr{Cvoid}))\n        with(ksp.opts) do\n            @chk ccall((:KSPSetComputeRHS, $libpetsc), PetscErrorCode,\n                (CKSP, Ptr{Cvoid}, Ptr{Cvoid}),\n                ksp, fptr, ptr_ksp)\n        end\n        ksp.ComputeRHS! = ComputeRHS!\n        return ksp\n    end\n\n    function (::Fn_KSPComputeOperators{$PetscScalar})(\n        new_ksp_ptr::CKSP,\n        cA::CMat,\n        cP::CMat,\n        ksp_ptr::Ptr{Cvoid}\n       )::$PetscInt\n        ksp = unsafe_pointer_to_objref(ksp_ptr)\n        new_ksp = WrappedKSP{$PetscScalar, $PetscLib}(new_ksp_ptr)\n        A = Mat{$PetscScalar}(cA)\n        P = Mat{$PetscScalar}(cP)\n        ierr = ksp.ComputeOperators!(new_ksp, A, P)\n        return $PetscInt(ierr)\n    end\n\n    function KSPSetComputeOperators!(\n        ksp::KSP{$PetscScalar},\n        ComputeOperators!\n    )\n        ptr_ksp = pointer_from_objref(ksp)\n        fptr = @cfunction(Fn_KSPComputeOperators{$PetscScalar}(),\n                          $PetscInt,\n                          (CKSP, CMat, CMat, Ptr{Cvoid}))\n        with(ksp.opts) do\n            @chk ccall((:KSPSetComputeOperators, $libpetsc), PetscErrorCode,\n                (CKSP, Ptr{Cvoid}, Ptr{Cvoid}),\n                ksp, fptr, ptr_ksp)\n        end\n        ksp.ComputeOperators! = ComputeOperators!\n        return ksp\n    end\n\n    function DMDA(ksp::AbstractKSP{$PetscScalar})\n        t_dm = Ref{CDM}()\n        @chk ccall(\n            (:KSPGetDM, $libpetsc),\n            PetscErrorCode,\n            (CKSP, Ptr{CDM}),\n            ksp,\n            t_dm,\n        )\n        dm = DMDA{$PetscLib}(t_dm[])\n        return dm\n    end\n\n    function settolerances!(ksp::KSP{$PetscScalar}; rtol=PETSC_DEFAULT, atol=PETSC_DEFAULT, divtol=PETSC_DEFAULT, max_it=PETSC_DEFAULT)\n        @chk ccall((:KSPSetTolerances, $libpetsc), PetscErrorCode, \n                    (CKSP, $PetscReal, $PetscReal, $PetscReal, $PetscInt),\n                    ksp, rtol, atol, divtol, max_it)\n        return nothing\n    end\n\n\n    function iters(ksp::KSP{$PetscScalar})\n        r_its = Ref{$PetscInt}()\n        @chk ccall((:KSPGetIterationNumber, $libpetsc), PetscErrorCode, \n        (KSP, Ptr{$PetscInt}), ksp, r_its)\n        return r_its[]\n    end\n\n    function view(ksp::KSP{$PetscScalar}, viewer::AbstractViewer{$PetscLib}=ViewerStdout($petsclib, getcomm(ksp)))\n        @chk ccall((:KSPView, $libpetsc), PetscErrorCode, \n                    (CKSP, CPetscViewer),\n                ksp, viewer);\n        return nothing\n    end\n\n    function resnorm(ksp::KSP{$PetscScalar})\n        r_rnorm = Ref{$PetscReal}()\n        @chk ccall((:KSPGetResidualNorm, $libpetsc), PetscErrorCode, \n        (KSP, Ptr{$PetscReal}), ksp, r_rnorm)\n        return r_rnorm[]\n    end\n\n    function solve!(ksp::KSP{$PetscScalar})\n        with(ksp.opts) do\n            @chk ccall((:KSPSolve, $libpetsc), PetscErrorCode, \n            (CKSP, CVec, CVec), ksp, C_NULL, C_NULL)\n        end\n        return nothing\n    end\n\n    function solve!(x::AbstractVec{$PetscScalar}, tksp::Transpose{T,K}, b::AbstractVec{$PetscScalar}) where {T,K <: KSP{$PetscScalar}}\n        ksp = parent(tksp)\n        with(ksp.opts) do\n            @chk ccall((:KSPSolveTranspose, $libpetsc), PetscErrorCode, \n            (CKSP, CVec, CVec), ksp, b, x)\n        end\n        return x\n    end\n\nend\n\n# no generic Adjoint solve defined, but for Real we can use Adjoint\nsolve!(x::AbstractVec{T}, aksp::Adjoint{T,K}, b::AbstractVec{T}) where {K <: KSP{T}} where {T<:Real} =\n    solve!(x, transpose(parent(aksp)), b)\n\nconst KSPAT{T, LT} = Union{KSP{T, LT}, Transpose{T, KSP{T, LT}}, Adjoint{T, KSP{T, LT}}}\n\nLinearAlgebra.ldiv!(x::AbstractVec{T}, ksp::KSPAT{T, LT}, b::AbstractVec{T}) where {T, LT} = solve!(x, ksp, b)\nfunction LinearAlgebra.ldiv!(x::AbstractVector{T}, ksp::KSPAT{T, LT}, b::AbstractVector{T}) where {T, LT}\n    parent(solve!(AbstractVec(x), ksp, AbstractVec(b)))\nend\nBase.:\\(ksp::KSPAT{T, LT}, b::AbstractVector{T}) where {T, LT} = ldiv!(similar(b), ksp, b)\n\nBase.show(io::IO, ksp::KSP) = _show(io, ksp)\n\n\"\"\"\n    iters(ksp::KSP)\n\nGets the current iteration number; if the `solve!` is complete, returns the number of iterations used.\n\n# External Links\n$(_doc_external(\"KSP/KSPGetIterationNumber\"))\n\"\"\"\niters\n\n\"\"\"\n    resnorm(ksp::KSP)\n\nGets the last (approximate preconditioned) residual norm that has been computed.\n\n# External Links\n$(_doc_external(\"KSP/KSPGetResidualNorm\"))\n\"\"\"\nresnorm\n=#\n"
  },
  {
    "path": "src/deprecated/ksp_wrapped.jl",
    "content": "\"\"\"\n\t UNTESTED !!!\n\tinksp = KSPCreate(comm::MPI_Comm)\n\nCreates the `KSP` context.\n\nCollective\n\nInput Parameter:\n===\n- `comm` - MPI communicator\n\nOutput Parameter:\n===\n- `inksp` - location to put the `KSP` context\n\nLevel: beginner\n\nNote:\nThe default `KSPType` is `KSPGMRES` with a restart of 30, using modified Gram-Schmidt orthogonalization.\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`\n\n# External Links\n$(_doc_external(\"DM/KSPCreate\"))\n\"\"\"\nfunction KSPCreate(comm::MPI_Comm)\n\n\tLibPETSc.KSPCreate(\n\t\tPetscLib,\n\t\tcomm,\n\t\tinksp,\n\t)\n\n\treturn inksp\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetType(ksp::AbstractKSP{PetscLib},type::KSPType)\n\nBuilds the `KSP` data structure for a particular `KSPType`\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`  - the Krylov space context\n- `type` - a known method\n\nOptions Database Key:\n===\n- `-ksp_type  <method>` - Sets the method; use `-help` for a list  of available methods (for instance, cg or gmres)\n\nLevel: intermediate\n\nNotes:\nSee \"petsc/include/petscksp.h\" for available methods (for instance, `KSPCG` or `KSPGMRES`).\n\nNormally, it is best to use the `KSPSetFromOptions()` command and\nthen set the `KSP` type from the options database rather than by using\nthis routine.  Using the options database provides the user with\nmaximum flexibility in evaluating the many different Krylov methods.\nThe `KSPSetType()` routine is provided for those situations where it\nis necessary to set the iterative solver independently of the command\nline or options database.  This might be the case, for example, when\nthe choice of iterative solver changes during the execution of the\nprogram, and the user's application is taking responsibility for\nchoosing the appropriate method.  In other words, this routine is\nnot for beginners.\n\nDeveloper Note:\n`KSPRegister()` is used to add Krylov types to `KSPList` from which they are accessed by `KSPSetType()`.\n\n-seealso: [](ch_ksp), `PCSetType()`, `KSPType`, `KSPRegister()`, `KSPCreate()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetType\"))\n\"\"\"\nfunction KSPSetType(ksp::AbstractKSP{PetscLib},type::KSPType) where {PetscLib}\n\n\tLibPETSc.KSPSetType(\n\t\tPetscLib,\n\t\tksp,\n\t\ttype,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\ttype = KSPGetType(ksp::AbstractKSP{PetscLib})\n\nGets the `KSP` type as a string from the `KSP` object.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - Krylov context\n\nOutput Parameter:\n===\n- `type` - name of the `KSP` method\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPType`, `KSP`, `KSPSetType()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetType\"))\n\"\"\"\nfunction KSPGetType(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tr_type = Ref{PETSc.CKSPType}()\n\n\tLibPETSc.KSPGetType(\n\t\tPetscLib,\n\t\tksp,\n\t\tr_type,\n\t)\n\n\n\ttype = unsafe_string(r_type[])\n\treturn type\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetUp(ksp::AbstractKSP{PetscLib})\n\nSets up the internal data structures for the\nlater use of an iterative solver.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetUp\"))\n\"\"\"\nfunction KSPSetUp(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPSetUp(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetUpOnBlocks(ksp::AbstractKSP{PetscLib})\n\nSets up the preconditioner for each block in\nthe block Jacobi, overlapping Schwarz, and fieldsplit methods.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nLevel: advanced\n\nNotes:\n`KSPSetUpOnBlocks()` is a routine that the user can optionally call for\nmore precise profiling (via -log_view) of the setup phase for these\nblock preconditioners.  If the user does not call `KSPSetUpOnBlocks()`,\nit will automatically be called from within `KSPSolve()`.\n\nCalling `KSPSetUpOnBlocks()` is the same as calling `PCSetUpOnBlocks()`\non the PC context within the `KSP` context.\n\n-seealso: [](ch_ksp), `PCSetUpOnBlocks()`, `KSPSetUp()`, `PCSetUp()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetUpOnBlocks\"))\n\"\"\"\nfunction KSPSetUpOnBlocks(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPSetUpOnBlocks(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSolve(ksp::AbstractKSP{PetscLib},b::AbstractVector,x::AbstractVector)\n\nSolves linear system.\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `b`   - the right-hand side vector\n- `x`   - the solution (this may be the same vector as `b`, then `b` will be overwritten with answer)\n\nOptions Database Keys:\n===\n- `-ksp_view_eigenvalues`                      - compute preconditioned operators eigenvalues\n- `-ksp_view_eigenvalues_explicit`             - compute the eigenvalues by forming the dense operator and using LAPACK\n- `-ksp_view_mat binary`                       - save matrix to the default binary viewer\n- `-ksp_view_pmat binary`                      - save matrix used to build preconditioner to the default binary viewer\n- `-ksp_view_rhs binary`                       - save right-hand side vector to the default binary viewer\n- `-ksp_view_solution binary`                  - save computed solution vector to the default binary viewer\n(can be read later with src/ksp/tutorials/ex10.c for testing solvers)\n- `-ksp_view_mat_explicit`                     - for matrix-free operators, computes the matrix entries and views them\n- `-ksp_view_preconditioned_operator_explicit` - computes the product of the preconditioner and matrix as an explicit matrix and views it\n- `-ksp_converged_reason`                      - print reason for converged or diverged, also prints number of iterations\n- `-ksp_view_final_residual`                   - print 2-norm of true linear system residual at the end of the solution process\n- `-ksp_error_if_not_converged`                - stop the program as soon as an error is detected in a `KSPSolve()`\n- `-ksp_view_pre`                              - print the ksp data structure before the system solution\n- `-ksp_view`                                  - print the ksp data structure at the end of the system solution\n\nLevel: beginner\n\nNotes:\nIf one uses `KSPSetDM()` then `x` or `b` need not be passed. Use `KSPGetSolution()` to access the solution in this case.\n\nThe operator is specified with `KSPSetOperators()`.\n\n`KSPSolve()` will normally return without generating an error regardless of whether the linear system was solved or if constructing the preconditioner failed.\nCall `KSPGetConvergedReason()` to determine if the solver converged or failed and why. The option -ksp_error_if_not_converged or function `KSPSetErrorIfNotConverged()`\nwill cause `KSPSolve()` to error as soon as an error occurs in the linear solver.  In inner `KSPSolve()` `KSP_DIVERGED_ITS` is not treated as an error because when using nested solvers\nit may be fine that inner solvers in the preconditioner do not converge during the solution process.\n\nThe number of iterations can be obtained from `KSPGetIterationNumber()`.\n\nIf you provide a matrix that has a `MatSetNullSpace()` and `MatSetTransposeNullSpace()` this will use that information to solve singular systems\nin the least squares sense with a norm minimizing solution.\n\nA x = b   where b = b_p + b_t where b_t is not in the range of A (and hence by the fundamental theorem of linear algebra is in the nullspace(A'), see `MatSetNullSpace()`).\n\n`KSP` first removes b_t producing the linear system  A x = b_p (which has multiple solutions) and solves this to find the ||x|| minimizing solution (and hence\nit finds the solution x orthogonal to the nullspace(A). The algorithm is simply in each iteration of the Krylov method we remove the nullspace(A) from the search\ndirection thus the solution which is a linear combination of the search directions has no component in the nullspace(A).\n\nWe recommend always using `KSPGMRES` for such singular systems.\nIf nullspace(A) = nullspace(A') (note symmetric matrices always satisfy this property) then both left and right preconditioning will work\nIf nullspace(A) != nullspace(A') then left preconditioning will work but right preconditioning may not work (or it may).\n\nDeveloper Notes:\nThe reason we cannot always solve  nullspace(A) != nullspace(A') systems with right preconditioning is because we need to remove at each iteration\nthe nullspace(AB) from the search direction. While we know the nullspace(A) the nullspace(AB) equals B^-1 times the nullspace(A) but except for trivial preconditioners\nsuch as diagonal scaling we cannot apply the inverse of the preconditioner to a vector and thus cannot compute the nullspace(AB).\n\nIf using a direct method (e.g., via the `KSP` solver\n`KSPPREONLY` and a preconditioner such as `PCLU` or `PCILU`,\nthen its=1.  See `KSPSetTolerances()` and `KSPConvergedDefault()`\nfor more details.\n\nUnderstanding Convergence:\nThe routines `KSPMonitorSet()`, `KSPComputeEigenvalues()`, and\n`KSPComputeEigenvaluesExplicitly()` provide information on additional\noptions to monitor convergence and print eigenvalue information.\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPDestroy()`, `KSPSetTolerances()`, `KSPConvergedDefault()`,\n`KSPSolveTranspose()`, `KSPGetIterationNumber()`, `MatNullSpaceCreate()`, `MatSetNullSpace()`, `MatSetTransposeNullSpace()`, `KSP`,\n`KSPConvergedReasonView()`, `KSPCheckSolve()`, `KSPSetErrorIfNotConverged()`\n\n# External Links\n$(_doc_external(\"DM/KSPSolve\"))\n\"\"\"\nfunction KSPSolve(ksp::AbstractKSP{PetscLib},b::AbstractVector,x::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPSolve(\n\t\tPetscLib,\n\t\tksp,\n\t\tb,\n\t\tx,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSolveTranspose(ksp::AbstractKSP{PetscLib},b::AbstractVector,x::AbstractVector)\n\nSolves a linear system with the transpose of the matrix,  A^T x = b.\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `b`   - right-hand side vector\n- `x`   - solution vector\n\nLevel: developer\n\nNote:\nFor complex numbers this solve the non-Hermitian transpose system.\n\nDeveloper Note:\nWe need to implement a `KSPSolveHermitianTranspose()`\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPDestroy()`, `KSPSetTolerances()`, `KSPConvergedDefault()`,\n`KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSolveTranspose\"))\n\"\"\"\nfunction KSPSolveTranspose(ksp::AbstractKSP{PetscLib},b::AbstractVector,x::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPSolveTranspose(\n\t\tPetscLib,\n\t\tksp,\n\t\tb,\n\t\tx,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetUseExplicitTranspose(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nDetermines the explicit transpose of the operator is formed in `KSPSolveTranspose()`. In some configurations (like GPUs) it may\nbe explicitly formed since the solve is much more efficient.\n\nLogically Collective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` to transpose the system in `KSPSolveTranspose()`, `PETSC_FALSE` to not transpose (default)\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSolveTranspose()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetUseExplicitTranspose\"))\n\"\"\"\nfunction KSPSetUseExplicitTranspose(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetUseExplicitTranspose(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPMatSolve(ksp::AbstractKSP{PetscLib},B::AbstractMatrix,X::AbstractMatrix)\n\nSolves a linear system with multiple right\n\nInput Parameters:\n===\n- `ksp` - iterative context\n- `B`   - block of right-hand sides\n\nOutput Parameter:\n===\n- `X` - block of solutions\n\nLevel: intermediate\n\nNote:\nThis is a stripped-down version of `KSPSolve()`, which only handles `-ksp_view`, `-ksp_converged_reason`, `-ksp_converged_rate`, and `-ksp_view_final_residual`.\n\n-seealso: [](ch_ksp), `KSPSolve()`, `MatMatSolve()`, `KSPMatSolveTranspose()`, `MATDENSE`, `KSPHPDDM`, `PCBJACOBI`, `PCASM`\n\n# External Links\n$(_doc_external(\"DM/KSPMatSolve\"))\n\"\"\"\nfunction KSPMatSolve(ksp::AbstractKSP{PetscLib},B::AbstractMatrix,X::AbstractMatrix) where {PetscLib}\n\n\tLibPETSc.KSPMatSolve(\n\t\tPetscLib,\n\t\tksp,\n\t\tB,\n\t\tX,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPMatSolveTranspose(ksp::AbstractKSP{PetscLib},B::AbstractMatrix,X::AbstractMatrix)\n\nSolves a linear system with the transposed matrix with multiple right\n`B` and `X` must be different matrices and the transposed matrix cannot be assembled explicitly for the user.\n\nInput Parameters:\n===\n- `ksp` - iterative context\n- `B`   - block of right-hand sides\n\nOutput Parameter:\n===\n- `X` - block of solutions\n\nLevel: intermediate\n\nNote:\nThis is a stripped-down version of `KSPSolveTranspose()`, which only handles `-ksp_view`, `-ksp_converged_reason`, `-ksp_converged_rate`, and `-ksp_view_final_residual`.\n\n-seealso: [](ch_ksp), `KSPSolveTranspose()`, `MatMatTransposeSolve()`, `KSPMatSolve()`, `MATDENSE`, `KSPHPDDM`, `PCBJACOBI`, `PCASM`\n\n# External Links\n$(_doc_external(\"DM/KSPMatSolveTranspose\"))\n\"\"\"\nfunction KSPMatSolveTranspose(ksp::AbstractKSP{PetscLib},B::AbstractMatrix,X::AbstractMatrix) where {PetscLib}\n\n\tLibPETSc.KSPMatSolveTranspose(\n\t\tPetscLib,\n\t\tksp,\n\t\tB,\n\t\tX,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPReset(ksp::AbstractKSP{PetscLib})\n\nResets a `KSP` context to the kspsetupcalled = 0 state and removes any allocated Vecs and Mats\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPReset\"))\n\"\"\"\nfunction KSPReset(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPReset(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPResetViewers(ksp::AbstractKSP{PetscLib})\n\nResets all the viewers set from the options database during `KSPSetFromOptions()`\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPSolve()`, `KSPSetFromOptions()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPResetViewers\"))\n\"\"\"\nfunction KSPResetViewers(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPResetViewers(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tksp = KSPDestroy()\n\nDestroys a `KSP` context.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSetUp()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPDestroy\"))\n\"\"\"\nfunction KSPDestroy() \n\n\tLibPETSc.KSPDestroy(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn ksp\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetReusePreconditioner(ksp::AbstractKSP{PetscLib},flag::PetscBool)\n\nreuse the current preconditioner, do not construct a new one even if the operator changes\n\nCollective\n\nInput Parameters:\n===\n- `ksp`  - iterative context obtained from `KSPCreate()`\n- `flag` - `PETSC_TRUE` to reuse the current preconditioner\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `PCSetReusePreconditioner()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetReusePreconditioner\"))\n\"\"\"\nfunction KSPSetReusePreconditioner(ksp::AbstractKSP{PetscLib},flag::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetReusePreconditioner(\n\t\tPetscLib,\n\t\tksp,\n\t\tflag,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflag = KSPGetReusePreconditioner(ksp::AbstractKSP{PetscLib})\n\nDetermines if the `KSP` reuses the current preconditioner even if the operator in the preconditioner has changed.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `flag` - the boolean flag\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `KSPSetReusePreconditioner()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetReusePreconditioner\"))\n\"\"\"\nfunction KSPGetReusePreconditioner(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tflag = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetReusePreconditioner(\n\t\tPetscLib,\n\t\tksp,\n\t\tflag,\n\t)\n\n\treturn flag[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetSkipPCSetFromOptions(ksp::AbstractKSP{PetscLib},flag::PetscBool)\n\nprevents `KSPSetFromOptions()` from calling `PCSetFromOptions()`. This is used if the same `PC` is shared by more than one `KSP` so its options are not resettable for each `KSP`\n\nCollective\n\nInput Parameters:\n===\n- `ksp`  - iterative context obtained from `KSPCreate()`\n- `flag` - `PETSC_TRUE` to skip calling the `PCSetFromOptions()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPSolve()`, `KSPDestroy()`, `PCSetReusePreconditioner()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetSkipPCSetFromOptions\"))\n\"\"\"\nfunction KSPSetSkipPCSetFromOptions(ksp::AbstractKSP{PetscLib},flag::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetSkipPCSetFromOptions(\n\t\tPetscLib,\n\t\tksp,\n\t\tflag,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tside = KSPGetPCSide(ksp::AbstractKSP{PetscLib})\n\nGets the preconditioning side.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `side` - the preconditioning side, where side is one of\n-vb\nPC_LEFT      - left preconditioning (default)\nPC_RIGHT     - right preconditioning\nPC_SYMMETRIC - symmetric preconditioning\n-ve\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSetPCSide()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetPCSide\"))\n\"\"\"\nfunction KSPGetPCSide(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPGetPCSide(\n\t\tPetscLib,\n\t\tksp,\n\t\tside,\n\t)\n\n\treturn side\nend\n \n \n\"\"\"\n\t KSPSetTolerances(ksp::AbstractKSP{PetscLib},rtol::AbstractFloat,abstol::AbstractFloat,dtol::AbstractFloat,maxits::Int)\n\nSets the relative, absolute, divergence, and maximum\niteration tolerances used by the default `KSP` convergence testers.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`    - the Krylov subspace context\n- `rtol`   - the relative convergence tolerance, relative decrease in the (possibly preconditioned) residual norm\n- `abstol` - the absolute convergence tolerance   absolute size of the (possibly preconditioned) residual norm\n- `dtol`   - the divergence tolerance,   amount (possibly preconditioned) residual norm can increase before `KSPConvergedDefault()` concludes that the method is diverging\n- `maxits` - maximum number of iterations to use\n\nOptions Database Keys:\n===\n- `-ksp_atol <abstol>`   - Sets `abstol`\n- `-ksp_rtol <rtol>`     - Sets `rtol`\n- `-ksp_divtol <dtol>`   - Sets `dtol`\n- `-ksp_max_it <maxits>` - Sets `maxits`\n\nLevel: intermediate\n\nNotes:\nAll parameters must be non-negative.\n\nUse `PETSC_CURRENT` to retain the current value of any of the parameters. The deprecated `PETSC_DEFAULT` also retains the current value (though the name is confusing).\n\nUse `PETSC_DETERMINE` to use the default value for the given `KSP`. The default value is the value when the object's type is set.\n\nFor `dtol` and `maxits` use `PETSC_UMLIMITED` to indicate there is no upper bound on these values\n\nSee `KSPConvergedDefault()` for details how these parameters are used in the default convergence test.  See also `KSPSetConvergenceTest()`\nfor setting user-defined stopping criteria.\n\nFortran Note:\nUse `PETSC_CURRENT_INTEGER`, `PETSC_CURRENT_REAL`, `PETSC_DETERMINE_INTEGER`, or `PETSC_DETERMINE_REAL`\n\n-seealso: [](ch_ksp), `KSPGetTolerances()`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSP`, `KSPSetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetTolerances\"))\n\"\"\"\nfunction KSPSetTolerances(ksp::AbstractKSP{PetscLib},rtol::AbstractFloat,abstol::AbstractFloat,dtol::AbstractFloat,maxits::Int) where {PetscLib}\n\n\tLibPETSc.KSPSetTolerances(\n\t\tPetscLib,\n\t\tksp,\n\t\trtol,\n\t\tabstol,\n\t\tdtol,\n\t\tmaxits,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\trtol,abstol,dtol,maxits = KSPGetTolerances(ksp::AbstractKSP{PetscLib})\n\nGets the relative, absolute, divergence, and maximum\niteration tolerances used by the default `KSP` convergence tests.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the Krylov subspace context\n\nOutput Parameters:\n===\n- `rtol`   - the relative convergence tolerance\n- `abstol` - the absolute convergence tolerance\n- `dtol`   - the divergence tolerance\n- `maxits` - maximum number of iterations\n\nLevel: intermediate\n\nNote:\nThe user can specify `NULL` for any parameter that is not needed.\n\n-seealso: [](ch_ksp), `KSPSetTolerances()`, `KSP`, `KSPSetMinimumIterations()`, `KSPGetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetTolerances\"))\n\"\"\"\nfunction KSPGetTolerances(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tPetscReal = PetscLib.PetscReal\n\trtol = [PetscReal(1)]\n\tPetscReal = PetscLib.PetscReal\n\tabstol = [PetscReal(1)]\n\tPetscReal = PetscLib.PetscReal\n\tdtol = [PetscReal(1)]\n\tmaxits = [PetscInt(1)]\n\n\tLibPETSc.KSPGetTolerances(\n\t\tPetscLib,\n\t\tksp,\n\t\trtol,\n\t\tabstol,\n\t\tdtol,\n\t\tRef(maxits,1),\n\t)\n\n\treturn rtol[1],abstol[1],dtol[1],maxits[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetMinimumIterations(ksp::AbstractKSP{PetscLib},minit::Int)\n\nSets the minimum number of iterations to use, regardless of the tolerances\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`   - the Krylov subspace context\n- `minit` - minimum number of iterations to use\n\nOptions Database Key:\n===\n- `-ksp_min_it <minits>` - Sets `minit`\n\nLevel: intermediate\n\nNotes:\nUse `KSPSetTolerances()` to set a variety of other tolerances\n\nSee `KSPConvergedDefault()` for details on how these parameters are used in the default convergence test. See also `KSPSetConvergenceTest()`\nfor setting user-defined stopping criteria.\n\n-seealso: [](ch_ksp), `KSPGetTolerances()`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSP`, `KSPSetTolerances()`, `KSPGetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetMinimumIterations\"))\n\"\"\"\nfunction KSPSetMinimumIterations(ksp::AbstractKSP{PetscLib},minit::Int) where {PetscLib}\n\n\tLibPETSc.KSPSetMinimumIterations(\n\t\tPetscLib,\n\t\tksp,\n\t\tminit,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tminit = KSPGetMinimumIterations(ksp::AbstractKSP{PetscLib})\n\nGets the minimum number of iterations to use, regardless of the tolerances, that was set with `KSPSetMinimumIterations()` or `\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the Krylov subspace context\n\nOutput Parameter:\n===\n- `minit` - minimum number of iterations to use\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetTolerances()`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSP`, `KSPSetTolerances()`, `KSPSetMinimumIterations()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetMinimumIterations\"))\n\"\"\"\nfunction KSPGetMinimumIterations(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tminit = [PetscInt(1)]\n\n\tLibPETSc.KSPGetMinimumIterations(\n\t\tPetscLib,\n\t\tksp,\n\t\tRef(minit,1),\n\t)\n\n\treturn minit[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetInitialGuessNonzero(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nTells the iterative solver that the\ninitial guess is nonzero; otherwise `KSP` assumes the initial guess\nis to be zero (and thus zeros it out before solving).\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `flg` - ``PETSC_TRUE`` indicates the guess is non-zero, `PETSC_FALSE` indicates the guess is zero\n\nOptions Database Key:\n===\n- `-ksp_initial_guess_nonzero <true,false>` - use nonzero initial guess\n\nLevel: beginner\n\nNote:\nIf this is not called the X vector is zeroed in the call to `KSPSolve()`.\n\n-seealso: [](ch_ksp), `KSPGetInitialGuessNonzero()`, `KSPGuessSetType()`, `KSPGuessType`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetInitialGuessNonzero\"))\n\"\"\"\nfunction KSPSetInitialGuessNonzero(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetInitialGuessNonzero(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflag = KSPGetInitialGuessNonzero(ksp::AbstractKSP{PetscLib})\n\nDetermines whether the `KSP` solver is using\na zero initial guess.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `flag` - `PETSC_TRUE` if guess is nonzero, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSetInitialGuessNonzero()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetInitialGuessNonzero\"))\n\"\"\"\nfunction KSPGetInitialGuessNonzero(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tflag = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetInitialGuessNonzero(\n\t\tPetscLib,\n\t\tksp,\n\t\tflag,\n\t)\n\n\treturn flag[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetErrorIfNotConverged(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nCauses `KSPSolve()` to generate an error if the solver has not converged as soon as the error is detected.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` indicates you want the error generated\n\nOptions Database Key:\n===\n- `-ksp_error_if_not_converged <true,false>` - generate an error and stop the program\n\nLevel: intermediate\n\nNotes:\nNormally PETSc continues if a linear solver fails to converge, you can call `KSPGetConvergedReason()` after a `KSPSolve()`\nto determine if it has converged.\n\nA `KSP_DIVERGED_ITS` will not generate an error in a `KSPSolve()` inside a nested linear solver\n\n-seealso: [](ch_ksp), `KSPGetErrorIfNotConverged()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetErrorIfNotConverged\"))\n\"\"\"\nfunction KSPSetErrorIfNotConverged(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetErrorIfNotConverged(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflag = KSPGetErrorIfNotConverged(ksp::AbstractKSP{PetscLib})\n\nWill `KSPSolve()` generate an error if the solver does not converge?\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from KSPCreate()\n\nOutput Parameter:\n===\n- `flag` - `PETSC_TRUE` if it will generate an error, else `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPSetErrorIfNotConverged()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetErrorIfNotConverged\"))\n\"\"\"\nfunction KSPGetErrorIfNotConverged(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tflag = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetErrorIfNotConverged(\n\t\tPetscLib,\n\t\tksp,\n\t\tflag,\n\t)\n\n\treturn flag[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetComputeEigenvalues(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nSets a flag so that the extreme eigenvalues\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\nNote:\nCurrently this option is not valid for all iterative methods.\n\n-seealso: [](ch_ksp), `KSPComputeEigenvalues()`, `KSPComputeEigenvaluesExplicitly()`, `KSP`, `KSPSetComputeRitz()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetComputeEigenvalues\"))\n\"\"\"\nfunction KSPSetComputeEigenvalues(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetComputeEigenvalues(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetComputeRitz(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nSets a flag so that the Ritz or harmonic Ritz pairs\nwill be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\nNote:\nCurrently this option is only valid for the `KSPGMRES` method.\n\n-seealso: [](ch_ksp), `KSPComputeRitz()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetComputeRitz\"))\n\"\"\"\nfunction KSPSetComputeRitz(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetComputeRitz(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = KSPGetComputeEigenvalues(ksp::AbstractKSP{PetscLib})\n\nGets the flag indicating that the extreme eigenvalues\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\nNote:\nCurrently this option is not valid for all iterative methods.\n\n-seealso: [](ch_ksp), `KSPComputeEigenvalues()`, `KSPComputeEigenvaluesExplicitly()`, `KSP`, `KSPSetComputeRitz()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetComputeEigenvalues\"))\n\"\"\"\nfunction KSPGetComputeEigenvalues(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetComputeEigenvalues(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetComputeSingularValues(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nSets a flag so that the extreme singular\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n===\n- `-ksp_monitor_singular_value` - Activates `KSPSetComputeSingularValues()`\n\nLevel: advanced\n\nNotes:\nCurrently this option is not valid for all iterative methods.\n\nMany users may just want to use the monitoring routine\n`KSPMonitorSingularValue()` (which can be set with option -ksp_monitor_singular_value)\nto print the singular values at each iteration of the linear solve.\n\n-seealso: [](ch_ksp), `KSPComputeExtremeSingularValues()`, `KSPMonitorSingularValue()`, `KSP`, `KSPSetComputeRitz()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetComputeSingularValues\"))\n\"\"\"\nfunction KSPSetComputeSingularValues(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetComputeSingularValues(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = KSPGetComputeSingularValues(ksp::AbstractKSP{PetscLib})\n\nGets the flag indicating whether the extreme singular\nvalues will be calculated via a Lanczos or Arnoldi process as the linear\nsystem is solved.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n===\n- `-ksp_monitor_singular_value` - Activates `KSPSetComputeSingularValues()`\n\nLevel: advanced\n\nNotes:\nCurrently this option is not valid for all iterative methods.\n\nMany users may just want to use the monitoring routine\n`KSPMonitorSingularValue()` (which can be set with option -ksp_monitor_singular_value)\nto print the singular values at each iteration of the linear solve.\n\n-seealso: [](ch_ksp), `KSPComputeExtremeSingularValues()`, `KSPMonitorSingularValue()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetComputeSingularValues\"))\n\"\"\"\nfunction KSPGetComputeSingularValues(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetComputeSingularValues(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tr = KSPGetRhs(ksp::AbstractKSP{PetscLib})\n\nGets the right\nbe solved.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `r` - right-hand-side vector\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGetSolution()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetRhs\"))\n\"\"\"\nfunction KSPGetRhs(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tr_r = Ref{CVec}()\n\n\tLibPETSc.KSPGetRhs(\n\t\tPetscLib,\n\t\tksp,\n\t\tr_r,\n\t)\n\n\n\tr = VecPtr(PetscLib, r_r[], false)\n\treturn r\nend\n \n \n\"\"\"\n\tv = KSPGetSolution(ksp::AbstractKSP{PetscLib})\n\nGets the location of the solution for the\nlinear system to be solved.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `v` - solution vector\n\nLevel: developer\n\nNote:\nIf this is called during a `KSPSolve()` the vector's values may not represent the solution\nto the linear system.\n\n-seealso: [](ch_ksp), `KSPGetRhs()`, `KSPBuildSolution()`, `KSPSolve()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetSolution\"))\n\"\"\"\nfunction KSPGetSolution(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tr_v = Ref{CVec}()\n\n\tLibPETSc.KSPGetSolution(\n\t\tPetscLib,\n\t\tksp,\n\t\tr_v,\n\t)\n\n\n\tv = VecPtr(PetscLib, r_v[], false)\n\treturn v\nend\n \n \n\"\"\"\n\trnorm = KSPGetResidualNorm(ksp::AbstractKSP{PetscLib})\n\nGets the last (possibly approximate and/or preconditioned) residual norm that has been computed.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the iterative context\n\nOutput Parameter:\n===\n- `rnorm` - residual norm\n\nLevel: intermediate\n\nNotes:\nFor some methods, such as `KSPGMRES`, the norm is not computed directly from the residual.\n\nThe type of norm used by the method can be controlled with `KSPSetNormType()`\n\nCertain solvers, under certain conditions, may not compute the final residual norm in an iteration, in that case the previous norm is returned.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetNormType()`, `KSPBuildResidual()`, `KSPNormType`\n\n# External Links\n$(_doc_external(\"DM/KSPGetResidualNorm\"))\n\"\"\"\nfunction KSPGetResidualNorm(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscReal = PetscLib.PetscReal\n\trnorm = [PetscReal(1)]\n\n\tLibPETSc.KSPGetResidualNorm(\n\t\tPetscLib,\n\t\tksp,\n\t\trnorm,\n\t)\n\n\treturn rnorm[1]\nend\n \n \n\"\"\"\n\tits = KSPGetIterationNumber(ksp::AbstractKSP{PetscLib})\n\nGets the current iteration number; if the `KSPSolve()` is complete, returns the number of iterations used.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the iterative context\n\nOutput Parameter:\n===\n- `its` - number of iterations\n\nLevel: intermediate\n\nNote:\nDuring the ith iteration this returns i-1\n\n-seealso: [](ch_ksp), `KSP`, `KSPGetResidualNorm()`, `KSPBuildResidual()`, `KSPGetTotalIterations()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetIterationNumber\"))\n\"\"\"\nfunction KSPGetIterationNumber(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tits = [PetscInt(1)]\n\n\tLibPETSc.KSPGetIterationNumber(\n\t\tPetscLib,\n\t\tksp,\n\t\tRef(its,1),\n\t)\n\n\treturn its[1]\nend\n \n \n\"\"\"\n\tits = KSPGetTotalIterations(ksp::AbstractKSP{PetscLib})\n\nGets the total number of iterations this `KSP` object has performed since was created, counted over all linear solves\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the iterative context\n\nOutput Parameter:\n===\n- `its` - total number of iterations\n\nLevel: intermediate\n\nNote:\nUse `KSPGetIterationNumber()` to get the count for the most recent solve only\nIf this is called within a `KSPSolve()` (such as in a `KSPMonitor` routine) then it does not include iterations within that current solve\n\n-seealso: [](ch_ksp), `KSP`, `KSPBuildResidual()`, `KSPGetResidualNorm()`, `KSPGetIterationNumber()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetTotalIterations\"))\n\"\"\"\nfunction KSPGetTotalIterations(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tits = [PetscInt(1)]\n\n\tLibPETSc.KSPGetTotalIterations(\n\t\tPetscLib,\n\t\tksp,\n\t\tRef(its,1),\n\t)\n\n\treturn its[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tright,left = KSPCreateVecs(ksp::AbstractKSP{PetscLib},rightn::Int,leftn::Int)\n\nGets a number of work vectors suitably sized for the operator in the `KSP`\n\nCollective\n\nInput Parameters:\n===\n- `ksp`    - iterative context\n- `rightn` - number of right work vectors to allocate\n- `leftn`  - number of left work vectors to allocate\n\nOutput Parameters:\n===\n- `right` - the array of vectors created\n- `left`  - the array of left vectors\n\nLevel: advanced\n\nNotes:\nThe right vector has as many elements as the matrix has columns. The left\nvector has as many elements as the matrix has rows, see `MatSetSizes()` for details on the layout of the vectors.\n\nThe vectors are new vectors that are not owned by the `KSP`, they should be destroyed with calls to `VecDestroyVecs()` when no longer needed.\n\nDeveloper Note:\nFirst tries to duplicate the rhs and solution vectors of the `KSP`, if they do not exist tries to get them from the matrix with `MatCreateVecs()`, if\nthat does not exist tries to get them from the `DM` (if it is provided) with `DMCreateGlobalVectors()`.\n\n-seealso: [](ch_ksp), `MatCreateVecs()`, `VecDestroyVecs()`, `KSPSetWorkVecs()`\n\n# External Links\n$(_doc_external(\"DM/KSPCreateVecs\"))\n\"\"\"\nfunction KSPCreateVecs(ksp::AbstractKSP{PetscLib},rightn::Int,leftn::Int) where {PetscLib}\n\n\tLibPETSc.KSPCreateVecs(\n\t\tPetscLib,\n\t\tksp,\n\t\trightn,\n\t\tleftn,\n\t\tright,\n\t\tleft,\n\t)\n\n\treturn right,left\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tpc = KSPGetPC(ksp::AbstractKSP{PetscLib})\n\nReturns a pointer to the preconditioner context with the `KSP`\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `pc` - preconditioner context\n\nLevel: developer\n\nNote:\nThe `PC` is created if it does not already exist.\n\nDeveloper Note:\nCalls `KSPCheckPCMPI()` to check if the `KSP` is effected by `-mpi_linear_solver_server`\n\n-seealso: [](ch_ksp), `KSPSetPC()`, `KSP`, `PC`\n\n# External Links\n$(_doc_external(\"DM/KSPGetPC\"))\n\"\"\"\nfunction KSPGetPC(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPGetPC(\n\t\tPetscLib,\n\t\tksp,\n\t\tpc,\n\t)\n\n\treturn pc\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetNestLevel(ksp::AbstractKSP{PetscLib},level::Int)\n\nsets the amount of nesting the `KSP` has\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - the `KSP`\n- `level` - the nest level\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`, `KSPGetNestLevel()`, `PCSetKSPNestLevel()`, `PCGetKSPNestLevel()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetNestLevel\"))\n\"\"\"\nfunction KSPSetNestLevel(ksp::AbstractKSP{PetscLib},level::Int) where {PetscLib}\n\n\tLibPETSc.KSPSetNestLevel(\n\t\tPetscLib,\n\t\tksp,\n\t\tlevel,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tlevel = KSPGetNestLevel(ksp::AbstractKSP{PetscLib})\n\ngets the amount of nesting the `KSP` has\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the `KSP`\n\nOutput Parameter:\n===\n- `level` - the nest level\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSP`, `KSPGMRES`, `KSPType`, `KSPSetNestLevel()`, `PCSetKSPNestLevel()`, `PCGetKSPNestLevel()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetNestLevel\"))\n\"\"\"\nfunction KSPGetNestLevel(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscInt = PetscLib.PetscInt\n\tlevel = [PetscInt(1)]\n\n\tLibPETSc.KSPGetNestLevel(\n\t\tPetscLib,\n\t\tksp,\n\t\tRef(level,1),\n\t)\n\n\treturn level[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPMonitorCancel(ksp::AbstractKSP{PetscLib})\n\nClears all monitors for a `KSP` object.\n\nLogically Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOptions Database Key:\n===\n- `-ksp_monitor_cancel` - Cancels all monitors that have been hardwired into a code by calls to `KSPMonitorSet()`, but does not cancel those set via the options database.\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPMonitorResidual()`, `KSPMonitorSet()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorCancel\"))\n\"\"\"\nfunction KSPMonitorCancel(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPMonitorCancel(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctx = KSPGetMonitorContext(ksp::AbstractKSP{PetscLib})\n\nGets the monitoring context, as set by `KSPMonitorSet()` for the FIRST monitor only.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `ctx` - monitoring context\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPMonitorResidual()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetMonitorContext\"))\n\"\"\"\nfunction KSPGetMonitorContext(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPGetMonitorContext(\n\t\tPetscLib,\n\t\tksp,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tna = KSPGetResidualHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal})\n\nGets the array used to hold the residual history and the number of residuals it contains.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameters:\n===\n- `a`  - pointer to array to hold history (or `NULL`)\n- `na` - number of used entries in a (or `NULL`). Note this has different meanings depending on the `reset` argument to `KSPSetResidualHistory()`\n\nLevel: advanced\n\nNote:\nThis array is borrowed and should not be freed by the caller.\n\nCan only be called after a `KSPSetResidualHistory()` otherwise `a` and `na` are set to `NULL` and zero\n\nWhen `reset` was `PETSC_TRUE` since a residual is computed before the first iteration, the value of `na` is generally one more than the value\nreturned with `KSPGetIterationNumber()`.\n\nSome Krylov methods may not compute the final residual norm when convergence is declared because the maximum number of iterations allowed has been reached.\nIn this situation, when `reset` was `PETSC_TRUE`, `na` will then equal the number of iterations reported with `KSPGetIterationNumber()`\n\nSome Krylov methods (such as `KSPSTCG`), under certain circumstances, do not compute the final residual norm. In this situation, when `reset` was `PETSC_TRUE`,\n`na` will then equal the number of iterations reported with `KSPGetIterationNumber()`\n\n`KSPBCGSL` does not record the residual norms for the \"subiterations\" hence the results from `KSPGetResidualHistory()` and `KSPGetIterationNumber()` will be different\n\nFortran Note:\nThe Fortran version of this routine has a calling sequence\n-vb\ncall KSPGetResidualHistory(KSP ksp, integer na, integer ierr)\n-ve\nnote that you have passed a Fortran array into `KSPSetResidualHistory()` and you need\nto access the residual values from this Fortran array you provided. Only the `na` (number of\nresidual norms currently held) is set.\n\n-seealso: [](ch_ksp), `KSPSetResidualHistory()`, `KSP`, `KSPGetIterationNumber()`, `KSPSTCG`, `KSPBCGSL`\n\n# External Links\n$(_doc_external(\"DM/KSPGetResidualHistory\"))\n\"\"\"\nfunction KSPGetResidualHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tna = [PetscInt(1)]\n\n\tLibPETSc.KSPGetResidualHistory(\n\t\tPetscLib,\n\t\tksp,\n\t\ta,\n\t\tRef(na,1),\n\t)\n\n\treturn na[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetResidualHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal},na::PetscCount,reset::PetscBool)\n\nSets the array used to hold the residual history.\nIf set, this array will contain the residual norms computed at each\niteration of the solver.\n\nNot Collective\n\nInput Parameters:\n===\n- `ksp`   - iterative context obtained from `KSPCreate()`\n- `a`     - array to hold history\n- `na`    - size of `a`\n- `reset` - `PETSC_TRUE` indicates the history counter is reset to zero\nfor each new linear solve\n\nLevel: advanced\n\nNotes:\nIf provided, `a` is NOT freed by PETSc so the user needs to keep track of it and destroy once the `KSP` object is destroyed.\nIf 'a' is `NULL` then space is allocated for the history. If 'na' `PETSC_DECIDE` or (deprecated) `PETSC_DEFAULT` then a\ndefault array of length 10,000 is allocated.\n\nIf the array is not long enough then once the iterations is longer than the array length `KSPSolve()` stops recording the history\n\n-seealso: [](ch_ksp), `KSPGetResidualHistory()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetResidualHistory\"))\n\"\"\"\nfunction KSPSetResidualHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal},na::PetscCount,reset::PetscBool) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPSetResidualHistory(\n\t\tPetscLib,\n\t\tksp,\n\t\ta,\n\t\tna,\n\t\treset,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tna = KSPGetErrorHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal})\n\nGets the array used to hold the error history and the number of residuals it contains.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameters:\n===\n- `a`  - pointer to array to hold history (or `NULL`)\n- `na` - number of used entries in a (or `NULL`)\n\nLevel: advanced\n\nNote:\nThis array is borrowed and should not be freed by the caller.\nCan only be called after a `KSPSetErrorHistory()` otherwise `a` and `na` are set to `NULL` and zero\n\nFortran Note:\nThe Fortran version of this routine has a calling sequence\n-vb\ncall KSPGetErrorHistory(KSP ksp, integer na, integer ierr)\n-ve\nnote that you have passed a Fortran array into `KSPSetErrorHistory()` and you need\nto access the residual values from this Fortran array you provided. Only the `na` (number of\nresidual norms currently held) is set.\n\n-seealso: [](ch_ksp), `KSPSetErrorHistory()`, `KSPGetResidualHistory()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetErrorHistory\"))\n\"\"\"\nfunction KSPGetErrorHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tna = [PetscInt(1)]\n\n\tLibPETSc.KSPGetErrorHistory(\n\t\tPetscLib,\n\t\tksp,\n\t\ta,\n\t\tRef(na,1),\n\t)\n\n\treturn na[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetErrorHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal},na::PetscCount,reset::PetscBool)\n\nSets the array used to hold the error history. If set, this array will contain the error norms computed at each iteration of the solver.\n\nNot Collective\n\nInput Parameters:\n===\n- `ksp`   - iterative context obtained from `KSPCreate()`\n- `a`     - array to hold history\n- `na`    - size of `a`\n- `reset` - `PETSC_TRUE` indicates the history counter is reset to zero for each new linear solve\n\nLevel: advanced\n\nNotes:\nIf provided, `a` is NOT freed by PETSc so the user needs to keep track of it and destroy once the `KSP` object is destroyed.\nIf 'a' is `NULL` then space is allocated for the history. If 'na' is `PETSC_DECIDE` or (deprecated) `PETSC_DEFAULT` then a default array of length 1,0000 is allocated.\n\nIf the array is not long enough then once the iterations is longer than the array length `KSPSolve()` stops recording the history\n\n-seealso: [](ch_ksp), `KSPGetErrorHistory()`, `KSPSetResidualHistory()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetErrorHistory\"))\n\"\"\"\nfunction KSPSetErrorHistory(ksp::AbstractKSP{PetscLib},a::Vector{PetscReal},na::PetscCount,reset::PetscBool) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPSetErrorHistory(\n\t\tPetscLib,\n\t\tksp,\n\t\ta,\n\t\tna,\n\t\treset,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tV = KSPBuildSolutionDefault(ksp::AbstractKSP{PetscLib},v::AbstractVector)\n\n\n# External Links\n$(_doc_external(\"DM/KSPBuildSolutionDefault\"))\n\"\"\"\nfunction KSPBuildSolutionDefault(ksp::AbstractKSP{PetscLib},v::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tr_V = Ref{CVec}()\n\n\tLibPETSc.KSPBuildSolutionDefault(\n\t\tPetscLib,\n\t\tksp,\n\t\tv,\n\t\tr_V,\n\t)\n\n\n\tV = VecPtr(PetscLib, r_V[], false)\n\treturn V\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tV = KSPBuildResidualDefault(ksp::AbstractKSP{PetscLib},t::AbstractVector,v::AbstractVector)\n\nDefault code to compute the residual.\n\nCollecive on ksp\n\nInput Parameters:\n===\n- `ksp` - iterative context\n- `t`   - pointer to temporary vector\n- `v`   - pointer to user vector\n\nOutput Parameter:\n===\n- `V` - pointer to a vector containing the residual\n\nLevel: advanced\n\nNote:\nSome `KSP` methods such as `KSPGMRES` do not compute the explicit residual at each iteration, this routine takes the information\nthey have computed during the previous iterations and uses it to compute the explicit residual via the formula r = b - A*x.\n\nDeveloper Note:\nThis is `PETSC_EXTERN` because it may be used by user written plugin `KSPType` implementations\n\n-seealso: [](ch_ksp), `KSP`, `KSPBuildSolutionDefault()`\n\n# External Links\n$(_doc_external(\"DM/KSPBuildResidualDefault\"))\n\"\"\"\nfunction KSPBuildResidualDefault(ksp::AbstractKSP{PetscLib},t::AbstractVector,v::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tr_V = Ref{CVec}()\n\n\tLibPETSc.KSPBuildResidualDefault(\n\t\tPetscLib,\n\t\tksp,\n\t\tt,\n\t\tv,\n\t\tr_V,\n\t)\n\n\n\tV = VecPtr(PetscLib, r_V[], false)\n\treturn V\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPDestroyDefault(ksp::AbstractKSP{PetscLib})\n\n\n# External Links\n$(_doc_external(\"DM/KSPDestroyDefault\"))\n\"\"\"\nfunction KSPDestroyDefault(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPDestroyDefault(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetWorkVecs(ksp::AbstractKSP{PetscLib},nw::Int)\n\nSets a number of work vectors into a `KSP` object\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context\n- `nw`  - number of work vectors to allocate\n\nLevel: developer\n\nDeveloper Note:\nThis is `PETSC_EXTERN` because it may be used by user written plugin `KSPType` implementations\n\n-seealso: [](ch_ksp), `KSP`, `KSPCreateVecs()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetWorkVecs\"))\n\"\"\"\nfunction KSPSetWorkVecs(ksp::AbstractKSP{PetscLib},nw::Int) where {PetscLib}\n\n\tLibPETSc.KSPSetWorkVecs(\n\t\tPetscLib,\n\t\tksp,\n\t\tnw,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tV = KSPBuildSolution(ksp::AbstractKSP{PetscLib},v::AbstractVector)\n\nBuilds the approximate solution in a vector provided.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\nProvide exactly one of\n- `v` - location to stash solution, optional, otherwise pass `NULL`\n- `V` - the solution is returned in this location. This vector is created internally. This vector should NOT be destroyed by the user with `VecDestroy()`.\n\nLevel: developer\n\nNotes:\nThis routine can be used in one of two ways\n-vb\nKSPBuildSolution(ksp,NULL,&V);\nor\nKSPBuildSolution(ksp,v,NULL); or KSPBuildSolution(ksp,v,&v);\n-ve\nIn the first case an internal vector is allocated to store the solution\n(the user cannot destroy this vector). In the second case the solution\nis generated in the vector that the user provides. Note that for certain\nmethods, such as `KSPCG`, the second case requires a copy of the solution,\nwhile in the first case the call is essentially free since it simply\nreturns the vector where the solution already is stored. For some methods\nlike `KSPGMRES` during the solve this is a reasonably expensive operation and should only be\nused if truly needed.\n\n-seealso: [](ch_ksp), `KSPGetSolution()`, `KSPBuildResidual()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPBuildSolution\"))\n\"\"\"\nfunction KSPBuildSolution(ksp::AbstractKSP{PetscLib},v::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tr_V = Ref{CVec}()\n\n\tLibPETSc.KSPBuildSolution(\n\t\tPetscLib,\n\t\tksp,\n\t\tv,\n\t\tr_V,\n\t)\n\n\n\tV = VecPtr(PetscLib, r_V[], false)\n\treturn V\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tV = KSPBuildResidual(ksp::AbstractKSP{PetscLib},t::AbstractVector,v::AbstractVector)\n\nBuilds the residual in a vector provided.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameters:\n===\n- `v` - optional location to stash residual.  If `v` is not provided, then a location is generated.\n- `t` - work vector.  If not provided then one is generated.\n- `V` - the residual\n\nLevel: advanced\n\nNote:\nRegardless of whether or not `v` is provided, the residual is\nreturned in `V`.\n\n-seealso: [](ch_ksp), `KSP`, `KSPBuildSolution()`\n\n# External Links\n$(_doc_external(\"DM/KSPBuildResidual\"))\n\"\"\"\nfunction KSPBuildResidual(ksp::AbstractKSP{PetscLib},t::AbstractVector,v::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tr_V = Ref{CVec}()\n\n\tLibPETSc.KSPBuildResidual(\n\t\tPetscLib,\n\t\tksp,\n\t\tt,\n\t\tv,\n\t\tr_V,\n\t)\n\n\n\tV = VecPtr(PetscLib, r_V[], false)\n\treturn V\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\temax,emin = KSPComputeExtremeSingularValues(ksp::AbstractKSP{PetscLib})\n\nComputes the extreme singular values\nfor the preconditioned operator. Called after or during `KSPSolve()`.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameters:\n===\n- `emax` - maximum estimated singular value\n- `emin` - minimum estimated singular value\n\nOptions Database Key:\n===\n- `-ksp_view_singularvalues` - compute extreme singular values and print when `KSPSolve()` completes.\n\nLevel: advanced\n\nNotes:\nOne must call `KSPSetComputeSingularValues()` before calling `KSPSetUp()`\n(or use the option -ksp_view_eigenvalues) in order for this routine to work correctly.\n\nMany users may just want to use the monitoring routine\n`KSPMonitorSingularValue()` (which can be set with option -ksp_monitor_singular_value)\nto print the extreme singular values at each iteration of the linear solve.\n\nEstimates of the smallest singular value may be very inaccurate, especially if the Krylov method has not converged.\nThe largest singular value is usually accurate to within a few percent if the method has converged, but is still not\nintended for eigenanalysis. Consider the excellent package `SLEPc` if accurate values are required.\n\nDisable restarts if using KSPGMRES, otherwise this estimate will only be using those iterations after the last\nrestart. See `KSPGMRESSetRestart()` for more details.\n\n-seealso: [](ch_ksp), `KSPSetComputeSingularValues()`, `KSPMonitorSingularValue()`, `KSPComputeEigenvalues()`, `KSP`, `KSPComputeRitz()`\n\n# External Links\n$(_doc_external(\"DM/KSPComputeExtremeSingularValues\"))\n\"\"\"\nfunction KSPComputeExtremeSingularValues(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscReal = PetscLib.PetscReal\n\temax = [PetscReal(1)]\n\tPetscReal = PetscLib.PetscReal\n\temin = [PetscReal(1)]\n\n\tLibPETSc.KSPComputeExtremeSingularValues(\n\t\tPetscLib,\n\t\tksp,\n\t\temax,\n\t\temin,\n\t)\n\n\treturn emax[1],emin[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tneig = KSPComputeEigenvalues(ksp::AbstractKSP{PetscLib},n::Int,r::Vector{PetscReal},c::Vector{PetscReal})\n\nComputes the extreme eigenvalues for the\npreconditioned operator. Called after or during `KSPSolve()`.\n\nNot Collective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `n`   - size of arrays `r` and `c`. The number of eigenvalues computed `neig` will, in\ngeneral, be less than this.\n\nOutput Parameters:\n===\n- `r`    - real part of computed eigenvalues, provided by user with a dimension of at least `n`\n- `c`    - complex part of computed eigenvalues, provided by user with a dimension of at least `n`\n- `neig` - actual number of eigenvalues computed (will be less than or equal to `n`)\n\nOptions Database Key:\n===\n- `-ksp_view_eigenvalues` - Prints eigenvalues to stdout\n\nLevel: advanced\n\nNotes:\nThe number of eigenvalues estimated depends on the size of the Krylov space\ngenerated during the `KSPSolve()` ; for example, with\n`KSPCG` it corresponds to the number of CG iterations, for `KSPGMRES` it is the number\nof GMRES iterations SINCE the last restart. Any extra space in `r` and `c`\nwill be ignored.\n\n`KSPComputeEigenvalues()` does not usually provide accurate estimates; it is\nintended only for assistance in understanding the convergence of iterative\nmethods, not for eigenanalysis. For accurate computation of eigenvalues we recommend using\nthe excellent package SLEPc.\n\nOne must call `KSPSetComputeEigenvalues()` before calling `KSPSetUp()`\nin order for this routine to work correctly.\n\nMany users may just want to use the monitoring routine\n`KSPMonitorSingularValue()` (which can be set with option -ksp_monitor_singular_value)\nto print the singular values at each iteration of the linear solve.\n\n`KSPComputeRitz()` provides estimates for both the eigenvalues and their corresponding eigenvectors.\n\n-seealso: [](ch_ksp), `KSPSetComputeEigenvalues()`, `KSPSetComputeSingularValues()`, `KSPMonitorSingularValue()`, `KSPComputeExtremeSingularValues()`, `KSP`, `KSPComputeRitz()`\n\n# External Links\n$(_doc_external(\"DM/KSPComputeEigenvalues\"))\n\"\"\"\nfunction KSPComputeEigenvalues(ksp::AbstractKSP{PetscLib},n::Int,r::Vector{PetscReal},c::Vector{PetscReal}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscInt = PetscLib.PetscInt\n\tneig = [PetscInt(1)]\n\n\tLibPETSc.KSPComputeEigenvalues(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\tr,\n\t\tc,\n\t\tRef(neig,1),\n\t)\n\n\treturn neig[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPComputeEigenvaluesExplicitly(ksp::AbstractKSP{PetscLib},nmax::Int,r::Vector{PetscReal},c::Vector{PetscReal})\n\nComputes all of the eigenvalues of the\npreconditioned operator using LAPACK.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`  - iterative context obtained from `KSPCreate()`\n- `nmax` - size of arrays `r` and `c`\n\nOutput Parameters:\n===\n- `r` - real part of computed eigenvalues, provided by user with a dimension at least of `n`\n- `c` - complex part of computed eigenvalues, provided by user with a dimension at least of `n`\n\nLevel: advanced\n\nNotes:\nThis approach is very slow but will generally provide accurate eigenvalue\nestimates.  This routine explicitly forms a dense matrix representing\nthe preconditioned operator, and thus will run only for relatively small\nproblems, say `n` < 500.\n\nMany users may just want to use the monitoring routine\n`KSPMonitorSingularValue()` (which can be set with option -ksp_monitor_singular_value)\nto print the singular values at each iteration of the linear solve.\n\nThe preconditioner operator, rhs vector, and solution vectors should be\nset before this routine is called. i.e use `KSPSetOperators()`, `KSPSolve()`\n\n-seealso: [](ch_ksp), `KSP`, `KSPComputeEigenvalues()`, `KSPMonitorSingularValue()`, `KSPComputeExtremeSingularValues()`, `KSPSetOperators()`, `KSPSolve()`\n\n# External Links\n$(_doc_external(\"DM/KSPComputeEigenvaluesExplicitly\"))\n\"\"\"\nfunction KSPComputeEigenvaluesExplicitly(ksp::AbstractKSP{PetscLib},nmax::Int,r::Vector{PetscReal},c::Vector{PetscReal}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPComputeEigenvaluesExplicitly(\n\t\tPetscLib,\n\t\tksp,\n\t\tnmax,\n\t\tr,\n\t\tc,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetFromOptions(ksp::AbstractKSP{PetscLib})\n\nSets `KSP` options from the options database.\nThis routine must be called before `KSPSetUp()` if the user is to be\nallowed to set the Krylov type.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - the Krylov space context\n\nOptions Database Keys:\n===\n- `-ksp_rtol rtol`                                                          - relative tolerance used in default determination of convergence, i.e.\nif residual norm decreases by this factor than convergence is declared\n- `-ksp_atol abstol`                                                        - absolute tolerance used in default convergence test, i.e. if residual\nnorm is less than this then convergence is declared\n- `-ksp_divtol tol`                                                         - if residual norm increases by this factor than divergence is declared\n- `-ksp_max_it`                                                             - maximum number of linear iterations\n- `-ksp_min_it`                                                             - minimum number of linear iterations to use, defaults to zero\n\n- `-ksp_converged_use_initial_residual_norm`                                - see `KSPConvergedDefaultSetUIRNorm()`\n- `-ksp_converged_use_min_initial_residual_norm`                            - see `KSPConvergedDefaultSetUMIRNorm()`\n- `-ksp_converged_maxits`                                                   - see `KSPConvergedDefaultSetConvergedMaxits()`\n- `-ksp_norm_type <none,preconditioned,unpreconditioned,natural>`           - see `KSPSetNormType()`\n- `-ksp_check_norm_iteration it`                                            - do not compute residual norm until iteration number it (does compute at 0th iteration)\nworks only for `KSPBCGS`, `KSPIBCGS`, and `KSPCG`\n- `-ksp_lag_norm`                                                           - compute the norm of the residual for the ith iteration on the i+1 iteration;\nthis means that one can use the norm of the residual for convergence test WITHOUT\nan extra `MPI_Allreduce()` limiting global synchronizations.\nThis will require 1 more iteration of the solver than usual.\n- `-ksp_guess_type`                                                         - Type of initial guess generator for repeated linear solves\n- `-ksp_fischer_guess <model,size>`                                         - uses the Fischer initial guess generator for repeated linear solves\n- `-ksp_constant_null_space`                                                - assume the operator (matrix) has the constant vector in its null space\n- `-ksp_test_null_space`                                                    - tests the null space set with `MatSetNullSpace()` to see if it truly is a null space\n- `-ksp_knoll`                                                              - compute initial guess by applying the preconditioner to the right-hand side\n- `-ksp_monitor_cancel`                                                     - cancel all previous convergene monitor routines set\n- `-ksp_monitor`                                                            - print residual norm at each iteration\n- `-ksp_monitor draw::draw_lg`                                              - plot residual norm at each iteration\n- `-ksp_monitor_true_residual`                                              - print true residual norm at each iteration\n- `-all_ksp_monitor <optional filename>`                                    - print residual norm at each iteration for ALL KSP solves, regardless of their prefix. This is\nuseful for `PCFIELDSPLIT`, `PCMG`, etc that have inner solvers and\nyou wish to track the convergence of all the solvers\n- `-ksp_monitor_solution [ascii binary or draw][:filename][:format option]` - plot solution at each iteration\n- `-ksp_monitor_singular_value`                                             - monitor extreme singular values at each iteration\n- `-ksp_converged_reason`                                                   - view the convergence state at the end of the solve\n- `-ksp_use_explicittranspose`                                              - transpose the system explicitly in KSPSolveTranspose\n- `-ksp_error_if_not_converged`                                             - stop the program as soon as an error is detected in a `KSPSolve()`, `KSP_DIVERGED_ITS`\nis not treated as an error on inner solves\n- `-ksp_converged_rate`                                                     - view the convergence rate at the end of the solve\n\nLevel: beginner\n\nNote:\nTo see all options, run your program with the `-help` option or consult [](ch_ksp)\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOptionsPrefix()`, `KSPResetFromOptions()`, `KSPSetUseFischerGuess()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetFromOptions\"))\n\"\"\"\nfunction KSPSetFromOptions(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPSetFromOptions(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPResetFromOptions(ksp::AbstractKSP{PetscLib})\n\nSets `KSP` parameters from user options ONLY if the `KSP` was previously set from options\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetFromOptions()`, `KSPSetOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"DM/KSPResetFromOptions\"))\n\"\"\"\nfunction KSPResetFromOptions(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPResetFromOptions(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctx = KSPMonitorSetFromOptions(ksp::AbstractKSP{PetscLib},opt::Vector{Char},name::Vector{Char})\n\nSets a monitor function and viewer appropriate for the type indicated by the user in the options database\n\nCollective\n\nInput Parameters:\n===\n- `ksp`  - `KSP` object you wish to monitor\n- `opt`  - the command line option for this monitor\n- `name` - the monitor type one is seeking\n- `ctx`  - An optional user context for the monitor, or `NULL`\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPMonitorRegister()`, `KSPMonitorSet()`, `PetscOptionsCreateViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`,\n`PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`\n`PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,\n`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,\n`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,\n`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,\n`PetscOptionsFList()`, `PetscOptionsEList()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorSetFromOptions\"))\n\"\"\"\nfunction KSPMonitorSetFromOptions(ksp::AbstractKSP{PetscLib},opt::Vector{Char},name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPMonitorSetFromOptions(\n\t\tPetscLib,\n\t\tksp,\n\t\topt,\n\t\tname,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn ctx\nend\n \n\n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorResidual(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPrint the (possibly preconditioned) residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor` - Activates `KSPMonitorResidual()`\n\nLevel: intermediate\n\nNote:\nFor some methods, such as `KSPGMRES`, the norm is not computed directly from the residual.\n\nThe type of norm used by the method can be controlled with `KSPSetNormType()`\n\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidualDraw()`, `KSPMonitorResidualDrawLG()`,\n`KSPMonitorResidualRange()`, `KSPMonitorTrueResidualDraw()`, `KSPMonitorTrueResidualDrawLG()`, `KSPMonitorTrueResidualMax()`,\n`KSPMonitorSingularValue()`, `KSPMonitorSolutionDrawLG()`, `KSPMonitorSolutionDraw()`, `KSPMonitorSolution()`,\n`KSPMonitorErrorDrawLG()`, `KSPMonitorErrorDraw()`, `KSPMonitorError()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorResidual\"))\n\"\"\"\nfunction KSPMonitorResidual(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorResidual(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorResidualDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the (possibly preconditioned) residual at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor draw` - Activates `KSPMonitorResidualDraw()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidual()`, `KSPMonitorResidualDrawLG()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorResidualDraw\"))\n\"\"\"\nfunction KSPMonitorResidualDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorResidualDraw(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorResidualDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the (possibly preconditioned) residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor draw::draw_lg` - Activates `KSPMonitorResidualDrawLG()`\n\nLevel: intermediate\n\nNotes:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\nUse `KSPMonitorResidualDrawLGCreate()` to create the context used with this monitor\n\n-seealso: [](ch_ksp), `KSP`, `PETSCVIEWERDRAW`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidualDraw()`, `KSPMonitorResidual()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorResidualDrawLG\"))\n\"\"\"\nfunction KSPMonitorResidualDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorResidualDrawLG(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorResidualShort(ksp::AbstractKSP{PetscLib},its::Int,fnorm::AbstractFloat)\n\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorResidualShort\"))\n\"\"\"\nfunction KSPMonitorResidualShort(ksp::AbstractKSP{PetscLib},its::Int,fnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorResidualShort(\n\t\tPetscLib,\n\t\tksp,\n\t\tits,\n\t\tfnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorResidualRange(ksp::AbstractKSP{PetscLib},it::Int,rnorm::AbstractFloat)\n\nPrints the percentage of residual elements that are more than 10 percent of the maximum value.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `it`    - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_range` - Activates `KSPMonitorResidualRange()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorResidualRange\"))\n\"\"\"\nfunction KSPMonitorResidualRange(ksp::AbstractKSP{PetscLib},it::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorResidualRange(\n\t\tPetscLib,\n\t\tksp,\n\t\tit,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorTrueResidual(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPrints the true residual norm, as well as the (possibly preconditioned) approximate residual norm, at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_true_residual` - Activates `KSPMonitorTrueResidual()`\n\nLevel: intermediate\n\nNotes:\nWhen using right preconditioning, these values are equivalent.\n\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorTrueResidual\"))\n\"\"\"\nfunction KSPMonitorTrueResidual(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorTrueResidual(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorTrueResidualDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the true residual at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context of type `PETSCVIEWERDRAW`\n\nOptions Database Key:\n===\n- `-ksp_monitor_true_residual draw` - Activates `KSPMonitorResidualDraw()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorResidual()`,\n`KSPMonitorTrueResidualDrawLG()`, `PetscViewerAndFormat`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorTrueResidualDraw\"))\n\"\"\"\nfunction KSPMonitorTrueResidualDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorTrueResidualDraw(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorTrueResidualDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the true residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_true_residual draw::draw_lg` - Activates `KSPMonitorTrueResidualDrawLG()`\n\nLevel: intermediate\n\nNotes:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\nCall `KSPMonitorTrueResidualDrawLGCreate()` to create the context needed for this monitor\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorTrueResidualDraw()`, `KSPMonitorResidual`,\n`KSPMonitorTrueResidualDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorTrueResidualDrawLG\"))\n\"\"\"\nfunction KSPMonitorTrueResidualDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorTrueResidualDrawLG(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorTrueResidualMax(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPrints the true residual max norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_true_residual_max` - Activates `KSPMonitorTrueResidualMax()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorTrueResidualMax\"))\n\"\"\"\nfunction KSPMonitorTrueResidualMax(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorTrueResidualMax(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorError(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPrints the error norm, as well as the (possibly preconditioned) residual norm, at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_error` - Activates `KSPMonitorError()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorResidual()`, `KSPMonitorTrueResidualMaxNorm()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorError\"))\n\"\"\"\nfunction KSPMonitorError(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorError(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorErrorDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the error at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_error draw` - Activates `KSPMonitorErrorDraw()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorErrorDrawLG()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorErrorDraw\"))\n\"\"\"\nfunction KSPMonitorErrorDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorErrorDraw(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorErrorDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the error and residual norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_error draw::draw_lg` - Activates `KSPMonitorTrueResidualDrawLG()`\n\nLevel: intermediate\n\nNotes:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\nCall `KSPMonitorErrorDrawLGCreate()` to create the context used with this monitor\n\n-seealso: [](ch_ksp), `PETSCVIEWERDRAW`, `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorErrorDraw()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorErrorDrawLG\"))\n\"\"\"\nfunction KSPMonitorErrorDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorErrorDrawLG(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n  \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorSolution(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPrint the solution norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_solution` - Activates `KSPMonitorSolution()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSPMonitorSet()`, `KSPMonitorTrueResidual()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorSolution\"))\n\"\"\"\nfunction KSPMonitorSolution(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorSolution(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorSolutionDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the solution at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_solution draw` - Activates `KSPMonitorSolutionDraw()`\n\nLevel: intermediate\n\nNote:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\n-seealso: [](ch_ksp), `KSPMonitorSet()`, `KSPMonitorTrueResidual()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorSolutionDraw\"))\n\"\"\"\nfunction KSPMonitorSolutionDraw(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorSolutionDraw(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorSolutionDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPlots the solution norm at each iteration of an iterative solver.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm (preconditioned) residual value (may be estimated).\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_solution draw::draw_lg` - Activates `KSPMonitorSolutionDrawLG()`\n\nLevel: intermediate\n\nNotes:\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\nCall `KSPMonitorSolutionDrawLGCreate()` to create the context needed with this monitor\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorTrueResidual()`, `KSPMonitorSolutionDrawLGCreate()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorSolutionDrawLG\"))\n\"\"\"\nfunction KSPMonitorSolutionDrawLG(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorSolutionDrawLG(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n \n\"\"\"\n\t UNTESTED !!!\n\tvf = KSPMonitorSingularValue(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nPrints the two norm of the true residual and estimation of the extreme singular values of the preconditioned problem at each iteration.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`   - the iterative context\n- `n`     - the iteration\n- `rnorm` - the two norm of the residual\n- `vf`    - The viewer context\n\nOptions Database Key:\n===\n- `-ksp_monitor_singular_value` - Activates `KSPMonitorSingularValue()`\n\nLevel: intermediate\n\nNotes:\nThe `KSPCG` solver uses the Lanczos technique for eigenvalue computation,\nwhile `KSPGMRES` uses the Arnoldi technique; other iterative methods do\nnot currently compute singular values.\n\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\nCall `KSPMonitorSingularValueCreate()` to create the context needed by this monitor\n\n-seealso: [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPComputeExtremeSingularValues()`, `KSPMonitorSingularValueCreate()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorSingularValue\"))\n\"\"\"\nfunction KSPMonitorSingularValue(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\n\tLibPETSc.KSPMonitorSingularValue(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tvf,\n\t)\n\n\treturn vf\nend\n \n \n \n\"\"\"\n\t UNTESTED !!!\n\tctx = KSPMonitorDynamicTolerance(ksp::AbstractKSP{PetscLib},its::Int,fnorm::AbstractFloat)\n\nA monitor that changes the inner tolerance of nested preconditioners in every outer iteration in an adaptive way.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `its`   - iteration number (not used)\n- `fnorm` - the current residual norm\n- `ctx`   - context used by monitor\n\nOptions Database Key:\n===\n- `-sub_ksp_dynamic_tolerance <coef>` - coefficient of dynamic tolerance for inner solver, default is 1.0\n\nLevel: advanced\n\nNotes:\nApplies for `PCKSP`, `PCBJACOBI`, and `PCDEFLATION` preconditioners\n\nThis may be useful for a flexible preconditioned Krylov method, such as `KSPFGMRES`, [](sec_flexibleksp) to\ncontrol the accuracy of the inner solves needed to guarantee convergence of the outer iterations.\n\nThis is not called directly by users, rather one calls `KSPMonitorSet()`, with this function as an argument, to cause the monitor\nto be used during the `KSP` solve.\n\nUse `KSPMonitorDynamicToleranceCreate()` and `KSPMonitorDynamicToleranceSetCoefficient()` to create the context needed by this\nmonitor function.\n\nPass the context and `KSPMonitorDynamicToleranceDestroy()` to `KSPMonitorSet()`\n\n-seealso: [](sec_flexibleksp), `KSP`, `KSPMonitorDynamicToleranceCreate()`, `KSPMonitorDynamicToleranceDestroy()`, `KSPMonitorDynamicToleranceSetCoefficient()`\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorDynamicTolerance\"))\n\"\"\"\nfunction KSPMonitorDynamicTolerance(ksp::AbstractKSP{PetscLib},its::Int,fnorm::AbstractFloat) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPMonitorDynamicTolerance(\n\t\tPetscLib,\n\t\tksp,\n\t\tits,\n\t\tfnorm,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn ctx\nend\n \n \n\n \n\"\"\"\n\t UNTESTED !!!\n\t KSPUnwindPreconditioner(ksp::AbstractKSP{PetscLib},vsoln::AbstractVector,vt1::AbstractVector)\n\nUnwinds the preconditioning in the solution. That is,\ntakes solution to the preconditioned problem and gets the solution to the\noriginal problem from it.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `vsoln` - solution vector\n- `vt1`   - temporary work vector\n\nOutput Parameter:\n===\n- `vsoln` - contains solution on output\n\nLevel: advanced\n\nNote:\nIf preconditioning either symmetrically or on the right, this routine solves\nfor the correction to the unpreconditioned problem.  If preconditioning on\nthe left, nothing is done.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetPCSide()`\n\n# External Links\n$(_doc_external(\"DM/KSPUnwindPreconditioner\"))\n\"\"\"\nfunction KSPUnwindPreconditioner(ksp::AbstractKSP{PetscLib},vsoln::AbstractVector,vt1::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPUnwindPreconditioner(\n\t\tPetscLib,\n\t\tksp,\n\t\tvsoln,\n\t\tvt1,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPInitialResidual(ksp::AbstractKSP{PetscLib},vsoln::AbstractVector,vt1::AbstractVector,vt2::AbstractVector,vres::AbstractVector,vb::AbstractVector)\n\nComputes the residual. Either b\npreconditioning or C*(b - A*x) with left preconditioning; the latter\nresidual is often called the \"preconditioned residual\".\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - the `KSP` solver object\n- `vsoln` - solution to use in computing residual\n- `vt1`   - temporary work vector\n- `vt2`   - temporary work vector\n- `vb`    - right-hand-side vector\n\nOutput Parameter:\n===\n- `vres` - calculated residual\n\nLevel: developer\n\nNote:\nThis routine assumes that an iterative method, designed for  A x = b \nwill be used with a preconditioner, C, such that the actual problem is either\n-vb\nAC u = b (right preconditioning) or\nCA x = Cb (left preconditioning).\n-ve\nThis means that the calculated residual will be scaled and/or preconditioned;\nthe true residual  b-Ax \nis returned in the `vt2` temporary work vector.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `KSPMonitor()`\n\n# External Links\n$(_doc_external(\"DM/KSPInitialResidual\"))\n\"\"\"\nfunction KSPInitialResidual(ksp::AbstractKSP{PetscLib},vsoln::AbstractVector,vt1::AbstractVector,vt2::AbstractVector,vres::AbstractVector,vb::AbstractVector) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPInitialResidual(\n\t\tPetscLib,\n\t\tksp,\n\t\tvsoln,\n\t\tvt1,\n\t\tvt2,\n\t\tvres,\n\t\tvb,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t KSPSetOperators(ksp::AbstractKSP{PetscLib},Amat::AbstractMatrix,Pmat::AbstractMatrix)\n\nSets the matrix associated with the linear system\nand a (possibly) different one from which the preconditioner will be built\n\nCollective\n\nInput Parameters:\n===\n- `ksp`  - the `KSP` context\n- `Amat` - the matrix that defines the linear system\n- `Pmat` - the matrix to be used in constructing the preconditioner, usually the same as Amat.\n\nLevel: beginner\n\nNotes:\nIf you know the operator Amat has a null space you can use `MatSetNullSpace()` and `MatSetTransposeNullSpace()` to supply the null\nspace to `Amat` and the `KSP` solvers will automatically use that null space as needed during the solution process.\n\nAll future calls to `KSPSetOperators()` must use the same size matrices!\n\nPassing a `NULL` for `Amat` or `Pmat` removes the matrix that is currently used.\n\nIf you wish to replace either `Amat` or `Pmat` but leave the other one untouched then\nfirst call `KSPGetOperators()` to get the one you wish to keep, call `PetscObjectReference()`\non it and then pass it back in your call to `KSPSetOperators()`.\n\nDeveloper Notes:\nIf the operators have NOT been set with `KSPSetOperators()` then the operators\nare created in the `PC` and returned to the user. In this case, if both operators\nmat and pmat are requested, two DIFFERENT operators will be returned. If\nonly one is requested both operators in the `PC` will be the same (i.e. as\nif one had called `KSPSetOperators()` with the same argument for both `Mat`s).\nThe user must set the sizes of the returned matrices and their type etc just\nas if the user created them with `MatCreate()`. For example,\n\n-vb\nKSPGetOperators(ksp/pc,&mat,NULL); is equivalent to\nset size, type, etc of mat\n\nMatCreate(comm,&mat);\nKSP/PCSetOperators(ksp/pc,mat,mat);\nPetscObjectDereference((PetscObject)mat);\nset size, type, etc of mat\n\nand\n\nKSP/PCGetOperators(ksp/pc,&mat,&pmat); is equivalent to\nset size, type, etc of mat and pmat\n\nMatCreate(comm,&mat);\nMatCreate(comm,&pmat);\nKSP/PCSetOperators(ksp/pc,mat,pmat);\nPetscObjectDereference((PetscObject)mat);\nPetscObjectDereference((PetscObject)pmat);\nset size, type, etc of mat and pmat\n-ve\n\nThe rationale for this support is so that when creating a `TS`, `SNES`, or `KSP` the hierarchy\nof underlying objects (i.e. `SNES`, `KSP`, `PC`, `Mat`) and their lifespans can be completely\nmanaged by the top most level object (i.e. the `TS`, `SNES`, or `KSP`). Another way to look\nat this is when you create a `SNES` you do not NEED to create a `KSP` and attach it to\nthe `SNES` object (the `SNES` object manages it for you). Similarly when you create a `KSP`\nyou do not need to attach a `PC` to it (the `KSP` object manages the `PC` object for you).\nThus, why should YOU have to create the `Mat` and attach it to the `SNES`/`KSP`/`PC`, when\nit can be created for you?\n\n-seealso: [](ch_ksp), `KSP`, `Mat`, `KSPSolve()`, `KSPGetPC()`, `PCGetOperators()`, `PCSetOperators()`, `KSPGetOperators()`, `KSPSetComputeOperators()`, `KSPSetComputeInitialGuess()`, `KSPSetComputeRHS()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetOperators\"))\n\"\"\"\nfunction KSPSetOperators(ksp::AbstractKSP{PetscLib},Amat::AbstractMatrix,Pmat::AbstractMatrix) where {PetscLib}\n\n\tLibPETSc.KSPSetOperators(\n\t\tPetscLib,\n\t\tksp,\n\t\tAmat,\n\t\tPmat,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tAmat,Pmat = KSPGetOperators(ksp::AbstractKSP{PetscLib})\n\nGets the matrix associated with the linear system\nand a (possibly) different one used to construct the preconditioner.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nOutput Parameters:\n===\n- `Amat` - the matrix that defines the linear system\n- `Pmat` - the matrix to be used in constructing the preconditioner, usually the same as `Amat`.\n\nLevel: intermediate\n\nNote:\nDOES NOT increase the reference counts of the matrix, so you should NOT destroy them.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `KSPGetPC()`, `PCGetOperators()`, `PCSetOperators()`, `KSPSetOperators()`, `KSPGetOperatorsSet()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetOperators\"))\n\"\"\"\nfunction KSPGetOperators(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPGetOperators(\n\t\tPetscLib,\n\t\tksp,\n\t\tAmat,\n\t\tPmat,\n\t)\n\n\treturn Amat,Pmat\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmat,pmat = KSPGetOperatorsSet(ksp::AbstractKSP{PetscLib})\n\nDetermines if the matrix associated with the linear system and\npossibly a different one associated with the preconditioner have been set in the `KSP`.\n\nNot Collective, though the results on all processes should be the same\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nOutput Parameters:\n===\n- `mat`  - the matrix associated with the linear system was set\n- `pmat` - matrix associated with the preconditioner was set, usually the same as `mat`\n\nLevel: intermediate\n\nNote:\nThis routine exists because if you call `KSPGetOperators()` on a `KSP` that does not yet have operators they are\nautomatically created in the call.\n\n-seealso: [](ch_ksp), `KSP`, `PCSetOperators()`, `KSPGetOperators()`, `KSPSetOperators()`, `PCGetOperators()`, `PCGetOperatorsSet()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetOperatorsSet\"))\n\"\"\"\nfunction KSPGetOperatorsSet(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tmat = Ref{PetscBool}()\n\tpmat = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetOperatorsSet(\n\t\tPetscLib,\n\t\tksp,\n\t\tmat,\n\t\tpmat,\n\t)\n\n\treturn mat[] == PETSC_TRUE,pmat[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPAppendOptionsPrefix(ksp::AbstractKSP{PetscLib},prefix::Vector{Char})\n\nAppends to the prefix used for searching for all\n`KSP` options in the database.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`    - the Krylov context\n- `prefix` - the prefix string to prepend to all `KSP` option requests\n\nLevel: intermediate\n\nNote:\nA hyphen (-) must NOT be given at the beginning of the prefix name.\nThe first character of all runtime options is AUTOMATICALLY the hyphen.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOptionsPrefix()`, `KSPGetOptionsPrefix()`, `KSPSetFromOptions()`\n\n# External Links\n$(_doc_external(\"DM/KSPAppendOptionsPrefix\"))\n\"\"\"\nfunction KSPAppendOptionsPrefix(ksp::AbstractKSP{PetscLib},prefix::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPAppendOptionsPrefix(\n\t\tPetscLib,\n\t\tksp,\n\t\tprefix,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPGetOptionsPrefix(ksp::AbstractKSP{PetscLib},prefix::Vector{Char})\n\nGets the prefix used for searching for all\n`KSP` options in the database.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the Krylov context\n\nOutput Parameter:\n===\n- `prefix` - pointer to the prefix string used is returned\n\nLevel: advanced\n\nFortran Note:\nPass in a string 'prefix' of\nsufficient length to hold the prefix.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetFromOptions()`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetOptionsPrefix\"))\n\"\"\"\nfunction KSPGetOptionsPrefix(ksp::AbstractKSP{PetscLib},prefix::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPGetOptionsPrefix(\n\t\tPetscLib,\n\t\tksp,\n\t\tprefix,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetDiagonalScale(ksp::AbstractKSP{PetscLib},scale::PetscBool)\n\nTells `KSP` to symmetrically diagonally scale the system\nbefore solving. This actually CHANGES the matrix (and right-hand side).\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`   - the `KSP` context\n- `scale` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Keys:\n===\n- `-ksp_diagonal_scale`     - perform a diagonal scaling before the solve\n- `-ksp_diagonal_scale_fix` - scale the matrix back AFTER the solve\n\nLevel: advanced\n\nNotes:\nScales the matrix by  D^{-1/2}  A  D^{-1/2}  [D^{1/2} x ] = D^{-1/2} b \nwhere D_{ii} is 1/abs(A_{ii})  unless A_{ii} is zero and then it is 1.\n\nBE CAREFUL with this routine: it actually scales the matrix and right\nhand side that define the system. After the system is solved the matrix\nand right-hand side remain scaled unless you use `KSPSetDiagonalScaleFix()`\n\nThis should NOT be used within the `SNES` solves if you are using a line\nsearch.\n\nIf you use this with the `PCType` `PCEISENSTAT` preconditioner than you can\nuse the `PCEisenstatSetNoDiagonalScaling()` option, or `-pc_eisenstat_no_diagonal_scaling`\nto save some unneeded, redundant flops.\n\n-seealso: [](ch_ksp), `KSPGetDiagonalScale()`, `KSPSetDiagonalScaleFix()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetDiagonalScale\"))\n\"\"\"\nfunction KSPSetDiagonalScale(ksp::AbstractKSP{PetscLib},scale::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetDiagonalScale(\n\t\tPetscLib,\n\t\tksp,\n\t\tscale,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tscale = KSPGetDiagonalScale(ksp::AbstractKSP{PetscLib})\n\nChecks if `KSP` solver scales the matrix and right\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n===\n- `scale` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetDiagonalScale()`, `KSPSetDiagonalScaleFix()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetDiagonalScale\"))\n\"\"\"\nfunction KSPGetDiagonalScale(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tscale = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetDiagonalScale(\n\t\tPetscLib,\n\t\tksp,\n\t\tscale,\n\t)\n\n\treturn scale[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetDiagonalScaleFix(ksp::AbstractKSP{PetscLib},fix::PetscBool)\n\nTells `KSP` to diagonally scale the system back after solving.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - the `KSP` context\n- `fix` - `PETSC_TRUE` to scale back after the system solve, `PETSC_FALSE` to not\nrescale (default)\n\nLevel: intermediate\n\nNotes:\nMust be called after `KSPSetDiagonalScale()`\n\nUsing this will slow things down, because it rescales the matrix before and\nafter each linear solve. This is intended mainly for testing to allow one\nto easily get back the original system to make sure the solution computed is\naccurate enough.\n\n-seealso: [](ch_ksp), `KSPGetDiagonalScale()`, `KSPSetDiagonalScale()`, `KSPGetDiagonalScaleFix()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetDiagonalScaleFix\"))\n\"\"\"\nfunction KSPSetDiagonalScaleFix(ksp::AbstractKSP{PetscLib},fix::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetDiagonalScaleFix(\n\t\tPetscLib,\n\t\tksp,\n\t\tfix,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfix = KSPGetDiagonalScaleFix(ksp::AbstractKSP{PetscLib})\n\nDetermines if `KSP` diagonally scales the system back after solving. That is `KSPSetDiagonalScaleFix()` has been called\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n===\n- `fix` - `PETSC_TRUE` to scale back after the system solve, `PETSC_FALSE` to not\nrescale (default)\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPGetDiagonalScale()`, `KSPSetDiagonalScale()`, `KSPSetDiagonalScaleFix()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetDiagonalScaleFix\"))\n\"\"\"\nfunction KSPGetDiagonalScaleFix(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tfix = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetDiagonalScaleFix(\n\t\tPetscLib,\n\t\tksp,\n\t\tfix,\n\t)\n\n\treturn fix[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPView(ksp::AbstractKSP{PetscLib},viewer::PetscViewer)\n\nPrints the `KSP` data structure.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`    - the Krylov space context\n- `viewer` - visualization context\n\nOptions Database Key:\n===\n- `-ksp_view` - print the `KSP` data structure at the end of each `KSPSolve()` call\n\nLevel: beginner\n\nNotes:\nThe available visualization contexts include\n- ``PETSC_VIEWER_STDOUT_SELF``     - standard output (default)\n- ``PETSC_VIEWER_STDOUT_WORLD``     - synchronized standard\noutput where only the first processor opens\nthe file.  All other processors send their\ndata to the first processor to print.\n\nThe available formats include\n- ``PETSC_VIEWER_DEFAULT``     - standard output (default)\n- ``PETSC_VIEWER_ASCII_INFO_DETAIL``     - more verbose output for PCBJACOBI and PCASM\n\nThe user can open an alternative visualization context with\n`PetscViewerASCIIOpen()` - output to a specified file.\n\nIn the debugger you can do call `KSPView(ksp,0)` to display the `KSP`. (The same holds for any PETSc object viewer).\n\n-seealso: [](ch_ksp), `KSP`, `PetscViewer`, `PCView()`, `PetscViewerASCIIOpen()`\n\n# External Links\n$(_doc_external(\"DM/KSPView\"))\n\"\"\"\nfunction KSPView(ksp::AbstractKSP{PetscLib},viewer::PetscViewer) where {PetscLib}\n\n\tLibPETSc.KSPView(\n\t\tPetscLib,\n\t\tksp,\n\t\tviewer,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPLoad(newdm::AbstractKSP{PetscLib},viewer::PetscViewer)\n\nLoads a `KSP` that has been stored in a `PETSCVIEWERBINARY`  with `KSPView()`.\n\nCollective\n\nInput Parameters:\n===\n- `newdm`  - the newly loaded `KSP`, this needs to have been created with `KSPCreate()` or\nsome related function before a call to `KSPLoad()`.\n- `viewer` - binary file viewer, obtained from `PetscViewerBinaryOpen()`\n\nLevel: intermediate\n\nNote:\nThe type is determined by the data in the file, any type set into the `KSP` before this call is ignored.\n\n-seealso: [](ch_ksp), `KSP`, `PetscViewerBinaryOpen()`, `KSPView()`, `MatLoad()`, `VecLoad()`\n\n# External Links\n$(_doc_external(\"DM/KSPLoad\"))\n\"\"\"\nfunction KSPLoad(newdm::AbstractKSP{PetscLib},viewer::PetscViewer) where {PetscLib}\n\n\tLibPETSc.KSPLoad(\n\t\tPetscLib,\n\t\tnewdm,\n\t\tviewer,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPViewFromOptions(A::AbstractKSP{PetscLib},obj::PetscObject,name::Vector{Char})\n\nView a `KSP` object based on values in the options database\n\nCollective\n\nInput Parameters:\n===\n- `A`    - Krylov solver context\n- `obj`  - Optional object\n- `name` - command line option\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPView`, `PetscObjectViewFromOptions()`, `KSPCreate()`\n\n# External Links\n$(_doc_external(\"DM/KSPViewFromOptions\"))\n\"\"\"\nfunction KSPViewFromOptions(A::AbstractKSP{PetscLib},obj::PetscObject,name::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPViewFromOptions(\n\t\tPetscLib,\n\t\tA,\n\t\tobj,\n\t\tname,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPConvergedReasonViewFromOptions(ksp::AbstractKSP{PetscLib})\n\nProcesses command line options to determine if/how a `KSPReason` is to be viewed.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` object\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPConvergedReasonView()`, `KSPConvergedReasonViewSet()`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedReasonViewFromOptions\"))\n\"\"\"\nfunction KSPConvergedReasonViewFromOptions(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPConvergedReasonViewFromOptions(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPConvergedReasonViewCancel(ksp::AbstractKSP{PetscLib})\n\nClears all the reasonview functions for a `KSP` object set with `KSPConvergedReasonViewSet()`\nas well as the default viewer.\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSPCreate()`, `KSPDestroy()`, `KSPReset()`, `KSPConvergedReasonViewSet()`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedReasonViewCancel\"))\n\"\"\"\nfunction KSPConvergedReasonViewCancel(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPConvergedReasonViewCancel(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPConvergedRateView(ksp::AbstractKSP{PetscLib},viewer::PetscViewer)\n\nDisplays the convergence rate <https://en.wikipedia.org/wiki/Coefficient_of_determination> of `KSPSolve()` to a viewer\n\nCollective\n\nInput Parameters:\n===\n- `ksp`    - iterative context obtained from `KSPCreate()`\n- `viewer` - the viewer to display the reason\n\nOptions Database Key:\n===\n- `-ksp_converged_rate` - print reason for convergence or divergence and the convergence rate (or 0.0 for divergence)\n\nLevel: intermediate\n\nNotes:\nTo change the format of the output, call `PetscViewerPushFormat`(`viewer`,`format`) before this call.\n\nSuppose that the residual is reduced linearly, r_k = c^k r_0, which means log r_k = log r_0 + k log c. After linear regression,\nthe slope is log c. The coefficient of determination is given by 1 - frac{sum_i (y_i - f(x_i))^2}{sum_i (y_i - bar y)},\n\n-seealso: [](ch_ksp), `KSPConvergedReasonView()`, `KSPGetConvergedRate()`, `KSPSetTolerances()`, `KSPConvergedDefault()`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedRateView\"))\n\"\"\"\nfunction KSPConvergedRateView(ksp::AbstractKSP{PetscLib},viewer::PetscViewer) where {PetscLib}\n\n\tLibPETSc.KSPConvergedRateView(\n\t\tPetscLib,\n\t\tksp,\n\t\tviewer,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetNormType(ksp::AbstractKSP{PetscLib},normtype::KSPNormType)\n\nSets the norm that is used for convergence testing.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`      - Krylov solver context\n- `normtype` - one of\n-vb\nKSP_NORM_NONE             - skips computing the norm, this should generally only be used if you are using\nthe Krylov method as a smoother with a fixed small number of iterations.\nImplicitly sets `KSPConvergedSkip()` as the `KSP` convergence test.\nNote that certain algorithms such as `KSPGMRES` ALWAYS require the norm calculation,\nfor these methods the norms are still computed, they are just not used in\nthe convergence test.\nKSP_NORM_PRECONDITIONED   - the default for left-preconditioned solves, uses the l2 norm\nof the preconditioned residual  P^{-1}(b - A x).\nKSP_NORM_UNPRECONDITIONED - uses the l2 norm of the true  b - Ax residual.\nKSP_NORM_NATURAL          - supported by `KSPCG`, `KSPCR`, `KSPCGNE`, `KSPCGS`\n-ve\n\nOptions Database Key:\n===\n- `-ksp_norm_type <none,preconditioned,unpreconditioned,natural>` - set `KSP` norm type\n\nLevel: advanced\n\nNote:\nNot all combinations of preconditioner side (see `KSPSetPCSide()`) and norm type are supported by all Krylov methods.\nIf only one is set, PETSc tries to automatically change the other to find a compatible pair.  If no such combination\nis supported, PETSc will generate an error.\n\nDeveloper Note:\nSupported combinations of norm and preconditioner side are set using `KSPSetSupportedNorm()`.\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSPConvergedSkip()`, `KSPSetCheckNormIteration()`, `KSPSetPCSide()`, `KSPGetPCSide()`, `KSPNormType`\n\n# External Links\n$(_doc_external(\"DM/KSPSetNormType\"))\n\"\"\"\nfunction KSPSetNormType(ksp::AbstractKSP{PetscLib},normtype::KSPNormType) where {PetscLib}\n\n\tLibPETSc.KSPSetNormType(\n\t\tPetscLib,\n\t\tksp,\n\t\tnormtype,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tnormtype = KSPGetNormType(ksp::AbstractKSP{PetscLib})\n\nGets the norm that is used for convergence testing.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - Krylov solver context\n\nOutput Parameter:\n===\n- `normtype` - norm that is used for convergence testing\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPNormType`, `KSPSetNormType()`, `KSPConvergedSkip()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetNormType\"))\n\"\"\"\nfunction KSPGetNormType(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPGetNormType(\n\t\tPetscLib,\n\t\tksp,\n\t\tnormtype,\n\t)\n\n\treturn normtype\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetCheckNormIteration(ksp::AbstractKSP{PetscLib},it::Int)\n\nSets the first iteration at which the norm of the residual will be\ncomputed and used in the convergence test.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - Krylov solver context\n- `it`  - use -1 to check at all iterations\n\nNotes:\nCurrently only works with `KSPCG`, `KSPBCGS` and `KSPIBCGS`\n\nUse `KSPSetNormType`(ksp,`KSP_NORM_NONE`) to never check the norm\n\nOn steps where the norm is not computed, the previous norm is still in the variable, so if you run with, for example,\n`-ksp_monitor` the residual norm will appear to be unchanged for several iterations (though it is not really unchanged).\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSPConvergedSkip()`, `KSPSetNormType()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetCheckNormIteration\"))\n\"\"\"\nfunction KSPSetCheckNormIteration(ksp::AbstractKSP{PetscLib},it::Int) where {PetscLib}\n\n\tLibPETSc.KSPSetCheckNormIteration(\n\t\tPetscLib,\n\t\tksp,\n\t\tit,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetLagNorm(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nLags the residual norm calculation so that it is computed as part of the `MPI_Allreduce()` for\ncomputing the inner products for the next iteration.  This can reduce communication costs at the expense of doing\none additional iteration.\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - Krylov solver context\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nOptions Database Key:\n===\n- `-ksp_lag_norm` - lag the calculated residual norm\n\nLevel: advanced\n\nNotes:\nCurrently only works with `KSPIBCGS`.\n\nUse `KSPSetNormType`(ksp,`KSP_NORM_NONE`) to never check the norm\n\nIf you lag the norm and run with, for example, `-ksp_monitor`, the residual norm reported will be the lagged one.\n\n-seealso: [](ch_ksp), `KSPSetUp()`, `KSPSolve()`, `KSPDestroy()`, `KSPConvergedSkip()`, `KSPSetNormType()`, `KSPSetCheckNormIteration()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetLagNorm\"))\n\"\"\"\nfunction KSPSetLagNorm(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetLagNorm(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctx = KSPGetConvergenceContext(ksp::AbstractKSP{PetscLib})\n\nGets the convergence context set with `KSPSetConvergenceTest()`.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `ctx` - monitoring context\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSPGetConvergenceTest()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetConvergenceContext\"))\n\"\"\"\nfunction KSPGetConvergenceContext(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPGetConvergenceContext(\n\t\tPetscLib,\n\t\tksp,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\treason,ctx = KSPConvergedDefault(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nDefault code to determine convergence of the linear iterative solvers\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - residual norm (may be estimated, depending on the method may be the preconditioned residual norm)\n- `ctx`   - convergence context which must be created by `KSPConvergedDefaultCreate()`\n\nOutput Parameter:\n===\n- `reason` - the convergence reason; it is positive if the iteration has converged,\nnegative if the iteration has diverged, and `KSP_CONVERGED_ITERATING` otherwise\n\nOptions Database Keys:\n===\n- `-ksp_max_it`                                  - maximum number of linear iterations\n- `-ksp_min_it`                                  - minimum number of linear iterations, defaults to 0\n- `-ksp_rtol rtol`                               - relative tolerance used in default determination of convergence, i.e. if residual norm decreases by this factor than convergence is declared\n- `-ksp_atol abstol`                             - absolute tolerance used in default convergence test, i.e. if residual norm is less than this then convergence is declared\n- `-ksp_divtol tol`                              - if residual norm increases by this factor than divergence is declared\n- `-ksp_converged_use_initial_residual_norm`     - see `KSPConvergedDefaultSetUIRNorm()`\n- `-ksp_converged_use_min_initial_residual_norm` - see `KSPConvergedDefaultSetUMIRNorm()`\n- `-ksp_converged_maxits`                        - see `KSPConvergedDefaultSetConvergedMaxits()`\n\nLevel: advanced\n\nNotes:\n`KSPConvergedDefault()` reaches convergence when   rnorm < MAX (rtol * rnorm_0, abstol);\nDivergence is detected if rnorm > dtol * rnorm_0, or when failures are detected throughout the iteration.\nBy default, reaching the maximum number of iterations is considered divergence (i.e. KSP_DIVERGED_ITS).\nIn order to have PETSc declaring convergence in such a case (i.e. `KSP_CONVERGED_ITS`), users can use `KSPConvergedDefaultSetConvergedMaxits()`\n\nwhere:\n- ``rtol``     - relative tolerance,\n- ``abstol``     - absolute tolerance.\n- ``dtol``     - divergence tolerance,\n- ``rnorm_0``     - the two norm of the right-hand side (or the preconditioned norm, depending on what was set with\n`KSPSetNormType()`. When initial guess is non-zero you\ncan call `KSPConvergedDefaultSetUIRNorm()` to use the norm of (b - A*(initial guess))\nas the starting point for relative norm convergence testing, that is as `rnorm_0`.\nCall `KSPConvergedDefaultSetUMIRNorm()` to use the minimum of the norm of (b - A*(initial guess)) and the norm of b as the starting point.\n\nUse `KSPSetTolerances()` to alter the defaults for `rtol`, `abstol`, `dtol`.\n\nUse `KSPSetNormType()` (or `-ksp_norm_type <none,preconditioned,unpreconditioned,natural>`) to change the norm used for computing rnorm\n\nThe precise values of reason are available in `KSPConvergedReason`\n\nThis routine is used by `KSP` by default so the user generally never needs call it directly.\n\nUse `KSPSetConvergenceTest()` to provide your own test instead of using this one.\n\nCall `KSPSetConvergenceTest()` with the `ctx`, as created above and the destruction function `KSPConvergedDefaultDestroy()`\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPSetMinimumIterations()`,\n`KSPConvergedDefaultSetUIRNorm()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetConvergedMaxits()`, `KSPConvergedDefaultCreate()`, `KSPConvergedDefaultDestroy()`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedDefault\"))\n\"\"\"\nfunction KSPConvergedDefault(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPConvergedDefault(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\treason,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn reason,ctx\nend\n \n \n \n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPConvergedDefaultSetUIRNorm(ksp::AbstractKSP{PetscLib})\n\nmakes the default convergence test use  || B*(b\ninstead of  || B*b ||. In the case of right preconditioner or if `KSPSetNormType`(ksp,`KSP_NORM_UNPRECONDITIONED`)\nis used there is no B in the above formula.\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context\n\nOptions Database Key:\n===\n- `-ksp_converged_use_initial_residual_norm <bool>` - Use initial residual norm for computing relative convergence\n\nLevel: intermediate\n\nNotes:\nUIRNorm is short for Use Initial Residual Norm.\n\nUse `KSPSetTolerances()` to alter the defaults for rtol, abstol, dtol.\n\nThe precise values of reason are macros such as `KSP_CONVERGED_RTOL`, which\nare defined in petscksp.h.\n\nIf the convergence test is not `KSPConvergedDefault()` then this is ignored.\n\nIf right preconditioning is being used then B does not appear in the above formula.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetConvergedMaxits()`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedDefaultSetUIRNorm\"))\n\"\"\"\nfunction KSPConvergedDefaultSetUIRNorm(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPConvergedDefaultSetUIRNorm(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPConvergedDefaultSetUMIRNorm(ksp::AbstractKSP{PetscLib})\n\nmakes the default convergence test use min(|| B*(b\nIn the case of right preconditioner or if `KSPSetNormType`(ksp,`KSP_NORM_UNPRECONDITIONED`)\nis used there is no B in the above formula.\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context\n\nOptions Database Key:\n===\n- `-ksp_converged_use_min_initial_residual_norm <bool>` - Use minimum of initial residual norm and b for computing relative convergence\n\nLevel: intermediate\n\nNotes:\nUMIRNorm is short for Use Minimum Initial Residual Norm.\n\nUse `KSPSetTolerances()` to alter the defaults for rtol, abstol, dtol.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUIRNorm()`, `KSPConvergedDefaultSetConvergedMaxits()`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedDefaultSetUMIRNorm\"))\n\"\"\"\nfunction KSPConvergedDefaultSetUMIRNorm(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPConvergedDefaultSetUMIRNorm(\n\t\tPetscLib,\n\t\tksp,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPConvergedDefaultSetConvergedMaxits(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nallows the default convergence test to declare convergence and return `KSP_CONVERGED_ITS` if the maximum number of iterations is reached\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context\n- `flg` - boolean flag\n\nOptions Database Key:\n===\n- `-ksp_converged_maxits <bool>` - Declare convergence if the maximum number of iterations is reached\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetUIRNorm()`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedDefaultSetConvergedMaxits\"))\n\"\"\"\nfunction KSPConvergedDefaultSetConvergedMaxits(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPConvergedDefaultSetConvergedMaxits(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\treason,dtx = KSPConvergedSkip(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\nConvergence test that do not return as converged\nuntil the maximum number of iterations is reached.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`   - iterative context\n- `n`     - iteration number\n- `rnorm` - 2-norm residual value (may be estimated)\n- `dtx`   - unused convergence context\n\nOutput Parameter:\n===\n- `reason` - `KSP_CONVERGED_ITERATING` or `KSP_CONVERGED_ITS`\n\nOptions Database Key:\n===\n- `-ksp_convergence_test skip` - skips the test\n\nLevel: advanced\n\nNote:\nThis should be used as the convergence test with the option\n`KSPSetNormType`(ksp,`KSP_NORM_NONE`), since norms of the residual are\nnot computed. Convergence is then declared after the maximum number\nof iterations have been reached. Useful when one is using `KSPCG` or\n`KSPBCGS`. [](sec_flexibleksp)\n\n-seealso: [](ch_ksp), `KSP`, `KSPCG`, `KSPBCGS`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPSetNormType()`, [](sec_flexibleksp),\n`KSPConvergedReason`\n\n# External Links\n$(_doc_external(\"DM/KSPConvergedSkip\"))\n\"\"\"\nfunction KSPConvergedSkip(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_dtx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPConvergedSkip(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\treason,\n\t\tr_dtx,\n\t)\n\n\tdtx = PETSc_unsafe_wrap(r_dtx, dims; own=false)\n\n\treturn reason,dtx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\treason = KSPGetConvergedReason(ksp::AbstractKSP{PetscLib})\n\nGets the reason the `KSP` iteration was stopped.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n===\n- `reason` - negative value indicates diverged, positive value converged, see `KSPConvergedReason` for the possible values\n\nOptions Database Key:\n===\n- `-ksp_converged_reason` - prints the reason to standard out when the solve ends\n\nLevel: intermediate\n\nNote:\nIf this routine is called before or doing the `KSPSolve()` the value of `KSP_CONVERGED_ITERATING` is returned\n\n-seealso: [](ch_ksp), `KSPConvergedReason`, `KSP`, `KSPSetConvergenceTest()`, `KSPConvergedDefault()`, `KSPSetTolerances()`,\n`KSPConvergedReasonView()`, `KSPGetConvergedReasonString()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetConvergedReason\"))\n\"\"\"\nfunction KSPGetConvergedReason(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPGetConvergedReason(\n\t\tPetscLib,\n\t\tksp,\n\t\treason,\n\t)\n\n\treturn reason\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPGetConvergedReasonString(ksp::AbstractKSP{PetscLib},strreason::Vector{Char})\n\nReturn a human readable string for a `KSPConvergedReason`\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the `KSP` context\n\nOutput Parameter:\n===\n- `strreason` - a human readable string that describes ksp converged reason\n\nLevel: beginner\n\n-seealso: [](ch_ksp), `KSP`, `KSPGetConvergedReason()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetConvergedReasonString\"))\n\"\"\"\nfunction KSPGetConvergedReasonString(ksp::AbstractKSP{PetscLib},strreason::Vector{Char}) where {PetscLib}\n\t# TODO: you have vectors as input; make sure to test that the size of the vectors fits with something like: \n\t# @assert length() == n \n\t# You can likely also write a multiple dispatch version of this function where vector length is determined automatically \n\n\tLibPETSc.KSPGetConvergedReasonString(\n\t\tPetscLib,\n\t\tksp,\n\t\tstrreason,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tcr,rRsq,ce,eRsq = KSPComputeConvergenceRate(ksp::AbstractKSP{PetscLib})\n\nCompute the convergence rate for the iteration <https:/en.wikipedia.org/wiki/Coefficient_of_determination>\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - The `KSP`\n\nOutput Parameters:\n===\n- `cr`   - The residual contraction rate\n- `rRsq` - The coefficient of determination, R^2, indicating the linearity of the data\n- `ce`   - The error contraction rate\n- `eRsq` - The coefficient of determination, R^2, indicating the linearity of the data\n\nLevel: advanced\n\nNote:\nSuppose that the residual is reduced linearly, r_k = c^k r_0, which means log r_k = log r_0 + k log c. After linear regression,\nthe slope is log c. The coefficient of determination is given by 1 - frac{sum_i (y_i - f(x_i))^2}{sum_i (y_i - bar y)},\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedRateView()`\n\n# External Links\n$(_doc_external(\"DM/KSPComputeConvergenceRate\"))\n\"\"\"\nfunction KSPComputeConvergenceRate(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscReal = PetscLib.PetscReal\n\tcr = [PetscReal(1)]\n\tPetscReal = PetscLib.PetscReal\n\trRsq = [PetscReal(1)]\n\tPetscReal = PetscLib.PetscReal\n\tce = [PetscReal(1)]\n\tPetscReal = PetscLib.PetscReal\n\teRsq = [PetscReal(1)]\n\n\tLibPETSc.KSPComputeConvergenceRate(\n\t\tPetscLib,\n\t\tksp,\n\t\tcr,\n\t\trRsq,\n\t\tce,\n\t\teRsq,\n\t)\n\n\treturn cr[1],rRsq[1],ce[1],eRsq[1]\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetConvergedNegativeCurvature(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nAllows to declare convergence and return `KSP_CONVERGED_NEG_CURVE` when negative curvature is detected\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context\n- `flg` - the Boolean value\n\nOptions Database Key:\n===\n- `-ksp_converged_neg_curve <bool>` - Declare convergence if negative curvature is detected\n\nLevel: advanced\n\nNote:\nThis is currently used only by a subset of the Krylov solvers, namely `KSPCG`, `KSPSTCG`, `KSPQCG`, `KSPGLTR`, `KSPNASH`, and `KSPMINRES`.\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedReason`, `KSPGetConvergedNegativeCurvature()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetConvergedNegativeCurvature\"))\n\"\"\"\nfunction KSPSetConvergedNegativeCurvature(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetConvergedNegativeCurvature(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflg = KSPGetConvergedNegativeCurvature(ksp::AbstractKSP{PetscLib})\n\nGet the flag to declare convergence if negative curvature is detected\n\nCollective\n\nInput Parameter:\n===\n- `ksp` - iterative context\n\nOutput Parameter:\n===\n- `flg` - the Boolean value\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPConvergedReason`, `KSPSetConvergedNegativeCurvature()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetConvergedNegativeCurvature\"))\n\"\"\"\nfunction KSPGetConvergedNegativeCurvature(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tflg = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetConvergedNegativeCurvature(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn flg[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmat = KSPComputeOperator(ksp::AbstractKSP{PetscLib},mattype::MatType)\n\nComputes the explicit preconditioned operator, including diagonal scaling and null\nspace removal if applicable.\n\nCollective\n\nInput Parameters:\n===\n- `ksp`     - the Krylov subspace context\n- `mattype` - the matrix type to be used\n\nOutput Parameter:\n===\n- `mat` - the explicit preconditioned operator\n\nLevel: advanced\n\nNotes:\nThis computation is done by applying the operators to columns of the\nidentity matrix.\n\nCurrently, this routine uses a dense matrix format for the output operator if `mattype` is `NULL`.\nThis routine is costly in general, and is recommended for use only with relatively small systems.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOperators()`, `KSPComputeEigenvaluesExplicitly()`, `PCComputeOperator()`, `KSPSetDiagonalScale()`, `KSPSetNullSpace()`, `MatType`\n\n# External Links\n$(_doc_external(\"DM/KSPComputeOperator\"))\n\"\"\"\nfunction KSPComputeOperator(ksp::AbstractKSP{PetscLib},mattype::MatType) where {PetscLib}\n\n\tLibPETSc.KSPComputeOperator(\n\t\tPetscLib,\n\t\tksp,\n\t\tmattype,\n\t\tmat,\n\t)\n\n\treturn mat\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tmonctx = KSPMonitorLGRange(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat)\n\n\n# External Links\n$(_doc_external(\"DM/KSPMonitorLGRange\"))\n\"\"\"\nfunction KSPMonitorLGRange(ksp::AbstractKSP{PetscLib},n::Int,rnorm::AbstractFloat) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_monctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPMonitorLGRange(\n\t\tPetscLib,\n\t\tksp,\n\t\tn,\n\t\trnorm,\n\t\tr_monctx,\n\t)\n\n\tmonctx = PETSc_unsafe_wrap(r_monctx, dims; own=false)\n\n\treturn monctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetGuess(ksp::AbstractKSP{PetscLib},guess::KSPGuess)\n\nSet the initial guess object\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`   - the Krylov context\n- `guess` - the object created with `KSPGuessCreate()`\n\nLevel: advanced\n\nNotes:\nthis allows a single `KSP` to be used with several different initial guess generators (likely for different linear\nsolvers, see `KSPSetPC()`).\n\nThis increases the reference count of the guess object, you must destroy the object with `KSPGuessDestroy()`\nbefore the end of the program.\n\n-seealso: [](ch_ksp), `KSP`, `KSPGuess`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `KSPSetUseFischerGuess()`, `KSPGetGuess()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetGuess\"))\n\"\"\"\nfunction KSPSetGuess(ksp::AbstractKSP{PetscLib},guess::KSPGuess) where {PetscLib}\n\n\tLibPETSc.KSPSetGuess(\n\t\tPetscLib,\n\t\tksp,\n\t\tguess,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tguess = KSPGetGuess(ksp::AbstractKSP{PetscLib})\n\nGets the initial guess generator for the `KSP`.\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the Krylov context\n\nOutput Parameter:\n===\n- `guess` - the object\n\nLevel: developer\n\n-seealso: [](ch_ksp), `KSPGuess`, `KSP`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `KSPSetUseFischerGuess()`, `KSPSetGuess()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetGuess\"))\n\"\"\"\nfunction KSPGetGuess(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPGetGuess(\n\t\tPetscLib,\n\t\tksp,\n\t\tguess,\n\t)\n\n\treturn guess\nend\n \n\n\"\"\"\n\t UNTESTED !!!\n\t KSPSetUseFischerGuess(ksp::AbstractKSP{PetscLib},model::Int,size::Int)\n\nUse the Paul Fischer algorithm or its variants to compute initial guesses for a set of solves with related right\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`   - the Krylov context\n- `model` - use model 1, model 2, model 3, or any other number to turn it off\n- `size`  - size of subspace used to generate initial guess\n\nOptions Database Key:\n===\n- `-ksp_fischer_guess <model,size>` - uses the Fischer initial guess generator for repeated linear solves\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOptionsPrefix()`, `KSPAppendOptionsPrefix()`, `KSPSetGuess()`, `KSPGetGuess()`, `KSPGuess`\n\n# External Links\n$(_doc_external(\"DM/KSPSetUseFischerGuess\"))\n\"\"\"\nfunction KSPSetUseFischerGuess(ksp::AbstractKSP{PetscLib},model::Int,size::Int) where {PetscLib}\n\n\tLibPETSc.KSPSetUseFischerGuess(\n\t\tPetscLib,\n\t\tksp,\n\t\tmodel,\n\t\tsize,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetInitialGuessKnoll(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nTells the iterative solver to use `PCApply()` to compute the initial guess (The Knoll trick)\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `flg` - `PETSC_TRUE` or `PETSC_FALSE`\n\nLevel: advanced\n\nDeveloper Note:\nThe Knoll trick is not currently implemented using the `KSPGuess` class\n\n-seealso: [](ch_ksp), `KSPGetInitialGuessKnoll()`, `KSPSetInitialGuessNonzero()`, `KSPGetInitialGuessNonzero()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetInitialGuessKnoll\"))\n\"\"\"\nfunction KSPSetInitialGuessKnoll(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetInitialGuessKnoll(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tflag = KSPGetInitialGuessKnoll(ksp::AbstractKSP{PetscLib})\n\nDetermines whether the `KSP` solver is using the Knoll trick (using PCApply(pc,b,...) to compute\nthe initial guess\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n\nOutput Parameter:\n===\n- `flag` - `PETSC_TRUE` if using Knoll trick, else `PETSC_FALSE`\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `KSPSetInitialGuessKnoll()`, `KSPSetInitialGuessNonzero()`, `KSPGetInitialGuessNonzero()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPGetInitialGuessKnoll\"))\n\"\"\"\nfunction KSPGetInitialGuessKnoll(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tflag = Ref{PetscBool}()\n\n\tLibPETSc.KSPGetInitialGuessKnoll(\n\t\tPetscLib,\n\t\tksp,\n\t\tflag,\n\t)\n\n\treturn flag[] == PETSC_TRUE\nend\n \n \n\"\"\"\n\t KSPSetDM(ksp::AbstractKSP{PetscLib},dm::AbstractDM{PetscLib})\n\nSets the `DM` that may be used by some preconditioners and that may be used to construct the linear system\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - the `KSP`\n- `dm`  - the `DM`, cannot be `NULL` to remove a previously set `DM`\n\nLevel: intermediate\n\nNotes:\nIf this is used then the `KSP` will attempt to use the `DM` to create the matrix and use the routine set with\n`DMKSPSetComputeOperators()`. Use `KSPSetDMActive`(ksp,`PETSC_FALSE`) to instead use the matrix you've provided with\n`KSPSetOperators()`.\n\nA `DM` can only be used for solving one problem at a time because information about the problem is stored on the `DM`,\neven when not using interfaces like `DMKSPSetComputeOperators()`.  Use `DMClone()` to get a distinct `DM` when solving\ndifferent problems using the same function space.\n\n-seealso: [](ch_ksp), `KSP`, `DM`, `KSPGetDM()`, `KSPSetDMActive()`, `KSPSetComputeOperators()`, `KSPSetComputeRHS()`, `KSPSetComputeInitialGuess()`, `DMKSPSetComputeOperators()`, `DMKSPSetComputeRHS()`, `DMKSPSetComputeInitialGuess()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetDM\"))\n\"\"\"\nfunction KSPSetDM(ksp::AbstractKSP{PetscLib},dm::AbstractDM{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPSetDM(\n\t\tPetscLib,\n\t\tksp,\n\t\tdm,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetDMActive(ksp::AbstractKSP{PetscLib},flg::PetscBool)\n\nIndicates the `DM` should be used to generate the linear system matrix and right\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - the `KSP`\n- `flg` - use the `DM`\n\nLevel: intermediate\n\nNote:\nBy default `KSPSetDM()` sets the `DM` as active, call `KSPSetDMActive`(ksp,`PETSC_FALSE`); after `KSPSetDM`(ksp,dm) to not have the `KSP` object use the `DM` to generate the matrices.\n\n-seealso: [](ch_ksp), `KSP`, `DM`, `KSPGetDM()`, `KSPSetDM()`, `SNESSetDM()`, `KSPSetComputeOperators()`, `KSPSetComputeRHS()`, `KSPSetComputeInitialGuess()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetDMActive\"))\n\"\"\"\nfunction KSPSetDMActive(ksp::AbstractKSP{PetscLib},flg::PetscBool) where {PetscLib}\n\n\tLibPETSc.KSPSetDMActive(\n\t\tPetscLib,\n\t\tksp,\n\t\tflg,\n\t)\n\n\treturn nothing\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tdm = KSPGetDM(ksp::AbstractKSP{PetscLib})\n\nGets the `DM` that may be used by some preconditioners and that may be used to construct the linear system\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - the `KSP`\n\nOutput Parameter:\n===\n- `dm` - the `DM`\n\nLevel: intermediate\n\n-seealso: [](ch_ksp), `KSP`, `DM`, `KSPSetDM()`, `KSPSetDMActive()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetDM\"))\n\"\"\"\nfunction KSPGetDM(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tpetsclib = getlib(PetscLib)\n\topts = Options(petsclib)\n\tdm = DM{PetscLib}(C_NULL, opts, petsclib.age)\n\n\tLibPETSc.KSPGetDM(\n\t\tPetscLib,\n\t\tksp,\n\t\tdm,\n\t)\n\n\treturn dm\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctx = KSPSetApplicationContext(ksp::AbstractKSP{PetscLib})\n\nSets the optional user\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp` - the `KSP` context\n- `ctx` - optional user context\n\nLevel: intermediate\n\nNotes:\nThe user context is a way for users to attach any information to the `KSP` that they may need later when interacting with the `KSP`\n\nUse `KSPGetApplicationContext()` to get access to the context at a later time.\n\nFortran Note:\nTo use this from Fortran you must write a Fortran interface definition for this\nfunction that tells Fortran the Fortran derived data type that you are passing in as the ctx argument.\n\n-seealso: [](ch_ksp), `KSP`, `KSPGetApplicationContext()`\n\n# External Links\n$(_doc_external(\"DM/KSPSetApplicationContext\"))\n\"\"\"\nfunction KSPSetApplicationContext(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPSetApplicationContext(\n\t\tPetscLib,\n\t\tksp,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tctx = KSPGetApplicationContext(ksp::AbstractKSP{PetscLib})\n\nGets the user\n\nNot Collective\n\nInput Parameter:\n===\n- `ksp` - `KSP` context\n\nOutput Parameter:\n===\n- `ctx` - user context\n\nLevel: intermediate\n\nFortran Note:\nYou may need to write a Fortran interface definition for this\nfunction that tells Fortran the Fortran derived data type that you are passing in as the ctx argument.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetApplicationContext()`\n\n# External Links\n$(_doc_external(\"DM/KSPGetApplicationContext\"))\n\"\"\"\nfunction KSPGetApplicationContext(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPGetApplicationContext(\n\t\tPetscLib,\n\t\tksp,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = KSPSetComputeRHS(ksp::AbstractKSP{PetscLib})\n\nset routine to compute the right\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`  - the `KSP` context\n- `func` - function to compute the right-hand side, see `KSPComputeRHSFn` for the calling sequence\n- `ctx`  - optional context\n\nLevel: beginner\n\nNote:\nThe routine you provide will be called EACH you call `KSPSolve()` to prepare the new right-hand side for that solve\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `DMKSPSetComputeRHS()`, `KSPSetComputeOperators()`, `KSPSetOperators()`, `KSPComputeRHSFn`\n\n# External Links\n$(_doc_external(\"DM/KSPSetComputeRHS\"))\n\"\"\"\nfunction KSPSetComputeRHS(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPSetComputeRHS(\n\t\tPetscLib,\n\t\tksp,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = KSPSetComputeOperators(ksp::AbstractKSP{PetscLib})\n\nset routine to compute the linear operators\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`  - the `KSP` context\n- `func` - function to compute the operators, see `KSPComputeOperatorsFn` for the calling sequence\n- `ctx`  - optional context\n\nLevel: beginner\n\nNotes:\n`func()` will be called automatically at the very next call to `KSPSolve()`. It will NOT be called at future `KSPSolve()` calls\nunless either `KSPSetComputeOperators()` or `KSPSetOperators()` is called before that `KSPSolve()` is called. This allows the same system to be solved several times\nwith different right-hand side functions but is a confusing API since one might expect it to be called for each `KSPSolve()`\n\nTo reuse the same preconditioner for the next `KSPSolve()` and not compute a new one based on the most recently computed matrix call `KSPSetReusePreconditioner()`\n\nDeveloper Note:\nPerhaps this routine and `KSPSetComputeRHS()` could be combined into a new API that makes clear when new matrices are computing without requiring call this\nroutine to indicate when the new matrix should be computed.\n\n-seealso: [](ch_ksp), `KSP`, `KSPSetOperators()`, `KSPSetComputeRHS()`, `DMKSPSetComputeOperators()`, `KSPSetComputeInitialGuess()`, `KSPComputeOperatorsFn`\n\n# External Links\n$(_doc_external(\"DM/KSPSetComputeOperators\"))\n\"\"\"\nfunction KSPSetComputeOperators(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPSetComputeOperators(\n\t\tPetscLib,\n\t\tksp,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = KSPSetComputeInitialGuess(ksp::AbstractKSP{PetscLib})\n\nset routine to compute the initial guess of the linear system\n\nLogically Collective\n\nInput Parameters:\n===\n- `ksp`  - the `KSP` context\n- `func` - function to compute the initial guess, see `KSPComputeInitialGuessFn` for calling sequence\n- `ctx`  - optional context\n\nLevel: beginner\n\nNote:\nThis should only be used in conjunction with `KSPSetComputeRHS()` and `KSPSetComputeOperators()`, otherwise\ncall `KSPSetInitialGuessNonzero()` and set the initial guess values in the solution vector passed to `KSPSolve()` before calling the solver\n\n-seealso: [](ch_ksp), `KSP`, `KSPSolve()`, `KSPSetComputeRHS()`, `KSPSetComputeOperators()`, `DMKSPSetComputeInitialGuess()`, `KSPSetInitialGuessNonzero()`,\n`KSPComputeInitialGuessFn`\n\n# External Links\n$(_doc_external(\"DM/KSPSetComputeInitialGuess\"))\n\"\"\"\nfunction KSPSetComputeInitialGuess(ksp::AbstractKSP{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.KSPSetComputeInitialGuess(\n\t\tPetscLib,\n\t\tksp,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = DMKSPSetComputeOperators(dm::AbstractDM{PetscLib})\n\nset `KSP` matrix evaluation function\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - `DM` to be used with `KSP`\n- `func` - matrix evaluation function,  for calling sequence see `KSPComputeOperatorsFn`\n- `ctx`  - context for matrix evaluation\n\nLevel: developer\n\nNote:\n`KSPSetComputeOperators()` is normally used, but it calls this function internally because the user context is actually\nassociated with the `DM`.  This makes the interface consistent regardless of whether the user interacts with a `DM` or\nnot.\n\nDeveloper Note:\nIf `DM` took a more central role at some later date, this could become the primary method of setting the matrix.\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `DMKSPGetComputeOperators()`, `KSPSetOperators()`, `KSPComputeOperatorsFn`\n\n# External Links\n$(_doc_external(\"DM/DMKSPSetComputeOperators\"))\n\"\"\"\nfunction DMKSPSetComputeOperators(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMKSPSetComputeOperators(\n\t\tPetscLib,\n\t\tdm,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = DMKSPGetComputeOperators(dm::AbstractDM{PetscLib})\n\nget `KSP` matrix evaluation function\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - `DM` used with a `KSP`\n\nOutput Parameters:\n===\n- `func` - matrix evaluation function,  for calling sequence see `KSPComputeOperatorsFn`\n- `ctx`  - context for matrix evaluation\n\nLevel: developer\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `KSPSetComputeOperators()`, `DMKSPSetComputeOperators()`, `KSPComputeOperatorsFn`\n\n# External Links\n$(_doc_external(\"DM/DMKSPGetComputeOperators\"))\n\"\"\"\nfunction DMKSPGetComputeOperators(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMKSPGetComputeOperators(\n\t\tPetscLib,\n\t\tdm,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = DMKSPSetComputeRHS(dm::AbstractDM{PetscLib})\n\nset `KSP` right\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - `DM` used with a `KSP`\n- `func` - right-hand side evaluation function,  for calling sequence see `KSPComputeRHSFn`\n- `ctx`  - context for right-hand side evaluation\n\nLevel: developer\n\nNote:\n`KSPSetComputeRHS()` is normally used, but it calls this function internally because the user context is actually\nassociated with the `DM`.  This makes the interface consistent regardless of whether the user interacts with a `DM` or\nnot.\n\nDeveloper Note:\nIf `DM` took a more central role at some later date, this could become the primary method of setting the matrix.\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `DMKSPGetComputeRHS()`, `KSPSetRHS()`\n\n# External Links\n$(_doc_external(\"DM/DMKSPSetComputeRHS\"))\n\"\"\"\nfunction DMKSPSetComputeRHS(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMKSPSetComputeRHS(\n\t\tPetscLib,\n\t\tdm,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = DMKSPGetComputeRHS(dm::AbstractDM{PetscLib})\n\nget `KSP` right\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - `DM` to be used with `KSP`\n\nOutput Parameters:\n===\n- `func` - right-hand side evaluation function,  for calling sequence see `KSPComputeRHSFn`\n- `ctx`  - context for right-hand side evaluation\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `KSPSetComputeRHS()`, `DMKSPSetComputeRHS()`, `KSPComputeRHSFn`\n\n# External Links\n$(_doc_external(\"DM/DMKSPGetComputeRHS\"))\n\"\"\"\nfunction DMKSPGetComputeRHS(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMKSPGetComputeRHS(\n\t\tPetscLib,\n\t\tdm,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = DMKSPSetComputeInitialGuess(dm::AbstractDM{PetscLib})\n\nset `KSP` initial guess evaluation function\n\nNot Collective\n\nInput Parameters:\n===\n- `dm`   - `DM` to be used with `KSP`\n- `func` - initial guess evaluation function, for calling sequence see `KSPComputeInitialGuessFn`\n- `ctx`  - context for initial guess evaluation\n\nLevel: developer\n\nNote:\n`KSPSetComputeInitialGuess()` is normally used, but it calls this function internally because the user context is actually\nassociated with the `DM`.\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `DMKSPGetComputeRHS()`, `KSPSetRHS()`, `KSPComputeInitialGuessFn`\n\n# External Links\n$(_doc_external(\"DM/DMKSPSetComputeInitialGuess\"))\n\"\"\"\nfunction DMKSPSetComputeInitialGuess(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMKSPSetComputeInitialGuess(\n\t\tPetscLib,\n\t\tdm,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\tfunc,ctx = DMKSPGetComputeInitialGuess(dm::AbstractDM{PetscLib})\n\nget `KSP` initial guess evaluation function\n\nNot Collective\n\nInput Parameter:\n===\n- `dm` - `DM` used with a `KSP`\n\nOutput Parameters:\n===\n- `func` - initial guess evaluation function, for calling sequence see `KSPComputeInitialGuessFn`\n- `ctx`  - context for right-hand side evaluation\n\nLevel: advanced\n\n-seealso: [](ch_ksp), `DMKSP`, `DM`, `KSP`, `DMKSPSetContext()`, `KSPSetComputeRHS()`, `DMKSPSetComputeRHS()`, `KSPComputeInitialGuessFn`\n\n# External Links\n$(_doc_external(\"DM/DMKSPGetComputeInitialGuess\"))\n\"\"\"\nfunction DMKSPGetComputeInitialGuess(dm::AbstractDM{PetscLib}) where {PetscLib}\n\tPetscScalar = PetscLib.PetscScalar\n\t#TODO: your output is a vector; ensure that the size is correct!\n\t#It may involve: dims = DMStagGetGhostCorners(dm)[4:6]\n\t#dims = DMStagGetGhostCorners(dm)[4:6]    # dimensions including ghost values; set to 0 if not 2D/3D\n\t#dims = getindex(dims,findall(dims.>0))   # retrieve non-zero values\n\t#dmE  = DMStagGetEntriesPerElement(dm)    # dof per element\n\tdims = (X,)\n\tr_ctx = PETSc_RefPtr(dims, PetscScalar)\n\n\tLibPETSc.DMKSPGetComputeInitialGuess(\n\t\tPetscLib,\n\t\tdm,\n\t\tfunc,\n\t\tr_ctx,\n\t)\n\n\tctx = PETSc_unsafe_wrap(r_ctx, dims; own=false)\n\n\treturn func,ctx\nend\n \n \n\"\"\"\n\t UNTESTED !!!\n\t KSPSetPC(ksp::AbstractKSP{PetscLib},pc::AbstractPC{PetscLib})\n\nSets the preconditioner to be used to calculate the\napplication of the preconditioner on a vector.\n\nCollective\n\nInput Parameters:\n===\n- `ksp` - iterative context obtained from `KSPCreate()`\n- `pc`  - the preconditioner object (can be `NULL`)\n\nLevel: developer\n\nNote:\nUse `KSPGetPC()` to retrieve the preconditioner context.\n\n-seealso: [](ch_ksp), `KSPGetPC()`, `KSP`\n\n# External Links\n$(_doc_external(\"DM/KSPSetPC\"))\n\"\"\"\nfunction KSPSetPC(ksp::AbstractKSP{PetscLib},pc::AbstractPC{PetscLib}) where {PetscLib}\n\n\tLibPETSc.KSPSetPC(\n\t\tPetscLib,\n\t\tksp,\n\t\tpc,\n\t)\n\n\treturn nothing\nend\n \n \n"
  },
  {
    "path": "src/deprecated/lib.jl",
    "content": "using Libdl\n\"\"\"\n    PetscLibType{PetscScalar, PetscInt}(petsc_library)\n\nA container for specific PETSc libraries.\n\nAll other containers for PETSc objects should be typed on this to ensure that\ndispatch is correct.\n\"\"\"\nstruct PetscLibType{PetscScalar, PetscInt, LibType}\n    petsc_library::LibType\nend\nfunction PetscLibType{ST, IT}(petsc_library) where {ST, IT}\n    LT = typeof(petsc_library)\n    return PetscLibType{ST, IT, LT}(petsc_library)\nend\n\n\"\"\"\n    scalartype(petsclib::PetscLibType)\n\nreturn the scalar type for the associated `petsclib`\n\"\"\"\nscalartype(::PetscLibType{ST}) where {ST} = ST\nscalartype(::Type{PetscLib}) where {PetscLib <: PetscLibType{ST}} where {ST} =\n    ST\n\n\"\"\"\n    realtype(petsclib::PetscLibType)\n\nreturn the real type for the associated `petsclib`\n\"\"\"\nrealtype(::PetscLibType{ST}) where {ST} = real(ST)\nrealtype(::Type{PetscLib}) where {PetscLib <: PetscLibType{ST}} where {ST} =\n    real(ST)\n\n\"\"\"\n    inttype(petsclib::PetscLibType)\n\nreturn the int type for the associated `petsclib`\n\"\"\"\ninttype(::PetscLibType{ST, IT}) where {ST, IT} = IT\ninttype(\n    ::Type{PetscLib},\n) where {PetscLib <: PetscLibType{ST, IT}} where {ST, IT} = IT\n\nfunction initialize(libhdl::Ptr{Cvoid})\n    PetscInitializeNoArguments_ptr = dlsym(libhdl, :PetscInitializeNoArguments)\n    @chk ccall(PetscInitializeNoArguments_ptr, PetscErrorCode, ())\nend\n\nconst petsclibs = map(libs) do lib\n    libhdl = dlopen(lib...)\n\n    # initialize petsc\n    PetscInitializeNoArguments_ptr =\n        dlsym(libhdl, :PetscInitializeNoArguments)\n    @chk ccall(PetscInitializeNoArguments_ptr, PetscErrorCode, ())\n\n    PETSC_REAL = DataTypeFromString(libhdl, \"Real\")\n    PETSC_SCALAR = DataTypeFromString(libhdl, \"Scalar\")\n    PETSC_INT_SIZE = PetscDataTypeGetSize(libhdl, PETSC_INT)\n\n    PetscReal =\n        PETSC_REAL == PETSC_DOUBLE ? Cdouble :\n        PETSC_REAL == PETSC_FLOAT ? Cfloat :\n        error(\"PETSC_REAL = $PETSC_REAL not supported.\")\n\n    PetscScalar =\n        PETSC_SCALAR == PETSC_REAL ? PetscReal :\n        PETSC_SCALAR == PETSC_COMPLEX ? Complex{PetscReal} :\n        error(\"PETSC_SCALAR = $PETSC_SCALAR not supported.\")\n\n    PetscInt =\n        PETSC_INT_SIZE == 4 ? Int32 :\n        PETSC_INT_SIZE == 8 ? Int64 :\n        error(\"PETSC_INT_SIZE = $PETSC_INT_SIZE not supported.\")\n\n    PetscFinalize_ptr = dlsym(libhdl, :PetscFinalize)\n    @chk ccall(PetscFinalize_ptr, PetscErrorCode, ())\n\n    # TODO: PetscBLASInt, PetscMPIInt ?\n    return PetscLibType{PetscScalar, PetscInt}(lib[1])\nend\n\n# New macro is really to track the update\nmacro for_petsc(expr)\n    quote\n        for petsclib in petsclibs\n            # String for the library\n            petsc_library = petsclib.petsc_library\n\n            # types we dispatch on\n            PetscLib = typeof(petsclib)\n            UnionPetscLib = Union{PetscLib, Type{PetscLib}}\n\n            PetscScalar = scalartype(petsclib)\n            PetscReal = realtype(petsclib)\n            PetscInt = inttype(petsclib)\n\n            @eval esc($expr)\n        end\n    end\nend\n\n# TODO: Remove this macro once we have switch over to @for_petsc macro\nmacro for_libpetsc(expr)\n    quote\n        for petsclib in petsclibs\n            # String for the library\n            libpetsc = petsclib.petsc_library\n\n            # types we dispatch on\n            PetscLib = typeof(petsclib)\n            UnionPetscLib = Union{PetscLib, Type{PetscLib}}\n\n            PetscScalar = scalartype(petsclib)\n            PetscReal = realtype(petsclib)\n            PetscInt = inttype(petsclib)\n\n            @eval esc($expr)\n        end\n    end\nend\n\n# TODO: These should be removed!\nconst scalar_types = map(x -> scalartype(x), petsclibs)\n@assert length(scalar_types) == length(unique(scalar_types))\n@for_libpetsc inttype(::Type{$PetscScalar}) = $PetscInt\n"
  },
  {
    "path": "src/deprecated/mat.jl",
    "content": "const CMat = Ptr{Cvoid}\n\nabstract type AbstractMat{PetscLib, PetscScalar} <: AbstractMatrix{PetscScalar} end\n\nBase.eltype(\n    ::Type{V},\n) where {\n    V <: AbstractMat{PetscLib, PetscScalar},\n} where {PetscLib, PetscScalar} = PetscScalar\nBase.eltype(\n    v::AbstractPetscMat{PetscLib, PetscScalar},\n) where {PetscLib} = PetscScalar\n\nfunction destroy(M::AbstractPetscMat{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) && M.ptr != C_NULL\n        LibPETSc.MatDestroy(PetscLib, M)\n    end\n    M.ptr = C_NULL\n    return nothing\nend\n\n\"\"\"\n    MatPtr(petsclib, mat::CMat)\n\nContainer type for a PETSc Mat that is just a raw pointer.\n\"\"\"\nmutable struct MatPtr{PetscLib, PetscScalar} <:\n               AbstractMat{PetscLib, PetscScalar}\n    ptr::CMat\n    age::Int\nend\n\n\"\"\"\n    MatSeqAIJ(petsclib, num_rows, num_cols, nonzeros)\n\nCreate a PETSc serial sparse array using AIJ format (also known as a compressed\nsparse row or CSR format) of size `num_rows X num_cols` with `nonzeros` per row\n\nIf `nonzeros` is an `Integer` the same number of non-zeros will be used for each\nrow, if `nonzeros` is a `Vector{PetscInt}` then one value must be specified for\neach row.\n\nMemory allocation is handled by PETSc and garbage collection can be used.\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJ\"))\n\"\"\"\nmutable struct MatSeqAIJ{PetscLib, PetscScalar} <:\n               AbstractMat{PetscLib, PetscScalar}\n    ptr::CMat\n    age::Int\nend\n\nfunction MatSeqAIJ(\n    petsclib::PetscLib,\n    num_rows::Integer,\n    num_cols::Integer,\n    nonzeros::Union{Integer, Vector},\n) where {PetscLib <: PetscLibType}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    PetscScalar = petsclib.PetscScalar\n    mat = MatSeqAIJ{PetscLib, PetscScalar}(C_NULL, petsclib.age)\n    if nonzeros isa Integer\n        LibPETSc.MatCreateSeqAIJ(\n            petsclib,\n            comm,\n            num_rows,\n            num_cols,\n            nonzeros,\n            C_NULL,\n            mat,\n        )\n    else\n        @assert eltype(nonzeros) == petsclib.PetscInt\n        @assert length(nonzeros) >= num_rows\n        LibPETSc.MatCreateSeqAIJ(\n            petsclib,\n            comm,\n            num_rows,\n            num_cols,\n            0,\n            nonzeros,\n            mat,\n        )\n    end\n\n    finalizer(destroy, mat)\n\n    return mat\nend\n\n\"\"\"\n    MatSeqDense{PetscLib, PetscScalar}\n\nPETSc dense array. This wraps a Julia `Matrix{PetscScalar}` object.\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqDense\"))\n\"\"\"\nmutable struct MatSeqDense{PetscLib, PetscScalar} <:\n               AbstractMat{PetscLib, PetscScalar}\n    ptr::CMat\n    array::Matrix{PetscScalar}\n    age::Int\nend\n\nfunction MatSeqDense(\n    petsclib::PetscLib,\n    A::Matrix{PetscScalar},\n) where {PetscLib <: PetscLibType, PetscScalar}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    @assert PetscScalar == petsclib.PetscScalar\n    mat = MatSeqDense{PetscLib, PetscScalar}(C_NULL, A, petsclib.age)\n    LibPETSc.MatCreateSeqDense(petsclib, comm, size(A, 1), size(A, 2), A, mat)\n    finalizer(destroy, mat)\n    return mat\nend\n\n\"\"\"\n    MatAIJ(\n        petsclib::PetscLib,\n        comm::MPI.Comm,\n        loc_num_rows::Integer,\n        loc_num_cols::Integer,\n        diag_nonzeros::Union{Integer, Vector},\n        off_diag_nonzeros::Union{Integer, Vector};\n        glo_num_rows = PETSC_DETERMINE,\n        glo_num_cols = PETSC_DETERMINE,\n        setup = true\n    ) where {PetscLib <: PetscLibType}\n\nCreate an MPI PETSc sparse array on the `comm` using AIJ format (also known as a\ncompressed sparse row or CSR format) of size `glo_num_rows X glo_num_cols` with\nlocal size `loc_num_rows X loc_num_cols`.\n\nThe diagonal block and off-diagonal block non-zeros are `diag_nonzeros` and\n`off_diag_nonzeros` which can be either an integer (same for all rows) or a\nVector of `PetscInt`s with on entry per row.\n\nMemory allocation is handled by PETSc and garbage collection can be used.\n\nIf `glo_num_rows isa Integer` or `glo_num_cols isa Integer` then the\ncorresponding local variable can be `PETSC_DECIDE`.\n\nIf `setup == true` then [`setup!`](@ref) is called\n\n# External Links\n$(_doc_external(\"Mat/MatCreateAIJ\"))\n$(_doc_external(\"Mat/MatSetUp\"))\n\n!!! note\n\n    The user is responsible for calling `destroy(mat)` on the `MatAIJ` since\n    this cannot be handled by the garbage collector do to the MPI nature of the\n    object.\n\"\"\"\nmutable struct MatAIJ{PetscLib, PetscScalar} <:\n               AbstractMat{PetscLib, PetscScalar}\n    ptr::CMat\n    age::Int\nend\n\nfunction MatAIJ(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    loc_num_rows::Integer,\n    loc_num_cols::Integer,\n    diag_nonzeros::Union{Integer, Vector},\n    off_diag_nonzeros::Union{Integer, Vector};\n    glo_num_rows = PETSC_DETERMINE,\n    glo_num_cols = PETSC_DETERMINE,\n    setup = true,\n) where {PetscLib <: PetscLibType}\n    @assert initialized(petsclib)\n    PetscScalar = petsclib.PetscScalar\n    mat = MatAIJ{PetscLib, PetscScalar}(C_NULL, petsclib.age)\n    if diag_nonzeros isa Integer\n        diag_nonzero = diag_nonzeros\n        diag_nonzeros = C_NULL\n    else\n        diag_nonzero = -1\n    end\n    if off_diag_nonzeros isa Integer\n        off_diag_nonzero = off_diag_nonzeros\n        off_diag_nonzeros = C_NULL\n    else\n        off_diag_nonzero = -1\n    end\n\n    LibPETSc.MatCreateAIJ(\n        petsclib,\n        comm,\n        loc_num_rows,\n        loc_num_cols,\n        glo_num_rows,\n        glo_num_cols,\n        diag_nonzero,\n        diag_nonzeros,\n        off_diag_nonzero,\n        off_diag_nonzeros,\n        mat,\n    )\n\n    setup && setup!(mat)\n\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, mat)\n    end\n\n    return mat\nend\n\n\"\"\"\n    setup!(mat::AbstractMat)\n\nSet up the interal data for `mat`\n\n# External Links\n$(_doc_external(\"Mat/MatSetUp\"))\n\"\"\"\nfunction setup!(mat::AbstractMat{PetscLib}) where {PetscLib}\n    @assert initialized(PetscLib)\n    LibPETSc.MatSetUp(PetscLib, mat)\n    return mat\nend\n\n\"\"\"\n    assemble!(M::AbstractMat[, t::MatAssemblyType = MAT_FINAL_ASSEMBLY)\n\nAssemble the matrix `M` with assembly type `t`.\n\nFor overlapping assembly see [`assemblybegin!`](@ref) and  [`assemblyend!`](@ref)\n\n# External Links\n$(_doc_external(\"Mat/MatAssemblyBegin\"))\n$(_doc_external(\"Mat/MatAssemblyEnd\"))\n\"\"\"\nfunction assemble!(M::AbstractMat, t::MatAssemblyType = MAT_FINAL_ASSEMBLY)\n    assemblybegin!(M, t)\n    assemblyend!(M, t)\n    return M\nend\n\n\"\"\"\n    assemblybegin!(M::AbstractMat[, t::MatAssemblyType = MAT_FINAL_ASSEMBLY)\n\nBegin assembly of the matrix `M` with assembly type `t`; finished with\n[`assemblyend!`](@ref).\n\n# External Links\n$(_doc_external(\"Mat/MatAssemblyBegin\"))\n\"\"\"\nfunction assemblybegin!(\n    M::AbstractMat{PetscLib},\n    t::MatAssemblyType = MAT_FINAL_ASSEMBLY,\n) where {PetscLib}\n    LibPETSc.MatAssemblyBegin(PetscLib, M, t)\n    return M\nend\n\n\"\"\"\n    assemblyend!(M::AbstractMat[, t::MatAssemblyType = MAT_FINAL_ASSEMBLY)\n\nFinish assembly of the matrix `M` with assembly type `t`; start assembly with\n[`assemblybegin!`](@ref).\n\n# External Links\n$(_doc_external(\"Mat/MatAssemblyEnd\"))\n\"\"\"\nfunction assemblyend!(\n    M::AbstractMat{PetscLib},\n    t::MatAssemblyType = MAT_FINAL_ASSEMBLY,\n) where {PetscLib}\n    LibPETSc.MatAssemblyEnd(PetscLib, M, t)\n    return M\nend\n\n\"\"\"\n    ownershiprange(mat::AbstractMat, [base_one = true])\n\nThe range of row indices owned by this processor, assuming that the `mat` is\nlaid out with the first `n1` rows on the first processor, next `n2` rows on the\nsecond, etc. For certain parallel layouts this range may not be well defined.\n\nIf the optional argument `base_one == true` then base-1 indexing is used,\notherwise base-0 index is used.\n\n!!! note\n\n    unlike the C function, the range returned is inclusive (`idx_first:idx_last`)\n\n# External Links\n$(_doc_external(\"Mat/MatGetOwnershipRange\"))\n\"\"\"\nfunction ownershiprange(\n    mat::AbstractMat{PetscLib},\n    base_one::Bool = true,\n) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    r_lo = Ref{PetscInt}()\n    r_hi = Ref{PetscInt}()\n    LibPETSc.MatGetOwnershipRange(PetscLib, mat, r_lo, r_hi)\n    return base_one ? ((r_lo[] + PetscInt(1)):(r_hi[])) :\n           ((r_lo[]):(r_hi[] - PetscInt(1)))\nend\n\nfunction Base.size(A::AbstractMat{PetscLib}) where {PetscLib}\n    m = Ref{PetscLib.PetscInt}()\n    n = Ref{PetscLib.PetscInt}()\n    LibPETSc.MatGetSize(PetscLib, A, m, n)\n    return (m[], n[])\nend\n\nfunction Base.:(==)(\n    A::AbstractMat{PetscLib},\n    B::AbstractMat{PetscLib},\n) where {PetscLib}\n    fr = Ref{PetscBool}()\n    LibPETSc.MatEqual(PetscLib, A, B, fr)\n    return fr[] == PETSC_TRUE\nend\n\nfunction view(\n    mat::AbstractMat{PetscLib},\n    viewer = LibPETSc.PETSC_VIEWER_STDOUT_(PetscLib, getcomm(mat)),\n) where {PetscLib}\n    LibPETSc.MatView(PetscLib, mat, viewer)\n    return nothing\nend\nBase.show(io::IO, mat::AbstractMat) = _show(io, mat)\nBase.show(io::IO, ::MIME\"text/plain\", mat::AbstractMat) = _show(io, mat)\n\n\"\"\"\n    setvalues!(\n        M::AbstractMat{PetscLib},\n        row0idxs::Vector{PetscInt},\n        col0idxs::Vector{PetscInt},\n        rowvals::Array{PetscScalar},\n        insertmode::InsertMode = INSERT_VALUES;\n        num_rows = length(row0idxs),\n        num_cols = length(col0idxs)\n    )\n\nSet values of the matrix `M` with base-0  row and column indices `row0idxs` and\n`col0idxs` inserting the values `rowvals`.\n\nIf the keyword arguments `num_rows` or `num_cols` is specified then only the\nfirst `num_rows * num_cols` values of `rowvals` will be used.\n\n# External Links\n$(_doc_external(\"Mat/MatSetValues\"))\n\"\"\"\nfunction setvalues!(\n    M::AbstractMat{PetscLib},\n    row0idxs::Vector{PetscInt},\n    col0idxs::Vector{PetscInt},\n    rowvals::Array{PetscScalar},\n    insertmode::InsertMode = INSERT_VALUES;\n    num_rows = length(row0idxs),\n    num_cols = length(col0idxs),\n) where {PetscLib, PetscScalar, PetscInt}\n    @assert PetscScalar == PetscLib.PetscScalar\n    @assert PetscInt == PetscLib.PetscInt\n    @assert num_rows * num_cols <= length(rowvals)\n    LibPETSc.MatSetValues(\n        PetscLib,\n        M,\n        num_rows,\n        row0idxs,\n        num_cols,\n        col0idxs,\n        rowvals,\n        insertmode,\n    )\n    return nothing\nend\n\n\"\"\"\n    setvalues!(\n        M::AbstractMat{PetscLib},\n        row0idxs::Vector{MatStencil{PetscInt}},\n        col0idxs::Vector{MatStencil{PetscInt}},\n        rowvals::Array{PetscScalar},\n        insertmode::InsertMode = INSERT_VALUES;\n        num_rows = length(row0idxs),\n        num_cols = length(col0idxs)\n    )\n\nSet values of the matrix `M` with base-0  row and column indices `row0idxs` and\n`col0idxs` inserting the values `rowvals`.\n\nIf the keyword arguments `num_rows` or `num_cols` is specified then only the\nfirst `num_rows * num_cols` values of `rowvals` will be used.\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesStencil\"))\n\"\"\"\nfunction setvalues!(\n    M::AbstractMat{PetscLib},\n    row0idxs::Vector{MatStencil{PetscInt}},\n    col0idxs::Vector{MatStencil{PetscInt}},\n    rowvals::Array{PetscScalar},\n    insertmode::InsertMode = INSERT_VALUES;\n    num_rows = length(row0idxs),\n    num_cols = length(col0idxs),\n) where {PetscLib, PetscScalar, PetscInt}\n    @assert PetscScalar == PetscLib.PetscScalar\n    @assert PetscInt == PetscLib.PetscInt\n    @assert num_rows * num_cols <= length(rowvals)\n    LibPETSc.MatSetValuesStencil(\n        PetscLib,\n        M,\n        num_rows,\n        row0idxs,\n        num_cols,\n        col0idxs,\n        rowvals,\n        insertmode,\n    )\n    return nothing\nend\n\nfunction Base.setindex!(\n    M::AbstractMat{PetscLib},\n    val,\n    i::Integer,\n    j::Integer,\n) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n    setvalues!(\n        M,\n        [PetscInt(i - 1)],\n        [PetscInt(j - 1)],\n        [PetscScalar(val)],\n        INSERT_VALUES,\n    )\n    return val\nend\n\nfunction Base.setindex!(\n    M::AbstractMat{PetscLib},\n    val,\n    i::CartesianIndex{N},\n    j::CartesianIndex{N},\n) where {PetscLib, N}\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n    ms_i = MatStencil{PetscInt}(\n        N < 3 ? 0 : i[3] - 1,\n        N < 2 ? 0 : i[2] - 1,\n        i[1] - 1,\n        N < 4 ? 0 : i[4] - 1,\n    )\n    ms_j = MatStencil{PetscInt}(\n        N < 3 ? 0 : j[3] - 1,\n        N < 2 ? 0 : j[2] - 1,\n        j[1] - 1,\n        N < 4 ? 0 : j[4] - 1,\n    )\n    setvalues!(M, [ms_i], [ms_j], [PetscScalar(val)], INSERT_VALUES)\n    return val\nend\n\nfunction addindex!(\n    M::AbstractMat{PetscLib},\n    val,\n    i::CartesianIndex{N},\n    j::CartesianIndex{N},\n) where {PetscLib, N}\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n    ms_i = MatStencil{PetscInt}(\n        N < 3 ? 0 : i[3] - 1,\n        N < 2 ? 0 : i[2] - 1,\n        i[1] - 1,\n        N < 4 ? 0 : i[4] - 1,\n    )\n    ms_j = MatStencil{PetscInt}(\n        N < 3 ? 0 : j[3] - 1,\n        N < 2 ? 0 : j[2] - 1,\n        j[1] - 1,\n        N < 4 ? 0 : j[4] - 1,\n    )\n    setvalues!(M, [ms_i], [ms_j], [PetscScalar(val)], ADD_VALUES)\n    return val\nend\n\n\"\"\"\n    getvalues!(\n        rowvals::Array{PetscScalar};\n        M::AbstractMat{PetscLib},\n        row0idxs::Vector{PetscInt},\n        col0idxs::Vector{PetscInt},\n        num_rows = length(row0idxs),\n        num_cols = length(col0idxs)\n    )\n\nget values of the matrix `M` with base-0  row and column indices `row0idxs` and\n`col0idxs` inserting the values `rowvals`.\n\nIf the keyword arguments `num_rows` or `num_cols` is specified then only the\nfirst `num_rows * num_cols` values of `rowvals` will be used.\n\n# External Links\n$(_doc_external(\"Mat/MatGetValues\"))\n\"\"\"\nfunction getvalues!(\n    rowvals::Array{PetscScalar},\n    M::AbstractMat{PetscLib},\n    row0idxs::Vector{PetscInt},\n    col0idxs::Vector{PetscInt};\n    num_rows = length(row0idxs),\n    num_cols = length(col0idxs),\n) where {PetscLib, PetscScalar, PetscInt}\n    @assert PetscScalar == PetscLib.PetscScalar\n    @assert PetscInt == PetscLib.PetscInt\n    @assert num_rows * num_cols <= length(rowvals)\n    LibPETSc.MatGetValues(\n        PetscLib,\n        M,\n        num_rows,\n        row0idxs,\n        num_cols,\n        col0idxs,\n        rowvals,\n    )\n    return nothing\nend\n\nfunction Base.getindex(\n    M::AbstractMat{PetscLib},\n    i::Integer,\n    j::Integer,\n) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n    v_array = [zero(PetscScalar)]\n    getvalues!(v_array, M, [PetscInt(i - 1)], [PetscInt(j - 1)])\n    return @inbounds v_array[1]\nend\n\nfunction LinearAlgebra.norm(\n    M::AbstractMat{PetscLib},\n    normtype::NormType = NORM_FROBENIUS,\n) where {PetscLib}\n    PetscReal = PetscLib.PetscReal\n    r_val = Ref{PetscReal}()\n    LibPETSc.MatNorm(PetscLib, M, normtype, r_val)\n    return r_val[]\nend\n\nfunction LinearAlgebra.mul!(\n    y::AbstractVec{PetscLib, PetscScalar},\n    M::AbstractMat{PetscLib, PetscScalar},\n    x::AbstractVec{PetscLib, PetscScalar},\n) where {PetscLib, PetscScalar}\n    LibPETSc.MatMult(PetscLib, M, x, y)\n    return y\nend\n\nfunction LinearAlgebra.mul!(\n    y::AbstractVec{PetscLib, PetscScalar},\n    M::Adjoint{PetscScalar, AM},\n    x::AbstractVec{PetscLib, PetscScalar},\n) where {PetscLib, PetscScalar, AM <: AbstractMat{PetscLib, PetscScalar}}\n    LibPETSc.MatMultHermitianTranspose(PetscLib, parent(M), x, y)\n    return y\nend\n\nfunction LinearAlgebra.mul!(\n    y::AbstractVec{PetscLib, PetscScalar},\n    M::Transpose{PetscScalar, AM},\n    x::AbstractVec{PetscLib, PetscScalar},\n) where {PetscLib, PetscScalar, AM <: AbstractMat{PetscLib, PetscScalar}}\n    LibPETSc.MatMultTranspose(PetscLib, parent(M), x, y)\n    return y\nend\n\nconst MatAT{PetscLib, PetscScalar} = Union{\n    AbstractMat{PetscLib, PetscScalar},\n    Transpose{PetscScalar, <:AbstractMat{PetscLib, PetscScalar}},\n    Adjoint{PetscScalar, <:AbstractMat{PetscLib, PetscScalar}},\n}\n\nfunction LinearAlgebra.mul!(\n    y::Vector{PetscScalar},\n    M::MatAT{PetscLib, PetscScalar},\n    x::Vector{PetscScalar},\n) where {PetscScalar, PetscLib}\n    LinearAlgebra.mul!(\n        VecSeqWithArray(PetscLib, y),\n        M,\n        VecSeqWithArray(PetscLib, x),\n    )\n    return y\nend\n\nfunction LinearAlgebra.issymmetric(\n    A::AbstractMat{PetscLib};\n    tol = 0,\n) where {PetscLib}\n    fr = Ref{PetscBool}()\n    LibPETSc.MatIsSymmetric(PetscLib, A, tol, fr)\n    return fr[] == PETSC_TRUE\nend\n\nfunction LinearAlgebra.ishermitian(\n    A::AbstractMat{PetscLib};\n    tol = 0,\n) where {PetscLib}\n    fr = Ref{PetscBool}()\n    LibPETSc.MatIsHermitian(PetscLib, A, tol, fr)\n    return fr[] == PETSC_TRUE\nend\n\nfunction MatSeqAIJ(\n    petsclib,\n    S::SparseMatrixCSC{PetscScalar},\n) where {PetscScalar}\n    @assert petsclib.PetscScalar == PetscScalar\n\n    PetscInt = petsclib.PetscInt\n\n    m, n = size(S)\n    # Calculate non-zeros per row\n    nnz = zeros(PetscInt, m)\n\n    for r in S.rowval\n        nnz[r] += 1\n    end\n\n    M = MatSeqAIJ(petsclib, m, n, nnz)\n    for j in 1:n\n        for ii in S.colptr[j]:(S.colptr[j + 1] - 1)\n            i = S.rowval[ii]\n            M[i, j] = S.nzval[ii]\n        end\n    end\n    assemble!(M)\n    return M\nend\n\n# Copy a local sparse matrix to a PETSc matrix\nfunction Base.copyto!(\n    M::AbstractMat{PetscLib},\n    S::SparseMatrixCSC,\n) where {PetscLib}\n    row_rng = ownershiprange(M, false)\n    row_start = row_rng[1]\n    _, n = size(S)\n    for j in 1:n\n        for ii in S.colptr[j]:(S.colptr[j + 1] - 1)\n            i = S.rowval[ii]\n            M[i + row_start, j + row_start] = S.nzval[ii]\n        end\n    end\nend\n\n#=\n=#\n\n\"\"\"\n    createvecs(\n        M::AbstractMat{PetscLib},\n    )\n\nReturns vectors `V` which are compatible with `M`. A right compatible vectors is\n`V.right` and a left compatible vector is `V.left`; positionally these are\nreturned as `(right, left)`\n\nThe created vectors are not garbage collected and should be destroyed with\n[`destroy`](@ref).\n\n# External Links\n$(_doc_external(\"Mat/MatCreateVecs\"))\n\"\"\"\nfunction createvecs(M::AbstractMat{PetscLib}) where {PetscLib}\n    r_right = Ref{CVec}()\n    r_left = Ref{CVec}()\n    LibPETSc.MatCreateVecs(PetscLib, M, r_right, r_left)\n    right = VecPtr(PetscLib, r_right[], true)\n    left = VecPtr(PetscLib, r_left[], true)\n    return (right = right, left = left)\nend\n\n\"\"\"\n    getpetsctype(mat::AbstractMat)\n\nreturn a string with the matrix type\n\n# External Links\n$(_doc_external(\"Mat/MatGetType\"))\n\"\"\"\nfunction getpetsctype(mat::AbstractMat{PetscLib}) where {PetscLib}\n    name_r = Ref{LibPETSc.MatType}()\n    LibPETSc.MatGetType(PetscLib, mat, name_r)\n    return unsafe_string(name_r[])\nend\n"
  },
  {
    "path": "src/deprecated/matshell.jl",
    "content": "\"\"\"\n    MatShell(\n        petsclib::PetscLib,\n        obj::OType,\n        comm::MPI.Comm,\n        local_rows,\n        local_cols,\n        global_rows = LibPETSc.PETSC_DECIDE,\n        global_cols = LibPETSc.PETSC_DECIDE,\n    )\n\nCreate a `global_rows X global_cols` PETSc shell matrix object wrapping `obj`\nwith local size `local_rows X local_cols`.\n\nThe `obj` will be registered as an `MATOP_MULT` function and if if `obj` is a\n`Function`, then the multiply action `obj(y,x)`; otherwise it calls `mul!(y,\nobj, x)`.\n\nif `comm == MPI.COMM_SELF` then the garbage connector can finalize the object,\notherwise the user is responsible for calling [`destroy`](@ref).\n\n# External Links\n$(_doc_external(\"Mat/MatCreateShell\"))\n$(_doc_external(\"Mat/MatShellSetOperation\"))\n$(_doc_external(\"Mat/MATOP_MULT\"))\n\"\"\"\nmutable struct MatShell{PetscLib, PetscScalar, OType} <:\n               AbstractMat{PetscLib, PetscScalar}\n    ptr::CMat\n    obj::OType\n    age::Int\nend\n\nstruct MatOp{PetscLib, PetscInt, Op} end\n\nfunction (::MatOp{PetscLib, PetscInt, LibPETSc.MATOP_MULT})(\n    M::CMat,\n    cx::CVec,\n    cy::CVec,\n)::PetscInt where {PetscLib, PetscInt}\n    r_ctx = Ref{Ptr{Cvoid}}()\n    LibPETSc.MatShellGetContext(PetscLib, M, r_ctx)\n    ptr = r_ctx[]\n    mat = unsafe_pointer_to_objref(ptr)\n\n    PetscScalar = PetscLib.PetscScalar\n    x = VecPtr(PetscLib, cx, false)\n    y = VecPtr(PetscLib, cy, false)\n\n    _mul!(y, mat, x)\n\n    return PetscInt(0)\nend\n\nfunction _mul!(\n    y,\n    mat::MatShell{PetscLib, PetscScalar, F},\n    x,\n) where {PetscLib, PetscScalar, F <: Function}\n    mat.obj(y, x)\nend\n\nfunction _mul!(y, mat::MatShell, x)\n    LinearAlgebra.mul!(y, mat.obj, x)\nend\n\n# We have to use the macro here because of the @cfunction\nLibPETSc.@for_petsc function MatShell(\n    petsclib::$PetscLib,\n    obj::OType,\n    comm::MPI.Comm,\n    local_rows,\n    local_cols,\n    global_rows = LibPETSc.PETSC_DECIDE,\n    global_cols = LibPETSc.PETSC_DECIDE,\n) where {OType}\n    mat = MatShell{$PetscLib, $PetscScalar, OType}(C_NULL, obj, petsclib.age)\n\n    # we use the MatShell object itself\n    ctx = pointer_from_objref(mat)\n\n    LibPETSc.MatCreateShell(\n        petsclib,\n        comm,\n        local_rows,\n        local_cols,\n        global_rows,\n        global_cols,\n        pointer_from_objref(mat),\n        mat,\n    )\n\n    mulptr = @cfunction(\n        MatOp{$PetscLib, $PetscInt, LibPETSc.MATOP_MULT}(),\n        $PetscInt,\n        (CMat, CVec, CVec)\n    )\n    LibPETSc.MatShellSetOperation(petsclib, mat, LibPETSc.MATOP_MULT, mulptr)\n\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, mat)\n    end\n\n    return mat\nend\n"
  },
  {
    "path": "src/deprecated/options.jl",
    "content": "const CPetscOptions = Ptr{Cvoid}\n\n\"\"\"\n    AbstractOptions{PetscLib <: PetscLibType}\n\nAbstract type of PETSc solver options.\n\"\"\"\nabstract type AbstractOptions{PetscLib <: PetscLibType} end\n\n\"\"\"\n    GlobalOptions{PetscLib <: PetscLibType}\n\nThe PETSc global options database.\n\"\"\"\nstruct GlobalOptions{PetscLib} <: AbstractOptions{PetscLib} end\nBase.cconvert(::Type{CPetscOptions}, obj::GlobalOptions) = C_NULL\nGlobalOptions(::PetscLib) where {PetscLib} = GlobalOptions{PetscLib}()\n\n\"\"\"\n    Options{PetscLib <: PetscLibType}(kw -> arg, ...)\n    Options(petsclib, kw -> arg, ...)\n\nCreate a PETSc options data structure for the `petsclib`.\n\nFor construction a set of keyword argment pairs should be given. If the option\nhas no value it should be set to `nothing` or `true`. Setting an option to\n`false` will cause the option not to be set on the PETSc options table.\n\n# Examples\n```julia-repl\njulia> using PETSc\n\njulia> petsclib = PETSc.petsclibs[1];\n\njulia> PETSc.initialize(petsclib)\n\njulia> opt = PETSc.Options(\n                         petsclib,\n                         ksp_monitor = nothing,\n                         ksp_view = true,\n                         pc_type = \"mg\",\n                         pc_mg_levels = 1,\n                         false_opt = false,\n                     )\n#PETSc Option Table entries:\n-ksp_monitor\n-ksp_view\n-pc_mg_levels 1\n-pc_type mg\n#End of PETSc Option Table entries\n\n\njulia> opt[\"ksp_monitor\"]\n\"\"\n\njulia> opt[\"pc_type\"]\n\"mg\"\n\njulia> opt[\"pc_type\"] = \"ilu\"\n\"ilu\"\n\njulia> opt[\"pc_type\"]\n\"ilu\"\n\njulia> opt[\"false_opt\"]\nERROR: KeyError: key \"bad_key\" not found\n\njulia> opt[\"bad_key\"]\nERROR: KeyError: key \"bad_key\" not found\n```\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsCreate\"))\n\"\"\"\nmutable struct Options{T} <: AbstractOptions{T}\n    ptr::CPetscOptions\n    age::Int\nend\n\nfunction Options_(petsclib::PetscLibType)\n    @assert initialized(petsclib)\n    PetscLib = typeof(petsclib)\n    opts = Options{PetscLib}(C_NULL, petsclib.age)\n    LibPETSc.PetscOptionsCreate(petsclib, opts)\n    finalizer(destroy, opts)\n    return opts\nend\n\nfunction destroy(opts::AbstractOptions{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) &&\n       opts.age == getlib(PetscLib).age &&\n       opts.ptr != C_NULL\n        LibPETSc.PetscOptionsDestroy(PetscLib, opts)\n    end\n    opts.ptr = C_NULL\n    return nothing\nend\n\nOptions(petsclib::PetscLibType; kwargs...) = Options_(petsclib, kwargs...)\nOptions(PetscLib::Type{<:PetscLibType}; kwargs...) =\n    Options_(getlib(PetscLib), kwargs...)\nfunction Options_(petsclib::PetscLibType, ps::Pair...)\n    opts = Options_(petsclib)\n    for (k, v) in ps\n        opts[k] = v\n    end\n    return opts\nend\n\nfunction Base.push!(\n    ::GlobalOptions{PetscLib},\n    opts::Options{PetscLib},\n) where {PetscLib}\n    LibPETSc.PetscOptionsPush(PetscLib, opts)\n    return nothing\nend\n\nfunction Base.pop!(::GlobalOptions{PetscLib}) where {PetscLib}\n    LibPETSc.PetscOptionsPop(PetscLib)\n    return nothing\nend\n\nfunction Base.setindex!(\n    opts::AbstractOptions{PetscLib},\n    val,\n    key,\n) where {PetscLib}\n    val === true && (val = nothing)\n    val === false && (return val)\n\n    LibPETSc.PetscOptionsSetValue(\n        PetscLib,\n        opts,\n        string('-', key),\n        isnothing(val) ? C_NULL : string(val),\n    )\n\n    return val\nend\n\nfunction Base.getindex(opts::AbstractOptions{PetscLib}, key) where {PetscLib}\n    val = Vector{UInt8}(undef, 256)\n    set_ref = Ref{PetscBool}()\n    LibPETSc.PetscOptionsGetString(\n        PetscLib,\n        opts,\n        C_NULL,\n        string('-', key),\n        val,\n        sizeof(val),\n        set_ref,\n    )\n    val = GC.@preserve val unsafe_string(pointer(val))\n    set_ref[] == PETSC_TRUE || throw(KeyError(key))\n    return val\nend\n\nfunction view(\n    opts::AbstractOptions{PetscLib},\n    viewer = LibPETSc.PETSC_VIEWER_STDOUT_(PetscLib, MPI.COMM_SELF),\n) where {PetscLib}\n    LibPETSc.PetscOptionsView(PetscLib, opts, viewer)\n    return nothing\nend\n\nBase.show(io::IO, opts::AbstractOptions) = _show(io, opts)\n\n\"\"\"\n    with(f, opts::Options)\n\nCall `f()` with the [`Options`](@ref) `opts` set temporarily (in addition to any\nglobal options).\n\"\"\"\nfunction with(f, opts::Options{PetscLib}) where {PetscLib}\n    global_opts = GlobalOptions{PetscLib}()\n    push!(global_opts, opts)\n    try\n        f()\n    finally\n        pop!(global_opts)\n    end\nend\n\n\"\"\"\n    parse_options(args::Vector{String})\n\nParse the `args` vector into a `NamedTuple` that can be used as the options for\nthe PETSc solvers.\n\n```sh\njulia --project file.jl -ksp_monitor -pc_type mg -ksp_view -da_refine=1\n```\n\"\"\"\nfunction parse_options(args::Vector{String})\n    i = 1\n    opts = Dict{Symbol, Union{String, Nothing}}()\n    while i <= length(args)\n        @assert args[i][1] == '-' && length(args[i]) > 1\n        if i == length(args) || args[i + 1][1] == '-'\n            token = split(args[i][2:end], \"=\")\n            if length(token) == 1\n                opts[Symbol(token[1])] = nothing\n            elseif length(token) == 2\n                opts[Symbol(token[1])] = token[2]\n            else\n                error(\"invalid argument: $(args[i])\")\n            end\n            i = i + 1\n        else\n            opts[Symbol(args[i][2:end])] = args[i + 1]\n            i = i + 2\n        end\n    end\n    return NamedTuple(opts)\nend\n\n\"\"\"\n    typedget(opt::NamedTuple, key::Symbol, default::T)\n\nParse `opt` similar to [`get`](@ref) but ensures that the returned value is the\nsame type as the default value. When `T <: NTuple` keys that result in a single\nvalue will be filled into an `NTuple` of the same length as `T`; in the case of\nstrings it is parsed using [`split`](@ref) with comma delimiter\n\n# Examples\n```julia-repl\njulia> opt = (tup = (1, 2, 3), string_tup = \"1,2,3\", string_int = \"4\", int = 4)\n(tup = (1, 2, 3), string_tup = \"1,2,3\", string_int = \"4\", int = 4)\n\njulia> typedget(opt, :int, 7)\n4\n\njulia> typedget(opt, :bad_key, 7)\n7\n\njulia> typedget(opt, :tup, (1, 1, 1))\n(1, 2, 3)\n\njulia> typedget(opt, :string_tup, (1, 1, 1))\ntokens = SubString{String}[\"1\", \"2\", \"3\"]\n(1, 2, 3)\n\njulia> typedget(opt, :string_int, (1, 1, 1))\ntokens = SubString{String}[\"4\"]\n(4, 4, 4)\n\njulia> typedget(opt, :int, (1, 1, 1))\n(4, 4, 4)\n\njulia> typedget(opt, :int, (1., 1., 1.))\n(4.0, 4.0, 4.0)\n```\n\"\"\"\nfunction typedget(opt::NamedTuple, key::Symbol, default::T) where {T}\n    v = get(opt, key, default)\n    if !(v isa T)\n        if T <: String\n            return string(v)\n        elseif v isa String\n            if T <: NTuple\n                ET = T.types[1]\n                tokens = split(v, \",\")\n                if length(tokens) == 1\n                    return ntuple(_ -> parse(ET, tokens[1]), length(T.types))\n                else\n                    return ntuple(j -> parse(ET, tokens[j]), length(T.types))\n                end\n            else\n                return parse(T, v)\n            end\n        else\n            if T <: NTuple && !(v isa Tuple)\n                ET = T.types[1]\n                return ntuple(j -> convert(ET, v), length(T.types))\n            else\n                return convert(T, v)\n            end\n        end\n    end\n    return v\nend\n"
  },
  {
    "path": "src/deprecated/pc.jl",
    "content": "\nconst CPC = Ptr{Cvoid}\nconst CPCType = Cstring\nconst PCType = LibPETSc.PCType\n\nabstract type AbstractPC{PetscLib, PetscScalar} end\n\n#mutable struct PC{PetscLib, PetscScalar} <: AbstractPC{PetscLib, PetscScalar}\n#    ptr::CPC\n#    age::Int\n#end\n\nmutable struct PC{PetscLib, PetscScalar} <: AbstractPC{PetscLib, PetscScalar}\n    ptr::CPC\n    age::Int\n    function PC{PetscLib}(comm) where {PetscLib}\n        PetscScalar = PetscLib.PetscScalar\n        pc = new{PetscLib, PetscScalar}(\n            C_NULL,\n            getlib(PetscLib).age,\n        )\n\n        LibPETSc.KSPCreate(PetscLib, comm, ksp)\n        \n        # If there is only one rank we can finalize the KSP with GC\n        if MPI.Comm_size(comm) == 1\n            finalizer(destroy, pc)\n        end\n\n        return pc\n    end\nend\n\nfunction destroy(pc::AbstractPC{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) &&\n        pc.age == getlib(PetscLib).age &&\n        pc.ptr != C_NULL\n        LibPETSc.PCDestroy(PetscLib, pc)\n    end\n    pc.ptr = C_NULL\n    return nothing\nend\n\n#=\n#scalartype(::AbstractPC{T}) where {T} = T\n\n@for_libpetsc begin\n\n    function PC{$PetscScalar}(comm::MPI.Comm)\n        pc = PC{$PetscScalar}(C_NULL)\n        @chk ccall((:PCCreate, $libpetsc), PetscErrorCode, (MPI.MPI_Comm, Ptr{CPC}), comm, pc)\n        finalizer(destroy, pc)\n        return pc\n    end\n\n    function PC(ksp::KSP{$PetscScalar})\n        pc = PC{$PetscScalar}(C_NULL)\n        @chk ccall((:KSPGetPC, $libpetsc), PetscErrorCode, (CKSP, Ptr{CPC}), ksp, pc)\n        incref(pc) # need to manually increment the reference counter\n        finalizer(destroy, pc)\n        return pc\n    end\n\n    #function destroy(pc::AbstractPC{$PetscScalar})\n    #    if pc.age == getlib(PetscLib).age && !(finalized(PetscLib)) && pc.ptr != C_NULL\n    #        @chk ccall((:PCDestroy, $libpetsc), PetscErrorCode, (Ptr{CPC},), pc)\n    #    end\n    #    pc.ptr = C_NULL\n    #    return nothing\n    #end\n\n    function settype!(pc::AbstractPC{$PetscScalar}, pctype::String)\n        @chk ccall((:PCSetType, $libpetsc), PetscErrorCode, (CPC, Cstring), pc, pctype)\n        return nothing\n    end\n\n    #function setpc!(ksp::KSP{$PetscScalar}, pc::AbstractPC{$PetscScalar})\n    #    @chk ccall((:KSPSetPC, $libpetsc), PetscErrorCode, (CKSP, CPC), ksp, pc)\n    #    return nothing\n    #end\n\n    function gettype(pc::AbstractPC{$PetscScalar})\n        t_r = Ref{CPCType}()\n        @chk ccall((:PCGetType, $libpetsc), PetscErrorCode, (CPC, Ptr{CPCType}),  pc, t_r)\n        return unsafe_string(t_r[])\n    end\n\n    function view(pc::AbstractPC{$PetscScalar}, viewer::AbstractViewer{$PetscLib}=ViewerStdout($petsclib, getcomm(pc)))\n        @chk ccall((:PCView, $libpetsc), PetscErrorCode,\n                    (CPC, CPetscViewer),\n                pc, viewer);\n        return nothing\n    end\n\nend\n\n\nBase.show(io::IO, pc::AbstractPC) = _show(io, pc)\n=#"
  },
  {
    "path": "src/deprecated/ref.jl",
    "content": "\n@for_libpetsc begin\n\n    function incref(::Type{$PetscScalar}, obj)\n        @chk ccall((:PetscObjectReference, $libpetsc), PetscErrorCode, (Ptr{Cvoid},), obj)\n        return nothing\n    end\n\n    function decref(::Type{$PetscScalar}, obj)\n        if !finalized($petsclib)\n            @chk ccall((:PetscObjectDereference, $libpetsc), PetscErrorCode, (Ptr{Cvoid},), obj)\n            obj.ptr = C_NULL\n        end\n        return nothing\n    end\n\n    function nrefs(::Type{$PetscScalar}, obj)\n        r_n = Ref{$PetscInt}()\n        @chk ccall((:PetscObjectGetReference, $libpetsc), PetscErrorCode, (Ptr{Cvoid},Ptr{$PetscInt}), obj, r_n)\n        return r_n[]\n    end\n\nend\n\n\"\"\"\n    incref(obj)\n\nIncrement the reference counter fo `obj`.\nThis usually only needs to be called when accessing objects owned by other objects, e.g. via `KSPGetPC`.\n\"\"\"\nincref(obj) = incref(scalartype(obj), obj)\n\n\"\"\"\n    decref(obj)\n\nDecrement the reference counter for `obj`.\n\nIn general we don't need to use this, as we can call `destroy` instead.\n\"\"\"\ndecref(obj) = decref(scalartype(obj), obj)\n\n\"\"\"\n    nrefs(obj)\n\nThe current reference count for `obj`.\n\"\"\"\nnrefs(obj)  = nrefs(scalartype(obj), obj)\n"
  },
  {
    "path": "src/deprecated/snes.jl",
    "content": "const CSNES = Ptr{Cvoid}\nconst CSNESType = Cstring\n\nabstract type AbstractSNES{PetscLib} end\n\n\"\"\"\n    SNESPtr{PetscLib}(ptr, age)\n\nContainer type for a PETSc SNES that is just a raw pointer.\n\"\"\"\nmutable struct SNESPtr{PetscLib} <: AbstractSNES{PetscLib}\n    ptr::CSNES\n    age::Int\nend\n\nfunction destroy(snes::AbstractSNES{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) &&\n       snes.age == getlib(PetscLib).age &&\n       snes.ptr != C_NULL\n        LibPETSc.SNESDestroy(PetscLib, snes)\n    end\n    snes.ptr = C_NULL\n    return nothing\nend\n\nmutable struct SNES{PetscLib} <: AbstractSNES{PetscLib}\n    ptr::CSNES\n    opts::Options{PetscLib}\n    age::Int\n    # Garbage collection protections\n    f!::Function\n    updateJ!::Function\n    function SNES{PetscLib}(ptr, opts, age) where {PetscLib}\n        new{PetscLib}(\n            ptr,\n            opts,\n            age,\n            x -> error(\"function not defined\"),\n            x -> error(\"function not defined\"),\n        )\n    end\nend\n\n\"\"\"\n    SNES(\n        petsclib::PetscLib\n        comm::MPI.Comm;\n        setfromoptions = true,\n        options...\n    )\n\nCreates a PETSc nonlinear solve context on the communicator `comm`\n\nIf keyword argument `setfromoptions == true` then [`setfromoptions!`](@ref)\ncalled on the created SNES context.\n\n# External Links\n$(_doc_external(\"SNES/SNESCreate\"))\n$(_doc_external(\"SNES/SNESSetFromOptions\"))\n\"\"\"\nfunction SNES(\n    petsclib::PetscLib,\n    comm::MPI.Comm;\n    setfromoptions = true,\n    options...,\n) where {PetscLib}\n    opts = Options(petsclib; options...)\n\n    snes = SNES{PetscLib}(C_NULL, opts, petsclib.age)\n\n    with(snes.opts) do\n        LibPETSc.SNESCreate(petsclib, comm, snes)\n    end\n\n    setfromoptions && setfromoptions!(snes)\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, snes)\n    end\n\n    return snes\nend\n\nfunction setfromoptions!(snes::AbstractSNES{PetscLib}) where {PetscLib}\n    with(snes.opts) do\n        LibPETSc.SNESSetFromOptions(PetscLib, snes)\n    end\nend\n\nfunction gettype(snes::AbstractSNES{PetscLib}) where {PetscLib}\n    r_type = Ref{CSNESType}()\n    LibPETSc.SNESGetType(PetscLib, snes, r_type)\n    return unsafe_string(r_type[])\nend\n\nfunction view(\n    snes::AbstractSNES{PetscLib},\n    viewer = LibPETSc.PETSC_VIEWER_STDOUT_(PetscLib, getcomm(snes)),\n) where {PetscLib}\n    LibPETSc.SNESView(PetscLib, snes, viewer)\n    return nothing\nend\n\n\"\"\"\n    setfunction!(snes::AbstractSNES, f!::Function, x::AbstractVec)\n    setfunction!(f!::Function, snes::AbstractSNES, x::AbstractVec)\n\nDefine `f!` to be the function of the `snes`. A call to `f!(fx, snes, x)` should\nset the elements of the PETSc vector `fx` based on the `x`.\n\n# External Links\n$(_doc_external(\"SNES/SNESSetFunction\"))\n\"\"\"\nsetfunction!(snes::AbstractSNES, rhs!, vec) = setfunction!(rhs!, snes, vec)\n\n# Wrapper for calls to setfunction!\nmutable struct Fn_SNESSetFunction{PetscLib, PetscInt} end\nfunction (w::Fn_SNESSetFunction{PetscLib, PetscInt})(\n    ::CSNES,\n    r_x::CVec,\n    r_fx::CVec,\n    snes_ptr::Ptr{Cvoid},\n)::PetscInt where {PetscLib, PetscInt}\n    snes = unsafe_pointer_to_objref(snes_ptr)\n    x = VecPtr(PetscLib, r_x, false)\n    fx = VecPtr(PetscLib, r_fx, false)\n    \n    return snes.f!(fx, snes, x)\nend\n\nLibPETSc.@for_petsc function setfunction!(\n    f!,\n    snes::AbstractSNES{$PetscLib},\n    vec::AbstractVec{$PetscLib},\n) \n  \n    ctx = pointer_from_objref(snes)\n    PetscInt = $PetscLib.PetscInt\n    fptr = @cfunction(\n        Fn_SNESSetFunction{$PetscLib, $PetscInt}(),\n        $PetscInt,\n        (CSNES, CVec, CVec, Ptr{Cvoid})\n    )\n  \n    with(snes.opts) do\n        LibPETSc.SNESSetFunction($PetscLib, snes, vec, fptr, ctx)\n    end\n    snes.f! = f!\n    return 0\nend\n\n\"\"\"\n    setjacobian!(\n        snes::AbstractSNES,\n        updateJ!::Function,\n        J::AbstractMat,\n        P::AbstractMat = J\n    )\n    setjacobian!(\n        updateJ!::Function,\n        snes::AbstractSNES,\n        J::AbstractMat,\n        P::AbstractMat = J\n    )\n\nDefine `updateJ!` to be the function that updates the Jacobian of the `snes`.\n\nIf `J == P` then a call to `updateJ!(J, snes, x)` should set the elements of the\nPETSc Jacobian (approximation).\n\nIf `J ≠ P` then a call to `updateJ!(J, P, snes, x)` should set the elements of\nthe PETSc Jacobian (approximation) and preconditioning matrix `P`.\n\n# External Links\n$(_doc_external(\"SNES/SNESSetJacobian\"))\n\"\"\"\nsetjacobian!(snes::AbstractSNES, updateJ!, J, PJ = J) =\n    setjacobian!(updateJ!, snes, J, PJ)\n\n# Wrapper for calls to setjacobian!\nmutable struct Fn_SNESSetJacobian{PetscLib, PetscInt} end\nfunction (w::Fn_SNESSetJacobian{PetscLib, PetscInt})(\n    ::CSNES,\n    r_x::CVec,\n    r_A::CMat,\n    r_P::CMat,\n    snes_ptr::Ptr{Cvoid},\n)::PetscInt where {PetscLib, PetscInt}\n    snes = unsafe_pointer_to_objref(snes_ptr)\n    PetscScalar = PetscLib.PetscScalar\n    petsclib = getlib(PetscLib)\n    x = VecPtr(PetscLib, r_x, false)\n    A = MatPtr{PetscLib, PetscScalar}(r_A, petsclib.age)\n    P = MatPtr{PetscLib, PetscScalar}(r_P, petsclib.age)\n    P == A\n    return P == A ? snes.updateJ!(A, snes, x) : snes.updateJ!(A, P, snes, x)\nend\n\nLibPETSc.@for_petsc function setjacobian!(\n    updateJ!,\n    snes::AbstractSNES{$PetscLib},\n    J::AbstractMat{$PetscLib},\n    PJ::AbstractMat{$PetscLib} = J,\n)\n    ctx = pointer_from_objref(snes)\n    fptr = @cfunction(\n        Fn_SNESSetJacobian{$PetscLib, $PetscInt}(),\n        $PetscInt,\n        (CSNES, CVec, CMat, CMat, Ptr{Cvoid})\n    )\n    with(snes.opts) do\n        LibPETSc.SNESSetJacobian($PetscLib, snes, J, PJ, fptr, ctx)\n    end\n    snes.updateJ! = updateJ!\n    return nothing\nend\n\nfunction solve!(\n    x::AbstractVec{PetscLib},\n    snes::AbstractSNES{PetscLib},\n    b::Union{Nothing, AbstractVec{PetscLib}} = nothing,\n) where {PetscLib}\n    with(snes.opts) do\n        LibPETSc.SNESSolve(PetscLib, snes, isnothing(b) ? C_NULL : b, x)\n    end\n    return x\nend\n\n\"\"\"\n    setDM!(snes::AbstractSNES, dm::AbstractDM)\n\nSet `dm` for `snes`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetDM\"))\n\"\"\"\nfunction setDM!(\n    snes::AbstractSNES{PetscLib},\n    dm::AbstractDM{PetscLib},\n) where {PetscLib}\n    LibPETSc.SNESSetDM(PetscLib, snes, dm)\n    return snes\nend\n\n\"\"\"\n    getDMDA(snes::AbstractSNES)\n\nGet `dmda` for `snes`\n\nThe returned `dmda` is owned by the `snes`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetDM\"))\n\"\"\"\nfunction getDMDA(\n    snes::AbstractSNES{PetscLib},\n) where {PetscLib}\n    t_dmda = Ref{CDM}()\n    LibPETSc.SNESGetDM(PetscLib, snes, t_dmda)\n    dmda = DMDAPtr{PetscLib}(t_dmda[], getlib(PetscLib).age, false)\n    return dmda\nend\n\n\n#=\n@for_libpetsc begin\n\n    function (::SNESJac{$PetscScalar})(csnes::CSNES, cx::CVec, cA::CMat, cP::CMat, ctx::Ptr{Cvoid})::$PetscInt\n        snes = unsafe_pointer_to_objref(ctx)\n        @assert snes.ptr == csnes\n        @assert snes.jac_A.ptr == cA\n        @assert snes.jac_P.ptr == cP\n        #x = unsafe_localarray($PetscScalar, cx; write=false)\n        #snes.update_jac!(x, snes.jac_A, snes.jac_P,snes.user_ctx)\n        snes.update_jac!(cx, snes.jac_A, snes.jac_P,snes.user_ctx)\n        #Base.finalize(x)\n        return $PetscInt(0)\n    end\n\n    function setjacobian!(snes::AbstractSNES{$PetscScalar}, update_jac!,\n    A::AbstractMat{$PetscScalar}, P::AbstractMat{$PetscScalar}=A)\n        ctx = pointer_from_objref(snes)\n        jacptr = @cfunction(SNESJac{$PetscScalar}(), $PetscInt, (CSNES, CVec,\n        CMat, CMat, Ptr{Cvoid}))\n\n        with(snes.opts) do\n            @chk ccall((:SNESSetJacobian, $libpetsc), PetscErrorCode,\n                (CSNES, CMat, CMat, Ptr{Cvoid}, Ptr{Cvoid}),\n                snes, A, P, jacptr, ctx)\n        end\n        snes.update_jac! = update_jac!\n        snes.jac_A = A\n        snes.jac_P = P\n        return nothing\n    end\n\n    function solve!(x::AbstractVec{$PetscScalar}, snes::AbstractSNES{$PetscScalar}, b::AbstractVec{$PetscScalar})\n        with(snes.opts) do\n            @chk ccall((:SNESSolve, $libpetsc), PetscErrorCode,\n            (CSNES, CVec, CVec), snes, b, x)\n        end\n        return x\n    end\n    function solve!(x::AbstractVec{$PetscScalar}, snes::AbstractSNES{$PetscScalar})\n        with(snes.opts) do\n            @chk ccall((:SNESSolve, $libpetsc), PetscErrorCode,\n            (CSNES, CVec, CVec), snes, C_NULL, x)\n        end\n        return x\n    end\n\nend\n\nsolve!(x::AbstractVector{T}, snes::AbstractSNES{T}) where {T} = parent(solve!(AbstractVec(x), snes))\n=#\n"
  },
  {
    "path": "src/deprecated/sys.jl",
    "content": "const CPetscObject = Ptr{Cvoid}\n\nconst UnionPetscTypes = Union{\n    AbstractVec,\n    AbstractMat,\n    AbstractKSP,\n    #AbstractViewer,\n    #AbstractPC,\n    AbstractSNES,\n    AbstractDM,\n    Options,\n}\n\n# allows us to pass PETSc_XXX objects directly into CXXX ccall signatures\nBase.cconvert(::Type{CPetscObject}, obj::UnionPetscTypes) = obj\nBase.unsafe_convert(::Type{CPetscObject}, obj::UnionPetscTypes) = obj.ptr\n\n# allows us to pass PETSc_XXX objects directly into Ptr{CXXX} ccall signatures\nfunction Base.unsafe_convert(::Type{Ptr{CPetscObject}}, obj::UnionPetscTypes)\n    convert(Ptr{CPetscObject}, pointer_from_objref(obj))\nend\n\n\nfunction getcomm(\n    obj::Union{\n        AbstractVec{PetscLib},\n        AbstractMat{PetscLib},\n        AbstractKSP{PetscLib},\n        AbstractSNES{PetscLib},\n        AbstractDM{PetscLib},\n        Any\n    },\n) where {PetscLib}\n    comm = MPI.Comm()\n    LibPETSc.PetscObjectGetComm(PetscLib, obj, comm)\n\n    #XXX We should really increase the petsc reference counter.\n    #    But for for some reason the PETSc says that this communicator is\n    #    unknown\n    #=\n    # Call the PetscCommDuplicate to increase reference count\n    @chk ccall(\n        (:PetscCommDuplicate, $libpetsc),\n        PetscErrorCode,\n        (MPI.MPI_Comm, Ptr{MPI.MPI_Comm}, Ptr{Cvoid}),\n        comm,\n        comm,\n        C_NULL,\n    )\n\n    # Register PetscCommDestroy to decriment the reference count\n    finalizer(PetscCommDestroy, comm)\n    =#\n\n    return comm\nend\n\n\n#=\n#XXX Not sure why this doesn't work\n@for_libpetsc begin\n    function PetscCommDestroy(\n        comm::MPI.Comm\n    )\n        @show comm.val\n        @chk ccall(\n            (:PetscCommDestroy, $libpetsc),\n            PetscErrorCode,\n            (Ptr{MPI.MPI_Comm},),\n            comm,\n        )\n        return nothing\n    end\nend\n=#\n"
  },
  {
    "path": "src/deprecated/utils.jl",
    "content": "#\n# A few utility functions to help wrapping PETSc\n\n\nexport PETSc_unsafe_wrap, PETSc_RefPtr\n\nMPI_Comm = MPI.Comm\n\n\n\"\"\"\n    PETSc_unsafe_wrap(r_array, dims::NTuple{N,Int}; own=false)\n\n`unsafe_wrap` applied to a PETSc array which can change in size from 1D to 4D\n\"\"\"\nfunction PETSc_unsafe_wrap(r_array, dims::NTuple{N,IT}; own=false) where {N,IT}\n\n    if N==1\n        array = unsafe_wrap(Array, r_array[], dims; own = own)\n    elseif N==2\n        array = unsafe_wrap(Array, unsafe_load(r_array[]), dims; own = own)\n    elseif N==3\n        array = unsafe_wrap(Array, unsafe_load(unsafe_load(r_array[])), dims; own = own)\n    elseif N==4\n        array = unsafe_wrap(Array, unsafe_load(unsafe_load(unsafe_load(r_array[]))), dims; own = own)\n    else\n        error(\"not implemented for N=$N\")\n    end\n\n    return array\nend\n\n\"\"\"\n    PETSc_RefPtr(N::Int, PetscType::DataType=Float64)\n\nCreates a reference to a pointer for different dimensions `N` \n\"\"\"\nfunction PETSc_RefPtr(N::IT, PetscType::DataType=Float64) where {IT}\n\n    if N==1\n        r_array = Ref{Ptr{PetscType}}()\n    elseif N==2\n        r_array = Ref{Ptr{Ptr{PetscType}}}()\n    elseif N==3\n        r_array = Ref{Ptr{Ptr{Ptr{PetscType}}}}()\n    elseif N==4\n        r_array = Ref{Ptr{Ptr{Ptr{Ptr{PetscType}}}}}()\n    else\n        error(\"not implemented for N=$N\")\n    end\n\n    return r_array\nend\n\n\n\"\"\"\n    PETSc_RefPtr(dims::NTuple{N,Int}, PetscType::DataType=Float64) \n\nCreates a reference to a pointer of a PETSc array of dimensions `dims`\n\"\"\"\nPETSc_RefPtr(dims::NTuple{N,IT}, PetscType::DataType=Float64) where {N,IT} = PETSc_RefPtr(N, PetscType)"
  },
  {
    "path": "src/deprecated/vec.jl",
    "content": "const CVec = Ptr{Cvoid}\n\nabstract type AbstractVec{PetscLib, PetscScalar} <: AbstractVector{PetscScalar} end\n\nBase.eltype(\n    ::Type{V},\n) where {\n    V <: AbstractVec{PetscLib, PetscScalar},\n} where {PetscLib, PetscScalar} = PetscScalar\nBase.eltype(\n    v::AbstractVec{PetscLib, PetscScalar},\n) where {PetscLib, PetscScalar} = PetscScalar\nBase.size(v::AbstractVec) = (length(v),)\n\nfunction destroy(v::AbstractVec{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) &&\n       v.age == getlib(PetscLib).age &&\n       v.ptr != C_NULL &&\n       (!hasfield(typeof(v), :own) || v.own)\n        LibPETSc.VecDestroy(PetscLib, v)\n    end\n    v.ptr = C_NULL\n    return nothing\nend\n\n\"\"\"\n    VecPtr(petsclib, v::CVec, own)\n\nContainer type for a PETSc Vec that is just a raw pointer.\n\nIf the `own` then the finalizer is set on the vector; calling `destroy` when\n`!own` is a no-op.\n\"\"\"\nmutable struct VecPtr{PetscLib, PetscScalar} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    age::Int\n    own::Bool\nend\nfunction VecPtr(\n    petsclib::PetscLib,\n    ptr::CVec,\n    own,\n) where {PetscLib <: PetscLibType}\n    v = VecPtr{PetscLib, petsclib.PetscScalar}(ptr, petsclib.age, own)\n    comm = getcomm(v)\n    if own && MPI.Comm_size(comm) == 1\n        finalizer(destroy, v)\n    end\n    return v\nend\nVecPtr(::Type{PetscLib}, x...) where {PetscLib <: PetscLibType} = VecPtr(getlib(PetscLib), x...)\n\n\"\"\"\n    VecSeqWithArray(petsclib, v::Vector)\n\nA standard, sequentially-stored serial PETSc vector, wrapping the Julia vector\n`v`.\n\nThis reuses the array `v` as storage, and so `v` should not be `resize!`-ed or\notherwise have its length modified while the PETSc object exists.\n\nThis should only be need to be called for more advanced uses, for most simple\nusecases, users should be able to pass `Vector`s directly and have the wrapping\nperformed automatically\n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeqWithArray\"))\n\"\"\"\nmutable struct VecSeqWithArray{PetscLib, PetscScalar} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    array::Vector{PetscScalar}\n    age::Int\nend\nBase.parent(v::VecSeqWithArray) = v.array\n\nfunction VecSeqWithArray(\n    petsclib::PetscLib,\n    array::Vector{PetscScalar};\n    blocksize = 1,\n) where {PetscLib <: PetscLibType, PetscScalar}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    @assert PetscScalar == petsclib.PetscScalar\n    v = VecSeqWithArray{PetscLib, PetscScalar}(C_NULL, array, petsclib.age)\n    LibPETSc.VecCreateSeqWithArray(\n        petsclib,\n        comm,\n        blocksize,\n        length(array),\n        array,\n        v,\n    )\n    finalizer(destroy, v)\n    return v\nend\nfunction VecSeqWithArray(\n    ::Type{PetscLib},\n    x...;\n    kw...,\n) where {PetscLib <: PetscLibType}\n    VecSeqWithArray(getlib(PetscLib), x...; kw...)\nend\n\n\"\"\"\n    VecSeq(petsclib, n::Int)\n\nA standard, sequentially-stored serial PETSc vector for `petsclib.PetscScalar`\nof length `n`.\n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeq\"))\n\"\"\"\nmutable struct VecSeq{PetscLib, PetscScalar} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    age::Int\nend\n\nfunction VecSeq(petsclib::PetscLib, n::Int) where {PetscLib <: PetscLibType}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    v = VecSeq{PetscLib, petsclib.PetscScalar}(C_NULL, petsclib.age)\n    LibPETSc.VecCreateSeq(petsclib, comm, n, v)\n    finalizer(destroy, v)\n    return v\nend\n\n\"\"\"\n    VecMPI(\n         petsclib,\n         comm:MPI.Comm,\n         local_length;\n         global_length = PETSC_DETERMINE\n    )\n\nAn sequentially-stored MPI PETSc vector for `petsclib.PetscScalar` of local\nlength `local_length` and global length `global_length` without ghost elements.\n\nIf `global_length isa Int` then `local_length` can be set to `PETSC_DECIDE` in\nwhich case PETSc will decide the local_length.\n\n# External Links\n$(_doc_external(\"Vec/VecCreateMPI\"))\n\n!!! note\n\n    The user is responsible for calling `destroy(vec)` on the `Vec` since\n    this cannot be handled by the garbage collector do to the MPI nature of the\n    object.\n\"\"\"\nmutable struct VecMPI{PetscLib, PetscScalar} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    age::Int\nend\n\nfunction VecMPI(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    local_length;\n    global_length = PETSC_DETERMINE,\n) where {PetscLib <: PetscLibType}\n    @assert initialized(petsclib)\n    @assert local_length != PETSC_DECIDE || global_length != PETSC_DETERMINE\n    v = VecMPI{PetscLib, petsclib.PetscScalar}(C_NULL, petsclib.age)\n    LibPETSc.VecCreateMPI(petsclib, comm, local_length, global_length, v)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, v)\n    end\n    return v\nend\n\n\"\"\"\n    VecGhost(\n         petsclib,\n         comm:MPI.Comm,\n         local_length\n         ghost::Vector{PetscInt};\n         global_length = PETSC_DETERMINE,\n         num_ghost = length(ghost),\n    )\n\nAn sequentially-stored MPI PETSc vector for `petsclib.PetscScalar` of local\nlength `local_length` and global length `global_length` with ghost elements.\n\nIf `global_length isa Int` then `local_length` can be set to `PETSC_DECIDE`.\n\n# External Links\n$(_doc_external(\"Vec/VecCreateGhost\"))\n\n!!! note\n\n    The user is responsible for calling `destroy(vec)` on the `Vec` since\n    this cannot be handled by the garbage collector do to the MPI nature of the\n    object.\n\"\"\"\nmutable struct VecGhost{PetscLib, PetscScalar} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    age::Int\nend\n\nfunction VecGhost(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    local_length,\n    ghost::Vector{PetscInt};\n    global_length = PETSC_DETERMINE,\n    num_ghost = length(ghost),\n) where {PetscLib <: PetscLibType, PetscInt}\n    @assert initialized(petsclib)\n    @assert PetscInt == PetscLib.PetscInt\n    @assert local_length != PETSC_DECIDE || global_length != PETSC_DETERMINE\n    v = VecGhost{PetscLib, petsclib.PetscScalar}(C_NULL, petsclib.age)\n    LibPETSc.VecCreateGhost(\n        petsclib,\n        comm,\n        local_length,\n        global_length,\n        num_ghost,\n        ghost,\n        v,\n    )\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, v)\n    end\n    return v\nend\n\nfunction Base.length(v::AbstractVec{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    r_sz = Ref{PetscInt}()\n    LibPETSc.VecGetSize(PetscLib, v, r_sz)\n    return r_sz[]\nend\n\nfunction Base.getindex(v::AbstractVec{PetscLib}, i::Integer) where {PetscLib}\n    vals = [PetscLib.PetscScalar(0)]\n    LibPETSc.VecGetValues(PetscLib, v, 1, Ref{PetscLib.PetscInt}(i - 1), vals)\n    return vals[1]\nend\n\n\"\"\"\n    setvalues!(\n        v::AbstractVec,\n        indices::Vector{PetscInt},\n        vals::Array{PetscScalar},\n        insertmode::InsertMode,\n    )\n\nAssign the values `vals` in 0-based global `indices` of `vec`. The `insertmode`\ncan be `INSERT_VALUES` or `ADD_VALUES`.\n\n!!! warning\n    This function uses 0-based indexing!\n\n# External Links\n$(_doc_external(\"Vec/VecSetValues\"))\n\"\"\"\nfunction setvalues!(\n    v::AbstractVec{PetscLib},\n    idxs0::Vector{PetscInt},\n    vals::Array{PetscScalar},\n    insertmode::InsertMode;\n    num_idxs = length(idxs0),\n) where {PetscLib, PetscInt, PetscScalar}\n    @assert length(vals) >= num_idxs\n    @assert PetscInt == PetscLib.PetscInt\n    @assert PetscScalar == PetscLib.PetscScalar\n    LibPETSc.VecSetValues(PetscLib, v, num_idxs, idxs0, vals, insertmode)\n    return nothing\nend\n\n\"\"\"\n    getvalues!(\n        vals::Array{PetscScalar},\n        v::AbstractVec,\n        indices::Vector{PetscInt},\n    )\n\nGet the 0-based global `indices` of `vec` into the preallocated array `vals`.\n\n!!! warning\n    This function uses 0-based indexing!\n\n# External Links\n$(_doc_external(\"Vec/VecGetValues\"))\n\"\"\"\nfunction getvalues!(\n    vals::Array{PetscScalar},\n    v::AbstractVec{PetscLib},\n    idxs0::Vector{PetscInt};\n    num_idxs = length(idxs0),\n) where {PetscLib, PetscInt, PetscScalar}\n    @assert length(vals) >= num_idxs\n    @assert PetscInt == PetscLib.PetscInt\n    @assert PetscScalar == PetscLib.PetscScalar\n    LibPETSc.VecGetValues(PetscLib, v, num_idxs, idxs0, vals)\n    return nothing\nend\n\nfunction Base.setindex!(\n    v::AbstractVec{PetscLib},\n    val,\n    i::Integer,\n) where {PetscLib}\n    LibPETSc.VecSetValues(\n        PetscLib,\n        v,\n        1,\n        Ref{PetscLib.PetscInt}(i - 1),\n        Ref{PetscLib.PetscScalar}(val),\n        INSERT_VALUES,\n    )\n\n    return val\nend\n\nfunction locallength(v::AbstractVec{PetscLib}) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    r_sz = Ref{PetscInt}()\n    LibPETSc.VecGetLocalSize(PetscLib, v, r_sz)\n    return r_sz[]\nend\n\nfunction LinearAlgebra.norm(\n    v::AbstractVec{PetscLib},\n    normtype::LibPETSc.NormType = LibPETSc.NORM_2,\n) where {PetscLib}\n    PetscReal = PetscLib.PetscReal\n    r_val = Ref{PetscReal}()\n    LibPETSc.VecNorm(PetscLib, v, normtype, r_val)\n    return r_val[]\nend\n\nfunction view(\n    vec::AbstractVec{PetscLib},\n    viewer = LibPETSc.PETSC_VIEWER_STDOUT_(PetscLib, getcomm(vec)),\n) where {PetscLib}\n    LibPETSc.VecView(PetscLib, vec, viewer)\n    return nothing\nend\nBase.show(io::IO, vec::AbstractVec) = _show(io, vec)\nBase.show(io::IO, ::MIME\"text/plain\", vec::AbstractVec) = _show(io, vec)\n\n\"\"\"\n    ownershiprange(vec::AbstractVec, [base_one = true])\n\nThe range of indices owned by this processor, assuming that the `vec` is laid\nout with the first `n1` elements on the first processor, next `n2` elements on\nthe second, etc. For certain parallel layouts this range may not be well\ndefined.\n\nIf the optional argument `base_one == true` then base-1 indexing is used,\notherwise base-0 index is used.\n\n!!! note\n\n    unlike the C function, the range returned is inclusive (`idx_first:idx_last`)\n\n# External Links\n$(_doc_external(\"Vec/VecGetOwnershipRange\"))\n\"\"\"\nfunction ownershiprange(\n    vec::AbstractVec{PetscLib},\n    base_one::Bool = true,\n) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    r_lo = Ref{PetscInt}()\n    r_hi = Ref{PetscInt}()\n    LibPETSc.VecGetOwnershipRange(PetscLib, vec, r_lo, r_hi)\n    return base_one ? ((r_lo[] + PetscInt(1)):(r_hi[])) :\n           ((r_lo[]):(r_hi[] - PetscInt(1)))\nend\n\n\"\"\"\n    unsafe_localarray(vec::AbstractVec; read=true, write=true)\n\nReturn an `Array{PetscScalar}` containing local portion of the PETSc `vec`\n\nUse `read=false` if the array is write-only; `write=false` if read-only.\n\n!!! note\n    `Base.finalize` should be called on the `Array` before the data can be used.\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray\"))\n$(_doc_external(\"Vec/VecGetArrayWrite\"))\n$(_doc_external(\"Vec/VecGetArrayRead\"))\n$(_doc_external(\"Vec/VecRestoreArray\"))\n$(_doc_external(\"Vec/VecRestoreArrayWrite\"))\n$(_doc_external(\"Vec/VecRestoreArrayRead\"))\n\"\"\"\nfunction unsafe_localarray(\n    vec::AbstractVec{PetscLib};\n    read::Bool = true,\n    write::Bool = true,\n) where {PetscLib}\n    PetscScalar = PetscLib.PetscScalar\n    r_pv = Ref{Ptr{PetscScalar}}()\n    if write && read\n        LibPETSc.VecGetArray(PetscLib, vec, r_pv)\n    elseif write\n        LibPETSc.VecGetArrayWrite(PetscLib, vec, r_pv)\n    elseif read\n        LibPETSc.VecGetArrayRead(PetscLib, vec, r_pv)\n    else\n        error(\"either read or write should be true\")\n    end\n    sz = locallength(vec)\n    v = unsafe_wrap(Array, r_pv[], sz; own = false)\n\n    if write && read\n        finalizer(v) do v\n            LibPETSc.VecRestoreArray(PetscLib, vec, Ref(pointer(v)))\n            return nothing\n        end\n    elseif write\n        finalizer(v) do v\n            LibPETSc.VecRestoreArrayWrite(PetscLib, vec, Ref(pointer(v)))\n            return nothing\n        end\n    elseif read\n        finalizer(v) do v\n            LibPETSc.VecRestoreArrayRead(PetscLib, vec, Ref(pointer(v)))\n            return nothing\n        end\n    end\n    return v\nend\n\n\"\"\"\n    withlocalarray!(\n        f!,\n        vecs::NTuple{N, AbstractVec};\n        read::Union{Bool, NTuple{N, Bool}} = true,\n        write::Union{Bool, NTuple{N, Bool}} = true,\n    )\n\nConvert `x` to an `Array{PetscScalar}` using [`unsafe_localarray`](@ref) and\napply the function `f!`.\n\nUse `read=false` if the array is write-only; `write=false` if read-only.\n\n# Examples\n```julia-repl\njulia> withlocalarray!(x; write=true) do x\n   @. x .*= 2\nend\n\njulia> withlocalarray!(\n           x,\n           y;\n           read = (false, true),\n           write = (true, false)\n       ) do x, y\n   @. x .= 2 .+ y\nend\n\n!!! note\n    `Base.finalize` is automatically called on the array.\n\"\"\"\nfunction withlocalarray!(\n    f!,\n    vecs::NTuple{N, AbstractVec};\n    read::Union{Bool, NTuple{N, Bool}} = true,\n    write::Union{Bool, NTuple{N, Bool}} = true,\n) where {N}\n    read isa NTuple{N, Bool} || (read = ntuple(_ -> read, N))\n    write isa NTuple{N, Bool} || (write = ntuple(_ -> write, N))\n\n    arrays = map(vecs, read, write) do v, r, w\n        unsafe_localarray(v; read = r, write = w)\n    end\n    val = f!(arrays...)\n    map(arrays) do array\n        Base.finalize(array)\n    end\n    return val\nend\nwithlocalarray!(f!, vecs...; kwargs...) = withlocalarray!(f!, vecs; kwargs...)\n\n\"\"\"\n    assemblybegin!(vec::AbstractVec)\n\nBegin assembling `vec`\n\n# External Links\n$(_doc_external(\"Vec/VecAssemblyBegin\"))\n\"\"\"\nfunction assemblybegin!(vec::AbstractVec{PetscLib}) where {PetscLib}\n    LibPETSc.VecAssemblyBegin(PetscLib, vec)\n    return nothing\nend\n\n\"\"\"\n    assemblyend!(vec::AbstractVec)\n\nFinish assembling `vec`\n\n# External Links\n$(_doc_external(\"Vec/VecAssemblyEnd\"))\n\"\"\"\nfunction assemblyend!(vec::AbstractVec{PetscLib}) where {PetscLib}\n    LibPETSc.VecAssemblyEnd(PetscLib, vec)\n    return nothing\nend\n\n\"\"\"\n    assemble!(v::AbstractVec)\n\nAssemble the vector `v`.\n\nFor overlapping assembly see [`assemblybegin!`](@ref) and  [`assemblyend!`](@ref)\n\n# External Links\n$(_doc_external(\"Vec/VecAssemblyBegin\"))\n$(_doc_external(\"Vec/VecAssemblyEnd\"))\n\"\"\"\nfunction assemble!(v::AbstractVec)\n    assemblybegin!(v)\n    assemblyend!(v)\n    return v\nend\n\nmutable struct LocalVec{PetscLib, PetscScalar, GVec} <:\n               AbstractVec{PetscLib, PetscScalar}\n    ptr::CVec\n    gvec::GVec\n    age::Int\nend\nfunction LocalVec(gvec::AbstractVec{PetscLib}) where {PetscLib}\n    GVec = typeof(gvec)\n    PetscScalar = PetscLib.PetscScalar\n    LocalVec{PetscLib, PetscScalar, GVec}(C_NULL, gvec, getlib(PetscLib).age)\nend\n\n\"\"\"\n    getlocalform(vec::AbstractVec)\n\nObtains the local ghosted representation of a [`Vec`](@ref).\n\n!!! note\n\n    When done with the object the user should call [`restorelocalform!`](@ref)\n\n# External Links\n$(_doc_external(\"Vec/VecGhostGetLocalForm\"))\n\"\"\"\nfunction getlocalform(gvec::AbstractVec{PetscLib}) where {PetscLib}\n    lvec = LocalVec(gvec)\n    LibPETSc.VecGhostGetLocalForm(PetscLib, gvec, lvec)\n    if lvec.ptr == C_NULL\n        restorelocalform!(lvec)\n        throw(ArgumentError(\"no local form for vector\"))\n    end\n    return lvec\nend\n\n\"\"\"\n    restorelocalform!(local_vec::LocalVec)\n\nRestore the `local_vec` to the associated global vector after a call to\n[`getlocalform`](@ref).\n\n# External Links\n$(_doc_external(\"Vec/VecGhostRestoreLocalForm\"))\n\"\"\"\nfunction restorelocalform!(lvec::LocalVec{PetscLib}) where {PetscLib}\n    LibPETSc.VecGhostRestoreLocalForm(PetscLib, lvec.gvec, lvec)\n    lvec.ptr = C_NULL\n    return lvec.gvec\nend\n\n\"\"\"\n    withlocalform(f::Function, vec::AbstractVec)\n\nConvert `vec` to a `LocalVec` and apply the function `f!`.\n\n```julia-repl\njulia> withlocalform(vec) do l_vec\n   # Do something with l_vec\nend\n```\n\n!!! note\n\n    This wrapper handles the calling of [`restorelocalform!`](@ref) before\n    returning.\n\"\"\"\nfunction withlocalform(f!, vec::AbstractVec)\n    lvec = getlocalform(vec)\n    f!(lvec)\n    restorelocalform!(lvec)\nend\n\n\"\"\"\n    ghostupdatebegin!(\n        vec::AbstractVec,\n        insertmode = INSERT_VALUES,\n        scattermode = SCATTER_FORWARD,\n    )\n\nBegins scattering `vec` to the local or global representations\n\n# External Links\n$(_doc_external(\"Vec/VecGhostUpdateBegin\"))\n\"\"\"\nfunction ghostupdatebegin!(\n    vec::AbstractVec{PetscLib},\n    insertmode = INSERT_VALUES,\n    scattermode = SCATTER_FORWARD,\n) where {PetscLib}\n    LibPETSc.VecGhostUpdateBegin(PetscLib, vec, insertmode, scattermode)\n    return nothing\nend\n\n\"\"\"\n    ghostupdateend!(\n        vec::AbstractVec,\n        insertmode = INSERT_VALUES,\n        scattermode = SCATTER_FORWARD,\n    )\n\nFinishes scattering `vec` to the local or global representations\n\n# External Links\n$(_doc_external(\"Vec/VecGhostUpdateEnd\"))\n\"\"\"\nfunction ghostupdateend!(\n    vec::AbstractVec{PetscLib},\n    insertmode = INSERT_VALUES,\n    scattermode = SCATTER_FORWARD,\n) where {PetscLib}\n    LibPETSc.VecGhostUpdateEnd(PetscLib, vec, insertmode, scattermode)\n    return nothing\nend\n\n\"\"\"\n    getpetsctype(vec::AbstractVec)\n\nreturn a string with the vector type\n\n# External Links\n$(_doc_external(\"Vec/VecGetType\"))\n\"\"\"\nfunction getpetsctype(vec::AbstractVec{PetscLib}) where {PetscLib}\n    name_r = Ref{LibPETSc.VecType}()\n    LibPETSc.VecGetType(PetscLib, vec, name_r)\n    return unsafe_string(name_r[])\nend\n\nfunction Base.similar(v::AbstractVec{PetscLib}) where {PetscLib}\n    r_x = Ref{CVec}()\n    LibPETSc.VecDuplicate(PetscLib, v, r_x)\n    x = VecPtr(PetscLib, r_x[], true)\n    return x\nend\n"
  },
  {
    "path": "src/deprecated/viewer.jl",
    "content": "# ideally we would capture the output directly, but this looks difficult\n# easiest option is to redirect stdout\n# based on suggestion from https://github.com/JuliaLang/julia/issues/32567\nfunction _show(io::IO, obj)\n    old_stdout = stdout\n    rd, = redirect_stdout()\n    # to prevent the pipe from filling up\n    # based on\n    # https://github.com/JuliaDocs/IOCapture.jl/blob/d8b27045cec8953e0e5a8d719ca1692b3a6d0d02/src/IOCapture.jl#L107-L108\n    task = @async write(io, rd)\n    try\n        view(obj)\n\n        Libc.flush_cstdio()\n        flush(stdout)\n    finally\n        close(rd)\n        redirect_stdout(old_stdout)\n        wait(task)\n    end\n    return nothing\nend\n\n#=\nconst CPetscViewer = Ptr{Cvoid}\n\n\"\"\"\n    AbstractViewer{PetscLib <: PetscLibType}\n\nAbstract type of PETSc viewer.\n\n# External Links\n$(_doc_external(\"Viewer/PetscViewer\"))\n\"\"\"\nabstract type AbstractViewer{PetscLib <: PetscLibType} end\n\n\"\"\"\n    ViewerStdout(petsclib, comm = MPI.COMM_SELF)\n\nCreate an ASCII `PetscViewer` for the `comm`\n\n# External Links\n$(_doc_external(\"Viewer/PETSC_VIEWER_STDOUT_\"))\n\"\"\"\nmutable struct ViewerStdout{PetscLib} <: AbstractViewer{PetscLib}\n    ptr::CPetscViewer\nend\n\n@for_petsc function ViewerStdout(\n    ::$UnionPetscLib,\n    comm::MPI.Comm,\n)\n    ptr = ccall(\n        (:PETSC_VIEWER_STDOUT_, $petsc_library),\n        CPetscViewer,\n        (MPI.MPI_Comm,),\n        comm,\n    )\n    return ViewerStdout{$PetscLib}(ptr)\nend\n\n@for_petsc function Base.push!(\n    viewer::AbstractViewer{$PetscLib},\n    format::PetscViewerFormat,\n)\n    @chk ccall(\n        (:PetscViewerPushFormat, $petsc_library),\n        PetscErrorCode,\n        (CPetscViewer, PetscViewerFormat),\n        viewer,\n        format,\n    )\n    return nothing\nend\n\n@for_petsc function Base.pop!(viewer::AbstractViewer{$PetscLib})\n    @chk ccall(\n        (:PetscViewerPopFormat, $petsc_library),\n        PetscErrorCode,\n        (CPetscViewer,),\n        viewer,\n    )\n    return nothing\nend\n\nfunction with(f, viewer::AbstractViewer, format::PetscViewerFormat)\n    push!(viewer, format)\n    try\n        f()\n    finally\n        pop!(viewer)\n    end\nend\n\n# ideally we would capture the output directly, but this looks difficult\n# easiest option is to redirect stdout\n# based on suggestion from https://github.com/JuliaLang/julia/issues/32567\nfunction _show(io::IO, obj)\n    old_stdout = stdout\n    try\n        rd, = redirect_stdout()\n        view(obj)\n\n        # Since not all MPI ranks are guaranteed to print we put in a newline\n        # that we remove with the write since readavailable will hang if there\n        # is no data in the stream\n        println()\n\n        Libc.flush_cstdio()\n        flush(stdout)\n        write(io, readavailable(rd)[1:end-1])\n    finally\n        redirect_stdout(old_stdout)\n    end\n    return nothing\nend\n\n#=\n# PETSc_jll isn't built with X support\nmutable struct ViewerDraw <: AbstractViewer\n    ptr::CPetscViewer\n    comm::MPI.Comm\nend\nfunction ViewerDraw(comm::MPI.Comm)\n    ptr = ccall((:PETSC_VIEWER_DRAW_, libpetsc), CPetscViewer, (MPI.MPI_Comm,), comm)\n    return ViewerDraw(ptr, comm)\nend\n=#\n=#\n"
  },
  {
    "path": "src/dm.jl",
    "content": "import .LibPETSc: AbstractPetscDM, PetscDM, CDM\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::AbstractPetscDM{PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        print(io, \"PETSc DM (null pointer)\")\n        return\n    end\n    \n    # Try to get DM info, but handle uninitialized DMs gracefully\n    try\n        ty = LibPETSc.DMGetType(PetscLib, v)\n        di = LibPETSc.DMGetDimension(PetscLib, v)\n        print(io, \"PETSc DM $ty object in $di dimensions\")\n    catch\n        # DM not fully initialized yet (type not set)\n        print(io, \"PETSc DM (not yet initialized)\")\n    end\n    return nothing\nend\n\n\n\"\"\"\n    destroy(dm::AbstractPetscDM)\n\nDestroy a DM object and release associated resources.\n\nThis function is typically called automatically via finalizers when the object\nis garbage collected, but can be called explicitly to free resources immediately.\n\n# External Links\n$(_doc_external(\"DM/DMDestroy\"))\n\"\"\"\nfunction destroy(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) && dm.ptr != C_NULL \n        LibPETSc.DMDestroy(PetscLib, dm)\n    end\n    dm.ptr = C_NULL\n    return nothing\nend\n\n\n\n\"\"\"\n    getinfo(dm::AbstractPetscDM)\n\nGet information about a DMDA.\n\n# Returns\n\nA `NamedTuple` with the following fields:\n- `dim`: Dimension of the `DMDA` (1, 2, or 3)\n- `global_size`: Tuple with global dimensions in each direction of the array\n- `mpi_proc_size`: Tuple with number of MPI processes in each direction\n- `dof`: Degrees of freedom per node\n- `stencil_width`: Width of the stencil\n- `boundary_type`: Tuple with boundary types in each direction\n- `stencil_type`: Stencil type, either `DMDA_STENCIL_STAR` or `DMDA_STENCIL_BOX`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetInfo\"))\n\"\"\"\nfunction getinfo(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n\n    dim, M, N, P, m, n, p, dof, s, bx, by, bz, st = LibPETSc.DMDAGetInfo(PetscLib, dm)\n    global_size   = (M,N,P)\n    mpi_proc_size = (m,n,p)\n    boundary_type = (bx,by,bz)\n    stencil_width = s\n    stencil_type  = st\n               \n\n\treturn (;dim,global_size,mpi_proc_size,dof,s,boundary_type,stencil_width,stencil_type)\nend\n\n\"\"\"\n    lower, upper, size = getcorners_dmda(da::AbstractDMDA)\n\nReturns a `NamedTuple` with the global indices (excluding ghost points) of the\n`lower` and `upper` corners as well as the `size`.\n\n\nCalls `LibPETSc.DMDAGetCorners`.\n\"\"\"\nfunction getcorners_dmda(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    xs, ys, zs, xm, ym, zm = LibPETSc.DMDAGetCorners(PetscLib, dm)\n    corners = [PetscInt(xs), PetscInt(ys), PetscInt(zs)]\n    local_size = [PetscInt(xm), PetscInt(ym), PetscInt(zm)]\n    \n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n    )\nend\n\n\n\"\"\"\n    lower, upper, size = getcorners(da::AbstractDMDA)\n\nReturns a `NamedTuple` with the global indices (excluding ghost points) of the\n`lower` and `upper` corners as well as the `size`. \nWorks for both a DMDA and DMStag object\n\"\"\"\nfunction getcorners(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    type = gettype(dm)\n    if type == \"da\"\n        return getcorners_dmda(dm)\n    elseif type == \"stag\"\n        return getcorners_dmstag(dm)\n    else\n        error(\"getcorners only works for DMDA and DMStag objects\")\n    end\nend\n\n\"\"\"\n    lower, upper, size = getghostcorners(da::AbstractDMDA)\n\nReturns a `NamedTuple` with the global indices (including ghost points) of the\n`lower` and `upper` corners as well as the `size`. \nWorks for both a `DMDA` and `DMStag` object\n\"\"\"\nfunction getghostcorners(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    type = gettype(dm)\n    if type == \"da\"\n        return getghostcorners_dmda(dm)\n    elseif type == \"stag\"\n        return getghostcorners_dmstag(dm)\n    else\n        error(\"getghostcorners only works for DMDA and DMStag objects\")\n    end\nend\n\n\"\"\"\n    lower, upper, size = getghostcorners_dmda(da::AbstractDMDA)\n\nReturns a `NamedTuple` with the global indices (including ghost points) of the\n`lower` and `upper` corners as well as the `size` of the local part of the domain.\n\nCalls `LibPETSc.DMDAGetCorners`.\n\"\"\"\nfunction getghostcorners_dmda(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    xs, ys, zs, xm, ym, zm = LibPETSc.DMDAGetGhostCorners(PetscLib, dm)\n    corners = [PetscInt(xs), PetscInt(ys), PetscInt(zs)]\n    local_size = [PetscInt(xm), PetscInt(ym), PetscInt(zm)]\n    \n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n    )\nend\n\n\n\"\"\"\n    setup!(dm::DM)\n\n# External Links\n$(_doc_external(\"DM/DMSetUp\"))\n\"\"\"\nsetup!(dm::AbstractPetscDM{PetscLib}) where {PetscLib} = LibPETSc.DMSetUp(PetscLib, dm)\n\n\n\"\"\"\n    setfromoptions!(dm::AbstractPetscDM)\n\nSets the global options to the `dm`    \n# External Links\n$(_doc_external(\"DM/DMSetFromOptions\"))\n\"\"\"\nsetfromoptions!(dm::AbstractPetscDM{PetscLib}) where {PetscLib} = LibPETSc.DMSetFromOptions(PetscLib, dm)\n\n\n\n\"\"\"\n    empty(da::AbstractPetscDM)\n\nreturn an uninitialized `DMDA` struct.\n\"\"\"\nBase.empty(da::AbstractPetscDM{PetscLib}) where {PetscLib} = PetscDM{PetscLib}(C_NULL, da.age)\n\n\n\"\"\"\n    v::PetscVec = DMLocalVec(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n\nReturns a local vector `v` from the `dm` object.\n\"\"\"\nDMLocalVec(dm::AbstractPetscDM{PetscLib}) where {PetscLib} = LibPETSc.DMCreateLocalVector(getlib(PetscLib), dm)\n\n\"\"\"\n    v::PetscVec = DMGlobalVec(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n\nReturns a global vector `v` from the `dm` object.\n\"\"\"\nDMGlobalVec(dm::AbstractPetscDM{PetscLib}) where {PetscLib} = LibPETSc.DMCreateGlobalVector(getlib(PetscLib), dm)\n\n\"\"\"\n    dm_local_to_global!(local_vec, global_vec, dm, mode = INSERT_VALUES)\n\nTransfer values from the `local_vec` to the `global_vec` associated with the `dm` object.\n\n# Arguments\n- `local_vec::AbstractPetscVec`: Local vector (source)\n- `global_vec::AbstractPetscVec`: Global vector (destination)\n- `dm::AbstractPetscDM`: DM object\n- `mode::InsertMode`: Insert mode, either `INSERT_VALUES` or `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobal\"))\n\n\"\"\"\nfunction dm_local_to_global!(   local_vec::AbstractPetscVec{PetscLib},\n                                global_vec::AbstractPetscVec{PetscLib},\n                                   dm::AbstractPetscDM{PetscLib},\n                                   mode::InsertMode = INSERT_VALUES) where {PetscLib}\n\n    LibPETSc.DMLocalToGlobalBegin(PetscLib, dm, local_vec, mode, global_vec)\n    LibPETSc.DMLocalToGlobalEnd(PetscLib, dm, local_vec,  mode, global_vec)\n    return nothing\nend\n\n\n\"\"\"\n    dm_global_to_local!(global_vec, local_vec, dm, mode = INSERT_VALUES)\n\nTransfer values from the `global_vec` to the `local_vec` associated with the `dm` object,\nincluding ghost point values from neighboring processes.\n\n# Arguments\n- `global_vec::AbstractPetscVec`: Global vector (source)\n- `local_vec::AbstractPetscVec`: Local vector (destination)\n- `dm::AbstractPetscDM`: DM object\n- `mode::InsertMode`: Insert mode, either `INSERT_VALUES` or `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobal\"))\n\"\"\"\nfunction dm_global_to_local!(global_vec::AbstractPetscVec{PetscLib},\n                              local_vec::AbstractPetscVec{PetscLib},\n                                     dm::AbstractPetscDM{PetscLib},\n                                   mode::InsertMode = INSERT_VALUES) where {PetscLib}\n\n    LibPETSc.DMGlobalToLocalBegin(getlib(PetscLib), dm, global_vec, mode, local_vec)\n    LibPETSc.DMGlobalToLocalEnd(getlib(PetscLib), dm, global_vec,  mode, local_vec)\n    return nothing\nend\n\n\n\"\"\"\n    setuniformcoordinates!(\n        da::DMDA\n        xyzmin::NTuple{N, Real},\n        xyzmax::NTuple{N, Real},\n    ) where {N}\n\nSet uniform coordinates for the `da` using the lower and upper corners defined\nby the `NTuple`s `xyzmin` and `xyzmax`. If `N` is less than the dimension of the\n`da` then the value of the trailing coordinates is set to `0`.\n\n# External Links\n$(_doc_external(\"DMDA/DMDASetUniformCoordinates\"))\n\"\"\"\nfunction setuniformcoordinates_dmda!(\n    da::PetscDM{PetscLib},\n    xyzmin::NTuple{N, Real},\n    xyzmax::NTuple{N, Real},\n) where {N, PetscLib}\n    @assert gettype(da) == \"da\" \"setuniformcoordinates_dmda! only works for DMDA objects\"\n    PetscReal = PetscLib.PetscReal\n    xmin = PetscReal(xyzmin[1])\n    xmax = PetscReal(xyzmax[1])\n\n    ymin = (N > 1) ? PetscReal(xyzmin[2]) : PetscReal(0)\n    ymax = (N > 1) ? PetscReal(xyzmax[2]) : PetscReal(0)\n\n    zmin = (N > 2) ? PetscReal(xyzmin[3]) : PetscReal(0)\n    zmax = (N > 2) ? PetscReal(xyzmax[3]) : PetscReal(0)\n\n\n    LibPETSc.DMDASetUniformCoordinates(\n        PetscLib,\n        da,\n        xmin,\n        xmax,\n        ymin,\n        ymax,\n        zmin,\n        zmax,\n    )\n    return da\nend\n\n\"\"\"\n    coordinatesDMLocalVec(dm::AbstractDM)\n\nGets a local vector with the coordinates associated with `dm`.\n\nNote that the returned vector is borrowed from the `dm` and is not a new vector.\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocal\"))\n\"\"\"\nfunction coordinatesDMLocalVec(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    petsclib = getlib(PetscLib)\n    coord_vec = DMLocalVec(dm)\n    LibPETSc.DMGetCoordinatesLocal(PetscLib, dm, coord_vec)\n\n    return coord_vec\nend\n\n\"\"\"\n    getlocalcoordinatearray(da::AbstractPetscDM)\n\nReturn coordinate arrays for the local portion of the domain.\n\nThe returned arrays are `OffsetArray`s that can be addressed using global indices,\naccounting for ghost points.\n\n# External Links\n$(_doc_external(\"DM/DMGetCoordinatesLocal\"))\n\"\"\"\nfunction getlocalcoordinatearray(da::AbstractPetscDM{PetscLib}) where {PetscLib}\n    # retrieve local coordinates\n    coord_vec = coordinatesDMLocalVec(da)\n    # array\n    array1D = unsafe_localarray(coord_vec; read = true, write = false)\n    dim = [PetscLib.PetscInt(0)]\n    dim = LibPETSc.DMGetCoordinateDim(PetscLib, da)\n    dim = dim[1]\n    corners = getghostcorners(da)\n\n    return reshapelocalarray(array1D, da, dim)\nend\n\n\ngettype(dm::PetscDM{PetscLib}) where {PetscLib} = LibPETSc.DMGetType(PetscLib,dm)\n\n\"\"\"\n    getdimension(dm::AbstractPetscDM)\n\nReturn the topological dimension of the `dm`\n\n# External Links\n$(_doc_external(\"DM/DMGetDimension\"))\n\"\"\"\ngetdimension(dm::AbstractPetscDM{PetscLib}) where PetscLib = LibPETSc.DMGetDimension(PetscLib,dm)\n\n\n\"\"\"\n    size(dm::AbstractPetscDM)\n\nReturn the global size of a DM object as a tuple.\n\nFor DMDA and DMStag, returns `(M, N, P)` where unused dimensions are 1.\n\"\"\"\nfunction Base.size(dm::AbstractPetscDM{PetscLib}) where PetscLib\n    if gettype(dm) == \"stag\"\n        size = LibPETSc.DMStagGetGlobalSizes(PetscLib,dm)\n    elseif gettype(dm) == \"da\"\n        dim, M,N,P,_ = LibPETSc.DMDAGetInfo(PetscLib, dm)\n        size = (M,N,P)\n    else\n        error(\"Size not defined for DMStag objects. Use getinfo(dm).global_size instead.\")\n    end\n    return size\nend\n\n#=\n\"\"\"\n    dm_local_to_global(dm, x_L, x_G, mode = INSERT_VALUES)\n\nTransfer values from the local vector `x_L` to the global vector `x_G`.\n\n# Arguments\n- `dm`: The DM object\n- `x_L`: Local vector (source)\n- `x_G`: Global vector (destination)\n- `mode`: `INSERT_VALUES` (default) or `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"DM/DMLocalToGlobal\"))\n\"\"\"\nfunction dm_local_to_global(dm::PetscDM{PetscLib},\n                             x_L::AbstractPetscVec{PetscLib},\n                             x_G::AbstractPetscVec{PetscLib}, \n                             mode=LibPETSc.INSERT_VALUES) where {PetscLib}\n    \n    petsclib = getlib(PetscLib)\n    LibPETSc.DMLocalToGlobalBegin(petsclib, dm, x_L, mode, x_G)\n    LibPETSc.DMLocalToGlobalEnd(petsclib, dm, x_L, mode, x_G)\n    \n    return nothing\nend\n=#\n#=\n\"\"\"\n    dm_global_to_local(dm, x_G, x_L, mode = INSERT_VALUES)\n\nTransfer values from the global vector `x_G` to the local vector `x_L`,\nincluding ghost point values from neighboring processes.\n\n# Arguments\n- `dm`: The DM object\n- `x_G`: Global vector (source)\n- `x_L`: Local vector (destination)\n- `mode`: `INSERT_VALUES` (default) or `ADD_VALUES`\n\n# External Links\n$(_doc_external(\"DM/DMGlobalToLocal\"))\n\"\"\"\nfunction dm_global_to_local(dm::PetscDM{PetscLib},\n                             x_G::AbstractPetscVec{PetscLib},\n                             x_L::AbstractPetscVec{PetscLib}, \n                             mode=LibPETSc.INSERT_VALUES) where {PetscLib}\n    \n    petsclib = getlib(PetscLib)\n    LibPETSc.DMGlobalToLocalBegin(petsclib, dm, x_G, mode, x_L)\n    LibPETSc.DMGlobalToLocalEnd(petsclib, dm, x_G, mode, x_L)\n\n    return nothing\nend\n=#\n\n\"\"\"\n    MatAIJ(da::AbstractPetscDM)\n\nCreate a sparse matrix (AIJ format) with sparsity pattern determined by the DM.\n\n# Returns\n\nA `PetscMat` object compatible with vectors from the DM.\n\n# External Links\n$(_doc_external(\"DM/DMCreateMatrix\"))\n\"\"\"\nfunction MatAIJ(da::AbstractPetscDM{PetscLib}) where {PetscLib}\n    J = LibPETSc.DMCreateMatrix(getlib(PetscLib), da)\n    return J\nend\n"
  },
  {
    "path": "src/dmda.jl",
    "content": "import .LibPETSc: AbstractPetscDM, PetscDM, CDM\n\n\n\"\"\"\n    DMDA(\n        petsclib::PetscLib\n        comm::MPI.Comm,\n        boundary_type::NTuple{D, DMBoundaryType},\n        global_dim::NTuple{D, Integer},\n        dof_per_node::Integer,\n        stencil_width::Integer,\n        stencil_type;\n        points_per_proc::Tuple,\n        processors::Tuple,\n        setfromoptions = true,\n        dmsetup = true,\n        prefix = \"\",\n        options...\n    )\n\nCreates a `D`-dimensional distributed array with the options specified using\nkeyword arguments.\n\nIf keyword argument `points_per_proc[k] isa Vector{petsclib.PetscInt}` then this\nspecifies the points per processor in dimension `k`.\n\nIf keyword argument `processors[k] isa Integer` then this specifies the number of\nprocessors used in dimension `k`; ignored when `D == 1`.\n\nIf keyword argument `setfromoptions == true` then `setfromoptions!` called.\n\nIf keyword argument `dmsetup == true` then `setup!` is called.\n\nWhen `D == 1` the `stencil_type` argument is not required and ignored if specified.\n\n# External Links\n$(_doc_external(\"DMDA/DMDACreate1d\"))\n$(_doc_external(\"DMDA/DMDACreate2d\"))\n$(_doc_external(\"DMDA/DMDACreate3d\"))\n\"\"\"\nfunction DMDA(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{N, DMBoundaryType},\n    global_dim::NTuple{N, Integer},\n    dof_per_node::Integer,\n    stencil_width::Integer,\n    stencil_type = nothing;\n    points_per_proc::Union{Tuple, Nothing} = nothing,\n    processors = nothing,\n    setfromoptions = true,\n    dmsetup = true,\n    prefix = \"\",\n    options...,\n) where {PetscLib, N}\n    PetscInt = inttype(PetscLib)\n    opts = Options(petsclib; options...)\n\n    if isnothing(points_per_proc)\n        points_per_proc = ntuple(_ -> nothing, N)\n    end\n    if isnothing(processors)\n        processors = ntuple(_ -> PETSC_DECIDE, N)\n    end\n\n    ref_points_per_proc = ntuple(N) do d\n        if isnothing(points_per_proc[d]) || points_per_proc[d] == PETSC_DECIDE\n            C_NULL\n        else\n            @assert points_per_proc[d] isa Array{PetscLib.PetscInt}\n            @assert length(points_per_proc[d]) == MPI.Comm_size(comm)\n            points_per_proc[d]\n        end\n    end\n    \n    if N==1  \n        da = LibPETSc.DMDACreate1d(petsclib,\n                                   comm, \n                                   boundary_type[1], \n                                   PetscInt(global_dim[1]), \n                                   PetscInt(dof_per_node), \n                                   PetscInt(stencil_width), \n                                   ref_points_per_proc[1]\n                                   )\n    elseif N==2\n        da =   LibPETSc.DMDACreate2d(\n                                    petsclib,\n                                    comm,\n                                    boundary_type[1], boundary_type[2],\n                                    stencil_type,\n                                    PetscInt(global_dim[1]), PetscInt(global_dim[2]),\n                                    PetscInt(processors[1]), PetscInt(processors[2]),\n                                    PetscInt(dof_per_node),\n                                    PetscInt(stencil_width),\n                                    ref_points_per_proc[1], ref_points_per_proc[2]\n                                )                                    \n     elseif N==3\n        da =   LibPETSc.DMDACreate3d(\n                                    petsclib,\n                                    comm,\n                                    boundary_type[1], boundary_type[2], boundary_type[3],\n                                    stencil_type,\n                                    PetscInt(global_dim[1]), PetscInt(global_dim[2]), PetscInt(global_dim[3]),\n                                     PetscInt(processors[1]), PetscInt(processors[2]), PetscInt(processors[3]),\n                                    PetscInt(dof_per_node),\n                                    PetscInt(stencil_width),\n                                    ref_points_per_proc[1], ref_points_per_proc[2], ref_points_per_proc[3]\n                                )                    \n    end\n\n    if !isempty(prefix)\n        # options prefix\n        LibPETSc.DMSetOptionsPrefix(petsclib, da, prefix)\n    end\n\n    if setfromoptions\n        # set options (if any)\n        opts = PETSc.Options(petsclib; options...);\n        push!(opts)\n        LibPETSc.DMSetFromOptions(PetscLib, da)\n        pop!(opts)\n    end\n    \n    if dmsetup\n        # initialize dmda\n        setup!(da)            \n    end\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, da)\n    end\n    return da\nend\n\n\"\"\"\n    ndofs(da::AbstractPetscDM)\n\nReturn the number of dofs in for `da`\n\n# External Links\n$(_doc_external(\"DMDA/DMDAGetDof\"))\n\"\"\"\nfunction ndofs(da::AbstractPetscDM{PetscLib}) where PetscLib\n    PetscInt = PetscLib.PetscInt\n    ndof = [PetscInt(0)]\n\n    # number of DOF that the DMDA has\n    ndof = LibPETSc.DMDAGetDof(PetscLib, da)\n    return @inbounds ndof[1]\nend\n\n\n\"\"\"\n    reshapelocalarray(Arr, da::AbstractPetscDM{PetscLib}, ndof = ndofs(da))\n\nReturns an array with the same data as `Arr` but reshaped as an array that can\nbe addressed with global indexing.\n\"\"\"\nfunction reshapelocalarray(\n    Arr,\n    da::AbstractPetscDM{PetscLib},\n    ndof::Integer = ndofs(da),\n) where {PetscLib}\n\n    # First we try to use a ghosted size\n    corners = getghostcorners(da)\n    # If this is two big for the array use non-ghosted\n    if length(Arr) < prod(corners.size) * ndof\n        corners = getcorners(da)\n    end\n    @assert length(Arr) == prod(corners.size) * ndof\n\n    oArr = OffsetArray(\n        reshape(Arr, Int64(ndof), Int64.(corners.size)...),\n        1:ndof,\n        (corners.lower[1]):(corners.upper[1]),\n        (corners.lower[2]):(corners.upper[2]),\n        (corners.lower[3]):(corners.upper[3]),\n    )\n\n    return oArr\nend\n\n\"\"\"\n    ind = localinteriorlinearindex(dmda::AbstractPetscDM)\n\nReturns the linear indices associated with the degrees of freedom own by this MPI rank embedded in the ghost index space for the `dmda`\n\"\"\"\nfunction localinteriorlinearindex(da::AbstractPetscDM{PetscLib}) where PetscLib\n    # Determine the indices of the linear indices of the local part of the\n    # matrix we own\n    @assert gettype(da) == \"da\" \n    ghost_corners = PETSc.getghostcorners(da)\n    corners = PETSc.getcorners(da)\n\n    # First compute the Cartesian indices for the local portion we own\n    offset = ghost_corners.lower - CartesianIndex(1, 1, 1)\n    l_inds = ((corners.lower):(corners.upper)) .- offset\n\n    # Create a grid of indices with ghost then extract only the local part\n    lower = CartesianIndex(1, ghost_corners.lower)\n    upper = CartesianIndex(ndofs(da), ghost_corners.upper)\n    ind_local = LinearIndices(lower:upper)[:, l_inds][:]\n    return ind_local\nend"
  },
  {
    "path": "src/dmstag.jl",
    "content": "\n\n# Helper to convert points_per_proc tuples to PetscInt\nto_petscint_tuple(t::Tuple, PetscInt) = map(arr -> PetscInt.(arr), t)\n\n\"\"\"\n    da = DMStag(\n        petsclib::PetscLib\n        comm::MPI.Comm,\n        boundary_type::NTuple{D, DMBoundaryType},\n        global_dim::NTuple{D, Integer},\n        dof_per_node::NTuple{1 + D, Integer},\n        stencil_width::Integer,\n        stencil_type;\n        points_per_proc::Tuple,\n        processors::Tuple,\n        setfromoptions = true,\n        dmsetup = true,\n        prefix = \"\",\n        options...\n    )\n\nCreates a `D`-dimensional distributed staggered array with the options specified\nusing keyword arguments.\n\nThe Tuple `dof_per_node` specifies how many degrees of freedom are at all the\nstaggerings in the order:\n - 1D: `(vertex, element)`\n - 2D: `(vertex, edge, element)`\n - 3D: `(vertex, edge, face, element)`\n\nIf keyword argument `points_per_proc[k] isa Vector{petsclib.PetscInt}` then this\nspecifies the points per processor in dimension `k`.\n\nIf keyword argument `processors[k] isa Integer` then this specifies the number of\nprocessors used in dimension `k`; ignored when `D == 1`.\n\nIf keyword argument `setfromoptions == true` then `setfromoptions!` called.\n\nIf keyword argument `dmsetup == true` then `setup!` is called.\n\nWhen `D == 1` the `stencil_type` argument is not required and ignored if\nspecified.\n\n# External Links\n$(_doc_external(\"DMStag/DMStagCreate1d\"))\n$(_doc_external(\"DMStag/DMStagCreate2d\"))\n$(_doc_external(\"DMStag/DMStagCreate3d\"))\n\"\"\"\nfunction DMStag(\n    petsclib::PetscLib,\n    comm::MPI.Comm,\n    boundary_type::NTuple{N, DMBoundaryType},\n    global_dim::NTuple{N, Integer},\n    dof_per_node::NTuple{N1, Integer},\n    stencil_width::Integer,\n    stencil_type = DMSTAG_STENCIL_BOX;\n    points_per_proc::Union{Tuple, Nothing} = nothing,\n    processors = nothing,\n    setfromoptions = true,\n    dmsetup = true,\n    prefix = \"\",\n    options...,\n) where {PetscLib, N, N1}\n    @assert N1 == N + 1 \"dof_per_node should have length N + 1\"\n    PetscInt = inttype(PetscLib)\n    opts = Options(petsclib; options...)\n\n    if isnothing(points_per_proc)\n        points_per_proc = ntuple(_ -> nothing, N)\n    end\n    if isnothing(processors)\n        processors = ntuple(_ -> PETSC_DECIDE, N)\n    end\n\n    ref_points_per_proc = ntuple(N) do d\n        if isnothing(points_per_proc[d]) || points_per_proc[d] == PETSC_DECIDE\n            C_NULL\n        else\n            @assert points_per_proc[d] isa Array\n            @assert length(points_per_proc[d]) == MPI.Comm_size(comm)\n            points_per_proc[d]\n        end\n    end\n   # ref_points_per_proc = to_petscint_tuple(ref_points_per_proc, PetscInt)  \n\n    if N==1  \n        da = LibPETSc.DMStagCreate1d(petsclib,\n                                   comm, \n                                   boundary_type[1], \n                                   PetscInt(global_dim[1]), \n                                   PetscInt(dof_per_node[1]), \n                                   PetscInt(dof_per_node[2]), \n                                   stencil_type,\n                                   PetscInt(stencil_width), \n                                   ref_points_per_proc[1]\n                                   )\n    elseif N==2\n        da =   LibPETSc.DMStagCreate2d(\n                                    petsclib,\n                                    comm,\n                                    boundary_type[1], boundary_type[2],\n                                    PetscInt(global_dim[1]), PetscInt(global_dim[2]),\n                                    PetscInt(processors[1]), PetscInt(processors[2]),\n                                    PetscInt(dof_per_node[1]), \n                                    PetscInt(dof_per_node[2]),\n                                    PetscInt(dof_per_node[3]), \n                                    stencil_type,\n                                    PetscInt(stencil_width),\n                                    ref_points_per_proc[1], ref_points_per_proc[2]\n                                )                                    \n     elseif N==3\n        da =   LibPETSc.DMStagCreate3d(\n                                    petsclib,\n                                    comm,\n                                    boundary_type[1], boundary_type[2], boundary_type[3],\n                                    PetscInt(global_dim[1]), PetscInt(global_dim[2]), PetscInt(global_dim[3]),\n                                    PetscInt(processors[1]), PetscInt(processors[2]), PetscInt(processors[3]),\n                                    PetscInt(dof_per_node[1]), \n                                    PetscInt(dof_per_node[2]),\n                                    PetscInt(dof_per_node[3]),\n                                    PetscInt(dof_per_node[4]), \n                                    stencil_type,\n                                    PetscInt(stencil_width),\n                                    ref_points_per_proc[1], ref_points_per_proc[2], ref_points_per_proc[3]\n                                )                    \n    end\n\n    if !isempty(prefix)\n        # options prefix\n        LibPETSc.DMSetOptionsPrefix(petsclib, da, prefix)\n    end\n\n    if setfromoptions\n        # set options (if any)\n        opts = PETSc.Options(petsclib; options...);\n        push!(opts)\n        LibPETSc.DMSetFromOptions(PetscLib, da)\n        pop!(opts)\n    end\n    \n    if dmsetup\n        # initialize dmda\n        setup!(da)            \n    end\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, da)\n    end\n    return da\nend\n\n\nfunction DMStag(\n    dm::AbstractPetscDM{PetscLib},\n    dof_per_node::Union{NTuple{2,Int},NTuple{3,Int},NTuple{4,Int}},\n    dmsetfromoptions = true,\n    dmsetup = true,\n    options...,\n) where {PetscLib}\n    @assert  PETSc.gettype(dm) == \"stag\" \"DM must be of type DMStag\"\n    petsclib = getlib(PetscLib)\n    PetscInt = petsclib.PetscInt\n    dmnew = PetscDM{PetscLib}(C_NULL, petsclib.age)\n\n    s = size(dof_per_node,1)\n\n    dof_per_node_C = [0,0,0,0]\n\n    for (i, value) in enumerate(dof_per_node)\n        dof_per_node_C[i] = value\n    end\n\n\n    #with(dm.opts) do\n    dmnew =  LibPETSc.DMStagCreateCompatibleDMStag(\n                    PetscLib,\n                    dm,\n                    PetscInt(dof_per_node_C[1]),\n                    PetscInt(dof_per_node_C[2]),\n                    PetscInt(dof_per_node_C[3]),\n                    PetscInt(dof_per_node_C[4]),\n                    )\n    #end\n\n    #=\n    dmsetfromoptions && setfromoptions!(dmnew)\n    dmsetup && setup!(dmnew)\n\n    =#\n    comm  = getcomm(dm);\n\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, dmnew)\n    end    \n\n    return dmnew\nend\n\n\n#Base.size(dm::AbstractDMStag) = DMStagGetGlobalSizes(dm)\n#globalsize(dm::AbstractDMStag) = DMStagGetGlobalSizes(dm::AbstractDMStag)\n#boundarytypes(dm::AbstractDMStag)  = DMStagGetBoundaryTypes(dm::AbstractDMStag) \n\n\"\"\"\n    setuniformcoordinates_stag!(\n        dm::AbstractDMStag,\n        xyzmin::Union{NTuple{1,Int},NTuple{2,Int},NTuple{3,Int}},\n        xyzmax::Union{NTuple{1,Int},NTuple{2,Int},NTuple{3,Int}},\n    )\n\nSets uniform coordinates for the DMStag `dm` in the range specified by `xyzmin` and `xyzmax`.\n\"\"\"\nfunction setuniformcoordinates_stag!(\n    dm::AbstractPetscDM{PetscLib},\n    xyzmin::NTuple,\n    xyzmax::NTuple,\n    ) where {PetscLib}\n    @assert PETSc.gettype(dm) == \"stag\" \"DM must be of type DMStag\"\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n\n    xmin = PetscScalar(xyzmin[1])\n    xmax = PetscScalar(xyzmax[1])\n\n    s = size(xyzmin,1)\n\n    ymin = (s > 1) ? PetscScalar(xyzmin[2]) : PetscScalar(0)\n    ymax = (s > 1) ? PetscScalar(xyzmax[2]) : PetscScalar(0)\n\n    zmin = (s > 2) ? PetscScalar(xyzmin[3]) : PetscScalar(0)\n    zmax = (s > 2) ? PetscScalar(xyzmax[3]) : PetscScalar(0)\n    \n    #=\n    LibPETSc.DMStagSetUniformCoordinatesProduct(\n        getlib(PetscLib),\n        dm,\n        xmin,\n        xmax,\n        ymin,\n        ymax,\n        zmin,\n        zmax,\n    )\n    =#\n    petsclib=getlib(PetscLib)\n    LibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dm, xmin, xmax, ymin, ymax, zmin, zmax)\n\n    return nothing\nend\n\n\"\"\"\n    corners = getcorners_dmstag(dm::AbstractPetscDM)\n\nReturns a `NamedTuple` with the global indices (excluding ghost points) of the\n`lower` and `upper` corners as well as the `size`. Also included is `nextra` of\nthe number of extra partial elements in each direction.\n\n# External Links\n$(_doc_external(\"DMDA/DMStagGetCorners\"))\n\"\"\"\nfunction getcorners_dmstag(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    @assert PETSc.gettype(dm) == \"stag\" \"DM must be of type DMStag\"\n    PetscInt = PetscLib.PetscInt\n    x,y,z,m,n,p,nExtrax,nExtray,nExtraz = LibPETSc.DMStagGetCorners(PetscLib, dm)\n\n    corners = [x,y,z]\n    local_size = [m,n,p]\n    nextra = [nExtrax,nExtray,nExtraz]\n\n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n        nextra = (nextra...,)\n    )\nend\n\n\n\"\"\"\n    corners = getghostcorners_dmstag(dm::AbstractPetscDM)\n\nReturns a `NamedTuple` with the global indices (including ghost points) of the\n`lower` and `upper` corners as well as the `size`. Also included is `nextra` of\nthe number of extra partial elements in each direction.\n\n# External Links\n$(_doc_external(\"DMDA/DMStagGetCorners\"))\n\"\"\"\nfunction getghostcorners_dmstag(dm::AbstractPetscDM{PetscLib}) where {PetscLib}\n    @assert PETSc.gettype(dm) == \"stag\" \"DM must be of type DMStag\"\n    PetscInt = PetscLib.PetscInt\n    x,y,z,m,n,p = LibPETSc.DMStagGetGhostCorners(PetscLib, dm)\n\n    corners = [x,y,z]\n    local_size = [m,n,p]\n\n    corners .+= 1\n    upper = corners .+ local_size .- PetscInt(1)\n    return (\n        lower = CartesianIndex(corners...),\n        upper = CartesianIndex(upper...),\n        size = (local_size...,),\n    )\nend\n\n\n\"\"\"\n    DMStagGetIndices(dm::DMStag)\n\nReturn indices for the central/vertex nodes of a local array built from the input `dm`.\nThis takes ghost points into account and provides index ranges for accessing staggered data.\n\n# Returns\n\nA `NamedTuple` with:\n- `center`: Tuple of ranges `(x, y, z)` for cell-centered indices\n- `vertex`: Tuple of ranges `(x, y, z)` for vertex indices\n\n# Note\n\nIn Julia, array indices start at 1, whereas PETSc uses 0-based indexing with\npossibly negative ghost indices. This function handles the conversion automatically.\n\"\"\"\nfunction DMStagGetIndices end\n\nfunction DMStagGetIndices(dm::PetscDM{PetscLib}) where {PetscLib}\n    @assert PETSc.gettype(dm) == \"stag\" \"DM must be of type DMStag\" \n    # In Julia, indices in arrays start @ 1, whereas they can go negative in C\n    gc              =   PETSc.getghostcorners_dmstag(dm);  \n    c               =   PETSc.getcorners_dmstag(dm); \n\n    # If we have ghosted boundaries, we need to shift the start/end points, as ghosted \n    # boundaries are treated in PETSc with negative numbers, whereas in Julia everything is 1-based\n\n    # NOTE: we have not yet tested this in parallel\n    Diff            =   c.lower - gc.lower;\n    Start           =   c.lower + Diff;\n    End             =   Start + CartesianIndex(c.size) -  CartesianIndex(1,1,1) ;\n    Nextra          =   c.nextra\n\n    # Note that we add the shift for julia/petsc consistency\n    shift = 0;\n    center = (  x= Start[1]:End[1],\n                y= Start[2]:End[2],  \n                z= Start[3]:End[3] )\n\n    vertex = (  x= Start[1]:End[1]+Nextra[1] ,\n                y= Start[2]:End[2]+Nextra[2] ,  \n                z= Start[3]:End[3]+Nextra[3] )\n\n    return (center=center, vertex=vertex)\n            \nend\n\n\n\"\"\"\n    slot::Int = DMStagDOF_Slot(dm::PetscDM{PetscLib}, loc::LibPETSc.DMStagStencilLocation, dof::Int) \n\nReturns the location `slot` for a degree of freedom `dof` at a given stencil location `loc` in the DMStag `dm`.\nNote that the returned `slot` is 1-based for Julia compatibility.    \n\"\"\"\nfunction DMStagDOF_Slot(dm::PetscDM{PetscLib}, loc::LibPETSc.DMStagStencilLocation, dof::Int) where {PetscLib} \n    @assert PETSc.gettype(dm) == \"stag\" \"DM must be of type DMStag\" \n\n    slot = LibPETSc.DMStagGetLocationSlot(getlib(PetscLib), dm, loc, PetscLib.PetscInt(dof))\n    return slot+1\nend\n"
  },
  {
    "path": "src/init.jl",
    "content": "\"\"\"\n   initialized(petsclib)\n\nCheck if `petsclib` is initialized\n\n# External Links\n$(_doc_external(\"Sys/PetscInitialized\"))\n\"\"\"\ninitialized(petsclib) = LibPETSc.PetscInitialized(petsclib)\n\nconst _petsc_program_name = \"petsc_julia\"\nconst _lib_handles = IdDict{Any, Tuple{Any, Bool}}()\n\n\"\"\"\n    initialize([petsclib]; log_view = false, options = String[])\n\nInitialize the `petsclib`. If no `petsclib` is given, all `PETSc.petsclibs`\nwill be initialized.\n\nAdditionally:\n - This will initialize MPI if it has not already been initialized.\n - It will disable the PETSc signal handler (via\n   $(_petsc_link(\"Sys/PetscPopSignalHandler\"))\n - Add an [`atexit`](https://docs.julialang.org/en/v1/base/base/#Base.atexit)\n   hook to call [`PETSc.finalize`](@ref).\n\n# Arguments\n- `log_view::Bool = false`: Enable PETSc's `-log_view` performance logging.\n  When enabled, PETSc will output performance statistics at finalization.\n- `options::Vector{String} = String[]`: Additional PETSc command-line options.\n  These are passed via the `PETSC_OPTIONS` environment variable.\n\n# Examples\n```julia\n# Basic initialization\nPETSc.initialize(petsclib)\n\n# Enable performance logging to stdout\nPETSc.initialize(petsclib; log_view = true)\n\n# Write log to a file\nPETSc.initialize(petsclib; log_view = true, options = [\":logfile.txt\"])\n\n# Enable memory logging\nPETSc.initialize(petsclib; log_view = true, options = [\":logfile.txt\", \"-log_view_memory\"])\n\n# Pass custom PETSc options without logging\nPETSc.initialize(petsclib; options = [\"-malloc_debug\", \"-on_error_abort\"])\n```\n\n# External Links\n$(_doc_external(\"Sys/PetscInitializeNoArguments\"))\n\"\"\"\nfunction initialize(; log_view::Bool = false, options = String[])\n    map(petsclib -> initialize(petsclib; log_view, options), petsclibs)\n    return nothing\nend\n\nfunction initialize(petsclib; log_view::Bool = false, options = String[])\n    if !initialized(petsclib)\n\n        # deactivate the signal handler to avoid conflicts with Julia's own handlers when using multithreading\n        push!(options, \" -no_signal_handler \")\n\n        if log_view || !isempty(options)\n            cli_opts = _build_petsc_options(log_view, options)\n            prev_opts = get(ENV, \"PETSC_OPTIONS\", \"\")\n            ENV[\"PETSC_OPTIONS\"] = isempty(prev_opts) ? cli_opts : \"$prev_opts $cli_opts\"\n            try\n                _ensure_mpi_initialized()\n                petsclib.age += 1\n                LibPETSc.PetscInitializeNoArguments(petsclib)\n                _post_initialize(petsclib)\n            finally\n                if isempty(prev_opts)\n                    delete!(ENV, \"PETSC_OPTIONS\")\n                else\n                    ENV[\"PETSC_OPTIONS\"] = prev_opts\n                end\n            end\n        else\n            _ensure_mpi_initialized()\n            petsclib.age += 1\n            LibPETSc.PetscInitializeNoArguments(petsclib)\n            _post_initialize(petsclib)\n        end\n    end\n    return nothing\nend\n\n\"\"\"\n   finalize(petsclib)\n\nFinalize the `petsclib`, if no `petsclib` is given then all `PETSc.petsclibs`\nwill be finalized.\n\n# External Links\n$(_doc_external(\"Sys/PetscFinalize\"))\n\"\"\"\nfunction finalize()\n    map(finalize, petsclibs)\n    return nothing\nend\n\nfunction finalize(petsclib)\n    if !finalized(petsclib)\n        petsclib.age += 1\n        LibPETSc.PetscFinalize(petsclib)\n    end\n    return nothing\nend\n\n\"\"\"\n   finalized(petsclib)\n\nCheck if `petsclib` is finalized\n\n# External Links\n$(_doc_external(\"Sys/PetscFinalized\"))\n\"\"\"\nfinalized(petsclib) = LibPETSc.PetscFinalized(petsclib)\n\nfunction _build_petsc_options(log_view::Bool, options)\n    opts = String[]\n    if log_view\n        push!(opts, \"-log_view\")\n    end\n    append!(opts, [String(opt) for opt in options])\n    return join(opts, \" \")\nend\n\nfunction _ensure_mpi_initialized()\n    MPI.Initialized() || MPI.Init()\n    return nothing\nend\n\nfunction _post_initialize(petsclib)\n    # disable signal handler\n    LibPETSc.PetscPopSignalHandler(petsclib)\n    atexit(() -> finalize(petsclib))\n    return nothing\nend\n\nfunction _ensure_library_handle(petsclib)\n    return get!(_lib_handles, petsclib) do\n        libref = petsclib.petsc_library\n        if libref isa AbstractString\n            return (Libdl.dlopen(libref), true)\n        else\n            return (libref, false)\n        end\n    end\nend\n\nfunction _library_ptr(lib_handle)\n    if lib_handle isa Ptr{Cvoid}\n        return lib_handle\n    end\n    try\n        return Base.unsafe_convert(Ptr{Cvoid}, lib_handle)\n    catch err\n        throw(ArgumentError(\"Unsupported PETSc library handle type $(typeof(lib_handle))\"))\n    end\nend\n\nfunction _release_library_handle(petsclib)\n    entry = pop!(_lib_handles, petsclib, nothing)\n    isnothing(entry) && return nothing\n    handle, owned = entry\n    owned || return nothing\n    Libdl.dlclose(_library_ptr(handle))\n    return nothing\nend\n\n\n\"\"\"\n    scalartype(petsclib::PetscLibType)\n\nreturn the scalar type for the associated `petsclib`\n\"\"\"\nscalartype(::LibPETSc.PetscLibType{ST}) where {ST} = ST\nscalartype(\n    ::Type{PetscLib},\n) where {PetscLib <: PetscLibType{ST}} where {ST} = ST\n\n\n\"\"\"\n    inttype(petsclib::PetscLibType)\n\nreturn the int type for the associated `petsclib`\n\"\"\"\ninttype(::LibPETSc.PetscLibType{ST, IT}) where {ST, IT} = IT\ninttype(\n    ::Type{PetscLib},\n) where {PetscLib <: PetscLibType{ST, IT}} where {ST, IT} = IT\n\n\"\"\"\n    set_petsclib(library_path::String; PetscScalar=Float64, PetscInt=Int64)\n\nCreate a custom PETSc library instance from a user-specified shared library path.\n\nThis function allows you to use a custom-compiled PETSc library instead of the\npre-built libraries provided by `PETSc_jll`. The custom library must be compiled as a\nshared/dynamic library (not static), built with the matching scalar type and integer\nsize, and linked against the same MPI installation that `MPI.jl` uses.\n\nOn HPC systems, set `JULIA_PETSC_SKIP_JLL=1` before starting Julia to prevent\n`PETSc_jll` from being precompiled (its MPI stack is typically incompatible with\ncluster MPI). Then call this function in your script to load the cluster library.\n\n# Arguments\n- `library_path::String`: Path to the PETSc shared library (e.g. `\"/path/to/libpetsc.so\"`)\n- `PetscScalar::Type`: Scalar type the library was built with. One of `Float64`,\n  `Float32`, `Complex{Float64}`, `Complex{Float32}`. Default: `Float64`\n- `PetscInt::Type`: Integer type the library was built with. `Int32` or `Int64`.\n  Default: `Int64`\n\n# Returns\nA `PetscLibType` instance for use with `initialize`, `finalize`, and all PETSc.jl functions.\n\n# Environment-variable alternative\nInstead of calling `set_petsclib`, you can configure everything before Julia starts:\n```\nJULIA_PETSC_LIBRARY=/path/to/libpetsc.so   # also suppresses PETSc_jll\nJULIA_PETSC_SCALAR=Float64                  # Float32 | ComplexFloat64 | ComplexFloat32\nJULIA_PETSC_INT=Int64                       # Int32\n```\nWith these set, `PETSc.getlib(; PetscScalar=Float64, PetscInt=Int64)` returns the\ncustom library directly.\n\n# Examples\n```julia\n# Double-precision real, 64-bit indices (typical HPC build)\npetsclib = PETSc.set_petsclib(\"/path/to/libpetsc.so\";\n                              PetscScalar=Float64, PetscInt=Int64)\nPETSc.initialize(petsclib)\n# ... your code ...\nPETSc.finalize(petsclib)\n\n# Single-precision complex, 32-bit indices\npetsclib = PETSc.set_petsclib(\"/opt/petsc/lib/libpetsc.so\";\n                              PetscScalar=Complex{Float32}, PetscInt=Int32)\n```\n\n# See Also\n- [`initialize`](@ref): Initialize a PETSc library\n- [`finalize`](@ref): Finalize a PETSc library\n\"\"\"\nfunction set_petsclib(library_path::String; PetscScalar::Type=Float64, PetscInt::Type=Int64)\n    petsclib = LibPETSc.PetscLibType{PetscScalar, PetscInt}(library_path)\n    try\n        check_petsc_wrappers_version(petsclib)\n    catch err\n        @warn \"Failed to perform PETSc wrappers version check\" exception=(err,)\n    end\n    return petsclib\nend\n\n\"\"\"\n    library_info()\n\nPrint the current PETSc library configuration: which library is in use, how it\nwas configured (preference or default JLL), and the scalar/integer types.\n\"\"\"\nfunction library_info()\n    pref_path   = @load_preference(\"library_path\", nothing)\n    pref_scalar = @load_preference(\"PetscScalar\", nothing)\n    pref_int    = @load_preference(\"PetscInt\", nothing)\n\n    if pref_path !== nothing\n        println(\"Source  : LocalPreferences.toml\")\n        println(\"Path    : \", pref_path)\n        println(\"Scalar  : \", something(pref_scalar, \"Float64\"))\n        println(\"Int     : \", something(pref_int,    \"Int64\"))\n    else\n        println(\"Source  : PETSc_jll (default precompiled binaries)\")\n    end\n\n    println(\"\\nLoaded libraries (this session):\")\n    for lib in petsclibs\n        path = lib.petsc_library isa AbstractString ? lib.petsc_library :\n               try Libdl.dlpath(Libdl.dlopen(lib.petsc_library)) catch; string(lib.petsc_library) end\n        println(\"  [$(lib.PetscScalar), $(lib.PetscInt)]: \", path)\n    end\nend\n\n\"\"\"\n    set_library!(path; PetscScalar=Float64, PetscInt=Int64)\n\nPersistently configure PETSc.jl to use a custom PETSc shared library.\n\nThe path and type configuration are stored in `LocalPreferences.toml` (per-project,\ngit-ignorable) and take effect on the next Julia session. Recompilation is triggered\nautomatically — no environment variables are needed.\n\nTo revert to the default `PETSc_jll` libraries, call [`unset_library!`](@ref).\n\n# Arguments\n- `path`: path to the PETSc shared library (e.g. `\"/path/to/libpetsc.so\"`)\n- `PetscScalar`: scalar type the library was built with (`Float64`, `Float32`,\n  `Complex{Float64}`, `Complex{Float32}`). Default: `Float64`\n- `PetscInt`: integer type the library was built with (`Int64` or `Int32`).\n  Default: `Int64`\n\n# Examples\n```julia\nPETSc.set_library!(\n    \"/project/petsc/lib/libpetsc.so\";\n    PetscScalar = Float64,\n    PetscInt    = Int64,\n)\n# Restart Julia — the new library is used automatically from here on.\n```\n\n# See Also\n- [`unset_library!`](@ref): remove the preference and revert to `PETSc_jll`\n- [`set_petsclib`](@ref): load a custom library for the current session only\n\"\"\"\nfunction set_library!(path; PetscScalar::Type=Float64, PetscInt::Type=Int64)\n    ispath(path) || error(\"PETSc library not found: $path\")\n    @set_preferences!(\n        \"library_path\" => realpath(path),\n        \"PetscScalar\"  => string(PetscScalar),\n        \"PetscInt\"     => string(PetscInt),\n    )\n    @info \"PETSc library configured — restart Julia to use the new library.\" path PetscScalar PetscInt\nend\n\n\"\"\"\n    unset_library!()\n\nRemove the persistent custom-library preference set by [`set_library!`](@ref),\nreverting to the default `PETSc_jll` binaries on the next Julia session.\n\"\"\"\nfunction unset_library!()\n    @delete_preferences!(\"library_path\", \"PetscScalar\", \"PetscInt\")\n    @info \"PETSc library preference removed — restart Julia to revert to PETSc_jll.\"\nend\n\n\n\"\"\"\n    check_petsc_wrappers_version(petsclib=nothing)\n\nLoad the generated `petsc_wrappers_version.jl` (if present) and compare the\ndeclared wrapper version `PETSC_WRAPPERS_VERSION` with the installed PETSc\nversion obtained from `LibPETSc.PetscGetVersionNumber` for `petsclib`.\n\nArguments\n- `petsclib`: optional `PetscLibType` or path string. If `nothing`, the\n  first available `PETSc.petsclibs[1]` is used.\n\nReturns a named tuple: `(:wrappers_version, :installed_version, :match)`.\n`match` is `true` when versions are equal, `false` when they differ, and\n`nothing` if either side could not be determined.\n\"\"\"\nfunction check_petsc_wrappers_version(petsclib=nothing)\n    verfile = joinpath(@__DIR__, \"autowrapped\", \"petsc_wrappers_version.jl\")\n\n    if !isdefined(@__MODULE__, :PETSC_WRAPPERS_VERSION) && isfile(verfile)\n        try\n            Base.invokelatest(() -> include(verfile))\n        catch err\n            @warn \"Failed to include petsc_wrappers_version.jl\" exception=(err,)\n        end\n    end\n\n    wrappers_version = Base.invokelatest(() -> isdefined(@__MODULE__, :PETSC_WRAPPERS_VERSION) ? getproperty(@__MODULE__, :PETSC_WRAPPERS_VERSION) : nothing)\n\n    if petsclib === nothing\n        if isdefined(@__MODULE__, :petsclibs) && !isempty(petsclibs)\n            petsclib = petsclibs[1]\n        else\n            error(\"No PETSc library available to check installed version\")\n        end\n    end\n\n    if isa(petsclib, String)\n        petsclib = set_petsclib(petsclib)\n    end\n\n    installed_version = nothing\n    try\n        major, minor, subminor, _release = LibPETSc.PetscGetVersionNumber(petsclib)\n        installed_version = VersionNumber(Int(major), Int(minor), Int(subminor))\n    catch err\n        @warn \"Failed to query installed PETSc version\" exception=(err,)\n    end\n\n    match = isnothing(wrappers_version) || isnothing(installed_version) ? nothing : (installed_version.major == wrappers_version.major && installed_version.minor == wrappers_version.minor)\n    if !isnothing(match) && match === false\n        @warn \"PETSc wrappers version does not match PETSc version of library (major.minor); this can cause undesired behavior\" wrappers_version=wrappers_version installed_version=installed_version\n    end\n\n    return (wrappers_version = wrappers_version, installed_version = installed_version, match = match)\nend\n"
  },
  {
    "path": "src/ksp.jl",
    "content": "import .LibPETSc: AbstractPetscKSP, CKSP, PetscKSP, AbstractPetscDM\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::AbstractPetscKSP{PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        print(io, \"PETSc KSP (null pointer)\")\n        return\n    else\n        print(io, \"PETSc KSP object\")\n    end\n    return nothing\nend\n\n\n\"\"\"\n    KSP(comm::MPI.Comm, A::AbstractPetscMat, P::AbstractPetscMat{PetscLib} = A; prefix=\"\", options...)\n\nCreate a `KSP` using the matrix `A` and preconditioner construction matrix `P`\nwith optional `prefix` and `options`.\n\nThe communicator is obtained from `A` and if it has size `1` then the garbage\ncollector is set, otherwise the user is responsible for calling\n[`destroy`](@ref).\n\n# External Links\n$(_doc_external(\"KSP/KSPCreate\"))\n$(_doc_external(\"KSP/KSPSetOperators\"))\n$(_doc_external(\"KSP/KSPSetFromOptions\"))\n\"\"\"\nfunction KSP(\n    A::AbstractPetscMat{PetscLib},\n    P::AbstractPetscMat{PetscLib} = A;\n    prefix::String=\"\",\n    options...\n) where {PetscLib}\n    @assert initialized(getlib(PetscLib))\n\n    petsclib = getlib(PetscLib)\n    comm = getcomm(A)\n    ksp = LibPETSc.KSPCreate(petsclib,comm)\n    \n    LibPETSc.KSPSetOperators(petsclib, ksp, A, P)\n    \n    if !isempty(prefix)\n        LibPETSc.KSPSetOptionsPrefix(petsclib, ksp, prefix)\n    end\n    \n    # Push options to PETSc options database\n    if !isempty(options)\n        opts = PETSc.Options(petsclib; options...);\n        push!(opts)\n        LibPETSc.KSPSetFromOptions(petsclib, ksp)\n        pop!(opts)\n        ksp.opts = opts\n    end\n\n    return ksp\nend\n\n\"\"\"\n    KSP(dm::AbstractPetscDM; prefix=\"\", options...)\n\nCreate a `KSP` associated with the `dm` with optional `prefix` and `options`.\n\nThe communicator is obtained from `dm`. The KSP can be used with geometric\nmultigrid when the DM provides grid hierarchy information.\n\n# Arguments\n- `dm::AbstractPetscDM`: The DM object to associate with the KSP\n- `prefix::String`: Optional prefix for command-line options\n- `options...`: Additional PETSc options as keyword arguments\n\n# External Links\n$(_doc_external(\"KSP/KSPCreate\"))\n$(_doc_external(\"KSP/KSPSetDM\"))\n$(_doc_external(\"KSP/KSPSetFromOptions\"))\n\"\"\"\nfunction KSP(dm::AbstractPetscDM{PetscLib};\n    prefix::String=\"\",\n    options...\n) where {PetscLib}\n    @assert initialized(getlib(PetscLib))\n    petsclib = getlib(PetscLib)\n    comm = getcomm(dm)\n    ksp = LibPETSc.KSPCreate(petsclib,comm)\n    \n    if !isempty(prefix)\n        LibPETSc.KSPSetOptionsPrefix(petsclib, ksp, prefix)\n    end\n    \n    LibPETSc.KSPSetDM(petsclib, ksp, dm)\n\n    # Push options to PETSc options database\n    if !isempty(options)\n        opts = PETSc.Options(petsclib; options...);\n        push!(opts)\n        LibPETSc.KSPSetFromOptions(petsclib, ksp)\n        pop!(opts)\n        ksp.opts = opts\n    end\n\n    return ksp\nend\n\n\n\n\"\"\"\n    KSP(petsclib, comm::MPI.Comm, A::SparseMatrixCSC; options...)\n\nCreate a [`KSP`](@ref) with the sparse matrix `A` using the `petsclib`. If\n`petsclib` is not given, the default library will be used`.\n\"\"\"\nKSP(petsclib, comm, S::SparseMatrixCSC; kwargs...) \n\nfunction KSP(petsclib, comm, S::SparseMatrixCSC; kwargs...) \n    M = PETSc.MatCreateSeqAIJ(petsclib, comm, S)\n    return KSP(M; kwargs...)\nend\n\n\nfunction solve!(\n    x::PetscVec{PetscLib},\n    ksp::PetscKSP{PetscLib},\n    b::PetscVec{PetscLib},\n) where {PetscLib}\n    has_opts = !isnothing(ksp.opts)\n    has_opts && push!(ksp.opts)\n    try\n        LibPETSc.KSPSolve(PetscLib, ksp, b, x)\n    finally\n        has_opts && pop!(ksp.opts)\n    end\n    return nothing\nend\n\nfunction solve!(\n    ksp::AbstractPetscKSP{PetscLib},\n) where {PetscLib}\n    has_opts = hasproperty(ksp, :opts) && !isnothing(ksp.opts)\n    has_opts && push!(ksp.opts)\n    try\n        LibPETSc.KSPSolve(PetscLib, ksp, C_NULL, C_NULL)\n    finally\n        has_opts && pop!(ksp.opts)\n    end\n    return ksp\nend\n\nLinearAlgebra.ldiv!(x::PetscVec{PetscLib}, ksp::PetscKSP{PetscLib}, b::PetscVec{PetscLib}) where {PetscLib} = solve!(x, ksp, b)\n\nfunction Base.:\\(ksp::PetscKSP, b::PetscVec{PetscLib}) where {PetscLib}\n    x = similar(b)\n    ldiv!(x, ksp, b)\n    return x\nend\n\nfunction Base.:\\(\n    ksp::PetscKSP{PetscLib},\n    b::Vector{PetscScalar},\n) where {PetscLib, PetscScalar}\n    @assert PetscScalar == PetscLib.PetscScalar\n    comm = getcomm(ksp)\n    @assert MPI.Comm_size(comm) == 1\n    PetscInt = PetscLib.PetscInt\n\n    petsc_b = LibPETSc.VecCreateSeqWithArray(getlib(PetscLib),comm, PetscInt(1), PetscInt(length(b)), PetscScalar.(b))\n    petsc_x = ksp \\ petsc_b\n    x = petsc_x[:]\n    destroy(petsc_b)\n    destroy(petsc_x)\n\n    return x\nend\n\n\nfunction destroy(ksp::PetscKSP{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) && ksp.ptr != C_NULL\n        LibPETSc.KSPDestroy(PetscLib, ksp)\n    end\n    ksp.ptr = C_NULL\n    return nothing\nend\n\n\n\n\"\"\"\n    getDM(ksp::AbstractKSP)\n\nGet `dmda` for `ksp`\n\nThe returned `dmda` is owned by the `ksp`\n\n# External Links\n$(_doc_external(\"KSP/KSPGetDM\"))\n\"\"\"\nfunction getDM(ksp::AbstractPetscKSP{PetscLib}) where PetscLib\n    dmda = LibPETSc.KSPGetDM(getlib(PetscLib),ksp)\n    return dmda\nend\n\n#\n# Wrapper for calls to setcomputerhs!\nmutable struct Fn_KSPComputeRHS{PetscLib, PetscInt} end\nfunction (w::Fn_KSPComputeRHS{PetscLib, PetscInt})(\n    new_ksp_ptr::CKSP,\n    cb::CVec,\n    ksp_ptr::Ptr{Cvoid},\n)::PetscInt where {PetscLib, PetscInt}\n    PetscScalar = PetscLib.PetscScalar\n    #new_ksp = KSPPtr{PetscLib, PetscScalar}(new_ksp_ptr, getlib(PetscLib).age)\\\n    #b = VecPtr(PetscLib, cb, false)\n    new_ksp = PetscKSP{PetscLib}(new_ksp_ptr, 0)\n    b = PetscVec{PetscLib}(cb, 0)\n    ksp = unsafe_pointer_to_objref(ksp_ptr)\n    ierr = ksp.computerhs!(b, new_ksp)\n    return PetscLib.PetscInt(ierr)\nend\n\n\"\"\"\n    setcomputerhs!(ksp::AbstractKSP, rhs!::Function)\n    setcomputerhs!(rhs!::Function, ksp::AbstractKSP)\n\nDefine `rhs!` to be the right-hand side function of the `ksp`. A call to\n`rhs!(b, new_ksp)` should set the elements of the PETSc vector `b` based on the\n`new_ksp`.\n\n!!! note\n\n    The `new_ksp` passed to `rhs!` may not be the same as the `ksp` passed to\n    `setcomputerhs!`.\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeRHS\"))\n\"\"\"\nsetcomputerhs!(ksp::AbstractPetscKSP, rhs!) = setcomputerhs!(rhs!, ksp)\n# We have to use the macro here because of the @cfunction\nLibPETSc.@for_petsc function setcomputerhs!(rhs!, ksp::AbstractPetscKSP{$PetscLib})\n    # We must wrap the user function in our own object\n    fptr = @cfunction(\n        Fn_KSPComputeRHS{$PetscLib, $PetscInt}(),\n        $PetscInt,\n        (CKSP, CVec, Ptr{Cvoid})\n    )\n    # set the computerhs! in the ksp\n    ksp.computerhs! = rhs!\n    LibPETSc.KSPSetComputeRHS($PetscLib, ksp, fptr, pointer_from_objref(ksp))\n    return ksp\nend\n\n# Wrapper for calls to setcomputerhs!\nmutable struct Fn_KSPComputeOperators{PetscLib, PetscInt} end\nfunction (w::Fn_KSPComputeOperators{PetscLib, PetscInt})(\n    new_ksp_ptr::CKSP,\n    cA::CMat,\n    cP::CMat,\n    ksp_ptr::Ptr{Cvoid},\n)::PetscInt where {PetscLib, PetscInt}\n    PetscScalar = PetscLib.PetscScalar\n    #new_ksp = KSPPtr{PetscLib, PetscScalar}(new_ksp_ptr, getlib(PetscLib).age)\n    new_ksp = PetscKSP{PetscLib}(new_ksp_ptr, getlib(PetscLib).age)\n    A = PetscMat{PetscLib}(cA, getlib(PetscLib).age)\n    P = PetscMat{PetscLib}(cP, getlib(PetscLib).age)\n    ksp = unsafe_pointer_to_objref(ksp_ptr)\n    ierr = ksp.computeops!(A, P, new_ksp)\n    return PetscLib.PetscInt(ierr)\nend\n\n\"\"\"\n    setcomputeoperators!(ksp::PetscKSP, ops!::Function)\n    setcomputeoperators!(ops!::Function, ksp::PetscKSP)\n\nDefine `ops!` to be the compute operators function for the `ksp`. A call to\n`ops!(A, P, new_ksp)` should set the elements of the PETSc matrix linear\noperator `A` and preconditioning matrix `P` based on the `new_ksp`.\n\n!!! note\n\n    The `new_ksp` passed to `ops!` may not be the same as the `ksp` passed to\n    `setcomputeoperators!`.\n\n# External Links\n$(_doc_external(\"KSP/KSPSetComputeOperators\"))\n\"\"\"\nsetcomputeoperators!(ksp::AbstractPetscKSP, ops!) = setcomputeoperators!(ops!, ksp)\n# We have to use the macro here because of the @cfunction\nLibPETSc.@for_petsc function setcomputeoperators!(ops!, ksp::AbstractPetscKSP{$PetscLib})\n    # We must wrap the user function in our own object\n    fptr = @cfunction(\n        Fn_KSPComputeOperators{$PetscLib, $PetscInt}(),\n        $PetscInt,\n        (CKSP, CMat, CMat, Ptr{Cvoid})\n    )\n    # set the computerhs! in the ksp\n    ksp.computeops! = ops!\n    LibPETSc.KSPSetComputeOperators($PetscLib, ksp, fptr, pointer_from_objref(ksp))\n    return ksp\nend\n\n\"\"\"\n    sol = get_solution(ksp::AbstractPetscKSP)\nReturns the soluteion vector associated with the KSP object.\n\"\"\"\nfunction get_solution(ksp::AbstractPetscKSP{PetscLib}) where PetscLib\n    sol = LibPETSc.KSPGetSolution(getlib(PetscLib),ksp)\n    return sol\nend\n\n\ntype(ksp::AbstractPetscKSP{PetscLib}) where PetscLib = LibPETSc.KSPGetType(getlib(PetscLib),ksp)"
  },
  {
    "path": "src/mat.jl",
    "content": "\nimport .LibPETSc: AbstractPetscMat, PetscMat, CMat, MatStencil, InsertMode\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::AbstractPetscMat{PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        print(io, \"PETSc Mat (null pointer)\")\n        return\n    end\n    \n    mat_type = type(v)\n    if mat_type == \"(not set)\"\n        print(io, \"PETSc Mat (type not set)\")\n    else\n        print(io, \"PETSc $(mat_type) Mat of size $(size(v))\")\n    end\n    return nothing\nend\n\n\"\"\"\n    MatPtr(petsclib, mat::CMat)\n\nContainer type for a PETSc Mat that is just a raw pointer.\n\"\"\"\nmutable struct MatPtr{PetscLib} <:\n               AbstractPetscMat{PetscLib}\n    ptr::CMat\nend\n\nBase.size(m::AbstractPetscMat{PetscLib}) where {PetscLib} = LibPETSc.MatGetSize(PetscLib,m)\nBase.length(m::AbstractPetscMat{PetscLib}) where {PetscLib} = prod(size(m))\nBase.ndims(m::AbstractPetscMat{PetscLib}) where {PetscLib} = length(LibPETSc.MatGetSize(PetscLib,m))\ntype(m::AbstractPetscMat{PetscLib}) where {PetscLib} = LibPETSc.MatGetType(PetscLib,m)\nBase.axes(m::PetscMat{PetscLib}, i::Integer) where {PetscLib} = Base.OneTo(Base.size(m)[i])\n\n\"\"\"\n    M::PetscMat = MatCreateSeqAIJ(petsclib, comm, S)\n\nCreates a PetscMat object from a Julia SparseMatrixCSC `S` in sequential AIJ format.\n\n\"\"\"\nfunction MatCreateSeqAIJ(petsclib, comm, S::SparseMatrixCSC{PetscScalar})   where {PetscScalar}\n\n    PetscInt = petsclib.PetscInt\n\n    # Set values from sparse matrix into PETSc Mat\n    m, n = size(S)\n    \n    # Calculate non-zeros per row\n    nnz = zeros(PetscInt, m)\n\n    for r in S.rowval\n        nnz[r] += 1\n    end\n    M = LibPETSc.MatCreateSeqAIJ(petsclib, comm, \n                PetscInt(m), \n                PetscInt(n), \n                PetscInt(0), nnz)\n\n    for j in 1:n\n        for ii in S.colptr[j]:(S.colptr[j + 1] - 1)\n            i = S.rowval[ii]\n            M[i, j] = S.nzval[ii]\n        end\n    end\n    assemble!(M)\n    return M\nend\n\n\"\"\"\n    mat = MatSeqAIJ(petsclib, num_rows, num_cols, nonzeros)\n\nCreate a PETSc serial sparse array using AIJ format (also known as a compressed\nsparse row or CSR format) of size `num_rows X num_cols` with `nonzeros` per row\n\nIf `nonzeros` is an `Integer` the same number of non-zeros will be used for each\nrow, if `nonzeros` is a `Vector{PetscInt}` then one value must be specified for\neach row.\n\nMemory allocation is handled by PETSc and garbage collection can be used.\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqAIJ\"))\n\"\"\"\nfunction MatSeqAIJ(\n    petsclib::PetscLib,\n    num_rows::Integer,\n    num_cols::Integer,\n    nonzeros::Union{Integer, Vector},\n) where {PetscLib <: PetscLibType}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    PetscInt = petsclib.PetscInt\n    if nonzeros isa Integer\n        mat = LibPETSc.MatCreateSeqAIJ(petsclib, comm, \n                PetscInt(num_rows), \n                PetscInt(num_cols), \n                PetscInt(nonzeros), C_NULL)\n    else\n        @assert eltype(nonzeros) == petsclib.PetscInt\n        @assert length(nonzeros) >= num_rows\n        mat = LibPETSc.MatCreateSeqAIJ(petsclib, comm, \n                PetscInt(num_rows), \n                PetscInt(num_cols), \n                PetscInt(0), PetscInt.(nonzeros))    \n    end\n\n    finalizer(destroy, mat)\n\n    return mat\nend\n\n\"\"\"\n    mat = MatSeqDense(petsclib, A::Matrix{PetscScalar})\n\nPETSc dense array. This wraps a Julia `Matrix{PetscScalar}` object.\n\n# External Links\n$(_doc_external(\"Mat/MatCreateSeqDense\"))\n\"\"\"\nfunction MatSeqDense(\n    petsclib::PetscLib,\n    A::Matrix{PetscScalar},\n) where {PetscLib <: PetscLibType, PetscScalar}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    @assert PetscScalar == petsclib.PetscScalar\n    \n    PetscInt = petsclib.PetscInt\n    mat = LibPETSc.MatCreateSeqDense(petsclib, comm, PetscInt(size(A, 1)), PetscInt(size(A, 2)), A[:])\n\n    finalizer(destroy, mat)\n    return mat\nend\n\n\n# Matrix indexing - set single value\nfunction Base.setindex!(m::AbstractPetscMat{PetscLib}, val, i::Integer, j::Integer) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing for PETSc (Julia uses 1-based)\n    row = PetscInt(i - 1)\n    col = PetscInt(j - 1)\n    value = PetscScalar(val)\n    \n    # Use MatSetValues for single entry\n    # MatSetValues(mat, m, idxm, n, idxn, y, INSERT_VALUES)\n    LibPETSc.MatSetValues(PetscLib, m, PetscInt(1), [row], PetscInt(1), [col], [value], LibPETSc.INSERT_VALUES)\n    \n    return m\nend\n\n# Matrix indexing - set multiple values with vectors of indices  \nfunction Base.setindex!(m::AbstractPetscMat{PetscLib}, vals::AbstractMatrix, rows::AbstractVector{<:Integer}, cols::AbstractVector{<:Integer}) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing for PETSc\n    petsc_rows = PetscInt[r - 1 for r in rows]\n    petsc_cols = PetscInt[c - 1 for c in cols]\n    petsc_vals = PetscScalar.(vals)\n    \n    # Use MatSetValues for block of entries\n    nrows = PetscInt.(length(petsc_rows))\n    ncols = PetscInt.(length(petsc_cols))\n    \n    LibPETSc.MatSetValues(PetscLib, m, nrows, petsc_rows, ncols, petsc_cols, petsc_vals, LibPETSc.INSERT_VALUES)\n    \n    return m\nend\n\n# Matrix indexing - set row with vector of values\nfunction Base.setindex!(m::AbstractPetscMat{PetscLib}, vals::AbstractVector, i::Integer, cols::AbstractVector{<:Integer}) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing\n    row = PetscInt(i - 1)\n    petsc_cols = PetscInt[c - 1 for c in cols]\n    petsc_vals = PetscScalar.(vals)\n    \n    ncols = PetscInt.(length(petsc_cols))\n    LibPETSc.MatSetValues(PetscLib, m, PetscInt(1), [row], ncols, petsc_cols, petsc_vals, LibPETSc.INSERT_VALUES)\n    \n    return m\nend\n\n# Matrix indexing - set column with vector of values  \nfunction Base.setindex!(m::AbstractPetscMat{PetscLib}, vals::AbstractVector, rows::AbstractVector{<:Integer}, j::Integer) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing\n    petsc_rows = PetscInt[r - 1 for r in rows]\n    col = PetscInt(j - 1)\n    petsc_vals = PetscScalar.(vals)\n    \n    nrows = PetscInt.(length(petsc_rows))\n    LibPETSc.MatSetValues(PetscLib, m, nrows, petsc_rows, PetscInt(1), [col], petsc_vals, LibPETSc.INSERT_VALUES)\n    \n    return m\nend\n\n# Matrix indexing - get single value\nfunction Base.getindex(m::AbstractPetscMat{PetscLib}, i::Integer, j::Integer) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing for PETSc (Julia uses 1-based)\n    row = PetscInt(i - 1)\n    col = PetscInt(j - 1)\n    \n    # Use MatGetValues for single entry\n    values = Vector{PetscScalar}(undef, 1)\n    LibPETSc.MatGetValues(PetscLib, m, PetscInt(1), [row], PetscInt(1), [col], values)\n    \n    return values[1]\nend\n\n# Matrix indexing - get block of values\nfunction Base.getindex(m::AbstractPetscMat{PetscLib}, rows::AbstractVector{<:Integer}, cols::AbstractVector{<:Integer}) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing for PETSc\n    petsc_rows = PetscInt[r - 1 for r in rows]\n    petsc_cols = PetscInt[c - 1 for c in cols]\n    \n    # Use MatGetValues for block of entries\n    nrows = PetscInt.(length(petsc_rows))\n    ncols = PetscInt.(length(petsc_cols))\n\n    # PETSc returns values in row-major order\n    values = Vector{PetscScalar}(undef, nrows * ncols)\n    LibPETSc.MatGetValues(PetscLib, m, nrows, petsc_rows, ncols, petsc_cols, values)\n    \n    # Reshape to Julia matrix (column-major)\n    result = Matrix{PetscScalar}(undef, nrows, ncols)\n    for i in 1:nrows\n        for j in 1:ncols\n            # Convert from PETSc row-major to Julia column-major\n            petsc_idx = (i-1) * ncols + (j-1) + 1\n            result[i, j] = values[petsc_idx]\n        end\n    end\n    \n    return result\nend\n\n# Matrix indexing - get row values at specified columns\nfunction Base.getindex(m::AbstractPetscMat{PetscLib}, i::Integer, cols::AbstractVector{<:Integer}) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing\n    row = PetscInt(i - 1)\n    petsc_cols = PetscInt[c - 1 for c in cols]\n\n    ncols = PetscInt.(length(petsc_cols))\n    values = Vector{PetscScalar}(undef, ncols)\n    LibPETSc.MatGetValues(PetscLib, m, PetscInt(1), [row], ncols, petsc_cols, values)\n    \n    return values\nend\n\n# Matrix indexing - get column values at specified rows\nfunction Base.getindex(m::AbstractPetscMat{PetscLib}, rows::AbstractVector{<:Integer}, j::Integer) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    PetscScalar = scalartype(PetscLib)\n    \n    # Convert to 0-based indexing\n    petsc_rows = PetscInt[r - 1 for r in rows]\n    col = PetscInt(j - 1)\n    \n    nrows = length(petsc_rows)\n    values = Vector{PetscScalar}(undef, nrows)\n    LibPETSc.MatGetValues(PetscLib, m, nrows, petsc_rows, PetscInt(1), [col], values)\n    return values\nend\n\n# Matrix indexing - get entire row\nfunction Base.getindex(m::AbstractPetscMat{PetscLib}, i::Integer, ::Colon) where {PetscLib}\n    nrows, ncols = size(m)\n    return getindex(m, i, 1:ncols)\nend\n\n# Matrix indexing - get entire column  \nfunction Base.getindex(m::AbstractPetscMat{PetscLib}, ::Colon, j::Integer) where {PetscLib}\n    nrows, ncols = size(m)\n    return getindex(m, 1:nrows, j)\nend\n\n# Matrix indexing - get all values (use with caution for large matrices!)\nfunction Base.getindex(m::AbstractPetscMat{PetscLib}, ::Colon, ::Colon) where {PetscLib}\n    nrows, ncols = size(m)\n    return getindex(m, 1:nrows, 1:ncols)\nend\n\nfunction Base.:(==)(\n    A::PetscMat{PetscLib},\n    B::PetscMat{PetscLib},\n) where {PetscLib}\n    return LibPETSc.MatEqual(PetscLib, A, B)\nend\n\n\"\"\"\n    assemble!(A::PetscMat) \n\nAssembles a PETSc matrix after setting values.\n\"\"\"\nfunction assemble!(A::AbstractPetscMat{PetscLib}) where {PetscLib}\n    LibPETSc.MatAssemblyBegin(PetscLib, A, PETSc.MAT_FINAL_ASSEMBLY)\n    LibPETSc.MatAssemblyEnd(PetscLib, A, PETSc.MAT_FINAL_ASSEMBLY)\nend\n\n\nLinearAlgebra.norm(M::PetscMat{PetscLib}, normtype::NormType = NORM_FROBENIUS) where {PetscLib} = LibPETSc.MatNorm(PetscLib, M, normtype)\n\n\"\"\"\n    mul!(y::PetscVec{PetscLib}, M::AbstractPetscMat{PetscLib}, x::PetscVec{PetscLib})\n\nComputes\n    `y` = `M`*`x`\n\n\"\"\"\nfunction LinearAlgebra.mul!(y::PetscVec{PetscLib},M::AbstractPetscMat{PetscLib},x::PetscVec{PetscLib}) where {PetscLib} \n    LibPETSc.MatMult(PetscLib, M, x, y)\n    return nothing\nend\n\nfunction Base.:*(\n    M::AbstractPetscMat{PetscLib},\n    x::AbstractPetscVec{PetscLib},\n) where {PetscLib}\n    _, y = LibPETSc.MatCreateVecs(getlib(PetscLib), M)\n    mul!(y, M, x)\n    return y\nend\n\nfunction LinearAlgebra.mul!(\n    y::PetscVec{PetscLib},\n    M::Adjoint{AM},\n    x::PetscVec{PetscLib},\n) where {PetscLib, AM <: PetscMat{PetscLib}}\n    LibPETSc.MatMultHermitianTranspose(PetscLib, parent(M), x, y)\n    return nothing\nend\n\nfunction LinearAlgebra.mul!(\n    y::PetscVec{PetscLib},\n    M::Transpose{AM},\n    x::PetscVec{PetscLib},\n) where {PetscLib, AM <: PetscMat{PetscLib}}\n    LibPETSc.MatMultTranspose(PetscLib, parent(M), x, y)\n    return nothing\nend\n\nfunction LinearAlgebra.issymmetric(A::PetscMat{PetscLib}; tol = 0.0) where {PetscLib} \n    PetscReal = real(scalartype(PetscLib))        \n    return LibPETSc.MatIsSymmetric(PetscLib, A, PetscReal(tol))\nend\nfunction LinearAlgebra.ishermitian(A::PetscMat{PetscLib}; tol = 0.0) where {PetscLib} \n    PetscReal = scalartype(PetscLib)\n    return LibPETSc.MatIsHermitian(PetscLib, A, PetscReal(tol))\nend\n\n\n\"\"\"\n    setup!(mat::AbstractMat)\n\nSet up the interal data for `mat`\n\n# External Links\n$(_doc_external(\"Mat/MatSetUp\"))\n\"\"\"\nfunction setup!(mat::PetscMat{PetscLib}) where {PetscLib}\n    @assert initialized(PetscLib)\n    LibPETSc.MatSetUp(PetscLib, mat)\n    return mat\nend\n\n# MatCreateSeqAIJWithArrays requires the caller to keep the backing CSR arrays\n# alive for as long as the Mat exists. We store them here and release on destroy.\nconst _MATSEQAIJ_WITHARRAYS_STORAGE = IdDict{Ptr{Cvoid}, Any}()\n\n\"\"\"\n    B = MatSeqAIJWithArrays(petsclib, comm, A::SparseMatrixCSC)\n\nCreate a PETSc SeqAIJ matrix from a Julia SparseMatrixCSC.\nSince Julia uses CSC and PETSc AIJ uses CSR, we convert the format properly.\n\n# Arguments\n- `petsclib`: PETSc library instance  \n- `comm`: MPI communicator\n- `A`: Julia sparse matrix in CSC format\n\n# Returns\n- `B`: PETSc matrix in AIJ (CSR) format\n\"\"\"\nfunction MatSeqAIJWithArrays(petsclib::PetscLibType, comm, A::SparseMatrixCSC{T}) where {T}\n    PetscInt = PETSc.inttype(petsclib)\n    PetscScalar = PETSc.scalartype(petsclib)\n    \n    m, n = size(A)\n    \n    # Convert Julia's CSC to CSR format manually\n    # First, count non-zeros per row\n    nnz_per_row = zeros(Int, m)\n    for j in 1:n\n        for k in A.colptr[j]:(A.colptr[j+1]-1)\n            i = A.rowval[k]\n            nnz_per_row[i] += 1\n        end\n    end\n    \n    # Build CSR arrays\n    row_ptr = PetscInt[0]  # Start with 0 (PETSc uses 0-based indexing)\n    for i in 1:m\n        push!(row_ptr, row_ptr[end] + nnz_per_row[i])\n    end\n    \n    # Pre-allocate arrays\n    nnz_total = length(A.nzval)\n    col_idx = Vector{PetscInt}(undef, nnz_total)\n    values = Vector{PetscScalar}(undef, nnz_total)\n    \n    # Fill CSR arrays\n    current_pos = copy(row_ptr[1:end-1]) .+ 1  # Track current position for each row\n    \n    for j in 1:n\n        for k in A.colptr[j]:(A.colptr[j+1]-1)\n            i = A.rowval[k]\n            pos = current_pos[i]\n            col_idx[pos] = j - 1  # Convert to 0-based indexing\n            values[pos] = PetscScalar(A.nzval[k])\n            current_pos[i] += 1\n        end\n    end\n    \n    # Create the PETSc matrix (PETSc borrows the arrays; keep them alive).\n    mat = LibPETSc.MatCreateSeqAIJWithArrays(\n        petsclib,\n        comm,\n        PetscInt(m),\n        PetscInt(n),\n        row_ptr,\n        col_idx,\n        values,\n    )\n\n    _MATSEQAIJ_WITHARRAYS_STORAGE[mat.ptr] = (row_ptr, col_idx, values)\n    return mat\nend\n\n\"\"\"\n    destroy(m::AbstractPetscMat)\n\nDestroy a Mat (matrix) object and release associated resources.\n\nThis function is typically called automatically via finalizers when the object\nis garbage collected, but can be called explicitly to free resources immediately.\n\n# External Links\n$(_doc_external(\"Mat/MatDestroy\"))\n\"\"\"\nfunction destroy(m::AbstractPetscMat{PetscLib}) where {PetscLib}\n    pop!(_MATSEQAIJ_WITHARRAYS_STORAGE, m.ptr, nothing)\n    return LibPETSc.MatDestroy(PetscLib, m)\nend\n\nconst MatAT{PetscLib, PetscScalar} = Union{\n    PetscMat{PetscLib},\n    Transpose{PetscScalar, <:PetscMat{PetscLib}},\n    Adjoint{PetscScalar, <:PetscMat{PetscLib}},\n}\n\nfunction LinearAlgebra.mul!(\n    y::PetscVec{PetscLib},\n    M::Transpose{PetscScalar, AM},\n    x::PetscVec{PetscLib},\n) where {PetscLib, PetscScalar, AM <: AbstractPetscMat{PetscLib}}\n    LibPETSc.MatMultTranspose(PetscLib, parent(M), x, y)\n    return y\nend\n\nfunction Base.copyto!(\n    M::AbstractPetscMat{PetscLib},\n    S::SparseMatrixCSC,\n) where {PetscLib}\n    row_rng = LibPETSc.MatGetOwnershipRange(PetscLib,M)\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n    row_start = row_rng[1]\n    _, n = size(S)\n    for j in 1:n\n        for ii in S.colptr[j]:(S.colptr[j + 1] - 1)\n            i = S.rowval[ii]\n            M[PetscInt(i + row_start), PetscInt(j + row_start)] = PetscScalar(S.nzval[ii])\n        end\n    end\n    return nothing\nend\n\n\"\"\"\n    setvalues!(\n        M::AbstractPetscMat{PetscLib},\n        row0idxs::Vector{MatStencil},\n        col0idxs::Vector{MatStencil},\n        rowvals::Array{PetscScalar},\n        insertmode::InsertMode = INSERT_VALUES;\n        num_rows = length(row0idxs),\n        num_cols = length(col0idxs)\n    )\n\nSet values of the matrix `M` with base-0  row and column indices `row0idxs` and\n`col0idxs` inserting the values `rowvals`.\n\nIf the keyword arguments `num_rows` or `num_cols` is specified then only the\nfirst `num_rows * num_cols` values of `rowvals` will be used.\n\n# External Links\n$(_doc_external(\"Mat/MatSetValuesStencil\"))\n\"\"\"\nfunction setvalues!(\n    M::AbstractPetscMat{PetscLib},\n    row0idxs::Vector{MatStencil},\n    col0idxs::Vector{MatStencil},\n    rowvals::Array{PetscScalar},\n    insertmode::InsertMode = INSERT_VALUES;\n    num_rows = length(row0idxs),\n    num_cols = length(col0idxs),\n) where {PetscLib, PetscScalar}\n    @assert PetscScalar == PetscLib.PetscScalar\n    @assert num_rows * num_cols <= length(rowvals)\n    LibPETSc.MatSetValuesStencil(\n        PetscLib,\n        M,\n        num_rows,\n        row0idxs,\n        num_cols,\n        col0idxs,\n        rowvals,\n        insertmode,\n    )\n    return nothing\nend\n\n\nfunction Base.setindex!(\n    M::AbstractPetscMat{PetscLib},\n    val,\n    i::CartesianIndex{N},\n    j::CartesianIndex{N},\n) where {PetscLib, N}\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n     ms_i = MatStencil(\n        N < 3 ? PetscInt(0) : PetscInt(i[3] - 1),\n        N < 2 ? PetscInt(0) : PetscInt(i[2] - 1),\n        PetscInt(i[1] - 1),\n        N < 4 ? PetscInt(0) : PetscInt(i[4] - 1),\n    )\n    ms_j = MatStencil(\n        N < 3 ? PetscInt(0) : PetscInt(j[3] - 1),\n        N < 2 ? PetscInt(0) : PetscInt(j[2] - 1),\n        PetscInt(j[1] - 1),\n        N < 4 ? PetscInt(0) : PetscInt(j[4] - 1),\n    )\n    setvalues!(M, [ms_i], [ms_j], [PetscScalar(val)], INSERT_VALUES)\n    return val\nend\n\nfunction addindex!(\n    M::AbstractPetscMat{PetscLib},\n    val,\n    i::CartesianIndex{N},\n    j::CartesianIndex{N},\n) where {PetscLib, N}\n    PetscInt = PetscLib.PetscInt\n    PetscScalar = PetscLib.PetscScalar\n    ms_i = MatStencil(\n        N < 3 ? PetscInt(0) : PetscInt(i[3] - 1),\n        N < 2 ? PetscInt(0) : PetscInt(i[2] - 1),\n        PetscInt(i[1] - 1),\n        N < 4 ? PetscInt(0) : PetscInt(i[4] - 1),\n    )\n    ms_j = MatStencil(\n        N < 3 ? PetscInt(0) : PetscInt(j[3] - 1),\n        N < 2 ? PetscInt(0) : PetscInt(j[2] - 1),\n        PetscInt(j[1] - 1),\n        N < 4 ? PetscInt(0) : PetscInt(j[4] - 1),\n    )\n    setvalues!(M, [ms_i], [ms_j], [PetscScalar(val)], ADD_VALUES)\n    return val\nend\n\n\n# ====\n\nstruct MatOp{PetscLib, Op} end\n\nfunction (::MatOp{PetscLib, LibPETSc.MATOP_MULT})(\n            M::CMat,\n            cx::CVec,\n            cy::CVec,\n        ) where {PetscLib}\n    r_ctx = Ref{Ptr{Cvoid}}()\n    LibPETSc.MatShellGetContext(PetscLib, M, r_ctx)\n    ptr = r_ctx[]\n\n    mat = unsafe_pointer_to_objref(ptr)\n\n    PetscScalar = PetscLib.PetscScalar\n    x = PetscVec(cx, getlib(PetscLib))\n    y = PetscVec(cy, getlib(PetscLib))\n\n    _mul!(y, mat, x)\n\n    return 0\nend\n\n\n\n\n# NOTE: MatShell remains work in progress - doesn't function yet\n# We have to use the macro here because of the @cfunction\n\n\n\"\"\"\n    MatShell(\n        petsclib::PetscLib,\n        obj::OType,\n        comm::MPI.Comm,\n        local_rows,\n        local_cols,\n        global_rows = LibPETSc.PETSC_DECIDE,\n        global_cols = LibPETSc.PETSC_DECIDE,\n    )\n\nCreate a `global_rows X global_cols` PETSc shell matrix object wrapping `obj`\nwith local size `local_rows X local_cols`.\n\nThe `obj` will be registered as an `MATOP_MULT` function and if if `obj` is a\n`Function`, then the multiply action `obj(y,x)`; otherwise it calls `mul!(y,\nobj, x)`.\n\nif `comm == MPI.COMM_SELF` then the garbage connector can finalize the object,\notherwise the user is responsible for calling [`destroy`](@ref).\n\n# External Links\n$(_doc_external(\"Mat/MatCreateShell\"))\n$(_doc_external(\"Mat/MatShellSetOperation\"))\n$(_doc_external(\"Mat/MATOP_MULT\"))\n\"\"\"\nmutable struct MatShell{PetscLib, OType} <: AbstractPetscMat{PetscLib}\n    ptr::CMat\n    obj::OType\n    age\nend\n\nLibPETSc.@for_petsc function MatShell(\n    petsclib::$PetscLib,\n    obj::OType,\n    comm::MPI.Comm,\n    local_rows,\n    local_cols,\n    global_rows = LibPETSc.PETSC_DECIDE,\n    global_cols = LibPETSc.PETSC_DECIDE,\n) where {OType}\n    mat = MatShell{$PetscLib, OType}(C_NULL, obj, 0)\n\n    # we use the MatShell object itself\n    ctx = pointer_from_objref(mat)\n\n#=\n    ccall(\n        (:MatCreateShell, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (\n            LibPETSc.MPI_Comm,\n            $PetscInt,\n            $PetscInt,\n            $PetscInt,\n            $PetscInt,\n            Ptr{Cvoid},\n            Ptr{CMat},\n        ),\n        comm,\n        local_rows,\n        local_cols,\n        global_rows,\n        global_cols,\n        pointer_from_objref(mat),\n        A_,\n    )\n=#\n    A_ = Ref{CMat}()\n    ccall(\n               (:MatCreateShell, $petsc_library),\n               LibPETSc.PetscErrorCode,\n               (LibPETSc.MPI_Comm, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ptr{Cvoid}, Ptr{CMat}),\n               comm, local_rows, local_cols, global_rows, global_cols, ctx, A_,\n              )\n\n    mat.ptr = A_[]  \n\n    #=\n     LibPETSc.MatCreateShell(\n        petsclib,\n        comm,\n        local_rows,\n        local_cols,\n        global_rows,\n        global_cols,\n        pointer_from_objref(mat),\n        mat,\n    )\n\n\n    mat = LibPETSc.MatCreateShell(\n        petsclib,\n        comm,\n        local_rows,\n        local_cols,\n        global_rows,\n        global_cols,\n        pointer_from_objref(mat),\n    )\n    =#\n  \n    mulptr = @cfunction(\n        MatOp{$PetscLib, LibPETSc.MATOP_MULT}(),\n        $PetscInt,\n        (CMat, CVec, CVec)\n    )\n\n    LibPETSc.MatShellSetOperation(petsclib, mat, LibPETSc.MATOP_MULT, mulptr)\n\n    #if MPI.Comm_size(comm) == 1\n    #    finalizer(destroy, mat)\n    #end\n    \n    return mat\nend\n\nfunction _mul!(\n    y,\n    mat::MatShell{PetscLib, F},\n    x,\n) where {PetscLib, F <: Function}\n    mat.obj(y, x)\nend\n\nfunction _mul!(y, mat::MatShell, x)\n    LinearAlgebra.mul!(y, mat.obj, x)\nend\n\n\n# Matrix-vector multiplication for MatShell with Julia arrays\nfunction Base.:*(M::MatShell{PetscLib}, x::AbstractVector) where {PetscLib}\n    PetscScalar = scalartype(PetscLib)\n    PetscInt = inttype(PetscLib)\n    \n    # Get matrix dimensions\n    m, n = size(M)\n    \n    # Create PETSc vectors wrapping the Julia arrays\n    petsclib = getlib(PetscLib)\n    petsc_x = LibPETSc.VecCreateSeqWithArray(petsclib, MPI.COMM_SELF, PetscInt(1), PetscInt(n), PetscScalar.(x))\n    petsc_y = LibPETSc.VecCreateSeq(petsclib, MPI.COMM_SELF, PetscInt(m))\n    \n    # Perform matrix-vector multiplication\n    LibPETSc.MatMult(petsclib, M, petsc_x, petsc_y)\n    \n    # Extract result to Julia array\n    result = PetscScalar.(petsc_y[:])\n    \n    # Clean up\n    PETSc.destroy(petsc_x)\n    PETSc.destroy(petsc_y)\n    \n    return result\nend\n\n\"\"\"\n    ownershiprange(mat::AbstractMat, [base_one = true])\n\nThe range of row indices owned by this processor, assuming that the `mat` is\nlaid out with the first `n1` rows on the first processor, next `n2` rows on the\nsecond, etc. For certain parallel layouts this range may not be well defined.\n\nIf the optional argument `base_one == true` then base-1 indexing is used,\notherwise base-0 index is used.\n\n!!! note\n\n    unlike the C function, the range returned is inclusive (`idx_first:idx_last`)\n\n# External Links\n$(_doc_external(\"Mat/MatGetOwnershipRange\"))\n\"\"\"\nfunction ownershiprange(\n    mat::AbstractPetscMat{PetscLib},\n    base_one::Bool = true,\n) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    r_lo, r_hi = LibPETSc.MatGetOwnershipRange(PetscLib, mat)\n    return base_one ? ((r_lo[] + PetscInt(1)):(r_hi[])) :\n           ((r_lo[]):(r_hi[] - PetscInt(1)))\nend\n\n\"\"\"\n    setvalues!(\n        M::AbstractMat{PetscLib},\n        row0idxs::Vector{PetscInt},\n        col0idxs::Vector{PetscInt},\n        rowvals::Array{PetscScalar},\n        insertmode::InsertMode = INSERT_VALUES;\n        num_rows = length(row0idxs),\n        num_cols = length(col0idxs)\n    )\n\nSet values of the matrix `M` with base-0  row and column indices `row0idxs` and\n`col0idxs` inserting the values `rowvals`.\n\nIf the keyword arguments `num_rows` or `num_cols` is specified then only the\nfirst `num_rows * num_cols` values of `rowvals` will be used.\n\n# External Links\n$(_doc_external(\"Mat/MatSetValues\"))\n\"\"\"\nfunction setvalues!(\n    M::AbstractPetscMat{PetscLib},\n    row0idxs::Vector{PetscInt},\n    col0idxs::Vector{PetscInt},\n    rowvals::Array{PetscScalar},\n    insertmode::InsertMode = INSERT_VALUES;\n    num_rows = length(row0idxs),\n    num_cols = length(col0idxs),\n) where {PetscLib, PetscScalar, PetscInt}\n    @assert PetscScalar == PetscLib.PetscScalar\n    @assert PetscInt == PetscLib.PetscInt\n    @assert num_rows * num_cols <= length(rowvals)\n    LibPETSc.MatSetValues(\n        PetscLib,\n        M,\n        PetscInt(num_rows),\n        PetscInt.(row0idxs),\n        PetscInt(num_cols),\n        PetscInt.(col0idxs),\n        rowvals,\n        insertmode,\n    )\n    return nothing\nend\n\nfunction LinearAlgebra.norm(\n    M::AbstractPetscMat{PetscLib},\n    normtype::NormType = NORM_FROBENIUS,\n) where {PetscLib}\n    PetscReal = PetscLib.PetscReal\n    #r_val = Ref{PetscReal}()\n    r_val = LibPETSc.MatNorm(PetscLib, M, normtype)\n    return r_val\nend\n\n# ===="
  },
  {
    "path": "src/options.jl",
    "content": "\n\nimport .LibPETSc: AbstractPetscOptions, PetscOptions, COptions\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::AbstractPetscOptions{PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        println(io, \"PETSc Options (null pointer)\")\n        return\n    end\n    \n    # Try to display options, but handle errors gracefully\n    try\n        println(io, \"PETSc Options database:\")\n        LibPETSc.PetscOptionsView(PetscLib, v, LibPETSc.PETSC_VIEWER_DEFAULT)\n    catch\n        println(io, \"PETSc Options (not yet initialized)\")\n    end\n    return nothing\nend\n\n\n\"\"\"\n    Options(petsclib; kwargs...)\n\nCreate a PETSc options database for the given `petsclib`.\n\nKeyword arguments are converted to PETSc options:\n- Options with value `nothing` or `true` are set without a value (flags)\n- Options with value `false` are not set\n- Other values are converted to strings\n\n# Examples\n```julia-repl\njulia> using PETSc\n\njulia> petsclib = PETSc.petsclibs[1];\n\njulia> PETSc.initialize(petsclib)\n\njulia> opt = PETSc.Options(\n                         petsclib,\n                         ksp_monitor = nothing,\n                         ksp_view = true,\n                         pc_type = \"mg\",\n                         pc_mg_levels = 1,\n                         false_opt = false,\n                     )\n#PETSc Option Table entries:\n-ksp_monitor\n-ksp_view\n-pc_mg_levels 1\n-pc_type mg\n#End of PETSc Option Table entries\n\n\njulia> opt[\"ksp_monitor\"]\n\"\"\n\njulia> opt[\"pc_type\"]\n\"mg\"\n\njulia> opt[\"pc_type\"] = \"ilu\"\n\"ilu\"\n\njulia> opt[\"pc_type\"]\n\"ilu\"\n\njulia> opt[\"false_opt\"]\nERROR: KeyError: key \"bad_key\" not found\n\njulia> opt[\"bad_key\"]\nERROR: KeyError: key \"bad_key\" not found\n```\n\n# External Links\n$(_doc_external(\"Sys/PetscOptionsCreate\"))\n\"\"\"\nfunction Options(petsclib::PetscLibType; kwargs...)\n    opts = LibPETSc.PetscOptionsCreate(petsclib)\n    finalizer(destroy, opts)\n    for (k, v) in kwargs\n        opts[k] = v\n    end\n\n    return opts\nend\n\nfunction destroy(opts::AbstractPetscOptions{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) && opts.ptr != C_NULL\n        LibPETSc.PetscOptionsDestroy(PetscLib, opts)\n    end\n    opts.ptr = C_NULL\n    return nothing\nend\n\nfunction Base.setindex!(\n    opts::AbstractPetscOptions{PetscLib},\n    val,\n    key,\n) where {PetscLib}\n    val === true && (val = nothing)\n    val === false && (return val)\n\n    LibPETSc.PetscOptionsSetValue(\n        PetscLib,\n        opts,\n        string('-', key),\n        isnothing(val) ? C_NULL : string(val),\n    )\n\n    return val\nend\n\nfunction Base.getindex(opts::AbstractPetscOptions{PetscLib}, key) where {PetscLib}\n    val = LibPETSc.PetscOptionsGetString(PetscLib, opts, C_NULL, string('-', key))\n    if val == false\n        throw(KeyError(key))\n    end\n    return val\nend\n\n\"\"\"\n    parse_options(args::Vector{String})\n\nParse the `args` vector into a `NamedTuple` that can be used as the options for\nthe PETSc solvers.\n\n```sh\njulia --project file.jl -ksp_monitor -pc_type mg -ksp_view -da_refine=1\n```\n\"\"\"\nfunction parse_options(args::Vector{String})\n    i = 1\n    opts = Dict{Symbol, Union{String, Nothing}}()\n    while i <= length(args)\n        @assert args[i][1] == '-' && length(args[i]) > 1\n        if i == length(args) || args[i + 1][1] == '-'\n            token = split(args[i][2:end], \"=\")\n            if length(token) == 1\n                opts[Symbol(token[1])] = nothing\n            elseif length(token) == 2\n                opts[Symbol(token[1])] = token[2]\n            else\n                error(\"invalid argument: $(args[i])\")\n            end\n            i = i + 1\n        else\n            opts[Symbol(args[i][2:end])] = args[i + 1]\n            i = i + 2\n        end\n    end\n    return NamedTuple(opts)\nend\n\nfunction Base.push!(opts::AbstractPetscOptions{PetscLib}) where {PetscLib}\n    LibPETSc.PetscOptionsPush(PetscLib, opts)\n    return nothing\nend\n\nfunction Base.pop!(opts::AbstractPetscOptions{PetscLib}) where {PetscLib}\n    LibPETSc.PetscOptionsPop(PetscLib)\n    return nothing\nend\n\n\"\"\"\n    typedget(opt::NamedTuple, key::Symbol, default::T)\n\nParse `opt` similar to `Base.get` but ensures that the returned value is the\nsame type as the default value. When `T <: NTuple` keys that result in a single\nvalue will be filled into an `NTuple` of the same length as `T`; in the case of\nstrings it is parsed using `Base.split` with comma delimiter\n\n# Examples\n```julia-repl\njulia> opt = (tup = (1, 2, 3), string_tup = \"1,2,3\", string_int = \"4\", int = 4)\n(tup = (1, 2, 3), string_tup = \"1,2,3\", string_int = \"4\", int = 4)\n\njulia> typedget(opt, :int, 7)\n4\n\njulia> typedget(opt, :bad_key, 7)\n7\n\njulia> typedget(opt, :tup, (1, 1, 1))\n(1, 2, 3)\n\njulia> typedget(opt, :string_tup, (1, 1, 1))\ntokens = SubString{String}[\"1\", \"2\", \"3\"]\n(1, 2, 3)\n\njulia> typedget(opt, :string_int, (1, 1, 1))\ntokens = SubString{String}[\"4\"]\n(4, 4, 4)\n\njulia> typedget(opt, :int, (1, 1, 1))\n(4, 4, 4)\n\njulia> typedget(opt, :int, (1., 1., 1.))\n(4.0, 4.0, 4.0)\n```\n\"\"\"\nfunction typedget(opt::NamedTuple, key::Symbol, default::T) where {T}\n    v = get(opt, key, default)\n    if !(v isa T)\n        if T <: String\n            return string(v)\n        elseif v isa String\n            if T <: NTuple\n                ET = T.types[1]\n                tokens = split(v, \",\")\n                if length(tokens) == 1\n                    return ntuple(_ -> parse(ET, tokens[1]), length(T.types))\n                else\n                    return ntuple(j -> parse(ET, tokens[j]), length(T.types))\n                end\n            else\n                return parse(T, v)\n            end\n        else\n            if T <: NTuple && !(v isa Tuple)\n                ET = T.types[1]\n                return ntuple(j -> convert(ET, v), length(T.types))\n            else\n                return convert(T, v)\n            end\n        end\n    end\n    return v\nend\n\n"
  },
  {
    "path": "src/snes.jl",
    "content": "import .LibPETSc: AbstractPetscSNES, CSNES, PetscSNES\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::AbstractPetscSNES{PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        print(io, \"PETSc SNES (null pointer)\")\n        return\n    else\n        print(io, \"PETSc SNES object\")\n    end\n    return nothing\nend\n\n\"\"\"\n    SNES(petsclib, comm::MPI.Comm; prefix=\"\", options...)\n\nCreate a PETSc nonlinear solver (SNES) context on the communicator `comm`.\n\n# Arguments\n- `petsclib`: The PETSc library instance\n- `comm::MPI.Comm`: MPI communicator\n- `prefix::String`: Optional prefix for command-line options\n- `options...`: Additional PETSc options as keyword arguments\n\nIf `comm` has size 1, the garbage collector will handle cleanup automatically.\nOtherwise, the user is responsible for calling `destroy`.\n\n# External Links\n$(_doc_external(\"SNES/SNESCreate\"))\n$(_doc_external(\"SNES/SNESSetFromOptions\"))\n\"\"\"\nfunction SNES(\n    petsclib::PetscLib,\n    comm::MPI.Comm;\n    prefix=\"\",\n    options...,\n) where {PetscLib}\n    @assert initialized(getlib(PetscLib))\n\n    petsclib = getlib(PetscLib)\n    snes = LibPETSc.SNESCreate(petsclib, comm)\n\n    if !isempty(prefix)\n        LibPETSc.SNESSetOptionsPrefix(petsclib, snes, prefix)\n    end\n    \n    # Store options for deferred SNESSetFromOptions in solve!.\n    # We do NOT call SetFromOptions here because the DM is typically\n    # set after construction (via setDM!), and PCs like MG need the\n    # DM hierarchy to be available during SetFromOptions/SetUp.\n    if !isempty(options)\n        snes.opts = PETSc.Options(petsclib; options...)\n    end\n\n    # We can only let the garbage collect finalize when we do not need to\n    # worry about MPI (since garbage collection is asyncronous)\n    if MPI.Comm_size(comm) == 1\n        finalizer(destroy, snes)\n    end\n\n    return snes\nend\n\n\nfunction gettype(snes::AbstractPetscSNES{PetscLib}) where {PetscLib}\n    return LibPETSc.SNESGetType(PetscLib, snes)\nend\n\n\"\"\"\n    setfunction!(snes, f!, vec)\n    setfunction!(f!, snes, vec)\n\nSet the residual function `f!` for the nonlinear solver `snes`.\n\nThe function `f!` will be called as `f!(fx, snes, x)` where:\n- `fx`: Output vector to store the residual F(x)\n- `snes`: The SNES context\n- `x`: Input vector with current solution\n\nThe `vec` argument is a template vector used for the residual.\n\n# External Links\n$(_doc_external(\"SNES/SNESSetFunction\"))\n\"\"\"\nsetfunction!(snes::AbstractPetscSNES, rhs!, vec) = setfunction!(rhs!, snes, vec)\n\n# Wrapper for calls to setfunction!\nmutable struct Fn_SNESSetFunction{PetscLib} end\nfunction (w::Fn_SNESSetFunction{PetscLib})(\n    ::CSNES,\n    r_x::CVec,\n    r_fx::CVec,\n    snes_ptr::Ptr{Cvoid},\n) where {PetscLib}\n    snes = unsafe_pointer_to_objref(snes_ptr)\n    x  = PetscVec{PetscLib}(r_x)\n    fx = PetscVec{PetscLib}(r_fx)\n\n    if Base.applicable(snes.f!, fx, snes, x, snes.user_ctx)\n        return snes.f!(fx, snes, x, snes.user_ctx)\n    else\n        return snes.f!(fx, snes, x)\n    end\nend\n\nLibPETSc.@for_petsc function setfunction!(\n    f!,\n    snes::AbstractPetscSNES{$PetscLib},\n    vec::AbstractPetscVec{$PetscLib},\n    ) \n\n    ctx = pointer_from_objref(snes)\n    PetscInt = $PetscLib.PetscInt\n    fptr = @cfunction(\n        Fn_SNESSetFunction{$PetscLib}(),\n        $PetscInt,\n        (CSNES, CVec, CVec, Ptr{Cvoid})\n    )\n  \n    #with(snes.opts) do\n    LibPETSc.SNESSetFunction($PetscLib, snes, vec, fptr, ctx)\n    #end\n    snes.f! = f!\n    return 0\nend\n\n\"\"\"\n    setjacobian!(\n        snes::AbstractSNES,\n        updateJ!::Function,\n        J::AbstractMat,\n        P::AbstractMat = J\n    )\n    setjacobian!(\n        updateJ!::Function,\n        snes::AbstractSNES,\n        J::AbstractMat,\n        P::AbstractMat = J\n    )\n\nDefine `updateJ!` to be the function that updates the Jacobian of the `snes`.\n\nIf `J == P` then a call to `updateJ!(J, snes, x)` should set the elements of the\nPETSc Jacobian (approximation).\n\nIf `J ≠ P` then a call to `updateJ!(J, P, snes, x)` should set the elements of\nthe PETSc Jacobian (approximation) and preconditioning matrix `P`.\n\nIf you set `snes.user_ctx`, then `updateJ!` may optionally accept that as an\nadditional last argument:\n\n- `updateJ!(J, snes, x, user_ctx)` when `J == P`\n- `updateJ!(J, P, snes, x, user_ctx)` when `J ≠ P`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetJacobian\"))\n\"\"\"\nsetjacobian!(snes::AbstractPetscSNES, updateJ!, J, PJ = J) =\n    setjacobian!(updateJ!, snes, J, PJ)\n\n# Wrapper for calls to setjacobian!\nmutable struct Fn_SNESSetJacobian{PetscLib} end\nfunction (w::Fn_SNESSetJacobian{PetscLib})(\n    ::CSNES,\n    r_x::CVec,\n    r_A::CMat,\n    r_P::CMat,\n    snes_ptr::Ptr{Cvoid},\n) where {PetscLib}\n    snes = unsafe_pointer_to_objref(snes_ptr)\n    x = PetscVec{PetscLib}(r_x)\n    A = PetscMat{PetscLib}(r_A)\n    P = PetscMat{PetscLib}(r_P)\n\n    same_mat = (P.ptr == A.ptr)\n\n    if same_mat\n        if Base.applicable(snes.updateJ!, A, snes, x, snes.user_ctx)\n            return snes.updateJ!(A, snes, x, snes.user_ctx)\n        else\n            return snes.updateJ!(A, snes, x)\n        end\n    else\n        if Base.applicable(snes.updateJ!, A, P, snes, x, snes.user_ctx)\n            return snes.updateJ!(A, P, snes, x, snes.user_ctx)\n        else\n            return snes.updateJ!(A, P, snes, x)\n        end\n    end\nend\n\nLibPETSc.@for_petsc function setjacobian!(\n    updateJ!,\n    snes::AbstractPetscSNES{$PetscLib},\n    J::AbstractPetscMat{$PetscLib},\n    PJ::AbstractPetscMat{$PetscLib} = J,\n)\n    ctx = pointer_from_objref(snes)\n    fptr = @cfunction(\n        Fn_SNESSetJacobian{$PetscLib}(),\n        $PetscInt,\n        (CSNES, CVec, CMat, CMat, Ptr{Cvoid})\n    )\n    #with(snes.opts) do\n        LibPETSc.SNESSetJacobian($PetscLib, snes, J, PJ, fptr, ctx)\n    #end\n    snes.updateJ! = updateJ!\n    return nothing\nend\n\nfunction solve!(\n    x::AbstractPetscVec{PetscLib},\n    snes::AbstractPetscSNES{PetscLib},\n    b::Union{Nothing, AbstractPetscVec{PetscLib}} = nothing,\n) where {PetscLib}\n    has_opts = !isnothing(snes.opts)\n    if has_opts\n        push!(snes.opts)\n        # Call SetFromOptions here (rather than in the constructor) so that\n        # the DM and callbacks are already attached. This is critical for\n        # PCs like MG that need a DM hierarchy, and for FieldSplit sub-KSPs\n        # that are created lazily during KSPSetUp/KSPSolve.\n        LibPETSc.SNESSetFromOptions(PetscLib, snes)\n    end\n    try\n        LibPETSc.SNESSolve(PetscLib, snes, isnothing(b) ? C_NULL : b, x)\n    finally\n        has_opts && pop!(snes.opts)\n    end\n    return x\nend\n\n\n\"\"\"\n    destroy(snes::AbstractPetscSNES)\n\nDestroy a SNES (nonlinear solver) object and release associated resources.\n\nThis function is typically called automatically via finalizers when the object\nis garbage collected, but can be called explicitly to free resources immediately.\n\n# External Links\n$(_doc_external(\"SNES/SNESDestroy\"))\n\"\"\"\nfunction destroy(snes::AbstractPetscSNES{PetscLib}) where {PetscLib}\n    if !(finalized(PetscLib)) && snes.ptr != C_NULL\n        LibPETSc.SNESDestroy(PetscLib, snes)\n    end\n    snes.ptr = C_NULL\n    return nothing\nend\n\n\n\"\"\"\n    dm = getDM(snes::AbstractPetscSNES)\n\nGet `dmda` for `snes`\n\nThe returned `dmda` is owned by the `snes`\n\n# External Links\n$(_doc_external(\"SNES/SNESGetDM\"))\n\"\"\"\nfunction getDM(\n    snes::AbstractPetscSNES{PetscLib},\n) where {PetscLib}\n    dmda = LibPETSc.SNESGetDM(getlib(PetscLib), snes)\n    return dmda\nend\n\n\n\"\"\"\n    setDM!(snes::AbstractPetscSNES, dm::AbstractDM)\n\nSet `dm` for `snes`\n\n# External Links\n$(_doc_external(\"SNES/SNESSetDM\"))\n\"\"\"\nfunction setDM!(\n    snes::AbstractPetscSNES{PetscLib},\n    dm::AbstractPetscDM{PetscLib},\n) where {PetscLib}\n    LibPETSc.SNESSetDM(getlib(PetscLib), snes, dm)\n    return nothing\nend\n"
  },
  {
    "path": "src/startup.jl",
    "content": "# Functions needed to find libraries\nfunction getlibs()\n    libs = ()\n    petsc_libs = ENV[\"JULIA_PETSC_LIBRARY\"]\n\n    flags = Libdl.RTLD_LAZY | Libdl.RTLD_DEEPBIND | Libdl.RTLD_GLOBAL\n\n    for petsc_lib in Base.parse_load_path(petsc_libs)\n        libs = (libs..., (petsc_lib, flags))\n    end\n    return libs\nend\nconst libs = @static if !haskey(ENV, \"JULIA_PETSC_LIBRARY\")\n    using PETSc_jll\n    (\n     #(PETSc_jll.libpetsc,),\n     (PETSc_jll.libpetsc_Float64_Real_Int64,),\n     (PETSc_jll.libpetsc_Float32_Real_Int64,),\n     (PETSc_jll.libpetsc_Float64_Complex_Int64,),\n     (PETSc_jll.libpetsc_Float32_Complex_Int64,),\n     # XXX: The following cannot be used until all types are based on PetscLib\n     #      instead of PetscScalar\n     # (PETSc_jll.libpetsc_Float64_Real_Int32,),\n     # (PETSc_jll.libpetsc_Float32_Real_Int32,),\n     # (PETSc_jll.libpetsc_Float64_Complex_Int32,),\n     # (PETSc_jll.libpetsc_Float32_Complex_Int32,),\n    )\nelse\n    getlibs()\nend\nfunction DataTypeFromString(libhdl::Ptr{Cvoid}, name::AbstractString)\n    PetscDataTypeFromString_ptr = dlsym(libhdl, :PetscDataTypeFromString)\n    dtype_ref = Ref{PetscDataType}()\n    found_ref = Ref{PetscBool}()\n    @chk ccall(\n        PetscDataTypeFromString_ptr,\n        PetscErrorCode,\n        (Cstring, Ptr{PetscDataType}, Ptr{PetscBool}),\n        name,\n        dtype_ref,\n        found_ref,\n    )\n    @assert found_ref[] == PETSC_TRUE\n    return dtype_ref[]\nend\nfunction PetscDataTypeGetSize(libhdl::Ptr{Cvoid}, dtype::PetscDataType)\n    PetscDataTypeGetSize_ptr = dlsym(libhdl, :PetscDataTypeGetSize)\n    datasize_ref = Ref{Csize_t}()\n    @chk ccall(\n        PetscDataTypeGetSize_ptr,\n        PetscErrorCode,\n        (PetscDataType, Ptr{Csize_t}),\n        dtype,\n        datasize_ref,\n    )\n    return datasize_ref[]\nend\n\n"
  },
  {
    "path": "src/string_wrappers.jl",
    "content": "# Convenience wrappers for PETSc SetType functions that accept Julia strings\n# instead of C string pointers\n#\n# These wrappers are defined in the parent PETSc module and delegate to\n# LibPETSc functions with automatic string-to-pointer conversion.\n\n\"\"\"\n    MatSetType(petsclib, mat, type::String)\n\nConvenience wrapper for setting matrix type using a Julia string.\n\n# Example\n```julia\nmat = LibPETSc.MatCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.MatSetType(petsclib, mat, \"seqaij\")\n```\n\"\"\"\nfunction LibPETSc.MatSetType(petsclib::LibPETSc.PetscLibType, mat, type::String)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Int8}, pointer(c_str))\n    LibPETSc.MatSetType(petsclib, mat, ptr)\n    return nothing\nend\n\n\"\"\"\n    VecSetType(petsclib, vec, type::String)\n\nConvenience wrapper for setting vector type using a Julia string.\n\n# Example\n```julia\nvec = LibPETSc.VecCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.VecSetType(petsclib, vec, \"seq\")\n```\n\"\"\"\nfunction LibPETSc.VecSetType(petsclib::LibPETSc.PetscLibType, vec, type::String)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Int8}, pointer(c_str))\n    LibPETSc.VecSetType(petsclib, vec, ptr)\n    return nothing\nend\n\n\"\"\"\n    KSPSetType(petsclib, ksp, type::String)\n\nConvenience wrapper for setting KSP solver type using a Julia string.\n\n# Example\n```julia\nksp = LibPETSc.KSPCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.KSPSetType(petsclib, ksp, \"gmres\")\n```\n\"\"\"\nfunction LibPETSc.KSPSetType(petsclib::LibPETSc.PetscLibType, ksp, type::String)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Int8}, pointer(c_str))\n    LibPETSc.KSPSetType(petsclib, ksp, ptr)\n    return nothing\nend\n\n\"\"\"\n    SNESSetType(petsclib, snes, type::String)\n\nConvenience wrapper for setting SNES solver type using a Julia string.\n\n# Example\n```julia\nsnes = LibPETSc.SNESCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.SNESSetType(petsclib, snes, \"newtonls\")\n```\n\"\"\"\nfunction LibPETSc.SNESSetType(petsclib::LibPETSc.PetscLibType, snes, type::String)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Int8}, pointer(c_str))\n    LibPETSc.SNESSetType(petsclib, snes, ptr)\n    return nothing\nend\n\n\"\"\"\n    DMSetType(petsclib, dm, type::String)\n\nConvenience wrapper for setting DM type using a Julia string.\n\n# Example\n```julia\ndm = LibPETSc.DMCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.DMSetType(petsclib, dm, \"da\")\n```\n\"\"\"\nfunction LibPETSc.DMSetType(petsclib::LibPETSc.PetscLibType, dm, type::String)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Int8}, pointer(c_str))\n    LibPETSc.DMSetType(petsclib, dm, ptr)\n    return nothing\nend\n"
  },
  {
    "path": "src/string_wrappers_extra.jl",
    "content": "\"\"\"\n    TSSetType(petsclib, ts, type::String)\n\nConvenience wrapper for setting TS (time-stepping) type using a Julia string.\n\n# Example\n```julia\nts = LibPETSc.TSCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.TSSetType(petsclib, ts, \"bdf\")\n```\n\"\"\"\nfunction LibPETSc.TSSetType(petsclib::LibPETSc.PetscLibType, ts, type::String)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Int8}, pointer(c_str))\n    LibPETSc.TSSetType(petsclib, ts, ptr)\n    return nothing\nend\n\n\"\"\"\n    TaoSetType(petsclib, tao, type::String)\n\nConvenience wrapper for setting Tao solver type using a Julia string.\n\n# Example\n```julia\ntao = LibPETSc.TaoCreate(petsclib)\nLibPETSc.TaoSetType(petsclib, tao, \"lmvm\")\n```\n\"\"\"\nfunction LibPETSc.TaoSetType(petsclib::LibPETSc.PetscLibType, tao, type::String)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Int8}, pointer(c_str))\n    LibPETSc.TaoSetType(petsclib, tao, ptr)\n    return nothing\nend\n"
  },
  {
    "path": "src/sys.jl",
    "content": "\n\n\"\"\"\n    comm = function getcomm(\n                            obj::Union{\n                                PetscVec{PetscLib},\n                                PetscMat{PetscLib},\n                                PetscKSP{PetscLib},\n                                #PetscSNES{PetscLib},\n                                #PetscDM{PetscLib},\n                            },\n                        ) where {PetscLib}\n\nGets the MPI communicator for any of the objects above                         \n\n\"\"\"\nfunction getcomm(\n    obj::Union{\n        AbstractPetscVec{PetscLib},\n        AbstractPetscMat{PetscLib},\n        AbstractPetscKSP{PetscLib},\n        AbstractPetscSNES{PetscLib},\n        AbstractPetscDM{PetscLib},\n    },\n) where {PetscLib}\n    comm = LibPETSc.PetscObjectGetComm(PetscLib, obj)\n    return comm\nend\n"
  },
  {
    "path": "src/ts.jl",
    "content": "\"\"\"\n    TSSetRHSFunction(petsclib, ts, r, fptr::Ptr{Cvoid}, ctx = C_NULL)\n\nConvenience overload for low-level TS RHS callbacks created with `@cfunction`.\n\nThe generated bindings currently accept the PETSc function-wrapper type directly,\nwhile Julia's `@cfunction` returns a raw pointer. This overload bridges that\ngap so callback-based TS examples can use the low-level interface naturally.\n\"\"\"\nfunction LibPETSc.TSSetRHSFunction(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n    r::AbstractPetscVec,\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSSetRHSFunction(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n    r::AbstractPetscVec{$PetscLib},\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n)\n    typed_fptr = Base.unsafe_convert(Ptr{LibPETSc.TSRHSFunctionFn}, fptr)\n    LibPETSc.@chk ccall(\n        (:TSSetRHSFunction, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, LibPETSc.CVec, Ptr{LibPETSc.TSRHSFunctionFn}, Ptr{Cvoid}),\n        ts,\n        r,\n        typed_fptr,\n        ctx,\n    )\n    return nothing\nend\n\nfunction LibPETSc.TSSetRHSFunction(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n    ::Nothing,\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSSetRHSFunction(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n    ::Nothing,\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n)\n    typed_fptr = Base.unsafe_convert(Ptr{LibPETSc.TSRHSFunctionFn}, fptr)\n    LibPETSc.@chk ccall(\n        (:TSSetRHSFunction, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, LibPETSc.CVec, Ptr{LibPETSc.TSRHSFunctionFn}, Ptr{Cvoid}),\n        ts,\n        C_NULL,\n        typed_fptr,\n        ctx,\n    )\n    return nothing\nend\n\n\"\"\"\n    TSSetIFunction(petsclib, ts, r, fptr::Ptr{Cvoid}, ctx = C_NULL)\n\nConvenience overload for low-level TS implicit-function callbacks created with\n`@cfunction`.\n\"\"\"\nfunction LibPETSc.TSSetIFunction(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n    r::AbstractPetscVec,\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSSetIFunction(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n    r::AbstractPetscVec{$PetscLib},\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n)\n    typed_fptr = Base.unsafe_convert(Ptr{LibPETSc.TSIFunctionFn}, fptr)\n    LibPETSc.@chk ccall(\n        (:TSSetIFunction, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, LibPETSc.CVec, Ptr{LibPETSc.TSIFunctionFn}, Ptr{Cvoid}),\n        ts,\n        r,\n        typed_fptr,\n        ctx,\n    )\n    return nothing\nend\n\nfunction LibPETSc.TSSetIFunction(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n    ::Nothing,\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSSetIFunction(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n    ::Nothing,\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n)\n    typed_fptr = Base.unsafe_convert(Ptr{LibPETSc.TSIFunctionFn}, fptr)\n    LibPETSc.@chk ccall(\n        (:TSSetIFunction, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, LibPETSc.CVec, Ptr{LibPETSc.TSIFunctionFn}, Ptr{Cvoid}),\n        ts,\n        C_NULL,\n        typed_fptr,\n        ctx,\n    )\n    return nothing\nend\n\n\"\"\"\n    TSSetIJacobian(petsclib, ts, A, P, fptr::Ptr{Cvoid}, ctx = C_NULL)\n\nConvenience overload for low-level TS implicit-Jacobian callbacks created with\n`@cfunction`.\n\"\"\"\nfunction LibPETSc.TSSetIJacobian(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n    A::AbstractPetscMat,\n    P::AbstractPetscMat,\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSSetIJacobian(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n    A::AbstractPetscMat{$PetscLib},\n    P::AbstractPetscMat{$PetscLib},\n    fptr::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n)\n    typed_fptr = Base.unsafe_convert(Ptr{LibPETSc.TSIJacobianFn}, fptr)\n    LibPETSc.@chk ccall(\n        (:TSSetIJacobian, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, LibPETSc.CMat, LibPETSc.CMat, Ptr{LibPETSc.TSIJacobianFn}, Ptr{Cvoid}),\n        ts,\n        A,\n        P,\n        typed_fptr,\n        ctx,\n    )\n    return nothing\nend\n\n\"\"\"\n    adapt = TSGetAdapt(petsclib, ts)\n\nReturn the adaptive time-step controller attached to `ts`.\n\"\"\"\nfunction LibPETSc.TSGetAdapt(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSGetAdapt(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n)\n    adapt_ref = Ref{LibPETSc.TSAdapt}()\n    LibPETSc.@chk ccall(\n        (:TSGetAdapt, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, Ptr{LibPETSc.TSAdapt}),\n        ts,\n        adapt_ref,\n    )\n    return adapt_ref[]\nend\n\n\"\"\"\n    TSIRKGetNumStages(petsclib, ts)\n\nReturn the number of stages currently configured for a `TSIRK` method.\n\"\"\"\nfunction LibPETSc.TSIRKGetNumStages(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSIRKGetNumStages(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n)\n    nstages_ref = Ref{$PetscInt}()\n    LibPETSc.@chk ccall(\n        (:TSIRKGetNumStages, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, Ptr{$PetscInt}),\n        ts,\n        nstages_ref,\n    )\n    return nstages_ref[]\nend\n\n\"\"\"\n    TSAdaptSetType(petsclib, adapt, type::String)\n\nConvenience wrapper for setting the TS adaptivity controller using a Julia\nstring such as `\"none\"` or `\"basic\"`.\n\"\"\"\nfunction LibPETSc.TSAdaptSetType(\n    petsclib::LibPETSc.PetscLibType,\n    adapt::LibPETSc.TSAdapt,\n    type::String,\n)\n    c_str = Vector{UInt8}(type * \"\\0\")\n    ptr = Base.unsafe_convert(Ptr{Cchar}, pointer(c_str))\n    LibPETSc.TSAdaptSetType(petsclib, adapt, ptr)\n    return nothing\nend\n\n\"\"\"\n    TSMonitorSet(petsclib, ts, monitor::Ptr{Cvoid}, ctx = C_NULL, mdestroy = C_NULL)\n\nConvenience overload for low-level TS monitor callbacks created with\n`@cfunction`.\n\"\"\"\nfunction LibPETSc.TSMonitorSet(\n    petsclib::LibPETSc.PetscLibType,\n    ts::LibPETSc.TS,\n    monitor::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n    mdestroy::Ptr{Cvoid} = C_NULL,\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSMonitorSet(\n    petsclib::$UnionPetscLib,\n    ts::LibPETSc.TS,\n    monitor::Ptr{Cvoid},\n    ctx::Ptr{Cvoid} = C_NULL,\n    mdestroy::Ptr{Cvoid} = C_NULL,\n)\n    typed_destroy = Ptr{LibPETSc.PetscCtxDestroyFn}(mdestroy)\n    LibPETSc.@chk ccall(\n        (:TSMonitorSet, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (LibPETSc.CTS, LibPETSc.external, Ptr{Cvoid}, Ptr{LibPETSc.PetscCtxDestroyFn}),\n        ts,\n        monitor,\n        ctx,\n        typed_destroy,\n    )\n    return nothing\nend\n\n\"\"\"\n    TSARKIMEXRegister(\n        petsclib,\n        name::String,\n        order,\n        s,\n        At,\n        bt,\n        ct,\n        A,\n        b,\n        c,\n        bembedt,\n        bembed,\n        pinterp,\n        binterpt,\n        binterp,\n    )\n\nJulia-friendly overload for registering a custom `TSARKIMEX` tableau. Optional\nPETSc arrays may be passed as `nothing`, which is translated to `NULL`.\n\nFor the stage tables `At` and `A`, PETSc expects flat vectors in row-major\norder, matching the layout used by C arrays. If you start from a Julia matrix,\ndo not pass `vec(A)` directly since Julia stores matrices column-major; flatten\nrow-by-row instead, for example with `vec(permutedims(A))`.\n\"\"\"\nfunction LibPETSc.TSARKIMEXRegister(\n    petsclib::LibPETSc.PetscLibType,\n    name::String,\n    order::Integer,\n    s::Integer,\n    At::AbstractVector,\n    bt::Union{Nothing, AbstractVector},\n    ct::Union{Nothing, AbstractVector},\n    A::AbstractVector,\n    b::Union{Nothing, AbstractVector},\n    c::Union{Nothing, AbstractVector},\n    bembedt::Union{Nothing, AbstractVector},\n    bembed::Union{Nothing, AbstractVector},\n    pinterp::Integer,\n    binterpt::Union{Nothing, AbstractVector},\n    binterp::Union{Nothing, AbstractVector},\n) end\n\nLibPETSc.@for_petsc function LibPETSc.TSARKIMEXRegister(\n    petsclib::$UnionPetscLib,\n    name::String,\n    order::Integer,\n    s::Integer,\n    At::AbstractVector,\n    bt::Union{Nothing, AbstractVector},\n    ct::Union{Nothing, AbstractVector},\n    A::AbstractVector,\n    b::Union{Nothing, AbstractVector},\n    c::Union{Nothing, AbstractVector},\n    bembedt::Union{Nothing, AbstractVector},\n    bembed::Union{Nothing, AbstractVector},\n    pinterp::Integer,\n    binterpt::Union{Nothing, AbstractVector},\n    binterp::Union{Nothing, AbstractVector},\n)\n    At_vals = $PetscReal.(At)\n    A_vals = $PetscReal.(A)\n    bt_vals = bt === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(bt)\n    ct_vals = ct === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(ct)\n    b_vals = b === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(b)\n    c_vals = c === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(c)\n    bembedt_vals =\n        bembedt === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(bembedt)\n    bembed_vals =\n        bembed === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(bembed)\n    binterpt_vals =\n        binterpt === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(binterpt)\n    binterp_vals =\n        binterp === nothing ? Ptr{$PetscReal}(C_NULL) : $PetscReal.(binterp)\n\n    LibPETSc.@chk ccall(\n        (:TSARKIMEXRegister, $petsc_library),\n        LibPETSc.PetscErrorCode,\n        (\n            LibPETSc.TSARKIMEXType,\n            $PetscInt,\n            $PetscInt,\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n            $PetscInt,\n            Ptr{$PetscReal},\n            Ptr{$PetscReal},\n        ),\n        name,\n        $PetscInt(order),\n        $PetscInt(s),\n        At_vals,\n        bt_vals,\n        ct_vals,\n        A_vals,\n        b_vals,\n        c_vals,\n        bembedt_vals,\n        bembed_vals,\n        $PetscInt(pinterp),\n        binterpt_vals,\n        binterp_vals,\n    )\n    return nothing\nend\n"
  },
  {
    "path": "src/vec.jl",
    "content": "# these are julia-specific PETSc functions, which makes PETSc a bit easier to use\n# a (nearly) full wrapper is in wrapping/\n\nimport .LibPETSc: AbstractPetscVec, PetscVec, CVec\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::AbstractPetscVec{PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        print(io, \"PETSc Vec (null pointer)\")\n        return\n    end\n    \n    # Try to get vector info, but handle uninitialized vectors gracefully\n    try\n        ty = LibPETSc.VecGetType(PetscLib, v)\n        si = LibPETSc.VecGetSize(PetscLib, v)\n        print(io, \"PETSc $ty Vec; length=$si\")\n    catch\n        # Vector not fully initialized yet (type not set)\n        print(io, \"PETSc Vec (not yet initialized)\")\n    end\n    return nothing\nend\n\n\"\"\"\n    VecPtr(petsclib, ptr::CVec, own::Bool)\n\nContainer type for a PETSc Vec that is just a raw pointer.\n\nIf `own` is `true`, the finalizer is set on the vector; calling `destroy` when\n`own` is `false` is a no-op.\n\"\"\"\nmutable struct VecPtr{PetscLib} <:\n               AbstractPetscVec{PetscLib}\n    ptr::CVec\n    own::Bool\nend\nfunction VecPtr(\n    petsclib::PetscLib,\n    ptr::CVec,\n    own,\n) where {PetscLib <: PetscLibType}\n    v = VecPtr{PetscLib}(ptr, own)\n    #comm = getcomm(v)\n\n    #comm = MPI.Comm()\n    comm = LibPETSc.PetscObjectGetComm(getlib(PetscLib), v)\n\n    if own && MPI.Comm_size(comm) == 1\n        finalizer(destroy, v)\n    end\n    return v\nend\nVecPtr(::Type{PetscLib}, x...) where {PetscLib <: PetscLibType} = VecPtr(getlib(PetscLib), x...)\n\n\n\"\"\"\n    VecSeq(petsclib, n::Int)\n\nA standard, sequentially-stored serial PETSc vector for `petsclib.PetscScalar`\nof length `n`.\n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeq\"))\n\"\"\"\nfunction VecSeq(petsclib::PetscLib, n::Int) where {PetscLib <: PetscLibType}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    v = LibPETSc.VecCreateSeq(petsclib, comm, n)\n    finalizer(destroy, v)\n    return v\nend\n\n\n\"\"\"\n    VecSeq(petsclib, v::Vector)\n\nA standard, sequentially-stored serial PETSc vector, wrapping the Julia vector\n`v`.\n\nThis reuses the array `v` as storage, and so `v` should not be `resize!`-ed or\notherwise have its length modified while the PETSc object exists.\n\nThis should only be need to be called for more advanced uses, for most simple\nusecases, users should be able to pass `Vector`s directly and have the wrapping\nperformed automatically\n\n# External Links\n$(_doc_external(\"Vec/VecCreateSeqWithArray\"))\n\"\"\"\nfunction VecSeq(\n    petsclib::PetscLib,\n    array::Vector{PetscScalar};\n    blocksize = 1,\n) where {PetscLib <: PetscLibType, PetscScalar}\n    comm = MPI.COMM_SELF\n    @assert initialized(petsclib)\n    @assert PetscScalar == petsclib.PetscScalar\n    PetscInt = petsclib.PetscInt\n    v = LibPETSc.VecCreateSeqWithArray(\n        petsclib,\n        comm,\n        PetscInt(blocksize),\n        PetscInt(length(array)),\n        array,\n    )\n    finalizer(destroy, v)\n    return v\nend\n\n\n# =============================================================================\n# Multiple dispatch to make PetscVec behave like Julia Vector\n# =============================================================================\n\n# Treat PETSc vectors as 1-D array-like objects for broadcasting/indexing\nBase.ndims(::Type{<:AbstractPetscVec}) = 1\nBase.IndexStyle(::Type{<:AbstractPetscVec}) = IndexLinear()\nBase.axes(v::AbstractPetscVec) = (Base.OneTo(length(v)),)\nBase.BroadcastStyle(::Type{<:AbstractPetscVec}) = Broadcast.DefaultArrayStyle{1}()\n\n# Array interface - size and length\nBase.size(v::AbstractPetscVec{PetscLib}) where {PetscLib} = LibPETSc.VecGetSize(PetscLib,v)\nBase.length(v::AbstractPetscVec{PetscLib}) where {PetscLib} = prod(size(v))\nBase.lastindex(v::AbstractPetscVec{PetscLib}) where {PetscLib} = length(v)\nBase.similar(v::AbstractPetscVec{PetscLib}) where {PetscLib} =  LibPETSc.VecDuplicate(getlib(PetscLib), v)\ntype(m::AbstractPetscVec{PetscLib}) where {PetscLib} = LibPETSc.VecGetType(PetscLib,m)\n\nfunction Base.getindex(v::AbstractPetscVec{PetscLib}, i::Integer) where {PetscLib} \n    PetscInt = inttype(PetscLib)\n    val = LibPETSc.VecGetValues(PetscLib,v, PetscInt(1), PetscInt.([i-1]))\n    return val[1]\nend\n\n# Range indexing\nfunction Base.getindex(v::AbstractPetscVec{PetscLib}, r::AbstractRange) where {PetscLib}\n    PetscInt = inttype(PetscLib)\n    val = LibPETSc.VecGetValues(PetscLib,v, PetscInt(length(r)), PetscInt.(Vector(r) .- 1))\n    return val\nend\n\n# Get all values\nfunction Base.getindex(v::AbstractPetscVec{PetscLib}, ::Colon) where {PetscLib}\n    n  = length(v)\n    return getindex(v, 1:n)\nend\n\nBase.isapprox(v::AbstractPetscVec{PetscLib}, w::AbstractPetscVec{PetscLib}; kwargs...) where {PetscLib} = all(v[:] .≈ w[:]; kwargs...)\n\nfunction Base.setindex!(v::AbstractPetscVec{PetscLib}, val, i::Integer) where {PetscLib} \n     PetscInt = inttype(PetscLib)\n     PetscScalar = PETSc.scalartype(PetscLib)\n     LibPETSc.VecSetValues(PetscLib,v, PetscInt(1), PetscInt.([i-1]), [PetscScalar(val)], PETSc.INSERT_VALUES)\n     return nothing\nend\n\nfunction Base.setindex!(v::AbstractPetscVec{PetscLib}, vals, r::AbstractRange) where {PetscLib} \n    PetscInt = inttype(PetscLib)\n    LibPETSc.VecSetValues(PetscLib,v, PetscInt(length(r)), PetscInt.(Vector(r) .- 1), vals, PETSc.INSERT_VALUES)\n    return nothing\nend\n\nBase.fill!(v::AbstractPetscVec{PetscLib}, val) where {PetscLib} = LibPETSc.VecSet(PetscLib,v, PetscLib.PetscScalar(val))\n\n# Broadcasting assignment support (dest is not an AbstractArray)\nfunction Base.copyto!(dest::AbstractPetscVec{PetscLib}, bc::Base.Broadcast.Broadcasted) where {PetscLib}\n    # Evaluate the broadcasted RHS\n    rhs = Base.materialize(bc)\n    if rhs isa Number\n        # Fast path for scalar RHS\n        Base.fill!(dest, rhs)\n        return dest\n    end\n    # Array-like RHS: shape must match\n    axes(dest) == axes(rhs) || throw(DimensionMismatch(\"broadcast axes $(axes(rhs)) do not match destination axes $(axes(dest))\"))\n    @inbounds for i in eachindex(rhs)\n        dest[i] = rhs[i]\n    end\n    return dest\nend\n\nBase.materialize!(dest::AbstractPetscVec, bc::Base.Broadcast.Broadcasted) = (Base.copyto!(dest, bc); dest)\n\n# Iterator interface\nBase.iterate(v::AbstractPetscVec{PetscLib})  where {PetscLib} = iterate(v, 1)\nfunction Base.iterate(v::AbstractPetscVec{PetscLib}, state)  where {PetscLib}\n    if state > length(v)\n        return nothing\n    end\n    return (v[state], state + 1)\nend\n\n\"\"\"\n    assemble!(A::PetscVec) \n\nAssembles a PETSc vector after setting values.\n\"\"\"\nfunction assemble!(A::AbstractPetscVec{PetscLib}) where {PetscLib}\n    LibPETSc.VecAssemblyBegin(PetscLib, A)\n    LibPETSc.VecAssemblyEnd(PetscLib, A)\nend\n\n\n\ndestroy(m::AbstractPetscVec{PetscLib}) where {PetscLib} = LibPETSc.VecDestroy(PetscLib,m)\n\n\n\"\"\"\n    unsafe_localarray(vec::AbstractVec; read=true, write=true)\n\nReturn an `Array{PetscScalar}` containing local portion of the PETSc `vec`\n\nUse `read=false` if the array is write-only; `write=false` if read-only.\n\n!!! note\n    `Base.finalize` should be called on the `Array` before the data can be used.\n\n# External Links\n$(_doc_external(\"Vec/VecGetArray\"))\n$(_doc_external(\"Vec/VecGetArrayWrite\"))\n$(_doc_external(\"Vec/VecGetArrayRead\"))\n$(_doc_external(\"Vec/VecRestoreArray\"))\n$(_doc_external(\"Vec/VecRestoreArrayWrite\"))\n$(_doc_external(\"Vec/VecRestoreArrayRead\"))\n\"\"\"\nfunction unsafe_localarray(\n    vec::AbstractPetscVec{PetscLib};\n    read::Bool = true,\n    write::Bool = true,\n) where {PetscLib}\n    if write && read\n        v = LibPETSc.VecGetArray(PetscLib, vec)\n    elseif write\n        v = LibPETSc.VecGetArrayWrite(PetscLib, vec)\n    elseif read\n        v = LibPETSc.VecGetArrayRead(PetscLib, vec)\n    else\n        error(\"either read or write should be true\")\n    end\n    \n    if write && read\n        finalizer(v) do v\n            LibPETSc.VecRestoreArray(PetscLib, vec, v)\n            return nothing\n        end\n    elseif write\n        finalizer(v) do v\n            LibPETSc.VecRestoreArrayWrite(PetscLib, vec, v)         \n            return nothing\n        end\n    elseif read\n        finalizer(v) do v\n            LibPETSc.VecRestoreArrayRead(PetscLib, vec,  v)\n            return nothing\n        end\n    end\n    return v\nend\n\n\n\"\"\"\n    withlocalarray!(\n        f!,\n        vecs::NTuple{N, AbstractVec};\n        read::Union{Bool, NTuple{N, Bool}} = true,\n        write::Union{Bool, NTuple{N, Bool}} = true,\n    )\n\nConvert `x` to an `Array{PetscScalar}` using [`unsafe_localarray`](@ref) and\napply the function `f!`.\n\nUse `read=false` if the array is write-only; `write=false` if read-only.\n\n# Examples\n```julia-repl\njulia> withlocalarray!(x; write=true) do x\n   @. x .*= 2\nend\n\njulia> withlocalarray!(\n           x,\n           y;\n           read = (false, true),\n           write = (true, false)\n       ) do x, y\n   @. x .= 2 .+ y\nend\n```\n\n!!! note\n    `Base.finalize` is automatically called on the array.\n\"\"\"\nfunction withlocalarray!(\n    f!,\n    vecs::NTuple{N, AbstractPetscVec};\n    read::Union{Bool, NTuple{N, Bool}} = true,\n    write::Union{Bool, NTuple{N, Bool}} = true,\n) where {N}\n    read isa NTuple{N, Bool} || (read = ntuple(_ -> read, N))\n    write isa NTuple{N, Bool} || (write = ntuple(_ -> write, N))\n\n    arrays = map(vecs, read, write) do v, r, w\n        unsafe_localarray(v; read = r, write = w)\n    end\n    val = f!(arrays...)\n    map(arrays) do array\n        Base.finalize(array)\n    end\n    return val\nend\nwithlocalarray!(f!, vecs...; kwargs...) = withlocalarray!(f!, vecs; kwargs...)\n\n\n\"\"\"\n    ghostupdatebegin!(\n        vec::AbstractPetscVec,\n        insertmode = INSERT_VALUES,\n        scattermode = SCATTER_FORWARD,\n    )\n\nBegins scattering `vec` to the local or global representations\n\n# External Links\n$(_doc_external(\"Vec/VecGhostUpdateBegin\"))\n\"\"\"\nfunction ghostupdatebegin!(\n    vec::AbstractPetscVec{PetscLib},\n    insertmode = INSERT_VALUES,\n    scattermode = SCATTER_FORWARD,\n) where {PetscLib}\n    LibPETSc.VecGhostUpdateBegin(PetscLib, vec, insertmode, scattermode)\n    return nothing\nend\n\n\"\"\"\n    ghostupdateend!(\n        vec::AbstractPetscVec,\n        insertmode = INSERT_VALUES,\n        scattermode = SCATTER_FORWARD,\n    )\n\nFinishes scattering `vec` to the local or global representations\n\n# External Links\n$(_doc_external(\"Vec/VecGhostUpdateEnd\"))\n\"\"\"\nfunction ghostupdateend!(\n    vec::AbstractPetscVec{PetscLib},\n    insertmode = INSERT_VALUES,\n    scattermode = SCATTER_FORWARD,\n) where {PetscLib}\n    LibPETSc.VecGhostUpdateEnd(PetscLib, vec, insertmode, scattermode)\n    return nothing\nend\n\n\"\"\"\n    ghostupdate!(\n        vec::AbstractPetscVec,\n        insertmode = INSERT_VALUES,\n        scattermode = SCATTER_FORWARD,\n    )\n\nFinishes scattering `vec` to the local or global representations\n\n# External Links\n$(_doc_external(\"Vec/VecGhostUpdateEnd\"))\n\"\"\"\nfunction ghostupdate!(\n    vec::AbstractPetscVec{PetscLib},\n    insertmode = INSERT_VALUES,\n    scattermode = SCATTER_FORWARD,\n) where {PetscLib}\n    ghostupdatebegin!(vec,insertmode,scattermode)\n    ghostupdateend!(vec,insertmode,scattermode)\n    return nothing\nend\n\n\"\"\"\n    v = VecSeq(petsclib, comm, array)\nCreates a sequential PETSc vector of length `n` given a julia array `array`` \n\"\"\"\nfunction VecSeq(petsclib::PetscLib, comm, x::Vector) where {PetscLib <: PetscLibType}\n    @assert initialized(petsclib)\n    \n    v = LibPETSc.VecCreateSeqWithArray(petsclib,comm, 1, length(x), x)    # solution vector\n    finalizer(destroy, v)\n\n    return v\nend\n\n\n\n\"\"\"\n    ownershiprange(vec::AbstractVec, [base_one = true])\n\nThe range of indices owned by this processor, assuming that the `vec` is laid\nout with the first `n1` elements on the first processor, next `n2` elements on\nthe second, etc. For certain parallel layouts this range may not be well\ndefined.\n\nIf the optional argument `base_one == true` then base-1 indexing is used,\notherwise base-0 index is used.\n\n!!! note\n\n    unlike the C function, the range returned is inclusive (`idx_first:idx_last`)\n\n# External Links\n$(_doc_external(\"Vec/VecGetOwnershipRange\"))\n\"\"\"\nfunction ownershiprange(\n    vec::AbstractPetscVec{PetscLib},\n    base_one::Bool = true,\n) where {PetscLib}\n    PetscInt = PetscLib.PetscInt\n    r_lo = Ref{PetscInt}()\n    r_hi = Ref{PetscInt}()\n    r_lo, r_hi = LibPETSc.VecGetOwnershipRange(PetscLib, vec)\n    return base_one ? ((r_lo[] + PetscInt(1)):(r_hi[])) :\n           ((r_lo[]):(r_hi[] - PetscInt(1)))\nend\n\n# Overload norm function\nfunction LinearAlgebra.norm(\n    v::AbstractPetscVec{PetscLib},\n    normtype::LibPETSc.NormType = LibPETSc.NORM_2,\n) where {PetscLib}\n    PetscReal = PetscLib.PetscReal\n    r_val = LibPETSc.VecNorm(PetscLib, v, normtype)\n    return r_val\nend\n"
  },
  {
    "path": "test/01-hello.jl",
    "content": "using MPI\nusing PETSc\nif !Sys.iswindows()\n    MPI.Init()\nend\n\n# Windows PETSc binaries are built without MPI support, use PETSC_COMM_SELF instead\ncomm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\nprintln(\"Hello world, I am $(MPI.Comm_rank(comm)) of $(MPI.Comm_size(comm))\")\nMPI.Barrier(comm)"
  },
  {
    "path": "test/dmda.jl",
    "content": "using Test\nusing PETSc, MPI\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n\n\n@testset \"DMDACreate1D\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[5]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        # Loop over all boundary types and try to use them\n        for boundary_type in instances(LibPETSc.DMBoundaryType)\n            #boundary_type = LibPETSc.DM_BOUNDARY_NONE\n            @testset \"$boundary_type\" begin\n                \n                dof_per_node = PetscInt(4)\n                stencil_width = PetscInt(5)\n\n                # We test both setting and not setting the point distribution\n                points_per_proc = [PetscInt(10 + i) for i in 1:mpisize]\n                proc_global_offsets =\n                    [PetscInt(0), accumulate(+, points_per_proc)...]\n\n                global_size = PetscInt(proc_global_offsets[end])\n\n                # left and right ghost points\n                gl =\n                    boundary_type == PETSc.DM_BOUNDARY_NONE && mpirank == 0 ?\n                    0 : stencil_width\n                gr =\n                    boundary_type == PETSc.DM_BOUNDARY_NONE &&\n                    mpirank == mpisize - 1 ? 0 : stencil_width\n\n                # Set the points\n\n                # NOTE: here I explicitly call the individual functions; below we use the convenience function DMDA\n                da = LibPETSc.DMDACreate1d(petsclib,comm, boundary_type, global_size, dof_per_node, stencil_width, points_per_proc)\n                PETSc.setfromoptions!(da)   # set options (if any)\n                PETSc.setup!(da)            # we need to call this to finalize the DMDA\n          \n                @test LibPETSc.DMGetType(petsclib,da) == \"da\"\n                @test LibPETSc.DMGetDimension(petsclib, da) == 1\n\n                bx_type = LibPETSc.DM_BOUNDARY_NONE\n                by_type = LibPETSc.DM_BOUNDARY_NONE\n                bz_type = LibPETSc.DM_BOUNDARY_NONE\n                \n                stencil_type = [LibPETSc.DMDA_STENCIL_STAR]\n\n                da_info = PETSc.getinfo(da)\n\n                @test da_info.dim == 1\n                @test da_info.global_size == (global_size, 1, 1)\n                @test da_info.mpi_proc_size == (1, 1, 1)\n                @test da_info.boundary_type == (\n                    boundary_type,\n                    PETSc.DM_BOUNDARY_NONE,\n                    PETSc.DM_BOUNDARY_NONE,\n                )\n                @test da_info.stencil_type == PETSc.DMDA_STENCIL_BOX\n                @test da_info.stencil_width == stencil_width\n\n                corners = PETSc.getcorners(da)\n                @test corners.lower ==\n                      CartesianIndex(proc_global_offsets[mpirank + 1] + 1, 1, 1)\n                @test corners.upper ==\n                      CartesianIndex(proc_global_offsets[mpirank + 2], 1, 1)\n                @test corners.size == (points_per_proc[mpirank + 1], 1, 1)\n\n                ghost_corners = PETSc.getghostcorners(da)\n                @test ghost_corners.lower == CartesianIndex(\n                    proc_global_offsets[mpirank + 1] + 1 - gl,\n                    1,\n                    1,\n                )\n                @test ghost_corners.upper == CartesianIndex(\n                    proc_global_offsets[mpirank + 2] + gr,\n                    1,\n                    1,\n                )\n                @test ghost_corners.size ==\n                      (points_per_proc[mpirank + 1] + gl + gr, 1, 1)\n\n                PETSc.destroy(da)\n\n                # Use DMDA convenience function\n                da = PETSc.DMDA(\n                    petsclib,\n                    comm,\n                    (boundary_type,),\n                    (global_size,),\n                    dof_per_node,\n                    stencil_width;\n                )\n                @test LibPETSc.DMGetType(petsclib,da) == \"da\"\n                @test LibPETSc.DMGetDimension(petsclib, da) == 1\n\n                da_info = PETSc.getinfo(da)\n\n                @test da_info.dim == 1\n                if boundary_type == PETSc.DM_BOUNDARY_PERIODIC\n                    @test da_info.global_size ==\n                          ( global_size, 1, 1)\n                else\n                    @test da_info.global_size ==\n                          ( (global_size - 1) + 1, 1, 1)\n                end\n                @test da_info.mpi_proc_size == (mpisize, 1, 1)\n                @test da_info.boundary_type == (\n                    boundary_type,\n                    PETSc.DM_BOUNDARY_NONE,\n                    PETSc.DM_BOUNDARY_NONE,\n                )\n                @test da_info.stencil_type == PETSc.DMDA_STENCIL_BOX\n                @test da_info.stencil_width == stencil_width\n                PETSc.destroy(da)\n\n            end\n        end\n        PETSc.finalize(petsclib)\n    end\nend\n\n\n@testset \"DMDACreate2D\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    global_size_x = 100\n    global_size_y = 45\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[5]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        # Loop over all boundary types and stencil types\n        for stencil_type in instances(PETSc.DMDAStencilType),\n            #stencil_type = PETSc.DMDA_STENCIL_STAR\n            boundary_type_y in instances(PETSc.DMBoundaryType),\n            boundary_type_x in instances(PETSc.DMBoundaryType)\n            \n            # skip unsupported stencils\n            stencil_type == PETSc.DMDA_STENCIL_BOX &&\n                (\n                    boundary_type_x == PETSc.DM_BOUNDARY_MIRROR ||\n                    boundary_type_y == PETSc.DM_BOUNDARY_MIRROR\n                ) &&\n                continue\n\n            @testset \"$boundary_type_x, $boundary_type_y, $stencil_type\" begin\n                dof_per_node = 4\n                stencil_width = 5\n\n                # Set the points\n                da = PETSc.DMDA(\n                    petsclib,\n                    comm,\n                    (boundary_type_x, boundary_type_y),\n                    (global_size_x, global_size_y),\n                    dof_per_node,\n                    stencil_width,\n                    stencil_type,\n                )\n                @test LibPETSc.DMGetType(petsclib,da) == \"da\"\n                @test LibPETSc.DMGetDimension(petsclib, da) == 2\n\n                da_info = PETSc.getinfo(da)\n\n                @test da_info.global_size == (global_size_x, global_size_y, 1)\n                @test da_info.dim == 2\n                @test prod(da_info.mpi_proc_size) == mpisize\n                @test da_info.boundary_type ==\n                      (boundary_type_x, boundary_type_y, PETSc.DM_BOUNDARY_NONE)\n                @test da_info.stencil_type == stencil_type\n                @test da_info.stencil_width == stencil_width\n\n                PETSc.destroy(da)\n\n                # test refinement\n                da_refine = 2\n                da = PETSc.DMDA(\n                    petsclib,\n                    comm,\n                    (boundary_type_x, boundary_type_y),\n                    (global_size_x, global_size_y),\n                    dof_per_node,\n                    stencil_width,\n                    stencil_type;\n                    da_refine = da_refine,\n                )\n                @test LibPETSc.DMGetType(petsclib,da) == \"da\"\n                @test LibPETSc.DMGetDimension(petsclib, da) == 2\n\n                da_info = PETSc.getinfo(da)\n                PETSc.destroy(da)\n\n                # Compute refined global size\n                ref_global_size_x =\n                    boundary_type_x == PETSc.DM_BOUNDARY_PERIODIC ?\n                    2^da_refine * global_size_x :\n                    2^da_refine * (global_size_x - 1) + 1\n                ref_global_size_y =\n                    boundary_type_y == PETSc.DM_BOUNDARY_PERIODIC ?\n                    2^da_refine * global_size_y :\n                    2^da_refine * (global_size_y - 1) + 1\n\n                @test da_info.global_size ==\n                      (ref_global_size_x, ref_global_size_y, 1)\n                @test prod(da_info.mpi_proc_size) == mpisize\n                @test da_info.boundary_type ==\n                      (boundary_type_x, boundary_type_y, PETSc.DM_BOUNDARY_NONE)\n                @test da_info.stencil_type == stencil_type\n                @test da_info.stencil_width == stencil_width\n\n              \n                \n                PETSc.destroy(da)\n            end\n        end\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"DMDACreate3D\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    global_size_x = 12\n    global_size_y = 13\n    global_size_z = 14\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1] \n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        # Loop over all boundary types and stencil types\n        for stencil_type in instances(PETSc.DMDAStencilType),\n            boundary_type_z in instances(PETSc.DMBoundaryType),\n            boundary_type_y in instances(PETSc.DMBoundaryType),\n            boundary_type_x in instances(PETSc.DMBoundaryType)\n\n            stencil_type == PETSc.DMDA_STENCIL_BOX &&\n                (\n                    boundary_type_x == PETSc.DM_BOUNDARY_MIRROR ||\n                    boundary_type_y == PETSc.DM_BOUNDARY_MIRROR ||\n                    boundary_type_z == PETSc.DM_BOUNDARY_MIRROR\n                ) &&\n                continue\n\n            @testset \"$boundary_type_x, $boundary_type_y, $boundary_type_z, $stencil_type\" begin\n                dof_per_node = 4\n                stencil_width = 2\n\n                # Set the points\n                da = PETSc.DMDA(\n                    petsclib,\n                    comm,\n                    (boundary_type_x, boundary_type_y, boundary_type_z),\n                    (global_size_x, global_size_y, global_size_z),\n                    dof_per_node,\n                    stencil_width,\n                    stencil_type,\n                )\n                @test LibPETSc.DMGetType(petsclib,da) == \"da\"\n                @test LibPETSc.DMGetDimension(petsclib, da) == 3\n\n                da_info = PETSc.getinfo(da)\n\n                @test da_info.global_size ==\n                      (global_size_x, global_size_y, global_size_z)\n                @test da_info.dim == 3\n                @test prod(da_info.mpi_proc_size) == mpisize\n                @test da_info.boundary_type ==\n                      (boundary_type_x, boundary_type_y, boundary_type_z)\n                @test da_info.stencil_type == stencil_type\n                @test da_info.stencil_width == stencil_width\n\n                PETSc.destroy(da)\n                # test refinement\n                da_refine = 2\n                da = PETSc.DMDA(\n                    petsclib,\n                    comm,\n                    (boundary_type_x, boundary_type_y, boundary_type_z),\n                    (global_size_x, global_size_y, global_size_z),\n                    dof_per_node,\n                    stencil_width,\n                    stencil_type;\n                    da_refine = da_refine,\n                )\n                @test LibPETSc.DMGetType(petsclib,da) == \"da\"\n                @test LibPETSc.DMGetDimension(petsclib, da) == 3\n\n                da_info = PETSc.getinfo(da)\n\n                # Compute refined global size\n                ref_global_size_x =\n                    boundary_type_x == PETSc.DM_BOUNDARY_PERIODIC ?\n                    2^da_refine * global_size_x :\n                    2^da_refine * (global_size_x - 1) + 1\n                ref_global_size_y =\n                    boundary_type_y == PETSc.DM_BOUNDARY_PERIODIC ?\n                    2^da_refine * global_size_y :\n                    2^da_refine * (global_size_y - 1) + 1\n                ref_global_size_z =\n                    boundary_type_z == PETSc.DM_BOUNDARY_PERIODIC ?\n                    2^da_refine * global_size_z :\n                    2^da_refine * (global_size_z - 1) + 1\n\n                @test da_info.global_size ==\n                      (ref_global_size_x, ref_global_size_y, ref_global_size_z)\n                @test prod(da_info.mpi_proc_size) == mpisize\n                @test da_info.boundary_type ==\n                      (boundary_type_x, boundary_type_y, boundary_type_z)\n                @test da_info.stencil_type == stencil_type\n                @test da_info.stencil_width == stencil_width\n\n                PETSc.destroy(da)\n                # TODO: Test with specific distribution of processors and sizes\n\n                # TODO: Need a better test?\n                #=\n                ksp = PETSc.KSP(da)\n                @test PETSc.gettype(ksp) == \"gmres\"\n                =#\n            end\n        end\n\n\n        PETSc.finalize(petsclib)\n    end\nend\n\n\n@testset \"DM MatAIJ\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    # Just check a couple libraries\n    for petsclib in PETSc.petsclibs[1:2]\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        for dim in 1:3\n            boundary_type = ntuple(_ -> PETSc.DM_BOUNDARY_NONE, dim)\n            dof_per_node = 1\n            stencil_width = 1\n            number_points = 10\n            global_size = ntuple(i -> (10 + i) * mpisize, 3)\n            # Set the points\n            da = PETSc.DMDA(\n                petsclib,\n                comm,\n                boundary_type,\n                global_size[1:dim],\n                dof_per_node,\n                stencil_width,\n                PETSc.DMDA_STENCIL_STAR;\n                # Force processor distribution so that we know how to go from\n                # Stencil to Linear easily\n                processors = (ntuple(i -> 1, dim - 1)..., mpisize),\n            )\n            #mat = PETSc.MatAIJ(da)\n            mat = LibPETSc.DMCreateMatrix(petsclib, da)\n\n            # Build the dim-dimensional Laplacian FD matrix\n            corners = PETSc.getcorners(da)\n\n            # test setting mat values with a MatStencil\n            #i = corners.lower\n            #mat[i, i] = -2dim\n\n            #d = 1\n            #j = i + CartesianIndex(d == 1, d == 2, d == 3)\n            #mat[i, j] = 1\n\n            \n            for i in (corners.lower):(corners.upper)\n                for d in 1:dim\n                    if i[d] - 1 > 1\n                        j = i - CartesianIndex(d == 1, d == 2, d == 3)\n                        mat[i, j] = 1\n                    end\n                    if i[d] + 1 < global_size[d]\n                        j = i + CartesianIndex(d == 1, d == 2, d == 3)\n                        mat[i, j] = 1\n                    end\n                end\n                mat[i, i] = -2dim\n            end\n\n            PETSc.assemble!(mat)\n\n            # check\n            ind = LinearIndices(ntuple(i -> 1:global_size[i], 3))\n            for ci in (corners.lower):(corners.upper)\n                i = ind[ci]\n                @test mat[i, i] == -2dim\n                for d in 1:dim\n                    if ci[d] - 1 > 1\n                        j = ind[ci - CartesianIndex(d == 1, d == 2, d == 3)]\n                        @test mat[i, j] == 1\n                    end\n                    if ci[d] + 1 < global_size[d]\n                        j = ind[ci + CartesianIndex(d == 1, d == 2, d == 3)]\n                        @test mat[i, j] == 1\n                    end\n                end\n            end\n\n            PETSc.destroy(mat)\n            PETSc.destroy(da)\n        end\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"DM Vec & Coord\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs\n        petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        boundary_type = PETSc.DM_BOUNDARY_NONE\n        dof_per_node = 1\n        stencil_width = 1\n        number_points = 10\n        points_per_proc = [PetscInt(10) for i in 1:mpisize]\n        global_size = sum(points_per_proc)\n\n        # Set the points\n        da = PETSc.DMDA(\n            petsclib,\n            comm,\n            (boundary_type,),\n            (global_size,),\n            dof_per_node,\n            stencil_width;\n            points_per_proc = (points_per_proc,),\n        )\n\n        corners = PETSc.getcorners(da)\n\n        # Create the local and global vectors\n        #vec = LibPETSc.DMCreateLocalVector(petsclib,da)\n\n        local_vec = PETSc.DMLocalVec(da)\n        global_vec = PETSc.DMGlobalVec(da)\n\n        bot_val = 0\n        top_val = 0\n\n        # Fill everything with some data\n        fill!(local_vec, mpirank)\n        fill!(global_vec, mpisize)\n\n        # add the local values to the global values\n        #PETSc.update!(global_vec, local_vec, PETSc.ADD_VALUES)\n        PETSc.dm_local_to_global!(local_vec, global_vec, da, PETSc.ADD_VALUES)\n\n        # end points added with neighbor due to ghost of size 1\n        bot_val = mpisize + mpirank + (mpirank == 0 ? 0 : mpirank - 1)\n        top_val = mpisize + mpirank + (mpirank == mpisize - 1 ? 0 : mpirank + 1)\n        @test global_vec[corners.lower[1]] == bot_val\n        @test global_vec[corners.upper[1]] == top_val\n\n        # Center is just self plus the global\n        for i in (corners.lower[1] + 1):(corners.upper[1] - 1)\n            @test global_vec[i] == mpisize + mpirank\n        end\n\n        # reset the local values with the global values\n        #PETSc.update!(local_vec, global_vec, PETSc.INSERT_VALUES)\n        #PETSc.dm_global_to_local!(local_vec, global_vec, da, PETSc.INSERT_VALUES)\n        PETSc.dm_global_to_local!(global_vec, local_vec, da, PETSc.INSERT_VALUES)\n\n        # My first value and my ghost should be the bot/top values\n        @test local_vec[1] == bot_val\n        @test local_vec[2] == bot_val\n        @test local_vec[end - 1] == top_val\n        @test local_vec[end] == top_val\n\n        # interior is just self plus the global\n        for i in 3:(length(local_vec) - 2)\n            @test local_vec[i] == mpisize + mpirank\n        end\n\n        PETSc.destroy(global_vec)\n        PETSc.destroy(local_vec)\n\n\n        # Test DM Coordinates\n\n        # Crank it up to 11!\n        xmin, xmax = 0, 11\n        PETSc.setuniformcoordinates_dmda!(da, (xmin,), (xmax,))\n        coord_vec = PETSc.coordinatesDMLocalVec(da)\n        Δx = (xmax - xmin) / (global_size - 1)\n\n        # Figure out the values we should have in the coordinate vector\n        ghost_lower = corners.lower[1] - (mpirank == 0 ? 0 : 1)\n        ghost_upper = corners.upper[1] + (mpirank == mpisize - 1 ? 0 : 1)\n        for (loc, glo) in enumerate(ghost_lower:ghost_upper)\n            @test coord_vec[loc] ≈ (glo - 1) * Δx\n        end\n\n        # Test setting coordinates in 2D & retrieving values\n        global_size_x, global_size_y = 10, 12\n        dof_per_node = 2\n\n        # Create 2D DMDA\n        da_2D = PETSc.DMDA(\n            petsclib,\n            comm,\n            (boundary_type, boundary_type),\n            (global_size_x, global_size_y),\n            dof_per_node,\n            stencil_width,\n            PETSc.DMDA_STENCIL_STAR,\n        )\n\n        # Set uniform coordinates\n        xmin, xmax = 0, 11\n        ymin, ymax = -20, 20\n        Δx = (xmax - xmin) / (global_size_x - 1)     # only needed for testing\n        Δy = (ymax - ymin) / (global_size_y - 1)     # only needed for testing\n\n        PETSc.setuniformcoordinates_dmda!(da_2D, (xmin, ymin), (xmax, ymax))\n\n         # Retrieve local coordinate array (shaped accordingly)\n        coord = PETSc.getlocalcoordinatearray(da_2D)\n\n        # Check\n        corners = PETSc.getcorners(da_2D)\n        for i in ((corners.lower):(corners.upper))\n            @test coord[1, i] ≈ (i[1] - 1) * Δx + xmin\n            @test coord[2, i] ≈ (i[2] - 1) * Δy + ymin\n        end\n\n        # Retrieve local array of the 2 DOF DMDA and set values\n        x_g = PETSc.DMGlobalVec(da_2D)\n        x_l = PETSc.DMLocalVec(da_2D)\n\n        PETSc.withlocalarray!(x_l; read = false) do l_x\n            x = PETSc.reshapelocalarray(l_x, da_2D)\n            @test 2 == size(x, 1)\n\n            Array_1 = @view x[1, :, :, :]\n            Array_1 .= 11.1\n\n            Array_2 = @view x[2, :, :, :]\n            Array_2 .= 22.2\n        end\n        #PETSc.dm_local_to_global!(x_g, x_l, da_2D, PETSc.INSERT_VALUES)\n        PETSc.dm_local_to_global!(x_l,x_g, da_2D, PETSc.INSERT_VALUES)\n\n        sum_val = PETSc.LibPETSc.VecSum(petsclib, x_g)\n        @test sum_val ≈ PetscScalar(3996)            # check sum of global vector\n\n        PETSc.destroy(coord_vec)\n        #PETSc.destroy(coord_da)\n        PETSc.destroy(da)\n        PETSc.destroy(da_2D)\n        PETSc.destroy(x_g)\n        PETSc.destroy(x_l)\n\n        PETSc.finalize(petsclib)\n\n    end\nend\n\n\nnothing\n"
  },
  {
    "path": "test/dmnetwork.jl",
    "content": "using Test\nusing PETSc, MPI\n\n# Initialize MPI & PETSc only if needed\nmpi_started = false\nif !MPI.Initialized()\n    MPI.Init()\n    mpi_started = true\nend\ntry\n    local petsclib = PETSc.getlib()\n    petsc_started = false\n    if !PETSc.initialized(petsclib)\n        PETSc.initialize(petsclib)\n        petsc_started = true\n    end\n\n    @testset \"DMNetwork basic\" begin\n        network = LibPETSc.DMNetworkCreate(petsclib, MPI.COMM_WORLD)\n        @test network.ptr != C_NULL\n\n        nedges = 2\n        nvertices = 3\n        LibPETSc.DMNetworkSetNumSubNetworks(petsclib, network, 1, 1)\n        edgelist = [1,2,2,3]\n        netnum = LibPETSc.DMNetworkAddSubnetwork(petsclib, network, \"main\", nedges, edgelist)\n        @test netnum >= 0\n\n        compkey = LibPETSc.DMNetworkRegisterComponent(petsclib, network, \"bus\", Csize_t(0))\n        @test compkey >= 0\n\n        LibPETSc.DMNetworkLayoutSetUp(petsclib, network)\n        LibPETSc.DMSetUp(petsclib, network)\n\n        x = LibPETSc.DMCreateGlobalVector(petsclib, network)\n        @test x.ptr != C_NULL\n\n        LibPETSc.VecDestroy(petsclib, x)\n        LibPETSc.DMDestroy(petsclib, network)\n    end\n\n    if petsc_started\n        PETSc.finalize(petsclib)\n    end\ncatch e\n    try if petsc_started; PETSc.finalize(petsclib); end catch end\n    rethrow(e)\nfinally\n    # Do not call MPI.Finalize() from tests; test harness manages MPI lifecycle\n    nothing\nend"
  },
  {
    "path": "test/dmproduct.jl",
    "content": "using Test\nusing PETSc, MPI\n\n# Initialize MPI & PETSc only if needed\nmpi_started = false\nif !MPI.Initialized()\n    MPI.Init()\n    mpi_started = true\nend\ntry\n    local petsclib = PETSc.getlib()\n    petsc_started = false\n    if !PETSc.initialized(petsclib)\n        PETSc.initialize(petsclib)\n        petsc_started = true\n    end\n\n    @testset \"DMProduct basic\" begin\n        dm1 = LibPETSc.DMPlexCreateBoxMesh(\n            petsclib, MPI.COMM_WORLD, 2, LibPETSc.PETSC_FALSE,\n            [1,1], [0.0,0.0], [1.0,1.0], [LibPETSc.DM_BOUNDARY_NONE, LibPETSc.DM_BOUNDARY_NONE], LibPETSc.PETSC_TRUE, 0, LibPETSc.PETSC_FALSE\n        )\n        dm2 = LibPETSc.DMPlexCreateBoxMesh(\n            petsclib, MPI.COMM_WORLD, 2, LibPETSc.PETSC_FALSE,\n            [1,1], [0.0,0.0], [1.0,1.0], [LibPETSc.DM_BOUNDARY_NONE, LibPETSc.DM_BOUNDARY_NONE], LibPETSc.PETSC_TRUE, 0, LibPETSc.PETSC_FALSE\n        )\n\n        product = LibPETSc.DMCreate(petsclib, MPI.COMM_WORLD)\n        LibPETSc.DMSetType(petsclib, product, \"product\")\n        # set dimension to number of component DMs and map dimension indices\n        LibPETSc.DMSetDimension(petsclib, product, 2)\n        LibPETSc.DMProductSetDimensionIndex(petsclib, product, 0, 0)\n        LibPETSc.DMProductSetDimensionIndex(petsclib, product, 1, 0)\n\n        @test product.ptr != C_NULL\n\n        LibPETSc.DMProductSetDM(petsclib, product, 0, dm1)\n        LibPETSc.DMProductSetDM(petsclib, product, 1, dm2)\n\n        LibPETSc.DMSetUp(petsclib, product)\n\n        LibPETSc.DMDestroy(petsclib, product)\n        LibPETSc.DMDestroy(petsclib, dm1)\n        LibPETSc.DMDestroy(petsclib, dm2)\n    end\n\n    if petsc_started\n        PETSc.finalize(petsclib)\n    end\ncatch e\n    try if petsc_started; PETSc.finalize(petsclib); end catch end\n    rethrow(e)\nfinally\n    # Do not call MPI.Finalize() from tests; test harness manages MPI lifecycle\n    nothing\nend"
  },
  {
    "path": "test/dmshell.jl",
    "content": "using Test\nusing PETSc, MPI\n\n# Initialize MPI & PETSc only if needed\n mpi_started = false\n if !MPI.Initialized()\n     MPI.Init()\n     mpi_started = true\n end\n try\n     local petsclib = PETSc.getlib()\n     petsc_started = false\n     if !PETSc.initialized(petsclib)\n         PETSc.initialize(petsclib)\n         petsc_started = true\n     end\n\n    @testset \"DMShell basic\" begin\n        shell = LibPETSc.DMShellCreate(petsclib, MPI.COMM_WORLD)\n        @test shell.ptr != C_NULL\n\n        LibPETSc.DMSetUp(petsclib, shell)\n\n        LibPETSc.DMDestroy(petsclib, shell)\n    end\n\n    if petsc_started\n        PETSc.finalize(petsclib)\n    end\ncatch e\n    try if petsc_started; PETSc.finalize(petsclib); end catch end\n    rethrow(e)\nfinally\n    # Do not call MPI.Finalize() from tests; test harness manages MPI lifecycle\n    nothing\nend"
  },
  {
    "path": "test/dmstag.jl",
    "content": "using Test\nusing PETSc, MPI\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n\n\n@testset \"DMStagCreate1d\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1]\n        \n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        dof_per_node = (3, 4)\n        dof_per_nodec= (4, 3)\n        stencil_width = 3\n\n        for boundary_type in instances(PETSc.DMBoundaryType)\n            #boundary_type = PETSc.LibPETSc.DM_BOUNDARY_NONE\n            # DMStag cannot be used with these boundary types\n            boundary_type == PETSc.DM_BOUNDARY_MIRROR && continue\n            boundary_type == PETSc.DM_BOUNDARY_TWIST && continue\n\n            @testset \"$boundary_type\" begin\n\n                # We test both setting and not setting the point distribution\n                points_per_proc = [PetscInt(10 + i) for i in 1:mpisize]\n                proc_global_offsets =\n                    [PetscInt(0), accumulate(+, points_per_proc)...]\n\n                global_size = proc_global_offsets[end]\n\n                dm = PETSc.DMStag(\n                    petsclib,\n                    comm,\n                    (boundary_type,),\n                    (global_size,),\n                    dof_per_node,\n                    stencil_width;\n                    points_per_proc = (points_per_proc,),\n                )\n\n                dmnew = PETSc.DMStag(\n                    dm,\n                    dof_per_nodec,\n                )\n\n                @test PETSc.gettype(dm) == \"stag\"\n                @test PETSc.gettype(dmnew) == \"stag\"\n                @test PETSc.getdimension(dm) == 1\n                @test LibPETSc.DMStagGetDOF(petsclib,dm) == (3, 4,0,0)\n                @test LibPETSc.DMStagGetDOF(petsclib,dmnew) == (4, 3,0,0)\n                @test LibPETSc.DMStagGetGlobalSizes(petsclib,dm) ===\n                      (global_size, PetscInt(0), PetscInt(0))\n                @test size(dm) === (global_size, PetscInt(0), PetscInt(0))\n                @test LibPETSc.DMStagGetLocalSizes(petsclib,dm) ===\n                      (points_per_proc[mpirank + 1], PetscInt(0), PetscInt(0))\n\n                corners = PETSc.getcorners(dm)\n                @test corners.lower ==\n                      CartesianIndex(proc_global_offsets[mpirank + 1] + 1, 1, 1)\n                @test corners.upper ==\n                      CartesianIndex(proc_global_offsets[mpirank + 2], 0, 0)\n                @test corners.size == (points_per_proc[mpirank + 1], 0, 0)\n\n                # Check the extra and first / last rank\n                #map(LibPETSc.DMStagGetIsLastRank(petsclib,dm), corners.nextra) do b, n\n                #    @test b && boundary_type != PETSc.DM_BOUNDARY_PERIODIC ?\n                #          n == 1 : n == 0\n                #end\n\n                gl =\n                    boundary_type == PETSc.DM_BOUNDARY_NONE && mpirank == 0 ?\n                    0 : stencil_width\n                gr =\n                    boundary_type == PETSc.DM_BOUNDARY_NONE &&\n                    mpirank == mpisize - 1 ? 1 : stencil_width\n                ghost_corners = PETSc.getghostcorners(dm)\n\n                @test ghost_corners.lower == CartesianIndex(\n                    proc_global_offsets[mpirank + 1] + 1 - gl,\n                    1,\n                    1,\n                )\n                @test ghost_corners.upper == CartesianIndex(\n                    proc_global_offsets[mpirank + 2] + gr,\n                    0,\n                    0,\n                )\n                @test ghost_corners.size ==\n                      (points_per_proc[mpirank + 1] + gl + gr, 0, 0)\n\n                #@test LibPETSc.DMStagGetBoundaryTypes(petsclib,dm) === (\n                #    boundary_type,\n                #    PETSc.DM_BOUNDARY_NONE,\n                #    PETSc.DM_BOUNDARY_NONE,\n                #)\n                PETSc.destroy(dm)\n                PETSc.destroy(dmnew)\n            end\n\n        end\n          PETSc.finalize(petsclib)\n    end\nend\n\n\n@testset \"DMStagCreate2d\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    global_size_x = 100\n    global_size_y = 45\n    for petsclib in PETSc.petsclibs\n       # petsclib = PETSc.petsclibs[1]\n        #@show petsclib\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        dof_per_node = (3, 4, 5)\n        dof_per_nodec= (4,3)\n        stencil_width = 5\n\n        for boundary_type_y in instances(PETSc.DMBoundaryType),\n            boundary_type_x in instances(PETSc.DMBoundaryType)\n\n            # DMStag cannot be used with these boundary types\n            boundary_type_x ∈\n            (PETSc.DM_BOUNDARY_MIRROR, PETSc.DM_BOUNDARY_TWIST) && continue\n            boundary_type_y ∈\n            (PETSc.DM_BOUNDARY_MIRROR, PETSc.DM_BOUNDARY_TWIST) && continue\n\n            @testset \"$boundary_type_x, $boundary_type_y\" begin\n                dm = PETSc.DMStag(\n                    petsclib,\n                    comm,\n                    (boundary_type_x, boundary_type_y),\n                    (global_size_x, global_size_y),\n                    dof_per_node,\n                    stencil_width\n                )\n\n                dmnew = PETSc.DMStag(\n                    dm,\n                    dof_per_nodec,\n                )\n\n                @test PETSc.gettype(dm) == \"stag\"\n                @test PETSc.gettype(dmnew) == \"stag\"\n                @test PETSc.getdimension(dm) == 2\n                @test LibPETSc.DMStagGetDOF(petsclib, dm) == (3, 4, 5,0)\n                @test LibPETSc.DMStagGetDOF(petsclib, dmnew) == (4, 3, 0,0)\n                @test size(dm) === (\n                    PetscInt(global_size_x),\n                    PetscInt(global_size_y),\n                    PetscInt(0),\n                )\n                \n                corners = PETSc.getcorners(dm)\n                ghost_corners = PETSc.getghostcorners(dm)\n                \n                isfirst = LibPETSc.DMStagGetIsFirstRank(petsclib,dm)\n                islast = LibPETSc.DMStagGetIsLastRank(petsclib,dm)\n                \n                bt = (boundary_type_x, boundary_type_y, PETSc.DM_BOUNDARY_NONE)\n                for d in 1:3\n                    # Check left side ghost_corners and corner\n                    #if d == 3\n                    #    @test corners.lower[d] == ghost_corners.lower[d]\n                    #elseif !isfirst[d] || bt[d] != PETSc.DM_BOUNDARY_NONE\n                    #    @test corners.lower[d] ==\n                    #          ghost_corners.lower[d] + stencil_width\n                    #else\n                    #    @test corners.lower[d] == ghost_corners.lower[d]\n                    #end\n\n                    # Check right side ghost_corners and corner\n                    if d == 3\n                        @test corners.upper[d] == ghost_corners.upper[d]\n                    elseif bt[d] != PETSc.DM_BOUNDARY_NONE\n                        @test corners.upper[d] ==\n                              ghost_corners.upper[d] - stencil_width\n                    elseif !islast[d]\n                    #    @test corners.upper[d] ==\n                    #          ghost_corners.upper[d] - stencil_width\n                    else\n                        @test corners.upper[d] == ghost_corners.upper[d] - 1\n                    end\n\n                    ## Check the nextra\n                    #if islast[d] && bt[d] != PETSc.DM_BOUNDARY_PERIODIC\n                    #    @test corners.nextra[d] == 1\n                    #else\n                    #    @test corners.nextra[d] == 0\n                    #end\n                end\n                \n\n                #@test LibPETSc.DMStagGetBoundaryTypes(petsclib, dm) ===\n                #      (boundary_type_x, boundary_type_y, PETSc.DM_BOUNDARY_NONE)\n\n                PETSc.destroy(dm)\n                PETSc.destroy(dmnew)\n            end\n        end\n        PETSc.finalize(petsclib)\n    end\nend\n\n\n\n\n@testset \"DMStagCreate3d\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    global_size_x = 20\n    global_size_y = 25\n    global_size_z = 30\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        dof_per_node = (2, 3, 4, 5)\n        dof_per_nodec= (4,3)\n        stencil_width = 5\n\n        for boundary_type_z in instances(PETSc.DMBoundaryType),\n            boundary_type_y in instances(PETSc.DMBoundaryType),\n            boundary_type_x in instances(PETSc.DMBoundaryType)\n\n            # DMStag cannot be used with these boundary types\n            boundary_type_x ∈\n            (PETSc.DM_BOUNDARY_MIRROR, PETSc.DM_BOUNDARY_TWIST) && continue\n            boundary_type_y ∈\n            (PETSc.DM_BOUNDARY_MIRROR, PETSc.DM_BOUNDARY_TWIST) && continue\n            boundary_type_z ∈\n            (PETSc.DM_BOUNDARY_MIRROR, PETSc.DM_BOUNDARY_TWIST) && continue\n\n            @testset \"$boundary_type_x, $boundary_type_y, $boundary_type_z\" begin\n                dm = PETSc.DMStag(\n                    petsclib,\n                    comm,\n                    (boundary_type_x, boundary_type_y, boundary_type_z),\n                    (global_size_x, global_size_y, global_size_z),\n                    dof_per_node,\n                    stencil_width\n                )\n\n                dmnew = PETSc.DMStag(\n                    dm,\n                    dof_per_nodec\n                )\n\n                @test PETSc.gettype(dm) == \"stag\"\n                @test PETSc.gettype(dmnew) == \"stag\"\n                @test PETSc.getdimension(dm) == 3\n                @test LibPETSc.DMStagGetDOF(petsclib,dm) == (2, 3, 4, 5)\n                @test LibPETSc.DMStagGetDOF(petsclib,dmnew) == (4, 3, 0, 0)\n                @test size(dm) === (\n                    PetscInt(global_size_x),\n                    PetscInt(global_size_y),\n                    PetscInt(global_size_z),\n                )\n\n                corners = PETSc.getcorners(dm)\n                ghost_corners = PETSc.getghostcorners(dm)\n                isfirst = LibPETSc.DMStagGetIsFirstRank(petsclib,dm)\n                islast = LibPETSc.DMStagGetIsLastRank(petsclib,dm)\n\n                bt = (boundary_type_x, boundary_type_y, boundary_type_z)\n                for d in 1:3\n                    # Check left side ghost_corners and corner\n                    if !isfirst[d] || bt[d] != PETSc.DM_BOUNDARY_NONE\n                    #    @test corners.lower[d] ==\n                    #          ghost_corners.lower[d] + stencil_width\n                    else\n                        @test corners.lower[d] == ghost_corners.lower[d]\n                    end\n\n                    # Check right side ghost_corners and corner\n                    if bt[d] != PETSc.DM_BOUNDARY_NONE\n                        @test corners.upper[d] ==\n                              ghost_corners.upper[d] - stencil_width\n                    elseif !islast[d]\n                    #    @test corners.upper[d] ==\n                    #          ghost_corners.upper[d] - stencil_width\n                    else\n                        @test corners.upper[d] == ghost_corners.upper[d] - 1\n                    end\n\n                    # Check the nextra\n                    #if islast[d] && bt[d] != PETSc.DM_BOUNDARY_PERIODIC\n                    #    @test corners.nextra[d] == 1\n                    #else\n                    #    @test corners.nextra[d] == 0\n                    #end\n                end\n\n                #@test PETSc.boundarytypes(dm) ===\n                #      (boundary_type_x, boundary_type_y, boundary_type_z)\n\n                PETSc.destroy(dm)\n                PETSc.destroy(dmnew)\n            end\n        end\n    end\nend\n"
  },
  {
    "path": "test/doc_examples_is.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Documentation examples for IS\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    PetscInt = PETSc.LibPETSc.PetscInt\n    \n    @testset \"Basic Usage\" begin\n        # Create an index set from an array of indices (0-based)\n        # Note: IS expects indices to be PetscInt (usually Int64), not Int32\n        indices = PetscInt[0, 2, 4, 6, 8]\n        is = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, length(indices), indices, PETSc.LibPETSc.PETSC_COPY_VALUES)\n        @test is isa PETSc.LibPETSc.IS\n        @test is.ptr != C_NULL\n        \n        # Create a stride index set: indices = first:step:(first + step*(n-1))\n        is_stride = PETSc.LibPETSc.ISCreateStride(petsclib, test_comm, 10, 0, 2)  # 0, 2, 4, ..., 18\n        @test is_stride isa PETSc.LibPETSc.IS\n        @test is_stride.ptr != C_NULL\n        \n        # Get the size of an index set (returns value directly)\n        n = PETSc.LibPETSc.ISGetSize(petsclib, is)\n        @test n == 5\n        \n        # Get local size (returns value directly)\n        local_n = PETSc.LibPETSc.ISGetLocalSize(petsclib, is)\n        @test local_n == 5\n        \n        # Cleanup\n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n        @test is.ptr == C_NULL\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is_stride)\n        @test is_stride.ptr == C_NULL\n    end\n    \n    @testset \"Creating Index Sets\" begin\n        # General index set from array\n        indices = PetscInt[1, 3, 5, 7, 9]\n        is_general = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 5, indices, \n                                                    PETSc.LibPETSc.PETSC_COPY_VALUES)\n        @test is_general.ptr != C_NULL\n        \n        # Stride index set: first, first+step, first+2*step, ...\n        is_stride = PETSc.LibPETSc.ISCreateStride(petsclib, test_comm, 5, 10, 3)\n        @test is_stride.ptr != C_NULL\n        size = PETSc.LibPETSc.ISGetSize(petsclib, is_stride)\n        @test size == 5\n        \n        # Block index set: block-structured indices\n        block_indices = PetscInt[0, 2, 4]  # Blocks starting at these indices\n        is_block = PETSc.LibPETSc.ISCreateBlock(petsclib, test_comm, 2, 3, block_indices, \n                                                PETSc.LibPETSc.PETSC_COPY_VALUES)\n        @test is_block.ptr != C_NULL\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is_general)\n        PETSc.LibPETSc.ISDestroy(petsclib, is_stride)\n        PETSc.LibPETSc.ISDestroy(petsclib, is_block)\n    end\n    \n    @testset \"Set Operations - skipped due to complex API\" begin\n        # Note: IS set operations (ISSum, ISDifference, ISExpand) have complex\n        # usage patterns that require careful setup. Skip for now.\n        @test_skip true\n    end\n    \n    @testset \"Querying Properties\" begin\n        # Create sorted index set\n        indices = PetscInt[0, 2, 4, 6, 8]\n        is = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 5, indices, \n                                            PETSc.LibPETSc.PETSC_COPY_VALUES)\n        \n        # Check if index set is sorted (returns Bool directly)\n        is_sorted = PETSc.LibPETSc.ISSorted(petsclib, is)\n        @test is_sorted == PETSc.LibPETSc.PETSC_TRUE\n        \n        # Check if identity permutation (returns Bool directly)\n        is_identity = PETSc.LibPETSc.ISIdentity(petsclib, is)\n        @test typeof(is_identity) == Bool\n        \n        # Check if a permutation (returns Bool directly)\n        is_perm = PETSc.LibPETSc.ISPermutation(petsclib, is)\n        @test typeof(is_perm) == Bool\n        \n        # Get min/max values\n        min_val, max_val = PETSc.LibPETSc.ISGetMinMax(petsclib, is)\n        @test min_val == 0\n        @test max_val == 8\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n    end\n    \n    @testset \"Duplicate and Copy\" begin\n        indices = PetscInt[1, 3, 5, 7]\n        is_original = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 4, indices, \n                                                      PETSc.LibPETSc.PETSC_COPY_VALUES)\n        \n        # Duplicate creates a new IS\n        is_dup = PETSc.LibPETSc.ISDuplicate(petsclib, is_original)\n        @test is_dup.ptr != C_NULL\n        @test is_dup.ptr != is_original.ptr\n        \n        # Verify duplicated IS has same size\n        size_orig = PETSc.LibPETSc.ISGetSize(petsclib, is_original)\n        size_dup = PETSc.LibPETSc.ISGetSize(petsclib, is_dup)\n        @test size_orig == size_dup\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is_original)\n        PETSc.LibPETSc.ISDestroy(petsclib, is_dup)\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/doc_examples_tao.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Documentation examples for Tao\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    PetscInt = PETSc.LibPETSc.PetscInt\n    \n    @testset \"Basic Usage\" begin\n        # Create a Tao object\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        @test tao isa PETSc.LibPETSc.Tao\n        @test tao.ptr != C_NULL\n        \n        # Set the optimization algorithm (e.g., LMVM, BLMVM, NLS)\n        PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, \"lmvm\"))\n        \n        # Set convergence tolerances\n        PETSc.LibPETSc.TaoSetTolerances(petsclib, tao, 1e-8, 1e-8, 1e-8)\n        \n        # Set maximum iterations\n        PETSc.LibPETSc.TaoSetMaximumIterations(petsclib, tao, 1000)\n        \n        # Set options from command line/options database\n        PETSc.LibPETSc.TaoSetFromOptions(petsclib, tao)\n        \n        # Get iteration information (returns value directly)\n        iter = PETSc.LibPETSc.TaoGetIterationNumber(petsclib, tao)\n        @test iter == 0  # Should be 0 before solving\n        \n        # Cleanup\n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n        @test tao.ptr == C_NULL\n    end\n    \n    @testset \"Different Optimization Algorithms\" begin\n        # Test unconstrained algorithms\n        unconstrained_types = [\"lmvm\", \"cg\", \"nm\", \"nls\", \"ntr\"]\n        \n        for tao_type in unconstrained_types\n            tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n            \n            # Set type using string\n            PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, tao_type))\n            \n            # Verify type was set (TaoGetType already returns a String)\n            type_str = PETSc.LibPETSc.TaoGetType(petsclib, tao)\n            @test type_str == tao_type\n            \n            PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n        end\n        \n        # Test bound-constrained algorithms\n        bound_types = [\"blmvm\", \"bncg\", \"bqnls\", \"bntl\", \"tron\"]\n        \n        for tao_type in bound_types\n            tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n            \n            # Set type using string\n            PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, tao_type))\n            \n            # Verify type was set (TaoGetType already returns a String)\n            type_str = PETSc.LibPETSc.TaoGetType(petsclib, tao)\n            @test type_str == tao_type\n            \n            PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n        end\n    end\n    \n    @testset \"Tolerance and Iteration Settings\" begin\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, \"lmvm\"))\n        \n        # Set convergence tolerances (gatol, grtol, gttol)\n        PETSc.LibPETSc.TaoSetTolerances(petsclib, tao, 1e-6, 1e-6, 1e-6)\n        \n        # Get tolerances back\n        gatol, grtol, gttol = PETSc.LibPETSc.TaoGetTolerances(petsclib, tao)\n        @test gatol ≈ 1e-6\n        @test grtol ≈ 1e-6\n        @test gttol ≈ 1e-6\n        \n        # Set and get maximum iterations\n        PETSc.LibPETSc.TaoSetMaximumIterations(petsclib, tao, 500)\n        max_iter = PETSc.LibPETSc.TaoGetMaximumIterations(petsclib, tao)\n        @test max_iter == 500\n        \n        # Get current iteration number\n        iter = PETSc.LibPETSc.TaoGetIterationNumber(petsclib, tao)\n        @test iter == 0  # Should be 0 before solving\n        \n        # Set and get maximum function evaluations\n        PETSc.LibPETSc.TaoSetMaximumFunctionEvaluations(petsclib, tao, 10000)\n        max_funcs = PETSc.LibPETSc.TaoGetMaximumFunctionEvaluations(petsclib, tao)\n        @test max_funcs == 10000\n        \n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n    end\n    \n    @testset \"Solution Vector Setup\" begin\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, \"lmvm\"))\n        \n        # Create a solution vector\n        x = PETSc.LibPETSc.VecCreate(petsclib, test_comm)\n        PETSc.LibPETSc.VecSetSizes(petsclib, x, 10, 10)\n        PETSc.LibPETSc.VecSetFromOptions(petsclib, x)\n        PETSc.LibPETSc.VecSet(petsclib, x, 0.0)\n        \n        # Set initial solution\n        PETSc.LibPETSc.TaoSetSolution(petsclib, tao, x)\n        \n        # Note: TaoGetSolution modifies the Vec parameter in-place\n        # Skip this test as the API pattern is complex\n        \n        PETSc.LibPETSc.VecDestroy(petsclib, x)\n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/doc_examples_ts.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Documentation examples for TS\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    \n    @testset \"Basic Usage\" begin\n        # Create a TS object\n        ts = PETSc.LibPETSc.TSCreate(petsclib, test_comm)\n        @test ts isa PETSc.LibPETSc.TS\n        @test ts.ptr != C_NULL\n        \n        # Set the problem type (ODE or DAE)\n        PETSc.LibPETSc.TSSetProblemType(petsclib, ts, PETSc.LibPETSc.TS_NONLINEAR)\n        \n        # Set the time stepping method (e.g., BDF, RK, Theta)\n        PETSc.LibPETSc.TSSetType(petsclib, ts, \"bdf\")  # String convenience wrapper\n        \n        # Set time span\n        PETSc.LibPETSc.TSSetTime(petsclib, ts, 0.0)  # Initial time\n        PETSc.LibPETSc.TSSetMaxTime(petsclib, ts, 1.0)  # Final time\n        PETSc.LibPETSc.TSSetExactFinalTime(petsclib, ts, PETSc.LibPETSc.TS_EXACTFINALTIME_STEPOVER)\n        \n        # Set initial time step\n        PETSc.LibPETSc.TSSetTimeStep(petsclib, ts, 0.01)\n        \n        # Set options from command line/options database\n        PETSc.LibPETSc.TSSetFromOptions(petsclib, ts)\n        \n        # Get solution time (returns value directly, not through Ref)\n        final_time = PETSc.LibPETSc.TSGetSolveTime(petsclib, ts)\n        @test final_time isa Float64\n        \n        # Cleanup\n        PETSc.LibPETSc.TSDestroy(petsclib, ts)\n        @test ts.ptr == C_NULL\n    end\n    \n    @testset \"Different Time Integration Schemes\" begin\n        # Test different TS types mentioned in docs\n        ts_types = [\"euler\", \"rk\", \"bdf\", \"theta\", \"arkimex\", \"ssp\"]\n        \n        for ts_type in ts_types\n            ts = PETSc.LibPETSc.TSCreate(petsclib, test_comm)\n            \n            # Set type using string\n            PETSc.LibPETSc.TSSetType(petsclib, ts, ts_type)\n            \n            # Verify type was set (TSGetType already returns a String)\n            type_str = PETSc.LibPETSc.TSGetType(petsclib, ts)\n            @test type_str == ts_type\n            \n            PETSc.LibPETSc.TSDestroy(petsclib, ts)\n        end\n    end\n    \n    @testset \"Time Parameter Setters/Getters\" begin\n        ts = PETSc.LibPETSc.TSCreate(petsclib, test_comm)\n        \n        # Set and get time\n        PETSc.LibPETSc.TSSetTime(petsclib, ts, 0.5)\n        time = PETSc.LibPETSc.TSGetTime(petsclib, ts)\n        @test time ≈ 0.5\n        \n        # Set and get time step\n        PETSc.LibPETSc.TSSetTimeStep(petsclib, ts, 0.01)\n        dt = PETSc.LibPETSc.TSGetTimeStep(petsclib, ts)\n        @test dt ≈ 0.01\n        \n        # Set max time\n        PETSc.LibPETSc.TSSetMaxTime(petsclib, ts, 10.0)\n        max_time = PETSc.LibPETSc.TSGetMaxTime(petsclib, ts)\n        @test max_time ≈ 10.0\n        \n        # Set max steps\n        PETSc.LibPETSc.TSSetMaxSteps(petsclib, ts, 1000)\n        max_steps = PETSc.LibPETSc.TSGetMaxSteps(petsclib, ts)\n        @test max_steps == 1000\n        \n        PETSc.LibPETSc.TSDestroy(petsclib, ts)\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/doc_examples_viewer.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Documentation examples for PetscViewer\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    \n    @testset \"Basic Usage - Create viewer\" begin\n        # Create a viewer for ASCII output to stdout\n        viewer = PETSc.LibPETSc.PetscViewerCreate(petsclib, test_comm)\n        @test viewer isa PETSc.LibPETSc.PetscViewer\n        @test viewer != C_NULL\n        \n        PETSc.LibPETSc.PetscViewerSetType(petsclib, viewer, Base.unsafe_convert(Ptr{Int8}, \"ascii\"))\n        PETSc.LibPETSc.PetscViewerFileSetMode(petsclib, viewer, PETSc.LibPETSc.FILE_MODE_WRITE)\n        \n        # Note: PetscViewerDestroy has API issues with raw Ptr types\n        # It needs to be called but the wrapped version doesn't work correctly\n        # Skip destruction test for now\n    end\n    \n    @testset \"Convenience functions\" begin\n        # Test the convenience functions we added\n        viewer_stdout_self = PETSc.LibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib)\n        @test viewer_stdout_self isa PETSc.LibPETSc.PetscViewer\n        @test viewer_stdout_self != C_NULL\n        \n        viewer_stdout_world = PETSc.LibPETSc.PETSC_VIEWER_STDOUT_WORLD(petsclib)\n        @test viewer_stdout_world isa PETSc.LibPETSc.PetscViewer\n        @test viewer_stdout_world != C_NULL\n        \n        viewer_stderr_self = PETSc.LibPETSc.PETSC_VIEWER_STDERR_SELF(petsclib)\n        @test viewer_stderr_self isa PETSc.LibPETSc.PetscViewer\n        @test viewer_stderr_self != C_NULL\n        \n        viewer_stderr_world = PETSc.LibPETSc.PETSC_VIEWER_STDERR_WORLD(petsclib)\n        @test viewer_stderr_world isa PETSc.LibPETSc.PetscViewer\n        @test viewer_stderr_world != C_NULL\n    end\n    \n    @testset \"ASCII File Output - skipped due to wrapper API issues\" begin\n        # Note: PetscViewerASCIIOpen and PetscViewerBinaryOpen have wrapper signatures\n        # that don't match Julia's calling convention. They expect viewer::PetscViewer\n        # but need to accept Ref{PetscViewer} to work properly.\n        # Skip these tests for now.\n        @test_skip true\n    end\n    \n    @testset \"Binary File I/O - skipped due to wrapper API issues\" begin\n        # Note: PetscViewerBinaryOpen has wrapper signature issues\n        # Skip this test for now\n        @test_skip true\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/examples.jl",
    "content": "using PETSc\nusing Test\nusing MPI\n\nusing .PETScTestUtils: find_sources\n\n@testset \"examples\" begin\n  examples_dir = joinpath(dirname(@__DIR__), \"examples\")\n  examples = find_sources(examples_dir)\n  filter!(file -> readline(file) != \"# EXCLUDE FROM TESTING\", examples)\n\n  @testset \"$(basename(example))\" for example in examples\n    @show example\n    code = \"\"\"\n    $(Base.load_path_setup_code())\n    include($(repr(example)))\n    \"\"\"\n    cmd = `$(Base.julia_cmd()) --startup-file=no -e $code`\n    @debug \"Testing $example\" Text(code) cmd\n    @test success(pipeline(cmd, stderr=stderr))\n  end\n\nend\n"
  },
  {
    "path": "test/init.jl",
    "content": "using Test\nusing PETSc\n\n@testset \"init\" begin\n    for petsclib in PETSc.petsclibs\n        # The first time through finalize should be false since we have never\n        # initialized petsclib yet...\n        initial_finalized_value = false\n\n        # since we haven't called anything these should be false!\n        @test !(PETSc.initialized(petsclib))\n        @test PETSc.finalized(petsclib) == initial_finalized_value\n\n        # The second time through  time through finalize should be true since\n        # we have initialized petsclib yet...\n        initial_finalized_value = true\n\n        # initialize PETSc\n        PETSc.initialize(petsclib)\n\n        # Check values again\n        @test PETSc.initialized(petsclib)\n        @test !(PETSc.finalized(petsclib))\n\n        PETSc.finalize(petsclib)\n\n        # Check values again\n        @test !(PETSc.initialized(petsclib))\n        @test PETSc.finalized(petsclib)\n    end\n\n    # Test initialize with log_view enabled\n    for petsclib in PETSc.petsclibs\n        # Test basic initialize with log_view\n        @test !(PETSc.initialized(petsclib))\n        \n        # Store original PETSC_OPTIONS if it exists\n        original_opts = get(ENV, \"PETSC_OPTIONS\", nothing)\n        \n        # Initialize with log view and a test file\n        # Use current directory to avoid Windows temp directory issues with short paths\n        test_log_file = joinpath(pwd(), \"test_log_$(hash(petsclib)).txt\")\n        \n        try\n            PETSc.initialize(petsclib; log_view = true, options = [\":$test_log_file\"])\n            \n            # Check initialization succeeded\n            @test PETSc.initialized(petsclib)\n            @test !(PETSc.finalized(petsclib))\n            \n            # Check that PETSC_OPTIONS was cleaned up\n            current_opts = get(ENV, \"PETSC_OPTIONS\", nothing)\n            @test current_opts == original_opts\n            \n            # Finalize\n            PETSc.finalize(petsclib)\n            @test !(PETSc.initialized(petsclib))\n            @test PETSc.finalized(petsclib)\n            \n            # Check that log file was created\n            # Note: On some platforms/configurations, PETSc may not create the log file\n            if isfile(test_log_file)\n                # Verify log file contains expected content\n                log_content = read(test_log_file, String)\n                @test occursin(\"PETSc Performance Summary\", log_content)\n            else\n                @warn \"Log file not created on this platform: $test_log_file\"\n            end\n        finally\n            # Clean up test log file even if tests fail\n            rm(test_log_file; force = true)\n        end\n    end\n    \n    # Test initialize with options but without log_view\n    for petsclib in PETSc.petsclibs\n        @test !(PETSc.initialized(petsclib))\n        \n        # Store original PETSC_OPTIONS\n        original_opts = get(ENV, \"PETSC_OPTIONS\", nothing)\n        \n        # Initialize with custom options only (no log_view)\n        PETSc.initialize(petsclib; options = [\"-malloc_debug\"])\n        \n        @test PETSc.initialized(petsclib)\n        \n        # Check that PETSC_OPTIONS was cleaned up\n        current_opts = get(ENV, \"PETSC_OPTIONS\", nothing)\n        @test current_opts == original_opts\n        \n        PETSc.finalize(petsclib)\n                @testset \"wrappers_version\" begin\n                    # Ensure the wrappers version check runs and returns the expected fields\n                    result = PETSc.check_petsc_wrappers_version()\n                    @test isa(result, NamedTuple)\n                    @test :wrappers_version in keys(result)\n                    @test :installed_version in keys(result)\n                    @test :match in keys(result)\n                    @test result.match === nothing || isa(result.match, Bool)\n                end\n    end\n    \n    # Test initialize with multiple options and log_view\n    for petsclib in PETSc.petsclibs\n        @test !(PETSc.initialized(petsclib))\n        \n        # Initialize with multiple options\n        # Use current directory to avoid Windows temp directory issues\n        test_log_file = joinpath(pwd(), \"test_log_multi_$(hash(petsclib)).txt\")\n        \n        try\n            PETSc.initialize(petsclib; log_view = true, options = [\":$test_log_file\", \"-log_view_memory\"])\n            \n            @test PETSc.initialized(petsclib)\n            \n            PETSc.finalize(petsclib)\n            \n            # Check log file was created and contains memory info\n            # Note: On some platforms/configurations, PETSc may not create the log file\n            if isfile(test_log_file)\n                log_content = read(test_log_file, String)\n                @test occursin(\"PETSc Performance Summary\", log_content)\n                # Memory summary may not always be present depending on PETSc build\n            else\n                @warn \"Log file not created on this platform: $test_log_file\"\n            end\n        finally\n            # Clean up even if tests fail\n            rm(test_log_file; force = true)\n        end\n    end\n    \n    # Test that PETSC_OPTIONS is preserved if it already exists\n    for petsclib in PETSc.petsclibs\n        @test !(PETSc.initialized(petsclib))\n        \n        # Set a custom PETSC_OPTIONS with a valid but harmless option\n        ENV[\"PETSC_OPTIONS\"] = \"-malloc_debug 0\"\n        \n        # Use current directory to avoid Windows temp directory issues\n        test_log_file = joinpath(pwd(), \"test_log_preserved_$(hash(petsclib)).txt\")\n        \n        try\n            PETSc.initialize(petsclib; log_view = true, options = [\":$test_log_file\"])\n            \n            @test PETSc.initialized(petsclib)\n            \n            # After initialization, original option should be restored\n            @test get(ENV, \"PETSC_OPTIONS\", \"\") == \"-malloc_debug 0\"\n            \n            PETSc.finalize(petsclib)\n        finally\n            # Clean up\n            delete!(ENV, \"PETSC_OPTIONS\")\n            # Note: On some platforms/configurations, PETSc may not create the log file\n            rm(test_log_file; force = true)\n        end\n    end\n\n    # Test set_petsclib with a precompiled library\n    @testset \"set_petsclib\" begin\n        # Get path from one of the precompiled libraries\n        precompiled_lib = PETSc.petsclibs[1]\n        lib_path = precompiled_lib.petsc_library\n        \n        # Create a custom library instance using set_petsclib\n        custom_lib = PETSc.set_petsclib(lib_path; PetscScalar=Float64, PetscInt=Int64)\n        \n        # Verify type parameters\n        @test custom_lib isa PETSc.LibPETSc.PetscLibType{Float64, Int64, String}\n        @test custom_lib.petsc_library == lib_path\n        @test PETSc.scalartype(custom_lib) == Float64\n        @test PETSc.inttype(custom_lib) == Int64\n        \n        # Test that it can be initialized and works\n        @test !PETSc.initialized(custom_lib)\n        PETSc.initialize(custom_lib)\n        @test PETSc.initialized(custom_lib)\n        \n        # Test basic functionality\n        version = PETSc.LibPETSc.PetscGetVersionNumber(custom_lib)\n        @test version[1] == 3  # PETSc version 3.x\n        @test version[2] >= 0  # Minor version\n        \n        PETSc.finalize(custom_lib)\n        @test !PETSc.initialized(custom_lib)\n        \n        # Test with different scalar/int types\n        lib_path_f32 = PETSc.petsclibs[2].petsc_library  # Float32 library\n        custom_lib_f32 = PETSc.set_petsclib(lib_path_f32; PetscScalar=Float32, PetscInt=Int64)\n        @test custom_lib_f32 isa PETSc.LibPETSc.PetscLibType{Float32, Int64, String}\n        @test PETSc.scalartype(custom_lib_f32) == Float32\n        @test PETSc.inttype(custom_lib_f32) == Int64\n    end\nend\n\n"
  },
  {
    "path": "test/ksp.jl",
    "content": "using Test\nusing MPI\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\nusing PETSc\nusing LinearAlgebra: mul!\nusing SparseArrays: spdiagm\n\n\n@testset \"KSP\" begin\n    # Windows PETSc binaries are built without MPI support, use PETSC_COMM_SELF instead\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    mpisize = MPI.Comm_size(comm)\n    mpirank = MPI.Comm_rank(comm)\n\n    for (ilib, petsclib) in enumerate(PETSc.petsclibs)\n        #petsclib = PETSc.petsclibs[8]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        \n        loc_num_rows = PetscInt(10)\n        loc_num_cols = PetscInt(10)\n        diag_nonzeros = PetscInt(3)\n        off_diag_non_zeros = PetscInt(3)\n\n        A = LibPETSc.MatCreateAIJ(petsclib, \n                                comm, \n                                loc_num_rows, \n                                loc_num_cols, \n                                PetscInt(LibPETSc.PETSC_DETERMINE),\n                                PetscInt(LibPETSc.PETSC_DETERMINE),\n                                diag_nonzeros, \n                                C_NULL,\n                                off_diag_non_zeros, \n                                C_NULL)\n\n        # Get compatible vectors\n        x,b  = LibPETSc.MatCreateVecs(petsclib,A)\n\n        # set coefficients in matrix\n        for i=1:size(A)[1]\n            if i==1\n                A[i, [i,i+1]] = [-2, 1]\n            elseif i == mpisize * loc_num_rows \n                A[i, [i-1,i]] = [1, -2]\n            else\n                A[i, [i-1,i,i+1]] = [1, -2, 1]\n            end\n            x[i] = PetscScalar(i)^3\n        end\n        PETSc.assemble!(A)\n        PETSc.assemble!(x)\n\n     \n        mul!(b, A, x)\n        y = similar(x)\n\n        # Create KSP solver manually ---\n        ksp = LibPETSc.KSPCreate(petsclib,comm)\n        opts = PETSc.Options(petsclib; \n                                ksp_rtol = 1e-16, pc_type = \"jacobi\", \n                                ksp_monitor = false, ksp_view = false);\n\n        LibPETSc.KSPSetOperators(petsclib, ksp,A,A)\n        \n        # Push options to PETSc options database\n        push!(opts)\n        LibPETSc.KSPSetFromOptions(petsclib, ksp)\n        pop!(opts)\n        # ------------------------------\n        \n        # Solve system of equations\n        LibPETSc.KSPSolve(petsclib,ksp, b, y)\n\n        # Test KSPGetConvergedReason\n        reason = LibPETSc.KSPGetConvergedReason(petsclib, ksp)\n        @test reason isa LibPETSc.KSPConvergedReason\n        # Reason can be positive (converged), negative (diverged), or 0 (still iterating)\n        # Just verify it's a valid KSPConvergedReason value\n        \n        # Verify solution\n        @test y[1:10] ≈ x[1:10]\n        PETSc.destroy(x)\n\n        # do the same with backslash\n        x1 = ksp \\ b\n        @test y ≈ x1\n        #PETSc.destroy(x)\n\n        # Create a KSP solver in a simpler way --\n        ksp1 = PETSc.KSP(A; ksp_rtol = 1e-16, pc_type = \"jacobi\", ksp_monitor=false)\n        x2 = ksp1 \\ b\n        @test y ≈ x2\n        #PETSc.destroy(ksp1)\n        # ------------------------------\n\n        # test some of the get functions:\n        b1 = LibPETSc.KSPGetRhs(petsclib, ksp) \n        @test b1 ≈ b\n\n        # this segfaults:\n        x3 = LibPETSc.KSPGetSolution(petsclib, ksp) \n        @test x3 ≈ x2\n        PETSc.destroy(x2)\n        PETSc.destroy(x3)\n        \n\n        A1, P1 = LibPETSc.KSPGetOperators(petsclib, ksp) \n        @test A1[1:3,1:3] ≈ A[1:3,1:3]\n        @test P1[1:end,1:end] ≈ A[1:end,1:end]\n\n        \n        if petsclib== PETSc.petsclibs[1]\n            it = LibPETSc.KSPGetIterationNumber(petsclib, ksp)\n            @test (it == 34) || (it == 33) || (it == 36)   # depending on PETSc version\n\n            it1 = LibPETSc.KSPGetTotalIterations(petsclib, ksp)\n            @test (it1 == 68) || (it1 == 66) || (it1 == 72)   # depending on PETSc version\n\n        end\n\n        nrm = LibPETSc.KSPGetResidualNorm(petsclib, ksp)\n        @test nrm < 1e-10\n\n        type = LibPETSc.KSPGetType(petsclib,ksp)\n        @test type == \"gmres\" \n        \n        if petsclib== PETSc.petsclibs[1]\n            rtol1, abstol1, dtol1, maxits1 = LibPETSc.KSPGetTolerances(petsclib, ksp)\n            @test rtol1 == 1e-16\n            @test abstol1 ==  1.0e-50\n            @test dtol1 ==  10000.0f0\n            @test maxits1 == 10000\n\n            rtol,abstol,dtol,maxits = 1e-7, 1e-10, 1e-13, 1000;\n            LibPETSc.KSPSetTolerances(petsclib, ksp, rtol, abstol, dtol, maxits)\n\n            rtol1, abstol1, dtol1, maxits1 = LibPETSc.KSPGetTolerances(petsclib, ksp)\n            @test rtol1 == rtol\n            @test abstol1 == abstol\n            @test dtol1 == dtol\n            @test maxits1 == maxits\n        end\n\n        PETSc.destroy(y)\n        PETSc.destroy(b)\n        PETSc.destroy(b1)\n        PETSc.destroy(A)\n        PETSc.destroy(A1)\n        PETSc.destroy(ksp)\n        PETSc.finalize(petsclib)\n        \n\n    end\nend\n\n\nif MPI.Comm_rank(MPI.COMM_WORLD) == 0\n    @testset \"KSP with SparseMatrixCSC\" begin\n        # Windows PETSc binaries are built without MPI support, use PETSC_COMM_SELF instead\n        comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n        n = 10\n\n        for petsclib in PETSc.petsclibs \n            #petsclib = PETSc.petsclibs[5]\n            PETSc.initialize(petsclib)\n            PetscScalar = petsclib.PetscScalar\n            PetscInt = petsclib.PetscInt\n\n            A = spdiagm(\n                -1 => ones(PetscScalar, n - 1),\n                0 => -2ones(PetscScalar, n),\n                1 => ones(PetscScalar, n - 1),\n            )\n\n            ksp = PETSc.KSP(petsclib, comm, A)\n            b = rand(PetscScalar, 10)\n\n            petsc_b = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(length(b)), PetscScalar.(b))\n            petsc_x = ksp \\ petsc_b\n            # test when we supply a petsc vector:\n            @test petsc_x[:] ≈ Matrix(A) \\ b\n\n            # test with julia b vecror\n            @test ksp \\ b ≈ Matrix(A) \\ b\n\n            PETSc.destroy(ksp)\n            PETSc.destroy(petsc_x)\n            PETSc.destroy(petsc_b)\n            PETSc.finalize(petsclib)\n        end\n    end\nelse\n    # Even though only rank 0 is running the test all ranks need to initialize\n    # PETSc\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PETSc.finalize(petsclib)\n    end\nend\n"
  },
  {
    "path": "test/lib.jl",
    "content": "using Test\nusing PETSc\n\n@testset \"lib\" begin\n    for petsclib in PETSc.petsclibs\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        @test petsclib ==\n              PETSc.getlib(; PetscScalar = PetscScalar, PetscInt = PetscInt)\n        if PetscInt == Int64\n            @test petsclib == PETSc.getlib(; PetscScalar = PetscScalar)\n        end\n        if PetscScalar == Float64\n            @test petsclib == PETSc.getlib(; PetscInt = PetscInt)\n        end\n        if PetscInt == Int64 && PetscScalar == Float64\n            @test petsclib == PETSc.getlib()\n        end\n    end\nend\n"
  },
  {
    "path": "test/low_level_is.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Low-level IS (Index Set) functions\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n    PetscInt = PETSc.LibPETSc.PetscInt\n    # Windows PETSc binaries are built without MPI support\n    test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    \n    @testset \"ISCreateGeneral\" begin\n        indices = PetscInt[0, 2, 4, 6, 8]\n        is = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 5, indices, PETSc.LibPETSc.PETSC_COPY_VALUES)\n        @test is isa PETSc.LibPETSc.IS\n        @test is.ptr != C_NULL\n        \n        # Get size\n        size = PETSc.LibPETSc.ISGetSize(petsclib, is)\n        @test size == 5\n        \n        local_size = PETSc.LibPETSc.ISGetLocalSize(petsclib, is)\n        @test local_size == 5\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n        @test is.ptr == C_NULL\n    end\n    \n    @testset \"ISCreateStride\" begin\n        # Create stride: 0, 2, 4, 6, 8 (first=0, step=2, n=5)\n        is = PETSc.LibPETSc.ISCreateStride(petsclib, test_comm, 5, 0, 2)\n        @test is isa PETSc.LibPETSc.IS\n        \n        size = PETSc.LibPETSc.ISGetSize(petsclib, is)\n        @test size == 5\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n    end\n    \n    @testset \"ISCreateBlock\" begin\n        # Create block IS\n        indices = PetscInt[0, 2, 4]\n        is = PETSc.LibPETSc.ISCreateBlock(petsclib, test_comm, 2, 3, indices, PETSc.LibPETSc.PETSC_COPY_VALUES)\n        @test is isa PETSc.LibPETSc.IS\n        \n        # Get block size\n        bs = PETSc.LibPETSc.ISGetBlockSize(petsclib, is)\n        @test bs == 2\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n    end\n    \n    @testset \"IS properties\" begin\n        indices = PetscInt[0, 1, 2, 3, 4]\n        is = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 5, indices, PETSc.LibPETSc.PETSC_COPY_VALUES)\n        \n        # Check if sorted\n        sorted = PETSc.LibPETSc.ISSorted(petsclib, is)\n        @test sorted == PETSc.LibPETSc.PETSC_TRUE\n        \n        # Check if identity\n        is_identity = PETSc.LibPETSc.ISIdentity(petsclib, is)\n        @test is_identity == PETSc.LibPETSc.PETSC_TRUE\n        \n        # Check if permutation\n        is_perm = PETSc.LibPETSc.ISPermutation(petsclib, is)\n        @test is_perm == PETSc.LibPETSc.PETSC_TRUE\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n    end\n    \n    @testset \"IS operations\" begin\n        indices = PetscInt[4, 2, 8, 1, 5]\n        is = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 5, indices, PETSc.LibPETSc.PETSC_COPY_VALUES)\n        \n        # Sort the IS\n        @test_nowarn PETSc.LibPETSc.ISSort(petsclib, is)\n        \n        # Check it's sorted now\n        sorted = PETSc.LibPETSc.ISSorted(petsclib, is)\n        @test sorted == PETSc.LibPETSc.PETSC_TRUE\n        \n        # Get min/max\n        min_val, max_val = PETSc.LibPETSc.ISGetMinMax(petsclib, is)\n        @test min_val == 1\n        @test max_val == 8\n        \n        # Duplicate\n        is_copy = PETSc.LibPETSc.ISDuplicate(petsclib, is)\n        @test is_copy isa PETSc.LibPETSc.IS\n        @test is_copy.ptr != is.ptr\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n        PETSc.LibPETSc.ISDestroy(petsclib, is_copy)\n    end\n    \n    @testset \"IS with viewer convenience functions\" begin\n        indices = PetscInt[0, 2, 4, 6, 8]\n        is = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 5, indices, PETSc.LibPETSc.PETSC_COPY_VALUES)\n        \n        # Redirect output to suppress IS viewer output during testing\n        redirect_stdout(devnull) do\n            redirect_stderr(devnull) do\n                # Test PETSC_VIEWER_STDOUT_SELF\n                viewer_stdout_self = PETSc.LibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib)\n                @test viewer_stdout_self isa PETSc.LibPETSc.PetscViewer\n                @test viewer_stdout_self != C_NULL\n                @test PETSc.LibPETSc.ISView(petsclib, is, viewer_stdout_self) === nothing\n                \n                # Test PETSC_VIEWER_STDOUT_WORLD\n                viewer_stdout_world = PETSc.LibPETSc.PETSC_VIEWER_STDOUT_WORLD(petsclib)\n                @test viewer_stdout_world isa PETSc.LibPETSc.PetscViewer\n                @test viewer_stdout_world != C_NULL\n                @test PETSc.LibPETSc.ISView(petsclib, is, viewer_stdout_world) === nothing\n                \n                # Test PETSC_VIEWER_STDERR_SELF\n                viewer_stderr_self = PETSc.LibPETSc.PETSC_VIEWER_STDERR_SELF(petsclib)\n                @test viewer_stderr_self isa PETSc.LibPETSc.PetscViewer\n                @test viewer_stderr_self != C_NULL\n                @test PETSc.LibPETSc.ISView(petsclib, is, viewer_stderr_self) === nothing\n                \n                # Test PETSC_VIEWER_STDERR_WORLD\n                viewer_stderr_world = PETSc.LibPETSc.PETSC_VIEWER_STDERR_WORLD(petsclib)\n                @test viewer_stderr_world isa PETSc.LibPETSc.PetscViewer\n                @test viewer_stderr_world != C_NULL\n                @test PETSc.LibPETSc.ISView(petsclib, is, viewer_stderr_world) === nothing\n            end\n        end\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/low_level_petscsection.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n# Initialize PETSc\npetsclib = PETSc.getlib()\nPETSc.initialize(petsclib)\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n\n@testset \"PetscSection Low-Level API\" begin\n    \n    @testset \"Basic Section Creation and Query\" begin\n        # Create a section (wrapper has wrong signature, use ccall)\n        section = Ref{LibPETSc.PetscSection}()\n        err = ccall(\n            (:PetscSectionCreate, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (MPI.MPI_Comm, Ptr{LibPETSc.PetscSection}),\n            test_comm, section\n        )\n        @test err == 0\n        @test section[] != C_NULL\n        \n        # Set chart: range of valid point indices [pStart, pEnd)\n        LibPETSc.PetscSectionSetChart(petsclib, section[], 0, 10)\n        \n        # Verify chart\n        pStart, pEnd = LibPETSc.PetscSectionGetChart(petsclib, section[])\n        @test pStart == 0\n        @test pEnd == 10\n        \n        # Set DOF count for each point\n        for p in 0:9\n            num_dofs = (p < 4) ? 1 : 2  # Different DOFs per point\n            LibPETSc.PetscSectionSetDof(petsclib, section[], p, num_dofs)\n        end\n        \n        # Setup: compute offsets\n        LibPETSc.PetscSectionSetUp(petsclib, section[])\n        \n        # Query DOF counts\n        for p in 0:9\n            dof = LibPETSc.PetscSectionGetDof(petsclib, section[], p)\n            expected_dof = (p < 4) ? 1 : 2\n            @test dof == expected_dof\n        end\n        \n        # Query offsets\n        offset5 = LibPETSc.PetscSectionGetOffset(petsclib, section[], 5)\n        @test offset5 == 4 * 1 + 1 * 2  # Points 0-3 have 1 DOF each (4), point 4 has 2 DOFs (2)\n        \n        # Get total storage size\n        storage_size = LibPETSc.PetscSectionGetStorageSize(petsclib, section[])\n        expected_size = 4 * 1 + 6 * 2  # 4 points with 1 DOF + 6 points with 2 DOFs\n        @test storage_size == expected_size\n        \n        # Cleanup (wrapper has wrong signature, use ccall)\n        err = ccall(\n            (:PetscSectionDestroy, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (Ptr{LibPETSc.PetscSection},),\n            section\n        )\n        @test err == 0\n    end\n    \n    @testset \"Multi-Field Section\" begin\n        # Create section with 2 fields\n        section = Ref{LibPETSc.PetscSection}()\n        err = ccall(\n            (:PetscSectionCreate, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (MPI.MPI_Comm, Ptr{LibPETSc.PetscSection}),\n            test_comm, section\n        )\n        @test err == 0\n        \n        LibPETSc.PetscSectionSetNumFields(petsclib, section[], 2)\n        \n        # Verify number of fields\n        num_fields = LibPETSc.PetscSectionGetNumFields(petsclib, section[])\n        @test num_fields == 2\n        \n        # Set field names\n        LibPETSc.PetscSectionSetFieldName(petsclib, section[], 0, \"velocity\")\n        LibPETSc.PetscSectionSetFieldName(petsclib, section[], 1, \"pressure\")\n        \n        # Note: PetscSectionGetFieldName wrapper has signature issues, skip testing retrieval\n        \n        # Set chart\n        LibPETSc.PetscSectionSetChart(petsclib, section[], 0, 5)\n        \n        # Set field components\n        LibPETSc.PetscSectionSetFieldComponents(petsclib, section[], 0, 3)\n        LibPETSc.PetscSectionSetFieldComponents(petsclib, section[], 1, 1)\n        \n        # Verify field components\n        vel_comp = LibPETSc.PetscSectionGetFieldComponents(petsclib, section[], 0)\n        pres_comp = LibPETSc.PetscSectionGetFieldComponents(petsclib, section[], 1)\n        @test vel_comp == 3\n        @test pres_comp == 1\n        \n        # Set DOFs per field per point\n        for p in 0:4\n            LibPETSc.PetscSectionSetFieldDof(petsclib, section[], p, 0, 3)  # 3 velocity DOFs\n            LibPETSc.PetscSectionSetFieldDof(petsclib, section[], p, 1, 1)  # 1 pressure DOF\n            LibPETSc.PetscSectionSetDof(petsclib, section[], p, 4)          # Total: 4 DOFs\n        end\n        \n        LibPETSc.PetscSectionSetUp(petsclib, section[])\n        \n        # Verify field DOFs\n        for p in 0:4\n            vel_dof = LibPETSc.PetscSectionGetFieldDof(petsclib, section[], p, 0)\n            pres_dof = LibPETSc.PetscSectionGetFieldDof(petsclib, section[], p, 1)\n            total_dof = LibPETSc.PetscSectionGetDof(petsclib, section[], p)\n            @test vel_dof == 3\n            @test pres_dof == 1\n            @test total_dof == 4\n        end\n        \n        # Get total storage\n        storage_size = LibPETSc.PetscSectionGetStorageSize(petsclib, section[])\n        @test storage_size == 5 * 4  # 5 points with 4 DOFs each\n        \n        # Cleanup\n        err = ccall(\n            (:PetscSectionDestroy, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (Ptr{LibPETSc.PetscSection},),\n            section\n        )\n        @test err == 0\n    end\n    \n    @testset \"Section with Uniform DOFs\" begin\n        # Create section\n        section = Ref{LibPETSc.PetscSection}()\n        err = ccall(\n            (:PetscSectionCreate, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (MPI.MPI_Comm, Ptr{LibPETSc.PetscSection}),\n            test_comm, section\n        )\n        @test err == 0\n        \n        # Set chart\n        npoints = 100\n        LibPETSc.PetscSectionSetChart(petsclib, section[], 0, npoints)\n        \n        # Set uniform DOF count\n        dofs_per_point = 5\n        for p in 0:npoints-1\n            LibPETSc.PetscSectionSetDof(petsclib, section[], p, dofs_per_point)\n        end\n        \n        LibPETSc.PetscSectionSetUp(petsclib, section[])\n        \n        # Verify storage size\n        storage_size = LibPETSc.PetscSectionGetStorageSize(petsclib, section[])\n        @test storage_size == npoints * dofs_per_point\n        \n        # Verify max DOF\n        max_dof = LibPETSc.PetscSectionGetMaxDof(petsclib, section[])\n        @test max_dof == dofs_per_point\n        \n        # Verify offsets are sequential\n        for p in 0:npoints-1\n            expected_offset = p * dofs_per_point\n            actual_offset = LibPETSc.PetscSectionGetOffset(petsclib, section[], p)\n            @test actual_offset == expected_offset\n        end\n        \n        # Cleanup\n        err = ccall(\n            (:PetscSectionDestroy, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (Ptr{LibPETSc.PetscSection},),\n            section\n        )\n        @test err == 0\n    end\n    \n    @testset \"Section Copy\" begin\n        # Create original section\n        section = Ref{LibPETSc.PetscSection}()\n        err = ccall(\n            (:PetscSectionCreate, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (MPI.MPI_Comm, Ptr{LibPETSc.PetscSection}),\n            test_comm, section\n        )\n        @test err == 0\n        \n        LibPETSc.PetscSectionSetChart(petsclib, section[], 0, 5)\n        for p in 0:4\n            LibPETSc.PetscSectionSetDof(petsclib, section[], p, p + 1)\n        end\n        LibPETSc.PetscSectionSetUp(petsclib, section[])\n        \n        # Create new section for copy\n        section_copy = Ref{LibPETSc.PetscSection}()\n        err = ccall(\n            (:PetscSectionCreate, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (MPI.MPI_Comm, Ptr{LibPETSc.PetscSection}),\n            test_comm, section_copy\n        )\n        @test err == 0\n        \n        # Copy section\n        LibPETSc.PetscSectionCopy(petsclib, section[], section_copy[])\n        \n        # Verify copy has same properties\n        pStart_orig, pEnd_orig = LibPETSc.PetscSectionGetChart(petsclib, section[])\n        pStart_copy, pEnd_copy = LibPETSc.PetscSectionGetChart(petsclib, section_copy[])\n        @test pStart_orig == pStart_copy\n        @test pEnd_orig == pEnd_copy\n        \n        storage_orig = LibPETSc.PetscSectionGetStorageSize(petsclib, section[])\n        storage_copy = LibPETSc.PetscSectionGetStorageSize(petsclib, section_copy[])\n        @test storage_orig == storage_copy\n        \n        # Cleanup\n        err = ccall(\n            (:PetscSectionDestroy, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (Ptr{LibPETSc.PetscSection},),\n            section\n        )\n        @test err == 0\n        \n        err = ccall(\n            (:PetscSectionDestroy, petsclib.petsc_library),\n            PETSc.LibPETSc.PetscErrorCode,\n            (Ptr{LibPETSc.PetscSection},),\n            section_copy\n        )\n        @test err == 0\n    end\n    \nend\n\nPETSc.finalize(petsclib)\n"
  },
  {
    "path": "test/low_level_tao.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Low-level Tao (optimization) functions\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    \n    @testset \"Tao object creation and destruction\" begin\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        @test tao isa PETSc.LibPETSc.Tao\n        @test tao.ptr != C_NULL\n        \n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n        @test tao.ptr == C_NULL\n    end\n    \n    @testset \"Tao solver type\" begin\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        \n        # Set Tao type (using NLS - Newton Line Search, always available)\n        @test_nowarn PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, \"nls\"))\n        \n        # Get Tao type back\n        taotype = PETSc.LibPETSc.TaoGetType(petsclib, tao)\n        @test taotype == \"nls\"\n        \n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n    end\n    \n    @testset \"Tao with different solver types\" begin\n        # Test various Tao solver types (using types that don't require special builds)\n        for taotype in [\"nls\", \"ntr\", \"cg\", \"nm\"]\n            tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n            @test_nowarn PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, taotype))\n            retrieved_type = PETSc.LibPETSc.TaoGetType(petsclib, tao)\n            @test retrieved_type == taotype\n            PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n        end\n    end\n    \n    @testset \"Tao tolerances\" begin\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, \"nls\"))\n        \n        # Set tolerances (gatol, grtol, gttol)\n        @test_nowarn PETSc.LibPETSc.TaoSetTolerances(petsclib, tao, 1e-8, 1e-8, 1e-8)\n        \n        # Get tolerances back\n        gatol, grtol, gttol = PETSc.LibPETSc.TaoGetTolerances(petsclib, tao)\n        @test gatol ≈ 1e-8\n        @test grtol ≈ 1e-8\n        @test gttol ≈ 1e-8\n        \n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n    end\n    \n    @testset \"Tao max iterations and function evaluations\" begin\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        \n        # Set max iterations\n        @test_nowarn PETSc.LibPETSc.TaoSetMaximumIterations(petsclib, tao, 100)\n        \n        # Get max iterations back\n        maxits = PETSc.LibPETSc.TaoGetMaximumIterations(petsclib, tao)\n        @test maxits == 100\n        \n        # Set max function evaluations\n        @test_nowarn PETSc.LibPETSc.TaoSetMaximumFunctionEvaluations(petsclib, tao, 1000)\n        \n        # Get max function evaluations back\n        maxfuncs = PETSc.LibPETSc.TaoGetMaximumFunctionEvaluations(petsclib, tao)\n        @test maxfuncs == 1000\n        \n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n    end\n    \n    @testset \"Tao iteration count\" begin\n        tao = PETSc.LibPETSc.TaoCreate(petsclib, test_comm)\n        PETSc.LibPETSc.TaoSetType(petsclib, tao, Base.unsafe_convert(Ptr{Int8}, \"nls\"))\n        \n        # Get iteration count (should be 0 before solving)\n        iter = PETSc.LibPETSc.TaoGetIterationNumber(petsclib, tao)\n        @test iter == 0\n        \n        PETSc.LibPETSc.TaoDestroy(petsclib, tao)\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/low_level_ts.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Low-level TS (Time Stepping) functions\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n    # Windows PETSc binaries are built without MPI support\n    test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    \n    @testset \"TS object creation and destruction\" begin\n        ts = PETSc.LibPETSc.TSCreate(petsclib, test_comm)\n        @test ts isa PETSc.LibPETSc.TS\n        @test ts.ptr != C_NULL\n        \n        PETSc.LibPETSc.TSDestroy(petsclib, ts)\n        @test ts.ptr == C_NULL\n    end\n    \n    @testset \"TS problem type and solver type\" begin\n        ts = PETSc.LibPETSc.TSCreate(petsclib, test_comm)\n        \n        # Set problem type\n        @test_nowarn PETSc.LibPETSc.TSSetProblemType(petsclib, ts, PETSc.LibPETSc.TS_LINEAR)\n        \n        # Set TS type\n        @test_nowarn PETSc.LibPETSc.TSSetType(petsclib, ts, Base.unsafe_convert(Ptr{Int8}, \"bdf\"))\n        \n        # Get TS type back\n        tstype = PETSc.LibPETSc.TSGetType(petsclib, ts)\n        @test tstype == \"bdf\"\n        \n        PETSc.LibPETSc.TSDestroy(petsclib, ts)\n    end\n    \n    @testset \"TS time parameters\" begin\n        ts = PETSc.LibPETSc.TSCreate(petsclib, test_comm)\n        PETSc.LibPETSc.TSSetType(petsclib, ts, Base.unsafe_convert(Ptr{Int8}, \"bdf\"))\n        \n        # Set time parameters\n        @test_nowarn PETSc.LibPETSc.TSSetTime(petsclib, ts, 0.0)\n        @test_nowarn PETSc.LibPETSc.TSSetMaxTime(petsclib, ts, 1.0)\n        @test_nowarn PETSc.LibPETSc.TSSetTimeStep(petsclib, ts, 0.1)\n        \n        # Get time parameters back\n        current_time = PETSc.LibPETSc.TSGetTime(petsclib, ts)\n        @test current_time ≈ 0.0\n        \n        time_step = PETSc.LibPETSc.TSGetTimeStep(petsclib, ts)\n        @test time_step ≈ 0.1\n        \n        PETSc.LibPETSc.TSDestroy(petsclib, ts)\n    end\n    \n    @testset \"TS with different solver types\" begin\n        for tstype in [\"euler\", \"bdf\", \"rk\"]\n            ts = PETSc.LibPETSc.TSCreate(petsclib, test_comm)\n            @test_nowarn PETSc.LibPETSc.TSSetType(petsclib, ts, Base.unsafe_convert(Ptr{Int8}, tstype))\n            retrieved_type = PETSc.LibPETSc.TSGetType(petsclib, ts)\n            @test retrieved_type == tstype\n            PETSc.LibPETSc.TSDestroy(petsclib, ts)\n        end\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/low_level_viewer.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"Low-level PetscViewer convenience functions\" begin\n    petsclib = PETSc.getlib(PetscScalar=Float64)\n    PETSc.initialize(petsclib)\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n    \n    @testset \"PETSC_VIEWER_STDOUT_SELF\" begin\n        viewer = PETSc.LibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib)\n        @test viewer isa PETSc.LibPETSc.PetscViewer\n        @test viewer != C_NULL\n    end\n    \n    @testset \"PETSC_VIEWER_STDOUT_WORLD\" begin\n        viewer = PETSc.LibPETSc.PETSC_VIEWER_STDOUT_WORLD(petsclib)\n        @test viewer isa PETSc.LibPETSc.PetscViewer\n        @test viewer != C_NULL\n    end\n    \n    @testset \"PETSC_VIEWER_STDERR_SELF\" begin\n        viewer = PETSc.LibPETSc.PETSC_VIEWER_STDERR_SELF(petsclib)\n        @test viewer isa PETSc.LibPETSc.PetscViewer\n        @test viewer != C_NULL\n    end\n    \n    @testset \"PETSC_VIEWER_STDERR_WORLD\" begin\n        viewer = PETSc.LibPETSc.PETSC_VIEWER_STDERR_WORLD(petsclib)\n        @test viewer isa PETSc.LibPETSc.PetscViewer\n        @test viewer != C_NULL\n    end\n    \n    @testset \"Using viewers with ISView\" begin\n        PetscInt = PETSc.LibPETSc.PetscInt\n        is = PETSc.LibPETSc.ISCreateGeneral(petsclib, test_comm, 5, PetscInt[0,2,4,6,8], PETSc.LibPETSc.PETSC_COPY_VALUES)\n        \n        # Redirect output to suppress IS viewer output during testing\n        redirect_stdout(devnull) do\n            redirect_stderr(devnull) do\n                # Test STDOUT viewer - it will print to stdout\n                viewer_out = PETSc.LibPETSc.PETSC_VIEWER_STDOUT_SELF(petsclib)\n                @test PETSc.LibPETSc.ISView(petsclib, is, viewer_out) === nothing\n                \n                # Test STDERR viewer - it will print to stderr\n                viewer_err = PETSc.LibPETSc.PETSC_VIEWER_STDERR_SELF(petsclib)\n                @test PETSc.LibPETSc.ISView(petsclib, is, viewer_err) === nothing\n            end\n        end\n        \n        PETSc.LibPETSc.ISDestroy(petsclib, is)\n    end\n    \n    PETSc.finalize(petsclib)\nend\n"
  },
  {
    "path": "test/mat.jl",
    "content": "using Test\nusing PETSc, MPI\nusing LinearAlgebra: norm, mul!, Adjoint, Transpose, issymmetric, ishermitian\nusing SparseArrays: sprand, spdiagm\nusing Random\n\n# Windows PETSc binaries are built without MPI support, skip MPI initialization\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n# Windows PETSc binaries are built without MPI support, use PETSC_COMM_SELF\ncomm = LibPETSc.PETSC_COMM_SELF\n# Intel Mac has sporadic issues with complex numbers\nisintelmac = Sys.isapple() && Sys.ARCH == :x86_64\n\n\n@testset \"MatSeqAIJ\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        nz_int = PetscInt(2)\n        num_rows, num_cols = PetscInt(5), PetscInt(7)\n        nz_vec = petsclib.PetscInt.([0, 3, 2, 1, 0])\n\n        A = LibPETSc.MatCreateSeqAIJ(petsclib, comm, num_rows, num_cols, nz_int, C_NULL)\n        @test LibPETSc.MatGetSize(petsclib, A) == (num_rows, num_cols)\n        @test size(A) == (num_rows, num_cols)\n\n        B = LibPETSc.MatCreateSeqAIJ(petsclib, comm, num_rows, num_cols, nz_int, C_NULL)\n        LibPETSc.MatAssemblyBegin(petsclib, A, PETSc.MAT_FINAL_ASSEMBLY)\n        LibPETSc.MatAssemblyEnd(petsclib, A, PETSc.MAT_FINAL_ASSEMBLY)\n        PETSc.assemble!(B)\n\n        C = LibPETSc.MatCreateSeqAIJ(petsclib, comm, num_rows, num_cols, PetscInt(0), nz_vec)\n        @test size(C) == (num_rows, num_cols)\n        PETSc.assemble!(C)\n        @test A == C\n\n        if PetscScalar <: Real\n            D = LibPETSc.MatCreateSeqAIJ(petsclib, comm, num_rows, num_cols, nz_int, C_NULL)\n            D[1, [1, 2]] = PetscScalar.([1, 2]);\n            D[2, [2, 3]] = PetscScalar.([3, 4]);\n            D[3, [3, 4]] = PetscScalar.([0, 0]);\n            D[4, [4, 5]] = PetscScalar.([0, 0]);\n            D[5, [4, 5]] = PetscScalar.([3, 4]);\n            PETSc.assemble!(D);\n            DJ = zeros(PetscScalar, num_rows, num_cols);\n            DJ[1, [1, 2]] .= PetscScalar.([1, 2]);\n            DJ[2, [2, 3]] .= PetscScalar.([3, 4]);\n            DJ[3, [3, 4]] .= PetscScalar.([0, 0]);\n            DJ[4, [4, 5]] .= PetscScalar.([0, 0]);\n            DJ[5, [4, 5]] .= PetscScalar.([3, 4]);\n        else\n            D = LibPETSc.MatCreateSeqAIJ(petsclib, comm, num_rows, num_cols, nz_int, C_NULL)\n            D[1, [1, 2]] = PetscScalar.([1 + 0im, 0 + 2im]);\n            D[2, [2, 3]] = PetscScalar.([3 + 0im, 0 + 4im]);\n            D[3, [3, 4]] = PetscScalar.([0 + 0im, 0 + 0im]);\n            D[4, [4, 5]] = PetscScalar.([0 + 0im, 0 + 0im]);\n            D[5, [4, 5]] = PetscScalar.([3 + 0im, 0 + 4im]);\n            PETSc.assemble!(D);\n            DJ = zeros(PetscScalar, num_rows, num_cols);\n            DJ[1, [1, 2]] .= PetscScalar.([1 + 0im, 0 + 2im]);\n            DJ[2, [2, 3]] .= PetscScalar.([3 + 0im, 0 + 4im]);\n            DJ[3, [3, 4]] .= PetscScalar.([0 + 0im, 0 + 0im]);\n            DJ[4, [4, 5]] .= PetscScalar.([0 + 0im, 0 + 0im]);\n            DJ[5, [4, 5]] .= PetscScalar.([3 + 0im, 0 + 4im]);\n        end\n\n        E = LibPETSc.MatCreateSeqAIJ(petsclib, comm, num_rows, num_cols, PetscInt(0), nz_vec)\n        E[2, [1, 3, 4]] = PetscScalar.([1, 3, 4]);\n        E[3, [3, 4]] = PetscScalar.([3, 4]);\n        E[4, [5]] = PetscScalar.([6]);\n        PETSc.assemble!(E);\n\n        @test norm(A) == 0\n        @test norm(D) ≈ norm(DJ)\n\n        x = PetscScalar.(Array(1:num_cols))\n        y = zeros(PetscScalar, num_rows)\n\n        xc = copy(x)\n        yc = copy(y)\n        vec_x = LibPETSc.VecCreateSeqWithArray(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(1), PetscInt(length(x)), xc)\n        vec_y = LibPETSc.VecCreateSeqWithArray(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(1), PetscInt(length(y)), yc)\n        \n        # Test mul!\n        @test vec_x[:] ≈ x rtol=1e-5\n        \n        mul!(vec_y, D, vec_x)\n        \n        y = DJ * x\n        @test vec_y[:] ≈ y rtol=1e-5\n        \n        PETSc.destroy(D)\n        PETSc.destroy(vec_x)\n        PETSc.destroy(vec_y)\n        finalize(xc)\n        finalize(yc)\n\n        if PetscScalar <: Real\n            Asym = LibPETSc.MatCreateSeqAIJ(petsclib, comm, PetscInt(5), PetscInt(5), PetscInt(2), C_NULL)\n            Asym[1, 1] = 1;\n            Asym[2, 1] = -2;\n            Asym[1, 2] = -2;\n            PETSc.assemble!(Asym);\n            Bsym = LibPETSc.MatCreateSeqAIJ(petsclib, comm, PetscInt(5), PetscInt(5), PetscInt(2), C_NULL)\n            Bsym[1, 1] = 1;\n            Bsym[2, 1] = 2;\n            Bsym[1, 2] = -2;\n            PETSc.assemble!(Bsym);\n            @test issymmetric(Asym)\n            @test ishermitian(Asym)\n            @test !issymmetric(Bsym)\n            @test !ishermitian(Bsym)\n            PETSc.destroy(Asym)\n            PETSc.destroy(Bsym)\n        else\n            Asym = LibPETSc.MatCreateSeqAIJ(petsclib, comm, PetscInt(5), PetscInt(5), PetscInt(2), C_NULL)\n            Asym[1, 1] = PetscScalar(1)\n            Asym[2, 1] = PetscScalar(-2 + im)\n            Asym[1, 2] = PetscScalar(-2 - im)\n            PETSc.assemble!(Asym)\n            Bsym = LibPETSc.MatCreateSeqAIJ(petsclib, comm, PetscInt(5), PetscInt(5), PetscInt(2), C_NULL)\n            Bsym[1, 1] = PetscScalar(1)\n            Bsym[2, 1] = PetscScalar(-2 + im)\n            Bsym[1, 2] = PetscScalar(-2 - im)\n            PETSc.assemble!(Bsym)\n            @test !issymmetric(Asym)\n            @test !issymmetric(Bsym)\n            PETSc.destroy(Asym)\n            PETSc.destroy(Bsym)\n        end\n\n        Random.seed!(777)\n        A1 = sprand(PetscScalar, 10, 11, 0.2)\n        B1 = PETSc.MatSeqAIJWithArrays(petsclib, comm, A1)\n        sleep(0.1)\n        @test sum(B1[:,:] - Matrix(A1)) == 0.0\n\n        PETSc.destroy(A)\n        PETSc.destroy(B)\n        PETSc.destroy(B1)\n        PETSc.destroy(C)\n        PETSc.destroy(E)\n        PETSc.finalize(petsclib)\n    end\nend\n\n\n@testset \"MatSeqDense\" begin\n    for petsclib in PETSc.petsclibs\n    #    petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        Ajl = PetscScalar.([\n            1 2 3 4\n            5 6 7 8\n            9 10 11 12\n            13 14 15 16\n        ])\n\n        x = PetscScalar.(collect(1:4))\n\n        A = LibPETSc.MatCreateSeqDense(petsclib, comm, PetscInt(size(Ajl,1)), PetscInt(size(Ajl,2)), Ajl[:])\n        vec_x = LibPETSc.VecCreateSeqWithArray(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(1), PetscInt(length(x)), copy(x))\n        fill!(vec_x, zero(PetscScalar))\n\n        @test sum(A[:,:] - Ajl) == 0.0\n        #@test all(A * x .≈ Ajl * x)\n\n        PETSc.destroy(A)\n        PETSc.destroy(vec_x)\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"MatSeqAIJ_Sparse\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        n = 10\n\n        A_sp = spdiagm(\n            -1 => ones(PetscScalar, n - 1),\n            0 => -2ones(PetscScalar, n),\n            1 => ones(PetscScalar, n - 1),\n        )\n\n        A = PETSc.MatCreateSeqAIJ(petsclib, comm, A_sp)\n       \n        @test sum(A[1:10,1:10] - Matrix(A_sp)) == 0.0 == 0.0\n        PETSc.destroy(A)\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"MatSeqAIJ constructor\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        # Test with integer nonzeros (same for all rows)\n        num_rows, num_cols = 5, 7\n        nonzeros = 3\n        A = PETSc.MatSeqAIJ(petsclib, num_rows, num_cols, nonzeros)\n        @test size(A) == (num_rows, num_cols)\n        \n        # Set some values\n        A[1, 1] = PetscScalar(1.0)\n        A[2, 3] = PetscScalar(2.0)\n        A[3, 5] = PetscScalar(3.0)\n        PETSc.assemble!(A)\n        \n        @test A[1, 1] == PetscScalar(1.0)\n        @test A[2, 3] == PetscScalar(2.0)\n        @test A[3, 5] == PetscScalar(3.0)\n        \n        PETSc.destroy(A)\n        \n        # Test with vector of nonzeros (one per row)\n        nz_vec = PetscInt.([2, 3, 1, 4, 2])\n        B = PETSc.MatSeqAIJ(petsclib, num_rows, num_cols, nz_vec)\n        @test size(B) == (num_rows, num_cols)\n        \n        # Set values matching the nonzero pattern\n        B[1, 1] = PetscScalar(10.0)\n        B[1, 2] = PetscScalar(11.0)\n        B[2, 1] = PetscScalar(20.0)\n        B[2, 2] = PetscScalar(21.0)\n        B[2, 3] = PetscScalar(22.0)\n        PETSc.assemble!(B)\n        \n        @test B[1, 1] == PetscScalar(10.0)\n        @test B[1, 2] == PetscScalar(11.0)\n        @test B[2, 1] == PetscScalar(20.0)\n        \n        PETSc.destroy(B)\n        \n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"MatSeqDense constructor\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        # Create a Julia matrix\n        if PetscScalar <: Real\n            Ajl = PetscScalar.([\n                1 2 3 4\n                5 6 7 8\n                9 10 11 12\n            ])\n        else\n            Ajl = PetscScalar.([\n                1 2+im 3 4-im\n                5 6+2im 7 8\n                9-im 10 11+im 12\n            ])\n        end\n\n        # Create PETSc dense matrix from Julia matrix\n        A = PETSc.MatSeqDense(petsclib, Ajl)\n        \n        # Test that the matrix was created successfully\n        @test A !== nothing\n        @test A.ptr != C_NULL\n        \n        # Test size\n        @test size(A) == size(Ajl)\n        @test size(A) == (3, 4)\n        \n        # Test individual value retrieval\n        @test A[1, 1] == Ajl[1, 1]\n        @test A[2, 3] == Ajl[2, 3]\n        @test A[3, 4] == Ajl[3, 4]\n        \n        # Test retrieving all values\n        A_retrieved = A[:, :]\n        @test A_retrieved == Ajl\n        \n        # Test matrix-vector multiplication\n        x = PetscScalar.(collect(1:4))\n        y_expected = Ajl * x\n        \n        xc = copy(x)\n        vec_x = LibPETSc.VecCreateSeqWithArray(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(1), PetscInt(length(x)), xc)\n        vec_y = LibPETSc.VecCreateSeq(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(3))\n        \n        mul!(vec_y, A, vec_x)\n        @test vec_y[:] ≈ y_expected rtol=1e-5\n        \n        finalize(xc)\n        \n        # Test matrix modification\n        A[1, 1] = PetscScalar(100.0)\n        PETSc.assemble!(A)\n        @test A[1, 1] == PetscScalar(100.0)\n        \n        # Explicitly destroy objects\n        PETSc.destroy(vec_x)\n        PETSc.destroy(vec_y)\n        PETSc.destroy(A)\n        \n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"MatDenseGetArray and RestoreArray\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n\n        n, m = 5, 3\n        # 1. Create a Dense Matrix\n        Ajl = zeros(PetscScalar, n, m)\n        A = PETSc.MatSeqDense(petsclib, Ajl)\n\n        # 2. Test GetArray\n        # This should return a Julia Matrix view pointing to PETSc's memory\n        jl_view = LibPETSc.MatDenseGetArray(petsclib, A)\n\n        @test size(jl_view) == (n, m)\n        @test jl_view isa Matrix{PetscScalar}\n\n        # 3. Test Mutability: Writing to the Julia view should update PETSc\n        test_val = PetscScalar(42.0)\n        jl_view[2, 2] = test_val\n\n        # 4. Test RestoreArray\n        # Passing the array back to PETSc to unlock it\n        LibPETSc.MatDenseRestoreArray(petsclib, A, jl_view)\n\n        # 5. Verify the value is actually in PETSc now\n        # assembly! is good practice after direct memory modification\n        PETSc.assemble!(A)\n        @test A[2, 2] == test_val\n\n        # 6. Test copyto!\n        A2_jl = PetscScalar.(rand(n, m))\n        jl_view2 = LibPETSc.MatDenseGetArray(petsclib, A)\n        try\n            copyto!(jl_view2, A2_jl)\n        finally\n            LibPETSc.MatDenseRestoreArray(petsclib, A, jl_view2)\n        end\n        PETSc.assemble!(A)\n\n        @test A[:, :] ≈ A2_jl\n\n        PETSc.destroy(A)\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"MatDenseGetArray/RestoreArray variants\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        n, m = 4, 3\n        Ajl = reshape(PetscScalar.(1:(n*m)), n, m)\n        A = PETSc.MatSeqDense(petsclib, Ajl)\n\n        # MatDenseGetArray\n        arr = LibPETSc.MatDenseGetArray(petsclib, A)\n        @test size(arr) == (n, m)\n        @test arr isa Matrix{PetscScalar}\n        arr[1,1] = PetscScalar(123)\n        LibPETSc.MatDenseRestoreArray(petsclib, A, arr)\n        PETSc.assemble!(A)\n        @test A[1,1] == PetscScalar(123)\n\n        # MatDenseGetArrayRead\n        arr_read = LibPETSc.MatDenseGetArrayRead(petsclib, A)\n        @test size(arr_read) == (n, m)\n        @test arr_read[2,2] == A[2,2]\n        LibPETSc.MatDenseRestoreArrayRead(petsclib, A)\n\n        # MatDenseGetArrayWrite\n        arr_write = LibPETSc.MatDenseGetArrayWrite(petsclib, A)\n        @test size(arr_write) == (n, m)\n        arr_write[3,1] = PetscScalar(456)\n        LibPETSc.MatDenseRestoreArrayWrite(petsclib, A)\n        PETSc.assemble!(A)\n        @test A[3,1] == PetscScalar(456)\n\n        # MatDenseGetArrayAndMemType\n        arr_and_mem, mtype = LibPETSc.MatDenseGetArrayAndMemType(petsclib, A)\n        @test size(arr_and_mem) == (n, m)\n        arr_and_mem[4,2] = PetscScalar(789)\n        LibPETSc.MatDenseRestoreArrayAndMemType(petsclib, A)\n        PETSc.assemble!(A)\n        @test A[4,2] == PetscScalar(789)\n\n        # MatDenseGetArrayReadAndMemType\n        arr_read_mem, mtype2 = LibPETSc.MatDenseGetArrayReadAndMemType(petsclib, A)\n        @test size(arr_read_mem) == (n, m)\n        @test arr_read_mem[1,2] == A[1,2]\n        # No explicit restore needed for read test here\n\n        # MatDenseGetArrayWriteAndMemType\n        arr_write_mem, mtype3 = LibPETSc.MatDenseGetArrayWriteAndMemType(petsclib, A)\n        @test size(arr_write_mem) == (n, m)\n        arr_write_mem[2,3] = PetscScalar(321)\n        LibPETSc.MatDenseRestoreArrayWrite(petsclib, A)\n        PETSc.assemble!(A)\n        @test A[2,3] == PetscScalar(321)\n\n        PETSc.destroy(A)\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"MatGetGhosts, MatGetRow, MatRestoreRow, MatGetOwnershipRanges\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        # Use a small matrix for ghost/row tests\n        n, m = 4, 4\n        Ajl = PetscScalar.([1 2 0 0; 0 3 4 0; 0 0 5 6; 7 0 0 8])\n        A = PETSc.MatSeqAIJ(petsclib, n, m, 2)\n        for i in 1:n, j in 1:m\n            if Ajl[i,j] != 0\n                A[i,j] = Ajl[i,j]\n            end\n        end\n        PETSc.assemble!(A)\n\n        # # MatGetRow and MatRestoreRow\n        for row in 1:n\n            ncols, cols, vals = LibPETSc.MatGetRow(petsclib, A, PetscInt(row - 1))\n            @test ncols == count(!iszero, Ajl[row,:])\n            @test length(cols) == ncols\n            @test length(vals) == ncols\n            # PETSc uses 0-based indices, Julia uses 1-based\n            @test all(Ajl[row, cols .+ 1] .== vals)\n            # MatRestoreRow only releases resources; it does not return row data\n            LibPETSc.MatRestoreRow(petsclib, A, PetscInt(row - 1))\n        end\n\n        # MatGetOwnershipRanges and MatGetOwnershipRangesColumn\n        # These are meaningful for parallel, but should return [0, n] for sequential\n        ranges = LibPETSc.MatGetOwnershipRanges(petsclib, A)\n        @test length(ranges) == 2\n        @test ranges[1] == 0\n        @test ranges[2] == n\n        ranges_col = LibPETSc.MatGetOwnershipRangesColumn(petsclib, A)\n        @test length(ranges_col) == 2\n        @test ranges_col[1] == 0\n        @test ranges_col[2] == m\n\n        # MatGetGhosts (should work, but for non-parallel, expect empty or zero ghosts)\n        nghosts, ghosts = LibPETSc.MatGetGhosts(petsclib, A)\n        @test Int(nghosts) == length(ghosts)\n        # For sequential, usually zero ghosts\n        @test Int(nghosts) == 0 || all(isa.(ghosts, Int))\n\n        PETSc.destroy(A)\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"MatSeqAIJGetArray and RestoreArray\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        # 1. Create a simple Sparse AIJ matrix (Diagonal)\n        n = 5\n        A = PETSc.MatSeqAIJ(petsclib, n, n, 1)\n        for i in 1:n\n            A[i, i] = PetscScalar(i)\n        end\n        PETSc.assemble!(A)\n\n        # 2. Test GetArray (Fixed implementation)\n        # For AIJ, this returns a 1D view of the non-zero values\n        val_view = LibPETSc.MatSeqAIJGetArray(petsclib, A)\n\n        # In a diagonal 5x5 matrix, there are 5 non-zeros.\n        # Note: Depending on PETSc internals, the returned length might be\n        # the full local buffer size.\n        @test length(val_view) >= n\n        @test val_view[1] == PetscScalar(1.0)\n\n        # 3. Test Mutability: Update values through the pointer\n        new_val = PetscScalar(99.0)\n        val_view[1] = new_val\n\n        # 4. Test RestoreArray\n        LibPETSc.MatSeqAIJRestoreArray(petsclib, A, val_view)\n        PETSc.assemble!(A)\n\n        # 5. Verify PETSc sees the change\n        @test A[1, 1] == new_val\n\n        PETSc.destroy(A)\n        PETSc.finalize(petsclib)\n    end\nend"
  },
  {
    "path": "test/matshell.jl",
    "content": "using Test\nusing PETSc\nusing MPI\n\n@testset \"MatShell\" begin\n    for petsclib in PETSc.petsclibs\n        petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        # Windows PETSc binaries are built without MPI support\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n\n        local_rows = 10\n        local_cols = 5\n        function f!(p_x, p_y)\n            PETSc.withlocalarray!((p_x, p_y), write=(true,false)) do x, y\n                x .= [2y; 3y]\n            end\n        end\n\n        matshell =  PETSc.MatShell(petsclib, f!, test_comm, local_rows, local_cols)\n        x = PetscScalar.(collect(1:5))\n        petsc_x = LibPETSc.VecCreateSeqWithArray(petsclib, test_comm, PetscInt(1), PetscInt(local_cols), x)\n        petsc_y = LibPETSc.VecCreateSeqWithArray(petsclib, test_comm, PetscInt(1), PetscInt(local_rows), zeros(PetscScalar, local_rows))\n        \n        LibPETSc.MatMult(petsclib, matshell, petsc_x, petsc_y)\n        @test petsc_y[:] == [2x; 3x]\n        @test matshell * x == [2x; 3x]\n\n        PETSc.destroy(petsc_x)\n        PETSc.destroy(petsc_y)\n        PETSc.destroy(matshell)\n        PETSc.finalize(petsclib)\n    end\nend\n"
  },
  {
    "path": "test/mpi_examples.jl",
    "content": "using Test\nusing MPI\n\nusing .PETScTestUtils: find_sources\n\n@testset \"mpi examples\" begin\n  examples_dir = joinpath(dirname(@__DIR__), \"examples\")\n  examples = find_sources(examples_dir)\n  filter!(file -> readline(file) == \"# INCLUDE IN MPI TEST\", examples)\n\n  @testset \"$(basename(example))\" for example in examples\n    @info \"MPI example $example\"\n    code = \"\"\"\n    $(Base.load_path_setup_code())\n    include($(repr(example)))\n    \"\"\"\n    cmd = `$(mpiexec()) -n 4 $(Base.julia_cmd()) --startup-file=no -e $code`\n    run(cmd)\n    @debug \"Testing $example\" Text(code) cmd\n    @test success(pipeline(cmd, stderr=stderr))\n  end\n \nend\n"
  },
  {
    "path": "test/mpimat.jl",
    "content": "using Test\nusing MPI\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\nusing PETSc\nusing LinearAlgebra: mul!, norm\n\n@testset \"MatAIJ\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpisize = MPI.Comm_size(comm)\n    mpirank = MPI.Comm_rank(comm)\n\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        loc_num_rows = 5\n        loc_num_cols = 5\n        diag_nonzeros = 3\n        off_diag_non_zeros = 3\n\n        mat = LibPETSc.MatCreateAIJ(petsclib,  comm, PetscInt(loc_num_rows), PetscInt(loc_num_cols), PetscInt(LibPETSc.PETSC_DETERMINE), PetscInt(LibPETSc.PETSC_DETERMINE), PetscInt(diag_nonzeros), C_NULL, PetscInt(off_diag_non_zeros), C_NULL)\n\n        # Get compatible vectors\n        right,left = LibPETSc.MatCreateVecs(petsclib,mat)\n\n        # Fill the matrix and right vector\n        row_rng = PETSc.ownershiprange(mat, false)\n        for i in row_rng\n            if i == 0\n                vals = [-2, 1]\n                row0idxs = [i]\n                col0idxs = [i, i + 1]\n            elseif i == mpisize * loc_num_rows - 1\n                vals = [-2, 1]\n                row0idxs = [i]\n                col0idxs = [i, i - 1]\n            else\n                vals = [1, -2, 1]\n                row0idxs = [i]\n                col0idxs = [i - 1, i, i + 1]\n            end\n            PETSc.setvalues!(\n                mat,\n                PetscInt.(row0idxs),\n                PetscInt.(col0idxs),\n                PetscScalar.(vals),\n            )\n            right[i + 1] = i^3\n        end\n        PETSc.assemble!(mat)\n        PETSc.assemble!(right)\n\n        # Do matrix multiply and check result\n        mul!(left, mat, right)\n        for i in row_rng\n            if i == 0\n                v = -2 * i^3 + (i + 1)^3\n            elseif i == mpisize * loc_num_rows - 1\n                v = (i - 1)^3 - 2 * i^3\n            else\n                v = (i - 1)^3 - 2 * i^3 + (i + 1)^3\n            end\n            @test v == left[i + 1]\n        end\n\n        # Check the norm in parallel\n        sz = loc_num_rows * mpisize\n        exact_norm = sqrt(sz * 2^2 + 2 * (sz - 1))\n        @test norm(mat) ≈ exact_norm\n\n        PETSc.destroy(mat)\n        PETSc.destroy(right)\n        PETSc.destroy(left)\n\n        PETSc.finalize(petsclib)\n    end\nend\nnothing\n"
  },
  {
    "path": "test/mpivec.jl",
    "content": "using Test\nusing MPI\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\nusing PETSc\nusing LinearAlgebra: norm\n\n\n@testset \"VecMPI\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpisize = MPI.Comm_size(comm)\n    mpirank = MPI.Comm_rank(comm)\n\n    # local first and last value\n    n0 = sum(10 .+ (0:mpirank)) - 10\n    n1 = sum(10 .+ (0:(mpirank + 1))) - 11\n\n    # global last value\n    ne = sum(10 .+ (0:mpisize)) - 11\n    exact_length = ne + 1\n    exact_norm = norm(0:ne)\n\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        for version in 1:2\n            if version == 1\n                # Create using local size\n                petsc_x = LibPETSc.VecCreateMPI(petsclib, comm, PetscInt(n1 - n0 + 1), PetscInt(LibPETSc.PETSC_DECIDE))\n\n                # check the data ownership\n                rng = n0:n1\n                @test rng == PETSc.ownershiprange(petsc_x, false)\n            else\n                # Create using global size\n                petsc_x = LibPETSc.VecCreateMPI(\n                    petsclib,\n                    comm,\n                    PetscInt(LibPETSc.PETSC_DECIDE),\n                    PetscInt(exact_length),\n                )\n\n                # get the data ownership\n                rng = PETSc.ownershiprange(petsc_x, false)\n            end\n\n            # insert some values\n            julia_x = PetscScalar.(rng)\n            inds = PetscInt.(rng)\n\n            # NOTE: PETSc is 0-based\n            LibPETSc.VecSetValues(petsclib,petsc_x, PetscInt(length(inds)), inds, julia_x, PETSc.INSERT_VALUES)\n            PETSc.assemble!(petsc_x)\n\n            @test length(petsc_x) == exact_length\n            \n            # use this instead of norm(petsc_x), as it can deal with parallel vectors\n            vec_norm1 = LibPETSc.VecNorm(petsclib,petsc_x, LibPETSc.NORM_2)\n            @test exact_norm ≈ vec_norm1\n            \n            vec_norm = norm(petsc_x)    # multiple dispatch version of the line above\n            @test exact_norm ≈ vec_norm\n            \n            # 1-based\n            @test petsc_x[rng .+ 1] == julia_x\n\n            PETSc.withlocalarray!(petsc_x) do x\n                @test x == julia_x\n            end\n\n            @test \"mpi\" == PETSc.type(petsc_x)\n            PETSc.destroy(petsc_x)\n\n        end\n        PETSc.finalize(petsclib)\n    end\nend\n\n\n@testset \"VecGhost\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpisize = MPI.Comm_size(comm)\n    mpirank = MPI.Comm_rank(comm)\n\n    # local first and last value\n    n0 = sum(10 .+ (0:mpirank)) - 10\n    n1 = sum(10 .+ (0:(mpirank + 1))) - 11\n    local_length = n1 - n0 + 1\n\n    # global last value\n    ne = sum(10 .+ (0:mpisize)) - 11\n    exact_length = ne + 1\n\n    # exact norm\n    exact_norm = norm(1:ne+1)\n\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        # two ghost to left and right\n        ghost = PetscInt.([])\n        if mpirank != 0\n            ghost = PetscInt.([ghost..., n0 - 2, n0 - 1]  )\n        end\n        if mpirank != mpisize - 1\n            ghost = PetscInt.([ghost..., n1 + 1, n1 + 2]  )\n        end\n        \n        for version in 1:2\n            if version == 1\n                # Create using local size\n                petsc_x = LibPETSc.VecCreateGhost(petsclib, comm, PetscInt(local_length), PetscInt(LibPETSc.PETSC_DECIDE), PetscInt(length(ghost)), ghost)\n\n\n\n                rng = PetscInt.(PETSc.ownershiprange(petsc_x))\n                julia_x = PetscScalar.(rng)\n                LibPETSc.VecSetValues(petsclib,petsc_x, PetscInt(length(rng)), PetscInt.(rng .- 1), julia_x, PETSc.INSERT_VALUES)\n\n            else\n                # Create using local size\n                continue\n            end\n\n            PETSc.assemble!(petsc_x)\n            @test length(petsc_x) == exact_length\n\n            vec_norm = norm(petsc_x)\n            @test exact_norm ≈ vec_norm\n\n            petsc_x_local = LibPETSc.VecGhostGetLocalForm(petsclib,petsc_x) \n            \n          #  LibPETSc.VecGetLocalVector(petsclib,petsc_x, petsc_x_local)\n\n            PETSc.withlocalarray!(petsc_x_local) do l_x\n                @test length(l_x) == local_length + length(ghost)\n\n                # Check the ghost has propagated\n                if length(ghost) > 0\n                    vals = zeros(PetscScalar, length(ghost))\n                    inds = PetscInt.(local_length - 1 .+ (1:length(ghost)))\n                   \n                    # Initially we have pushed the numbers so shouldn't match\n                    vals = l_x[inds .+ 1]  # +1 for 1-based indexing\n                    @test !(vals == ghost)\n\n                    # propagate the ghost\n                    PETSc.ghostupdatebegin!(petsc_x)\n                    PETSc.ghostupdateend!(petsc_x)\n\n                    # Recheck the numbers\n                    vals = l_x[inds .+ 1]  \n                    @test vals == (ghost .+1)\n                end\n            end\n            \n\n            PETSc.destroy(petsc_x)\n        end\n        PETSc.finalize(petsclib)\n    end\nend\n"
  },
  {
    "path": "test/old_test.jl",
    "content": "using Test\nusing PETSc, MPI, LinearAlgebra, SparseArrays\n#PETSc.initialize()\n\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n# Windows PETSc binaries are built without MPI support, use PETSC_COMM_SELF instead\ncomm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n\n@testset \"Old Tests\" begin\n  m,n = 20,20\n  x = randn(n)\n  #V = PETSc.VecSeqWithArray(petsclib,x)\n  \n  PetscScalar     = petsclib.PetscScalar\n  PetscInt        = petsclib.PetscInt\n\n  bs = PetscInt(1)\n  V = LibPETSc.VecCreateSeqWithArray(petsclib,comm, bs, PetscInt(length(x)), x)\n\n  @test norm(x) ≈ norm(V) rtol=10eps()\n\n  S = sprand(m,n,0.1) + I\n  #M = PETSc.MatSeqAIJ(petsclib,S)\n  M = PETSc.MatCreateSeqAIJ(petsclib, comm, S)\n       \n\n  @test norm(S) ≈ norm(M) rtol=10eps()\n  vec_x = LibPETSc.VecCreateSeqWithArray(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(1), PetscInt(length(x)), copy(x))\n\n  w = M*vec_x\n  @test w[:] ≈ S*x\n\n  ksp = PETSc.KSP(M; ksp_rtol=1e-8, pc_type=\"jacobi\", ksp_monitor=false)\n  #PETSc.settolerances!(ksp; rtol=1e-8)\n\n  @test PETSc.type(ksp) == \"gmres\" # default\n\n  y = ksp \\ w\n  @test S*y[:] ≈ w[:]  rtol=1e-6\n\n\n  #w = M'*x\n  #@test w ≈ S'*x\n\n  # to be fixed\n#  y = ksp' \\ w\n#  @test S'*y ≈ w rtol=1e-8\n\n  f!(y,x) = y .= 2 .*x\n\n  M = PETSc.MatShell(petsclib,f!, Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF, 10,10)\n\n  x = rand(10)\n\n  @test M*x ≈ 2x\n  @test PETSc.KSP(M) \\ x ≈ x/2\n\n\n  function F!(cfx, snes, cx)\n    fx = PETSc.unsafe_localarray(cfx; read = false, write = true)\n    x = PETSc.unsafe_localarray(cx;  read = true,  write = false)\n \n    fx[1] = x[1]^2 + x[1] * x[2] - 3\n    fx[2] = x[1] * x[2] + x[2]^2 - 6\n\n    finalize(fx)\n    finalize(x)\n\n    return 0\n  end\n\n  J = zeros(2,2)\n  PJ = LibPETSc.MatCreateSeqDense(petsclib, comm, PetscInt(size(J,1)), PetscInt(size(J,2)), J[:])\n        \n\n  \n  function updateJ!(J, snes, x)\n    PETSc.unsafe_localarray(x; read = true, write = false)\n\n    J[1, 1] = 2x[1] + x[2]\n    J[1, 2] = x[1]\n    J[2, 1] = x[2]\n    J[2, 2] = x[1] + 2x[2]\n\n    PETSc.assemble!(J)\n    Base.finalize(x)\n    \n    return 0  # needs to be zero!\n  end\n\n  S = PETSc.SNES(petsclib, Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF; ksp_rtol=1e-4, pc_type=\"none\")\n  r = LibPETSc.VecCreateSeqWithArray(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(1), PetscInt(2), zeros(PetscScalar, 2))\n\n  \n  # You can do this to set the callback functions.\n  # Please be aware that the functions above MUST return 0\n  PETSc.setfunction!(F!, S, r)\n  PETSc.setjacobian!(updateJ!, S, PJ, PJ)\n\n  # The alternative is to do this (tested below):\n  #PETSc.setfunction!(S, r) do cfx, snes, cx\n  #    F!(cfx, snes, cx)\n  #    return 0\n  #end\n\n  #PETSc.setjacobian!(S, PJ) do J, S, x\n  #  updateJ!(J, S, x)\n  #  return 0\n  #end\n\n  #a = PETSc.VecSeqWithArray(petsclib,[2.0,3.0])\n  a = LibPETSc.VecCreateSeqWithArray(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(1), PetscInt(2), PetscScalar.([2.0,3.0]))\n\n  sol = PETSc.solve!(a, S)\n  @test sol[:] ≈ [1.0,2.0] rtol=1e-4\n\n\n  # Test the alternative is to do this:\n  PETSc.setfunction!(S, r) do cfx, snes, cx\n      F!(cfx, snes, cx)\n      return 0\n  end\n\n  PETSc.setjacobian!(S, PJ) do J, S, x\n    updateJ!(J, S, x)\n    return 0\n  end\n  sol1 = PETSc.solve!(a, S)\n  @test sol1[:] ≈ [1.0,2.0] rtol=1e-4\n\n  PETSc.destroy(S)\n  PETSc.destroy(M)\n  PETSc.destroy(ksp)\n  PETSc.destroy(V)\n  PETSc.destroy(r)\n\nend\n\nPETSc.finalize(petsclib)"
  },
  {
    "path": "test/options.jl",
    "content": "using Test\nusing PETSc\n\n@testset \"options\" begin\n    kw_opts = (\n        ksp_monitor = nothing,\n        ksp_view = true,\n        false_opt = false,\n        da_grid_x = 100,\n        da_grid_y = 100,\n        pc_type = \"mg\",\n        pc_mg_levels = 1,\n        mg_levels_0_pc_type = \"ilu\",\n    )\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n\n        opts = PETSc.Options(petsclib; kw_opts...)\n        \n        # Check that all the keys got added\n        for (key, val) in pairs(kw_opts)\n            key = string(key)\n            if val === false\n                @test_throws KeyError opts[key]\n            else\n                val = isnothing(val) || val === true ? \"\" : string(val)\n                @test val == opts[key]\n            end\n        end\n\n        # Check that we throw when a bad key is asked for\n        @test_throws KeyError opts[\"bad key\"]\n\n        # try to insert some new keys\n        opts[\"new_opt\"] = 1\n        opts[\"nothing_opt\"] = nothing\n        @test \"\" == opts[\"nothing_opt\"]\n        @test \"1\" == opts[\"new_opt\"]\n        \n        # Check that viewer is working\n        _stdout = stdout\n        (rd, wr) = redirect_stdout()\n        @show opts\n        #@test readline(rd) == \"PETSc Options database:\"\n        @test readline(rd) == \"#PETSc Option Table entries:\"\n        @test readline(rd) == \"-da_grid_x 100 # (source: code)\"\n        @test readline(rd) == \"-da_grid_y 100 # (source: code)\"\n        @test readline(rd) == \"-ksp_monitor # (source: code)\"\n        @test readline(rd) == \"-ksp_view # (source: code)\"\n        @test readline(rd) == \"-mg_levels_0_pc_type ilu # (source: code)\"\n        @test readline(rd) == \"-new_opt 1 # (source: code)\"\n        @test readline(rd) == \"-nothing_opt # (source: code)\"\n        @test readline(rd) == \"-pc_mg_levels 1 # (source: code)\"\n        @test readline(rd) == \"-pc_type mg # (source: code)\"\n        @test readline(rd) == \"#End of PETSc Option Table entries\"\n\n        redirect_stdout(_stdout)\n        \n\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"parse_options\" begin\n    @test begin\n\n        julia = joinpath(Sys.BINDIR, Base.julia_exename())\n        # Force packages to be installed \n        run(`$(julia) --startup-file=no --project -e \"using Pkg; Pkg.instantiate()\" `)\n\n        run(`$(julia) --startup-file=no --project -e \"using PETSc\n                                 using Test\n                                 opts = PETSc.parse_options(ARGS)\n                                 @test length(opts) == 4\n                                 @test opts.ksp_monitor === nothing\n                                 @test opts.ksp_view === nothing\n                                 @test opts.pc_type === \\\"mg\\\"\n                                 @test opts.da_grid_x === \\\"100\\\"\n                                 @test_throws ErrorException opts.bad_opt\n                                 \"\n                                 --\n                                 -ksp_monitor\n                                 -da_grid_x 100\n                                 -ksp_view\n                                 -pc_type mg`)\n        true\n    end\nend\n\n@testset \"typedget - options\" begin\n    opt = (tup = (1, 2, 3), string_tup = \"1,2,3\", string_int = \"4\", int = 4)\n    @test PETSc.typedget(opt, :bad_key, (1, 1, 1)) === (1, 1, 1)\n    @test PETSc.typedget(opt, :string_tup, (1, 1, 1)) === opt.tup\n    @test PETSc.typedget(opt, :string_tup, \"a\") === opt.string_tup\n    @test PETSc.typedget(opt, :bad_key, \"a\") === \"a\"\n    @test PETSc.typedget(opt, :int, Float64(7)) === Float64(opt.int)\n    @test PETSc.typedget(opt, :bad_key, Float64(7)) === Float64(7)\n    @test PETSc.typedget(opt, :tup, Float64.((1, 1, 1))) === Float64.(opt.tup)\n    @test PETSc.typedget(opt, :bad_key, Float64.((1, 1, 1))) ===\n          Float64.((1, 1, 1))\n    @test PETSc.typedget(opt, :string_tup, Float64.((1, 1, 1))) ===\n          Float64.(opt.tup)\n    @test PETSc.typedget(opt, :tup, (1, 1, 1)) === opt.tup\n    @test PETSc.typedget(opt, :bad_key, (1, 1, 1)) === (1, 1, 1)\n    @test PETSc.typedget(opt, :string_tup, (1, 1, 1)) === opt.tup\n    @test PETSc.typedget(opt, :string_tup, \"a\") === opt.string_tup\n    @test PETSc.typedget(opt, :bad_key, \"a\") === \"a\"\n    @test PETSc.typedget(opt, :int, 7) === opt.int\n    @test PETSc.typedget(opt, :bad_key, 7) === 7\n    @test PETSc.typedget(opt, :int, Float64(7)) === Float64(opt.int)\n    @test PETSc.typedget(opt, :bad_key, Float64(7)) === Float64(7)\n    @test PETSc.typedget(opt, :tup, Float64.((1, 1, 1))) === Float64.(opt.tup)\n    @test PETSc.typedget(opt, :bad_key, Float64.((1, 1, 1))) ===\n          Float64.((1, 1, 1))\n    @test PETSc.typedget(opt, :string_tup, Float64.((1, 1, 1))) ===\n          Float64.(opt.tup)\nend"
  },
  {
    "path": "test/runtests.jl",
    "content": "using Test\nusing MPI: MPI, mpiexec\nusing PETSc, PETSc_jll, Pkg\n\n# Make sure that all dependencies are installed also on a clean system\nPkg.instantiate()\n\nimport MPIPreferences\n@info \"Testing PETSc.jl with\" MPIPreferences.binary MPIPreferences.abi PETSc_jll.host_platform\n\n# Do the MPI tests first so we do not have mpi running inside MPI\nmpi_tests = (\"mpivec.jl\", \"mpimat.jl\", \"ksp.jl\", \"dmstag.jl\")\n\ndo_mpi = true\nif Sys.iswindows()\n    do_mpi = false\nend\n\ninclude(\"init.jl\")\ninclude(\"lib.jl\")\ninclude(\"vec.jl\")           # autowrapped\ninclude(\"mat.jl\")           # autowrapped\ninclude(\"options.jl\")       # autowrapped\ninclude(\"ksp.jl\")           # autowrapped\ninclude(\"snes.jl\")          # autowrapped\ninclude(\"snes_helpers.jl\")  # small helper tests for SNES return-style wrappers\ninclude(\"dmda.jl\")          # autowrapped\ninclude(\"dmstag.jl\")        # autowrapped\ninclude(\"dmnetwork.jl\")     # new test for DMNetwork example\ninclude(\"dmshell.jl\")       # new test for DMShell example\ninclude(\"dmproduct.jl\")     # test for DMProduct example\ninclude(\"matshell.jl\")      # autowrapped!\ninclude(\"test_dmstag.jl\")\ninclude(\"test_snes.jl\")\ninclude(\"old_test.jl\")\ninclude(\"low_level_viewer.jl\")  # Low-level viewer convenience functions\ninclude(\"low_level_ts.jl\")      # Low-level TS functions\ninclude(\"ts_ex51.jl\")           # Regression test for repeated ex51 solves\ninclude(\"ts_ex51_implicit.jl\")  # Regression test for repeated implicit Gauss solves\ninclude(\"ts_ex16.jl\")           # Regression test for the van der Pol IMEX example\ninclude(\"low_level_is.jl\")      # Low-level IS functions\ninclude(\"low_level_petscsection.jl\")  # Low-level PetscSection functions\ninclude(\"low_level_tao.jl\")     # Low-level Tao functions\n\ninclude(\"testutils.jl\")\n\n# Run helper tests for SNES and TAO\ninclude(\"snes_helpers.jl\")\ninclude(\"tao_helpers.jl\")\n\n# Run the examples to make sure they all work\ninclude(\"examples.jl\")\n\n# Examples with the comment\n#   # INCLUDE IN MPI TEST\n# will be run here\n# XXX: Currently not working on windows (since we have no PETSc + MPI)\nif do_mpi\n    include(\"mpi_examples.jl\")\nend\n\n# Do the MPI tests\n# XXX: Currently not working on windows (since we have no PETSc + MPI)\nif do_mpi\n    @testset \"MPI Tests\" begin\n        for testfile in mpi_tests\n            testpath = joinpath(@__DIR__, testfile)\n            cmd = `$(mpiexec()) -n 4 $(Base.julia_cmd()) --project=. $testpath`\n            @test success(pipeline(cmd, stderr = stderr))\n        end\n    end\nend\n"
  },
  {
    "path": "test/snes.jl",
    "content": "using Test\nusing PETSc\nusing MPI\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n\n@testset \"SNES\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n\n    for petsclib in PETSc.petsclibs\n        #@show petsclib\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n\n        # Note: there are multiple ways to set the function and Jacobian\n        # This is method 1 using withlocalarray! to access the local vector  \n        # See below for other methods\n        snes = PETSc.SNES(\n            petsclib,\n            comm;\n            ksp_rtol = 1e-4,\n            pc_type = \"none\",\n            ksp_monitor = false,\n            snes_monitor = false,\n            snes_converged_reason = false,\n            ksp_converged_reason = false,\n        )\n\n        r = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), zeros(PetscScalar, 2))\n        function fn!(cfx, snes, cx)\n            PETSc.withlocalarray!(\n                    cfx, cx;\n                    read = (false, true),\n                    write = (true, false),\n            ) do fx, x\n                fx[1] = x[1]^2 + x[1] * x[2] - PetscScalar(3)\n                fx[2] = x[1] * x[2] + x[2]^2 - PetscScalar(6)\n            end\n            \n            return PetscInt(0)\n        end\n        PETSc.setfunction!(snes, fn!, r)\n        \n       function jacobian!(J, snes, x)\n            PETSc.withlocalarray!(x; write = false) do x\n                J[1, 1] = 2x[1] + x[2]\n                J[1, 2] = x[1]\n                J[2, 1] = x[2]\n                J[2, 2] = x[1] + 2x[2]\n            end\n            PETSc.assemble!(J)\n            return PetscInt(0)\n        end\n        J = LibPETSc.MatCreateSeqDense(petsclib,comm, PetscInt(2), PetscInt(2), zeros(PetscScalar,4))\n        PETSc.setjacobian!(jacobian!, snes, J)\n\n        x = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([2, 3]))\n        b = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([0, 0]))\n\n        PETSc.solve!(x, snes, b)\n        \n        @test x[:] ≈ [1, 2] rtol = 1e-4\n\n        # ----------------------------------------------------------------\n        \n        # Method 2 - use index notation in residual and jacobian functions\n        snes2 = PETSc.SNES(\n            petsclib,\n            comm;\n            ksp_rtol = 1e-4,\n            pc_type = \"none\",\n            ksp_monitor = false,\n            snes_monitor = false,\n            snes_converged_reason = false,\n            ksp_converged_reason = false,\n        )\n\n        r2 = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), zeros(PetscScalar, 2))\n       \n     \n        # use local indices - this may be slower (or allocate more); to be tested\n        function fn2!(fx, snes, x)\n\n            fx[1] = x[1]^2 + x[1] * x[2] - 3\n            fx[2] = x[1] * x[2] + x[2]^2 - 6\n  \n            return PetscInt(0)\n        end\n        PETSc.setfunction!(snes2, fn2!, r2)\n\n        function jacobian2!(J, snes2, x)\n            J[1, 1] = 2x[1] + x[2]\n            J[1, 2] = x[1]\n            J[2, 1] = x[2]\n            J[2, 2] = x[1] + 2x[2]\n\n            PETSc.assemble!(J)\n            return PetscInt(0)\n        end\n        J2 = LibPETSc.MatCreateSeqDense(petsclib,comm, PetscInt(2), PetscInt(2), zeros(PetscScalar,4))\n        PETSc.setjacobian!(jacobian2!, snes2, J2)\n\n\n        # \n        x2 = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([2, 3]))\n        b2 = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([0, 0]))\n\n\n        PETSc.solve!(x2, snes2, b2)\n        \n        \n        @test x2[:] ≈ [1, 2] rtol = 1e-4\n        # ----------------------------------------------------------------\n        \n        \n        # Method 3 - use \"do\" to set residual and jacobian functions, for the ones of you that like this style\n        snes3 = PETSc.SNES(\n            petsclib,\n            comm;\n            ksp_rtol = 1e-4,\n            pc_type = \"none\",\n            ksp_monitor = false,\n            snes_monitor = false,\n            snes_converged_reason = false,\n            ksp_converged_reason = false,\n        )\n\n        r3 = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), zeros(PetscScalar, 2))\n        PETSc.setfunction!(snes3, r3) do fx, snes, x\n            fx[1] = x[1]^2 + x[1] * x[2] - 3\n            fx[2] = x[1] * x[2] + x[2]^2 - 6\n            return PetscInt(0)\n        end\n\n\n        J3 = LibPETSc.MatCreateSeqDense(petsclib,comm, PetscInt(2), PetscInt(2), zeros(PetscScalar,4))\n        PETSc.setjacobian!(snes3, J3) do J, snes, x\n            J[1, 1] = 2x[1] + x[2]\n            J[1, 2] = x[1]\n            J[2, 1] = x[2]\n            J[2, 2] = x[1] + 2x[2]\n\n            PETSc.assemble!(J)\n            return PetscInt(0)\n        end\n\n        # \n        x3 = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([2, 3]))\n        b3 = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([0, 0]))\n\n\n        PETSc.solve!(x3, snes3, b3)\n        \n        \n        @test x3[:] ≈ [1, 2] rtol = 1e-4\n        # ----------------------------------------------------------------\n        \n\n        # cleanup\n        PETSc.destroy(x)\n        PETSc.destroy(b)\n        PETSc.destroy(r)\n        PETSc.destroy(J)\n        \n        PETSc.destroy(x2)\n        PETSc.destroy(b2)\n        PETSc.destroy(r2)\n        PETSc.destroy(J2)\n     \n        PETSc.destroy(x3)\n        PETSc.destroy(b3)\n        PETSc.destroy(r3)\n        PETSc.destroy(J3)\n     \n        PETSc.destroy(snes) \n        PETSc.destroy(snes2) \n        PETSc.destroy(snes3) \n\n        PETSc.finalize(petsclib)\n        \n    end\nend\n"
  },
  {
    "path": "test/snes_helpers.jl",
    "content": "using PETSc\n\n# Minimal SNES helper test\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\nsnes = LibPETSc.SNESCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\nLibPETSc.SNESSetFromOptions(petsclib, snes)\n\n# Call helpers (should not MethodError)\nreason = LibPETSc.SNESGetConvergedReason(petsclib, snes)\niters = LibPETSc.SNESGetIterationNumber(petsclib, snes)\n\n@assert typeof(reason) <: Integer || typeof(reason) <: Enum\n@assert typeof(iters) <: Integer\n\nLibPETSc.SNESDestroy(petsclib, snes)\nPETSc.finalize(petsclib)\n"
  },
  {
    "path": "test/tao_helpers.jl",
    "content": "using PETSc\n\n# Minimal TAO helper test\npetsclib = PETSc.petsclibs[1]\nPETSc.initialize(petsclib)\n\ntao = LibPETSc.TaoCreate(petsclib, LibPETSc.PETSC_COMM_SELF)\n# Avoid calling TaoSetType string wrapper; keep minimal\n\n# Call helper (should not MethodError)\nreason = LibPETSc.TaoGetConvergedReason(petsclib, tao)\n@assert typeof(reason) <: Integer || typeof(reason) <: Enum\n\nLibPETSc.TaoDestroy(petsclib, tao)\nPETSc.finalize(petsclib)\n"
  },
  {
    "path": "test/test_dmstag.jl",
    "content": "using Test\nusing PETSc, MPI, OffsetArrays\n#using SparseArrays\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n\n\n@testset \"DMStag All\" begin\n\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs[1:4]\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = PETSc.scalartype(petsclib)\n        PetscInt    = PETSc.inttype(petsclib)\n        PetscReal   = real(PetscScalar)\n        # Create 1D DMStag with new unified constructor\n        dm_1D = PETSc.DMStag(petsclib,\n                                comm,\n                                (PETSc.DM_BOUNDARY_NONE,),\n                                (20,),\n                                (1,1),\n                                2,\n                                PETSc.DMSTAG_STENCIL_BOX;\n                                points_per_proc=([PetscInt(20)],))\n\n        # Create 2D DMStag with new unified constructor\n        dm_2D = PETSc.DMStag(petsclib,\n                                comm,\n                                (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n                                (20, 21),\n                                (1,1,1),\n                                2,\n                                PETSc.DMSTAG_STENCIL_BOX;\n                                processors=(1,1),\n                                points_per_proc=([PetscInt(20)],[PetscInt(21)]))\n\n      \n        # Create 3D DMStag\n        dm_3D = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE,PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n            (PetscInt(20),PetscInt(21),PetscInt(22)),    # global size\n            (PetscInt(1),PetscInt(1),PetscInt(1),PetscInt(2)),     # dof_per_node (4 in 3D)\n            PetscInt(1),             # stencil_width\n            PETSc.DMSTAG_STENCIL_BOX    # stencil type\n        )        \n\n        dmTo = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE,PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n            (20,21,22),    # global size\n            (1,1,2,2),     # dof_per_node (4 in 3D)\n            1,             # stencil_width\n            PETSc.DMSTAG_STENCIL_BOX    # stencil type\n        )   \n        @test size(dm_3D) == (20, 21, 22)\n        \n        # copy struct - using new interface\n        dmnew = LibPETSc.DMStagCreateCompatibleDMStag(petsclib,dm_3D,PetscInt(1),PetscInt(1),PetscInt(2),PetscInt(2))\n        @test size(dmnew) == (20, 21, 22)\n\n\n        corners = PETSc.getcorners(dm_3D)\n        @test corners.size   == (20,21,22)\n        @test corners.nextra == (1, 1, 1)\n        @test corners.lower  == CartesianIndex(1, 1, 1)\n        @test corners.upper  == CartesianIndex(20,21,22)\n\n\n        bound = LibPETSc.DMStagGetBoundaryTypes(petsclib, dm_3D) \n        @test bound == (PETSc.LibPETSc.DM_BOUNDARY_NONE, PETSc.LibPETSc.DM_BOUNDARY_NONE, PETSc.LibPETSc.DM_BOUNDARY_NONE)\n\n        corners = LibPETSc.DMStagGetCorners(petsclib, dm_3D) \n        @test corners == (0, 0, 0, 20, 21, 22, 1, 1, 1)\n\n        dof = LibPETSc.DMStagGetDOF(petsclib, dm_3D)\n        @test dof == (1, 1, 1, 2)\n\n        entries = LibPETSc.DMStagGetEntries(petsclib, dm_3D)\n        @test entries == 88575\n\n        entries = LibPETSc.DMStagGetEntriesLocal(petsclib, dm_3D)\n        @test entries == 95634\n\n        out = LibPETSc.DMStagGetEntriesPerElement(petsclib, dm_3D)\n        @test out == 9\n\n        dm = dm_3D\n        out = LibPETSc.DMStagGetGhostCorners(petsclib, dm)\n        @test out == (0, 0, 0, 21, 22, 23)\n\n        out = LibPETSc.DMStagGetGlobalSizes(petsclib, dm)\n        @test out == (20, 21, 22)\n\n        #out = LibPETSc.DMStagGetIsFirstRank(petsclib, dm)\n        #@test out == (false, false, true)\n\n        #out = LibPETSc.DMStagGetIsLastRank(petsclib, dm)\n        #@test out == (false, false, true)\n\n        out = LibPETSc.DMStagGetLocalSizes(petsclib, dm)\n        @test out == (20, 21, 22)\n\n        loc = PETSc.LibPETSc.DMSTAG_DOWN\n        out = LibPETSc.DMStagGetLocationDOF(petsclib, dm, loc)\n        @test out == 1\n\n        loc = PETSc.LibPETSc.DMSTAG_DOWN\n        c = 1\n        out = LibPETSc.DMStagGetLocationSlot(petsclib, dm, loc, PetscInt(0))\n        @test out == 5\n\n        out = LibPETSc.DMStagGetNumRanks(petsclib, dm)\n        @test out == (1, 1, 1)\n\n        out = LibPETSc.DMStagGetStencilType(petsclib, dm)\n        @test out == LibPETSc.DMSTAG_STENCIL_BOX\n\n        out = LibPETSc.DMStagGetStencilWidth(petsclib, dm)\n        @test out == 1\n\n        out = LibPETSc.DMStagGetRefinementFactor(petsclib, dm)\n        @test out == (2, 2, 2)\n\n        out = LibPETSc.DMStagPopulateLocalToGlobalInjective(petsclib, dm)\n        @test out == nothing\n\n        v = PETSc.DMLocalVec(dm);\n        v[10] = 10.1;\n        PETSc.assemble!(v);\n        \n        #X,X_ptr = LibPETSc.DMStagVecGetArray(petsclib, dm,v); # doesn't crash but gives wrong result\n        #@test X[10] == PetscScalar(10.1)        \n\n        dm_new = LibPETSc.DMStagCreateCompatibleDMStag(petsclib, dm, PetscInt(1),PetscInt(2),PetscInt(3),PetscInt(4))\n        @test LibPETSc.DMStagGetDOF(petsclib, dm_new) == (1,2,3,4)\n\n        # this needs fixing!\n        #out = LibPETSc.DMStagGetOwnershipRanges(petsclib, dm)\n        #@test out == ([20], [21], [22])\n        \n        # Not sure we should test that here as it should be called before DMSetup\n        #b0 = PETSc.LibPETSc.DM_BOUNDARY_NONE\n        #b1 = PETSc.LibPETSc.DM_BOUNDARY_GHOSTED\n        #b2 = PETSc.LibPETSc.DM_BOUNDARY_MIRROR\n        #out = LibPETSc.DMStagSetBoundaryTypes(petsclib, dm, b0, b1, b2)\n        #@test out == \n        \n        dwn = PETSc.LibPETSc.DMSTAG_DOWN\n        loc  = PETSc.LibPETSc.DMStagStencil(dwn,PetscInt(1),PetscInt(1),PetscInt(1),PetscInt(0))\n        loc2 = PETSc.LibPETSc.DMStagStencil(dwn,PetscInt(1),PetscInt(1),PetscInt(2),PetscInt(0))\n        \n        #loc  = PETSc.LibPETSc.DMStagStencil(dwn,1,1,1,0)\n        #loc2 = PETSc.LibPETSc.DMStagStencil(dwn,1,1,2,0)\n        \n\n        vg = PETSc.DMGlobalVec(dm);\n        LibPETSc.DMStagVecSetValuesStencil(petsclib, dm,vg,PetscInt(1),[loc],[PetscScalar(1.0)],PETSc.LibPETSc.INSERT_VALUES) \n        @test vg[4145] == PetscScalar(1.0)\n\n        LibPETSc.DMStagVecSetValuesStencil(petsclib, dm,vg,PetscInt(2), [loc, loc2],[PetscScalar(1.0),PetscScalar(2.0)],PETSc.LibPETSc.INSERT_VALUES) \n        @test extrema(PetscReal.(vg)) == (0.0,2.0)\n\n        out = LibPETSc.DMStagVecGetValuesStencil(petsclib, dm,v, PetscInt(1), [loc])\n        @test out == PetscScalar[0.0]\n        \n        # results in a segfault for some libs\n        if isa(PetscScalar, AbstractFloat)\n            out = LibPETSc.DMStagVecGetValuesStencil(petsclib, dm,v, PetscInt(2),[loc, loc2])\n            @test out == [0.0, 0.0]\n\n            # results in a segfault for some libs\n            out = LibPETSc.DMStagStencilToIndexLocal(petsclib, dm,PetscInt(3),PetscInt(2),[loc, loc2])\n            ##@test out == PetscInt[0, 4361] #wrong??\n            @test out ==   PetscInt[4361, 8519]   \n        end\n\n        # NOT YET WORKING\n        #pda = LibPETSc.DMDAFromDMStag(petsclib,dm)\n        #pda, pdavec = LibPETSc.DMStagVecSplitToDMDA(petsclib, dm,v,dwn,0)\n        #@test length(pdavec) == 9680\n\n\n        vecTo = PETSc.DMGlobalVec(dmTo);\n        out = LibPETSc.DMStagMigrateVec(petsclib, dm,vg,dmTo,vecTo)\n        @test isnothing(out)\n\n        v1D = PETSc.DMLocalVec(dm_1D);\n\n        # Set values using the 2D array interface\n        # DMStagVecGetArray does this internally\n        x,_,_,m,_,_ = LibPETSc.DMStagGetGhostCorners(petsclib, dm_1D)\n        entriesEl = LibPETSc.DMStagGetEntriesPerElement(petsclib,dm_1D)\n\n        array2D = LibPETSc.VecGetArray2d(petsclib, v1D, m, entriesEl, 0, 0 )\n        array2D .= 1.0\n        array2D[2,2] = 2.2\n        LibPETSc.VecRestoreArray2d(petsclib, v1D, m, entriesEl, 0, 0, array2D)\n        @test extrema(PetscReal.(v1D)) == (PetscReal(1.0), PetscReal(2.2))\n\n        # Now lets use DMStagVecGetArray. Note that we had to do manual modifcations to that routine\n        array2D_1 = LibPETSc.DMStagVecGetArray(petsclib, dm_1D, v1D) \n        array2D_1 .= 2.0\n        array2D_1[2,2] = 4.2\n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_1D, v1D, array2D_1) \n        @test extrema(PetscReal.(v1D)) == (PetscScalar(2.0), PetscScalar(4.2))\n        \n        # Test product coordinates and friends \n        # Converted from old DMStagCreate3d interface to new unified DMStag constructor\n        dm_3D_pd = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n            (20, 21, 22),               # global sizes\n            (1, 1, 1, 1),               # dof_per_node (vertex, edge, face, element)\n            2,                          # stencil width\n            PETSc.DMSTAG_STENCIL_BOX;   # stencil type\n            processors = (1, 1, 1),\n            points_per_proc = ([PetscInt(20)], [PetscInt(21)], [PetscInt(22)])\n        )\n\n        @test LibPETSc.DMStagGetGlobalSizes(petsclib, dm_3D_pd) == (20, 21, 22)\n         \n        LibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dm_3D_pd, PetscReal(0.0), PetscReal(1.0), PetscReal(0.0), PetscReal(2.0), PetscReal(0.0), PetscReal(3.0))\n#        LibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dm_3D_pd, 0.0, 1.0, 0.0, 2.0,0.0, 3.0)\n\n        # Retrieve 1D coordinate arrays\n        x,y,z = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, dm_3D_pd)\n        dims = LibPETSc.DMStagGetGhostCorners(petsclib, dm_3D_pd)[4:6] \n        @test size(x,1) == dims[1]\n        @test size(z,1) == dims[3]\n#        @test x[10] ≈ PetscScalar(0.225)\n#        @test y[10] == PetscScalar(0.42857142857142855)\n#        @test z[10] == PetscScalar(0.6136363636363635)\n\n        x[10] = 0.230\n        \n        LibPETSc.DMStagRestoreProductCoordinateArrays(petsclib, dm_3D_pd, x,y,z)\n        \n   \n        x,y,z = LibPETSc.DMStagGetProductCoordinateArraysRead(petsclib, dm_3D_pd)\n        LibPETSc.DMStagRestoreProductCoordinateArraysRead(petsclib, dm_3D_pd, x,y,z)\n\n\n        slot = LibPETSc.DMStagGetLocationSlot(petsclib, dm_3D_pd, PETSc.LibPETSc.DMSTAG_ELEMENT,0)\n        @test slot==7\n        slot = LibPETSc.DMStagGetLocationSlot(petsclib, dm_3D_pd, PETSc.LibPETSc.DMSTAG_LEFT,0)\n        @test slot==6\n\n        # Converted from old DMStagCreate2d interface (fine grid) to new DMStag constructor\n        dmf = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n            (32, 32),            # global sizes\n            (1, 0, 0),           # dof_per_node (vertex, edge, element)\n            2,                   # stencil width\n            PETSc.DMSTAG_STENCIL_BOX;\n            processors = (1, 1),\n            points_per_proc = ([PetscInt(32)], [PetscInt(32)])\n        )\n\n\n        # Converted from old DMStagCreate2d interface (coarse grid) to new DMStag constructor\n        dmc = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n            (16, 16),            # global sizes\n            (1, 0, 0),           # dof_per_node (vertex, edge, element)\n            2,                   # stencil width\n            PETSc.DMSTAG_STENCIL_BOX;\n            processors = (1, 1),\n            points_per_proc = ([PetscInt(16)], [PetscInt(16)])\n        )    \n\n        xf = PETSc.DMLocalVec(dmf)      \n        xf .= 1.0\n        \n        xc = PETSc.DMLocalVec(dmc)      \n        LibPETSc.DMStagRestrictSimple(petsclib, dmf,xf,dmc, xc)\n        @test xc[5] == PetscScalar(1.0)\n\n        out = LibPETSc.DMStagSetUniformCoordinatesExplicit(petsclib, dm,0.1,1.1,1.3,3.1,2.1,2.8)\n        @test isnothing(out)\n\n        xmin,xmax,ymin,ymax,zmin,zmax = 0.1,1.1,1.3,3.1,2.1,2.8\n        out = LibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dmc,xmin,xmax,ymin,ymax,zmin,zmax)\n        @test isnothing(out)\n\n        \n        PETSc.destroy(dm_1D)\n        PETSc.destroy(dm_2D)\n        PETSc.destroy(dm_3D)\n        PETSc.destroy(dmTo)\n        PETSc.destroy(dmnew)\n        PETSc.destroy(v)\n        PETSc.destroy(v1D)\n        PETSc.destroy(vg)\n        PETSc.destroy(dm_new)\n        PETSc.destroy(vecTo)\n        PETSc.destroy(dm_3D_pd)\n        PETSc.destroy(dmf)\n        PETSc.destroy(dmc)\n        PETSc.destroy(xc)\n        PETSc.destroy(xf)\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"DMStagCreate1d\" begin\n\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[8]\n        PETSc.initialize(petsclib)\n        PetscScalar = PETSc.scalartype(petsclib)\n        PetscInt    = PETSc.inttype(petsclib)\n\n        # Create 1D DMStag\n        dm = PETSc.DMStag(\n                petsclib,\n                comm,\n                (PETSc.DM_BOUNDARY_PERIODIC,),\n                (20,),\n                (2,0),\n                2,\n                PETSc.DMSTAG_STENCIL_BOX)\n\n        @test LibPETSc.DMStagGetBoundaryTypes(petsclib, dm)[1]== PETSc.LibPETSc.DM_BOUNDARY_PERIODIC\n        PETSc.destroy(dm)\n\n        # Create 1D DMStag with array of local @ of points\n        dm = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE,),\n            (20,),\n            (2,2),\n            2;\n            points_per_proc = ([PetscInt(20)],),\n        )\n\n        # Test get size\n        @test LibPETSc.DMStagGetGlobalSizes(petsclib, dm) == (20,0,0)\n        @test LibPETSc.DMStagGetLocalSizes(petsclib, dm) == (20,0,0)\n\n        # Test\n        @test PETSc.gettype(dm) == \"stag\"\n        @test PETSc.getdimension(dm) == 1\n\n        # Info about ranks  \n        @test LibPETSc.DMStagGetIsFirstRank(petsclib, dm) == (true,false,false)\n        @test LibPETSc.DMStagGetIsFirstRank(petsclib, dm) == (true,false,false)\n\n        # Boundary\n        @test LibPETSc.DMStagGetBoundaryTypes(petsclib, dm)[1]==PETSc.LibPETSc.DM_BOUNDARY_NONE\n\n        # Corners\n        corners         = PETSc.getcorners(dm)\n        ghost_corners   = PETSc.getghostcorners(dm)\n\n        @test corners.lower[1] == 1\n        @test corners.upper[1] == 20\n        @test corners.size[1]  == 20\n        @test corners.nextra[1] == 1\n\n        @test ghost_corners.lower[1] == 1\n        @test ghost_corners.upper[1] == 21\n        @test ghost_corners.size[1]  == 21\n\n        # DOF\n        @test LibPETSc.DMStagGetDOF(petsclib, dm) == (2,2,0,0)\n        PETSc.destroy(dm)\n\n        ##\n        # Create new struct and pass keyword arguments\n        dm_1D = PETSc.DMStag(petsclib,comm,(PETSc.DM_BOUNDARY_NONE,),(200,),(2,2),PetscInt(2); stag_grid_x=PetscInt(10));\n       \n        @test  LibPETSc.DMStagGetGlobalSizes(petsclib,dm_1D)[1] == 10\n        @test LibPETSc.DMStagGetEntriesPerElement(petsclib, dm_1D)==4\n\n        # Stencil width & type\n        @test  LibPETSc.DMStagGetStencilWidth(petsclib, dm_1D)==2\n        @test  LibPETSc.DMStagGetBoundaryTypes(petsclib, dm_1D)[1] == PETSc.DM_BOUNDARY_NONE\n\n        PETSc.destroy(dm_1D)\n\n        # test ghosted array set using keywords\n        dm_ghosted = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_GHOSTED,),\n            (200,),\n            (2,2),\n            2;\n            stag_grid_x = PetscInt(10),\n        )\n\n\n        @test  LibPETSc.DMStagGetStencilWidth(petsclib, dm_ghosted)==2\n        corners         = PETSc.getcorners(dm_ghosted)\n\n        @test corners.size[1]==10       # keyword overrides the specified value\n        @test  LibPETSc.DMStagGetBoundaryTypes(petsclib, dm_ghosted)[1] == PETSc.DM_BOUNDARY_GHOSTED\n\n        ind = PETSc.DMStagGetIndices(dm_ghosted);\n        @test ind.center.x[3] == 5\n\n    \n        # simple test to retrieve the KSP object\n        # NOTE: need to implement a similar SNES routine\n        ksp = PETSc.KSP(dm_ghosted, ksp_type=\"gmres\")\n        @test LibPETSc.KSPGetType(petsclib, ksp)==\"gmres\"\n\n        PETSc.destroy(dm_ghosted)\n        PETSc.destroy(dm)\n        PETSc.destroy(ksp)\n\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"DMStagCreate2d\" begin\n\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs\n        #petsclib =  PETSc.petsclibs[1]\n        \n        PETSc.initialize(petsclib)\n        PetscScalar = PETSc.scalartype(petsclib)\n        PetscInt    = PETSc.inttype(petsclib)\n\n        # Create 2D DMStag\n        dm_2D = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE,PETSc.DM_BOUNDARY_NONE),\n            (20,21),    # global size\n            (1,1,1),    # dof_per_node (3 in 2D)\n            1,          # stencil_width\n            PETSc.DMSTAG_STENCIL_BOX    # stencil type\n        )\n\n        @test LibPETSc.DMStagGetGlobalSizes(petsclib, dm_2D) == (20,21,0)\n        corners = PETSc.getcorners(dm_2D)\n        @test corners.size   == (20,21,0)\n        @test corners.nextra == (1, 1, 0)\n        @test corners.lower  == CartesianIndex(1, 1, 1)\n        @test corners.upper  == CartesianIndex(20,21,0)\n\n        PETSc.destroy(dm_2D)\n\n        PETSc.finalize(petsclib)\n    end\nend\n\n\n\n@testset \"DMStag Vectors and Coordinates\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs[1:4]\n        #@show petsclib\n        #petsclib = PETSc.petsclibs[1]\n    \n        PETSc.initialize(petsclib)\n        PetscScalar = PETSc.scalartype(petsclib)\n        PetscInt    = PETSc.inttype(petsclib)\n        PetscReal   = real(PetscScalar)\n        # Create 1D DMStag\n        dm_1D = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE,),\n            (200,),\n            (2,2),\n            1,\n            PETSc.DMSTAG_STENCIL_BOX,\n            stag_grid_x=PetscInt(10))\n\n        @test LibPETSc.DMStagGetGlobalSizes(petsclib, dm_1D) == (10,0,0)\n\n        # Set coordinates using product (1D) arrays\n        #PETSc.setuniformcoordinates_dmstag!(dm_1D, (0,), (10,))\n        \n        LibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dm_1D,PetscReal(0.),PetscReal(10.),PetscReal(0.),PetscReal(1.),PetscReal(0.),PetscReal(1.) )\n\n\n        DMcoord = LibPETSc.DMGetCoordinateDM(petsclib,dm_1D)\n        @test PETSc.gettype(DMcoord)==\"product\"\n\n        # Retrieve array with staggered coordinates\n        X_coord,_,_ = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, dm_1D)\n        @test  X_coord[1,2] == 0.5\n        LibPETSc.DMStagRestoreProductCoordinateArrays(petsclib, dm_1D, X_coord,nothing,nothing)\n\n\n        LibPETSc.DMStagGetLocationSlot(petsclib, dm_1D, LibPETSc.DMSTAG_RIGHT, 0) ==4\n     \n        global_vec      = PETSc.DMLocalVec(dm_1D)\n        local_vec       = PETSc.DMGlobalVec(dm_1D)\n\n        # Fill everything with some data\n        fill!(local_vec, mpisize)\n        fill!(global_vec, mpisize)\n        @test global_vec[3] == 1.0\n\n        # Add the local values to the global values\n        LibPETSc.DMLocalToGlobalBegin(petsclib, dm_1D, local_vec, PETSc.ADD_VALUES, global_vec)\n        LibPETSc.DMLocalToGlobalEnd(petsclib, dm_1D, local_vec, PETSc.ADD_VALUES, global_vec)\n\n        @test global_vec[3] == 2.0\n\n        # Do 2D tests\n        dm_2D = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_NONE,PETSc.DM_BOUNDARY_NONE),\n            (3,4),      # global size\n            (1,1,1),    # dof_per_node (3 in 2D)\n            1,          # stencil_width\n            PETSc.DMSTAG_STENCIL_BOX    # stencil type\n        )\n\n        LibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dm_2D,PetscReal(1.),PetscReal(3.),PetscReal(10.),PetscReal(11.),PetscReal(0.),PetscReal(0.))\n\n        #PETSc.setuniformcoordinates_dmstag!(dm_2D, (1.0,3.0), (10.0,11.0))\n       \n        \n        # Retrieve array with staggered coordinates\n        X_coord,Y_coord,_ = LibPETSc.DMStagGetProductCoordinateArrays(petsclib, dm_2D)\n\n        LibPETSc.DMStagRestoreProductCoordinateArrays(petsclib, dm_2D, X_coord,Y_coord,nothing)\n\n        vec_test_2D     = PETSc.DMLocalVec(dm_2D)\n        X               = LibPETSc.DMStagVecGetArray(petsclib, dm_2D,vec_test_2D);\n        X[end,end,end] = 111;                   # modify 3D array @ some point and DOF\n\n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_2D,vec_test_2D,X);\n        @test vec_test_2D[end]==111.0           # verify that this modified the vector as well\n\n        #Base.finalize(X)                        # release from memory\n\n\n\n        #test stencil locations\n        pos1 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT,1,0,0,1)\n        @test pos1.c == 1\n        pos2 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_RIGHT,4,0,0,0)\n        pos  = [pos1, pos2]\n        @test pos2.loc == LibPETSc.DMSTAG_RIGHT\n        @test pos2.i == 4\n\n        # Retrieve value from stencil\n        vec_test       = PETSc.DMLocalVec(dm_1D)\n        vec_test      .= 1:length(vec_test)                 # point wise copy of data to PetscVec\n        val             = LibPETSc.DMStagVecGetValuesStencil(petsclib, dm_1D, vec_test, PetscInt(1), [pos1]) # this gets a single value\n        @test val[1] ==6\n        vals            = LibPETSc.DMStagVecGetValuesStencil(petsclib, dm_1D, vec_test, PetscInt(2), pos)     # this gets an array of values\n        @test vals[1] == 6\n\n        X_1D            = LibPETSc.DMStagVecGetArray(petsclib, dm_1D,vec_test);\n        @test X_1D[2,3] == PetscScalar(24.0)         # verify that the 2D array interface works (element 24 in (m,q)=(11,4) layout)\n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_1D, vec_test, X_1D)\n        Base.finalize(X_1D)                     # release from memory\n\n\n        # Set values using stencils\n        vec_test_global = PETSc.DMGlobalVec(dm_1D)\n        val1 = PetscScalar.([2222.2, 3.2]);\n        LibPETSc.DMStagVecSetValuesStencil(petsclib, dm_1D, vec_test_global, PetscInt(1),  [pos1], val1,   PETSc.INSERT_VALUES)\n        @test vec_test_global[6] ≈ 2222.2\n        LibPETSc.DMStagVecSetValuesStencil(petsclib, dm_1D, vec_test_global, PetscInt(2), pos,  val1,      PETSc.INSERT_VALUES)\n        @test vec_test_global[21] ≈ 3.2\n\n        pos3 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT,1,0,0,1)\n        val = LibPETSc.DMStagVecGetValuesStencil(petsclib, dm_1D, vec_test, PetscInt(2), [pos3; pos3])\n        @test val[2] == 6.0\n        \n        PETSc.destroy(vec_test);\n        PETSc.destroy(vec_test_global);\n        PETSc.destroy(vec_test_2D);\n        PETSc.destroy(global_vec);\n        PETSc.destroy(local_vec);\n        PETSc.destroy(dm_1D);\n        PETSc.destroy(dm_2D);\n        \n       \n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"DMStag create matrixes\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    mpirank = MPI.Comm_rank(comm)\n    mpisize = MPI.Comm_size(comm)\n    for petsclib in PETSc.petsclibs[1:2]\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib, log_view=false)\n        PetscScalar = PETSc.scalartype(petsclib)\n        PetscInt    = PETSc.inttype(petsclib)\n        PetscReal   = real(PetscScalar)\n\n        # Converted from old DMStagCreate1d to new DMStag constructor\n        dm_1D = PETSc.DMStag(petsclib, comm, (PETSc.DM_BOUNDARY_NONE,), (200,), (2, 2), 2;\n                  stag_grid_x = 10)\n        #PETSc.setuniformcoordinates!(dm_1D, (0,), (10,))\n        LibPETSc.DMStagSetUniformCoordinatesProduct(petsclib, dm_1D,PetscScalar(0.),PetscScalar(10.),PetscScalar(0.),PetscScalar(1.),PetscScalar(0.),PetscScalar(1.) )\n\n        A = LibPETSc.DMCreateMatrix(petsclib,dm_1D)\n\n        LibPETSc.MatSetOption(petsclib,A, LibPETSc.MAT_NEW_NONZERO_ALLOCATION_ERR, LibPETSc.PETSC_FALSE)\n        @test size(A) == (42,42)\n      \n\n        # set some values using normal indices:\n        A[1,1]  = 1.0\n        A[1,10] = 1.0\n\n        pos1 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_LEFT,1,0,0,1)\n        pos2 = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_RIGHT,4,0,0,0)\n        pos  = [pos1, pos2]\n        val1 = PetscScalar.([2222.2 3.2]);\n        LibPETSc.DMStagMatSetValuesStencil(petsclib, dm_1D, A, PetscInt(1), [pos1], PetscInt(1), [pos1], [PetscScalar(11.1)], PETSc.INSERT_VALUES)\n        LibPETSc.DMStagMatSetValuesStencil(petsclib, dm_1D, A, PetscInt(1), [pos2], PetscInt(2), pos, val1[:], PETSc.INSERT_VALUES)\n\n        @test LibPETSc.MatAssembled(petsclib, A) == false\n        PETSc.assemble!(A);\n        @test LibPETSc.MatAssembled(petsclib, A) == true\n        @test A[1,10] == 1.0\n\n\n        # Reads a value from the matrix, using the stencil structure\n        @test LibPETSc.DMStagMatGetValuesStencil(petsclib, dm_1D, A, PetscInt(1), [pos1], PetscInt(1), [pos1])[1]== PetscScalar(11.1)\n   \n     \n        # result is a 1x2 matrix\n        @test LibPETSc.DMStagMatGetValuesStencil(petsclib, dm_1D, A, PetscInt(1), [pos2], PetscInt(2), pos)==val1\n\n        \n        dofCenter       =   1;\n        dofEdge         =   1;\n        dofVertex       =   1\n        stencilWidth    =   1;\n        dm_2D = PETSc.DMStag(\n            petsclib,\n            comm,\n            (PETSc.DM_BOUNDARY_GHOSTED, PETSc.DM_BOUNDARY_GHOSTED),\n            (10, 11),                        # global sizes\n            (dofVertex, dofEdge, dofCenter), # dof_per_node\n            stencilWidth,\n            PETSc.DMSTAG_STENCIL_BOX;\n            processors = (PETSc.PETSC_DECIDE, PETSc.PETSC_DECIDE)\n        )\n\n        vec_test_2D_global      =   PETSc.DMGlobalVec(dm_2D)\n        vec_test_2D_local       =   PETSc.DMLocalVec(dm_2D)\n        fill!(vec_test_2D_global, 0.0)\n        fill!(vec_test_2D_local, 0.0)\n        corners                 =   PETSc.getcorners(dm_2D)\n        ghost_corners           =   PETSc.getghostcorners(dm_2D)\n\n        # Use direct array access instead of DMStagVecSetValuesStencil (which has memory corruption issues)\n        X2D_write = LibPETSc.DMStagVecGetArray(petsclib, dm_2D, vec_test_2D_local)\n        \n        for ix=corners.lower[1]:corners.upper[1]\n            for iy=corners.lower[2]:corners.upper[2]\n                ix_local = ix #- ghost_corners.lower[1] + 1\n                iy_local = iy #- ghost_corners.lower[2] + 1\n\n                \n                # Set DOF at element center\n                slot_element = LibPETSc.DMStagGetLocationSlot(petsclib, dm_2D, LibPETSc.DMSTAG_ELEMENT, 0)\n                X2D_write[ix_local, iy_local, slot_element+1] = PetscScalar(ix)\n                \n                # Also set other DOFs for testing\n                slot_left = LibPETSc.DMStagGetLocationSlot(petsclib, dm_2D, LibPETSc.DMSTAG_LEFT, 0)\n                X2D_write[ix_local, iy_local, slot_left+1] = PetscScalar(33)\n                \n                slot_down = LibPETSc.DMStagGetLocationSlot(petsclib, dm_2D, LibPETSc.DMSTAG_DOWN, 0)\n                X2D_write[ix_local, iy_local, slot_down+1] = PetscScalar(44)\n                \n                slot_down_left = LibPETSc.DMStagGetLocationSlot(petsclib, dm_2D, LibPETSc.DMSTAG_DOWN_LEFT, 0)\n                X2D_write[ix_local, iy_local, slot_down_left+1] = PetscScalar(55)\n            end\n        end\n        \n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_2D, vec_test_2D_local, X2D_write)\n        Base.finalize(X2D_write)\n        \n        # Transfer local to global\n        LibPETSc.DMLocalToGlobalBegin(petsclib, dm_2D, vec_test_2D_local, LibPETSc.INSERT_VALUES, vec_test_2D_global)\n        LibPETSc.DMLocalToGlobalEnd(petsclib, dm_2D, vec_test_2D_local, LibPETSc.INSERT_VALUES, vec_test_2D_global)\n        \n        # Verify by reading back from global to local\n        LibPETSc.DMGlobalToLocalBegin(petsclib, dm_2D, vec_test_2D_global, LibPETSc.INSERT_VALUES, vec_test_2D_local)\n        LibPETSc.DMGlobalToLocalEnd(petsclib, dm_2D, vec_test_2D_global, LibPETSc.INSERT_VALUES, vec_test_2D_local)\n        \n        # retrieve value back from the local array \n        dof     = 0;\n        pos     = LibPETSc.DMStagStencil(LibPETSc.DMSTAG_ELEMENT,3,2,0,dof)\n        @test LibPETSc.DMStagVecGetValuesStencil(petsclib, dm_2D, vec_test_2D_local, PetscInt(1), [pos])[1] == 4.0  # Updated: stencil returns correct value based on new layout\n\n        # Extract an array that holds all DOF's\n        X2D_dofs  = LibPETSc.DMStagVecGetArray(petsclib, dm_2D,vec_test_2D_local)           # extract arrays with all DOF (mostly for visualizing)\n        \n        @test X2D_dofs[3,3,1] ≈ PetscScalar(55.0)\n        @test X2D_dofs[3,3,2] ≈ PetscScalar(44.0)\n        @test X2D_dofs[3,3,3] ≈ PetscScalar(33.0)\n        @test X2D_dofs[3,3,4] ≈ PetscScalar(3.0)\n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_2D,vec_test_2D_local, X2D_dofs)\n        \n        # cleanup\n        PETSc.destroy(vec_test_2D_global);\n        PETSc.destroy(vec_test_2D_local);\n        PETSc.destroy(dm_2D);\n        PETSc.destroy(A);\n        PETSc.destroy(dm_1D);\n\n           \n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"DMStagVecGetArray/RestoreArray\" begin\n    comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n    for petsclib in PETSc.petsclibs[1:4]\n        PETSc.initialize(petsclib)\n        PetscScalar = PETSc.scalartype(petsclib)\n        PetscInt    = PETSc.inttype(petsclib)\n        \n        # Test 1D with no ghost boundaries\n        dm_1D = PETSc.DMStag(petsclib, comm, (PETSc.DM_BOUNDARY_NONE,), (10,), (2,2), 1, PETSc.DMSTAG_STENCIL_BOX)\n        x_l_1D = PETSc.DMLocalVec(dm_1D)\n        x_l_1D .= 1:length(x_l_1D)\n        \n        # Get array and verify dimensions\n        X_1D = LibPETSc.DMStagVecGetArray(petsclib, dm_1D, x_l_1D)\n        m, q = LibPETSc.DMStagGetGhostCorners(petsclib, dm_1D)[4], LibPETSc.DMStagGetEntriesPerElement(petsclib, dm_1D)\n        @test size(X_1D) == (m, q)\n        \n        # Verify data matches direct reshape\n        expected_1D = reshape(x_l_1D[:], (m, q))\n        @test X_1D == expected_1D\n        \n        # Test modification through the array view\n        X_1D[2,3] = PetscScalar(999.0)\n        @test x_l_1D[2 + (3-1)*m] == PetscScalar(999.0)  # Verify view works\n        \n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_1D, x_l_1D, X_1D)\n        PETSc.destroy(x_l_1D)\n        PETSc.destroy(dm_1D)\n        \n        # Test 2D with ghost boundaries\n        dm_2D_ghost = PETSc.DMStag(petsclib, comm, \n                                   (PETSc.DM_BOUNDARY_GHOSTED, PETSc.DM_BOUNDARY_GHOSTED),\n                                   (4, 4), (1, 1, 1), 1, PETSc.DMSTAG_STENCIL_BOX)\n        x_g = PETSc.DMGlobalVec(dm_2D_ghost)\n        x_g[1] = PetscScalar(42.0)\n        x_g[5] = PetscScalar(99.0)\n        \n        x_l = PETSc.DMLocalVec(dm_2D_ghost)\n        PETSc.dm_global_to_local!(x_g, x_l, dm_2D_ghost)\n        \n        # Get array with correct (m,n,q) layout\n        local_array = LibPETSc.DMStagVecGetArray(petsclib, dm_2D_ghost, x_l)\n        q = LibPETSc.DMStagGetEntriesPerElement(petsclib, dm_2D_ghost)\n        xs, ys, zs, m, n, p = LibPETSc.DMStagGetGhostCorners(petsclib, dm_2D_ghost)\n        \n        @test size(local_array) == (m, n, q)\n        \n        # Verify layout matches permuted reshape\n        expected_2D = PermutedDimsArray(reshape(x_l[:], (q, m, n)), (2, 3, 1))\n        @test OffsetArrays.no_offset_view(local_array) == expected_2D\n        @test !any(isnan, local_array)  # No NaN in ghost regions\n        \n        # Test modification through view\n        local_array[1, 1, 1] = PetscScalar(777.0)\n        @test x_l[1 + (2-1)*q + (2-1)*q*m] == PetscScalar(777.0)\n        \n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_2D_ghost, x_l, local_array)\n        PETSc.destroy(x_l)\n        PETSc.destroy(x_g)\n        PETSc.destroy(dm_2D_ghost)\n        \n        # Test 2D with no ghost boundaries\n        dm_2D_noghost = PETSc.DMStag(petsclib, comm,\n                                     (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n                                     (5, 6), (1, 1, 1), 1, PETSc.DMSTAG_STENCIL_BOX)\n        x_l_2D = PETSc.DMLocalVec(dm_2D_noghost)\n        x_l_2D .= 1:length(x_l_2D)\n        \n        X_2D = LibPETSc.DMStagVecGetArray(petsclib, dm_2D_noghost, x_l_2D)\n        q2 = LibPETSc.DMStagGetEntriesPerElement(petsclib, dm_2D_noghost)\n        xs2, ys2, zs2, m2, n2, p2 = LibPETSc.DMStagGetGhostCorners(petsclib, dm_2D_noghost)\n        \n        @test size(X_2D) == (m2, n2, q2)\n        expected_2D_noghost = PermutedDimsArray(reshape(x_l_2D[:], (q2, m2, n2)), (2, 3, 1))\n        @test X_2D == expected_2D_noghost\n        \n        # Test that modifications work\n        X_2D[end, end, end] = PetscScalar(888.0)\n        @test x_l_2D[end] == PetscScalar(888.0)\n        \n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_2D_noghost, x_l_2D, X_2D)\n        PETSc.destroy(x_l_2D)\n        PETSc.destroy(dm_2D_noghost)\n        \n        PETSc.finalize(petsclib)\n    end\n    \n    @testset \"DMStagVecGetArrayRead/RestoreArrayRead\" begin\n        # Test that DMStagVecGetArrayRead returns the same array structure as DMStagVecGetArray\n        # but in read-only mode\n        petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        \n        PetscScalar = PETSc.scalartype(petsclib)\n        \n        # Test 1D - no ghost boundaries\n        nx = 5\n        dm_1D = PETSc.DMStag(petsclib, MPI.COMM_SELF,\n                         (PETSc.DM_BOUNDARY_NONE,),\n                         (nx,),\n                         (1, 1),  # dofVertex, dofElement\n                         1,\n                         PETSc.DMSTAG_STENCIL_BOX)\n        PETSc.setuniformcoordinates_stag!(dm_1D, (0.0,), (1.0,))\n        \n        x_l_1D = PETSc.DMLocalVec(dm_1D)\n        X_write_1D = LibPETSc.DMStagVecGetArray(petsclib, dm_1D, x_l_1D)\n        \n        # Populate with test data\n        slot_left_1d = PETSc.DMStagDOF_Slot(dm_1D, LibPETSc.DMSTAG_LEFT, 0)\n        slot_elem_1d = PETSc.DMStagDOF_Slot(dm_1D, LibPETSc.DMSTAG_ELEMENT, 0)\n        for i in axes(X_write_1D, 1)\n            X_write_1D[i, slot_left_1d] = PetscScalar(i * 10.0)\n            X_write_1D[i, slot_elem_1d] = PetscScalar(i * 20.0)\n        end\n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_1D, x_l_1D, X_write_1D)\n        \n        # Read back with read-only access\n        X_read_1D = LibPETSc.DMStagVecGetArrayRead(petsclib, dm_1D, x_l_1D)\n        m1, q1 = LibPETSc.DMStagGetGhostCorners(petsclib, dm_1D)[4], LibPETSc.DMStagGetEntriesPerElement(petsclib, dm_1D)\n        @test size(X_read_1D) == (m1, q1)\n        @test !any(isnan, X_read_1D)\n        for i in axes(X_read_1D, 1)\n            @test X_read_1D[i, slot_left_1d] == PetscScalar(i * 10.0)\n            @test X_read_1D[i, slot_elem_1d] == PetscScalar(i * 20.0)\n        end\n        LibPETSc.DMStagVecRestoreArrayRead(petsclib, dm_1D, x_l_1D, X_read_1D)\n        PETSc.destroy(x_l_1D)\n        PETSc.destroy(dm_1D)\n        \n        # Test 2D - with ghost boundaries\n        nx, nz = 4, 3\n        dm_2D_ghost = PETSc.DMStag(petsclib, MPI.COMM_SELF,\n                         (PETSc.DM_BOUNDARY_GHOSTED, PETSc.DM_BOUNDARY_GHOSTED),\n                         (nx, nz),\n                         (0, 1, 1),  # dofVertex, dofEdge, dofCenter\n                         1,\n                         PETSc.DMSTAG_STENCIL_BOX)\n        PETSc.setuniformcoordinates_stag!(dm_2D_ghost, (0.0, 0.0), (1.0, 1.0))\n        \n        x_l_2D_ghost = PETSc.DMLocalVec(dm_2D_ghost)\n        X_write_2D = LibPETSc.DMStagVecGetArray(petsclib, dm_2D_ghost, x_l_2D_ghost)\n        \n        slot_left = PETSc.DMStagDOF_Slot(dm_2D_ghost, LibPETSc.DMSTAG_LEFT, 0)\n        slot_down = PETSc.DMStagDOF_Slot(dm_2D_ghost, LibPETSc.DMSTAG_DOWN, 0)\n        slot_element = PETSc.DMStagDOF_Slot(dm_2D_ghost, LibPETSc.DMSTAG_ELEMENT, 0)\n        \n        for i in axes(X_write_2D, 1), j in axes(X_write_2D, 2)\n            X_write_2D[i, j, slot_left] = PetscScalar(i * 10 + j)\n            X_write_2D[i, j, slot_down] = PetscScalar(i * 100 + j)\n            X_write_2D[i, j, slot_element] = PetscScalar(i * 1000 + j)\n        end\n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_2D_ghost, x_l_2D_ghost, X_write_2D)\n        \n        X_read_2D = LibPETSc.DMStagVecGetArrayRead(petsclib, dm_2D_ghost, x_l_2D_ghost)\n        @test ndims(X_read_2D) == 3\n        @test !any(isnan, X_read_2D)\n        for i in axes(X_read_2D, 1), j in axes(X_read_2D, 2)\n            @test X_read_2D[i, j, slot_left] == PetscScalar(i * 10 + j)\n            @test X_read_2D[i, j, slot_down] == PetscScalar(i * 100 + j)\n            @test X_read_2D[i, j, slot_element] == PetscScalar(i * 1000 + j)\n        end\n        LibPETSc.DMStagVecRestoreArrayRead(petsclib, dm_2D_ghost, x_l_2D_ghost, X_read_2D)\n        PETSc.destroy(x_l_2D_ghost)\n        PETSc.destroy(dm_2D_ghost)\n        \n        # Test 2D - no ghost boundaries\n        nx2, nz2 = 3, 4\n        dm_2D_noghost = PETSc.DMStag(petsclib, MPI.COMM_SELF,\n                         (PETSc.DM_BOUNDARY_NONE, PETSc.DM_BOUNDARY_NONE),\n                         (nx2, nz2),\n                         (0, 1, 1),\n                         1,\n                         PETSc.DMSTAG_STENCIL_BOX)\n        PETSc.setuniformcoordinates_stag!(dm_2D_noghost, (0.0, 0.0), (2.0, 1.0))\n        \n        x_l_2D_noghost = PETSc.DMLocalVec(dm_2D_noghost)\n        X_write_noghost = LibPETSc.DMStagVecGetArray(petsclib, dm_2D_noghost, x_l_2D_noghost)\n        \n        slot_left_ng = PETSc.DMStagDOF_Slot(dm_2D_noghost, LibPETSc.DMSTAG_LEFT, 0)\n        slot_element_ng = PETSc.DMStagDOF_Slot(dm_2D_noghost, LibPETSc.DMSTAG_ELEMENT, 0)\n        \n        for i in axes(X_write_noghost, 1), j in axes(X_write_noghost, 2)\n            X_write_noghost[i, j, slot_left_ng] = PetscScalar(i + j * 0.1)\n            X_write_noghost[i, j, slot_element_ng] = PetscScalar(i * j)\n        end\n        LibPETSc.DMStagVecRestoreArray(petsclib, dm_2D_noghost, x_l_2D_noghost, X_write_noghost)\n        \n        X_read_noghost = LibPETSc.DMStagVecGetArrayRead(petsclib, dm_2D_noghost, x_l_2D_noghost)\n        @test !any(isnan, X_read_noghost)\n        for i in axes(X_read_noghost, 1), j in axes(X_read_noghost, 2)\n            @test X_read_noghost[i, j, slot_left_ng] ≈ PetscScalar(i + j * 0.1)\n            @test X_read_noghost[i, j, slot_element_ng] ≈ PetscScalar(i * j)\n        end\n        LibPETSc.DMStagVecRestoreArrayRead(petsclib, dm_2D_noghost, x_l_2D_noghost, X_read_noghost)\n        PETSc.destroy(x_l_2D_noghost)\n        PETSc.destroy(dm_2D_noghost)\n        \n        PETSc.finalize(petsclib)\n    end\nend"
  },
  {
    "path": "test/test_snes.jl",
    "content": "using Test\nusing PETSc, MPI, LinearAlgebra, SparseArrays\n\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n\n@testset \"test_snes\" begin\n\n  comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_WORLD\n  mpirank = MPI.Comm_rank(comm)\n  mpisize = MPI.Comm_size(comm)\n\n   # structure with which we can pass data to the user-routines above\n   mutable struct Data\n    vec\n    julia\n  end\n\n  for petsclib in PETSc.petsclibs\n      #petsclib = PETSc.petsclibs[1]\n      PETSc.initialize(petsclib)\n      PetscScalar = PETSc.scalartype(petsclib)\n      PetscInt    = PETSc.inttype(petsclib)\n\n      # This shows some examples of how SNES can be used. \n      # Note that you will receive pointers to PETSc vectors within your user routines.\n      #       That is important for parallel simulations, where global residual\n      #       and solution vectors are passed to the user-routines, but we work with\n      #       local vectors\n\n      function fn!(fx, snes, x, user_ctx)\n        fx[1] = x[1]^2 + x[1] * x[2] - 3\n        fx[2] = x[1] * x[2] + x[2]^2 - 6\n        \n        return PetscInt(0) # success code of PETSc\n      end\n\n\n      function update_jac!(J1, snes, x, user_ctx)\n        J1[1,1] = 2x[1] + x[2]\n        J1[1,2] = x[1]\n        J1[2,1] = x[2]\n        J1[2,2] = x[1] + 2x[2]\n        PETSc.assemble!(J1)\n        return PetscInt(0)\n      end\n\n     \n\n      julia_vec = 0;  # we want pointers to local vectors \n\n      # NOTE: for some reason, snes_monitor and ksp_monitor is not working if we specify that here.\n      # To be sorted out why that is (converged_reason does work)\n      S = PETSc.SNES(petsclib,comm;  \n                      ksp_rtol=1e-4, \n                      pc_type=\"none\", \n                      ksp_monitor=false, \n                      snes_monitor=false, \n                      snes_converged_reason=false, \n                      ksp_converged_reason=false)\n\n      data        = Data(PetscScalar.([100;2]), 1)\n      S.user_ctx  = data;      # we can pack anything we need in this struct\n\n      #PJ = PETSc.MatSeqDense(zeros(PetscScalar,(2,2)))\n      PJ = LibPETSc.MatCreateSeqDense(petsclib,comm, PetscInt(2), PetscInt(2), zeros(PetscScalar,4))\n\n      r = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), zeros(PetscScalar, 2))\n      PETSc.setfunction!(S, fn!, r)\n      PETSc.setjacobian!(S, update_jac!, PJ, PJ)\n \n      x = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([2, 3]))\n      b = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(2), PetscScalar.([0, 0]))\n      PETSc.solve!(x, S, b)\n\n      #sol = PETSc.unsafe_localarray(PetscScalar, x.ptr)\n      sol = x[:]\n      @test sol ≈ [1.0,2.0] rtol=1e-4\n\n      # cleanup - destroy SNES first, then the vectors/matrices it references\n      PETSc.destroy(S);\n      PETSc.destroy(x);\n      PETSc.destroy(b);\n      PETSc.destroy(r);\n      PETSc.destroy(PJ);\n\n      PETSc.finalize(petsclib)\n      GC.gc()  # Force garbage collection to clean up any remaining objects\n    end\nend\n"
  },
  {
    "path": "test/testutils.jl",
    "content": "module PETScTestUtils\n\nexport find_sources\n\nfunction find_sources(path::String, sources = String[])\n    if isdir(path)\n        for entry in readdir(path)\n            find_sources(joinpath(path, entry), sources)\n        end\n    elseif endswith(path, \".jl\")\n        push!(sources, path)\n    end\n    return sources\nend\n\nend # module PETScTestUtils\n"
  },
  {
    "path": "test/ts_ex16.jl",
    "content": "using Test\nusing PETSc\n\ninclude(joinpath(dirname(@__DIR__), \"examples\", \"ex16.jl\"))\n\nfunction capture_stdout_to_string(f::Function)\n    path, io = mktemp()\n    close(io)\n    try\n        open(path, \"w\") do out\n            redirect_stdout(out) do\n                f()\n            end\n        end\n        return read(path, String)\n    finally\n        isfile(path) && rm(path)\n    end\nend\n\n@testset \"TS ex16 example\" begin\n    petsclib = PETSc.getlib(PetscScalar = Float64)\n    PETSc.initialize(petsclib)\n    try\n        function solve_arkimex(method::String)\n            solve_ex16(;\n                petsclib,\n                options = [\n                    \"-ts_type\",\n                    \"arkimex\",\n                    \"-ts_arkimex_type\",\n                    method,\n                    \"-ts_adapt_type\",\n                    \"none\",\n                ],\n                verbose = false,\n            )\n        end\n\n        result_default_1 = solve_ex16(;\n            petsclib,\n            options = String[],\n            verbose = false,\n        )\n        result_default_2 = solve_ex16(;\n            petsclib,\n            options = String[],\n            verbose = false,\n        )\n        result_no_imex = solve_ex16(;\n            petsclib,\n            imex = false,\n            options = String[],\n            verbose = false,\n        )\n        result_mu_100 = solve_ex16(;\n            petsclib,\n            mu = 100.0,\n            options = String[],\n            verbose = false,\n        )\n        result_myark2 = solve_arkimex(\"myark2\")\n        extra_arkimex_results = Dict(\n            \"ars122\" => solve_arkimex(\"ars122\"),\n            \"ars443\" => solve_arkimex(\"ars443\"),\n            \"3\" => solve_arkimex(\"3\"),\n            \"4\" => solve_arkimex(\"4\"),\n            \"5\" => solve_arkimex(\"5\"),\n        )\n        monitor_output = capture_stdout_to_string() do\n            solve_ex16(;\n                petsclib,\n                monitor = true,\n                options = String[],\n                verbose = false,\n            )\n        end\n\n        @test result_default_1.final_time ≈ 0.5 atol = 100 * eps(Float64)\n        @test result_default_1.steps > 0\n        @test length(result_default_1.solution) == 2\n        @test all(isfinite, result_default_1.solution)\n\n        @test result_default_2.final_time ≈ 0.5 atol = 100 * eps(Float64)\n        @test result_default_2.steps == result_default_1.steps\n        @test result_default_2.solution ≈ result_default_1.solution rtol = 1e-12\n\n        @test result_no_imex.final_time ≈ 0.5 atol = 100 * eps(Float64)\n        @test result_no_imex.steps > 0\n        @test !result_no_imex.imex\n        @test length(result_no_imex.solution) == 2\n        @test all(isfinite, result_no_imex.solution)\n\n        @test result_mu_100.final_time ≈ 0.5 atol = 100 * eps(Float64)\n        @test result_mu_100.steps > 0\n        @test result_mu_100.mu ≈ 100.0\n        @test length(result_mu_100.solution) == 2\n\n        @test result_myark2.final_time ≈ 0.5 atol = 100 * eps(Float64)\n        @test result_myark2.steps > 0\n        @test length(result_myark2.solution) == 2\n        @test all(isfinite, result_myark2.solution)\n\n        for (method, result) in extra_arkimex_results\n            @testset \"ARKIMEX $method\" begin\n                @test result.final_time ≈ 0.5 atol = 100 * eps(Float64)\n                @test result.steps > 0\n                @test length(result.solution) == 2\n                @test all(isfinite, result.solution)\n            end\n        end\n\n        @test occursin(\"[0.0]\", monitor_output)\n        @test occursin(\"[0.5]\", monitor_output)\n        @test length(split(chomp(monitor_output), \"\\n\")) >= 6\n    finally\n        if PETSc.initialized(petsclib) && !PETSc.finalized(petsclib)\n            PETSc.finalize(petsclib)\n        end\n    end\nend\n"
  },
  {
    "path": "test/ts_ex51.jl",
    "content": "using Test\nusing PETSc\n\ninclude(joinpath(dirname(@__DIR__), \"examples\", \"ex51.jl\"))\n\n@testset \"TS ex51 example\" begin\n    petsclib = PETSc.getlib(PetscScalar = Float64)\n    PETSc.initialize(petsclib)\n    try\n        # `examples.jl` covers the default `save_trajectory = true` path in a\n        # fresh Julia subprocess. Here we disable trajectory saving because\n        # PETSc 3.22 does not reliably re-register the built-in `basic`\n        # trajectory type after earlier TS usage and reinitialization in the\n        # same process.\n        result_default_1 = solve_ex51(;\n            petsclib,\n            options = String[],\n            save_trajectory = false,\n            verbose = false,\n        )\n        result_3bs = solve_ex51(;\n            petsclib,\n            options = [\"-ts_type\", \"rk\", \"-ts_rk_type\", \"3bs\"],\n            save_trajectory = false,\n            verbose = false,\n        )\n\n        result_default_2 = solve_ex51(;\n            petsclib,\n            options = String[],\n            save_trajectory = false,\n            verbose = false,\n        )\n        result_5dp = solve_ex51(;\n            petsclib,\n            options = [\"-ts_type\", \"rk\", \"-ts_rk_type\", \"5dp\"],\n            save_trajectory = false,\n            verbose = false,\n        )\n\n        @test result_default_1.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_default_1.solution) == 2\n        @test result_default_1.error < 5.0e-4\n\n        @test result_3bs.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_3bs.solution) == 2\n        @test result_3bs.error < 5.0e-5\n\n        @test result_default_2.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_default_2.solution) == 2\n        @test result_default_2.error ≈ result_default_1.error rtol = 1e-12\n\n        @test result_5dp.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_5dp.solution) == 2\n        @test result_5dp.error < 5.0e-8\n    finally\n        if PETSc.initialized(petsclib) && !PETSc.finalized(petsclib)\n            PETSc.finalize(petsclib)\n        end\n    end\nend\n"
  },
  {
    "path": "test/ts_ex51_implicit.jl",
    "content": "using Test\nusing PETSc\n\ninclude(joinpath(dirname(@__DIR__), \"examples\", \"ex51_implicit.jl\"))\n\n@testset \"TS ex51 implicit example\" begin\n    petsclib = PETSc.getlib(PetscScalar = Float64)\n    PETSc.initialize(petsclib)\n    try\n        result_stage_1 = solve_ex51_implicit(;\n            petsclib,\n            options = [\"-ts_type\", \"irk\", \"-ts_irk_type\", \"gauss\", \"-ts_irk_nstages\", \"1\"],\n            save_trajectory = false,\n            verbose = false,\n        )\n        result_stage_2 = solve_ex51_implicit(;\n            petsclib,\n            options = [\"-ts_type\", \"irk\", \"-ts_irk_type\", \"gauss\", \"-ts_irk_nstages\", \"2\"],\n            save_trajectory = false,\n            verbose = false,\n        )\n        result_stage_3 = solve_ex51_implicit(;\n            petsclib,\n            options = [\"-ts_type\", \"irk\", \"-ts_irk_type\", \"gauss\", \"-ts_irk_nstages\", \"3\"],\n            save_trajectory = false,\n            verbose = false,\n        )\n        result_stage_4 = solve_ex51_implicit(;\n            petsclib,\n            options = [\"-ts_type\", \"irk\", \"-ts_irk_type\", \"gauss\", \"-ts_irk_nstages\", \"4\"],\n            save_trajectory = false,\n            verbose = false,\n        )\n        result_analytic = solve_ex51_implicit(;\n            petsclib,\n            options = String[],\n            jacobian_mode = :analytic,\n            save_trajectory = false,\n            verbose = false,\n        )\n\n        @test result_stage_1.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_stage_1.solution) == 2\n        @test result_stage_1.error < 5.0e-3\n\n        @test result_stage_2.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_stage_2.solution) == 2\n        @test result_stage_2.error < 5.0e-6\n\n        @test result_stage_3.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_stage_3.solution) == 2\n        @test result_stage_3.error < 5.0e-9\n\n        @test result_stage_4.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_stage_4.solution) == 2\n        @test result_stage_4.error < 5.0e-10\n\n        @test result_analytic.final_time ≈ 1.0 atol = 100 * eps(Float64)\n        @test length(result_analytic.solution) == 2\n        @test result_analytic.error < 5.0e-5\n\n        err = try\n            solve_ex51_implicit(;\n                petsclib,\n                options = [\"-snes_mf\"],\n                save_trajectory = false,\n                verbose = false,\n            )\n            nothing\n        catch ex\n            ex\n        end\n        @test err isa ArgumentError\n        @test occursin(\"TSIRK/Gauss\", sprint(showerror, err))\n    finally\n        if PETSc.initialized(petsclib) && !PETSc.finalized(petsclib)\n            PETSc.finalize(petsclib)\n        end\n    end\nend\n"
  },
  {
    "path": "test/vec.jl",
    "content": "using Test\nusing PETSc, MPI\nusing LinearAlgebra: norm\n\n# Windows PETSc binaries are built without MPI support, skip MPI initialization\nif !Sys.iswindows()\n    MPI.Initialized() || MPI.Init()\nend\n# Windows PETSc binaries are built without MPI support, use PETSC_COMM_SELF\ncomm = LibPETSc.PETSC_COMM_SELF\n# Intel Mac has sporadic issues with complex numbers\nisintelmac = Sys.isapple() && Sys.ARCH == :x86_64\n\n@testset \"VecBasics\" begin\n    for petsclib in PETSc.petsclibs\n        #petsclib        = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar     = petsclib.PetscScalar\n        PetscInt        = petsclib.PetscInt\n        N               = PetscInt(10)\n        v1 =  LibPETSc.VecCreateSeq(petsclib,comm, N)\n        v2 =  LibPETSc.VecCreateMPI(petsclib,comm, PetscInt(LibPETSc.PETSC_DECIDE), N)\n\n        LibPETSc.VecZeroEntries(petsclib,v1)\n\n        indices = PetscInt.([0, 1, 2, 8])  # Note that PETSc uses 0-based indexing\n        values  = PetscScalar.([1.0, 2.0, 3.0, 4.0])\n        LibPETSc.VecSetValues(petsclib, v1, PetscInt(4), indices, values, LibPETSc.INSERT_VALUES)\n        LibPETSc.VecAssemblyBegin(petsclib,v1)\n        LibPETSc.VecAssemblyEnd(petsclib,v1)\n\n        x = LibPETSc.VecGetArray(petsclib,v1)\n        @test x[9] == 4.0\n\n        x1 = rand(PetscScalar,10)\n        bs = PetscInt(1)\n        \n        # Use GC.@preserve to ensure x1 stays alive while PETSc is using it\n        # VecCreateSeqWithArray wraps the Julia array, so the array must not be moved/collected\n        GC.@preserve x1 begin\n            v3 = LibPETSc.VecCreateSeqWithArray(petsclib,comm, bs, PetscInt(length(x1)), x1)\n\n            # Check get/restore array\n            x3 = LibPETSc.VecGetArray(petsclib,v3)\n            x3[10] = PetscScalar(42.0)\n            LibPETSc.VecRestoreArray(petsclib,v3, x3)\n            \n            # After restore, x1 contains the modified data (v3 wraps x1)\n            expected_sum = sum(x1)\n\n            # get values from PETSc vector (note 0-based indexing)\n            indices = PetscInt.([8,9]) # in 0-based indexing! \n            vals = zeros(PetscScalar, length(indices))\n            vals =LibPETSc.VecGetValues(petsclib,v3,PetscInt(length(indices)), indices)\n            expected_vals = [x1[9], PetscScalar(42.0)]  # Use original array x1, with modified last value\n            @test vals == expected_vals\n\n            # create a duplicate vector \n            v4 = LibPETSc.VecDuplicate(petsclib,v3)\n\n            # copy content (note that this function is not correctly parsed automatically)\n            LibPETSc.VecCopy(petsclib,v3, v4)\n            \n            # Verify the sum using the underlying array x1 which should have the data\n            @test LibPETSc.VecSum(petsclib,v3) ≈ expected_sum rtol=1e-10\n            @test LibPETSc.VecSum(petsclib,v4) ≈ expected_sum rtol=1e-10\n            \n            PETSc.destroy(v3)\n            PETSc.destroy(v4)\n        end\n\n        # Julia candy:\n        v5      =   LibPETSc.VecCreateSeq(petsclib,comm, N)\n        \n        v5[1]   =   PetscScalar(3.14)\n        v5[2:3] =   PetscScalar.([2.71, 1.61])\n        @test v5[1:4] == PetscScalar.([ 3.14, 2.71,1.61,0.0])\n\n        fill!(v5, PetscScalar(1.11))\n        @test v5[1] == PetscScalar(1.11)\n\n        PETSc.destroy(v1)\n        PETSc.destroy(v2)\n        PETSc.destroy(v5)\n        PETSc.finalize(petsclib)\n    end\nend\n\n\n@testset \"VecCreateSeqWithArray\" begin\n    N = 10\n    for petsclib in PETSc.petsclibs[1:2]\n        #petsclib = PETSc.petsclibs[5]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt    = petsclib.PetscInt\n        \n        # Skip on Intel Mac due to sporadic failures\n        if isintelmac && PetscScalar <: Complex\n            @test_skip true\n            continue\n        end\n        \n        x           = rand(PetscScalar, N)\n        \n        # Use GC.@preserve to ensure x stays alive while PETSc is using it\n        GC.@preserve x begin\n            petsc_x     = LibPETSc.VecCreateSeqWithArray(petsclib,comm, PetscInt(1), PetscInt(length(x)), x)\n\n            @test LibPETSc.VecGetSize(petsclib, petsc_x) == N\n            val = LibPETSc.VecNorm(petsclib,petsc_x, PETSc.NORM_2)\n            @test val ≈ norm(x)\n\n            # make sure the viewer works\n            #=\n            _stdout = stdout\n            (rd, wr) = redirect_stdout()\n            @show petsc_x\n            @test readline(rd) == \"petsc_x = Vec Object: 1 MPI process\"\n            @test readline(rd) == \"  type: seq\"\n            redirect_stdout(_stdout)\n\n            _stdout = stdout\n            (rd, wr) = redirect_stdout()\n            show(stdout, \"text/plain\", petsc_x)\n            @test readline(rd) == \"Vec Object: 1 MPI process\"\n            @test readline(rd) == \"  type: seq\"\n            redirect_stdout(_stdout)\n            =#\n            \n            @test LibPETSc.VecGetOwnershipRange(petsclib,petsc_x) == (0, N)\n            \n            x2 = LibPETSc.VecGetArray(petsclib,petsc_x)\n            @test x2 == x\n            \n            PETSc.destroy(petsc_x)\n        end\n        \n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"VecSeq\" begin\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt    = petsclib.PetscInt\n        N           = PetscInt(10)\n        # Windows PETSc binaries are built without MPI support\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n        petsc_x = LibPETSc.VecCreateSeq(petsclib, test_comm, N)\n        @test LibPETSc.VecGetSize(petsclib, petsc_x) == N\n\n        @test LibPETSc.VecGetOwnershipRange(petsclib,petsc_x) == (0, N)\n\n        x = rand(PetscScalar, N)\n        x2 = LibPETSc.VecGetArray(petsclib,petsc_x)\n        x2 .= x\n        LibPETSc.VecRestoreArray(petsclib,petsc_x, x2)\n        @test LibPETSc.VecNorm(petsclib, petsc_x, PETSc.NORM_2) ≈ norm(x)\n    \n        @test LibPETSc.VecGetType(petsclib, petsc_x) == \"seq\"\n\n        PETSc.destroy(petsc_x)\n        PETSc.finalize(petsclib)\n    end\nend\n\n@testset \"VecSeq constructor with array\" begin\n    for petsclib in PETSc.petsclibs\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt = petsclib.PetscInt\n        \n        # Test with simple array\n        x = ones(PetscScalar, 3)\n        # Use GC.@preserve since VecSeq wraps the Julia array\n        GC.@preserve x begin\n            v = PETSc.VecSeq(petsclib, x)\n            \n            # Verify the vector was created successfully\n            @test v !== nothing\n            @test v.ptr != C_NULL\n            @test LibPETSc.VecGetSize(petsclib, v) == 3\n            \n            # Verify values\n            @test v[1:3] == ones(PetscScalar, 3)\n            @test LibPETSc.VecSum(petsclib, v) == PetscScalar(3.0)\n            \n            # Test that modifications to the vector affect the underlying array\n            # (since VecSeq uses VecCreateSeqWithArray)\n            v[1] = PetscScalar(42.0)\n            @test x[1] == PetscScalar(42.0)\n            \n            PETSc.destroy(v)\n        end\n        \n        # Test with different array values\n        if PetscScalar <: Real\n            x2 = PetscScalar.([1.0, 2.0, 3.0, 4.0, 5.0])\n        else\n            x2 = PetscScalar.([1.0, 2.0+im, 3.0, 4.0-im, 5.0])\n        end\n        GC.@preserve x2 begin\n            v2 = PETSc.VecSeq(petsclib, x2)\n            \n            @test LibPETSc.VecGetSize(petsclib, v2) == 5\n            @test v2[1:5] == x2\n            @test LibPETSc.VecNorm(petsclib, v2, PETSc.NORM_2) ≈ norm(x2)\n            \n            PETSc.destroy(v2)\n        end\n        \n        # Test with blocksize parameter\n        x3 = PetscScalar.([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])\n        GC.@preserve x3 begin\n            v3 = PETSc.VecSeq(petsclib, x3; blocksize=2)\n            @test LibPETSc.VecGetSize(petsclib, v3) == 6\n            @test LibPETSc.VecGetBlockSize(petsclib, v3) == 2\n            \n            PETSc.destroy(v3)\n        end\n        \n        PETSc.finalize(petsclib)\n    end\nend\n\n\n@testset \"withlocalarray!\" begin\n    for petsclib in PETSc.petsclibs\n        #petsclib = PETSc.petsclibs[1]\n        PETSc.initialize(petsclib)\n        PetscScalar = petsclib.PetscScalar\n        PetscInt    = petsclib.PetscInt\n        N           = PetscInt(10)\n        # Windows PETSc binaries are built without MPI support\n        test_comm = Sys.iswindows() ? LibPETSc.PETSC_COMM_SELF : MPI.COMM_SELF\n        petsc_x     = LibPETSc.VecCreateSeq(petsclib, test_comm, N)\n        petsc_y     = LibPETSc.VecCreateSeq(petsclib, test_comm, N)\n\n        # extract one array, write\n        PETSc.withlocalarray!(\n            petsc_x;\n            read = false, write = true,\n        ) do x\n            @test all(x .== 0)\n            for i in eachindex(x)\n                x[i] = PetscScalar(i)\n            end\n        end\n        @test petsc_x[1:N] == PetscScalar.(1:N)\n        \n        # with tuple as input\n        PETSc.withlocalarray!(\n            (petsc_x, );\n            read = (false,), write = (true,),\n        ) do x\n            for i in eachindex(x)\n                x[i] = PetscScalar(i)\n            end\n        end\n        @test petsc_x[1:N] == PetscScalar.(1:N)\n\n        # with 2-variable tuple as input\n        PETSc.withlocalarray!(\n            (petsc_x, petsc_y);\n            read = (false,false), write = (true,true),\n        ) do x, y\n            for i in eachindex(x)\n                x[i] = PetscScalar(i)\n                y[i] = PetscScalar(2i)\n            end\n        end\n        @test petsc_x[1:N] == PetscScalar.(1:N)\n        @test petsc_y[1:N] == PetscScalar.(2:2:2N)\n\n        # with 2-variable tuple as input\n        PETSc.withlocalarray!(\n            petsc_x, petsc_y;\n            read = (false,false), write = (true,true),\n        ) do x, y\n            for i in eachindex(x)\n                x[i] = PetscScalar(i)\n                y[i] = PetscScalar(2i)\n            end\n        end\n        @test petsc_x[1:N] == PetscScalar.(1:N)\n        @test petsc_y[1:N] == PetscScalar.(2:2:2N)\n\n\n        PETSc.destroy(petsc_x)\n        PETSc.destroy(petsc_y)\n\n        PETSc.finalize(petsclib)\n    end\nend"
  },
  {
    "path": "wrapping/Project.toml",
    "content": "[deps]\nPythonCall = \"6099a3de-0909-46bc-b1f4-468b9a2dfc0d\"\n"
  },
  {
    "path": "wrapping/currently_wrapped_classes.md",
    "content": "# already wrapped:\n- Vec\n- Vecs\n- Mat\n- KSP\n- PC\n- SNES\n- DM\n- PetscOptions\n- PetscDraw,PetscDrawAxis,PetscDrawLG,PetscDrawSP,PetscDrawHG,PetscDrawBar\n- PetscRegressor\n- PF\n- IS\n- TS\n- AO\n- Tao\n- DMAdaptor,DMSwarmDataField,DMSwarmDataBucket,DMSwarmSort,DMSwarmCellDM,DMInterpolationInfo,DMPlexStorageVersion,DMPlexPointQueue,DMField,DMUniversalLabel,DMGeneratorFunctionList,DMPlexTransform,DMNetworkMonitorList,DMNetworkMonitor,DMLabel\n- VecTagger\n- PetscDS\n- MatColoring,MatFDColoring,MatTransposeColoring,MatPartitioning,MatNullSpace,MatMFFD,MatCoarsen\n- ISLocalToGlobalMapping,ISColoring\n- SNESLineSearch\n- PetscBag, PetscBagItem\n- KSPGuess\n- PetscKDTree\n- PetscGridHash\n- PetscSection, PetscSectionSym\n- TSTrajectory,TSMonitorDrawCtx,TSMonitorSolutionCtx,TSMonitorVTKCtx,TSMonitorLGCtx,TSMonitorLGCtxNetwork,TSMonitorEnvelopeCtx,TSMonitorSPEigCtx,TSMonitorSPCtx,TSMonitorHGCtx,TSAdapt,TSGLLEAdapt\n- PetscSpace\n- PetscDevice,PetscDeviceContext\n- PetscLayout\n- PetscMatlabEngine\n- PetscPartitioner\n- PetscConvEst\n- PetscFE,PetscQuadrature,PetscTabulation,PetscWeakForm\n- PetscBench\n- PetscToken\n- PetscObject, PetscObjectList\n- PetscFunctionList\n- PetscDLLibrary\n- PetscContainer\n- PetscRandom\n- PetscSubcomm, PetscShmComm\n- PetscOmpCtrl\n- PetscHeap\n- PetscSegBuffer\n- PetscLimiter\n- PetscFV\n- TaoMonitorDrawCtx, TaoLineSearch\n- PetscViewer, PetscViewers\n- Characteristic\n- PetscSF, PetscSFLink\n- PetscDualSpace\n- PetscOptionsHelpPrinted, PetscOptionItem, PetscOptionItems\n- PetscIntStack\n- PetscLogHandler,PetscLogRegistry,PetscLogState\n\n# to be done\n \n\n"
  },
  {
    "path": "wrapping/find_doc_strings.jl",
    "content": "# this contains functions that search the PETSc source directory for function definitions\n# and return the corresponding docstrings.\n#\n# We use that in the julia wrapper interface to:\n#   1) determine which are input and which are output parameters of a function\n#   2) extract the docstring for each function parameter, to generate a nicely formatted julia one\n\n\"\"\"\n    get_all_c_files(path::String)\n\nReturns a vector of all *.c files found recursively in the given path.\n\"\"\"\nfunction get_all_c_files(petsc_dir::String)\n    path = petsc_dir*\"/src\"\n    c_files = String[]\n    for (root, dirs, files) in walkdir(path)\n        for file in files\n            if endswith(file, \".c\")\n                push!(c_files, joinpath(root, file))\n            end\n        end\n    end\n    \n    return c_files\nend\n\n\nfunction filter_files(files::Vector{String})\n    ind = contains.(files,\"benchmarks\") .== false\n    files = files[ind]\n    ind = contains.(files,\"tutorials\") .== false\n    files = files[ind]\n    ind = contains.(files,\"tests\") .== false\n    files = files[ind]\n    ind = contains.(files,\"petsc4py\") .== false\n    files = files[ind]\n    return files\nend\n\n\"\"\"\n    find_c_file(petsc_dir::String, fct_name::String)\n\nFind the files in which the C function `fct_name` may be defined within the PETSc source directory `petsc_dir`. \n\"\"\"\nfunction find_c_file(petsc_dir::String, fct_name::String)\n    \n    files = get_all_c_files(petsc_dir)\n    files = filter_files(files)\n\n    #line_string = \"\"\n\n    file_str = String[]\n    #comment_block=\"\"\n    # Scan all files in the directory; find the line\n    for file in files\n        isfile = open(file, \"r\") do io\n            contains(read(io, String), \"PetscErrorCode $(fct_name)(\")\n        end\n        \n        if isfile\n            push!(file_str, file)\n            #line_string = read_c_function_args(file, fct_name)\n            #comment_block = read_c_function_docs(file, fct_name)\n        end\n    end\n    \n    return file_str #line_string, comment_block, \nend\n\n# Finds the function in the correct PETSc c-file\nfunction read_c_function_args(file::String, fct_name)\n    line_string = \"\"\n    open(file, \"r\") do f\n        # read till end of file\n        while ! eof(f)  \n            line = readline(f)\n            if contains(line, \"PetscErrorCode $fct_name(\")\n                line_string = line\n            end\n        end\n    end\n    return line_string\nend\n\n\nfunction  read_c_function_docs(files::Vector{String}, fct_name)\n    for f in files\n        comment_block = read_c_function_docs(f, fct_name)\n        if length(comment_block)>0\n            return comment_block\n        end\n    end\nend\n\nfunction read_c_function_docs(file::String, fct_name)\n\n    comment_block =  [\"\"]\n    open(file, \"r\") do f\n        \n        # read till end of file\n        while ! eof(f)  \n            line = readline(f)\n            if contains(strip(line),\"/*@\")# start of comment block\n                read_block = false\n                line = readline(f)\n                \n                if !isempty(line)\n                    if split(strip(line))[1] == fct_name\n                        read_block = true\n                    end\n                end\n              \n                while ! contains(line, \"@*/\") & read_block\n                    line = strip(line)  # remove white space at beginning\n                    if !isempty(line)\n                        if startswith(line,\".\") || startswith(line,\"+\")\n                            line = \"-\"*line[2:end]\n                        end\n                    end\n                 \n                    # add backticks to input/output parameters\n                    line = strip(line)\n                    if startswith(line,'-')\n                        if length(findall('-',line))>1\n                            #  there are 2 dashes in lists with parameters\n                            line = add_backticks(line)\n                        end\n                    end\n\n                    push!(comment_block, line )\n\n                    line = readline(f)\n                end\n            end\n        end\n    end\n\n    comment_block = comment_block[2:end]\n    if length(comment_block)>0\n        comment_block[1] = strip(comment_block[1])\n        comment_block[1] = strip(split(comment_block[1],\"-\")[2])\n    end\n    comment_block = replace.(comment_block, \"\\$\" => \"\")\n    comment_block = replace.(comment_block, \"[](ch_stag),\" => \"\")\n    comment_block = replace.(comment_block, \"[](ch_dmbase),\" => \"\")\n    comment_block = replace.(comment_block, \"-seealso:  \" => \"See also: \\n=== \\n\")\n    comment_block = replace.(comment_block, \"seealso:  \" => \"See also: \\n=== \\n\")\n    \n\n    return comment_block\nend\n\nfunction add_backticks(line::AbstractString)\n    line_split = split(strip(line), \"- \")\n    if length(line_split)>1\n        var_name = line_split[2]\n        \n        n = length(var_name)\n        \n        line_split[2] = rpad(\"`\"*strip(var_name)*\"`\",n+2)\n        \n        line_new = join(line_split.*\"- \")[1:end-2]\n    else\n        line_new = line\n    end\n    return  line_new\nend\n\n\nfunction get_docs_from_function(petscdir, fct_name)\n    files = find_c_file(petscdir, fct_name)\n    comment_block = read_c_function_docs(files, fct_name)\n    return comment_block\nend\n\n\nfunction get_last_line(input_line_start, comment; last_str=\"\")\n    for l in input_line_start:length(comment)\n        if isempty(strip(comment[l]))\n            input_line_end = l-1\n            return input_line_end\n        end\n    end\nend\n\nfunction get_last_line_keyword(comment, keyword=\"\")\n    l = findfirst(contains.(comment, keyword))\n    if !isnothing(l)\n        return l-1\n    end\nend\n\nfunction extract_variable_from_string(str::String)\n    if  contains(str,'`')\n        var_name = split(str, '`')[2]\n        return var_name\n    else\n        warning(\"problem with line $str; no variable found\")\n    end\nend\n\nfunction extract_variable_from_string(str::String)\n    if  contains(str,'-')\n        parts = split(str, '-')\n        if length(parts) < 2\n            return \"\"\n        end\n        var_part = strip(parts[2])\n        var_part = replace(var_part, \"`\" => \"\")\n        var_name = split(var_part, ' ')[1]\n        return var_name\n    else\n        return \"\"\n    end\nend\n\n\nfunction extract_input_output_vars(comment::Vector{String})\n    hasinput  = any(startswith.(comment,\"Input Parameter\"))\n    hasoutput = any(startswith.(comment,\"Output Parameter\"))\n    \n    input_vars  = String[]\n    output_vars = String[]\n\n    if hasinput\n        input_line_start  = first(findall(startswith.(strip.(comment),\"Input Parameter\")))+1\n        input_line_end    = get_last_line(input_line_start, comment)\n        \n        for l = input_line_start:input_line_end\n            var_name = extract_variable_from_string(comment[l])\n            if !isempty(var_name)\n                push!(input_vars, var_name)\n            end\n        end\n    end\n\n    if hasoutput\n        output_line_start = first(findall(startswith.(strip.(comment),\"Output Parameter\")))+1\n        output_line_end   = get_last_line(output_line_start, comment)\n\n        for l = output_line_start:output_line_end\n            var_name = extract_variable_from_string(comment[l])\n            if !isempty(var_name)\n                push!(output_vars, var_name)\n            end\n        end\n    end\n\n    return input_vars, output_vars\nend\n\n\"\"\"\n     input_vars, output_vars = extract_input_output_function(petsc_dir, fct_name)\nThis retrieves the input and output variables for a given function `fct_name` in the PETSc source directory `petsc_dir`.\n\"\"\"\nfunction extract_input_output_function(petsc_dir, fct_name)\n    comment_block = get_docs_from_function(petsc_dir, fct_name)\n    if isnothing(comment_block)\n        input_vars, output_vars = String[], String[]\n    else\n        input_vars, output_vars = extract_input_output_vars(comment_block)\n    end\n    comment_block = remove_notes_from_comment(comment_block)\n    return input_vars, output_vars, comment_block\nend\n\n# sometimes, PETSc docstrings contains math or other stuff in notes.\n# this messes up the julia docstrings, so we remove them here\nfunction remove_notes_from_comment(comment::Vector{String})\n    comment = remove_notes_from_comment(comment, \"Note:\")\n    comment = remove_notes_from_comment(comment, \"Notes:\")\n    comment = remove_notes_from_comment(comment, \"Developer Note:\")\n    comment = remove_notes_from_comment(comment, \"Fortran Notes:\")\n    comment = remove_notes_from_comment(comment, \"Example Usage:\")\n    comment = remove_notes_from_comment(comment, \"-vb\")\n    comment = remove_notes_from_comment(comment, \"Example Usage\\\\:\")\n    comment = remove_weird_signs_from_comment(comment)  # remove some weirdities in the PETSc docstrings that julia dislikes\n    return comment\nend\n\nfunction remove_weird_signs_from_comment(comment::Vector{String})\n    for i in eachindex(comment)\n        comment[i] = replace(comment[i], \"\\\\:\" => \":\",\"``\"=>\"`\") \n    end\n    return comment\nend\nremove_weird_signs_from_comment(comment::Nothing) = comment\n\nfunction remove_notes_from_comment(comment::Vector{String}, keyword::String)\n    note_start = findfirst(contains.(comment, keyword))\n    if !isnothing(note_start)\n        #note_end   = get_last_line(note_start, comment)\n        note_end   = get_last_line_keyword(comment,\"-seealso:\")\n        if !isnothing(note_end)\n            deleteat!(comment, note_start:note_end)\n        end\n    end\n    return comment\nend\nremove_notes_from_comment(comment::Nothing) = comment\n\n"
  },
  {
    "path": "wrapping/generatejuliabindings.jl",
    "content": "# This generates Julia bindings for the PETSc library\n#\n# It uses the getAPI.py python code.\n# We also read the documentation of each of the functions.\n#\n# It replaces the Clang.jl infrastructure and re-uses the python binding tools.\n# Should be run from petsc/config/utils/; please specify the petsc directory @ the beginning\n#\n# Note:\n#  This file was used to generate an initial version of the julia bindings for PETSc. \n#  It is not perfect and does not work fully automatically. As a result, quite a few\n#  manual changes were necessary to get the tests to work \n#  Therefore, it is not advised to rerun this again with futire versions of PETSc,\n#  because you would have to redo these manual changes again. \n#  Since typically only very few functions change between PETSc releases, you \n#  can instead generate new wrappers for these functions using the `wrap_function` function\n\nusing PythonCall\nimport Base: contains, String\n\ninclude(\"find_doc_strings.jl\")\n\nString(x::Py) =  pyconvert(String, x)\ncontains(a::Py, b::String) = occursin(b, String(a))\nisopaque(a::Py) = pyconvert(Bool,a.opaque)\n\n# directory where PETSc is installed on your system:\npetsc_dir = \"/Users/kausb/Downloads/petsc\"\nstart_dir = pwd()\n\n\"\"\"\n    get_petsc_version_from_dir(petsc_dir::AbstractString)\n\nRead the PETSc installation at `petsc_dir` and attempt to determine the\nPETSc version. First tries to parse `include/petscversion.h` for the\n`PETSC_VERSION_MAJOR/MINOR/SUBMINOR` macros. If that file is not available\nit falls back to scanning `lib/libpetsc*` with `strings` and heuristically\nextracting a version number.\n\nReturns `VersionNumber` on success or `nothing` if no version could be found.\n\"\"\"\nfunction get_petsc_version_from_dir(petsc_dir::AbstractString)\n    # 1) Prefer the include header if present\n    header = joinpath(petsc_dir, \"include\", \"petscversion.h\")\n    if isfile(header)\n        txt = read(header, String)\n        m1 = match(r\"#\\s*define\\s+PETSC_VERSION_MAJOR\\s+(\\d+)\", txt)\n        m2 = match(r\"#\\s*define\\s+PETSC_VERSION_MINOR\\s+(\\d+)\", txt)\n        m3 = match(r\"#\\s*define\\s+PETSC_VERSION_SUBMINOR\\s+(\\d+)\", txt)\n        if m1 !== nothing && m2 !== nothing\n            maj = parse(Int, m1.captures[1])\n            min = parse(Int, m2.captures[1])\n            sub = m3 !== nothing ? parse(Int, m3.captures[1]) : 0\n            return VersionNumber(maj, min, sub)\n        end\n    end\n\n    # 2) Fallback: look for libpetsc in lib/ and run strings to find a version\n    libdir = joinpath(petsc_dir, \"lib\")\n    if isdir(libdir)\n        for f in readdir(libdir)\n            if occursin(\"libpetsc\", f)\n                libpath = joinpath(libdir, f)\n                try\n                    out = read(`strings $libpath`, String)\n                catch err\n                    @warn \"failed to run strings on $libpath: $err\"\n                    continue\n                end\n\n                # try to find explicit PETSc version strings\n                m = match(r\"PETSc\\s+(?:Release\\s*)?v?ersion[:\\s]*([0-9]+\\.[0-9]+(?:\\.[0-9]+)?)\", out; ignorecase=true)\n                if m !== nothing\n                    return VersionNumber(m.captures[1])\n                end\n\n                # fallback: first semantic version-looking substring\n                m2 = match(r\"([0-9]+\\.[0-9]+\\.[0-9]+)\", out)\n                if m2 !== nothing\n                    return VersionNumber(m2.captures[1])\n                end\n            end\n        end\n    end\n\n    return nothing\nend\n\n\"\"\"\n    write_petsc_wrappers_version(petsc_dir::AbstractString; outdir::AbstractString=joinpath(start_dir, \"src\", \"autowrapped\"))\n\nDetermine the PETSc version for the installation at `petsc_dir` and write\na small Julia source file `petsc_wrappers_version.jl` into `outdir` that\ndeclares `const PETSC_WRAPPERS_VERSION = v\"x.y.z\"`.\n\nReturns the path to the written file.\n\"\"\"\nfunction write_petsc_wrappers_version(petsc_dir::AbstractString; outdir::AbstractString=joinpath(start_dir, \"src\", \"autowrapped\"))\n    ver = get_petsc_version_from_dir(petsc_dir)\n    vstr = ver === nothing ? \"0.0.0\" : string(ver)\n\n    mkpath(outdir)\n    path = joinpath(outdir, \"petsc_wrappers_version.jl\")\n    open(path, \"w\") do io\n        println(io, \"# Auto-generated by wrapping/generatejuliabindings.jl — do not edit\")\n        println(io, \"# PETSc installation: \", petsc_dir)\n        println(io, \"const PETSC_WRAPPERS_VERSION = v\\\"$vstr\\\"\")\n    end\n\n    if ver === nothing\n        @warn \"Could not detect PETSc version; wrote default 0.0.0 to $path\"\n    else\n        @info \"Wrote PETSc wrappers version $vstr to $path\"\n    end\n    return path\nend\n\nconst CustomTypes = [\"PetscVec\",\"PetscMat\",\"PetscDM\", \"PetscKSP\", \n                    \"PetscSNES\",\"PetscOptions\",\"IS\",\"PF\",\"TS\",\"AO\",\"Tao\"]\n\n# Remove entry from vector of strings\nremove_entry(x::Vector{String}, entry::String) = filter!(y -> y != entry, x)\n\nif  !@isdefined classes\n    # for some reason, if we run this twice it returns empty classes\n\n    # Set the Python path to include the directory of getAPI.py\n    cd(petsc_dir*\"/config/utils\")\n    PythonCall.pyimport(\"sys\").path.append(\".\")\n\n    # Import the getAPI module\n    getAPI = pyimport(\"getAPI\")\n\n    # Run the getAPI python function\n    curdir = pwd()\n    cd(\"../../\")\n    classes, enums, senums, typedefs, structs, funcs, files, mansecs, submansecs = getAPI.getAPI()\n    cd(start_dir)\nend\n\n\n\"\"\"\nRetrieves a record from a python struct and reshapes it in a julia way\n\"\"\"\nfunction struct_record(b::Py)\n    str  = replace(String(b.type), \",\" => \" \")  # deal with multiple args\n    if contains(str,\"[\")\n        # We need to make an NTuple out of the parameter\n        le = split(replace(str,\"]\"=>\"\"),\"[\")[2] # length of parameter\n\n        str  = split(replace(str,\"]\"=>\"\"),\"[\")[1]\n        spl  = strip.(split(str))\n        spl[1] = \"NTuple{$le, $(spl[1])}\"\n    elseif contains(str,\"*\")\n        # We need to make a Tuple out of the parameter\n        str  = replace(replace(str,\")\"=>\"\") ,\"(\"=>\"\")\n\n        spl  = strip.(split(str))\n        spl[1] = \"Tuple{$(join(spl[2:end],\", \"))}\"\n    else\n\n\n        spl  = strip.(split(str))\n    end\n\n    type, args = spl[1],  spl[2:end]\n\n    return args.*\"::$type\"      # add type to each argument\nend\n\n\"\"\"\n    mutable struct f_args\nContains PETSc function arguments, which are used \n\"\"\"\nmutable struct f_args\n    name::String            # variable name\n    name_ccall::String      # name in ccall array (sometimes different from output name)\n    typename::String        # type\n    array::Bool             # is it an array?\n    _const::Bool            # is it a const?\n    optional::Bool          # optional?\n    stars::Int64            # how many stars?\n    isfunction::Bool        # is this a function?\n    stringlen::Bool\n    output::Bool             # is this an output argument?\n    init_arg::String\n    extract_arg::String\n    ccall_str :: String\nend\n\nreplace_types(type::AbstractString) = replace(type, \n                                            \"size_t\"=>\"Csize_t\",\n                                            \"ptrdiff_t\"=>\"Cptrdiff_t\",\n                                            \"short\"=>\"Cshort\",\n                                            \"int32_t\"=>\"Int32\",\n                                            \"float\"=>\"Cfloat\",\n                                            \"bool\"=>\"Bool\",\n                                            \"char\"=>\"Cchar\", \n                                            \"void\"=>\"Cvoid\",\n                                            \"double\"=>\"Cdouble\",\n                                            r\"int\"=>\"Cint\",\n                                            \"FILE\"=>\"Libc.FILE\",\n\n                                            # handle custom-defined types:\n                                            r\"\\bVec\\b\"=>\"PetscVec\",\n                                            r\"\\bMat\\b\"=>\"PetscMat\",\n                                            r\"\\bDM\\b\"=>\"PetscDM\",\n                                            r\"\\bKSP\\b\"=>\"PetscKSP\",\n                                            r\"\\bSNES\\b\"=>\"PetscSNES\",\n                                            );\n\n\nreplace_names(type_str::String)     =  replace(type_str, \n                                            \"function\"=>\"fnc\",\n                                            \"end\"=>\"end_\",\n                                            \"global\"=> \"glob\",\n                                            \"local\"=>\"loc\");\n\n# Since we use the @for_petsc macro to generate multiple dispatch versions of our functions,\n# we have to add dollar signs to these types, before writing them     \nreplace_dispatch_types(type::AbstractString) = replace(type, \n                                            \"PetscScalar\"=>\"\\$PetscScalar\",\n                                            \"PetscReal\"=>\"\\$PetscReal\",\n                                            \"PetscInt\"=>\"\\$PetscInt\",\n                                            \"PetscComplex\"=>\"\\$PetscComplex\",\n                                            ); \n\nfunction init_extract_parameters(typename::String, name::String, function_name::String, name_ccall::String, isarray::Bool, isoutput::Bool, stars::Int64) \n    init_arg    = \"\"  \n    extract_arg = \"\"  \n    typename_c  = typename\n    if !isarray && isoutput && typename in CustomTypes\n        # a custom type is being initialized\n        typename_c  = replace(typename, \"Petsc\"=>\"C\", \n                                        \"IS\"=>\"CIS\", \n                                        \"PF\"=>\"CPF\", \n                                        r\"TS\"=>\"CTS\", \n                                        \"AO\"=>\"CAO\", \n                                        \"Tao\"=>\"CTao\", \n                                        count=1)\n        name_ccall  = \"$(name)_\"\n        init_arg    = \"$name_ccall = Ref{$typename_c}()\"  \n        extract_arg = \"$name = $typename($(name_ccall)[], petsclib)\"  \n\n    elseif !isarray && !isoutput && stars==1 && typename in CustomTypes\n        # a custom type is being deleted most likely\n        #typename_c  = replace(typename,\"Petsc\"=>\"C\", count=1)\n        typename_c  = replace(typename, \"Petsc\"=>\"C\", \n                                        r\"IS\"=>\"CIS\", \n                                        \"PF\"=>\"CPF\", \n                                        count=1)\n        name_ccall  = \"$(name)_\"\n        init_arg    = \"$name_ccall = Ref($(name).ptr)\"  \n        extract_arg = \"$(name).ptr = C_NULL\"  \n \n    elseif isarray && isoutput && stars>0\n        # array that'll be an output\n        name_ccall  = \"$(name)_\"\n        init_arg    = \"$name_ccall = Ref{\"\n        for i=1:stars\n            init_arg *= \"Ptr{\"\n        end\n        init_arg *= \"$typename\"\n        for i=1:stars\n            init_arg *= \"}\"\n        end\n        init_arg *= \"}()\"  \n\n        # Note: we make the implicit assumption here that the Vec is always called 'x'\n        if stars==1\n            sz = \"m\"\n        elseif stars==2\n            sz = \"(m,n)\"\n        elseif stars==3\n            sz = \"(m,n,p)\"\n        end\n        extract_arg = \"data_ptr = unsafe_load($name_ccall[])\\n\"\n        extract_arg *= \"\\tmat = unsafe_wrap(Array, data_ptr, $sz) # CHECK SIZE!! \\n\"  \n        extract_arg *= \"\\t$name = PetscArray(mat,[data_ptr]) \"\n\n    elseif isarray && isoutput && stars==0\n        # array that'll be an output\n        name_ccall  = \"$(name)\"\n        \n        # Note: we make the implicit assumption here that the length is called \"ni\"; that may not hold always\n        # I don't see a way to automatically correct this, so has to be done manually, which\n        # is why a comment is left\n        init_arg    = \"$name_ccall = Vector{$typename}(undef, ni);  # CHECK SIZE!!\"  \n        extract_arg = \"\"  \n    \n    elseif isarray && !isoutput && stars==1\n        # array that'll is an input\n        name_ccall  = \"$(name)_\"\n        init_arg    = \"$name_ccall = Ref(pointer($name))\"  \n        extract_arg = \"\"  \n    elseif !isarray && isoutput && contains(typename,\"Type\")\n        #scalar\n        name_ccall  = \"$(name)_\"\n        init_arg    = \"$name_ccall = Ref{$typename}()\"  \n        extract_arg = \"$name = unsafe_string($(name_ccall)[])\" \n\n    elseif !isarray && isoutput\n        #scalar\n        name_ccall  = \"$(name)_\"\n        init_arg    = \"$name_ccall = Ref{$typename}()\"  \n        extract_arg = \"$name = $(name_ccall)[]\" \n\n    end\n    @show function_name, typename, typename_c, name, isarray, isoutput, stars\n\n    return init_arg, extract_arg, name_ccall\nend\n\nfunction is_this_an_output_argument(function_name::String, variablename::String, typename::String, stars::Int64, isarray::Bool, output_vars::Vector{String}, input_vars::Vector{String})\n    output = false\n    if stars==1\n        output = true\n    end\n    if !isempty(output_vars)\n        if variablename in output_vars\n            output = true\n        end\n    end\n    if !isempty(input_vars)\n        if variablename in input_vars\n            output = false\n        end\n    end\n\n    # so the function type is NOT a simple thing such as PetscScalar, PetscBool, PetscReal \n    # and the function name does NOT contain \"Create\"\n    if output\n        if  (!contains(function_name, \"Create\") && \n             !contains(function_name, \"Duplicate\") && \n             !contains(function_name, \"Type\") && \n             !(typename in [\"PetscScalar\", \"PetscBool\", \"PetscReal\",\"PetscComplex\",\"PetscInt\"]))  ||\n            contains(function_name, \"RestoreArray\") ||\n            contains(function_name, \"Copy\") \n            \n            output = false\n        end\n    end\n\n    return output\nend\n\n\n# returns a julia struct \nfunction func_args(a::Py, function_name::String, input_vars=String[], output_vars=String[]) \n    stars      = pyconvert(Int64, a.stars)\n    typename   = String(a.typename)\n    typename   = replace_types(typename)    # some scrambling necessary\n    name       = String(a.name)\n    name       = replace_names(name)        # some scrambling necessary\n    name_ccall = name;\n    isconst    = Bool(a.const)\n    isarray    = Bool(a.array)\n    isoptional = Bool(a.optional)\n    isfunction = Bool(a.isfunction)\n    \n    # default setting for output arguments\n    @show input_vars, output_vars\n    isoutput = is_this_an_output_argument(function_name, name, typename, stars, isarray, output_vars, input_vars)\n\n    # this is related to creating custom julia structs\n    typename_ccall = typename\n    if typename in CustomTypes\n        typename_ccall = replace(typename_ccall,\"Petsc\"=>\"C\", \n                                                r\"IS\"=>\"CIS\",\n                                                r\"PF\"=>\"CPF\",\n                                                \"TS\"=>\"CTS\",\n                                                r\"AO\"=>\"CAO\",\n                                                r\"Tao\"=>\"CTao\",\n                                                count=1)\n    end\n    \n    if stars>0\n        # a single value, so can always be output\n        # depending on what type of output, we need different strategies here\n        init_arg, extract_arg, name_ccall = init_extract_parameters(typename, name, function_name, name_ccall, isarray, isoutput, stars) \n        ccall_str   = \"Ref{\";\n        for i=1:stars\n            ccall_str   *= \"Ptr{\"\n        end\n        ccall_str   *= \"$typename_ccall\"\n        for i=1:stars+1\n            ccall_str   *= \"}\"\n        end\n        if !isoutput\n            name_ccall *= \".ptr\"\n        end\n    else\n        init_arg, extract_arg, name_ccall = init_extract_parameters(typename, name, function_name, name_ccall, isarray, isoutput, stars) \n\n        #output      = false\n        #init_arg    = \"\"\n        #extract_arg = \"\"\n        ccall_str   = \"$typename_ccall\"\n    end\n    if isarray && !isoutput \n        # in case parameters are arrays\n       # init_arg, extract_arg, name_ccall = init_extract_parametiners(typename, name, name_ccall, isarray, isoutput) \n       if typename==\"Cchar\"  \n           typename     = \"String\" \n       else\n           typename     = \"PetscArray{$typename, 2}\" \n        \n           init_arg = \"if a.ptr[]  != C_NULL  # CHECK ARRAY NAME AND SIZE!!\"\n           extract_arg = \"else\\n\"\n           extract_arg *= \"\\t\\terror(\\\"The input array is already restored\\\")\\n\"\n           extract_arg *= \"\\tend\\n\"\n           \n           @show init_arg\n\n\n       end\n\n        #ccall_str    = \"Ptr{$ccall_str}\"\n        ccall_str    = \"$ccall_str\"\n        \n    end\n\n    return f_args(name, name_ccall, typename, isarray, isconst, isoptional, stars, isfunction, Bool(a.stringlen), isoutput, init_arg, extract_arg, ccall_str)\nend\n\n# creates a \nfunction julia_function_doc_header(args::Vector{f_args}, function_name::String)\n    str_in   = \"\"; num_in=0\n    str_out  = \"\";  str_out_doc  = \"\"; num_out=0\n    for arg in args\n        if arg.output # output argument\n            str_out     *= num_out > 0 ? \",\" : \"\"\n            str_out_doc *= num_out > 0 ? \",\" : \"\"\n            str_out_doc *= \"$(arg.name)::$(arg.typename)\"\n            str_out     *= \"$(arg.name)\"\n            num_out += 1 \n        else\n            str_in *= num_in > 0 ? \", \" : \"\"\n            str_in *= \"$(arg.name)::$(arg.typename)\"\n            num_in += 1\n        end\n    end\n\n    if num_out>0\n        if num_in>0\n            str = \"$str_out_doc = $function_name(petsclib::PetscLibType,$str_in)\"\n        else\n            str = \"$str_out_doc = $function_name(petsclib::PetscLibType)\"\n        end\n    else\n        if num_in>0\n            str = \"$function_name(petsclib::PetscLibType,$str_in)\"\n        else\n            str = \"$function_name(petsclib::PetscLibType)\"\n        end\n    end\n\n    return str, str_in, str_out, num_in, num_out\nend\n\n# returns 2 strings needed for the ccall routine\nfunction julia_ccall_header(args::Vector{f_args})\n    type_str, name_str = \"(\",\"\"\n    for (i,arg) in enumerate(args)\n        if i>1\n            type_str *= \", \"\n            name_str *= \", \"\n        end\n        type_str *= arg.ccall_str\n        name_str *= arg.name_ccall\n    end\n    if length(args)==1\n        type_str *= \",)\"\n    else\n        type_str *= \")\"\n    end\n    return type_str, name_str, length(args)\nend\n\n\n\"\"\"\n    write_enum(enum_val::Py, io = stdout)\nWrites an enum to either file or REPL\n\"\"\"\nfunction write_enum(enum_val::Py, io = stdout)\n\n    println(io,\"@enum $(enum_val.name) begin\")\n    for (i,name) in enumerate(enum_val.values)\n        if contains(String(name),\"DEPRECATED\")\n            break\n        end\n        if  contains(name,\"=\")\n            println(io,\"    $(name)\")\n        else\n            println(io,\"    $(name) = $(i-1)\")\n        end\n    end\n    println(io,\"end \\n\")\n    return nothing\nend\n\n# Retrieves input and output arguments of a petsc function\nfunction process_function_arguments(arguments::Py, function_name::String, input_vars=String[], output_vars=String[])\n    function_arguments  = f_args[]\n    for arg in arguments\n        push!(function_arguments,  func_args(arg, function_name, input_vars, output_vars))\n    end\n    return function_arguments\nend\n\nfunction write_initialize(arguments::Vector{f_args}, io = stdout)\n    for arg in arguments\n        if !isempty(arg.init_arg)\n            println(io,\"\\t$(replace_dispatch_types(arg.init_arg))\")\n        end\n    end\n    println(io,\"\")\nend\n\nfunction write_extract(arguments::Vector{f_args}, io = stdout)\n    println(io,\"\")\n    for arg in arguments\n        if !isempty(arg.extract_arg)\n            println(io,\"\\t$(arg.extract_arg)\")\n        end\n    end\nend\n\n\"\"\"\nWrites a function to the specified IO stream\n\"\"\"\nfunction write_funcs(funcs_val::Py, io = stdout)\n    if contains(funcs_val.name,\"_\") #|| isopaque(funcs_val)\n        @info \"Skipping function $(funcs_val.name)\"\n        return nothing\n    end\n\n    name          = String(funcs_val.name)\n\n    # extract input/output arguments and doc string of function\n    input_vars, output_vars, doc_str = extract_input_output_function(petsc_dir, name)\n    \n    # process all function arguments\n    arguments     = process_function_arguments(funcs_val.arguments, name, input_vars, output_vars)\n    \n    #@info arguments\n    # print function\n\n    # Extract input/output arguments of function\n    #@info name\n    \n    #julia_fct_str = julia_function_header(funcs_val)\n    #julia_fct_str = replace_function_string(julia_fct_str)\n    julia_doc_fct_str, str_in, str_out, num_in, num_out = julia_function_doc_header(arguments, name)\n    ccall_type, ccall_name, n_arg = julia_ccall_header(arguments)\n    \n    # write help \n    println(io,\"\\\"\\\"\\\"\");\n    println(io,\"\\t$julia_doc_fct_str \");\n    if !isnothing(doc_str)\n        for c in doc_str\n            println(io,\"$c\")\n        end\n    end\n    println(io,\"\");\n    println(io,\"# External Links\");\n    println(io,\"\\$(_doc_external(\\\"$(titlecase(String(funcs_val.mansec)))/$(funcs_val.name)\\\"))\");\n    println(io,\"\\\"\\\"\\\"\");\n    if num_in>0\n        println(io,\"function $(funcs_val.name)(petsclib::PetscLibType, $str_in) end\");\n    else\n        println(io,\"function $(funcs_val.name)(petsclib::PetscLibType) end\");\n    end\n    println(io,\"\");\n    # write function itself (we will generate various dispatches using @for_petsc)\n    if num_in>0\n        println(io,\"@for_petsc function $(funcs_val.name)(petsclib::\\$UnionPetscLib, $(replace_dispatch_types(str_in)) )\");\n    else\n        println(io,\"@for_petsc function $(funcs_val.name)(petsclib::\\$UnionPetscLib)\");\n    end\n    # Write initial arguments \n    write_initialize(arguments, io)\n    \n    println(io,\"    @chk ccall(\");\n    println(io,\"               (:$(name), \\$petsc_library),\");\n    println(io,\"               PetscErrorCode,\");\n    println(io,\"               $(replace_dispatch_types(ccall_type)),\");\n    if n_arg>0\n    println(io,\"               $ccall_name,\");\n    end\n    println(io,\"              )\");\n\n    # convert output args into correct values (if needed)\n    write_extract(arguments, io)\n    if num_out>0\n        println(io,\"\\n\\treturn $str_out\");  # return them\n    else\n        println(io,\"\\n\\treturn nothing\");\n    end\n    println(io,\"end \\n\");\n\n    return nothing\nend\n\nfunction write_struct(struct_val::Py, io = stdout)\n\n    println(io,\"mutable struct $(struct_val.name)\")\n\n    string_in_julia = \"\"\n    string_petsc = \"\"\n    for (i,s) in enumerate(struct_val.records)\n        str = extract_struct_entry(s)\n        if !isnothing(str)   \n            sym = split(str,\"::\")[1]\n            typ = split(str,\"::\")[2]\n            str_petsc = replace(str, \"\\n\"=>\",\")\n            println(io,\"    $str\")\n            if i>1\n                string_in_julia *= \",\"\n                string_petsc *= \",\"\n            end \n            string_in_julia *= \"$sym\"\n            string_petsc *= \"$str_petsc\"\n        else\n            # stop when we find the firtst #ifdef\n            break\n        end\n    end\n    println(io,\"\")\n    println(io,\"    $(struct_val.name)() = new()\")\n    println(io,\"\")\n    println(io,\"    $(struct_val.name)($string_in_julia) = new($string_petsc)\")\n    println(io,\"\")\n    println(io,\"end \\n\")\n    return nothing\nend\n\nfunction extract_struct_entry(s::Py)\n    str = String(s.type)\n    str = replace(str,\"const \"=>\"\")\n    type = split(str)[1]\n    name = split(str)[2:end]\n    if contains(str,\"[\")\n        name = split(replace(str,\"]\"=>\"\"),\"[\")\n        le   = name[2] # length of parameter\n        name = name[1] \n        type = split(name)[1]\n        name = split(name)[2:end]\n        type = \"NTuple{$le, $type}\"\n    end\n    if length(name)==1\n        name = name[1]\n    end\n\n    if contains(type,\"#if\") || contains(type,\"#else\") || contains(type,\"#endif\")\n        return\n    end\n    if any(contains.(name,\"*\"))\n        type = \"Ptr{$type}\"\n        name = replace.(name,\"*\"=>\"\",\"(\"=>\"\",\")\"=>\"\")\n    end\n    type = replace_types(type)\n    name = replace(name,\"function\"=>\"_function\")\n\n    if any(contains.(name,\"[\"))\n        name = split(replace.(name,\"]\"=>\"\"),\"[\")\n        le   = name[2] # length of parameter\n        name = name[1] \n        type = \"NTuple{$le, $type}\"\n    end\n    str_out = \"\"\n    if isa(name, Vector)\n        name = replace.(name,\",\"=>\"\")\n        for na in name\n            str_out *= \"$na::$type \\n    \"\n        end\n    else\n        str_out *= \"$name::$type\"\n    end\n    return str_out\nend\n\n\n\nfunction write_typedefs(typedef_val::Py, io = stdout)\n    type = String(typedef_val.value)\n    type = replace_types(type)\n\n    println(io,\"const $(typedef_val.name) = $type\")\n    return nothing\nend\n\n\nfunction write_keys_to_file(filename::String, start_dir::String, object::Py, fn::Function; exclude=String[])\n    open(joinpath(start_dir, filename), \"w\") do file\n        # Call the write_enum function and pass the file as the io argument\n        for val in object.keys()\n            if !any(exclude .== String(val))\n                fn(object[val], file)\n            end\n        end\n    end\nend\n\nfunction write_skeys_to_file(filename::String, start_dir::String, object::Py; exclude=String[])\n    open(joinpath(start_dir, filename), \"w\") do io\n        # Call the write_enum function and pass the file as the io argument\n        println(io, \"# not quite sure yet how to deal with this\")\n        for val in object.keys()\n            if !any(exclude .== String(val))\n                println(io, \"$(String(object[val].name))=Ptr{Cchar}\")\n            end\n        end\n    end\nend\n\nfunction write_functions_from_classes_to_file(filename::String, start_dir::String, classes::Py, class_name::String; exclude=String[])\n    open(joinpath(start_dir, filename), \"w\") do file\n        # write definitions to file (if needed)\n        write_undefined_typearguments_from_classes_to_file(classes[class_name].functions, file=file)\n\n        # Call the write_enum function and pass the file as the io argument\n        for f in classes[class_name].functions\n            name = String(f)\n            if !any(exclude .== name)\n                @info name\n                write_funcs(classes[class_name].functions[name], file)\n                #write_funcs(classes[function_name].functions[String(f)])\n\n            end\n        end\n    end\nend\n\nfunction write_functions_from_classes_to_file(filename::String, start_dir::String, classes::Py, class_names::Vector{String}; exclude=String[])\n    open(joinpath(start_dir, filename), \"w\") do file\n        for class_name in class_names\n            # write definitions to file (if needed)\n            write_undefined_typearguments_from_classes_to_file(classes[class_name].functions, file=file)\n        end\n\n        # Call the write_enum function and pass the file as the io argument\n        for class_name in class_names\n            for f in classes[class_name].functions\n                name = String(f)\n                if !any(exclude .== name)\n                    @info name\n                    write_funcs(classes[class_name].functions[name], file)\n                    #write_funcs(classes[function_name].functions[String(f)])\n\n                end\n            end\n        end\n    end\nend\n\nfunction write_functions_to_file(filename::String, start_dir::String, funcs::Py; exclude=String[])\n    open(joinpath(start_dir, filename), \"w\") do file\n        # Call the write_enum function and pass the file as the io argument\n        write_undefined_typearguments_from_classes_to_file(funcs, file=file)\n\n        for f in funcs\n            name = String(f)\n            if !any(exclude .== name)\n                #@info name\n                write_funcs(funcs[name], file)\n                #write_funcs(classes[function_name].functions[String(f)])\n            end\n        end\n    end\nend\n\nfunction write_structs_to_file(filename::String, start_dir::String, structs::Py; exclude=String[])\n    open(joinpath(start_dir, filename), \"w\") do file\n        # Call the write_enum function and pass the file as the io argument\n        for struct_val in structs\n            if !any(exclude .== String(struct_val))\n                write_struct(structs[String(struct_val)], file)\n            end\n        end\n    end\nend\n\nfunction write_typedefs_to_file(filename::String, start_dir::String, typedefs::Py; exclude=String[])\n    open(joinpath(start_dir, filename), \"w\") do file\n        # Call the write_enum function and pass the file as the io argument\n        for typedef_val in typedefs\n            if !any(exclude .== String(typedef_val))\n                write_typedefs(typedefs[String(typedef_val)], file)\n            end\n        end\n    end \nend\n\n\nfunction read_docstring_function(func::Py, petsc_dir::String)\n    name = String(func.name)\n    mansec = String(func.mansec)\nend\n\n# helps to quickly generate custom julia structs for PETSc types\nfunction generate_custom_julia_struct(type_name::String)\n    # Convert type name to appropriate formats\n    ctype_name = \"C$(type_name)\"\n    petsc_type_name = \"Petsc$(type_name)\"\n    abstract_type_name = \"AbstractPetsc$(type_name)\"\n    \n    str= \"\"\"\n# ----- Custom Julia struct for PETSc $(type_name) -----\nconst $(ctype_name) = Ptr{Cvoid}\nabstract type $(abstract_type_name){T} end\nmutable struct $(petsc_type_name){PetscLib} <: $(abstract_type_name){PetscLib}\n    ptr::$(ctype_name)\n    age::Int\n    \n    # Constructor from pointer and age\n    $(petsc_type_name){PetscLib}(ptr::$(ctype_name), age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty $(type_name) (null pointer)\n    $(petsc_type_name){PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\n$(petsc_type_name)(lib::PetscLib) where {PetscLib} = $(petsc_type_name){PetscLib}()\n$(petsc_type_name)(ptr::$(ctype_name), lib::PetscLib, age::Int = 0) where {PetscLib} = $(petsc_type_name){PetscLib}(ptr, age)\nBase.convert(::Type{$(ctype_name)}, v::$(abstract_type_name)) = v.ptr\nBase.unsafe_convert(::Type{$(ctype_name)}, v::$(abstract_type_name)) = v.ptr\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::$(abstract_type_name){PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        print(io, \"PETSc $(type_name) (null pointer)\")\n        return\n    else\n        print(io, \"PETSc $(type_name) \")\n    end\n    return nothing\nend\n# ------------------------------------------------------\n\"\"\"\n    \n    println(str)\n    return nothing\nend\n\n\n\"\"\"\n    class_found = find_functions(classes::Py, funcs::Py, function_name::String)\nHelper function to simply finding a certain PETSc function\n\"\"\"\nfunction find_functions(classes::Py, funcs::Py, function_name::String)\n\n    found = false\n    class_found = \"\"\n    for class in classes.keys()\n        # retrieve all functions\n        funcs_list = String[]\n        for f in classes[class].functions\n            name = String(f)\n            push!(funcs_list, name)\n        end\n        if any(funcs_list .== function_name)\n            println(\"Found $function_name in class $(String(class))\")\n            class_found = String(class)\n            found = true\n        end\n    end\n    if !found\n        println(\"Did not find $function_name in any class\")\n    end\n\n    if !found\n        funcs_list = String[]\n        for f in funcs\n            name = String(f)\n            push!(funcs_list, name)\n        end\n         if any(funcs_list .== function_name)\n            println(\"Found $function_name in funcs\")\n            found = true\n        end\n    end\n\n    return class_found\nend\n\n\"\"\"\n    wrap_function(function_name::Vector{String}, classes::Py, funcs::Py; file::Union{IO, String}=stdout)\nHelper function to wrap a certain PETSc functions; it finds it in the code base and \nwrites it to either stdout (default) or to `file`\n\"\"\"\nfunction wrap_function(function_names::Vector{String}, classes::Py, funcs::Py; file::Union{IO, String}=stdout)\n    if file isa String\n        io = open(file, \"w\")\n    else\n        io = file\n    end\n    \n    for function_name in function_names\n        class_found = find_functions(classes, funcs, function_name)\n        if !isempty(class_found)\n            write_funcs(classes[class_found].functions[function_name], io)\n        end\n    end\n\n    if file isa String\n        close(io)\n    end\n\n    return nothing\nend\n\n\"\"\"\n    wrap_function(function_name::Vector{String}, classes::Py, funcs::Py; file::Union{IO, String}=stdout)\nHelper function to wrap a certain PETSc function `function_name`; it finds it in the code base and \nwrites it to either stdout (default) or to `file`\n\"\"\"\nwrap_function(function_names::String, classes::Py, funcs::Py; file::Union{IO, String}=stdout) = \nwrap_function([function_names], classes, funcs; file=file)\n\n\nfunction move_prologue(prologue_file=\"prologue.jl\")\n    # move prologue file to autowrapped directory\n    src = joinpath(start_dir, prologue_file)\n    dest = joinpath(start_dir, \"../src/autowrapped/\", \"petsc_library.jl\")\n    cp(src, dest; force=true)\n    return nothing\nend\n\nfunction extract_function_args_from_function(func::Py, function_name::String)\n    arguments     = process_function_arguments(funcs_val.arguments, function_name, String[], String[])\n    fn_args = String[]\n    for arg in arguments\n        if arg.isfunction\n            push!(fn_args, arg.typename)\n        end\n    end\n    return fn_args\nend\n\n# Extracts all type argiments from a class\nfunction extract_function_typeargs_from_class(functions::Py)\n    fn_args = Vector{String}()\n    for f in functions\n        name = String(f)\n        arguments     = process_function_arguments(functions[name].arguments, name, String[], String[])\n        for arg in arguments\n            typename = arg.typename\n            typename = replace(typename, \"Vector{\"=>\"\",\"}\"=>\"\")\n\n            push!(fn_args, typename)\n        end\n    end\n    fn_args = unique(fn_args)\n    for entry in CustomTypes\n        fn_args = remove_entry(fn_args, entry)\n    end\n\n    return fn_args\nend\n\nfunction write_undefined_typearguments_from_classes_to_file(functions; file=stdout)\n    fn_args = extract_function_typeargs_from_class(functions)\n\n    println(file,\"# autodefined type arguments for class ------\")\n    # Call the write_enum function and pass the file as the io argument\n    for typearg in fn_args\n       var_sym = Symbol(typearg)\n        if !isdefined(Main, var_sym)\n            # variable doesn't exist yet, so define it\n            if contains(typearg,\"Fn\")\n                println(file,\"mutable struct $typearg end\\n\")\n            else\n                println(file,\"mutable struct _n_$typearg end\")\n                println(file,\"const $typearg = Ptr{_n_$typearg}\\n\")\n            end\n        end\n    end\n    println(file,\"# -------------------------------------------------------\")\n\n\nend\n\n\n\n\n\n#exclude=[\"KSPConvergedReason\",\"PetscMemType\"]\n#write_keys_to_file(\"../src/autowrapped/enums_wrappers.jl\",  start_dir,  enums, write_enum, exclude=exclude)  # Write enums to file\n#write_skeys_to_file(\"../src/autowrapped/senums_wrappers.jl\",start_dir, senums)              # Write string enums to file\n#\n#exclude = [\"LandauCtx\"]\n# Adapt as needed\n#write_structs_to_file(\"struct_wrappers.jl\", start_dir, structs,exclude=exclude)          # Write all structs to file\n#exclude=[\"PetscGeom\",\"PetscInt32\"]\n#write_typedefs_to_file(\"../src/autowrapped/typedefs_wrappers.jl\", start_dir, typedefs,exclude=exclude)      # Write all typedefs to file\n\nmove_prologue(\"prologue.jl\")\n\n\n# Need to call this before writing any function files\n# - it will error, but at that stage all necessary variables will be loaded, so you can comment this\n#include(\"../src/autowrapped/petsc_library.jl\")\n\n\n#=\n# Write KSP functions to file (this should be expanded to all other classes)\nexclude=[\"KSPLSQRGetNorms\"]\nwrite_functions_from_classes_to_file(\"KSP_wrappers.jl\",start_dir, classes, \"KSP\", exclude=exclude)     \n\n# write general functions to file\nexclude=[\"PetscHTTPSRequest\",\n\"LandauKokkosJacobian\",\"LandauKokkosDestroyMatMaps\",\"LandauKokkosStaticDataSet\",\"LandauKokkosStaticDataClear\",\n         \"PetscSSLInitializeContext\",\"PetscSSLDestroyContext\",\"PetscHTTPSConnect\",\n         \"PetscDataTypeToHDF5DataType\",\"PetscHDF5DataTypeToPetscDataType\",\"PetscHDF5IntCast\",\n         \"PetscPostIrecvInt\",\"PetscPostIrecvScalar\",\n         \"PetscDTAltVInteriorPattern\",\"LandauKokkosCreateMatMaps\",\n         \"PetscCIntCast\",\"PetscIntCast\", \"PetscBLASIntCast\",\"PetscCuBLASIntCast\",\"PetscHipBLASIntCast\",\"PetscMPIIntCast\",\n         \"PetscFixFilename\",\n         \"PetscDTAltVApply\",\"PetscDTAltVWedge\",\"PetscDTSimplexQuadrature\",\"PetscDTJacobiNorm\",  # these have some comments that mess up julia docs        \n         ]\n\n=#\n#exclude=[\"LandauKokkosJacobian\",\"LandauKokkosDestroyMatMaps\",\"LandauKokkosStaticDataSet\",\"LandauKokkosStaticDataClear\"]\n#write_functions_to_file(\"Sys_wrappers.jl\", start_dir, funcs, exclude=exclude)\n\n# Write Vec functions to file (this should be expanded to all other classes)\n#exclude=[\"\"]\n#write_functions_from_classes_to_file(\"Vec_wrappers.jl\",start_dir, classes, \"Vec\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"Vecs_wrappers.jl\",start_dir, classes, \"Vecs\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"PetscOptions_wrappers.jl\",start_dir, classes, \"PetscOptions\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"PetscObject_wrappers.jl\",start_dir, classes, \"PetscObject\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"PetscDraw_wrappers.jl\",start_dir, classes, [\"PetscDraw\",\"PetscDrawAxis\",\"PetscDrawLG\",\"PetscDrawSP\",\"PetscDrawHG\",\"PetscDrawBar\"], exclude=exclude)     \n#write_functions_from_classes_to_file(\"PetscRegressor_wrappers.jl\",start_dir, classes, \"PetscRegressor\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"PF_wrappers.jl\",start_dir, classes, \"PF\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"IS_wrappers.jl\",start_dir, classes, \"IS\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"TS_wrappers.jl\",start_dir, classes, \"TS\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"AO_wrappers.jl\",start_dir, classes, \"AO\", exclude=exclude)     \n#write_functions_from_classes_to_file(\"Tao_wrappers.jl\",start_dir, classes, \"Tao\", exclude=exclude)  \n#write_functions_from_classes_to_file(\"DMaddons_wrappers.jl\",start_dir, classes, [\"DMAdaptor\",\"DMSwarmDataField\",\"DMSwarmDataBucket\",\"DMSwarmSort\",\"DMSwarmCellDM\",\"DMInterpolationInfo\",\"DMPlexStorageVersion\",\"DMPlexPointQueue\",\"DMField\",\"DMUniversalLabel\",\"DMGeneratorFunctionList\",\"DMPlexTransform\",\"DMNetworkMonitorList\",\"DMNetworkMonitor\",\"DMLabel\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"VecTagger_wrappers.jl\",start_dir, classes, \"VecTagger\", exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscDS_wrappers.jl\",start_dir, classes, \"PetscDS\", exclude=exclude)  \n#write_functions_from_classes_to_file(\"Mataddons_wrappers.jl\",start_dir, classes, [\"MatColoring\",\"MatFDColoring\",\"MatTransposeColoring\",\"MatPartitioning\",\"MatNullSpace\",\"MatMFFD\",\"MatCoarsen\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"ISaddons_wrappers.jl\",start_dir, classes, [\"ISLocalToGlobalMapping\",\"ISColoring\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"SNESLineSearch_wrappers.jl\",start_dir, classes, \"SNESLineSearch\", exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscBag_wrappers.jl\",start_dir, classes, [\"PetscBag\",\"PetscBagItem\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"KSPGuess_wrappers.jl\",start_dir, classes, [\"KSPGuess\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscKDTree_wrappers.jl\",start_dir, classes, [\"PetscKDTree\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscGridHash_wrappers.jl\",start_dir, classes, [\"PetscGridHash\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscSection_wrappers.jl\",start_dir, classes, [\"PetscSection\",\"PetscSectionSym\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"TSaddons_wrappers.jl\",start_dir, classes, [\"TSTrajectory\",\"TSMonitorDrawCtx\",\"TSMonitorSolutionCtx\",\"TSMonitorVTKCtx\",\"TSMonitorLGCtx\",\"TSMonitorLGCtxNetwork\",\"TSMonitorEnvelopeCtx\",\"TSMonitorSPEigCtx\",\"TSMonitorSPCtx\",\"TSMonitorHGCtx\",\"TSAdapt\",\"TSGLLEAdapt\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscSpace_wrappers.jl\",start_dir, classes, \"PetscSpace\", exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscDevice_wrappers.jl\",start_dir, classes, [\"PetscDevice\",\"PetscDeviceContext\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscLayout_wrappers.jl\",start_dir, classes, [\"PetscLayout\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscMatlabEngine_wrappers.jl\",start_dir, classes, [\"PetscMatlabEngine\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscPartitioner_wrappers.jl\",start_dir, classes, [\"PetscPartitioner\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscConvEst_wrappers.jl\",start_dir, classes, [\"PetscConvEst\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscFE_wrappers.jl\",start_dir, classes, [\"PetscFE\",\"PetscQuadrature\",\"PetscTabulation\",\"PetscWeakForm\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscBench_wrappers.jl\",start_dir, classes, [\"PetscBench\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscToken_wrappers.jl\",start_dir, classes, [\"PetscToken\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscObject_wrappers.jl\",start_dir, classes, [\"PetscObject\",\"PetscObjectList\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscFunctionList_wrappers.jl\",start_dir, classes, [\"PetscFunctionList\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscDLLibrary_wrappers.jl\",start_dir, classes, [\"PetscDLLibrary\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscContainer_wrappers.jl\",start_dir, classes, [\"PetscContainer\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscRandom_wrappers.jl\",start_dir, classes, [\"PetscRandom\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"Petsccomm_wrappers.jl\",start_dir, classes, [\"PetscSubcomm\",\"PetscShmComm\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscOmpCtrl_wrappers.jl\",start_dir, classes, [\"PetscOmpCtrl\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscHeap_wrappers.jl\",start_dir, classes, [\"PetscHeap\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscSegBuffer_wrappers.jl\",start_dir, classes, [\"PetscSegBuffer\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscLimiter_wrappers.jl\",start_dir, classes, [\"PetscLimiter\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscFV_wrappers.jl\",start_dir, classes, [\"PetscFV\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"Tao_addons_wrappers.jl\",start_dir, classes, [\"TaoMonitorDrawCtx\",\"TaoLineSearch\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscViewer_wrappers.jl\",start_dir, classes, [\"PetscViewer\",\"PetscViewers\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"Characteristic_wrappers.jl\",start_dir, classes, [\"Characteristic\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscSF_wrappers.jl\",start_dir, classes, [\"PetscSF\",\"PetscSFLink\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscDualSpace_wrappers.jl\",start_dir, classes, [\"PetscDualSpace\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscOptions_addons_wrappers.jl\",start_dir, classes, [\"PetscOptionsHelpPrinted\",\"PetscOptionItem\",\"PetscOptionItems\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscIntStack_wrappers.jl\",start_dir, classes, [\"PetscIntStack\"], exclude=exclude)  \n#write_functions_from_classes_to_file(\"PetscLog_wrappers.jl\",start_dir, classes, [\"PetscLogHandler\",\"PetscLogRegistry\",\"PetscLogState\"], exclude=exclude)  \n\n\n#exclude=[\"\"]\n#write_functions_from_classes_to_file(\"Mat_wrappers.jl\",start_dir, classes, \"Mat\", exclude=exclude)     \n\n\n\n# Todo: \n# - determine function parameters that have functions and handle those automatically\n"
  },
  {
    "path": "wrapping/local_types.jl",
    "content": "# this summarizes local types generated in all packages\n# Its for wrapping new packages; simplifies my life..\n\n\n#\n# START OF PROLOGUE\n#\n\nusing MPI\nconst MPI_Comm = MPI.Comm\nconst MPI_Datatype = MPI.MPI_Datatype\nconst MPI_File = MPI.MPI_File\nconst MPI_Aint = MPI.MPI_Aint\nconst MPI_Info = MPI.MPI_Info\nconst MPI_Win = MPI.MPI_Win\nconst MPI_Offset = MPI.MPI_Offset\nconst MPI_Op = MPI.MPI_Op\nconst MPI_UNSIGNED_SHORT = MPI.UNSIGNED_SHORT\nconst MPI_INT64_T = MPI.INT64_T\nconst MPI_INT32_T = MPI.INT32_T\nconst MPI_FLOAT = MPI.FLOAT\nconst MPI_COMM_SELF = MPI.COMM_SELF\nconst MPI_DOUBLE = MPI.DOUBLE\nconst MPI_SUM = MPI.SUM\nconst MPI_MAX = MPI.MAX\nconst MPI_MIN = MPI.MIN\nconst MPI_REPLACE = MPI.REPLACE\nconst MPIU_INT64 = MPI.UINT64_T\nconst MPIU_INT32 = MPI.UINT32_T\n\n# We know these will be Cvoid, so just set them to be that\n#const PetscOptions = Ptr{Cvoid}\n#mutable struct _n_PetscOptions end\n#const PetscOptions = Ptr{_n_PetscOptions}\n\n\nconst PetscViewer = Ptr{Cvoid}\nconst PetscObject = Ptr{Cvoid}\n\n\n#const VecType = Cstring\n#const Mat = Ptr{Cvoid}\n#const MatType = Cstring\n#const KSP = Ptr{Cvoid}\n#const KSPType = Cstring\n#const SNES = Ptr{Cvoid}\n#const SNESType = Cstring\n#const DM = Ptr{Cvoid}\nconst PetscDLHandle = Ptr{Cvoid}\n\n\nconst PETSC_DECIDE = -1\nconst PETSC_DETERMINE = PETSC_DECIDE\nconst PETSC_COMM_SELF = MPI.COMM_SELF\n\nPetscInt = Int64\nPetscInt64 = Int64\nPetscInt32 = Int32\nPetscScalar = Float64\nPetscReal = Float64\n#PetscBool = Bool\n\n\n# ----- Custom Julia struct for PETSc Vec -----\nconst CVec = Ptr{Cvoid}\nabstract type AbstractPetscVec{T} end\nmutable struct PetscVec{PetscLib} <: AbstractPetscVec{PetscLib}\n    ptr::CVec\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscVec{PetscLib}(ptr::CVec, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty Vec (null pointer)\n    PetscVec{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscVec(lib::PetscLib) where {PetscLib} = PetscVec{PetscLib}()\nPetscVec(ptr::CVec, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscVec{PetscLib}(ptr, age)\nBase.convert(::Type{CVec}, v::AbstractPetscVec) = v.ptr\nBase.unsafe_convert(::Type{CVec}, v::AbstractPetscVec) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc Mat -----\nconst CMat = Ptr{Cvoid}\nabstract type AbstractPetscMat{T} end\nmutable struct PetscMat{PetscLib} <: AbstractPetscMat{PetscLib}\n    ptr::CMat\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscMat{PetscLib}(ptr::CMat, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty Mat (null pointer)\n    PetscMat{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscMat(lib::PetscLib) where {PetscLib} = PetscMat{PetscLib}()\nPetscMat(ptr::CMat, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscMat{PetscLib}(ptr, age)\nBase.convert(::Type{CMat}, v::AbstractPetscMat) = v.ptr\nBase.unsafe_convert(::Type{CMat}, v::AbstractPetscMat) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc KSP -----\nconst CKSP = Ptr{Cvoid}\nabstract type AbstractPetscKSP{T} end\nmutable struct PetscKSP{PetscLib} <: AbstractPetscKSP{PetscLib}\n    ptr::CKSP\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscKSP{PetscLib}(ptr::CKSP, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty KSP (null pointer)\n    PetscKSP{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscKSP(lib::PetscLib) where {PetscLib} = PetscKSP{PetscLib}()\nPetscKSP(ptr::CKSP, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscKSP{PetscLib}(ptr, age)\nBase.convert(::Type{CKSP}, v::AbstractPetscKSP) = v.ptr\nBase.unsafe_convert(::Type{CKSP}, v::AbstractPetscKSP) = v.ptr\n\n\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc SNES -----\nconst CSNES = Ptr{Cvoid}\nabstract type AbstractPetscSNES{T} end\nmutable struct PetscSNES{PetscLib} <: AbstractPetscSNES{PetscLib}\n    ptr::CSNES\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscSNES{PetscLib}(ptr::CSNES, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty SNES (null pointer)\n    PetscSNES{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscSNES(lib::PetscLib) where {PetscLib} = PetscSNES{PetscLib}()\nPetscSNES(ptr::CSNES, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscSNES{PetscLib}(ptr, age)\nBase.convert(::Type{CSNES}, v::AbstractPetscSNES) = v.ptr\nBase.unsafe_convert(::Type{CSNES}, v::AbstractPetscSNES) = v.ptr\n\n\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc DM -----\nconst CDM = Ptr{Cvoid}\nabstract type AbstractPetscDM{T} end\nmutable struct PetscDM{PetscLib} <: AbstractPetscDM{PetscLib}\n    ptr::CDM\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscDM{PetscLib}(ptr::CDM, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty DM (null pointer)\n    PetscDM{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscDM(lib::PetscLib) where {PetscLib} = PetscDM{PetscLib}()\nPetscDM(ptr::CDM, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscDM{PetscLib}(ptr, age)\nBase.convert(::Type{CDM}, v::AbstractPetscDM) = v.ptr\nBase.unsafe_convert(::Type{CDM}, v::AbstractPetscDM) = v.ptr\n\n# Custom display for REPL\nfunction Base.show(io::IO, v::AbstractPetscDM{PetscLib}) where {PetscLib}\n    if v.ptr == C_NULL\n        print(io, \"PETSc DM (null pointer)\")\n        return\n    else\n        print(io, \"PETSc DM object\")\n    end\n    return nothing\nend\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# PetscOptions\nconst COptions = Ptr{Cvoid} \nabstract type AbstractPetscOptions{T} end\n\nmutable struct PetscOptions{PetscLib} <: AbstractPetscOptions{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    PetscOptions{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nPetscOptions(lib::PetscLib) where {PetscLib} = PetscOptions{PetscLib}()\nPetscOptions(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = PetscOptions{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractPetscOptions) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractPetscOptions) = v.ptr\n# ------------------------------------------------------\n\n\n\n# Stuff that I don't really want to define by hand, but seem to not be part of the petsc python interface?\nmutable struct _p_PetscSF end\nconst PetscSF = Ptr{_p_PetscSF}\n\nconst PETSCSTACKSIZE = 64\n\nconst void = Cvoid\nconst char = Cchar\n\nmutable struct PetscDraw end\nmutable struct DMLabel end\nmutable struct TSMonitorLGCtx end\nmutable struct PetscCtxDestroyFn end\nmutable struct PetscErrorCodeFn end\n\n# stuff I need to define to get PETSc.jl to load with \"using\". We need to find a real solution\n#mutable struct KSPConvergedReasonViewFn end\n#mutable struct PC end\nmutable struct _n_PC end\nconst PC = Ptr{_n_PC}\n\n#mutable struct KSPMonitorFn end\n#mutable struct KSPConvergenceTestFn end\n#mutable struct KSPComputeOperatorsFn end\n#mutable struct KSPComputeRHSFn end\n#mutable struct KSPComputeInitialGuessFn end\n#mutable struct PeCtx end\n#mutable struct KSPPSolveFn end\nmutable struct MatHtoolKernelFn end\n\n\nconst PetscObject = Ptr{Cvoid}\nconst external = Ptr{Cvoid}\n#const KSPMonitorRegisterFn = Ptr{Cvoid}\n#const KSPMonitorRegisterCreateFn = Ptr{Cvoid}\n#const KSPMonitorRegisterDestroyFn = Ptr{Cvoid}\n#const KSPGuess = Ptr{Cvoid}\n#const KSPFlexibleModifyPCFn = Ptr{Cvoid}\nconst PetscVoidFn = Cvoid\nconst PetscProbFn = Ptr{Cvoid}\n\nconst PetscBT = Ptr{Cchar}\n\n# required in Sys_wrappers\nmutable struct _n_PetscLogRegistry end\nconst PetscLogRegistry = Ptr{_n_PetscLogRegistry}\n\nmutable struct _n_PetscIntStack end\nconst PetscIntStack = Ptr{_n_PetscIntStack}\n#const PetscLogClass = Cint\n\n#mutable struct _p_PetscLogHandler end\n#const PetscLogHandler = Ptr{_p_PetscLogHandler}\n#const PetscLogHandlerType = Ptr{Cchar}\nmutable struct _n_PetscLogState\n    registry::PetscLogRegistry\n    active::PetscBT\n    stage_stack::PetscIntStack\n    current_stage::Cint\n    bt_num_stages::Cint\n    bt_num_events::Cint\n    refct::Cint\n    _n_PetscLogState() = new()\nend\nconst PetscLogState = Ptr{_n_PetscLogState}\n\n#mutable struct _n_PetscLayout end\n#const PetscLayout = Ptr{_n_PetscLayout}\n#\n#mutable struct _p_PetscQuadrature end\n#const PetscQuadrature = Ptr{_p_PetscQuadrature}\n#\n#mutable struct _p_PetscRandom end\n#const PetscRandom = Ptr{_p_PetscRandom}\n\n@enum KSPConvergedReason::Int32 begin\n    KSP_CONVERGED_RTOL_NORMAL = 1\n    KSP_CONVERGED_ATOL_NORMAL = 9\n    KSP_CONVERGED_RTOL = 2\n    KSP_CONVERGED_ATOL = 3\n    KSP_CONVERGED_ITS = 4\n    KSP_CONVERGED_NEG_CURVE = 5\n    # KSP_CONVERGED_CG_NEG_CURVE = 5\n    KSP_CONVERGED_CG_CONSTRAINED = 6\n    # KSP_CONVERGED_STEP_LENGTH = 6\n    KSP_CONVERGED_HAPPY_BREAKDOWN = 7\n    KSP_DIVERGED_NULL = -2\n    KSP_DIVERGED_ITS = -3\n    KSP_DIVERGED_DTOL = -4\n    KSP_DIVERGED_BREAKDOWN = -5\n    KSP_DIVERGED_BREAKDOWN_BICG = -6\n    KSP_DIVERGED_NONSYMMETRIC = -7\n    KSP_DIVERGED_INDEFINITE_PC = -8\n    KSP_DIVERGED_NANORINF = -9\n    KSP_DIVERGED_INDEFINITE_MAT = -10\n    KSP_DIVERGED_PC_FAILED = -11\n    # KSP_DIVERGED_PCSETUP_FAILED = -11\n    KSP_CONVERGED_ITERATING = 0\nend\n\n@enum PetscMemType::UInt32 begin\n    PETSC_MEMTYPE_HOST = 0\n    PETSC_MEMTYPE_DEVICE = 1\n    # PETSC_MEMTYPE_CUDA = 1\n    PETSC_MEMTYPE_NVSHMEM = 17\n    PETSC_MEMTYPE_HIP = 3\n    PETSC_MEMTYPE_SYCL = 5\nend\n\n\n# needed for Vec ---\nmutable struct _p_IS end\nconst IS = Ptr{_p_IS}\n\nmutable struct _n_ISColoring end\nconst ISColoring = Ptr{_n_ISColoring}\n\nmutable struct _p_ISLocalToGlobalMapping end\nconst ISLocalToGlobalMapping = Ptr{_p_ISLocalToGlobalMapping}\n\nconst ISLocalToGlobalMappingType = Ptr{Cchar}\n\nmutable struct _p_PetscSection end\nconst PetscSection = Ptr{_p_PetscSection}\n\nmutable struct _p_PetscSectionSym end\nconst PetscSectionSym = Ptr{_p_PetscSectionSym}\nconst PetscSectionSymType = Ptr{Cchar}\n\n\ninclude(\"../src/autowrapped/enums_wrappers.jl\")\ninclude(\"../src/autowrapped/senums_wrappers.jl\")\ninclude(\"../src/autowrapped/typedefs_wrappers.jl\")\ninclude(\"../src/autowrapped/struct_wrappers.jl\")\n\n\n# autodefined type arguments for class ------\nmutable struct SNESFunctionFn end\n\nmutable struct SNESNGSFn end\n\nmutable struct SNESJacobianFn end\n\nmutable struct SNESInitialGuessFn end\n\nmutable struct SNESUpdateFn end\n\nmutable struct _n_SNESLineSearch end\nconst SNESLineSearch = Ptr{_n_SNESLineSearch}\n\nmutable struct SNESObjectiveFn end\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct KSPConvergedReasonViewFn end\n\nmutable struct KSPMonitorFn end\n\nmutable struct KSPConvergenceTestFn end\n\nmutable struct KSPComputeOperatorsFn end\n\nmutable struct KSPComputeRHSFn end\n\nmutable struct KSPComputeInitialGuessFn end\n\nmutable struct _n_PeCtx end\nconst PeCtx = Ptr{_n_PeCtx}\n\nmutable struct KSPPSolveFn end\n\nmutable struct KSPMonitorRegisterFn end\n\nmutable struct KSPMonitorRegisterCreateFn end\n\nmutable struct KSPMonitorRegisterDestroyFn end\n\nmutable struct _n_KSPGuess end\nconst KSPGuess = Ptr{_n_KSPGuess}\n\nmutable struct KSPFlexibleModifyPCFn end\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class Mat ------\nmutable struct _n_MatNullSpace end\nconst MatNullSpace = Ptr{_n_MatNullSpace}\n\nmutable struct _n_MatTransposeColoring end\nconst MatTransposeColoring = Ptr{_n_MatTransposeColoring}\n\nmutable struct _n_hypre_ParCSRMatrix end\nconst hypre_ParCSRMatrix = Ptr{_n_hypre_ParCSRMatrix}\n\nmutable struct _n_PetscFunctionList end\nconst PetscFunctionList = Ptr{_n_PetscFunctionList}\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscOptionItems end\nconst PetscOptionItems = Ptr{_n_PetscOptionItems}\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_SSL_CTX end\nconst SSL_CTX = Ptr{_n_SSL_CTX}\n\nmutable struct _n_SSL end\nconst SSL = Ptr{_n_SSL}\n\nmutable struct _n_hid_t end\nconst hid_t = Ptr{_n_hid_t}\n\nmutable struct _n_MPI_Request end\nconst MPI_Request = Ptr{_n_MPI_Request}\n\nmutable struct _n_PetscLogHandler end\nconst PetscLogHandler = Ptr{_n_PetscLogHandler}\n\nmutable struct _n_PetscLayout end\nconst PetscLayout = Ptr{_n_PetscLayout}\n\nmutable struct _n_PetscQuadrature end\nconst PetscQuadrature = Ptr{_n_PetscQuadrature}\n\nmutable struct _n_P4estVertexMaps end\nconst P4estVertexMaps = Ptr{_n_P4estVertexMaps}\n\nmutable struct _n_pointInterpolationP4est end\nconst pointInterpolationP4est = Ptr{_n_pointInterpolationP4est}\n\nmutable struct _n_hCsize_t end\nconst hCsize_t = Ptr{_n_hCsize_t}\n\nmutable struct _n_MPIU_Count end\nconst MPIU_Count = Ptr{_n_MPIU_Count}\n\nmutable struct _n_PetscBLASInt end\nconst PetscBLASInt = Ptr{_n_PetscBLASInt}\n# -------------------------------------------------------\n\n# autodefined type arguments for class Vec ------\nmutable struct _n_ViennaCLVector end\nconst ViennaCLVector = Ptr{_n_ViennaCLVector}\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_Vecs end\nconst Vecs = Ptr{_n_Vecs}\n\nmutable struct n_PetscRandom end\nconst PetscRandom = Ptr{n_PetscRandom}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PCRiCchardsonConvergedReason end\nconst PCRiCchardsonConvergedReason = Ptr{_n_PCRiCchardsonConvergedReason}\n\nmutable struct PCModifySubMatricesFn end\n\nmutable struct PCMGCoarseSpaceConstructorFn end\n\nmutable struct PCShellPSolveFn end\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct PetscPoCintFn end\n\nmutable struct _n_DMInterpolationInfo end\nconst DMInterpolationInfo = Ptr{_n_DMInterpolationInfo}\n\nmutable struct _n_PetscDS end\nconst PetscDS = Ptr{_n_PetscDS}\n\nmutable struct _n_PetscFE end\nconst PetscFE = Ptr{_n_PetscFE}\n\nmutable struct _n_DMField end\nconst DMField = Ptr{_n_DMField}\n\nmutable struct _n_DMPoCintLocationType end\nconst DMPoCintLocationType = Ptr{_n_DMPoCintLocationType}\n\nmutable struct PetscSimplePoCintFn end\n\nmutable struct _n_DMSwarmCellDM end\nconst DMSwarmCellDM = Ptr{_n_DMSwarmCellDM}\n\nmutable struct _n_AO end\nconst AO = Ptr{_n_AO}\n\nmutable struct _n_PF end\nconst PF = Ptr{_n_PF}\n\nmutable struct _n_moab_Tag end\nconst moab_Tag = Ptr{_n_moab_Tag}\n\nmutable struct _n_moab_Range end\nconst moab_Range = Ptr{_n_moab_Range}\n\nmutable struct _n_moab_EntityHandle end\nconst moab_EntityHandle = Ptr{_n_moab_EntityHandle}\n\nmutable struct _n_moab_Interface end\nconst moab_Interface = Ptr{_n_moab_Interface}\n\nmutable struct _n_moab_ParallelComm end\nconst moab_ParallelComm = Ptr{_n_moab_ParallelComm}\n\nmutable struct _n_moab_EntityType end\nconst moab_EntityType = Ptr{_n_moab_EntityType}\n\nmutable struct _n_DMPlexTransform end\nconst DMPlexTransform = Ptr{_n_DMPlexTransform}\n\nmutable struct _n_PetscPartitioner end\nconst PetscPartitioner = Ptr{_n_PetscPartitioner}\n\nmutable struct _n_PetscFV end\nconst PetscFV = Ptr{_n_PetscFV}\n\nmutable struct _n_PetscWeakForm end\nconst PetscWeakForm = Ptr{_n_PetscWeakForm}\n\nmutable struct _n_PetscGeom end\nconst PetscGeom = Ptr{_n_PetscGeom}\n\nmutable struct _n_PetscHMapI end\nconst PetscHMapI = Ptr{_n_PetscHMapI}\n\nmutable struct TSIFunctionFn end\n\nmutable struct TSI2FunctionFn end\n\nmutable struct TSI2JacobianFn end\n\nmutable struct TSRHSFunctionFn end\n\nmutable struct TSTransientVariableFn end\n\nmutable struct TSSolutionFn end\n\nmutable struct TSForcingFn end\n\nmutable struct TSIJacobianFn end\n\nmutable struct TSRHSJacobianFn end\n\nmutable struct _n_TS end\nconst TS = Ptr{_n_TS}\n\nmutable struct DMDATSRHSFunctionLocalFn end\n\nmutable struct DMDATSRHSJacobianLocalFn end\n\nmutable struct DMDATSIFunctionLocalFn end\n\nmutable struct DMDATSIJacobianLocalFn end\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct PetscPoCintFn end\n\nmutable struct _n_DMInterpolationInfo end\nconst DMInterpolationInfo = Ptr{_n_DMInterpolationInfo}\n\nmutable struct _n_PetscDS end\nconst PetscDS = Ptr{_n_PetscDS}\n\nmutable struct _n_PetscFE end\nconst PetscFE = Ptr{_n_PetscFE}\n\nmutable struct _n_DMField end\nconst DMField = Ptr{_n_DMField}\n\nmutable struct _n_DMPoCintLocationType end\nconst DMPoCintLocationType = Ptr{_n_DMPoCintLocationType}\n\nmutable struct PetscSimplePoCintFn end\n\nmutable struct _n_DMSwarmCellDM end\nconst DMSwarmCellDM = Ptr{_n_DMSwarmCellDM}\n\nmutable struct _n_AO end\nconst AO = Ptr{_n_AO}\n\nmutable struct _n_PF end\nconst PF = Ptr{_n_PF}\n\nmutable struct _n_moab_Tag end\nconst moab_Tag = Ptr{_n_moab_Tag}\n\nmutable struct _n_moab_Range end\nconst moab_Range = Ptr{_n_moab_Range}\n\nmutable struct _n_moab_EntityHandle end\nconst moab_EntityHandle = Ptr{_n_moab_EntityHandle}\n\nmutable struct _n_moab_Interface end\nconst moab_Interface = Ptr{_n_moab_Interface}\n\nmutable struct _n_moab_ParallelComm end\nconst moab_ParallelComm = Ptr{_n_moab_ParallelComm}\n\nmutable struct _n_moab_EntityType end\nconst moab_EntityType = Ptr{_n_moab_EntityType}\n\nmutable struct _n_DMPlexTransform end\nconst DMPlexTransform = Ptr{_n_DMPlexTransform}\n\nmutable struct _n_PetscPartitioner end\nconst PetscPartitioner = Ptr{_n_PetscPartitioner}\n\nmutable struct _n_PetscFV end\nconst PetscFV = Ptr{_n_PetscFV}\n\nmutable struct _n_PetscWeakForm end\nconst PetscWeakForm = Ptr{_n_PetscWeakForm}\n\nmutable struct _n_PetscGeom end\nconst PetscGeom = Ptr{_n_PetscGeom}\n\nmutable struct _n_PetscHMapI end\nconst PetscHMapI = Ptr{_n_PetscHMapI}\n\nmutable struct TSIFunctionFn end\n\nmutable struct TSI2FunctionFn end\n\nmutable struct TSI2JacobianFn end\n\nmutable struct TSRHSFunctionFn end\n\nmutable struct TSTransientVariableFn end\n\nmutable struct TSSolutionFn end\n\nmutable struct TSForcingFn end\n\nmutable struct TSIJacobianFn end\n\nmutable struct TSRHSJacobianFn end\n\nmutable struct _n_TS end\nconst TS = Ptr{_n_TS}\n\nmutable struct DMDATSRHSFunctionLocalFn end\n\nmutable struct DMDATSRHSJacobianLocalFn end\n\nmutable struct DMDATSIFunctionLocalFn end\n\nmutable struct DMDATSIJacobianLocalFn end\n\n# -------------------------------------------------------\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_PetscDrawAxis end\nconst PetscDrawAxis = Ptr{_n_PetscDrawAxis}\n\nmutable struct _n_PetscDrawLG end\nconst PetscDrawLG = Ptr{_n_PetscDrawLG}\n\nmutable struct _n_PetscDrawSP end\nconst PetscDrawSP = Ptr{_n_PetscDrawSP}\n\nmutable struct _n_PetscDrawHG end\nconst PetscDrawHG = Ptr{_n_PetscDrawHG}\n\nmutable struct _n_PetscDrawBar end\nconst PetscDrawBar = Ptr{_n_PetscDrawBar}\n\n# -------------------------------------------------------\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_PetscDrawAxis end\nconst PetscDrawAxis = Ptr{_n_PetscDrawAxis}\n\nmutable struct _n_PetscDrawLG end\nconst PetscDrawLG = Ptr{_n_PetscDrawLG}\n\nmutable struct _n_PetscDrawSP end\nconst PetscDrawSP = Ptr{_n_PetscDrawSP}\n\nmutable struct _n_PetscDrawHG end\nconst PetscDrawHG = Ptr{_n_PetscDrawHG}\n\nmutable struct _n_PetscDrawBar end\nconst PetscDrawBar = Ptr{_n_PetscDrawBar}\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscRegressor end\nconst PetscRegressor = Ptr{_n_PetscRegressor}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_ISColoringValue end\nconst ISColoringValue = Ptr{_n_ISColoringValue}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_TSTrajectory end\nconst TSTrajectory = Ptr{_n_TSTrajectory}\n\nmutable struct _n_TSAdapt end\nconst TSAdapt = Ptr{_n_TSAdapt}\n\nmutable struct _n_TSMonitorVTKCtx end\nconst TSMonitorVTKCtx = Ptr{_n_TSMonitorVTKCtx}\n\nmutable struct TSRHSJacobianPFn end\n\nmutable struct _n_TSGLLEAdapt end\nconst TSGLLEAdapt = Ptr{_n_TSGLLEAdapt}\n\nmutable struct TSGLLEAcceptFn end\n\nmutable struct TSAlpha2PredictorFn end\n\nmutable struct TSRHSFunctionFn end\nmutable struct TSSolutionFn end\nmutable struct TSForcingFn end\nmutable struct TSRHSJacobianFn end\nmutable struct TSIFunctionFn end\nmutable struct TSIJacobianFn end\nmutable struct TSI2FunctionFn end\nmutable struct TSI2JacobianFn end\nmutable struct TSTransientVariableFn end\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_TaoLineSearch end\nconst TaoLineSearch = Ptr{_n_TaoLineSearch}\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_DMAdaptor end\nconst DMAdaptor = Ptr{_n_DMAdaptor}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_DMSwarmDataField end\nconst DMSwarmDataField = Ptr{_n_DMSwarmDataField}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_DMSwarmDataBucket end\nconst DMSwarmDataBucket = Ptr{_n_DMSwarmDataBucket}\n\nmutable struct _n_DMSwarmCellDM end\nconst DMSwarmCellDM = Ptr{_n_DMSwarmCellDM}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_DMSwarmSort end\nconst DMSwarmSort = Ptr{_n_DMSwarmSort}\n\nmutable struct _n_DMPlexPoCintQueue end\nconst DMPlexPoCintQueue = Ptr{_n_DMPlexPoCintQueue}\n\nmutable struct _n_DMNetworkMonitor end\nconst DMNetworkMonitor = Ptr{_n_DMNetworkMonitor}\n\nmutable struct _n_DMField end\nconst DMField = Ptr{_n_DMField}\n\nmutable struct _n_DMPlexTransform end\nconst DMPlexTransform = Ptr{_n_DMPlexTransform}\n\nmutable struct _n_PetscSimplePoCintFn end\nconst PetscSimplePoCintFn = Ptr{_n_PetscSimplePoCintFn}\n\n# autodefined type arguments for class ------\nmutable struct _n_VecTagger end\nconst VecTagger = Ptr{_n_VecTagger}\n\n# autodefined type arguments for class ------\nmutable struct PetscPoCintJacFn end\n\nmutable struct PetscRiemannFn end\n\nmutable struct PetscBdPoCintFn end\n\nmutable struct PetscBdPoCintJacFn end\n\nmutable struct PetscPoCintExactSolutionFn end\n\nmutable struct PetscPoCintBoundFn end\n\nmutable struct _n_PetscTabulation end\nconst PetscTabulation = Ptr{_n_PetscTabulation}\n\nmutable struct _n_PetscDS end\nconst PetscDS = Ptr{_n_PetscDS}\n\nmutable struct _n_PetscWeakForm end\nconst PetscWeakForm = Ptr{_n_PetscWeakForm}\n\nmutable struct PetscPoCintFn end\n# -------------------------------------------------------\n\nmutable struct _n_MatColoring end\nconst MatColoring = Ptr{_n_MatColoring}\n\nmutable struct _n_MatFDColoring end\nconst MatFDColoring = Ptr{_n_MatFDColoring}\n\nmutable struct MatFDColoringFn end\n\nmutable struct _n_MatPartitioning end\nconst MatPartitioning = Ptr{_n_MatPartitioning}\n\nmutable struct MatNullSpaceRemoveFn end\n\nmutable struct MatMFFDFn end\n\nmutable struct MatMFFDiFn end\n\nmutable struct MatMFFDiBaseFn end\n\nmutable struct MatMFFDCheckhFn end\n\nmutable struct _n_MatCoarsen end\nconst MatCoarsen = Ptr{_n_MatCoarsen}\n\nmutable struct _n_PetscCoarsenData end\nconst PetscCoarsenData = Ptr{_n_PetscCoarsenData}\n# -------------------------------------------------------\n\n\n# autodefined type arguments for class ------\nmutable struct SNESLineSearchVIProjectFn end\n\nmutable struct SNESLineSearchVINormFn end\n\nmutable struct SNESLineSearchVIDirDerivFn end\n\nmutable struct SNESLineSearchShellApplyFn end\n\nmutable struct _n_SNESLineSearch end\nconst SNESLineSearch = Ptr{_n_SNESLineSearch}\n\n# -------------------------------------------------------\n\nmutable struct _n_PetscBag end\nconst PetscBag = Ptr{_n_PetscBag}\n\nmutable struct _n_PetscKDTree end\nconst PetscKDTree = Ptr{_n_PetscKDTree}\n\n# autodefined type arguments for class ------\nmutable struct _n_TSMonitorDrawCtx end\nconst TSMonitorDrawCtx = Ptr{_n_TSMonitorDrawCtx}\n\nmutable struct _n_TSMonitorLGCtxNetwork end\nconst TSMonitorLGCtxNetwork = Ptr{_n_TSMonitorLGCtxNetwork}\n\nmutable struct _n_TSMonitorEnvelopeCtx end\nconst TSMonitorEnvelopeCtx = Ptr{_n_TSMonitorEnvelopeCtx}\n\nmutable struct _n_TSMonitorSPEigCtx end\nconst TSMonitorSPEigCtx = Ptr{_n_TSMonitorSPEigCtx}\n\nmutable struct _n_TSMonitorSPCtx end\nconst TSMonitorSPCtx = Ptr{_n_TSMonitorSPCtx}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_TSMonitorHGCtx end\nconst TSMonitorHGCtx = Ptr{_n_TSMonitorHGCtx}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_TSAdapt end\nconst TSAdapt = Ptr{_n_TSAdapt}\n\nmutable struct _n_TSTrajectory end\nconst TSTrajectory = Ptr{_n_TSTrajectory}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_TSGLLEAdapt end\nconst TSGLLEAdapt = Ptr{_n_TSGLLEAdapt}\n\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscDevice end\nconst PetscDevice = Ptr{_n_PetscDevice}\n\nmutable struct _n_PetscDeviceContext end\nconst PetscDeviceContext = Ptr{_n_PetscDeviceContext}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscMatlabEngine end\nconst PetscMatlabEngine = Ptr{_n_PetscMatlabEngine}\n# -------------------------------------------------------\n\nmutable struct _n_PetscPartitioner end\nconst PetscPartitioner = Ptr{_n_PetscPartitioner}\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscConvEst end\nconst PetscConvEst = Ptr{_n_PetscConvEst}\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscToken end\nconst PetscToken = Ptr{_n_PetscToken}\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscBench end\nconst PetscBench = Ptr{_n_PetscBench}\n\nmutable struct _n_PetscFE end\nconst PetscFE = Ptr{_n_PetscFE}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_PetscObjectList end\nconst PetscObjectList = Ptr{_n_PetscObjectList}\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscDLLibrary end\nconst PetscDLLibrary = Ptr{_n_PetscDLLibrary}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscContainer end\nconst PetscContainer = Ptr{_n_PetscContainer}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscSubcomm end\nconst PetscSubcomm = Ptr{_n_PetscSubcomm}\n\n# -------------------------------------------------------\n# autodefined type arguments for class ------\nmutable struct _n_PetscShmComm end\nconst PetscShmComm = Ptr{_n_PetscShmComm}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscOmpCtrl end\nconst PetscOmpCtrl = Ptr{_n_PetscOmpCtrl}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscSegBuffer end\nconst PetscSegBuffer = Ptr{_n_PetscSegBuffer}\n# -------------------------------------------------------\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscHeap end\nconst PetscHeap = Ptr{_n_PetscHeap}\n\n# autodefined type arguments for class ------\nmutable struct _n_PetscLimiter end\nconst PetscLimiter = Ptr{_n_PetscLimiter}\n\n# autodefined type arguments for class ------\nmutable struct _n_TaoMonitorDrawCtx end\nconst TaoMonitorDrawCtx = Ptr{_n_TaoMonitorDrawCtx}\n\n# autodefined type arguments for class ------\nmutable struct _n_DMPlexStorageVersion end\nconst DMPlexStorageVersion = Ptr{_n_DMPlexStorageVersion}\n\nmutable struct _n_PetscViewers end\nconst PetscViewers = Ptr{_n_PetscViewers}\n\nmutable struct _n_MPI_Group end\nconst MPI_Group = Ptr{_n_MPI_Group}\n\nmutable struct _n_PetscOptionsHelpPrCinted end\nconst PetscOptionsHelpPrCinted = Ptr{_n_PetscOptionsHelpPrCinted}\n"
  },
  {
    "path": "wrapping/prologue.jl",
    "content": "#\n# START OF PROLOGUE\n#\n\nusing MPI\nconst MPI_Comm = MPI.Comm\nconst MPI_Datatype = MPI.MPI_Datatype\nconst MPI_File = MPI.MPI_File\nconst MPI_Aint = MPI.MPI_Aint\nconst MPI_Info = MPI.MPI_Info\nconst MPI_Win = MPI.MPI_Win\nconst MPI_Offset = MPI.MPI_Offset\nconst MPI_Op = MPI.MPI_Op\nconst MPI_UNSIGNED_SHORT = MPI.UNSIGNED_SHORT\nconst MPI_INT64_T = MPI.INT64_T\nconst MPI_INT32_T = MPI.INT32_T\nconst MPI_FLOAT = MPI.FLOAT\nconst MPI_COMM_SELF = MPI.COMM_SELF\nconst MPI_DOUBLE = MPI.DOUBLE\nconst MPI_SUM = MPI.SUM\nconst MPI_MAX = MPI.MAX\nconst MPI_MIN = MPI.MIN\nconst MPI_REPLACE = MPI.REPLACE\nconst MPIU_INT64 = MPI.UINT64_T\nconst MPIU_INT32 = MPI.UINT32_T\n\n# We know these will be Cvoid, so just set them to be that\nconst PetscViewer = Ptr{Cvoid}\nconst PetscObject = Ptr{Cvoid}\n\n\nconst PETSC_DECIDE = -1\nconst PETSC_DETERMINE = PETSC_DECIDE\nconst PETSC_COMM_SELF = MPI.COMM_SELF\n\nPetscInt = Int64\nPetscInt64 = Int64\nPetscInt32 = Int32\nPetscScalar = Float64\nPetscReal = Float64\n#PetscBool = Bool\n\nmutable struct _n_ISColoring end\nconst ISColoring = Ptr{_n_ISColoring}\n\n# ----- Custom Julia struct for PETSc Vec -----\nconst CVec = Ptr{Cvoid}\nabstract type AbstractPetscVec{T} end\nmutable struct PetscVec{PetscLib} <: AbstractPetscVec{PetscLib}\n    ptr::CVec\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscVec{PetscLib}(ptr::CVec, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty Vec (null pointer)\n    PetscVec{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscVec(lib::PetscLib) where {PetscLib} = PetscVec{PetscLib}()\nPetscVec(ptr::CVec, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscVec{PetscLib}(ptr, age)\nBase.convert(::Type{CVec}, v::AbstractPetscVec) = v.ptr\nBase.unsafe_convert(::Type{CVec}, v::AbstractPetscVec) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc Mat -----\nconst CMat = Ptr{Cvoid}\nabstract type AbstractPetscMat{T} end\nmutable struct PetscMat{PetscLib} <: AbstractPetscMat{PetscLib}\n    ptr::CMat\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscMat{PetscLib}(ptr::CMat, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty Mat (null pointer)\n    PetscMat{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscMat(lib::PetscLib) where {PetscLib} = PetscMat{PetscLib}()\nPetscMat(ptr::CMat, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscMat{PetscLib}(ptr, age)\nBase.convert(::Type{CMat}, v::AbstractPetscMat) = v.ptr\nBase.unsafe_convert(::Type{CMat}, v::AbstractPetscMat) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc KSP -----\nconst CKSP = Ptr{Cvoid}\nabstract type AbstractPetscKSP{T} end\nmutable struct PetscKSP{PetscLib} <: AbstractPetscKSP{PetscLib}\n    ptr::CKSP\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscKSP{PetscLib}(ptr::CKSP, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty KSP (null pointer)\n    PetscKSP{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscKSP(lib::PetscLib) where {PetscLib} = PetscKSP{PetscLib}()\nPetscKSP(ptr::CKSP, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscKSP{PetscLib}(ptr, age)\nBase.convert(::Type{CKSP}, v::AbstractPetscKSP) = v.ptr\nBase.unsafe_convert(::Type{CKSP}, v::AbstractPetscKSP) = v.ptr\n\n\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc SNES -----\nconst CSNES = Ptr{Cvoid}\nabstract type AbstractPetscSNES{T} end\nmutable struct PetscSNES{PetscLib} <: AbstractPetscSNES{PetscLib}\n    ptr::CSNES\n    age::Int\n    f!::Function\n    updateJ!::Function\n\n    # Constructor from pointer and age\n    #PetscSNES{PetscLib}(ptr::CSNES, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty SNES (null pointer)\n    PetscSNES{PetscLib}(ptr, age) where {PetscLib} = new{PetscLib}(\n                        ptr, \n                        age,\n                        x -> error(\"function not defined\"),\n                        x -> error(\"function not defined\"),\n                        )                  \nend\n\n# Convenience constructor from petsclib instance\nPetscSNES(lib::PetscLib) where {PetscLib} = PetscSNES{PetscLib}()\nPetscSNES(ptr::Ptr, lib::PetscLib, f!::Function, updateJ!::Function, age::Int = 0) where {PetscLib} = PetscSNES{PetscLib}(ptr, age, f!, updateJ!)\nPetscSNES(ptr::Ptr, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscSNES{PetscLib}(ptr, age)\nBase.convert(::Type{CSNES}, v::AbstractPetscSNES) = v.ptr\nBase.unsafe_convert(::Type{CSNES}, v::AbstractPetscSNES) = v.ptr\n# ------------------------------------------------------\n\n# ----- Custom Julia struct for PETSc DM -----\nconst CDM = Ptr{Cvoid}\nabstract type AbstractPetscDM{T} end\nmutable struct PetscDM{PetscLib} <: AbstractPetscDM{PetscLib}\n    ptr::CDM\n    age::Int\n    \n    # Constructor from pointer and age\n    PetscDM{PetscLib}(ptr::CDM, age::Int = 0) where {PetscLib} = new{PetscLib}(ptr, age)\n    \n    # Constructor for empty DM (null pointer)\n    PetscDM{PetscLib}() where {PetscLib} = new{PetscLib}(Ptr{Cvoid}(C_NULL), 0)\nend\n\n# Convenience constructor from petsclib instance\nPetscDM(lib::PetscLib) where {PetscLib} = PetscDM{PetscLib}()\nPetscDM(ptr::CDM, lib::PetscLib, age::Int = 0) where {PetscLib} = PetscDM{PetscLib}(ptr, age)\nBase.convert(::Type{CDM}, v::AbstractPetscDM) = v.ptr\nBase.unsafe_convert(::Type{CDM}, v::AbstractPetscDM) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# PetscOptions\nconst COptions = Ptr{Cvoid} \nabstract type AbstractPetscOptions{T} end\n\nmutable struct PetscOptions{PetscLib} <: AbstractPetscOptions{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    PetscOptions{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nPetscOptions(lib::PetscLib) where {PetscLib} = PetscOptions{PetscLib}()\nPetscOptions(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = PetscOptions{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractPetscOptions) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractPetscOptions) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# IS\nconst CIS = Ptr{Cvoid} \nabstract type AbstractIS{T} end\n\nmutable struct IS{PetscLib} <: AbstractIS{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    IS{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nIS(lib::PetscLib) where {PetscLib} = IS{PetscLib}()\nIS(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = IS{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractIS) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractIS) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# PF\nconst CPF = Ptr{Cvoid} \nabstract type AbstractPF{T} end\n\nmutable struct PF{PetscLib} <: AbstractPF{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    PF{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nPF(lib::PetscLib) where {PetscLib} = PF{PetscLib}()\nPF(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = PF{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractPF) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractPF) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# TS\nconst CTS = Ptr{Cvoid} \nabstract type AbstractTS{T} end\n\nmutable struct TS{PetscLib} <: AbstractTS{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    TS{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nTS(lib::PetscLib) where {PetscLib} = TS{PetscLib}()\nTS(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = TS{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractTS) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractTS) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# Tao\nconst CTao = Ptr{Cvoid} \nabstract type AbstractTao{T} end\n\nmutable struct Tao{PetscLib} <: AbstractTao{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    Tao{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nTao(lib::PetscLib) where {PetscLib} = Tao{PetscLib}()\nTao(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = Tao{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractTao) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractTao) = v.ptr\n# ------------------------------------------------------\n\n# ------------------------------------------------------\n# AO\nconst CAO = Ptr{Cvoid} \nabstract type AbstractAO{T} end\n\nmutable struct AO{PetscLib} <: AbstractAO{PetscLib}\n    ptr::Ptr{Cvoid}\n    \n    AO{PetscLib}(ptr::Ptr{Cvoid} = C_NULL) where {PetscLib} = new{PetscLib}(ptr)\nend\n\n# Convenience constructors\nAO(lib::PetscLib) where {PetscLib} = AO{PetscLib}()\nAO(ptr::Ptr{Cvoid}, lib::PetscLib) where {PetscLib} = AO{PetscLib}(ptr)\n\n# Conversion methods\nBase.convert(::Type{Ptr{Cvoid}}, v::AbstractAO) = v.ptr\nBase.unsafe_convert(::Type{Ptr{Cvoid}}, v::AbstractAO) = v.ptr\n# ------------------------------------------------------\n\n\n# Stuff that I don't really want to define by hand, but seem to not be part of the petsc python interface?\nmutable struct _p_PetscSF end\nconst PetscSF = Ptr{_p_PetscSF}\n\nconst PETSCSTACKSIZE = 64\n\nconst void = Cvoid\nconst char = Cchar\n\nmutable struct PetscDraw end\nmutable struct DMLabel end\nmutable struct TSMonitorLGCtx end\nmutable struct PetscCtxDestroyFn end\nmutable struct PetscErrorCodeFn end\n\n# stuff I need to define to get PETSc.jl to load with \"using\". We need to find a real solution\nmutable struct _n_PC end\nconst PC = Ptr{_n_PC}\n\nconst PetscObject = Ptr{Cvoid}\nconst external = Ptr{Cvoid}\nconst PetscVoidFn = Cvoid\nconst PetscProbFn = Ptr{Cvoid}\nconst PetscBT = Ptr{Cchar}\n\n# required in Sys_wrappers\nmutable struct _n_PetscLogRegistry end\nconst PetscLogRegistry = Ptr{_n_PetscLogRegistry}\n\nmutable struct _n_PetscIntStack end\nconst PetscIntStack = Ptr{_n_PetscIntStack}\nmutable struct _n_PetscLogState\n    registry::PetscLogRegistry\n    active::PetscBT\n    stage_stack::PetscIntStack\n    current_stage::Cint\n    bt_num_stages::Cint\n    bt_num_events::Cint\n    refct::Cint\n    _n_PetscLogState() = new()\nend\nconst PetscLogState = Ptr{_n_PetscLogState}\n\n@enum KSPConvergedReason::Int32 begin\n    KSP_CONVERGED_RTOL_NORMAL = 1\n    KSP_CONVERGED_ATOL_NORMAL = 9\n    KSP_CONVERGED_RTOL = 2\n    KSP_CONVERGED_ATOL = 3\n    KSP_CONVERGED_ITS = 4\n    KSP_CONVERGED_NEG_CURVE = 5\n    # KSP_CONVERGED_CG_NEG_CURVE = 5\n    KSP_CONVERGED_CG_CONSTRAINED = 6\n    # KSP_CONVERGED_STEP_LENGTH = 6\n    KSP_CONVERGED_HAPPY_BREAKDOWN = 7\n    KSP_DIVERGED_NULL = -2\n    KSP_DIVERGED_ITS = -3\n    KSP_DIVERGED_DTOL = -4\n    KSP_DIVERGED_BREAKDOWN = -5\n    KSP_DIVERGED_BREAKDOWN_BICG = -6\n    KSP_DIVERGED_NONSYMMETRIC = -7\n    KSP_DIVERGED_INDEFINITE_PC = -8\n    KSP_DIVERGED_NANORINF = -9\n    KSP_DIVERGED_INDEFINITE_MAT = -10\n    KSP_DIVERGED_PC_FAILED = -11\n    # KSP_DIVERGED_PCSETUP_FAILED = -11\n    KSP_CONVERGED_ITERATING = 0\nend\n\n@enum PetscMemType::UInt32 begin\n    PETSC_MEMTYPE_HOST = 0\n    PETSC_MEMTYPE_DEVICE = 1\n    # PETSC_MEMTYPE_CUDA = 1\n    PETSC_MEMTYPE_NVSHMEM = 17\n    PETSC_MEMTYPE_HIP = 3\n    PETSC_MEMTYPE_SYCL = 5\nend\n\n# needed for Mat ---\n#\n# END OF PROLOGUE\n#\n\n# load all generated files\n#include(\"../src/LibPETSc_lib.jl\")\ninclude(\"petscarray.jl\")\ninclude(\"enums_wrappers.jl\")\ninclude(\"senums_wrappers.jl\")\ninclude(\"typedefs_wrappers.jl\")\ninclude(\"struct_wrappers.jl\")\ninclude(\"Sys_wrappers.jl\")\ninclude(\"Vec_wrappers.jl\")\ninclude(\"Vecs_wrappers.jl\")\ninclude(\"Mat_wrappers.jl\")\ninclude(\"KSP_wrappers.jl\")\ninclude(\"SNES_wrappers.jl\")\ninclude(\"DM_wrappers.jl\")\ninclude(\"PetscOptions_wrappers.jl\")\ninclude(\"PetscObject_wrappers.jl\")\ninclude(\"PetscDraw_wrappers.jl\")\ninclude(\"PetscRegressor_wrappers.jl\")\ninclude(\"PF_wrappers.jl\")\ninclude(\"IS_wrappers.jl\")\ninclude(\"TS_wrappers.jl\")\ninclude(\"AO_wrappers.jl\")\ninclude(\"Tao_wrappers.jl\")\ninclude(\"DMaddons_wrappers.jl\")\ninclude(\"VecTagger_wrappers.jl\")\ninclude(\"PetscDS_wrappers.jl\")\ninclude(\"Mataddons_wrappers.jl\")\ninclude(\"ISaddons_wrappers.jl\")\ninclude(\"SNESLineSearch_wrappers.jl\")\ninclude(\"PetscBag_wrappers.jl\")\ninclude(\"KSPGuess_wrappers.jl\")\ninclude(\"PetscKDTree_wrappers.jl\")\ninclude(\"PetscGridHash_wrappers.jl\")\ninclude(\"PetscSection_wrappers.jl\")\ninclude(\"TSaddons_wrappers.jl\")\ninclude(\"PetscSpace_wrappers.jl\")\ninclude(\"PetscDevice_wrappers.jl\")\ninclude(\"PetscLayout_wrappers.jl\")\ninclude(\"PetscMatlabEngine_wrappers.jl\")\ninclude(\"PetscPartitioner_wrappers.jl\")\ninclude(\"PetscConvEst_wrappers.jl\")\ninclude(\"PetscFE_wrappers.jl\")\ninclude(\"PetscBench_wrappers.jl\")\ninclude(\"PetscToken_wrappers.jl\")\ninclude(\"PetscFunctionList_wrappers.jl\")\ninclude(\"PetscDLLibrary_wrappers.jl\")\ninclude(\"PetscContainer_wrappers.jl\")\ninclude(\"PetscRandom_wrappers.jl\")\ninclude(\"Petsccomm_wrappers.jl\")\ninclude(\"PetscOmpCtrl_wrappers.jl\")\ninclude(\"PetscHeap_wrappers.jl\")\ninclude(\"PetscSegBuffer_wrappers.jl\")\ninclude(\"PetscLimiter_wrappers.jl\")\ninclude(\"PetscFV_wrappers.jl\")\ninclude(\"Tao_addons_wrappers.jl\")\ninclude(\"PetscViewer_wrappers.jl\")\ninclude(\"Characteristic_wrappers.jl\")\ninclude(\"PetscSF_wrappers.jl\")\ninclude(\"PetscDualSpace_wrappers.jl\")\ninclude(\"PetscOptions_addons_wrappers.jl\")\ninclude(\"PetscIntStack_wrappers.jl\")\ninclude(\"PetscLog_wrappers.jl\")"
  },
  {
    "path": "wrapping/test.jl",
    "content": "\"\"\"\n\tVecRestoreArray4d(petsclib::PetscLibType,x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 2}) \nRestores a vector after `VecGetArray4d()` has been called.\n\nLogically Collective\n\nInput Parameters:\n- `x`      - the vector\n- `m`      - first dimension of four dimensional array\n- `n`      - second dimension of the four dimensional array\n- `p`      - third dimension of the four dimensional array\n- `q`      - fourth dimension of the four dimensional array\n- `mstart` - first index you will use in first coordinate direction (often 0)\n- `nstart` - first index in the second coordinate direction (often 0)\n- `pstart` - first index in the third coordinate direction (often 0)\n- `qstart` - first index in the fourth coordinate direction (often 0)\n- `a`      - location of pointer to array obtained from VecGetArray4d()\n\nLevel: developer\n\n-seealso: [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecPlaceArray()`,\n`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`\n`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`\n\n# External Links\n$(_doc_external(\"Vec/VecRestoreArray4d\"))\n\"\"\"\nfunction VecRestoreArray4d(petsclib::PetscLibType, x::PetscVec, m::PetscInt, n::PetscInt, p::PetscInt, q::PetscInt, mstart::PetscInt, nstart::PetscInt, pstart::PetscInt, qstart::PetscInt, a::PetscArray{PetscScalar, 2}) end\n\n@for_petsc function VecRestoreArray4d(petsclib::$UnionPetscLib, x::PetscVec, m::$PetscInt, n::$PetscInt, p::$PetscInt, q::$PetscInt, mstart::$PetscInt, nstart::$PetscInt, pstart::$PetscInt, qstart::$PetscInt, a::PetscArray{$PetscScalar, 2} )\n\tif a.ptr[]  != C_NULL  # CHECK ARRAY NAME AND SIZE!!\n\n    @chk ccall(\n               (:VecRestoreArray4d, $petsc_library),\n               PetscErrorCode,\n               (CVec, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, $PetscInt, Ref{Ptr{Ptr{$PetscScalar}}}),\n               x, m, n, p, q, mstart, nstart, pstart, qstart, a,\n              )\n\n\t\ta.ptr[] = C_NULL\n\telse\n\t\terror(\"The input array is already restored\")\n\tend\n\n\n\treturn nothing\nend \n\n"
  }
]